RTEMS 4.11Annotated Report
Mon Jan 10 04:18:01 2011
a000ffd4 <TOD_MICROSECONDS_TO_TICKS>:
uint32_t TOD_MICROSECONDS_TO_TICKS(
uint32_t microseconds
)
{
return (microseconds / rtems_configuration_get_microseconds_per_tick());
a000ffd4: e59f300c ldr r3, [pc, #12] ; a000ffe8 <TOD_MICROSECONDS_TO_TICKS+0x14><== NOT EXECUTED
#include <rtems/score/tod.h>
uint32_t TOD_MICROSECONDS_TO_TICKS(
uint32_t microseconds
)
{
a000ffd8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
return (microseconds / rtems_configuration_get_microseconds_per_tick());
a000ffdc: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
a000ffe0: eb004f28 bl a0023c88 <__aeabi_uidiv> <== NOT EXECUTED
}
a000ffe4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000cd18 <_CORE_RWLock_Initialize>:
CORE_RWLock_Control *the_rwlock,
CORE_RWLock_Attributes *the_rwlock_attributes
)
{
the_rwlock->Attributes = *the_rwlock_attributes;
a000cd18: e5912000 ldr r2, [r1] <== NOT EXECUTED
the_rwlock->number_of_waiting_threads = 0;
*/
the_rwlock->number_of_readers = 0;
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
_Thread_queue_Initialize(
a000cd1c: e3a03003 mov r3, #3 <== NOT EXECUTED
the_rwlock->Attributes = *the_rwlock_attributes;
/*
the_rwlock->number_of_waiting_threads = 0;
*/
the_rwlock->number_of_readers = 0;
a000cd20: e3a01000 mov r1, #0 <== NOT EXECUTED
CORE_RWLock_Control *the_rwlock,
CORE_RWLock_Attributes *the_rwlock_attributes
)
{
the_rwlock->Attributes = *the_rwlock_attributes;
a000cd24: e5802040 str r2, [r0, #64] ; 0x40 <== NOT EXECUTED
the_rwlock->number_of_waiting_threads = 0;
*/
the_rwlock->number_of_readers = 0;
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
_Thread_queue_Initialize(
a000cd28: e3a02802 mov r2, #131072 ; 0x20000 <== NOT EXECUTED
the_rwlock->Attributes = *the_rwlock_attributes;
/*
the_rwlock->number_of_waiting_threads = 0;
*/
the_rwlock->number_of_readers = 0;
a000cd2c: e5801048 str r1, [r0, #72] ; 0x48 <== NOT EXECUTED
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
a000cd30: e5801044 str r1, [r0, #68] ; 0x44 <== NOT EXECUTED
_Thread_queue_Initialize(
a000cd34: ea00088d b a000ef70 <_Thread_queue_Initialize> <== NOT EXECUTED
a000cd38 <_CORE_RWLock_Obtain_for_reading>:
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
a000cd38: e59fc0cc ldr ip, [pc, #204] ; a000ce0c <_CORE_RWLock_Obtain_for_reading+0xd4><== NOT EXECUTED
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
a000cd3c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
a000cd40: e59c5004 ldr r5, [ip, #4] <== NOT EXECUTED
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
a000cd44: e1a04000 mov r4, r0 <== NOT EXECUTED
a000cd48: e1a07001 mov r7, r1 <== NOT EXECUTED
a000cd4c: e1a06003 mov r6, r3 <== NOT EXECUTED
a000cd50: e202a0ff and sl, r2, #255 ; 0xff <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000cd54: e10f8000 mrs r8, CPSR <== NOT EXECUTED
a000cd58: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED
a000cd5c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
a000cd60: e5903044 ldr r3, [r0, #68] ; 0x44 <== NOT EXECUTED
a000cd64: e3530000 cmp r3, #0 <== NOT EXECUTED
a000cd68: 1a000008 bne a000cd90 <_CORE_RWLock_Obtain_for_reading+0x58><== NOT EXECUTED
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
the_rwlock->number_of_readers += 1;
a000cd6c: e5903048 ldr r3, [r0, #72] ; 0x48 <== NOT EXECUTED
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
a000cd70: e3a02001 mov r2, #1 <== NOT EXECUTED
a000cd74: e5802044 str r2, [r0, #68] ; 0x44 <== NOT EXECUTED
the_rwlock->number_of_readers += 1;
a000cd78: e0833002 add r3, r3, r2 <== NOT EXECUTED
a000cd7c: e5803048 str r3, [r0, #72] ; 0x48 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000cd80: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
a000cd84: e3a03000 mov r3, #0 <== NOT EXECUTED
a000cd88: e5853034 str r3, [r5, #52] ; 0x34 <== NOT EXECUTED
return;
a000cd8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
a000cd90: e3530001 cmp r3, #1 <== NOT EXECUTED
a000cd94: 0a000012 beq a000cde4 <_CORE_RWLock_Obtain_for_reading+0xac><== NOT EXECUTED
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
a000cd98: e35a0000 cmp sl, #0 <== NOT EXECUTED
a000cd9c: 1a000003 bne a000cdb0 <_CORE_RWLock_Obtain_for_reading+0x78><== NOT EXECUTED
a000cda0: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
a000cda4: e3a03002 mov r3, #2 <== NOT EXECUTED
a000cda8: e5853034 str r3, [r5, #52] ; 0x34 <== NOT EXECUTED
a000cdac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
a000cdb0: e3a03000 mov r3, #0 <== NOT EXECUTED
a000cdb4: e3a02001 mov r2, #1 <== NOT EXECUTED
a000cdb8: e5842030 str r2, [r4, #48] ; 0x30 <== NOT EXECUTED
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
a000cdbc: e5854044 str r4, [r5, #68] ; 0x44 <== NOT EXECUTED
executing->Wait.id = id;
a000cdc0: e5857020 str r7, [r5, #32] <== NOT EXECUTED
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
a000cdc4: e5853030 str r3, [r5, #48] ; 0x30 <== NOT EXECUTED
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
a000cdc8: e5853034 str r3, [r5, #52] ; 0x34 <== NOT EXECUTED
a000cdcc: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
a000cdd0: e59f2038 ldr r2, [pc, #56] ; a000ce10 <_CORE_RWLock_Obtain_for_reading+0xd8><== NOT EXECUTED
a000cdd4: e1a00004 mov r0, r4 <== NOT EXECUTED
a000cdd8: e1a01006 mov r1, r6 <== NOT EXECUTED
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
a000cddc: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
a000cde0: ea000755 b a000eb3c <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
return;
case CORE_RWLOCK_LOCKED_FOR_READING: {
Thread_Control *waiter;
waiter = _Thread_queue_First( &the_rwlock->Wait_queue );
a000cde4: eb00083a bl a000eed4 <_Thread_queue_First> <== NOT EXECUTED
if ( !waiter ) {
a000cde8: e3500000 cmp r0, #0 <== NOT EXECUTED
a000cdec: 1affffe9 bne a000cd98 <_CORE_RWLock_Obtain_for_reading+0x60><== NOT EXECUTED
the_rwlock->number_of_readers += 1;
a000cdf0: e5943048 ldr r3, [r4, #72] ; 0x48 <== NOT EXECUTED
a000cdf4: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000cdf8: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
a000cdfc: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
a000ce00: e3a03000 mov r3, #0 <== NOT EXECUTED
a000ce04: e5853034 str r3, [r5, #52] ; 0x34 <== NOT EXECUTED
return;
a000ce08: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000ce14 <_CORE_RWLock_Obtain_for_writing>:
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
a000ce14: e59fc084 ldr ip, [pc, #132] ; a000cea0 <_CORE_RWLock_Obtain_for_writing+0x8c><== NOT EXECUTED
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
a000ce18: e92d0030 push {r4, r5} <== NOT EXECUTED
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
a000ce1c: e59cc004 ldr ip, [ip, #4] <== NOT EXECUTED
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
a000ce20: e20220ff and r2, r2, #255 ; 0xff <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000ce24: e10f5000 mrs r5, CPSR <== NOT EXECUTED
a000ce28: e3854080 orr r4, r5, #128 ; 0x80 <== NOT EXECUTED
a000ce2c: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
a000ce30: e5904044 ldr r4, [r0, #68] ; 0x44 <== NOT EXECUTED
a000ce34: e3540000 cmp r4, #0 <== NOT EXECUTED
a000ce38: 1a000006 bne a000ce58 <_CORE_RWLock_Obtain_for_writing+0x44><== NOT EXECUTED
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
a000ce3c: e3a03002 mov r3, #2 <== NOT EXECUTED
a000ce40: e5803044 str r3, [r0, #68] ; 0x44 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ce44: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
a000ce48: e3a03000 mov r3, #0 <== NOT EXECUTED
a000ce4c: e58c3034 str r3, [ip, #52] ; 0x34 <== NOT EXECUTED
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
a000ce50: e8bd0030 pop {r4, r5} <== NOT EXECUTED
a000ce54: e12fff1e bx lr <== NOT EXECUTED
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
a000ce58: e3520000 cmp r2, #0 <== NOT EXECUTED
a000ce5c: 1a000003 bne a000ce70 <_CORE_RWLock_Obtain_for_writing+0x5c><== NOT EXECUTED
a000ce60: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
a000ce64: e3a03002 mov r3, #2 <== NOT EXECUTED
a000ce68: e58c3034 str r3, [ip, #52] ; 0x34 <== NOT EXECUTED
a000ce6c: eafffff7 b a000ce50 <_CORE_RWLock_Obtain_for_writing+0x3c> <== NOT EXECUTED
a000ce70: e3a02001 mov r2, #1 <== NOT EXECUTED
a000ce74: e5802030 str r2, [r0, #48] ; 0x30 <== NOT EXECUTED
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
a000ce78: e58c2030 str r2, [ip, #48] ; 0x30 <== NOT EXECUTED
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
a000ce7c: e3a02000 mov r2, #0 <== NOT EXECUTED
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
a000ce80: e58c0044 str r0, [ip, #68] ; 0x44 <== NOT EXECUTED
executing->Wait.id = id;
a000ce84: e58c1020 str r1, [ip, #32] <== NOT EXECUTED
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
a000ce88: e58c2034 str r2, [ip, #52] ; 0x34 <== NOT EXECUTED
a000ce8c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
a000ce90: e59f200c ldr r2, [pc, #12] ; a000cea4 <_CORE_RWLock_Obtain_for_writing+0x90><== NOT EXECUTED
a000ce94: e1a01003 mov r1, r3 <== NOT EXECUTED
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
a000ce98: e8bd0030 pop {r4, r5} <== NOT EXECUTED
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
a000ce9c: ea000726 b a000eb3c <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED
a000cea8 <_CORE_RWLock_Release>:
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
a000cea8: e59f30e0 ldr r3, [pc, #224] ; a000cf90 <_CORE_RWLock_Release+0xe8><== NOT EXECUTED
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
a000ceac: e92d4010 push {r4, lr} <== NOT EXECUTED
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
a000ceb0: e5931004 ldr r1, [r3, #4] <== NOT EXECUTED
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
a000ceb4: e1a04000 mov r4, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000ceb8: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a000cebc: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
a000cec0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
a000cec4: e5903044 ldr r3, [r0, #68] ; 0x44 <== NOT EXECUTED
a000cec8: e3530000 cmp r3, #0 <== NOT EXECUTED
a000cecc: 0a00002a beq a000cf7c <_CORE_RWLock_Release+0xd4> <== NOT EXECUTED
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
a000ced0: e3530001 cmp r3, #1 <== NOT EXECUTED
a000ced4: 0a000020 beq a000cf5c <_CORE_RWLock_Release+0xb4> <== NOT EXECUTED
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
a000ced8: e3a03000 mov r3, #0 <== NOT EXECUTED
a000cedc: e5813034 str r3, [r1, #52] ; 0x34 <== NOT EXECUTED
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
a000cee0: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000cee4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_ISR_Enable( level );
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
a000cee8: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ceec: eb0006b4 bl a000e9c4 <_Thread_queue_Dequeue> <== NOT EXECUTED
if ( next ) {
a000cef0: e3500000 cmp r0, #0 <== NOT EXECUTED
a000cef4: 0a000016 beq a000cf54 <_CORE_RWLock_Release+0xac> <== NOT EXECUTED
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
a000cef8: e5903030 ldr r3, [r0, #48] ; 0x30 <== NOT EXECUTED
a000cefc: e3530001 cmp r3, #1 <== NOT EXECUTED
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
a000cf00: 03a03002 moveq r3, #2 <== NOT EXECUTED
a000cf04: 05843044 streq r3, [r4, #68] ; 0x44 <== NOT EXECUTED
_ISR_Enable( level );
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
a000cf08: 0a000011 beq a000cf54 <_CORE_RWLock_Release+0xac> <== NOT EXECUTED
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
a000cf0c: e5943048 ldr r3, [r4, #72] ; 0x48 <== NOT EXECUTED
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
a000cf10: e3a02001 mov r2, #1 <== NOT EXECUTED
a000cf14: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
a000cf18: e0833002 add r3, r3, r2 <== NOT EXECUTED
a000cf1c: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
a000cf20: ea000007 b a000cf44 <_CORE_RWLock_Release+0x9c> <== NOT EXECUTED
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
a000cf24: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED
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 );
a000cf28: e1a00004 mov r0, r4 <== NOT EXECUTED
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
a000cf2c: e3530001 cmp r3, #1 <== NOT EXECUTED
a000cf30: 0a000007 beq a000cf54 <_CORE_RWLock_Release+0xac> <== NOT EXECUTED
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
a000cf34: e5943048 ldr r3, [r4, #72] ; 0x48 <== NOT EXECUTED
a000cf38: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000cf3c: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
a000cf40: eb000795 bl a000ed9c <_Thread_queue_Extract> <== NOT EXECUTED
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
a000cf44: e1a00004 mov r0, r4 <== NOT EXECUTED
a000cf48: eb0007e1 bl a000eed4 <_Thread_queue_First> <== NOT EXECUTED
if ( !next ||
a000cf4c: e2501000 subs r1, r0, #0 <== NOT EXECUTED
a000cf50: 1afffff3 bne a000cf24 <_CORE_RWLock_Release+0x7c> <== NOT EXECUTED
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
a000cf54: e3a00000 mov r0, #0 <== NOT EXECUTED
a000cf58: e8bd8010 pop {r4, pc} <== NOT EXECUTED
_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;
a000cf5c: e5903048 ldr r3, [r0, #72] ; 0x48 <== NOT EXECUTED
a000cf60: e2433001 sub r3, r3, #1 <== NOT EXECUTED
if ( the_rwlock->number_of_readers != 0 ) {
a000cf64: e3530000 cmp r3, #0 <== NOT EXECUTED
_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;
a000cf68: e5803048 str r3, [r0, #72] ; 0x48 <== NOT EXECUTED
if ( the_rwlock->number_of_readers != 0 ) {
a000cf6c: 0affffd9 beq a000ced8 <_CORE_RWLock_Release+0x30> <== NOT EXECUTED
a000cf70: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
a000cf74: e3a00000 mov r0, #0 <== NOT EXECUTED
a000cf78: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000cf7c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
a000cf80: e3a03002 mov r3, #2 <== NOT EXECUTED
a000cf84: e5813034 str r3, [r1, #52] ; 0x34 <== NOT EXECUTED
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
a000cf88: e3a00000 mov r0, #0 <== NOT EXECUTED
a000cf8c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000cf94 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
a000cf94: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
a000cf98: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000cf9c: e1a0100d mov r1, sp <== NOT EXECUTED
a000cfa0: eb0005bc bl a000e698 <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
a000cfa4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000cfa8: e3530000 cmp r3, #0 <== NOT EXECUTED
a000cfac: 1a000004 bne a000cfc4 <_CORE_RWLock_Timeout+0x30> <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
a000cfb0: eb000809 bl a000efdc <_Thread_queue_Process_timeout> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a000cfb4: e59f3010 ldr r3, [pc, #16] ; a000cfcc <_CORE_RWLock_Timeout+0x38><== NOT EXECUTED
a000cfb8: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000cfbc: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a000cfc0: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Unnest_dispatch();
break;
}
}
a000cfc4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000cfc8: e8bd8000 pop {pc} <== NOT EXECUTED
a001afd8 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a001afd8: e590304c ldr r3, [r0, #76] ; 0x4c
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
a001afdc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a001afe0: e1530002 cmp r3, r2
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
a001afe4: e1a07000 mov r7, r0
a001afe8: e1a05002 mov r5, r2
a001afec: e1a08001 mov r8, r1
a001aff0: e59da020 ldr sl, [sp, #32]
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a001aff4: 3a000013 bcc a001b048 <_CORE_message_queue_Broadcast+0x70>
* 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 ) {
a001aff8: e5906048 ldr r6, [r0, #72] ; 0x48
a001affc: e3560000 cmp r6, #0
a001b000: 0a000009 beq a001b02c <_CORE_message_queue_Broadcast+0x54>
*count = 0;
a001b004: e3a00000 mov r0, #0
a001b008: e58a0000 str r0, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a001b00c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a001b010: e594002c ldr r0, [r4, #44] ; 0x2c
a001b014: e1a01008 mov r1, r8
a001b018: e1a02005 mov r2, r5
a001b01c: eb00248a bl a002424c <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a001b020: e5943028 ldr r3, [r4, #40] ; 0x28
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
a001b024: e2866001 add r6, r6, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a001b028: e5835000 str r5, [r3]
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
a001b02c: e1a00007 mov r0, r7
a001b030: eb000b13 bl a001dc84 <_Thread_queue_Dequeue>
a001b034: e2504000 subs r4, r0, #0
a001b038: 1afffff4 bne a001b010 <_CORE_message_queue_Broadcast+0x38>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
a001b03c: e58a6000 str r6, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a001b040: e1a00004 mov r0, r4
a001b044: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
a001b048: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
a001b04c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a0018c74 <_CORE_message_queue_Insert_message>:
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
a0018c74: e3720106 cmn r2, #-2147483647 ; 0x80000001
void _CORE_message_queue_Insert_message(
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message,
CORE_message_queue_Submit_types submit_type
)
{
a0018c78: e92d4030 push {r4, r5, lr}
a0018c7c: e5812008 str r2, [r1, #8]
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
a0018c80: 0a000026 beq a0018d20 <_CORE_message_queue_Insert_message+0xac>
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
a0018c84: e3520102 cmp r2, #-2147483648 ; 0x80000000
a0018c88: 0a000034 beq a0018d60 <_CORE_message_queue_Insert_message+0xec>
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
#endif
}
a0018c8c: e5903050 ldr r3, [r0, #80] ; 0x50
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
a0018c90: e280c054 add ip, r0, #84 ; 0x54
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = _Chain_First( the_header );
while ( !_Chain_Is_tail( the_header, the_node ) ) {
a0018c94: e15c0003 cmp ip, r3
a0018c98: 0a000002 beq a0018ca8 <_CORE_message_queue_Insert_message+0x34>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
a0018c9c: e5934008 ldr r4, [r3, #8] <== NOT EXECUTED
a0018ca0: e1520004 cmp r2, r4 <== NOT EXECUTED
a0018ca4: aa000016 bge a0018d04 <_CORE_message_queue_Insert_message+0x90><== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0018ca8: e10f4000 mrs r4, CPSR
a0018cac: e3842080 orr r2, r4, #128 ; 0x80
a0018cb0: e129f002 msr CPSR_fc, r2
break;
}
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
a0018cb4: e5933004 ldr r3, [r3, #4]
continue;
}
break;
}
_ISR_Disable( level );
SET_NOTIFY();
a0018cb8: e5902048 ldr r2, [r0, #72] ; 0x48
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
a0018cbc: e593c000 ldr ip, [r3]
the_message_queue->number_of_pending_messages++;
a0018cc0: e2825001 add r5, r2, #1
a0018cc4: e5805048 str r5, [r0, #72] ; 0x48
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
a0018cc8: e2722001 rsbs r2, r2, #1
a0018ccc: 33a02000 movcc r2, #0
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
a0018cd0: e5813004 str r3, [r1, #4]
before_node = after_node->next;
after_node->next = the_node;
a0018cd4: e5831000 str r1, [r3]
the_node->next = before_node;
before_node->previous = the_node;
a0018cd8: e58c1004 str r1, [ip, #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;
a0018cdc: e581c000 str ip, [r1]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0018ce0: e129f004 msr CPSR_fc, r4
/*
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
a0018ce4: e3520000 cmp r2, #0
a0018ce8: 0a000004 beq a0018d00 <_CORE_message_queue_Insert_message+0x8c>
a0018cec: e5903060 ldr r3, [r0, #96] ; 0x60
a0018cf0: e3530000 cmp r3, #0
a0018cf4: 0a000001 beq a0018d00 <_CORE_message_queue_Insert_message+0x8c>
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
a0018cf8: e5900064 ldr r0, [r0, #100] ; 0x64 <== NOT EXECUTED
a0018cfc: e12fff33 blx r3 <== NOT EXECUTED
a0018d00: e8bd8030 pop {r4, r5, pc}
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
the_node = the_node->next;
a0018d04: e5933000 ldr r3, [r3] <== NOT EXECUTED
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = _Chain_First( the_header );
while ( !_Chain_Is_tail( the_header, the_node ) ) {
a0018d08: e15c0003 cmp ip, r3 <== NOT EXECUTED
a0018d0c: 0affffe5 beq a0018ca8 <_CORE_message_queue_Insert_message+0x34><== NOT EXECUTED
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
a0018d10: e5934008 ldr r4, [r3, #8] <== NOT EXECUTED
a0018d14: e1520004 cmp r2, r4 <== NOT EXECUTED
a0018d18: baffffe2 blt a0018ca8 <_CORE_message_queue_Insert_message+0x34><== NOT EXECUTED
a0018d1c: eafffff8 b a0018d04 <_CORE_message_queue_Insert_message+0x90><== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0018d20: e10fc000 mrs ip, CPSR
a0018d24: e38c3080 orr r3, ip, #128 ; 0x80
a0018d28: e129f003 msr CPSR_fc, r3
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
_ISR_Disable( level );
SET_NOTIFY();
a0018d2c: e5902048 ldr r2, [r0, #72] ; 0x48
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
a0018d30: e5903058 ldr r3, [r0, #88] ; 0x58
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
a0018d34: e2804054 add r4, r0, #84 ; 0x54
the_message_queue->number_of_pending_messages++;
a0018d38: e2825001 add r5, r2, #1
a0018d3c: e5805048 str r5, [r0, #72] ; 0x48
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
a0018d40: e5801058 str r1, [r0, #88] ; 0x58
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
a0018d44: e5814000 str r4, [r1]
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
a0018d48: e2722001 rsbs r2, r2, #1
a0018d4c: 33a02000 movcc r2, #0
tail->previous = the_node;
old_last->next = the_node;
a0018d50: e5831000 str r1, [r3]
the_node->previous = old_last;
a0018d54: e5813004 str r3, [r1, #4]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0018d58: e129f00c msr CPSR_fc, ip
a0018d5c: eaffffe0 b a0018ce4 <_CORE_message_queue_Insert_message+0x70>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0018d60: e10fc000 mrs ip, CPSR
a0018d64: e38c3080 orr r3, ip, #128 ; 0x80
a0018d68: e129f003 msr CPSR_fc, r3
the_message_queue->number_of_pending_messages++;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
_ISR_Disable( level );
SET_NOTIFY();
a0018d6c: e5902048 ldr r2, [r0, #72] ; 0x48
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
a0018d70: e5903050 ldr r3, [r0, #80] ; 0x50
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
a0018d74: e2804050 add r4, r0, #80 ; 0x50
the_message_queue->number_of_pending_messages++;
a0018d78: e2825001 add r5, r2, #1
a0018d7c: e5805048 str r5, [r0, #72] ; 0x48
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
a0018d80: e5801050 str r1, [r0, #80] ; 0x50
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
a0018d84: e5814004 str r4, [r1, #4]
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
a0018d88: e2722001 rsbs r2, r2, #1
a0018d8c: 33a02000 movcc r2, #0
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
a0018d90: e5813000 str r3, [r1]
before_node->previous = the_node;
a0018d94: e5831004 str r1, [r3, #4]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0018d98: e129f00c msr CPSR_fc, ip
a0018d9c: eaffffd0 b a0018ce4 <_CORE_message_queue_Insert_message+0x70>
a0013384 <_CORE_message_queue_Seize>:
{
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
a0013384: e59fc118 ldr ip, [pc, #280] ; a00134a4 <_CORE_message_queue_Seize+0x120>
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
a0013388: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
a001338c: e59c5004 ldr r5, [ip, #4]
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
a0013390: e1a04000 mov r4, r0
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0013394: e3a00000 mov r0, #0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
a0013398: e59d7020 ldr r7, [sp, #32]
a001339c: e5dd601c ldrb r6, [sp, #28]
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a00133a0: e5850034 str r0, [r5, #52] ; 0x34
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a00133a4: e10f0000 mrs r0, CPSR
a00133a8: e3808080 orr r8, r0, #128 ; 0x80
a00133ac: e129f008 msr CPSR_fc, r8
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
a00133b0: e5948050 ldr r8, [r4, #80] ; 0x50
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a00133b4: e284a054 add sl, r4, #84 ; 0x54
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a00133b8: e158000a cmp r8, sl
a00133bc: 0a000022 beq a001344c <_CORE_message_queue_Seize+0xc8>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
a00133c0: e598e000 ldr lr, [r8]
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
a00133c4: e5945048 ldr r5, [r4, #72] ; 0x48
head->next = new_first;
a00133c8: e1a01004 mov r1, r4
a00133cc: e5a1e050 str lr, [r1, #80]! ; 0x50
a00133d0: e2455001 sub r5, r5, #1
new_first->previous = head;
a00133d4: e58e1004 str r1, [lr, #4]
a00133d8: e5845048 str r5, [r4, #72] ; 0x48
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00133dc: e129f000 msr CPSR_fc, r0
_ISR_Enable( level );
*size_p = the_message->Contents.size;
_Thread_Executing->Wait.count =
a00133e0: e59c1004 ldr r1, [ip, #4]
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
a00133e4: e598e00c ldr lr, [r8, #12]
_Thread_Executing->Wait.count =
a00133e8: e5980008 ldr r0, [r8, #8]
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
a00133ec: e2885010 add r5, r8, #16
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
a00133f0: e583e000 str lr, [r3]
_Thread_Executing->Wait.count =
a00133f4: e5810024 str r0, [r1, #36] ; 0x24
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a00133f8: e1a00002 mov r0, r2
a00133fc: e1a01005 mov r1, r5
a0013400: e5932000 ldr r2, [r3]
a0013404: eb002202 bl a001bc14 <memcpy>
* is not, then we can go ahead and free the buffer.
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
a0013408: e1a00004 mov r0, r4
a001340c: eb000800 bl a0015414 <_Thread_queue_Dequeue>
if ( !the_thread ) {
a0013410: e2503000 subs r3, r0, #0
a0013414: 0a00001e beq a0013494 <_CORE_message_queue_Seize+0x110>
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
a0013418: e5931030 ldr r1, [r3, #48] ; 0x30 <== NOT EXECUTED
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
a001341c: e5932024 ldr r2, [r3, #36] ; 0x24 <== NOT EXECUTED
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0013420: e1a00005 mov r0, r5 <== NOT EXECUTED
a0013424: e588100c str r1, [r8, #12] <== NOT EXECUTED
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
a0013428: e5882008 str r2, [r8, #8] <== NOT EXECUTED
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a001342c: e1a02001 mov r2, r1 <== NOT EXECUTED
a0013430: e593102c ldr r1, [r3, #44] ; 0x2c <== NOT EXECUTED
a0013434: eb0021f6 bl a001bc14 <memcpy> <== NOT EXECUTED
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
a0013438: e5982008 ldr r2, [r8, #8] <== NOT EXECUTED
a001343c: e1a00004 mov r0, r4 <== NOT EXECUTED
a0013440: e1a01008 mov r1, r8 <== NOT EXECUTED
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
a0013444: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
a0013448: ea001609 b a0018c74 <_CORE_message_queue_Insert_message> <== NOT EXECUTED
return;
}
#endif
}
if ( !wait ) {
a001344c: e3560000 cmp r6, #0
a0013450: 1a000003 bne a0013464 <_CORE_message_queue_Seize+0xe0>
a0013454: e129f000 msr CPSR_fc, r0
_ISR_Enable( level );
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
a0013458: e3a03004 mov r3, #4
a001345c: e5853034 str r3, [r5, #52] ; 0x34
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
a0013460: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
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;
a0013464: e3a0c001 mov ip, #1
a0013468: e584c030 str ip, [r4, #48] ; 0x30
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
a001346c: e5854044 str r4, [r5, #68] ; 0x44
executing->Wait.id = id;
a0013470: e5851020 str r1, [r5, #32]
executing->Wait.return_argument_second.mutable_object = buffer;
a0013474: e585202c str r2, [r5, #44] ; 0x2c
executing->Wait.return_argument = size_p;
a0013478: e5853028 str r3, [r5, #40] ; 0x28
a001347c: e129f000 msr CPSR_fc, r0
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
a0013480: e59f2020 ldr r2, [pc, #32] ; a00134a8 <_CORE_message_queue_Seize+0x124>
a0013484: e1a00004 mov r0, r4
a0013488: e1a01007 mov r1, r7
}
a001348c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr}
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
a0013490: ea00083d b a001558c <_Thread_queue_Enqueue_with_handler>
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
a0013494: e2840068 add r0, r4, #104 ; 0x68
a0013498: e1a01008 mov r1, r8
}
a001349c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr}
a00134a0: eaffff5a b a0013210 <_Chain_Append>
a00134ac <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
a00134ac: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
a00134b0: e590c04c ldr ip, [r0, #76] ; 0x4c
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
a00134b4: e24dd004 sub sp, sp, #4
a00134b8: e1a04000 mov r4, r0
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
a00134bc: e15c0002 cmp ip, r2
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
a00134c0: e1a05002 mov r5, r2
a00134c4: e1a0a001 mov sl, r1
a00134c8: e59d7028 ldr r7, [sp, #40] ; 0x28
a00134cc: e5dd902c ldrb r9, [sp, #44] ; 0x2c
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
a00134d0: 33a00001 movcc r0, #1
)
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
a00134d4: 3a00000d bcc a0013510 <_CORE_message_queue_Submit+0x64>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
a00134d8: e5946048 ldr r6, [r4, #72] ; 0x48
a00134dc: e3560000 cmp r6, #0
a00134e0: 0a00000c beq a0013518 <_CORE_message_queue_Submit+0x6c>
/*
* 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 <
a00134e4: e5942044 ldr r2, [r4, #68] ; 0x44
a00134e8: e1520006 cmp r2, r6
a00134ec: 8a00002a bhi a001359c <_CORE_message_queue_Submit+0xf0>
/*
* 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 ) {
a00134f0: e3590000 cmp r9, #0 <== NOT EXECUTED
return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY;
a00134f4: 03a00002 moveq r0, #2 <== NOT EXECUTED
/*
* 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 ) {
a00134f8: 0a000004 beq a0013510 <_CORE_message_queue_Submit+0x64> <== NOT EXECUTED
/*
* 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() ) {
a00134fc: e59f20d4 ldr r2, [pc, #212] ; a00135d8 <_CORE_message_queue_Submit+0x12c><== NOT EXECUTED
a0013500: e5921000 ldr r1, [r2] <== NOT EXECUTED
a0013504: e3510000 cmp r1, #0 <== NOT EXECUTED
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
a0013508: 13a00003 movne r0, #3 <== NOT EXECUTED
/*
* 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() ) {
a001350c: 0a000010 beq a0013554 <_CORE_message_queue_Submit+0xa8> <== NOT EXECUTED
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
a0013510: e28dd004 add sp, sp, #4
a0013514: 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 );
a0013518: e58d3000 str r3, [sp]
a001351c: eb0007bc bl a0015414 <_Thread_queue_Dequeue>
if ( the_thread ) {
a0013520: e2508000 subs r8, r0, #0
a0013524: e59d3000 ldr r3, [sp]
a0013528: 05946048 ldreq r6, [r4, #72] ; 0x48
a001352c: 0affffec beq a00134e4 <_CORE_message_queue_Submit+0x38>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0013530: e598002c ldr r0, [r8, #44] ; 0x2c
a0013534: e1a0100a mov r1, sl
a0013538: e1a02005 mov r2, r5
a001353c: eb0021b4 bl a001bc14 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0013540: e5983028 ldr r3, [r8, #40] ; 0x28
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0013544: e1a00006 mov r0, r6
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0013548: e5835000 str r5, [r3]
the_thread->Wait.count = (uint32_t) submit_type;
a001354c: e5887024 str r7, [r8, #36] ; 0x24
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0013550: eaffffee b a0013510 <_CORE_message_queue_Submit+0x64>
* Thus the unusual choice to open a new scope and declare
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
a0013554: e5922004 ldr r2, [r2, #4] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0013558: e10f1000 mrs r1, CPSR <== NOT EXECUTED
a001355c: e3810080 orr r0, r1, #128 ; 0x80 <== NOT EXECUTED
a0013560: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
a0013564: e3a00001 mov r0, #1 <== NOT EXECUTED
a0013568: e5840030 str r0, [r4, #48] ; 0x30 <== NOT EXECUTED
ISR_Level level;
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
a001356c: e5824044 str r4, [r2, #68] ; 0x44 <== NOT EXECUTED
executing->Wait.id = id;
a0013570: e5823020 str r3, [r2, #32] <== NOT EXECUTED
executing->Wait.return_argument_second.immutable_object = buffer;
a0013574: e582a02c str sl, [r2, #44] ; 0x2c <== NOT EXECUTED
executing->Wait.option = (uint32_t) size;
a0013578: e5825030 str r5, [r2, #48] ; 0x30 <== NOT EXECUTED
executing->Wait.count = submit_type;
a001357c: e5827024 str r7, [r2, #36] ; 0x24 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0013580: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
a0013584: e59f2050 ldr r2, [pc, #80] ; a00135dc <_CORE_message_queue_Submit+0x130><== NOT EXECUTED
a0013588: e1a00004 mov r0, r4 <== NOT EXECUTED
a001358c: e59d1030 ldr r1, [sp, #48] ; 0x30 <== NOT EXECUTED
a0013590: eb0007fd bl a001558c <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
a0013594: e3a00007 mov r0, #7 <== NOT EXECUTED
a0013598: eaffffdc b a0013510 <_CORE_message_queue_Submit+0x64> <== NOT EXECUTED
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get( &the_message_queue->Inactive_messages );
a001359c: e2840068 add r0, r4, #104 ; 0x68
a00135a0: ebffff2d bl a001325c <_Chain_Get>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a00135a4: e1a0100a mov r1, sl
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get( &the_message_queue->Inactive_messages );
a00135a8: e1a06000 mov r6, r0
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a00135ac: e1a02005 mov r2, r5
a00135b0: e2800010 add r0, r0, #16
a00135b4: eb002196 bl a001bc14 <memcpy>
size
);
the_message->Contents.size = size;
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
a00135b8: e1a00004 mov r0, r4
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
a00135bc: e586500c str r5, [r6, #12]
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
a00135c0: e5867008 str r7, [r6, #8]
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
a00135c4: e1a01006 mov r1, r6
a00135c8: e1a02007 mov r2, r7
a00135cc: eb0015a8 bl a0018c74 <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a00135d0: e3a00000 mov r0, #0
a00135d4: eaffffcd b a0013510 <_CORE_message_queue_Submit+0x64>
a000a504 <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
a000a504: e92d40f0 push {r4, r5, r6, r7, lr}
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
a000a508: e3a05000 mov r5, #0
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
a000a50c: e1a0c000 mov ip, r0
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
a000a510: e1520005 cmp r2, r5
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
a000a514: e1a06002 mov r6, r2
/* 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;
a000a518: e2807040 add r7, r0, #64 ; 0x40
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
a000a51c: e1a04001 mov r4, 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;
a000a520: e891000f ldm r1, {r0, r1, r2, r3}
the_mutex->lock = initial_lock;
a000a524: e58c6050 str r6, [ip, #80] ; 0x50
/* 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;
a000a528: e887000f stm r7, {r0, r1, r2, r3}
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
a000a52c: e58c5058 str r5, [ip, #88] ; 0x58
#endif
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
a000a530: 158c5054 strne r5, [ip, #84] ; 0x54
the_mutex->holder = NULL;
a000a534: 158c505c strne r5, [ip, #92] ; 0x5c
the_mutex->holder_id = 0;
a000a538: 158c5060 strne r5, [ip, #96] ; 0x60
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
a000a53c: 1a00000b bne a000a570 <_CORE_mutex_Initialize+0x6c>
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
a000a540: e59f3074 ldr r3, [pc, #116] ; a000a5bc <_CORE_mutex_Initialize+0xb8>
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;
a000a544: e3a01001 mov r1, #1
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
a000a548: e59c2048 ldr r2, [ip, #72] ; 0x48
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;
a000a54c: e5933004 ldr r3, [r3, #4]
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;
a000a550: e58c1054 str r1, [ip, #84] ; 0x54
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a000a554: e3520002 cmp r2, #2
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;
a000a558: e5931008 ldr r1, [r3, #8]
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;
a000a55c: e58c305c str r3, [ip, #92] ; 0x5c
the_mutex->holder_id = _Thread_Executing->Object.id;
a000a560: e58c1060 str r1, [ip, #96] ; 0x60
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a000a564: 0a00000a beq a000a594 <_CORE_mutex_Initialize+0x90>
a000a568: e3520003 cmp r2, #3
a000a56c: 0a000008 beq a000a594 <_CORE_mutex_Initialize+0x90>
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
a000a570: e5941008 ldr r1, [r4, #8]
a000a574: e1a0000c mov r0, ip
a000a578: e3a02b01 mov r2, #1024 ; 0x400
a000a57c: e2511000 subs r1, r1, #0
a000a580: 13a01001 movne r1, #1
a000a584: e3a03005 mov r3, #5
a000a588: eb00084d bl a000c6c4 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000a58c: e3a00000 mov r0, #0
a000a590: 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 <
a000a594: e5931014 ldr r1, [r3, #20]
a000a598: e59c204c ldr r2, [ip, #76] ; 0x4c
a000a59c: e1510002 cmp r1, r2
a000a5a0: 3a000003 bcc a000a5b4 <_CORE_mutex_Initialize+0xb0>
_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++;
a000a5a4: e593201c ldr r2, [r3, #28] <== NOT EXECUTED
a000a5a8: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000a5ac: e583201c str r2, [r3, #28] <== NOT EXECUTED
a000a5b0: eaffffee b a000a570 <_CORE_mutex_Initialize+0x6c> <== NOT EXECUTED
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
the_mutex->Attributes.priority_ceiling )
return CORE_MUTEX_STATUS_CEILING_VIOLATED;
a000a5b4: e3a00006 mov r0, #6
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
a000a5b8: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000fae8 <_CORE_mutex_Seize_interrupt_trylock>:
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a000fae8: e59f2160 ldr r2, [pc, #352] ; a000fc50 <_CORE_mutex_Seize_interrupt_trylock+0x168>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a000faec: e590c050 ldr ip, [r0, #80] ; 0x50
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
a000faf0: e1a03000 mov r3, r0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a000faf4: e5922004 ldr r2, [r2, #4]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a000faf8: e3a00000 mov r0, #0
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a000fafc: e15c0000 cmp ip, r0
a000fb00: e92d40f0 push {r4, r5, r6, r7, lr}
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a000fb04: e5820034 str r0, [r2, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a000fb08: 0a00000e beq a000fb48 <_CORE_mutex_Seize_interrupt_trylock+0x60>
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
a000fb0c: e593c048 ldr ip, [r3, #72] ; 0x48
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
a000fb10: e5925008 ldr r5, [r2, #8]
the_mutex->nest_count = 1;
a000fb14: e3a04001 mov r4, #1
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a000fb18: e35c0002 cmp ip, #2
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
a000fb1c: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->holder = executing;
a000fb20: e583205c str r2, [r3, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
a000fb24: e5835060 str r5, [r3, #96] ; 0x60
the_mutex->nest_count = 1;
a000fb28: e5834054 str r4, [r3, #84] ; 0x54
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a000fb2c: 0a00000a beq a000fb5c <_CORE_mutex_Seize_interrupt_trylock+0x74>
a000fb30: e35c0003 cmp ip, #3
a000fb34: 0a000019 beq a000fba0 <_CORE_mutex_Seize_interrupt_trylock+0xb8>
a000fb38: e5913000 ldr r3, [r1]
a000fb3c: e129f003 msr CPSR_fc, r3
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
return 0;
a000fb40: e3a00000 mov r0, #0
a000fb44: e8bd80f0 pop {r4, r5, r6, r7, 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 ) ) {
a000fb48: e593005c ldr r0, [r3, #92] ; 0x5c
a000fb4c: e1520000 cmp r2, r0
a000fb50: 0a000008 beq a000fb78 <_CORE_mutex_Seize_interrupt_trylock+0x90>
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
a000fb54: e3a00001 mov r0, #1
a000fb58: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a000fb5c: e592301c ldr r3, [r2, #28]
a000fb60: e2833001 add r3, r3, #1
a000fb64: e582301c str r3, [r2, #28]
a000fb68: e5913000 ldr r3, [r1]
a000fb6c: e129f003 msr CPSR_fc, r3
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
return 0;
a000fb70: e3a00000 mov r0, #0
a000fb74: e8bd80f0 pop {r4, r5, r6, r7, 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 ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
a000fb78: e5930040 ldr r0, [r3, #64] ; 0x40
a000fb7c: e3500000 cmp r0, #0
a000fb80: 1a000017 bne a000fbe4 <_CORE_mutex_Seize_interrupt_trylock+0xfc>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
a000fb84: e5932054 ldr r2, [r3, #84] ; 0x54
a000fb88: e2822001 add r2, r2, #1
a000fb8c: e5832054 str r2, [r3, #84] ; 0x54
a000fb90: e5913000 ldr r3, [r1]
a000fb94: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
a000fb98: e3a00000 mov r0, #0
a000fb9c: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a000fba0: e592c01c ldr ip, [r2, #28]
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
a000fba4: e593604c ldr r6, [r3, #76] ; 0x4c
current = executing->current_priority;
a000fba8: e5925014 ldr r5, [r2, #20]
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a000fbac: e08c7004 add r7, ip, r4
a000fbb0: e582701c str r7, [r2, #28]
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
a000fbb4: e1560005 cmp r6, r5
a000fbb8: 0a000020 beq a000fc40 <_CORE_mutex_Seize_interrupt_trylock+0x158>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
a000fbbc: 3a000012 bcc a000fc0c <_CORE_mutex_Seize_interrupt_trylock+0x124>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a000fbc0: e3a05006 mov r5, #6
a000fbc4: e5825034 str r5, [r2, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a000fbc8: e5834050 str r4, [r3, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
a000fbcc: e5830054 str r0, [r3, #84] ; 0x54
executing->resource_count--; /* undo locking above */
a000fbd0: e582c01c str ip, [r2, #28]
a000fbd4: e5913000 ldr r3, [r1]
a000fbd8: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
a000fbdc: e3a00000 mov r0, #0
a000fbe0: e8bd80f0 pop {r4, r5, r6, r7, 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 ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
a000fbe4: e3500001 cmp r0, #1
a000fbe8: 0a000001 beq a000fbf4 <_CORE_mutex_Seize_interrupt_trylock+0x10c>
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
a000fbec: e3a00001 mov r0, #1
a000fbf0: e8bd80f0 pop {r4, r5, r6, r7, pc}
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
a000fbf4: e3a03002 mov r3, #2 <== NOT EXECUTED
a000fbf8: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED
a000fbfc: e5913000 ldr r3, [r1] <== NOT EXECUTED
a000fc00: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Enable( *level_p );
return 0;
a000fc04: e3a00000 mov r0, #0 <== NOT EXECUTED
a000fc08: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000fc0c: e59f2040 ldr r2, [pc, #64] ; a000fc54 <_CORE_mutex_Seize_interrupt_trylock+0x16c>
a000fc10: e5920000 ldr r0, [r2]
a000fc14: e2800001 add r0, r0, #1
a000fc18: e5820000 str r0, [r2]
a000fc1c: e5912000 ldr r2, [r1]
a000fc20: e129f002 msr CPSR_fc, r2
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
a000fc24: e3a02000 mov r2, #0
a000fc28: e593005c ldr r0, [r3, #92] ; 0x5c
a000fc2c: e593104c ldr r1, [r3, #76] ; 0x4c
a000fc30: ebffef83 bl a000ba44 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
a000fc34: ebfff0c2 bl a000bf44 <_Thread_Enable_dispatch>
return 0;
a000fc38: e3a00000 mov r0, #0
a000fc3c: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000fc40: e5913000 ldr r3, [r1]
a000fc44: e129f003 msr CPSR_fc, r3
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
return 0;
a000fc48: e3a00000 mov r0, #0
a000fc4c: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000a6f8 <_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 ) {
a000a6f8: e5d03044 ldrb r3, [r0, #68] ; 0x44
#else
Objects_Id id __attribute__((unused)),
CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused))
#endif
)
{
a000a6fc: e92d4030 push {r4, r5, lr}
* 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 ) {
a000a700: e3530000 cmp r3, #0
#else
Objects_Id id __attribute__((unused)),
CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused))
#endif
)
{
a000a704: e1a04000 mov r4, r0
Thread_Control *the_thread;
Thread_Control *holder;
holder = the_mutex->holder;
a000a708: e590205c ldr r2, [r0, #92] ; 0x5c
* 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 ) {
a000a70c: 0a000005 beq a000a728 <_CORE_mutex_Surrender+0x30>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a000a710: e59f3120 ldr r3, [pc, #288] ; a000a838 <_CORE_mutex_Surrender+0x140>
if ( !_Thread_Is_executing( holder ) )
a000a714: e5933004 ldr r3, [r3, #4]
a000a718: e1520003 cmp r2, r3
a000a71c: 0a000001 beq a000a728 <_CORE_mutex_Surrender+0x30>
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
a000a720: e3a00003 mov r0, #3
a000a724: e8bd8030 pop {r4, r5, pc}
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
a000a728: e5940054 ldr r0, [r4, #84] ; 0x54
a000a72c: e3500000 cmp r0, #0
a000a730: 0a000023 beq a000a7c4 <_CORE_mutex_Surrender+0xcc>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
a000a734: e2400001 sub r0, r0, #1
if ( the_mutex->nest_count != 0 ) {
a000a738: e3500000 cmp r0, #0
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
a000a73c: e5840054 str r0, [r4, #84] ; 0x54
if ( the_mutex->nest_count != 0 ) {
a000a740: 1a000020 bne a000a7c8 <_CORE_mutex_Surrender+0xd0>
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
a000a744: e5943048 ldr r3, [r4, #72] ; 0x48
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a000a748: e3530002 cmp r3, #2
a000a74c: 0a00001f beq a000a7d0 <_CORE_mutex_Surrender+0xd8>
a000a750: e3530003 cmp r3, #3
a000a754: 0a00001d beq a000a7d0 <_CORE_mutex_Surrender+0xd8>
if ( holder->resource_count == 0 &&
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
}
}
the_mutex->holder = NULL;
a000a758: e3a05000 mov r5, #0
a000a75c: e584505c str r5, [r4, #92] ; 0x5c
the_mutex->holder_id = 0;
a000a760: e5845060 str r5, [r4, #96] ; 0x60
/*
* 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 ) ) ) {
a000a764: e1a00004 mov r0, r4
a000a768: eb0006c9 bl a000c294 <_Thread_queue_Dequeue>
a000a76c: e2503000 subs r3, r0, #0
a000a770: 0a00002c beq a000a828 <_CORE_mutex_Surrender+0x130>
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
a000a774: e5931008 ldr r1, [r3, #8]
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
a000a778: e5942048 ldr r2, [r4, #72] ; 0x48
} else
#endif
{
the_mutex->holder = the_thread;
a000a77c: e584305c str r3, [r4, #92] ; 0x5c
the_mutex->holder_id = the_thread->Object.id;
a000a780: e5841060 str r1, [r4, #96] ; 0x60
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
a000a784: e3520002 cmp r2, #2
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
a000a788: e3a01001 mov r1, #1
a000a78c: e5841054 str r1, [r4, #84] ; 0x54
switch ( the_mutex->Attributes.discipline ) {
a000a790: 0a00001b beq a000a804 <_CORE_mutex_Surrender+0x10c>
a000a794: e3520003 cmp r2, #3 <== NOT EXECUTED
a000a798: 0a000001 beq a000a7a4 <_CORE_mutex_Surrender+0xac> <== NOT EXECUTED
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000a79c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a7a0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
a000a7a4: e593c01c ldr ip, [r3, #28] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
a000a7a8: e594104c ldr r1, [r4, #76] ; 0x4c <== NOT EXECUTED
a000a7ac: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
a000a7b0: e28cc001 add ip, ip, #1 <== NOT EXECUTED
a000a7b4: e583c01c str ip, [r3, #28] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
a000a7b8: e1510002 cmp r1, r2 <== NOT EXECUTED
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000a7bc: 21a00005 movcs r0, r5 <== NOT EXECUTED
the_thread->resource_count++;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
if (the_mutex->Attributes.priority_ceiling <
a000a7c0: 3a000014 bcc a000a818 <_CORE_mutex_Surrender+0x120> <== NOT EXECUTED
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
a000a7c4: e8bd8030 pop {r4, r5, pc}
/* Currently no API exercises this behavior. */
break;
}
#else
/* must be CORE_MUTEX_NESTING_ACQUIRES or we wouldn't be here */
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000a7c8: e3a00000 mov r0, #0
a000a7cc: e8bd8030 pop {r4, r5, pc}
_CORE_mutex_Pop_priority( the_mutex, holder );
if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL )
return pop_status;
holder->resource_count--;
a000a7d0: e592301c ldr r3, [r2, #28]
a000a7d4: e2433001 sub r3, r3, #1
/*
* 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 ( holder->resource_count == 0 &&
a000a7d8: e3530000 cmp r3, #0
_CORE_mutex_Pop_priority( the_mutex, holder );
if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL )
return pop_status;
holder->resource_count--;
a000a7dc: e582301c str r3, [r2, #28]
/*
* 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 ( holder->resource_count == 0 &&
a000a7e0: 1affffdc bne a000a758 <_CORE_mutex_Surrender+0x60>
holder->real_priority != holder->current_priority ) {
a000a7e4: e5921018 ldr r1, [r2, #24]
/*
* 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 ( holder->resource_count == 0 &&
a000a7e8: e5923014 ldr r3, [r2, #20]
a000a7ec: e1510003 cmp r1, r3
a000a7f0: 0affffd8 beq a000a758 <_CORE_mutex_Surrender+0x60>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
a000a7f4: e1a00002 mov r0, r2
a000a7f8: e3a02001 mov r2, #1
a000a7fc: eb000490 bl a000ba44 <_Thread_Change_priority>
a000a800: eaffffd4 b a000a758 <_CORE_mutex_Surrender+0x60>
case CORE_MUTEX_DISCIPLINES_FIFO:
case CORE_MUTEX_DISCIPLINES_PRIORITY:
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
a000a804: e593201c ldr r2, [r3, #28]
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000a808: e1a00005 mov r0, r5
case CORE_MUTEX_DISCIPLINES_FIFO:
case CORE_MUTEX_DISCIPLINES_PRIORITY:
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
a000a80c: e2822001 add r2, r2, #1
a000a810: e583201c str r2, [r3, #28]
break;
a000a814: e8bd8030 pop {r4, r5, pc}
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
if (the_mutex->Attributes.priority_ceiling <
the_thread->current_priority){
_Thread_Change_priority(
a000a818: e1a02005 mov r2, r5 <== NOT EXECUTED
a000a81c: eb000488 bl a000ba44 <_Thread_Change_priority> <== NOT EXECUTED
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000a820: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a824: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a000a828: e3a02001 mov r2, #1
a000a82c: e5842050 str r2, [r4, #80] ; 0x50
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000a830: e1a00003 mov r0, r3
a000a834: e8bd8030 pop {r4, r5, pc}
a0013ab4 <_CORE_semaphore_Seize>:
)
{
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
a0013ab4: e59fc078 ldr ip, [pc, #120] ; a0013b34 <_CORE_semaphore_Seize+0x80><== NOT EXECUTED
CORE_semaphore_Control *the_semaphore,
Objects_Id id,
bool wait,
Watchdog_Interval timeout
)
{
a0013ab8: e92d0030 push {r4, r5} <== NOT EXECUTED
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
a0013abc: e59cc004 ldr ip, [ip, #4] <== NOT EXECUTED
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
a0013ac0: e3a04000 mov r4, #0 <== NOT EXECUTED
CORE_semaphore_Control *the_semaphore,
Objects_Id id,
bool wait,
Watchdog_Interval timeout
)
{
a0013ac4: e20220ff and r2, r2, #255 ; 0xff <== NOT EXECUTED
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
a0013ac8: e58c4034 str r4, [ip, #52] ; 0x34 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0013acc: e10f5000 mrs r5, CPSR <== NOT EXECUTED
a0013ad0: e3854080 orr r4, r5, #128 ; 0x80 <== NOT EXECUTED
a0013ad4: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
_ISR_Disable( level );
if ( the_semaphore->count != 0 ) {
a0013ad8: e5904048 ldr r4, [r0, #72] ; 0x48 <== NOT EXECUTED
a0013adc: e3540000 cmp r4, #0 <== NOT EXECUTED
a0013ae0: 1a00000f bne a0013b24 <_CORE_semaphore_Seize+0x70> <== NOT EXECUTED
/*
* If the semaphore was not available and the caller was not willing
* to block, then return immediately with a status indicating that
* the semaphore was not available and the caller never blocked.
*/
if ( !wait ) {
a0013ae4: e3520000 cmp r2, #0 <== NOT EXECUTED
a0013ae8: 1a000004 bne a0013b00 <_CORE_semaphore_Seize+0x4c> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0013aec: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
_ISR_Enable( level );
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
a0013af0: e3a03001 mov r3, #1 <== NOT EXECUTED
a0013af4: e58c3034 str r3, [ip, #52] ; 0x34 <== NOT EXECUTED
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
}
a0013af8: e8bd0030 pop {r4, r5} <== NOT EXECUTED
a0013afc: e12fff1e bx lr <== NOT EXECUTED
a0013b00: e3a02001 mov r2, #1 <== NOT EXECUTED
a0013b04: e5802030 str r2, [r0, #48] ; 0x30 <== NOT EXECUTED
/*
* If the semaphore is not available and the caller is willing to
* block, then we now block the caller with optional timeout.
*/
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
a0013b08: e58c0044 str r0, [ip, #68] ; 0x44 <== NOT EXECUTED
executing->Wait.id = id;
a0013b0c: e58c1020 str r1, [ip, #32] <== NOT EXECUTED
a0013b10: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
a0013b14: e59f201c ldr r2, [pc, #28] ; a0013b38 <_CORE_semaphore_Seize+0x84><== NOT EXECUTED
a0013b18: e1a01003 mov r1, r3 <== NOT EXECUTED
}
a0013b1c: e8bd0030 pop {r4, r5} <== NOT EXECUTED
*/
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
a0013b20: eafff03f b a000fc24 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
a0013b24: e2444001 sub r4, r4, #1 <== NOT EXECUTED
a0013b28: e5804048 str r4, [r0, #72] ; 0x48 <== NOT EXECUTED
a0013b2c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
a0013b30: eafffff0 b a0013af8 <_CORE_semaphore_Seize+0x44> <== NOT EXECUTED
a000b47c <_CORE_spinlock_Release>:
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000b47c: e10f2000 mrs r2, CPSR
a000b480: e3823080 orr r3, r2, #128 ; 0x80
a000b484: e129f003 msr CPSR_fc, r3
_ISR_Disable( level );
/*
* It must locked before it can be unlocked.
*/
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
a000b488: e5903004 ldr r3, [r0, #4]
a000b48c: e3530000 cmp r3, #0
a000b490: 1a000002 bne a000b4a0 <_CORE_spinlock_Release+0x24>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000b494: e129f002 msr CPSR_fc, r2
_ISR_Enable( level );
return CORE_SPINLOCK_NOT_LOCKED;
a000b498: e3a00006 mov r0, #6 <== NOT EXECUTED
a000b49c: e12fff1e bx lr <== NOT EXECUTED
}
/*
* It must locked by the current thread before it can be unlocked.
*/
if ( the_spinlock->holder != _Thread_Executing->Object.id ) {
a000b4a0: e59f3040 ldr r3, [pc, #64] ; a000b4e8 <_CORE_spinlock_Release+0x6c>
a000b4a4: e590100c ldr r1, [r0, #12]
a000b4a8: e5933004 ldr r3, [r3, #4]
a000b4ac: e5933008 ldr r3, [r3, #8]
a000b4b0: e1510003 cmp r1, r3
a000b4b4: 0a000002 beq a000b4c4 <_CORE_spinlock_Release+0x48>
a000b4b8: e129f002 msr CPSR_fc, r2
_ISR_Enable( level );
return CORE_SPINLOCK_NOT_HOLDER;
a000b4bc: e3a00002 mov r0, #2
a000b4c0: e12fff1e bx lr
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
a000b4c4: e5901008 ldr r1, [r0, #8]
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
a000b4c8: e3a03000 mov r3, #0
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
a000b4cc: e2411001 sub r1, r1, #1
a000b4d0: e5801008 str r1, [r0, #8]
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
a000b4d4: e5803004 str r3, [r0, #4]
the_spinlock->holder = 0;
a000b4d8: e580300c str r3, [r0, #12]
a000b4dc: e129f002 msr CPSR_fc, r2
_ISR_Enable( level );
return CORE_SPINLOCK_SUCCESSFUL;
a000b4e0: e3a00000 mov r0, #0
}
a000b4e4: e12fff1e bx lr
a000b4ec <_CORE_spinlock_Wait>:
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
a000b4ec: e92d4030 push {r4, r5, lr}
a000b4f0: e20110ff and r1, r1, #255 ; 0xff
a000b4f4: e1a05000 mov r5, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000b4f8: e10f3000 mrs r3, CPSR
a000b4fc: e3832080 orr r2, r3, #128 ; 0x80
a000b500: e129f002 msr CPSR_fc, r2
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
#endif
_ISR_Disable( level );
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
a000b504: e5902004 ldr r2, [r0, #4]
a000b508: e3520001 cmp r2, #1
a000b50c: 0a000023 beq a000b5a0 <_CORE_spinlock_Wait+0xb4>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
a000b510: e5952008 ldr r2, [r5, #8]
a000b514: e2822001 add r2, r2, #1
a000b518: e5852008 str r2, [r5, #8]
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
a000b51c: e5952004 ldr r2, [r5, #4]
a000b520: e3520000 cmp r2, #0
a000b524: 0a000026 beq a000b5c4 <_CORE_spinlock_Wait+0xd8>
}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
a000b528: e3510000 cmp r1, #0
a000b52c: 159f4098 ldrne r4, [pc, #152] ; a000b5cc <_CORE_spinlock_Wait+0xe0>
a000b530: 0a000014 beq a000b588 <_CORE_spinlock_Wait+0x9c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000b534: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
*/
_ISR_Enable( level );
/* An ISR could occur here */
_Thread_Enable_dispatch();
a000b538: eb0005a5 bl a000cbd4 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000b53c: e5943000 ldr r3, [r4] <== NOT EXECUTED
a000b540: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000b544: e5843000 str r3, [r4] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000b548: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a000b54c: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
a000b550: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
a000b554: e5951004 ldr r1, [r5, #4] <== NOT EXECUTED
a000b558: e1a03002 mov r3, r2 <== NOT EXECUTED
a000b55c: e3510000 cmp r1, #0 <== NOT EXECUTED
a000b560: 1afffff3 bne a000b534 <_CORE_spinlock_Wait+0x48> <== NOT EXECUTED
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
a000b564: e3a03001 mov r3, #1
a000b568: e5853004 str r3, [r5, #4]
the_spinlock->holder = _Thread_Executing->Object.id;
a000b56c: e59f305c ldr r3, [pc, #92] ; a000b5d0 <_CORE_spinlock_Wait+0xe4>
a000b570: e5933004 ldr r3, [r3, #4]
a000b574: e5933008 ldr r3, [r3, #8]
a000b578: e585300c str r3, [r5, #12]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000b57c: e129f002 msr CPSR_fc, r2
_ISR_Enable( level );
return CORE_SPINLOCK_SUCCESSFUL;
a000b580: e3a00000 mov r0, #0
a000b584: e8bd8030 pop {r4, r5, pc}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
the_spinlock->users -= 1;
a000b588: e5952008 ldr r2, [r5, #8]
a000b58c: e2422001 sub r2, r2, #1
a000b590: e5852008 str r2, [r5, #8]
a000b594: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
return CORE_SPINLOCK_UNAVAILABLE;
a000b598: e3a00005 mov r0, #5
a000b59c: e8bd8030 pop {r4, r5, pc}
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
#endif
_ISR_Disable( level );
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
a000b5a0: e59f2028 ldr r2, [pc, #40] ; a000b5d0 <_CORE_spinlock_Wait+0xe4>
a000b5a4: e590000c ldr r0, [r0, #12]
a000b5a8: e5922004 ldr r2, [r2, #4]
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
#endif
_ISR_Disable( level );
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
a000b5ac: e5922008 ldr r2, [r2, #8]
a000b5b0: e1500002 cmp r0, r2
a000b5b4: 1affffd5 bne a000b510 <_CORE_spinlock_Wait+0x24>
a000b5b8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
a000b5bc: e3a00001 mov r0, #1 <== NOT EXECUTED
a000b5c0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
ISR_Level level;
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
#endif
_ISR_Disable( level );
a000b5c4: e1a02003 mov r2, r3
a000b5c8: eaffffe5 b a000b564 <_CORE_spinlock_Wait+0x78>
a000ae0c <_Chain_Get_with_empty_check>:
bool _Chain_Get_with_empty_check(
Chain_Control *chain,
Chain_Node **node
)
{
a000ae0c: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000ae10: e10f4000 mrs r4, CPSR <== NOT EXECUTED
a000ae14: e3843080 orr r3, r4, #128 ; 0x80 <== NOT EXECUTED
a000ae18: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
)
{
bool is_empty_now = true;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_first = head->next;
a000ae1c: e5903000 ldr r3, [r0] <== NOT EXECUTED
Chain_Node **the_node
)
{
bool is_empty_now = true;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
a000ae20: e280c004 add ip, r0, #4 <== NOT EXECUTED
Chain_Node *old_first = head->next;
if ( old_first != tail ) {
a000ae24: e15c0003 cmp ip, r3 <== NOT EXECUTED
*the_node = old_first;
is_empty_now = new_first == tail;
} else
*the_node = NULL;
a000ae28: 03a03000 moveq r3, #0 <== NOT EXECUTED
a000ae2c: 05813000 streq r3, [r1] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected(
Chain_Control *the_chain,
Chain_Node **the_node
)
{
bool is_empty_now = true;
a000ae30: 03a00001 moveq r0, #1 <== NOT EXECUTED
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_first = head->next;
if ( old_first != tail ) {
a000ae34: 0a000006 beq a000ae54 <_Chain_Get_with_empty_check+0x48> <== NOT EXECUTED
Chain_Node *new_first = old_first->next;
a000ae38: e5932000 ldr r2, [r3] <== NOT EXECUTED
head->next = new_first;
a000ae3c: e5802000 str r2, [r0] <== NOT EXECUTED
new_first->previous = head;
a000ae40: e5820004 str r0, [r2, #4] <== NOT EXECUTED
*the_node = old_first;
is_empty_now = new_first == tail;
a000ae44: e15c0002 cmp ip, r2 <== NOT EXECUTED
a000ae48: 13a00000 movne r0, #0 <== NOT EXECUTED
a000ae4c: 03a00001 moveq r0, #1 <== NOT EXECUTED
Chain_Node *new_first = old_first->next;
head->next = new_first;
new_first->previous = head;
*the_node = old_first;
a000ae50: e5813000 str r3, [r1] <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ae54: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
_ISR_Disable( level );
is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node );
_ISR_Enable( level );
return is_empty_now;
}
a000ae58: e8bd0010 pop {r4} <== NOT EXECUTED
a000ae5c: e12fff1e bx lr <== NOT EXECUTED
a0009518 <_Event_Seize>:
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
a0009518: e59fc0fc ldr ip, [pc, #252] ; a000961c <_Event_Seize+0x104>
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
a000951c: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
a0009520: e59c4004 ldr r4, [ip, #4]
executing->Wait.return_code = RTEMS_SUCCESSFUL;
a0009524: e3a0c000 mov ip, #0
a0009528: e584c034 str ip, [r4, #52] ; 0x34
api = executing->API_Extensions[ THREAD_API_RTEMS ];
a000952c: e594c0f8 ldr ip, [r4, #248] ; 0xf8
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0009530: e10f7000 mrs r7, CPSR
a0009534: e3875080 orr r5, r7, #128 ; 0x80
a0009538: e129f005 msr CPSR_fc, r5
_ISR_Disable( level );
pending_events = api->pending_events;
a000953c: e59c5000 ldr r5, [ip]
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
a0009540: e0106005 ands r6, r0, r5
a0009544: 0a000003 beq a0009558 <_Event_Seize+0x40>
a0009548: e1500006 cmp r0, r6
a000954c: 0a00001f beq a00095d0 <_Event_Seize+0xb8>
(seized_events == event_in || _Options_Is_any( option_set )) ) {
a0009550: e3110002 tst r1, #2 <== NOT EXECUTED
a0009554: 1a00001d bne a00095d0 <_Event_Seize+0xb8> <== NOT EXECUTED
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
a0009558: e3110001 tst r1, #1
a000955c: 1a000016 bne a00095bc <_Event_Seize+0xa4>
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0009560: e59f50b8 ldr r5, [pc, #184] ; a0009620 <_Event_Seize+0x108>
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
a0009564: e5843028 str r3, [r4, #40] ; 0x28
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0009568: e3a03001 mov r3, #1
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
a000956c: e5841030 str r1, [r4, #48] ; 0x30
executing->Wait.count = (uint32_t) event_in;
a0009570: e5840024 str r0, [r4, #36] ; 0x24
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0009574: e5853000 str r3, [r5]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0009578: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
if ( ticks ) {
a000957c: e3520000 cmp r2, #0
a0009580: 1a000019 bne a00095ec <_Event_Seize+0xd4>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
a0009584: e1a00004 mov r0, r4
a0009588: e3a01c01 mov r1, #256 ; 0x100
a000958c: eb000c9d bl a000c808 <_Thread_Set_state>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0009590: e10f2000 mrs r2, CPSR
a0009594: e3823080 orr r3, r2, #128 ; 0x80
a0009598: e129f003 msr CPSR_fc, r3
_ISR_Disable( level );
sync_state = _Event_Sync_state;
a000959c: e5950000 ldr r0, [r5]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a00095a0: e3a03000 mov r3, #0
a00095a4: e5853000 str r3, [r5]
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
a00095a8: e3500001 cmp r0, #1
a00095ac: 0a00000c beq a00095e4 <_Event_Seize+0xcc>
* 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 );
a00095b0: e1a01004 mov r1, r4 <== NOT EXECUTED
}
a00095b4: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
a00095b8: ea00090b b a000b9ec <_Thread_blocking_operation_Cancel> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00095bc: e129f007 msr CPSR_fc, r7
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
executing->Wait.return_code = RTEMS_UNSATISFIED;
a00095c0: e3a0200d mov r2, #13
a00095c4: e5842034 str r2, [r4, #52] ; 0x34
*event_out = seized_events;
a00095c8: e5836000 str r6, [r3]
return;
a00095cc: e8bd80f0 pop {r4, r5, r6, r7, pc}
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
a00095d0: e1c55006 bic r5, r5, r6
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 =
a00095d4: e58c5000 str r5, [ip]
a00095d8: e129f007 msr CPSR_fc, r7
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
*event_out = seized_events;
a00095dc: e5836000 str r6, [r3]
return;
a00095e0: e8bd80f0 pop {r4, r5, r6, r7, pc}
a00095e4: e129f002 msr CPSR_fc, r2
a00095e8: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
a00095ec: e5941008 ldr r1, [r4, #8]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a00095f0: e59f002c ldr r0, [pc, #44] ; a0009624 <_Event_Seize+0x10c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a00095f4: e3a03000 mov r3, #0
the_watchdog->routine = routine;
the_watchdog->id = id;
a00095f8: e5841068 str r1, [r4, #104] ; 0x68
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a00095fc: e5840064 str r0, [r4, #100] ; 0x64
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0009600: e5843050 str r3, [r4, #80] ; 0x50
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a0009604: e584306c str r3, [r4, #108] ; 0x6c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a0009608: e5842054 str r2, [r4, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000960c: e59f0014 ldr r0, [pc, #20] ; a0009628 <_Event_Seize+0x110>
a0009610: e2841048 add r1, r4, #72 ; 0x48
a0009614: eb000e07 bl a000ce38 <_Watchdog_Insert>
a0009618: eaffffd9 b a0009584 <_Event_Seize+0x6c>
a0009684 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
a0009684: e92d40f0 push {r4, r5, r6, r7, 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 ];
a0009688: e59010f8 ldr r1, [r0, #248] ; 0xf8
option_set = (rtems_option) the_thread->Wait.option;
a000968c: e5906030 ldr r6, [r0, #48] ; 0x30
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
a0009690: e1a04000 mov r4, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0009694: e10f0000 mrs r0, CPSR
a0009698: e3803080 orr r3, r0, #128 ; 0x80
a000969c: e129f003 msr CPSR_fc, r3
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
pending_events = api->pending_events;
a00096a0: e5912000 ldr r2, [r1]
event_condition = (rtems_event_set) the_thread->Wait.count;
a00096a4: e5943024 ldr r3, [r4, #36] ; 0x24
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
a00096a8: e013c002 ands ip, r3, r2
a00096ac: 0a000020 beq a0009734 <_Event_Surrender+0xb0>
/*
* 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() &&
a00096b0: e59f50fc ldr r5, [pc, #252] ; a00097b4 <_Event_Surrender+0x130>
a00096b4: e5957000 ldr r7, [r5]
a00096b8: e3570000 cmp r7, #0
a00096bc: 0a000002 beq a00096cc <_Event_Surrender+0x48>
a00096c0: e5955004 ldr r5, [r5, #4] <== NOT EXECUTED
a00096c4: e1540005 cmp r4, r5 <== NOT EXECUTED
a00096c8: 0a000024 beq a0009760 <_Event_Surrender+0xdc> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
a00096cc: e5945010 ldr r5, [r4, #16]
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
a00096d0: e3150c01 tst r5, #256 ; 0x100
a00096d4: 0a000014 beq a000972c <_Event_Surrender+0xa8>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
a00096d8: e153000c cmp r3, ip
a00096dc: 0a000001 beq a00096e8 <_Event_Surrender+0x64>
a00096e0: e3160002 tst r6, #2 <== NOT EXECUTED
a00096e4: 0a000010 beq a000972c <_Event_Surrender+0xa8> <== NOT EXECUTED
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;
a00096e8: e5943028 ldr r3, [r4, #40] ; 0x28
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
a00096ec: e1c2200c bic r2, r2, ip
/*
* 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 );
a00096f0: e5812000 str r2, [r1]
the_thread->Wait.count = 0;
a00096f4: e3a02000 mov r2, #0
a00096f8: e5842024 str r2, [r4, #36] ; 0x24
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
a00096fc: e583c000 str ip, [r3]
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a0009700: e10f3000 mrs r3, CPSR
a0009704: e129f000 msr CPSR_fc, r0
a0009708: e129f003 msr CPSR_fc, r3
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a000970c: e5943050 ldr r3, [r4, #80] ; 0x50
a0009710: e3530002 cmp r3, #2
a0009714: 0a000008 beq a000973c <_Event_Surrender+0xb8>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0009718: e129f000 msr CPSR_fc, r0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000971c: e59f1094 ldr r1, [pc, #148] ; a00097b8 <_Event_Surrender+0x134>
a0009720: e1a00004 mov r0, r4
}
return;
}
}
_ISR_Enable( level );
}
a0009724: e8bd40f0 pop {r4, r5, r6, r7, lr}
a0009728: ea000923 b a000bbbc <_Thread_Clear_state>
a000972c: e129f000 msr CPSR_fc, r0
a0009730: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0009734: e129f000 msr CPSR_fc, r0
a0009738: e8bd80f0 pop {r4, r5, r6, r7, pc}
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a000973c: e3a03003 mov r3, #3
a0009740: e5843050 str r3, [r4, #80] ; 0x50
a0009744: e129f000 msr CPSR_fc, r0
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a0009748: e2840048 add r0, r4, #72 ; 0x48
a000974c: eb000e28 bl a000cff4 <_Watchdog_Remove>
a0009750: e59f1060 ldr r1, [pc, #96] ; a00097b8 <_Event_Surrender+0x134>
a0009754: e1a00004 mov r0, r4
}
return;
}
}
_ISR_Enable( level );
}
a0009758: e8bd40f0 pop {r4, r5, r6, r7, lr}
a000975c: ea000916 b a000bbbc <_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() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
a0009760: e59f5054 ldr r5, [pc, #84] ; a00097bc <_Event_Surrender+0x138><== NOT EXECUTED
a0009764: e5957000 ldr r7, [r5] <== NOT EXECUTED
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
a0009768: e3570002 cmp r7, #2 <== NOT EXECUTED
a000976c: 0a000002 beq a000977c <_Event_Surrender+0xf8> <== NOT EXECUTED
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
a0009770: e5957000 ldr r7, [r5] <== NOT EXECUTED
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
a0009774: e3570001 cmp r7, #1 <== NOT EXECUTED
a0009778: 1affffd3 bne a00096cc <_Event_Surrender+0x48> <== NOT EXECUTED
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
a000977c: e153000c cmp r3, ip <== NOT EXECUTED
a0009780: 0a000001 beq a000978c <_Event_Surrender+0x108> <== NOT EXECUTED
a0009784: e3160002 tst r6, #2 <== NOT EXECUTED
a0009788: 0a000007 beq a00097ac <_Event_Surrender+0x128> <== NOT EXECUTED
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;
a000978c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
a0009790: e1c2200c bic r2, r2, ip <== NOT EXECUTED
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
a0009794: e5812000 str r2, [r1] <== NOT EXECUTED
the_thread->Wait.count = 0;
a0009798: e3a02000 mov r2, #0 <== NOT EXECUTED
a000979c: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
a00097a0: e583c000 str ip, [r3] <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
a00097a4: e3a03003 mov r3, #3 <== NOT EXECUTED
a00097a8: e5853000 str r3, [r5] <== NOT EXECUTED
a00097ac: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
a00097b0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a00097c0 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
a00097c0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
a00097c4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
a00097c8: e1a0100d mov r1, sp <== NOT EXECUTED
a00097cc: eb0009e5 bl a000bf68 <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
a00097d0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a00097d4: e3530000 cmp r3, #0 <== NOT EXECUTED
a00097d8: 1a000010 bne a0009820 <_Event_Timeout+0x60> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a00097dc: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a00097e0: e3821080 orr r1, r2, #128 ; 0x80 <== NOT EXECUTED
a00097e4: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
a00097e8: e5803024 str r3, [r0, #36] ; 0x24 <== NOT EXECUTED
if ( _Thread_Is_executing( the_thread ) ) {
a00097ec: e59f304c ldr r3, [pc, #76] ; a0009840 <_Event_Timeout+0x80><== NOT EXECUTED
a00097f0: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
a00097f4: e1500003 cmp r0, r3 <== NOT EXECUTED
a00097f8: 0a00000a beq a0009828 <_Event_Timeout+0x68> <== NOT EXECUTED
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
a00097fc: e3a03006 mov r3, #6 <== NOT EXECUTED
a0009800: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0009804: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
a0009808: e59f1034 ldr r1, [pc, #52] ; a0009844 <_Event_Timeout+0x84><== NOT EXECUTED
a000980c: eb0008ea bl a000bbbc <_Thread_Clear_state> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a0009810: e59f3030 ldr r3, [pc, #48] ; a0009848 <_Event_Timeout+0x88><== NOT EXECUTED
a0009814: e5932000 ldr r2, [r3] <== NOT EXECUTED
a0009818: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a000981c: e5832000 str r2, [r3] <== NOT EXECUTED
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
a0009820: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0009824: e8bd8000 pop {pc} <== NOT EXECUTED
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
a0009828: e59f301c ldr r3, [pc, #28] ; a000984c <_Event_Timeout+0x8c><== NOT EXECUTED
a000982c: e5931000 ldr r1, [r3] <== NOT EXECUTED
a0009830: e3510001 cmp r1, #1 <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
a0009834: 03a01002 moveq r1, #2 <== NOT EXECUTED
a0009838: 05831000 streq r1, [r3] <== NOT EXECUTED
a000983c: eaffffee b a00097fc <_Event_Timeout+0x3c> <== NOT EXECUTED
a000fcc0 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000fcc0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000fcc4: e1a08002 mov r8, r2
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
a000fcc8: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000fccc: e24dd01c sub sp, sp, #28
a000fcd0: e1a05001 mov r5, r1
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
a000fcd4: e2911004 adds r1, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000fcd8: e1a07000 mov r7, r0
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
a000fcdc: e58d1000 str r1, [sp]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000fce0: e1a0b003 mov fp, r3
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
a000fce4: e58d200c str r2, [sp, #12]
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
a000fce8: 2a000078 bcs a000fed0 <_Heap_Allocate_aligned_with_boundary+0x210>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
a000fcec: e3530000 cmp r3, #0
a000fcf0: 1a000074 bne a000fec8 <_Heap_Allocate_aligned_with_boundary+0x208>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000fcf4: e5979008 ldr r9, [r7, #8]
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000fcf8: e1570009 cmp r7, r9
a000fcfc: 0a000073 beq a000fed0 <_Heap_Allocate_aligned_with_boundary+0x210>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
a000fd00: e59d300c ldr r3, [sp, #12]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
a000fd04: e2651004 rsb r1, r5, #4
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000fd08: e3a06001 mov r6, #1
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
a000fd0c: e2833007 add r3, r3, #7
a000fd10: e58d3010 str r3, [sp, #16]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
a000fd14: e58d1014 str r1, [sp, #20]
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
a000fd18: e599a004 ldr sl, [r9, #4]
a000fd1c: e59d2000 ldr r2, [sp]
a000fd20: e152000a cmp r2, sl
a000fd24: 2a00004e bcs a000fe64 <_Heap_Allocate_aligned_with_boundary+0x1a4>
if ( alignment == 0 ) {
a000fd28: e3580000 cmp r8, #0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
a000fd2c: 02894008 addeq r4, r9, #8
a000fd30: 0a000051 beq a000fe7c <_Heap_Allocate_aligned_with_boundary+0x1bc>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000fd34: e5973014 ldr r3, [r7, #20]
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000fd38: e59d1014 ldr r1, [sp, #20]
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
a000fd3c: e59d2010 ldr r2, [sp, #16]
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a000fd40: e3caa001 bic sl, sl, #1
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
a000fd44: e089a00a add sl, r9, sl
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000fd48: e081400a add r4, r1, sl
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000fd4c: e58d3004 str r3, [sp, #4]
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
a000fd50: e0633002 rsb r3, r3, r2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000fd54: e1a00004 mov r0, r4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
a000fd58: e083a00a add sl, r3, sl
a000fd5c: e1a01008 mov r1, r8
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
a000fd60: e2893008 add r3, r9, #8
a000fd64: e58d3008 str r3, [sp, #8]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000fd68: eb0016bb bl a001585c <__umodsi3>
a000fd6c: e0604004 rsb r4, r0, r4
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
a000fd70: e15a0004 cmp sl, r4
a000fd74: 2a000003 bcs a000fd88 <_Heap_Allocate_aligned_with_boundary+0xc8>
a000fd78: e1a0000a mov r0, sl
a000fd7c: e1a01008 mov r1, r8
a000fd80: eb0016b5 bl a001585c <__umodsi3>
a000fd84: e060400a rsb r4, r0, sl
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
a000fd88: e35b0000 cmp fp, #0
a000fd8c: 0a000026 beq a000fe2c <_Heap_Allocate_aligned_with_boundary+0x16c>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
a000fd90: e084a005 add sl, r4, r5 <== NOT EXECUTED
a000fd94: e1a0000a mov r0, sl <== NOT EXECUTED
a000fd98: e1a0100b mov r1, fp <== NOT EXECUTED
a000fd9c: eb0016ae bl a001585c <__umodsi3> <== NOT EXECUTED
a000fda0: e060000a rsb r0, r0, sl <== NOT EXECUTED
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
a000fda4: e15a0000 cmp sl, r0 <== NOT EXECUTED
a000fda8: 93a0a000 movls sl, #0 <== NOT EXECUTED
a000fdac: 83a0a001 movhi sl, #1 <== NOT EXECUTED
a000fdb0: e1540000 cmp r4, r0 <== NOT EXECUTED
a000fdb4: 23a0a000 movcs sl, #0 <== NOT EXECUTED
a000fdb8: e35a0000 cmp sl, #0 <== NOT EXECUTED
a000fdbc: 0a00001a beq a000fe2c <_Heap_Allocate_aligned_with_boundary+0x16c><== NOT EXECUTED
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
a000fdc0: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
a000fdc4: e0813005 add r3, r1, r5 <== NOT EXECUTED
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
a000fdc8: e1530000 cmp r3, r0 <== NOT EXECUTED
a000fdcc: 958d9018 strls r9, [sp, #24] <== NOT EXECUTED
a000fdd0: 91a09003 movls r9, r3 <== NOT EXECUTED
a000fdd4: 9a000002 bls a000fde4 <_Heap_Allocate_aligned_with_boundary+0x124><== NOT EXECUTED
a000fdd8: ea000021 b a000fe64 <_Heap_Allocate_aligned_with_boundary+0x1a4><== NOT EXECUTED
a000fddc: e1590000 cmp r9, r0 <== NOT EXECUTED
a000fde0: 8a00003c bhi a000fed8 <_Heap_Allocate_aligned_with_boundary+0x218><== NOT EXECUTED
return 0;
}
alloc_begin = boundary_line - alloc_size;
a000fde4: e0654000 rsb r4, r5, r0 <== NOT EXECUTED
a000fde8: e1a01008 mov r1, r8 <== NOT EXECUTED
a000fdec: e1a00004 mov r0, r4 <== NOT EXECUTED
a000fdf0: eb001699 bl a001585c <__umodsi3> <== NOT EXECUTED
a000fdf4: e0604004 rsb r4, r0, r4 <== NOT EXECUTED
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
a000fdf8: e084a005 add sl, r4, r5 <== NOT EXECUTED
a000fdfc: e1a0000a mov r0, sl <== NOT EXECUTED
a000fe00: e1a0100b mov r1, fp <== NOT EXECUTED
a000fe04: eb001694 bl a001585c <__umodsi3> <== NOT EXECUTED
a000fe08: e060000a rsb r0, r0, sl <== NOT EXECUTED
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
a000fe0c: e15a0000 cmp sl, r0 <== NOT EXECUTED
a000fe10: 93a0a000 movls sl, #0 <== NOT EXECUTED
a000fe14: 83a0a001 movhi sl, #1 <== NOT EXECUTED
a000fe18: e1540000 cmp r4, r0 <== NOT EXECUTED
a000fe1c: 23a0a000 movcs sl, #0 <== NOT EXECUTED
a000fe20: e35a0000 cmp sl, #0 <== NOT EXECUTED
a000fe24: 1affffec bne a000fddc <_Heap_Allocate_aligned_with_boundary+0x11c><== NOT EXECUTED
a000fe28: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
a000fe2c: e59d2008 ldr r2, [sp, #8]
a000fe30: e1520004 cmp r2, r4
a000fe34: 8a00000a bhi a000fe64 <_Heap_Allocate_aligned_with_boundary+0x1a4>
a000fe38: e59d100c ldr r1, [sp, #12]
a000fe3c: e1a00004 mov r0, r4
a000fe40: eb001685 bl a001585c <__umodsi3>
a000fe44: e3e0a007 mvn sl, #7
a000fe48: e069a00a rsb sl, r9, sl
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
if ( free_size >= min_block_size || free_size == 0 ) {
a000fe4c: e59d1004 ldr r1, [sp, #4]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a000fe50: e08aa004 add sl, sl, r4
a000fe54: e060300a rsb r3, r0, sl
a000fe58: e15a0000 cmp sl, r0
a000fe5c: 11510003 cmpne r1, r3
a000fe60: 9a000005 bls a000fe7c <_Heap_Allocate_aligned_with_boundary+0x1bc>
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
a000fe64: e5999008 ldr r9, [r9, #8]
a000fe68: e2863001 add r3, r6, #1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000fe6c: e1570009 cmp r7, r9
a000fe70: 0a00001d beq a000feec <_Heap_Allocate_aligned_with_boundary+0x22c>
a000fe74: e1a06003 mov r6, r3
a000fe78: eaffffa6 b a000fd18 <_Heap_Allocate_aligned_with_boundary+0x58>
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
a000fe7c: e3540000 cmp r4, #0
a000fe80: 0afffff7 beq a000fe64 <_Heap_Allocate_aligned_with_boundary+0x1a4>
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a000fe84: e5972048 ldr r2, [r7, #72] ; 0x48
stats->searches += search_count;
a000fe88: e597304c ldr r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000fe8c: e1a00007 mov r0, r7
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a000fe90: e2822001 add r2, r2, #1
stats->searches += search_count;
a000fe94: e0833006 add r3, r3, r6
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a000fe98: e5872048 str r2, [r7, #72] ; 0x48
stats->searches += search_count;
a000fe9c: e587304c str r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000fea0: e1a01009 mov r1, r9
a000fea4: e1a02004 mov r2, r4
a000fea8: e1a03005 mov r3, r5
a000feac: ebffeb7d bl a000aca8 <_Heap_Block_allocate>
a000feb0: e1a00004 mov r0, r4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
a000feb4: e5973044 ldr r3, [r7, #68] ; 0x44
a000feb8: e1530006 cmp r3, r6
stats->max_search = search_count;
a000febc: 35876044 strcc r6, [r7, #68] ; 0x44
}
return (void *) alloc_begin;
}
a000fec0: e28dd01c add sp, sp, #28
a000fec4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
a000fec8: e1550003 cmp r5, r3 <== NOT EXECUTED
a000fecc: 9a000008 bls a000fef4 <_Heap_Allocate_aligned_with_boundary+0x234><== NOT EXECUTED
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000fed0: e3a00000 mov r0, #0
a000fed4: eafffff9 b a000fec0 <_Heap_Allocate_aligned_with_boundary+0x200>
a000fed8: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
a000fedc: e2863001 add r3, r6, #1 <== NOT EXECUTED
a000fee0: e5999008 ldr r9, [r9, #8] <== NOT EXECUTED
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000fee4: e1570009 cmp r7, r9 <== NOT EXECUTED
a000fee8: 1affffe1 bne a000fe74 <_Heap_Allocate_aligned_with_boundary+0x1b4><== NOT EXECUTED
a000feec: e3a00000 mov r0, #0
a000fef0: eaffffef b a000feb4 <_Heap_Allocate_aligned_with_boundary+0x1f4>
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
alignment = page_size;
a000fef4: e3580000 cmp r8, #0 <== NOT EXECUTED
a000fef8: 01a08002 moveq r8, r2 <== NOT EXECUTED
a000fefc: eaffff7c b a000fcf4 <_Heap_Allocate_aligned_with_boundary+0x34><== NOT EXECUTED
a000aca8 <_Heap_Block_allocate>:
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
a000aca8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000acac: e5917004 ldr r7, [r1, #4]
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
a000acb0: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
a000acb4: e2426008 sub r6, r2, #8
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a000acb8: e3c71001 bic r1, r7, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000acbc: e0858001 add r8, r5, r1
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
a000acc0: e598c004 ldr ip, [r8, #4]
a000acc4: e1a0a003 mov sl, r3
a000acc8: e1a04000 mov r4, r0
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
a000accc: e31c0001 tst ip, #1
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin;
a000acd0: e0653006 rsb r3, r5, r6
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
a000acd4: 11a09000 movne r9, r0
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
a000acd8: 1a00000c bne a000ad10 <_Heap_Block_allocate+0x68>
free_list_anchor = block->prev;
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
a000acdc: e590e038 ldr lr, [r0, #56] ; 0x38
++stats->used_blocks;
a000ace0: e590c040 ldr ip, [r0, #64] ; 0x40
stats->free_size -= _Heap_Block_size( block );
a000ace4: e590b030 ldr fp, [r0, #48] ; 0x30
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
free_list_anchor = block->prev;
a000ace8: e595900c ldr r9, [r5, #12]
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000acec: e5950008 ldr r0, [r5, #8]
free_list_anchor = block->prev;
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
a000acf0: e24ee001 sub lr, lr, #1
++stats->used_blocks;
a000acf4: e28cc001 add ip, ip, #1
stats->free_size -= _Heap_Block_size( block );
a000acf8: e061100b rsb r1, r1, fp
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
a000acfc: e5890008 str r0, [r9, #8]
next->prev = prev;
a000ad00: e580900c str r9, [r0, #12]
free_list_anchor = block->prev;
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
a000ad04: e584e038 str lr, [r4, #56] ; 0x38
++stats->used_blocks;
a000ad08: e584c040 str ip, [r4, #64] ; 0x40
stats->free_size -= _Heap_Block_size( block );
a000ad0c: e5841030 str r1, [r4, #48] ; 0x30
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
a000ad10: e5941010 ldr r1, [r4, #16]
a000ad14: e1530001 cmp r3, r1
a000ad18: 3a000027 bcc a000adbc <_Heap_Block_allocate+0x114>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000ad1c: e1a00002 mov r0, r2
a000ad20: eb002acd bl a001585c <__umodsi3>
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
a000ad24: e5943030 ldr r3, [r4, #48] ; 0x30
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a000ad28: e0606006 rsb r6, r0, r6
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
block_end = new_block_begin;
block_size = block_end - block_begin;
a000ad2c: e0651006 rsb r1, r5, r6
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
a000ad30: e0833001 add r3, r3, r1
if ( _Heap_Is_prev_used( block ) ) {
a000ad34: e3170001 tst r7, #1
uintptr_t block_end = block_begin + block_size;
Heap_Block *const new_block =
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
a000ad38: e0668008 rsb r8, r6, r8
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
a000ad3c: e5843030 str r3, [r4, #48] ; 0x30
if ( _Heap_Is_prev_used( block ) ) {
a000ad40: 1a000013 bne a000ad94 <_Heap_Block_allocate+0xec>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
a000ad44: e5953000 ldr r3, [r5] <== NOT EXECUTED
} else {
Heap_Block *const prev_block = _Heap_Prev_block( block );
uintptr_t const prev_block_size = _Heap_Block_size( prev_block );
block = prev_block;
block_size += prev_block_size;
a000ad48: e1a02009 mov r2, r9 <== NOT EXECUTED
a000ad4c: e0635005 rsb r5, r3, r5 <== NOT EXECUTED
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a000ad50: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
a000ad54: e3c33001 bic r3, r3, #1 <== NOT EXECUTED
a000ad58: e0811003 add r1, r1, r3 <== NOT EXECUTED
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
a000ad5c: e3813001 orr r3, r1, #1
a000ad60: e5853004 str r3, [r5, #4]
new_block->prev_size = block_size;
a000ad64: e5861000 str r1, [r6]
new_block->size_and_flag = new_block_size;
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
a000ad68: e1a00004 mov r0, r4
a000ad6c: e1a0300a mov r3, sl
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
a000ad70: e5868004 str r8, [r6, #4]
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
a000ad74: e1a01006 mov r1, r6
a000ad78: ebffff17 bl a000a9dc <_Heap_Block_split>
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
a000ad7c: e5943030 ldr r3, [r4, #48] ; 0x30
a000ad80: e5942034 ldr r2, [r4, #52] ; 0x34
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000ad84: e1a00006 mov r0, r6
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
a000ad88: e1520003 cmp r2, r3
stats->min_free_size = stats->free_size;
a000ad8c: 85843034 strhi r3, [r4, #52] ; 0x34
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000ad90: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
a000ad94: e5940038 ldr r0, [r4, #56] ; 0x38
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
a000ad98: e5993008 ldr r3, [r9, #8]
new_block->next = next;
new_block->prev = block_before;
a000ad9c: e585900c str r9, [r5, #12]
a000ada0: e2800001 add r0, r0, #1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
a000ada4: e5853008 str r3, [r5, #8]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
a000ada8: e583500c str r5, [r3, #12]
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
a000adac: e5895008 str r5, [r9, #8]
a000adb0: e1a02005 mov r2, r5
a000adb4: e5840038 str r0, [r4, #56] ; 0x38
a000adb8: eaffffe7 b a000ad5c <_Heap_Block_allocate+0xb4>
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
a000adbc: e1a00004 mov r0, r4
a000adc0: e1a02009 mov r2, r9
a000adc4: e083300a add r3, r3, sl
a000adc8: e1a01005 mov r1, r5
a000adcc: ebffff02 bl a000a9dc <_Heap_Block_split>
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
a000add0: e5943030 ldr r3, [r4, #48] ; 0x30
a000add4: e5942034 ldr r2, [r4, #52] ; 0x34
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
a000add8: e1a06005 mov r6, r5
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000addc: e1a00006 mov r0, r6
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
a000ade0: e1520003 cmp r2, r3
stats->min_free_size = stats->free_size;
a000ade4: 85843034 strhi r3, [r4, #52] ; 0x34
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000ade8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000a9dc <_Heap_Block_split>:
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
a000a9dc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000a9e0: e5906014 ldr r6, [r0, #20]
uintptr_t alloc_size
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
a000a9e4: e5907010 ldr r7, [r0, #16]
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
a000a9e8: e1a05001 mov r5, r1
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE;
a000a9ec: e2468008 sub r8, r6, #8
return heap->stats.size;
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b )
{
return a > b ? a : b;
a000a9f0: e1530008 cmp r3, r8
a000a9f4: 21a08003 movcs r8, r3
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const used_size =
a000a9f8: e2888008 add r8, r8, #8
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
a000a9fc: e1a01007 mov r1, r7
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
a000aa00: e1a04000 mov r4, r0
a000aa04: e1a00008 mov r0, r8
a000aa08: e1a09002 mov r9, r2
a000aa0c: eb002b92 bl a001585c <__umodsi3>
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000aa10: e595a004 ldr sl, [r5, #4]
if ( remainder != 0 ) {
a000aa14: e3500000 cmp r0, #0
return value - remainder + alignment;
a000aa18: 10887007 addne r7, r8, r7
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a000aa1c: e3ca2001 bic r2, sl, #1
uintptr_t const used_size =
_Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE;
uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size );
uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size;
a000aa20: e2823004 add r3, r2, #4
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
return value - remainder + alignment;
} else {
return value;
a000aa24: 01a07008 moveq r7, r8
uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS;
a000aa28: e2866004 add r6, r6, #4
uintptr_t const used_size =
_Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE;
uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size );
uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size;
a000aa2c: e0688003 rsb r8, r8, r3
)
{
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
return value - remainder + alignment;
a000aa30: 10607007 rsbne r7, r0, r7
Heap_Block *next_block = _Heap_Block_at( block, block_size );
_HAssert( used_size <= block_size + HEAP_ALLOC_BONUS );
_HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS );
if ( free_size >= free_size_limit ) {
a000aa34: e1580006 cmp r8, r6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000aa38: e0853002 add r3, r5, r2
a000aa3c: 3a00001c bcc a000aab4 <_Heap_Block_split+0xd8>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
a000aa40: e20aa001 and sl, sl, #1
block->size_and_flag = size | flag;
a000aa44: e187a00a orr sl, r7, sl
a000aa48: e585a004 str sl, [r5, #4]
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a000aa4c: e5931004 ldr r1, [r3, #4]
_HAssert( used_block_size + free_block_size == block_size );
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
a000aa50: e5940030 ldr r0, [r4, #48] ; 0x30
_HAssert( used_size <= block_size + HEAP_ALLOC_BONUS );
_HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS );
if ( free_size >= free_size_limit ) {
Heap_Block *const free_block = _Heap_Block_at( block, used_block_size );
uintptr_t free_block_size = block_size - used_block_size;
a000aa54: e0672002 rsb r2, r7, r2
a000aa58: e3c11001 bic r1, r1, #1
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000aa5c: e083c001 add ip, r3, r1
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
a000aa60: e59cc004 ldr ip, [ip, #4]
_HAssert( used_block_size + free_block_size == block_size );
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
a000aa64: e0800002 add r0, r0, r2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000aa68: e0875005 add r5, r7, r5
if ( _Heap_Is_used( next_block ) ) {
a000aa6c: e31c0001 tst ip, #1
_HAssert( used_block_size + free_block_size == block_size );
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
a000aa70: e5840030 str r0, [r4, #48] ; 0x30
if ( _Heap_Is_used( next_block ) ) {
a000aa74: 1a000012 bne a000aac4 <_Heap_Block_split+0xe8>
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000aa78: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
a000aa7c: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
} else {
uintptr_t const next_block_size = _Heap_Block_size( next_block );
_Heap_Free_list_replace( next_block, free_block );
free_block_size += next_block_size;
a000aa80: e0822001 add r2, r2, r1 <== NOT EXECUTED
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
a000aa84: e5850008 str r0, [r5, #8] <== NOT EXECUTED
new_block->prev = prev;
a000aa88: e585300c str r3, [r5, #12] <== NOT EXECUTED
next->prev = new_block;
prev->next = new_block;
a000aa8c: e5835008 str r5, [r3, #8] <== NOT EXECUTED
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
a000aa90: e580500c str r5, [r0, #12] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000aa94: e0823005 add r3, r2, r5 <== NOT EXECUTED
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
a000aa98: e3821001 orr r1, r2, #1
a000aa9c: e5851004 str r1, [r5, #4]
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000aaa0: e5931004 ldr r1, [r3, #4]
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
next_block->prev_size = free_block_size;
a000aaa4: e5832000 str r2, [r3]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000aaa8: e3c12001 bic r2, r1, #1
a000aaac: e5832004 str r2, [r3, #4]
a000aab0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
_Heap_Protection_block_initialize( heap, free_block );
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a000aab4: e5932004 ldr r2, [r3, #4]
a000aab8: e3822001 orr r2, r2, #1
a000aabc: e5832004 str r2, [r3, #4]
a000aac0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
if ( _Heap_Is_used( next_block ) ) {
_Heap_Free_list_insert_after( free_list_anchor, free_block );
/* Statistics */
++stats->free_blocks;
a000aac4: e5940038 ldr r0, [r4, #56] ; 0x38
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
a000aac8: e5991008 ldr r1, [r9, #8]
new_block->next = next;
new_block->prev = block_before;
a000aacc: e585900c str r9, [r5, #12]
a000aad0: e2800001 add r0, r0, #1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
a000aad4: e5851008 str r1, [r5, #8]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
a000aad8: e581500c str r5, [r1, #12]
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
a000aadc: e5895008 str r5, [r9, #8]
a000aae0: e5840038 str r0, [r4, #56] ; 0x38
a000aae4: eaffffeb b a000aa98 <_Heap_Block_split+0xbc>
a001024c <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a001024c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0010250: e1a05000 mov r5, r0
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
a0010254: e0916002 adds r6, r1, r2
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a0010258: e1a04001 mov r4, r1
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
a001025c: e5908020 ldr r8, [r0, #32]
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
a0010260: e5951030 ldr r1, [r5, #48] ; 0x30
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
a0010264: e5900010 ldr r0, [r0, #16]
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a0010268: e24dd024 sub sp, sp, #36 ; 0x24
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
a001026c: e3a07000 mov r7, #0
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a0010270: e58d3010 str r3, [sp, #16]
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
a0010274: e58d0008 str r0, [sp, #8]
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
a0010278: e58d7020 str r7, [sp, #32]
Heap_Block *extend_last_block = NULL;
a001027c: e58d701c str r7, [sp, #28]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a0010280: e5953014 ldr r3, [r5, #20]
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
a0010284: e58d1018 str r1, [sp, #24]
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
return false;
a0010288: 21a00007 movcs r0, r7
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
a001028c: 3a000001 bcc a0010298 <_Heap_Extend+0x4c>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
a0010290: e28dd024 add sp, sp, #36 ; 0x24
a0010294: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
a0010298: e28dc020 add ip, sp, #32
a001029c: e1a01002 mov r1, r2
a00102a0: e58dc000 str ip, [sp]
a00102a4: e1a00004 mov r0, r4
a00102a8: e28dc01c add ip, sp, #28
a00102ac: e59d2008 ldr r2, [sp, #8]
a00102b0: e58dc004 str ip, [sp, #4]
a00102b4: ebffeae4 bl a000ae4c <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
a00102b8: e3500000 cmp r0, #0
a00102bc: 0afffff3 beq a0010290 <_Heap_Extend+0x44>
a00102c0: e1a09008 mov r9, r8
a00102c4: e1a0b007 mov fp, r7
a00102c8: e58d700c str r7, [sp, #12]
a00102cc: e58d7014 str r7, [sp, #20]
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
a00102d0: e1590008 cmp r9, r8
a00102d4: 05953018 ldreq r3, [r5, #24]
uintptr_t const sub_area_end = start_block->prev_size;
a00102d8: e599a000 ldr sl, [r9]
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
a00102dc: 11a03009 movne r3, r9
uintptr_t const sub_area_end = start_block->prev_size;
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
a00102e0: e1530006 cmp r3, r6
a00102e4: 3154000a cmpcc r4, sl
a00102e8: 3a00006c bcc a00104a0 <_Heap_Extend+0x254>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
a00102ec: e1530006 cmp r3, r6
a00102f0: 058d9014 streq r9, [sp, #20]
a00102f4: 0a000001 beq a0010300 <_Heap_Extend+0xb4>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
a00102f8: e156000a cmp r6, sl
a00102fc: 31a0b009 movcc fp, r9
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0010300: e1a0000a mov r0, sl
a0010304: e59d1008 ldr r1, [sp, #8]
a0010308: eb0016a8 bl a0015db0 <__umodsi3>
a001030c: e24a3008 sub r3, sl, #8
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
a0010310: e15a0004 cmp sl, r4
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a0010314: e0603003 rsb r3, r0, r3
start_block->prev_size = extend_area_end;
a0010318: 05896000 streq r6, [r9]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
a001031c: 058d300c streq r3, [sp, #12]
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
a0010320: 0a000001 beq a001032c <_Heap_Extend+0xe0>
a0010324: e154000a cmp r4, sl
a0010328: 81a07003 movhi r7, r3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a001032c: e5939004 ldr r9, [r3, #4]
a0010330: e3c99001 bic r9, r9, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a0010334: e0839009 add r9, r3, r9
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
a0010338: e1580009 cmp r8, r9
a001033c: 1affffe3 bne a00102d0 <_Heap_Extend+0x84>
if ( extend_area_begin < heap->area_begin ) {
a0010340: e5953018 ldr r3, [r5, #24]
a0010344: e1540003 cmp r4, r3
heap->area_begin = extend_area_begin;
a0010348: 35854018 strcc r4, [r5, #24]
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
a001034c: 3a000002 bcc a001035c <_Heap_Extend+0x110>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
a0010350: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
a0010354: e1560003 cmp r6, r3 <== NOT EXECUTED
heap->area_end = extend_area_end;
a0010358: 8585601c strhi r6, [r5, #28] <== NOT EXECUTED
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
a001035c: e59d3020 ldr r3, [sp, #32]
a0010360: e59d201c ldr r2, [sp, #28]
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
a0010364: e595c020 ldr ip, [r5, #32]
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
a0010368: e5836000 str r6, [r3]
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
a001036c: e0631002 rsb r1, r3, r2
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
a0010370: e3810001 orr r0, r1, #1
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
a0010374: e5821000 str r1, [r2]
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
a0010378: e15c0003 cmp ip, r3
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
a001037c: e3a01000 mov r1, #0
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
a0010380: e5830004 str r0, [r3, #4]
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
a0010384: e5821004 str r1, [r2, #4]
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
heap->first_block = extend_first_block;
a0010388: 85853020 strhi r3, [r5, #32]
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
a001038c: 8a000002 bhi a001039c <_Heap_Extend+0x150>
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
a0010390: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED
a0010394: e1530002 cmp r3, r2 <== NOT EXECUTED
heap->last_block = extend_last_block;
a0010398: 35852024 strcc r2, [r5, #36] ; 0x24 <== NOT EXECUTED
}
if ( merge_below_block != NULL ) {
a001039c: e59d3014 ldr r3, [sp, #20]
a00103a0: e3530000 cmp r3, #0
a00103a4: 0a000050 beq a00104ec <_Heap_Extend+0x2a0>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
a00103a8: e5958010 ldr r8, [r5, #16] <== NOT EXECUTED
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
a00103ac: e2844008 add r4, r4, #8 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
a00103b0: e1a00004 mov r0, r4 <== NOT EXECUTED
a00103b4: e1a01008 mov r1, r8 <== NOT EXECUTED
a00103b8: eb00167c bl a0015db0 <__umodsi3> <== NOT EXECUTED
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
a00103bc: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED
if ( remainder != 0 ) {
a00103c0: e3500000 cmp r0, #0 <== NOT EXECUTED
return value - remainder + alignment;
a00103c4: 10844008 addne r4, r4, r8 <== NOT EXECUTED
a00103c8: 10604004 rsbne r4, r0, r4 <== NOT EXECUTED
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
a00103cc: e2441008 sub r1, r4, #8 <== NOT EXECUTED
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
a00103d0: e59c2000 ldr r2, [ip] <== NOT EXECUTED
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
a00103d4: e061300c rsb r3, r1, ip <== NOT EXECUTED
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
a00103d8: e3833001 orr r3, r3, #1 <== NOT EXECUTED
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
a00103dc: e5042008 str r2, [r4, #-8] <== NOT EXECUTED
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
a00103e0: e5813004 str r3, [r1, #4] <== NOT EXECUTED
_Heap_Free_block( heap, new_first_block );
a00103e4: e1a00005 mov r0, r5 <== NOT EXECUTED
a00103e8: ebffff8f bl a001022c <_Heap_Free_block> <== NOT EXECUTED
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
a00103ec: e59d000c ldr r0, [sp, #12]
a00103f0: e3500000 cmp r0, #0
a00103f4: 0a00002b beq a00104a8 <_Heap_Extend+0x25c>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
a00103f8: e2466008 sub r6, r6, #8 <== NOT EXECUTED
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
a00103fc: e0606006 rsb r6, r0, r6 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0010400: e5951010 ldr r1, [r5, #16] <== NOT EXECUTED
a0010404: e1a00006 mov r0, r6 <== NOT EXECUTED
a0010408: eb001668 bl a0015db0 <__umodsi3> <== NOT EXECUTED
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
a001040c: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
a0010410: e0606006 rsb r6, r0, r6 <== NOT EXECUTED
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
a0010414: e1a00005 mov r0, r5 <== NOT EXECUTED
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
a0010418: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
a001041c: e0862001 add r2, r6, r1 <== NOT EXECUTED
(last_block->size_and_flag - last_block_new_size)
a0010420: e0663003 rsb r3, r6, r3 <== NOT EXECUTED
| HEAP_PREV_BLOCK_USED;
a0010424: e3833001 orr r3, r3, #1 <== NOT EXECUTED
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
a0010428: e5823004 str r3, [r2, #4] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
a001042c: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED
a0010430: e2033001 and r3, r3, #1 <== NOT EXECUTED
block->size_and_flag = size | flag;
a0010434: e1866003 orr r6, r6, r3 <== NOT EXECUTED
a0010438: e5816004 str r6, [r1, #4] <== NOT EXECUTED
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
a001043c: ebffff7a bl a001022c <_Heap_Free_block> <== NOT EXECUTED
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
a0010440: e59d200c ldr r2, [sp, #12]
a0010444: e59d3014 ldr r3, [sp, #20]
a0010448: e3520000 cmp r2, #0
a001044c: 03530000 cmpeq r3, #0
a0010450: 0a000021 beq a00104dc <_Heap_Extend+0x290>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
a0010454: e5953024 ldr r3, [r5, #36] ; 0x24
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
a0010458: e595c020 ldr ip, [r5, #32]
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
a001045c: e5952030 ldr r2, [r5, #48] ; 0x30
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
a0010460: e5930004 ldr r0, [r3, #4]
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
a0010464: e063c00c rsb ip, r3, ip
a0010468: e59d4018 ldr r4, [sp, #24]
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
a001046c: e2000001 and r0, r0, #1
/* Statistics */
stats->size += extended_size;
a0010470: e595102c ldr r1, [r5, #44] ; 0x2c
block->size_and_flag = size | flag;
a0010474: e18c0000 orr r0, ip, r0
if ( extended_size_ptr != NULL )
a0010478: e59dc010 ldr ip, [sp, #16]
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
a001047c: e0642002 rsb r2, r4, r2
/* Statistics */
stats->size += extended_size;
a0010480: e0811002 add r1, r1, r2
if ( extended_size_ptr != NULL )
a0010484: e35c0000 cmp ip, #0
a0010488: e5830004 str r0, [r3, #4]
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
a001048c: e585102c str r1, [r5, #44] ; 0x2c
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
a0010490: 13a00001 movne r0, #1
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
a0010494: 158c2000 strne r2, [ip]
return true;
a0010498: 03a00001 moveq r0, #1
a001049c: eaffff7b b a0010290 <_Heap_Extend+0x44>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
a00104a0: e3a00000 mov r0, #0 <== NOT EXECUTED
a00104a4: eaffff79 b a0010290 <_Heap_Extend+0x44> <== NOT EXECUTED
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
a00104a8: e3570000 cmp r7, #0
a00104ac: 0affffe3 beq a0010440 <_Heap_Extend+0x1f4>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
a00104b0: e5971004 ldr r1, [r7, #4] <== NOT EXECUTED
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
a00104b4: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
a00104b8: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
a00104bc: e2011001 and r1, r1, #1 <== NOT EXECUTED
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
a00104c0: e0672002 rsb r2, r7, r2 <== NOT EXECUTED
block->size_and_flag = size | flag;
a00104c4: e1822001 orr r2, r2, r1 <== NOT EXECUTED
a00104c8: e5872004 str r2, [r7, #4] <== NOT EXECUTED
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a00104cc: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a00104d0: e3822001 orr r2, r2, #1 <== NOT EXECUTED
a00104d4: e5832004 str r2, [r3, #4] <== NOT EXECUTED
a00104d8: eaffffd8 b a0010440 <_Heap_Extend+0x1f4> <== NOT EXECUTED
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
_Heap_Free_block( heap, extend_first_block );
a00104dc: e1a00005 mov r0, r5
a00104e0: e59d1020 ldr r1, [sp, #32]
a00104e4: ebffff50 bl a001022c <_Heap_Free_block>
a00104e8: eaffffd9 b a0010454 <_Heap_Extend+0x208>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
a00104ec: e35b0000 cmp fp, #0
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
a00104f0: 1062b00b rsbne fp, r2, fp
a00104f4: 138bb001 orrne fp, fp, #1
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
a00104f8: 1582b004 strne fp, [r2, #4]
a00104fc: eaffffba b a00103ec <_Heap_Extend+0x1a0>
a000ff00 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
a000ff00: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a000ff04: e1a04000 mov r4, r0
a000ff08: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000ff0c: e1a00001 mov r0, r1
a000ff10: e5941010 ldr r1, [r4, #16]
a000ff14: eb001650 bl a001585c <__umodsi3>
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
a000ff18: e5943020 ldr r3, [r4, #32]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000ff1c: e2455008 sub r5, r5, #8
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a000ff20: e0605005 rsb r5, r0, r5
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a000ff24: e1550003 cmp r5, r3
a000ff28: 3a000030 bcc a000fff0 <_Heap_Free+0xf0>
a000ff2c: e5941024 ldr r1, [r4, #36] ; 0x24
a000ff30: e1550001 cmp r5, r1
a000ff34: 8a00002d bhi a000fff0 <_Heap_Free+0xf0>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000ff38: e595c004 ldr ip, [r5, #4]
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a000ff3c: e3cc6001 bic r6, ip, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000ff40: e0852006 add r2, r5, r6
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a000ff44: e1530002 cmp r3, r2
a000ff48: 8a000028 bhi a000fff0 <_Heap_Free+0xf0>
a000ff4c: e1510002 cmp r1, r2
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
a000ff50: 33a00000 movcc r0, #0
a000ff54: 3a000027 bcc a000fff8 <_Heap_Free+0xf8>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000ff58: e5927004 ldr r7, [r2, #4]
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
a000ff5c: e2170001 ands r0, r7, #1
a000ff60: 0a000024 beq a000fff8 <_Heap_Free+0xf8>
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
a000ff64: e1510002 cmp r1, r2
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a000ff68: e3c77001 bic r7, r7, #1
a000ff6c: 03a08000 moveq r8, #0
a000ff70: 0a000004 beq a000ff88 <_Heap_Free+0x88>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000ff74: e0820007 add r0, r2, r7
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
a000ff78: e5900004 ldr r0, [r0, #4]
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
a000ff7c: e3100001 tst r0, #1
a000ff80: 13a08000 movne r8, #0
a000ff84: 03a08001 moveq r8, #1
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
a000ff88: e21c0001 ands r0, ip, #1
a000ff8c: 1a00001a bne a000fffc <_Heap_Free+0xfc>
uintptr_t const prev_size = block->prev_size;
a000ff90: e595c000 ldr ip, [r5]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000ff94: e06ca005 rsb sl, ip, r5
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a000ff98: e153000a cmp r3, sl
a000ff9c: 8a000015 bhi a000fff8 <_Heap_Free+0xf8>
a000ffa0: e151000a cmp r1, sl
a000ffa4: 3a000013 bcc a000fff8 <_Heap_Free+0xf8>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
a000ffa8: e59a0004 ldr r0, [sl, #4]
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
a000ffac: e2100001 ands r0, r0, #1
a000ffb0: 0a000010 beq a000fff8 <_Heap_Free+0xf8>
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
a000ffb4: e3580000 cmp r8, #0
a000ffb8: 0a000038 beq a00100a0 <_Heap_Free+0x1a0>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
a000ffbc: e5940038 ldr r0, [r4, #56] ; 0x38
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000ffc0: e5923008 ldr r3, [r2, #8]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
a000ffc4: e0867007 add r7, r6, r7
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000ffc8: e592200c ldr r2, [r2, #12]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
a000ffcc: e087c00c add ip, r7, ip
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
a000ffd0: e2400001 sub r0, r0, #1
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000ffd4: e38c1001 orr r1, ip, #1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
a000ffd8: e5823008 str r3, [r2, #8]
next->prev = prev;
a000ffdc: e583200c str r2, [r3, #12]
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
a000ffe0: e5840038 str r0, [r4, #56] ; 0x38
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a000ffe4: e58a1004 str r1, [sl, #4]
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
a000ffe8: e78ac00c str ip, [sl, ip]
a000ffec: ea00000e b a001002c <_Heap_Free+0x12c>
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
a000fff0: e3a00000 mov r0, #0
a000fff4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a000fff8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
a000fffc: e3580000 cmp r8, #0
a0010000: 0a000014 beq a0010058 <_Heap_Free+0x158>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a0010004: e5923008 ldr r3, [r2, #8]
a0010008: e592200c ldr r2, [r2, #12]
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
a001000c: e0877006 add r7, r7, r6
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a0010010: e3871001 orr r1, r7, #1
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
a0010014: e5853008 str r3, [r5, #8]
new_block->prev = prev;
a0010018: e585200c str r2, [r5, #12]
next->prev = new_block;
prev->next = new_block;
a001001c: e5825008 str r5, [r2, #8]
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
a0010020: e583500c str r5, [r3, #12]
a0010024: e5851004 str r1, [r5, #4]
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
a0010028: e7857007 str r7, [r5, r7]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a001002c: e5942040 ldr r2, [r4, #64] ; 0x40
++stats->frees;
a0010030: e5943050 ldr r3, [r4, #80] ; 0x50
stats->free_size += block_size;
a0010034: e5941030 ldr r1, [r4, #48] ; 0x30
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a0010038: e2422001 sub r2, r2, #1
++stats->frees;
a001003c: e2833001 add r3, r3, #1
stats->free_size += block_size;
a0010040: e0816006 add r6, r1, r6
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a0010044: e5842040 str r2, [r4, #64] ; 0x40
++stats->frees;
a0010048: e5843050 str r3, [r4, #80] ; 0x50
stats->free_size += block_size;
a001004c: e5846030 str r6, [r4, #48] ; 0x30
return( true );
a0010050: e3a00001 mov r0, #1
a0010054: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
a0010058: e3863001 orr r3, r6, #1
a001005c: e5853004 str r3, [r5, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
a0010060: e5943038 ldr r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
a0010064: e594c03c ldr ip, [r4, #60] ; 0x3c
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a0010068: e5920004 ldr r0, [r2, #4]
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
a001006c: e5941008 ldr r1, [r4, #8]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
a0010070: e2833001 add r3, r3, #1
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a0010074: e3c00001 bic r0, r0, #1
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
a0010078: e153000c cmp r3, ip
new_block->next = next;
a001007c: e5851008 str r1, [r5, #8]
new_block->prev = block_before;
a0010080: e585400c str r4, [r5, #12]
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a0010084: e5820004 str r0, [r2, #4]
block_before->next = new_block;
next->prev = new_block;
a0010088: e581500c str r5, [r1, #12]
next_block->prev_size = block_size;
a001008c: e7856006 str r6, [r5, r6]
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
a0010090: e5845008 str r5, [r4, #8]
/* Statistics */
++stats->free_blocks;
a0010094: e5843038 str r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
a0010098: 8584303c strhi r3, [r4, #60] ; 0x3c
a001009c: eaffffe2 b a001002c <_Heap_Free+0x12c>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
a00100a0: e086c00c add ip, r6, ip
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a00100a4: e38c3001 orr r3, ip, #1
a00100a8: e58a3004 str r3, [sl, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a00100ac: e5923004 ldr r3, [r2, #4]
next_block->prev_size = size;
a00100b0: e785c006 str ip, [r5, r6]
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a00100b4: e3c33001 bic r3, r3, #1
a00100b8: e5823004 str r3, [r2, #4]
a00100bc: eaffffda b a001002c <_Heap_Free+0x12c>
a00173d8 <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
a00173d8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a00173dc: e1a04000 mov r4, r0
a00173e0: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a00173e4: e1a00001 mov r0, r1
a00173e8: e5941010 ldr r1, [r4, #16]
a00173ec: e1a07003 mov r7, r3
a00173f0: e1a0a002 mov sl, r2
a00173f4: ebfff918 bl a001585c <__umodsi3>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a00173f8: e5943020 ldr r3, [r4, #32]
a00173fc: e59d601c ldr r6, [sp, #28]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0017400: e2458008 sub r8, r5, #8
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a0017404: e0601008 rsb r1, r0, r8
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
*old_size = 0;
a0017408: e3a02000 mov r2, #0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a001740c: e1530001 cmp r3, r1
a0017410: e5872000 str r2, [r7]
*new_size = 0;
a0017414: e5862000 str r2, [r6]
a0017418: 8a000038 bhi a0017500 <_Heap_Resize_block+0x128>
a001741c: e5943024 ldr r3, [r4, #36] ; 0x24
a0017420: e1530001 cmp r3, r1
a0017424: 3a000037 bcc a0017508 <_Heap_Resize_block+0x130>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a0017428: e5910004 ldr r0, [r1, #4]
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
a001742c: e2653004 rsb r3, r5, #4
a0017430: e3c00001 bic r0, r0, #1
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
a0017434: e0812000 add r2, r1, r0
a0017438: e592c004 ldr ip, [r2, #4]
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
a001743c: e0833002 add r3, r3, r2
a0017440: e3ccc001 bic ip, ip, #1
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
a0017444: e082800c add r8, r2, ip
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
a0017448: e5988004 ldr r8, [r8, #4]
bool next_block_is_free = _Heap_Is_free( next_block );;
_HAssert( _Heap_Is_block_in_heap( heap, next_block ) );
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
a001744c: e5873000 str r3, [r7]
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
a0017450: e3180001 tst r8, #1
a0017454: 13a07000 movne r7, #0
a0017458: 03a07001 moveq r7, #1
if ( next_block_is_free ) {
a001745c: e3570000 cmp r7, #0
block_size += next_block_size;
alloc_size += next_block_size;
a0017460: 1083300c addne r3, r3, ip
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
a0017464: 1080000c addne r0, r0, ip
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
a0017468: e15a0003 cmp sl, r3
a001746c: 8a000027 bhi a0017510 <_Heap_Resize_block+0x138>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
a0017470: e3570000 cmp r7, #0
a0017474: 0a000011 beq a00174c0 <_Heap_Resize_block+0xe8>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
a0017478: e5917004 ldr r7, [r1, #4] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a001747c: e0803001 add r3, r0, r1 <== NOT EXECUTED
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
/* Statistics */
--stats->free_blocks;
a0017480: e594e038 ldr lr, [r4, #56] ; 0x38 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
a0017484: e2077001 and r7, r7, #1 <== NOT EXECUTED
block->size_and_flag = size | flag;
a0017488: e1800007 orr r0, r0, r7 <== NOT EXECUTED
a001748c: e5810004 str r0, [r1, #4] <== NOT EXECUTED
stats->free_size -= next_block_size;
a0017490: e5948030 ldr r8, [r4, #48] ; 0x30 <== NOT EXECUTED
_Heap_Block_set_size( block, block_size );
_Heap_Free_list_remove( next_block );
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a0017494: e5937004 ldr r7, [r3, #4] <== NOT EXECUTED
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
a0017498: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED
a001749c: e592200c ldr r2, [r2, #12] <== NOT EXECUTED
_Heap_Block_set_size( block, block_size );
_Heap_Free_list_remove( next_block );
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a00174a0: e3877001 orr r7, r7, #1 <== NOT EXECUTED
/* Statistics */
--stats->free_blocks;
a00174a4: e24ee001 sub lr, lr, #1 <== NOT EXECUTED
stats->free_size -= next_block_size;
a00174a8: e06cc008 rsb ip, ip, r8 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
a00174ac: e5820008 str r0, [r2, #8] <== NOT EXECUTED
next->prev = prev;
a00174b0: e580200c str r2, [r0, #12] <== NOT EXECUTED
_Heap_Block_set_size( block, block_size );
_Heap_Free_list_remove( next_block );
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a00174b4: e5837004 str r7, [r3, #4] <== NOT EXECUTED
/* Statistics */
--stats->free_blocks;
a00174b8: e584e038 str lr, [r4, #56] ; 0x38 <== NOT EXECUTED
stats->free_size -= next_block_size;
a00174bc: e584c030 str ip, [r4, #48] ; 0x30 <== NOT EXECUTED
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
a00174c0: e1a02005 mov r2, r5
a00174c4: e1a0300a mov r3, sl
a00174c8: e1a00004 mov r0, r4
a00174cc: ebffcdf5 bl a000aca8 <_Heap_Block_allocate>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a00174d0: e5902004 ldr r2, [r0, #4]
a00174d4: e1a03000 mov r3, r0
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
/* Statistics */
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
a00174d8: e3a00000 mov r0, #0
a00174dc: e3c22001 bic r2, r2, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a00174e0: e2822004 add r2, r2, #4
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
a00174e4: e0655002 rsb r5, r5, r2
a00174e8: e0833005 add r3, r3, r5
a00174ec: e5863000 str r3, [r6]
/* Statistics */
++stats->resizes;
a00174f0: e5943054 ldr r3, [r4, #84] ; 0x54
a00174f4: e2833001 add r3, r3, #1
a00174f8: e5843054 str r3, [r4, #84] ; 0x54
a00174fc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
new_alloc_size,
old_size,
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
a0017500: e3a00002 mov r0, #2 <== NOT EXECUTED
a0017504: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a0017508: e3a00002 mov r0, #2 <== NOT EXECUTED
}
}
a001750c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
return HEAP_RESIZE_UNSATISFIED;
a0017510: e3a00001 mov r0, #1
*new_size = 0;
_Heap_Protection_block_check( heap, block );
if ( _Heap_Is_block_in_heap( heap, block ) ) {
return _Heap_Resize_block_checked(
a0017514: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a0017518 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
a0017518: e92d40f0 push {r4, r5, r6, r7, lr}
a001751c: e1a04000 mov r4, r0
a0017520: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0017524: e1a00001 mov r0, r1
a0017528: e5941010 ldr r1, [r4, #16]
a001752c: e1a07002 mov r7, r2
a0017530: ebfff8c9 bl a001585c <__umodsi3>
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
a0017534: e5943020 ldr r3, [r4, #32]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0017538: e2456008 sub r6, r5, #8
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a001753c: e0600006 rsb r0, r0, r6
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a0017540: e1500003 cmp r0, r3
a0017544: 3a000012 bcc a0017594 <_Heap_Size_of_alloc_area+0x7c>
a0017548: e5942024 ldr r2, [r4, #36] ; 0x24
a001754c: e1500002 cmp r0, r2
a0017550: 8a00000f bhi a0017594 <_Heap_Size_of_alloc_area+0x7c>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a0017554: e5906004 ldr r6, [r0, #4]
a0017558: e3c66001 bic r6, r6, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a001755c: e0806006 add r6, r0, r6
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a0017560: e1530006 cmp r3, r6
a0017564: 8a00000a bhi a0017594 <_Heap_Size_of_alloc_area+0x7c>
a0017568: e1520006 cmp r2, r6
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
a001756c: 33a00000 movcc r0, #0
a0017570: 3a000009 bcc a001759c <_Heap_Size_of_alloc_area+0x84>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
a0017574: e5960004 ldr r0, [r6, #4]
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
a0017578: e2100001 ands r0, r0, #1
a001757c: 0a000006 beq a001759c <_Heap_Size_of_alloc_area+0x84>
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
a0017580: e2655004 rsb r5, r5, #4
a0017584: e0856006 add r6, r5, r6
a0017588: e5876000 str r6, [r7]
return true;
a001758c: e3a00001 mov r0, #1
a0017590: e8bd80f0 pop {r4, r5, r6, r7, pc}
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
a0017594: e3a00000 mov r0, #0 <== NOT EXECUTED
a0017598: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
a001759c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a000ba0c <_Heap_Walk>:
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a000ba0c: e59f3584 ldr r3, [pc, #1412] ; a000bf98 <_Heap_Walk+0x58c>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000ba10: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a000ba14: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a000ba18: e5933000 ldr r3, [r3]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a000ba1c: e59f2578 ldr r2, [pc, #1400] ; a000bf9c <_Heap_Walk+0x590>
a000ba20: e59f9578 ldr r9, [pc, #1400] ; a000bfa0 <_Heap_Walk+0x594>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000ba24: e1a0a001 mov sl, r1
uintptr_t const page_size = heap->page_size;
a000ba28: e5901010 ldr r1, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a000ba2c: 11a09002 movne r9, r2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a000ba30: e3530003 cmp r3, #3
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000ba34: e5902014 ldr r2, [r0, #20]
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
a000ba38: e5903024 ldr r3, [r0, #36] ; 0x24
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000ba3c: e24dd038 sub sp, sp, #56 ; 0x38
a000ba40: e1a04000 mov r4, r0
uintptr_t const page_size = heap->page_size;
a000ba44: e58d1024 str r1, [sp, #36] ; 0x24
uintptr_t const min_block_size = heap->min_block_size;
a000ba48: e58d2028 str r2, [sp, #40] ; 0x28
Heap_Block *const first_block = heap->first_block;
a000ba4c: e5908020 ldr r8, [r0, #32]
Heap_Block *const last_block = heap->last_block;
a000ba50: e58d302c str r3, [sp, #44] ; 0x2c
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a000ba54: 0a000002 beq a000ba64 <_Heap_Walk+0x58>
}
block = next_block;
} while ( block != first_block );
return true;
a000ba58: e3a00001 mov r0, #1
}
a000ba5c: e28dd038 add sp, sp, #56 ; 0x38
a000ba60: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
a000ba64: e594101c ldr r1, [r4, #28]
a000ba68: e5900018 ldr r0, [r0, #24]
a000ba6c: e5942008 ldr r2, [r4, #8]
a000ba70: e594300c ldr r3, [r4, #12]
a000ba74: e59dc028 ldr ip, [sp, #40] ; 0x28
a000ba78: e58d1008 str r1, [sp, #8]
a000ba7c: e59d102c ldr r1, [sp, #44] ; 0x2c
a000ba80: e58d0004 str r0, [sp, #4]
a000ba84: e58d2014 str r2, [sp, #20]
a000ba88: e58d1010 str r1, [sp, #16]
a000ba8c: e58d3018 str r3, [sp, #24]
a000ba90: e59f250c ldr r2, [pc, #1292] ; a000bfa4 <_Heap_Walk+0x598>
a000ba94: e58dc000 str ip, [sp]
a000ba98: e58d800c str r8, [sp, #12]
a000ba9c: e1a0000a mov r0, sl
a000baa0: e3a01000 mov r1, #0
a000baa4: e59d3024 ldr r3, [sp, #36] ; 0x24
a000baa8: e12fff39 blx r9
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
a000baac: e59d2024 ldr r2, [sp, #36] ; 0x24
a000bab0: e3520000 cmp r2, #0
a000bab4: 0a000024 beq a000bb4c <_Heap_Walk+0x140>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
a000bab8: e59d3024 ldr r3, [sp, #36] ; 0x24
a000babc: e2135007 ands r5, r3, #7
a000bac0: 1a000027 bne a000bb64 <_Heap_Walk+0x158>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000bac4: e59d0028 ldr r0, [sp, #40] ; 0x28
a000bac8: e59d1024 ldr r1, [sp, #36] ; 0x24
a000bacc: ebffe54e bl a000500c <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
a000bad0: e250b000 subs fp, r0, #0
a000bad4: 1a000028 bne a000bb7c <_Heap_Walk+0x170>
a000bad8: e2880008 add r0, r8, #8
a000badc: e59d1024 ldr r1, [sp, #36] ; 0x24
a000bae0: ebffe549 bl a000500c <__umodsi3>
);
return false;
}
if (
a000bae4: e2506000 subs r6, r0, #0
a000bae8: 1a00002a bne a000bb98 <_Heap_Walk+0x18c>
block = next_block;
} while ( block != first_block );
return true;
}
a000baec: e598b004 ldr fp, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
a000baf0: e21b5001 ands r5, fp, #1
a000baf4: 0a0000f4 beq a000becc <_Heap_Walk+0x4c0>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a000baf8: e59dc02c ldr ip, [sp, #44] ; 0x2c
a000bafc: e59c3004 ldr r3, [ip, #4]
a000bb00: e3c33001 bic r3, r3, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000bb04: e08c3003 add r3, ip, r3
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
a000bb08: e5935004 ldr r5, [r3, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
a000bb0c: e2155001 ands r5, r5, #1
a000bb10: 0a000007 beq a000bb34 <_Heap_Walk+0x128>
);
return false;
}
if (
a000bb14: e1580003 cmp r8, r3
a000bb18: 0a000025 beq a000bbb4 <_Heap_Walk+0x1a8>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
a000bb1c: e1a0000a mov r0, sl <== NOT EXECUTED
a000bb20: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bb24: e59f247c ldr r2, [pc, #1148] ; a000bfa8 <_Heap_Walk+0x59c> <== NOT EXECUTED
a000bb28: e12fff39 blx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000bb2c: e1a00006 mov r0, r6 <== NOT EXECUTED
a000bb30: eaffffc9 b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
a000bb34: e1a0000a mov r0, sl <== NOT EXECUTED
a000bb38: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bb3c: e59f2468 ldr r2, [pc, #1128] ; a000bfac <_Heap_Walk+0x5a0> <== NOT EXECUTED
a000bb40: e12fff39 blx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000bb44: e1a00005 mov r0, r5 <== NOT EXECUTED
a000bb48: eaffffc3 b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
a000bb4c: e1a0000a mov r0, sl
a000bb50: e3a01001 mov r1, #1
a000bb54: e59f2454 ldr r2, [pc, #1108] ; a000bfb0 <_Heap_Walk+0x5a4>
a000bb58: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000bb5c: e59d0024 ldr r0, [sp, #36] ; 0x24
a000bb60: eaffffbd b a000ba5c <_Heap_Walk+0x50>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
a000bb64: e1a0000a mov r0, sl
a000bb68: e3a01001 mov r1, #1
a000bb6c: e59f2440 ldr r2, [pc, #1088] ; a000bfb4 <_Heap_Walk+0x5a8>
a000bb70: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000bb74: e3a00000 mov r0, #0
a000bb78: eaffffb7 b a000ba5c <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
a000bb7c: e1a0000a mov r0, sl <== NOT EXECUTED
a000bb80: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bb84: e59f242c ldr r2, [pc, #1068] ; a000bfb8 <_Heap_Walk+0x5ac> <== NOT EXECUTED
a000bb88: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
a000bb8c: e12fff39 blx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000bb90: e1a00005 mov r0, r5 <== NOT EXECUTED
a000bb94: eaffffb0 b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
a000bb98: e1a0000a mov r0, sl <== NOT EXECUTED
a000bb9c: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bba0: e59f2414 ldr r2, [pc, #1044] ; a000bfbc <_Heap_Walk+0x5b0> <== NOT EXECUTED
a000bba4: e1a03008 mov r3, r8 <== NOT EXECUTED
a000bba8: e12fff39 blx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000bbac: e1a0000b mov r0, fp <== NOT EXECUTED
a000bbb0: eaffffa9 b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
block = next_block;
} while ( block != first_block );
return true;
}
a000bbb4: e5946008 ldr r6, [r4, #8]
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
a000bbb8: e5947010 ldr r7, [r4, #16]
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
a000bbbc: e1540006 cmp r4, r6
a000bbc0: 05943020 ldreq r3, [r4, #32]
a000bbc4: 0a00002b beq a000bc78 <_Heap_Walk+0x26c>
block = next_block;
} while ( block != first_block );
return true;
}
a000bbc8: e5943020 ldr r3, [r4, #32]
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a000bbcc: e1530006 cmp r3, r6
a000bbd0: 8a0000c3 bhi a000bee4 <_Heap_Walk+0x4d8>
a000bbd4: e594c024 ldr ip, [r4, #36] ; 0x24
a000bbd8: e15c0006 cmp ip, r6
a000bbdc: 3a0000c0 bcc a000bee4 <_Heap_Walk+0x4d8>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000bbe0: e2860008 add r0, r6, #8
a000bbe4: e1a01007 mov r1, r7
a000bbe8: e58d3020 str r3, [sp, #32]
a000bbec: e58dc01c str ip, [sp, #28]
a000bbf0: ebffe505 bl a000500c <__umodsi3>
);
return false;
}
if (
a000bbf4: e3500000 cmp r0, #0
a000bbf8: e59d3020 ldr r3, [sp, #32]
a000bbfc: e59dc01c ldr ip, [sp, #28]
a000bc00: 1a0000d2 bne a000bf50 <_Heap_Walk+0x544>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a000bc04: e5962004 ldr r2, [r6, #4]
a000bc08: e3c22001 bic r2, r2, #1
block = next_block;
} while ( block != first_block );
return true;
}
a000bc0c: e0862002 add r2, r6, r2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
a000bc10: e5922004 ldr r2, [r2, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a000bc14: e3120001 tst r2, #1
a000bc18: 1a0000dc bne a000bf90 <_Heap_Walk+0x584>
a000bc1c: e58d8030 str r8, [sp, #48] ; 0x30
a000bc20: e58db034 str fp, [sp, #52] ; 0x34
a000bc24: e1a02004 mov r2, r4
a000bc28: e1a08003 mov r8, r3
a000bc2c: e1a0b00c mov fp, ip
);
return false;
}
if ( free_block->prev != prev_block ) {
a000bc30: e596100c ldr r1, [r6, #12]
a000bc34: e1510002 cmp r1, r2
a000bc38: 1a0000cc bne a000bf70 <_Heap_Walk+0x564>
return false;
}
prev_block = free_block;
free_block = free_block->next;
a000bc3c: e5965008 ldr r5, [r6, #8]
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
a000bc40: e1540005 cmp r4, r5
a000bc44: 0a000008 beq a000bc6c <_Heap_Walk+0x260>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a000bc48: e1580005 cmp r8, r5
a000bc4c: 9a000077 bls a000be30 <_Heap_Walk+0x424>
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
a000bc50: e1a0000a mov r0, sl <== NOT EXECUTED
a000bc54: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bc58: e59f2360 ldr r2, [pc, #864] ; a000bfc0 <_Heap_Walk+0x5b4> <== NOT EXECUTED
a000bc5c: e1a03005 mov r3, r5 <== NOT EXECUTED
a000bc60: e12fff39 blx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000bc64: e3a00000 mov r0, #0 <== NOT EXECUTED
a000bc68: eaffff7b b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
a000bc6c: e1a03008 mov r3, r8
a000bc70: e59db034 ldr fp, [sp, #52] ; 0x34
a000bc74: e59d8030 ldr r8, [sp, #48] ; 0x30
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a000bc78: e1a06008 mov r6, r8
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a000bc7c: e3cb7001 bic r7, fp, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000bc80: e0875006 add r5, r7, r6
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a000bc84: e1530005 cmp r3, r5
a000bc88: 9a000007 bls a000bcac <_Heap_Walk+0x2a0>
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
a000bc8c: e1a0000a mov r0, sl <== NOT EXECUTED
a000bc90: e58d5000 str r5, [sp] <== NOT EXECUTED
a000bc94: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bc98: e59f2324 ldr r2, [pc, #804] ; a000bfc4 <_Heap_Walk+0x5b8> <== NOT EXECUTED
a000bc9c: e1a03006 mov r3, r6 <== NOT EXECUTED
a000bca0: e12fff39 blx r9 <== NOT EXECUTED
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
a000bca4: e3a00000 mov r0, #0 <== NOT EXECUTED
a000bca8: eaffff6b b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
a000bcac: e5943024 ldr r3, [r4, #36] ; 0x24
a000bcb0: e1530005 cmp r3, r5
a000bcb4: 3afffff4 bcc a000bc8c <_Heap_Walk+0x280>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000bcb8: e59d1024 ldr r1, [sp, #36] ; 0x24
a000bcbc: e1a00007 mov r0, r7
a000bcc0: ebffe4d1 bl a000500c <__umodsi3>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
a000bcc4: e59d102c ldr r1, [sp, #44] ; 0x2c
a000bcc8: e0563001 subs r3, r6, r1
a000bccc: 13a03001 movne r3, #1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
a000bcd0: e3500000 cmp r0, #0
a000bcd4: 0a000001 beq a000bce0 <_Heap_Walk+0x2d4>
a000bcd8: e3530000 cmp r3, #0 <== NOT EXECUTED
a000bcdc: 1a000082 bne a000beec <_Heap_Walk+0x4e0> <== NOT EXECUTED
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
a000bce0: e59d2028 ldr r2, [sp, #40] ; 0x28
a000bce4: e1520007 cmp r2, r7
a000bce8: 9a000001 bls a000bcf4 <_Heap_Walk+0x2e8>
a000bcec: e3530000 cmp r3, #0 <== NOT EXECUTED
a000bcf0: 1a000085 bne a000bf0c <_Heap_Walk+0x500> <== NOT EXECUTED
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
a000bcf4: e1560005 cmp r6, r5
a000bcf8: 3a000001 bcc a000bd04 <_Heap_Walk+0x2f8>
a000bcfc: e3530000 cmp r3, #0
a000bd00: 1a00008a bne a000bf30 <_Heap_Walk+0x524>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
a000bd04: e5953004 ldr r3, [r5, #4]
a000bd08: e20bb001 and fp, fp, #1
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
a000bd0c: e3130001 tst r3, #1
a000bd10: 0a000016 beq a000bd70 <_Heap_Walk+0x364>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
a000bd14: e35b0000 cmp fp, #0
a000bd18: 0a00000b beq a000bd4c <_Heap_Walk+0x340>
(*printer)(
a000bd1c: e58d7000 str r7, [sp]
a000bd20: e1a0000a mov r0, sl
a000bd24: e3a01000 mov r1, #0
a000bd28: e59f2298 ldr r2, [pc, #664] ; a000bfc8 <_Heap_Walk+0x5bc>
a000bd2c: e1a03006 mov r3, r6
a000bd30: e12fff39 blx r9
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a000bd34: e1580005 cmp r8, r5
a000bd38: 0affff46 beq a000ba58 <_Heap_Walk+0x4c>
a000bd3c: e595b004 ldr fp, [r5, #4]
a000bd40: e5943020 ldr r3, [r4, #32]
a000bd44: e1a06005 mov r6, r5
a000bd48: eaffffcb b a000bc7c <_Heap_Walk+0x270>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
a000bd4c: e58d7000 str r7, [sp]
a000bd50: e5963000 ldr r3, [r6]
a000bd54: e1a0000a mov r0, sl
a000bd58: e1a0100b mov r1, fp
a000bd5c: e58d3004 str r3, [sp, #4]
a000bd60: e59f2264 ldr r2, [pc, #612] ; a000bfcc <_Heap_Walk+0x5c0>
a000bd64: e1a03006 mov r3, r6
a000bd68: e12fff39 blx r9
a000bd6c: eafffff0 b a000bd34 <_Heap_Walk+0x328>
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
a000bd70: e596200c ldr r2, [r6, #12]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
a000bd74: e5943008 ldr r3, [r4, #8]
block = next_block;
} while ( block != first_block );
return true;
}
a000bd78: e594100c ldr r1, [r4, #12]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
a000bd7c: e1530002 cmp r3, r2
a000bd80: 059f0248 ldreq r0, [pc, #584] ; a000bfd0 <_Heap_Walk+0x5c4>
a000bd84: 0a000003 beq a000bd98 <_Heap_Walk+0x38c>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
a000bd88: e59f3244 ldr r3, [pc, #580] ; a000bfd4 <_Heap_Walk+0x5c8>
a000bd8c: e1540002 cmp r4, r2
a000bd90: e59f0240 ldr r0, [pc, #576] ; a000bfd8 <_Heap_Walk+0x5cc>
a000bd94: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
a000bd98: e5963008 ldr r3, [r6, #8]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
a000bd9c: e1510003 cmp r1, r3
a000bda0: 059f1234 ldreq r1, [pc, #564] ; a000bfdc <_Heap_Walk+0x5d0>
a000bda4: 0a000003 beq a000bdb8 <_Heap_Walk+0x3ac>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
a000bda8: e59fc230 ldr ip, [pc, #560] ; a000bfe0 <_Heap_Walk+0x5d4>
a000bdac: e1540003 cmp r4, r3
a000bdb0: e59f1220 ldr r1, [pc, #544] ; a000bfd8 <_Heap_Walk+0x5cc>
a000bdb4: 01a0100c moveq r1, ip
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
a000bdb8: e58d2004 str r2, [sp, #4]
a000bdbc: e58d0008 str r0, [sp, #8]
a000bdc0: e58d300c str r3, [sp, #12]
a000bdc4: e58d1010 str r1, [sp, #16]
a000bdc8: e1a03006 mov r3, r6
a000bdcc: e58d7000 str r7, [sp]
a000bdd0: e1a0000a mov r0, sl
a000bdd4: e3a01000 mov r1, #0
a000bdd8: e59f2204 ldr r2, [pc, #516] ; a000bfe4 <_Heap_Walk+0x5d8>
a000bddc: e12fff39 blx r9
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
a000bde0: e5953000 ldr r3, [r5]
a000bde4: e1570003 cmp r7, r3
a000bde8: 1a000026 bne a000be88 <_Heap_Walk+0x47c>
);
return false;
}
if ( !prev_used ) {
a000bdec: e35b0000 cmp fp, #0
a000bdf0: 0a00002e beq a000beb0 <_Heap_Walk+0x4a4>
block = next_block;
} while ( block != first_block );
return true;
}
a000bdf4: e5943008 ldr r3, [r4, #8]
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
a000bdf8: e1540003 cmp r4, r3
a000bdfc: 0a000004 beq a000be14 <_Heap_Walk+0x408>
if ( free_block == block ) {
a000be00: e1560003 cmp r6, r3
a000be04: 0affffca beq a000bd34 <_Heap_Walk+0x328>
return true;
}
free_block = free_block->next;
a000be08: e5933008 ldr r3, [r3, #8]
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
a000be0c: e1540003 cmp r4, r3
a000be10: 1afffffa bne a000be00 <_Heap_Walk+0x3f4>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
a000be14: e1a0000a mov r0, sl <== NOT EXECUTED
a000be18: e3a01001 mov r1, #1 <== NOT EXECUTED
a000be1c: e59f21c4 ldr r2, [pc, #452] ; a000bfe8 <_Heap_Walk+0x5dc> <== NOT EXECUTED
a000be20: e1a03006 mov r3, r6 <== NOT EXECUTED
a000be24: e12fff39 blx r9 <== NOT EXECUTED
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a000be28: e3a00000 mov r0, #0 <== NOT EXECUTED
a000be2c: eaffff0a b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a000be30: e155000b cmp r5, fp
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000be34: e2850008 add r0, r5, #8
a000be38: e1a01007 mov r1, r7
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a000be3c: 8affff83 bhi a000bc50 <_Heap_Walk+0x244>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000be40: ebffe471 bl a000500c <__umodsi3>
);
return false;
}
if (
a000be44: e3500000 cmp r0, #0
a000be48: 1a000041 bne a000bf54 <_Heap_Walk+0x548>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a000be4c: e5953004 ldr r3, [r5, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a000be50: e1a02006 mov r2, r6
a000be54: e1a06005 mov r6, r5
a000be58: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
a000be5c: e0833005 add r3, r3, r5
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
a000be60: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a000be64: e3130001 tst r3, #1
a000be68: 0affff70 beq a000bc30 <_Heap_Walk+0x224>
(*printer)(
a000be6c: e1a0000a mov r0, sl <== NOT EXECUTED
a000be70: e3a01001 mov r1, #1 <== NOT EXECUTED
a000be74: e59f2170 ldr r2, [pc, #368] ; a000bfec <_Heap_Walk+0x5e0> <== NOT EXECUTED
a000be78: e1a03005 mov r3, r5 <== NOT EXECUTED
a000be7c: e12fff39 blx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000be80: e3a00000 mov r0, #0 <== NOT EXECUTED
a000be84: eafffef4 b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
a000be88: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a000be8c: e1a0000a mov r0, sl <== NOT EXECUTED
a000be90: e58d7000 str r7, [sp] <== NOT EXECUTED
a000be94: e58d5008 str r5, [sp, #8] <== NOT EXECUTED
a000be98: e3a01001 mov r1, #1 <== NOT EXECUTED
a000be9c: e59f214c ldr r2, [pc, #332] ; a000bff0 <_Heap_Walk+0x5e4> <== NOT EXECUTED
a000bea0: e1a03006 mov r3, r6 <== NOT EXECUTED
a000bea4: e12fff39 blx r9 <== NOT EXECUTED
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a000bea8: e3a00000 mov r0, #0 <== NOT EXECUTED
a000beac: eafffeea b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( !prev_used ) {
(*printer)(
a000beb0: e1a0000a mov r0, sl <== NOT EXECUTED
a000beb4: e3a01001 mov r1, #1 <== NOT EXECUTED
a000beb8: e59f2134 ldr r2, [pc, #308] ; a000bff4 <_Heap_Walk+0x5e8> <== NOT EXECUTED
a000bebc: e1a03006 mov r3, r6 <== NOT EXECUTED
a000bec0: e12fff39 blx r9 <== NOT EXECUTED
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a000bec4: e1a0000b mov r0, fp <== NOT EXECUTED
a000bec8: eafffee3 b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
a000becc: e1a0000a mov r0, sl <== NOT EXECUTED
a000bed0: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bed4: e59f211c ldr r2, [pc, #284] ; a000bff8 <_Heap_Walk+0x5ec> <== NOT EXECUTED
a000bed8: e12fff39 blx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000bedc: e1a00005 mov r0, r5 <== NOT EXECUTED
a000bee0: eafffedd b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a000bee4: e1a05006 mov r5, r6 <== NOT EXECUTED
a000bee8: eaffff58 b a000bc50 <_Heap_Walk+0x244> <== NOT EXECUTED
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
a000beec: e1a0000a mov r0, sl <== NOT EXECUTED
a000bef0: e58d7000 str r7, [sp] <== NOT EXECUTED
a000bef4: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bef8: e59f20fc ldr r2, [pc, #252] ; a000bffc <_Heap_Walk+0x5f0> <== NOT EXECUTED
a000befc: e1a03006 mov r3, r6 <== NOT EXECUTED
a000bf00: e12fff39 blx r9 <== NOT EXECUTED
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
a000bf04: e3a00000 mov r0, #0 <== NOT EXECUTED
a000bf08: eafffed3 b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
a000bf0c: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
a000bf10: e1a0000a mov r0, sl <== NOT EXECUTED
a000bf14: e58d7000 str r7, [sp] <== NOT EXECUTED
a000bf18: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bf1c: e59f20dc ldr r2, [pc, #220] ; a000c000 <_Heap_Walk+0x5f4> <== NOT EXECUTED
a000bf20: e1a03006 mov r3, r6 <== NOT EXECUTED
a000bf24: e12fff39 blx r9 <== NOT EXECUTED
block,
block_size,
min_block_size
);
return false;
a000bf28: e3a00000 mov r0, #0 <== NOT EXECUTED
a000bf2c: eafffeca b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
a000bf30: e1a0000a mov r0, sl <== NOT EXECUTED
a000bf34: e58d5000 str r5, [sp] <== NOT EXECUTED
a000bf38: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bf3c: e59f20c0 ldr r2, [pc, #192] ; a000c004 <_Heap_Walk+0x5f8> <== NOT EXECUTED
a000bf40: e1a03006 mov r3, r6 <== NOT EXECUTED
a000bf44: e12fff39 blx r9 <== NOT EXECUTED
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
a000bf48: e3a00000 mov r0, #0 <== NOT EXECUTED
a000bf4c: eafffec2 b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
);
return false;
}
if (
a000bf50: e1a05006 mov r5, r6 <== NOT EXECUTED
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
a000bf54: e1a0000a mov r0, sl <== NOT EXECUTED
a000bf58: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bf5c: e59f20a4 ldr r2, [pc, #164] ; a000c008 <_Heap_Walk+0x5fc> <== NOT EXECUTED
a000bf60: e1a03005 mov r3, r5 <== NOT EXECUTED
a000bf64: e12fff39 blx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000bf68: e3a00000 mov r0, #0 <== NOT EXECUTED
a000bf6c: eafffeba b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
a000bf70: e58d1000 str r1, [sp] <== NOT EXECUTED
a000bf74: e1a0000a mov r0, sl <== NOT EXECUTED
a000bf78: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bf7c: e59f2088 ldr r2, [pc, #136] ; a000c00c <_Heap_Walk+0x600> <== NOT EXECUTED
a000bf80: e1a03006 mov r3, r6 <== NOT EXECUTED
a000bf84: e12fff39 blx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000bf88: e3a00000 mov r0, #0 <== NOT EXECUTED
a000bf8c: eafffeb2 b a000ba5c <_Heap_Walk+0x50> <== NOT EXECUTED
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a000bf90: e1a05006 mov r5, r6 <== NOT EXECUTED
a000bf94: eaffffb4 b a000be6c <_Heap_Walk+0x460> <== NOT EXECUTED
a000b9b4 <_Heap_Walk_print>:
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
a000b9b4: e92d000c push {r2, r3} <== NOT EXECUTED
a000b9b8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
va_list ap;
if ( error ) {
a000b9bc: e31100ff tst r1, #255 ; 0xff <== NOT EXECUTED
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
a000b9c0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000b9c4: e1a01000 mov r1, r0 <== NOT EXECUTED
va_list ap;
if ( error ) {
a000b9c8: 1a00000a bne a000b9f8 <_Heap_Walk_print+0x44> <== NOT EXECUTED
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
a000b9cc: e59f0030 ldr r0, [pc, #48] ; a000ba04 <_Heap_Walk_print+0x50><== NOT EXECUTED
a000b9d0: ebfff027 bl a0007a74 <printk> <== NOT EXECUTED
}
va_start( ap, fmt );
a000b9d4: e28d300c add r3, sp, #12 <== NOT EXECUTED
vprintk( fmt, ap );
a000b9d8: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
a000b9dc: e1a01003 mov r1, r3 <== NOT EXECUTED
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
a000b9e0: e58d3000 str r3, [sp] <== NOT EXECUTED
vprintk( fmt, ap );
a000b9e4: ebfff7a8 bl a000988c <vprintk> <== NOT EXECUTED
va_end( ap );
}
a000b9e8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000b9ec: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
a000b9f0: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000b9f4: e12fff1e bx lr <== NOT EXECUTED
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
va_list ap;
if ( error ) {
printk( "FAIL[%d]: ", source );
a000b9f8: e59f0008 ldr r0, [pc, #8] ; a000ba08 <_Heap_Walk_print+0x54><== NOT EXECUTED
a000b9fc: ebfff01c bl a0007a74 <printk> <== NOT EXECUTED
a000ba00: eafffff3 b a000b9d4 <_Heap_Walk_print+0x20> <== NOT EXECUTED
a000adec <_Internal_error_Occurred>:
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
a000adec: e59f303c ldr r3, [pc, #60] ; a000ae30 <_Internal_error_Occurred+0x44>
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000adf0: e201c0ff and ip, r1, #255 ; 0xff
a000adf4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
a000adf8: e1a0100c mov r1, ip
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
a000adfc: e5830000 str r0, [r3]
_Internal_errors_What_happened.is_internal = is_internal;
a000ae00: e5c3c004 strb ip, [r3, #4]
_Internal_errors_What_happened.the_error = the_error;
a000ae04: e5832008 str r2, [r3, #8]
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000ae08: e1a04002 mov r4, r2
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
a000ae0c: eb0007a7 bl a000ccb0 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
a000ae10: e59f301c ldr r3, [pc, #28] ; a000ae34 <_Internal_error_Occurred+0x48><== NOT EXECUTED
a000ae14: e3a02005 mov r2, #5 <== NOT EXECUTED
a000ae18: e5832000 str r2, [r3] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000ae1c: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a000ae20: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
a000ae24: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
a000ae28: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ae2c: eafffffe b a000ae2c <_Internal_error_Occurred+0x40> <== NOT EXECUTED
a000aef4 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
a000aef4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
a000aef8: e5904034 ldr r4, [r0, #52] ; 0x34
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
a000aefc: e24dd014 sub sp, sp, #20
a000af00: e1a05000 mov r5, r0
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
a000af04: e3540000 cmp r4, #0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
a000af08: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
a000af0c: 0a00009c beq a000b184 <_Objects_Extend_information+0x290>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
a000af10: e1d081b4 ldrh r8, [r0, #20]
a000af14: e1d0a1b0 ldrh sl, [r0, #16]
a000af18: e1a01008 mov r1, r8
a000af1c: e1a0000a mov r0, sl
a000af20: eb002a07 bl a0015744 <__aeabi_uidiv>
a000af24: e1a03800 lsl r3, r0, #16
for ( ; block < block_count; block++ ) {
a000af28: e1b03823 lsrs r3, r3, #16
a000af2c: 0a00009a beq a000b19c <_Objects_Extend_information+0x2a8>
if ( information->object_blocks[ block ] == NULL ) {
a000af30: e5949000 ldr r9, [r4]
a000af34: e3590000 cmp r9, #0
a000af38: 01a01008 moveq r1, r8
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
a000af3c: 01a06007 moveq r6, r7
index_base = minimum_index;
block = 0;
a000af40: 01a04009 moveq r4, r9
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
a000af44: 0a00000c beq a000af7c <_Objects_Extend_information+0x88>
a000af48: e1a02004 mov r2, r4
a000af4c: e1a01008 mov r1, r8
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
a000af50: e1a06007 mov r6, r7
index_base = minimum_index;
block = 0;
a000af54: e3a04000 mov r4, #0
a000af58: ea000002 b a000af68 <_Objects_Extend_information+0x74>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
a000af5c: e5b29004 ldr r9, [r2, #4]!
a000af60: e3590000 cmp r9, #0
a000af64: 0a000004 beq a000af7c <_Objects_Extend_information+0x88>
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
a000af68: e2844001 add r4, r4, #1
a000af6c: e1530004 cmp r3, r4
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
break;
} else
index_base += information->allocation_size;
a000af70: e0866008 add r6, r6, r8
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
a000af74: 8afffff8 bhi a000af5c <_Objects_Extend_information+0x68>
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
a000af78: e3a09001 mov r9, #1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
a000af7c: e08aa001 add sl, sl, r1
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
a000af80: e35a0801 cmp sl, #65536 ; 0x10000
a000af84: 2a000064 bcs a000b11c <_Objects_Extend_information+0x228>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
a000af88: e5d52012 ldrb r2, [r5, #18]
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
a000af8c: e5950018 ldr r0, [r5, #24]
if ( information->auto_extend ) {
a000af90: e3520000 cmp r2, #0
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
a000af94: e0000091 mul r0, r1, r0
if ( information->auto_extend ) {
a000af98: 1a000061 bne a000b124 <_Objects_Extend_information+0x230>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
a000af9c: e58d3000 str r3, [sp]
a000afa0: eb00088a bl a000d1d0 <_Workspace_Allocate_or_fatal_error>
a000afa4: e59d3000 ldr r3, [sp]
a000afa8: e1a08000 mov r8, r0
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
a000afac: e3590000 cmp r9, #0
a000afb0: 0a00003a beq a000b0a0 <_Objects_Extend_information+0x1ac>
*/
/*
* Up the block count and maximum
*/
block_count++;
a000afb4: e283b001 add fp, r3, #1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
a000afb8: e08b008b add r0, fp, fp, lsl #1
((maximum + minimum_index) * sizeof(Objects_Control *));
a000afbc: e08a0000 add r0, sl, r0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
a000afc0: e0800007 add r0, r0, r7
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
a000afc4: e1a00100 lsl r0, r0, #2
a000afc8: e58d3000 str r3, [sp]
a000afcc: eb000875 bl a000d1a8 <_Workspace_Allocate>
if ( !object_blocks ) {
a000afd0: e2509000 subs r9, r0, #0
a000afd4: e59d3000 ldr r3, [sp]
a000afd8: 0a000074 beq a000b1b0 <_Objects_Extend_information+0x2bc>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
a000afdc: e1d521b0 ldrh r2, [r5, #16]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
a000afe0: e089c10b add ip, r9, fp, lsl #2
a000afe4: e089b18b add fp, r9, fp, lsl #3
a000afe8: e1570002 cmp r7, r2
a000afec: 3a000052 bcc a000b13c <_Objects_Extend_information+0x248>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a000aff0: e3570000 cmp r7, #0
a000aff4: 13a02000 movne r2, #0
a000aff8: 11a0100b movne r1, fp
local_table[ index ] = NULL;
a000affc: 11a00002 movne r0, r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a000b000: 0a000003 beq a000b014 <_Objects_Extend_information+0x120>
a000b004: e2822001 add r2, r2, #1
a000b008: e1570002 cmp r7, r2
local_table[ index ] = NULL;
a000b00c: e4810004 str r0, [r1], #4
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a000b010: 8afffffb bhi a000b004 <_Objects_Extend_information+0x110>
a000b014: e1a03103 lsl r3, r3, #2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
a000b018: e1d511b4 ldrh r1, [r5, #20]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
a000b01c: e3a00000 mov r0, #0
a000b020: e7890003 str r0, [r9, r3]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
a000b024: e0861001 add r1, r6, r1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
a000b028: e1560001 cmp r6, r1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
a000b02c: e78c0003 str r0, [ip, r3]
for ( index=index_base ;
a000b030: 2a000005 bcs a000b04c <_Objects_Extend_information+0x158>
a000b034: e08b2106 add r2, fp, r6, lsl #2
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
a000b038: e1a03006 mov r3, r6
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
a000b03c: e2833001 add r3, r3, #1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
a000b040: e1530001 cmp r3, r1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
a000b044: e4820004 str r0, [r2], #4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
a000b048: 3afffffb bcc a000b03c <_Objects_Extend_information+0x148>
a000b04c: e10f3000 mrs r3, CPSR
a000b050: e3832080 orr r2, r3, #128 ; 0x80
a000b054: e129f002 msr CPSR_fc, r2
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a000b058: e5952000 ldr r2, [r5]
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
a000b05c: e1d510b4 ldrh r1, [r5, #4]
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
a000b060: e1a0a80a lsl sl, sl, #16
a000b064: e1a02c02 lsl r2, r2, #24
a000b068: e3822801 orr r2, r2, #65536 ; 0x10000
a000b06c: e1a0a82a lsr sl, sl, #16
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a000b070: e1822d81 orr r2, r2, r1, lsl #27
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a000b074: e182200a orr r2, r2, sl
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
a000b078: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
a000b07c: e585c030 str ip, [r5, #48] ; 0x30
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
a000b080: e5859034 str r9, [r5, #52] ; 0x34
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
a000b084: e585b01c str fp, [r5, #28]
information->maximum = (Objects_Maximum) maximum;
a000b088: e1c5a1b0 strh sl, [r5, #16]
information->maximum_id = _Objects_Build_id(
a000b08c: e585200c str r2, [r5, #12]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000b090: e129f003 msr CPSR_fc, r3
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
a000b094: e3500000 cmp r0, #0
a000b098: 0a000000 beq a000b0a0 <_Objects_Extend_information+0x1ac>
_Workspace_Free( old_tables );
a000b09c: eb000847 bl a000d1c0 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a000b0a0: e5953034 ldr r3, [r5, #52] ; 0x34
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
a000b0a4: e28d7008 add r7, sp, #8
a000b0a8: e1a01008 mov r1, r8
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a000b0ac: e7838104 str r8, [r3, r4, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
a000b0b0: e1a00007 mov r0, r7
a000b0b4: e1d521b4 ldrh r2, [r5, #20]
a000b0b8: e5953018 ldr r3, [r5, #24]
a000b0bc: eb001270 bl a000fa84 <_Chain_Initialize>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a000b0c0: e1a04104 lsl r4, r4, #2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a000b0c4: e2858020 add r8, r5, #32
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
a000b0c8: ea000009 b a000b0f4 <_Objects_Extend_information+0x200>
a000b0cc: e5953000 ldr r3, [r5]
the_object->id = _Objects_Build_id(
a000b0d0: e1d520b4 ldrh r2, [r5, #4]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a000b0d4: e1a00008 mov r0, r8
a000b0d8: e1a03c03 lsl r3, r3, #24
a000b0dc: e3833801 orr r3, r3, #65536 ; 0x10000
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a000b0e0: e1833d82 orr r3, r3, r2, lsl #27
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a000b0e4: e1833006 orr r3, r3, r6
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
a000b0e8: e5813008 str r3, [r1, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a000b0ec: ebfffce3 bl a000a480 <_Chain_Append>
index++;
a000b0f0: e2866001 add r6, r6, #1
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
a000b0f4: e1a00007 mov r0, r7
a000b0f8: ebfffcf3 bl a000a4cc <_Chain_Get>
a000b0fc: e2501000 subs r1, r0, #0
a000b100: 1afffff1 bne a000b0cc <_Objects_Extend_information+0x1d8>
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
a000b104: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a000b108: e1d531b4 ldrh r3, [r5, #20]
a000b10c: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
a000b110: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a000b114: e7813004 str r3, [r1, r4]
information->inactive =
a000b118: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size);
}
a000b11c: e28dd014 add sp, sp, #20
a000b120: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
a000b124: e58d3000 str r3, [sp]
a000b128: eb00081e bl a000d1a8 <_Workspace_Allocate>
if ( !new_object_block )
a000b12c: e2508000 subs r8, r0, #0
a000b130: e59d3000 ldr r3, [sp]
a000b134: 1affff9c bne a000afac <_Objects_Extend_information+0xb8>
a000b138: eafffff7 b a000b11c <_Objects_Extend_information+0x228>
/*
* 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,
a000b13c: e1a03103 lsl r3, r3, #2
a000b140: e5951034 ldr r1, [r5, #52] ; 0x34
a000b144: e1a02003 mov r2, r3
a000b148: e88d1008 stm sp, {r3, ip}
a000b14c: eb001e0c bl a0012984 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
a000b150: e89d1008 ldm sp, {r3, ip}
a000b154: e5951030 ldr r1, [r5, #48] ; 0x30
a000b158: e1a0000c mov r0, ip
a000b15c: e1a02003 mov r2, r3
a000b160: eb001e07 bl a0012984 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
a000b164: e1d521b0 ldrh r2, [r5, #16]
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
a000b168: e1a0000b mov r0, fp
a000b16c: e595101c ldr r1, [r5, #28]
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
a000b170: e0872002 add r2, r7, r2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
a000b174: e1a02102 lsl r2, r2, #2
a000b178: eb001e01 bl a0012984 <memcpy>
a000b17c: e89d1008 ldm sp, {r3, ip}
a000b180: eaffffa4 b a000b018 <_Objects_Extend_information+0x124>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
a000b184: e1d0a1b0 ldrh sl, [r0, #16]
a000b188: e1d011b4 ldrh r1, [r0, #20]
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
a000b18c: e1a06007 mov r6, r7
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
a000b190: e3a09001 mov r9, #1
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
a000b194: e1a03004 mov r3, r4
a000b198: eaffff77 b a000af7c <_Objects_Extend_information+0x88>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
a000b19c: e1a01008 mov r1, r8 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
a000b1a0: e1a06007 mov r6, r7 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
a000b1a4: e3a09001 mov r9, #1 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
a000b1a8: e1a04003 mov r4, r3 <== NOT EXECUTED
a000b1ac: eaffff72 b a000af7c <_Objects_Extend_information+0x88> <== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
a000b1b0: e1a00008 mov r0, r8
a000b1b4: eb000801 bl a000d1c0 <_Workspace_Free>
return;
a000b1b8: eaffffd7 b a000b11c <_Objects_Extend_information+0x228>
a000b248 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
a000b248: e1a01801 lsl r1, r1, #16
a000b24c: e92d4030 push {r4, r5, lr}
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
a000b250: e1b04821 lsrs r4, r1, #16
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
a000b254: e1a05000 mov r5, r0
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
a000b258: 1a000001 bne a000b264 <_Objects_Get_information+0x1c>
return NULL;
a000b25c: e1a00004 mov r0, r4
a000b260: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
a000b264: eb001395 bl a00100c0 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
a000b268: e3500000 cmp r0, #0
a000b26c: 1a000000 bne a000b274 <_Objects_Get_information+0x2c>
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
a000b270: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
if ( the_class_api_maximum == 0 )
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
a000b274: e1500004 cmp r0, r4
return NULL;
a000b278: 33a00000 movcc r0, #0
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
if ( the_class_api_maximum == 0 )
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
a000b27c: 3afffffb bcc a000b270 <_Objects_Get_information+0x28>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
a000b280: e59f3024 ldr r3, [pc, #36] ; a000b2ac <_Objects_Get_information+0x64>
a000b284: e7930105 ldr r0, [r3, r5, lsl #2]
a000b288: e3500000 cmp r0, #0
a000b28c: 0afffff7 beq a000b270 <_Objects_Get_information+0x28>
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
a000b290: e7900104 ldr r0, [r0, r4, lsl #2]
if ( !info )
a000b294: e3500000 cmp r0, #0
a000b298: 0afffff4 beq a000b270 <_Objects_Get_information+0x28>
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
a000b29c: e1d031b0 ldrh r3, [r0, #16]
return NULL;
a000b2a0: e3530000 cmp r3, #0
a000b2a4: 03a00000 moveq r0, #0
a000b2a8: e8bd8030 pop {r4, r5, pc}
a000b2b0 <_Objects_Get_isr_disable>:
{
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
a000b2b0: e590c008 ldr ip, [r0, #8]
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
a000b2b4: e52d4004 push {r4} ; (str r4, [sp, #-4]!)
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
a000b2b8: e26cc001 rsb ip, ip, #1
a000b2bc: e08cc001 add ip, ip, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000b2c0: e10f4000 mrs r4, CPSR
a000b2c4: e3841080 orr r1, r4, #128 ; 0x80
a000b2c8: e129f001 msr CPSR_fc, r1
_ISR_Disable( level );
if ( information->maximum >= index ) {
a000b2cc: e1d011b0 ldrh r1, [r0, #16]
a000b2d0: e15c0001 cmp ip, r1
a000b2d4: 8a000008 bhi a000b2fc <_Objects_Get_isr_disable+0x4c>
if ( (the_object = information->local_table[ index ]) != NULL ) {
a000b2d8: e590101c ldr r1, [r0, #28]
a000b2dc: e791010c ldr r0, [r1, ip, lsl #2]
a000b2e0: e3500000 cmp r0, #0
*location = OBJECTS_LOCAL;
a000b2e4: 13a01000 movne r1, #0
a000b2e8: 15821000 strne r1, [r2]
*level_p = level;
a000b2ec: 15834000 strne r4, [r3]
index = id - information->minimum_id + 1;
_ISR_Disable( level );
if ( information->maximum >= index ) {
if ( (the_object = information->local_table[ index ]) != NULL ) {
a000b2f0: 0a000006 beq a000b310 <_Objects_Get_isr_disable+0x60>
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
a000b2f4: e8bd0010 pop {r4}
a000b2f8: e12fff1e bx lr
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000b2fc: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
_ISR_Enable( level );
*location = OBJECTS_ERROR;
return NULL;
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
a000b300: e3a03001 mov r3, #1 <== NOT EXECUTED
a000b304: e5823000 str r3, [r2] <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
a000b308: e3a00000 mov r0, #0 <== NOT EXECUTED
a000b30c: eafffff8 b a000b2f4 <_Objects_Get_isr_disable+0x44> <== NOT EXECUTED
a000b310: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
*location = OBJECTS_LOCAL;
*level_p = level;
return the_object;
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
a000b314: e3a03001 mov r3, #1 <== NOT EXECUTED
a000b318: e5823000 str r3, [r2] <== NOT EXECUTED
return NULL;
a000b31c: eafffff4 b a000b2f4 <_Objects_Get_isr_disable+0x44> <== NOT EXECUTED
a000ce3c <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
a000ce3c: e92d40f0 push {r4, r5, r6, r7, lr}
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
a000ce40: e2515000 subs r5, r1, #0
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
a000ce44: e1a04002 mov r4, r2
a000ce48: e24dd00c sub sp, sp, #12
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
return NULL;
a000ce4c: 01a04005 moveq r4, r5
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
a000ce50: 1a000002 bne a000ce60 <_Objects_Get_name_as_string+0x24>
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
a000ce54: e1a00004 mov r0, r4
a000ce58: e28dd00c add sp, sp, #12
a000ce5c: e8bd80f0 pop {r4, r5, r6, r7, pc}
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
a000ce60: e3540000 cmp r4, #0
a000ce64: 0afffffa beq a000ce54 <_Objects_Get_name_as_string+0x18>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a000ce68: e3500000 cmp r0, #0
a000ce6c: 059f30ec ldreq r3, [pc, #236] ; a000cf60 <_Objects_Get_name_as_string+0x124>
a000ce70: 11a07000 movne r7, r0
a000ce74: 05933004 ldreq r3, [r3, #4]
a000ce78: 05937008 ldreq r7, [r3, #8]
information = _Objects_Get_information_id( tmpId );
a000ce7c: e1a00007 mov r0, r7
a000ce80: ebffffb2 bl a000cd50 <_Objects_Get_information_id>
if ( !information )
a000ce84: e2506000 subs r6, r0, #0
return NULL;
a000ce88: 01a04006 moveq r4, r6
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
information = _Objects_Get_information_id( tmpId );
if ( !information )
a000ce8c: 0afffff0 beq a000ce54 <_Objects_Get_name_as_string+0x18>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
a000ce90: e1a01007 mov r1, r7
a000ce94: e28d2008 add r2, sp, #8
a000ce98: eb000032 bl a000cf68 <_Objects_Get>
switch ( location ) {
a000ce9c: e59d3008 ldr r3, [sp, #8]
a000cea0: e3530000 cmp r3, #0
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
a000cea4: 13a04000 movne r4, #0
information = _Objects_Get_information_id( tmpId );
if ( !information )
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) {
a000cea8: 1affffe9 bne a000ce54 <_Objects_Get_name_as_string+0x18>
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
a000ceac: e5d62038 ldrb r2, [r6, #56] ; 0x38
a000ceb0: e3520000 cmp r2, #0
a000ceb4: 0a00001c beq a000cf2c <_Objects_Get_name_as_string+0xf0>
s = the_object->name.name_p;
a000ceb8: e590c00c ldr ip, [r0, #12]
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
a000cebc: e35c0000 cmp ip, #0
a000cec0: 0a000024 beq a000cf58 <_Objects_Get_name_as_string+0x11c>
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000cec4: e2555001 subs r5, r5, #1
a000cec8: 0a000022 beq a000cf58 <_Objects_Get_name_as_string+0x11c>
a000cecc: e5dc3000 ldrb r3, [ip]
a000ced0: e3530000 cmp r3, #0
a000ced4: 0a00001f beq a000cf58 <_Objects_Get_name_as_string+0x11c>
a000ced8: e59fe084 ldr lr, [pc, #132] ; a000cf64 <_Objects_Get_name_as_string+0x128>
a000cedc: e1a01004 mov r1, r4
a000cee0: e3a02000 mov r2, #0
a000cee4: ea000002 b a000cef4 <_Objects_Get_name_as_string+0xb8>
a000cee8: e5fc3001 ldrb r3, [ip, #1]!
a000ceec: e3530000 cmp r3, #0
a000cef0: 0a000009 beq a000cf1c <_Objects_Get_name_as_string+0xe0>
*d = (isprint((unsigned char)*s)) ? *s : '*';
a000cef4: e59e0000 ldr r0, [lr]
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000cef8: e2822001 add r2, r2, #1
*d = (isprint((unsigned char)*s)) ? *s : '*';
a000cefc: e0800003 add r0, r0, r3
a000cf00: e5d00001 ldrb r0, [r0, #1]
a000cf04: e3100097 tst r0, #151 ; 0x97
a000cf08: 03a0302a moveq r3, #42 ; 0x2a
a000cf0c: e4c13001 strb r3, [r1], #1
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000cf10: e1520005 cmp r2, r5
a000cf14: e1a00001 mov r0, r1
a000cf18: 3afffff2 bcc a000cee8 <_Objects_Get_name_as_string+0xac>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
a000cf1c: e3a03000 mov r3, #0
a000cf20: e5c03000 strb r3, [r0]
_Thread_Enable_dispatch();
a000cf24: eb0002f6 bl a000db04 <_Thread_Enable_dispatch>
return name;
a000cf28: eaffffc9 b a000ce54 <_Objects_Get_name_as_string+0x18>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
a000cf2c: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
a000cf30: e5cd2004 strb r2, [sp, #4] <== NOT EXECUTED
s = lname;
a000cf34: e1a0c00d mov ip, sp <== NOT EXECUTED
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
a000cf38: e1a00c23 lsr r0, r3, #24 <== NOT EXECUTED
lname[ 1 ] = (u32_name >> 16) & 0xff;
a000cf3c: e1a01823 lsr r1, r3, #16 <== NOT EXECUTED
lname[ 2 ] = (u32_name >> 8) & 0xff;
a000cf40: e1a02423 lsr r2, r3, #8 <== NOT EXECUTED
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
a000cf44: e5cd0000 strb r0, [sp] <== NOT EXECUTED
lname[ 1 ] = (u32_name >> 16) & 0xff;
a000cf48: e5cd1001 strb r1, [sp, #1] <== NOT EXECUTED
lname[ 2 ] = (u32_name >> 8) & 0xff;
a000cf4c: e5cd2002 strb r2, [sp, #2] <== NOT EXECUTED
lname[ 3 ] = (u32_name >> 0) & 0xff;
a000cf50: e5cd3003 strb r3, [sp, #3] <== NOT EXECUTED
a000cf54: eaffffda b a000cec4 <_Objects_Get_name_as_string+0x88> <== NOT EXECUTED
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000cf58: e1a00004 mov r0, r4
a000cf5c: eaffffee b a000cf1c <_Objects_Get_name_as_string+0xe0>
a001ccd0 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
a001ccd0: e590c008 ldr ip, [r0, #8]
if ( information->maximum >= index ) {
a001ccd4: e1d031b0 ldrh r3, [r0, #16]
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
a001ccd8: e26cc001 rsb ip, ip, #1
a001ccdc: e08cc001 add ip, ip, r1
if ( information->maximum >= index ) {
a001cce0: e15c0003 cmp ip, r3
a001cce4: 8a000005 bhi a001cd00 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
a001cce8: e590301c ldr r3, [r0, #28]
a001ccec: e793010c ldr r0, [r3, ip, lsl #2]
a001ccf0: e3500000 cmp r0, #0
*location = OBJECTS_LOCAL;
a001ccf4: 13a03000 movne r3, #0
a001ccf8: 15823000 strne r3, [r2]
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
if ( information->maximum >= index ) {
if ( (the_object = information->local_table[ index ]) != NULL ) {
a001ccfc: 112fff1e bxne lr
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
a001cd00: e3a03001 mov r3, #1
a001cd04: e5823000 str r3, [r2]
return NULL;
a001cd08: e3a00000 mov r0, #0
}
a001cd0c: e12fff1e bx lr
a000ca2c <_Objects_Id_to_name>:
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a000ca2c: e3500000 cmp r0, #0
a000ca30: 059f3084 ldreq r3, [pc, #132] ; a000cabc <_Objects_Id_to_name+0x90>
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
a000ca34: e92d4030 push {r4, r5, lr}
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a000ca38: 05933004 ldreq r3, [r3, #4]
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
a000ca3c: e1a05001 mov r5, r1
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a000ca40: 11a01000 movne r1, r0
a000ca44: 05931008 ldreq r1, [r3, #8]
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
a000ca48: e24dd004 sub sp, sp, #4
a000ca4c: e1a03c21 lsr r3, r1, #24
a000ca50: e2033007 and r3, r3, #7
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
a000ca54: e2432001 sub r2, r3, #1
a000ca58: e3520002 cmp r2, #2
a000ca5c: 8a00000a bhi a000ca8c <_Objects_Id_to_name+0x60>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
a000ca60: e59f2058 ldr r2, [pc, #88] ; a000cac0 <_Objects_Id_to_name+0x94>
a000ca64: e7923103 ldr r3, [r2, r3, lsl #2]
a000ca68: e3530000 cmp r3, #0
a000ca6c: 0a000006 beq a000ca8c <_Objects_Id_to_name+0x60>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
a000ca70: e1a02da1 lsr r2, r1, #27
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
a000ca74: e7930102 ldr r0, [r3, r2, lsl #2]
if ( !information )
a000ca78: e3500000 cmp r0, #0
a000ca7c: 0a000002 beq a000ca8c <_Objects_Id_to_name+0x60>
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
a000ca80: e5d04038 ldrb r4, [r0, #56] ; 0x38
a000ca84: e3540000 cmp r4, #0
a000ca88: 0a000002 beq a000ca98 <_Objects_Id_to_name+0x6c>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
a000ca8c: e3a00003 mov r0, #3
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
a000ca90: e28dd004 add sp, sp, #4
a000ca94: e8bd8030 pop {r4, r5, pc}
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
a000ca98: e1a0200d mov r2, sp
a000ca9c: ebffffc2 bl a000c9ac <_Objects_Get>
if ( !the_object )
a000caa0: e3500000 cmp r0, #0
a000caa4: 0afffff8 beq a000ca8c <_Objects_Id_to_name+0x60>
return OBJECTS_INVALID_ID;
*name = the_object->name;
a000caa8: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
a000caac: e5853000 str r3, [r5] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000cab0: eb0002ec bl a000d668 <_Thread_Enable_dispatch> <== NOT EXECUTED
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
a000cab4: e1a00004 mov r0, r4 <== NOT EXECUTED
a000cab8: eafffff4 b a000ca90 <_Objects_Id_to_name+0x64> <== NOT EXECUTED
a000b4b0 <_Objects_Name_to_id_u32>:
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
a000b4b0: e3530000 cmp r3, #0
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
a000b4b4: e92d0030 push {r4, r5}
#endif
/* ASSERT: information->is_string == false */
if ( !id )
return OBJECTS_INVALID_ADDRESS;
a000b4b8: 03a00002 moveq r0, #2
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
a000b4bc: 0a000005 beq a000b4d8 <_Objects_Name_to_id_u32+0x28>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
a000b4c0: e3510000 cmp r1, #0
a000b4c4: 0a000002 beq a000b4d4 <_Objects_Name_to_id_u32+0x24>
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
a000b4c8: e1d051b0 ldrh r5, [r0, #16]
a000b4cc: e3550000 cmp r5, #0
a000b4d0: 1a000002 bne a000b4e0 <_Objects_Name_to_id_u32+0x30>
return OBJECTS_INVALID_NAME;
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
a000b4d4: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
a000b4d8: e8bd0030 pop {r4, r5}
a000b4dc: e12fff1e bx lr
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
a000b4e0: e3720106 cmn r2, #-2147483647 ; 0x80000001
a000b4e4: 13520000 cmpne r2, #0
a000b4e8: 1a00000b bne a000b51c <_Objects_Name_to_id_u32+0x6c>
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
a000b4ec: e590c01c ldr ip, [r0, #28]
a000b4f0: e3a02001 mov r2, #1
the_object = information->local_table[ index ];
a000b4f4: e5bc0004 ldr r0, [ip, #4]!
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
a000b4f8: e2822001 add r2, r2, #1
the_object = information->local_table[ index ];
if ( !the_object )
a000b4fc: e3500000 cmp r0, #0
a000b500: 0a000002 beq a000b510 <_Objects_Name_to_id_u32+0x60>
continue;
if ( name == the_object->name.name_u32 ) {
a000b504: e590400c ldr r4, [r0, #12]
a000b508: e1540001 cmp r4, r1
a000b50c: 0a000005 beq a000b528 <_Objects_Name_to_id_u32+0x78>
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
a000b510: e1550002 cmp r5, r2
a000b514: 2afffff6 bcs a000b4f4 <_Objects_Name_to_id_u32+0x44>
a000b518: eaffffed b a000b4d4 <_Objects_Name_to_id_u32+0x24> <== NOT EXECUTED
search_local_node = false;
if ( information->maximum != 0 &&
(node == OBJECTS_SEARCH_ALL_NODES ||
node == OBJECTS_SEARCH_LOCAL_NODE ||
a000b51c: e3520001 cmp r2, #1
a000b520: 1affffeb bne a000b4d4 <_Objects_Name_to_id_u32+0x24>
a000b524: eafffff0 b a000b4ec <_Objects_Name_to_id_u32+0x3c>
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
a000b528: e5902008 ldr r2, [r0, #8]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
a000b52c: e3a00000 mov r0, #0
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
a000b530: e5832000 str r2, [r3]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
a000b534: eaffffe7 b a000b4d8 <_Objects_Name_to_id_u32+0x28>
a000bbd4 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
a000bbd4: e92d40f0 push {r4, r5, r6, r7, lr}
a000bbd8: e1a05000 mov r5, r0
a000bbdc: e1a06001 mov r6, r1
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a000bbe0: e1a00002 mov r0, r2
a000bbe4: e1d513ba ldrh r1, [r5, #58] ; 0x3a
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
a000bbe8: e1a07002 mov r7, r2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a000bbec: eb002276 bl a00145cc <strnlen>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
a000bbf0: e5d53038 ldrb r3, [r5, #56] ; 0x38
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a000bbf4: e1a04000 mov r4, r0
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
a000bbf8: e3530000 cmp r3, #0
a000bbfc: 1a000017 bne a000bc60 <_Objects_Set_name+0x8c>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
a000bc00: e5d72000 ldrb r2, [r7] <== NOT EXECUTED
a000bc04: e3500001 cmp r0, #1 <== NOT EXECUTED
a000bc08: e1a02c02 lsl r2, r2, #24 <== NOT EXECUTED
a000bc0c: 9a00000c bls a000bc44 <_Objects_Set_name+0x70> <== NOT EXECUTED
a000bc10: e5d73001 ldrb r3, [r7, #1] <== NOT EXECUTED
a000bc14: e3500002 cmp r0, #2 <== NOT EXECUTED
a000bc18: e1822803 orr r2, r2, r3, lsl #16 <== NOT EXECUTED
a000bc1c: 0a000009 beq a000bc48 <_Objects_Set_name+0x74> <== NOT EXECUTED
a000bc20: e5d73002 ldrb r3, [r7, #2] <== NOT EXECUTED
a000bc24: e3500003 cmp r0, #3 <== NOT EXECUTED
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
a000bc28: e3a00001 mov r0, #1 <== NOT EXECUTED
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
a000bc2c: e1822403 orr r2, r2, r3, lsl #8 <== NOT EXECUTED
a000bc30: 15d73003 ldrbne r3, [r7, #3] <== NOT EXECUTED
a000bc34: 03a03020 moveq r3, #32 <== NOT EXECUTED
a000bc38: e1823003 orr r3, r2, r3 <== NOT EXECUTED
a000bc3c: e586300c str r3, [r6, #12] <== NOT EXECUTED
a000bc40: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a000bc44: e3822602 orr r2, r2, #2097152 ; 0x200000 <== NOT EXECUTED
a000bc48: e3822a02 orr r2, r2, #8192 ; 0x2000 <== NOT EXECUTED
a000bc4c: e3a03020 mov r3, #32 <== NOT EXECUTED
a000bc50: e1823003 orr r3, r2, r3 <== NOT EXECUTED
a000bc54: e586300c str r3, [r6, #12] <== NOT EXECUTED
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
a000bc58: e3a00001 mov r0, #1 <== NOT EXECUTED
a000bc5c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
a000bc60: e2800001 add r0, r0, #1
a000bc64: eb00072e bl a000d924 <_Workspace_Allocate>
if ( !d )
a000bc68: e2505000 subs r5, r0, #0
a000bc6c: 0a00000e beq a000bcac <_Objects_Set_name+0xd8>
return false;
if ( the_object->name.name_p ) {
a000bc70: e596000c ldr r0, [r6, #12]
a000bc74: e3500000 cmp r0, #0
a000bc78: 0a000002 beq a000bc88 <_Objects_Set_name+0xb4>
_Workspace_Free( (void *)the_object->name.name_p );
a000bc7c: eb00072e bl a000d93c <_Workspace_Free>
the_object->name.name_p = NULL;
a000bc80: e3a03000 mov r3, #0
a000bc84: e586300c str r3, [r6, #12]
}
strncpy( d, name, length );
a000bc88: e1a00005 mov r0, r5
a000bc8c: e1a01007 mov r1, r7
a000bc90: e1a02004 mov r2, r4
a000bc94: eb002211 bl a00144e0 <strncpy>
d[length] = '\0';
a000bc98: e3a03000 mov r3, #0
a000bc9c: e7c53004 strb r3, [r5, r4]
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
a000bca0: e3a00001 mov r0, #1
the_object->name.name_p = NULL;
}
strncpy( d, name, length );
d[length] = '\0';
the_object->name.name_p = d;
a000bca4: e586500c str r5, [r6, #12]
a000bca8: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
return false;
a000bcac: e1a00005 mov r0, r5
);
}
return true;
}
a000bcb0: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000b538 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
a000b538: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
a000b53c: e1d040b8 ldrh r4, [r0, #8]
block_count = (information->maximum - index_base) /
a000b540: e1d051b4 ldrh r5, [r0, #20]
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
a000b544: e1a06000 mov r6, r0
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
a000b548: e1d001b0 ldrh r0, [r0, #16]
a000b54c: e1a01005 mov r1, r5
a000b550: e0640000 rsb r0, r4, r0
a000b554: eb00287a bl a0015744 <__aeabi_uidiv>
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
a000b558: e3500000 cmp r0, #0
a000b55c: 0a00000d beq a000b598 <_Objects_Shrink_information+0x60>
if ( information->inactive_per_block[ block ] ==
a000b560: e5962030 ldr r2, [r6, #48] ; 0x30
a000b564: e5923000 ldr r3, [r2]
a000b568: e1550003 cmp r5, r3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
a000b56c: 13a03000 movne r3, #0
if ( information->inactive_per_block[ block ] ==
a000b570: 1a000005 bne a000b58c <_Objects_Shrink_information+0x54>
a000b574: ea000008 b a000b59c <_Objects_Shrink_information+0x64> <== NOT EXECUTED
a000b578: e5b21004 ldr r1, [r2, #4]!
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
a000b57c: e0844005 add r4, r4, r5
a000b580: e1a07103 lsl r7, r3, #2
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
a000b584: e1550001 cmp r5, r1
a000b588: 0a000004 beq a000b5a0 <_Objects_Shrink_information+0x68>
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
a000b58c: e2833001 add r3, r3, #1
a000b590: e1500003 cmp r0, r3
a000b594: 8afffff7 bhi a000b578 <_Objects_Shrink_information+0x40>
a000b598: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( information->inactive_per_block[ block ] ==
a000b59c: e3a07000 mov r7, #0 <== NOT EXECUTED
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
a000b5a0: e5960020 ldr r0, [r6, #32]
a000b5a4: ea000002 b a000b5b4 <_Objects_Shrink_information+0x7c>
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
a000b5a8: e3550000 cmp r5, #0
a000b5ac: 0a00000b beq a000b5e0 <_Objects_Shrink_information+0xa8>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
a000b5b0: e1a00005 mov r0, r5
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
a000b5b4: e1d030b8 ldrh r3, [r0, #8]
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
a000b5b8: e5905000 ldr r5, [r0]
if ((index >= index_base) &&
a000b5bc: e1530004 cmp r3, r4
a000b5c0: 3afffff8 bcc a000b5a8 <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
a000b5c4: e1d621b4 ldrh r2, [r6, #20]
a000b5c8: e0842002 add r2, r4, r2
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
a000b5cc: e1530002 cmp r3, r2
a000b5d0: 2afffff4 bcs a000b5a8 <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
a000b5d4: ebfffbb4 bl a000a4ac <_Chain_Extract>
}
}
while ( the_object );
a000b5d8: e3550000 cmp r5, #0
a000b5dc: 1afffff3 bne a000b5b0 <_Objects_Shrink_information+0x78>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
a000b5e0: e5963034 ldr r3, [r6, #52] ; 0x34
a000b5e4: e7930007 ldr r0, [r3, r7]
a000b5e8: eb0006f4 bl a000d1c0 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
a000b5ec: e1d602bc ldrh r0, [r6, #44] ; 0x2c
a000b5f0: e1d631b4 ldrh r3, [r6, #20]
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
a000b5f4: e5961034 ldr r1, [r6, #52] ; 0x34
information->inactive_per_block[ block ] = 0;
a000b5f8: e5962030 ldr r2, [r6, #48] ; 0x30
information->inactive -= information->allocation_size;
a000b5fc: e0633000 rsb r3, r3, r0
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
a000b600: e7815007 str r5, [r1, r7]
information->inactive_per_block[ block ] = 0;
a000b604: e7825007 str r5, [r2, r7]
information->inactive -= information->allocation_size;
a000b608: e1c632bc strh r3, [r6, #44] ; 0x2c
return;
a000b60c: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000c034 <_POSIX_Absolute_timeout_to_ticks>:
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
a000c034: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
/*
* Make sure there is always a value returned.
*/
*ticks_out = 0;
a000c038: e3a03000 mov r3, #0 <== NOT EXECUTED
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
a000c03c: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
/*
* Make sure there is always a value returned.
*/
*ticks_out = 0;
a000c040: e5813000 str r3, [r1] <== NOT EXECUTED
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
a000c044: e1a04001 mov r4, r1 <== NOT EXECUTED
a000c048: e1a06000 mov r6, r0 <== NOT EXECUTED
*ticks_out = 0;
/*
* Is the absolute time even valid?
*/
if ( !_Timespec_Is_valid(abstime) )
a000c04c: eb000fd5 bl a000ffa8 <_Timespec_Is_valid> <== NOT EXECUTED
a000c050: e3500000 cmp r0, #0 <== NOT EXECUTED
a000c054: 1a000001 bne a000c060 <_POSIX_Absolute_timeout_to_ticks+0x2c><== NOT EXECUTED
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
a000c058: e28dd010 add sp, sp, #16 <== NOT EXECUTED
a000c05c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
/*
* Is the absolute time in the past?
*/
_TOD_Get( ¤t_time );
a000c060: e28d7008 add r7, sp, #8 <== NOT EXECUTED
a000c064: e1a00007 mov r0, r7 <== NOT EXECUTED
a000c068: eb000734 bl a000dd40 <_TOD_Get> <== NOT EXECUTED
if ( _Timespec_Less_than( abstime, ¤t_time ) )
a000c06c: e1a00006 mov r0, r6 <== NOT EXECUTED
a000c070: e1a01007 mov r1, r7 <== NOT EXECUTED
a000c074: eb000fdc bl a000ffec <_Timespec_Less_than> <== NOT EXECUTED
a000c078: e3500000 cmp r0, #0 <== NOT EXECUTED
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
a000c07c: 13a00001 movne r0, #1 <== NOT EXECUTED
/*
* Is the absolute time in the past?
*/
_TOD_Get( ¤t_time );
if ( _Timespec_Less_than( abstime, ¤t_time ) )
a000c080: 1afffff4 bne a000c058 <_POSIX_Absolute_timeout_to_ticks+0x24><== NOT EXECUTED
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
/*
* How long until the requested absolute time?
*/
_Timespec_Subtract( ¤t_time, abstime, &difference );
a000c084: e1a00007 mov r0, r7 <== NOT EXECUTED
a000c088: e1a01006 mov r1, r6 <== NOT EXECUTED
a000c08c: e1a0200d mov r2, sp <== NOT EXECUTED
a000c090: eb000fe3 bl a0010024 <_Timespec_Subtract> <== NOT EXECUTED
/*
* Internally the SuperCore uses ticks, so convert to them.
*/
*ticks_out = _Timespec_To_ticks( &difference );
a000c094: e1a0000d mov r0, sp <== NOT EXECUTED
a000c098: eb000ff8 bl a0010080 <_Timespec_To_ticks> <== NOT EXECUTED
/*
* If the difference was 0, then the future is now. It is so bright
* we better wear shades.
*/
if ( !*ticks_out )
return POSIX_ABSOLUTE_TIMEOUT_IS_NOW;
a000c09c: e3500000 cmp r0, #0 <== NOT EXECUTED
_Timespec_Subtract( ¤t_time, abstime, &difference );
/*
* Internally the SuperCore uses ticks, so convert to them.
*/
*ticks_out = _Timespec_To_ticks( &difference );
a000c0a0: e5840000 str r0, [r4] <== NOT EXECUTED
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
/*
* How long until the requested absolute time?
*/
_Timespec_Subtract( ¤t_time, abstime, &difference );
a000c0a4: e1a0500d mov r5, sp <== NOT EXECUTED
/*
* If the difference was 0, then the future is now. It is so bright
* we better wear shades.
*/
if ( !*ticks_out )
return POSIX_ABSOLUTE_TIMEOUT_IS_NOW;
a000c0a8: 13a00003 movne r0, #3 <== NOT EXECUTED
a000c0ac: 03a00002 moveq r0, #2 <== NOT EXECUTED
a000c0b0: eaffffe8 b a000c058 <_POSIX_Absolute_timeout_to_ticks+0x24><== NOT EXECUTED
a0010370 <_POSIX_Barrier_Translate_core_barrier_return_code>:
*/
#if defined(RTEMS_DEBUG)
if ( the_barrier_status > CORE_BARRIER_STATUS_LAST )
return EINVAL;
#endif
return _POSIX_Barrier_Return_codes[the_barrier_status];
a0010370: e59f3004 ldr r3, [pc, #4] ; a001037c <_POSIX_Barrier_Translate_core_barrier_return_code+0xc><== NOT EXECUTED
}
a0010374: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED
a0010378: e12fff1e bx lr <== NOT EXECUTED
a000aa10 <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
a000aa10: e92d4030 push {r4, r5, lr}
int status;
if ( !cond ) {
a000aa14: e2504000 subs r4, r0, #0
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
a000aa18: e1a05001 mov r5, r1
int status;
if ( !cond ) {
a000aa1c: 0a00000f beq a000aa60 <_POSIX_Condition_variables_Get+0x50>
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *cond == PTHREAD_COND_INITIALIZER ) {
a000aa20: e5941000 ldr r1, [r4]
a000aa24: e3710001 cmn r1, #1
a000aa28: 0a000003 beq a000aa3c <_POSIX_Condition_variables_Get+0x2c>
}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)_Objects_Get(
a000aa2c: e59f003c ldr r0, [pc, #60] ; a000aa70 <_POSIX_Condition_variables_Get+0x60>
a000aa30: e1a02005 mov r2, r5
&_POSIX_Condition_variables_Information,
(Objects_Id) *cond,
location
);
}
a000aa34: e8bd4030 pop {r4, r5, lr}
}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)_Objects_Get(
a000aa38: ea000af1 b a000d604 <_Objects_Get>
if ( *cond == PTHREAD_COND_INITIALIZER ) {
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( cond, 0 );
a000aa3c: e3a01000 mov r1, #0
a000aa40: eb00000b bl a000aa74 <pthread_cond_init>
if ( status ) {
a000aa44: e3500000 cmp r0, #0
a000aa48: 05941000 ldreq r1, [r4]
a000aa4c: 0afffff6 beq a000aa2c <_POSIX_Condition_variables_Get+0x1c>
*location = OBJECTS_ERROR;
a000aa50: e3a03001 mov r3, #1
a000aa54: e5853000 str r3, [r5]
return (POSIX_Condition_variables_Control *) 0;
a000aa58: e3a00000 mov r0, #0
a000aa5c: e8bd8030 pop {r4, r5, pc}
)
{
int status;
if ( !cond ) {
*location = OBJECTS_ERROR;
a000aa60: e3a03001 mov r3, #1 <== NOT EXECUTED
a000aa64: e5813000 str r3, [r1] <== NOT EXECUTED
return (POSIX_Condition_variables_Control *) 0;
a000aa68: e1a00004 mov r0, r4 <== NOT EXECUTED
a000aa6c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000abfc <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
a000abfc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a000ac00: e24dd004 sub sp, sp, #4
a000ac04: e1a04001 mov r4, r1
a000ac08: e1a06000 mov r6, r0
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
a000ac0c: e1a00001 mov r0, r1
a000ac10: e1a0100d mov r1, sp
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
a000ac14: e1a08002 mov r8, r2
a000ac18: e20370ff and r7, r3, #255 ; 0xff
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
a000ac1c: eb000059 bl a000ad88 <_POSIX_Mutex_Get>
a000ac20: e3500000 cmp r0, #0
a000ac24: 0a00000a beq a000ac54 <_POSIX_Condition_variables_Wait_support+0x58>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a000ac28: e59f30d4 ldr r3, [pc, #212] ; a000ad04 <_POSIX_Condition_variables_Wait_support+0x108>
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
a000ac2c: e1a00006 mov r0, r6
a000ac30: e1a0100d mov r1, sp
a000ac34: e5932000 ldr r2, [r3]
a000ac38: e2422001 sub r2, r2, #1
a000ac3c: e5832000 str r2, [r3]
a000ac40: ebffff72 bl a000aa10 <_POSIX_Condition_variables_Get>
switch ( location ) {
a000ac44: e59d3000 ldr r3, [sp]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
a000ac48: e1a0a000 mov sl, r0
switch ( location ) {
a000ac4c: e3530000 cmp r3, #0
a000ac50: 0a000003 beq a000ac64 <_POSIX_Condition_variables_Wait_support+0x68>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000ac54: e3a05016 mov r5, #22 <== NOT EXECUTED
}
a000ac58: e1a00005 mov r0, r5 <== NOT EXECUTED
a000ac5c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000ac60: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
a000ac64: e5903014 ldr r3, [r0, #20]
a000ac68: e3530000 cmp r3, #0
a000ac6c: 0a000005 beq a000ac88 <_POSIX_Condition_variables_Wait_support+0x8c>
a000ac70: e5942000 ldr r2, [r4] <== NOT EXECUTED
a000ac74: e1530002 cmp r3, r2 <== NOT EXECUTED
a000ac78: 0a000002 beq a000ac88 <_POSIX_Condition_variables_Wait_support+0x8c><== NOT EXECUTED
_Thread_Enable_dispatch();
a000ac7c: eb000d47 bl a000e1a0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return EINVAL;
a000ac80: e3a05016 mov r5, #22 <== NOT EXECUTED
a000ac84: eafffff3 b a000ac58 <_POSIX_Condition_variables_Wait_support+0x5c><== NOT EXECUTED
}
(void) pthread_mutex_unlock( mutex );
a000ac88: e1a00004 mov r0, r4
a000ac8c: eb0000e6 bl a000b02c <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
a000ac90: e3570000 cmp r7, #0
a000ac94: 0a000006 beq a000acb4 <_POSIX_Condition_variables_Wait_support+0xb8>
status = _Thread_Executing->Wait.return_code;
if ( status == EINTR )
status = 0;
} else {
_Thread_Enable_dispatch();
a000ac98: eb000d40 bl a000e1a0 <_Thread_Enable_dispatch> <== NOT EXECUTED
status = ETIMEDOUT;
a000ac9c: e3a05074 mov r5, #116 ; 0x74 <== NOT EXECUTED
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
a000aca0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000aca4: eb0000bf bl a000afa8 <pthread_mutex_lock> <== NOT EXECUTED
if ( mutex_status )
return EINVAL;
a000aca8: e3500000 cmp r0, #0 <== NOT EXECUTED
a000acac: 13a05016 movne r5, #22 <== NOT EXECUTED
a000acb0: eaffffe8 b a000ac58 <_POSIX_Condition_variables_Wait_support+0x5c><== NOT EXECUTED
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
a000acb4: e59f504c ldr r5, [pc, #76] ; a000ad08 <_POSIX_Condition_variables_Wait_support+0x10c>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
a000acb8: e5942000 ldr r2, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
a000acbc: e28a0018 add r0, sl, #24
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
a000acc0: e5953004 ldr r3, [r5, #4]
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
a000acc4: e58a2014 str r2, [sl, #20]
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;
a000acc8: e3a02001 mov r2, #1
a000accc: e58a2048 str r2, [sl, #72] ; 0x48
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
a000acd0: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
a000acd4: e5962000 ldr r2, [r6]
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
a000acd8: e1a01008 mov r1, r8
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;
a000acdc: e5830044 str r0, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond;
a000ace0: e5832020 str r2, [r3, #32]
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
a000ace4: e59f2020 ldr r2, [pc, #32] ; a000ad0c <_POSIX_Condition_variables_Wait_support+0x110>
a000ace8: eb000e5e bl a000e668 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
a000acec: eb000d2b bl a000e1a0 <_Thread_Enable_dispatch>
* a POSIX signal, then pthread_cond_wait returns spuriously,
* according to the POSIX standard. It means that pthread_cond_wait
* returns a success status, except for the fact that it was not
* woken up a pthread_cond_signal or a pthread_cond_broadcast.
*/
status = _Thread_Executing->Wait.return_code;
a000acf0: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
a000acf4: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
if ( status == EINTR )
status = 0;
a000acf8: e3550004 cmp r5, #4 <== NOT EXECUTED
a000acfc: 03a05000 moveq r5, #0 <== NOT EXECUTED
a000ad00: eaffffe6 b a000aca0 <_POSIX_Condition_variables_Wait_support+0xa4><== NOT EXECUTED
a0011840 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
a0011840: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
a0011844: e5908008 ldr r8, [r0, #8]
a0011848: e59f5084 ldr r5, [pc, #132] ; a00118d4 <_POSIX_Keys_Run_destructors+0x94>
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
if ( value != NULL ) {
key->Values [ thread_api ][ thread_index ] = NULL;
a001184c: e3a0a000 mov sl, #0
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
a0011850: e1a07808 lsl r7, r8, #16
a0011854: e1a08c28 lsr r8, r8, #24
a0011858: e2088007 and r8, r8, #7
a001185c: e1a07727 lsr r7, r7, #14
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
a0011860: e1d541b0 ldrh r4, [r5, #16]
done = true;
for ( index = 1 ; index <= max ; ++index ) {
a0011864: e3540000 cmp r4, #0
a0011868: 1a000000 bne a0011870 <_POSIX_Keys_Run_destructors+0x30>
a001186c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a0011870: e3a06001 mov r6, #1
a0011874: e1a01006 mov r1, r6
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
a0011878: e595301c ldr r3, [r5, #28]
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
a001187c: e2880005 add r0, r8, #5
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
a0011880: e7932106 ldr r2, [r3, r6, lsl #2]
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
a0011884: e3520000 cmp r2, #0
a0011888: 0a000009 beq a00118b4 <_POSIX_Keys_Run_destructors+0x74>
a001188c: e5923010 ldr r3, [r2, #16]
a0011890: e3530000 cmp r3, #0
a0011894: 0a000006 beq a00118b4 <_POSIX_Keys_Run_destructors+0x74>
void *value = key->Values [ thread_api ][ thread_index ];
a0011898: e7922100 ldr r2, [r2, r0, lsl #2] <== NOT EXECUTED
a001189c: e7920007 ldr r0, [r2, r7] <== NOT EXECUTED
if ( value != NULL ) {
a00118a0: e3500000 cmp r0, #0 <== NOT EXECUTED
a00118a4: 0a000002 beq a00118b4 <_POSIX_Keys_Run_destructors+0x74> <== NOT EXECUTED
key->Values [ thread_api ][ thread_index ] = NULL;
a00118a8: e782a007 str sl, [r2, r7] <== NOT EXECUTED
(*key->destructor)( value );
a00118ac: e12fff33 blx r3 <== NOT EXECUTED
done = false;
a00118b0: e1a0100a mov r1, sl <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
a00118b4: e2866001 add r6, r6, #1
a00118b8: e1a06806 lsl r6, r6, #16
a00118bc: e1a06826 lsr r6, r6, #16
a00118c0: e1540006 cmp r4, r6
a00118c4: 2affffeb bcs a0011878 <_POSIX_Keys_Run_destructors+0x38>
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
a00118c8: e3510000 cmp r1, #0
a00118cc: 0affffe3 beq a0011860 <_POSIX_Keys_Run_destructors+0x20>
a00118d0: eaffffe5 b a001186c <_POSIX_Keys_Run_destructors+0x2c>
a001603c <_POSIX_Message_queue_Create_support>:
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
a001603c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0016040: e1a06001 mov r6, r1
a0016044: e24dd004 sub sp, sp, #4
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
a0016048: e3a010ff mov r1, #255 ; 0xff
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
a001604c: e1a04002 mov r4, r2
a0016050: e58d3000 str r3, [sp]
a0016054: e1a0a000 mov sl, r0
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
a0016058: eb0016fa bl a001bc48 <strnlen>
a001605c: e59f314c ldr r3, [pc, #332] ; a00161b0 <_POSIX_Message_queue_Create_support+0x174>
a0016060: e1a0b000 mov fp, r0
a0016064: e5932000 ldr r2, [r3]
a0016068: e2822001 add r2, r2, #1
a001606c: e5832000 str r2, [r3]
* There is no real basis for the default values. They will work
* but were not compared against any existing implementation for
* compatibility. See README.mqueue for an example program we
* think will print out the defaults. Report anything you find with it.
*/
if ( attr_ptr == NULL ) {
a0016070: e3540000 cmp r4, #0
a0016074: 0a00002a beq a0016124 <_POSIX_Message_queue_Create_support+0xe8>
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
a0016078: e5947004 ldr r7, [r4, #4]
a001607c: e3570000 cmp r7, #0
a0016080: da000035 ble a001615c <_POSIX_Message_queue_Create_support+0x120>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
a0016084: e5948008 ldr r8, [r4, #8]
a0016088: e3580000 cmp r8, #0
a001608c: da000032 ble a001615c <_POSIX_Message_queue_Create_support+0x120>
RTEMS_INLINE_ROUTINE
POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
{
return (POSIX_Message_queue_Control *)
_Objects_Allocate( &_POSIX_Message_queue_Information );
a0016090: e59f511c ldr r5, [pc, #284] ; a00161b4 <_POSIX_Message_queue_Create_support+0x178>
a0016094: e1a00005 mov r0, r5
a0016098: ebffefc6 bl a0011fb8 <_Objects_Allocate>
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
a001609c: e2504000 subs r4, r0, #0
a00160a0: 0a00003c beq a0016198 <_POSIX_Message_queue_Create_support+0x15c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
the_mq->named = true;
a00160a4: e3a03001 mov r3, #1
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n+1);
a00160a8: e08bb003 add fp, fp, r3
if ( !the_mq ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
a00160ac: e5846010 str r6, [r4, #16]
the_mq->named = true;
a00160b0: e5c43014 strb r3, [r4, #20]
the_mq->open_count = 1;
a00160b4: e5843018 str r3, [r4, #24]
the_mq->linked = true;
a00160b8: e5c43015 strb r3, [r4, #21]
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n+1);
a00160bc: e1a0000b mov r0, fp
a00160c0: ebfff8d7 bl a0014424 <_Workspace_Allocate>
if (!name) {
a00160c4: e2509000 subs r9, r0, #0
a00160c8: 0a000029 beq a0016174 <_POSIX_Message_queue_Create_support+0x138>
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
strncpy( name, name_arg, n+1 );
a00160cc: e1a0100a mov r1, sl
a00160d0: e1a0200b mov r2, fp
*
* Joel: Cite POSIX or OpenGroup on above statement so we can determine
* if it is a real requirement.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
a00160d4: e3a06000 mov r6, #0
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
strncpy( name, name_arg, n+1 );
a00160d8: eb00169f bl a001bb5c <strncpy>
*
* Joel: Cite POSIX or OpenGroup on above statement so we can determine
* if it is a real requirement.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
a00160dc: e584605c str r6, [r4, #92] ; 0x5c
if ( !_CORE_message_queue_Initialize(
a00160e0: e284001c add r0, r4, #28
a00160e4: e284105c add r1, r4, #92 ; 0x5c
a00160e8: e1a02007 mov r2, r7
a00160ec: e1a03008 mov r3, r8
a00160f0: eb00042d bl a00171ac <_CORE_message_queue_Initialize>
a00160f4: e1500006 cmp r0, r6
a00160f8: 0a00000c beq a0016130 <_POSIX_Message_queue_Create_support+0xf4>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a00160fc: e595301c ldr r3, [r5, #28]
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
a0016100: e1d420b8 ldrh r2, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0016104: e7834102 str r4, [r3, r2, lsl #2]
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
a0016108: e59d3000 ldr r3, [sp]
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
a001610c: e584900c str r9, [r4, #12]
a0016110: e5834000 str r4, [r3]
_Thread_Enable_dispatch();
a0016114: ebfff3e6 bl a00130b4 <_Thread_Enable_dispatch>
return 0;
a0016118: e1a00006 mov r0, r6
}
a001611c: e28dd004 add sp, sp, #4
a0016120: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* 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 ) {
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
a0016124: e3a08010 mov r8, #16 <== NOT EXECUTED
* 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 ) {
attr.mq_maxmsg = 10;
a0016128: e3a0700a mov r7, #10 <== NOT EXECUTED
a001612c: eaffffd7 b a0016090 <_POSIX_Message_queue_Create_support+0x54><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
a0016130: e1a01004 mov r1, r4 <== NOT EXECUTED
a0016134: e1a00005 mov r0, r5 <== NOT EXECUTED
a0016138: ebfff07a bl a0012328 <_Objects_Free> <== NOT EXECUTED
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
a001613c: e1a00009 mov r0, r9 <== NOT EXECUTED
a0016140: ebfff8bd bl a001443c <_Workspace_Free> <== NOT EXECUTED
_Thread_Enable_dispatch();
a0016144: ebfff3da bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
a0016148: eb000ea9 bl a0019bf4 <__errno> <== NOT EXECUTED
a001614c: e3a0301c mov r3, #28 <== NOT EXECUTED
a0016150: e5803000 str r3, [r0] <== NOT EXECUTED
a0016154: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0016158: eaffffef b a001611c <_POSIX_Message_queue_Create_support+0xe0><== NOT EXECUTED
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
_Thread_Enable_dispatch();
a001615c: ebfff3d4 bl a00130b4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
a0016160: eb000ea3 bl a0019bf4 <__errno>
a0016164: e3a03016 mov r3, #22
a0016168: e5803000 str r3, [r0]
a001616c: e3e00000 mvn r0, #0
a0016170: eaffffe9 b a001611c <_POSIX_Message_queue_Create_support+0xe0>
a0016174: e1a00005 mov r0, r5
a0016178: e1a01004 mov r1, r4
a001617c: ebfff069 bl a0012328 <_Objects_Free>
* dynamically constructed.
*/
name = _Workspace_Allocate(n+1);
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
a0016180: ebfff3cb bl a00130b4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOMEM );
a0016184: eb000e9a bl a0019bf4 <__errno>
a0016188: e3a0300c mov r3, #12
a001618c: e5803000 str r3, [r0]
a0016190: e3e00000 mvn r0, #0
a0016194: eaffffe0 b a001611c <_POSIX_Message_queue_Create_support+0xe0>
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
a0016198: ebfff3c5 bl a00130b4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
a001619c: eb000e94 bl a0019bf4 <__errno>
a00161a0: e3a03017 mov r3, #23
a00161a4: e5803000 str r3, [r0]
a00161a8: e3e00000 mvn r0, #0
a00161ac: eaffffda b a001611c <_POSIX_Message_queue_Create_support+0xe0>
a00161b8 <_POSIX_Message_queue_Name_to_id>:
*/
int _POSIX_Message_queue_Name_to_id(
const char *name,
Objects_Id *id
)
{
a00161b8: e92d4030 push {r4, r5, lr}
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
a00161bc: e2505000 subs r5, r0, #0
*/
int _POSIX_Message_queue_Name_to_id(
const char *name,
Objects_Id *id
)
{
a00161c0: e24dd004 sub sp, sp, #4
a00161c4: e1a04001 mov r4, r1
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
a00161c8: 0a000002 beq a00161d8 <_POSIX_Message_queue_Name_to_id+0x20>
return EINVAL;
if ( !name[0] )
a00161cc: e5d53000 ldrb r3, [r5]
a00161d0: e3530000 cmp r3, #0
a00161d4: 1a000002 bne a00161e4 <_POSIX_Message_queue_Name_to_id+0x2c>
return EINVAL;
a00161d8: e3a00016 mov r0, #22 <== NOT EXECUTED
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
a00161dc: e28dd004 add sp, sp, #4
a00161e0: e8bd8030 pop {r4, r5, pc}
return EINVAL;
if ( !name[0] )
return EINVAL;
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
a00161e4: e3a010ff mov r1, #255 ; 0xff
a00161e8: eb001696 bl a001bc48 <strnlen>
a00161ec: e35000fe cmp r0, #254 ; 0xfe
return ENAMETOOLONG;
a00161f0: 83a0005b movhi r0, #91 ; 0x5b
return EINVAL;
if ( !name[0] )
return EINVAL;
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
a00161f4: 8afffff8 bhi a00161dc <_POSIX_Message_queue_Name_to_id+0x24>
return ENAMETOOLONG;
status = _Objects_Name_to_id_string(
a00161f8: e59f0020 ldr r0, [pc, #32] ; a0016220 <_POSIX_Message_queue_Name_to_id+0x68>
a00161fc: e1a01005 mov r1, r5
a0016200: e1a0200d mov r2, sp
a0016204: eb0005db bl a0017978 <_Objects_Name_to_id_string>
&_POSIX_Message_queue_Information,
name,
&the_id
);
*id = the_id;
a0016208: e59d3000 ldr r3, [sp]
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
a001620c: e3500000 cmp r0, #0
a0016210: 13a00002 movne r0, #2
a0016214: 03a00000 moveq r0, #0
status = _Objects_Name_to_id_string(
&_POSIX_Message_queue_Information,
name,
&the_id
);
*id = the_id;
a0016218: e5843000 str r3, [r4]
a001621c: eaffffee b a00161dc <_POSIX_Message_queue_Name_to_id+0x24>
a000f040 <_POSIX_Message_queue_Notify_handler>:
*/
void _POSIX_Message_queue_Notify_handler(
void *user_data
)
{
a000f040: e92d4010 push {r4, lr} <== NOT EXECUTED
a000f044: e1a04000 mov r4, r0 <== NOT EXECUTED
POSIX_Message_queue_Control *the_mq;
the_mq = user_data;
kill( getpid(), the_mq->notification.sigev_signo );
a000f048: eb001a13 bl a001589c <getpid> <== NOT EXECUTED
a000f04c: e5941094 ldr r1, [r4, #148] ; 0x94 <== NOT EXECUTED
a000f050: eb001bf7 bl a0016034 <kill> <== NOT EXECUTED
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
a000f054: e3a03000 mov r3, #0 <== NOT EXECUTED
a000f058: e584307c str r3, [r4, #124] ; 0x7c <== NOT EXECUTED
the_message_queue->notify_argument = the_argument;
a000f05c: e5843080 str r3, [r4, #128] ; 0x80 <== NOT EXECUTED
_CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
}
a000f060: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000f2dc <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
a000f2dc: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
a000f2e0: e1a04000 mov r4, r0 <== NOT EXECUTED
a000f2e4: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
a000f2e8: e1a07001 mov r7, r1 <== NOT EXECUTED
a000f2ec: e1a05002 mov r5, r2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
a000f2f0: e59f0110 ldr r0, [pc, #272] ; a000f408 <_POSIX_Message_queue_Receive_support+0x12c><== NOT EXECUTED
a000f2f4: e1a01004 mov r1, r4 <== NOT EXECUTED
a000f2f8: e28d200c add r2, sp, #12 <== NOT EXECUTED
a000f2fc: e1a06003 mov r6, r3 <== NOT EXECUTED
a000f300: e5dd8028 ldrb r8, [sp, #40] ; 0x28 <== NOT EXECUTED
a000f304: eb000c60 bl a001248c <_Objects_Get> <== NOT EXECUTED
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
a000f308: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
a000f30c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000f310: 0a000006 beq a000f330 <_POSIX_Message_queue_Receive_support+0x54><== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
a000f314: eb002a36 bl a0019bf4 <__errno> <== NOT EXECUTED
a000f318: e3a03009 mov r3, #9 <== NOT EXECUTED
a000f31c: e5803000 str r3, [r0] <== NOT EXECUTED
a000f320: e3e03000 mvn r3, #0 <== NOT EXECUTED
}
a000f324: e1a00003 mov r0, r3 <== NOT EXECUTED
a000f328: e28dd010 add sp, sp, #16 <== NOT EXECUTED
a000f32c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
a000f330: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
a000f334: e2032003 and r2, r3, #3 <== NOT EXECUTED
a000f338: e3520001 cmp r2, #1 <== NOT EXECUTED
a000f33c: 0a00002b beq a000f3f0 <_POSIX_Message_queue_Receive_support+0x114><== NOT EXECUTED
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
a000f340: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
a000f344: e5902068 ldr r2, [r0, #104] ; 0x68 <== NOT EXECUTED
a000f348: e1520005 cmp r2, r5 <== NOT EXECUTED
a000f34c: 8a000021 bhi a000f3d8 <_POSIX_Message_queue_Receive_support+0xfc><== NOT EXECUTED
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
a000f350: e3e02000 mvn r2, #0 <== NOT EXECUTED
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
a000f354: e3580000 cmp r8, #0 <== NOT EXECUTED
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
a000f358: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
a000f35c: 0a000002 beq a000f36c <_POSIX_Message_queue_Receive_support+0x90><== NOT EXECUTED
a000f360: e3130901 tst r3, #16384 ; 0x4000 <== NOT EXECUTED
a000f364: 13a08000 movne r8, #0 <== NOT EXECUTED
a000f368: 03a08001 moveq r8, #1 <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
a000f36c: e59d202c ldr r2, [sp, #44] ; 0x2c <== NOT EXECUTED
a000f370: e1a01004 mov r1, r4 <== NOT EXECUTED
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
a000f374: e59f4090 ldr r4, [pc, #144] ; a000f40c <_POSIX_Message_queue_Receive_support+0x130><== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
a000f378: e28d3008 add r3, sp, #8 <== NOT EXECUTED
a000f37c: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
a000f380: e280001c add r0, r0, #28 <== NOT EXECUTED
a000f384: e1a02007 mov r2, r7 <== NOT EXECUTED
a000f388: e58d8000 str r8, [sp] <== NOT EXECUTED
a000f38c: eb000816 bl a00113ec <_CORE_message_queue_Seize> <== NOT EXECUTED
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
a000f390: eb000f47 bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
a000f394: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
if ( !_Thread_Executing->Wait.return_code )
a000f398: e5932034 ldr r2, [r3, #52] ; 0x34 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return ((priority >= 0) ? priority : -priority);
a000f39c: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
a000f3a0: e0213fc1 eor r3, r1, r1, asr #31 <== NOT EXECUTED
a000f3a4: e0433fc1 sub r3, r3, r1, asr #31 <== NOT EXECUTED
a000f3a8: e3520000 cmp r2, #0 <== NOT EXECUTED
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
a000f3ac: e5863000 str r3, [r6] <== NOT EXECUTED
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
return length_out;
a000f3b0: 059d3008 ldreq r3, [sp, #8] <== NOT EXECUTED
_Thread_Enable_dispatch();
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
a000f3b4: 0affffda beq a000f324 <_POSIX_Message_queue_Receive_support+0x48><== NOT EXECUTED
return length_out;
rtems_set_errno_and_return_minus_one(
a000f3b8: eb002a0d bl a0019bf4 <__errno> <== NOT EXECUTED
a000f3bc: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
a000f3c0: e1a05000 mov r5, r0 <== NOT EXECUTED
a000f3c4: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
a000f3c8: eb0000b4 bl a000f6a0 <_POSIX_Message_queue_Translate_core_message_queue_return_code><== NOT EXECUTED
a000f3cc: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000f3d0: e5850000 str r0, [r5] <== NOT EXECUTED
a000f3d4: eaffffd2 b a000f324 <_POSIX_Message_queue_Receive_support+0x48><== NOT EXECUTED
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
a000f3d8: eb000f35 bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EMSGSIZE );
a000f3dc: eb002a04 bl a0019bf4 <__errno> <== NOT EXECUTED
a000f3e0: e3a0307a mov r3, #122 ; 0x7a <== NOT EXECUTED
a000f3e4: e5803000 str r3, [r0] <== NOT EXECUTED
a000f3e8: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000f3ec: eaffffcc b a000f324 <_POSIX_Message_queue_Receive_support+0x48><== NOT EXECUTED
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
a000f3f0: eb000f2f bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
a000f3f4: eb0029fe bl a0019bf4 <__errno> <== NOT EXECUTED
a000f3f8: e3a03009 mov r3, #9 <== NOT EXECUTED
a000f3fc: e5803000 str r3, [r0] <== NOT EXECUTED
a000f400: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000f404: eaffffc6 b a000f324 <_POSIX_Message_queue_Receive_support+0x48><== NOT EXECUTED
a000f434 <_POSIX_Message_queue_Send_support>:
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
a000f434: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
a000f438: e3530020 cmp r3, #32
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
a000f43c: e24dd014 sub sp, sp, #20
a000f440: e1a04003 mov r4, r3
a000f444: e1a05000 mov r5, r0
a000f448: e1a08001 mov r8, r1
a000f44c: e1a07002 mov r7, r2
a000f450: e5dd602c ldrb r6, [sp, #44] ; 0x2c
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
a000f454: 8a00002b bhi a000f508 <_POSIX_Message_queue_Send_support+0xd4>
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
a000f458: e59f00f0 ldr r0, [pc, #240] ; a000f550 <_POSIX_Message_queue_Send_support+0x11c>
a000f45c: e1a01005 mov r1, r5
a000f460: e28d2010 add r2, sp, #16
a000f464: eb000c08 bl a001248c <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
a000f468: e59d3010 ldr r3, [sp, #16]
a000f46c: e3530000 cmp r3, #0
a000f470: 1a00001f bne a000f4f4 <_POSIX_Message_queue_Send_support+0xc0>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
a000f474: e5903014 ldr r3, [r0, #20]
a000f478: e3130003 tst r3, #3
a000f47c: 0a000026 beq a000f51c <_POSIX_Message_queue_Send_support+0xe8>
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
a000f480: e3560000 cmp r6, #0
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
a000f484: e5900010 ldr r0, [r0, #16]
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
a000f488: 1a000015 bne a000f4e4 <_POSIX_Message_queue_Send_support+0xb0>
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
a000f48c: e3a03000 mov r3, #0
a000f490: e58d3000 str r3, [sp]
a000f494: e59d3030 ldr r3, [sp, #48] ; 0x30
RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core(
unsigned int priority
)
{
return priority * -1;
a000f498: e2644000 rsb r4, r4, #0
a000f49c: e1a01008 mov r1, r8
a000f4a0: e58d300c str r3, [sp, #12]
a000f4a4: e1a02007 mov r2, r7
a000f4a8: e1a03005 mov r3, r5
a000f4ac: e280001c add r0, r0, #28
a000f4b0: e98d0050 stmib sp, {r4, r6}
a000f4b4: eb000816 bl a0011514 <_CORE_message_queue_Submit>
a000f4b8: e1a04000 mov r4, r0
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
a000f4bc: eb000efc bl a00130b4 <_Thread_Enable_dispatch>
* after it wakes up. The returned status is correct for
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
a000f4c0: e3540007 cmp r4, #7
msg_status = _Thread_Executing->Wait.return_code;
a000f4c4: 059f3088 ldreq r3, [pc, #136] ; a000f554 <_POSIX_Message_queue_Send_support+0x120>
a000f4c8: 05933004 ldreq r3, [r3, #4]
a000f4cc: 05934034 ldreq r4, [r3, #52] ; 0x34
if ( !msg_status )
a000f4d0: e3540000 cmp r4, #0
a000f4d4: 1a000016 bne a000f534 <_POSIX_Message_queue_Send_support+0x100>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
a000f4d8: e1a00004 mov r0, r4
a000f4dc: e28dd014 add sp, sp, #20
a000f4e0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
a000f4e4: e3130901 tst r3, #16384 ; 0x4000
a000f4e8: 13a06000 movne r6, #0
a000f4ec: 03a06001 moveq r6, #1
a000f4f0: eaffffe5 b a000f48c <_POSIX_Message_queue_Send_support+0x58>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
a000f4f4: eb0029be bl a0019bf4 <__errno> <== NOT EXECUTED
a000f4f8: e3a03009 mov r3, #9 <== NOT EXECUTED
a000f4fc: e5803000 str r3, [r0] <== NOT EXECUTED
a000f500: e3e04000 mvn r4, #0 <== NOT EXECUTED
a000f504: eafffff3 b a000f4d8 <_POSIX_Message_queue_Send_support+0xa4><== NOT EXECUTED
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
a000f508: eb0029b9 bl a0019bf4 <__errno> <== NOT EXECUTED
a000f50c: e3a03016 mov r3, #22 <== NOT EXECUTED
a000f510: e5803000 str r3, [r0] <== NOT EXECUTED
a000f514: e3e04000 mvn r4, #0 <== NOT EXECUTED
a000f518: eaffffee b a000f4d8 <_POSIX_Message_queue_Send_support+0xa4><== NOT EXECUTED
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
a000f51c: eb000ee4 bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
a000f520: eb0029b3 bl a0019bf4 <__errno> <== NOT EXECUTED
a000f524: e3a03009 mov r3, #9 <== NOT EXECUTED
a000f528: e5803000 str r3, [r0] <== NOT EXECUTED
a000f52c: e3e04000 mvn r4, #0 <== NOT EXECUTED
a000f530: eaffffe8 b a000f4d8 <_POSIX_Message_queue_Send_support+0xa4><== NOT EXECUTED
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
a000f534: eb0029ae bl a0019bf4 <__errno> <== NOT EXECUTED
a000f538: e1a05000 mov r5, r0 <== NOT EXECUTED
a000f53c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000f540: eb000056 bl a000f6a0 <_POSIX_Message_queue_Translate_core_message_queue_return_code><== NOT EXECUTED
a000f544: e3e04000 mvn r4, #0 <== NOT EXECUTED
a000f548: e5850000 str r0, [r5] <== NOT EXECUTED
a000f54c: eaffffe1 b a000f4d8 <_POSIX_Message_queue_Send_support+0xa4><== NOT EXECUTED
a000f6a0 <_POSIX_Message_queue_Translate_core_message_queue_return_code>:
*/
#if defined(RTEMS_DEBUG)
if ( the_message_queue_status > CORE_MESSAGE_QUEUE_STATUS_LAST )
return EINVAL;
#endif
return _POSIX_Message_queue_Return_codes[the_message_queue_status];
a000f6a0: e59f3004 ldr r3, [pc, #4] ; a000f6ac <_POSIX_Message_queue_Translate_core_message_queue_return_code+0xc><== NOT EXECUTED
}
a000f6a4: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED
a000f6a8: e12fff1e bx lr <== NOT EXECUTED
a000bbd8 <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
a000bbd8: e92d4030 push {r4, r5, lr}
___POSIX_Mutex_Get_support_error_check( mutex, location );
a000bbdc: e2504000 subs r4, r0, #0
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
a000bbe0: e1a05001 mov r5, r1
___POSIX_Mutex_Get_support_error_check( mutex, location );
a000bbe4: 0a00000f beq a000bc28 <_POSIX_Mutex_Get+0x50>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
a000bbe8: e5941000 ldr r1, [r4]
a000bbec: e3710001 cmn r1, #1
a000bbf0: 0a000003 beq a000bc04 <_POSIX_Mutex_Get+0x2c>
return (POSIX_Mutex_Control *)
_Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location );
a000bbf4: e59f003c ldr r0, [pc, #60] ; a000bc38 <_POSIX_Mutex_Get+0x60>
a000bbf8: e1a02005 mov r2, r5
}
a000bbfc: e8bd4030 pop {r4, r5, lr}
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
return (POSIX_Mutex_Control *)
_Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location );
a000bc00: ea000b07 b a000e824 <_Objects_Get>
Objects_Locations *location
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
a000bc04: e3a01000 mov r1, #0
a000bc08: eb00003b bl a000bcfc <pthread_mutex_init>
a000bc0c: e3500000 cmp r0, #0
a000bc10: 05941000 ldreq r1, [r4]
a000bc14: 0afffff6 beq a000bbf4 <_POSIX_Mutex_Get+0x1c>
a000bc18: e3a03001 mov r3, #1
a000bc1c: e5853000 str r3, [r5]
a000bc20: e3a00000 mov r0, #0
a000bc24: e8bd8030 pop {r4, r5, pc}
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
a000bc28: e3a03001 mov r3, #1 <== NOT EXECUTED
a000bc2c: e5813000 str r3, [r1] <== NOT EXECUTED
a000bc30: e1a00004 mov r0, r4 <== NOT EXECUTED
a000bc34: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000bc3c <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
a000bc3c: e92d4070 push {r4, r5, r6, lr}
___POSIX_Mutex_Get_support_error_check( mutex, location );
a000bc40: e2504000 subs r4, r0, #0
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
a000bc44: e1a05001 mov r5, r1
a000bc48: e1a06002 mov r6, r2
___POSIX_Mutex_Get_support_error_check( mutex, location );
a000bc4c: 0a000010 beq a000bc94 <_POSIX_Mutex_Get_interrupt_disable+0x58>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
a000bc50: e5941000 ldr r1, [r4]
a000bc54: e3710001 cmn r1, #1
a000bc58: 0a000004 beq a000bc70 <_POSIX_Mutex_Get_interrupt_disable+0x34>
return (POSIX_Mutex_Control *) _Objects_Get_isr_disable(
a000bc5c: e59f0040 ldr r0, [pc, #64] ; a000bca4 <_POSIX_Mutex_Get_interrupt_disable+0x68>
a000bc60: e1a02005 mov r2, r5
a000bc64: e1a03006 mov r3, r6
&_POSIX_Mutex_Information,
(Objects_Id) *mutex,
location,
level
);
}
a000bc68: e8bd4070 pop {r4, r5, r6, lr}
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
return (POSIX_Mutex_Control *) _Objects_Get_isr_disable(
a000bc6c: ea000ad0 b a000e7b4 <_Objects_Get_isr_disable>
ISR_Level *level
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
a000bc70: e3a01000 mov r1, #0
a000bc74: eb000020 bl a000bcfc <pthread_mutex_init>
a000bc78: e3500000 cmp r0, #0
a000bc7c: 05941000 ldreq r1, [r4]
a000bc80: 0afffff5 beq a000bc5c <_POSIX_Mutex_Get_interrupt_disable+0x20>
a000bc84: e3a03001 mov r3, #1
a000bc88: e5853000 str r3, [r5]
a000bc8c: e3a00000 mov r0, #0
a000bc90: e8bd8070 pop {r4, r5, r6, pc}
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
a000bc94: e3a03001 mov r3, #1 <== NOT EXECUTED
a000bc98: e5813000 str r3, [r1] <== NOT EXECUTED
a000bc9c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000bca0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a0010534 <_POSIX_Priority_Is_valid>:
bool _POSIX_Priority_Is_valid(
int priority
)
{
return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) &&
a0010534: e3500000 cmp r0, #0
a0010538: da000005 ble a0010554 <_POSIX_Priority_Is_valid+0x20>
(priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY));
a001053c: e59f3018 ldr r3, [pc, #24] ; a001055c <_POSIX_Priority_Is_valid+0x28>
a0010540: e5d33000 ldrb r3, [r3]
#endif
#include <rtems/system.h>
#include <rtems/posix/priority.h>
bool _POSIX_Priority_Is_valid(
a0010544: e1500003 cmp r0, r3
a0010548: a3a00000 movge r0, #0
a001054c: b3a00001 movlt r0, #1
a0010550: e12fff1e bx lr
int priority
)
{
return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) &&
a0010554: e3a00000 mov r0, #0 <== NOT EXECUTED
(priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY));
}
a0010558: e12fff1e bx lr <== NOT EXECUTED
a000b18c <_POSIX_RWLock_Translate_core_RWLock_return_code>:
*/
#if defined(RTEMS_DEBUG)
if ( the_rwlock_status > CORE_RWLOCK_STATUS_LAST )
return EINVAL;
#endif
return _POSIX_RWLock_Return_codes[the_rwlock_status];
a000b18c: e59f3004 ldr r3, [pc, #4] ; a000b198 <_POSIX_RWLock_Translate_core_RWLock_return_code+0xc><== NOT EXECUTED
}
a000b190: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED
a000b194: e12fff1e bx lr <== NOT EXECUTED
a001306c <_POSIX_Semaphore_Create_support>:
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name_p = (char *)name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
a001306c: e3510000 cmp r1, #0
const char *name,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
a0013070: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a0013074: e1a04000 mov r4, r0
a0013078: e1a08002 mov r8, r2
a001307c: e1a07003 mov r7, r3
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name_p = (char *)name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
a0013080: 1a000028 bne a0013128 <_POSIX_Semaphore_Create_support+0xbc>
rtems_set_errno_and_return_minus_one( ENOSYS );
if ( name ) {
a0013084: e3500000 cmp r0, #0
a0013088: 0a000003 beq a001309c <_POSIX_Semaphore_Create_support+0x30>
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
a001308c: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
a0013090: eb0012c9 bl a0017bbc <strnlen> <== NOT EXECUTED
a0013094: e35000fe cmp r0, #254 ; 0xfe <== NOT EXECUTED
a0013098: 8a000027 bhi a001313c <_POSIX_Semaphore_Create_support+0xd0><== NOT EXECUTED
a001309c: e59f30c4 ldr r3, [pc, #196] ; a0013168 <_POSIX_Semaphore_Create_support+0xfc>
a00130a0: e5932000 ldr r2, [r3]
a00130a4: e2822001 add r2, r2, #1
a00130a8: e5832000 str r2, [r3]
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
_Objects_Allocate( &_POSIX_Semaphore_Information );
a00130ac: e59f00b8 ldr r0, [pc, #184] ; a001316c <_POSIX_Semaphore_Create_support+0x100>
a00130b0: ebffed6a bl a000e660 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
a00130b4: e2505000 subs r5, r0, #0
a00130b8: 0a000024 beq a0013150 <_POSIX_Semaphore_Create_support+0xe4>
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
if ( name ) {
a00130bc: e3540000 cmp r4, #0
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
a00130c0: e3a03000 mov r3, #0
a00130c4: e5853010 str r3, [r5, #16]
if ( name ) {
the_semaphore->named = true;
a00130c8: 13a03001 movne r3, #1
a00130cc: 15c53014 strbne r3, [r5, #20]
the_semaphore->open_count = 1;
a00130d0: 15853018 strne r3, [r5, #24]
the_semaphore->linked = true;
a00130d4: 15c53015 strbne r3, [r5, #21]
* blocking tasks on this semaphore should be. It could somehow
* be derived from the current scheduling policy. One
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
a00130d8: e3a06000 mov r6, #0
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
a00130dc: e3e03000 mvn r3, #0
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
a00130e0: e285001c add r0, r5, #28
if ( name ) {
the_semaphore->named = true;
the_semaphore->open_count = 1;
the_semaphore->linked = true;
} else {
the_semaphore->named = false;
a00130e4: 05c54014 strbeq r4, [r5, #20]
the_semaphore->open_count = 0;
a00130e8: 05854018 streq r4, [r5, #24]
the_semaphore->linked = false;
a00130ec: 05c54015 strbeq r4, [r5, #21]
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
a00130f0: e585305c str r3, [r5, #92] ; 0x5c
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
a00130f4: e285105c add r1, r5, #92 ; 0x5c
a00130f8: e1a02008 mov r2, r8
* blocking tasks on this semaphore should be. It could somehow
* be derived from the current scheduling policy. One
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
a00130fc: e5856060 str r6, [r5, #96] ; 0x60
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
a0013100: ebffebd3 bl a000e054 <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0013104: e59f3060 ldr r3, [pc, #96] ; a001316c <_POSIX_Semaphore_Create_support+0x100>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
a0013108: e1d520b8 ldrh r2, [r5, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a001310c: e593301c ldr r3, [r3, #28]
a0013110: e7835102 str r5, [r3, r2, lsl #2]
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
a0013114: e585400c str r4, [r5, #12]
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name_p
);
*the_sem = the_semaphore;
a0013118: e5875000 str r5, [r7]
_Thread_Enable_dispatch();
a001311c: ebfff18e bl a000f75c <_Thread_Enable_dispatch>
return 0;
a0013120: e1a00006 mov r0, r6
}
a0013124: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
CORE_semaphore_Attributes *the_sem_attr;
char *name_p = (char *)name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
rtems_set_errno_and_return_minus_one( ENOSYS );
a0013128: eb000c68 bl a00162d0 <__errno>
a001312c: e3a03058 mov r3, #88 ; 0x58
a0013130: e5803000 str r3, [r0]
a0013134: e3e00000 mvn r0, #0
a0013138: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
if ( name ) {
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
a001313c: eb000c63 bl a00162d0 <__errno>
a0013140: e3a0305b mov r3, #91 ; 0x5b
a0013144: e5803000 str r3, [r0]
a0013148: e3e00000 mvn r0, #0
a001314c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
a0013150: ebfff181 bl a000f75c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
a0013154: eb000c5d bl a00162d0 <__errno>
a0013158: e3a0301c mov r3, #28
a001315c: e5803000 str r3, [r0]
a0013160: e3e00000 mvn r0, #0
a0013164: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a0013170 <_POSIX_Semaphore_Delete>:
void _POSIX_Semaphore_Delete(
POSIX_Semaphore_Control *the_semaphore
)
{
if ( !the_semaphore->linked && !the_semaphore->open_count ) {
a0013170: e5d03015 ldrb r3, [r0, #21] <== NOT EXECUTED
*/
void _POSIX_Semaphore_Delete(
POSIX_Semaphore_Control *the_semaphore
)
{
a0013174: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
if ( !the_semaphore->linked && !the_semaphore->open_count ) {
a0013178: e3530000 cmp r3, #0 <== NOT EXECUTED
*/
void _POSIX_Semaphore_Delete(
POSIX_Semaphore_Control *the_semaphore
)
{
a001317c: e1a04000 mov r4, r0 <== NOT EXECUTED
if ( !the_semaphore->linked && !the_semaphore->open_count ) {
a0013180: 1a000002 bne a0013190 <_POSIX_Semaphore_Delete+0x20> <== NOT EXECUTED
a0013184: e5905018 ldr r5, [r0, #24] <== NOT EXECUTED
a0013188: e3550000 cmp r5, #0 <== NOT EXECUTED
a001318c: 0a000000 beq a0013194 <_POSIX_Semaphore_Delete+0x24> <== NOT EXECUTED
a0013190: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
_Objects_Close( &_POSIX_Semaphore_Information, &the_semaphore->Object );
a0013194: e1a01000 mov r1, r0 <== NOT EXECUTED
a0013198: e59f0020 ldr r0, [pc, #32] ; a00131c0 <_POSIX_Semaphore_Delete+0x50><== NOT EXECUTED
a001319c: ebffed54 bl a000e6f4 <_Objects_Close> <== NOT EXECUTED
_CORE_semaphore_Flush(
a00131a0: e284001c add r0, r4, #28 <== NOT EXECUTED
a00131a4: e1a01005 mov r1, r5 <== NOT EXECUTED
a00131a8: e3e02000 mvn r2, #0 <== NOT EXECUTED
a00131ac: ebffeba7 bl a000e050 <_CORE_semaphore_Flush> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
a00131b0: e59f0008 ldr r0, [pc, #8] ; a00131c0 <_POSIX_Semaphore_Delete+0x50><== NOT EXECUTED
a00131b4: e1a01004 mov r1, r4 <== NOT EXECUTED
-1
);
_POSIX_Semaphore_Free( the_semaphore );
}
}
a00131b8: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
a00131bc: eaffee03 b a000e9d0 <_Objects_Free> <== NOT EXECUTED
a00131c4 <_POSIX_Semaphore_Name_to_id>:
int _POSIX_Semaphore_Name_to_id(
const char *name,
sem_t *id
)
{
a00131c4: e92d4010 push {r4, lr} <== NOT EXECUTED
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
a00131c8: e2503000 subs r3, r0, #0 <== NOT EXECUTED
int _POSIX_Semaphore_Name_to_id(
const char *name,
sem_t *id
)
{
a00131cc: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a00131d0: e1a04001 mov r4, r1 <== NOT EXECUTED
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
a00131d4: 0a000002 beq a00131e4 <_POSIX_Semaphore_Name_to_id+0x20> <== NOT EXECUTED
return EINVAL;
if ( !name[0] )
a00131d8: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
a00131dc: e3520000 cmp r2, #0 <== NOT EXECUTED
a00131e0: 1a000002 bne a00131f0 <_POSIX_Semaphore_Name_to_id+0x2c> <== NOT EXECUTED
return EINVAL;
a00131e4: e3a00016 mov r0, #22 <== NOT EXECUTED
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
a00131e8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a00131ec: e8bd8010 pop {r4, pc} <== NOT EXECUTED
return EINVAL;
if ( !name[0] )
return EINVAL;
status = _Objects_Name_to_id_string(
a00131f0: e1a01003 mov r1, r3 <== NOT EXECUTED
a00131f4: e59f001c ldr r0, [pc, #28] ; a0013218 <_POSIX_Semaphore_Name_to_id+0x54><== NOT EXECUTED
a00131f8: e1a0200d mov r2, sp <== NOT EXECUTED
a00131fc: eb0003aa bl a00140ac <_Objects_Name_to_id_string> <== NOT EXECUTED
&_POSIX_Semaphore_Information,
name,
&the_id
);
*id = the_id;
a0013200: e59d3000 ldr r3, [sp] <== NOT EXECUTED
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
a0013204: e3500000 cmp r0, #0 <== NOT EXECUTED
a0013208: 13a00002 movne r0, #2 <== NOT EXECUTED
a001320c: 03a00000 moveq r0, #0 <== NOT EXECUTED
status = _Objects_Name_to_id_string(
&_POSIX_Semaphore_Information,
name,
&the_id
);
*id = the_id;
a0013210: e5843000 str r3, [r4] <== NOT EXECUTED
a0013214: eafffff3 b a00131e8 <_POSIX_Semaphore_Name_to_id+0x24> <== NOT EXECUTED
a0015d88 <_POSIX_Semaphore_Translate_core_semaphore_return_code>:
*/
#if defined(RTEMS_DEBUG)
if ( the_semaphore_status > CORE_SEMAPHORE_STATUS_LAST )
return EINVAL;
#endif
return _POSIX_Semaphore_Return_codes[the_semaphore_status];
a0015d88: e59f3004 ldr r3, [pc, #4] ; a0015d94 <_POSIX_Semaphore_Translate_core_semaphore_return_code+0xc><== NOT EXECUTED
}
a0015d8c: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED
a0015d90: e12fff1e bx lr <== NOT EXECUTED
a0013264 <_POSIX_Semaphore_Wait_support>:
int _POSIX_Semaphore_Wait_support(
sem_t *sem,
bool blocking,
Watchdog_Interval timeout
)
{
a0013264: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
_Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location );
a0013268: e5903000 ldr r3, [r0] <== NOT EXECUTED
a001326c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a0013270: e1a05001 mov r5, r1 <== NOT EXECUTED
a0013274: e1a04002 mov r4, r2 <== NOT EXECUTED
a0013278: e1a01003 mov r1, r3 <== NOT EXECUTED
a001327c: e1a0200d mov r2, sp <== NOT EXECUTED
a0013280: e59f007c ldr r0, [pc, #124] ; a0013304 <_POSIX_Semaphore_Wait_support+0xa0><== NOT EXECUTED
a0013284: ebffee2a bl a000eb34 <_Objects_Get> <== NOT EXECUTED
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
a0013288: e59d2000 ldr r2, [sp] <== NOT EXECUTED
int _POSIX_Semaphore_Wait_support(
sem_t *sem,
bool blocking,
Watchdog_Interval timeout
)
{
a001328c: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED
a0013290: e1a03000 mov r3, r0 <== NOT EXECUTED
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
a0013294: e3520000 cmp r2, #0 <== NOT EXECUTED
a0013298: 0a000006 beq a00132b8 <_POSIX_Semaphore_Wait_support+0x54> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a001329c: eb000c0b bl a00162d0 <__errno> <== NOT EXECUTED
a00132a0: e3a03016 mov r3, #22 <== NOT EXECUTED
a00132a4: e5803000 str r3, [r0] <== NOT EXECUTED
a00132a8: e3e03000 mvn r3, #0 <== NOT EXECUTED
}
a00132ac: e1a00003 mov r0, r3 <== NOT EXECUTED
a00132b0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a00132b4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Seize(
a00132b8: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
a00132bc: e1a03004 mov r3, r4 <== NOT EXECUTED
blocking,
timeout
);
_Thread_Enable_dispatch();
if ( !_Thread_Executing->Wait.return_code )
a00132c0: e59f4040 ldr r4, [pc, #64] ; a0013308 <_POSIX_Semaphore_Wait_support+0xa4><== NOT EXECUTED
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Seize(
a00132c4: e280001c add r0, r0, #28 <== NOT EXECUTED
a00132c8: e1a02005 mov r2, r5 <== NOT EXECUTED
a00132cc: eb0001f8 bl a0013ab4 <_CORE_semaphore_Seize> <== NOT EXECUTED
&the_semaphore->Semaphore,
the_semaphore->Object.id,
blocking,
timeout
);
_Thread_Enable_dispatch();
a00132d0: ebfff121 bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( !_Thread_Executing->Wait.return_code )
a00132d4: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
a00132d8: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
a00132dc: e3530000 cmp r3, #0 <== NOT EXECUTED
a00132e0: 0afffff1 beq a00132ac <_POSIX_Semaphore_Wait_support+0x48> <== NOT EXECUTED
return 0;
rtems_set_errno_and_return_minus_one(
a00132e4: eb000bf9 bl a00162d0 <__errno> <== NOT EXECUTED
a00132e8: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
a00132ec: e1a05000 mov r5, r0 <== NOT EXECUTED
a00132f0: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
a00132f4: eb000aa3 bl a0015d88 <_POSIX_Semaphore_Translate_core_semaphore_return_code><== NOT EXECUTED
a00132f8: e3e03000 mvn r3, #0 <== NOT EXECUTED
a00132fc: e5850000 str r0, [r5] <== NOT EXECUTED
a0013300: eaffffe9 b a00132ac <_POSIX_Semaphore_Wait_support+0x48> <== NOT EXECUTED
a000f01c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
Thread_Control *the_thread
)
{
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000f01c: e59030fc ldr r3, [r0, #252] ; 0xfc <== NOT EXECUTED
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
a000f020: e59320d8 ldr r2, [r3, #216] ; 0xd8 <== NOT EXECUTED
a000f024: e3520000 cmp r2, #0 <== NOT EXECUTED
a000f028: 1a000002 bne a000f038 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1c><== NOT EXECUTED
a000f02c: e59320dc ldr r2, [r3, #220] ; 0xdc <== NOT EXECUTED
a000f030: e3520001 cmp r2, #1 <== NOT EXECUTED
a000f034: 0a000000 beq a000f03c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x20><== NOT EXECUTED
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
a000f038: eafff4c1 b a000c344 <_Thread_Enable_dispatch> <== NOT EXECUTED
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
a000f03c: e59330e0 ldr r3, [r3, #224] ; 0xe0 <== NOT EXECUTED
a000f040: e3530000 cmp r3, #0 <== NOT EXECUTED
a000f044: 0afffffb beq a000f038 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1c><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a000f048: e59f3010 ldr r3, [pc, #16] ; a000f060 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44><== NOT EXECUTED
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
a000f04c: e3e01000 mvn r1, #0 <== NOT EXECUTED
a000f050: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000f054: e0822001 add r2, r2, r1 <== NOT EXECUTED
a000f058: e5832000 str r2, [r3] <== NOT EXECUTED
a000f05c: ea000225 b a000f8f8 <_POSIX_Thread_Exit> <== NOT EXECUTED
a0010560 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
a0010560: e92d40f0 push {r4, r5, r6, r7, lr}
a0010564: e1a04000 mov r4, r0
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
a0010568: e5910000 ldr r0, [r1]
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
a001056c: e1a05001 mov r5, r1
a0010570: e1a06002 mov r6, r2
a0010574: e1a07003 mov r7, r3
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
a0010578: ebffffed bl a0010534 <_POSIX_Priority_Is_valid>
a001057c: e3500000 cmp r0, #0
a0010580: 0a00000a beq a00105b0 <_POSIX_Thread_Translate_sched_param+0x50>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
a0010584: e3a00000 mov r0, #0
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
a0010588: e1540000 cmp r4, r0
)
{
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
a001058c: e5860000 str r0, [r6]
*budget_callout = NULL;
a0010590: e5870000 str r0, [r7]
if ( policy == SCHED_OTHER ) {
a0010594: 0a000007 beq a00105b8 <_POSIX_Thread_Translate_sched_param+0x58>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
a0010598: e3540001 cmp r4, #1
a001059c: 0a00000a beq a00105cc <_POSIX_Thread_Translate_sched_param+0x6c>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
a00105a0: e3540002 cmp r4, #2
a00105a4: 0a000026 beq a0010644 <_POSIX_Thread_Translate_sched_param+0xe4>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
a00105a8: e3540004 cmp r4, #4
a00105ac: 0a000007 beq a00105d0 <_POSIX_Thread_Translate_sched_param+0x70>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
a00105b0: e3a00016 mov r0, #22
a00105b4: e8bd80f0 pop {r4, r5, r6, r7, pc}
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
a00105b8: e3a03001 mov r3, #1 <== NOT EXECUTED
a00105bc: e5863000 str r3, [r6] <== NOT EXECUTED
return 0;
a00105c0: e1a00004 mov r0, r4 <== NOT EXECUTED
a00105c4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
a00105c8: e3a00016 mov r0, #22 <== NOT EXECUTED
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
a00105cc: e8bd80f0 pop {r4, r5, r6, r7, pc}
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
a00105d0: e5953008 ldr r3, [r5, #8]
a00105d4: e3530000 cmp r3, #0
a00105d8: 1a000002 bne a00105e8 <_POSIX_Thread_Translate_sched_param+0x88>
a00105dc: e595300c ldr r3, [r5, #12]
a00105e0: e3530000 cmp r3, #0
a00105e4: 0afffff1 beq a00105b0 <_POSIX_Thread_Translate_sched_param+0x50>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
a00105e8: e5953010 ldr r3, [r5, #16]
a00105ec: e3530000 cmp r3, #0
a00105f0: 1a000002 bne a0010600 <_POSIX_Thread_Translate_sched_param+0xa0>
a00105f4: e5953014 ldr r3, [r5, #20]
a00105f8: e3530000 cmp r3, #0
a00105fc: 0affffeb beq a00105b0 <_POSIX_Thread_Translate_sched_param+0x50>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
a0010600: e2850008 add r0, r5, #8
a0010604: ebfff5f8 bl a000ddec <_Timespec_To_ticks>
a0010608: e1a04000 mov r4, r0
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
a001060c: e2850010 add r0, r5, #16
a0010610: ebfff5f5 bl a000ddec <_Timespec_To_ticks>
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
a0010614: e1540000 cmp r4, r0
a0010618: 3affffe4 bcc a00105b0 <_POSIX_Thread_Translate_sched_param+0x50>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
a001061c: e5950004 ldr r0, [r5, #4]
a0010620: ebffffc3 bl a0010534 <_POSIX_Priority_Is_valid>
a0010624: e3500000 cmp r0, #0
a0010628: 0affffe6 beq a00105c8 <_POSIX_Thread_Translate_sched_param+0x68>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
a001062c: e3a03003 mov r3, #3
a0010630: e5863000 str r3, [r6]
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
a0010634: e59f3010 ldr r3, [pc, #16] ; a001064c <_POSIX_Thread_Translate_sched_param+0xec>
return 0;
a0010638: e3a00000 mov r0, #0
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
a001063c: e5873000 str r3, [r7]
return 0;
a0010640: e8bd80f0 pop {r4, r5, r6, r7, pc}
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
a0010644: e5864000 str r4, [r6]
return 0;
a0010648: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000f17c <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
a000f17c: e92d40f0 push {r4, r5, r6, r7, lr}
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
a000f180: e59170fc ldr r7, [r1, #252] ; 0xfc
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
a000f184: e1a06001 mov r6, r1
api = deleted->API_Extensions[ THREAD_API_POSIX ];
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
a000f188: e1a00001 mov r0, r1
a000f18c: eb000992 bl a00117dc <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
a000f190: e1a00006 mov r0, r6
a000f194: eb0009a9 bl a0011840 <_POSIX_Keys_Run_destructors>
a000f198: e2874044 add r4, r7, #68 ; 0x44
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
a000f19c: e5965028 ldr r5, [r6, #40] ; 0x28
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
a000f1a0: ea000001 b a000f1ac <_POSIX_Threads_Delete_extension+0x30>
*(void **)the_thread->Wait.return_argument = value_ptr;
a000f1a4: e5903028 ldr r3, [r0, #40] ; 0x28
a000f1a8: e5835000 str r5, [r3]
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
a000f1ac: e1a00004 mov r0, r4
a000f1b0: ebfff437 bl a000c294 <_Thread_queue_Dequeue>
a000f1b4: e3500000 cmp r0, #0
a000f1b8: 1afffff9 bne a000f1a4 <_POSIX_Threads_Delete_extension+0x28>
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
a000f1bc: e5973084 ldr r3, [r7, #132] ; 0x84
a000f1c0: e3530004 cmp r3, #4
a000f1c4: 0a000004 beq a000f1dc <_POSIX_Threads_Delete_extension+0x60>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
a000f1c8: e3a03000 mov r3, #0
(void) _Workspace_Free( api );
a000f1cc: e1a00007 mov r0, r7
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
a000f1d0: e58630fc str r3, [r6, #252] ; 0xfc
(void) _Workspace_Free( api );
}
a000f1d4: e8bd40f0 pop {r4, r5, r6, r7, lr}
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
(void) _Workspace_Free( api );
a000f1d8: eafff7f8 b a000d1c0 <_Workspace_Free>
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
a000f1dc: e28700a8 add r0, r7, #168 ; 0xa8 <== NOT EXECUTED
a000f1e0: ebfff783 bl a000cff4 <_Watchdog_Remove> <== NOT EXECUTED
a000f1e4: eafffff7 b a000f1c8 <_POSIX_Threads_Delete_extension+0x4c> <== NOT EXECUTED
a000f37c <_POSIX_Threads_Sporadic_budget_callout>:
)
{
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000f37c: e59020fc ldr r2, [r0, #252] ; 0xfc <== NOT EXECUTED
a000f380: e59f1034 ldr r1, [pc, #52] ; a000f3bc <_POSIX_Threads_Sporadic_budget_callout+0x40><== NOT EXECUTED
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
a000f384: e590c01c ldr ip, [r0, #28] <== NOT EXECUTED
a000f388: e592208c ldr r2, [r2, #140] ; 0x8c <== NOT EXECUTED
a000f38c: e5d11000 ldrb r1, [r1] <== NOT EXECUTED
a000f390: e35c0000 cmp ip, #0 <== NOT EXECUTED
a000f394: e0621001 rsb r1, r2, r1 <== NOT EXECUTED
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
a000f398: e3e02000 mvn r2, #0 <== NOT EXECUTED
a000f39c: e5802078 str r2, [r0, #120] ; 0x78 <== NOT EXECUTED
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
a000f3a0: e5801018 str r1, [r0, #24] <== NOT EXECUTED
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
a000f3a4: 112fff1e bxne lr <== NOT EXECUTED
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
a000f3a8: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
a000f3ac: e1530001 cmp r3, r1 <== NOT EXECUTED
a000f3b0: 212fff1e bxcs lr <== NOT EXECUTED
_Thread_Change_priority( the_thread, new_priority, true );
a000f3b4: e3a02001 mov r2, #1 <== NOT EXECUTED
a000f3b8: eafff1a1 b a000ba44 <_Thread_Change_priority> <== NOT EXECUTED
a00117dc <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
a00117dc: 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 ];
a00117e0: e59050fc ldr r5, [r0, #252] ; 0xfc
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
a00117e4: e3a02001 mov r2, #1
while ( !_Chain_Is_empty( handler_stack ) ) {
a00117e8: e59530e4 ldr r3, [r5, #228] ; 0xe4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a00117ec: e28560e8 add r6, r5, #232 ; 0xe8
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
a00117f0: e58520d8 str r2, [r5, #216] ; 0xd8
while ( !_Chain_Is_empty( handler_stack ) ) {
a00117f4: e1530006 cmp r3, r6
a00117f8: 0a00000f beq a001183c <_POSIX_Threads_cancel_run+0x60>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a00117fc: e10f1000 mrs r1, CPSR <== NOT EXECUTED
a0011800: e3813080 orr r3, r1, #128 ; 0x80 <== NOT EXECUTED
a0011804: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Disable( level );
handler = (POSIX_Cancel_Handler_control *)
a0011808: e59540ec ldr r4, [r5, #236] ; 0xec <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
a001180c: e894000c ldm r4, {r2, r3} <== NOT EXECUTED
previous = the_node->previous;
next->previous = previous;
a0011810: e5823004 str r3, [r2, #4] <== NOT EXECUTED
previous->next = next;
a0011814: e5832000 str r2, [r3] <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0011818: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
(*handler->routine)( handler->arg );
a001181c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a0011820: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
a0011824: e12fff33 blx r3 <== NOT EXECUTED
_Workspace_Free( handler );
a0011828: e1a00004 mov r0, r4 <== NOT EXECUTED
a001182c: ebffee63 bl a000d1c0 <_Workspace_Free> <== NOT EXECUTED
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
a0011830: e59530e4 ldr r3, [r5, #228] ; 0xe4 <== NOT EXECUTED
a0011834: e1530006 cmp r3, r6 <== NOT EXECUTED
a0011838: 1affffef bne a00117fc <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED
a001183c: e8bd8070 pop {r4, r5, r6, pc}
a001013c <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
a001013c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a0010140: e1a04000 mov r4, r0
a0010144: e1a05001 mov r5, r1
a0010148: e1a07002 mov r7, r2
a001014c: e1a08003 mov r8, r3
ISR_Level level;
(void) _Watchdog_Remove( timer );
a0010150: ebfff65d bl a000dacc <_Watchdog_Remove>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0010154: e10f6000 mrs r6, CPSR
a0010158: e3863080 orr r3, r6, #128 ; 0x80
a001015c: 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 ) {
a0010160: e5943008 ldr r3, [r4, #8]
a0010164: e3530000 cmp r3, #0
a0010168: 0a000002 beq a0010178 <_POSIX_Timer_Insert_helper+0x3c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a001016c: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
_ISR_Enable( level );
return false;
a0010170: e3a00000 mov r0, #0 <== NOT EXECUTED
a0010174: 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;
a0010178: e5843008 str r3, [r4, #8]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a001017c: e59d3018 ldr r3, [sp, #24]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a0010180: e584801c str r8, [r4, #28]
the_watchdog->id = id;
a0010184: e5847020 str r7, [r4, #32]
the_watchdog->user_data = user_data;
a0010188: e5843024 str r3, [r4, #36] ; 0x24
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a001018c: e584500c str r5, [r4, #12]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0010190: e59f0010 ldr r0, [pc, #16] ; a00101a8 <_POSIX_Timer_Insert_helper+0x6c>
a0010194: e1a01004 mov r1, r4
a0010198: ebfff5dc bl a000d910 <_Watchdog_Insert>
a001019c: e129f006 msr CPSR_fc, r6
* so we can atomically initialize it as in use.
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
return true;
a00101a0: e3a00001 mov r0, #1
}
a00101a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a0009cc8 <_POSIX_Timer_TSR>:
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
a0009cc8: e92d4010 push {r4, lr} <== NOT EXECUTED
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
a0009ccc: e5913068 ldr r3, [r1, #104] ; 0x68 <== NOT EXECUTED
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
a0009cd0: e5912054 ldr r2, [r1, #84] ; 0x54 <== NOT EXECUTED
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
a0009cd4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
a0009cd8: e2833001 add r3, r3, #1 <== NOT EXECUTED
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
a0009cdc: e3520000 cmp r2, #0 <== NOT EXECUTED
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
a0009ce0: e1a04001 mov r4, r1 <== NOT EXECUTED
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
a0009ce4: e5813068 str r3, [r1, #104] ; 0x68 <== NOT EXECUTED
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
a0009ce8: 1a000004 bne a0009d00 <_POSIX_Timer_TSR+0x38> <== NOT EXECUTED
a0009cec: e5913058 ldr r3, [r1, #88] ; 0x58 <== NOT EXECUTED
a0009cf0: e3530000 cmp r3, #0 <== 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;
a0009cf4: 03a03004 moveq r3, #4 <== NOT EXECUTED
a0009cf8: 05c1303c strbeq r3, [r1, #60] ; 0x3c <== 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 ) ||
a0009cfc: 0a00000d beq a0009d38 <_POSIX_Timer_TSR+0x70> <== NOT EXECUTED
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
a0009d00: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
a0009d04: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
a0009d08: e59f3040 ldr r3, [pc, #64] ; a0009d50 <_POSIX_Timer_TSR+0x88><== NOT EXECUTED
a0009d0c: e2840010 add r0, r4, #16 <== NOT EXECUTED
a0009d10: e58d4000 str r4, [sp] <== NOT EXECUTED
a0009d14: eb001908 bl a001013c <_POSIX_Timer_Insert_helper> <== NOT EXECUTED
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
a0009d18: e3500000 cmp r0, #0 <== NOT EXECUTED
a0009d1c: 1a000001 bne a0009d28 <_POSIX_Timer_TSR+0x60> <== NOT EXECUTED
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
}
a0009d20: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0009d24: e8bd8010 pop {r4, pc} <== NOT EXECUTED
);
if ( !activated )
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
a0009d28: e284006c add r0, r4, #108 ; 0x6c <== NOT EXECUTED
a0009d2c: eb000587 bl a000b350 <_TOD_Get> <== NOT EXECUTED
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
a0009d30: e3a03003 mov r3, #3 <== NOT EXECUTED
a0009d34: e5c4303c strb r3, [r4, #60] ; 0x3c <== NOT EXECUTED
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
a0009d38: e5940038 ldr r0, [r4, #56] ; 0x38 <== NOT EXECUTED
a0009d3c: e5941044 ldr r1, [r4, #68] ; 0x44 <== NOT EXECUTED
a0009d40: eb0017de bl a000fcc0 <pthread_kill> <== NOT EXECUTED
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
a0009d44: e3a03000 mov r3, #0 <== NOT EXECUTED
a0009d48: e5843068 str r3, [r4, #104] ; 0x68 <== NOT EXECUTED
a0009d4c: eafffff3 b a0009d20 <_POSIX_Timer_TSR+0x58> <== NOT EXECUTED
a000ee24 <_POSIX_signals_Abnormal_termination_handler>:
sigset_t _POSIX_signals_Pending;
void _POSIX_signals_Abnormal_termination_handler(
int signo __attribute__((unused)) )
{
a000ee24: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
exit( 1 );
a000ee28: e3a00001 mov r0, #1 <== NOT EXECUTED
a000ee2c: eb000caa bl a00120dc <exit> <== NOT EXECUTED
a000b820 <_POSIX_signals_Alarm_TSR>:
void _POSIX_signals_Alarm_TSR(
Objects_Id id __attribute__((unused)),
void *argument __attribute__((unused))
)
{
a000b820: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
int status;
status = kill( getpid(), SIGALRM );
a000b824: ebfff423 bl a00088b8 <getpid> <== NOT EXECUTED
a000b828: e3a0100e mov r1, #14 <== NOT EXECUTED
/* XXX can't print from an ISR, should this be fatal? */
}
a000b82c: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
void *argument __attribute__((unused))
)
{
int status;
status = kill( getpid(), SIGALRM );
a000b830: ea00004d b a000b96c <kill> <== NOT EXECUTED
a00118d8 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
a00118d8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a00118dc: e24dd03c sub sp, sp, #60 ; 0x3c
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
a00118e0: e28d5030 add r5, sp, #48 ; 0x30
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
a00118e4: e20230ff and r3, r2, #255 ; 0xff
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
a00118e8: e3a02001 mov r2, #1
a00118ec: e58d2000 str r2, [sp]
a00118f0: e1a02005 mov r2, r5
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
a00118f4: e1a04000 mov r4, r0
a00118f8: e1a06001 mov r6, r1
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
a00118fc: eb000034 bl a00119d4 <_POSIX_signals_Clear_signals>
a0011900: e3500000 cmp r0, #0
is_global, true ) )
return false;
a0011904: 01a05000 moveq r5, r0
{
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
a0011908: 0a000027 beq a00119ac <_POSIX_signals_Check_signal+0xd4>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
a001190c: e3a0300c mov r3, #12
a0011910: e59f20b4 ldr r2, [pc, #180] ; a00119cc <_POSIX_signals_Check_signal+0xf4>
a0011914: e0030396 mul r3, r6, r3
a0011918: e0821003 add r1, r2, r3
a001191c: e5918008 ldr r8, [r1, #8]
a0011920: e3580001 cmp r8, #1
return false;
a0011924: 03a05000 moveq r5, #0
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
a0011928: 0a00001f beq a00119ac <_POSIX_signals_Check_signal+0xd4>
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
a001192c: e59f709c ldr r7, [pc, #156] ; a00119d0 <_POSIX_signals_Check_signal+0xf8>
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
a0011930: e7923003 ldr r3, [r2, r3]
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
a0011934: e28da008 add sl, sp, #8
a0011938: e597c004 ldr ip, [r7, #4]
a001193c: e1a0e00a mov lr, sl
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
a0011940: e591b004 ldr fp, [r1, #4]
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
a0011944: e28cc020 add ip, ip, #32
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
a0011948: e58d3004 str r3, [sp, #4]
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
a001194c: e8bc000f ldm ip!, {r0, r1, r2, r3}
a0011950: e8ae000f stmia lr!, {r0, r1, r2, r3}
a0011954: e8bc000f ldm ip!, {r0, r1, r2, r3}
a0011958: e8ae000f stmia lr!, {r0, r1, r2, r3}
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
a001195c: e59490d0 ldr r9, [r4, #208] ; 0xd0
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
a0011960: e59d3004 ldr r3, [sp, #4]
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
a0011964: e89c0003 ldm ip, {r0, r1}
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
a0011968: e18bb009 orr fp, fp, r9
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
a001196c: e3530002 cmp r3, #2
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
a0011970: e584b0d0 str fp, [r4, #208] ; 0xd0
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
a0011974: e88e0003 stm lr, {r0, r1}
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
a0011978: 0a00000e beq a00119b8 <_POSIX_signals_Check_signal+0xe0>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
a001197c: e1a00006 mov r0, r6
a0011980: e12fff38 blx r8
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
a0011984: e597c004 ldr ip, [r7, #4]
a0011988: e8ba000f ldm sl!, {r0, r1, r2, r3}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
a001198c: e3a05001 mov r5, #1
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
a0011990: e28cc020 add ip, ip, #32
a0011994: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0011998: e8ba000f ldm sl!, {r0, r1, r2, r3}
a001199c: e8ac000f stmia ip!, {r0, r1, r2, r3}
a00119a0: e89a0003 ldm sl, {r0, r1}
a00119a4: e88c0003 stm ip, {r0, r1}
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
a00119a8: e58490d0 str r9, [r4, #208] ; 0xd0
return true;
}
a00119ac: e1a00005 mov r0, r5
a00119b0: e28dd03c add sp, sp, #60 ; 0x3c
a00119b4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
a00119b8: e1a00006 mov r0, r6 <== NOT EXECUTED
a00119bc: e1a01005 mov r1, r5 <== NOT EXECUTED
a00119c0: e3a02000 mov r2, #0 <== NOT EXECUTED
a00119c4: e12fff38 blx r8 <== NOT EXECUTED
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
a00119c8: eaffffed b a0011984 <_POSIX_signals_Check_signal+0xac> <== NOT EXECUTED
a0012048 <_POSIX_signals_Clear_process_signals>:
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0012048: e10f2000 mrs r2, CPSR
a001204c: e3823080 orr r3, r2, #128 ; 0x80
a0012050: e129f003 msr CPSR_fc, r3
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
a0012054: e3a0300c mov r3, #12
a0012058: e0030390 mul r3, r0, r3
a001205c: e59f1048 ldr r1, [pc, #72] ; a00120ac <_POSIX_signals_Clear_process_signals+0x64>
a0012060: e7911003 ldr r1, [r1, r3]
a0012064: e3510002 cmp r1, #2
a0012068: 0a000007 beq a001208c <_POSIX_signals_Clear_process_signals+0x44>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
a001206c: e59f303c ldr r3, [pc, #60] ; a00120b0 <_POSIX_signals_Clear_process_signals+0x68>
a0012070: e3a0c001 mov ip, #1
a0012074: e2400001 sub r0, r0, #1
a0012078: e5931000 ldr r1, [r3]
a001207c: e1c1001c bic r0, r1, ip, lsl r0
a0012080: e5830000 str r0, [r3]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0012084: e129f002 msr CPSR_fc, r2
}
_ISR_Enable( level );
}
a0012088: e12fff1e bx lr
a001208c: e59f1020 ldr r1, [pc, #32] ; a00120b4 <_POSIX_signals_Clear_process_signals+0x6c>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a0012090: e283c004 add ip, r3, #4
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
a0012094: e7913003 ldr r3, [r1, r3]
a0012098: e08c1001 add r1, ip, r1
a001209c: e1530001 cmp r3, r1
a00120a0: 0afffff1 beq a001206c <_POSIX_signals_Clear_process_signals+0x24>
a00120a4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
}
a00120a8: e12fff1e bx lr <== NOT EXECUTED
a00119d4 <_POSIX_signals_Clear_signals>:
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
a00119d4: e92d4070 push {r4, r5, r6, lr}
a00119d8: e24dd008 sub sp, sp, #8
a00119dc: e5ddc018 ldrb ip, [sp, #24]
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a00119e0: e2414001 sub r4, r1, #1
a00119e4: e20330ff and r3, r3, #255 ; 0xff
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
* insures that no signals are blocked and all are checked.
*/
if ( check_blocked )
a00119e8: e35c0000 cmp ip, #0
a00119ec: e3a0c001 mov ip, #1
a00119f0: e1a0441c lsl r4, ip, r4
signals_blocked = ~api->signals_blocked;
a00119f4: 1590c0d0 ldrne ip, [r0, #208] ; 0xd0
else
signals_blocked = SIGNAL_ALL_MASK;
a00119f8: 03e0c000 mvneq ip, #0
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
* insures that no signals are blocked and all are checked.
*/
if ( check_blocked )
signals_blocked = ~api->signals_blocked;
a00119fc: 11e0c00c mvnne ip, ip
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0011a00: e10f5000 mrs r5, CPSR
a0011a04: e3856080 orr r6, r5, #128 ; 0x80
a0011a08: e129f006 msr CPSR_fc, r6
/* XXX is this right for siginfo type signals? */
/* XXX are we sure they can be cleared the same way? */
_ISR_Disable( level );
if ( is_global ) {
a0011a0c: e3530000 cmp r3, #0
a0011a10: 0a000010 beq a0011a58 <_POSIX_signals_Clear_signals+0x84>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
a0011a14: e59f30e8 ldr r3, [pc, #232] ; a0011b04 <_POSIX_signals_Clear_signals+0x130>
a0011a18: e5930000 ldr r0, [r3]
a0011a1c: e0044000 and r4, r4, r0
a0011a20: e014000c ands r0, r4, ip
a0011a24: 0a000008 beq a0011a4c <_POSIX_signals_Clear_signals+0x78>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
a0011a28: e3a0300c mov r3, #12
a0011a2c: e0030391 mul r3, r1, r3
a0011a30: e59f00d0 ldr r0, [pc, #208] ; a0011b08 <_POSIX_signals_Clear_signals+0x134>
a0011a34: e7900003 ldr r0, [r0, r3]
a0011a38: e3500002 cmp r0, #2
a0011a3c: 0a00000d beq a0011a78 <_POSIX_signals_Clear_signals+0xa4>
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
a0011a40: e1a00001 mov r0, r1
a0011a44: eb00017f bl a0012048 <_POSIX_signals_Clear_process_signals>
do_callout = true;
a0011a48: e3a00001 mov r0, #1
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0011a4c: e129f005 msr CPSR_fc, r5
do_callout = true;
}
}
_ISR_Enable( level );
return do_callout;
}
a0011a50: e28dd008 add sp, sp, #8
a0011a54: e8bd8070 pop {r4, r5, r6, pc}
}
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
a0011a58: e59020d4 ldr r2, [r0, #212] ; 0xd4
a0011a5c: e0041002 and r1, r4, r2
a0011a60: e111000c tst r1, ip
api->signals_pending &= ~mask;
a0011a64: 11c24004 bicne r4, r2, r4
a0011a68: 158040d4 strne r4, [r0, #212] ; 0xd4
bool do_callout;
POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo );
do_callout = false;
a0011a6c: 01a00003 moveq r0, r3
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
do_callout = true;
a0011a70: 13a00001 movne r0, #1
a0011a74: eafffff4 b a0011a4c <_POSIX_signals_Clear_signals+0x78>
}
}
_ISR_Enable( level );
return do_callout;
}
a0011a78: e59fc08c ldr ip, [pc, #140] ; a0011b0c <_POSIX_signals_Clear_signals+0x138>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a0011a7c: e2830004 add r0, r3, #4
a0011a80: e79c4003 ldr r4, [ip, r3]
a0011a84: e080000c add r0, r0, ip
a0011a88: e08c6003 add r6, ip, r3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a0011a8c: e1540000 cmp r4, r0
a0011a90: 0a000016 beq a0011af0 <_POSIX_signals_Clear_signals+0x11c>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
a0011a94: e594e000 ldr lr, [r4] <== NOT EXECUTED
if ( is_global ) {
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
_POSIX_signals_Clear_process_signals( signo );
a0011a98: e1a00001 mov r0, r1 <== NOT EXECUTED
head->next = new_first;
a0011a9c: e78ce003 str lr, [ip, r3] <== NOT EXECUTED
new_first->previous = head;
a0011aa0: e58e6004 str r6, [lr, #4] <== NOT EXECUTED
a0011aa4: e88d0006 stm sp, {r1, r2} <== NOT EXECUTED
a0011aa8: eb000166 bl a0012048 <_POSIX_signals_Clear_process_signals><== NOT EXECUTED
* It may be impossible to get here with an empty chain
* BUT until that is proven we need to be defensive and
* protect against it.
*/
if ( psiginfo ) {
*info = psiginfo->Info;
a0011aac: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
a0011ab0: e594c008 ldr ip, [r4, #8] <== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
a0011ab4: e59f3054 ldr r3, [pc, #84] ; a0011b10 <_POSIX_signals_Clear_signals+0x13c><== NOT EXECUTED
a0011ab8: e1a00002 mov r0, r2 <== NOT EXECUTED
a0011abc: e480c004 str ip, [r0], #4 <== NOT EXECUTED
a0011ac0: e594e00c ldr lr, [r4, #12] <== NOT EXECUTED
the_node->next = tail;
a0011ac4: e283c004 add ip, r3, #4 <== NOT EXECUTED
a0011ac8: e582e004 str lr, [r2, #4] <== NOT EXECUTED
a0011acc: e5942010 ldr r2, [r4, #16] <== NOT EXECUTED
a0011ad0: e5802004 str r2, [r0, #4] <== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
a0011ad4: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED
the_node->next = tail;
tail->previous = the_node;
a0011ad8: e5834008 str r4, [r3, #8] <== NOT EXECUTED
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
a0011adc: e584c000 str ip, [r4] <== NOT EXECUTED
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
a0011ae0: e5842004 str r2, [r4, #4] <== NOT EXECUTED
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
a0011ae4: e5824000 str r4, [r2] <== NOT EXECUTED
the_node->previous = old_last;
a0011ae8: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a0011aec: eaffffd3 b a0011a40 <_POSIX_signals_Clear_signals+0x6c> <== NOT EXECUTED
if ( is_global ) {
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
_POSIX_signals_Clear_process_signals( signo );
a0011af0: e1a00001 mov r0, r1
a0011af4: e58d1000 str r1, [sp]
a0011af8: eb000152 bl a0012048 <_POSIX_signals_Clear_process_signals>
a0011afc: e59d1000 ldr r1, [sp]
a0011b00: eaffffce b a0011a40 <_POSIX_signals_Clear_signals+0x6c>
a000a8f8 <_POSIX_signals_Get_lowest>:
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
a000a8f8: e3a0301b mov r3, #27 <== NOT EXECUTED
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a000a8fc: e3a01001 mov r1, #1 <== NOT EXECUTED
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
a000a900: e2432001 sub r2, r3, #1 <== NOT EXECUTED
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
a000a904: e0102211 ands r2, r0, r1, lsl r2 <== NOT EXECUTED
a000a908: 1a00000b bne a000a93c <_POSIX_signals_Get_lowest+0x44> <== NOT EXECUTED
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
a000a90c: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000a910: e3530020 cmp r3, #32 <== NOT EXECUTED
a000a914: 1afffff9 bne a000a900 <_POSIX_signals_Get_lowest+0x8> <== NOT EXECUTED
a000a918: e3a03001 mov r3, #1 <== NOT EXECUTED
a000a91c: e1a01003 mov r1, r3 <== NOT EXECUTED
a000a920: ea000002 b a000a930 <_POSIX_signals_Get_lowest+0x38> <== NOT EXECUTED
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
a000a924: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000a928: e353001b cmp r3, #27 <== NOT EXECUTED
a000a92c: 0a000002 beq a000a93c <_POSIX_signals_Get_lowest+0x44> <== NOT EXECUTED
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
a000a930: e2432001 sub r2, r3, #1 <== NOT EXECUTED
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
a000a934: e0102211 ands r2, r0, r1, lsl r2 <== NOT EXECUTED
a000a938: 0afffff9 beq a000a924 <_POSIX_signals_Get_lowest+0x2c> <== NOT EXECUTED
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
a000a93c: e1a00003 mov r0, r3 <== NOT EXECUTED
a000a940: e12fff1e bx lr <== NOT EXECUTED
a0009948 <_POSIX_signals_Ualarm_TSR>:
void _POSIX_signals_Ualarm_TSR(
Objects_Id id __attribute__((unused)),
void *argument __attribute__((unused))
)
{
a0009948: e92d4010 push {r4, lr} <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Reset(
Watchdog_Control *the_watchdog
)
{
(void) _Watchdog_Remove( the_watchdog );
a000994c: e59f4020 ldr r4, [pc, #32] ; a0009974 <_POSIX_signals_Ualarm_TSR+0x2c><== NOT EXECUTED
/*
* Send a SIGALRM but if there is a problem, ignore it.
* It's OK, there isn't a way this should fail.
*/
(void) kill( getpid(), SIGALRM );
a0009950: ebfff36b bl a0006704 <getpid> <== NOT EXECUTED
a0009954: e3a0100e mov r1, #14 <== NOT EXECUTED
a0009958: ebffff6a bl a0009708 <kill> <== NOT EXECUTED
a000995c: e1a00004 mov r0, r4 <== NOT EXECUTED
a0009960: eb000f57 bl a000d6c4 <_Watchdog_Remove> <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0009964: e59f000c ldr r0, [pc, #12] ; a0009978 <_POSIX_signals_Ualarm_TSR+0x30><== NOT EXECUTED
a0009968: e1a01004 mov r1, r4 <== NOT EXECUTED
/*
* If the reset interval is non-zero, reschedule ourselves.
*/
_Watchdog_Reset( &_POSIX_signals_Ualarm_timer );
}
a000996c: e8bd4010 pop {r4, lr} <== NOT EXECUTED
a0009970: ea000ee4 b a000d508 <_Watchdog_Insert> <== NOT EXECUTED
a0026394 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
a0026394: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
a0026398: e5905010 ldr r5, [r0, #16]
a002639c: e3a03201 mov r3, #268435456 ; 0x10000000
a00263a0: e2833902 add r3, r3, #32768 ; 0x8000
a00263a4: e1a0c003 mov ip, r3
a00263a8: e0053003 and r3, r5, r3
a00263ac: e2417001 sub r7, r1, #1
a00263b0: e3a06001 mov r6, #1
a00263b4: e153000c cmp r3, ip
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
a00263b8: e1a04000 mov r4, r0
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a00263bc: e59030fc ldr r3, [r0, #252] ; 0xfc
a00263c0: e1a07716 lsl r7, r6, r7
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
a00263c4: 0a000012 beq a0026414 <_POSIX_signals_Unblock_thread+0x80>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
a00263c8: e59330d0 ldr r3, [r3, #208] ; 0xd0
a00263cc: e1d77003 bics r7, r7, r3
a00263d0: 0a00000d beq a002640c <_POSIX_signals_Unblock_thread+0x78>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
a00263d4: e2157201 ands r7, r5, #268435456 ; 0x10000000 <== NOT EXECUTED
a00263d8: 0a000009 beq a0026404 <_POSIX_signals_Unblock_thread+0x70> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
a00263dc: e3a06bef mov r6, #244736 ; 0x3bc00 <== NOT EXECUTED
a00263e0: e2866e2e add r6, r6, #736 ; 0x2e0 <== NOT EXECUTED
a00263e4: e0056006 and r6, r5, r6 <== NOT EXECUTED
the_thread->Wait.return_code = EINTR;
a00263e8: e3a03004 mov r3, #4 <== NOT EXECUTED
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
a00263ec: e3560000 cmp r6, #0 <== NOT EXECUTED
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
the_thread->Wait.return_code = EINTR;
a00263f0: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
a00263f4: 1a000030 bne a00264bc <_POSIX_signals_Unblock_thread+0x128><== NOT EXECUTED
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
a00263f8: e2150008 ands r0, r5, #8 <== NOT EXECUTED
a00263fc: 1a000027 bne a00264a0 <_POSIX_signals_Unblock_thread+0x10c><== NOT EXECUTED
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
a0026400: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
a0026404: e3550000 cmp r5, #0 <== NOT EXECUTED
a0026408: 0a000019 beq a0026474 <_POSIX_signals_Unblock_thread+0xe0> <== NOT EXECUTED
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
a002640c: e1a00007 mov r0, r7
a0026410: e8bd80f0 pop {r4, r5, r6, r7, pc}
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
a0026414: e5900030 ldr r0, [r0, #48] ; 0x30 <== NOT EXECUTED
a0026418: e1170000 tst r7, r0 <== NOT EXECUTED
a002641c: 0a000010 beq a0026464 <_POSIX_signals_Unblock_thread+0xd0> <== NOT EXECUTED
the_thread->Wait.return_code = EINTR;
a0026420: e3a03004 mov r3, #4 <== NOT EXECUTED
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
a0026424: e3520000 cmp r2, #0 <== NOT EXECUTED
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
the_thread->Wait.return_code = EINTR;
a0026428: e5843034 str r3, [r4, #52] ; 0x34 <== NOT EXECUTED
the_info = (siginfo_t *) the_thread->Wait.return_argument;
a002642c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
if ( !info ) {
a0026430: 0a000024 beq a00264c8 <_POSIX_signals_Unblock_thread+0x134><== NOT EXECUTED
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
a0026434: e1a01002 mov r1, r2 <== NOT EXECUTED
a0026438: e491c004 ldr ip, [r1], #4 <== NOT EXECUTED
a002643c: e1a03000 mov r3, r0 <== NOT EXECUTED
a0026440: e483c004 str ip, [r3], #4 <== NOT EXECUTED
a0026444: e5922004 ldr r2, [r2, #4] <== NOT EXECUTED
a0026448: e5802004 str r2, [r0, #4] <== NOT EXECUTED
a002644c: e5912004 ldr r2, [r1, #4] <== NOT EXECUTED
a0026450: e5832004 str r2, [r3, #4] <== NOT EXECUTED
}
_Thread_queue_Extract_with_proxy( the_thread );
a0026454: e1a00004 mov r0, r4 <== NOT EXECUTED
a0026458: ebffae0d bl a0011c94 <_Thread_queue_Extract_with_proxy> <== NOT EXECUTED
return true;
a002645c: e3a00001 mov r0, #1 <== NOT EXECUTED
a0026460: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
a0026464: e59300d0 ldr r0, [r3, #208] ; 0xd0 <== NOT EXECUTED
a0026468: e1d70000 bics r0, r7, r0 <== NOT EXECUTED
a002646c: 1affffeb bne a0026420 <_POSIX_signals_Unblock_thread+0x8c> <== NOT EXECUTED
a0026470: eaffffe2 b a0026400 <_POSIX_signals_Unblock_thread+0x6c> <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
a0026474: e59f205c ldr r2, [pc, #92] ; a00264d8 <_POSIX_signals_Unblock_thread+0x144><== NOT EXECUTED
a0026478: e5920000 ldr r0, [r2] <== NOT EXECUTED
a002647c: e3500000 cmp r0, #0 <== NOT EXECUTED
a0026480: 0affffde beq a0026400 <_POSIX_signals_Unblock_thread+0x6c> <== NOT EXECUTED
a0026484: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED
a0026488: e1540003 cmp r4, r3 <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
}
}
return false;
a002648c: 11a00005 movne r0, r5 <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
a0026490: 1affffda bne a0026400 <_POSIX_signals_Unblock_thread+0x6c> <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
a0026494: e5c26010 strb r6, [r2, #16] <== NOT EXECUTED
}
}
return false;
a0026498: e1a00005 mov r0, r5 <== NOT EXECUTED
a002649c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
a00264a0: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a00264a4: ebffb05c bl a001261c <_Watchdog_Remove> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a00264a8: e1a00004 mov r0, r4 <== NOT EXECUTED
a00264ac: e59f1028 ldr r1, [pc, #40] ; a00264dc <_POSIX_signals_Unblock_thread+0x148><== NOT EXECUTED
a00264b0: ebffab4b bl a00111e4 <_Thread_Clear_state> <== NOT EXECUTED
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
a00264b4: e1a00006 mov r0, r6 <== NOT EXECUTED
a00264b8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
a00264bc: ebffadf4 bl a0011c94 <_Thread_queue_Extract_with_proxy> <== NOT EXECUTED
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
a00264c0: e3a00000 mov r0, #0 <== NOT EXECUTED
a00264c4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
a00264c8: e3a03001 mov r3, #1 <== NOT EXECUTED
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
a00264cc: e880000a stm r0, {r1, r3} <== NOT EXECUTED
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
a00264d0: e5802008 str r2, [r0, #8] <== NOT EXECUTED
a00264d4: eaffffde b a0026454 <_POSIX_signals_Unblock_thread+0xc0> <== NOT EXECUTED
a000bdc0 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
a000bdc0: e92d4070 push {r4, r5, r6, lr}
if ( !the_heap )
a000bdc4: e2505000 subs r5, r0, #0
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
a000bdc8: e1a06001 mov r6, r1
if ( !the_heap )
a000bdcc: 0a00000d beq a000be08 <_Protected_heap_Get_information+0x48>
return false;
if ( !the_info )
a000bdd0: e3510000 cmp r1, #0
a000bdd4: 0a000009 beq a000be00 <_Protected_heap_Get_information+0x40>
return false;
_RTEMS_Lock_allocator();
a000bdd8: e59f4030 ldr r4, [pc, #48] ; a000be10 <_Protected_heap_Get_information+0x50>
a000bddc: e5940000 ldr r0, [r4]
a000bde0: ebfffb69 bl a000ab8c <_API_Mutex_Lock>
_Heap_Get_information( the_heap, the_info );
a000bde4: e1a00005 mov r0, r5
a000bde8: e1a01006 mov r1, r6
a000bdec: eb001360 bl a0010b74 <_Heap_Get_information>
_RTEMS_Unlock_allocator();
a000bdf0: e5940000 ldr r0, [r4]
a000bdf4: ebfffb80 bl a000abfc <_API_Mutex_Unlock>
return true;
a000bdf8: e3a00001 mov r0, #1
a000bdfc: e8bd8070 pop {r4, r5, r6, pc}
{
if ( !the_heap )
return false;
if ( !the_info )
return false;
a000be00: e1a00001 mov r0, r1
_RTEMS_Lock_allocator();
_Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
return true;
}
a000be04: e8bd8070 pop {r4, r5, r6, pc}
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
if ( !the_heap )
return false;
a000be08: e1a00005 mov r0, r5 <== NOT EXECUTED
a000be0c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a0010be0 <_Protected_heap_Walk>:
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
a0010be0: e59f3054 ldr r3, [pc, #84] ; a0010c3c <_Protected_heap_Walk+0x5c><== NOT EXECUTED
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
a0010be4: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
a0010be8: e5933000 ldr r3, [r3] <== NOT EXECUTED
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
a0010bec: e1a07000 mov r7, r0 <== NOT EXECUTED
a0010bf0: e1a06001 mov r6, r1 <== NOT EXECUTED
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
a0010bf4: e3530000 cmp r3, #0 <== NOT EXECUTED
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
a0010bf8: e20250ff and r5, r2, #255 ; 0xff <== NOT EXECUTED
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
a0010bfc: 0a000002 beq a0010c0c <_Protected_heap_Walk+0x2c> <== NOT EXECUTED
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
a0010c00: e1a02005 mov r2, r5 <== NOT EXECUTED
}
return status;
}
a0010c04: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
a0010c08: eafffbe7 b a000fbac <_Heap_Walk> <== NOT EXECUTED
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
a0010c0c: e59f402c ldr r4, [pc, #44] ; a0010c40 <_Protected_heap_Walk+0x60><== NOT EXECUTED
a0010c10: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0010c14: ebfff7d7 bl a000eb78 <_API_Mutex_Lock> <== NOT EXECUTED
status = _Heap_Walk( the_heap, source, do_dump );
a0010c18: e1a02005 mov r2, r5 <== NOT EXECUTED
a0010c1c: e1a01006 mov r1, r6 <== NOT EXECUTED
a0010c20: e1a00007 mov r0, r7 <== NOT EXECUTED
a0010c24: ebfffbe0 bl a000fbac <_Heap_Walk> <== NOT EXECUTED
a0010c28: e1a05000 mov r5, r0 <== NOT EXECUTED
_RTEMS_Unlock_allocator();
a0010c2c: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0010c30: ebfff7ec bl a000ebe8 <_API_Mutex_Unlock> <== NOT EXECUTED
} else {
status = _Heap_Walk( the_heap, source, do_dump );
}
return status;
}
a0010c34: e1a00005 mov r0, r5 <== NOT EXECUTED
a0010c38: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a000f98c <_RTEMS_Tasks_Invoke_task_variable_dtor>:
{
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
if (_Thread_Is_executing(the_thread)) {
a000f98c: e59f203c ldr r2, [pc, #60] ; a000f9d0 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x44><== NOT EXECUTED
)
{
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
a000f990: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
void _RTEMS_Tasks_Invoke_task_variable_dtor(
Thread_Control *the_thread,
rtems_task_variable_t *tvp
)
{
a000f994: e92d4010 push {r4, lr} <== NOT EXECUTED
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
if (_Thread_Is_executing(the_thread)) {
a000f998: e5922004 ldr r2, [r2, #4] <== NOT EXECUTED
void _RTEMS_Tasks_Invoke_task_variable_dtor(
Thread_Control *the_thread,
rtems_task_variable_t *tvp
)
{
a000f99c: e1a04001 mov r4, r1 <== NOT EXECUTED
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
if (_Thread_Is_executing(the_thread)) {
a000f9a0: e1520000 cmp r2, r0 <== NOT EXECUTED
value = *tvp->ptr;
a000f9a4: 05912004 ldreq r2, [r1, #4] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
a000f9a8: 05911008 ldreq r1, [r1, #8] <== NOT EXECUTED
} else {
value = tvp->tval;
a000f9ac: 1594000c ldrne r0, [r4, #12] <== NOT EXECUTED
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
if (_Thread_Is_executing(the_thread)) {
value = *tvp->ptr;
a000f9b0: 05920000 ldreq r0, [r2] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
a000f9b4: 05821000 streq r1, [r2] <== NOT EXECUTED
} else {
value = tvp->tval;
}
if ( dtor )
a000f9b8: e3530000 cmp r3, #0 <== NOT EXECUTED
a000f9bc: 0a000000 beq a000f9c4 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x38><== NOT EXECUTED
(*dtor)(value);
a000f9c0: e12fff33 blx r3 <== NOT EXECUTED
_Workspace_Free(tvp);
a000f9c4: e1a00004 mov r0, r4 <== NOT EXECUTED
}
a000f9c8: e8bd4010 pop {r4, lr} <== NOT EXECUTED
}
if ( dtor )
(*dtor)(value);
_Workspace_Free(tvp);
a000f9cc: eafff5fb b a000d1c0 <_Workspace_Free> <== NOT EXECUTED
a000f858 <_RTEMS_tasks_Delete_extension>:
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
a000f858: e92d4030 push {r4, r5, lr}
a000f85c: e1a05001 mov r5, r1
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
a000f860: e5911104 ldr r1, [r1, #260] ; 0x104
deleted->task_variables = NULL;
a000f864: e3a03000 mov r3, #0
a000f868: e5853104 str r3, [r5, #260] ; 0x104
while (tvp) {
a000f86c: e1510003 cmp r1, r3
a000f870: 1a000001 bne a000f87c <_RTEMS_tasks_Delete_extension+0x24>
a000f874: ea000005 b a000f890 <_RTEMS_tasks_Delete_extension+0x38>
next = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
tvp = next;
a000f878: e1a01004 mov r1, r4 <== NOT EXECUTED
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
next = (rtems_task_variable_t *)tvp->next;
a000f87c: e5914000 ldr r4, [r1] <== NOT EXECUTED
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
a000f880: e1a00005 mov r0, r5 <== NOT EXECUTED
a000f884: eb000040 bl a000f98c <_RTEMS_Tasks_Invoke_task_variable_dtor><== NOT EXECUTED
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
a000f888: e3540000 cmp r4, #0 <== NOT EXECUTED
a000f88c: 1afffff9 bne a000f878 <_RTEMS_tasks_Delete_extension+0x20> <== NOT EXECUTED
/*
* Free API specific memory
*/
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
a000f890: e59500f8 ldr r0, [r5, #248] ; 0xf8
a000f894: ebfff649 bl a000d1c0 <_Workspace_Free>
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
a000f898: e3a03000 mov r3, #0
a000f89c: e58530f8 str r3, [r5, #248] ; 0xf8
}
a000f8a0: e8bd8030 pop {r4, r5, pc}
a000f74c <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
a000f74c: e5903104 ldr r3, [r0, #260] ; 0x104
while (tvp) {
a000f750: e3530000 cmp r3, #0
a000f754: 0a000007 beq a000f778 <_RTEMS_tasks_Switch_extension+0x2c>
tvp->tval = *tvp->ptr;
a000f758: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
a000f75c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
a000f760: e592c000 ldr ip, [r2] <== NOT EXECUTED
a000f764: e583c00c str ip, [r3, #12] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
a000f768: e5933000 ldr r3, [r3] <== NOT EXECUTED
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
a000f76c: e5820000 str r0, [r2] <== NOT EXECUTED
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
a000f770: e3530000 cmp r3, #0 <== NOT EXECUTED
a000f774: 1afffff7 bne a000f758 <_RTEMS_tasks_Switch_extension+0xc> <== NOT EXECUTED
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
a000f778: e5913104 ldr r3, [r1, #260] ; 0x104
while (tvp) {
a000f77c: e3530000 cmp r3, #0
a000f780: 012fff1e bxeq lr
tvp->gval = *tvp->ptr;
a000f784: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
*tvp->ptr = tvp->tval;
a000f788: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
a000f78c: e5920000 ldr r0, [r2] <== NOT EXECUTED
a000f790: e5830008 str r0, [r3, #8] <== NOT EXECUTED
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
a000f794: e5933000 ldr r3, [r3] <== NOT EXECUTED
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
a000f798: e5821000 str r1, [r2] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
a000f79c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000f7a0: 1afffff7 bne a000f784 <_RTEMS_tasks_Switch_extension+0x38> <== NOT EXECUTED
a000f7a4: e12fff1e bx lr <== NOT EXECUTED
a000b0a0 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
a000b0a0: e92d4010 push {r4, lr} <== NOT EXECUTED
a000b0a4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000b0a8: e1a01000 mov r1, r0 <== NOT EXECUTED
a000b0ac: e1a0200d mov r2, sp <== NOT EXECUTED
a000b0b0: e59f0094 ldr r0, [pc, #148] ; a000b14c <_Rate_monotonic_Timeout+0xac><== NOT EXECUTED
a000b0b4: eb0007ae bl a000cf74 <_Objects_Get> <== NOT EXECUTED
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000b0b8: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000b0bc: e1a04000 mov r4, r0 <== NOT EXECUTED
a000b0c0: e3530000 cmp r3, #0 <== NOT EXECUTED
a000b0c4: 1a000010 bne a000b10c <_Rate_monotonic_Timeout+0x6c> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_thread = the_period->owner;
a000b0c8: e5900040 ldr r0, [r0, #64] ; 0x40 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
a000b0cc: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
a000b0d0: e3130901 tst r3, #16384 ; 0x4000 <== NOT EXECUTED
a000b0d4: 0a000003 beq a000b0e8 <_Rate_monotonic_Timeout+0x48> <== NOT EXECUTED
a000b0d8: e5902020 ldr r2, [r0, #32] <== NOT EXECUTED
a000b0dc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a000b0e0: e1520003 cmp r2, r3 <== NOT EXECUTED
a000b0e4: 0a000014 beq a000b13c <_Rate_monotonic_Timeout+0x9c> <== NOT EXECUTED
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
a000b0e8: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
a000b0ec: e3530001 cmp r3, #1 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
a000b0f0: 13a03004 movne r3, #4 <== NOT EXECUTED
a000b0f4: 15843038 strne r3, [r4, #56] ; 0x38 <== NOT EXECUTED
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
a000b0f8: 0a000005 beq a000b114 <_Rate_monotonic_Timeout+0x74> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a000b0fc: e59f304c ldr r3, [pc, #76] ; a000b150 <_Rate_monotonic_Timeout+0xb0><== NOT EXECUTED
a000b100: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000b104: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a000b108: e5832000 str r2, [r3] <== NOT EXECUTED
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
a000b10c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000b110: e8bd8010 pop {r4, pc} <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
a000b114: e3a03003 mov r3, #3 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
a000b118: e1a00004 mov r0, r4 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
a000b11c: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
a000b120: ebfffe5d bl a000aa9c <_Rate_monotonic_Initiate_statistics> <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000b124: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000b128: e59f0024 ldr r0, [pc, #36] ; a000b154 <_Rate_monotonic_Timeout+0xb4><== NOT EXECUTED
a000b12c: e2841010 add r1, r4, #16 <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000b130: e584301c str r3, [r4, #28] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000b134: eb000ea2 bl a000ebc4 <_Watchdog_Insert> <== NOT EXECUTED
a000b138: eaffffef b a000b0fc <_Rate_monotonic_Timeout+0x5c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000b13c: e59f1014 ldr r1, [pc, #20] ; a000b158 <_Rate_monotonic_Timeout+0xb8><== NOT EXECUTED
a000b140: eb0009b2 bl a000d810 <_Thread_Clear_state> <== NOT EXECUTED
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
a000b144: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b148: eafffff4 b a000b120 <_Rate_monotonic_Timeout+0x80> <== NOT EXECUTED
a000acf4 <_TOD_Get_uptime_as_timespec>:
*/
void _TOD_Get_uptime_as_timespec(
struct timespec *uptime
)
{
a000acf4: e92d4010 push {r4, lr} <== NOT EXECUTED
a000acf8: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
a000acfc: e1a04000 mov r4, r0 <== NOT EXECUTED
Timestamp_Control uptime_ts;
/* assume time checked for NULL by caller */
_TOD_Get_uptime( &uptime_ts );
a000ad00: e1a0000d mov r0, sp <== NOT EXECUTED
a000ad04: eb0014ff bl a0010108 <_TOD_Get_uptime> <== NOT EXECUTED
_Timestamp_To_timespec( &uptime_ts, uptime );
a000ad08: e89d000c ldm sp, {r2, r3} <== NOT EXECUTED
a000ad0c: e884000c stm r4, {r2, r3} <== NOT EXECUTED
}
a000ad10: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000ad14: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000c390 <_TOD_Set>:
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000c390: e59f3068 ldr r3, [pc, #104] ; a000c400 <_TOD_Set+0x70>
*/
void _TOD_Set(
const struct timespec *time
)
{
a000c394: e92d4030 push {r4, r5, lr}
a000c398: e5932000 ldr r2, [r3]
a000c39c: e1a05000 mov r5, r0
a000c3a0: e2822001 add r2, r2, #1
a000c3a4: e5832000 str r2, [r3]
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
a000c3a8: e59f4054 ldr r4, [pc, #84] ; a000c404 <_TOD_Set+0x74>
if ( time->tv_sec < seconds )
a000c3ac: e5902000 ldr r2, [r0]
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
a000c3b0: e5943000 ldr r3, [r4]
if ( time->tv_sec < seconds )
a000c3b4: e1530002 cmp r3, r2
a000c3b8: ca00000b bgt a000c3ec <_TOD_Set+0x5c>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
a000c3bc: e59f0044 ldr r0, [pc, #68] ; a000c408 <_TOD_Set+0x78>
a000c3c0: e3a01000 mov r1, #0
a000c3c4: e0632002 rsb r2, r3, r2
a000c3c8: eb0009ea bl a000eb78 <_Watchdog_Adjust>
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
a000c3cc: e895000c ldm r5, {r2, r3}
a000c3d0: e5843004 str r3, [r4, #4]
_TOD_Is_set = true;
a000c3d4: e59f3030 ldr r3, [pc, #48] ; a000c40c <_TOD_Set+0x7c>
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
a000c3d8: e5842000 str r2, [r4]
_TOD_Is_set = true;
a000c3dc: e3a02001 mov r2, #1
a000c3e0: e5c32000 strb r2, [r3]
_TOD_Activate();
_Thread_Enable_dispatch();
}
a000c3e4: e8bd4030 pop {r4, r5, lr}
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
a000c3e8: ea0005c5 b a000db04 <_Thread_Enable_dispatch>
a000c3ec: e59f0014 ldr r0, [pc, #20] ; a000c408 <_TOD_Set+0x78>
a000c3f0: e3a01001 mov r1, #1
a000c3f4: e0622003 rsb r2, r2, r3 <== NOT EXECUTED
a000c3f8: eb0009de bl a000eb78 <_Watchdog_Adjust> <== NOT EXECUTED
a000c3fc: eafffff2 b a000c3cc <_TOD_Set+0x3c> <== NOT EXECUTED
a000a95c <_TOD_Tickle_ticks>:
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
a000a95c: e59f2064 ldr r2, [pc, #100] ; a000a9c8 <_TOD_Tickle_ticks+0x6c>
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
a000a960: e59f3064 ldr r3, [pc, #100] ; a000a9cc <_TOD_Tickle_ticks+0x70>
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
a000a964: e92d4010 push {r4, lr}
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
a000a968: e592100c ldr r1, [r2, #12]
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
a000a96c: e5932000 ldr r2, [r3]
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
a000a970: e3a0cffa mov ip, #1000 ; 0x3e8
a000a974: e00c0c91 mul ip, r1, ip
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
a000a978: e24dd008 sub sp, sp, #8
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
a000a97c: e2822001 add r2, r2, #1
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
a000a980: e3a0e000 mov lr, #0
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
a000a984: e1a0100d mov r1, sp
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
a000a988: e5832000 str r2, [r3]
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
a000a98c: e59f003c ldr r0, [pc, #60] ; a000a9d0 <_TOD_Tickle_ticks+0x74>
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
a000a990: e58de000 str lr, [sp]
a000a994: e58dc004 str ip, [sp, #4]
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
a000a998: eb00084c bl a000cad0 <_Timespec_Add_to>
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
a000a99c: e59f0030 ldr r0, [pc, #48] ; a000a9d4 <_TOD_Tickle_ticks+0x78>
a000a9a0: e1a0100d mov r1, sp
a000a9a4: eb000849 bl a000cad0 <_Timespec_Add_to>
while ( seconds ) {
a000a9a8: e2504000 subs r4, r0, #0
a000a9ac: 0a000003 beq a000a9c0 <_TOD_Tickle_ticks+0x64>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
a000a9b0: e59f0020 ldr r0, [pc, #32] ; a000a9d8 <_TOD_Tickle_ticks+0x7c><== NOT EXECUTED
a000a9b4: eb0009b9 bl a000d0a0 <_Watchdog_Tickle> <== NOT EXECUTED
a000a9b8: e2544001 subs r4, r4, #1 <== NOT EXECUTED
a000a9bc: 1afffffb bne a000a9b0 <_TOD_Tickle_ticks+0x54> <== NOT EXECUTED
_Watchdog_Tickle_seconds();
seconds--;
}
}
a000a9c0: e28dd008 add sp, sp, #8
a000a9c4: e8bd8010 pop {r4, pc}
a000ab08 <_TOD_Validate>:
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
a000ab08: e59f30bc ldr r3, [pc, #188] ; a000abcc <_TOD_Validate+0xc4>
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
a000ab0c: e92d4010 push {r4, lr}
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a000ab10: e2504000 subs r4, r0, #0
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
a000ab14: e593100c ldr r1, [r3, #12]
if ((!the_tod) ||
a000ab18: 0a000029 beq a000abc4 <_TOD_Validate+0xbc>
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
a000ab1c: e3a0093d mov r0, #999424 ; 0xf4000
a000ab20: e2800d09 add r0, r0, #576 ; 0x240
a000ab24: eb0048f1 bl a001cef0 <__aeabi_uidiv>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a000ab28: e5943018 ldr r3, [r4, #24]
a000ab2c: e1500003 cmp r0, r3
a000ab30: 9a00001f bls a000abb4 <_TOD_Validate+0xac>
(the_tod->ticks >= ticks_per_second) ||
a000ab34: e5943014 ldr r3, [r4, #20]
a000ab38: e353003b cmp r3, #59 ; 0x3b
a000ab3c: 8a00001c bhi a000abb4 <_TOD_Validate+0xac>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
a000ab40: e5943010 ldr r3, [r4, #16]
a000ab44: e353003b cmp r3, #59 ; 0x3b
a000ab48: 8a000019 bhi a000abb4 <_TOD_Validate+0xac>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
a000ab4c: e594300c ldr r3, [r4, #12]
a000ab50: e3530017 cmp r3, #23
a000ab54: 8a000016 bhi a000abb4 <_TOD_Validate+0xac>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
a000ab58: e5940004 ldr r0, [r4, #4]
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
a000ab5c: e3500000 cmp r0, #0
a000ab60: 0a000016 beq a000abc0 <_TOD_Validate+0xb8>
(the_tod->month == 0) ||
a000ab64: e350000c cmp r0, #12
a000ab68: 8a000011 bhi a000abb4 <_TOD_Validate+0xac>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a000ab6c: e5942000 ldr r2, [r4]
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
a000ab70: e3a03d1f mov r3, #1984 ; 0x7c0
a000ab74: e2833003 add r3, r3, #3
a000ab78: e1520003 cmp r2, r3
a000ab7c: 9a00000c bls a000abb4 <_TOD_Validate+0xac>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
a000ab80: e5944008 ldr r4, [r4, #8]
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a000ab84: e3540000 cmp r4, #0
a000ab88: 0a00000b beq a000abbc <_TOD_Validate+0xb4>
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
a000ab8c: e3120003 tst r2, #3
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
a000ab90: 059f3038 ldreq r3, [pc, #56] ; a000abd0 <_TOD_Validate+0xc8>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a000ab94: 159f3034 ldrne r3, [pc, #52] ; a000abd0 <_TOD_Validate+0xc8>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
a000ab98: 0280000d addeq r0, r0, #13
a000ab9c: 07930100 ldreq r0, [r3, r0, lsl #2]
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a000aba0: 17930100 ldrne r0, [r3, r0, lsl #2]
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
a000aba4: e1500004 cmp r0, r4
a000aba8: 33a00000 movcc r0, #0
a000abac: 23a00001 movcs r0, #1
a000abb0: e8bd8010 pop {r4, pc}
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
a000abb4: e3a00000 mov r0, #0 <== NOT EXECUTED
a000abb8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000abbc: e1a00004 mov r0, r4 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
a000abc0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
a000abc4: e1a00004 mov r0, r4 <== NOT EXECUTED
a000abc8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000bc10 <_Thread_Close>:
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
a000bc10: e1d120b8 ldrh r2, [r1, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000bc14: e590301c ldr r3, [r0, #28]
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
a000bc18: e92d4070 push {r4, r5, r6, lr}
a000bc1c: e1a04001 mov r4, r1
a000bc20: e3a01000 mov r1, #0
a000bc24: e7831102 str r1, [r3, r2, lsl #2]
a000bc28: e1a05000 mov r5, r0
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a000bc2c: e59f6098 ldr r6, [pc, #152] ; a000bccc <_Thread_Close+0xbc>
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
a000bc30: e1a00004 mov r0, r4
a000bc34: e5963000 ldr r3, [r6]
a000bc38: e2433001 sub r3, r3, #1
a000bc3c: e5863000 str r3, [r6]
a000bc40: eb000446 bl a000cd60 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000bc44: e5963000 ldr r3, [r6]
a000bc48: e2833001 add r3, r3, #1
a000bc4c: e5863000 str r3, [r6]
/*
* Now we are in a dispatching critical section again and we
* can take the thread OUT of the published set. It is invalid
* to use this thread's Id OR name after this call.
*/
_Objects_Close( information, &the_thread->Object );
a000bc50: e1a01004 mov r1, r4
a000bc54: e1a00005 mov r0, r5
a000bc58: ebfffca0 bl a000aee0 <_Objects_Close>
/*
* By setting the dormant state, the thread will not be considered
* for scheduling when we remove any blocking states.
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
a000bc5c: e1a00004 mov r0, r4
a000bc60: e3a01001 mov r1, #1
a000bc64: eb0002e7 bl a000c808 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
a000bc68: e1a00004 mov r0, r4
a000bc6c: eb00027e bl a000c66c <_Thread_queue_Extract_with_proxy>
a000bc70: e3500000 cmp r0, #0
a000bc74: 1a000002 bne a000bc84 <_Thread_Close+0x74>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
a000bc78: e5943050 ldr r3, [r4, #80] ; 0x50
a000bc7c: e3530002 cmp r3, #2
a000bc80: 0a00000e beq a000bcc0 <_Thread_Close+0xb0>
RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_free(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return the_scheduler->Operations.scheduler_free( the_scheduler, the_thread );
a000bc84: e59f0044 ldr r0, [pc, #68] ; a000bcd0 <_Thread_Close+0xc0>
a000bc88: e1a01004 mov r1, r4
a000bc8c: e5903018 ldr r3, [r0, #24]
a000bc90: e12fff33 blx r3
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
a000bc94: e1a00004 mov r0, r4
a000bc98: eb000331 bl a000c964 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
a000bc9c: e5940100 ldr r0, [r4, #256] ; 0x100
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
a000bca0: e3a03000 mov r3, #0
a000bca4: e58430c0 str r3, [r4, #192] ; 0xc0
if ( the_thread->extensions )
a000bca8: e1500003 cmp r0, r3
a000bcac: 0a000000 beq a000bcb4 <_Thread_Close+0xa4>
(void) _Workspace_Free( the_thread->extensions );
a000bcb0: eb000542 bl a000d1c0 <_Workspace_Free>
the_thread->extensions = NULL;
a000bcb4: e3a03000 mov r3, #0
a000bcb8: e5843100 str r3, [r4, #256] ; 0x100
}
a000bcbc: e8bd8070 pop {r4, r5, r6, pc}
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
a000bcc0: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000bcc4: eb0004ca bl a000cff4 <_Watchdog_Remove> <== NOT EXECUTED
a000bcc8: eaffffed b a000bc84 <_Thread_Close+0x74> <== NOT EXECUTED
a000bdec <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
a000bdec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
a000bdf0: e59f7138 ldr r7, [pc, #312] ; a000bf30 <_Thread_Dispatch+0x144>
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
a000bdf4: e24dd010 sub sp, sp, #16
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
a000bdf8: e5975004 ldr r5, [r7, #4]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000bdfc: e10f2000 mrs r2, CPSR
a000be00: e3823080 orr r3, r2, #128 ; 0x80
a000be04: e129f003 msr CPSR_fc, r3
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
a000be08: e5d71010 ldrb r1, [r7, #16]
a000be0c: e3510000 cmp r1, #0
a000be10: 0a000043 beq a000bf24 <_Thread_Dispatch+0x138>
heir = _Thread_Heir;
a000be14: e5974008 ldr r4, [r7, #8]
_Thread_Dispatch_disable_level = 1;
a000be18: e59f9114 ldr r9, [pc, #276] ; a000bf34 <_Thread_Dispatch+0x148>
a000be1c: e3a00001 mov r0, #1
_Thread_Dispatch_necessary = false;
a000be20: e3a01000 mov r1, #0
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
a000be24: e1550004 cmp r5, r4
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
a000be28: e5890000 str r0, [r9]
_Thread_Dispatch_necessary = false;
_Thread_Executing = heir;
a000be2c: e5874004 str r4, [r7, #4]
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
a000be30: e5c71010 strb r1, [r7, #16]
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
a000be34: 01a03002 moveq r3, r2
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
a000be38: 0a000033 beq a000bf0c <_Thread_Dispatch+0x120>
a000be3c: e28da008 add sl, sp, #8
a000be40: e1a0800d mov r8, sp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
a000be44: e1a06007 mov r6, r7
a000be48: ea000007 b a000be6c <_Thread_Dispatch+0x80>
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
a000be4c: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED
_Thread_Dispatch_disable_level = 1;
a000be50: e3a01001 mov r1, #1 <== NOT EXECUTED
_Thread_Dispatch_necessary = false;
a000be54: e3a0b000 mov fp, #0 <== NOT EXECUTED
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
a000be58: e1540005 cmp r4, r5 <== NOT EXECUTED
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
a000be5c: e5891000 str r1, [r9] <== NOT EXECUTED
_Thread_Dispatch_necessary = false;
_Thread_Executing = heir;
a000be60: e5864004 str r4, [r6, #4] <== NOT EXECUTED
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
a000be64: e5c6b010 strb fp, [r6, #16] <== NOT EXECUTED
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
a000be68: 0a000027 beq a000bf0c <_Thread_Dispatch+0x120> <== NOT EXECUTED
*/
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
a000be6c: e594307c ldr r3, [r4, #124] ; 0x7c
a000be70: e3530001 cmp r3, #1
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
a000be74: 059fc0bc ldreq ip, [pc, #188] ; a000bf38 <_Thread_Dispatch+0x14c>
a000be78: 059c3000 ldreq r3, [ip]
a000be7c: 05843078 streq r3, [r4, #120] ; 0x78
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000be80: e129f002 msr CPSR_fc, r2
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
a000be84: e1a0000a mov r0, sl
a000be88: eb000f72 bl a000fc58 <_TOD_Get_uptime>
_Timestamp_Subtract(
a000be8c: e1a0200d mov r2, sp
a000be90: e1a0100a mov r1, sl
a000be94: e59f00a0 ldr r0, [pc, #160] ; a000bf3c <_Thread_Dispatch+0x150>
a000be98: eb000323 bl a000cb2c <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
a000be9c: e1a0100d mov r1, sp
a000bea0: e2850084 add r0, r5, #132 ; 0x84
a000bea4: eb000309 bl a000cad0 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
a000bea8: e28dc008 add ip, sp, #8
a000beac: e89c1800 ldm ip, {fp, ip}
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
a000beb0: e59f2088 ldr r2, [pc, #136] ; a000bf40 <_Thread_Dispatch+0x154>
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
a000beb4: e1a00005 mov r0, r5
a000beb8: e1a01004 mov r1, r4
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
a000bebc: e5923000 ldr r3, [r2]
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
a000bec0: e59f2074 ldr r2, [pc, #116] ; a000bf3c <_Thread_Dispatch+0x150>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
a000bec4: e3530000 cmp r3, #0
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
a000bec8: e8821800 stm r2, {fp, ip}
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
a000becc: 15932000 ldrne r2, [r3]
a000bed0: 158520f4 strne r2, [r5, #244] ; 0xf4
*_Thread_libc_reent = heir->libc_reent;
a000bed4: 159420f4 ldrne r2, [r4, #244] ; 0xf4
a000bed8: 15832000 strne r2, [r3]
}
_User_extensions_Thread_switch( executing, heir );
a000bedc: eb0003c5 bl a000cdf8 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
a000bee0: e28500c4 add r0, r5, #196 ; 0xc4
a000bee4: e28410c4 add r1, r4, #196 ; 0xc4
a000bee8: eb000594 bl a000d540 <_CPU_Context_switch>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
a000beec: e5975004 ldr r5, [r7, #4]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000bef0: e10f3000 mrs r3, CPSR
a000bef4: e3832080 orr r2, r3, #128 ; 0x80
a000bef8: e129f002 msr CPSR_fc, r2
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
a000befc: e5d71010 ldrb r1, [r7, #16]
a000bf00: e1a02003 mov r2, r3
a000bf04: e3510000 cmp r1, #0
a000bf08: 1affffcf bne a000be4c <_Thread_Dispatch+0x60>
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
a000bf0c: e3a01000 mov r1, #0
a000bf10: e5891000 str r1, [r9]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000bf14: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_API_extensions_Run_postswitch();
a000bf18: ebfff907 bl a000a33c <_API_extensions_Run_postswitch>
}
a000bf1c: e28dd010 add sp, sp, #16
a000bf20: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
a000bf24: e1a03002 mov r3, r2
a000bf28: e59f9004 ldr r9, [pc, #4] ; a000bf34 <_Thread_Dispatch+0x148>
a000bf2c: eafffff6 b a000bf0c <_Thread_Dispatch+0x120>
a001133c <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a001133c: e92d4030 push {r4, r5, lr}
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
a0011340: e590c0a4 ldr ip, [r0, #164] ; 0xa4
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
a0011344: e5d0e0a0 ldrb lr, [r0, #160] ; 0xa0
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
a0011348: e59030a8 ldr r3, [r0, #168] ; 0xa8
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
a001134c: e3a05000 mov r5, #0
a0011350: e580501c str r5, [r0, #28]
the_thread->is_preemptible = the_thread->Start.is_preemptible;
a0011354: e5c0e074 strb lr, [r0, #116] ; 0x74
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
a0011358: e580c07c str ip, [r0, #124] ; 0x7c
the_thread->budget_callout = the_thread->Start.budget_callout;
a001135c: e5803080 str r3, [r0, #128] ; 0x80
the_thread->Start.pointer_argument = pointer_argument;
a0011360: e5801098 str r1, [r0, #152] ; 0x98
the_thread->Start.numeric_argument = numeric_argument;
a0011364: e580209c str r2, [r0, #156] ; 0x9c
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a0011368: e1a04000 mov r4, r0
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
a001136c: ebfff004 bl a000d384 <_Thread_queue_Extract_with_proxy>
a0011370: e1500005 cmp r0, r5
a0011374: 1a000002 bne a0011384 <_Thread_Reset+0x48>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
a0011378: e5943050 ldr r3, [r4, #80] ; 0x50
a001137c: e3530002 cmp r3, #2
a0011380: 0a000008 beq a00113a8 <_Thread_Reset+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
a0011384: e59410b0 ldr r1, [r4, #176] ; 0xb0
a0011388: e5943014 ldr r3, [r4, #20]
a001138c: e1530001 cmp r3, r1
a0011390: 0a000003 beq a00113a4 <_Thread_Reset+0x68>
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
a0011394: e1a00004 mov r0, r4
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
a0011398: e5841018 str r1, [r4, #24]
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
}
}
a001139c: e8bd4030 pop {r4, r5, lr}
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
a00113a0: eafff071 b a000d56c <_Thread_Set_priority>
a00113a4: e8bd8030 pop {r4, r5, pc}
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
a00113a8: e2840048 add r0, r4, #72 ; 0x48
a00113ac: ebfff286 bl a000ddcc <_Watchdog_Remove> <== NOT EXECUTED
a00113b0: eafffff3 b a0011384 <_Thread_Reset+0x48> <== NOT EXECUTED
a000fbe4 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
a000fbe4: e92d4010 push {r4, lr}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000fbe8: e10f4000 mrs r4, CPSR
a000fbec: e3843080 orr r3, r4, #128 ; 0x80
a000fbf0: e129f003 msr CPSR_fc, r3
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
current_state = the_thread->current_state;
a000fbf4: e5903010 ldr r3, [r0, #16]
if ( current_state & STATES_SUSPENDED ) {
a000fbf8: e3130002 tst r3, #2
a000fbfc: 0a000003 beq a000fc10 <_Thread_Resume+0x2c>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
a000fc00: e3c33002 bic r3, r3, #2
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
a000fc04: e3530000 cmp r3, #0
_ISR_Disable( level );
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
a000fc08: e5803010 str r3, [r0, #16]
if ( _States_Is_ready( current_state ) ) {
a000fc0c: 0a000001 beq a000fc18 <_Thread_Resume+0x34>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000fc10: e129f004 msr CPSR_fc, r4
_Scheduler_Unblock( &_Scheduler, the_thread );
}
}
_ISR_Enable( level );
}
a000fc14: e8bd8010 pop {r4, pc}
RTEMS_INLINE_ROUTINE void _Scheduler_Unblock(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
the_scheduler->Operations.unblock( the_scheduler, the_thread );
a000fc18: e59f2014 ldr r2, [pc, #20] ; a000fc34 <_Thread_Resume+0x50>
a000fc1c: e1a01000 mov r1, r0
a000fc20: e5923010 ldr r3, [r2, #16]
a000fc24: e1a00002 mov r0, r2
a000fc28: e12fff33 blx r3
a000fc2c: e129f004 msr CPSR_fc, r4
a000fc30: e8bd8010 pop {r4, pc}
a000c9e0 <_Thread_Start>:
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
a000c9e0: e590c010 ldr ip, [r0, #16]
Thread_Start_types the_prototype,
void *entry_point,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a000c9e4: e92d4010 push {r4, lr}
if ( _States_Is_dormant( the_thread->current_state ) ) {
a000c9e8: e21cc001 ands ip, ip, #1
Thread_Start_types the_prototype,
void *entry_point,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a000c9ec: e1a04000 mov r4, r0
if ( _States_Is_dormant( the_thread->current_state ) ) {
a000c9f0: 1a000001 bne a000c9fc <_Thread_Start+0x1c>
_User_extensions_Thread_start( the_thread );
return true;
}
return false;
a000c9f4: e1a0000c mov r0, ip <== NOT EXECUTED
}
a000c9f8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( _States_Is_dormant( the_thread->current_state ) ) {
the_thread->Start.entry_point = (Thread_Entry) entry_point;
the_thread->Start.prototype = the_prototype;
the_thread->Start.pointer_argument = pointer_argument;
a000c9fc: e5803098 str r3, [r0, #152] ; 0x98
the_thread->Start.numeric_argument = numeric_argument;
a000ca00: e59d3008 ldr r3, [sp, #8]
Thread_Entry_numeric_type numeric_argument
)
{
if ( _States_Is_dormant( the_thread->current_state ) ) {
the_thread->Start.entry_point = (Thread_Entry) entry_point;
a000ca04: e5802090 str r2, [r0, #144] ; 0x90
the_thread->Start.prototype = the_prototype;
a000ca08: e5801094 str r1, [r0, #148] ; 0x94
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
a000ca0c: e580309c str r3, [r0, #156] ; 0x9c
_Thread_Load_environment( the_thread );
a000ca10: eb000df7 bl a00101f4 <_Thread_Load_environment>
_Thread_Ready( the_thread );
a000ca14: e1a00004 mov r0, r4
a000ca18: eb000e9b bl a001048c <_Thread_Ready>
_User_extensions_Thread_start( the_thread );
a000ca1c: e1a00004 mov r0, r4
a000ca20: eb0000e1 bl a000cdac <_User_extensions_Thread_start>
return true;
a000ca24: e3a00001 mov r0, #1
a000ca28: e8bd8010 pop {r4, pc}
a0010014 <_Thread_Suspend>:
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
a0010014: e92d4010 push {r4, lr}
a0010018: e1a01000 mov r1, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a001001c: e10f4000 mrs r4, CPSR
a0010020: e3843080 orr r3, r4, #128 ; 0x80
a0010024: e129f003 msr CPSR_fc, r3
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_ready( the_thread->current_state ) ) {
a0010028: e5903010 ldr r3, [r0, #16]
a001002c: e3530000 cmp r3, #0
a0010030: 0a000003 beq a0010044 <_Thread_Suspend+0x30>
RTEMS_INLINE_ROUTINE States_Control _States_Set (
States_Control states_to_set,
States_Control current_state
)
{
return (current_state | states_to_set);
a0010034: e3833002 orr r3, r3, #2
the_thread->current_state =
a0010038: e5803010 str r3, [r0, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a001003c: e129f004 msr CPSR_fc, r4
a0010040: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0010044: e59f0014 ldr r0, [pc, #20] ; a0010060 <_Thread_Suspend+0x4c>
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
a0010048: e3a03002 mov r3, #2
a001004c: e5813010 str r3, [r1, #16]
a0010050: e590300c ldr r3, [r0, #12]
a0010054: e12fff33 blx r3
a0010058: e129f004 msr CPSR_fc, r4
a001005c: e8bd8010 pop {r4, pc}
a000ca2c <_Thread_Tickle_timeslice>:
void _Thread_Tickle_timeslice( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
a000ca2c: e59f3090 ldr r3, [pc, #144] ; a000cac4 <_Thread_Tickle_timeslice+0x98>
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
a000ca30: e92d4010 push {r4, lr}
Thread_Control *executing;
executing = _Thread_Executing;
a000ca34: e5934004 ldr r4, [r3, #4]
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
a000ca38: e5d43074 ldrb r3, [r4, #116] ; 0x74
a000ca3c: e3530000 cmp r3, #0
a000ca40: 0a000009 beq a000ca6c <_Thread_Tickle_timeslice+0x40>
return;
if ( !_States_Is_ready( executing->current_state ) )
a000ca44: e5943010 ldr r3, [r4, #16]
a000ca48: e3530000 cmp r3, #0
a000ca4c: 1a000006 bne a000ca6c <_Thread_Tickle_timeslice+0x40>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
a000ca50: e594307c ldr r3, [r4, #124] ; 0x7c
a000ca54: e3530001 cmp r3, #1
a000ca58: 3a000003 bcc a000ca6c <_Thread_Tickle_timeslice+0x40>
a000ca5c: e3530002 cmp r3, #2 <== NOT EXECUTED
a000ca60: 9a00000b bls a000ca94 <_Thread_Tickle_timeslice+0x68> <== NOT EXECUTED
a000ca64: e3530003 cmp r3, #3 <== NOT EXECUTED
a000ca68: 0a000000 beq a000ca70 <_Thread_Tickle_timeslice+0x44> <== NOT EXECUTED
a000ca6c: e8bd8010 pop {r4, pc}
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
a000ca70: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED
a000ca74: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a000ca78: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ca7c: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
a000ca80: 1afffff9 bne a000ca6c <_Thread_Tickle_timeslice+0x40> <== NOT EXECUTED
(*executing->budget_callout)( executing );
a000ca84: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
a000ca88: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ca8c: e12fff33 blx r3 <== NOT EXECUTED
a000ca90: eafffff5 b a000ca6c <_Thread_Tickle_timeslice+0x40> <== NOT EXECUTED
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
a000ca94: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED
a000ca98: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a000ca9c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000caa0: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
a000caa4: cafffff0 bgt a000ca6c <_Thread_Tickle_timeslice+0x40> <== NOT EXECUTED
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield( &_Scheduler );
a000caa8: e59f0018 ldr r0, [pc, #24] ; a000cac8 <_Thread_Tickle_timeslice+0x9c><== NOT EXECUTED
a000caac: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED
a000cab0: e12fff33 blx r3 <== NOT EXECUTED
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Scheduler_Yield( );
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
a000cab4: e59f3010 ldr r3, [pc, #16] ; a000cacc <_Thread_Tickle_timeslice+0xa0><== NOT EXECUTED
a000cab8: e5933000 ldr r3, [r3] <== NOT EXECUTED
a000cabc: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
a000cac0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000b9ec <_Thread_blocking_operation_Cancel>:
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
a000b9ec: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== 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 ) ) {
a000b9f0: e5913050 ldr r3, [r1, #80] ; 0x50 <== NOT EXECUTED
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
a000b9f4: e24dd004 sub sp, sp, #4 <== 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 ) ) {
a000b9f8: e3530002 cmp r3, #2 <== NOT EXECUTED
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
a000b9fc: e3a03000 mov r3, #0 <== NOT EXECUTED
a000ba00: e5813044 str r3, [r1, #68] ; 0x44 <== 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 ) ) {
a000ba04: 0a000005 beq a000ba20 <_Thread_blocking_operation_Cancel+0x34><== NOT EXECUTED
a000ba08: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000ba0c: e1a00001 mov r0, r1 <== NOT EXECUTED
a000ba10: e59f1028 ldr r1, [pc, #40] ; a000ba40 <_Thread_blocking_operation_Cancel+0x54><== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a000ba14: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000ba18: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
a000ba1c: ea000066 b a000bbbc <_Thread_Clear_state> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a000ba20: e3a03003 mov r3, #3 <== NOT EXECUTED
a000ba24: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED
a000ba28: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
* 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 );
(void) _Watchdog_Remove( &the_thread->Timer );
a000ba2c: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED
a000ba30: e58d1000 str r1, [sp] <== NOT EXECUTED
a000ba34: eb00056e bl a000cff4 <_Watchdog_Remove> <== NOT EXECUTED
a000ba38: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a000ba3c: eafffff2 b a000ba0c <_Thread_blocking_operation_Cancel+0x20><== NOT EXECUTED
a0010244 <_Thread_queue_Dequeue_fifo>:
*/
Thread_Control *_Thread_queue_Dequeue_fifo(
Thread_queue_Control *the_thread_queue
)
{
a0010244: e92d4030 push {r4, r5, lr}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0010248: e10f2000 mrs r2, CPSR
a001024c: e3823080 orr r3, r2, #128 ; 0x80
a0010250: e129f003 msr CPSR_fc, r3
return the_thread;
}
_ISR_Enable( level );
return NULL;
}
a0010254: e1a03000 mov r3, r0
a0010258: e4934004 ldr r4, [r3], #4
{
ISR_Level level;
Thread_Control *the_thread;
_ISR_Disable( level );
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) {
a001025c: e1540003 cmp r4, r3
a0010260: 0a000018 beq a00102c8 <_Thread_queue_Dequeue_fifo+0x84>
the_thread = (Thread_Control *)
_Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a0010264: e5941050 ldr r1, [r4, #80] ; 0x50
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
a0010268: e5943000 ldr r3, [r4]
Thread_Control *the_thread;
_ISR_Disable( level );
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) {
the_thread = (Thread_Control *)
a001026c: e1a05004 mov r5, r4
_Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a0010270: e3510002 cmp r1, #2
head->next = new_first;
a0010274: e5803000 str r3, [r0]
new_first->previous = head;
a0010278: e5830004 str r0, [r3, #4]
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) {
the_thread = (Thread_Control *)
_Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo );
the_thread->Wait.queue = NULL;
a001027c: e3a03000 mov r3, #0
a0010280: e5843044 str r3, [r4, #68] ; 0x44
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a0010284: 0a000005 beq a00102a0 <_Thread_queue_Dequeue_fifo+0x5c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0010288: e129f002 msr CPSR_fc, r2
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a001028c: e59f1040 ldr r1, [pc, #64] ; a00102d4 <_Thread_queue_Dequeue_fifo+0x90>
a0010290: e1a00004 mov r0, r4
a0010294: ebffee48 bl a000bbbc <_Thread_Clear_state>
return the_thread;
}
_ISR_Enable( level );
return NULL;
}
a0010298: e1a00005 mov r0, r5
a001029c: e8bd8030 pop {r4, r5, pc}
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a00102a0: e3a03003 mov r3, #3 <== NOT EXECUTED
a00102a4: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED
a00102a8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a00102ac: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a00102b0: ebfff34f bl a000cff4 <_Watchdog_Remove> <== NOT EXECUTED
a00102b4: e1a00004 mov r0, r4 <== NOT EXECUTED
a00102b8: e59f1014 ldr r1, [pc, #20] ; a00102d4 <_Thread_queue_Dequeue_fifo+0x90><== NOT EXECUTED
a00102bc: ebffee3e bl a000bbbc <_Thread_Clear_state> <== NOT EXECUTED
return the_thread;
}
_ISR_Enable( level );
return NULL;
}
a00102c0: e1a00005 mov r0, r5 <== NOT EXECUTED
a00102c4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a00102c8: e129f002 msr CPSR_fc, r2
return the_thread;
}
_ISR_Enable( level );
return NULL;
a00102cc: e3a05000 mov r5, #0
a00102d0: eafffff0 b a0010298 <_Thread_queue_Dequeue_fifo+0x54>
a000c300 <_Thread_queue_Dequeue_priority>:
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
a000c300: e92d4070 push {r4, r5, r6, lr}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000c304: e10f6000 mrs r6, CPSR
a000c308: e3863080 orr r3, r6, #128 ; 0x80
a000c30c: e129f003 msr CPSR_fc, r3
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
a000c310: e3a02000 mov r2, #0
for( index=0 ;
a000c314: e1a03002 mov r3, r2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000c318: e3a0c00c mov ip, #12
a000c31c: e001039c mul r1, ip, r3
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
a000c320: e7904002 ldr r4, [r0, r2]
a000c324: e2811004 add r1, r1, #4
a000c328: e0801001 add r1, r0, r1
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
a000c32c: e1540001 cmp r4, r1
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a000c330: e2833001 add r3, r3, #1
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
a000c334: 1a000006 bne a000c354 <_Thread_queue_Dequeue_priority+0x54>
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
a000c338: e3530004 cmp r3, #4
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a000c33c: e282200c add r2, r2, #12
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
a000c340: 1afffff5 bne a000c31c <_Thread_queue_Dequeue_priority+0x1c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000c344: e129f006 msr CPSR_fc, r6
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
return NULL;
a000c348: e3a05000 mov r5, #0
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
a000c34c: e1a00005 mov r0, r5
a000c350: e8bd8070 pop {r4, r5, r6, pc}
a000c354: e5943038 ldr r3, [r4, #56] ; 0x38
a000c358: e284203c add r2, r4, #60 ; 0x3c
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
the_thread = (Thread_Control *) _Chain_First(
a000c35c: e1a05004 mov r5, r4
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000c360: e1530002 cmp r3, r2
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
a000c364: e3a02000 mov r2, #0
a000c368: e5842044 str r2, [r4, #68] ; 0x44
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
a000c36c: e5941004 ldr r1, [r4, #4]
dequeue:
the_thread->Wait.queue = NULL;
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
a000c370: e5942000 ldr r2, [r4]
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000c374: 0a000020 beq a000c3fc <_Thread_queue_Dequeue_priority+0xfc>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
a000c378: e5940040 ldr r0, [r4, #64] ; 0x40 <== NOT EXECUTED
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
a000c37c: e593c000 ldr ip, [r3] <== NOT EXECUTED
previous_node->next = new_first_node;
next_node->previous = new_first_node;
a000c380: e5823004 str r3, [r2, #4] <== NOT EXECUTED
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
a000c384: e5813000 str r3, [r1] <== NOT EXECUTED
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
a000c388: e5831004 str r1, [r3, #4] <== NOT EXECUTED
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
next_node->previous = new_first_node;
new_first_node->next = next_node;
a000c38c: e5832000 str r2, [r3] <== NOT EXECUTED
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a000c390: e5941038 ldr r1, [r4, #56] ; 0x38 <== NOT EXECUTED
a000c394: e5942040 ldr r2, [r4, #64] ; 0x40 <== NOT EXECUTED
a000c398: e1510002 cmp r1, r2 <== NOT EXECUTED
a000c39c: 0a000005 beq a000c3b8 <_Thread_queue_Dequeue_priority+0xb8><== NOT EXECUTED
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
a000c3a0: e2831038 add r1, r3, #56 ; 0x38 <== NOT EXECUTED
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
a000c3a4: e283203c add r2, r3, #60 ; 0x3c <== NOT EXECUTED
new_second_node->previous = head;
a000c3a8: e58c1004 str r1, [ip, #4] <== NOT EXECUTED
head->next = new_second_node;
a000c3ac: e583c038 str ip, [r3, #56] ; 0x38 <== NOT EXECUTED
tail->previous = last_node;
a000c3b0: e5830040 str r0, [r3, #64] ; 0x40 <== NOT EXECUTED
last_node->next = tail;
a000c3b4: e5802000 str r2, [r0] <== NOT EXECUTED
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a000c3b8: e5943050 ldr r3, [r4, #80] ; 0x50
a000c3bc: e3530002 cmp r3, #2
a000c3c0: 0a000004 beq a000c3d8 <_Thread_queue_Dequeue_priority+0xd8>
a000c3c4: e129f006 msr CPSR_fc, r6
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000c3c8: e59f1038 ldr r1, [pc, #56] ; a000c408 <_Thread_queue_Dequeue_priority+0x108>
a000c3cc: e1a00004 mov r0, r4
a000c3d0: ebfffdf9 bl a000bbbc <_Thread_Clear_state>
a000c3d4: eaffffdc b a000c34c <_Thread_queue_Dequeue_priority+0x4c>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a000c3d8: e3a03003 mov r3, #3 <== NOT EXECUTED
a000c3dc: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED
a000c3e0: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a000c3e4: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000c3e8: eb000301 bl a000cff4 <_Watchdog_Remove> <== NOT EXECUTED
a000c3ec: e1a00004 mov r0, r4 <== NOT EXECUTED
a000c3f0: e59f1010 ldr r1, [pc, #16] ; a000c408 <_Thread_queue_Dequeue_priority+0x108><== NOT EXECUTED
a000c3f4: ebfffdf0 bl a000bbbc <_Thread_Clear_state> <== NOT EXECUTED
a000c3f8: eaffffd3 b a000c34c <_Thread_queue_Dequeue_priority+0x4c> <== NOT EXECUTED
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
a000c3fc: e5812000 str r2, [r1]
next_node->previous = previous_node;
a000c400: e5821004 str r1, [r2, #4]
a000c404: eaffffeb b a000c3b8 <_Thread_queue_Dequeue_priority+0xb8>
a000c4b8 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
a000c4b8: e5913014 ldr r3, [r1, #20]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
a000c4bc: e92d05f0 push {r4, r5, r6, r7, r8, sl}
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
a000c4c0: e281403c add r4, r1, #60 ; 0x3c
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
a000c4c4: e281c038 add ip, r1, #56 ; 0x38
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a000c4c8: e5814038 str r4, [r1, #56] ; 0x38
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 ) )
a000c4cc: e3130020 tst r3, #32
head->previous = NULL;
a000c4d0: e3a04000 mov r4, #0
tail->previous = head;
a000c4d4: e581c040 str ip, [r1, #64] ; 0x40
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
a000c4d8: e581403c str r4, [r1, #60] ; 0x3c
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
a000c4dc: e1a0c323 lsr ip, r3, #6
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
a000c4e0: e5905038 ldr r5, [r0, #56] ; 0x38
if ( _Thread_queue_Is_reverse_search( priority ) )
a000c4e4: 0a00001e beq a000c564 <_Thread_queue_Enqueue_priority+0xac>
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
a000c4e8: e3a0700c mov r7, #12
a000c4ec: e59fa174 ldr sl, [pc, #372] ; a000c668 <_Thread_queue_Enqueue_priority+0x1b0>
a000c4f0: e027079c mla r7, ip, r7, r0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
a000c4f4: e5da4000 ldrb r4, [sl]
a000c4f8: e2844001 add r4, r4, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000c4fc: e10f8000 mrs r8, CPSR
a000c500: e388c080 orr ip, r8, #128 ; 0x80
a000c504: e129f00c msr CPSR_fc, ip
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
a000c508: e597c008 ldr ip, [r7, #8]
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
a000c50c: e15c0007 cmp ip, r7
a000c510: 1a000009 bne a000c53c <_Thread_queue_Enqueue_priority+0x84>
a000c514: ea00000b b a000c548 <_Thread_queue_Enqueue_priority+0x90>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a000c518: e10f6000 mrs r6, CPSR <== NOT EXECUTED
a000c51c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
a000c520: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
a000c524: e59c6010 ldr r6, [ip, #16] <== NOT EXECUTED
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
a000c528: e1150006 tst r5, r6 <== NOT EXECUTED
a000c52c: 0a000033 beq a000c600 <_Thread_queue_Enqueue_priority+0x148><== NOT EXECUTED
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
a000c530: e59cc004 ldr ip, [ip, #4] <== NOT EXECUTED
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
a000c534: e15c0007 cmp ip, r7 <== NOT EXECUTED
a000c538: 0a000002 beq a000c548 <_Thread_queue_Enqueue_priority+0x90><== NOT EXECUTED
search_priority = search_thread->current_priority;
a000c53c: e59c4014 ldr r4, [ip, #20]
if ( priority >= search_priority )
a000c540: e1530004 cmp r3, r4
a000c544: 3afffff3 bcc a000c518 <_Thread_queue_Enqueue_priority+0x60>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
a000c548: e5905030 ldr r5, [r0, #48] ; 0x30
a000c54c: e3550001 cmp r5, #1
a000c550: 0a00002e beq a000c610 <_Thread_queue_Enqueue_priority+0x158>
* 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;
a000c554: e5828000 str r8, [r2] <== NOT EXECUTED
return the_thread_queue->sync_state;
}
a000c558: e1a00005 mov r0, r5
a000c55c: e8bd05f0 pop {r4, r5, r6, r7, r8, sl}
a000c560: e12fff1e bx lr
a000c564: e3a0400c mov r4, #12
a000c568: e00c0c94 mul ip, r4, ip
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
a000c56c: e28c7004 add r7, ip, #4
a000c570: e080a00c add sl, r0, ip
a000c574: e0807007 add r7, r0, r7
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000c578: e10f8000 mrs r8, CPSR
a000c57c: e388c080 orr ip, r8, #128 ; 0x80
a000c580: e129f00c msr CPSR_fc, ip
a000c584: e59ac000 ldr ip, [sl]
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
a000c588: e15c0007 cmp ip, r7
a000c58c: 1a000009 bne a000c5b8 <_Thread_queue_Enqueue_priority+0x100>
a000c590: ea000032 b a000c660 <_Thread_queue_Enqueue_priority+0x1a8>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a000c594: e10f6000 mrs r6, CPSR
a000c598: e129f008 msr CPSR_fc, r8
a000c59c: e129f006 msr CPSR_fc, r6
a000c5a0: e59c6010 ldr r6, [ip, #16]
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
a000c5a4: e1150006 tst r5, r6
a000c5a8: 0a000016 beq a000c608 <_Thread_queue_Enqueue_priority+0x150>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
a000c5ac: e59cc000 ldr ip, [ip]
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
a000c5b0: e15c0007 cmp ip, r7
a000c5b4: 0a000002 beq a000c5c4 <_Thread_queue_Enqueue_priority+0x10c>
search_priority = search_thread->current_priority;
a000c5b8: e59c4014 ldr r4, [ip, #20]
if ( priority <= search_priority )
a000c5bc: e1530004 cmp r3, r4
a000c5c0: 8afffff3 bhi a000c594 <_Thread_queue_Enqueue_priority+0xdc>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
a000c5c4: e5905030 ldr r5, [r0, #48] ; 0x30
a000c5c8: e3550001 cmp r5, #1
a000c5cc: 1affffe0 bne a000c554 <_Thread_queue_Enqueue_priority+0x9c>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
a000c5d0: e1530004 cmp r3, r4
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000c5d4: e3a03000 mov r3, #0
a000c5d8: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
a000c5dc: 0a000016 beq a000c63c <_Thread_queue_Enqueue_priority+0x184>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
a000c5e0: e59c3004 ldr r3, [ip, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a000c5e4: e581c000 str ip, [r1]
the_node->previous = previous_node;
a000c5e8: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
a000c5ec: e5831000 str r1, [r3]
search_node->previous = the_node;
a000c5f0: e58c1004 str r1, [ip, #4]
the_thread->Wait.queue = the_thread_queue;
a000c5f4: e5810044 str r0, [r1, #68] ; 0x44
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000c5f8: e129f008 msr CPSR_fc, r8
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000c5fc: eaffffd5 b a000c558 <_Thread_queue_Enqueue_priority+0xa0>
a000c600: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
a000c604: eaffffba b a000c4f4 <_Thread_queue_Enqueue_priority+0x3c> <== NOT EXECUTED
a000c608: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
a000c60c: eaffffd9 b a000c578 <_Thread_queue_Enqueue_priority+0xc0> <== NOT EXECUTED
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
a000c610: e1530004 cmp r3, r4
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000c614: e3a03000 mov r3, #0
a000c618: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
a000c61c: 0a000006 beq a000c63c <_Thread_queue_Enqueue_priority+0x184>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
a000c620: e59c3000 ldr r3, [ip]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
a000c624: e8811008 stm r1, {r3, ip}
search_node->next = the_node;
next_node->previous = the_node;
a000c628: e5831004 str r1, [r3, #4]
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;
a000c62c: e58c1000 str r1, [ip]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
a000c630: e5810044 str r0, [r1, #68] ; 0x44
a000c634: e129f008 msr CPSR_fc, r8
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000c638: eaffffc6 b a000c558 <_Thread_queue_Enqueue_priority+0xa0>
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
a000c63c: e59c3040 ldr r3, [ip, #64] ; 0x40 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
_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 );
a000c640: e28c203c add r2, ip, #60 ; 0x3c <== NOT EXECUTED
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a000c644: e881000c stm r1, {r2, r3} <== NOT EXECUTED
the_node->previous = previous_node;
previous_node->next = the_node;
a000c648: e5831000 str r1, [r3] <== NOT EXECUTED
search_node->previous = the_node;
a000c64c: e58c1040 str r1, [ip, #64] ; 0x40 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
a000c650: e5810044 str r0, [r1, #68] ; 0x44 <== NOT EXECUTED
a000c654: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000c658: e3a05001 mov r5, #1 <== NOT EXECUTED
a000c65c: eaffffbd b a000c558 <_Thread_queue_Enqueue_priority+0xa0> <== NOT EXECUTED
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
a000c660: e3e04000 mvn r4, #0
a000c664: eaffffd6 b a000c5c4 <_Thread_queue_Enqueue_priority+0x10c>
a000c40c <_Thread_queue_Enqueue_with_handler>:
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
a000c40c: e59f3094 ldr r3, [pc, #148] ; a000c4a8 <_Thread_queue_Enqueue_with_handler+0x9c>
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
a000c410: e92d40f0 push {r4, r5, r6, r7, lr}
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
a000c414: e5934004 ldr r4, [r3, #4]
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
a000c418: e1a06001 mov r6, r1
a000c41c: e24dd004 sub sp, sp, #4
else
#endif
/*
* Set the blocking state for this thread queue in the thread.
*/
_Thread_Set_state( the_thread, the_thread_queue->state );
a000c420: e5901038 ldr r1, [r0, #56] ; 0x38
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
a000c424: e1a05000 mov r5, r0
else
#endif
/*
* Set the blocking state for this thread queue in the thread.
*/
_Thread_Set_state( the_thread, the_thread_queue->state );
a000c428: e1a00004 mov r0, r4
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
a000c42c: e1a07002 mov r7, r2
else
#endif
/*
* Set the blocking state for this thread queue in the thread.
*/
_Thread_Set_state( the_thread, the_thread_queue->state );
a000c430: eb0000f4 bl a000c808 <_Thread_Set_state>
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
a000c434: e3560000 cmp r6, #0
a000c438: 1a00000f bne a000c47c <_Thread_queue_Enqueue_with_handler+0x70>
}
/*
* Now enqueue the thread per the discipline for this thread queue.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
a000c43c: e595c034 ldr ip, [r5, #52] ; 0x34
enqueue_p = _Thread_queue_Enqueue_priority;
a000c440: e59f2064 ldr r2, [pc, #100] ; a000c4ac <_Thread_queue_Enqueue_with_handler+0xa0>
a000c444: e59f3064 ldr r3, [pc, #100] ; a000c4b0 <_Thread_queue_Enqueue_with_handler+0xa4>
a000c448: e35c0001 cmp ip, #1
a000c44c: 01a03002 moveq r3, r2
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
enqueue_p = _Thread_queue_Enqueue_fifo;
sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level );
a000c450: e1a00005 mov r0, r5
a000c454: e1a01004 mov r1, r4
a000c458: e1a0200d mov r2, sp
a000c45c: e12fff33 blx r3
if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
a000c460: e3500001 cmp r0, #1
a000c464: 0a000002 beq a000c474 <_Thread_queue_Enqueue_with_handler+0x68>
_Thread_blocking_operation_Cancel( sync_state, the_thread, level );
a000c468: e1a01004 mov r1, r4 <== NOT EXECUTED
a000c46c: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000c470: ebfffd5d bl a000b9ec <_Thread_blocking_operation_Cancel> <== NOT EXECUTED
}
a000c474: e28dd004 add sp, sp, #4
a000c478: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
_Watchdog_Initialize(
a000c47c: e5942008 ldr r2, [r4, #8]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000c480: e3a03000 mov r3, #0
a000c484: e5843050 str r3, [r4, #80] ; 0x50
the_watchdog->routine = routine;
a000c488: e5847064 str r7, [r4, #100] ; 0x64
the_watchdog->id = id;
a000c48c: e5842068 str r2, [r4, #104] ; 0x68
the_watchdog->user_data = user_data;
a000c490: e584306c str r3, [r4, #108] ; 0x6c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000c494: e5846054 str r6, [r4, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000c498: e59f0014 ldr r0, [pc, #20] ; a000c4b4 <_Thread_queue_Enqueue_with_handler+0xa8>
a000c49c: e2841048 add r1, r4, #72 ; 0x48
a000c4a0: eb000264 bl a000ce38 <_Watchdog_Insert>
a000c4a4: eaffffe4 b a000c43c <_Thread_queue_Enqueue_with_handler+0x30>
a0011f7c <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
a0011f7c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
a0011f80: e24dd004 sub sp, sp, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0011f84: e10f0000 mrs r0, CPSR
a0011f88: e3803080 orr r3, r0, #128 ; 0x80
a0011f8c: e129f003 msr CPSR_fc, r3
a0011f90: e5912010 ldr r2, [r1, #16]
a0011f94: e3a03bef mov r3, #244736 ; 0x3bc00
a0011f98: e2833e2e add r3, r3, #736 ; 0x2e0
a0011f9c: e0023003 and r3, r2, r3
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
a0011fa0: e3530000 cmp r3, #0
a0011fa4: 0a00000d beq a0011fe0 <_Thread_queue_Extract_fifo+0x64>
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a0011fa8: e591c050 ldr ip, [r1, #80] ; 0x50
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
a0011fac: e891000c ldm r1, {r2, r3}
a0011fb0: e35c0002 cmp ip, #2
next->previous = previous;
a0011fb4: e5823004 str r3, [r2, #4]
previous->next = next;
a0011fb8: e5832000 str r2, [r3]
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
a0011fbc: e3a03000 mov r3, #0
a0011fc0: e5813044 str r3, [r1, #68] ; 0x44
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a0011fc4: 0a000008 beq a0011fec <_Thread_queue_Extract_fifo+0x70>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0011fc8: e129f000 msr CPSR_fc, r0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a0011fcc: e1a00001 mov r0, r1
a0011fd0: e59f1034 ldr r1, [pc, #52] ; a001200c <_Thread_queue_Extract_fifo+0x90>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a0011fd4: e28dd004 add sp, sp, #4
a0011fd8: e49de004 pop {lr} ; (ldr lr, [sp], #4)
a0011fdc: eaffe6f6 b a000bbbc <_Thread_Clear_state>
a0011fe0: e129f000 msr CPSR_fc, r0
a0011fe4: e28dd004 add sp, sp, #4
a0011fe8: e8bd8000 pop {pc}
a0011fec: e3a03003 mov r3, #3 <== NOT EXECUTED
a0011ff0: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED
a0011ff4: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a0011ff8: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED
a0011ffc: e58d1000 str r1, [sp] <== NOT EXECUTED
a0012000: ebffebfb bl a000cff4 <_Watchdog_Remove> <== NOT EXECUTED
a0012004: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a0012008: eaffffef b a0011fcc <_Thread_queue_Extract_fifo+0x50> <== NOT EXECUTED
a0010348 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
a0010348: e92d4070 push {r4, r5, r6, lr}
a001034c: e20220ff and r2, r2, #255 ; 0xff
a0010350: e24dd004 sub sp, sp, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0010354: e10fc000 mrs ip, CPSR
a0010358: e38c3080 orr r3, ip, #128 ; 0x80
a001035c: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
a0010360: e5910010 ldr r0, [r1, #16]
a0010364: e3a03bef mov r3, #244736 ; 0x3bc00
a0010368: e2833e2e add r3, r3, #736 ; 0x2e0
a001036c: e0003003 and r3, r0, r3
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
a0010370: e3530000 cmp r3, #0
a0010374: 0a000024 beq a001040c <_Thread_queue_Extract_priority_helper+0xc4>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a0010378: e5913038 ldr r3, [r1, #56] ; 0x38
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a001037c: e281403c add r4, r1, #60 ; 0x3c
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
a0010380: e5910000 ldr r0, [r1]
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a0010384: e1530004 cmp r3, r4
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
previous_node = the_node->previous;
a0010388: e5914004 ldr r4, [r1, #4]
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
a001038c: 05840000 streq r0, [r4]
next_node->previous = previous_node;
a0010390: 05804004 streq r4, [r0, #4]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a0010394: 0a00000e beq a00103d4 <_Thread_queue_Extract_priority_helper+0x8c>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a0010398: e5915040 ldr r5, [r1, #64] ; 0x40 <== NOT EXECUTED
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
a001039c: e5936000 ldr r6, [r3] <== NOT EXECUTED
previous_node->next = new_first_node;
next_node->previous = new_first_node;
a00103a0: e5803004 str r3, [r0, #4] <== NOT EXECUTED
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
a00103a4: e5843000 str r3, [r4] <== NOT EXECUTED
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
a00103a8: e8830011 stm r3, {r0, r4} <== NOT EXECUTED
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a00103ac: e5914038 ldr r4, [r1, #56] ; 0x38 <== NOT EXECUTED
a00103b0: e5910040 ldr r0, [r1, #64] ; 0x40 <== NOT EXECUTED
a00103b4: e1540000 cmp r4, r0 <== NOT EXECUTED
a00103b8: 0a000005 beq a00103d4 <_Thread_queue_Extract_priority_helper+0x8c><== NOT EXECUTED
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
a00103bc: e2834038 add r4, r3, #56 ; 0x38 <== NOT EXECUTED
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
a00103c0: e283003c add r0, r3, #60 ; 0x3c <== NOT EXECUTED
new_second_node->previous = head;
a00103c4: e5864004 str r4, [r6, #4] <== NOT EXECUTED
head->next = new_second_node;
a00103c8: e5836038 str r6, [r3, #56] ; 0x38 <== NOT EXECUTED
tail->previous = last_node;
a00103cc: e5835040 str r5, [r3, #64] ; 0x40 <== NOT EXECUTED
last_node->next = tail;
a00103d0: e5850000 str r0, [r5] <== NOT EXECUTED
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
a00103d4: e3520000 cmp r2, #0
a00103d8: 1a000008 bne a0010400 <_Thread_queue_Extract_priority_helper+0xb8>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a00103dc: e5913050 ldr r3, [r1, #80] ; 0x50 <== NOT EXECUTED
a00103e0: e3530002 cmp r3, #2 <== NOT EXECUTED
a00103e4: 0a00000a beq a0010414 <_Thread_queue_Extract_priority_helper+0xcc><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00103e8: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
a00103ec: e1a00001 mov r0, r1 <== NOT EXECUTED
a00103f0: e59f103c ldr r1, [pc, #60] ; a0010434 <_Thread_queue_Extract_priority_helper+0xec><== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a00103f4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a00103f8: e8bd4070 pop {r4, r5, r6, lr} <== NOT EXECUTED
a00103fc: eaffedee b a000bbbc <_Thread_Clear_state> <== NOT EXECUTED
a0010400: e129f00c msr CPSR_fc, ip
a0010404: e28dd004 add sp, sp, #4
a0010408: e8bd8070 pop {r4, r5, r6, pc}
a001040c: e129f00c msr CPSR_fc, ip
a0010410: eafffffb b a0010404 <_Thread_queue_Extract_priority_helper+0xbc>
a0010414: e3a03003 mov r3, #3 <== NOT EXECUTED
a0010418: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED
a001041c: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a0010420: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED
a0010424: e58d1000 str r1, [sp] <== NOT EXECUTED
a0010428: ebfff2f1 bl a000cff4 <_Watchdog_Remove> <== NOT EXECUTED
a001042c: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a0010430: eaffffed b a00103ec <_Thread_queue_Extract_priority_helper+0xa4><== NOT EXECUTED
a000e920 <_Thread_queue_First_priority>:
*/
Thread_Control *_Thread_queue_First_priority (
Thread_queue_Control *the_thread_queue
)
{
a000e920: e3a03000 mov r3, #0 <== NOT EXECUTED
a000e924: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED
uint32_t index;
for( index=0 ;
a000e928: e1a02003 mov r2, r3 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000e92c: e3a0400c mov r4, #12 <== NOT EXECUTED
a000e930: e00c0294 mul ip, r4, r2 <== NOT EXECUTED
return (Thread_Control *) _Chain_First(
&the_thread_queue->Queues.Priority[ index ]
);
}
return NULL;
}
a000e934: e7901003 ldr r1, [r0, r3] <== NOT EXECUTED
a000e938: e28cc004 add ip, ip, #4 <== NOT EXECUTED
a000e93c: e080c00c add ip, r0, ip <== NOT EXECUTED
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
a000e940: e151000c cmp r1, ip <== NOT EXECUTED
{
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a000e944: e2822001 add r2, r2, #1 <== NOT EXECUTED
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
a000e948: 1a000005 bne a000e964 <_Thread_queue_First_priority+0x44> <== NOT EXECUTED
Thread_queue_Control *the_thread_queue
)
{
uint32_t index;
for( index=0 ;
a000e94c: e3520004 cmp r2, #4 <== NOT EXECUTED
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a000e950: e283300c add r3, r3, #12 <== NOT EXECUTED
Thread_queue_Control *the_thread_queue
)
{
uint32_t index;
for( index=0 ;
a000e954: 1afffff5 bne a000e930 <_Thread_queue_First_priority+0x10> <== NOT EXECUTED
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
return (Thread_Control *) _Chain_First(
&the_thread_queue->Queues.Priority[ index ]
);
}
return NULL;
a000e958: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a000e95c: e8bd0010 pop {r4} <== NOT EXECUTED
a000e960: e12fff1e bx lr <== NOT EXECUTED
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
return (Thread_Control *) _Chain_First(
a000e964: e1a00001 mov r0, r1 <== NOT EXECUTED
a000e968: eafffffb b a000e95c <_Thread_queue_First_priority+0x3c> <== NOT EXECUTED
a0010438 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
a0010438: e1a03000 mov r3, r0 <== NOT EXECUTED
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
a001043c: e5900044 ldr r0, [r0, #68] ; 0x44 <== NOT EXECUTED
* 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 &&
a0010440: e5902030 ldr r2, [r0, #48] ; 0x30 <== NOT EXECUTED
a0010444: e3520000 cmp r2, #0 <== NOT EXECUTED
a0010448: 0a000003 beq a001045c <_Thread_queue_Process_timeout+0x24> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a001044c: e59f1034 ldr r1, [pc, #52] ; a0010488 <_Thread_queue_Process_timeout+0x50><== NOT EXECUTED
a0010450: e5911004 ldr r1, [r1, #4] <== NOT EXECUTED
a0010454: e1530001 cmp r3, r1 <== NOT EXECUTED
a0010458: 0a000003 beq a001046c <_Thread_queue_Process_timeout+0x34> <== 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;
a001045c: e590203c ldr r2, [r0, #60] ; 0x3c <== NOT EXECUTED
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
a0010460: e1a01003 mov r1, r3 <== 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;
a0010464: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
a0010468: eaffffb0 b a0010330 <_Thread_queue_Extract> <== NOT EXECUTED
* 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 ) {
a001046c: e3520003 cmp r2, #3 <== NOT EXECUTED
a0010470: 012fff1e bxeq lr <== NOT EXECUTED
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
a0010474: e590203c ldr r2, [r0, #60] ; 0x3c <== NOT EXECUTED
a0010478: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
a001047c: e3a03002 mov r3, #2 <== NOT EXECUTED
a0010480: e5803030 str r3, [r0, #48] ; 0x30 <== NOT EXECUTED
a0010484: e12fff1e bx lr <== NOT EXECUTED
a000c7a4 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
a000c7a4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
a000c7a8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000c7ac: e1a0100d mov r1, sp <== NOT EXECUTED
a000c7b0: ebfffdec bl a000bf68 <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
a000c7b4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000c7b8: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c7bc: 1a000004 bne a000c7d4 <_Thread_queue_Timeout+0x30> <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
a000c7c0: eb000f1c bl a0010438 <_Thread_queue_Process_timeout> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a000c7c4: e59f3010 ldr r3, [pc, #16] ; a000c7dc <_Thread_queue_Timeout+0x38><== NOT EXECUTED
a000c7c8: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000c7cc: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a000c7d0: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Unnest_dispatch();
break;
}
}
a000c7d4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000c7d8: e8bd8000 pop {pc} <== NOT EXECUTED
a001a350 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
a001a350: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a001a354: e24dd028 sub sp, sp, #40 ; 0x28
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a001a358: e28d101c add r1, sp, #28
a001a35c: e2812004 add r2, r1, #4
a001a360: e28d7010 add r7, sp, #16
head->previous = NULL;
tail->previous = head;
a001a364: e58d1024 str r1, [sp, #36] ; 0x24
a001a368: e59f91d0 ldr r9, [pc, #464] ; a001a540 <_Timer_server_Body+0x1f0>
a001a36c: e2801008 add r1, r0, #8
a001a370: e59fb1cc ldr fp, [pc, #460] ; a001a544 <_Timer_server_Body+0x1f4>
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
a001a374: e3a03000 mov r3, #0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a001a378: e287a004 add sl, r7, #4
a001a37c: e58d1008 str r1, [sp, #8]
a001a380: e2801040 add r1, r0, #64 ; 0x40
a001a384: e1a04000 mov r4, r0
a001a388: e58d201c str r2, [sp, #28]
head->previous = NULL;
a001a38c: e58d3020 str r3, [sp, #32]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a001a390: e58da010 str sl, [sp, #16]
head->previous = NULL;
a001a394: e58d3014 str r3, [sp, #20]
tail->previous = head;
a001a398: e58d7018 str r7, [sp, #24]
a001a39c: e2806030 add r6, r0, #48 ; 0x30
a001a3a0: e2808068 add r8, r0, #104 ; 0x68
a001a3a4: e58d100c str r1, [sp, #12]
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
a001a3a8: e58d2004 str r2, [sp, #4]
Chain_Control *tmp;
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
a001a3ac: e58da000 str sl, [sp]
a001a3b0: e59da004 ldr sl, [sp, #4]
a001a3b4: e28d201c add r2, sp, #28
a001a3b8: e5842078 str r2, [r4, #120] ; 0x78
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
a001a3bc: e5993000 ldr r3, [r9]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
a001a3c0: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a001a3c4: e1a02007 mov r2, r7
a001a3c8: e1a00006 mov r0, r6
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
a001a3cc: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a001a3d0: e0611003 rsb r1, r1, r3
a001a3d4: eb0011b9 bl a001eac0 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
a001a3d8: e59b5000 ldr r5, [fp]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
a001a3dc: e5942074 ldr r2, [r4, #116] ; 0x74
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
a001a3e0: e1550002 cmp r5, r2
a001a3e4: 8a00003c bhi a001a4dc <_Timer_server_Body+0x18c>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
a001a3e8: 3a000032 bcc a001a4b8 <_Timer_server_Body+0x168>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
a001a3ec: e5845074 str r5, [r4, #116] ; 0x74
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
a001a3f0: e5940078 ldr r0, [r4, #120] ; 0x78
a001a3f4: eb0002d1 bl a001af40 <_Chain_Get>
if ( timer == NULL ) {
a001a3f8: e2501000 subs r1, r0, #0
a001a3fc: 0a00000b beq a001a430 <_Timer_server_Body+0xe0>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a001a400: e5913038 ldr r3, [r1, #56] ; 0x38 <== NOT EXECUTED
a001a404: e3530001 cmp r3, #1 <== NOT EXECUTED
a001a408: 0a00002f beq a001a4cc <_Timer_server_Body+0x17c> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
a001a40c: e3530003 cmp r3, #3 <== NOT EXECUTED
a001a410: 1afffff6 bne a001a3f0 <_Timer_server_Body+0xa0> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a001a414: e2811010 add r1, r1, #16 <== NOT EXECUTED
a001a418: e1a00008 mov r0, r8 <== NOT EXECUTED
a001a41c: eb0011d2 bl a001eb6c <_Watchdog_Insert> <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
a001a420: e5940078 ldr r0, [r4, #120] ; 0x78 <== NOT EXECUTED
a001a424: eb0002c5 bl a001af40 <_Chain_Get> <== NOT EXECUTED
if ( timer == NULL ) {
a001a428: e2501000 subs r1, r0, #0 <== NOT EXECUTED
a001a42c: 1afffff3 bne a001a400 <_Timer_server_Body+0xb0> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a001a430: e10f3000 mrs r3, CPSR
a001a434: e3832080 orr r2, r3, #128 ; 0x80
a001a438: e129f002 msr CPSR_fc, r2
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
tmp = ts->insert_chain;
a001a43c: e5942078 ldr r2, [r4, #120] ; 0x78
if ( _Chain_Is_empty( insert_chain ) ) {
a001a440: e59d201c ldr r2, [sp, #28]
a001a444: e152000a cmp r2, sl
ts->insert_chain = NULL;
a001a448: 05841078 streq r1, [r4, #120] ; 0x78
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
tmp = ts->insert_chain;
if ( _Chain_Is_empty( insert_chain ) ) {
a001a44c: 13a01001 movne r1, #1
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a001a450: e129f003 msr CPSR_fc, r3
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
while ( do_loop ) {
a001a454: e3510000 cmp r1, #0
a001a458: 1affffd7 bne a001a3bc <_Timer_server_Body+0x6c>
a001a45c: e59da000 ldr sl, [sp]
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
a001a460: e59d3010 ldr r3, [sp, #16]
a001a464: e153000a cmp r3, sl
a001a468: 1a00000a bne a001a498 <_Timer_server_Body+0x148>
a001a46c: ea00001f b a001a4f0 <_Timer_server_Body+0x1a0>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
a001a470: e5923000 ldr r3, [r2]
head->next = new_first;
new_first->previous = head;
a001a474: e5837004 str r7, [r3, #4]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
a001a478: e58d3010 str r3, [sp, #16]
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
a001a47c: e3a03000 mov r3, #0
a001a480: e5823008 str r3, [r2, #8]
a001a484: e129f001 msr CPSR_fc, r1
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
a001a488: e592301c ldr r3, [r2, #28]
a001a48c: e5920020 ldr r0, [r2, #32]
a001a490: e5921024 ldr r1, [r2, #36] ; 0x24
a001a494: e12fff33 blx r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a001a498: e10f1000 mrs r1, CPSR
a001a49c: e3813080 orr r3, r1, #128 ; 0x80
a001a4a0: e129f003 msr CPSR_fc, r3
initialized = false;
}
#endif
return status;
}
a001a4a4: e59d2010 ldr r2, [sp, #16]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a001a4a8: e152000a cmp r2, sl
a001a4ac: 1affffef bne a001a470 <_Timer_server_Body+0x120>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a001a4b0: e129f001 msr CPSR_fc, r1
a001a4b4: eaffffbc b a001a3ac <_Timer_server_Body+0x5c>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
a001a4b8: e1a00008 mov r0, r8 <== NOT EXECUTED
a001a4bc: e3a01001 mov r1, #1 <== NOT EXECUTED
a001a4c0: e0652002 rsb r2, r5, r2 <== NOT EXECUTED
a001a4c4: eb00114c bl a001e9fc <_Watchdog_Adjust> <== NOT EXECUTED
a001a4c8: eaffffc7 b a001a3ec <_Timer_server_Body+0x9c> <== NOT EXECUTED
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
a001a4cc: e1a00006 mov r0, r6 <== NOT EXECUTED
a001a4d0: e2811010 add r1, r1, #16 <== NOT EXECUTED
a001a4d4: eb0011a4 bl a001eb6c <_Watchdog_Insert> <== NOT EXECUTED
a001a4d8: eaffffc4 b a001a3f0 <_Timer_server_Body+0xa0> <== NOT EXECUTED
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a001a4dc: e0621005 rsb r1, r2, r5
a001a4e0: e1a00008 mov r0, r8
a001a4e4: e1a02007 mov r2, r7
a001a4e8: eb001174 bl a001eac0 <_Watchdog_Adjust_to_chain>
a001a4ec: eaffffbe b a001a3ec <_Timer_server_Body+0x9c>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
a001a4f0: e5c4107c strb r1, [r4, #124] ; 0x7c
a001a4f4: e59f104c ldr r1, [pc, #76] ; a001a548 <_Timer_server_Body+0x1f8>
a001a4f8: e5913000 ldr r3, [r1]
a001a4fc: e2833001 add r3, r3, #1
a001a500: e5813000 str r3, [r1]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
a001a504: e3a01008 mov r1, #8
a001a508: e5940000 ldr r0, [r4]
a001a50c: eb000f6b bl a001e2c0 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
a001a510: e1a00004 mov r0, r4
a001a514: ebffff61 bl a001a2a0 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
a001a518: e1a00004 mov r0, r4
a001a51c: ebffff75 bl a001a2f8 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
a001a520: eb000d03 bl a001d934 <_Thread_Enable_dispatch>
ts->active = true;
a001a524: e3a02001 mov r2, #1
a001a528: e5c4207c strb r2, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
a001a52c: e59d0008 ldr r0, [sp, #8]
a001a530: eb0011fc bl a001ed28 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
a001a534: e59d000c ldr r0, [sp, #12]
a001a538: eb0011fa bl a001ed28 <_Watchdog_Remove>
a001a53c: eaffff9a b a001a3ac <_Timer_server_Body+0x5c>
a001a54c <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( ts->insert_chain == NULL ) {
a001a54c: e5902078 ldr r2, [r0, #120] ; 0x78
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
a001a550: e92d4030 push {r4, r5, lr}
if ( ts->insert_chain == NULL ) {
a001a554: e3520000 cmp r2, #0
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
a001a558: e1a04000 mov r4, r0
a001a55c: e1a03001 mov r3, r1
if ( ts->insert_chain == NULL ) {
a001a560: 0a000002 beq a001a570 <_Timer_server_Schedule_operation_method+0x24>
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
a001a564: e5900078 ldr r0, [r0, #120] ; 0x78 <== NOT EXECUTED
}
}
a001a568: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
a001a56c: ea000260 b a001aef4 <_Chain_Append> <== NOT EXECUTED
a001a570: e59f1104 ldr r1, [pc, #260] ; a001a67c <_Timer_server_Schedule_operation_method+0x130>
a001a574: e5910000 ldr r0, [r1]
a001a578: e2800001 add r0, r0, #1
a001a57c: e5810000 str r0, [r1]
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a001a580: e5931038 ldr r1, [r3, #56] ; 0x38
a001a584: e3510001 cmp r1, #1
a001a588: 0a000021 beq a001a614 <_Timer_server_Schedule_operation_method+0xc8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
a001a58c: e3510003 cmp r1, #3
a001a590: 0a000001 beq a001a59c <_Timer_server_Schedule_operation_method+0x50>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
a001a594: e8bd4030 pop {r4, r5, lr}
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
a001a598: ea000ce5 b a001d934 <_Thread_Enable_dispatch>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a001a59c: e10fe000 mrs lr, CPSR
a001a5a0: e38e1080 orr r1, lr, #128 ; 0x80
a001a5a4: e129f001 msr CPSR_fc, r1
initialized = false;
}
#endif
return status;
}
a001a5a8: e5941068 ldr r1, [r4, #104] ; 0x68
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a001a5ac: e284006c add r0, r4, #108 ; 0x6c
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
a001a5b0: e594c074 ldr ip, [r4, #116] ; 0x74
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
a001a5b4: e1510000 cmp r1, r0
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
a001a5b8: e59f00c0 ldr r0, [pc, #192] ; a001a680 <_Timer_server_Schedule_operation_method+0x134>
a001a5bc: e5900000 ldr r0, [r0]
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
a001a5c0: 0a000008 beq a001a5e8 <_Timer_server_Schedule_operation_method+0x9c>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
a001a5c4: e5915010 ldr r5, [r1, #16] <== NOT EXECUTED
if ( snapshot > last_snapshot ) {
a001a5c8: e150000c cmp r0, ip <== NOT EXECUTED
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
a001a5cc: 9085200c addls r2, r5, ip <== NOT EXECUTED
delta_interval += delta;
a001a5d0: 90602002 rsbls r2, r0, r2 <== NOT EXECUTED
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
a001a5d4: 9a000002 bls a001a5e4 <_Timer_server_Schedule_operation_method+0x98><== NOT EXECUTED
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
a001a5d8: e06cc000 rsb ip, ip, r0 <== NOT EXECUTED
if (delta_interval > delta) {
a001a5dc: e155000c cmp r5, ip <== NOT EXECUTED
delta_interval -= delta;
a001a5e0: 806c2005 rsbhi r2, ip, r5 <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
a001a5e4: e5812010 str r2, [r1, #16] <== NOT EXECUTED
}
ts->TOD_watchdogs.last_snapshot = snapshot;
a001a5e8: e5840074 str r0, [r4, #116] ; 0x74
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a001a5ec: e129f00e msr CPSR_fc, lr
_ISR_Enable( level );
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a001a5f0: e2831010 add r1, r3, #16
a001a5f4: e2840068 add r0, r4, #104 ; 0x68
a001a5f8: eb00115b bl a001eb6c <_Watchdog_Insert>
if ( !ts->active ) {
a001a5fc: e5d4307c ldrb r3, [r4, #124] ; 0x7c
a001a600: e3530000 cmp r3, #0
a001a604: 1affffe2 bne a001a594 <_Timer_server_Schedule_operation_method+0x48>
_Timer_server_Reset_tod_system_watchdog( ts );
a001a608: e1a00004 mov r0, r4
a001a60c: ebffff39 bl a001a2f8 <_Timer_server_Reset_tod_system_watchdog>
a001a610: eaffffdf b a001a594 <_Timer_server_Schedule_operation_method+0x48>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a001a614: e10f5000 mrs r5, CPSR
a001a618: e3851080 orr r1, r5, #128 ; 0x80
a001a61c: e129f001 msr CPSR_fc, r1
initialized = false;
}
#endif
return status;
}
a001a620: e5941030 ldr r1, [r4, #48] ; 0x30
a001a624: e2840034 add r0, r4, #52 ; 0x34
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
last_snapshot = ts->Interval_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
a001a628: e1510000 cmp r1, r0
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
a001a62c: e59f0050 ldr r0, [pc, #80] ; a001a684 <_Timer_server_Schedule_operation_method+0x138>
a001a630: e5900000 ldr r0, [r0]
last_snapshot = ts->Interval_watchdogs.last_snapshot;
a001a634: e594c03c ldr ip, [r4, #60] ; 0x3c
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
a001a638: 0a000004 beq a001a650 <_Timer_server_Schedule_operation_method+0x104>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
a001a63c: e591e010 ldr lr, [r1, #16]
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
a001a640: e06cc000 rsb ip, ip, r0
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
a001a644: e15c000e cmp ip, lr
delta_interval -= delta;
a001a648: 306c200e rsbcc r2, ip, lr
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
a001a64c: e5812010 str r2, [r1, #16]
}
ts->Interval_watchdogs.last_snapshot = snapshot;
a001a650: e584003c str r0, [r4, #60] ; 0x3c
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a001a654: e129f005 msr CPSR_fc, r5
_ISR_Enable( level );
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
a001a658: e2831010 add r1, r3, #16
a001a65c: e2840030 add r0, r4, #48 ; 0x30
a001a660: eb001141 bl a001eb6c <_Watchdog_Insert>
if ( !ts->active ) {
a001a664: e5d4307c ldrb r3, [r4, #124] ; 0x7c
a001a668: e3530000 cmp r3, #0
a001a66c: 1affffc8 bne a001a594 <_Timer_server_Schedule_operation_method+0x48>
_Timer_server_Reset_interval_system_watchdog( ts );
a001a670: e1a00004 mov r0, r4
a001a674: ebffff09 bl a001a2a0 <_Timer_server_Reset_interval_system_watchdog>
a001a678: eaffffc5 b a001a594 <_Timer_server_Schedule_operation_method+0x48>
a000cad0 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
a000cad0: e1a03000 mov r3, r0
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
a000cad4: e5902004 ldr r2, [r0, #4]
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
a000cad8: e52d4004 push {r4} ; (str r4, [sp, #-4]!)
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
a000cadc: e8910011 ldm r1, {r0, r4}
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000cae0: e59fc040 ldr ip, [pc, #64] ; a000cb28 <_Timespec_Add_to+0x58>
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
a000cae4: e5931000 ldr r1, [r3]
time->tv_nsec += add->tv_nsec;
a000cae8: e0844002 add r4, r4, r2
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000caec: e154000c cmp r4, ip
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
a000caf0: e0811000 add r1, r1, r0
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000caf4: e1a02004 mov r2, r4
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
a000caf8: e8830012 stm r3, {r1, r4}
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000cafc: 9a000007 bls a000cb20 <_Timespec_Add_to+0x50>
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
a000cb00: e2822331 add r2, r2, #-1006632960 ; 0xc4000000 <== NOT EXECUTED
a000cb04: e2822865 add r2, r2, #6619136 ; 0x650000 <== NOT EXECUTED
a000cb08: e2822c36 add r2, r2, #13824 ; 0x3600 <== NOT EXECUTED
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000cb0c: e152000c cmp r2, ip <== NOT EXECUTED
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
a000cb10: e2811001 add r1, r1, #1 <== NOT EXECUTED
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
time->tv_sec++;
seconds++;
a000cb14: e2800001 add r0, r0, #1 <== NOT EXECUTED
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000cb18: 8afffff8 bhi a000cb00 <_Timespec_Add_to+0x30> <== NOT EXECUTED
a000cb1c: e8830006 stm r3, {r1, r2} <== NOT EXECUTED
time->tv_sec++;
seconds++;
}
return seconds;
}
a000cb20: e8bd0010 pop {r4}
a000cb24: e12fff1e bx lr
a000e790 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
a000e790: e92d4bf0 push {r4, r5, r6, r7, r8, r9, fp, lr}
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
a000e794: e5916004 ldr r6, [r1, #4]
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
a000e798: e591c000 ldr ip, [r1]
a000e79c: e59f1084 ldr r1, [pc, #132] ; a000e828 <_Timespec_Divide+0x98>
right += rhs->tv_nsec;
a000e7a0: e1a07fc6 asr r7, r6, #31
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
a000e7a4: e1a05002 mov r5, r2
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
a000e7a8: e0e76c91 smlal r6, r7, r1, ip
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
a000e7ac: e1a04003 mov r4, r3
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
a000e7b0: e1962007 orrs r2, r6, r7
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
a000e7b4: e8900808 ldm r0, {r3, fp}
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
a000e7b8: 0a000017 beq a000e81c <_Timespec_Divide+0x8c>
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
a000e7bc: e1a0cfcb asr ip, fp, #31 <== NOT EXECUTED
a000e7c0: e0ecb391 smlal fp, ip, r1, r3 <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
a000e7c4: e3a01b61 mov r1, #99328 ; 0x18400 <== NOT EXECUTED
a000e7c8: e2811e2a add r1, r1, #672 ; 0x2a0 <== NOT EXECUTED
a000e7cc: e089819b umull r8, r9, fp, r1 <== NOT EXECUTED
a000e7d0: e1a02006 mov r2, r6 <== NOT EXECUTED
a000e7d4: e0299c91 mla r9, r1, ip, r9 <== NOT EXECUTED
a000e7d8: e1a03007 mov r3, r7 <== NOT EXECUTED
a000e7dc: e1a00008 mov r0, r8 <== NOT EXECUTED
a000e7e0: e1a01009 mov r1, r9 <== NOT EXECUTED
a000e7e4: eb003f5e bl a001e564 <__udivdi3> <== NOT EXECUTED
*ival_percentage = answer / 1000;
a000e7e8: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED
a000e7ec: e3a03000 mov r3, #0 <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
a000e7f0: e1a06000 mov r6, r0 <== NOT EXECUTED
a000e7f4: e1a07001 mov r7, r1 <== NOT EXECUTED
*ival_percentage = answer / 1000;
a000e7f8: eb003f59 bl a001e564 <__udivdi3> <== NOT EXECUTED
*fval_percentage = answer % 1000;
a000e7fc: e1a01007 mov r1, r7 <== NOT EXECUTED
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
a000e800: e5850000 str r0, [r5] <== NOT EXECUTED
*fval_percentage = answer % 1000;
a000e804: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED
a000e808: e3a03000 mov r3, #0 <== NOT EXECUTED
a000e80c: e1a00006 mov r0, r6 <== NOT EXECUTED
a000e810: eb004065 bl a001e9ac <__umoddi3> <== NOT EXECUTED
a000e814: e5840000 str r0, [r4] <== NOT EXECUTED
a000e818: e8bd8bf0 pop {r4, r5, r6, r7, r8, r9, fp, pc} <== NOT EXECUTED
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
*ival_percentage = 0;
a000e81c: e5852000 str r2, [r5]
*fval_percentage = 0;
a000e820: e5842000 str r2, [r4]
return;
a000e824: e8bd8bf0 pop {r4, r5, r6, r7, r8, r9, fp, pc}
a000e7d0 <_Timespec_Divide_by_integer>:
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
a000e7d0: e590c000 ldr ip, [r0] <== NOT EXECUTED
t *= TOD_NANOSECONDS_PER_SECOND;
a000e7d4: e59f3068 ldr r3, [pc, #104] ; a000e844 <_Timespec_Divide_by_integer+0x74><== NOT EXECUTED
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
a000e7d8: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
a000e7dc: e086539c umull r5, r6, ip, r3 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
a000e7e0: e1a0700c mov r7, ip <== NOT EXECUTED
a000e7e4: e1a08fc7 asr r8, r7, #31 <== NOT EXECUTED
t *= TOD_NANOSECONDS_PER_SECOND;
t += time->tv_nsec;
a000e7e8: e5900004 ldr r0, [r0, #4] <== 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;
a000e7ec: e0266893 mla r6, r3, r8, r6 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
a000e7f0: e0957000 adds r7, r5, r0 <== NOT EXECUTED
a000e7f4: e0a68fc0 adc r8, r6, r0, asr #31 <== NOT EXECUTED
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
a000e7f8: e1a04002 mov r4, r2 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
a000e7fc: e3a03000 mov r3, #0 <== NOT EXECUTED
a000e800: e1a02001 mov r2, r1 <== NOT EXECUTED
a000e804: e1a00007 mov r0, r7 <== NOT EXECUTED
a000e808: e1a01008 mov r1, r8 <== NOT EXECUTED
a000e80c: eb003d96 bl a001de6c <__udivdi3> <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
a000e810: e59f202c ldr r2, [pc, #44] ; a000e844 <_Timespec_Divide_by_integer+0x74><== NOT EXECUTED
a000e814: e3a03000 mov r3, #0 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
a000e818: e1a05000 mov r5, r0 <== NOT EXECUTED
a000e81c: e1a06001 mov r6, r1 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
a000e820: eb003d91 bl a001de6c <__udivdi3> <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
a000e824: e59f2018 ldr r2, [pc, #24] ; a000e844 <_Timespec_Divide_by_integer+0x74><== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
a000e828: e5840000 str r0, [r4] <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
a000e82c: e3a03000 mov r3, #0 <== NOT EXECUTED
a000e830: e1a01006 mov r1, r6 <== NOT EXECUTED
a000e834: e1a00005 mov r0, r5 <== NOT EXECUTED
a000e838: eb003e9d bl a001e2b4 <__umoddi3> <== NOT EXECUTED
a000e83c: e5840004 str r0, [r4, #4] <== NOT EXECUTED
}
a000e840: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a001e8d0 <_Timespec_From_ticks>:
struct timespec *time
)
{
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
a001e8d0: e59f2034 ldr r2, [pc, #52] ; a001e90c <_Timespec_From_ticks+0x3c><== NOT EXECUTED
time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND;
time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) *
a001e8d4: e3a0393d mov r3, #999424 ; 0xf4000 <== NOT EXECUTED
a001e8d8: e2833d09 add r3, r3, #576 ; 0x240 <== NOT EXECUTED
struct timespec *time
)
{
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
a001e8dc: e592200c ldr r2, [r2, #12] <== NOT EXECUTED
a001e8e0: e0020290 mul r2, r0, r2 <== NOT EXECUTED
time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND;
a001e8e4: e59f0024 ldr r0, [pc, #36] ; a001e910 <_Timespec_From_ticks+0x40><== NOT EXECUTED
a001e8e8: e080c092 umull ip, r0, r2, r0 <== NOT EXECUTED
a001e8ec: e1a00920 lsr r0, r0, #18 <== NOT EXECUTED
time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) *
a001e8f0: e0030390 mul r3, r0, r3 <== NOT EXECUTED
{
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND;
a001e8f4: e5810000 str r0, [r1] <== NOT EXECUTED
time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) *
a001e8f8: e0632002 rsb r2, r3, r2 <== NOT EXECUTED
a001e8fc: e3a03ffa mov r3, #1000 ; 0x3e8 <== NOT EXECUTED
a001e900: e0020293 mul r2, r3, r2 <== NOT EXECUTED
a001e904: e5812004 str r2, [r1, #4] <== NOT EXECUTED
TOD_NANOSECONDS_PER_MICROSECOND;
}
a001e908: e12fff1e bx lr <== NOT EXECUTED
a001e914 <_Timespec_Is_valid>:
bool _Timespec_Is_valid(
const struct timespec *time
)
{
if ( !time )
a001e914: e3500000 cmp r0, #0
a001e918: 012fff1e bxeq lr
return false;
if ( time->tv_sec < 0 )
a001e91c: e5903000 ldr r3, [r0]
a001e920: e3530000 cmp r3, #0
return false;
a001e924: b3a00000 movlt r0, #0
)
{
if ( !time )
return false;
if ( time->tv_sec < 0 )
a001e928: b12fff1e bxlt lr
return false;
if ( time->tv_nsec < 0 )
a001e92c: e5903004 ldr r3, [r0, #4]
a001e930: e3530000 cmp r3, #0
a001e934: ba000004 blt a001e94c <_Timespec_Is_valid+0x38>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
a001e938: e59f0014 ldr r0, [pc, #20] ; a001e954 <_Timespec_Is_valid+0x40>
a001e93c: e1530000 cmp r3, r0
a001e940: 83a00000 movhi r0, #0
a001e944: 93a00001 movls r0, #1
a001e948: e12fff1e bx lr
if ( time->tv_sec < 0 )
return false;
if ( time->tv_nsec < 0 )
return false;
a001e94c: e3a00000 mov r0, #0 <== NOT EXECUTED
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
a001e950: e12fff1e bx lr <== NOT EXECUTED
a000ffec <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
a000ffec: e5902000 ldr r2, [r0]
a000fff0: e5913000 ldr r3, [r1]
a000fff4: e1520003 cmp r2, r3
return true;
a000fff8: b3a00001 movlt r0, #1
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
a000fffc: b12fff1e bxlt lr
return true;
if ( lhs->tv_sec > rhs->tv_sec )
a0010000: ca000005 bgt a001001c <_Timespec_Less_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
a0010004: e5900004 ldr r0, [r0, #4]
a0010008: e5913004 ldr r3, [r1, #4]
a001000c: e1500003 cmp r0, r3
a0010010: a3a00000 movge r0, #0
a0010014: b3a00001 movlt r0, #1
a0010018: e12fff1e bx lr
{
if ( lhs->tv_sec < rhs->tv_sec )
return true;
if ( lhs->tv_sec > rhs->tv_sec )
return false;
a001001c: e3a00000 mov r0, #0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return true;
return false;
}
a0010020: e12fff1e bx lr
a000cb2c <_Timespec_Subtract>:
const struct timespec *end,
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
a000cb2c: e591c004 ldr ip, [r1, #4]
a000cb30: e5903004 ldr r3, [r0, #4]
void _Timespec_Subtract(
const struct timespec *start,
const struct timespec *end,
struct timespec *result
)
{
a000cb34: e52d4004 push {r4} ; (str r4, [sp, #-4]!)
if (end->tv_nsec < start->tv_nsec) {
a000cb38: e15c0003 cmp ip, r3
a000cb3c: ba000007 blt a000cb60 <_Timespec_Subtract+0x34>
result->tv_sec = end->tv_sec - start->tv_sec - 1;
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
} else {
result->tv_sec = end->tv_sec - start->tv_sec;
a000cb40: e5914000 ldr r4, [r1]
a000cb44: e5901000 ldr r1, [r0]
result->tv_nsec = end->tv_nsec - start->tv_nsec;
a000cb48: e063300c rsb r3, r3, ip
a000cb4c: e5823004 str r3, [r2, #4]
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
} else {
result->tv_sec = end->tv_sec - start->tv_sec;
a000cb50: e0613004 rsb r3, r1, r4
a000cb54: e5823000 str r3, [r2]
result->tv_nsec = end->tv_nsec - start->tv_nsec;
}
}
a000cb58: e8bd0010 pop {r4}
a000cb5c: e12fff1e bx lr
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
a000cb60: e5911000 ldr r1, [r1] <== NOT EXECUTED
a000cb64: e5900000 ldr r0, [r0] <== NOT EXECUTED
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
a000cb68: e28cc5ee add ip, ip, #998244352 ; 0x3b800000 <== NOT EXECUTED
a000cb6c: e28cc96b add ip, ip, #1753088 ; 0x1ac000 <== NOT EXECUTED
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
a000cb70: e2411001 sub r1, r1, #1 <== NOT EXECUTED
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
a000cb74: e28ccc0a add ip, ip, #2560 ; 0xa00 <== NOT EXECUTED
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
a000cb78: e0601001 rsb r1, r0, r1 <== NOT EXECUTED
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
a000cb7c: e063300c rsb r3, r3, ip <== NOT EXECUTED
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
a000cb80: e882000a stm r2, {r1, r3} <== NOT EXECUTED
a000cb84: eafffff3 b a000cb58 <_Timespec_Subtract+0x2c> <== NOT EXECUTED
a000ccb0 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000ccb0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
a000ccb4: e59f5040 ldr r5, [pc, #64] ; a000ccfc <_User_extensions_Fatal+0x4c>
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000ccb8: e1a08000 mov r8, r0
a000ccbc: e1a07002 mov r7, r2
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
a000ccc0: e5954008 ldr r4, [r5, #8]
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000ccc4: e20160ff and r6, r1, #255 ; 0xff
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
a000ccc8: e1540005 cmp r4, r5
a000cccc: 0a000009 beq a000ccf8 <_User_extensions_Fatal+0x48>
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
a000ccd0: e5943030 ldr r3, [r4, #48] ; 0x30
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
a000ccd4: e1a00008 mov r0, r8
a000ccd8: e1a01006 mov r1, r6
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
a000ccdc: e3530000 cmp r3, #0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
a000cce0: e1a02007 mov r2, r7
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
a000cce4: 0a000000 beq a000ccec <_User_extensions_Fatal+0x3c>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
a000cce8: e12fff33 blx r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
a000ccec: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
a000ccf0: e1540005 cmp r4, r5
a000ccf4: 1afffff5 bne a000ccd0 <_User_extensions_Fatal+0x20>
a000ccf8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a000e4bc <_User_extensions_Remove_set>:
#include <rtems/score/userext.h>
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
a000e4bc: e92d4010 push {r4, lr}
a000e4c0: e1a04000 mov r4, r0
_Chain_Extract( &the_extension->Node );
a000e4c4: ebfff5e4 bl a000bc5c <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
a000e4c8: e5943024 ldr r3, [r4, #36] ; 0x24
a000e4cc: e3530000 cmp r3, #0
a000e4d0: 0a000002 beq a000e4e0 <_User_extensions_Remove_set+0x24>
_Chain_Extract( &the_extension->Switch.Node );
a000e4d4: e2840008 add r0, r4, #8
}
a000e4d8: e8bd4010 pop {r4, lr}
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
a000e4dc: eafff5de b a000bc5c <_Chain_Extract>
a000e4e0: e8bd8010 pop {r4, pc}
a000cd00 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
a000cd00: e92d40f0 push {r4, r5, r6, r7, lr}
return false;
}
}
return true;
}
a000cd04: e59f504c ldr r5, [pc, #76] ; a000cd58 <_User_extensions_Thread_create+0x58>
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
a000cd08: e1a06000 mov r6, r0
return false;
}
}
return true;
}
a000cd0c: e4954004 ldr r4, [r5], #4
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
a000cd10: e1540005 cmp r4, r5
a000cd14: 0a00000d beq a000cd50 <_User_extensions_Thread_create+0x50>
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
a000cd18: e59f703c ldr r7, [pc, #60] ; a000cd5c <_User_extensions_Thread_create+0x5c>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
a000cd1c: e5943014 ldr r3, [r4, #20]
status = (*the_extension->Callouts.thread_create)(
a000cd20: e1a01006 mov r1, r6
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
a000cd24: e3530000 cmp r3, #0
a000cd28: 0a000003 beq a000cd3c <_User_extensions_Thread_create+0x3c>
status = (*the_extension->Callouts.thread_create)(
a000cd2c: e5970004 ldr r0, [r7, #4]
a000cd30: e12fff33 blx r3
_Thread_Executing,
the_thread
);
if ( !status )
a000cd34: e3500000 cmp r0, #0
a000cd38: 0a000005 beq a000cd54 <_User_extensions_Thread_create+0x54>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
a000cd3c: e5944000 ldr r4, [r4]
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
a000cd40: e1540005 cmp r4, r5
a000cd44: 1afffff4 bne a000cd1c <_User_extensions_Thread_create+0x1c>
if ( !status )
return false;
}
}
return true;
a000cd48: e3a00001 mov r0, #1
a000cd4c: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000cd50: e3a00001 mov r0, #1 <== NOT EXECUTED
}
a000cd54: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000eb78 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
a000eb78: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000eb7c: e1a04000 mov r4, r0
a000eb80: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000eb84: e10f0000 mrs r0, CPSR
a000eb88: e3803080 orr r3, r0, #128 ; 0x80
a000eb8c: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a000eb90: e1a07004 mov r7, r4
a000eb94: e4973004 ldr r3, [r7], #4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
a000eb98: e1530007 cmp r3, r7
a000eb9c: 0a00001a beq a000ec0c <_Watchdog_Adjust+0x94>
switch ( direction ) {
a000eba0: e3510000 cmp r1, #0
a000eba4: 1a00001a bne a000ec14 <_Watchdog_Adjust+0x9c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000eba8: e3520000 cmp r2, #0
a000ebac: 0a000016 beq a000ec0c <_Watchdog_Adjust+0x94>
if ( units < _Watchdog_First( header )->delta_interval ) {
a000ebb0: e5936010 ldr r6, [r3, #16]
a000ebb4: e1520006 cmp r2, r6
a000ebb8: 21a01000 movcs r1, r0
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000ebbc: 23a08001 movcs r8, #1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
a000ebc0: 2a000005 bcs a000ebdc <_Watchdog_Adjust+0x64>
a000ebc4: ea000019 b a000ec30 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000ebc8: e0555006 subs r5, r5, r6 <== NOT EXECUTED
a000ebcc: 0a00000e beq a000ec0c <_Watchdog_Adjust+0x94> <== NOT EXECUTED
if ( units < _Watchdog_First( header )->delta_interval ) {
a000ebd0: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED
a000ebd4: e1560005 cmp r6, r5 <== NOT EXECUTED
a000ebd8: 8a000014 bhi a000ec30 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000ebdc: e5838010 str r8, [r3, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ebe0: e129f001 msr CPSR_fc, r1
_ISR_Enable( level );
_Watchdog_Tickle( header );
a000ebe4: e1a00004 mov r0, r4
a000ebe8: eb0000ad bl a000eea4 <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000ebec: e10f0000 mrs r0, CPSR
a000ebf0: e3803080 orr r3, r0, #128 ; 0x80
a000ebf4: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a000ebf8: e5942000 ldr r2, [r4]
a000ebfc: e1a01000 mov r1, r0
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a000ec00: e1570002 cmp r7, r2
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
a000ec04: e1a03002 mov r3, r2
a000ec08: 1affffee bne a000ebc8 <_Watchdog_Adjust+0x50>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ec0c: e129f000 msr CPSR_fc, r0
}
}
_ISR_Enable( level );
}
a000ec10: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
a000ec14: e3510001 cmp r1, #1 <== NOT EXECUTED
a000ec18: 1afffffb bne a000ec0c <_Watchdog_Adjust+0x94> <== NOT EXECUTED
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
a000ec1c: e5932010 ldr r2, [r3, #16] <== NOT EXECUTED
a000ec20: e0825005 add r5, r2, r5 <== NOT EXECUTED
a000ec24: e5835010 str r5, [r3, #16] <== NOT EXECUTED
a000ec28: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
}
}
_ISR_Enable( level );
}
a000ec2c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
_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;
a000ec30: e0655006 rsb r5, r5, r6 <== NOT EXECUTED
a000ec34: e5835010 str r5, [r3, #16] <== NOT EXECUTED
break;
a000ec38: eafffff3 b a000ec0c <_Watchdog_Adjust+0x94> <== NOT EXECUTED
a001eac0 <_Watchdog_Adjust_to_chain>:
{
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
a001eac0: e3510000 cmp r1, #0
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
a001eac4: e92d05f0 push {r4, r5, r6, r7, r8, sl}
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
a001eac8: 0a000022 beq a001eb58 <_Watchdog_Adjust_to_chain+0x98>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a001eacc: e10f7000 mrs r7, CPSR
a001ead0: e3873080 orr r3, r7, #128 ; 0x80
a001ead4: e129f003 msr CPSR_fc, r3
return;
}
_ISR_Disable( level );
a001ead8: e1a06000 mov r6, r0
a001eadc: e4963004 ldr r3, [r6], #4
/*
* The first set happens in less than units, so take all of them
* off the chain and adjust units to reflect this.
*/
units -= first->delta_interval;
first->delta_interval = 0;
a001eae0: e3a0a000 mov sl, #0
a001eae4: e2828004 add r8, r2, #4
while ( 1 ) {
if ( units <= 0 ) {
break;
}
if ( _Chain_Is_empty( header ) ) {
a001eae8: e1530006 cmp r3, r6
a001eaec: 0a000018 beq a001eb54 <_Watchdog_Adjust_to_chain+0x94>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
a001eaf0: e593c010 ldr ip, [r3, #16]
a001eaf4: e15c0001 cmp ip, r1
a001eaf8: 8a000018 bhi a001eb60 <_Watchdog_Adjust_to_chain+0xa0>
/*
* The first set happens in less than units, so take all of them
* off the chain and adjust units to reflect this.
*/
units -= first->delta_interval;
a001eafc: e06c1001 rsb r1, ip, r1
first->delta_interval = 0;
a001eb00: e583a010 str sl, [r3, #16]
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
a001eb04: e5935000 ldr r5, [r3]
previous = the_node->previous;
a001eb08: e5934004 ldr r4, [r3, #4]
next->previous = previous;
a001eb0c: e5854004 str r4, [r5, #4]
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
a001eb10: e592c008 ldr ip, [r2, #8]
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
a001eb14: e5845000 str r5, [r4]
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
a001eb18: e5838000 str r8, [r3]
tail->previous = the_node;
old_last->next = the_node;
a001eb1c: e58c3000 str r3, [ip]
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
a001eb20: e5823008 str r3, [r2, #8]
old_last->next = the_node;
the_node->previous = old_last;
a001eb24: e583c004 str ip, [r3, #4]
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a001eb28: e10f3000 mrs r3, CPSR
a001eb2c: e129f007 msr CPSR_fc, r7
a001eb30: e129f003 msr CPSR_fc, r3
break;
}
}
_ISR_Enable( level );
}
a001eb34: e5903000 ldr r3, [r0]
_Chain_Extract_unprotected( &first->Node );
_Chain_Append_unprotected( to_fire, &first->Node );
_ISR_Flash( level );
if ( _Chain_Is_empty( header ) )
a001eb38: e1560003 cmp r6, r3
a001eb3c: 0a000002 beq a001eb4c <_Watchdog_Adjust_to_chain+0x8c>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
a001eb40: e593c010 ldr ip, [r3, #16] <== NOT EXECUTED
a001eb44: e35c0000 cmp ip, #0 <== NOT EXECUTED
a001eb48: 0affffed beq a001eb04 <_Watchdog_Adjust_to_chain+0x44> <== NOT EXECUTED
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
a001eb4c: e3510000 cmp r1, #0
a001eb50: 1affffe4 bne a001eae8 <_Watchdog_Adjust_to_chain+0x28>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a001eb54: e129f007 msr CPSR_fc, r7
break;
}
}
_ISR_Enable( level );
}
a001eb58: e8bd05f0 pop {r4, r5, r6, r7, r8, sl}
a001eb5c: e12fff1e bx lr
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
first->delta_interval -= units;
a001eb60: e061100c rsb r1, r1, ip <== NOT EXECUTED
a001eb64: e5831010 str r1, [r3, #16] <== NOT EXECUTED
break;
a001eb68: eafffff9 b a001eb54 <_Watchdog_Adjust_to_chain+0x94> <== NOT EXECUTED
a000ce38 <_Watchdog_Insert>:
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
a000ce38: e59f3140 ldr r3, [pc, #320] ; a000cf80 <_Watchdog_Insert+0x148>
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
a000ce3c: e92d01f0 push {r4, r5, r6, r7, r8}
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
a000ce40: e5936000 ldr r6, [r3]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000ce44: e10f5000 mrs r5, CPSR
a000ce48: e3853080 orr r3, r5, #128 ; 0x80
a000ce4c: 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 ) {
a000ce50: e5913008 ldr r3, [r1, #8]
a000ce54: e3530000 cmp r3, #0
a000ce58: 1a000041 bne a000cf64 <_Watchdog_Insert+0x12c>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
a000ce5c: e59f8120 ldr r8, [pc, #288] ; a000cf84 <_Watchdog_Insert+0x14c>
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
a000ce60: e3a02001 mov r2, #1
a000ce64: e59f711c ldr r7, [pc, #284] ; a000cf88 <_Watchdog_Insert+0x150>
_Watchdog_Sync_count++;
a000ce68: e5983000 ldr r3, [r8]
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
a000ce6c: e5812008 str r2, [r1, #8]
_Watchdog_Sync_count++;
a000ce70: e0833002 add r3, r3, r2
a000ce74: e5883000 str r3, [r8]
restart:
delta_interval = the_watchdog->initial;
a000ce78: e591300c ldr r3, [r1, #12]
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
a000ce7c: e5902000 ldr r2, [r0]
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
a000ce80: e3530000 cmp r3, #0
a000ce84: 0a000023 beq a000cf18 <_Watchdog_Insert+0xe0>
a000ce88: e592c000 ldr ip, [r2]
a000ce8c: e35c0000 cmp ip, #0
a000ce90: 0a000020 beq a000cf18 <_Watchdog_Insert+0xe0>
break;
if ( delta_interval < after->delta_interval ) {
a000ce94: e592c010 ldr ip, [r2, #16]
a000ce98: e153000c cmp r3, ip
a000ce9c: 3a000032 bcc a000cf6c <_Watchdog_Insert+0x134>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a000cea0: e10f4000 mrs r4, CPSR
a000cea4: e129f005 msr CPSR_fc, r5
a000cea8: e129f004 msr CPSR_fc, r4
delta_interval -= after->delta_interval;
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
a000ceac: e5914008 ldr r4, [r1, #8]
a000ceb0: e3540001 cmp r4, #1
a000ceb4: 1a000023 bne a000cf48 <_Watchdog_Insert+0x110>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
a000ceb8: e5974000 ldr r4, [r7]
a000cebc: e1560004 cmp r6, r4
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
a000cec0: 206c3003 rsbcs r3, ip, r3
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
a000cec4: 2a000010 bcs a000cf0c <_Watchdog_Insert+0xd4>
a000cec8: ea00002a b a000cf78 <_Watchdog_Insert+0x140> <== NOT EXECUTED
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
a000cecc: e592c000 ldr ip, [r2]
a000ced0: e35c0000 cmp ip, #0
a000ced4: 0a00000f beq a000cf18 <_Watchdog_Insert+0xe0>
break;
if ( delta_interval < after->delta_interval ) {
a000ced8: e592c010 ldr ip, [r2, #16]
a000cedc: e15c0003 cmp ip, r3
a000cee0: 8a000021 bhi a000cf6c <_Watchdog_Insert+0x134>
a000cee4: e10f4000 mrs r4, CPSR
a000cee8: e129f005 msr CPSR_fc, r5
a000ceec: e129f004 msr CPSR_fc, r4
delta_interval -= after->delta_interval;
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
a000cef0: e5914008 ldr r4, [r1, #8]
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
a000cef4: e06c3003 rsb r3, ip, r3
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
a000cef8: e3540001 cmp r4, #1
a000cefc: 1a000011 bne a000cf48 <_Watchdog_Insert+0x110>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
a000cf00: e597c000 ldr ip, [r7]
a000cf04: e156000c cmp r6, ip
a000cf08: 3a00001a bcc a000cf78 <_Watchdog_Insert+0x140>
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
a000cf0c: e3530000 cmp r3, #0
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
a000cf10: e5922000 ldr r2, [r2]
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
a000cf14: 1affffec bne a000cecc <_Watchdog_Insert+0x94>
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
a000cf18: e5922004 ldr r2, [r2, #4]
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
a000cf1c: e59fc068 ldr ip, [pc, #104] ; a000cf8c <_Watchdog_Insert+0x154>
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
a000cf20: e3a04002 mov r4, #2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
a000cf24: e5920000 ldr r0, [r2]
a000cf28: e59cc000 ldr ip, [ip]
a000cf2c: e5814008 str r4, [r1, #8]
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
a000cf30: e5813010 str r3, [r1, #16]
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
a000cf34: e5812004 str r2, [r1, #4]
before_node = after_node->next;
after_node->next = the_node;
a000cf38: e5821000 str r1, [r2]
the_node->next = before_node;
before_node->previous = the_node;
a000cf3c: e5801004 str r1, [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;
a000cf40: e5810000 str r0, [r1]
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
a000cf44: e581c014 str ip, [r1, #20]
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
a000cf48: e5876000 str r6, [r7]
_Watchdog_Sync_count--;
a000cf4c: e5983000 ldr r3, [r8]
a000cf50: e2433001 sub r3, r3, #1
a000cf54: e5883000 str r3, [r8]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000cf58: e129f005 msr CPSR_fc, r5
_ISR_Enable( level );
}
a000cf5c: e8bd01f0 pop {r4, r5, r6, r7, r8}
a000cf60: e12fff1e bx lr
a000cf64: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
a000cf68: eafffffb b a000cf5c <_Watchdog_Insert+0x124> <== NOT EXECUTED
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
a000cf6c: e063c00c rsb ip, r3, ip
a000cf70: e582c010 str ip, [r2, #16]
break;
a000cf74: eaffffe7 b a000cf18 <_Watchdog_Insert+0xe0>
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;
a000cf78: e5876000 str r6, [r7] <== NOT EXECUTED
goto restart;
a000cf7c: eaffffbd b a000ce78 <_Watchdog_Insert+0x40> <== NOT EXECUTED
a000e660 <_Watchdog_Report>:
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
a000e660: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
printk(
a000e664: e591e00c ldr lr, [r1, #12] <== NOT EXECUTED
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
a000e668: e24dd014 sub sp, sp, #20 <== NOT EXECUTED
printk(
a000e66c: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
a000e670: e58de000 str lr, [sp] <== NOT EXECUTED
a000e674: e58d1004 str r1, [sp, #4] <== NOT EXECUTED
a000e678: e591e01c ldr lr, [r1, #28] <== NOT EXECUTED
a000e67c: e250c000 subs ip, r0, #0 <== NOT EXECUTED
a000e680: 059fc02c ldreq ip, [pc, #44] ; a000e6b4 <_Watchdog_Report+0x54><== NOT EXECUTED
a000e684: e58de008 str lr, [sp, #8] <== NOT EXECUTED
a000e688: e591e020 ldr lr, [r1, #32] <== NOT EXECUTED
a000e68c: 01a0200c moveq r2, ip <== NOT EXECUTED
a000e690: 159f2020 ldrne r2, [pc, #32] ; a000e6b8 <_Watchdog_Report+0x58><== NOT EXECUTED
a000e694: e58de00c str lr, [sp, #12] <== NOT EXECUTED
a000e698: e5911024 ldr r1, [r1, #36] ; 0x24 <== NOT EXECUTED
a000e69c: e59f0018 ldr r0, [pc, #24] ; a000e6bc <_Watchdog_Report+0x5c><== NOT EXECUTED
a000e6a0: e58d1010 str r1, [sp, #16] <== NOT EXECUTED
a000e6a4: e1a0100c mov r1, ip <== NOT EXECUTED
a000e6a8: ebffe64b bl a0007fdc <printk> <== NOT EXECUTED
watch,
watch->routine,
watch->id,
watch->user_data
);
}
a000e6ac: e28dd014 add sp, sp, #20 <== NOT EXECUTED
a000e6b0: e8bd8000 pop {pc} <== NOT EXECUTED
a000e5e8 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
a000e5e8: e92d40f0 push {r4, r5, r6, r7, lr}
a000e5ec: e1a05000 mov r5, r0
a000e5f0: e1a04001 mov r4, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000e5f4: e10f6000 mrs r6, CPSR
a000e5f8: e3863080 orr r3, r6, #128 ; 0x80
a000e5fc: e129f003 msr CPSR_fc, r3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
a000e600: e59f004c ldr r0, [pc, #76] ; a000e654 <_Watchdog_Report_chain+0x6c>
a000e604: e1a02004 mov r2, r4
a000e608: e1a01005 mov r1, r5
a000e60c: ebffe672 bl a0007fdc <printk>
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
a000e610: e4947004 ldr r7, [r4], #4
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
a000e614: e1570004 cmp r7, r4
a000e618: 0a00000a beq a000e648 <_Watchdog_Report_chain+0x60>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
a000e61c: e1a01007 mov r1, r7 <== NOT EXECUTED
a000e620: e3a00000 mov r0, #0 <== NOT EXECUTED
a000e624: eb00000d bl a000e660 <_Watchdog_Report> <== NOT EXECUTED
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
a000e628: e5977000 ldr r7, [r7] <== NOT EXECUTED
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
a000e62c: e1570004 cmp r7, r4 <== NOT EXECUTED
a000e630: 1afffff9 bne a000e61c <_Watchdog_Report_chain+0x34> <== NOT EXECUTED
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
a000e634: e59f001c ldr r0, [pc, #28] ; a000e658 <_Watchdog_Report_chain+0x70><== NOT EXECUTED
a000e638: e1a01005 mov r1, r5 <== NOT EXECUTED
a000e63c: ebffe666 bl a0007fdc <printk> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000e640: e129f006 msr CPSR_fc, r6
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
a000e644: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
a000e648: e59f000c ldr r0, [pc, #12] ; a000e65c <_Watchdog_Report_chain+0x74>
a000e64c: ebffe662 bl a0007fdc <printk>
a000e650: eafffffa b a000e640 <_Watchdog_Report_chain+0x58>
a000d0a0 <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
a000d0a0: e92d40f0 push {r4, r5, r6, r7, lr}
a000d0a4: e1a05000 mov r5, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000d0a8: e10f7000 mrs r7, CPSR
a000d0ac: e3873080 orr r3, r7, #128 ; 0x80
a000d0b0: e129f003 msr CPSR_fc, r3
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
a000d0b4: e1a04000 mov r4, r0
a000d0b8: e4943004 ldr r3, [r4], #4
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a000d0bc: e1530004 cmp r3, r4
a000d0c0: 0a000007 beq a000d0e4 <_Watchdog_Tickle+0x44>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
a000d0c4: e5931010 ldr r1, [r3, #16]
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
a000d0c8: e1a06003 mov r6, r3
a000d0cc: e3510000 cmp r1, #0
a000d0d0: 0a000015 beq a000d12c <_Watchdog_Tickle+0x8c>
the_watchdog->delta_interval--;
a000d0d4: e2411001 sub r1, r1, #1
if ( the_watchdog->delta_interval != 0 )
a000d0d8: e3510000 cmp r1, #0
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
the_watchdog->delta_interval--;
a000d0dc: e5831010 str r1, [r3, #16]
if ( the_watchdog->delta_interval != 0 )
a000d0e0: 0a000011 beq a000d12c <_Watchdog_Tickle+0x8c>
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
a000d0e4: e1a02007 mov r2, r7
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000d0e8: e129f002 msr CPSR_fc, r2
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
a000d0ec: e8bd80f0 pop {r4, r5, r6, r7, pc}
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
a000d0f0: e596301c ldr r3, [r6, #28]
a000d0f4: e5960020 ldr r0, [r6, #32]
a000d0f8: e5961024 ldr r1, [r6, #36] ; 0x24
a000d0fc: e12fff33 blx r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000d100: e10f2000 mrs r2, CPSR
a000d104: e3823080 orr r3, r2, #128 ; 0x80
a000d108: e129f003 msr CPSR_fc, r3
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
a000d10c: e5953000 ldr r3, [r5]
a000d110: e1a07002 mov r7, r2
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
a000d114: e1530004 cmp r3, r4
a000d118: e1a06003 mov r6, r3
a000d11c: 0afffff1 beq a000d0e8 <_Watchdog_Tickle+0x48>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
a000d120: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
a000d124: e3530000 cmp r3, #0 <== NOT EXECUTED
a000d128: 1affffee bne a000d0e8 <_Watchdog_Tickle+0x48> <== NOT EXECUTED
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
a000d12c: e1a00006 mov r0, r6
a000d130: ebffffaf bl a000cff4 <_Watchdog_Remove>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000d134: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
switch( watchdog_state ) {
a000d138: e3500002 cmp r0, #2
a000d13c: 1affffef bne a000d100 <_Watchdog_Tickle+0x60>
a000d140: eaffffea b a000d0f0 <_Watchdog_Tickle+0x50>
a0025fc8 <_kill_r>:
struct _reent *ptr,
pid_t pid,
int sig
)
{
return killinfo( pid, sig, NULL );
a0025fc8: e1a00001 mov r0, r1 <== NOT EXECUTED
a0025fcc: e1a01002 mov r1, r2 <== NOT EXECUTED
a0025fd0: e3a02000 mov r2, #0 <== NOT EXECUTED
a0025fd4: ea00002d b a0026090 <killinfo> <== NOT EXECUTED
a0009c64 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
a0009c64: e92d4070 push {r4, r5, r6, lr}
long adjustment;
/*
* Simple validations
*/
if ( !delta )
a0009c68: e2504000 subs r4, r0, #0
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
a0009c6c: e24dd008 sub sp, sp, #8
a0009c70: e1a05001 mov r5, r1
long adjustment;
/*
* Simple validations
*/
if ( !delta )
a0009c74: 0a000041 beq a0009d80 <adjtime+0x11c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
a0009c78: e5942004 ldr r2, [r4, #4]
a0009c7c: e59f3110 ldr r3, [pc, #272] ; a0009d94 <adjtime+0x130>
a0009c80: e1520003 cmp r2, r3
a0009c84: 8a00003d bhi a0009d80 <adjtime+0x11c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
a0009c88: e3510000 cmp r1, #0 <== NOT EXECUTED
olddelta->tv_sec = 0;
a0009c8c: 13a03000 movne r3, #0 <== NOT EXECUTED
olddelta->tv_usec = 0;
a0009c90: 15813004 strne r3, [r1, #4] <== NOT EXECUTED
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
olddelta->tv_sec = 0;
a0009c94: 15813000 strne r3, [r1] <== NOT EXECUTED
olddelta->tv_usec = 0;
a0009c98: 15942004 ldrne r2, [r4, #4] <== NOT EXECUTED
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
a0009c9c: e5941000 ldr r1, [r4] <== NOT EXECUTED
a0009ca0: e3a0393d mov r3, #999424 ; 0xf4000 <== NOT EXECUTED
a0009ca4: e2833d09 add r3, r3, #576 ; 0x240 <== NOT EXECUTED
adjustment += delta->tv_usec;
a0009ca8: e0232391 mla r3, r1, r3, r2 <== NOT EXECUTED
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
a0009cac: e59f20e4 ldr r2, [pc, #228] ; a0009d98 <adjtime+0x134> <== NOT EXECUTED
a0009cb0: e592100c ldr r1, [r2, #12] <== NOT EXECUTED
a0009cb4: e1530001 cmp r3, r1 <== NOT EXECUTED
return 0;
a0009cb8: 33a00000 movcc r0, #0 <== NOT EXECUTED
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
a0009cbc: 2a000001 bcs a0009cc8 <adjtime+0x64> <== NOT EXECUTED
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
a0009cc0: e28dd008 add sp, sp, #8
a0009cc4: e8bd8070 pop {r4, r5, r6, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0009cc8: e59f30cc ldr r3, [pc, #204] ; a0009d9c <adjtime+0x138> <== NOT EXECUTED
a0009ccc: e5932000 ldr r2, [r3] <== NOT EXECUTED
a0009cd0: e2822001 add r2, r2, #1 <== NOT EXECUTED
a0009cd4: e5832000 str r2, [r3] <== NOT EXECUTED
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
a0009cd8: e1a0000d mov r0, sp <== NOT EXECUTED
a0009cdc: eb0005f2 bl a000b4ac <_TOD_Get> <== NOT EXECUTED
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
a0009ce0: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
a0009ce4: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
a0009ce8: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
a0009cec: e59d0000 ldr r0, [sp] <== NOT EXECUTED
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
a0009cf0: e0232391 mla r3, r1, r3, r2 <== NOT EXECUTED
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
a0009cf4: e5942000 ldr r2, [r4] <== NOT EXECUTED
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a0009cf8: e59f10a0 ldr r1, [pc, #160] ; a0009da0 <adjtime+0x13c> <== NOT EXECUTED
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
a0009cfc: e1a0600d mov r6, sp <== NOT EXECUTED
ts.tv_sec += delta->tv_sec;
a0009d00: e0802002 add r2, r0, r2 <== NOT EXECUTED
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a0009d04: e1530001 cmp r3, r1 <== NOT EXECUTED
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
a0009d08: e88d000c stm sp, {r2, r3} <== NOT EXECUTED
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a0009d0c: 9a000006 bls a0009d2c <adjtime+0xc8> <== NOT EXECUTED
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
a0009d10: e2833331 add r3, r3, #-1006632960 ; 0xc4000000 <== NOT EXECUTED
a0009d14: e2833865 add r3, r3, #6619136 ; 0x650000 <== NOT EXECUTED
a0009d18: e2833c36 add r3, r3, #13824 ; 0x3600 <== NOT EXECUTED
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a0009d1c: e1530001 cmp r3, r1 <== NOT EXECUTED
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
a0009d20: e2822001 add r2, r2, #1 <== NOT EXECUTED
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a0009d24: 8afffff9 bhi a0009d10 <adjtime+0xac> <== NOT EXECUTED
a0009d28: e88d000c stm sp, {r2, r3} <== NOT EXECUTED
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
a0009d2c: e59f1070 ldr r1, [pc, #112] ; a0009da4 <adjtime+0x140> <== NOT EXECUTED
a0009d30: e1530001 cmp r3, r1 <== NOT EXECUTED
a0009d34: 8a000007 bhi a0009d58 <adjtime+0xf4> <== NOT EXECUTED
a0009d38: e59d2000 ldr r2, [sp] <== NOT EXECUTED
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
a0009d3c: e28335ee add r3, r3, #998244352 ; 0x3b800000 <== NOT EXECUTED
a0009d40: e283396b add r3, r3, #1753088 ; 0x1ac000 <== NOT EXECUTED
a0009d44: e2833c0a add r3, r3, #2560 ; 0xa00 <== NOT EXECUTED
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
a0009d48: e1530001 cmp r3, r1 <== NOT EXECUTED
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
a0009d4c: e2422001 sub r2, r2, #1 <== NOT EXECUTED
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
a0009d50: 9afffff9 bls a0009d3c <adjtime+0xd8> <== NOT EXECUTED
a0009d54: e88d000c stm sp, {r2, r3} <== NOT EXECUTED
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
a0009d58: e1a0000d mov r0, sp <== NOT EXECUTED
a0009d5c: eb0005fa bl a000b54c <_TOD_Set> <== NOT EXECUTED
_Thread_Enable_dispatch();
a0009d60: eb000b71 bl a000cb2c <_Thread_Enable_dispatch> <== NOT EXECUTED
/* set the user's output */
if ( olddelta )
a0009d64: e3550000 cmp r5, #0 <== NOT EXECUTED
*olddelta = *delta;
return 0;
a0009d68: 01a00005 moveq r0, r5 <== NOT EXECUTED
_TOD_Set( &ts );
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
a0009d6c: 0affffd3 beq a0009cc0 <adjtime+0x5c> <== NOT EXECUTED
*olddelta = *delta;
a0009d70: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED
return 0;
a0009d74: e3a00000 mov r0, #0 <== NOT EXECUTED
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
a0009d78: e8850018 stm r5, {r3, r4} <== NOT EXECUTED
a0009d7c: eaffffcf b a0009cc0 <adjtime+0x5c> <== NOT EXECUTED
*/
if ( !delta )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
a0009d80: eb002424 bl a0012e18 <__errno>
a0009d84: e3a03016 mov r3, #22
a0009d88: e5803000 str r3, [r0]
a0009d8c: e3e00000 mvn r0, #0
a0009d90: eaffffca b a0009cc0 <adjtime+0x5c>
a000a59c <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
a000a59c: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
a000a5a0: e59f418c ldr r4, [pc, #396] ; a000a734 <aio_cancel+0x198>
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
a000a5a4: e1a06000 mov r6, r0
a000a5a8: e1a05001 mov r5, r1
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
a000a5ac: e1a00004 mov r0, r4
a000a5b0: eb000443 bl a000b6c4 <pthread_mutex_lock>
if (fcntl (fildes, F_GETFD) < 0) {
a000a5b4: e1a00006 mov r0, r6
a000a5b8: e3a01001 mov r1, #1
a000a5bc: eb001ba7 bl a0011460 <fcntl>
a000a5c0: e3500000 cmp r0, #0
a000a5c4: ba000053 blt a000a718 <aio_cancel+0x17c>
pthread_mutex_unlock(&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EBADF);
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
a000a5c8: e3550000 cmp r5, #0 <== NOT EXECUTED
a000a5cc: 0a00001c beq a000a644 <aio_cancel+0xa8> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
a000a5d0: e5957000 ldr r7, [r5] <== NOT EXECUTED
a000a5d4: e1570006 cmp r7, r6 <== NOT EXECUTED
a000a5d8: 1a000047 bne a000a6fc <aio_cancel+0x160> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
a000a5dc: e3a02000 mov r2, #0 <== NOT EXECUTED
a000a5e0: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000a5e4: e1a01007 mov r1, r7 <== NOT EXECUTED
a000a5e8: eb0000b3 bl a000a8bc <rtems_aio_search_fd> <== NOT EXECUTED
if (r_chain == NULL) {
a000a5ec: e2502000 subs r2, r0, #0 <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
}
return AIO_ALLDONE;
a000a5f0: 13a05002 movne r5, #2 <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
a000a5f4: 0a000001 beq a000a600 <aio_cancel+0x64> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
}
return AIO_ALLDONE;
}
a000a5f8: e1a00005 mov r0, r5
a000a5fc: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
a000a600: e5941054 ldr r1, [r4, #84] ; 0x54 <== NOT EXECUTED
a000a604: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED
a000a608: e1510003 cmp r1, r3 <== NOT EXECUTED
a000a60c: 0a00001e beq a000a68c <aio_cancel+0xf0> <== NOT EXECUTED
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
a000a610: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED
a000a614: e1a01007 mov r1, r7 <== NOT EXECUTED
a000a618: eb0000a7 bl a000a8bc <rtems_aio_search_fd> <== NOT EXECUTED
if (r_chain == NULL) {
a000a61c: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a620: 0a000035 beq a000a6fc <aio_cancel+0x160> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
a000a624: e1a01005 mov r1, r5 <== NOT EXECUTED
a000a628: e2800008 add r0, r0, #8 <== NOT EXECUTED
a000a62c: eb0001a8 bl a000acd4 <rtems_aio_remove_req> <== NOT EXECUTED
a000a630: e1a05000 mov r5, r0 <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
a000a634: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a638: eb000442 bl a000b748 <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
}
return AIO_ALLDONE;
}
a000a63c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a640: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
a000a644: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000a648: e1a01006 mov r1, r6 <== NOT EXECUTED
a000a64c: e1a02005 mov r2, r5 <== NOT EXECUTED
a000a650: eb000099 bl a000a8bc <rtems_aio_search_fd> <== NOT EXECUTED
if (r_chain == NULL) {
a000a654: e2507000 subs r7, r0, #0 <== NOT EXECUTED
a000a658: 0a00000f beq a000a69c <aio_cancel+0x100> <== NOT EXECUTED
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
a000a65c: e287601c add r6, r7, #28 <== NOT EXECUTED
a000a660: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a664: eb000416 bl a000b6c4 <pthread_mutex_lock> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
a000a668: e1a00007 mov r0, r7 <== NOT EXECUTED
a000a66c: eb000a7f bl a000d070 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
a000a670: e1a00007 mov r0, r7 <== NOT EXECUTED
a000a674: eb000182 bl a000ac84 <rtems_aio_remove_fd> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
a000a678: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a67c: eb000431 bl a000b748 <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
a000a680: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a684: eb00042f bl a000b748 <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_CANCELED;
a000a688: eaffffda b a000a5f8 <aio_cancel+0x5c> <== NOT EXECUTED
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
} else {
pthread_mutex_unlock (&aio_request_queue.mutex);
a000a68c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a690: eb00042c bl a000b748 <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_ALLDONE;
a000a694: e3a05002 mov r5, #2 <== NOT EXECUTED
a000a698: eaffffd6 b a000a5f8 <aio_cancel+0x5c> <== NOT EXECUTED
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
a000a69c: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED
a000a6a0: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED
a000a6a4: e1520003 cmp r2, r3 <== NOT EXECUTED
a000a6a8: 0afffff7 beq a000a68c <aio_cancel+0xf0> <== NOT EXECUTED
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
a000a6ac: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED
a000a6b0: e1a01006 mov r1, r6 <== NOT EXECUTED
a000a6b4: e1a02007 mov r2, r7 <== NOT EXECUTED
a000a6b8: eb00007f bl a000a8bc <rtems_aio_search_fd> <== NOT EXECUTED
if (r_chain == NULL) {
a000a6bc: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a000a6c0: 0afffff1 beq a000a68c <aio_cancel+0xf0> <== NOT EXECUTED
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
pthread_mutex_destroy (&r_chain->mutex);
a000a6c4: e285601c add r6, r5, #28 <== NOT EXECUTED
a000a6c8: eb000a68 bl a000d070 <_Chain_Extract> <== NOT EXECUTED
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
a000a6cc: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a6d0: eb00016b bl a000ac84 <rtems_aio_remove_fd> <== NOT EXECUTED
pthread_mutex_destroy (&r_chain->mutex);
a000a6d4: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a6d8: eb000353 bl a000b42c <pthread_mutex_destroy> <== NOT EXECUTED
pthread_cond_destroy (&r_chain->mutex);
a000a6dc: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a6e0: eb000279 bl a000b0cc <pthread_cond_destroy> <== NOT EXECUTED
free (r_chain);
a000a6e4: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a6e8: ebfff28b bl a000711c <free> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
a000a6ec: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a6f0: eb000414 bl a000b748 <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_CANCELED;
a000a6f4: e1a05007 mov r5, r7 <== NOT EXECUTED
a000a6f8: eaffffbe b a000a5f8 <aio_cancel+0x5c> <== NOT EXECUTED
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock (&aio_request_queue.mutex);
a000a6fc: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a700: eb000410 bl a000b748 <pthread_mutex_unlock> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one (EINVAL);
a000a704: eb002986 bl a0014d24 <__errno> <== NOT EXECUTED
a000a708: e3a03016 mov r3, #22 <== NOT EXECUTED
a000a70c: e5803000 str r3, [r0] <== NOT EXECUTED
a000a710: e3e05000 mvn r5, #0 <== NOT EXECUTED
a000a714: eaffffb7 b a000a5f8 <aio_cancel+0x5c> <== NOT EXECUTED
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
if (fcntl (fildes, F_GETFD) < 0) {
pthread_mutex_unlock(&aio_request_queue.mutex);
a000a718: e1a00004 mov r0, r4
a000a71c: eb000409 bl a000b748 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
a000a720: eb00297f bl a0014d24 <__errno>
a000a724: e3a03009 mov r3, #9
a000a728: e5803000 str r3, [r0]
a000a72c: e3e05000 mvn r5, #0
a000a730: eaffffb0 b a000a5f8 <aio_cancel+0x5c>
a000a740 <aio_fsync>:
)
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
a000a740: e3500a02 cmp r0, #8192 ; 0x2000
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
a000a744: e92d4030 push {r4, r5, lr}
a000a748: e1a04001 mov r4, r1
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
a000a74c: 13a05016 movne r5, #22
)
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
a000a750: 1a000011 bne a000a79c <aio_fsync+0x5c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
a000a754: e5910000 ldr r0, [r1]
a000a758: e3a01003 mov r1, #3
a000a75c: eb001b3f bl a0011460 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
a000a760: e2000003 and r0, r0, #3
a000a764: e2400001 sub r0, r0, #1
a000a768: e3500001 cmp r0, #1
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
a000a76c: 83a05009 movhi r5, #9
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
a000a770: 8a000009 bhi a000a79c <aio_fsync+0x5c>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
a000a774: e3a00018 mov r0, #24
a000a778: ebfff415 bl a00077d4 <malloc> <== NOT EXECUTED
if (req == NULL)
a000a77c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
a000a780: 0a000004 beq a000a798 <aio_fsync+0x58> <== NOT EXECUTED
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
a000a784: e5834014 str r4, [r3, #20] <== NOT EXECUTED
req->aiocbp->aio_lio_opcode = LIO_SYNC;
a000a788: e3a03003 mov r3, #3 <== NOT EXECUTED
a000a78c: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED
return rtems_aio_enqueue (req);
}
a000a790: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
a000a794: ea000169 b a000ad40 <rtems_aio_enqueue> <== NOT EXECUTED
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
a000a798: e3a0500b mov r5, #11 <== NOT EXECUTED
a000a79c: e3e03000 mvn r3, #0
a000a7a0: e5845030 str r5, [r4, #48] ; 0x30
a000a7a4: e5843034 str r3, [r4, #52] ; 0x34
a000a7a8: eb00295d bl a0014d24 <__errno>
a000a7ac: e5805000 str r5, [r0]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
a000a7b0: e3e00000 mvn r0, #0
a000a7b4: e8bd8030 pop {r4, r5, pc}
a000af24 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
a000af24: e92d4030 push {r4, r5, lr}
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
a000af28: e3a01003 mov r1, #3
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
a000af2c: e1a04000 mov r4, r0
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
a000af30: e5900000 ldr r0, [r0]
a000af34: eb001949 bl a0011460 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
a000af38: e2000003 and r0, r0, #3
a000af3c: e3500002 cmp r0, #2
a000af40: 13500000 cmpne r0, #0
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
a000af44: 13a05009 movne r5, #9
{
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
a000af48: 1a00000f bne a000af8c <aio_read+0x68>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
a000af4c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
a000af50: e3530000 cmp r3, #0 <== NOT EXECUTED
a000af54: 1a000013 bne a000afa8 <aio_read+0x84> <== NOT EXECUTED
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
a000af58: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a000af5c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000af60: ba000010 blt a000afa8 <aio_read+0x84> <== NOT EXECUTED
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
a000af64: e3a00018 mov r0, #24 <== NOT EXECUTED
a000af68: ebfff219 bl a00077d4 <malloc> <== NOT EXECUTED
if (req == NULL)
a000af6c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
a000af70: 0a000004 beq a000af88 <aio_read+0x64> <== NOT EXECUTED
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
a000af74: e5834014 str r4, [r3, #20] <== NOT EXECUTED
req->aiocbp->aio_lio_opcode = LIO_READ;
a000af78: e3a03001 mov r3, #1 <== NOT EXECUTED
a000af7c: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED
return rtems_aio_enqueue (req);
}
a000af80: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
a000af84: eaffff6d b a000ad40 <rtems_aio_enqueue> <== NOT EXECUTED
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
a000af88: e3a0500b mov r5, #11 <== NOT EXECUTED
a000af8c: e3e03000 mvn r3, #0
a000af90: e5845030 str r5, [r4, #48] ; 0x30
a000af94: e5843034 str r3, [r4, #52] ; 0x34
a000af98: eb002761 bl a0014d24 <__errno>
a000af9c: e5805000 str r5, [r0]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
a000afa0: e3e00000 mvn r0, #0
a000afa4: e8bd8030 pop {r4, r5, pc}
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
a000afa8: e3a05016 mov r5, #22 <== NOT EXECUTED
a000afac: eafffff6 b a000af8c <aio_read+0x68> <== NOT EXECUTED
a000afb8 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
a000afb8: e92d4030 push {r4, r5, lr}
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
a000afbc: e3a01003 mov r1, #3
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
a000afc0: e1a04000 mov r4, r0
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
a000afc4: e5900000 ldr r0, [r0]
a000afc8: eb001924 bl a0011460 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
a000afcc: e2000003 and r0, r0, #3
a000afd0: e2400001 sub r0, r0, #1
a000afd4: e3500001 cmp r0, #1
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
a000afd8: 83a05009 movhi r5, #9
{
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
a000afdc: 8a00000f bhi a000b020 <aio_write+0x68>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
a000afe0: e5943014 ldr r3, [r4, #20]
a000afe4: e3530000 cmp r3, #0
a000afe8: 1a000013 bne a000b03c <aio_write+0x84>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
a000afec: e5943008 ldr r3, [r4, #8]
a000aff0: e3530000 cmp r3, #0
a000aff4: ba000010 blt a000b03c <aio_write+0x84>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
a000aff8: e3a00018 mov r0, #24
a000affc: ebfff1f4 bl a00077d4 <malloc>
if (req == NULL)
a000b000: e2503000 subs r3, r0, #0
a000b004: 0a000004 beq a000b01c <aio_write+0x64>
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
a000b008: e5834014 str r4, [r3, #20]
req->aiocbp->aio_lio_opcode = LIO_WRITE;
a000b00c: e3a03002 mov r3, #2
a000b010: e584302c str r3, [r4, #44] ; 0x2c
return rtems_aio_enqueue (req);
}
a000b014: e8bd4030 pop {r4, r5, lr}
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
a000b018: eaffff48 b a000ad40 <rtems_aio_enqueue>
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
a000b01c: e3a0500b mov r5, #11 <== NOT EXECUTED
a000b020: e3e03000 mvn r3, #0
a000b024: e5845030 str r5, [r4, #48] ; 0x30
a000b028: e5843034 str r3, [r4, #52] ; 0x34
a000b02c: eb00273c bl a0014d24 <__errno>
a000b030: e5805000 str r5, [r0]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
a000b034: e3e00000 mvn r0, #0
a000b038: e8bd8030 pop {r4, r5, pc}
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
a000b03c: e3a05016 mov r5, #22 <== NOT EXECUTED
a000b040: eafffff6 b a000b020 <aio_write+0x68> <== NOT EXECUTED
a000b834 <alarm>:
}
unsigned int alarm(
unsigned int seconds
)
{
a000b834: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
a000b838: e59f4084 ldr r4, [pc, #132] ; a000b8c4 <alarm+0x90>
}
unsigned int alarm(
unsigned int seconds
)
{
a000b83c: e1a05000 mov r5, r0
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
a000b840: e594601c ldr r6, [r4, #28]
a000b844: e3560000 cmp r6, #0
a000b848: 0a00000d beq a000b884 <alarm+0x50>
_Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
a000b84c: e1a00004 mov r0, r4
a000b850: eb0013d4 bl a00107a8 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
a000b854: e2400002 sub r0, r0, #2
a000b858: e3500001 cmp r0, #1
unsigned int alarm(
unsigned int seconds
)
{
unsigned int remaining = 0;
a000b85c: 83a06000 movhi r6, #0 <== NOT EXECUTED
_Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
a000b860: 9a00000d bls a000b89c <alarm+0x68> <== NOT EXECUTED
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
a000b864: e3550000 cmp r5, #0
a000b868: 0a000003 beq a000b87c <alarm+0x48>
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a000b86c: e59f0054 ldr r0, [pc, #84] ; a000b8c8 <alarm+0x94>
a000b870: e59f104c ldr r1, [pc, #76] ; a000b8c4 <alarm+0x90>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000b874: e584500c str r5, [r4, #12]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a000b878: eb00135b bl a00105ec <_Watchdog_Insert>
_Watchdog_Insert_seconds( the_timer, seconds );
return remaining;
}
a000b87c: e1a00006 mov r0, r6
a000b880: e8bd80f0 pop {r4, r5, r6, r7, pc}
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000b884: e59f3040 ldr r3, [pc, #64] ; a000b8cc <alarm+0x98>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000b888: e5846008 str r6, [r4, #8]
the_watchdog->routine = routine;
the_watchdog->id = id;
a000b88c: e5846020 str r6, [r4, #32]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000b890: e584301c str r3, [r4, #28]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a000b894: e5846024 str r6, [r4, #36] ; 0x24
a000b898: eafffff1 b a000b864 <alarm+0x30>
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
a000b89c: e5943014 ldr r3, [r4, #20]
a000b8a0: e5947018 ldr r7, [r4, #24]
* The stop_time and start_time fields are snapshots of ticks since
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
remaining = the_timer->initial -
a000b8a4: e594600c ldr r6, [r4, #12]
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
a000b8a8: e0637007 rsb r7, r3, r7
a000b8ac: eb0009eb bl a000e060 <TOD_TICKS_PER_SECOND_method>
a000b8b0: e1a01000 mov r1, r0
a000b8b4: e1a00007 mov r0, r7
a000b8b8: eb003a59 bl a001a224 <__aeabi_uidiv>
* The stop_time and start_time fields are snapshots of ticks since
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
remaining = the_timer->initial -
a000b8bc: e0606006 rsb r6, r0, r6
a000b8c0: eaffffe7 b a000b864 <alarm+0x30>
a000a1a8 <clock_getres>:
int clock_getres(
clockid_t clock_id,
struct timespec *res
)
{
if ( !res )
a000a1a8: e3510000 cmp r1, #0 <== NOT EXECUTED
int clock_getres(
clockid_t clock_id,
struct timespec *res
)
{
a000a1ac: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if ( !res )
a000a1b0: 0a000011 beq a000a1fc <clock_getres+0x54> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
switch ( clock_id ) {
a000a1b4: e2400001 sub r0, r0, #1 <== NOT EXECUTED
a000a1b8: e3500002 cmp r0, #2 <== NOT EXECUTED
a000a1bc: 9a000004 bls a000a1d4 <clock_getres+0x2c> <== NOT EXECUTED
res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick();
}
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a000a1c0: eb002441 bl a00132cc <__errno> <== NOT EXECUTED
a000a1c4: e3a03016 mov r3, #22 <== NOT EXECUTED
a000a1c8: e5803000 str r3, [r0] <== NOT EXECUTED
a000a1cc: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
return 0;
}
a000a1d0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case CLOCK_REALTIME:
case CLOCK_PROCESS_CPUTIME:
case CLOCK_THREAD_CPUTIME:
if ( res ) {
res->tv_sec = rtems_configuration_get_microseconds_per_tick() /
a000a1d4: e59f3034 ldr r3, [pc, #52] ; a000a210 <clock_getres+0x68> <== NOT EXECUTED
a000a1d8: e59f2034 ldr r2, [pc, #52] ; a000a214 <clock_getres+0x6c> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return 0;
a000a1dc: e3a00000 mov r0, #0 <== NOT EXECUTED
case CLOCK_REALTIME:
case CLOCK_PROCESS_CPUTIME:
case CLOCK_THREAD_CPUTIME:
if ( res ) {
res->tv_sec = rtems_configuration_get_microseconds_per_tick() /
a000a1e0: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
a000a1e4: e082c293 umull ip, r2, r3, r2 <== NOT EXECUTED
TOD_MICROSECONDS_PER_SECOND;
res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick();
a000a1e8: e3a0cffa mov ip, #1000 ; 0x3e8 <== NOT EXECUTED
a000a1ec: e003039c mul r3, ip, r3 <== NOT EXECUTED
case CLOCK_REALTIME:
case CLOCK_PROCESS_CPUTIME:
case CLOCK_THREAD_CPUTIME:
if ( res ) {
res->tv_sec = rtems_configuration_get_microseconds_per_tick() /
a000a1f0: e1a02922 lsr r2, r2, #18 <== NOT EXECUTED
a000a1f4: e881000c stm r1, {r2, r3} <== NOT EXECUTED
a000a1f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
clockid_t clock_id,
struct timespec *res
)
{
if ( !res )
rtems_set_errno_and_return_minus_one( EINVAL );
a000a1fc: eb002432 bl a00132cc <__errno> <== NOT EXECUTED
a000a200: e3a03016 mov r3, #22 <== NOT EXECUTED
a000a204: e5803000 str r3, [r0] <== NOT EXECUTED
a000a208: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a20c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0009ab4 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
if ( !tp )
a0009ab4: e3510000 cmp r1, #0
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
a0009ab8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !tp )
a0009abc: 0a000019 beq a0009b28 <clock_gettime+0x74>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
a0009ac0: e3500001 cmp r0, #1
a0009ac4: 0a000013 beq a0009b18 <clock_gettime+0x64>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
a0009ac8: e3500004 cmp r0, #4
a0009acc: 0a00000d beq a0009b08 <clock_gettime+0x54>
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
a0009ad0: e3500002 cmp r0, #2
a0009ad4: 0a00000b beq a0009b08 <clock_gettime+0x54>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
a0009ad8: e3500003 cmp r0, #3
a0009adc: 0a000004 beq a0009af4 <clock_gettime+0x40>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
a0009ae0: eb00265c bl a0013458 <__errno>
a0009ae4: e3a03016 mov r3, #22
a0009ae8: e5803000 str r3, [r0]
a0009aec: e3e00000 mvn r0, #0
return 0;
}
a0009af0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
a0009af4: eb002657 bl a0013458 <__errno>
a0009af8: e3a03058 mov r3, #88 ; 0x58
a0009afc: e5803000 str r3, [r0] <== NOT EXECUTED
a0009b00: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0009b04: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
a0009b08: e1a00001 mov r0, r1 <== NOT EXECUTED
a0009b0c: eb0007bf bl a000ba10 <_TOD_Get_uptime_as_timespec> <== NOT EXECUTED
return 0;
a0009b10: e3a00000 mov r0, #0 <== NOT EXECUTED
a0009b14: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
a0009b18: e1a00001 mov r0, r1
a0009b1c: eb0007a1 bl a000b9a8 <_TOD_Get>
return 0;
a0009b20: e3a00000 mov r0, #0
a0009b24: e49df004 pop {pc} ; (ldr pc, [sp], #4)
clockid_t clock_id,
struct timespec *tp
)
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
a0009b28: eb00264a bl a0013458 <__errno>
a0009b2c: e3a03016 mov r3, #22
a0009b30: e5803000 str r3, [r0]
a0009b34: e3e00000 mvn r0, #0
a0009b38: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a0009b3c <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
if ( !tp )
a0009b3c: e3510000 cmp r1, #0
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
a0009b40: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !tp )
a0009b44: 0a00001c beq a0009bbc <clock_settime+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
a0009b48: e3500001 cmp r0, #1
a0009b4c: 0a000008 beq a0009b74 <clock_settime+0x38>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
a0009b50: e3500002 cmp r0, #2
a0009b54: 0a000013 beq a0009ba8 <clock_settime+0x6c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
a0009b58: e3500003 cmp r0, #3
a0009b5c: 0a000011 beq a0009ba8 <clock_settime+0x6c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
a0009b60: eb00263c bl a0013458 <__errno>
a0009b64: e3a03016 mov r3, #22
a0009b68: e5803000 str r3, [r0]
a0009b6c: e3e00000 mvn r0, #0
return 0;
}
a0009b70: e49df004 pop {pc} ; (ldr pc, [sp], #4)
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
a0009b74: e5912000 ldr r2, [r1]
a0009b78: e59f3050 ldr r3, [pc, #80] ; a0009bd0 <clock_settime+0x94>
a0009b7c: e1520003 cmp r2, r3
a0009b80: 9a00000d bls a0009bbc <clock_settime+0x80>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0009b84: e59f3048 ldr r3, [pc, #72] ; a0009bd4 <clock_settime+0x98>
a0009b88: e5932000 ldr r2, [r3]
a0009b8c: e2822001 add r2, r2, #1
a0009b90: e5832000 str r2, [r3]
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
a0009b94: e1a00001 mov r0, r1
a0009b98: eb0007b3 bl a000ba6c <_TOD_Set>
_Thread_Enable_dispatch();
a0009b9c: eb000d2a bl a000d04c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
a0009ba0: e3a00000 mov r0, #0
a0009ba4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
a0009ba8: eb00262a bl a0013458 <__errno> <== NOT EXECUTED
a0009bac: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a0009bb0: e5803000 str r3, [r0] <== NOT EXECUTED
a0009bb4: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0009bb8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
rtems_set_errno_and_return_minus_one( EINVAL );
a0009bbc: eb002625 bl a0013458 <__errno>
a0009bc0: e3a03016 mov r3, #22
a0009bc4: e5803000 str r3, [r0]
a0009bc8: e3e00000 mvn r0, #0
a0009bcc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a00098c4 <fork>:
#include <sys/types.h>
#include <errno.h>
#include <rtems/seterr.h>
int fork( void )
{
a00098c4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a00098c8: eb002454 bl a0012a20 <__errno> <== NOT EXECUTED
a00098cc: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a00098d0: e5803000 str r3, [r0] <== NOT EXECUTED
}
a00098d4: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00098d8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0026090 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
a0026090: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0026094: e24dd00c sub sp, sp, #12
a0026098: e1a04000 mov r4, r0
a002609c: e1a05001 mov r5, r1
a00260a0: e1a07002 mov r7, r2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
a00260a4: ebffff37 bl a0025d88 <getpid>
a00260a8: e1500004 cmp r0, r4
a00260ac: 1a000096 bne a002630c <killinfo+0x27c>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
a00260b0: e3550000 cmp r5, #0
a00260b4: 0a000099 beq a0026320 <killinfo+0x290>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
a00260b8: e2454001 sub r4, r5, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
a00260bc: e354001f cmp r4, #31
a00260c0: 8a000096 bhi a0026320 <killinfo+0x290>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
a00260c4: e59f6280 ldr r6, [pc, #640] ; a002634c <killinfo+0x2bc>
a00260c8: e3a0300c mov r3, #12
a00260cc: e0236395 mla r3, r5, r3, r6
a00260d0: e5933008 ldr r3, [r3, #8]
a00260d4: e3530001 cmp r3, #1
return 0;
a00260d8: 03a00000 moveq r0, #0
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
a00260dc: 0a000039 beq a00261c8 <killinfo+0x138>
/*
* 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 ) )
a00260e0: e3550008 cmp r5, #8
a00260e4: 13550004 cmpne r5, #4
a00260e8: 0a000038 beq a00261d0 <killinfo+0x140>
a00260ec: e355000b cmp r5, #11
a00260f0: 0a000036 beq a00261d0 <killinfo+0x140>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a00260f4: e3a03001 mov r3, #1
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
a00260f8: e3570000 cmp r7, #0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
a00260fc: e58d3004 str r3, [sp, #4]
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
a0026100: e58d5000 str r5, [sp]
a0026104: e1a04413 lsl r4, r3, r4
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
a0026108: 15973000 ldrne r3, [r7]
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
a002610c: 058d7008 streq r7, [sp, #8]
} else {
siginfo->si_value = *value;
a0026110: 158d3008 strne r3, [sp, #8]
a0026114: e59f3234 ldr r3, [pc, #564] ; a0026350 <killinfo+0x2c0>
a0026118: e5932000 ldr r2, [r3]
a002611c: e2822001 add r2, r2, #1
a0026120: e5832000 str r2, [r3]
/*
* 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;
a0026124: e59f3228 ldr r3, [pc, #552] ; a0026354 <killinfo+0x2c4>
a0026128: e5930004 ldr r0, [r3, #4]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
a002612c: e59030fc ldr r3, [r0, #252] ; 0xfc
a0026130: e59330d0 ldr r3, [r3, #208] ; 0xd0
a0026134: e1d43003 bics r3, r4, r3
a0026138: 1a000014 bne a0026190 <killinfo+0x100>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
a002613c: e59fc214 ldr ip, [pc, #532] ; a0026358 <killinfo+0x2c8>
a0026140: e49c3004 ldr r3, [ip], #4
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
a0026144: e153000c cmp r3, ip
a0026148: 0a000033 beq a002621c <killinfo+0x18c>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a002614c: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
a0026150: e1a00003 mov r0, r3 <== NOT EXECUTED
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a0026154: e59310fc ldr r1, [r3, #252] ; 0xfc <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a0026158: e1140002 tst r4, r2 <== NOT EXECUTED
a002615c: 0a000008 beq a0026184 <killinfo+0xf4> <== NOT EXECUTED
a0026160: ea00000a b a0026190 <killinfo+0x100> <== NOT EXECUTED
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
a0026164: e5933000 ldr r3, [r3] <== NOT EXECUTED
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
a0026168: e153000c cmp r3, ip <== NOT EXECUTED
a002616c: 0a00002a beq a002621c <killinfo+0x18c> <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a0026170: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a0026174: e59310fc ldr r1, [r3, #252] ; 0xfc <== NOT EXECUTED
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
a0026178: e1a00003 mov r0, r3 <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a002617c: e1140002 tst r4, r2 <== NOT EXECUTED
a0026180: 1a000002 bne a0026190 <killinfo+0x100> <== NOT EXECUTED
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
a0026184: e59120d0 ldr r2, [r1, #208] ; 0xd0 <== NOT EXECUTED
a0026188: e1d42002 bics r2, r4, r2 <== NOT EXECUTED
a002618c: 0afffff4 beq a0026164 <killinfo+0xd4> <== NOT EXECUTED
/*
* 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 ) ) {
a0026190: e1a01005 mov r1, r5 <== NOT EXECUTED
a0026194: e1a0200d mov r2, sp <== NOT EXECUTED
a0026198: eb00007d bl a0026394 <_POSIX_signals_Unblock_thread> <== NOT EXECUTED
a002619c: e3500000 cmp r0, #0 <== NOT EXECUTED
a00261a0: 1a000006 bne a00261c0 <killinfo+0x130> <== NOT EXECUTED
/*
* 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 );
a00261a4: e1a00004 mov r0, r4
a00261a8: eb00006f bl a002636c <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
a00261ac: e3a0300c mov r3, #12
a00261b0: e0050593 mul r5, r3, r5
a00261b4: e7963005 ldr r3, [r6, r5]
a00261b8: e3530002 cmp r3, #2
a00261bc: 0a000007 beq a00261e0 <killinfo+0x150>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
a00261c0: ebfface9 bl a001156c <_Thread_Enable_dispatch>
return 0;
a00261c4: e3a00000 mov r0, #0
}
a00261c8: e28dd00c add sp, sp, #12
a00261cc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
a00261d0: eb0000fb bl a00265c4 <pthread_self> <== NOT EXECUTED
a00261d4: e1a01005 mov r1, r5 <== NOT EXECUTED
a00261d8: eb0000c0 bl a00264e0 <pthread_kill> <== NOT EXECUTED
a00261dc: eafffff9 b a00261c8 <killinfo+0x138> <== NOT EXECUTED
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
a00261e0: e59f0174 ldr r0, [pc, #372] ; a002635c <killinfo+0x2cc> <== NOT EXECUTED
a00261e4: ebffa62c bl a000fa9c <_Chain_Get> <== NOT EXECUTED
if ( !psiginfo ) {
a00261e8: e2501000 subs r1, r0, #0 <== NOT EXECUTED
a00261ec: 0a000050 beq a0026334 <killinfo+0x2a4> <== NOT EXECUTED
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
a00261f0: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a00261f4: e4932004 ldr r2, [r3], #4 <== NOT EXECUTED
a00261f8: e59d0000 ldr r0, [sp] <== NOT EXECUTED
a00261fc: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0026200: e5810008 str r0, [r1, #8] <== NOT EXECUTED
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
a0026204: e59f0154 ldr r0, [pc, #340] ; a0026360 <killinfo+0x2d0> <== NOT EXECUTED
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
a0026208: e581200c str r2, [r1, #12] <== NOT EXECUTED
a002620c: e5813010 str r3, [r1, #16] <== NOT EXECUTED
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
a0026210: e0800005 add r0, r0, r5 <== NOT EXECUTED
a0026214: ebffa60d bl a000fa50 <_Chain_Append> <== NOT EXECUTED
a0026218: eaffffe8 b a00261c0 <killinfo+0x130> <== NOT EXECUTED
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
a002621c: e59f3140 ldr r3, [pc, #320] ; a0026364 <killinfo+0x2d4>
a0026220: e59fa140 ldr sl, [pc, #320] ; a0026368 <killinfo+0x2d8>
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
a0026224: e3a00000 mov r0, #0
interested_priority = PRIORITY_MAXIMUM + 1;
a0026228: e5d3e000 ldrb lr, [r3]
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
a002622c: e28a9008 add r9, sl, #8
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
a0026230: e28ee001 add lr, lr, #1
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
a0026234: e5ba3004 ldr r3, [sl, #4]!
a0026238: e3530000 cmp r3, #0
a002623c: 0a000022 beq a00262cc <killinfo+0x23c>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
a0026240: e5933004 ldr r3, [r3, #4]
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
a0026244: e1d371b0 ldrh r7, [r3, #16]
object_table = the_info->local_table;
a0026248: e593101c ldr r1, [r3, #28]
for ( index = 1 ; index <= maximum ; index++ ) {
a002624c: e3570000 cmp r7, #0
a0026250: 0a00001d beq a00262cc <killinfo+0x23c>
a0026254: e3a02001 mov r2, #1
the_thread = (Thread_Control *) object_table[ index ];
a0026258: e5b13004 ldr r3, [r1, #4]!
if ( !the_thread )
a002625c: e3530000 cmp r3, #0
a0026260: 0a000016 beq a00262c0 <killinfo+0x230>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
a0026264: e593c014 ldr ip, [r3, #20]
a0026268: e15c000e cmp ip, lr
a002626c: 8a000013 bhi a00262c0 <killinfo+0x230>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
a0026270: e59380fc ldr r8, [r3, #252] ; 0xfc
a0026274: e59880d0 ldr r8, [r8, #208] ; 0xd0
a0026278: e1d48008 bics r8, r4, r8
a002627c: 0a00000f beq a00262c0 <killinfo+0x230>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
a0026280: e15c000e cmp ip, lr <== NOT EXECUTED
a0026284: 3a00001a bcc a00262f4 <killinfo+0x264> <== NOT EXECUTED
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
a0026288: e3500000 cmp r0, #0 <== NOT EXECUTED
a002628c: 0a00000b beq a00262c0 <killinfo+0x230> <== NOT EXECUTED
a0026290: e5908010 ldr r8, [r0, #16] <== NOT EXECUTED
a0026294: e3580000 cmp r8, #0 <== NOT EXECUTED
a0026298: 0a000008 beq a00262c0 <killinfo+0x230> <== NOT EXECUTED
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
a002629c: e593b010 ldr fp, [r3, #16] <== NOT EXECUTED
a00262a0: e35b0000 cmp fp, #0 <== NOT EXECUTED
a00262a4: 0a000012 beq a00262f4 <killinfo+0x264> <== NOT EXECUTED
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
a00262a8: e3180201 tst r8, #268435456 ; 0x10000000 <== NOT EXECUTED
a00262ac: 1a000003 bne a00262c0 <killinfo+0x230> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal (
States_Control the_states
)
{
return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL);
a00262b0: e20bb201 and fp, fp, #268435456 ; 0x10000000 <== NOT EXECUTED
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
a00262b4: e35b0000 cmp fp, #0 <== NOT EXECUTED
a00262b8: 11a0e00c movne lr, ip <== NOT EXECUTED
a00262bc: 11a00003 movne r0, r3 <== NOT EXECUTED
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a00262c0: e2822001 add r2, r2, #1
a00262c4: e1570002 cmp r7, r2
a00262c8: 2affffe2 bcs a0026258 <killinfo+0x1c8>
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
a00262cc: e15a0009 cmp sl, r9
a00262d0: 1affffd7 bne a0026234 <killinfo+0x1a4>
}
}
}
}
if ( interested ) {
a00262d4: e3500000 cmp r0, #0
a00262d8: 0affffb1 beq a00261a4 <killinfo+0x114>
/*
* 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 ) ) {
a00262dc: e1a01005 mov r1, r5 <== NOT EXECUTED
a00262e0: e1a0200d mov r2, sp <== NOT EXECUTED
a00262e4: eb00002a bl a0026394 <_POSIX_signals_Unblock_thread> <== NOT EXECUTED
a00262e8: e3500000 cmp r0, #0 <== NOT EXECUTED
a00262ec: 0affffac beq a00261a4 <killinfo+0x114> <== NOT EXECUTED
a00262f0: eaffffb2 b a00261c0 <killinfo+0x130> <== NOT EXECUTED
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a00262f4: e2822001 add r2, r2, #1 <== NOT EXECUTED
a00262f8: e1570002 cmp r7, r2 <== NOT EXECUTED
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
a00262fc: e1a0e00c mov lr, ip <== NOT EXECUTED
a0026300: e1a00003 mov r0, r3 <== NOT EXECUTED
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a0026304: 2affffd3 bcs a0026258 <killinfo+0x1c8> <== NOT EXECUTED
a0026308: eaffffef b a00262cc <killinfo+0x23c> <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
a002630c: ebffc53b bl a0017800 <__errno> <== NOT EXECUTED
a0026310: e3a03003 mov r3, #3 <== NOT EXECUTED
a0026314: e5803000 str r3, [r0] <== NOT EXECUTED
a0026318: e3e00000 mvn r0, #0 <== NOT EXECUTED
a002631c: eaffffa9 b a00261c8 <killinfo+0x138> <== 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 );
a0026320: ebffc536 bl a0017800 <__errno> <== NOT EXECUTED
a0026324: e3a03016 mov r3, #22 <== NOT EXECUTED
a0026328: e5803000 str r3, [r0] <== NOT EXECUTED
a002632c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0026330: eaffffa4 b a00261c8 <killinfo+0x138> <== NOT EXECUTED
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
a0026334: ebffac8c bl a001156c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EAGAIN );
a0026338: ebffc530 bl a0017800 <__errno> <== NOT EXECUTED
a002633c: e3a0300b mov r3, #11 <== NOT EXECUTED
a0026340: e5803000 str r3, [r0] <== NOT EXECUTED
a0026344: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0026348: eaffff9e b a00261c8 <killinfo+0x138> <== NOT EXECUTED
a00098f4 <mprotect>:
const void *addr __attribute__((unused)),
size_t len __attribute__((unused)),
int prot __attribute__((unused)) )
{
return 0;
}
a00098f4: e3a00000 mov r0, #0 <== NOT EXECUTED
a00098f8: e12fff1e bx lr <== NOT EXECUTED
a000eee0 <mq_close>:
*/
int mq_close(
mqd_t mqdes
)
{
a000eee0: e92d4030 push {r4, r5, lr}
a000eee4: e24dd004 sub sp, sp, #4
a000eee8: e1a01000 mov r1, r0
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
a000eeec: e1a0200d mov r2, sp
a000eef0: e59f0064 ldr r0, [pc, #100] ; a000ef5c <mq_close+0x7c>
a000eef4: eb000d64 bl a001248c <_Objects_Get>
POSIX_Message_queue_Control *the_mq;
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
if ( location == OBJECTS_LOCAL ) {
a000eef8: e59d5000 ldr r5, [sp]
a000eefc: e1a04000 mov r4, r0
a000ef00: e3550000 cmp r5, #0
a000ef04: 1a00000f bne a000ef48 <mq_close+0x68>
* First update the actual message queue to reflect this descriptor
* being disassociated. This may result in the queue being really
* deleted.
*/
the_mq = the_mq_fd->Queue;
a000ef08: e5903010 ldr r3, [r0, #16]
the_mq->open_count -= 1;
a000ef0c: e5932018 ldr r2, [r3, #24]
_POSIX_Message_queue_Delete( the_mq );
a000ef10: e1a00003 mov r0, r3
* being disassociated. This may result in the queue being really
* deleted.
*/
the_mq = the_mq_fd->Queue;
the_mq->open_count -= 1;
a000ef14: e2422001 sub r2, r2, #1
a000ef18: e5832018 str r2, [r3, #24]
_POSIX_Message_queue_Delete( the_mq );
a000ef1c: eb00000f bl a000ef60 <_POSIX_Message_queue_Delete>
/*
* Now close this file descriptor.
*/
_Objects_Close(
a000ef20: e1a01004 mov r1, r4
a000ef24: e59f0030 ldr r0, [pc, #48] ; a000ef5c <mq_close+0x7c>
a000ef28: eb000c47 bl a001204c <_Objects_Close>
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
a000ef2c: e59f0028 ldr r0, [pc, #40] ; a000ef5c <mq_close+0x7c>
a000ef30: e1a01004 mov r1, r4
a000ef34: eb000cfb bl a0012328 <_Objects_Free>
&_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
a000ef38: eb00105d bl a00130b4 <_Thread_Enable_dispatch>
return 0;
a000ef3c: e1a00005 mov r0, r5
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
}
a000ef40: e28dd004 add sp, sp, #4
a000ef44: e8bd8030 pop {r4, r5, pc}
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
a000ef48: eb002b29 bl a0019bf4 <__errno>
a000ef4c: e3a03009 mov r3, #9
a000ef50: e5803000 str r3, [r0] <== NOT EXECUTED
a000ef54: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000ef58: eafffff8 b a000ef40 <mq_close+0x60> <== NOT EXECUTED
a000efb4 <mq_getattr>:
int mq_getattr(
mqd_t mqdes,
struct mq_attr *mqstat
)
{
a000efb4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
POSIX_Message_queue_Control *the_mq;
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
CORE_message_queue_Attributes *the_mq_attr;
if ( !mqstat )
a000efb8: e2514000 subs r4, r1, #0 <== NOT EXECUTED
int mq_getattr(
mqd_t mqdes,
struct mq_attr *mqstat
)
{
a000efbc: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000efc0: e1a01000 mov r1, r0 <== NOT EXECUTED
POSIX_Message_queue_Control *the_mq;
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
CORE_message_queue_Attributes *the_mq_attr;
if ( !mqstat )
a000efc4: 0a000017 beq a000f028 <mq_getattr+0x74> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
a000efc8: e59f006c ldr r0, [pc, #108] ; a000f03c <mq_getattr+0x88> <== NOT EXECUTED
a000efcc: e1a0200d mov r2, sp <== NOT EXECUTED
a000efd0: eb000d2d bl a001248c <_Objects_Get> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
a000efd4: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a000efd8: e3550000 cmp r5, #0 <== NOT EXECUTED
a000efdc: 1a00000c bne a000f014 <mq_getattr+0x60> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
a000efe0: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
* Return the old values.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
mqstat->mq_flags = the_mq_fd->oflag;
a000efe4: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED
mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
a000efe8: e5931068 ldr r1, [r3, #104] ; 0x68 <== NOT EXECUTED
mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages;
a000efec: e5932060 ldr r2, [r3, #96] ; 0x60 <== NOT EXECUTED
mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
a000eff0: e5933064 ldr r3, [r3, #100] ; 0x64 <== NOT EXECUTED
* Return the old values.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
mqstat->mq_flags = the_mq_fd->oflag;
a000eff4: e5840000 str r0, [r4] <== NOT EXECUTED
mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
a000eff8: e5841008 str r1, [r4, #8] <== NOT EXECUTED
mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages;
a000effc: e5842004 str r2, [r4, #4] <== NOT EXECUTED
mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
a000f000: e584300c str r3, [r4, #12] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000f004: eb00102a bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000f008: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
a000f00c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000f010: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
a000f014: eb002af6 bl a0019bf4 <__errno> <== NOT EXECUTED
a000f018: e3a03009 mov r3, #9 <== NOT EXECUTED
a000f01c: e5803000 str r3, [r0] <== NOT EXECUTED
a000f020: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000f024: eafffff8 b a000f00c <mq_getattr+0x58> <== NOT EXECUTED
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
CORE_message_queue_Attributes *the_mq_attr;
if ( !mqstat )
rtems_set_errno_and_return_minus_one( EINVAL );
a000f028: eb002af1 bl a0019bf4 <__errno> <== NOT EXECUTED
a000f02c: e3a03016 mov r3, #22 <== NOT EXECUTED
a000f030: e5803000 str r3, [r0] <== NOT EXECUTED
a000f034: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000f038: eafffff3 b a000f00c <mq_getattr+0x58> <== NOT EXECUTED
a000f064 <mq_notify>:
int mq_notify(
mqd_t mqdes,
const struct sigevent *notification
)
{
a000f064: e92d4010 push {r4, lr} <== NOT EXECUTED
a000f068: e1a03000 mov r3, r0 <== NOT EXECUTED
a000f06c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000f070: e1a04001 mov r4, r1 <== NOT EXECUTED
a000f074: e59f0098 ldr r0, [pc, #152] ; a000f114 <mq_notify+0xb0> <== NOT EXECUTED
a000f078: e1a01003 mov r1, r3 <== NOT EXECUTED
a000f07c: e1a0200d mov r2, sp <== NOT EXECUTED
a000f080: eb000d01 bl a001248c <_Objects_Get> <== NOT EXECUTED
POSIX_Message_queue_Control *the_mq;
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
a000f084: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000f088: e3530000 cmp r3, #0 <== NOT EXECUTED
a000f08c: 0a000005 beq a000f0a8 <mq_notify+0x44> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
a000f090: eb002ad7 bl a0019bf4 <__errno> <== NOT EXECUTED
a000f094: e3a03009 mov r3, #9 <== NOT EXECUTED
a000f098: e5803000 str r3, [r0] <== NOT EXECUTED
a000f09c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a000f0a0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000f0a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
switch ( location ) {
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
if ( notification ) {
a000f0a8: e3540000 cmp r4, #0 <== NOT EXECUTED
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
a000f0ac: e590e010 ldr lr, [r0, #16] <== NOT EXECUTED
if ( notification ) {
a000f0b0: 0a00000e beq a000f0f0 <mq_notify+0x8c> <== NOT EXECUTED
if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) {
a000f0b4: e59e307c ldr r3, [lr, #124] ; 0x7c <== NOT EXECUTED
a000f0b8: e3530000 cmp r3, #0 <== NOT EXECUTED
a000f0bc: 1a00000e bne a000f0fc <mq_notify+0x98> <== NOT EXECUTED
a000f0c0: e58e3080 str r3, [lr, #128] ; 0x80 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBUSY );
}
_CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
the_mq->notification = *notification;
a000f0c4: e28ec090 add ip, lr, #144 ; 0x90 <== NOT EXECUTED
a000f0c8: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED
a000f0cc: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
a000f0d0: e59f2040 ldr r2, [pc, #64] ; a000f118 <mq_notify+0xb4> <== NOT EXECUTED
a000f0d4: e5943000 ldr r3, [r4] <== NOT EXECUTED
the_message_queue->notify_argument = the_argument;
a000f0d8: e58ee080 str lr, [lr, #128] ; 0x80 <== NOT EXECUTED
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
a000f0dc: e58e207c str r2, [lr, #124] ; 0x7c <== NOT EXECUTED
a000f0e0: e58c3000 str r3, [ip] <== NOT EXECUTED
_CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
}
_Thread_Enable_dispatch();
a000f0e4: eb000ff2 bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000f0e8: e3a00000 mov r0, #0 <== NOT EXECUTED
a000f0ec: eaffffeb b a000f0a0 <mq_notify+0x3c> <== NOT EXECUTED
a000f0f0: e58e407c str r4, [lr, #124] ; 0x7c <== NOT EXECUTED
the_message_queue->notify_argument = the_argument;
a000f0f4: e58e4080 str r4, [lr, #128] ; 0x80 <== NOT EXECUTED
a000f0f8: eafffff9 b a000f0e4 <mq_notify+0x80> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
if ( notification ) {
if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) {
_Thread_Enable_dispatch();
a000f0fc: eb000fec bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBUSY );
a000f100: eb002abb bl a0019bf4 <__errno> <== NOT EXECUTED
a000f104: e3a03010 mov r3, #16 <== NOT EXECUTED
a000f108: e5803000 str r3, [r0] <== NOT EXECUTED
a000f10c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000f110: eaffffe2 b a000f0a0 <mq_notify+0x3c> <== NOT EXECUTED
a000f11c <mq_open>:
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
a000f11c: e92d000e push {r1, r2, r3}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000f120: e59f3184 ldr r3, [pc, #388] ; a000f2ac <mq_open+0x190>
a000f124: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
a000f128: e5932000 ldr r2, [r3]
a000f12c: e24dd010 sub sp, sp, #16
a000f130: e59d7030 ldr r7, [sp, #48] ; 0x30
a000f134: e2822001 add r2, r2, #1
a000f138: e5832000 str r2, [r3]
a000f13c: e1a0a000 mov sl, r0
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
_Objects_Allocate( &_POSIX_Message_queue_Information_fds );
a000f140: e59f5168 ldr r5, [pc, #360] ; a000f2b0 <mq_open+0x194>
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
a000f144: e2178c02 ands r8, r7, #512 ; 0x200
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
a000f148: 128d303c addne r3, sp, #60 ; 0x3c
a000f14c: e1a00005 mov r0, r5
a000f150: 158d300c strne r3, [sp, #12]
a000f154: 159d9038 ldrne r9, [sp, #56] ; 0x38
/* struct mq_attr attr */
)
{
va_list arg;
mode_t mode;
struct mq_attr *attr = NULL;
a000f158: 01a09008 moveq r9, r8
a000f15c: eb000b95 bl a0011fb8 <_Objects_Allocate>
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
a000f160: e2504000 subs r4, r0, #0
a000f164: 0a000027 beq a000f208 <mq_open+0xec>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
a000f168: e5847014 str r7, [r4, #20]
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
a000f16c: e1a0000a mov r0, sl
a000f170: e28d1008 add r1, sp, #8
a000f174: eb001c0f bl a00161b8 <_POSIX_Message_queue_Name_to_id>
* If the name to id translation worked, then the message queue exists
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "message queue does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
a000f178: e2506000 subs r6, r0, #0
a000f17c: 1a000017 bne a000f1e0 <mq_open+0xc4>
} else { /* name -> ID translation succeeded */
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
a000f180: e2077c0a and r7, r7, #2560 ; 0xa00 <== NOT EXECUTED
a000f184: e3570c0a cmp r7, #2560 ; 0xa00 <== NOT EXECUTED
a000f188: 0a000024 beq a000f220 <mq_open+0x104> <== NOT EXECUTED
Objects_Id id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control *)
_Objects_Get( &_POSIX_Message_queue_Information, id, location );
a000f18c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
a000f190: e1a0200d mov r2, sp <== NOT EXECUTED
a000f194: e59f0118 ldr r0, [pc, #280] ; a000f2b4 <mq_open+0x198> <== NOT EXECUTED
a000f198: eb000cbb bl a001248c <_Objects_Get> <== NOT EXECUTED
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
the_mq->open_count += 1;
a000f19c: e5901018 ldr r1, [r0, #24] <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000f1a0: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
a000f1a4: e1d420b8 ldrh r2, [r4, #8] <== NOT EXECUTED
a000f1a8: e2811001 add r1, r1, #1 <== NOT EXECUTED
a000f1ac: e5801018 str r1, [r0, #24] <== NOT EXECUTED
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
a000f1b0: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
the_mq->open_count += 1;
the_mq_fd->Queue = the_mq;
a000f1b4: e5840010 str r0, [r4, #16] <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000f1b8: e7834102 str r4, [r3, r2, lsl #2] <== NOT EXECUTED
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
a000f1bc: e584600c str r6, [r4, #12] <== NOT EXECUTED
_Objects_Open_string(
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
a000f1c0: eb000fbb bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000f1c4: eb000fba bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return (mqd_t)the_mq_fd->Object.id;
a000f1c8: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
a000f1cc: e1a00003 mov r0, r3
a000f1d0: e28dd010 add sp, sp, #16
a000f1d4: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
a000f1d8: e28dd00c add sp, sp, #12
a000f1dc: e12fff1e bx lr
if ( status ) {
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
a000f1e0: e3560002 cmp r6, #2
a000f1e4: 0a000016 beq a000f244 <mq_open+0x128>
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
a000f1e8: e59f00c0 ldr r0, [pc, #192] ; a000f2b0 <mq_open+0x194>
a000f1ec: e1a01004 mov r1, r4
a000f1f0: eb000c4c bl a0012328 <_Objects_Free>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
a000f1f4: eb000fae bl a00130b4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
a000f1f8: eb002a7d bl a0019bf4 <__errno>
a000f1fc: e3e03000 mvn r3, #0
a000f200: e5806000 str r6, [r0]
a000f204: eafffff0 b a000f1cc <mq_open+0xb0>
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
_Thread_Enable_dispatch();
a000f208: eb000fa9 bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENFILE );
a000f20c: eb002a78 bl a0019bf4 <__errno> <== NOT EXECUTED
a000f210: e3a03017 mov r3, #23 <== NOT EXECUTED
a000f214: e5803000 str r3, [r0] <== NOT EXECUTED
a000f218: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000f21c: eaffffea b a000f1cc <mq_open+0xb0> <== NOT EXECUTED
a000f220: e1a00005 mov r0, r5 <== NOT EXECUTED
a000f224: e1a01004 mov r1, r4 <== NOT EXECUTED
a000f228: eb000c3e bl a0012328 <_Objects_Free> <== NOT EXECUTED
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
a000f22c: eb000fa0 bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
a000f230: eb002a6f bl a0019bf4 <__errno> <== NOT EXECUTED
a000f234: e3a03011 mov r3, #17 <== NOT EXECUTED
a000f238: e5803000 str r3, [r0] <== NOT EXECUTED
a000f23c: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000f240: eaffffe1 b a000f1cc <mq_open+0xb0> <== NOT EXECUTED
if ( status ) {
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
a000f244: e3580000 cmp r8, #0
a000f248: 0affffe6 beq a000f1e8 <mq_open+0xcc>
/*
* At this point, the message queue does not exist and everything has been
* checked. We should go ahead and create a message queue.
*/
status = _POSIX_Message_queue_Create_support(
a000f24c: e1a0000a mov r0, sl
a000f250: e3a01001 mov r1, #1
a000f254: e1a02009 mov r2, r9
a000f258: e28d3004 add r3, sp, #4
a000f25c: eb001b76 bl a001603c <_POSIX_Message_queue_Create_support>
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
a000f260: e3700001 cmn r0, #1
/*
* At this point, the message queue does not exist and everything has been
* checked. We should go ahead and create a message queue.
*/
status = _POSIX_Message_queue_Create_support(
a000f264: e1a06000 mov r6, r0
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
a000f268: 0a000009 beq a000f294 <mq_open+0x178>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000f26c: e595301c ldr r3, [r5, #28]
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
a000f270: e59d1004 ldr r1, [sp, #4]
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
a000f274: e1d420b8 ldrh r2, [r4, #8]
a000f278: e5841010 str r1, [r4, #16]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000f27c: e7834102 str r4, [r3, r2, lsl #2]
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
a000f280: e3a03000 mov r3, #0
a000f284: e584300c str r3, [r4, #12]
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
a000f288: eb000f89 bl a00130b4 <_Thread_Enable_dispatch>
return (mqd_t) the_mq_fd->Object.id;
a000f28c: e5943008 ldr r3, [r4, #8]
a000f290: eaffffcd b a000f1cc <mq_open+0xb0>
a000f294: e1a00005 mov r0, r5
a000f298: e1a01004 mov r1, r4
a000f29c: eb000c21 bl a0012328 <_Objects_Free>
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
a000f2a0: eb000f83 bl a00130b4 <_Thread_Enable_dispatch>
return (mqd_t) -1;
a000f2a4: e1a03006 mov r3, r6
a000f2a8: eaffffc7 b a000f1cc <mq_open+0xb0>
a000f2b8 <mq_receive>:
mqd_t mqdes,
char *msg_ptr,
size_t msg_len,
unsigned int *msg_prio
)
{
a000f2b8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
return _POSIX_Message_queue_Receive_support(
a000f2bc: e3a0c001 mov ip, #1 <== NOT EXECUTED
mqd_t mqdes,
char *msg_ptr,
size_t msg_len,
unsigned int *msg_prio
)
{
a000f2c0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
return _POSIX_Message_queue_Receive_support(
a000f2c4: e58dc000 str ip, [sp] <== NOT EXECUTED
a000f2c8: e3a0c000 mov ip, #0 <== NOT EXECUTED
a000f2cc: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
a000f2d0: eb000001 bl a000f2dc <_POSIX_Message_queue_Receive_support><== NOT EXECUTED
msg_len,
msg_prio,
true,
THREAD_QUEUE_WAIT_FOREVER
);
}
a000f2d4: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000f2d8: e8bd8000 pop {pc} <== NOT EXECUTED
a000f558 <mq_setattr>:
int mq_setattr(
mqd_t mqdes,
const struct mq_attr *mqstat,
struct mq_attr *omqstat
)
{
a000f558: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
POSIX_Message_queue_Control_fd *the_mq_fd;
CORE_message_queue_Control *the_core_mq;
Objects_Locations location;
if ( !mqstat )
a000f55c: e2515000 subs r5, r1, #0 <== NOT EXECUTED
int mq_setattr(
mqd_t mqdes,
const struct mq_attr *mqstat,
struct mq_attr *omqstat
)
{
a000f560: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000f564: e1a01000 mov r1, r0 <== NOT EXECUTED
a000f568: e1a04002 mov r4, r2 <== NOT EXECUTED
POSIX_Message_queue_Control_fd *the_mq_fd;
CORE_message_queue_Control *the_core_mq;
Objects_Locations location;
if ( !mqstat )
a000f56c: 0a00001b beq a000f5e0 <mq_setattr+0x88> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
a000f570: e59f007c ldr r0, [pc, #124] ; a000f5f4 <mq_setattr+0x9c> <== NOT EXECUTED
a000f574: e1a0200d mov r2, sp <== NOT EXECUTED
a000f578: eb000bc3 bl a001248c <_Objects_Get> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
a000f57c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000f580: e3530000 cmp r3, #0 <== NOT EXECUTED
a000f584: 1a000010 bne a000f5cc <mq_setattr+0x74> <== NOT EXECUTED
/*
* Return the old values.
*/
if ( omqstat ) {
a000f588: e3540000 cmp r4, #0 <== NOT EXECUTED
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_core_mq = &the_mq_fd->Queue->Message_queue;
a000f58c: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
/*
* Return the old values.
*/
if ( omqstat ) {
a000f590: 0a000007 beq a000f5b4 <mq_setattr+0x5c> <== NOT EXECUTED
omqstat->mq_flags = the_mq_fd->oflag;
omqstat->mq_msgsize = the_core_mq->maximum_message_size;
a000f594: e5931068 ldr r1, [r3, #104] ; 0x68 <== NOT EXECUTED
omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages;
a000f598: e5932060 ldr r2, [r3, #96] ; 0x60 <== NOT EXECUTED
/*
* Return the old values.
*/
if ( omqstat ) {
omqstat->mq_flags = the_mq_fd->oflag;
a000f59c: e590c014 ldr ip, [r0, #20] <== NOT EXECUTED
omqstat->mq_msgsize = the_core_mq->maximum_message_size;
omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages;
omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages;
a000f5a0: e5933064 ldr r3, [r3, #100] ; 0x64 <== NOT EXECUTED
* Return the old values.
*/
if ( omqstat ) {
omqstat->mq_flags = the_mq_fd->oflag;
omqstat->mq_msgsize = the_core_mq->maximum_message_size;
a000f5a4: e5841008 str r1, [r4, #8] <== NOT EXECUTED
/*
* Return the old values.
*/
if ( omqstat ) {
omqstat->mq_flags = the_mq_fd->oflag;
a000f5a8: e584c000 str ip, [r4] <== NOT EXECUTED
omqstat->mq_msgsize = the_core_mq->maximum_message_size;
omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages;
a000f5ac: e5842004 str r2, [r4, #4] <== NOT EXECUTED
omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages;
a000f5b0: e584300c str r3, [r4, #12] <== NOT EXECUTED
}
the_mq_fd->oflag = mqstat->mq_flags;
a000f5b4: e5953000 ldr r3, [r5] <== NOT EXECUTED
a000f5b8: e5803014 str r3, [r0, #20] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000f5bc: eb000ebc bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000f5c0: e3a00000 mov r0, #0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
a000f5c4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000f5c8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
a000f5cc: eb002988 bl a0019bf4 <__errno> <== NOT EXECUTED
a000f5d0: e3a03009 mov r3, #9 <== NOT EXECUTED
a000f5d4: e5803000 str r3, [r0] <== NOT EXECUTED
a000f5d8: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000f5dc: eafffff8 b a000f5c4 <mq_setattr+0x6c> <== NOT EXECUTED
POSIX_Message_queue_Control_fd *the_mq_fd;
CORE_message_queue_Control *the_core_mq;
Objects_Locations location;
if ( !mqstat )
rtems_set_errno_and_return_minus_one( EINVAL );
a000f5e0: eb002983 bl a0019bf4 <__errno> <== NOT EXECUTED
a000f5e4: e3a03016 mov r3, #22 <== NOT EXECUTED
a000f5e8: e5803000 str r3, [r0] <== NOT EXECUTED
a000f5ec: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000f5f0: eafffff3 b a000f5c4 <mq_setattr+0x6c> <== NOT EXECUTED
a000f5f8 <mq_timedreceive>:
char *msg_ptr,
size_t msg_len,
unsigned int *msg_prio,
const struct timespec *abstime
)
{
a000f5f8: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
a000f5fc: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
a000f600: e1a05000 mov r5, r0 <== NOT EXECUTED
a000f604: e1a04001 mov r4, r1 <== NOT EXECUTED
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
a000f608: e59d0020 ldr r0, [sp, #32] <== NOT EXECUTED
a000f60c: e28d1008 add r1, sp, #8 <== NOT EXECUTED
char *msg_ptr,
size_t msg_len,
unsigned int *msg_prio,
const struct timespec *abstime
)
{
a000f610: e1a06003 mov r6, r3 <== NOT EXECUTED
a000f614: e1a07002 mov r7, r2 <== NOT EXECUTED
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
a000f618: eb000043 bl a000f72c <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
return _POSIX_Message_queue_Receive_support(
a000f61c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a000f620: e3500003 cmp r0, #3 <== NOT EXECUTED
a000f624: 13a00000 movne r0, #0 <== NOT EXECUTED
a000f628: 03a00001 moveq r0, #1 <== NOT EXECUTED
a000f62c: e88d0009 stm sp, {r0, r3} <== NOT EXECUTED
a000f630: e1a00005 mov r0, r5 <== NOT EXECUTED
a000f634: e1a01004 mov r1, r4 <== NOT EXECUTED
a000f638: e1a02007 mov r2, r7 <== NOT EXECUTED
a000f63c: e1a03006 mov r3, r6 <== NOT EXECUTED
a000f640: ebffff25 bl a000f2dc <_POSIX_Message_queue_Receive_support><== NOT EXECUTED
msg_len,
msg_prio,
do_wait,
ticks
);
}
a000f644: e28dd00c add sp, sp, #12 <== NOT EXECUTED
a000f648: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a000f64c <mq_timedsend>:
const char *msg_ptr,
size_t msg_len,
unsigned int msg_prio,
const struct timespec *abstime
)
{
a000f64c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
a000f650: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
a000f654: e1a05000 mov r5, r0 <== NOT EXECUTED
a000f658: e1a04001 mov r4, r1 <== NOT EXECUTED
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
a000f65c: e59d0020 ldr r0, [sp, #32] <== NOT EXECUTED
a000f660: e28d1008 add r1, sp, #8 <== NOT EXECUTED
const char *msg_ptr,
size_t msg_len,
unsigned int msg_prio,
const struct timespec *abstime
)
{
a000f664: e1a06003 mov r6, r3 <== NOT EXECUTED
a000f668: e1a07002 mov r7, r2 <== NOT EXECUTED
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
a000f66c: eb00002e bl a000f72c <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
return _POSIX_Message_queue_Send_support(
a000f670: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a000f674: e3500003 cmp r0, #3 <== NOT EXECUTED
a000f678: 13a00000 movne r0, #0 <== NOT EXECUTED
a000f67c: 03a00001 moveq r0, #1 <== NOT EXECUTED
a000f680: e88d0009 stm sp, {r0, r3} <== NOT EXECUTED
a000f684: e1a00005 mov r0, r5 <== NOT EXECUTED
a000f688: e1a01004 mov r1, r4 <== NOT EXECUTED
a000f68c: e1a02007 mov r2, r7 <== NOT EXECUTED
a000f690: e1a03006 mov r3, r6 <== NOT EXECUTED
a000f694: ebffff66 bl a000f434 <_POSIX_Message_queue_Send_support> <== NOT EXECUTED
msg_len,
msg_prio,
do_wait,
ticks
);
}
a000f698: e28dd00c add sp, sp, #12 <== NOT EXECUTED
a000f69c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a000f6b0 <mq_unlink>:
a000f6b0: e59f306c ldr r3, [pc, #108] ; a000f724 <mq_unlink+0x74>
*/
int mq_unlink(
const char *name
)
{
a000f6b4: e92d4030 push {r4, r5, lr}
a000f6b8: e5932000 ldr r2, [r3]
a000f6bc: e24dd004 sub sp, sp, #4
a000f6c0: e2822001 add r2, r2, #1
a000f6c4: e5832000 str r2, [r3]
register POSIX_Message_queue_Control *the_mq;
Objects_Id the_mq_id;
_Thread_Disable_dispatch();
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
a000f6c8: e1a0100d mov r1, sp
a000f6cc: eb001ab9 bl a00161b8 <_POSIX_Message_queue_Name_to_id>
if ( status != 0 ) {
a000f6d0: e2505000 subs r5, r0, #0
a000f6d4: 1a00000d bne a000f710 <mq_unlink+0x60>
_POSIX_Message_queue_Namespace_remove( the_mq );
_POSIX_Message_queue_Delete( the_mq );
_Thread_Enable_dispatch();
return 0;
}
a000f6d8: e59f0048 ldr r0, [pc, #72] ; a000f728 <mq_unlink+0x78>
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
a000f6dc: e1dd20b0 ldrh r2, [sp]
a000f6e0: e590301c ldr r3, [r0, #28]
if ( status != 0 ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( status );
}
the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object(
a000f6e4: e7934102 ldr r4, [r3, r2, lsl #2]
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Namespace_remove(
a000f6e8: e1a01004 mov r1, r4
&_POSIX_Message_queue_Information,
_Objects_Get_index( the_mq_id )
);
the_mq->linked = false;
a000f6ec: e5c45015 strb r5, [r4, #21]
a000f6f0: eb000bbd bl a00125ec <_Objects_Namespace_remove>
_POSIX_Message_queue_Namespace_remove( the_mq );
_POSIX_Message_queue_Delete( the_mq );
a000f6f4: e1a00004 mov r0, r4
a000f6f8: ebfffe18 bl a000ef60 <_POSIX_Message_queue_Delete>
_Thread_Enable_dispatch();
a000f6fc: eb000e6c bl a00130b4 <_Thread_Enable_dispatch>
return 0;
a000f700: e1a03005 mov r3, r5
}
a000f704: e1a00003 mov r0, r3
a000f708: e28dd004 add sp, sp, #4
a000f70c: e8bd8030 pop {r4, r5, pc}
_Thread_Disable_dispatch();
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
if ( status != 0 ) {
_Thread_Enable_dispatch();
a000f710: eb000e67 bl a00130b4 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( status );
a000f714: eb002936 bl a0019bf4 <__errno> <== NOT EXECUTED
a000f718: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000f71c: e5805000 str r5, [r0] <== NOT EXECUTED
a000f720: eafffff7 b a000f704 <mq_unlink+0x54> <== NOT EXECUTED
a001e764 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
a001e764: e92d4070 push {r4, r5, r6, lr}
a001e768: e1a05000 mov r5, r0
a001e76c: e1a04001 mov r4, r1
* 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 ( !_Timespec_Is_valid( rqtp ) )
a001e770: eb000067 bl a001e914 <_Timespec_Is_valid>
a001e774: e3500000 cmp r0, #0
a001e778: 0a000036 beq a001e858 <nanosleep+0xf4>
rtems_set_errno_and_return_minus_one( EINVAL );
ticks = _Timespec_To_ticks( rqtp );
a001e77c: e1a00005 mov r0, r5
a001e780: ebffc87a bl a0010970 <_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 ) {
a001e784: e2505000 subs r5, r0, #0
a001e788: 0a000022 beq a001e818 <nanosleep+0xb4>
a001e78c: e59f30ec ldr r3, [pc, #236] ; a001e880 <nanosleep+0x11c>
a001e790: e5932000 ldr r2, [r3]
a001e794: e2822001 add r2, r2, #1
a001e798: e5832000 str r2, [r3]
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
a001e79c: e59f60e0 ldr r6, [pc, #224] ; a001e884 <nanosleep+0x120>
a001e7a0: e3a01281 mov r1, #268435464 ; 0x10000008
a001e7a4: e5960004 ldr r0, [r6, #4]
a001e7a8: ebffb911 bl a000cbf4 <_Thread_Set_state>
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
&_Thread_Executing->Timer,
a001e7ac: e5961004 ldr r1, [r6, #4]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a001e7b0: e59f00d0 ldr r0, [pc, #208] ; a001e888 <nanosleep+0x124>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a001e7b4: e3a03000 mov r3, #0
_Thread_Disable_dispatch();
_Thread_Set_state(
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
a001e7b8: e5912008 ldr r2, [r1, #8]
a001e7bc: e5813050 str r3, [r1, #80] ; 0x50
the_watchdog->routine = routine;
a001e7c0: e5810064 str r0, [r1, #100] ; 0x64
the_watchdog->id = id;
a001e7c4: e5812068 str r2, [r1, #104] ; 0x68
the_watchdog->user_data = user_data;
a001e7c8: e581306c str r3, [r1, #108] ; 0x6c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a001e7cc: e5815054 str r5, [r1, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a001e7d0: e59f00b4 ldr r0, [pc, #180] ; a001e88c <nanosleep+0x128>
a001e7d4: e2811048 add r1, r1, #72 ; 0x48
a001e7d8: ebffbac2 bl a000d2e8 <_Watchdog_Insert>
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
a001e7dc: ebffb6d3 bl a000c330 <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
a001e7e0: e3540000 cmp r4, #0
a001e7e4: 0a000019 beq a001e850 <nanosleep+0xec> <== NOT EXECUTED
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
a001e7e8: e5963004 ldr r3, [r6, #4] <== NOT EXECUTED
_Timespec_From_ticks( ticks, rmtp );
a001e7ec: e1a01004 mov r1, r4 <== NOT EXECUTED
/* calculate time remaining */
if ( rmtp ) {
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
a001e7f0: e593405c ldr r4, [r3, #92] ; 0x5c <== NOT EXECUTED
a001e7f4: e5933060 ldr r3, [r3, #96] ; 0x60 <== NOT EXECUTED
a001e7f8: e0634004 rsb r4, r3, r4 <== NOT EXECUTED
_Thread_Enable_dispatch();
/* calculate time remaining */
if ( rmtp ) {
ticks -=
a001e7fc: e0845005 add r5, r4, r5 <== NOT EXECUTED
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
a001e800: e1a00005 mov r0, r5 <== NOT EXECUTED
a001e804: eb000031 bl a001e8d0 <_Timespec_From_ticks> <== NOT EXECUTED
*/
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
a001e808: e3550000 cmp r5, #0 <== NOT EXECUTED
a001e80c: 1a000016 bne a001e86c <nanosleep+0x108> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINTR );
#endif
}
return 0;
a001e810: e1a00005 mov r0, r5 <== NOT EXECUTED
}
a001e814: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a001e818: e59f3060 ldr r3, [pc, #96] ; a001e880 <nanosleep+0x11c> <== NOT EXECUTED
a001e81c: e5932000 ldr r2, [r3] <== NOT EXECUTED
a001e820: e2822001 add r2, r2, #1 <== NOT EXECUTED
a001e824: e5832000 str r2, [r3] <== NOT EXECUTED
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield( &_Scheduler );
a001e828: e59f0060 ldr r0, [pc, #96] ; a001e890 <nanosleep+0x12c> <== NOT EXECUTED
a001e82c: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED
a001e830: e12fff33 blx r3 <== NOT EXECUTED
*/
if ( !ticks ) {
_Thread_Disable_dispatch();
_Scheduler_Yield();
_Thread_Enable_dispatch();
a001e834: ebffb6bd bl a000c330 <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( rmtp ) {
a001e838: e3540000 cmp r4, #0 <== NOT EXECUTED
a001e83c: 0a000003 beq a001e850 <nanosleep+0xec> <== NOT EXECUTED
rmtp->tv_sec = 0;
a001e840: e5845000 str r5, [r4] <== NOT EXECUTED
rmtp->tv_nsec = 0;
a001e844: e5845004 str r5, [r4, #4] <== NOT EXECUTED
}
return 0;
a001e848: e1a00005 mov r0, r5 <== NOT EXECUTED
a001e84c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
#endif
}
return 0;
a001e850: e1a00004 mov r0, r4 <== NOT EXECUTED
a001e854: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
*
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
if ( !_Timespec_Is_valid( rqtp ) )
rtems_set_errno_and_return_minus_one( EINVAL );
a001e858: ebffcf50 bl a00125a0 <__errno> <== NOT EXECUTED
a001e85c: e3a03016 mov r3, #22 <== NOT EXECUTED
a001e860: e5803000 str r3, [r0] <== NOT EXECUTED
a001e864: e3e00000 mvn r0, #0 <== NOT EXECUTED
a001e868: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
a001e86c: ebffcf4b bl a00125a0 <__errno> <== NOT EXECUTED
a001e870: e3a03004 mov r3, #4 <== NOT EXECUTED
a001e874: e5803000 str r3, [r0] <== NOT EXECUTED
a001e878: e3e00000 mvn r0, #0 <== NOT EXECUTED
a001e87c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000b974 <pause>:
/*
* 3.4.2 Suspend Process Execution, P1003.1b-1993, p. 81
*/
int pause( void )
{
a000b974: e92d4010 push {r4, lr} <== NOT EXECUTED
a000b978: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
sigset_t all_signals;
int status;
(void) sigfillset( &all_signals );
a000b97c: e1a0000d mov r0, sp <== NOT EXECUTED
a000b980: eb000350 bl a000c6c8 <sigfillset> <== NOT EXECUTED
status = sigtimedwait( &all_signals, NULL, NULL );
a000b984: e3a01000 mov r1, #0 <== NOT EXECUTED
a000b988: e1a0000d mov r0, sp <== NOT EXECUTED
a000b98c: e1a02001 mov r2, r1 <== NOT EXECUTED
int pause( void )
{
sigset_t all_signals;
int status;
(void) sigfillset( &all_signals );
a000b990: e1a0400d mov r4, sp <== NOT EXECUTED
status = sigtimedwait( &all_signals, NULL, NULL );
a000b994: eb0003b6 bl a000c874 <sigtimedwait> <== NOT EXECUTED
return status;
}
a000b998: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000b99c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a00098fc <pthread_atfork>:
int pthread_atfork(
void (*prepare)(void) __attribute__((unused)),
void (*parent)(void) __attribute__((unused)),
void (*child)(void) __attribute__((unused))
)
{
a00098fc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a0009900: eb002446 bl a0012a20 <__errno> <== NOT EXECUTED
a0009904: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a0009908: e5803000 str r3, [r0] <== NOT EXECUTED
}
a000990c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0009910: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000f1ac <pthread_attr_getcputime>:
int pthread_attr_getcputime(
pthread_attr_t *attr,
int *clock_allowed
)
{
if ( !attr || !attr->is_initialized || !clock_allowed )
a000f1ac: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000f1b0: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getcputime(
pthread_attr_t *attr,
int *clock_allowed
)
{
if ( !attr || !attr->is_initialized || !clock_allowed )
a000f1b4: 012fff1e bxeq lr <== NOT EXECUTED
a000f1b8: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000f1bc: e3500000 cmp r0, #0 <== NOT EXECUTED
a000f1c0: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*clock_allowed = attr->cputime_clock_allowed;
a000f1c4: 15933038 ldrne r3, [r3, #56] ; 0x38 <== NOT EXECUTED
int pthread_attr_getcputime(
pthread_attr_t *attr,
int *clock_allowed
)
{
if ( !attr || !attr->is_initialized || !clock_allowed )
a000f1c8: 13a00000 movne r0, #0 <== NOT EXECUTED
a000f1cc: 03a00001 moveq r0, #1 <== NOT EXECUTED
return EINVAL;
a000f1d0: 03a00016 moveq r0, #22 <== NOT EXECUTED
*clock_allowed = attr->cputime_clock_allowed;
a000f1d4: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000f1d8: e12fff1e bx lr <== NOT EXECUTED
a000ea34 <pthread_attr_getdetachstate>:
int pthread_attr_getdetachstate(
const pthread_attr_t *attr,
int *detachstate
)
{
if ( !attr || !attr->is_initialized || !detachstate )
a000ea34: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000ea38: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getdetachstate(
const pthread_attr_t *attr,
int *detachstate
)
{
if ( !attr || !attr->is_initialized || !detachstate )
a000ea3c: 012fff1e bxeq lr <== NOT EXECUTED
a000ea40: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000ea44: e3500000 cmp r0, #0 <== NOT EXECUTED
a000ea48: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*detachstate = attr->detachstate;
a000ea4c: 1593303c ldrne r3, [r3, #60] ; 0x3c <== NOT EXECUTED
int pthread_attr_getdetachstate(
const pthread_attr_t *attr,
int *detachstate
)
{
if ( !attr || !attr->is_initialized || !detachstate )
a000ea50: 13a00000 movne r0, #0 <== NOT EXECUTED
a000ea54: 03a00001 moveq r0, #1 <== NOT EXECUTED
return EINVAL;
a000ea58: 03a00016 moveq r0, #22 <== NOT EXECUTED
*detachstate = attr->detachstate;
a000ea5c: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000ea60: e12fff1e bx lr <== NOT EXECUTED
a000ea64 <pthread_attr_getguardsize>:
int pthread_attr_getguardsize(
const pthread_attr_t *attr,
size_t *guardsize
)
{
if ( !attr || !attr->is_initialized || !guardsize )
a000ea64: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000ea68: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getguardsize(
const pthread_attr_t *attr,
size_t *guardsize
)
{
if ( !attr || !attr->is_initialized || !guardsize )
a000ea6c: 012fff1e bxeq lr <== NOT EXECUTED
a000ea70: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000ea74: e3500000 cmp r0, #0 <== NOT EXECUTED
a000ea78: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*guardsize = attr->guardsize;
a000ea7c: 15933034 ldrne r3, [r3, #52] ; 0x34 <== NOT EXECUTED
int pthread_attr_getguardsize(
const pthread_attr_t *attr,
size_t *guardsize
)
{
if ( !attr || !attr->is_initialized || !guardsize )
a000ea80: 13a00000 movne r0, #0 <== NOT EXECUTED
a000ea84: 03a00001 moveq r0, #1 <== NOT EXECUTED
return EINVAL;
a000ea88: 03a00016 moveq r0, #22 <== NOT EXECUTED
*guardsize = attr->guardsize;
a000ea8c: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000ea90: e12fff1e bx lr <== NOT EXECUTED
a000ea94 <pthread_attr_getinheritsched>:
int pthread_attr_getinheritsched(
const pthread_attr_t *attr,
int *inheritsched
)
{
if ( !attr || !attr->is_initialized || !inheritsched )
a000ea94: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000ea98: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getinheritsched(
const pthread_attr_t *attr,
int *inheritsched
)
{
if ( !attr || !attr->is_initialized || !inheritsched )
a000ea9c: 012fff1e bxeq lr <== NOT EXECUTED
a000eaa0: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000eaa4: e3500000 cmp r0, #0 <== NOT EXECUTED
a000eaa8: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*inheritsched = attr->inheritsched;
a000eaac: 15933010 ldrne r3, [r3, #16] <== NOT EXECUTED
int pthread_attr_getinheritsched(
const pthread_attr_t *attr,
int *inheritsched
)
{
if ( !attr || !attr->is_initialized || !inheritsched )
a000eab0: 13a00000 movne r0, #0 <== NOT EXECUTED
a000eab4: 03a00001 moveq r0, #1 <== NOT EXECUTED
return EINVAL;
a000eab8: 03a00016 moveq r0, #22 <== NOT EXECUTED
*inheritsched = attr->inheritsched;
a000eabc: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000eac0: e12fff1e bx lr <== NOT EXECUTED
a000eac4 <pthread_attr_getschedparam>:
int pthread_attr_getschedparam(
const pthread_attr_t *attr,
struct sched_param *param
)
{
if ( !attr || !attr->is_initialized || !param )
a000eac4: e3500000 cmp r0, #0 <== NOT EXECUTED
int pthread_attr_getschedparam(
const pthread_attr_t *attr,
struct sched_param *param
)
{
a000eac8: e92d0030 push {r4, r5} <== NOT EXECUTED
a000eacc: e1a0c001 mov ip, r1 <== NOT EXECUTED
if ( !attr || !attr->is_initialized || !param )
a000ead0: 0a00000d beq a000eb0c <pthread_attr_getschedparam+0x48> <== NOT EXECUTED
a000ead4: e5905000 ldr r5, [r0] <== NOT EXECUTED
a000ead8: e3550000 cmp r5, #0 <== NOT EXECUTED
a000eadc: 13510000 cmpne r1, #0 <== NOT EXECUTED
a000eae0: 13a05000 movne r5, #0 <== NOT EXECUTED
a000eae4: 03a05001 moveq r5, #1 <== NOT EXECUTED
a000eae8: 0a000007 beq a000eb0c <pthread_attr_getschedparam+0x48> <== NOT EXECUTED
return EINVAL;
*param = attr->schedparam;
a000eaec: e2804018 add r4, r0, #24 <== NOT EXECUTED
a000eaf0: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED
a000eaf4: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
a000eaf8: e8940007 ldm r4, {r0, r1, r2} <== NOT EXECUTED
a000eafc: e88c0007 stm ip, {r0, r1, r2} <== NOT EXECUTED
return 0;
}
a000eb00: e1a00005 mov r0, r5 <== NOT EXECUTED
a000eb04: e8bd0030 pop {r4, r5} <== NOT EXECUTED
a000eb08: e12fff1e bx lr <== NOT EXECUTED
const pthread_attr_t *attr,
struct sched_param *param
)
{
if ( !attr || !attr->is_initialized || !param )
return EINVAL;
a000eb0c: e3a05016 mov r5, #22 <== NOT EXECUTED
a000eb10: eafffffa b a000eb00 <pthread_attr_getschedparam+0x3c> <== NOT EXECUTED
a000eb14 <pthread_attr_getschedpolicy>:
int pthread_attr_getschedpolicy(
const pthread_attr_t *attr,
int *policy
)
{
if ( !attr || !attr->is_initialized || !policy )
a000eb14: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000eb18: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getschedpolicy(
const pthread_attr_t *attr,
int *policy
)
{
if ( !attr || !attr->is_initialized || !policy )
a000eb1c: 012fff1e bxeq lr <== NOT EXECUTED
a000eb20: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000eb24: e3500000 cmp r0, #0 <== NOT EXECUTED
a000eb28: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*policy = attr->schedpolicy;
a000eb2c: 15933014 ldrne r3, [r3, #20] <== NOT EXECUTED
int pthread_attr_getschedpolicy(
const pthread_attr_t *attr,
int *policy
)
{
if ( !attr || !attr->is_initialized || !policy )
a000eb30: 13a00000 movne r0, #0 <== NOT EXECUTED
a000eb34: 03a00001 moveq r0, #1 <== NOT EXECUTED
return EINVAL;
a000eb38: 03a00016 moveq r0, #22 <== NOT EXECUTED
*policy = attr->schedpolicy;
a000eb3c: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000eb40: e12fff1e bx lr <== NOT EXECUTED
a000eb44 <pthread_attr_getscope>:
int pthread_attr_getscope(
const pthread_attr_t *attr,
int *contentionscope
)
{
if ( !attr || !attr->is_initialized || !contentionscope )
a000eb44: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000eb48: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getscope(
const pthread_attr_t *attr,
int *contentionscope
)
{
if ( !attr || !attr->is_initialized || !contentionscope )
a000eb4c: 012fff1e bxeq lr <== NOT EXECUTED
a000eb50: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000eb54: e3500000 cmp r0, #0 <== NOT EXECUTED
a000eb58: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*contentionscope = attr->contentionscope;
a000eb5c: 1593300c ldrne r3, [r3, #12] <== NOT EXECUTED
int pthread_attr_getscope(
const pthread_attr_t *attr,
int *contentionscope
)
{
if ( !attr || !attr->is_initialized || !contentionscope )
a000eb60: 13a00000 movne r0, #0 <== NOT EXECUTED
a000eb64: 03a00001 moveq r0, #1 <== NOT EXECUTED
return EINVAL;
a000eb68: 03a00016 moveq r0, #22 <== NOT EXECUTED
*contentionscope = attr->contentionscope;
a000eb6c: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000eb70: e12fff1e bx lr <== NOT EXECUTED
a000eba4 <pthread_attr_getstack>:
const pthread_attr_t *attr,
void **stackaddr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stackaddr || !stacksize )
a000eba4: e2503000 subs r3, r0, #0 <== NOT EXECUTED
a000eba8: 0a00000c beq a000ebe0 <pthread_attr_getstack+0x3c> <== NOT EXECUTED
a000ebac: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000ebb0: e3500000 cmp r0, #0 <== NOT EXECUTED
a000ebb4: 13510000 cmpne r1, #0 <== NOT EXECUTED
a000ebb8: 13a00000 movne r0, #0 <== NOT EXECUTED
a000ebbc: 03a00001 moveq r0, #1 <== NOT EXECUTED
a000ebc0: 0a000006 beq a000ebe0 <pthread_attr_getstack+0x3c> <== NOT EXECUTED
a000ebc4: e3520000 cmp r2, #0 <== NOT EXECUTED
a000ebc8: 0a000006 beq a000ebe8 <pthread_attr_getstack+0x44> <== NOT EXECUTED
return EINVAL;
*stackaddr = attr->stackaddr;
a000ebcc: e593c004 ldr ip, [r3, #4] <== NOT EXECUTED
*stacksize = attr->stacksize;
a000ebd0: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized || !stackaddr || !stacksize )
return EINVAL;
*stackaddr = attr->stackaddr;
a000ebd4: e581c000 str ip, [r1] <== NOT EXECUTED
*stacksize = attr->stacksize;
a000ebd8: e5823000 str r3, [r2] <== NOT EXECUTED
return 0;
a000ebdc: e12fff1e bx lr <== NOT EXECUTED
void **stackaddr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stackaddr || !stacksize )
return EINVAL;
a000ebe0: e3a00016 mov r0, #22 <== NOT EXECUTED
a000ebe4: e12fff1e bx lr <== NOT EXECUTED
a000ebe8: e3a00016 mov r0, #22 <== NOT EXECUTED
*stackaddr = attr->stackaddr;
*stacksize = attr->stacksize;
return 0;
}
a000ebec: e12fff1e bx lr <== NOT EXECUTED
a000eb74 <pthread_attr_getstackaddr>:
int pthread_attr_getstackaddr(
const pthread_attr_t *attr,
void **stackaddr
)
{
if ( !attr || !attr->is_initialized || !stackaddr )
a000eb74: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000eb78: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getstackaddr(
const pthread_attr_t *attr,
void **stackaddr
)
{
if ( !attr || !attr->is_initialized || !stackaddr )
a000eb7c: 012fff1e bxeq lr <== NOT EXECUTED
a000eb80: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000eb84: e3500000 cmp r0, #0 <== NOT EXECUTED
a000eb88: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*stackaddr = attr->stackaddr;
a000eb8c: 15933004 ldrne r3, [r3, #4] <== NOT EXECUTED
int pthread_attr_getstackaddr(
const pthread_attr_t *attr,
void **stackaddr
)
{
if ( !attr || !attr->is_initialized || !stackaddr )
a000eb90: 13a00000 movne r0, #0 <== NOT EXECUTED
a000eb94: 03a00001 moveq r0, #1 <== NOT EXECUTED
return EINVAL;
a000eb98: 03a00016 moveq r0, #22 <== NOT EXECUTED
*stackaddr = attr->stackaddr;
a000eb9c: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000eba0: e12fff1e bx lr <== NOT EXECUTED
a000ebf0 <pthread_attr_getstacksize>:
int pthread_attr_getstacksize(
const pthread_attr_t *attr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stacksize )
a000ebf0: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000ebf4: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getstacksize(
const pthread_attr_t *attr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stacksize )
a000ebf8: 012fff1e bxeq lr <== NOT EXECUTED
a000ebfc: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000ec00: e3500000 cmp r0, #0 <== NOT EXECUTED
a000ec04: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*stacksize = attr->stacksize;
a000ec08: 15933008 ldrne r3, [r3, #8] <== NOT EXECUTED
int pthread_attr_getstacksize(
const pthread_attr_t *attr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stacksize )
a000ec0c: 13a00000 movne r0, #0 <== NOT EXECUTED
a000ec10: 03a00001 moveq r0, #1 <== NOT EXECUTED
return EINVAL;
a000ec14: 03a00016 moveq r0, #22 <== NOT EXECUTED
*stacksize = attr->stacksize;
a000ec18: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000ec1c: e12fff1e bx lr <== NOT EXECUTED
a000f6a8 <pthread_attr_setcputime>:
int pthread_attr_setcputime(
pthread_attr_t *attr,
int clock_allowed
)
{
if ( !attr || !attr->is_initialized )
a000f6a8: e3500000 cmp r0, #0 <== NOT EXECUTED
a000f6ac: 0a000008 beq a000f6d4 <pthread_attr_setcputime+0x2c> <== NOT EXECUTED
a000f6b0: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000f6b4: e3530000 cmp r3, #0 <== NOT EXECUTED
a000f6b8: 0a000005 beq a000f6d4 <pthread_attr_setcputime+0x2c> <== NOT EXECUTED
return EINVAL;
switch ( clock_allowed ) {
a000f6bc: e3510001 cmp r1, #1 <== NOT EXECUTED
case CLOCK_ENABLED:
case CLOCK_DISABLED:
attr->cputime_clock_allowed = clock_allowed;
a000f6c0: 95801038 strls r1, [r0, #56] ; 0x38 <== NOT EXECUTED
return 0;
a000f6c4: 93a00000 movls r0, #0 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( clock_allowed ) {
a000f6c8: 912fff1e bxls lr <== NOT EXECUTED
case CLOCK_DISABLED:
attr->cputime_clock_allowed = clock_allowed;
return 0;
default:
return EINVAL;
a000f6cc: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a000f6d0: e12fff1e bx lr <== NOT EXECUTED
pthread_attr_t *attr,
int clock_allowed
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a000f6d4: e3a00016 mov r0, #22 <== NOT EXECUTED
a000f6d8: e12fff1e bx lr <== NOT EXECUTED
a000ec6c <pthread_attr_setdetachstate>:
int pthread_attr_setdetachstate(
pthread_attr_t *attr,
int detachstate
)
{
if ( !attr || !attr->is_initialized )
a000ec6c: e3500000 cmp r0, #0
a000ec70: 0a000008 beq a000ec98 <pthread_attr_setdetachstate+0x2c>
a000ec74: e5903000 ldr r3, [r0]
a000ec78: e3530000 cmp r3, #0
a000ec7c: 0a000005 beq a000ec98 <pthread_attr_setdetachstate+0x2c>
return EINVAL;
switch ( detachstate ) {
a000ec80: e3510001 cmp r1, #1
case PTHREAD_CREATE_DETACHED:
case PTHREAD_CREATE_JOINABLE:
attr->detachstate = detachstate;
a000ec84: 9580103c strls r1, [r0, #60] ; 0x3c
return 0;
a000ec88: 93a00000 movls r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( detachstate ) {
a000ec8c: 912fff1e bxls lr
case PTHREAD_CREATE_JOINABLE:
attr->detachstate = detachstate;
return 0;
default:
return EINVAL;
a000ec90: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a000ec94: e12fff1e bx lr <== NOT EXECUTED
pthread_attr_t *attr,
int detachstate
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a000ec98: e3a00016 mov r0, #22 <== NOT EXECUTED
a000ec9c: e12fff1e bx lr <== NOT EXECUTED
a000eca0 <pthread_attr_setguardsize>:
int pthread_attr_setguardsize(
pthread_attr_t *attr,
size_t guardsize
)
{
if ( !attr || !attr->is_initialized )
a000eca0: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000eca4: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_setguardsize(
pthread_attr_t *attr,
size_t guardsize
)
{
if ( !attr || !attr->is_initialized )
a000eca8: 012fff1e bxeq lr <== NOT EXECUTED
a000ecac: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000ecb0: e3530000 cmp r3, #0 <== NOT EXECUTED
return EINVAL;
attr->guardsize = guardsize;
a000ecb4: 15801034 strne r1, [r0, #52] ; 0x34 <== NOT EXECUTED
pthread_attr_t *attr,
size_t guardsize
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a000ecb8: 03a00016 moveq r0, #22 <== NOT EXECUTED
attr->guardsize = guardsize;
return 0;
a000ecbc: 13a00000 movne r0, #0 <== NOT EXECUTED
}
a000ecc0: e12fff1e bx lr <== NOT EXECUTED
a001069c <pthread_attr_setinheritsched>:
int pthread_attr_setinheritsched(
pthread_attr_t *attr,
int inheritsched
)
{
if ( !attr || !attr->is_initialized )
a001069c: e3500000 cmp r0, #0
a00106a0: 0a000009 beq a00106cc <pthread_attr_setinheritsched+0x30>
a00106a4: e5903000 ldr r3, [r0]
a00106a8: e3530000 cmp r3, #0
a00106ac: 0a000006 beq a00106cc <pthread_attr_setinheritsched+0x30>
return EINVAL;
switch ( inheritsched ) {
a00106b0: e2413001 sub r3, r1, #1
a00106b4: e3530001 cmp r3, #1
case PTHREAD_INHERIT_SCHED:
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
a00106b8: 95801010 strls r1, [r0, #16]
return 0;
a00106bc: 93a00000 movls r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( inheritsched ) {
a00106c0: 912fff1e bxls lr
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
return 0;
default:
return ENOTSUP;
a00106c4: e3a00086 mov r0, #134 ; 0x86 <== NOT EXECUTED
}
}
a00106c8: e12fff1e bx lr <== NOT EXECUTED
pthread_attr_t *attr,
int inheritsched
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a00106cc: e3a00016 mov r0, #22 <== NOT EXECUTED
a00106d0: e12fff1e bx lr <== NOT EXECUTED
a000ecfc <pthread_attr_setschedparam>:
int pthread_attr_setschedparam(
pthread_attr_t *attr,
const struct sched_param *param
)
{
if ( !attr || !attr->is_initialized || !param )
a000ecfc: e3500000 cmp r0, #0
int pthread_attr_setschedparam(
pthread_attr_t *attr,
const struct sched_param *param
)
{
a000ed00: e92d0030 push {r4, r5}
if ( !attr || !attr->is_initialized || !param )
a000ed04: 0a00000e beq a000ed44 <pthread_attr_setschedparam+0x48>
a000ed08: e5905000 ldr r5, [r0]
a000ed0c: e3550000 cmp r5, #0
a000ed10: 13510000 cmpne r1, #0
a000ed14: 13a05000 movne r5, #0
a000ed18: 03a05001 moveq r5, #1
a000ed1c: 0a000008 beq a000ed44 <pthread_attr_setschedparam+0x48>
return EINVAL;
attr->schedparam = *param;
a000ed20: e280c018 add ip, r0, #24
a000ed24: e1a04001 mov r4, r1
a000ed28: e8b4000f ldm r4!, {r0, r1, r2, r3}
a000ed2c: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000ed30: e8940007 ldm r4, {r0, r1, r2}
a000ed34: e88c0007 stm ip, {r0, r1, r2}
return 0;
}
a000ed38: e1a00005 mov r0, r5
a000ed3c: e8bd0030 pop {r4, r5}
a000ed40: e12fff1e bx lr
pthread_attr_t *attr,
const struct sched_param *param
)
{
if ( !attr || !attr->is_initialized || !param )
return EINVAL;
a000ed44: e3a05016 mov r5, #22 <== NOT EXECUTED
a000ed48: eafffffa b a000ed38 <pthread_attr_setschedparam+0x3c> <== NOT EXECUTED
a000ed4c <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
a000ed4c: e3500000 cmp r0, #0
a000ed50: 0a00000e beq a000ed90 <pthread_attr_setschedpolicy+0x44>
a000ed54: e5903000 ldr r3, [r0]
a000ed58: e3530000 cmp r3, #0
a000ed5c: 0a00000b beq a000ed90 <pthread_attr_setschedpolicy+0x44>
return EINVAL;
switch ( policy ) {
a000ed60: e3510004 cmp r1, #4
a000ed64: 9a000001 bls a000ed70 <pthread_attr_setschedpolicy+0x24>
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
a000ed68: e3a00086 mov r0, #134 ; 0x86 <== NOT EXECUTED
}
}
a000ed6c: e12fff1e bx lr <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
a000ed70: e3a03001 mov r3, #1
a000ed74: e1a03113 lsl r3, r3, r1
a000ed78: e3130017 tst r3, #23
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
a000ed7c: 15801014 strne r1, [r0, #20]
return 0;
a000ed80: 13a00000 movne r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
a000ed84: 112fff1e bxne lr
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
a000ed88: e3a00086 mov r0, #134 ; 0x86 <== NOT EXECUTED
}
}
a000ed8c: e12fff1e bx lr <== NOT EXECUTED
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a000ed90: e3a00016 mov r0, #22 <== NOT EXECUTED
a000ed94: e12fff1e bx lr <== NOT EXECUTED
a000ed98 <pthread_attr_setscope>:
int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope
)
{
if ( !attr || !attr->is_initialized )
a000ed98: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000ed9c: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope
)
{
if ( !attr || !attr->is_initialized )
a000eda0: 012fff1e bxeq lr <== NOT EXECUTED
a000eda4: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000eda8: e3530000 cmp r3, #0 <== NOT EXECUTED
a000edac: 0a000007 beq a000edd0 <pthread_attr_setscope+0x38> <== NOT EXECUTED
return EINVAL;
switch ( contentionscope ) {
a000edb0: e3510000 cmp r1, #0 <== NOT EXECUTED
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
a000edb4: 0580100c streq r1, [r0, #12] <== NOT EXECUTED
return 0;
a000edb8: 01a00001 moveq r0, r1 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
a000edbc: 012fff1e bxeq lr <== NOT EXECUTED
case PTHREAD_SCOPE_SYSTEM:
return ENOTSUP;
default:
return EINVAL;
a000edc0: e3510001 cmp r1, #1 <== NOT EXECUTED
a000edc4: 03a00086 moveq r0, #134 ; 0x86 <== NOT EXECUTED
a000edc8: 13a00016 movne r0, #22 <== NOT EXECUTED
a000edcc: e12fff1e bx lr <== NOT EXECUTED
pthread_attr_t *attr,
int contentionscope
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a000edd0: e3a00016 mov r0, #22 <== NOT EXECUTED
return ENOTSUP;
default:
return EINVAL;
}
}
a000edd4: e12fff1e bx lr <== NOT EXECUTED
a000edfc <pthread_attr_setstack>:
pthread_attr_t *attr,
void *stackaddr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
a000edfc: e2503000 subs r3, r0, #0
return EINVAL;
a000ee00: 03a00016 moveq r0, #22
pthread_attr_t *attr,
void *stackaddr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
a000ee04: 012fff1e bxeq lr
a000ee08: e5930000 ldr r0, [r3]
a000ee0c: e3500000 cmp r0, #0
a000ee10: 0a000008 beq a000ee38 <pthread_attr_setstack+0x3c>
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
attr->stackaddr = stackaddr;
a000ee14: e5831004 str r1, [r3, #4]
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
a000ee18: e59f1020 ldr r1, [pc, #32] ; a000ee40 <pthread_attr_setstack+0x44>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
attr->stackaddr = stackaddr;
return 0;
a000ee1c: e3a00000 mov r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
a000ee20: e5911000 ldr r1, [r1]
a000ee24: e1a01081 lsl r1, r1, #1
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
a000ee28: e1510002 cmp r1, r2
a000ee2c: 25831008 strcs r1, [r3, #8]
a000ee30: 35832008 strcc r2, [r3, #8]
else
attr->stacksize = stacksize;
attr->stackaddr = stackaddr;
return 0;
a000ee34: e12fff1e bx lr
void *stackaddr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a000ee38: e3a00016 mov r0, #22 <== NOT EXECUTED
else
attr->stacksize = stacksize;
attr->stackaddr = stackaddr;
return 0;
}
a000ee3c: e12fff1e bx lr <== NOT EXECUTED
a00106d4 <pthread_attr_setstacksize>:
int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
a00106d4: e3500000 cmp r0, #0
return EINVAL;
a00106d8: 03a00016 moveq r0, #22
int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
a00106dc: 012fff1e bxeq lr
a00106e0: e5903000 ldr r3, [r0]
a00106e4: e3530000 cmp r3, #0
a00106e8: 0a000008 beq a0010710 <pthread_attr_setstacksize+0x3c>
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
a00106ec: e59f3024 ldr r3, [pc, #36] ; a0010718 <pthread_attr_setstacksize+0x44>
a00106f0: e5933000 ldr r3, [r3]
a00106f4: e1a03083 lsl r3, r3, #1
a00106f8: e1530001 cmp r3, r1
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
a00106fc: 85803008 strhi r3, [r0, #8]
else
attr->stacksize = stacksize;
a0010700: 95801008 strls r1, [r0, #8]
return 0;
a0010704: 83a00000 movhi r0, #0
a0010708: 93a00000 movls r0, #0
a001070c: e12fff1e bx lr
pthread_attr_t *attr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a0010710: e3a00016 mov r0, #22
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
return 0;
}
a0010714: e12fff1e bx lr <== NOT EXECUTED
a000a11c <pthread_barrier_destroy>:
*/
int pthread_barrier_destroy(
pthread_barrier_t *barrier
)
{
a000a11c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
a000a120: e2503000 subs r3, r0, #0 <== NOT EXECUTED
*/
int pthread_barrier_destroy(
pthread_barrier_t *barrier
)
{
a000a124: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
a000a128: 0a000007 beq a000a14c <pthread_barrier_destroy+0x30> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get (
pthread_barrier_t *barrier,
Objects_Locations *location
)
{
return (POSIX_Barrier_Control *) _Objects_Get(
a000a12c: e5931000 ldr r1, [r3] <== NOT EXECUTED
a000a130: e59f005c ldr r0, [pc, #92] ; a000a194 <pthread_barrier_destroy+0x78><== NOT EXECUTED
a000a134: e1a0200d mov r2, sp <== NOT EXECUTED
a000a138: eb00099c bl a000c7b0 <_Objects_Get> <== NOT EXECUTED
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
switch ( location ) {
a000a13c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000a140: e1a04000 mov r4, r0 <== NOT EXECUTED
a000a144: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a148: 0a000002 beq a000a158 <pthread_barrier_destroy+0x3c> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000a14c: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000a150: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000a154: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
the_barrier = _POSIX_Barrier_Get( barrier, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) {
a000a158: e5905058 ldr r5, [r0, #88] ; 0x58 <== NOT EXECUTED
a000a15c: e3550000 cmp r5, #0 <== NOT EXECUTED
a000a160: 0a000002 beq a000a170 <pthread_barrier_destroy+0x54> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000a164: eb000c78 bl a000d34c <_Thread_Enable_dispatch> <== NOT EXECUTED
return EBUSY;
a000a168: e3a00010 mov r0, #16 <== NOT EXECUTED
a000a16c: eafffff7 b a000a150 <pthread_barrier_destroy+0x34> <== NOT EXECUTED
}
_Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object );
a000a170: e1a01000 mov r1, r0 <== NOT EXECUTED
a000a174: e59f0018 ldr r0, [pc, #24] ; a000a194 <pthread_barrier_destroy+0x78><== NOT EXECUTED
a000a178: eb00087c bl a000c370 <_Objects_Close> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free (
POSIX_Barrier_Control *the_barrier
)
{
_Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object );
a000a17c: e59f0010 ldr r0, [pc, #16] ; a000a194 <pthread_barrier_destroy+0x78><== NOT EXECUTED
a000a180: e1a01004 mov r1, r4 <== NOT EXECUTED
a000a184: eb000930 bl a000c64c <_Objects_Free> <== NOT EXECUTED
_POSIX_Barrier_Free( the_barrier );
_Thread_Enable_dispatch();
a000a188: eb000c6f bl a000d34c <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000a18c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a190: eaffffee b a000a150 <pthread_barrier_destroy+0x34> <== NOT EXECUTED
a000a198 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
a000a198: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
a000a19c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
a000a1a0: e24dd014 sub sp, sp, #20 <== NOT EXECUTED
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
a000a1a4: 0a000020 beq a000a22c <pthread_barrier_init+0x94> <== NOT EXECUTED
return EINVAL;
if ( count == 0 )
a000a1a8: e3520000 cmp r2, #0 <== NOT EXECUTED
a000a1ac: 0a00001e beq a000a22c <pthread_barrier_init+0x94> <== NOT EXECUTED
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
a000a1b0: e3510000 cmp r1, #0 <== NOT EXECUTED
a000a1b4: 0a000022 beq a000a244 <pthread_barrier_init+0xac> <== NOT EXECUTED
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
a000a1b8: e5913000 ldr r3, [r1] <== NOT EXECUTED
a000a1bc: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a1c0: 0a000019 beq a000a22c <pthread_barrier_init+0x94> <== NOT EXECUTED
return EINVAL;
switch ( the_attr->process_shared ) {
a000a1c4: e5915004 ldr r5, [r1, #4] <== NOT EXECUTED
a000a1c8: e3550000 cmp r5, #0 <== NOT EXECUTED
a000a1cc: 1a000016 bne a000a22c <pthread_barrier_init+0x94> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000a1d0: e59f3088 ldr r3, [pc, #136] ; a000a260 <pthread_barrier_init+0xc8><== NOT EXECUTED
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
the_attributes.maximum_count = count;
a000a1d4: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
a000a1d8: e58d500c str r5, [sp, #12] <== NOT EXECUTED
a000a1dc: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000a1e0: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000a1e4: e5832000 str r2, [r3] <== NOT EXECUTED
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
_Objects_Allocate( &_POSIX_Barrier_Information );
a000a1e8: e59f7074 ldr r7, [pc, #116] ; a000a264 <pthread_barrier_init+0xcc><== NOT EXECUTED
a000a1ec: e1a00007 mov r0, r7 <== NOT EXECUTED
a000a1f0: eb000839 bl a000c2dc <_Objects_Allocate> <== NOT EXECUTED
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
a000a1f4: e2506000 subs r6, r0, #0 <== NOT EXECUTED
a000a1f8: 0a00000e beq a000a238 <pthread_barrier_init+0xa0> <== NOT EXECUTED
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
a000a1fc: e2860010 add r0, r6, #16 <== NOT EXECUTED
a000a200: e28d100c add r1, sp, #12 <== NOT EXECUTED
a000a204: eb0005b4 bl a000b8dc <_CORE_barrier_Initialize> <== NOT EXECUTED
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000a208: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a20c: e597201c ldr r2, [r7, #28] <== NOT EXECUTED
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a000a210: e1a01803 lsl r1, r3, #16 <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a214: e7826721 str r6, [r2, r1, lsr #14] <== NOT EXECUTED
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a000a218: e586500c str r5, [r6, #12] <== NOT EXECUTED
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
a000a21c: e5843000 str r3, [r4] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000a220: eb000c49 bl a000d34c <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000a224: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a228: ea000000 b a000a230 <pthread_barrier_init+0x98> <== NOT EXECUTED
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
a000a22c: e3a00016 mov r0, #22 <== NOT EXECUTED
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
}
a000a230: e28dd014 add sp, sp, #20 <== NOT EXECUTED
a000a234: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
a000a238: eb000c43 bl a000d34c <_Thread_Enable_dispatch> <== NOT EXECUTED
return EAGAIN;
a000a23c: e3a0000b mov r0, #11 <== NOT EXECUTED
a000a240: eafffffa b a000a230 <pthread_barrier_init+0x98> <== NOT EXECUTED
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
a000a244: e28d5004 add r5, sp, #4 <== NOT EXECUTED
a000a248: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a24c: e58d2000 str r2, [sp] <== NOT EXECUTED
a000a250: ebffff9d bl a000a0cc <pthread_barrierattr_init> <== NOT EXECUTED
the_attr = &my_attr;
a000a254: e1a01005 mov r1, r5 <== NOT EXECUTED
a000a258: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000a25c: eaffffd5 b a000a1b8 <pthread_barrier_init+0x20> <== NOT EXECUTED
a000a268 <pthread_barrier_wait>:
*/
int pthread_barrier_wait(
pthread_barrier_t *barrier
)
{
a000a268: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
a000a26c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
*/
int pthread_barrier_wait(
pthread_barrier_t *barrier
)
{
a000a270: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
a000a274: 0a000006 beq a000a294 <pthread_barrier_wait+0x2c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get (
pthread_barrier_t *barrier,
Objects_Locations *location
)
{
return (POSIX_Barrier_Control *) _Objects_Get(
a000a278: e5931000 ldr r1, [r3] <== NOT EXECUTED
a000a27c: e59f0048 ldr r0, [pc, #72] ; a000a2cc <pthread_barrier_wait+0x64><== NOT EXECUTED
a000a280: e28d2004 add r2, sp, #4 <== NOT EXECUTED
a000a284: eb000949 bl a000c7b0 <_Objects_Get> <== NOT EXECUTED
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
switch ( location ) {
a000a288: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
a000a28c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a290: 0a000002 beq a000a2a0 <pthread_barrier_wait+0x38> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000a294: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000a298: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000a29c: e8bd8000 pop {pc} <== NOT EXECUTED
the_barrier = _POSIX_Barrier_Get( barrier, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_barrier_Wait(
a000a2a0: e5901008 ldr r1, [r0, #8] <== NOT EXECUTED
a000a2a4: e3a02001 mov r2, #1 <== NOT EXECUTED
a000a2a8: e2800010 add r0, r0, #16 <== NOT EXECUTED
a000a2ac: e58d3000 str r3, [sp] <== NOT EXECUTED
a000a2b0: eb000594 bl a000b908 <_CORE_barrier_Wait> <== NOT EXECUTED
the_barrier->Object.id,
true,
0,
NULL
);
_Thread_Enable_dispatch();
a000a2b4: eb000c24 bl a000d34c <_Thread_Enable_dispatch> <== NOT EXECUTED
return _POSIX_Barrier_Translate_core_barrier_return_code(
_Thread_Executing->Wait.return_code );
a000a2b8: e59f3010 ldr r3, [pc, #16] ; a000a2d0 <pthread_barrier_wait+0x68><== NOT EXECUTED
a000a2bc: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
true,
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_Barrier_Translate_core_barrier_return_code(
a000a2c0: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
a000a2c4: eb001829 bl a0010370 <_POSIX_Barrier_Translate_core_barrier_return_code><== NOT EXECUTED
a000a2c8: eafffff2 b a000a298 <pthread_barrier_wait+0x30> <== NOT EXECUTED
a000a080 <pthread_barrierattr_destroy>:
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
a000a080: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000a084: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
a000a088: 012fff1e bxeq lr <== NOT EXECUTED
a000a08c: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000a090: e3520000 cmp r2, #0 <== NOT EXECUTED
return EINVAL;
attr->is_initialized = false;
a000a094: 13a00000 movne r0, #0 <== NOT EXECUTED
a000a098: 15830000 strne r0, [r3] <== NOT EXECUTED
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
a000a09c: 03a00016 moveq r0, #22 <== NOT EXECUTED
attr->is_initialized = false;
return 0;
}
a000a0a0: e12fff1e bx lr <== NOT EXECUTED
a000a0a4 <pthread_barrierattr_getpshared>:
int pthread_barrierattr_getpshared(
const pthread_barrierattr_t *attr,
int *pshared
)
{
if ( !attr )
a000a0a4: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000a0a8: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_barrierattr_getpshared(
const pthread_barrierattr_t *attr,
int *pshared
)
{
if ( !attr )
a000a0ac: 012fff1e bxeq lr <== NOT EXECUTED
return EINVAL;
if ( !attr->is_initialized )
a000a0b0: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000a0b4: e3530000 cmp r3, #0 <== NOT EXECUTED
return EINVAL;
*pshared = attr->process_shared;
a000a0b8: 15903004 ldrne r3, [r0, #4] <== NOT EXECUTED
{
if ( !attr )
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
a000a0bc: 03a00016 moveq r0, #22 <== NOT EXECUTED
*pshared = attr->process_shared;
return 0;
a000a0c0: 13a00000 movne r0, #0 <== NOT EXECUTED
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
*pshared = attr->process_shared;
a000a0c4: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000a0c8: e12fff1e bx lr <== NOT EXECUTED
a000a0e8 <pthread_barrierattr_setpshared>:
int pthread_barrierattr_setpshared(
pthread_barrierattr_t *attr,
int pshared
)
{
if ( !attr )
a000a0e8: e3500000 cmp r0, #0
a000a0ec: 0a000008 beq a000a114 <pthread_barrierattr_setpshared+0x2c>
return EINVAL;
if ( !attr->is_initialized )
a000a0f0: e5903000 ldr r3, [r0]
a000a0f4: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a0f8: 0a000005 beq a000a114 <pthread_barrierattr_setpshared+0x2c><== NOT EXECUTED
return EINVAL;
switch ( pshared ) {
a000a0fc: e3510001 cmp r1, #1 <== NOT EXECUTED
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
a000a100: 95801004 strls r1, [r0, #4] <== NOT EXECUTED
return 0;
a000a104: 93a00000 movls r0, #0 <== NOT EXECUTED
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
a000a108: 912fff1e bxls lr <== NOT EXECUTED
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
a000a10c: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a000a110: e12fff1e bx lr <== NOT EXECUTED
{
if ( !attr )
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
a000a114: e3a00016 mov r0, #22
a000a118: e12fff1e bx lr
a0009620 <pthread_cancel>:
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
a0009620: e59f3058 ldr r3, [pc, #88] ; a0009680 <pthread_cancel+0x60><== NOT EXECUTED
*/
int pthread_cancel(
pthread_t thread
)
{
a0009624: e92d4010 push {r4, lr} <== NOT EXECUTED
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
a0009628: e5933000 ldr r3, [r3] <== NOT EXECUTED
*/
int pthread_cancel(
pthread_t thread
)
{
a000962c: e1a01000 mov r1, r0 <== NOT EXECUTED
a0009630: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
a0009634: e3530000 cmp r3, #0 <== NOT EXECUTED
return EPROTO;
a0009638: 13a00047 movne r0, #71 ; 0x47 <== NOT EXECUTED
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
a000963c: 0a000001 beq a0009648 <pthread_cancel+0x28> <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a0009640: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0009644: e8bd8010 pop {r4, pc} <== NOT EXECUTED
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
_Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location );
a0009648: e59f0034 ldr r0, [pc, #52] ; a0009684 <pthread_cancel+0x64><== NOT EXECUTED
a000964c: e1a0200d mov r2, sp <== NOT EXECUTED
a0009650: eb000854 bl a000b7a8 <_Objects_Get> <== NOT EXECUTED
if ( _ISR_Is_in_progress() )
return EPROTO;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
a0009654: e59d4000 ldr r4, [sp] <== NOT EXECUTED
a0009658: e1a03000 mov r3, r0 <== NOT EXECUTED
a000965c: e3540000 cmp r4, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a0009660: 13a00016 movne r0, #22 <== NOT EXECUTED
if ( _ISR_Is_in_progress() )
return EPROTO;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
a0009664: 1afffff5 bne a0009640 <pthread_cancel+0x20> <== NOT EXECUTED
case OBJECTS_LOCAL:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
thread_support->cancelation_requested = 1;
a0009668: e59330fc ldr r3, [r3, #252] ; 0xfc <== NOT EXECUTED
a000966c: e3a02001 mov r2, #1 <== NOT EXECUTED
a0009670: e58320e0 str r2, [r3, #224] ; 0xe0 <== NOT EXECUTED
/* This enables dispatch implicitly */
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread );
a0009674: eb001668 bl a000f01c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch><== NOT EXECUTED
return 0;
a0009678: e1a00004 mov r0, r4 <== NOT EXECUTED
a000967c: eaffffef b a0009640 <pthread_cancel+0x20> <== NOT EXECUTED
a0009120 <pthread_cleanup_pop>:
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0009120: e59f3080 ldr r3, [pc, #128] ; a00091a8 <pthread_cleanup_pop+0x88>
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a0009124: e59f2080 ldr r2, [pc, #128] ; a00091ac <pthread_cleanup_pop+0x8c>
*/
void pthread_cleanup_pop(
int execute
)
{
a0009128: e92d4070 push {r4, r5, r6, lr}
a000912c: e5931000 ldr r1, [r3]
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a0009130: e5922004 ldr r2, [r2, #4]
*/
void pthread_cleanup_pop(
int execute
)
{
a0009134: e1a04000 mov r4, r0
a0009138: e2811001 add r1, r1, #1
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a000913c: e59220fc ldr r2, [r2, #252] ; 0xfc
a0009140: e5831000 str r1, [r3]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0009144: e10f5000 mrs r5, CPSR
a0009148: e3853080 orr r3, r5, #128 ; 0x80
a000914c: e129f003 msr CPSR_fc, r3
*/
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
a0009150: e59210e4 ldr r1, [r2, #228] ; 0xe4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a0009154: e28230e8 add r3, r2, #232 ; 0xe8
a0009158: e1510003 cmp r1, r3
a000915c: 0a00000e beq a000919c <pthread_cleanup_pop+0x7c>
_Thread_Enable_dispatch();
_ISR_Enable( level );
return;
}
handler = (POSIX_Cancel_Handler_control *)
a0009160: e59230ec ldr r3, [r2, #236] ; 0xec
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
a0009164: e8930006 ldm r3, {r1, r2}
previous = the_node->previous;
next->previous = previous;
a0009168: e5812004 str r2, [r1, #4]
previous->next = next;
a000916c: e5821000 str r1, [r2]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0009170: e129f005 msr CPSR_fc, r5
_ISR_Enable( level );
tmp_handler = *handler;
_Workspace_Free( handler );
a0009174: e1a00003 mov r0, r3
a0009178: e5935008 ldr r5, [r3, #8]
a000917c: e593600c ldr r6, [r3, #12]
a0009180: eb000ec7 bl a000cca4 <_Workspace_Free>
_Thread_Enable_dispatch();
a0009184: eb000a79 bl a000bb70 <_Thread_Enable_dispatch>
if ( execute )
a0009188: e3540000 cmp r4, #0
a000918c: 0a000001 beq a0009198 <pthread_cleanup_pop+0x78>
(*tmp_handler.routine)( tmp_handler.arg );
a0009190: e1a00006 mov r0, r6
a0009194: e12fff35 blx r5
a0009198: e8bd8070 pop {r4, r5, r6, pc}
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
_Thread_Enable_dispatch();
a000919c: eb000a73 bl a000bb70 <_Thread_Enable_dispatch>
a00091a0: e129f005 msr CPSR_fc, r5
a00091a4: e8bd8070 pop {r4, r5, r6, pc}
a0009900 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
a0009900: e92d4030 push {r4, r5, lr}
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
a0009904: e2505000 subs r5, r0, #0
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
a0009908: e1a04001 mov r4, r1
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
a000990c: 0a000011 beq a0009958 <pthread_cleanup_push+0x58>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0009910: e59f3044 ldr r3, [pc, #68] ; a000995c <pthread_cleanup_push+0x5c>
a0009914: e5932000 ldr r2, [r3]
a0009918: e2822001 add r2, r2, #1
a000991c: e5832000 str r2, [r3]
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
a0009920: e3a00010 mov r0, #16
a0009924: eb001142 bl a000de34 <_Workspace_Allocate>
if ( handler ) {
a0009928: e3500000 cmp r0, #0
a000992c: 0a000007 beq a0009950 <pthread_cleanup_push+0x50>
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a0009930: e59f3028 ldr r3, [pc, #40] ; a0009960 <pthread_cleanup_push+0x60>
handler_stack = &thread_support->Cancellation_Handlers;
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
a0009934: e1a01000 mov r1, r0
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
if ( handler ) {
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a0009938: e5933004 ldr r3, [r3, #4]
handler_stack = &thread_support->Cancellation_Handlers;
a000993c: e59330fc ldr r3, [r3, #252] ; 0xfc
handler->routine = routine;
a0009940: e5805008 str r5, [r0, #8]
handler->arg = arg;
a0009944: e580400c str r4, [r0, #12]
_Chain_Append( handler_stack, &handler->Node );
a0009948: e28300e4 add r0, r3, #228 ; 0xe4
a000994c: eb0005ec bl a000b104 <_Chain_Append>
}
_Thread_Enable_dispatch();
}
a0009950: e8bd4030 pop {r4, r5, lr}
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
a0009954: ea000c79 b a000cb40 <_Thread_Enable_dispatch>
a0009958: e8bd8030 pop {r4, r5, pc}
a000a9a4 <pthread_cond_destroy>:
*/
int pthread_cond_destroy(
pthread_cond_t *cond
)
{
a000a9a4: e92d4030 push {r4, r5, lr}
a000a9a8: e24dd004 sub sp, sp, #4
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
a000a9ac: e1a0100d mov r1, sp
a000a9b0: eb000016 bl a000aa10 <_POSIX_Condition_variables_Get>
switch ( location ) {
a000a9b4: e59d3000 ldr r3, [sp]
)
{
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
a000a9b8: e1a04000 mov r4, r0
switch ( location ) {
a000a9bc: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000a9c0: 13a00016 movne r0, #22
{
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
a000a9c4: 1a000005 bne a000a9e0 <pthread_cond_destroy+0x3c>
case OBJECTS_LOCAL:
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
a000a9c8: e2840018 add r0, r4, #24
a000a9cc: eb000fc9 bl a000e8f8 <_Thread_queue_First>
a000a9d0: e2505000 subs r5, r0, #0
a000a9d4: 0a000003 beq a000a9e8 <pthread_cond_destroy+0x44>
_Thread_Enable_dispatch();
a000a9d8: eb000df0 bl a000e1a0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return EBUSY;
a000a9dc: e3a00010 mov r0, #16 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a000a9e0: e28dd004 add sp, sp, #4
a000a9e4: e8bd8030 pop {r4, r5, pc}
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close(
a000a9e8: e1a01004 mov r1, r4
a000a9ec: e59f0018 ldr r0, [pc, #24] ; a000aa0c <pthread_cond_destroy+0x68>
a000a9f0: eb0009f3 bl a000d1c4 <_Objects_Close>
RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
POSIX_Condition_variables_Control *the_condition_variable
)
{
_Objects_Free(
a000a9f4: e59f0010 ldr r0, [pc, #16] ; a000aa0c <pthread_cond_destroy+0x68>
a000a9f8: e1a01004 mov r1, r4
a000a9fc: eb000aa7 bl a000d4a0 <_Objects_Free>
&_POSIX_Condition_variables_Information,
&the_cond->Object
);
_POSIX_Condition_variables_Free( the_cond );
_Thread_Enable_dispatch();
a000aa00: eb000de6 bl a000e1a0 <_Thread_Enable_dispatch>
return 0;
a000aa04: e1a00005 mov r0, r5
a000aa08: eafffff4 b a000a9e0 <pthread_cond_destroy+0x3c>
a000aa74 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
a000aa74: e92d40f0 push {r4, r5, r6, r7, lr}
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Condition_variables_Default_attributes;
a000aa78: e59f60ac ldr r6, [pc, #172] ; a000ab2c <pthread_cond_init+0xb8>
a000aa7c: e3510000 cmp r1, #0
a000aa80: 11a06001 movne r6, r1
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
a000aa84: e5963004 ldr r3, [r6, #4]
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
a000aa88: e1a05000 mov r5, r0
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
a000aa8c: e3530001 cmp r3, #1
a000aa90: 0a000020 beq a000ab18 <pthread_cond_init+0xa4>
return EINVAL;
if ( !the_attr->is_initialized )
a000aa94: e5963000 ldr r3, [r6]
a000aa98: e3530000 cmp r3, #0
a000aa9c: 1a000001 bne a000aaa8 <pthread_cond_init+0x34>
return EINVAL;
a000aaa0: e3a00016 mov r0, #22 <== NOT EXECUTED
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
a000aaa4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000aaa8: e59f3080 ldr r3, [pc, #128] ; a000ab30 <pthread_cond_init+0xbc>
a000aaac: e5932000 ldr r2, [r3]
a000aab0: e2822001 add r2, r2, #1
a000aab4: e5832000 str r2, [r3]
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
_Objects_Allocate( &_POSIX_Condition_variables_Information );
a000aab8: e59f7074 ldr r7, [pc, #116] ; a000ab34 <pthread_cond_init+0xc0>
a000aabc: e1a00007 mov r0, r7
a000aac0: eb00099a bl a000d130 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
a000aac4: e2504000 subs r4, r0, #0
a000aac8: 0a000014 beq a000ab20 <pthread_cond_init+0xac>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
a000aacc: e5963004 ldr r3, [r6, #4]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
a000aad0: e3a02201 mov r2, #268435456 ; 0x10000000
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
a000aad4: e3a06000 mov r6, #0
_Thread_queue_Initialize(
a000aad8: e2840018 add r0, r4, #24
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
a000aadc: e5843010 str r3, [r4, #16]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
a000aae0: e1a01006 mov r1, r6
a000aae4: e2822b02 add r2, r2, #2048 ; 0x800
a000aae8: e3a03074 mov r3, #116 ; 0x74
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
a000aaec: e5846014 str r6, [r4, #20]
_Thread_queue_Initialize(
a000aaf0: eb000fa7 bl a000e994 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000aaf4: e5943008 ldr r3, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000aaf8: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a000aafc: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000ab00: e7824721 str r4, [r2, r1, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a000ab04: e584600c str r6, [r4, #12]
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
a000ab08: e5853000 str r3, [r5]
_Thread_Enable_dispatch();
a000ab0c: eb000da3 bl a000e1a0 <_Thread_Enable_dispatch>
return 0;
a000ab10: e1a00006 mov r0, r6
a000ab14: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
a000ab18: e3a00016 mov r0, #22 <== NOT EXECUTED
a000ab1c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
a000ab20: eb000d9e bl a000e1a0 <_Thread_Enable_dispatch>
return ENOMEM;
a000ab24: e3a0000c mov r0, #12
a000ab28: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000aba0 <pthread_cond_timedwait>:
int pthread_cond_timedwait(
pthread_cond_t *cond,
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
a000aba0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000aba4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000aba8: e1a05000 mov r5, r0 <== NOT EXECUTED
a000abac: e1a04001 mov r4, r1 <== NOT EXECUTED
* 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.
*/
already_timedout = false;
status = _POSIX_Absolute_timeout_to_ticks(abstime, &ticks);
a000abb0: e1a00002 mov r0, r2 <== NOT EXECUTED
a000abb4: e1a0100d mov r1, sp <== NOT EXECUTED
a000abb8: eb00012d bl a000b074 <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
a000abbc: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000abc0: 03a00016 moveq r0, #22 <== NOT EXECUTED
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
already_timedout = false;
status = _POSIX_Absolute_timeout_to_ticks(abstime, &ticks);
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
a000abc4: 0a000007 beq a000abe8 <pthread_cond_timedwait+0x48> <== NOT EXECUTED
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a000abc8: e2403001 sub r3, r0, #1 <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
already_timedout = true;
return _POSIX_Condition_variables_Wait_support(
a000abcc: e1a01004 mov r1, r4 <== NOT EXECUTED
a000abd0: e1a00005 mov r0, r5 <== NOT EXECUTED
a000abd4: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000abd8: e3530001 cmp r3, #1 <== NOT EXECUTED
a000abdc: 83a03000 movhi r3, #0 <== NOT EXECUTED
a000abe0: 93a03001 movls r3, #1 <== NOT EXECUTED
a000abe4: eb000004 bl a000abfc <_POSIX_Condition_variables_Wait_support><== NOT EXECUTED
cond,
mutex,
ticks,
already_timedout
);
}
a000abe8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000abec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000a93c <pthread_condattr_getpshared>:
int pthread_condattr_getpshared(
const pthread_condattr_t *attr,
int *pshared
)
{
if ( !attr )
a000a93c: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
*pshared = attr->process_shared;
a000a940: 15903004 ldrne r3, [r0, #4] <== NOT EXECUTED
const pthread_condattr_t *attr,
int *pshared
)
{
if ( !attr )
return EINVAL;
a000a944: 03a00016 moveq r0, #22 <== NOT EXECUTED
*pshared = attr->process_shared;
return 0;
a000a948: 13a00000 movne r0, #0 <== NOT EXECUTED
)
{
if ( !attr )
return EINVAL;
*pshared = attr->process_shared;
a000a94c: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000a950: e12fff1e bx lr <== NOT EXECUTED
a000a97c <pthread_condattr_setpshared>:
int pthread_condattr_setpshared(
pthread_condattr_t *attr,
int pshared
)
{
if ( !attr )
a000a97c: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000a980: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_condattr_setpshared(
pthread_condattr_t *attr,
int pshared
)
{
if ( !attr )
a000a984: 012fff1e bxeq lr <== NOT EXECUTED
return EINVAL;
switch ( pshared ) {
a000a988: e3510001 cmp r1, #1 <== NOT EXECUTED
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
a000a98c: 95801004 strls r1, [r0, #4] <== NOT EXECUTED
return 0;
default:
return EINVAL;
a000a990: 83a00016 movhi r0, #22 <== NOT EXECUTED
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
a000a994: 93a00000 movls r0, #0 <== NOT EXECUTED
default:
return EINVAL;
}
}
a000a998: e12fff1e bx lr <== NOT EXECUTED
a0009dcc <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
a0009dcc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
a0009dd0: e2527000 subs r7, r2, #0
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
a0009dd4: e24dd048 sub sp, sp, #72 ; 0x48
a0009dd8: e1a08000 mov r8, r0
a0009ddc: e1a06003 mov r6, r3
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
a0009de0: 03a0500e moveq r5, #14
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
a0009de4: 0a000013 beq a0009e38 <pthread_create+0x6c>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
a0009de8: e59f4260 ldr r4, [pc, #608] ; a000a050 <pthread_create+0x284>
a0009dec: e3510000 cmp r1, #0
a0009df0: 11a04001 movne r4, r1
if ( !the_attr->is_initialized )
a0009df4: e5943000 ldr r3, [r4]
a0009df8: e3530000 cmp r3, #0
a0009dfc: 0a00000c beq a0009e34 <pthread_create+0x68>
* 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) )
a0009e00: e5943004 ldr r3, [r4, #4]
a0009e04: e3530000 cmp r3, #0
a0009e08: 0a000004 beq a0009e20 <pthread_create+0x54>
a0009e0c: e59f3240 ldr r3, [pc, #576] ; a000a054 <pthread_create+0x288>
a0009e10: e5942008 ldr r2, [r4, #8]
a0009e14: e5933000 ldr r3, [r3]
a0009e18: e1520003 cmp r2, r3
a0009e1c: 3a000004 bcc a0009e34 <pthread_create+0x68>
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
a0009e20: e5943010 ldr r3, [r4, #16]
a0009e24: e3530001 cmp r3, #1
a0009e28: 0a000048 beq a0009f50 <pthread_create+0x184>
a0009e2c: e3530002 cmp r3, #2
a0009e30: 0a000003 beq a0009e44 <pthread_create+0x78>
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
a0009e34: e3a05016 mov r5, #22 <== NOT EXECUTED
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
a0009e38: e1a00005 mov r0, r5
a0009e3c: e28dd048 add sp, sp, #72 ; 0x48
a0009e40: 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;
a0009e44: e28da024 add sl, sp, #36 ; 0x24
a0009e48: e284c018 add ip, r4, #24
a0009e4c: e1a0500a mov r5, sl
a0009e50: e8bc000f ldm ip!, {r0, r1, r2, r3}
a0009e54: e8a5000f stmia r5!, {r0, r1, r2, r3}
a0009e58: e89c0007 ldm ip, {r0, r1, r2}
a0009e5c: e8850007 stm r5, {r0, r1, r2}
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
a0009e60: e5949014 ldr r9, [r4, #20]
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
a0009e64: e594300c ldr r3, [r4, #12]
a0009e68: e3530000 cmp r3, #0
return ENOTSUP;
a0009e6c: 13a05086 movne r5, #134 ; 0x86
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
a0009e70: 1afffff0 bne a0009e38 <pthread_create+0x6c>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
a0009e74: e59d0024 ldr r0, [sp, #36] ; 0x24
a0009e78: eb0019ad bl a0010534 <_POSIX_Priority_Is_valid>
a0009e7c: e3500000 cmp r0, #0
a0009e80: 0affffeb beq a0009e34 <pthread_create+0x68>
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
a0009e84: e59dc024 ldr ip, [sp, #36] ; 0x24
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
a0009e88: e1a00009 mov r0, r9
a0009e8c: e1a0100a mov r1, sl
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
a0009e90: e58dc01c str ip, [sp, #28]
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
a0009e94: e59fc1bc ldr ip, [pc, #444] ; a000a058 <pthread_create+0x28c>
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
a0009e98: e28d2044 add r2, sp, #68 ; 0x44
a0009e9c: e28d3040 add r3, sp, #64 ; 0x40
a0009ea0: e5dcb000 ldrb fp, [ip]
a0009ea4: eb0019ad bl a0010560 <_POSIX_Thread_Translate_sched_param>
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
a0009ea8: e2505000 subs r5, r0, #0
a0009eac: 1affffe1 bne a0009e38 <pthread_create+0x6c>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
a0009eb0: e59f21a4 ldr r2, [pc, #420] ; a000a05c <pthread_create+0x290>
a0009eb4: e5920000 ldr r0, [r2]
a0009eb8: eb0005f1 bl a000b684 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
a0009ebc: e59f019c ldr r0, [pc, #412] ; a000a060 <pthread_create+0x294>
a0009ec0: eb00088b bl a000c0f4 <_Objects_Allocate>
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
a0009ec4: e3500000 cmp r0, #0
a0009ec8: e58d0020 str r0, [sp, #32]
a0009ecc: 0a000052 beq a000a01c <pthread_create+0x250>
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
a0009ed0: e59f117c ldr r1, [pc, #380] ; a000a054 <pthread_create+0x288>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
a0009ed4: e5943008 ldr r3, [r4, #8]
a0009ed8: e59dc01c ldr ip, [sp, #28]
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
a0009edc: e5911000 ldr r1, [r1]
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
a0009ee0: e5942004 ldr r2, [r4, #4]
a0009ee4: e06cb00b rsb fp, ip, fp
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
a0009ee8: e1a01081 lsl r1, r1, #1
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
a0009eec: e1510003 cmp r1, r3
a0009ef0: 21a03001 movcs r3, r1
a0009ef4: e59d1044 ldr r1, [sp, #68] ; 0x44
a0009ef8: e58db004 str fp, [sp, #4]
a0009efc: e59f015c ldr r0, [pc, #348] ; a000a060 <pthread_create+0x294>
a0009f00: e58d100c str r1, [sp, #12]
a0009f04: e59d1040 ldr r1, [sp, #64] ; 0x40
a0009f08: e3a0b001 mov fp, #1
a0009f0c: e58d5000 str r5, [sp]
a0009f10: e58d1010 str r1, [sp, #16]
a0009f14: e59d1020 ldr r1, [sp, #32]
a0009f18: e58db008 str fp, [sp, #8]
a0009f1c: e58d5014 str r5, [sp, #20]
a0009f20: e58d5018 str r5, [sp, #24]
a0009f24: eb000cb9 bl a000d210 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
a0009f28: e3500000 cmp r0, #0
a0009f2c: 1a000014 bne a0009f84 <pthread_create+0x1b8>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
a0009f30: e59f0128 ldr r0, [pc, #296] ; a000a060 <pthread_create+0x294>
a0009f34: e59d1020 ldr r1, [sp, #32]
a0009f38: eb000949 bl a000c464 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
a0009f3c: e59f2118 ldr r2, [pc, #280] ; a000a05c <pthread_create+0x290>
return EAGAIN;
a0009f40: e3a0500b mov r5, #11
name /* posix threads don't have a name */
);
if ( !status ) {
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
a0009f44: e5920000 ldr r0, [r2]
a0009f48: eb0005e9 bl a000b6f4 <_API_Mutex_Unlock>
return EAGAIN;
a0009f4c: eaffffb9 b a0009e38 <pthread_create+0x6c>
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a0009f50: e59f310c ldr r3, [pc, #268] ; a000a064 <pthread_create+0x298>
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
a0009f54: e28da024 add sl, sp, #36 ; 0x24
a0009f58: e1a0900a mov r9, sl
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a0009f5c: e5933004 ldr r3, [r3, #4]
a0009f60: e59350fc ldr r5, [r3, #252] ; 0xfc
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
a0009f64: e285c088 add ip, r5, #136 ; 0x88
a0009f68: e8bc000f ldm ip!, {r0, r1, r2, r3}
a0009f6c: e8a9000f stmia r9!, {r0, r1, r2, r3}
a0009f70: e89c0007 ldm ip, {r0, r1, r2}
a0009f74: e1a03009 mov r3, r9
a0009f78: e8830007 stm r3, {r0, r1, r2}
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
a0009f7c: e5959084 ldr r9, [r5, #132] ; 0x84
schedparam = api->schedparam;
break;
a0009f80: eaffffb7 b a0009e64 <pthread_create+0x98>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a0009f84: e59d3020 ldr r3, [sp, #32]
api->Attributes = *the_attr;
a0009f88: e1a0e004 mov lr, r4
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a0009f8c: e59330fc ldr r3, [r3, #252] ; 0xfc
a0009f90: e58d301c str r3, [sp, #28]
api->Attributes = *the_attr;
a0009f94: e59dc01c ldr ip, [sp, #28]
a0009f98: e8be000f ldm lr!, {r0, r1, r2, r3}
a0009f9c: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0009fa0: e8be000f ldm lr!, {r0, r1, r2, r3}
a0009fa4: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0009fa8: e8be000f ldm lr!, {r0, r1, r2, r3}
a0009fac: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0009fb0: e89e000f ldm lr, {r0, r1, r2, r3}
a0009fb4: e88c000f stm ip, {r0, r1, r2, r3}
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
a0009fb8: e59d001c ldr r0, [sp, #28]
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
a0009fbc: e594303c ldr r3, [r4, #60] ; 0x3c
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
a0009fc0: e280c088 add ip, r0, #136 ; 0x88
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
a0009fc4: e5803040 str r3, [r0, #64] ; 0x40
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
a0009fc8: e8ba000f ldm sl!, {r0, r1, r2, r3}
a0009fcc: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0009fd0: e89a0007 ldm sl, {r0, r1, r2}
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
a0009fd4: e59d301c ldr r3, [sp, #28]
api->schedparam = schedparam;
a0009fd8: e88c0007 stm ip, {r0, r1, r2}
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
a0009fdc: e5839084 str r9, [r3, #132] ; 0x84
api->schedparam = schedparam;
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
a0009fe0: e59d0020 ldr r0, [sp, #32]
a0009fe4: e1a0100b mov r1, fp
a0009fe8: e1a02007 mov r2, r7
a0009fec: e1a03006 mov r3, r6
a0009ff0: e58d5000 str r5, [sp]
a0009ff4: eb000f01 bl a000dc00 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
a0009ff8: e3590004 cmp r9, #4
a0009ffc: 0a00000b beq a000a030 <pthread_create+0x264>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
a000a000: e59dc020 ldr ip, [sp, #32]
_RTEMS_Unlock_allocator();
a000a004: e59f2050 ldr r2, [pc, #80] ; a000a05c <pthread_create+0x290>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
a000a008: e59c3008 ldr r3, [ip, #8]
_RTEMS_Unlock_allocator();
a000a00c: e5920000 ldr r0, [r2]
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
a000a010: e5883000 str r3, [r8]
_RTEMS_Unlock_allocator();
a000a014: eb0005b6 bl a000b6f4 <_API_Mutex_Unlock>
return 0;
a000a018: eaffff86 b a0009e38 <pthread_create+0x6c>
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
a000a01c: e59f3038 ldr r3, [pc, #56] ; a000a05c <pthread_create+0x290><== NOT EXECUTED
return EAGAIN;
a000a020: e3a0500b mov r5, #11 <== NOT EXECUTED
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
a000a024: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000a028: eb0005b1 bl a000b6f4 <_API_Mutex_Unlock> <== NOT EXECUTED
return EAGAIN;
a000a02c: eaffff81 b a0009e38 <pthread_create+0x6c> <== NOT EXECUTED
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
a000a030: e59d901c ldr r9, [sp, #28] <== NOT EXECUTED
a000a034: e2890090 add r0, r9, #144 ; 0x90 <== NOT EXECUTED
a000a038: eb000f6b bl a000ddec <_Timespec_To_ticks> <== NOT EXECUTED
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a03c: e28910a8 add r1, r9, #168 ; 0xa8 <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000a040: e58900b4 str r0, [r9, #180] ; 0xb4 <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a044: e59f001c ldr r0, [pc, #28] ; a000a068 <pthread_create+0x29c><== NOT EXECUTED
a000a048: eb001037 bl a000e12c <_Watchdog_Insert> <== NOT EXECUTED
a000a04c: eaffffeb b a000a000 <pthread_create+0x234> <== NOT EXECUTED
a000a06c <pthread_equal>:
break;
}
return status;
#endif
}
a000a06c: e1500001 cmp r0, r1 <== NOT EXECUTED
a000a070: 13a00000 movne r0, #0 <== NOT EXECUTED
a000a074: 03a00001 moveq r0, #1 <== NOT EXECUTED
a000a078: e12fff1e bx lr <== NOT EXECUTED
a0009914 <pthread_getcpuclockid>:
int pthread_getcpuclockid(
pthread_t pid,
clockid_t *clock_id
)
{
a0009914: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a0009918: eb002440 bl a0012a20 <__errno> <== NOT EXECUTED
a000991c: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a0009920: e5803000 str r3, [r0] <== NOT EXECUTED
}
a0009924: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0009928: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0009ca8 <pthread_getspecific>:
*/
void *pthread_getspecific(
pthread_key_t key
)
{
a0009ca8: e92d4010 push {r4, lr} <== NOT EXECUTED
a0009cac: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a0009cb0: e1a01000 mov r1, r0 <== NOT EXECUTED
pthread_key_t id,
Objects_Locations *location
)
{
return (POSIX_Keys_Control *)
_Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location );
a0009cb4: e1a0200d mov r2, sp <== NOT EXECUTED
a0009cb8: e59f0044 ldr r0, [pc, #68] ; a0009d04 <pthread_getspecific+0x5c><== NOT EXECUTED
a0009cbc: eb00097d bl a000c2b8 <_Objects_Get> <== NOT EXECUTED
uint32_t index;
Objects_Locations location;
void *key_data;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
a0009cc0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a0009cc4: e3530000 cmp r3, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return NULL;
a0009cc8: 13a04000 movne r4, #0 <== NOT EXECUTED
uint32_t index;
Objects_Locations location;
void *key_data;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
a0009ccc: 1a000009 bne a0009cf8 <pthread_getspecific+0x50> <== NOT EXECUTED
case OBJECTS_LOCAL:
api = _Objects_Get_API( _Thread_Executing->Object.id );
a0009cd0: e59f3030 ldr r3, [pc, #48] ; a0009d08 <pthread_getspecific+0x60><== NOT EXECUTED
a0009cd4: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
a0009cd8: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
a0009cdc: e1a02c23 lsr r2, r3, #24 <== NOT EXECUTED
a0009ce0: e2022007 and r2, r2, #7 <== NOT EXECUTED
index = _Objects_Get_index( _Thread_Executing->Object.id );
key_data = (void *) the_key->Values[ api ][ index ];
a0009ce4: e2822005 add r2, r2, #5 <== NOT EXECUTED
a0009ce8: e7902102 ldr r2, [r0, r2, lsl #2] <== NOT EXECUTED
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = _Objects_Get_API( _Thread_Executing->Object.id );
index = _Objects_Get_index( _Thread_Executing->Object.id );
a0009cec: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
key_data = (void *) the_key->Values[ api ][ index ];
a0009cf0: e7924723 ldr r4, [r2, r3, lsr #14] <== NOT EXECUTED
_Thread_Enable_dispatch();
a0009cf4: eb000c56 bl a000ce54 <_Thread_Enable_dispatch> <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return NULL;
}
a0009cf8: e1a00004 mov r0, r4 <== NOT EXECUTED
a0009cfc: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0009d00: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000f308 <pthread_join>:
int pthread_join(
pthread_t thread,
void **value_ptr
)
{
a000f308: e92d4030 push {r4, r5, lr}
a000f30c: e1a03000 mov r3, r0
a000f310: e24dd008 sub sp, sp, #8
a000f314: e1a05001 mov r5, r1
a000f318: e59f008c ldr r0, [pc, #140] ; a000f3ac <pthread_join+0xa4>
a000f31c: e1a01003 mov r1, r3
a000f320: e28d2004 add r2, sp, #4
a000f324: eb0008fd bl a0011720 <_Objects_Get>
POSIX_API_Control *api;
Objects_Locations location;
void *return_pointer;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
a000f328: e59d4004 ldr r4, [sp, #4]
a000f32c: e3540000 cmp r4, #0
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
a000f330: 13a00003 movne r0, #3
POSIX_API_Control *api;
Objects_Locations location;
void *return_pointer;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
a000f334: 1a000014 bne a000f38c <pthread_join+0x84>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000f338: e59030fc ldr r3, [r0, #252] ; 0xfc
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
a000f33c: e5932040 ldr r2, [r3, #64] ; 0x40
a000f340: e3520000 cmp r2, #0
a000f344: 0a000012 beq a000f394 <pthread_join+0x8c>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a000f348: e59f2060 ldr r2, [pc, #96] ; a000f3b0 <pthread_join+0xa8>
a000f34c: e5922004 ldr r2, [r2, #4]
_Thread_Enable_dispatch();
return EINVAL;
}
if ( _Thread_Is_executing( the_thread ) ) {
a000f350: e1500002 cmp r0, r2
a000f354: 0a000011 beq a000f3a0 <pthread_join+0x98>
/*
* Put ourself on the threads join list
*/
_Thread_Executing->Wait.return_argument = &return_pointer;
a000f358: e582d028 str sp, [r2, #40] ; 0x28
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;
a000f35c: e3a02001 mov r2, #1
_Thread_queue_Enter_critical_section( &api->Join_List );
_Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
a000f360: e2830044 add r0, r3, #68 ; 0x44
a000f364: e5832074 str r2, [r3, #116] ; 0x74
a000f368: e1a01004 mov r1, r4
a000f36c: e59f2040 ldr r2, [pc, #64] ; a000f3b4 <pthread_join+0xac>
a000f370: eb000d03 bl a0012784 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
a000f374: eb000bd0 bl a00122bc <_Thread_Enable_dispatch>
if ( value_ptr )
a000f378: e3550000 cmp r5, #0
*value_ptr = return_pointer;
a000f37c: 159d3000 ldrne r3, [sp]
return 0;
a000f380: 11a00004 movne r0, r4
a000f384: 01a00005 moveq r0, r5
_Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
_Thread_Enable_dispatch();
if ( value_ptr )
*value_ptr = return_pointer;
a000f388: 15853000 strne r3, [r5]
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
a000f38c: e28dd008 add sp, sp, #8
a000f390: e8bd8030 pop {r4, r5, pc}
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
_Thread_Enable_dispatch();
a000f394: eb000bc8 bl a00122bc <_Thread_Enable_dispatch>
return EINVAL;
a000f398: e3a00016 mov r0, #22
a000f39c: eafffffa b a000f38c <pthread_join+0x84>
}
if ( _Thread_Is_executing( the_thread ) ) {
_Thread_Enable_dispatch();
a000f3a0: eb000bc5 bl a00122bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return EDEADLK;
a000f3a4: e3a0002d mov r0, #45 ; 0x2d <== NOT EXECUTED
a000f3a8: eafffff7 b a000f38c <pthread_join+0x84> <== NOT EXECUTED
a00264e0 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
a00264e0: e92d40f0 push {r4, r5, r6, r7, lr}
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
a00264e4: e2514000 subs r4, r1, #0
int pthread_kill(
pthread_t thread,
int sig
)
{
a00264e8: e24dd008 sub sp, sp, #8
a00264ec: e1a01000 mov r1, r0
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
a00264f0: 0a000026 beq a0026590 <pthread_kill+0xb0>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
a00264f4: e2445001 sub r5, r4, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
a00264f8: e355001f cmp r5, #31
a00264fc: 8a000023 bhi a0026590 <pthread_kill+0xb0>
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
_Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location );
a0026500: e28d2004 add r2, sp, #4
a0026504: e59f00ac ldr r0, [pc, #172] ; a00265b8 <pthread_kill+0xd8>
a0026508: ebffa908 bl a0010930 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
a002650c: e59d2004 ldr r2, [sp, #4]
a0026510: e1a06000 mov r6, r0
a0026514: e3520000 cmp r2, #0
a0026518: 1a000021 bne a00265a4 <pthread_kill+0xc4>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
a002651c: e59f1098 ldr r1, [pc, #152] ; a00265bc <pthread_kill+0xdc>
a0026520: e3a0c00c mov ip, #12
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a0026524: e59030fc ldr r3, [r0, #252] ; 0xfc
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
a0026528: e021149c mla r1, ip, r4, r1
a002652c: e5911008 ldr r1, [r1, #8]
a0026530: e3510001 cmp r1, #1
a0026534: 0a000010 beq a002657c <pthread_kill+0x9c>
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
a0026538: e593c0d4 ldr ip, [r3, #212] ; 0xd4
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a002653c: e3a07001 mov r7, #1
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
a0026540: e1a01004 mov r1, r4
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
a0026544: e18c5517 orr r5, ip, r7, lsl r5
a0026548: e58350d4 str r5, [r3, #212] ; 0xd4
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
a002654c: ebffff90 bl a0026394 <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
a0026550: e59f3068 ldr r3, [pc, #104] ; a00265c0 <pthread_kill+0xe0>
a0026554: e5932000 ldr r2, [r3]
a0026558: e3520000 cmp r2, #0
a002655c: 0a000002 beq a002656c <pthread_kill+0x8c>
a0026560: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a0026564: e1560002 cmp r6, r2 <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
a0026568: 05c37010 strbeq r7, [r3, #16] <== NOT EXECUTED
}
_Thread_Enable_dispatch();
a002656c: ebffabfe bl a001156c <_Thread_Enable_dispatch>
return 0;
a0026570: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
a0026574: e28dd008 add sp, sp, #8
a0026578: e8bd80f0 pop {r4, r5, r6, r7, pc}
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
_Thread_Enable_dispatch();
a002657c: e58d2000 str r2, [sp] <== NOT EXECUTED
a0026580: ebffabf9 bl a001156c <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a0026584: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a0026588: e1a00002 mov r0, r2 <== NOT EXECUTED
a002658c: eafffff8 b a0026574 <pthread_kill+0x94> <== 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 );
a0026590: ebffc49a bl a0017800 <__errno> <== NOT EXECUTED
a0026594: e3a03016 mov r3, #22 <== NOT EXECUTED
a0026598: e5803000 str r3, [r0] <== NOT EXECUTED
a002659c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00265a0: eafffff3 b a0026574 <pthread_kill+0x94> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
a00265a4: ebffc495 bl a0017800 <__errno> <== NOT EXECUTED
a00265a8: e3a03003 mov r3, #3 <== NOT EXECUTED
a00265ac: e5803000 str r3, [r0] <== NOT EXECUTED
a00265b0: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00265b4: eaffffee b a0026574 <pthread_kill+0x94> <== NOT EXECUTED
a000bb60 <pthread_mutex_destroy>:
*/
int pthread_mutex_destroy(
pthread_mutex_t *mutex
)
{
a000bb60: e92d4030 push {r4, r5, lr}
a000bb64: e24dd004 sub sp, sp, #4
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
a000bb68: e1a0100d mov r1, sp
a000bb6c: eb000019 bl a000bbd8 <_POSIX_Mutex_Get>
switch ( location ) {
a000bb70: e59d4000 ldr r4, [sp]
)
{
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
a000bb74: e1a05000 mov r5, r0
switch ( location ) {
a000bb78: e3540000 cmp r4, #0
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000bb7c: 13a00016 movne r0, #22
{
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
a000bb80: 1a000004 bne a000bb98 <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 ) ) {
a000bb84: e5953064 ldr r3, [r5, #100] ; 0x64
a000bb88: e3530000 cmp r3, #0
a000bb8c: 1a000003 bne a000bba0 <pthread_mutex_destroy+0x40>
_Thread_Enable_dispatch();
a000bb90: eb000e0a bl a000f3c0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return EBUSY;
a000bb94: e3a00010 mov r0, #16 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a000bb98: e28dd004 add sp, sp, #4
a000bb9c: 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 );
a000bba0: e1a01005 mov r1, r5
a000bba4: e59f0028 ldr r0, [pc, #40] ; a000bbd4 <pthread_mutex_destroy+0x74>
a000bba8: eb000a0d bl a000e3e4 <_Objects_Close>
_CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL );
a000bbac: e3a02016 mov r2, #22
a000bbb0: e2850014 add r0, r5, #20
a000bbb4: e1a01004 mov r1, r4
a000bbb8: eb000771 bl a000d984 <_CORE_mutex_Flush>
RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
POSIX_Mutex_Control *the_mutex
)
{
_Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object );
a000bbbc: e59f0010 ldr r0, [pc, #16] ; a000bbd4 <pthread_mutex_destroy+0x74>
a000bbc0: e1a01005 mov r1, r5
a000bbc4: eb000abd bl a000e6c0 <_Objects_Free>
_POSIX_Mutex_Free( the_mutex );
_Thread_Enable_dispatch();
a000bbc8: eb000dfc bl a000f3c0 <_Thread_Enable_dispatch>
return 0;
a000bbcc: e1a00004 mov r0, r4
a000bbd0: eafffff0 b a000bb98 <pthread_mutex_destroy+0x38>
a000bcfc <pthread_mutex_init>:
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Mutex_Default_attributes;
a000bcfc: e59f3138 ldr r3, [pc, #312] ; a000be3c <pthread_mutex_init+0x140>
a000bd00: e3510000 cmp r1, #0
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
a000bd04: e92d40f0 push {r4, r5, r6, r7, lr}
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Mutex_Default_attributes;
a000bd08: 11a06001 movne r6, r1
a000bd0c: 01a06003 moveq r6, r3
/* Check for NULL mutex */
if ( !mutex )
a000bd10: e2504000 subs r4, r0, #0
a000bd14: 0a00003b beq a000be08 <pthread_mutex_init+0x10c>
}
}
}
#endif
if ( !the_attr->is_initialized )
a000bd18: e5963000 ldr r3, [r6]
a000bd1c: e3530000 cmp r3, #0
a000bd20: 0a000038 beq a000be08 <pthread_mutex_init+0x10c>
return EINVAL;
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
a000bd24: e5963004 ldr r3, [r6, #4]
a000bd28: e3530001 cmp r3, #1
a000bd2c: 0a00003b beq a000be20 <pthread_mutex_init+0x124>
return ENOSYS;
if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE )
a000bd30: e3530000 cmp r3, #0
a000bd34: 1a000033 bne a000be08 <pthread_mutex_init+0x10c>
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
a000bd38: e596700c ldr r7, [r6, #12]
a000bd3c: e3570001 cmp r7, #1
a000bd40: 0a000038 beq a000be28 <pthread_mutex_init+0x12c>
a000bd44: e3570002 cmp r7, #2
a000bd48: 0a000030 beq a000be10 <pthread_mutex_init+0x114>
a000bd4c: e3570000 cmp r7, #0
a000bd50: 1a00002c bne a000be08 <pthread_mutex_init+0x10c>
}
/*
* Validate the priority ceiling field -- should always be valid.
*/
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
a000bd54: e5960008 ldr r0, [r6, #8]
a000bd58: eb0000d5 bl a000c0b4 <_POSIX_Priority_Is_valid>
a000bd5c: e3500000 cmp r0, #0
a000bd60: 0a000028 beq a000be08 <pthread_mutex_init+0x10c>
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
/*
* Validate the mutex type and set appropriate SuperCore mutex
* attributes.
*/
switch ( the_attr->type ) {
a000bd64: e5963010 ldr r3, [r6, #16]
a000bd68: e3530003 cmp r3, #3
a000bd6c: 8a000029 bhi a000be18 <pthread_mutex_init+0x11c>
a000bd70: e59f30c8 ldr r3, [pc, #200] ; a000be40 <pthread_mutex_init+0x144>
a000bd74: e5932000 ldr r2, [r3]
a000bd78: e2822001 add r2, r2, #1
a000bd7c: e5832000 str r2, [r3]
* _POSIX_Mutex_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
{
return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
a000bd80: e59f00bc ldr r0, [pc, #188] ; a000be44 <pthread_mutex_init+0x148>
a000bd84: eb000971 bl a000e350 <_Objects_Allocate>
*/
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
a000bd88: e2505000 subs r5, r0, #0
a000bd8c: 0a000027 beq a000be30 <pthread_mutex_init+0x134>
the_mutex->process_shared = the_attr->process_shared;
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
a000bd90: e5962014 ldr r2, [r6, #20]
if ( !the_mutex ) {
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
a000bd94: e5963004 ldr r3, [r6, #4]
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
a000bd98: e59f00a8 ldr r0, [pc, #168] ; a000be48 <pthread_mutex_init+0x14c>
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
a000bd9c: e3520000 cmp r2, #0
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;
a000bda0: e3a02001 mov r2, #1
if ( !the_mutex ) {
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
a000bda4: e5853010 str r3, [r5, #16]
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;
a000bda8: e5c52058 strb r2, [r5, #88] ; 0x58
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;
a000bdac: 13a03000 movne r3, #0
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
a000bdb0: 03a03001 moveq r3, #1
a000bdb4: e5d0c000 ldrb ip, [r0]
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;
a000bdb8: 15853054 strne r3, [r5, #84] ; 0x54
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
a000bdbc: 05853054 streq r3, [r5, #84] ; 0x54
a000bdc0: e5963008 ldr r3, [r6, #8]
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
the_mutex_attr = &the_mutex->Mutex.Attributes;
a000bdc4: e2851054 add r1, r5, #84 ; 0x54
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = true;
the_mutex_attr->priority_ceiling =
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
a000bdc8: e585705c str r7, [r5, #92] ; 0x5c
a000bdcc: e063300c rsb r3, r3, ip
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 =
a000bdd0: e5853060 str r3, [r5, #96] ; 0x60
the_mutex_attr->discipline = the_discipline;
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
a000bdd4: e2850014 add r0, r5, #20
a000bdd8: eb0006ea bl a000d988 <_CORE_mutex_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000bddc: e59f2060 ldr r2, [pc, #96] ; a000be44 <pthread_mutex_init+0x148>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000bde0: e5953008 ldr r3, [r5, #8]
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a000bde4: e3a06000 mov r6, #0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000bde8: e592201c ldr r2, [r2, #28]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a000bdec: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000bdf0: e7825721 str r5, [r2, r1, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a000bdf4: e585600c str r6, [r5, #12]
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
a000bdf8: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
a000bdfc: eb000d6f bl a000f3c0 <_Thread_Enable_dispatch>
return 0;
a000be00: e1a00006 mov r0, r6
a000be04: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* Validate the priority ceiling field -- should always be valid.
*/
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
return EINVAL;
a000be08: e3a00016 mov r0, #22 <== NOT EXECUTED
a000be0c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
break;
case PTHREAD_PRIO_INHERIT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
break;
case PTHREAD_PRIO_PROTECT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
a000be10: e3a07003 mov r7, #3 <== NOT EXECUTED
break;
a000be14: eaffffce b a000bd54 <pthread_mutex_init+0x58> <== NOT EXECUTED
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
break;
default:
return EINVAL;
a000be18: e3a00016 mov r0, #22 <== NOT EXECUTED
*mutex = the_mutex->Object.id;
_Thread_Enable_dispatch();
return 0;
}
a000be1c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return ENOSYS;
a000be20: e3a00058 mov r0, #88 ; 0x58 <== NOT EXECUTED
a000be24: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
switch ( the_attr->protocol ) {
case PTHREAD_PRIO_NONE:
the_discipline = CORE_MUTEX_DISCIPLINES_FIFO;
break;
case PTHREAD_PRIO_INHERIT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
a000be28: e3a07002 mov r7, #2 <== NOT EXECUTED
a000be2c: eaffffc8 b a000bd54 <pthread_mutex_init+0x58> <== NOT EXECUTED
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
_Thread_Enable_dispatch();
a000be30: eb000d62 bl a000f3c0 <_Thread_Enable_dispatch>
return EAGAIN;
a000be34: e3a0000b mov r0, #11
a000be38: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000bec0 <pthread_mutex_setprioceiling>:
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
a000bec0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
if ( !old_ceiling )
a000bec4: e2526000 subs r6, r2, #0 <== NOT EXECUTED
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
a000bec8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000becc: e1a04000 mov r4, r0 <== NOT EXECUTED
a000bed0: e1a05001 mov r5, r1 <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
if ( !old_ceiling )
a000bed4: 0a000003 beq a000bee8 <pthread_mutex_setprioceiling+0x28> <== NOT EXECUTED
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
a000bed8: e1a00001 mov r0, r1 <== NOT EXECUTED
a000bedc: eb000074 bl a000c0b4 <_POSIX_Priority_Is_valid> <== NOT EXECUTED
a000bee0: e3500000 cmp r0, #0 <== NOT EXECUTED
a000bee4: 1a000002 bne a000bef4 <pthread_mutex_setprioceiling+0x34> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000bee8: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000beec: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000bef0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a000bef4: e59f7058 ldr r7, [pc, #88] ; a000bf54 <pthread_mutex_setprioceiling+0x94><== NOT EXECUTED
/*
* Must acquire the mutex before we can change it's ceiling.
* POSIX says block until we acquire it.
*/
(void) pthread_mutex_lock( mutex );
a000bef8: e1a00004 mov r0, r4 <== NOT EXECUTED
a000befc: e5d78000 ldrb r8, [r7] <== NOT EXECUTED
a000bf00: ebffffd1 bl a000be4c <pthread_mutex_lock> <== NOT EXECUTED
* operations.
*
* NOTE: This makes it easier to get 100% binary coverage since the
* bad Id case is handled by the switch.
*/
the_mutex = _POSIX_Mutex_Get( mutex, &location );
a000bf04: e1a00004 mov r0, r4 <== NOT EXECUTED
a000bf08: e1a0100d mov r1, sp <== NOT EXECUTED
a000bf0c: ebffff31 bl a000bbd8 <_POSIX_Mutex_Get> <== NOT EXECUTED
switch ( location ) {
a000bf10: e59d4000 ldr r4, [sp] <== NOT EXECUTED
* operations.
*
* NOTE: This makes it easier to get 100% binary coverage since the
* bad Id case is handled by the switch.
*/
the_mutex = _POSIX_Mutex_Get( mutex, &location );
a000bf14: e1a03000 mov r3, r0 <== NOT EXECUTED
switch ( location ) {
a000bf18: e3540000 cmp r4, #0 <== NOT EXECUTED
a000bf1c: 1afffff1 bne a000bee8 <pthread_mutex_setprioceiling+0x28> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
a000bf20: e5902060 ldr r2, [r0, #96] ; 0x60 <== NOT EXECUTED
a000bf24: e5d71000 ldrb r1, [r7] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
a000bf28: e0655008 rsb r5, r5, r8 <== NOT EXECUTED
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
/*
* We are required to unlock the mutex before we return.
*/
_CORE_mutex_Surrender(
a000bf2c: e2800014 add r0, r0, #20 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
a000bf30: e0622001 rsb r2, r2, r1 <== NOT EXECUTED
*/
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
a000bf34: e5862000 str r2, [r6] <== NOT EXECUTED
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
/*
* We are required to unlock the mutex before we return.
*/
_CORE_mutex_Surrender(
a000bf38: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
a000bf3c: e5835060 str r5, [r3, #96] ; 0x60 <== NOT EXECUTED
/*
* We are required to unlock the mutex before we return.
*/
_CORE_mutex_Surrender(
a000bf40: e1a02004 mov r2, r4 <== NOT EXECUTED
a000bf44: eb00070c bl a000db7c <_CORE_mutex_Surrender> <== NOT EXECUTED
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
a000bf48: eb000d1c bl a000f3c0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000bf4c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000bf50: eaffffe5 b a000beec <pthread_mutex_setprioceiling+0x2c> <== NOT EXECUTED
a000bf58 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
a000bf58: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000bf5c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000bf60: e1a05000 mov r5, r0 <== NOT EXECUTED
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
a000bf64: e1a00001 mov r0, r1 <== NOT EXECUTED
a000bf68: e1a0100d mov r1, sp <== NOT EXECUTED
a000bf6c: eb000030 bl a000c034 <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
a000bf70: e3500003 cmp r0, #3 <== NOT EXECUTED
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
a000bf74: e1a04000 mov r4, r0 <== NOT EXECUTED
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
a000bf78: 0a00000f beq a000bfbc <pthread_mutex_timedlock+0x64> <== NOT EXECUTED
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
a000bf7c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000bf80: e3a01000 mov r1, #0 <== NOT EXECUTED
a000bf84: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000bf88: ebffffb2 bl a000be58 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED
* This service only gives us the option to block. We used a polling
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
a000bf8c: e3500010 cmp r0, #16 <== NOT EXECUTED
a000bf90: 0a000001 beq a000bf9c <pthread_mutex_timedlock+0x44> <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
a000bf94: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000bf98: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
a000bf9c: e3540000 cmp r4, #0 <== NOT EXECUTED
return EINVAL;
a000bfa0: 03a00016 moveq r0, #22 <== NOT EXECUTED
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
a000bfa4: 0afffffa beq a000bf94 <pthread_mutex_timedlock+0x3c> <== NOT EXECUTED
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a000bfa8: e2444001 sub r4, r4, #1 <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
a000bfac: e3540001 cmp r4, #1 <== NOT EXECUTED
a000bfb0: 83a00010 movhi r0, #16 <== NOT EXECUTED
a000bfb4: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED
a000bfb8: eafffff5 b a000bf94 <pthread_mutex_timedlock+0x3c> <== NOT EXECUTED
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
a000bfbc: e1a00005 mov r0, r5 <== NOT EXECUTED
a000bfc0: e3a01001 mov r1, #1 <== NOT EXECUTED
a000bfc4: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000bfc8: ebffffa2 bl a000be58 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED
a000bfcc: eafffff0 b a000bf94 <pthread_mutex_timedlock+0x3c> <== NOT EXECUTED
a000bfe0 <pthread_mutex_trylock>:
int pthread_mutex_trylock(
pthread_mutex_t *mutex
)
{
return _POSIX_Mutex_Lock_support( mutex, false, THREAD_QUEUE_WAIT_FOREVER );
a000bfe0: e3a01000 mov r1, #0 <== NOT EXECUTED
a000bfe4: e1a02001 mov r2, r1 <== NOT EXECUTED
a000bfe8: eaffff9a b a000be58 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED
a000b9bc <pthread_mutexattr_destroy>:
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
if ( !attr || !attr->is_initialized )
a000b9bc: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000b9c0: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
if ( !attr || !attr->is_initialized )
a000b9c4: 012fff1e bxeq lr <== NOT EXECUTED
a000b9c8: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000b9cc: e3520000 cmp r2, #0 <== NOT EXECUTED
return EINVAL;
attr->is_initialized = false;
a000b9d0: 13a00000 movne r0, #0 <== NOT EXECUTED
a000b9d4: 15830000 strne r0, [r3] <== NOT EXECUTED
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a000b9d8: 03a00016 moveq r0, #22 <== NOT EXECUTED
attr->is_initialized = false;
return 0;
}
a000b9dc: e12fff1e bx lr <== NOT EXECUTED
a000bab0 <pthread_mutexattr_setprioceiling>:
int pthread_mutexattr_setprioceiling(
pthread_mutexattr_t *attr,
int prioceiling
)
{
a000bab0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
if ( !attr || !attr->is_initialized )
a000bab4: e2504000 subs r4, r0, #0 <== NOT EXECUTED
int pthread_mutexattr_setprioceiling(
pthread_mutexattr_t *attr,
int prioceiling
)
{
a000bab8: e1a05001 mov r5, r1 <== NOT EXECUTED
if ( !attr || !attr->is_initialized )
a000babc: 0a000002 beq a000bacc <pthread_mutexattr_setprioceiling+0x1c><== NOT EXECUTED
a000bac0: e5943000 ldr r3, [r4] <== NOT EXECUTED
a000bac4: e3530000 cmp r3, #0 <== NOT EXECUTED
a000bac8: 1a000001 bne a000bad4 <pthread_mutexattr_setprioceiling+0x24><== NOT EXECUTED
return EINVAL;
a000bacc: e3a00016 mov r0, #22 <== NOT EXECUTED
a000bad0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
a000bad4: e1a00001 mov r0, r1 <== NOT EXECUTED
a000bad8: eb000175 bl a000c0b4 <_POSIX_Priority_Is_valid> <== NOT EXECUTED
a000badc: e3500000 cmp r0, #0 <== NOT EXECUTED
a000bae0: 0a000002 beq a000baf0 <pthread_mutexattr_setprioceiling+0x40><== NOT EXECUTED
return EINVAL;
attr->prio_ceiling = prioceiling;
a000bae4: e5845008 str r5, [r4, #8] <== NOT EXECUTED
return 0;
a000bae8: e3a00000 mov r0, #0 <== NOT EXECUTED
a000baec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
return EINVAL;
a000baf0: e3a00016 mov r0, #22 <== NOT EXECUTED
attr->prio_ceiling = prioceiling;
return 0;
}
a000baf4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000baf8 <pthread_mutexattr_setprotocol>:
int pthread_mutexattr_setprotocol(
pthread_mutexattr_t *attr,
int protocol
)
{
if ( !attr || !attr->is_initialized )
a000baf8: e3500000 cmp r0, #0 <== NOT EXECUTED
a000bafc: 0a000008 beq a000bb24 <pthread_mutexattr_setprotocol+0x2c> <== NOT EXECUTED
a000bb00: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000bb04: e3530000 cmp r3, #0 <== NOT EXECUTED
a000bb08: 0a000005 beq a000bb24 <pthread_mutexattr_setprotocol+0x2c> <== NOT EXECUTED
return EINVAL;
switch ( protocol ) {
a000bb0c: e3510002 cmp r1, #2 <== NOT EXECUTED
case PTHREAD_PRIO_NONE:
case PTHREAD_PRIO_INHERIT:
case PTHREAD_PRIO_PROTECT:
attr->protocol = protocol;
a000bb10: 9580100c strls r1, [r0, #12] <== NOT EXECUTED
return 0;
a000bb14: 93a00000 movls r0, #0 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( protocol ) {
a000bb18: 912fff1e bxls lr <== NOT EXECUTED
case PTHREAD_PRIO_PROTECT:
attr->protocol = protocol;
return 0;
default:
return EINVAL;
a000bb1c: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a000bb20: e12fff1e bx lr <== NOT EXECUTED
pthread_mutexattr_t *attr,
int protocol
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a000bb24: e3a00016 mov r0, #22 <== NOT EXECUTED
a000bb28: e12fff1e bx lr <== NOT EXECUTED
a000bb2c <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
a000bb2c: e3500000 cmp r0, #0 <== NOT EXECUTED
a000bb30: 0a000008 beq a000bb58 <pthread_mutexattr_setpshared+0x2c> <== NOT EXECUTED
a000bb34: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000bb38: e3530000 cmp r3, #0 <== NOT EXECUTED
a000bb3c: 0a000005 beq a000bb58 <pthread_mutexattr_setpshared+0x2c> <== NOT EXECUTED
return EINVAL;
switch ( pshared ) {
a000bb40: e3510001 cmp r1, #1 <== NOT EXECUTED
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
a000bb44: 95801004 strls r1, [r0, #4] <== NOT EXECUTED
return 0;
a000bb48: 93a00000 movls r0, #0 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
a000bb4c: 912fff1e bxls lr <== NOT EXECUTED
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
a000bb50: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a000bb54: e12fff1e bx lr <== NOT EXECUTED
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a000bb58: e3a00016 mov r0, #22 <== NOT EXECUTED
a000bb5c: e12fff1e bx lr <== NOT EXECUTED
a000a46c <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
a000a46c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
if ( !once_control || !init_routine )
a000a470: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a474: 13510000 cmpne r1, #0 <== NOT EXECUTED
a000a478: e1a04000 mov r4, r0 <== NOT EXECUTED
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
a000a47c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
if ( !once_control || !init_routine )
a000a480: 13a00000 movne r0, #0 <== NOT EXECUTED
a000a484: 03a00001 moveq r0, #1 <== NOT EXECUTED
a000a488: e1a05001 mov r5, r1 <== NOT EXECUTED
return EINVAL;
a000a48c: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
a000a490: 0a000002 beq a000a4a0 <pthread_once+0x34> <== NOT EXECUTED
return EINVAL;
if ( !once_control->init_executed ) {
a000a494: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
a000a498: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a49c: 0a000001 beq a000a4a8 <pthread_once+0x3c> <== NOT EXECUTED
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
a000a4a0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000a4a4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
a000a4a8: e3a00c01 mov r0, #256 ; 0x100 <== NOT EXECUTED
a000a4ac: e1a01000 mov r1, r0 <== NOT EXECUTED
a000a4b0: e1a0200d mov r2, sp <== NOT EXECUTED
a000a4b4: eb0002e6 bl a000b054 <rtems_task_mode> <== NOT EXECUTED
if ( !once_control->init_executed ) {
a000a4b8: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
a000a4bc: e1a0600d mov r6, sp <== NOT EXECUTED
if ( !once_control->init_executed ) {
a000a4c0: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a4c4: 0a000005 beq a000a4e0 <pthread_once+0x74> <== NOT EXECUTED
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
a000a4c8: e59d0000 ldr r0, [sp] <== NOT EXECUTED
a000a4cc: e3a01c01 mov r1, #256 ; 0x100 <== NOT EXECUTED
a000a4d0: e1a0200d mov r2, sp <== NOT EXECUTED
a000a4d4: eb0002de bl a000b054 <rtems_task_mode> <== NOT EXECUTED
}
return 0;
a000a4d8: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a4dc: eaffffef b a000a4a0 <pthread_once+0x34> <== NOT EXECUTED
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
a000a4e0: e3a03001 mov r3, #1 <== NOT EXECUTED
a000a4e4: e5843000 str r3, [r4] <== NOT EXECUTED
once_control->init_executed = true;
a000a4e8: e5843004 str r3, [r4, #4] <== NOT EXECUTED
(*init_routine)();
a000a4ec: e12fff35 blx r5 <== NOT EXECUTED
a000a4f0: eafffff4 b a000a4c8 <pthread_once+0x5c> <== NOT EXECUTED
a000ae44 <pthread_rwlock_destroy>:
*/
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
{
a000ae44: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
POSIX_RWLock_Control *the_rwlock = NULL;
Objects_Locations location;
if ( !rwlock )
a000ae48: e2503000 subs r3, r0, #0 <== NOT EXECUTED
*/
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
{
a000ae4c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
POSIX_RWLock_Control *the_rwlock = NULL;
Objects_Locations location;
if ( !rwlock )
a000ae50: 0a00000e beq a000ae90 <pthread_rwlock_destroy+0x4c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get (
pthread_rwlock_t *RWLock,
Objects_Locations *location
)
{
return (POSIX_RWLock_Control *) _Objects_Get(
a000ae54: e5931000 ldr r1, [r3] <== NOT EXECUTED
a000ae58: e59f0060 ldr r0, [pc, #96] ; a000aec0 <pthread_rwlock_destroy+0x7c><== NOT EXECUTED
a000ae5c: e1a0200d mov r2, sp <== NOT EXECUTED
a000ae60: eb000b1c bl a000dad8 <_Objects_Get> <== NOT EXECUTED
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000ae64: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000ae68: e1a04000 mov r4, r0 <== NOT EXECUTED
a000ae6c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ae70: 1a000006 bne a000ae90 <pthread_rwlock_destroy+0x4c> <== NOT EXECUTED
case OBJECTS_LOCAL:
/*
* If there is at least one thread waiting, then do not delete it.
*/
if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) {
a000ae74: e2800010 add r0, r0, #16 <== NOT EXECUTED
a000ae78: eb001015 bl a000eed4 <_Thread_queue_First> <== NOT EXECUTED
a000ae7c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a000ae80: 0a000005 beq a000ae9c <pthread_rwlock_destroy+0x58> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000ae84: eb000dfa bl a000e674 <_Thread_Enable_dispatch> <== NOT EXECUTED
return EBUSY;
a000ae88: e3a00010 mov r0, #16 <== NOT EXECUTED
a000ae8c: ea000000 b a000ae94 <pthread_rwlock_destroy+0x50> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000ae90: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000ae94: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000ae98: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* POSIX doesn't require behavior when it is locked.
*/
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
a000ae9c: e1a01004 mov r1, r4 <== NOT EXECUTED
a000aea0: e59f0018 ldr r0, [pc, #24] ; a000aec0 <pthread_rwlock_destroy+0x7c><== NOT EXECUTED
a000aea4: eb0009fb bl a000d698 <_Objects_Close> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free (
POSIX_RWLock_Control *the_RWLock
)
{
_Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object );
a000aea8: e59f0010 ldr r0, [pc, #16] ; a000aec0 <pthread_rwlock_destroy+0x7c><== NOT EXECUTED
a000aeac: e1a01004 mov r1, r4 <== NOT EXECUTED
a000aeb0: eb000aaf bl a000d974 <_Objects_Free> <== NOT EXECUTED
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
a000aeb4: eb000dee bl a000e674 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000aeb8: e1a00005 mov r0, r5 <== NOT EXECUTED
a000aebc: eafffff4 b a000ae94 <pthread_rwlock_destroy+0x50> <== NOT EXECUTED
a000aec4 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
a000aec4: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
a000aec8: e2505000 subs r5, r0, #0 <== NOT EXECUTED
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
a000aecc: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
a000aed0: 0a000007 beq a000aef4 <pthread_rwlock_init+0x30> <== NOT EXECUTED
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
a000aed4: e3510000 cmp r1, #0 <== NOT EXECUTED
a000aed8: 0a000021 beq a000af64 <pthread_rwlock_init+0xa0> <== NOT EXECUTED
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
a000aedc: e5913000 ldr r3, [r1] <== NOT EXECUTED
a000aee0: e3530000 cmp r3, #0 <== NOT EXECUTED
a000aee4: 0a000002 beq a000aef4 <pthread_rwlock_init+0x30> <== NOT EXECUTED
return EINVAL;
switch ( the_attr->process_shared ) {
a000aee8: e5914004 ldr r4, [r1, #4] <== NOT EXECUTED
a000aeec: e3540000 cmp r4, #0 <== NOT EXECUTED
a000aef0: 0a000002 beq a000af00 <pthread_rwlock_init+0x3c> <== NOT EXECUTED
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
a000aef4: e3a00016 mov r0, #22 <== NOT EXECUTED
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
a000aef8: e28dd00c add sp, sp, #12 <== NOT EXECUTED
a000aefc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000af00: e59f3070 ldr r3, [pc, #112] ; a000af78 <pthread_rwlock_init+0xb4><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
a000af04: e58d4008 str r4, [sp, #8] <== NOT EXECUTED
a000af08: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000af0c: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000af10: e5832000 str r2, [r3] <== NOT EXECUTED
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
_Objects_Allocate( &_POSIX_RWLock_Information );
a000af14: e59f7060 ldr r7, [pc, #96] ; a000af7c <pthread_rwlock_init+0xb8><== NOT EXECUTED
a000af18: e1a00007 mov r0, r7 <== NOT EXECUTED
a000af1c: eb0009b8 bl a000d604 <_Objects_Allocate> <== NOT EXECUTED
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
a000af20: e2506000 subs r6, r0, #0 <== NOT EXECUTED
a000af24: 0a00000b beq a000af58 <pthread_rwlock_init+0x94> <== NOT EXECUTED
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
a000af28: e2860010 add r0, r6, #16 <== NOT EXECUTED
a000af2c: e28d1008 add r1, sp, #8 <== NOT EXECUTED
a000af30: eb000778 bl a000cd18 <_CORE_RWLock_Initialize> <== NOT EXECUTED
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000af34: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000af38: e597201c ldr r2, [r7, #28] <== NOT EXECUTED
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a000af3c: e1a01803 lsl r1, r3, #16 <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000af40: e7826721 str r6, [r2, r1, lsr #14] <== NOT EXECUTED
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a000af44: e586400c str r4, [r6, #12] <== NOT EXECUTED
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
a000af48: e5853000 str r3, [r5] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000af4c: eb000dc8 bl a000e674 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000af50: e1a00004 mov r0, r4 <== NOT EXECUTED
a000af54: eaffffe7 b a000aef8 <pthread_rwlock_init+0x34> <== NOT EXECUTED
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
a000af58: eb000dc5 bl a000e674 <_Thread_Enable_dispatch> <== NOT EXECUTED
return EAGAIN;
a000af5c: e3a0000b mov r0, #11 <== NOT EXECUTED
a000af60: eaffffe4 b a000aef8 <pthread_rwlock_init+0x34> <== NOT EXECUTED
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
a000af64: e1a0000d mov r0, sp <== NOT EXECUTED
a000af68: eb000264 bl a000b900 <pthread_rwlockattr_init> <== NOT EXECUTED
a000af6c: e1a0400d mov r4, sp <== NOT EXECUTED
the_attr = &default_attr;
a000af70: e1a0100d mov r1, sp <== NOT EXECUTED
a000af74: eaffffd8 b a000aedc <pthread_rwlock_init+0x18> <== NOT EXECUTED
a000af80 <pthread_rwlock_rdlock>:
*/
int pthread_rwlock_rdlock(
pthread_rwlock_t *rwlock
)
{
a000af80: e92d4010 push {r4, lr} <== NOT EXECUTED
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000af84: e2504000 subs r4, r0, #0 <== NOT EXECUTED
*/
int pthread_rwlock_rdlock(
pthread_rwlock_t *rwlock
)
{
a000af88: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000af8c: 0a000006 beq a000afac <pthread_rwlock_rdlock+0x2c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get (
pthread_rwlock_t *RWLock,
Objects_Locations *location
)
{
return (POSIX_RWLock_Control *) _Objects_Get(
a000af90: e59f004c ldr r0, [pc, #76] ; a000afe4 <pthread_rwlock_rdlock+0x64><== NOT EXECUTED
a000af94: e5941000 ldr r1, [r4] <== NOT EXECUTED
a000af98: e28d2004 add r2, sp, #4 <== NOT EXECUTED
a000af9c: eb000acd bl a000dad8 <_Objects_Get> <== NOT EXECUTED
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000afa0: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
a000afa4: e3530000 cmp r3, #0 <== NOT EXECUTED
a000afa8: 0a000002 beq a000afb8 <pthread_rwlock_rdlock+0x38> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000afac: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000afb0: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000afb4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
a000afb8: e5941000 ldr r1, [r4] <== NOT EXECUTED
a000afbc: e3a02001 mov r2, #1 <== NOT EXECUTED
a000afc0: e2800010 add r0, r0, #16 <== NOT EXECUTED
a000afc4: e58d3000 str r3, [sp] <== NOT EXECUTED
a000afc8: eb00075a bl a000cd38 <_CORE_RWLock_Obtain_for_reading> <== NOT EXECUTED
true, /* we are willing to wait forever */
0,
NULL
);
_Thread_Enable_dispatch();
a000afcc: eb000da8 bl a000e674 <_Thread_Enable_dispatch> <== NOT EXECUTED
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
a000afd0: e59f3010 ldr r3, [pc, #16] ; a000afe8 <pthread_rwlock_rdlock+0x68><== NOT EXECUTED
a000afd4: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000afd8: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
a000afdc: eb00006a bl a000b18c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000afe0: eafffff2 b a000afb0 <pthread_rwlock_rdlock+0x30> <== NOT EXECUTED
a000afec <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a000afec: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a000aff0: e2505000 subs r5, r0, #0 <== NOT EXECUTED
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a000aff4: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a000aff8: 0a00001d beq a000b074 <pthread_rwlock_timedrdlock+0x88> <== NOT EXECUTED
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
a000affc: e1a00001 mov r0, r1 <== NOT EXECUTED
a000b000: e28d1004 add r1, sp, #4 <== NOT EXECUTED
a000b004: eb001a17 bl a0011868 <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED
a000b008: e5951000 ldr r1, [r5] <== NOT EXECUTED
a000b00c: e1a04000 mov r4, r0 <== NOT EXECUTED
a000b010: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a000b014: e59f0098 ldr r0, [pc, #152] ; a000b0b4 <pthread_rwlock_timedrdlock+0xc8><== NOT EXECUTED
a000b018: eb000aae bl a000dad8 <_Objects_Get> <== NOT EXECUTED
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000b01c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a000b020: e3530000 cmp r3, #0 <== NOT EXECUTED
a000b024: 1a000012 bne a000b074 <pthread_rwlock_timedrdlock+0x88> <== NOT EXECUTED
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
a000b028: e5951000 ldr r1, [r5] <== NOT EXECUTED
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
a000b02c: e3540003 cmp r4, #3 <== NOT EXECUTED
a000b030: 13a05000 movne r5, #0 <== NOT EXECUTED
a000b034: 03a05001 moveq r5, #1 <== NOT EXECUTED
a000b038: e58d3000 str r3, [sp] <== NOT EXECUTED
a000b03c: e2800010 add r0, r0, #16 <== NOT EXECUTED
a000b040: e1a02005 mov r2, r5 <== NOT EXECUTED
a000b044: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
a000b048: eb00073a bl a000cd38 <_CORE_RWLock_Obtain_for_reading> <== NOT EXECUTED
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
a000b04c: eb000d88 bl a000e674 <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( !do_wait ) {
a000b050: e3550000 cmp r5, #0 <== NOT EXECUTED
a000b054: 1a000011 bne a000b0a0 <pthread_rwlock_timedrdlock+0xb4> <== NOT EXECUTED
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
a000b058: e59f3058 ldr r3, [pc, #88] ; a000b0b8 <pthread_rwlock_timedrdlock+0xcc><== NOT EXECUTED
a000b05c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
a000b060: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
a000b064: e3500002 cmp r0, #2 <== NOT EXECUTED
a000b068: 0a000004 beq a000b080 <pthread_rwlock_timedrdlock+0x94> <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000b06c: eb000046 bl a000b18c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000b070: ea000000 b a000b078 <pthread_rwlock_timedrdlock+0x8c> <== NOT EXECUTED
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
a000b074: e3a00016 mov r0, #22 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a000b078: e28dd00c add sp, sp, #12 <== NOT EXECUTED
a000b07c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
a000b080: e3540000 cmp r4, #0 <== NOT EXECUTED
a000b084: 0afffffa beq a000b074 <pthread_rwlock_timedrdlock+0x88> <== NOT EXECUTED
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a000b088: e2444001 sub r4, r4, #1 <== NOT EXECUTED
a000b08c: e3540001 cmp r4, #1 <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
a000b090: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a000b094: 9afffff7 bls a000b078 <pthread_rwlock_timedrdlock+0x8c> <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000b098: eb00003b bl a000b18c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000b09c: eafffff5 b a000b078 <pthread_rwlock_timedrdlock+0x8c> <== NOT EXECUTED
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
a000b0a0: e59f3010 ldr r3, [pc, #16] ; a000b0b8 <pthread_rwlock_timedrdlock+0xcc><== NOT EXECUTED
a000b0a4: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
a000b0a8: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000b0ac: eb000036 bl a000b18c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000b0b0: eafffff0 b a000b078 <pthread_rwlock_timedrdlock+0x8c> <== NOT EXECUTED
a000b0bc <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a000b0bc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a000b0c0: e2505000 subs r5, r0, #0 <== NOT EXECUTED
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a000b0c4: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a000b0c8: 0a00001d beq a000b144 <pthread_rwlock_timedwrlock+0x88> <== NOT EXECUTED
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
a000b0cc: e1a00001 mov r0, r1 <== NOT EXECUTED
a000b0d0: e28d1004 add r1, sp, #4 <== NOT EXECUTED
a000b0d4: eb0019e3 bl a0011868 <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED
a000b0d8: e5951000 ldr r1, [r5] <== NOT EXECUTED
a000b0dc: e1a04000 mov r4, r0 <== NOT EXECUTED
a000b0e0: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a000b0e4: e59f0098 ldr r0, [pc, #152] ; a000b184 <pthread_rwlock_timedwrlock+0xc8><== NOT EXECUTED
a000b0e8: eb000a7a bl a000dad8 <_Objects_Get> <== NOT EXECUTED
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000b0ec: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a000b0f0: e3530000 cmp r3, #0 <== NOT EXECUTED
a000b0f4: 1a000012 bne a000b144 <pthread_rwlock_timedwrlock+0x88> <== NOT EXECUTED
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
a000b0f8: e5951000 ldr r1, [r5] <== NOT EXECUTED
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
a000b0fc: e3540003 cmp r4, #3 <== NOT EXECUTED
a000b100: 13a05000 movne r5, #0 <== NOT EXECUTED
a000b104: 03a05001 moveq r5, #1 <== NOT EXECUTED
a000b108: e58d3000 str r3, [sp] <== NOT EXECUTED
a000b10c: e2800010 add r0, r0, #16 <== NOT EXECUTED
a000b110: e1a02005 mov r2, r5 <== NOT EXECUTED
a000b114: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
a000b118: eb00073d bl a000ce14 <_CORE_RWLock_Obtain_for_writing> <== NOT EXECUTED
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
a000b11c: eb000d54 bl a000e674 <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( !do_wait &&
a000b120: e3550000 cmp r5, #0 <== NOT EXECUTED
a000b124: 1a000011 bne a000b170 <pthread_rwlock_timedwrlock+0xb4> <== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
a000b128: e59f3058 ldr r3, [pc, #88] ; a000b188 <pthread_rwlock_timedwrlock+0xcc><== NOT EXECUTED
a000b12c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
a000b130: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
a000b134: e3500002 cmp r0, #2 <== NOT EXECUTED
a000b138: 0a000004 beq a000b150 <pthread_rwlock_timedwrlock+0x94> <== NOT EXECUTED
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000b13c: eb000012 bl a000b18c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000b140: ea000000 b a000b148 <pthread_rwlock_timedwrlock+0x8c> <== NOT EXECUTED
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
a000b144: e3a00016 mov r0, #22 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a000b148: e28dd00c add sp, sp, #12 <== NOT EXECUTED
a000b14c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
a000b150: e3540000 cmp r4, #0 <== NOT EXECUTED
a000b154: 0afffffa beq a000b144 <pthread_rwlock_timedwrlock+0x88> <== NOT EXECUTED
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a000b158: e2444001 sub r4, r4, #1 <== NOT EXECUTED
a000b15c: e3540001 cmp r4, #1 <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
a000b160: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a000b164: 9afffff7 bls a000b148 <pthread_rwlock_timedwrlock+0x8c> <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000b168: eb000007 bl a000b18c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000b16c: eafffff5 b a000b148 <pthread_rwlock_timedwrlock+0x8c> <== NOT EXECUTED
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
a000b170: e59f3010 ldr r3, [pc, #16] ; a000b188 <pthread_rwlock_timedwrlock+0xcc><== NOT EXECUTED
a000b174: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
a000b178: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000b17c: eb000002 bl a000b18c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000b180: eafffff0 b a000b148 <pthread_rwlock_timedwrlock+0x8c> <== NOT EXECUTED
a000b19c <pthread_rwlock_tryrdlock>:
*/
int pthread_rwlock_tryrdlock(
pthread_rwlock_t *rwlock
)
{
a000b19c: e92d4010 push {r4, lr} <== NOT EXECUTED
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000b1a0: e2504000 subs r4, r0, #0 <== NOT EXECUTED
*/
int pthread_rwlock_tryrdlock(
pthread_rwlock_t *rwlock
)
{
a000b1a4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000b1a8: 0a000006 beq a000b1c8 <pthread_rwlock_tryrdlock+0x2c> <== NOT EXECUTED
a000b1ac: e28d2004 add r2, sp, #4 <== NOT EXECUTED
a000b1b0: e59f0048 ldr r0, [pc, #72] ; a000b200 <pthread_rwlock_tryrdlock+0x64><== NOT EXECUTED
a000b1b4: e5941000 ldr r1, [r4] <== NOT EXECUTED
a000b1b8: eb000a46 bl a000dad8 <_Objects_Get> <== NOT EXECUTED
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000b1bc: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
a000b1c0: e3520000 cmp r2, #0 <== NOT EXECUTED
a000b1c4: 0a000002 beq a000b1d4 <pthread_rwlock_tryrdlock+0x38> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000b1c8: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000b1cc: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000b1d0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
a000b1d4: e5941000 ldr r1, [r4] <== NOT EXECUTED
a000b1d8: e1a03002 mov r3, r2 <== NOT EXECUTED
a000b1dc: e2800010 add r0, r0, #16 <== NOT EXECUTED
a000b1e0: e58d2000 str r2, [sp] <== NOT EXECUTED
a000b1e4: eb0006d3 bl a000cd38 <_CORE_RWLock_Obtain_for_reading> <== NOT EXECUTED
0,
NULL
);
_Thread_Enable_dispatch();
a000b1e8: eb000d21 bl a000e674 <_Thread_Enable_dispatch> <== NOT EXECUTED
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
a000b1ec: e59f3010 ldr r3, [pc, #16] ; a000b204 <pthread_rwlock_tryrdlock+0x68><== NOT EXECUTED
a000b1f0: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000b1f4: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
a000b1f8: ebffffe3 bl a000b18c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000b1fc: eafffff2 b a000b1cc <pthread_rwlock_tryrdlock+0x30> <== NOT EXECUTED
a000b208 <pthread_rwlock_trywrlock>:
*/
int pthread_rwlock_trywrlock(
pthread_rwlock_t *rwlock
)
{
a000b208: e92d4010 push {r4, lr} <== NOT EXECUTED
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000b20c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
*/
int pthread_rwlock_trywrlock(
pthread_rwlock_t *rwlock
)
{
a000b210: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000b214: 0a000006 beq a000b234 <pthread_rwlock_trywrlock+0x2c> <== NOT EXECUTED
a000b218: e28d2004 add r2, sp, #4 <== NOT EXECUTED
a000b21c: e59f0048 ldr r0, [pc, #72] ; a000b26c <pthread_rwlock_trywrlock+0x64><== NOT EXECUTED
a000b220: e5941000 ldr r1, [r4] <== NOT EXECUTED
a000b224: eb000a2b bl a000dad8 <_Objects_Get> <== NOT EXECUTED
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000b228: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
a000b22c: e3520000 cmp r2, #0 <== NOT EXECUTED
a000b230: 0a000002 beq a000b240 <pthread_rwlock_trywrlock+0x38> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000b234: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000b238: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000b23c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
a000b240: e5941000 ldr r1, [r4] <== NOT EXECUTED
a000b244: e1a03002 mov r3, r2 <== NOT EXECUTED
a000b248: e2800010 add r0, r0, #16 <== NOT EXECUTED
a000b24c: e58d2000 str r2, [sp] <== NOT EXECUTED
a000b250: eb0006ef bl a000ce14 <_CORE_RWLock_Obtain_for_writing> <== NOT EXECUTED
false, /* we are not willing to wait */
0,
NULL
);
_Thread_Enable_dispatch();
a000b254: eb000d06 bl a000e674 <_Thread_Enable_dispatch> <== NOT EXECUTED
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
a000b258: e59f3010 ldr r3, [pc, #16] ; a000b270 <pthread_rwlock_trywrlock+0x68><== NOT EXECUTED
a000b25c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000b260: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
a000b264: ebffffc8 bl a000b18c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000b268: eafffff2 b a000b238 <pthread_rwlock_trywrlock+0x30> <== NOT EXECUTED
a000b274 <pthread_rwlock_unlock>:
*/
int pthread_rwlock_unlock(
pthread_rwlock_t *rwlock
)
{
a000b274: e92d4010 push {r4, lr} <== NOT EXECUTED
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
CORE_RWLock_Status status;
if ( !rwlock )
a000b278: e2503000 subs r3, r0, #0 <== NOT EXECUTED
*/
int pthread_rwlock_unlock(
pthread_rwlock_t *rwlock
)
{
a000b27c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
CORE_RWLock_Status status;
if ( !rwlock )
a000b280: 0a000006 beq a000b2a0 <pthread_rwlock_unlock+0x2c> <== NOT EXECUTED
a000b284: e5931000 ldr r1, [r3] <== NOT EXECUTED
a000b288: e59f0038 ldr r0, [pc, #56] ; a000b2c8 <pthread_rwlock_unlock+0x54><== NOT EXECUTED
a000b28c: e1a0200d mov r2, sp <== NOT EXECUTED
a000b290: eb000a10 bl a000dad8 <_Objects_Get> <== NOT EXECUTED
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000b294: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000b298: e3530000 cmp r3, #0 <== NOT EXECUTED
a000b29c: 0a000002 beq a000b2ac <pthread_rwlock_unlock+0x38> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000b2a0: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000b2a4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000b2a8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_RWLock_Release( &the_rwlock->RWLock );
a000b2ac: e2800010 add r0, r0, #16 <== NOT EXECUTED
a000b2b0: eb0006fc bl a000cea8 <_CORE_RWLock_Release> <== NOT EXECUTED
a000b2b4: e1a04000 mov r4, r0 <== NOT EXECUTED
_Thread_Enable_dispatch();
a000b2b8: eb000ced bl a000e674 <_Thread_Enable_dispatch> <== NOT EXECUTED
return _POSIX_RWLock_Translate_core_RWLock_return_code( status );
a000b2bc: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b2c0: ebffffb1 bl a000b18c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000b2c4: eafffff6 b a000b2a4 <pthread_rwlock_unlock+0x30> <== NOT EXECUTED
a000b2cc <pthread_rwlock_wrlock>:
*/
int pthread_rwlock_wrlock(
pthread_rwlock_t *rwlock
)
{
a000b2cc: e92d4010 push {r4, lr} <== NOT EXECUTED
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000b2d0: e2504000 subs r4, r0, #0 <== NOT EXECUTED
*/
int pthread_rwlock_wrlock(
pthread_rwlock_t *rwlock
)
{
a000b2d4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000b2d8: 0a000006 beq a000b2f8 <pthread_rwlock_wrlock+0x2c> <== NOT EXECUTED
a000b2dc: e59f004c ldr r0, [pc, #76] ; a000b330 <pthread_rwlock_wrlock+0x64><== NOT EXECUTED
a000b2e0: e5941000 ldr r1, [r4] <== NOT EXECUTED
a000b2e4: e28d2004 add r2, sp, #4 <== NOT EXECUTED
a000b2e8: eb0009fa bl a000dad8 <_Objects_Get> <== NOT EXECUTED
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000b2ec: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
a000b2f0: e3530000 cmp r3, #0 <== NOT EXECUTED
a000b2f4: 0a000002 beq a000b304 <pthread_rwlock_wrlock+0x38> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000b2f8: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000b2fc: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000b300: e8bd8010 pop {r4, pc} <== NOT EXECUTED
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
a000b304: e5941000 ldr r1, [r4] <== NOT EXECUTED
a000b308: e3a02001 mov r2, #1 <== NOT EXECUTED
a000b30c: e2800010 add r0, r0, #16 <== NOT EXECUTED
a000b310: e58d3000 str r3, [sp] <== NOT EXECUTED
a000b314: eb0006be bl a000ce14 <_CORE_RWLock_Obtain_for_writing> <== NOT EXECUTED
true, /* do not timeout -- wait forever */
0,
NULL
);
_Thread_Enable_dispatch();
a000b318: eb000cd5 bl a000e674 <_Thread_Enable_dispatch> <== NOT EXECUTED
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
a000b31c: e59f3010 ldr r3, [pc, #16] ; a000b334 <pthread_rwlock_wrlock+0x68><== NOT EXECUTED
a000b320: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000b324: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
a000b328: ebffff97 bl a000b18c <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000b32c: eafffff2 b a000b2fc <pthread_rwlock_wrlock+0x30> <== NOT EXECUTED
a000b8b4 <pthread_rwlockattr_destroy>:
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
a000b8b4: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000b8b8: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
a000b8bc: 012fff1e bxeq lr <== NOT EXECUTED
a000b8c0: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000b8c4: e3520000 cmp r2, #0 <== NOT EXECUTED
return EINVAL;
attr->is_initialized = false;
a000b8c8: 13a00000 movne r0, #0 <== NOT EXECUTED
a000b8cc: 15830000 strne r0, [r3] <== NOT EXECUTED
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
a000b8d0: 03a00016 moveq r0, #22 <== NOT EXECUTED
attr->is_initialized = false;
return 0;
}
a000b8d4: e12fff1e bx lr <== NOT EXECUTED
a000b8d8 <pthread_rwlockattr_getpshared>:
int pthread_rwlockattr_getpshared(
const pthread_rwlockattr_t *attr,
int *pshared
)
{
if ( !attr )
a000b8d8: e3500000 cmp r0, #0
return EINVAL;
a000b8dc: 03a00016 moveq r0, #22
int pthread_rwlockattr_getpshared(
const pthread_rwlockattr_t *attr,
int *pshared
)
{
if ( !attr )
a000b8e0: 012fff1e bxeq lr
return EINVAL;
if ( !attr->is_initialized )
a000b8e4: e5903000 ldr r3, [r0]
a000b8e8: e3530000 cmp r3, #0
return EINVAL;
*pshared = attr->process_shared;
a000b8ec: 15903004 ldrne r3, [r0, #4]
{
if ( !attr )
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
a000b8f0: 03a00016 moveq r0, #22 <== NOT EXECUTED
*pshared = attr->process_shared;
return 0;
a000b8f4: 13a00000 movne r0, #0 <== NOT EXECUTED
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
*pshared = attr->process_shared;
a000b8f8: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000b8fc: e12fff1e bx lr <== NOT EXECUTED
a000b91c <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
a000b91c: e3500000 cmp r0, #0
a000b920: 0a000008 beq a000b948 <pthread_rwlockattr_setpshared+0x2c>
return EINVAL;
if ( !attr->is_initialized )
a000b924: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000b928: e3530000 cmp r3, #0 <== NOT EXECUTED
a000b92c: 0a000005 beq a000b948 <pthread_rwlockattr_setpshared+0x2c> <== NOT EXECUTED
return EINVAL;
switch ( pshared ) {
a000b930: e3510001 cmp r1, #1 <== NOT EXECUTED
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
a000b934: 95801004 strls r1, [r0, #4] <== NOT EXECUTED
return 0;
a000b938: 93a00000 movls r0, #0 <== NOT EXECUTED
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
a000b93c: 912fff1e bxls lr <== NOT EXECUTED
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
a000b940: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a000b944: e12fff1e bx lr <== NOT EXECUTED
{
if ( !attr )
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
a000b948: e3a00016 mov r0, #22
a000b94c: e12fff1e bx lr
a0009730 <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() )
a0009730: e59f306c ldr r3, [pc, #108] ; a00097a4 <pthread_setcancelstate+0x74>
int pthread_setcancelstate(
int state,
int *oldstate
)
{
a0009734: e92d4010 push {r4, lr}
* 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() )
a0009738: e5934000 ldr r4, [r3]
int pthread_setcancelstate(
int state,
int *oldstate
)
{
a000973c: e1a02000 mov r2, r0
* 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() )
a0009740: e3540000 cmp r4, #0
a0009744: 1a000005 bne a0009760 <pthread_setcancelstate+0x30>
return EPROTO;
if ( !oldstate )
a0009748: e3510000 cmp r1, #0
a000974c: 0a000012 beq a000979c <pthread_setcancelstate+0x6c>
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
a0009750: e3500001 cmp r0, #1
a0009754: 9a000003 bls a0009768 <pthread_setcancelstate+0x38>
return EINVAL;
a0009758: e3a00016 mov r0, #22
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
a000975c: e8bd8010 pop {r4, pc}
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
a0009760: e3a00047 mov r0, #71 ; 0x47
a0009764: e8bd8010 pop {r4, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0009768: e59f0038 ldr r0, [pc, #56] ; a00097a8 <pthread_setcancelstate+0x78><== NOT EXECUTED
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a000976c: e593c004 ldr ip, [r3, #4] <== NOT EXECUTED
a0009770: e590e000 ldr lr, [r0] <== NOT EXECUTED
a0009774: e59cc0fc ldr ip, [ip, #252] ; 0xfc <== NOT EXECUTED
a0009778: e28ee001 add lr, lr, #1 <== NOT EXECUTED
a000977c: e580e000 str lr, [r0] <== NOT EXECUTED
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
a0009780: e59ce0d8 ldr lr, [ip, #216] ; 0xd8 <== NOT EXECUTED
thread_support->cancelability_state = state;
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
a0009784: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
a0009788: e581e000 str lr, [r1] <== NOT EXECUTED
thread_support->cancelability_state = state;
a000978c: e58c20d8 str r2, [ip, #216] ; 0xd8 <== NOT EXECUTED
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
a0009790: eb001621 bl a000f01c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch><== NOT EXECUTED
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
a0009794: e1a00004 mov r0, r4 <== NOT EXECUTED
a0009798: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( _ISR_Is_in_progress() )
return EPROTO;
if ( !oldstate )
return EINVAL;
a000979c: e3a00016 mov r0, #22
a00097a0: e8bd8010 pop {r4, pc}
a00097ac <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() )
a00097ac: e59f306c ldr r3, [pc, #108] ; a0009820 <pthread_setcanceltype+0x74>
int pthread_setcanceltype(
int type,
int *oldtype
)
{
a00097b0: e92d4010 push {r4, lr}
* 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() )
a00097b4: e5934000 ldr r4, [r3]
int pthread_setcanceltype(
int type,
int *oldtype
)
{
a00097b8: e1a02000 mov r2, r0
* 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() )
a00097bc: e3540000 cmp r4, #0
a00097c0: 1a000005 bne a00097dc <pthread_setcanceltype+0x30>
return EPROTO;
if ( !oldtype )
a00097c4: e3510000 cmp r1, #0
a00097c8: 0a000012 beq a0009818 <pthread_setcanceltype+0x6c>
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
a00097cc: e3500001 cmp r0, #1
a00097d0: 9a000003 bls a00097e4 <pthread_setcanceltype+0x38>
return EINVAL;
a00097d4: e3a00016 mov r0, #22
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
a00097d8: e8bd8010 pop {r4, pc}
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
a00097dc: e3a00047 mov r0, #71 ; 0x47 <== NOT EXECUTED
a00097e0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a00097e4: e59f0038 ldr r0, [pc, #56] ; a0009824 <pthread_setcanceltype+0x78><== NOT EXECUTED
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a00097e8: e593c004 ldr ip, [r3, #4] <== NOT EXECUTED
a00097ec: e590e000 ldr lr, [r0] <== NOT EXECUTED
a00097f0: e59cc0fc ldr ip, [ip, #252] ; 0xfc <== NOT EXECUTED
a00097f4: e28ee001 add lr, lr, #1 <== NOT EXECUTED
a00097f8: e580e000 str lr, [r0] <== NOT EXECUTED
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
a00097fc: e59ce0dc ldr lr, [ip, #220] ; 0xdc <== NOT EXECUTED
thread_support->cancelability_type = type;
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
a0009800: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
a0009804: e581e000 str lr, [r1] <== NOT EXECUTED
thread_support->cancelability_type = type;
a0009808: e58c20dc str r2, [ip, #220] ; 0xdc <== NOT EXECUTED
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
a000980c: eb001602 bl a000f01c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch><== NOT EXECUTED
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
a0009810: e1a00004 mov r0, r4 <== NOT EXECUTED
a0009814: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( _ISR_Is_in_progress() )
return EPROTO;
if ( !oldtype )
return EINVAL;
a0009818: e3a00016 mov r0, #22
a000981c: e8bd8010 pop {r4, pc}
a000c81c <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
a000c81c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
int rc;
/*
* Check all the parameters
*/
if ( !param )
a000c820: e2524000 subs r4, r2, #0
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
a000c824: e24dd00c sub sp, sp, #12
a000c828: e1a07000 mov r7, r0
a000c82c: e1a05001 mov r5, r1
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
a000c830: 03a06016 moveq r6, #22
int rc;
/*
* Check all the parameters
*/
if ( !param )
a000c834: 0a000006 beq a000c854 <pthread_setschedparam+0x38>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
a000c838: e1a00001 mov r0, r1
a000c83c: e28d2008 add r2, sp, #8
a000c840: e1a01004 mov r1, r4
a000c844: e28d3004 add r3, sp, #4
a000c848: eb00180f bl a001288c <_POSIX_Thread_Translate_sched_param>
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
a000c84c: e2506000 subs r6, r0, #0
a000c850: 0a000002 beq a000c860 <pthread_setschedparam+0x44>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
a000c854: e1a00006 mov r0, r6
a000c858: e28dd00c add sp, sp, #12
a000c85c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000c860: e59f00d0 ldr r0, [pc, #208] ; a000c938 <pthread_setschedparam+0x11c>
a000c864: e1a01007 mov r1, r7
a000c868: e1a0200d mov r2, sp
a000c86c: eb0007ec bl a000e824 <_Objects_Get>
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
a000c870: e59d3000 ldr r3, [sp]
a000c874: e1a08000 mov r8, r0
a000c878: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
a000c87c: 13a06003 movne r6, #3
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
a000c880: 1afffff3 bne a000c854 <pthread_setschedparam+0x38>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000c884: e59070fc ldr r7, [r0, #252] ; 0xfc
if ( api->schedpolicy == SCHED_SPORADIC )
a000c888: e5973084 ldr r3, [r7, #132] ; 0x84
a000c88c: e3530004 cmp r3, #4
a000c890: 0a000025 beq a000c92c <pthread_setschedparam+0x110>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
a000c894: e5875084 str r5, [r7, #132] ; 0x84
api->schedparam = *param;
a000c898: e287c088 add ip, r7, #136 ; 0x88
a000c89c: e8b4000f ldm r4!, {r0, r1, r2, r3}
a000c8a0: e8ac000f stmia ip!, {r0, r1, r2, r3}
the_thread->budget_algorithm = budget_algorithm;
a000c8a4: e59d3008 ldr r3, [sp, #8]
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
a000c8a8: e8940007 ldm r4, {r0, r1, r2}
a000c8ac: e88c0007 stm ip, {r0, r1, r2}
the_thread->budget_algorithm = budget_algorithm;
a000c8b0: e588307c str r3, [r8, #124] ; 0x7c
the_thread->budget_callout = budget_callout;
a000c8b4: e59d3004 ldr r3, [sp, #4]
switch ( api->schedpolicy ) {
a000c8b8: e3550000 cmp r5, #0
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
a000c8bc: e5883080 str r3, [r8, #128] ; 0x80
switch ( api->schedpolicy ) {
a000c8c0: ba00000c blt a000c8f8 <pthread_setschedparam+0xdc>
a000c8c4: e3550002 cmp r5, #2
a000c8c8: ca00000c bgt a000c900 <pthread_setschedparam+0xe4>
a000c8cc: e59f3068 ldr r3, [pc, #104] ; a000c93c <pthread_setschedparam+0x120>
a000c8d0: e5972088 ldr r2, [r7, #136] ; 0x88
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
a000c8d4: e1a00008 mov r0, r8
a000c8d8: e5d31000 ldrb r1, [r3]
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
a000c8dc: e59f305c ldr r3, [pc, #92] ; a000c940 <pthread_setschedparam+0x124>
a000c8e0: e0621001 rsb r1, r2, r1
a000c8e4: e5933000 ldr r3, [r3]
the_thread->real_priority =
a000c8e8: e5881018 str r1, [r8, #24]
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
a000c8ec: e3a02001 mov r2, #1
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
a000c8f0: e5883078 str r3, [r8, #120] ; 0x78
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
a000c8f4: eb000971 bl a000eec0 <_Thread_Change_priority>
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
a000c8f8: eb000ab0 bl a000f3c0 <_Thread_Enable_dispatch>
return 0;
a000c8fc: eaffffd4 b a000c854 <pthread_setschedparam+0x38>
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
a000c900: e3550004 cmp r5, #4
a000c904: 1afffffb bne a000c8f8 <pthread_setschedparam+0xdc>
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
a000c908: e5973088 ldr r3, [r7, #136] ; 0x88
_Watchdog_Remove( &api->Sporadic_timer );
a000c90c: e28700a8 add r0, r7, #168 ; 0xa8
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
a000c910: e58730a4 str r3, [r7, #164] ; 0xa4
_Watchdog_Remove( &api->Sporadic_timer );
a000c914: eb000f49 bl a0010640 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
a000c918: e3a00000 mov r0, #0
a000c91c: e1a01008 mov r1, r8
a000c920: ebffff71 bl a000c6ec <_POSIX_Threads_Sporadic_budget_TSR>
break;
}
_Thread_Enable_dispatch();
a000c924: eb000aa5 bl a000f3c0 <_Thread_Enable_dispatch>
a000c928: eaffffc9 b a000c854 <pthread_setschedparam+0x38>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
a000c92c: e28700a8 add r0, r7, #168 ; 0xa8
a000c930: eb000f42 bl a0010640 <_Watchdog_Remove> <== NOT EXECUTED
a000c934: eaffffd6 b a000c894 <pthread_setschedparam+0x78> <== NOT EXECUTED
a0010948 <pthread_sigmask>:
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
a0010948: e2713001 rsbs r3, r1, #1
a001094c: 33a03000 movcc r3, #0
a0010950: e3520000 cmp r2, #0
a0010954: 03510000 cmpeq r1, #0
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
a0010958: e92d4010 push {r4, lr}
POSIX_API_Control *api;
if ( !set && !oset )
a001095c: 0a000025 beq a00109f8 <pthread_sigmask+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a0010960: e59fc0c0 ldr ip, [pc, #192] ; a0010a28 <pthread_sigmask+0xe0>
if ( oset )
a0010964: e3520000 cmp r2, #0
POSIX_API_Control *api;
if ( !set && !oset )
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a0010968: e59cc004 ldr ip, [ip, #4]
a001096c: e59cc0fc ldr ip, [ip, #252] ; 0xfc
if ( oset )
*oset = api->signals_blocked;
a0010970: 159c40d0 ldrne r4, [ip, #208] ; 0xd0
a0010974: 15824000 strne r4, [r2]
if ( !set )
a0010978: e3530000 cmp r3, #0
a001097c: 1a000027 bne a0010a20 <pthread_sigmask+0xd8>
return 0;
switch ( how ) {
a0010980: e3500001 cmp r0, #1
a0010984: 0a000020 beq a0010a0c <pthread_sigmask+0xc4>
a0010988: e3500002 cmp r0, #2
a001098c: 0a00000b beq a00109c0 <pthread_sigmask+0x78>
a0010990: e3500000 cmp r0, #0 <== NOT EXECUTED
a0010994: 1a000017 bne a00109f8 <pthread_sigmask+0xb0> <== NOT EXECUTED
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
a0010998: e5911000 ldr r1, [r1] <== NOT EXECUTED
a001099c: e58c10d0 str r1, [ip, #208] ; 0xd0 <== NOT EXECUTED
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
a00109a0: e59f2084 ldr r2, [pc, #132] ; a0010a2c <pthread_sigmask+0xe4>
a00109a4: e59c30d4 ldr r3, [ip, #212] ; 0xd4
a00109a8: e5920000 ldr r0, [r2]
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
a00109ac: e1800003 orr r0, r0, r3
a00109b0: e1c00001 bic r0, r0, r1
a00109b4: e3500000 cmp r0, #0
a00109b8: 1a00000b bne a00109ec <pthread_sigmask+0xa4>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
a00109bc: e8bd8010 pop {r4, pc}
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
a00109c0: e59c30d0 ldr r3, [ip, #208] ; 0xd0
a00109c4: e5911000 ldr r1, [r1]
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
a00109c8: e59f205c ldr r2, [pc, #92] ; a0010a2c <pthread_sigmask+0xe4>
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
a00109cc: e1c31001 bic r1, r3, r1
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
a00109d0: e5920000 ldr r0, [r2]
a00109d4: e59c30d4 ldr r3, [ip, #212] ; 0xd4
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
a00109d8: e58c10d0 str r1, [ip, #208] ; 0xd0
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
a00109dc: e1800003 orr r0, r0, r3
a00109e0: e1c00001 bic r0, r0, r1
a00109e4: e3500000 cmp r0, #0
a00109e8: 0afffff3 beq a00109bc <pthread_sigmask+0x74>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
a00109ec: ebfff140 bl a000cef4 <_Thread_Dispatch>
}
return 0;
a00109f0: e3a00000 mov r0, #0
a00109f4: e8bd8010 pop {r4, pc}
break;
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a00109f8: eb000a96 bl a0013458 <__errno> <== NOT EXECUTED
a00109fc: e3a03016 mov r3, #22 <== NOT EXECUTED
a0010a00: e5803000 str r3, [r0] <== NOT EXECUTED
a0010a04: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0010a08: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
a0010a0c: e5911000 ldr r1, [r1]
a0010a10: e59c30d0 ldr r3, [ip, #208] ; 0xd0
a0010a14: e1811003 orr r1, r1, r3
a0010a18: e58c10d0 str r1, [ip, #208] ; 0xd0
break;
a0010a1c: eaffffdf b a00109a0 <pthread_sigmask+0x58>
if ( oset )
*oset = api->signals_blocked;
if ( !set )
return 0;
a0010a20: e3a00000 mov r0, #0 <== NOT EXECUTED
a0010a24: eaffffe4 b a00109bc <pthread_sigmask+0x74> <== NOT EXECUTED
a0009de4 <pthread_spin_destroy>:
*/
int pthread_spin_destroy(
pthread_spinlock_t *spinlock
)
{
a0009de4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
if ( !spinlock )
a0009de8: e2503000 subs r3, r0, #0 <== NOT EXECUTED
*/
int pthread_spin_destroy(
pthread_spinlock_t *spinlock
)
{
a0009dec: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
if ( !spinlock )
a0009df0: 0a000007 beq a0009e14 <pthread_spin_destroy+0x30> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get (
pthread_spinlock_t *spinlock,
Objects_Locations *location
)
{
return (POSIX_Spinlock_Control *) _Objects_Get(
a0009df4: e5931000 ldr r1, [r3] <== NOT EXECUTED
a0009df8: e59f005c ldr r0, [pc, #92] ; a0009e5c <pthread_spin_destroy+0x78><== NOT EXECUTED
a0009dfc: e1a0200d mov r2, sp <== NOT EXECUTED
a0009e00: eb00088c bl a000c038 <_Objects_Get> <== NOT EXECUTED
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
a0009e04: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a0009e08: e1a04000 mov r4, r0 <== NOT EXECUTED
a0009e0c: e3530000 cmp r3, #0 <== NOT EXECUTED
a0009e10: 0a000002 beq a0009e20 <pthread_spin_destroy+0x3c> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a0009e14: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a0009e18: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0009e1c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy(
CORE_spinlock_Control *the_spinlock
)
{
return (the_spinlock->users != 0);
a0009e20: e5905018 ldr r5, [r0, #24] <== NOT EXECUTED
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) {
a0009e24: e3550000 cmp r5, #0 <== NOT EXECUTED
a0009e28: 0a000002 beq a0009e38 <pthread_spin_destroy+0x54> <== NOT EXECUTED
_Thread_Enable_dispatch();
a0009e2c: eb000b68 bl a000cbd4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return EBUSY;
a0009e30: e3a00010 mov r0, #16 <== NOT EXECUTED
a0009e34: eafffff7 b a0009e18 <pthread_spin_destroy+0x34> <== NOT EXECUTED
}
_Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object );
a0009e38: e1a01000 mov r1, r0 <== NOT EXECUTED
a0009e3c: e59f0018 ldr r0, [pc, #24] ; a0009e5c <pthread_spin_destroy+0x78><== NOT EXECUTED
a0009e40: eb00076c bl a000bbf8 <_Objects_Close> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free (
POSIX_Spinlock_Control *the_spinlock
)
{
_Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object );
a0009e44: e59f0010 ldr r0, [pc, #16] ; a0009e5c <pthread_spin_destroy+0x78><== NOT EXECUTED
a0009e48: e1a01004 mov r1, r4 <== NOT EXECUTED
a0009e4c: eb000820 bl a000bed4 <_Objects_Free> <== NOT EXECUTED
_POSIX_Spinlock_Free( the_spinlock );
_Thread_Enable_dispatch();
a0009e50: eb000b5f bl a000cbd4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a0009e54: e1a00005 mov r0, r5 <== NOT EXECUTED
a0009e58: eaffffee b a0009e18 <pthread_spin_destroy+0x34> <== NOT EXECUTED
a0009e60 <pthread_spin_init>:
int pthread_spin_init(
pthread_spinlock_t *spinlock,
int pshared
)
{
a0009e60: e92d40f0 push {r4, r5, r6, r7, lr}
POSIX_Spinlock_Control *the_spinlock;
CORE_spinlock_Attributes attributes;
if ( !spinlock )
a0009e64: e2506000 subs r6, r0, #0
int pthread_spin_init(
pthread_spinlock_t *spinlock,
int pshared
)
{
a0009e68: e24dd004 sub sp, sp, #4
a0009e6c: e1a04001 mov r4, r1
POSIX_Spinlock_Control *the_spinlock;
CORE_spinlock_Attributes attributes;
if ( !spinlock )
a0009e70: 0a000018 beq a0009ed8 <pthread_spin_init+0x78>
return EINVAL;
switch ( pshared ) {
a0009e74: e3510000 cmp r1, #0
a0009e78: 1a000016 bne a0009ed8 <pthread_spin_init+0x78>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0009e7c: e59f306c ldr r3, [pc, #108] ; a0009ef0 <pthread_spin_init+0x90>
a0009e80: e5932000 ldr r2, [r3]
a0009e84: e2822001 add r2, r2, #1
a0009e88: e5832000 str r2, [r3]
* the inactive chain of free spinlock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void )
{
return (POSIX_Spinlock_Control *)
_Objects_Allocate( &_POSIX_Spinlock_Information );
a0009e8c: e59f7060 ldr r7, [pc, #96] ; a0009ef4 <pthread_spin_init+0x94>
a0009e90: e1a00007 mov r0, r7
a0009e94: eb000732 bl a000bb64 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_spinlock = _POSIX_Spinlock_Allocate();
if ( !the_spinlock ) {
a0009e98: e2505000 subs r5, r0, #0
a0009e9c: 0a000010 beq a0009ee4 <pthread_spin_init+0x84>
*/
RTEMS_INLINE_ROUTINE void _CORE_spinlock_Initialize_attributes(
CORE_spinlock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
a0009ea0: e28d1004 add r1, sp, #4
return EAGAIN;
}
_CORE_spinlock_Initialize_attributes( &attributes );
_CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes );
a0009ea4: e2850010 add r0, r5, #16
a0009ea8: e5214004 str r4, [r1, #-4]!
a0009eac: e1a0100d mov r1, sp
a0009eb0: eb00056a bl a000b460 <_CORE_spinlock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a0009eb4: e5953008 ldr r3, [r5, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0009eb8: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a0009ebc: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0009ec0: e7825721 str r5, [r2, r1, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a0009ec4: e585400c str r4, [r5, #12]
_Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 );
*spinlock = the_spinlock->Object.id;
a0009ec8: e5863000 str r3, [r6]
_Thread_Enable_dispatch();
a0009ecc: eb000b40 bl a000cbd4 <_Thread_Enable_dispatch>
return 0;
a0009ed0: e1a00004 mov r0, r4
a0009ed4: ea000000 b a0009edc <pthread_spin_init+0x7c>
switch ( pshared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
a0009ed8: e3a00016 mov r0, #22
*spinlock = the_spinlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
a0009edc: e28dd004 add sp, sp, #4
a0009ee0: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Thread_Disable_dispatch(); /* prevents deletion */
the_spinlock = _POSIX_Spinlock_Allocate();
if ( !the_spinlock ) {
_Thread_Enable_dispatch();
a0009ee4: eb000b3a bl a000cbd4 <_Thread_Enable_dispatch>
return EAGAIN;
a0009ee8: e3a0000b mov r0, #11
a0009eec: eafffffa b a0009edc <pthread_spin_init+0x7c> <== NOT EXECUTED
a0009ef8 <pthread_spin_lock>:
*/
int pthread_spin_lock(
pthread_spinlock_t *spinlock
)
{
a0009ef8: e92d4010 push {r4, lr}
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
a0009efc: e2503000 subs r3, r0, #0
*/
int pthread_spin_lock(
pthread_spinlock_t *spinlock
)
{
a0009f00: e24dd004 sub sp, sp, #4
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
a0009f04: 0a000006 beq a0009f24 <pthread_spin_lock+0x2c>
RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get (
pthread_spinlock_t *spinlock,
Objects_Locations *location
)
{
return (POSIX_Spinlock_Control *) _Objects_Get(
a0009f08: e1a0200d mov r2, sp
a0009f0c: e59f003c ldr r0, [pc, #60] ; a0009f50 <pthread_spin_lock+0x58>
a0009f10: e5931000 ldr r1, [r3]
a0009f14: eb000847 bl a000c038 <_Objects_Get>
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
a0009f18: e59d2000 ldr r2, [sp]
a0009f1c: e3520000 cmp r2, #0
a0009f20: 0a000002 beq a0009f30 <pthread_spin_lock+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a0009f24: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a0009f28: e28dd004 add sp, sp, #4
a0009f2c: e8bd8010 pop {r4, pc}
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 );
a0009f30: e3a01001 mov r1, #1
a0009f34: e2800010 add r0, r0, #16
a0009f38: eb00056b bl a000b4ec <_CORE_spinlock_Wait>
a0009f3c: e1a04000 mov r4, r0
_Thread_Enable_dispatch();
a0009f40: eb000b23 bl a000cbd4 <_Thread_Enable_dispatch>
return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
a0009f44: e1a00004 mov r0, r4
a0009f48: eb000001 bl a0009f54 <_POSIX_Spinlock_Translate_core_spinlock_return_code>
a0009f4c: eafffff5 b a0009f28 <pthread_spin_lock+0x30>
a0009f64 <pthread_spin_trylock>:
*/
int pthread_spin_trylock(
pthread_spinlock_t *spinlock
)
{
a0009f64: e92d4010 push {r4, lr}
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
a0009f68: e2503000 subs r3, r0, #0
*/
int pthread_spin_trylock(
pthread_spinlock_t *spinlock
)
{
a0009f6c: e24dd004 sub sp, sp, #4
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
a0009f70: 0a000006 beq a0009f90 <pthread_spin_trylock+0x2c>
a0009f74: e5931000 ldr r1, [r3]
a0009f78: e59f003c ldr r0, [pc, #60] ; a0009fbc <pthread_spin_trylock+0x58>
a0009f7c: e1a0200d mov r2, sp
a0009f80: eb00082c bl a000c038 <_Objects_Get>
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
a0009f84: e59d1000 ldr r1, [sp]
a0009f88: e3510000 cmp r1, #0
a0009f8c: 0a000002 beq a0009f9c <pthread_spin_trylock+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a0009f90: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a0009f94: e28dd004 add sp, sp, #4
a0009f98: e8bd8010 pop {r4, pc}
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 );
a0009f9c: e1a02001 mov r2, r1
a0009fa0: e2800010 add r0, r0, #16
a0009fa4: eb000550 bl a000b4ec <_CORE_spinlock_Wait>
a0009fa8: e1a04000 mov r4, r0
_Thread_Enable_dispatch();
a0009fac: eb000b08 bl a000cbd4 <_Thread_Enable_dispatch>
return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
a0009fb0: e1a00004 mov r0, r4
a0009fb4: ebffffe6 bl a0009f54 <_POSIX_Spinlock_Translate_core_spinlock_return_code>
a0009fb8: eafffff5 b a0009f94 <pthread_spin_trylock+0x30>
a0009fc0 <pthread_spin_unlock>:
*/
int pthread_spin_unlock(
pthread_spinlock_t *spinlock
)
{
a0009fc0: e92d4010 push {r4, lr}
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
a0009fc4: e2503000 subs r3, r0, #0
*/
int pthread_spin_unlock(
pthread_spinlock_t *spinlock
)
{
a0009fc8: e24dd004 sub sp, sp, #4
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
a0009fcc: 0a000006 beq a0009fec <pthread_spin_unlock+0x2c>
a0009fd0: e5931000 ldr r1, [r3]
a0009fd4: e59f0038 ldr r0, [pc, #56] ; a000a014 <pthread_spin_unlock+0x54>
a0009fd8: e1a0200d mov r2, sp
a0009fdc: eb000815 bl a000c038 <_Objects_Get>
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
a0009fe0: e59d3000 ldr r3, [sp]
a0009fe4: e3530000 cmp r3, #0
a0009fe8: 0a000002 beq a0009ff8 <pthread_spin_unlock+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a0009fec: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a0009ff0: e28dd004 add sp, sp, #4
a0009ff4: e8bd8010 pop {r4, pc}
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_spinlock_Release( &the_spinlock->Spinlock );
a0009ff8: e2800010 add r0, r0, #16
a0009ffc: eb00051e bl a000b47c <_CORE_spinlock_Release>
a000a000: e1a04000 mov r4, r0
_Thread_Enable_dispatch();
a000a004: eb000af2 bl a000cbd4 <_Thread_Enable_dispatch>
return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
a000a008: e1a00004 mov r0, r4
a000a00c: ebffffd0 bl a0009f54 <_POSIX_Spinlock_Translate_core_spinlock_return_code>
a000a010: eafffff6 b a0009ff0 <pthread_spin_unlock+0x30>
a000a11c <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
a000a11c: e92d4010 push {r4, lr} <== NOT EXECUTED
* 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() )
a000a120: e59f4058 ldr r4, [pc, #88] ; a000a180 <pthread_testcancel+0x64><== NOT EXECUTED
a000a124: e5943000 ldr r3, [r4] <== NOT EXECUTED
a000a128: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a12c: 1a000010 bne a000a174 <pthread_testcancel+0x58> <== NOT EXECUTED
a000a130: e59f304c ldr r3, [pc, #76] ; a000a184 <pthread_testcancel+0x68><== NOT EXECUTED
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a000a134: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
a000a138: e5931000 ldr r1, [r3] <== NOT EXECUTED
a000a13c: e59220fc ldr r2, [r2, #252] ; 0xfc <== NOT EXECUTED
a000a140: e2811001 add r1, r1, #1 <== NOT EXECUTED
a000a144: e5831000 str r1, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
a000a148: e59230d8 ldr r3, [r2, #216] ; 0xd8 <== NOT EXECUTED
a000a14c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a150: 1a000008 bne a000a178 <pthread_testcancel+0x5c> <== NOT EXECUTED
a000a154: e59230e0 ldr r3, [r2, #224] ; 0xe0 <== NOT EXECUTED
a000a158: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a15c: 0a000005 beq a000a178 <pthread_testcancel+0x5c> <== NOT EXECUTED
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
a000a160: eb000a76 bl a000cb40 <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
a000a164: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
a000a168: e3e01000 mvn r1, #0 <== NOT EXECUTED
}
a000a16c: e8bd4010 pop {r4, lr} <== NOT EXECUTED
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
a000a170: ea0017e1 b a00100fc <_POSIX_Thread_Exit> <== NOT EXECUTED
a000a174: e8bd8010 pop {r4, pc} <== NOT EXECUTED
}
a000a178: e8bd4010 pop {r4, lr} <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
a000a17c: ea000a6f b a000cb40 <_Thread_Enable_dispatch> <== NOT EXECUTED
a000ad40 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
a000ad40: e92d41f0 push {r4, r5, r6, r7, r8, lr}
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
a000ad44: e59f41c4 ldr r4, [pc, #452] ; a000af10 <rtems_aio_enqueue+0x1d0>
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
a000ad48: e24dd024 sub sp, sp, #36 ; 0x24
a000ad4c: e1a06000 mov r6, r0
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
a000ad50: e1a00004 mov r0, r4
a000ad54: eb00025a bl a000b6c4 <pthread_mutex_lock>
if (result != 0) {
a000ad58: e2505000 subs r5, r0, #0
a000ad5c: 1a00002a bne a000ae0c <rtems_aio_enqueue+0xcc>
return result;
}
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
a000ad60: eb000488 bl a000bf88 <pthread_self>
a000ad64: e28d101c add r1, sp, #28
a000ad68: e1a0200d mov r2, sp
a000ad6c: eb000383 bl a000bb80 <pthread_getschedparam>
req->caller_thread = pthread_self ();
a000ad70: eb000484 bl a000bf88 <pthread_self>
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
a000ad74: e5963014 ldr r3, [r6, #20]
a000ad78: e59dc000 ldr ip, [sp]
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
a000ad7c: e5941068 ldr r1, [r4, #104] ; 0x68
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
a000ad80: e5932014 ldr r2, [r3, #20]
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
a000ad84: e5860010 str r0, [r6, #16]
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
a000ad88: e3510000 cmp r1, #0
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
a000ad8c: e062200c rsb r2, r2, ip
a000ad90: e586200c str r2, [r6, #12]
req->policy = policy;
a000ad94: e59d201c ldr r2, [sp, #28]
a000ad98: e5862008 str r2, [r6, #8]
req->aiocbp->error_code = EINPROGRESS;
a000ad9c: e3a02077 mov r2, #119 ; 0x77
a000ada0: e5832030 str r2, [r3, #48] ; 0x30
req->aiocbp->return_value = 0;
a000ada4: e5835034 str r5, [r3, #52] ; 0x34
if ((aio_request_queue.idle_threads == 0) &&
a000ada8: 1a000002 bne a000adb8 <rtems_aio_enqueue+0x78>
a000adac: e5942064 ldr r2, [r4, #100] ; 0x64
a000adb0: e3520004 cmp r2, #4
a000adb4: da000017 ble a000ae18 <rtems_aio_enqueue+0xd8>
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
a000adb8: e59f0154 ldr r0, [pc, #340] ; a000af14 <rtems_aio_enqueue+0x1d4><== NOT EXECUTED
a000adbc: e5931000 ldr r1, [r3] <== NOT EXECUTED
a000adc0: e3a02000 mov r2, #0 <== NOT EXECUTED
a000adc4: ebfffebc bl a000a8bc <rtems_aio_search_fd> <== NOT EXECUTED
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
a000adc8: e2507000 subs r7, r0, #0 <== NOT EXECUTED
a000adcc: 0a00002e beq a000ae8c <rtems_aio_enqueue+0x14c> <== NOT EXECUTED
{
pthread_mutex_lock (&r_chain->mutex);
a000add0: e287401c add r4, r7, #28 <== NOT EXECUTED
a000add4: e1a00004 mov r0, r4 <== NOT EXECUTED
a000add8: eb000239 bl a000b6c4 <pthread_mutex_lock> <== NOT EXECUTED
rtems_aio_insert_prio (&r_chain->perfd, req);
a000addc: e2870008 add r0, r7, #8 <== NOT EXECUTED
a000ade0: e1a01006 mov r1, r6 <== NOT EXECUTED
a000ade4: ebffff8b bl a000ac18 <rtems_aio_insert_prio> <== NOT EXECUTED
pthread_cond_signal (&r_chain->cond);
a000ade8: e2870020 add r0, r7, #32 <== NOT EXECUTED
a000adec: eb00011b bl a000b260 <pthread_cond_signal> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
a000adf0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000adf4: eb000253 bl a000b748 <pthread_mutex_unlock> <== NOT EXECUTED
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
a000adf8: e59f0110 ldr r0, [pc, #272] ; a000af10 <rtems_aio_enqueue+0x1d0>
a000adfc: eb000251 bl a000b748 <pthread_mutex_unlock>
return 0;
}
a000ae00: e1a00005 mov r0, r5
a000ae04: e28dd024 add sp, sp, #36 ; 0x24
a000ae08: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
if (result != 0) {
free (req);
a000ae0c: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ae10: ebfff0c1 bl a000711c <free> <== NOT EXECUTED
return result;
a000ae14: eafffff9 b a000ae00 <rtems_aio_enqueue+0xc0> <== NOT EXECUTED
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
a000ae18: e5931000 ldr r1, [r3]
a000ae1c: e2840048 add r0, r4, #72 ; 0x48
a000ae20: e3a02001 mov r2, #1
a000ae24: ebfffea4 bl a000a8bc <rtems_aio_search_fd>
if (r_chain->new_fd == 1) {
a000ae28: e5903018 ldr r3, [r0, #24]
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
a000ae2c: e1a07000 mov r7, r0
if (r_chain->new_fd == 1) {
a000ae30: e3530001 cmp r3, #1
a000ae34: 1affffe5 bne a000add0 <rtems_aio_enqueue+0x90>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
a000ae38: e1a01006 mov r1, r6
a000ae3c: e2800008 add r0, r0, #8
a000ae40: eb00089f bl a000d0c4 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
a000ae44: e1a01005 mov r1, r5
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
if (r_chain->new_fd == 1) {
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
a000ae48: e5875018 str r5, [r7, #24]
pthread_mutex_init (&r_chain->mutex, NULL);
a000ae4c: e287001c add r0, r7, #28
a000ae50: eb0001c7 bl a000b574 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
a000ae54: e1a01005 mov r1, r5
a000ae58: e2870020 add r0, r7, #32
a000ae5c: eb0000ce bl a000b19c <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
a000ae60: e28d0020 add r0, sp, #32
a000ae64: e2841008 add r1, r4, #8
a000ae68: e59f20a8 ldr r2, [pc, #168] ; a000af18 <rtems_aio_enqueue+0x1d8>
a000ae6c: e1a03007 mov r3, r7
a000ae70: eb00029a bl a000b8e0 <pthread_create>
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
a000ae74: e2506000 subs r6, r0, #0
a000ae78: 1a000020 bne a000af00 <rtems_aio_enqueue+0x1c0>
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
++aio_request_queue.active_threads;
a000ae7c: e5943064 ldr r3, [r4, #100] ; 0x64
a000ae80: e2833001 add r3, r3, #1
a000ae84: e5843064 str r3, [r4, #100] ; 0x64
a000ae88: eaffffda b a000adf8 <rtems_aio_enqueue+0xb8>
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
a000ae8c: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
a000ae90: e59f0084 ldr r0, [pc, #132] ; a000af1c <rtems_aio_enqueue+0x1dc><== NOT EXECUTED
a000ae94: e3a02001 mov r2, #1 <== NOT EXECUTED
a000ae98: e5931000 ldr r1, [r3] <== NOT EXECUTED
a000ae9c: ebfffe86 bl a000a8bc <rtems_aio_search_fd> <== NOT EXECUTED
if (r_chain->new_fd == 1) {
a000aea0: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
a000aea4: e1a08000 mov r8, r0 <== NOT EXECUTED
if (r_chain->new_fd == 1) {
a000aea8: e3530001 cmp r3, #1 <== NOT EXECUTED
a000aeac: 0a000003 beq a000aec0 <rtems_aio_enqueue+0x180> <== NOT EXECUTED
pthread_cond_init (&r_chain->cond, NULL);
pthread_cond_signal (&aio_request_queue.new_req);
++aio_request_queue.idle_threads;
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
a000aeb0: e2800008 add r0, r0, #8 <== NOT EXECUTED
a000aeb4: e1a01006 mov r1, r6 <== NOT EXECUTED
a000aeb8: ebffff56 bl a000ac18 <rtems_aio_insert_prio> <== NOT EXECUTED
a000aebc: eaffffcd b a000adf8 <rtems_aio_enqueue+0xb8> <== NOT EXECUTED
a000aec0: e2800008 add r0, r0, #8 <== NOT EXECUTED
a000aec4: e1a01006 mov r1, r6 <== NOT EXECUTED
a000aec8: eb00087d bl a000d0c4 <_Chain_Insert> <== NOT EXECUTED
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
a000aecc: e1a01007 mov r1, r7 <== NOT EXECUTED
if (r_chain->new_fd == 1) {
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
a000aed0: e5887018 str r7, [r8, #24] <== NOT EXECUTED
pthread_mutex_init (&r_chain->mutex, NULL);
a000aed4: e288001c add r0, r8, #28 <== NOT EXECUTED
a000aed8: eb0001a5 bl a000b574 <pthread_mutex_init> <== NOT EXECUTED
pthread_cond_init (&r_chain->cond, NULL);
a000aedc: e1a01007 mov r1, r7 <== NOT EXECUTED
a000aee0: e2880020 add r0, r8, #32 <== NOT EXECUTED
a000aee4: eb0000ac bl a000b19c <pthread_cond_init> <== NOT EXECUTED
pthread_cond_signal (&aio_request_queue.new_req);
a000aee8: e59f0030 ldr r0, [pc, #48] ; a000af20 <rtems_aio_enqueue+0x1e0><== NOT EXECUTED
a000aeec: eb0000db bl a000b260 <pthread_cond_signal> <== NOT EXECUTED
++aio_request_queue.idle_threads;
a000aef0: e5943068 ldr r3, [r4, #104] ; 0x68 <== NOT EXECUTED
a000aef4: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000aef8: e5843068 str r3, [r4, #104] ; 0x68 <== NOT EXECUTED
a000aefc: eaffffbd b a000adf8 <rtems_aio_enqueue+0xb8> <== NOT EXECUTED
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
pthread_mutex_unlock (&aio_request_queue.mutex);
a000af00: e1a00004 mov r0, r4 <== NOT EXECUTED
a000af04: eb00020f bl a000b748 <pthread_mutex_unlock> <== NOT EXECUTED
return result;
a000af08: e1a05006 mov r5, r6 <== NOT EXECUTED
a000af0c: eaffffbb b a000ae00 <rtems_aio_enqueue+0xc0> <== NOT EXECUTED
a000a988 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
a000a988: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
a000a98c: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED
a000a990: e1a05000 mov r5, r0 <== NOT EXECUTED
a000a994: e280601c add r6, r0, #28 <== NOT EXECUTED
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
a000a998: e28d8028 add r8, sp, #40 ; 0x28 <== NOT EXECUTED
a000a99c: e28d7004 add r7, sp, #4 <== NOT EXECUTED
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
a000a9a0: e3e0b000 mvn fp, #0 <== NOT EXECUTED
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
req->aiocbp->error_code = 0;
a000a9a4: e3a09000 mov r9, #0 <== NOT EXECUTED
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
a000a9a8: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a9ac: eb000344 bl a000b6c4 <pthread_mutex_lock> <== NOT EXECUTED
if (result != 0)
a000a9b0: e250a000 subs sl, r0, #0 <== NOT EXECUTED
a000a9b4: 1a000021 bne a000aa40 <rtems_aio_handle+0xb8> <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000a9b8: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000a9bc: e285300c add r3, r5, #12 <== NOT EXECUTED
/* If the locked chain is not empty, take the first
request extract it, unlock the chain and process
the request, in this way the user can supply more
requests to this fd chain */
if (!rtems_chain_is_empty (chain)) {
a000a9c0: e1540003 cmp r4, r3 <== NOT EXECUTED
a000a9c4: 0a000038 beq a000aaac <rtems_aio_handle+0x124> <== NOT EXECUTED
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
a000a9c8: eb00056e bl a000bf88 <pthread_self> <== NOT EXECUTED
a000a9cc: e1a01008 mov r1, r8 <== NOT EXECUTED
a000a9d0: e1a02007 mov r2, r7 <== NOT EXECUTED
a000a9d4: eb000469 bl a000bb80 <pthread_getschedparam> <== NOT EXECUTED
param.sched_priority = req->priority;
a000a9d8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
a000a9dc: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
pthread_setschedparam (pthread_self(), req->policy, ¶m);
a000a9e0: eb000568 bl a000bf88 <pthread_self> <== NOT EXECUTED
a000a9e4: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
a000a9e8: e1a02007 mov r2, r7 <== NOT EXECUTED
a000a9ec: eb00056a bl a000bf9c <pthread_setschedparam> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
a000a9f0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a9f4: eb00099d bl a000d070 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
a000a9f8: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a9fc: eb000351 bl a000b748 <pthread_mutex_unlock> <== NOT EXECUTED
switch (req->aiocbp->aio_lio_opcode) {
a000aa00: e594a014 ldr sl, [r4, #20] <== NOT EXECUTED
a000aa04: e59a302c ldr r3, [sl, #44] ; 0x2c <== NOT EXECUTED
a000aa08: e3530002 cmp r3, #2 <== NOT EXECUTED
a000aa0c: 0a00001e beq a000aa8c <rtems_aio_handle+0x104> <== NOT EXECUTED
a000aa10: e3530003 cmp r3, #3 <== NOT EXECUTED
a000aa14: 0a000019 beq a000aa80 <rtems_aio_handle+0xf8> <== NOT EXECUTED
a000aa18: e3530001 cmp r3, #1 <== NOT EXECUTED
a000aa1c: 0a00000a beq a000aa4c <rtems_aio_handle+0xc4> <== NOT EXECUTED
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
a000aa20: e58ab034 str fp, [sl, #52] ; 0x34 <== NOT EXECUTED
req->aiocbp->error_code = errno;
a000aa24: eb0028be bl a0014d24 <__errno> <== NOT EXECUTED
a000aa28: e5903000 ldr r3, [r0] <== NOT EXECUTED
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
a000aa2c: e1a00006 mov r0, r6 <== NOT EXECUTED
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
a000aa30: e58a3030 str r3, [sl, #48] ; 0x30 <== NOT EXECUTED
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
a000aa34: eb000322 bl a000b6c4 <pthread_mutex_lock> <== NOT EXECUTED
if (result != 0)
a000aa38: e250a000 subs sl, r0, #0 <== NOT EXECUTED
a000aa3c: 0affffdd beq a000a9b8 <rtems_aio_handle+0x30> <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000aa40: e3a00000 mov r0, #0 <== NOT EXECUTED
a000aa44: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED
a000aa48: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
switch (req->aiocbp->aio_lio_opcode) {
case LIO_READ:
result = pread (req->aiocbp->aio_fildes,
a000aa4c: e59ac008 ldr ip, [sl, #8] <== NOT EXECUTED
a000aa50: e59a0000 ldr r0, [sl] <== NOT EXECUTED
a000aa54: e59a100c ldr r1, [sl, #12] <== NOT EXECUTED
a000aa58: e59a2010 ldr r2, [sl, #16] <== NOT EXECUTED
a000aa5c: e59a3004 ldr r3, [sl, #4] <== NOT EXECUTED
a000aa60: e58dc000 str ip, [sp] <== NOT EXECUTED
a000aa64: eb002bb2 bl a0015934 <pread> <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
a000aa68: e3700001 cmn r0, #1 <== NOT EXECUTED
a000aa6c: 0a000060 beq a000abf4 <rtems_aio_handle+0x26c> <== NOT EXECUTED
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
a000aa70: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
a000aa74: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED
req->aiocbp->error_code = 0;
a000aa78: e5839030 str r9, [r3, #48] ; 0x30 <== NOT EXECUTED
a000aa7c: eaffffc9 b a000a9a8 <rtems_aio_handle+0x20> <== NOT EXECUTED
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_SYNC:
result = fsync (req->aiocbp->aio_fildes);
a000aa80: e59a0000 ldr r0, [sl] <== NOT EXECUTED
a000aa84: eb001af4 bl a001165c <fsync> <== NOT EXECUTED
break;
a000aa88: eafffff6 b a000aa68 <rtems_aio_handle+0xe0> <== NOT EXECUTED
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
result = pwrite (req->aiocbp->aio_fildes,
a000aa8c: e59ac008 ldr ip, [sl, #8] <== NOT EXECUTED
a000aa90: e59a0000 ldr r0, [sl] <== NOT EXECUTED
a000aa94: e59a100c ldr r1, [sl, #12] <== NOT EXECUTED
a000aa98: e59a2010 ldr r2, [sl, #16] <== NOT EXECUTED
a000aa9c: e59a3004 ldr r3, [sl, #4] <== NOT EXECUTED
a000aaa0: e58dc000 str ip, [sp] <== NOT EXECUTED
a000aaa4: eb002bec bl a0015a5c <pwrite> <== NOT EXECUTED
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
a000aaa8: eaffffee b a000aa68 <rtems_aio_handle+0xe0> <== NOT EXECUTED
wait for a signal on chain, this will unlock the queue.
The fd chain is already unlocked */
struct timespec timeout;
pthread_mutex_unlock (&r_chain->mutex);
a000aaac: e1a00006 mov r0, r6 <== NOT EXECUTED
a000aab0: eb000324 bl a000b748 <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_lock (&aio_request_queue.mutex);
a000aab4: e59f014c ldr r0, [pc, #332] ; a000ac08 <rtems_aio_handle+0x280><== NOT EXECUTED
a000aab8: eb000301 bl a000b6c4 <pthread_mutex_lock> <== NOT EXECUTED
if (rtems_chain_is_empty (chain))
a000aabc: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
a000aac0: e1540003 cmp r4, r3 <== NOT EXECUTED
a000aac4: 1affffb7 bne a000a9a8 <rtems_aio_handle+0x20> <== NOT EXECUTED
{
clock_gettime (CLOCK_REALTIME, &timeout);
a000aac8: e28d1020 add r1, sp, #32 <== NOT EXECUTED
a000aacc: e3a00001 mov r0, #1 <== NOT EXECUTED
a000aad0: eb00015b bl a000b044 <clock_gettime> <== NOT EXECUTED
timeout.tv_sec += 3;
a000aad4: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
a000aad8: e2854020 add r4, r5, #32 <== NOT EXECUTED
a000aadc: e1a00004 mov r0, r4 <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
a000aae0: e2833003 add r3, r3, #3 <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
a000aae4: e59f111c ldr r1, [pc, #284] ; a000ac08 <rtems_aio_handle+0x280><== NOT EXECUTED
a000aae8: e28d2020 add r2, sp, #32 <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
a000aaec: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
a000aaf0: e58da024 str sl, [sp, #36] ; 0x24 <== NOT EXECUTED
result = pthread_cond_timedwait (&r_chain->cond,
a000aaf4: eb0001f3 bl a000b2c8 <pthread_cond_timedwait> <== NOT EXECUTED
&aio_request_queue.mutex, &timeout);
/* If no requests were added to the chain we delete the fd chain from
the queue and start working with idle fd chains */
if (result == ETIMEDOUT) {
a000aaf8: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED
a000aafc: 1affffa9 bne a000a9a8 <rtems_aio_handle+0x20> <== NOT EXECUTED
a000ab00: e1a00005 mov r0, r5 <== NOT EXECUTED
a000ab04: eb000959 bl a000d070 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
a000ab08: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ab0c: eb000246 bl a000b42c <pthread_mutex_destroy> <== NOT EXECUTED
pthread_cond_destroy (&r_chain->cond);
a000ab10: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ab14: eb00016c bl a000b0cc <pthread_cond_destroy> <== NOT EXECUTED
free (r_chain);
a000ab18: e1a00005 mov r0, r5 <== NOT EXECUTED
a000ab1c: ebfff17e bl a000711c <free> <== NOT EXECUTED
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
a000ab20: e59f20e0 ldr r2, [pc, #224] ; a000ac08 <rtems_aio_handle+0x280><== NOT EXECUTED
a000ab24: e5923054 ldr r3, [r2, #84] ; 0x54 <== NOT EXECUTED
a000ab28: e59f20dc ldr r2, [pc, #220] ; a000ac0c <rtems_aio_handle+0x284><== NOT EXECUTED
a000ab2c: e1530002 cmp r3, r2 <== NOT EXECUTED
a000ab30: 0a000002 beq a000ab40 <rtems_aio_handle+0x1b8> <== NOT EXECUTED
r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd;
}
else
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
a000ab34: e59f00cc ldr r0, [pc, #204] ; a000ac08 <rtems_aio_handle+0x280><== NOT EXECUTED
a000ab38: eb000302 bl a000b748 <pthread_mutex_unlock> <== NOT EXECUTED
a000ab3c: eaffff99 b a000a9a8 <rtems_aio_handle+0x20> <== NOT EXECUTED
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
a000ab40: e59f20c0 ldr r2, [pc, #192] ; a000ac08 <rtems_aio_handle+0x280><== NOT EXECUTED
clock_gettime (CLOCK_REALTIME, &timeout);
a000ab44: e3a00001 mov r0, #1 <== NOT EXECUTED
a000ab48: e28d1020 add r1, sp, #32 <== NOT EXECUTED
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
a000ab4c: e5923068 ldr r3, [r2, #104] ; 0x68 <== NOT EXECUTED
a000ab50: e0833000 add r3, r3, r0 <== NOT EXECUTED
a000ab54: e5823068 str r3, [r2, #104] ; 0x68 <== NOT EXECUTED
clock_gettime (CLOCK_REALTIME, &timeout);
a000ab58: eb000139 bl a000b044 <clock_gettime> <== NOT EXECUTED
timeout.tv_sec += 3;
a000ab5c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
a000ab60: e59f00a8 ldr r0, [pc, #168] ; a000ac10 <rtems_aio_handle+0x288><== NOT EXECUTED
a000ab64: e59f109c ldr r1, [pc, #156] ; a000ac08 <rtems_aio_handle+0x280><== NOT EXECUTED
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
a000ab68: e2833003 add r3, r3, #3 <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
a000ab6c: e28d2020 add r2, sp, #32 <== NOT EXECUTED
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
a000ab70: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
a000ab74: e58da024 str sl, [sp, #36] ; 0x24 <== NOT EXECUTED
result = pthread_cond_timedwait (&aio_request_queue.new_req,
a000ab78: eb0001d2 bl a000b2c8 <pthread_cond_timedwait> <== NOT EXECUTED
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
a000ab7c: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED
a000ab80: 0a00001d beq a000abfc <rtems_aio_handle+0x274> <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000ab84: e59f307c ldr r3, [pc, #124] ; a000ac08 <rtems_aio_handle+0x280><== NOT EXECUTED
return NULL;
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
--aio_request_queue.idle_threads;
a000ab88: e59f2078 ldr r2, [pc, #120] ; a000ac08 <rtems_aio_handle+0x280><== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000ab8c: e5934054 ldr r4, [r3, #84] ; 0x54 <== NOT EXECUTED
return NULL;
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
--aio_request_queue.idle_threads;
a000ab90: e5933068 ldr r3, [r3, #104] ; 0x68 <== NOT EXECUTED
a000ab94: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ab98: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a000ab9c: e5823068 str r3, [r2, #104] ; 0x68 <== NOT EXECUTED
a000aba0: eb000932 bl a000d070 <_Chain_Extract> <== NOT EXECUTED
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
a000aba4: e3a02001 mov r2, #1 <== NOT EXECUTED
a000aba8: e5941014 ldr r1, [r4, #20] <== NOT EXECUTED
a000abac: e59f0060 ldr r0, [pc, #96] ; a000ac14 <rtems_aio_handle+0x28c><== NOT EXECUTED
a000abb0: ebffff41 bl a000a8bc <rtems_aio_search_fd> <== NOT EXECUTED
((rtems_aio_request_chain *)node)->fildes,
1);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
a000abb4: e280601c add r6, r0, #28 <== NOT EXECUTED
/* Otherwise move this chain to the working chain and
start the loop all over again */
--aio_request_queue.idle_threads;
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
a000abb8: e1a05000 mov r5, r0 <== NOT EXECUTED
((rtems_aio_request_chain *)node)->fildes,
1);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
a000abbc: e1a0100a mov r1, sl <== NOT EXECUTED
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
((rtems_aio_request_chain *)node)->fildes,
1);
r_chain->new_fd = 0;
a000abc0: e580a018 str sl, [r0, #24] <== NOT EXECUTED
pthread_mutex_init (&r_chain->mutex, NULL);
a000abc4: e1a00006 mov r0, r6 <== NOT EXECUTED
a000abc8: eb000269 bl a000b574 <pthread_mutex_init> <== NOT EXECUTED
pthread_cond_init (&r_chain->cond, NULL);
a000abcc: e2850020 add r0, r5, #32 <== NOT EXECUTED
a000abd0: e1a0100a mov r1, sl <== NOT EXECUTED
a000abd4: eb000170 bl a000b19c <pthread_cond_init> <== NOT EXECUTED
r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd;
a000abd8: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a000abdc: e5853008 str r3, [r5, #8] <== NOT EXECUTED
a000abe0: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
a000abe4: e585300c str r3, [r5, #12] <== NOT EXECUTED
a000abe8: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
a000abec: e5853010 str r3, [r5, #16] <== NOT EXECUTED
a000abf0: eaffff6c b a000a9a8 <rtems_aio_handle+0x20> <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
a000abf4: e594a014 ldr sl, [r4, #20] <== NOT EXECUTED
a000abf8: eaffff88 b a000aa20 <rtems_aio_handle+0x98> <== NOT EXECUTED
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
pthread_mutex_unlock (&aio_request_queue.mutex);
a000abfc: e59f0004 ldr r0, [pc, #4] ; a000ac08 <rtems_aio_handle+0x280><== NOT EXECUTED
a000ac00: eb0002d0 bl a000b748 <pthread_mutex_unlock> <== NOT EXECUTED
return NULL;
a000ac04: eaffff8d b a000aa40 <rtems_aio_handle+0xb8> <== NOT EXECUTED
a000a7b8 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
a000a7b8: e92d4070 push {r4, r5, r6, lr}
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
a000a7bc: e59f00e8 ldr r0, [pc, #232] ; a000a8ac <rtems_aio_init+0xf4>
a000a7c0: eb000426 bl a000b860 <pthread_attr_init>
if (result != 0)
a000a7c4: e2505000 subs r5, r0, #0
a000a7c8: 0a000001 beq a000a7d4 <rtems_aio_init+0x1c>
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
return result;
}
a000a7cc: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a7d0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
result = pthread_attr_init (&aio_request_queue.attr);
if (result != 0)
return result;
result =
a000a7d4: e59f00d0 ldr r0, [pc, #208] ; a000a8ac <rtems_aio_init+0xf4>
a000a7d8: e1a01005 mov r1, r5
a000a7dc: eb000432 bl a000b8ac <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
a000a7e0: e3500000 cmp r0, #0
a000a7e4: 1a00001c bne a000a85c <rtems_aio_init+0xa4>
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
a000a7e8: e59f40c0 ldr r4, [pc, #192] ; a000a8b0 <rtems_aio_init+0xf8>
a000a7ec: e3a01000 mov r1, #0
a000a7f0: e1a00004 mov r0, r4
a000a7f4: eb00035e bl a000b574 <pthread_mutex_init>
if (result != 0)
a000a7f8: e3500000 cmp r0, #0
a000a7fc: 1a00001e bne a000a87c <rtems_aio_init+0xc4>
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
a000a800: e59f00ac ldr r0, [pc, #172] ; a000a8b4 <rtems_aio_init+0xfc>
a000a804: e3a01000 mov r1, #0
a000a808: eb000263 bl a000b19c <pthread_cond_init>
if (result != 0) {
a000a80c: e2505000 subs r5, r0, #0
a000a810: 1a000020 bne a000a898 <rtems_aio_init+0xe0>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a000a814: e59f209c ldr r2, [pc, #156] ; a000a8b8 <rtems_aio_init+0x100>
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
a000a818: e3a01a0b mov r1, #45056 ; 0xb000
head->previous = NULL;
a000a81c: e3a03000 mov r3, #0
tail->previous = head;
a000a820: e2820008 add r0, r2, #8
a000a824: e2426004 sub r6, r2, #4
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a000a828: e282c00c add ip, r2, #12
a000a82c: e281100b add r1, r1, #11
head->previous = NULL;
tail->previous = head;
a000a830: e584005c str r0, [r4, #92] ; 0x5c
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a000a834: e5842048 str r2, [r4, #72] ; 0x48
head->previous = NULL;
a000a838: e584304c str r3, [r4, #76] ; 0x4c
tail->previous = head;
a000a83c: e5846050 str r6, [r4, #80] ; 0x50
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a000a840: e584c054 str ip, [r4, #84] ; 0x54
head->previous = NULL;
a000a844: e5843058 str r3, [r4, #88] ; 0x58
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
a000a848: e5843064 str r3, [r4, #100] ; 0x64
aio_request_queue.idle_threads = 0;
a000a84c: e5843068 str r3, [r4, #104] ; 0x68
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
a000a850: e5841060 str r1, [r4, #96] ; 0x60
return result;
}
a000a854: e1a00005 mov r0, r5
a000a858: e8bd8070 pop {r4, r5, r6, pc}
PTHREAD_CREATE_DETACHED);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
a000a85c: e59f404c ldr r4, [pc, #76] ; a000a8b0 <rtems_aio_init+0xf8><== NOT EXECUTED
result =
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
a000a860: e59f0044 ldr r0, [pc, #68] ; a000a8ac <rtems_aio_init+0xf4><== NOT EXECUTED
a000a864: eb0003f4 bl a000b83c <pthread_attr_destroy> <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
a000a868: e3a01000 mov r1, #0 <== NOT EXECUTED
a000a86c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a870: eb00033f bl a000b574 <pthread_mutex_init> <== NOT EXECUTED
if (result != 0)
a000a874: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a878: 0affffe0 beq a000a800 <rtems_aio_init+0x48> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
a000a87c: e2840008 add r0, r4, #8 <== NOT EXECUTED
a000a880: eb0003ed bl a000b83c <pthread_attr_destroy> <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
a000a884: e59f0028 ldr r0, [pc, #40] ; a000a8b4 <rtems_aio_init+0xfc><== NOT EXECUTED
a000a888: e3a01000 mov r1, #0 <== NOT EXECUTED
a000a88c: eb000242 bl a000b19c <pthread_cond_init> <== NOT EXECUTED
if (result != 0) {
a000a890: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a000a894: 0affffde beq a000a814 <rtems_aio_init+0x5c> <== NOT EXECUTED
pthread_mutex_destroy (&aio_request_queue.mutex);
a000a898: e59f0010 ldr r0, [pc, #16] ; a000a8b0 <rtems_aio_init+0xf8><== NOT EXECUTED
a000a89c: eb0002e2 bl a000b42c <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
a000a8a0: e59f0004 ldr r0, [pc, #4] ; a000a8ac <rtems_aio_init+0xf4> <== NOT EXECUTED
a000a8a4: eb0003e4 bl a000b83c <pthread_attr_destroy> <== NOT EXECUTED
a000a8a8: eaffffd9 b a000a814 <rtems_aio_init+0x5c> <== NOT EXECUTED
a000ac18 <rtems_aio_insert_prio>:
* NONE
*/
void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
a000ac18: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000ac1c: e1a03000 mov r3, r0 <== NOT EXECUTED
a000ac20: e4932004 ldr r2, [r3], #4 <== NOT EXECUTED
* NONE
*/
void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
a000ac24: e1a0c001 mov ip, r1 <== NOT EXECUTED
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
a000ac28: e1520003 cmp r2, r3 <== NOT EXECUTED
a000ac2c: 0a000012 beq a000ac7c <rtems_aio_insert_prio+0x64> <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
a000ac30: e5910014 ldr r0, [r1, #20] <== NOT EXECUTED
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
a000ac34: e5921014 ldr r1, [r2, #20] <== NOT EXECUTED
while (req->aiocbp->aio_reqprio > prio &&
a000ac38: e5904014 ldr r4, [r0, #20] <== NOT EXECUTED
a000ac3c: e5911014 ldr r1, [r1, #20] <== NOT EXECUTED
a000ac40: e1510004 cmp r1, r4 <== NOT EXECUTED
a000ac44: a1a03002 movge r3, r2 <== NOT EXECUTED
a000ac48: ba000002 blt a000ac58 <rtems_aio_insert_prio+0x40> <== NOT EXECUTED
a000ac4c: ea000008 b a000ac74 <rtems_aio_insert_prio+0x5c> <== NOT EXECUTED
a000ac50: e1510003 cmp r1, r3 <== NOT EXECUTED
a000ac54: 0a000006 beq a000ac74 <rtems_aio_insert_prio+0x5c> <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000ac58: e5921000 ldr r1, [r2] <== NOT EXECUTED
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
a000ac5c: e5910014 ldr r0, [r1, #20] <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
a000ac60: e1a02001 mov r2, r1 <== NOT EXECUTED
a000ac64: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED
a000ac68: e1500004 cmp r0, r4 <== NOT EXECUTED
a000ac6c: bafffff7 blt a000ac50 <rtems_aio_insert_prio+0x38> <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000ac70: e1a03001 mov r3, r1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
a000ac74: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
a000ac78: e1a0100c mov r1, ip <== NOT EXECUTED
}
rtems_chain_insert (node->previous, &req->next_prio);
}
}
a000ac7c: e8bd0010 pop {r4} <== NOT EXECUTED
a000ac80: ea00090f b a000d0c4 <_Chain_Insert> <== NOT EXECUTED
a000ac84 <rtems_aio_remove_fd>:
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
a000ac84: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000ac88: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
a000ac8c: e280600c add r6, r0, #12 <== NOT EXECUTED
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
a000ac90: e1540006 cmp r4, r6 <== NOT EXECUTED
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
a000ac94: 13a0808c movne r8, #140 ; 0x8c <== NOT EXECUTED
req->aiocbp->return_value = -1;
a000ac98: 13e07000 mvnne r7, #0 <== NOT EXECUTED
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
a000ac9c: 1a000001 bne a000aca8 <rtems_aio_remove_fd+0x24> <== NOT EXECUTED
a000aca0: ea00000a b a000acd0 <rtems_aio_remove_fd+0x4c> <== NOT EXECUTED
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
a000aca4: e1a04005 mov r4, r5 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
a000aca8: e1a00004 mov r0, r4 <== NOT EXECUTED
a000acac: eb0008ef bl a000d070 <_Chain_Extract> <== NOT EXECUTED
req->aiocbp->error_code = ECANCELED;
a000acb0: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000acb4: e5945000 ldr r5, [r4] <== NOT EXECUTED
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
req->aiocbp->return_value = -1;
free (req);
a000acb8: e1a00004 mov r0, r4 <== NOT EXECUTED
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
a000acbc: e5838030 str r8, [r3, #48] ; 0x30 <== NOT EXECUTED
req->aiocbp->return_value = -1;
a000acc0: e5837034 str r7, [r3, #52] ; 0x34 <== NOT EXECUTED
free (req);
a000acc4: ebfff114 bl a000711c <free> <== NOT EXECUTED
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
a000acc8: e1550006 cmp r5, r6 <== NOT EXECUTED
a000accc: 1afffff4 bne a000aca4 <rtems_aio_remove_fd+0x20> <== NOT EXECUTED
a000acd0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a000acd4 <rtems_aio_remove_req>:
* AIO_NOTCANCELED - if request was not canceled
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
a000acd4: e92d4010 push {r4, lr} <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000acd8: e4903004 ldr r3, [r0], #4 <== NOT EXECUTED
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
a000acdc: e1530000 cmp r3, r0 <== NOT EXECUTED
a000ace0: 1a000003 bne a000acf4 <rtems_aio_remove_req+0x20> <== NOT EXECUTED
a000ace4: ea000013 b a000ad38 <rtems_aio_remove_req+0x64> <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000ace8: e5933000 ldr r3, [r3] <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
a000acec: e1530000 cmp r3, r0 <== NOT EXECUTED
a000acf0: 0a00000e beq a000ad30 <rtems_aio_remove_req+0x5c> <== NOT EXECUTED
a000acf4: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED
return AIO_ALLDONE;
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
a000acf8: e1a04003 mov r4, r3 <== NOT EXECUTED
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
a000acfc: e1520001 cmp r2, r1 <== NOT EXECUTED
a000ad00: 1afffff8 bne a000ace8 <rtems_aio_remove_req+0x14> <== NOT EXECUTED
a000ad04: e1a00003 mov r0, r3 <== NOT EXECUTED
a000ad08: eb0008d8 bl a000d070 <_Chain_Extract> <== NOT EXECUTED
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
a000ad0c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
a000ad10: e3a0208c mov r2, #140 ; 0x8c <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
a000ad14: e1a00004 mov r0, r4 <== NOT EXECUTED
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
a000ad18: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED
current->aiocbp->return_value = -1;
a000ad1c: e3e02000 mvn r2, #0 <== NOT EXECUTED
a000ad20: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED
free (current);
a000ad24: ebfff0fc bl a000711c <free> <== NOT EXECUTED
}
return AIO_CANCELED;
a000ad28: e3a00000 mov r0, #0 <== NOT EXECUTED
a000ad2c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
a000ad30: e3a00001 mov r0, #1 <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
a000ad34: e8bd8010 pop {r4, pc} <== NOT EXECUTED
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
return AIO_ALLDONE;
a000ad38: e3a00002 mov r0, #2 <== NOT EXECUTED
a000ad3c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000a8bc <rtems_aio_search_fd>:
*
*/
rtems_aio_request_chain *
rtems_aio_search_fd (rtems_chain_control *chain, int fildes, int create)
{
a000a8bc: e92d41f0 push {r4, r5, r6, r7, r8, lr}
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000a8c0: e5904000 ldr r4, [r0]
*
*/
rtems_aio_request_chain *
rtems_aio_search_fd (rtems_chain_control *chain, int fildes, int create)
{
a000a8c4: e1a06000 mov r6, r0
a000a8c8: e1a05001 mov r5, r1
rtems_chain_node *node;
node = rtems_chain_first (chain);
r_chain = (rtems_aio_request_chain *) node;
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
a000a8cc: e5943014 ldr r3, [r4, #20]
a000a8d0: e1510003 cmp r1, r3
a000a8d4: da000020 ble a000a95c <rtems_aio_search_fd+0xa0>
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
a000a8d8: e2801004 add r1, r0, #4 <== NOT EXECUTED
a000a8dc: ea000003 b a000a8f0 <rtems_aio_search_fd+0x34> <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000a8e0: e5944000 ldr r4, [r4] <== NOT EXECUTED
rtems_chain_node *node;
node = rtems_chain_first (chain);
r_chain = (rtems_aio_request_chain *) node;
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
a000a8e4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
a000a8e8: e1530005 cmp r3, r5 <== NOT EXECUTED
a000a8ec: aa00001a bge a000a95c <rtems_aio_search_fd+0xa0> <== NOT EXECUTED
a000a8f0: e1540001 cmp r4, r1 <== NOT EXECUTED
a000a8f4: 1afffff9 bne a000a8e0 <rtems_aio_search_fd+0x24> <== NOT EXECUTED
a000a8f8: e1a08004 mov r8, r4 <== NOT EXECUTED
}
if (r_chain->fildes == fildes)
r_chain->new_fd = 0;
else {
if (create == 0)
a000a8fc: e3520000 cmp r2, #0
r_chain = NULL;
a000a900: 01a04002 moveq r4, r2
}
if (r_chain->fildes == fildes)
r_chain->new_fd = 0;
else {
if (create == 0)
a000a904: 0a000019 beq a000a970 <rtems_aio_search_fd+0xb4>
r_chain = NULL;
else {
r_chain = malloc (sizeof (rtems_aio_request_chain));
a000a908: e3a00024 mov r0, #36 ; 0x24
a000a90c: ebfff3b0 bl a00077d4 <malloc>
a000a910: e1a07000 mov r7, r0
rtems_chain_initialize_empty (&r_chain->perfd);
if (rtems_chain_is_empty (chain))
a000a914: e5960000 ldr r0, [r6]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
a000a918: e287200c add r2, r7, #12
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000a91c: e2861004 add r1, r6, #4
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
a000a920: e2873008 add r3, r7, #8
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a000a924: e5872008 str r2, [r7, #8]
a000a928: e1500001 cmp r0, r1
head->previous = NULL;
a000a92c: e3a02000 mov r2, #0
r_chain->new_fd = 0;
else {
if (create == 0)
r_chain = NULL;
else {
r_chain = malloc (sizeof (rtems_aio_request_chain));
a000a930: e1a04007 mov r4, r7
a000a934: e587200c str r2, [r7, #12]
tail->previous = head;
a000a938: e5873010 str r3, [r7, #16]
rtems_chain_initialize_empty (&r_chain->perfd);
if (rtems_chain_is_empty (chain))
a000a93c: 0a00000d beq a000a978 <rtems_aio_search_fd+0xbc>
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
a000a940: e5980004 ldr r0, [r8, #4] <== NOT EXECUTED
a000a944: e1a01007 mov r1, r7 <== NOT EXECUTED
a000a948: eb0009dd bl a000d0c4 <_Chain_Insert> <== NOT EXECUTED
rtems_chain_prepend (chain, &r_chain->next_fd);
else
rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd);
r_chain->new_fd = 1;
a000a94c: e3a03001 mov r3, #1
a000a950: e5873018 str r3, [r7, #24]
r_chain->fildes = fildes;
a000a954: e5875014 str r5, [r7, #20]
a000a958: ea000004 b a000a970 <rtems_aio_search_fd+0xb4>
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
r_chain = (rtems_aio_request_chain *) node;
}
if (r_chain->fildes == fildes)
a000a95c: e1550003 cmp r5, r3
r_chain->new_fd = 0;
a000a960: 03a03000 moveq r3, #0
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000a964: e1a08004 mov r8, r4
node = rtems_chain_next (node);
r_chain = (rtems_aio_request_chain *) node;
}
if (r_chain->fildes == fildes)
r_chain->new_fd = 0;
a000a968: 05843018 streq r3, [r4, #24]
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
r_chain = (rtems_aio_request_chain *) node;
}
if (r_chain->fildes == fildes)
a000a96c: 1affffe2 bne a000a8fc <rtems_aio_search_fd+0x40>
r_chain->new_fd = 1;
r_chain->fildes = fildes;
}
}
return r_chain;
}
a000a970: e1a00004 mov r0, r4
a000a974: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
a000a978: e1a00006 mov r0, r6
a000a97c: e1a01007 mov r1, r7
a000a980: eb0009cf bl a000d0c4 <_Chain_Insert>
a000a984: eafffff0 b a000a94c <rtems_aio_search_fd+0x90>
a000b780 <rtems_build_id>:
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a000b780: e1a00c00 lsl r0, r0, #24 <== NOT EXECUTED
a000b784: e1800d81 orr r0, r0, r1, lsl #27 <== NOT EXECUTED
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a000b788: e1800003 orr r0, r0, r3 <== NOT EXECUTED
uint32_t node,
uint32_t index
)
{
return _Objects_Build_id( api, class, node, index );
}
a000b78c: e1800802 orr r0, r0, r2, lsl #16 <== NOT EXECUTED
a000b790: e12fff1e bx lr <== NOT EXECUTED
a000b794 <rtems_build_name>:
char C1,
char C2,
char C3,
char C4
)
{
a000b794: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
a000b798: e1a02402 lsl r2, r2, #8 <== NOT EXECUTED
return _Objects_Build_name( C1, C2, C3, C4 );
a000b79c: e20118ff and r1, r1, #16711680 ; 0xff0000 <== NOT EXECUTED
a000b7a0: e1811c00 orr r1, r1, r0, lsl #24 <== NOT EXECUTED
a000b7a4: e2022cff and r2, r2, #65280 ; 0xff00 <== NOT EXECUTED
char C1,
char C2,
char C3,
char C4
)
{
a000b7a8: e20330ff and r3, r3, #255 ; 0xff <== NOT EXECUTED
return _Objects_Build_name( C1, C2, C3, C4 );
a000b7ac: e1811002 orr r1, r1, r2 <== NOT EXECUTED
}
a000b7b0: e1810003 orr r0, r1, r3 <== NOT EXECUTED
a000b7b4: e12fff1e bx lr <== NOT EXECUTED
a000a848 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a000a848: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000a84c: e1a04002 mov r4, r2 <== NOT EXECUTED
a000a850: e1a05003 mov r5, r3 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Append_with_empty_check( chain, node );
a000a854: eb000149 bl a000ad80 <_Chain_Append_with_empty_check> <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
a000a858: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a85c: 1a000000 bne a000a864 <rtems_chain_append_with_notification+0x1c><== NOT EXECUTED
sc = rtems_event_send( task, events );
}
return sc;
}
a000a860: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
a000a864: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a868: e1a01005 mov r1, r5 <== NOT EXECUTED
}
return sc;
}
a000a86c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
a000a870: eafffd86 b a0009e90 <rtems_event_send> <== NOT EXECUTED
a000a874 <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
a000a874: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000a878: e1a04001 mov r4, r1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node **node
)
{
return _Chain_Get_with_empty_check( chain, node );
a000a87c: e1a01003 mov r1, r3 <== NOT EXECUTED
a000a880: e1a05002 mov r5, r2 <== NOT EXECUTED
a000a884: eb000160 bl a000ae0c <_Chain_Get_with_empty_check> <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
a000a888: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a88c: 1a000000 bne a000a894 <rtems_chain_get_with_notification+0x20><== NOT EXECUTED
sc = rtems_event_send( task, events );
}
return sc;
}
a000a890: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
a000a894: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a898: e1a01005 mov r1, r5 <== NOT EXECUTED
}
return sc;
}
a000a89c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
a000a8a0: eafffd7a b a0009e90 <rtems_event_send> <== NOT EXECUTED
a000a8a4 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
a000a8a4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
a000a8a8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000a8ac: e1a07000 mov r7, r0 <== NOT EXECUTED
a000a8b0: e1a06001 mov r6, r1 <== NOT EXECUTED
a000a8b4: e1a05002 mov r5, r2 <== NOT EXECUTED
a000a8b8: e1a0a003 mov sl, r3 <== NOT EXECUTED
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
a000a8bc: e1a0800d mov r8, sp <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
a000a8c0: e1a00007 mov r0, r7 <== NOT EXECUTED
a000a8c4: eb000165 bl a000ae60 <_Chain_Get> <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
a000a8c8: e2504000 subs r4, r0, #0 <== NOT EXECUTED
) {
rtems_event_set out;
sc = rtems_event_receive(
a000a8cc: e1a02005 mov r2, r5 <== NOT EXECUTED
a000a8d0: e1a0300d mov r3, sp <== NOT EXECUTED
a000a8d4: e1a01004 mov r1, r4 <== NOT EXECUTED
a000a8d8: e1a00006 mov r0, r6 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
a000a8dc: 1a000005 bne a000a8f8 <rtems_chain_get_with_wait+0x54> <== NOT EXECUTED
) {
rtems_event_set out;
sc = rtems_event_receive(
a000a8e0: ebfffd0d bl a0009d1c <rtems_event_receive> <== NOT EXECUTED
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
a000a8e4: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a8e8: 0afffff4 beq a000a8c0 <rtems_chain_get_with_wait+0x1c> <== NOT EXECUTED
timeout,
&out
);
}
*node_ptr = node;
a000a8ec: e58a4000 str r4, [sl] <== NOT EXECUTED
return sc;
}
a000a8f0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000a8f4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
a000a8f8: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a8fc: eafffffa b a000a8ec <rtems_chain_get_with_wait+0x48> <== NOT EXECUTED
a000a900 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a000a900: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000a904: e1a04002 mov r4, r2 <== NOT EXECUTED
a000a908: e1a05003 mov r5, r3 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Prepend_with_empty_check( chain, node );
a000a90c: eb00016a bl a000aebc <_Chain_Prepend_with_empty_check> <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
a000a910: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a914: 1a000000 bne a000a91c <rtems_chain_prepend_with_notification+0x1c><== NOT EXECUTED
sc = rtems_event_send( task, events );
}
return sc;
}
a000a918: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
a000a91c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a920: e1a01005 mov r1, r5 <== NOT EXECUTED
}
return sc;
}
a000a924: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
a000a928: eafffd58 b a0009e90 <rtems_event_send> <== NOT EXECUTED
a0016d98 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
a0016d98: e92d4010 push {r4, lr}
if ( !time_buffer )
a0016d9c: e2514000 subs r4, r1, #0
a0016da0: 0a000012 beq a0016df0 <rtems_clock_get+0x58>
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
a0016da4: e3500000 cmp r0, #0
a0016da8: 0a00000d beq a0016de4 <rtems_clock_get+0x4c>
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
a0016dac: e3500001 cmp r0, #1
a0016db0: 0a000011 beq a0016dfc <rtems_clock_get+0x64>
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
a0016db4: e3500002 cmp r0, #2
a0016db8: 0a000012 beq a0016e08 <rtems_clock_get+0x70>
*interval = rtems_clock_get_ticks_since_boot();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
a0016dbc: e3500003 cmp r0, #3
a0016dc0: 0a000014 beq a0016e18 <rtems_clock_get+0x80>
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
a0016dc4: e3500004 cmp r0, #4 <== NOT EXECUTED
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
a0016dc8: 13a0300a movne r3, #10 <== NOT EXECUTED
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
a0016dcc: 0a000001 beq a0016dd8 <rtems_clock_get+0x40> <== NOT EXECUTED
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
a0016dd0: e1a00003 mov r0, r3
a0016dd4: e8bd8010 pop {r4, pc}
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
a0016dd8: e1a00004 mov r0, r4 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
}
a0016ddc: e8bd4010 pop {r4, lr} <== NOT EXECUTED
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
a0016de0: ea000060 b a0016f68 <rtems_clock_get_tod_timeval> <== NOT EXECUTED
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
a0016de4: e1a00004 mov r0, r4
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
a0016de8: e8bd4010 pop {r4, lr}
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
a0016dec: ea000027 b a0016e90 <rtems_clock_get_tod>
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
a0016df0: e3a03009 mov r3, #9
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
a0016df4: e1a00003 mov r0, r3
a0016df8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
a0016dfc: e1a00004 mov r0, r4
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
a0016e00: e8bd4010 pop {r4, lr}
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
a0016e04: ea000007 b a0016e28 <rtems_clock_get_seconds_since_epoch>
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
a0016e08: eb00001c bl a0016e80 <rtems_clock_get_ticks_since_boot>
return RTEMS_SUCCESSFUL;
a0016e0c: e3a03000 mov r3, #0
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
a0016e10: e5840000 str r0, [r4]
return RTEMS_SUCCESSFUL;
a0016e14: eaffffed b a0016dd0 <rtems_clock_get+0x38>
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
a0016e18: eb000010 bl a0016e60 <rtems_clock_get_ticks_per_second>
return RTEMS_SUCCESSFUL;
a0016e1c: e3a03000 mov r3, #0
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
a0016e20: e5840000 str r0, [r4]
return RTEMS_SUCCESSFUL;
a0016e24: eaffffe9 b a0016dd0 <rtems_clock_get+0x38>
a0016f68 <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
a0016f68: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
if ( !time )
a0016f6c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
a0016f70: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
if ( !time )
return RTEMS_INVALID_ADDRESS;
a0016f74: 03a00009 moveq r0, #9 <== NOT EXECUTED
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
if ( !time )
a0016f78: 0a000012 beq a0016fc8 <rtems_clock_get_tod_timeval+0x60> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
a0016f7c: e59f304c ldr r3, [pc, #76] ; a0016fd0 <rtems_clock_get_tod_timeval+0x68><== NOT EXECUTED
a0016f80: e5d33000 ldrb r3, [r3] <== NOT EXECUTED
a0016f84: e3530000 cmp r3, #0 <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
a0016f88: 03a0000b moveq r0, #11 <== NOT EXECUTED
)
{
if ( !time )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
a0016f8c: 0a00000d beq a0016fc8 <rtems_clock_get_tod_timeval+0x60> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0016f90: e10f5000 mrs r5, CPSR <== NOT EXECUTED
a0016f94: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED
a0016f98: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
a0016f9c: e1a0000d mov r0, sp <== NOT EXECUTED
a0016fa0: eb00120c bl a001b7d8 <_TOD_Get> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0016fa4: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
a0016fa8: e59f2024 ldr r2, [pc, #36] ; a0016fd4 <rtems_clock_get_tod_timeval+0x6c><== NOT EXECUTED
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
a0016fac: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
a0016fb0: e3a00000 mov r0, #0 <== NOT EXECUTED
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
a0016fb4: e0c21293 smull r1, r2, r3, r2 <== NOT EXECUTED
a0016fb8: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED
a0016fbc: e0633342 rsb r3, r3, r2, asr #6 <== NOT EXECUTED
time->tv_sec = now.tv_sec;
a0016fc0: e59d2000 ldr r2, [sp] <== NOT EXECUTED
time->tv_usec = useconds;
a0016fc4: e884000c stm r4, {r2, r3} <== NOT EXECUTED
}
a0016fc8: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a0016fcc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a0009670 <rtems_clock_get_uptime>:
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
a0009670: e3500000 cmp r0, #0 <== NOT EXECUTED
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
a0009674: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if ( !uptime )
a0009678: 0a000002 beq a0009688 <rtems_clock_get_uptime+0x18> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
a000967c: eb00059c bl a000acf4 <_TOD_Get_uptime_as_timespec> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0009680: e3a00000 mov r0, #0 <== NOT EXECUTED
a0009684: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
return RTEMS_INVALID_ADDRESS;
a0009688: e3a00009 mov r0, #9 <== NOT EXECUTED
_TOD_Get_uptime_as_timespec( uptime );
return RTEMS_SUCCESSFUL;
}
a000968c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0009464 <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
a0009464: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_TOD_Tickle_ticks();
a0009468: eb00053b bl a000a95c <_TOD_Tickle_ticks>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
{
_Watchdog_Tickle( &_Watchdog_Ticks_chain );
a000946c: e59f0038 ldr r0, [pc, #56] ; a00094ac <rtems_clock_tick+0x48>
a0009470: eb000f0a bl a000d0a0 <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
a0009474: eb000d6c bl a000ca2c <_Thread_Tickle_timeslice>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
{
return ( _Thread_Dispatch_necessary );
a0009478: e59f3030 ldr r3, [pc, #48] ; a00094b0 <rtems_clock_tick+0x4c>
a000947c: e5d33010 ldrb r3, [r3, #16]
if ( _Thread_Is_context_switch_necessary() &&
a0009480: e3530000 cmp r3, #0
a0009484: 0a000003 beq a0009498 <rtems_clock_tick+0x34>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
a0009488: e59f3024 ldr r3, [pc, #36] ; a00094b4 <rtems_clock_tick+0x50><== NOT EXECUTED
a000948c: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0009490: e3530000 cmp r3, #0 <== NOT EXECUTED
a0009494: 0a000001 beq a00094a0 <rtems_clock_tick+0x3c> <== NOT EXECUTED
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
a0009498: e3a00000 mov r0, #0
a000949c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
_Thread_Tickle_timeslice();
if ( _Thread_Is_context_switch_necessary() &&
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
a00094a0: eb000a51 bl a000bdec <_Thread_Dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
a00094a4: e3a00000 mov r0, #0 <== NOT EXECUTED
a00094a8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a00094b8 <rtems_event_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
a00094b8: e92d4070 push {r4, r5, r6, lr}
RTEMS_API_Control *api;
if ( !event_out )
a00094bc: e2536000 subs r6, r3, #0
a00094c0: 0a000010 beq a0009508 <rtems_event_receive+0x50>
return RTEMS_INVALID_ADDRESS;
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
a00094c4: e59f4044 ldr r4, [pc, #68] ; a0009510 <rtems_event_receive+0x58>
if ( _Event_sets_Is_empty( event_in ) ) {
a00094c8: e3500000 cmp r0, #0
RTEMS_API_Control *api;
if ( !event_out )
return RTEMS_INVALID_ADDRESS;
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
a00094cc: e5945004 ldr r5, [r4, #4]
a00094d0: e59550f8 ldr r5, [r5, #248] ; 0xf8
if ( _Event_sets_Is_empty( event_in ) ) {
a00094d4: 1a000002 bne a00094e4 <rtems_event_receive+0x2c>
*event_out = api->pending_events;
a00094d8: e5953000 ldr r3, [r5]
a00094dc: e5863000 str r3, [r6]
return RTEMS_SUCCESSFUL;
a00094e0: e8bd8070 pop {r4, r5, r6, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a00094e4: e59fc028 ldr ip, [pc, #40] ; a0009514 <rtems_event_receive+0x5c>
a00094e8: e59ce000 ldr lr, [ip]
a00094ec: e28ee001 add lr, lr, #1
a00094f0: e58ce000 str lr, [ip]
}
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
a00094f4: eb000007 bl a0009518 <_Event_Seize>
_Thread_Enable_dispatch();
a00094f8: eb000a91 bl a000bf44 <_Thread_Enable_dispatch>
return( _Thread_Executing->Wait.return_code );
a00094fc: e5943004 ldr r3, [r4, #4]
a0009500: e5930034 ldr r0, [r3, #52] ; 0x34
a0009504: e8bd8070 pop {r4, r5, r6, pc}
)
{
RTEMS_API_Control *api;
if ( !event_out )
return RTEMS_INVALID_ADDRESS;
a0009508: e3a00009 mov r0, #9 <== NOT EXECUTED
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
_Thread_Enable_dispatch();
return( _Thread_Executing->Wait.return_code );
}
a000950c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000ba34 <rtems_extension_create>:
rtems_status_code rtems_extension_create(
rtems_name name,
const rtems_extensions_table *extension_table,
rtems_id *id
)
{
a000ba34: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Extension_Control *the_extension;
if ( !id )
a000ba38: e2526000 subs r6, r2, #0
rtems_status_code rtems_extension_create(
rtems_name name,
const rtems_extensions_table *extension_table,
rtems_id *id
)
{
a000ba3c: e1a04000 mov r4, r0
a000ba40: e1a08001 mov r8, r1
Extension_Control *the_extension;
if ( !id )
a000ba44: 0a000020 beq a000bacc <rtems_extension_create+0x98>
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
a000ba48: e3500000 cmp r0, #0
a000ba4c: 1a000001 bne a000ba58 <rtems_extension_create+0x24>
return RTEMS_INVALID_NAME;
a000ba50: e3a00003 mov r0, #3
);
*id = the_extension->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000ba54: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000ba58: e59f3074 ldr r3, [pc, #116] ; a000bad4 <rtems_extension_create+0xa0>
a000ba5c: e5932000 ldr r2, [r3]
a000ba60: e2822001 add r2, r2, #1
a000ba64: e5832000 str r2, [r3]
#ifndef __EXTENSION_MANAGER_inl
#define __EXTENSION_MANAGER_inl
RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
{
return (Extension_Control *) _Objects_Allocate( &_Extension_Information );
a000ba68: e59f7068 ldr r7, [pc, #104] ; a000bad8 <rtems_extension_create+0xa4>
a000ba6c: e1a00007 mov r0, r7
a000ba70: eb0003bc bl a000c968 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
a000ba74: e2505000 subs r5, r0, #0
a000ba78: 0a000010 beq a000bac0 <rtems_extension_create+0x8c>
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
a000ba7c: e285c024 add ip, r5, #36 ; 0x24
a000ba80: e1a0e008 mov lr, r8
a000ba84: e8be000f ldm lr!, {r0, r1, r2, r3}
a000ba88: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000ba8c: e89e000f ldm lr, {r0, r1, r2, r3}
a000ba90: e88c000f stm ip, {r0, r1, r2, r3}
_User_extensions_Add_set( extension );
a000ba94: e2850010 add r0, r5, #16
a000ba98: eb000b7a bl a000e888 <_User_extensions_Add_set>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000ba9c: e5953008 ldr r3, [r5, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000baa0: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000baa4: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000baa8: e7825721 str r5, [r2, r1, lsr #14]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000baac: e585400c str r4, [r5, #12]
&_Extension_Information,
&the_extension->Object,
(Objects_Name) name
);
*id = the_extension->Object.id;
a000bab0: e5863000 str r3, [r6]
_Thread_Enable_dispatch();
a000bab4: eb000812 bl a000db04 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000bab8: e3a00000 mov r0, #0
a000babc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
_Thread_Enable_dispatch();
a000bac0: eb00080f bl a000db04 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
a000bac4: e3a00005 mov r0, #5 <== NOT EXECUTED
a000bac8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
)
{
Extension_Control *the_extension;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a000bacc: e3a00009 mov r0, #9
a000bad0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000c5ac <rtems_extension_ident>:
rtems_status_code rtems_extension_ident(
rtems_name name,
rtems_id *id
)
{
a000c5ac: e1a02000 mov r2, r0 <== NOT EXECUTED
a000c5b0: e1a03001 mov r3, r1 <== NOT EXECUTED
a000c5b4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
Objects_Name_or_id_lookup_errors status;
status = _Objects_Name_to_id_u32(
a000c5b8: e1a01002 mov r1, r2 <== NOT EXECUTED
a000c5bc: e59f0010 ldr r0, [pc, #16] ; a000c5d4 <rtems_extension_ident+0x28><== NOT EXECUTED
a000c5c0: e3e02102 mvn r2, #-2147483648 ; 0x80000000 <== NOT EXECUTED
a000c5c4: eb0004ec bl a000d97c <_Objects_Name_to_id_u32> <== NOT EXECUTED
name,
OBJECTS_SEARCH_LOCAL_NODE,
id
);
return _Status_Object_name_errors_to_status[ status ];
a000c5c8: e59f3008 ldr r3, [pc, #8] ; a000c5d8 <rtems_extension_ident+0x2c><== NOT EXECUTED
}
a000c5cc: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED
a000c5d0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000a960 <rtems_interrupt_disable>:
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a960: e10f0000 mrs r0, CPSR <== NOT EXECUTED
a000a964: e3803080 orr r3, r0, #128 ; 0x80 <== NOT EXECUTED
a000a968: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_level previous_level;
_ISR_Disable( previous_level );
return previous_level;
}
a000a96c: e12fff1e bx lr <== NOT EXECUTED
a000a970 <rtems_interrupt_enable>:
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a970: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
void rtems_interrupt_enable(
rtems_interrupt_level previous_level
)
{
_ISR_Enable( previous_level );
}
a000a974: e12fff1e bx lr <== NOT EXECUTED
a000a978 <rtems_interrupt_flash>:
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a000a978: e10f3000 mrs r3, CPSR <== NOT EXECUTED
a000a97c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
a000a980: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
void rtems_interrupt_flash(
rtems_interrupt_level previous_level
)
{
_ISR_Flash( previous_level );
}
a000a984: e12fff1e bx lr <== NOT EXECUTED
a000a988 <rtems_interrupt_is_in_progress>:
#undef rtems_interrupt_is_in_progress
bool rtems_interrupt_is_in_progress( void )
{
return _ISR_Is_in_progress();
a000a988: e59f300c ldr r3, [pc, #12] ; a000a99c <rtems_interrupt_is_in_progress+0x14><== NOT EXECUTED
a000a98c: e5930000 ldr r0, [r3] <== NOT EXECUTED
}
a000a990: e2500000 subs r0, r0, #0 <== NOT EXECUTED
a000a994: 13a00001 movne r0, #1 <== NOT EXECUTED
a000a998: e12fff1e bx lr <== NOT EXECUTED
a000a33c <rtems_interrupt_level_attribute>:
rtems_attribute rtems_interrupt_level_attribute(
uint32_t level
)
{
return RTEMS_INTERRUPT_LEVEL(level);
}
a000a33c: e2000080 and r0, r0, #128 ; 0x80 <== NOT EXECUTED
a000a340: e12fff1e bx lr <== NOT EXECUTED
a0011d14 <rtems_io_close>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011d14: e59fc044 ldr ip, [pc, #68] ; a0011d60 <rtems_io_close+0x4c>
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0011d18: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011d1c: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0011d20: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011d24: e15c0000 cmp ip, r0
a0011d28: 9a000008 bls a0011d50 <rtems_io_close+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
a0011d2c: e59fc030 ldr ip, [pc, #48] ; a0011d64 <rtems_io_close+0x50>
a0011d30: e3a04018 mov r4, #24
a0011d34: e59cc000 ldr ip, [ip]
a0011d38: e023c394 mla r3, r4, r3, ip
a0011d3c: e5933008 ldr r3, [r3, #8]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0011d40: e3530000 cmp r3, #0
a0011d44: 0a000003 beq a0011d58 <rtems_io_close+0x44>
a0011d48: e12fff33 blx r3
a0011d4c: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a0011d50: e3a0000a mov r0, #10 <== NOT EXECUTED
a0011d54: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0011d58: e1a00003 mov r0, r3
}
a0011d5c: e8bd8010 pop {r4, pc}
a0011d68 <rtems_io_control>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011d68: e59fc044 ldr ip, [pc, #68] ; a0011db4 <rtems_io_control+0x4c>
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0011d6c: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011d70: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0011d74: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011d78: e15c0000 cmp ip, r0
a0011d7c: 9a000008 bls a0011da4 <rtems_io_control+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
a0011d80: e59fc030 ldr ip, [pc, #48] ; a0011db8 <rtems_io_control+0x50>
a0011d84: e3a04018 mov r4, #24
a0011d88: e59cc000 ldr ip, [ip]
a0011d8c: e023c394 mla r3, r4, r3, ip
a0011d90: e5933014 ldr r3, [r3, #20]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0011d94: e3530000 cmp r3, #0
a0011d98: 0a000003 beq a0011dac <rtems_io_control+0x44>
a0011d9c: e12fff33 blx r3
a0011da0: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a0011da4: e3a0000a mov r0, #10 <== NOT EXECUTED
a0011da8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0011dac: e1a00003 mov r0, r3 <== NOT EXECUTED
}
a0011db0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0011dbc <rtems_io_open>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011dbc: e59fc044 ldr ip, [pc, #68] ; a0011e08 <rtems_io_open+0x4c>
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0011dc0: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011dc4: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0011dc8: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011dcc: e15c0000 cmp ip, r0
a0011dd0: 9a000008 bls a0011df8 <rtems_io_open+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
a0011dd4: e59fc030 ldr ip, [pc, #48] ; a0011e0c <rtems_io_open+0x50>
a0011dd8: e3a04018 mov r4, #24
a0011ddc: e59cc000 ldr ip, [ip]
a0011de0: e023c394 mla r3, r4, r3, ip
a0011de4: e5933004 ldr r3, [r3, #4]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0011de8: e3530000 cmp r3, #0
a0011dec: 0a000003 beq a0011e00 <rtems_io_open+0x44>
a0011df0: e12fff33 blx r3
a0011df4: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a0011df8: e3a0000a mov r0, #10 <== NOT EXECUTED
a0011dfc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0011e00: e1a00003 mov r0, r3
}
a0011e04: e8bd8010 pop {r4, pc}
a0011e10 <rtems_io_read>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011e10: e59fc044 ldr ip, [pc, #68] ; a0011e5c <rtems_io_read+0x4c>
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0011e14: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011e18: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0011e1c: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011e20: e15c0000 cmp ip, r0
a0011e24: 9a000008 bls a0011e4c <rtems_io_read+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
a0011e28: e59fc030 ldr ip, [pc, #48] ; a0011e60 <rtems_io_read+0x50>
a0011e2c: e3a04018 mov r4, #24
a0011e30: e59cc000 ldr ip, [ip]
a0011e34: e023c394 mla r3, r4, r3, ip
a0011e38: e593300c ldr r3, [r3, #12]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0011e3c: e3530000 cmp r3, #0
a0011e40: 0a000003 beq a0011e54 <rtems_io_read+0x44>
a0011e44: e12fff33 blx r3
a0011e48: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a0011e4c: e3a0000a mov r0, #10 <== NOT EXECUTED
a0011e50: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0011e54: e1a00003 mov r0, r3
}
a0011e58: e8bd8010 pop {r4, pc}
a000b3b0 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
a000b3b0: e92d4030 push {r4, r5, lr}
a000b3b4: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
a000b3b8: e59f014c ldr r0, [pc, #332] ; a000b50c <rtems_io_register_driver+0x15c>
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
a000b3bc: e59f314c ldr r3, [pc, #332] ; a000b510 <rtems_io_register_driver+0x160>
if ( rtems_interrupt_is_in_progress() )
a000b3c0: e5900000 ldr r0, [r0]
a000b3c4: e3500000 cmp r0, #0
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
a000b3c8: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
a000b3cc: 1a000033 bne a000b4a0 <rtems_io_register_driver+0xf0>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
a000b3d0: e3520000 cmp r2, #0
a000b3d4: 0a000041 beq a000b4e0 <rtems_io_register_driver+0x130>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
a000b3d8: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
a000b3dc: e5820000 str r0, [r2]
if ( driver_table == NULL )
a000b3e0: 0a00003e beq a000b4e0 <rtems_io_register_driver+0x130>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000b3e4: e591c000 ldr ip, [r1]
a000b3e8: e35c0000 cmp ip, #0
a000b3ec: 0a000038 beq a000b4d4 <rtems_io_register_driver+0x124>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
a000b3f0: e1500004 cmp r0, r4
a000b3f4: 9a000027 bls a000b498 <rtems_io_register_driver+0xe8>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000b3f8: e59f0114 ldr r0, [pc, #276] ; a000b514 <rtems_io_register_driver+0x164>
a000b3fc: e590c000 ldr ip, [r0]
a000b400: e28cc001 add ip, ip, #1
a000b404: e580c000 str ip, [r0]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
a000b408: e3540000 cmp r4, #0
a000b40c: 1a000025 bne a000b4a8 <rtems_io_register_driver+0xf8>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
a000b410: e593c000 ldr ip, [r3]
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
a000b414: e35c0000 cmp ip, #0
a000b418: 0a000032 beq a000b4e8 <rtems_io_register_driver+0x138>
a000b41c: e59fe0f4 ldr lr, [pc, #244] ; a000b518 <rtems_io_register_driver+0x168>
a000b420: e59e3000 ldr r3, [lr]
a000b424: ea000003 b a000b438 <rtems_io_register_driver+0x88>
a000b428: e2844001 add r4, r4, #1
a000b42c: e15c0004 cmp ip, r4
a000b430: e2833018 add r3, r3, #24
a000b434: 9a000005 bls a000b450 <rtems_io_register_driver+0xa0>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000b438: e5930000 ldr r0, [r3]
a000b43c: e3500000 cmp r0, #0
a000b440: 1afffff8 bne a000b428 <rtems_io_register_driver+0x78>
a000b444: e5930004 ldr r0, [r3, #4]
a000b448: e3500000 cmp r0, #0
a000b44c: 1afffff5 bne a000b428 <rtems_io_register_driver+0x78>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
a000b450: e15c0004 cmp ip, r4
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a000b454: e5824000 str r4, [r2]
if ( m != n )
a000b458: 0a000023 beq a000b4ec <rtems_io_register_driver+0x13c>
a000b45c: e3a0c018 mov ip, #24
a000b460: e00c0c94 mul ip, r4, ip
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
a000b464: e59e5000 ldr r5, [lr]
a000b468: e1a0e001 mov lr, r1
a000b46c: e8be000f ldm lr!, {r0, r1, r2, r3}
a000b470: e085c00c add ip, r5, ip
a000b474: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000b478: e89e0003 ldm lr, {r0, r1}
a000b47c: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
a000b480: eb000767 bl a000d224 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
a000b484: e3a01000 mov r1, #0
a000b488: e1a00004 mov r0, r4
a000b48c: e1a02001 mov r2, r1
}
a000b490: e8bd4030 pop {r4, r5, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
a000b494: ea00215d b a0013a10 <rtems_io_initialize>
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
a000b498: e3a0000a mov r0, #10 <== NOT EXECUTED
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
a000b49c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
a000b4a0: e3a00012 mov r0, #18 <== NOT EXECUTED
a000b4a4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
a000b4a8: e59fe068 ldr lr, [pc, #104] ; a000b518 <rtems_io_register_driver+0x168><== NOT EXECUTED
a000b4ac: e3a0c018 mov ip, #24 <== NOT EXECUTED
a000b4b0: e00c0c94 mul ip, r4, ip <== NOT EXECUTED
a000b4b4: e59e3000 ldr r3, [lr] <== NOT EXECUTED
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000b4b8: e793000c ldr r0, [r3, ip] <== NOT EXECUTED
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
a000b4bc: e083300c add r3, r3, ip <== NOT EXECUTED
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000b4c0: e3500000 cmp r0, #0 <== NOT EXECUTED
a000b4c4: 0a00000b beq a000b4f8 <rtems_io_register_driver+0x148> <== NOT EXECUTED
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
a000b4c8: eb000755 bl a000d224 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
a000b4cc: e3a0000c mov r0, #12 <== NOT EXECUTED
a000b4d0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000b4d4: e591c004 ldr ip, [r1, #4]
a000b4d8: e35c0000 cmp ip, #0
a000b4dc: 1affffc3 bne a000b3f0 <rtems_io_register_driver+0x40>
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
a000b4e0: e3a00009 mov r0, #9 <== NOT EXECUTED
a000b4e4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a000b4e8: e5824000 str r4, [r2] <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
a000b4ec: eb00074c bl a000d224 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
a000b4f0: e3a00005 mov r0, #5
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
a000b4f4: e8bd8030 pop {r4, r5, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000b4f8: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
a000b4fc: e3530000 cmp r3, #0 <== NOT EXECUTED
a000b500: 1afffff0 bne a000b4c8 <rtems_io_register_driver+0x118> <== NOT EXECUTED
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
a000b504: e5824000 str r4, [r2] <== NOT EXECUTED
a000b508: eaffffd5 b a000b464 <rtems_io_register_driver+0xb4> <== NOT EXECUTED
a000b51c <rtems_io_unregister_driver>:
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
a000b51c: e59f3064 ldr r3, [pc, #100] ; a000b588 <rtems_io_unregister_driver+0x6c>
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
a000b520: e92d4010 push {r4, lr}
if ( rtems_interrupt_is_in_progress() )
a000b524: e5934000 ldr r4, [r3]
a000b528: e3540000 cmp r4, #0
a000b52c: 1a000013 bne a000b580 <rtems_io_unregister_driver+0x64>
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
a000b530: e59f3054 ldr r3, [pc, #84] ; a000b58c <rtems_io_unregister_driver+0x70>
a000b534: e5933000 ldr r3, [r3]
a000b538: e1530000 cmp r3, r0
a000b53c: 8a000001 bhi a000b548 <rtems_io_unregister_driver+0x2c>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
a000b540: e3a0000d mov r0, #13 <== NOT EXECUTED
}
a000b544: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000b548: e59f3040 ldr r3, [pc, #64] ; a000b590 <rtems_io_unregister_driver+0x74>
a000b54c: e5932000 ldr r2, [r3]
a000b550: e2822001 add r2, r2, #1
a000b554: e5832000 str r2, [r3]
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
a000b558: e59f2034 ldr r2, [pc, #52] ; a000b594 <rtems_io_unregister_driver+0x78>
&_IO_Driver_address_table[major],
a000b55c: e3a03018 mov r3, #24
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
a000b560: e1a01004 mov r1, r4
a000b564: e592c000 ldr ip, [r2]
a000b568: e1a02003 mov r2, r3
a000b56c: e020c093 mla r0, r3, r0, ip
a000b570: eb002d48 bl a0016a98 <memset>
&_IO_Driver_address_table[major],
0,
sizeof( rtems_driver_address_table )
);
_Thread_Enable_dispatch();
a000b574: eb00072a bl a000d224 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000b578: e1a00004 mov r0, r4
a000b57c: e8bd8010 pop {r4, pc}
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
a000b580: e3a00012 mov r0, #18 <== NOT EXECUTED
a000b584: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0011e64 <rtems_io_write>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011e64: e59fc044 ldr ip, [pc, #68] ; a0011eb0 <rtems_io_write+0x4c>
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0011e68: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011e6c: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0011e70: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0011e74: e15c0000 cmp ip, r0
a0011e78: 9a000008 bls a0011ea0 <rtems_io_write+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
a0011e7c: e59fc030 ldr ip, [pc, #48] ; a0011eb4 <rtems_io_write+0x50>
a0011e80: e3a04018 mov r4, #24
a0011e84: e59cc000 ldr ip, [ip]
a0011e88: e023c394 mla r3, r4, r3, ip
a0011e8c: e5933010 ldr r3, [r3, #16]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0011e90: e3530000 cmp r3, #0
a0011e94: 0a000003 beq a0011ea8 <rtems_io_write+0x44>
a0011e98: e12fff33 blx r3
a0011e9c: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a0011ea0: e3a0000a mov r0, #10 <== NOT EXECUTED
a0011ea4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0011ea8: e1a00003 mov r0, r3 <== NOT EXECUTED
}
a0011eac: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0017808 <rtems_message_queue_broadcast>:
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
a0017808: e92d40f0 push {r4, r5, r6, r7, lr}
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
a001780c: e2516000 subs r6, r1, #0
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
a0017810: e24dd00c sub sp, sp, #12
a0017814: e1a04000 mov r4, r0
a0017818: e1a05002 mov r5, r2
a001781c: e1a07003 mov r7, r3
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
a0017820: 0a000016 beq a0017880 <rtems_message_queue_broadcast+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !count )
a0017824: e3530000 cmp r3, #0
a0017828: 0a000014 beq a0017880 <rtems_message_queue_broadcast+0x78>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
a001782c: e59f0054 ldr r0, [pc, #84] ; a0017888 <rtems_message_queue_broadcast+0x80>
a0017830: e1a01004 mov r1, r4
a0017834: e28d2008 add r2, sp, #8
a0017838: eb001534 bl a001cd10 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a001783c: e59d3008 ldr r3, [sp, #8]
a0017840: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0017844: 13a00004 movne r0, #4
if ( !count )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0017848: 1a00000a bne a0017878 <rtems_message_queue_broadcast+0x70>
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
a001784c: e58d3000 str r3, [sp]
a0017850: e1a01006 mov r1, r6
a0017854: e1a03004 mov r3, r4
a0017858: e1a02005 mov r2, r5
a001785c: e2800014 add r0, r0, #20
a0017860: e58d7004 str r7, [sp, #4]
a0017864: eb000ddb bl a001afd8 <_CORE_message_queue_Broadcast>
a0017868: e1a04000 mov r4, r0
NULL,
#endif
count
);
_Thread_Enable_dispatch();
a001786c: eb001830 bl a001d934 <_Thread_Enable_dispatch>
return
a0017870: e1a00004 mov r0, r4
a0017874: eb0000d5 bl a0017bd0 <_Message_queue_Translate_core_message_queue_return_code>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0017878: e28dd00c add sp, sp, #12
a001787c: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !count )
return RTEMS_INVALID_ADDRESS;
a0017880: e3a00009 mov r0, #9 <== NOT EXECUTED
a0017884: eafffffb b a0017878 <rtems_message_queue_broadcast+0x70> <== NOT EXECUTED
a0011ff4 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0011ff4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
a0011ff8: e2507000 subs r7, r0, #0
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0011ffc: e24dd008 sub sp, sp, #8
a0012000: e1a04001 mov r4, r1
a0012004: e1a06002 mov r6, r2
a0012008: e59d5020 ldr r5, [sp, #32]
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a001200c: 03a00003 moveq r0, #3
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
a0012010: 0a000008 beq a0012038 <rtems_message_queue_create+0x44>
return RTEMS_INVALID_NAME;
if ( !id )
a0012014: e3550000 cmp r5, #0
return RTEMS_INVALID_ADDRESS;
a0012018: 03a00009 moveq r0, #9
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a001201c: 0a000005 beq a0012038 <rtems_message_queue_create+0x44>
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
a0012020: e3510000 cmp r1, #0
return RTEMS_INVALID_NUMBER;
a0012024: 03a0000a moveq r0, #10
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
a0012028: 0a000002 beq a0012038 <rtems_message_queue_create+0x44>
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
a001202c: e3520000 cmp r2, #0
return RTEMS_INVALID_SIZE;
a0012030: 03a00008 moveq r0, #8
#endif
if ( count == 0 )
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
a0012034: 1a000001 bne a0012040 <rtems_message_queue_create+0x4c>
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a0012038: e28dd008 add sp, sp, #8
a001203c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0012040: e59f2098 ldr r2, [pc, #152] ; a00120e0 <rtems_message_queue_create+0xec>
a0012044: e5921000 ldr r1, [r2]
a0012048: e2811001 add r1, r1, #1
a001204c: e5821000 str r1, [r2]
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
a0012050: e58d3000 str r3, [sp]
a0012054: eb0019ba bl a0018744 <_Message_queue_Allocate>
if ( !the_message_queue ) {
a0012058: e2508000 subs r8, r0, #0
a001205c: e59d3000 ldr r3, [sp]
a0012060: 0a00001b beq a00120d4 <rtems_message_queue_create+0xe0>
}
#endif
the_message_queue->attribute_set = attribute_set;
if (_Attributes_Is_priority( attribute_set ) )
a0012064: e2132004 ands r2, r3, #4
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
a0012068: e5883010 str r3, [r8, #16]
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
a001206c: 13a03001 movne r3, #1
a0012070: 158d3004 strne r3, [sp, #4]
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
a0012074: 058d2004 streq r2, [sp, #4]
if ( ! _CORE_message_queue_Initialize(
a0012078: e2880014 add r0, r8, #20
a001207c: e28d1004 add r1, sp, #4
a0012080: e1a02004 mov r2, r4
a0012084: e1a03006 mov r3, r6
a0012088: eb00048a bl a00132b8 <_CORE_message_queue_Initialize>
a001208c: e3500000 cmp r0, #0
a0012090: 1a000005 bne a00120ac <rtems_message_queue_create+0xb8>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
a0012094: e59f0048 ldr r0, [pc, #72] ; a00120e4 <rtems_message_queue_create+0xf0><== NOT EXECUTED
a0012098: e1a01008 mov r1, r8 <== NOT EXECUTED
a001209c: eb00087e bl a001429c <_Objects_Free> <== NOT EXECUTED
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
a00120a0: eb000c07 bl a00150c4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
a00120a4: e3a0000d mov r0, #13 <== NOT EXECUTED
a00120a8: eaffffe2 b a0012038 <rtems_message_queue_create+0x44> <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a00120ac: e59f2030 ldr r2, [pc, #48] ; a00120e4 <rtems_message_queue_create+0xf0>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a00120b0: e5983008 ldr r3, [r8, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a00120b4: e592201c ldr r2, [r2, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a00120b8: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a00120bc: e7828721 str r8, [r2, r1, lsr #14]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a00120c0: e588700c str r7, [r8, #12]
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
a00120c4: e5853000 str r3, [r5]
name,
0
);
#endif
_Thread_Enable_dispatch();
a00120c8: eb000bfd bl a00150c4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00120cc: e3a00000 mov r0, #0
a00120d0: eaffffd8 b a0012038 <rtems_message_queue_create+0x44>
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
if ( !the_message_queue ) {
_Thread_Enable_dispatch();
a00120d4: eb000bfa bl a00150c4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a00120d8: e3a00005 mov r0, #5 <== NOT EXECUTED
a00120dc: eaffffd5 b a0012038 <rtems_message_queue_create+0x44> <== NOT EXECUTED
a0017a3c <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
a0017a3c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
a0017a40: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
a0017a44: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a0017a48: e1a01000 mov r1, r0 <== NOT EXECUTED
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
return RTEMS_INVALID_ADDRESS;
a0017a4c: 03a00009 moveq r0, #9 <== NOT EXECUTED
)
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
a0017a50: 0a00000a beq a0017a80 <rtems_message_queue_get_number_pending+0x44><== NOT EXECUTED
a0017a54: e59f002c ldr r0, [pc, #44] ; a0017a88 <rtems_message_queue_get_number_pending+0x4c><== NOT EXECUTED
a0017a58: e1a0200d mov r2, sp <== NOT EXECUTED
a0017a5c: eb0014ab bl a001cd10 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0017a60: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a0017a64: e3550000 cmp r5, #0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0017a68: 13a00004 movne r0, #4 <== NOT EXECUTED
if ( !count )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0017a6c: 1a000003 bne a0017a80 <rtems_message_queue_get_number_pending+0x44><== NOT EXECUTED
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
a0017a70: e590305c ldr r3, [r0, #92] ; 0x5c <== NOT EXECUTED
a0017a74: e5843000 str r3, [r4] <== NOT EXECUTED
_Thread_Enable_dispatch();
a0017a78: eb0017ad bl a001d934 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0017a7c: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0017a80: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0017a84: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a001211c <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
a001211c: e92d4070 push {r4, r5, r6, lr}
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
a0012120: e2515000 subs r5, r1, #0
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
a0012124: e24dd00c sub sp, sp, #12
a0012128: e1a01000 mov r1, r0
a001212c: e1a04002 mov r4, r2
a0012130: e1a06003 mov r6, r3
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
a0012134: 0a000019 beq a00121a0 <rtems_message_queue_receive+0x84>
return RTEMS_INVALID_ADDRESS;
if ( !size )
a0012138: e3520000 cmp r2, #0
a001213c: 0a000017 beq a00121a0 <rtems_message_queue_receive+0x84>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
a0012140: e59f0060 ldr r0, [pc, #96] ; a00121a8 <rtems_message_queue_receive+0x8c>
a0012144: e28d2008 add r2, sp, #8
a0012148: eb0008ac bl a0014400 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a001214c: e59d3008 ldr r3, [sp, #8]
a0012150: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0012154: 13a00004 movne r0, #4
if ( !size )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0012158: 1a00000e bne a0012198 <rtems_message_queue_receive+0x7c>
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
a001215c: e59d301c ldr r3, [sp, #28]
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
a0012160: e2066001 and r6, r6, #1
a0012164: e5901008 ldr r1, [r0, #8]
a0012168: e1a02005 mov r2, r5
a001216c: e2800014 add r0, r0, #20
a0012170: e58d3004 str r3, [sp, #4]
a0012174: e2266001 eor r6, r6, #1
a0012178: e1a03004 mov r3, r4
a001217c: e58d6000 str r6, [sp]
a0012180: eb00047f bl a0013384 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
a0012184: eb000bce bl a00150c4 <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
_Thread_Executing->Wait.return_code
a0012188: e59f301c ldr r3, [pc, #28] ; a00121ac <rtems_message_queue_receive+0x90>
a001218c: e5933004 ldr r3, [r3, #4]
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
a0012190: e5930034 ldr r0, [r3, #52] ; 0x34
a0012194: eb000024 bl a001222c <_Message_queue_Translate_core_message_queue_return_code>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0012198: e28dd00c add sp, sp, #12
a001219c: e8bd8070 pop {r4, r5, r6, pc}
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
a00121a0: e3a00009 mov r0, #9 <== NOT EXECUTED
a00121a4: eafffffb b a0012198 <rtems_message_queue_receive+0x7c> <== NOT EXECUTED
a0009dac <rtems_object_api_maximum_class>:
int rtems_object_api_maximum_class(
int api
)
{
return _Objects_API_maximum_class(api);
a0009dac: ea0005c2 b a000b4bc <_Objects_API_maximum_class> <== NOT EXECUTED
a0009db0 <rtems_object_api_minimum_class>:
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
a0009db0: e2400001 sub r0, r0, #1 <== NOT EXECUTED
uint32_t api
)
{
if ( _Objects_Is_api_valid( api ) )
return 1;
return -1;
a0009db4: e3500003 cmp r0, #3 <== NOT EXECUTED
}
a0009db8: 33a00001 movcc r0, #1 <== NOT EXECUTED
a0009dbc: 23e00000 mvncs r0, #0 <== NOT EXECUTED
a0009dc0: e12fff1e bx lr <== NOT EXECUTED
a0009dc4 <rtems_object_get_api_class_name>:
)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
a0009dc4: e3500001 cmp r0, #1 <== NOT EXECUTED
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
a0009dc8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
a0009dcc: 0a00000d beq a0009e08 <rtems_object_get_api_class_name+0x44><== NOT EXECUTED
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
a0009dd0: e3500002 cmp r0, #2 <== NOT EXECUTED
a0009dd4: 0a000004 beq a0009dec <rtems_object_get_api_class_name+0x28><== NOT EXECUTED
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
a0009dd8: e3500003 cmp r0, #3 <== NOT EXECUTED
api_assoc = rtems_object_api_posix_assoc;
a0009ddc: 059f003c ldreq r0, [pc, #60] ; a0009e20 <rtems_object_get_api_class_name+0x5c><== NOT EXECUTED
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
a0009de0: 0a000002 beq a0009df0 <rtems_object_get_api_class_name+0x2c><== NOT EXECUTED
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
a0009de4: e59f0038 ldr r0, [pc, #56] ; a0009e24 <rtems_object_get_api_class_name+0x60><== NOT EXECUTED
a0009de8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
a0009dec: e59f0034 ldr r0, [pc, #52] ; a0009e28 <rtems_object_get_api_class_name+0x64><== NOT EXECUTED
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
a0009df0: eb001392 bl a000ec40 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if ( class_assoc )
a0009df4: e3500000 cmp r0, #0 <== NOT EXECUTED
return class_assoc->name;
a0009df8: 15900000 ldrne r0, [r0] <== NOT EXECUTED
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
a0009dfc: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED
return class_assoc->name;
return "BAD CLASS";
a0009e00: e59f0024 ldr r0, [pc, #36] ; a0009e2c <rtems_object_get_api_class_name+0x68><== NOT EXECUTED
}
a0009e04: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
a0009e08: e59f0020 ldr r0, [pc, #32] ; a0009e30 <rtems_object_get_api_class_name+0x6c><== NOT EXECUTED
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
a0009e0c: eb00138b bl a000ec40 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if ( class_assoc )
a0009e10: e3500000 cmp r0, #0 <== NOT EXECUTED
return class_assoc->name;
a0009e14: 15900000 ldrne r0, [r0] <== NOT EXECUTED
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
a0009e18: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED
a0009e1c: eafffff7 b a0009e00 <rtems_object_get_api_class_name+0x3c> <== NOT EXECUTED
a0009e34 <rtems_object_get_api_name>:
};
const char *rtems_object_get_api_name(
int api
)
{
a0009e34: e1a01000 mov r1, r0 <== NOT EXECUTED
a0009e38: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
a0009e3c: e59f0010 ldr r0, [pc, #16] ; a0009e54 <rtems_object_get_api_name+0x20><== NOT EXECUTED
a0009e40: eb00137e bl a000ec40 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if ( api_assoc )
a0009e44: e3500000 cmp r0, #0 <== NOT EXECUTED
return api_assoc->name;
a0009e48: 15900000 ldrne r0, [r0] <== NOT EXECUTED
return "BAD CLASS";
a0009e4c: 059f0004 ldreq r0, [pc, #4] ; a0009e58 <rtems_object_get_api_name+0x24><== NOT EXECUTED
}
a0009e50: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000b8a0 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
a000b8a0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
a000b8a4: e2524000 subs r4, r2, #0 <== NOT EXECUTED
a000b8a8: 0a00001c beq a000b920 <rtems_object_get_class_information+0x80><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
a000b8ac: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
a000b8b0: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
a000b8b4: eb0006f7 bl a000d498 <_Objects_Get_information> <== NOT EXECUTED
if ( !obj_info )
a000b8b8: e3500000 cmp r0, #0 <== NOT EXECUTED
a000b8bc: 0a000019 beq a000b928 <rtems_object_get_class_information+0x88><== NOT EXECUTED
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
a000b8c0: e1d0c1b0 ldrh ip, [r0, #16] <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
a000b8c4: e5901008 ldr r1, [r0, #8] <== NOT EXECUTED
info->maximum_id = obj_info->maximum_id;
a000b8c8: e590200c ldr r2, [r0, #12] <== NOT EXECUTED
info->auto_extend = obj_info->auto_extend;
a000b8cc: e5d03012 ldrb r3, [r0, #18] <== NOT EXECUTED
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
a000b8d0: e35c0000 cmp ip, #0 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
a000b8d4: e8840006 stm r4, {r1, r2} <== NOT EXECUTED
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
a000b8d8: e5c4300c strb r3, [r4, #12] <== NOT EXECUTED
info->maximum = obj_info->maximum;
a000b8dc: e584c008 str ip, [r4, #8] <== NOT EXECUTED
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
a000b8e0: 01a0500c moveq r5, ip <== NOT EXECUTED
a000b8e4: 0a00000a beq a000b914 <rtems_object_get_class_information+0x74><== NOT EXECUTED
a000b8e8: e590001c ldr r0, [r0, #28] <== NOT EXECUTED
a000b8ec: e3a02001 mov r2, #1 <== NOT EXECUTED
a000b8f0: e1a03002 mov r3, r2 <== NOT EXECUTED
a000b8f4: e3a05000 mov r5, #0 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
a000b8f8: e7901102 ldr r1, [r0, r2, lsl #2] <== NOT EXECUTED
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
a000b8fc: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000b900: e1a02003 mov r2, r3 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
a000b904: e3510000 cmp r1, #0 <== NOT EXECUTED
unallocated++;
a000b908: 02855001 addeq r5, r5, #1 <== NOT EXECUTED
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
a000b90c: e15c0003 cmp ip, r3 <== NOT EXECUTED
a000b910: 2afffff8 bcs a000b8f8 <rtems_object_get_class_information+0x58><== NOT EXECUTED
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
a000b914: e5845010 str r5, [r4, #16] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b918: e3a00000 mov r0, #0 <== NOT EXECUTED
a000b91c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
a000b920: e3a00009 mov r0, #9 <== NOT EXECUTED
a000b924: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
a000b928: e3a0000a mov r0, #10 <== NOT EXECUTED
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
a000b92c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000b934 <rtems_object_id_api_maximum>:
#undef rtems_object_id_api_maximum
int rtems_object_id_api_maximum(void)
{
return OBJECTS_APIS_LAST;
}
a000b934: e3a00003 mov r0, #3 <== NOT EXECUTED
a000b938: e12fff1e bx lr <== NOT EXECUTED
a000b93c <rtems_object_id_api_minimum>:
#undef rtems_object_id_api_minimum
int rtems_object_id_api_minimum(void)
{
return OBJECTS_INTERNAL_API;
}
a000b93c: e3a00001 mov r0, #1 <== NOT EXECUTED
a000b940: e12fff1e bx lr <== NOT EXECUTED
a000b944 <rtems_object_id_get_api>:
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
a000b944: e1a00c20 lsr r0, r0, #24 <== NOT EXECUTED
int rtems_object_id_get_api(
rtems_id id
)
{
return _Objects_Get_API( id );
}
a000b948: e2000007 and r0, r0, #7 <== NOT EXECUTED
a000b94c: e12fff1e bx lr <== NOT EXECUTED
a000b950 <rtems_object_id_get_class>:
int rtems_object_id_get_class(
rtems_id id
)
{
return _Objects_Get_class( id );
}
a000b950: e1a00da0 lsr r0, r0, #27 <== NOT EXECUTED
a000b954: e12fff1e bx lr <== NOT EXECUTED
a000b958 <rtems_object_id_get_index>:
#undef rtems_object_id_get_index
int rtems_object_id_get_index(
rtems_id id
)
{
return _Objects_Get_index( id );
a000b958: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
}
a000b95c: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
a000b960: e12fff1e bx lr <== NOT EXECUTED
a000b964 <rtems_object_id_get_node>:
* be a single processor system.
*/
#if defined(RTEMS_USE_16_BIT_OBJECT)
return 1;
#else
return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
a000b964: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
int rtems_object_id_get_node(
rtems_id id
)
{
return _Objects_Get_node( id );
}
a000b968: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
a000b96c: e12fff1e bx lr <== NOT EXECUTED
a0009e60 <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
a0009e60: e92d4070 push {r4, r5, r6, lr}
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
a0009e64: e2515000 subs r5, r1, #0
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
a0009e68: e24dd004 sub sp, sp, #4
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
a0009e6c: 03a00009 moveq r0, #9
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
a0009e70: 0a000010 beq a0009eb8 <rtems_object_set_name+0x58>
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a0009e74: e3500000 cmp r0, #0
a0009e78: 059f3058 ldreq r3, [pc, #88] ; a0009ed8 <rtems_object_set_name+0x78>
a0009e7c: 11a04000 movne r4, r0
a0009e80: 05933004 ldreq r3, [r3, #4]
a0009e84: 05934008 ldreq r4, [r3, #8]
information = _Objects_Get_information_id( tmpId );
a0009e88: e1a00004 mov r0, r4
a0009e8c: eb000666 bl a000b82c <_Objects_Get_information_id>
if ( !information )
a0009e90: e2506000 subs r6, r0, #0
a0009e94: 0a000006 beq a0009eb4 <rtems_object_set_name+0x54>
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
a0009e98: e1a01004 mov r1, r4
a0009e9c: e1a0200d mov r2, sp
a0009ea0: eb0006e7 bl a000ba44 <_Objects_Get>
switch ( location ) {
a0009ea4: e59d4000 ldr r4, [sp]
information = _Objects_Get_information_id( tmpId );
if ( !information )
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
a0009ea8: e1a01000 mov r1, r0
switch ( location ) {
a0009eac: e3540000 cmp r4, #0
a0009eb0: 0a000002 beq a0009ec0 <rtems_object_set_name+0x60>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0009eb4: e3a00004 mov r0, #4 <== NOT EXECUTED
}
a0009eb8: e28dd004 add sp, sp, #4
a0009ebc: e8bd8070 pop {r4, r5, r6, pc}
the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
a0009ec0: e1a02005 mov r2, r5
a0009ec4: e1a00006 mov r0, r6
a0009ec8: eb000741 bl a000bbd4 <_Objects_Set_name>
_Thread_Enable_dispatch();
a0009ecc: eb0009fb bl a000c6c0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009ed0: e1a00004 mov r0, r4
a0009ed4: eafffff7 b a0009eb8 <rtems_object_set_name+0x58>
a0017c5c <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0017c5c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
a0017c60: e2506000 subs r6, r0, #0
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0017c64: e24dd008 sub sp, sp, #8
a0017c68: e1a04001 mov r4, r1
a0017c6c: e59d502c ldr r5, [sp, #44] ; 0x2c
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0017c70: 03a00003 moveq r0, #3
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
a0017c74: 0a000031 beq a0017d40 <rtems_partition_create+0xe4>
return RTEMS_INVALID_NAME;
if ( !starting_address )
a0017c78: e3510000 cmp r1, #0
a0017c7c: 0a000033 beq a0017d50 <rtems_partition_create+0xf4>
return RTEMS_INVALID_ADDRESS;
if ( !id )
a0017c80: e3550000 cmp r5, #0
a0017c84: 0a000031 beq a0017d50 <rtems_partition_create+0xf4>
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
a0017c88: e3520000 cmp r2, #0
a0017c8c: 13530000 cmpne r3, #0
a0017c90: 0a00002c beq a0017d48 <rtems_partition_create+0xec>
a0017c94: e1520003 cmp r2, r3
a0017c98: 3a00002a bcc a0017d48 <rtems_partition_create+0xec>
a0017c9c: e3130007 tst r3, #7
a0017ca0: 1a000028 bne a0017d48 <rtems_partition_create+0xec>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
a0017ca4: e2118007 ands r8, r1, #7
a0017ca8: 1a000028 bne a0017d50 <rtems_partition_create+0xf4>
a0017cac: e59f10b0 ldr r1, [pc, #176] ; a0017d64 <rtems_partition_create+0x108>
a0017cb0: e5910000 ldr r0, [r1]
a0017cb4: e2800001 add r0, r0, #1
a0017cb8: e5810000 str r0, [r1]
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
a0017cbc: e59fa0a4 ldr sl, [pc, #164] ; a0017d68 <rtems_partition_create+0x10c>
a0017cc0: e58d2004 str r2, [sp, #4]
a0017cc4: e58d3000 str r3, [sp]
a0017cc8: e1a0000a mov r0, sl
a0017ccc: eb0012ca bl a001c7fc <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
a0017cd0: e2507000 subs r7, r0, #0
a0017cd4: e59d2004 ldr r2, [sp, #4]
a0017cd8: e59d3000 ldr r3, [sp]
a0017cdc: 0a00001d beq a0017d58 <rtems_partition_create+0xfc>
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
a0017ce0: e59d1028 ldr r1, [sp, #40] ; 0x28
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
a0017ce4: e5872014 str r2, [r7, #20]
the_partition->buffer_size = buffer_size;
a0017ce8: e5873018 str r3, [r7, #24]
the_partition->attribute_set = attribute_set;
a0017cec: e587101c str r1, [r7, #28]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
a0017cf0: e5874010 str r4, [r7, #16]
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
a0017cf4: e1a01003 mov r1, r3
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
a0017cf8: e5878020 str r8, [r7, #32]
_Chain_Initialize( &the_partition->Memory, starting_address,
a0017cfc: e1a00002 mov r0, r2
a0017d00: e58d3000 str r3, [sp]
a0017d04: eb0061ce bl a0030444 <__aeabi_uidiv>
a0017d08: e2879024 add r9, r7, #36 ; 0x24
a0017d0c: e1a02000 mov r2, r0
a0017d10: e1a01004 mov r1, r4
a0017d14: e1a00009 mov r0, r9
a0017d18: e59d3000 ldr r3, [sp]
a0017d1c: eb000c94 bl a001af74 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a0017d20: e5973008 ldr r3, [r7, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0017d24: e59a201c ldr r2, [sl, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0017d28: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0017d2c: e7827721 str r7, [r2, r1, lsr #14]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0017d30: e587600c str r6, [r7, #12]
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
a0017d34: e5853000 str r3, [r5]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
a0017d38: eb0016fd bl a001d934 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0017d3c: e1a00008 mov r0, r8
}
a0017d40: e28dd008 add sp, sp, #8
a0017d44: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
a0017d48: e3a00008 mov r0, #8 <== NOT EXECUTED
a0017d4c: eafffffb b a0017d40 <rtems_partition_create+0xe4> <== NOT EXECUTED
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
a0017d50: e3a00009 mov r0, #9 <== NOT EXECUTED
a0017d54: eafffff9 b a0017d40 <rtems_partition_create+0xe4> <== NOT EXECUTED
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
a0017d58: eb0016f5 bl a001d934 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a0017d5c: e3a00005 mov r0, #5 <== NOT EXECUTED
a0017d60: eafffff6 b a0017d40 <rtems_partition_create+0xe4> <== NOT EXECUTED
a0017d6c <rtems_partition_delete>:
*/
rtems_status_code rtems_partition_delete(
rtems_id id
)
{
a0017d6c: e92d4030 push {r4, r5, lr}
a0017d70: e24dd004 sub sp, sp, #4
a0017d74: e1a01000 mov r1, r0
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
a0017d78: e1a0200d mov r2, sp
a0017d7c: e59f0054 ldr r0, [pc, #84] ; a0017dd8 <rtems_partition_delete+0x6c>
a0017d80: eb0013e2 bl a001cd10 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0017d84: e59d3000 ldr r3, [sp]
a0017d88: e1a04000 mov r4, r0
a0017d8c: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0017d90: 13a00004 movne r0, #4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0017d94: 1a000004 bne a0017dac <rtems_partition_delete+0x40>
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
a0017d98: e5945020 ldr r5, [r4, #32]
a0017d9c: e3550000 cmp r5, #0
a0017da0: 0a000003 beq a0017db4 <rtems_partition_delete+0x48>
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
a0017da4: eb0016e2 bl a001d934 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
a0017da8: e3a0000c mov r0, #12 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0017dac: e28dd004 add sp, sp, #4
a0017db0: e8bd8030 pop {r4, r5, pc}
the_partition = _Partition_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
_Objects_Close( &_Partition_Information, &the_partition->Object );
a0017db4: e1a01004 mov r1, r4
a0017db8: e59f0018 ldr r0, [pc, #24] ; a0017dd8 <rtems_partition_delete+0x6c>
a0017dbc: eb0012b3 bl a001c890 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Partition_Free (
Partition_Control *the_partition
)
{
_Objects_Free( &_Partition_Information, &the_partition->Object );
a0017dc0: e59f0010 ldr r0, [pc, #16] ; a0017dd8 <rtems_partition_delete+0x6c>
a0017dc4: e1a01004 mov r1, r4
a0017dc8: eb001367 bl a001cb6c <_Objects_Free>
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
a0017dcc: eb0016d8 bl a001d934 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0017dd0: e1a00005 mov r0, r5
a0017dd4: eafffff4 b a0017dac <rtems_partition_delete+0x40>
a0017e88 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
a0017e88: e92d4070 push {r4, r5, r6, lr}
a0017e8c: e1a03000 mov r3, r0
a0017e90: e24dd004 sub sp, sp, #4
a0017e94: e1a04001 mov r4, r1
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
a0017e98: e59f008c ldr r0, [pc, #140] ; a0017f2c <rtems_partition_return_buffer+0xa4>
a0017e9c: e1a01003 mov r1, r3
a0017ea0: e1a0200d mov r2, sp
a0017ea4: eb001399 bl a001cd10 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0017ea8: e59d3000 ldr r3, [sp]
a0017eac: e1a05000 mov r5, r0
a0017eb0: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0017eb4: 13a00004 movne r0, #4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0017eb8: 1a000016 bne a0017f18 <rtems_partition_return_buffer+0x90>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
a0017ebc: e5950010 ldr r0, [r5, #16]
a0017ec0: e5953014 ldr r3, [r5, #20]
a0017ec4: e0803003 add r3, r0, r3
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
a0017ec8: e1540003 cmp r4, r3
a0017ecc: 83a03000 movhi r3, #0
a0017ed0: 93a03001 movls r3, #1
a0017ed4: e1540000 cmp r4, r0
a0017ed8: 33a03000 movcc r3, #0
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
a0017edc: e3530000 cmp r3, #0
a0017ee0: 0a00000e beq a0017f20 <rtems_partition_return_buffer+0x98>
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
a0017ee4: e0600004 rsb r0, r0, r4
a0017ee8: e5951018 ldr r1, [r5, #24]
a0017eec: eb00619a bl a003055c <__umodsi3>
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
a0017ef0: e2506000 subs r6, r0, #0
a0017ef4: 1a000009 bne a0017f20 <rtems_partition_return_buffer+0x98>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
a0017ef8: e2850024 add r0, r5, #36 ; 0x24
a0017efc: e1a01004 mov r1, r4
a0017f00: eb000bfb bl a001aef4 <_Chain_Append>
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
a0017f04: e5953020 ldr r3, [r5, #32]
a0017f08: e2433001 sub r3, r3, #1
a0017f0c: e5853020 str r3, [r5, #32]
_Thread_Enable_dispatch();
a0017f10: eb001687 bl a001d934 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0017f14: e1a00006 mov r0, r6
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0017f18: e28dd004 add sp, sp, #4
a0017f1c: e8bd8070 pop {r4, r5, r6, pc}
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
a0017f20: eb001683 bl a001d934 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
a0017f24: e3a00009 mov r0, #9 <== NOT EXECUTED
a0017f28: eafffffa b a0017f18 <rtems_partition_return_buffer+0x90> <== NOT EXECUTED
a001724c <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
a001724c: e92d40f0 push {r4, r5, r6, r7, lr}
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
a0017250: e2504000 subs r4, r0, #0
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
a0017254: e24dd00c sub sp, sp, #12
a0017258: e59d5020 ldr r5, [sp, #32]
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a001725c: 03a00003 moveq r0, #3
rtems_id *id
)
{
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
a0017260: 0a000005 beq a001727c <rtems_port_create+0x30>
return RTEMS_INVALID_NAME;
if ( !id )
a0017264: e3550000 cmp r5, #0
a0017268: 0a000002 beq a0017278 <rtems_port_create+0x2c>
* id - port id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_port_create(
a001726c: e1826001 orr r6, r2, r1
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
a0017270: e2166007 ands r6, r6, #7
a0017274: 0a000002 beq a0017284 <rtems_port_create+0x38>
!_Addresses_Is_aligned( external_start ) )
return RTEMS_INVALID_ADDRESS;
a0017278: e3a00009 mov r0, #9 <== NOT EXECUTED
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a001727c: e28dd00c add sp, sp, #12
a0017280: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0017284: e59f0074 ldr r0, [pc, #116] ; a0017300 <rtems_port_create+0xb4>
a0017288: e590c000 ldr ip, [r0]
a001728c: e28cc001 add ip, ip, #1
a0017290: e580c000 str ip, [r0]
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
_Objects_Allocate( &_Dual_ported_memory_Information );
a0017294: e59f7068 ldr r7, [pc, #104] ; a0017304 <rtems_port_create+0xb8>
a0017298: e58d1008 str r1, [sp, #8]
a001729c: e58d2004 str r2, [sp, #4]
a00172a0: e1a00007 mov r0, r7
a00172a4: e58d3000 str r3, [sp]
a00172a8: eb001553 bl a001c7fc <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
a00172ac: e3500000 cmp r0, #0
a00172b0: e59d1008 ldr r1, [sp, #8]
a00172b4: e59d2004 ldr r2, [sp, #4]
a00172b8: e59d3000 ldr r3, [sp]
a00172bc: 0a00000c beq a00172f4 <rtems_port_create+0xa8>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a00172c0: e590c008 ldr ip, [r0, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a00172c4: e597e01c ldr lr, [r7, #28]
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
the_port->external_base = external_start;
the_port->length = length - 1;
a00172c8: e2433001 sub r3, r3, #1
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a00172cc: e1a0780c lsl r7, ip, #16
if ( !the_port ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
a00172d0: e5801010 str r1, [r0, #16]
the_port->external_base = external_start;
a00172d4: e5802014 str r2, [r0, #20]
the_port->length = length - 1;
a00172d8: e5803018 str r3, [r0, #24]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a00172dc: e78e0727 str r0, [lr, r7, lsr #14]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a00172e0: e580400c str r4, [r0, #12]
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
a00172e4: e585c000 str ip, [r5]
_Thread_Enable_dispatch();
a00172e8: eb001991 bl a001d934 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00172ec: e1a00006 mov r0, r6
a00172f0: eaffffe1 b a001727c <rtems_port_create+0x30>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
_Thread_Enable_dispatch();
a00172f4: eb00198e bl a001d934 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
a00172f8: e3a00005 mov r0, #5
a00172fc: eaffffde b a001727c <rtems_port_create+0x30>
a0017f30 <rtems_rate_monotonic_cancel>:
*/
rtems_status_code rtems_rate_monotonic_cancel(
rtems_id id
)
{
a0017f30: e92d4030 push {r4, r5, lr}
a0017f34: e24dd004 sub sp, sp, #4
a0017f38: e1a01000 mov r1, r0
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
a0017f3c: e1a0200d mov r2, sp
a0017f40: e59f0050 ldr r0, [pc, #80] ; a0017f98 <rtems_rate_monotonic_cancel+0x68>
a0017f44: eb001371 bl a001cd10 <_Objects_Get>
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a0017f48: e59d4000 ldr r4, [sp]
a0017f4c: e1a05000 mov r5, r0
a0017f50: e3540000 cmp r4, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0017f54: 13a00004 movne r0, #4
{
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a0017f58: 1a000006 bne a0017f78 <rtems_rate_monotonic_cancel+0x48>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
a0017f5c: e59f3038 ldr r3, [pc, #56] ; a0017f9c <rtems_rate_monotonic_cancel+0x6c>
a0017f60: e5952040 ldr r2, [r5, #64] ; 0x40
a0017f64: e5933004 ldr r3, [r3, #4]
a0017f68: e1520003 cmp r2, r3
a0017f6c: 0a000003 beq a0017f80 <rtems_rate_monotonic_cancel+0x50>
_Thread_Enable_dispatch();
a0017f70: eb00166f bl a001d934 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_OWNER_OF_RESOURCE;
a0017f74: e3a00017 mov r0, #23 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0017f78: e28dd004 add sp, sp, #4
a0017f7c: e8bd8030 pop {r4, r5, pc}
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
(void) _Watchdog_Remove( &the_period->Timer );
a0017f80: e2850010 add r0, r5, #16
a0017f84: eb001b67 bl a001ed28 <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
a0017f88: e5854038 str r4, [r5, #56] ; 0x38
_Thread_Enable_dispatch();
a0017f8c: eb001668 bl a001d934 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0017f90: e1a00004 mov r0, r4
a0017f94: eafffff7 b a0017f78 <rtems_rate_monotonic_cancel+0x48>
a000a8c4 <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
a000a8c4: e92d4070 push {r4, r5, r6, lr}
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
a000a8c8: e2504000 subs r4, r0, #0
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
a000a8cc: e1a05001 mov r5, r1
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
a000a8d0: 0a00002b beq a000a984 <rtems_rate_monotonic_create+0xc0>
return RTEMS_INVALID_NAME;
if ( !id )
a000a8d4: e3510000 cmp r1, #0
a000a8d8: 0a00002e beq a000a998 <rtems_rate_monotonic_create+0xd4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000a8dc: e59f30bc ldr r3, [pc, #188] ; a000a9a0 <rtems_rate_monotonic_create+0xdc>
a000a8e0: e5932000 ldr r2, [r3]
a000a8e4: e2822001 add r2, r2, #1
a000a8e8: e5832000 str r2, [r3]
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
_Objects_Allocate( &_Rate_monotonic_Information );
a000a8ec: e59f60b0 ldr r6, [pc, #176] ; a000a9a4 <rtems_rate_monotonic_create+0xe0>
a000a8f0: e1a00006 mov r0, r6
a000a8f4: eb00081e bl a000c974 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
a000a8f8: e3500000 cmp r0, #0
a000a8fc: 0a000022 beq a000a98c <rtems_rate_monotonic_create+0xc8>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
a000a900: e59f30a0 ldr r3, [pc, #160] ; a000a9a8 <rtems_rate_monotonic_create+0xe4>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000a904: e5902008 ldr r2, [r0, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a908: e596101c ldr r1, [r6, #28]
a000a90c: e593e004 ldr lr, [r3, #4]
the_period->state = RATE_MONOTONIC_INACTIVE;
a000a910: e3a06000 mov r6, #0
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
a000a914: e3e03102 mvn r3, #-2147483648 ; 0x80000000
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000a918: e1a0c802 lsl ip, r2, #16
if ( !the_period ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
a000a91c: e580e040 str lr, [r0, #64] ; 0x40
the_period->state = RATE_MONOTONIC_INACTIVE;
a000a920: e5806038 str r6, [r0, #56] ; 0x38
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000a924: e5806018 str r6, [r0, #24]
the_watchdog->routine = routine;
a000a928: e580602c str r6, [r0, #44] ; 0x2c
the_watchdog->id = id;
a000a92c: e5806030 str r6, [r0, #48] ; 0x30
the_watchdog->user_data = user_data;
a000a930: e5806034 str r6, [r0, #52] ; 0x34
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
a000a934: e5806054 str r6, [r0, #84] ; 0x54
a000a938: e5806058 str r6, [r0, #88] ; 0x58
a000a93c: e5806064 str r6, [r0, #100] ; 0x64
a000a940: e5806068 str r6, [r0, #104] ; 0x68
a000a944: e580606c str r6, [r0, #108] ; 0x6c
a000a948: e5806070 str r6, [r0, #112] ; 0x70
a000a94c: e580607c str r6, [r0, #124] ; 0x7c
a000a950: e5806080 str r6, [r0, #128] ; 0x80
a000a954: e5806084 str r6, [r0, #132] ; 0x84
a000a958: e5806088 str r6, [r0, #136] ; 0x88
a000a95c: e580305c str r3, [r0, #92] ; 0x5c
a000a960: e5803060 str r3, [r0, #96] ; 0x60
a000a964: e5803074 str r3, [r0, #116] ; 0x74
a000a968: e5803078 str r3, [r0, #120] ; 0x78
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a96c: e781072c str r0, [r1, ip, lsr #14]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000a970: e580400c str r4, [r0, #12]
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
a000a974: e5852000 str r2, [r5]
_Thread_Enable_dispatch();
a000a978: eb000c86 bl a000db98 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a97c: e1a00006 mov r0, r6
a000a980: e8bd8070 pop {r4, r5, r6, pc}
)
{
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a000a984: e3a00003 mov r0, #3 <== NOT EXECUTED
a000a988: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
_Thread_Enable_dispatch();
a000a98c: eb000c81 bl a000db98 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a000a990: e3a00005 mov r0, #5 <== NOT EXECUTED
a000a994: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a000a998: e3a00009 mov r0, #9 <== NOT EXECUTED
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000a99c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a0011470 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
a0011470: e92d4bf0 push {r4, r5, r6, r7, r8, r9, fp, lr} <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
a0011474: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
a0011478: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a001147c: e1a01000 mov r1, r0 <== NOT EXECUTED
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
return RTEMS_INVALID_ADDRESS;
a0011480: 03a00009 moveq r0, #9 <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
a0011484: 0a000024 beq a001151c <rtems_rate_monotonic_get_statistics+0xac><== NOT EXECUTED
a0011488: e59f0094 ldr r0, [pc, #148] ; a0011524 <rtems_rate_monotonic_get_statistics+0xb4><== NOT EXECUTED
a001148c: e1a0200d mov r2, sp <== NOT EXECUTED
a0011490: ebffeeb7 bl a000cf74 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a0011494: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a0011498: e3550000 cmp r5, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001149c: 13a00004 movne r0, #4 <== NOT EXECUTED
if ( !statistics )
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a00114a0: 1a00001d bne a001151c <rtems_rate_monotonic_get_statistics+0xac><== NOT EXECUTED
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
a00114a4: e590e054 ldr lr, [r0, #84] ; 0x54 <== NOT EXECUTED
dst->missed_count = src->missed_count;
a00114a8: e5901058 ldr r1, [r0, #88] ; 0x58 <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
_Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time );
a00114ac: e2803074 add r3, r0, #116 ; 0x74 <== NOT EXECUTED
a00114b0: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
dst->missed_count = src->missed_count;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
a00114b4: e280905c add r9, r0, #92 ; 0x5c <== NOT EXECUTED
a00114b8: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
a00114bc: e2807064 add r7, r0, #100 ; 0x64 <== NOT EXECUTED
a00114c0: e89700c0 ldm r7, {r6, r7} <== NOT EXECUTED
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
a00114c4: e280c06c add ip, r0, #108 ; 0x6c <== NOT EXECUTED
a00114c8: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
_Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time );
a00114cc: e5842020 str r2, [r4, #32] <== NOT EXECUTED
a00114d0: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
_Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time );
a00114d4: e280307c add r3, r0, #124 ; 0x7c <== NOT EXECUTED
a00114d8: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a00114dc: e5842028 str r2, [r4, #40] ; 0x28 <== NOT EXECUTED
a00114e0: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED
_Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time );
a00114e4: e2803084 add r3, r0, #132 ; 0x84 <== NOT EXECUTED
a00114e8: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
switch ( location ) {
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
a00114ec: e584e000 str lr, [r4] <== NOT EXECUTED
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
_Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time );
_Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time );
_Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time );
a00114f0: e5842030 str r2, [r4, #48] ; 0x30 <== NOT EXECUTED
a00114f4: e5843034 str r3, [r4, #52] ; 0x34 <== NOT EXECUTED
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
dst->missed_count = src->missed_count;
a00114f8: e5841004 str r1, [r4, #4] <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
a00114fc: e5848008 str r8, [r4, #8] <== NOT EXECUTED
a0011500: e584900c str r9, [r4, #12] <== NOT EXECUTED
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
a0011504: e5846010 str r6, [r4, #16] <== NOT EXECUTED
a0011508: e5847014 str r7, [r4, #20] <== NOT EXECUTED
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
a001150c: e584b018 str fp, [r4, #24] <== NOT EXECUTED
a0011510: e584c01c str ip, [r4, #28] <== NOT EXECUTED
dst->min_wall_time = src->min_wall_time;
dst->max_wall_time = src->max_wall_time;
dst->total_wall_time = src->total_wall_time;
#endif
_Thread_Enable_dispatch();
a0011514: ebfff19f bl a000db98 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0011518: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a001151c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0011520: e8bd8bf0 pop {r4, r5, r6, r7, r8, r9, fp, pc} <== NOT EXECUTED
a0011528 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
a0011528: e92d4010 push {r4, lr}
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
a001152c: e2514000 subs r4, r1, #0
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
a0011530: e24dd014 sub sp, sp, #20
a0011534: e1a01000 mov r1, r0
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
return RTEMS_INVALID_ADDRESS;
a0011538: 03a00009 moveq r0, #9
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
a001153c: 0a000013 beq a0011590 <rtems_rate_monotonic_get_status+0x68>
a0011540: e28d2010 add r2, sp, #16
a0011544: e59f008c ldr r0, [pc, #140] ; a00115d8 <rtems_rate_monotonic_get_status+0xb0>
a0011548: ebffee89 bl a000cf74 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a001154c: e59d2010 ldr r2, [sp, #16]
a0011550: e1a03000 mov r3, r0
a0011554: e3520000 cmp r2, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0011558: 13a00004 movne r0, #4
if ( !status )
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a001155c: 1a00000b bne a0011590 <rtems_rate_monotonic_get_status+0x68>
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
a0011560: e5932040 ldr r2, [r3, #64] ; 0x40
status->state = the_period->state;
a0011564: e5933038 ldr r3, [r3, #56] ; 0x38
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
a0011568: e5922008 ldr r2, [r2, #8]
status->state = the_period->state;
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
a001156c: e3530000 cmp r3, #0
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
status->state = the_period->state;
a0011570: e884000c stm r4, {r2, r3}
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
a0011574: 1a000007 bne a0011598 <rtems_rate_monotonic_get_status+0x70>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
a0011578: e5843008 str r3, [r4, #8]
a001157c: e584300c str r3, [r4, #12]
_Timespec_Set_to_zero( &status->executed_since_last_period );
a0011580: e5843010 str r3, [r4, #16]
a0011584: e5843014 str r3, [r4, #20]
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
a0011588: ebfff182 bl a000db98 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001158c: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0011590: e28dd014 add sp, sp, #20
a0011594: e8bd8010 pop {r4, pc}
} else {
/*
* Grab the current status.
*/
valid_status =
a0011598: e1a0100d mov r1, sp <== NOT EXECUTED
a001159c: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a00115a0: ebffe50d bl a000a9dc <_Rate_monotonic_Get_status> <== NOT EXECUTED
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
a00115a4: e3500000 cmp r0, #0 <== NOT EXECUTED
a00115a8: 0a000007 beq a00115cc <rtems_rate_monotonic_get_status+0xa4><== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
a00115ac: e89d000c ldm sp, {r2, r3} <== NOT EXECUTED
a00115b0: e5842008 str r2, [r4, #8] <== NOT EXECUTED
a00115b4: e584300c str r3, [r4, #12] <== NOT EXECUTED
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
a00115b8: e28d3008 add r3, sp, #8 <== NOT EXECUTED
a00115bc: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a00115c0: e5842010 str r2, [r4, #16] <== NOT EXECUTED
a00115c4: e5843014 str r3, [r4, #20] <== NOT EXECUTED
a00115c8: eaffffee b a0011588 <rtems_rate_monotonic_get_status+0x60> <== NOT EXECUTED
valid_status =
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
_Thread_Enable_dispatch();
a00115cc: ebfff171 bl a000db98 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
a00115d0: e3a0000b mov r0, #11 <== NOT EXECUTED
a00115d4: eaffffed b a0011590 <rtems_rate_monotonic_get_status+0x68> <== NOT EXECUTED
a000ac08 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
a000ac08: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000ac0c: e1a04000 mov r4, r0
a000ac10: e24dd008 sub sp, sp, #8
a000ac14: e1a05001 mov r5, r1
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
a000ac18: e59f017c ldr r0, [pc, #380] ; a000ad9c <rtems_rate_monotonic_period+0x194>
a000ac1c: e1a01004 mov r1, r4
a000ac20: e28d2004 add r2, sp, #4
a000ac24: eb0008d2 bl a000cf74 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000ac28: e59d3004 ldr r3, [sp, #4]
a000ac2c: e1a06000 mov r6, r0
a000ac30: e3530000 cmp r3, #0
a000ac34: 1a000008 bne a000ac5c <rtems_rate_monotonic_period+0x54>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a000ac38: e59f7160 ldr r7, [pc, #352] ; a000ada0 <rtems_rate_monotonic_period+0x198>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
a000ac3c: e5902040 ldr r2, [r0, #64] ; 0x40
a000ac40: e5973004 ldr r3, [r7, #4]
a000ac44: e1520003 cmp r2, r3
a000ac48: 0a000005 beq a000ac64 <rtems_rate_monotonic_period+0x5c>
_Thread_Enable_dispatch();
a000ac4c: eb000bd1 bl a000db98 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_OWNER_OF_RESOURCE;
a000ac50: e3a00017 mov r0, #23 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000ac54: e28dd008 add sp, sp, #8
a000ac58: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000ac5c: e3a00004 mov r0, #4 <== NOT EXECUTED
a000ac60: eafffffb b a000ac54 <rtems_rate_monotonic_period+0x4c> <== NOT EXECUTED
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
a000ac64: e3550000 cmp r5, #0
a000ac68: 1a000008 bne a000ac90 <rtems_rate_monotonic_period+0x88>
switch ( the_period->state ) {
a000ac6c: e5903038 ldr r3, [r0, #56] ; 0x38
a000ac70: e3530004 cmp r3, #4
a000ac74: 959f2128 ldrls r2, [pc, #296] ; a000ada4 <rtems_rate_monotonic_period+0x19c>
a000ac78: 81a00005 movhi r0, r5
a000ac7c: 97920103 ldrls r0, [r2, r3, lsl #2]
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
a000ac80: e58d0000 str r0, [sp]
a000ac84: eb000bc3 bl a000db98 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
a000ac88: e59d0000 ldr r0, [sp]
a000ac8c: eafffff0 b a000ac54 <rtems_rate_monotonic_period+0x4c>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000ac90: e10f8000 mrs r8, CPSR
a000ac94: e3883080 orr r3, r8, #128 ; 0x80
a000ac98: e129f003 msr CPSR_fc, r3
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
a000ac9c: e5903038 ldr r3, [r0, #56] ; 0x38
a000aca0: e3530000 cmp r3, #0
a000aca4: 0a00000e beq a000ace4 <rtems_rate_monotonic_period+0xdc>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
a000aca8: e3530002 cmp r3, #2
a000acac: 0a00001f beq a000ad30 <rtems_rate_monotonic_period+0x128>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
a000acb0: e3530004 cmp r3, #4 <== NOT EXECUTED
a000acb4: 1affffe8 bne a000ac5c <rtems_rate_monotonic_period+0x54> <== NOT EXECUTED
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
a000acb8: ebffff97 bl a000ab1c <_Rate_monotonic_Update_statistics> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000acbc: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
a000acc0: e3a03002 mov r3, #2 <== NOT EXECUTED
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000acc4: e59f00dc ldr r0, [pc, #220] ; a000ada8 <rtems_rate_monotonic_period+0x1a0><== NOT EXECUTED
a000acc8: e2861010 add r1, r6, #16 <== NOT EXECUTED
a000accc: e5863038 str r3, [r6, #56] ; 0x38 <== NOT EXECUTED
the_period->next_length = length;
a000acd0: e586503c str r5, [r6, #60] ; 0x3c <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000acd4: e586501c str r5, [r6, #28] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000acd8: eb000fb9 bl a000ebc4 <_Watchdog_Insert> <== NOT EXECUTED
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
a000acdc: e3a00006 mov r0, #6 <== NOT EXECUTED
a000ace0: eaffffe6 b a000ac80 <rtems_rate_monotonic_period+0x78> <== NOT EXECUTED
a000ace4: e129f008 msr CPSR_fc, r8
_ISR_Enable( level );
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
a000ace8: ebffff6b bl a000aa9c <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
a000acec: e3a03002 mov r3, #2
a000acf0: e5863038 str r3, [r6, #56] ; 0x38
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000acf4: e59f30b0 ldr r3, [pc, #176] ; a000adac <rtems_rate_monotonic_period+0x1a4>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000acf8: e3a07000 mov r7, #0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000acfc: e59f00a4 ldr r0, [pc, #164] ; a000ada8 <rtems_rate_monotonic_period+0x1a0>
a000ad00: e2861010 add r1, r6, #16
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000ad04: e586302c str r3, [r6, #44] ; 0x2c
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000ad08: e5867018 str r7, [r6, #24]
the_watchdog->routine = routine;
the_watchdog->id = id;
a000ad0c: e5864030 str r4, [r6, #48] ; 0x30
the_watchdog->user_data = user_data;
a000ad10: e5867034 str r7, [r6, #52] ; 0x34
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
a000ad14: e586503c str r5, [r6, #60] ; 0x3c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000ad18: e586501c str r5, [r6, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000ad1c: eb000fa8 bl a000ebc4 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
a000ad20: e58d7000 str r7, [sp]
a000ad24: eb000b9b bl a000db98 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000ad28: e59d0000 ldr r0, [sp]
a000ad2c: eaffffc8 b a000ac54 <rtems_rate_monotonic_period+0x4c>
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
a000ad30: ebffff79 bl a000ab1c <_Rate_monotonic_Update_statistics>
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
a000ad34: e3a03001 mov r3, #1
a000ad38: e5863038 str r3, [r6, #56] ; 0x38
the_period->next_length = length;
a000ad3c: e586503c str r5, [r6, #60] ; 0x3c
a000ad40: e129f008 msr CPSR_fc, r8
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
a000ad44: e5973004 ldr r3, [r7, #4]
a000ad48: e5962008 ldr r2, [r6, #8]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a000ad4c: e3a01901 mov r1, #16384 ; 0x4000
a000ad50: e1a00003 mov r0, r3
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
a000ad54: e5832020 str r2, [r3, #32]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a000ad58: eb000dbf bl a000e45c <_Thread_Set_state>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000ad5c: e10f2000 mrs r2, CPSR
a000ad60: e3823080 orr r3, r2, #128 ; 0x80
a000ad64: e129f003 msr CPSR_fc, r3
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
a000ad68: e3a01002 mov r1, #2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
a000ad6c: e5963038 ldr r3, [r6, #56] ; 0x38
the_period->state = RATE_MONOTONIC_ACTIVE;
a000ad70: e5861038 str r1, [r6, #56] ; 0x38
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ad74: e129f002 msr CPSR_fc, r2
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
a000ad78: e3530003 cmp r3, #3
a000ad7c: 0a000002 beq a000ad8c <rtems_rate_monotonic_period+0x184>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
a000ad80: eb000b84 bl a000db98 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000ad84: e3a00000 mov r0, #0 <== NOT EXECUTED
a000ad88: eaffffb1 b a000ac54 <rtems_rate_monotonic_period+0x4c> <== NOT EXECUTED
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a000ad8c: e5970004 ldr r0, [r7, #4] <== NOT EXECUTED
a000ad90: e3a01901 mov r1, #16384 ; 0x4000 <== NOT EXECUTED
a000ad94: eb000a9d bl a000d810 <_Thread_Clear_state> <== NOT EXECUTED
a000ad98: eafffff8 b a000ad80 <rtems_rate_monotonic_period+0x178> <== NOT EXECUTED
a000afc8 <rtems_rate_monotonic_report_statistics>:
}
}
void rtems_rate_monotonic_report_statistics( void )
{
rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin );
a000afc8: e59f1004 ldr r1, [pc, #4] ; a000afd4 <rtems_rate_monotonic_report_statistics+0xc><== NOT EXECUTED
a000afcc: e3a00000 mov r0, #0 <== NOT EXECUTED
a000afd0: eaffff76 b a000adb0 <rtems_rate_monotonic_report_statistics_with_plugin><== NOT EXECUTED
a000adb0 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a000adb0: 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 )
a000adb4: e2515000 subs r5, r1, #0 <== NOT EXECUTED
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a000adb8: e24dd078 sub sp, sp, #120 ; 0x78 <== NOT EXECUTED
a000adbc: e1a08000 mov r8, 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 )
a000adc0: 0a000040 beq a000aec8 <rtems_rate_monotonic_report_statistics_with_plugin+0x118><== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
a000adc4: e59f11d0 ldr r1, [pc, #464] ; a000af9c <rtems_rate_monotonic_report_statistics_with_plugin+0x1ec><== NOT EXECUTED
a000adc8: e12fff35 blx r5 <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
a000adcc: e59f11cc ldr r1, [pc, #460] ; a000afa0 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f0><== NOT EXECUTED
a000add0: e1a00008 mov r0, r8 <== NOT EXECUTED
a000add4: e12fff35 blx r5 <== NOT EXECUTED
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
a000add8: e59f61c4 ldr r6, [pc, #452] ; a000afa4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f4><== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
(*print)( context, "--- Wall times are in seconds ---\n" );
a000addc: e59f11c4 ldr r1, [pc, #452] ; a000afa8 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f8><== NOT EXECUTED
a000ade0: e1a00008 mov r0, r8 <== NOT EXECUTED
a000ade4: e12fff35 blx r5 <== NOT EXECUTED
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
a000ade8: e59f11bc ldr r1, [pc, #444] ; a000afac <rtems_rate_monotonic_report_statistics_with_plugin+0x1fc><== NOT EXECUTED
a000adec: e1a00008 mov r0, r8 <== NOT EXECUTED
a000adf0: e12fff35 blx r5 <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
a000adf4: e1a00008 mov r0, r8 <== NOT EXECUTED
a000adf8: e59f11b0 ldr r1, [pc, #432] ; a000afb0 <rtems_rate_monotonic_report_statistics_with_plugin+0x200><== NOT EXECUTED
a000adfc: e12fff35 blx r5 <== NOT EXECUTED
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
a000ae00: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED
a000ae04: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
a000ae08: e1540003 cmp r4, r3 <== NOT EXECUTED
a000ae0c: 8a00002d bhi a000aec8 <rtems_rate_monotonic_report_statistics_with_plugin+0x118><== NOT EXECUTED
a000ae10: e28d7018 add r7, sp, #24 <== NOT EXECUTED
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
a000ae14: e2870018 add r0, r7, #24 <== NOT EXECUTED
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
a000ae18: e2871030 add r1, r7, #48 ; 0x30 <== NOT EXECUTED
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
a000ae1c: e59fa190 ldr sl, [pc, #400] ; a000afb4 <rtems_rate_monotonic_report_statistics_with_plugin+0x204><== NOT EXECUTED
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
a000ae20: e28d9070 add r9, sp, #112 ; 0x70 <== NOT EXECUTED
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
a000ae24: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
a000ae28: e28db068 add fp, sp, #104 ; 0x68 <== NOT EXECUTED
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
a000ae2c: e58d1014 str r1, [sp, #20] <== NOT EXECUTED
a000ae30: ea000003 b a000ae44 <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 ;
a000ae34: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
a000ae38: e2844001 add r4, r4, #1 <== 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 ;
a000ae3c: e1530004 cmp r3, r4 <== NOT EXECUTED
a000ae40: 3a000020 bcc a000aec8 <rtems_rate_monotonic_report_statistics_with_plugin+0x118><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
a000ae44: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ae48: e1a01007 mov r1, r7 <== NOT EXECUTED
a000ae4c: eb001987 bl a0011470 <rtems_rate_monotonic_get_statistics> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL )
a000ae50: e3500000 cmp r0, #0 <== NOT EXECUTED
a000ae54: 1afffff6 bne a000ae34 <rtems_rate_monotonic_report_statistics_with_plugin+0x84><== NOT EXECUTED
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
a000ae58: e28d1050 add r1, sp, #80 ; 0x50 <== NOT EXECUTED
a000ae5c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ae60: eb0019b0 bl a0011528 <rtems_rate_monotonic_get_status> <== NOT EXECUTED
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
a000ae64: e1a02009 mov r2, r9 <== NOT EXECUTED
a000ae68: e3a01005 mov r1, #5 <== NOT EXECUTED
a000ae6c: e59d0050 ldr r0, [sp, #80] ; 0x50 <== NOT EXECUTED
a000ae70: eb0000b9 bl a000b15c <rtems_object_get_name> <== NOT EXECUTED
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
a000ae74: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
a000ae78: e59f1138 ldr r1, [pc, #312] ; a000afb8 <rtems_rate_monotonic_report_statistics_with_plugin+0x208><== NOT EXECUTED
a000ae7c: e1a02004 mov r2, r4 <== NOT EXECUTED
a000ae80: e58d3000 str r3, [sp] <== NOT EXECUTED
a000ae84: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
a000ae88: e1a00008 mov r0, r8 <== NOT EXECUTED
a000ae8c: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a000ae90: e1a03009 mov r3, r9 <== NOT EXECUTED
a000ae94: e12fff35 blx r5 <== NOT EXECUTED
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
a000ae98: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
a000ae9c: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
a000aea0: e1a0200b mov r2, fp <== NOT EXECUTED
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
a000aea4: e3530000 cmp r3, #0 <== NOT EXECUTED
(*print)( context, "\n" );
a000aea8: e59f110c ldr r1, [pc, #268] ; a000afbc <rtems_rate_monotonic_report_statistics_with_plugin+0x20c><== NOT EXECUTED
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
a000aeac: 1a000007 bne a000aed0 <rtems_rate_monotonic_report_statistics_with_plugin+0x120><== NOT EXECUTED
(*print)( context, "\n" );
a000aeb0: e1a00008 mov r0, r8 <== NOT EXECUTED
a000aeb4: e12fff35 blx r5 <== NOT EXECUTED
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
a000aeb8: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
a000aebc: e2844001 add r4, r4, #1 <== 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 ;
a000aec0: e1530004 cmp r3, r4 <== NOT EXECUTED
a000aec4: 2affffde bcs a000ae44 <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
}
}
}
a000aec8: e28dd078 add sp, sp, #120 ; 0x78 <== NOT EXECUTED
a000aecc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
a000aed0: e1a01003 mov r1, r3 <== NOT EXECUTED
a000aed4: eb000e3d bl a000e7d0 <_Timespec_Divide_by_integer> <== NOT EXECUTED
(*print)( context,
a000aed8: e59d2024 ldr r2, [sp, #36] ; 0x24 <== NOT EXECUTED
a000aedc: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
a000aee0: e59d102c ldr r1, [sp, #44] ; 0x2c <== NOT EXECUTED
a000aee4: e58d3000 str r3, [sp] <== NOT EXECUTED
a000aee8: e0c3c29a smull ip, r3, sl, r2 <== NOT EXECUTED
a000aeec: e1a02fc2 asr r2, r2, #31 <== NOT EXECUTED
a000aef0: e0623343 rsb r3, r2, r3, asr #6 <== NOT EXECUTED
a000aef4: e59d2068 ldr r2, [sp, #104] ; 0x68 <== NOT EXECUTED
a000aef8: e0c0c19a smull ip, r0, sl, r1 <== NOT EXECUTED
a000aefc: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
a000af00: e59d206c ldr r2, [sp, #108] ; 0x6c <== NOT EXECUTED
a000af04: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED
a000af08: e0611340 rsb r1, r1, r0, asr #6 <== NOT EXECUTED
a000af0c: e0c0c29a smull ip, r0, sl, r2 <== NOT EXECUTED
a000af10: e1a02fc2 asr r2, r2, #31 <== NOT EXECUTED
a000af14: e0622340 rsb r2, r2, r0, asr #6 <== NOT EXECUTED
a000af18: e58d1004 str r1, [sp, #4] <== NOT EXECUTED
a000af1c: e58d200c str r2, [sp, #12] <== NOT EXECUTED
a000af20: e59f1098 ldr r1, [pc, #152] ; a000afc0 <rtems_rate_monotonic_report_statistics_with_plugin+0x210><== NOT EXECUTED
a000af24: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
a000af28: e1a00008 mov r0, r8 <== NOT EXECUTED
a000af2c: e12fff35 blx r5 <== NOT EXECUTED
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
a000af30: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
a000af34: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
a000af38: e1a0200b mov r2, fp <== NOT EXECUTED
a000af3c: eb000e23 bl a000e7d0 <_Timespec_Divide_by_integer> <== NOT EXECUTED
(*print)( context,
a000af40: e59d2040 ldr r2, [sp, #64] ; 0x40 <== NOT EXECUTED
a000af44: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
a000af48: e58d2000 str r2, [sp] <== NOT EXECUTED
a000af4c: e59d2044 ldr r2, [sp, #68] ; 0x44 <== NOT EXECUTED
a000af50: e0c0139a smull r1, r0, sl, r3 <== NOT EXECUTED
a000af54: e0c1c29a smull ip, r1, sl, r2 <== NOT EXECUTED
a000af58: e1a02fc2 asr r2, r2, #31 <== NOT EXECUTED
a000af5c: e0622341 rsb r2, r2, r1, asr #6 <== NOT EXECUTED
a000af60: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
a000af64: e59d2068 ldr r2, [sp, #104] ; 0x68 <== NOT EXECUTED
a000af68: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED
a000af6c: e0633340 rsb r3, r3, r0, asr #6 <== NOT EXECUTED
a000af70: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
a000af74: e59d206c ldr r2, [sp, #108] ; 0x6c <== NOT EXECUTED
a000af78: e59f1044 ldr r1, [pc, #68] ; a000afc4 <rtems_rate_monotonic_report_statistics_with_plugin+0x214><== NOT EXECUTED
a000af7c: e0c0c29a smull ip, r0, sl, r2 <== NOT EXECUTED
a000af80: e1a02fc2 asr r2, r2, #31 <== NOT EXECUTED
a000af84: e0622340 rsb r2, r2, r0, asr #6 <== NOT EXECUTED
a000af88: e58d200c str r2, [sp, #12] <== NOT EXECUTED
a000af8c: e1a00008 mov r0, r8 <== NOT EXECUTED
a000af90: e59d2038 ldr r2, [sp, #56] ; 0x38 <== NOT EXECUTED
a000af94: e12fff35 blx r5 <== NOT EXECUTED
a000af98: eaffffa5 b a000ae34 <rtems_rate_monotonic_report_statistics_with_plugin+0x84><== NOT EXECUTED
a000afd8 <rtems_rate_monotonic_reset_all_statistics>:
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000afd8: e59f3040 ldr r3, [pc, #64] ; a000b020 <rtems_rate_monotonic_reset_all_statistics+0x48><== NOT EXECUTED
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
a000afdc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000afe0: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000afe4: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000afe8: 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 ;
a000afec: e59f5030 ldr r5, [pc, #48] ; a000b024 <rtems_rate_monotonic_reset_all_statistics+0x4c><== NOT EXECUTED
a000aff0: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED
a000aff4: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
a000aff8: e1540003 cmp r4, r3 <== NOT EXECUTED
a000affc: 8a000005 bhi a000b018 <rtems_rate_monotonic_reset_all_statistics+0x40><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
a000b000: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b004: eb000007 bl a000b028 <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 ;
a000b008: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
a000b00c: e2844001 add r4, r4, #1 <== 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 ;
a000b010: e1530004 cmp r3, r4 <== NOT EXECUTED
a000b014: 2afffff9 bcs a000b000 <rtems_rate_monotonic_reset_all_statistics+0x28><== NOT EXECUTED
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
a000b018: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
a000b01c: ea000add b a000db98 <_Thread_Enable_dispatch> <== NOT EXECUTED
a000b028 <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
rtems_id id
)
{
a000b028: e92d4010 push {r4, lr} <== NOT EXECUTED
a000b02c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000b030: e1a01000 mov r1, r0 <== NOT EXECUTED
a000b034: e1a0200d mov r2, sp <== NOT EXECUTED
a000b038: e59f005c ldr r0, [pc, #92] ; a000b09c <rtems_rate_monotonic_reset_statistics+0x74><== NOT EXECUTED
a000b03c: eb0007cc bl a000cf74 <_Objects_Get> <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000b040: e59d4000 ldr r4, [sp] <== NOT EXECUTED
a000b044: e3540000 cmp r4, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000b048: 13a00004 movne r0, #4 <== NOT EXECUTED
{
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000b04c: 1a000010 bne a000b094 <rtems_rate_monotonic_reset_statistics+0x6c><== NOT EXECUTED
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
a000b050: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED
a000b054: e5804054 str r4, [r0, #84] ; 0x54 <== NOT EXECUTED
a000b058: e5804058 str r4, [r0, #88] ; 0x58 <== NOT EXECUTED
a000b05c: e5804064 str r4, [r0, #100] ; 0x64 <== NOT EXECUTED
a000b060: e5804068 str r4, [r0, #104] ; 0x68 <== NOT EXECUTED
a000b064: e580406c str r4, [r0, #108] ; 0x6c <== NOT EXECUTED
a000b068: e5804070 str r4, [r0, #112] ; 0x70 <== NOT EXECUTED
a000b06c: e580407c str r4, [r0, #124] ; 0x7c <== NOT EXECUTED
a000b070: e5804080 str r4, [r0, #128] ; 0x80 <== NOT EXECUTED
a000b074: e5804084 str r4, [r0, #132] ; 0x84 <== NOT EXECUTED
a000b078: e5804088 str r4, [r0, #136] ; 0x88 <== NOT EXECUTED
a000b07c: e580305c str r3, [r0, #92] ; 0x5c <== NOT EXECUTED
a000b080: e5803060 str r3, [r0, #96] ; 0x60 <== NOT EXECUTED
a000b084: e5803074 str r3, [r0, #116] ; 0x74 <== NOT EXECUTED
a000b088: e5803078 str r3, [r0, #120] ; 0x78 <== NOT EXECUTED
_Thread_Enable_dispatch();
a000b08c: eb000ac1 bl a000db98 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b090: e1a00004 mov r0, r4 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000b094: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000b098: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0018718 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0018718: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
a001871c: e2509000 subs r9, r0, #0
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0018720: e24dd004 sub sp, sp, #4
a0018724: e1a05001 mov r5, r1
a0018728: e1a07002 mov r7, r2
a001872c: e1a06003 mov r6, r3
a0018730: e59db02c ldr fp, [sp, #44] ; 0x2c
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0018734: 03a05003 moveq r5, #3
)
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
a0018738: 0a00001a beq a00187a8 <rtems_region_create+0x90>
return RTEMS_INVALID_NAME;
if ( !starting_address )
a001873c: e3550000 cmp r5, #0
a0018740: 0a000035 beq a001881c <rtems_region_create+0x104>
return RTEMS_INVALID_ADDRESS;
if ( !id )
a0018744: e35b0000 cmp fp, #0
a0018748: 0a000033 beq a001881c <rtems_region_create+0x104>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
a001874c: e59f80d0 ldr r8, [pc, #208] ; a0018824 <rtems_region_create+0x10c>
* This function allocates a region control block from
* the inactive chain of free region control blocks.
*/
RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void )
{
return (Region_Control *) _Objects_Allocate( &_Region_Information );
a0018750: e59fa0d0 ldr sl, [pc, #208] ; a0018828 <rtems_region_create+0x110>
a0018754: e5980000 ldr r0, [r8]
a0018758: eb0009bc bl a001ae50 <_API_Mutex_Lock>
a001875c: e1a0000a mov r0, sl
a0018760: eb001025 bl a001c7fc <_Objects_Allocate>
the_region = _Region_Allocate();
if ( !the_region )
a0018764: e2504000 subs r4, r0, #0
return_status = RTEMS_TOO_MANY;
a0018768: 03a05005 moveq r5, #5
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
a001876c: 0a00000b beq a00187a0 <rtems_region_create+0x88>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
a0018770: e2840068 add r0, r4, #104 ; 0x68
a0018774: e1a01005 mov r1, r5
a0018778: e1a02007 mov r2, r7
a001877c: e1a03006 mov r3, r6
a0018780: eb000ef8 bl a001c368 <_Heap_Initialize>
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
a0018784: e3500000 cmp r0, #0
if ( !the_region )
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
a0018788: e584005c str r0, [r4, #92] ; 0x5c
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
a001878c: 1a000008 bne a00187b4 <rtems_region_create+0x9c>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
a0018790: e1a0000a mov r0, sl <== NOT EXECUTED
a0018794: e1a01004 mov r1, r4 <== NOT EXECUTED
a0018798: eb0010f3 bl a001cb6c <_Objects_Free> <== NOT EXECUTED
_Region_Free( the_region );
return_status = RTEMS_INVALID_SIZE;
a001879c: e3a05008 mov r5, #8 <== NOT EXECUTED
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
a00187a0: e5980000 ldr r0, [r8]
a00187a4: eb0009c5 bl a001aec0 <_API_Mutex_Unlock>
return return_status;
}
a00187a8: e1a00005 mov r0, r5
a00187ac: e28dd004 add sp, sp, #4
a00187b0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
a00187b4: e59d3028 ldr r3, [sp, #40] ; 0x28
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
a00187b8: e3a0c000 mov ip, #0
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
a00187bc: e5845050 str r5, [r4, #80] ; 0x50
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
a00187c0: e3130004 tst r3, #4
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
a00187c4: e5843060 str r3, [r4, #96] ; 0x60
the_region->number_of_used_blocks = 0;
a00187c8: e584c064 str ip, [r4, #100] ; 0x64
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
a00187cc: e5847054 str r7, [r4, #84] ; 0x54
the_region->page_size = page_size;
a00187d0: e5846058 str r6, [r4, #88] ; 0x58
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
a00187d4: e2840010 add r0, r4, #16
a00187d8: 03a01000 moveq r1, #0
a00187dc: 13a01001 movne r1, #1
a00187e0: e3a02040 mov r2, #64 ; 0x40
a00187e4: e3a03006 mov r3, #6
a00187e8: e58dc000 str ip, [sp]
a00187ec: eb001630 bl a001e0b4 <_Thread_queue_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a00187f0: e5943008 ldr r3, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a00187f4: e59a201c ldr r2, [sl, #28]
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
a00187f8: e59dc000 ldr ip, [sp]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a00187fc: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0018800: e7824721 str r4, [r2, r1, lsr #14]
}
}
_RTEMS_Unlock_allocator();
a0018804: e5980000 ldr r0, [r8]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0018808: e584900c str r9, [r4, #12]
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
a001880c: e58b3000 str r3, [fp]
return_status = RTEMS_SUCCESSFUL;
a0018810: e1a0500c mov r5, ip
}
}
_RTEMS_Unlock_allocator();
a0018814: eb0009a9 bl a001aec0 <_API_Mutex_Unlock>
a0018818: eaffffe2 b a00187a8 <rtems_region_create+0x90>
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a001881c: e3a05009 mov r5, #9 <== NOT EXECUTED
a0018820: eaffffe0 b a00187a8 <rtems_region_create+0x90> <== NOT EXECUTED
a00188b0 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
a00188b0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
a00188b4: e2518000 subs r8, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
a00188b8: e1a05000 mov r5, r0 <== NOT EXECUTED
a00188bc: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
a00188c0: e1a07002 mov r7, r2 <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
a00188c4: 03a05009 moveq r5, #9 <== NOT EXECUTED
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
a00188c8: 0a00000d beq a0018904 <rtems_region_extend+0x54> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
a00188cc: e59f407c ldr r4, [pc, #124] ; a0018950 <rtems_region_extend+0xa0><== NOT EXECUTED
a00188d0: e5940000 ldr r0, [r4] <== NOT EXECUTED
a00188d4: eb00095d bl a001ae50 <_API_Mutex_Lock> <== NOT EXECUTED
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
a00188d8: e1a01005 mov r1, r5 <== NOT EXECUTED
a00188dc: e59f0070 ldr r0, [pc, #112] ; a0018954 <rtems_region_extend+0xa4><== NOT EXECUTED
a00188e0: e1a0200d mov r2, sp <== NOT EXECUTED
a00188e4: eb0010f9 bl a001ccd0 <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a00188e8: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a00188ec: e1a06000 mov r6, r0 <== NOT EXECUTED
a00188f0: e3550000 cmp r5, #0 <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a00188f4: 13a05004 movne r5, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
a00188f8: 0a000004 beq a0018910 <rtems_region_extend+0x60> <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a00188fc: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0018900: eb00096e bl a001aec0 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a0018904: e1a00005 mov r0, r5 <== NOT EXECUTED
a0018908: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a001890c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
a0018910: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0018914: e1a01008 mov r1, r8 <== NOT EXECUTED
a0018918: e1a02007 mov r2, r7 <== NOT EXECUTED
a001891c: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a0018920: eb000ccf bl a001bc64 <_Heap_Extend> <== NOT EXECUTED
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
a0018924: e3500000 cmp r0, #0 <== NOT EXECUTED
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else {
return_status = RTEMS_INVALID_ADDRESS;
a0018928: 03a05009 moveq r5, #9 <== NOT EXECUTED
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
a001892c: 0afffff2 beq a00188fc <rtems_region_extend+0x4c> <== NOT EXECUTED
the_region->length += amount_extended;
a0018930: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
a0018934: e5962054 ldr r2, [r6, #84] ; 0x54 <== NOT EXECUTED
the_region->maximum_segment_size += amount_extended;
a0018938: e596105c ldr r1, [r6, #92] ; 0x5c <== NOT EXECUTED
length,
&amount_extended
);
if ( extend_ok ) {
the_region->length += amount_extended;
a001893c: e0822003 add r2, r2, r3 <== NOT EXECUTED
the_region->maximum_segment_size += amount_extended;
a0018940: e0813003 add r3, r1, r3 <== NOT EXECUTED
length,
&amount_extended
);
if ( extend_ok ) {
the_region->length += amount_extended;
a0018944: e5862054 str r2, [r6, #84] ; 0x54 <== NOT EXECUTED
the_region->maximum_segment_size += amount_extended;
a0018948: e586305c str r3, [r6, #92] ; 0x5c <== NOT EXECUTED
a001894c: eaffffea b a00188fc <rtems_region_extend+0x4c> <== NOT EXECUTED
a0018958 <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a0018958: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a001895c: e2515000 subs r5, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a0018960: e1a06000 mov r6, r0 <== NOT EXECUTED
a0018964: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
a0018968: 03a06009 moveq r6, #9 <== NOT EXECUTED
{
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a001896c: 0a00000c beq a00189a4 <rtems_region_get_free_information+0x4c><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0018970: e59f4054 ldr r4, [pc, #84] ; a00189cc <rtems_region_get_free_information+0x74><== NOT EXECUTED
a0018974: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0018978: eb000934 bl a001ae50 <_API_Mutex_Lock> <== NOT EXECUTED
a001897c: e1a01006 mov r1, r6 <== NOT EXECUTED
a0018980: e59f0048 ldr r0, [pc, #72] ; a00189d0 <rtems_region_get_free_information+0x78><== NOT EXECUTED
a0018984: e1a0200d mov r2, sp <== NOT EXECUTED
a0018988: eb0010d0 bl a001ccd0 <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a001898c: e59d6000 ldr r6, [sp] <== NOT EXECUTED
a0018990: e3560000 cmp r6, #0 <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a0018994: 13a06004 movne r6, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
a0018998: 0a000004 beq a00189b0 <rtems_region_get_free_information+0x58><== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a001899c: e5940000 ldr r0, [r4] <== NOT EXECUTED
a00189a0: eb000946 bl a001aec0 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a00189a4: e1a00006 mov r0, r6 <== NOT EXECUTED
a00189a8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a00189ac: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->Used.number = 0;
a00189b0: e585600c str r6, [r5, #12] <== NOT EXECUTED
the_info->Used.total = 0;
a00189b4: e5856014 str r6, [r5, #20] <== NOT EXECUTED
the_info->Used.largest = 0;
a00189b8: e5856010 str r6, [r5, #16] <== NOT EXECUTED
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
a00189bc: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a00189c0: e1a01005 mov r1, r5 <== NOT EXECUTED
a00189c4: eb000dc3 bl a001c0d8 <_Heap_Get_free_information> <== NOT EXECUTED
return_status = RTEMS_SUCCESSFUL;
break;
a00189c8: eafffff3 b a001899c <rtems_region_get_free_information+0x44><== NOT EXECUTED
a00189d4 <rtems_region_get_information>:
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a00189d4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a00189d8: e2515000 subs r5, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a00189dc: e1a06000 mov r6, r0 <== NOT EXECUTED
a00189e0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
a00189e4: 03a06009 moveq r6, #9 <== NOT EXECUTED
{
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a00189e8: 0a00000c beq a0018a20 <rtems_region_get_information+0x4c> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a00189ec: e59f4048 ldr r4, [pc, #72] ; a0018a3c <rtems_region_get_information+0x68><== NOT EXECUTED
a00189f0: e5940000 ldr r0, [r4] <== NOT EXECUTED
a00189f4: eb000915 bl a001ae50 <_API_Mutex_Lock> <== NOT EXECUTED
a00189f8: e1a01006 mov r1, r6 <== NOT EXECUTED
a00189fc: e59f003c ldr r0, [pc, #60] ; a0018a40 <rtems_region_get_information+0x6c><== NOT EXECUTED
a0018a00: e1a0200d mov r2, sp <== NOT EXECUTED
a0018a04: eb0010b1 bl a001ccd0 <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a0018a08: e59d6000 ldr r6, [sp] <== NOT EXECUTED
a0018a0c: e3560000 cmp r6, #0 <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a0018a10: 13a06004 movne r6, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
a0018a14: 0a000004 beq a0018a2c <rtems_region_get_information+0x58> <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0018a18: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0018a1c: eb000927 bl a001aec0 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a0018a20: e1a00006 mov r0, r6 <== NOT EXECUTED
a0018a24: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0018a28: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Heap_Get_information( &the_region->Memory, the_info );
a0018a2c: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0018a30: e1a01005 mov r1, r5 <== NOT EXECUTED
a0018a34: eb000dc1 bl a001c140 <_Heap_Get_information> <== NOT EXECUTED
return_status = RTEMS_SUCCESSFUL;
break;
a0018a38: eafffff6 b a0018a18 <rtems_region_get_information+0x44> <== NOT EXECUTED
a0018b88 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
a0018b88: e92d40f0 push {r4, r5, r6, r7, lr}
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
a0018b8c: e2516000 subs r6, r1, #0
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
a0018b90: e24dd004 sub sp, sp, #4
a0018b94: e1a07000 mov r7, r0
a0018b98: e1a05002 mov r5, r2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
a0018b9c: 0a00001b beq a0018c10 <rtems_region_get_segment_size+0x88>
return RTEMS_INVALID_ADDRESS;
if ( !size )
a0018ba0: e3520000 cmp r2, #0
a0018ba4: 0a000019 beq a0018c10 <rtems_region_get_segment_size+0x88>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0018ba8: e59f4068 ldr r4, [pc, #104] ; a0018c18 <rtems_region_get_segment_size+0x90>
a0018bac: e5940000 ldr r0, [r4]
a0018bb0: eb0008a6 bl a001ae50 <_API_Mutex_Lock>
a0018bb4: e59f0060 ldr r0, [pc, #96] ; a0018c1c <rtems_region_get_segment_size+0x94>
a0018bb8: e1a01007 mov r1, r7
a0018bbc: e1a0200d mov r2, sp
a0018bc0: eb001042 bl a001ccd0 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
a0018bc4: e59d3000 ldr r3, [sp]
a0018bc8: e3530000 cmp r3, #0
a0018bcc: 0a000007 beq a0018bf0 <rtems_region_get_segment_size+0x68>
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
a0018bd0: e3530001 cmp r3, #1 <== NOT EXECUTED
a0018bd4: 03a05004 moveq r5, #4 <== NOT EXECUTED
a0018bd8: 13a05000 movne r5, #0 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0018bdc: e5940000 ldr r0, [r4]
a0018be0: eb0008b6 bl a001aec0 <_API_Mutex_Unlock>
return return_status;
}
a0018be4: e1a00005 mov r0, r5
a0018be8: e28dd004 add sp, sp, #4
a0018bec: e8bd80f0 pop {r4, r5, r6, r7, pc}
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
a0018bf0: e1a02005 mov r2, r5
a0018bf4: e2800068 add r0, r0, #104 ; 0x68
a0018bf8: e1a01006 mov r1, r6
a0018bfc: eb000ec4 bl a001c714 <_Heap_Size_of_alloc_area>
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
a0018c00: e3500000 cmp r0, #0
a0018c04: 03a05009 moveq r5, #9
a0018c08: 13a05000 movne r5, #0
a0018c0c: eafffff2 b a0018bdc <rtems_region_get_segment_size+0x54>
if ( !segment )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
a0018c10: e3a05009 mov r5, #9 <== NOT EXECUTED
a0018c14: eafffff2 b a0018be4 <rtems_region_get_segment_size+0x5c> <== NOT EXECUTED
a0018c50 <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
a0018c50: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
uintptr_t osize;
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
a0018c54: e2535000 subs r5, r3, #0 <== NOT EXECUTED
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
a0018c58: e1a08000 mov r8, r0 <== NOT EXECUTED
a0018c5c: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
a0018c60: e1a07001 mov r7, r1 <== NOT EXECUTED
a0018c64: e1a06002 mov r6, r2 <== NOT EXECUTED
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
return RTEMS_INVALID_ADDRESS;
a0018c68: 03a00009 moveq r0, #9 <== NOT EXECUTED
uintptr_t osize;
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
a0018c6c: 0a00000d beq a0018ca8 <rtems_region_resize_segment+0x58> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0018c70: e59f408c ldr r4, [pc, #140] ; a0018d04 <rtems_region_resize_segment+0xb4><== NOT EXECUTED
a0018c74: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0018c78: eb000874 bl a001ae50 <_API_Mutex_Lock> <== NOT EXECUTED
a0018c7c: e1a01008 mov r1, r8 <== NOT EXECUTED
a0018c80: e59f0080 ldr r0, [pc, #128] ; a0018d08 <rtems_region_resize_segment+0xb8><== NOT EXECUTED
a0018c84: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a0018c88: eb001010 bl a001ccd0 <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a0018c8c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a0018c90: e1a08000 mov r8, r0 <== NOT EXECUTED
a0018c94: e3530000 cmp r3, #0 <== NOT EXECUTED
a0018c98: 0a000004 beq a0018cb0 <rtems_region_resize_segment+0x60> <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0018c9c: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0018ca0: eb000886 bl a001aec0 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
a0018ca4: e3a00004 mov r0, #4 <== NOT EXECUTED
}
a0018ca8: e28dd010 add sp, sp, #16 <== NOT EXECUTED
a0018cac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
a0018cb0: e28d300c add r3, sp, #12 <== NOT EXECUTED
a0018cb4: e58d3000 str r3, [sp] <== NOT EXECUTED
a0018cb8: e1a02006 mov r2, r6 <== NOT EXECUTED
a0018cbc: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a0018cc0: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0018cc4: e1a01007 mov r1, r7 <== NOT EXECUTED
a0018cc8: eb000e41 bl a001c5d4 <_Heap_Resize_block> <== NOT EXECUTED
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
a0018ccc: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
a0018cd0: e2506000 subs r6, r0, #0 <== NOT EXECUTED
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
a0018cd4: e5853000 str r3, [r5] <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
a0018cd8: 1a000003 bne a0018cec <rtems_region_resize_segment+0x9c> <== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
a0018cdc: e1a00008 mov r0, r8 <== NOT EXECUTED
a0018ce0: eb0021e6 bl a0021480 <_Region_Process_queue> <== NOT EXECUTED
else
_RTEMS_Unlock_allocator();
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
a0018ce4: e1a00006 mov r0, r6 <== NOT EXECUTED
a0018ce8: eaffffee b a0018ca8 <rtems_region_resize_segment+0x58> <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
a0018cec: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0018cf0: eb000872 bl a001aec0 <_API_Mutex_Unlock> <== NOT EXECUTED
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
return RTEMS_UNSATISFIED;
a0018cf4: e3560001 cmp r6, #1 <== NOT EXECUTED
a0018cf8: 13a00009 movne r0, #9 <== NOT EXECUTED
a0018cfc: 03a0000d moveq r0, #13 <== NOT EXECUTED
a0018d00: eaffffe8 b a0018ca8 <rtems_region_resize_segment+0x58> <== NOT EXECUTED
a0018d0c <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
a0018d0c: e92d40f0 push {r4, r5, r6, r7, lr}
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
a0018d10: e59f4078 ldr r4, [pc, #120] ; a0018d90 <rtems_region_return_segment+0x84>
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
a0018d14: e24dd004 sub sp, sp, #4
a0018d18: e1a06000 mov r6, r0
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
a0018d1c: e5940000 ldr r0, [r4]
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
a0018d20: e1a05001 mov r5, r1
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
a0018d24: eb000849 bl a001ae50 <_API_Mutex_Lock>
a0018d28: e1a01006 mov r1, r6
a0018d2c: e59f0060 ldr r0, [pc, #96] ; a0018d94 <rtems_region_return_segment+0x88>
a0018d30: e1a0200d mov r2, sp
a0018d34: eb000fe5 bl a001ccd0 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
a0018d38: e59d6000 ldr r6, [sp]
a0018d3c: e1a07000 mov r7, r0
a0018d40: e3560000 cmp r6, #0
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a0018d44: 13a06004 movne r6, #4
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
a0018d48: 1a000005 bne a0018d64 <rtems_region_return_segment+0x58>
RTEMS_INLINE_ROUTINE bool _Region_Free_segment (
Region_Control *the_region,
void *the_segment
)
{
return _Heap_Free( &the_region->Memory, the_segment );
a0018d4c: e2800068 add r0, r0, #104 ; 0x68
a0018d50: e1a01005 mov r1, r5
a0018d54: eb000c6f bl a001bf18 <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
a0018d58: e3500000 cmp r0, #0
return_status = RTEMS_INVALID_ADDRESS;
a0018d5c: 03a06009 moveq r6, #9
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
a0018d60: 1a000004 bne a0018d78 <rtems_region_return_segment+0x6c>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0018d64: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0018d68: eb000854 bl a001aec0 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a0018d6c: e1a00006 mov r0, r6
a0018d70: e28dd004 add sp, sp, #4
a0018d74: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
a0018d78: e5973064 ldr r3, [r7, #100] ; 0x64
_Region_Process_queue(the_region); /* unlocks allocator */
a0018d7c: e1a00007 mov r0, r7
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
a0018d80: e2433001 sub r3, r3, #1
a0018d84: e5873064 str r3, [r7, #100] ; 0x64
_Region_Process_queue(the_region); /* unlocks allocator */
a0018d88: eb0021bc bl a0021480 <_Region_Process_queue>
return RTEMS_SUCCESSFUL;
a0018d8c: eafffff6 b a0018d6c <rtems_region_return_segment+0x60>
a0009850 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
a0009850: e92d41f0 push {r4, r5, r6, r7, r8, lr}
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
a0009854: e2505000 subs r5, r0, #0
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
a0009858: e24dd020 sub sp, sp, #32
a000985c: e1a04001 mov r4, r1
a0009860: e59d6038 ldr r6, [sp, #56] ; 0x38
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0009864: 03a00003 moveq r0, #3
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
a0009868: 0a000008 beq a0009890 <rtems_semaphore_create+0x40>
return RTEMS_INVALID_NAME;
if ( !id )
a000986c: e3560000 cmp r6, #0
return RTEMS_INVALID_ADDRESS;
a0009870: 03a00009 moveq r0, #9
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a0009874: 0a000005 beq a0009890 <rtems_semaphore_create+0x40>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
a0009878: e21210c0 ands r1, r2, #192 ; 0xc0
a000987c: 0a000037 beq a0009960 <rtems_semaphore_create+0x110>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
a0009880: e2028030 and r8, r2, #48 ; 0x30
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
a0009884: e3580010 cmp r8, #16
a0009888: 0a000002 beq a0009898 <rtems_semaphore_create+0x48>
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
a000988c: e3a0000b mov r0, #11 <== NOT EXECUTED
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a0009890: e28dd020 add sp, sp, #32
a0009894: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
a0009898: e3120004 tst r2, #4
a000989c: 0afffffa beq a000988c <rtems_semaphore_create+0x3c>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
a00098a0: e35100c0 cmp r1, #192 ; 0xc0
a00098a4: 0afffff8 beq a000988c <rtems_semaphore_create+0x3c>
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
a00098a8: e3540001 cmp r4, #1
return RTEMS_INVALID_NUMBER;
a00098ac: 83a0000a movhi r0, #10
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 ) )
a00098b0: 8afffff6 bhi a0009890 <rtems_semaphore_create+0x40>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a00098b4: e59f1150 ldr r1, [pc, #336] ; a0009a0c <rtems_semaphore_create+0x1bc>
a00098b8: e5910000 ldr r0, [r1]
a00098bc: e2800001 add r0, r0, #1
a00098c0: e5810000 str r0, [r1]
* 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 );
a00098c4: e59f0144 ldr r0, [pc, #324] ; a0009a10 <rtems_semaphore_create+0x1c0>
a00098c8: e58d2004 str r2, [sp, #4]
a00098cc: e58d3000 str r3, [sp]
a00098d0: eb00055d bl a000ae4c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
a00098d4: e2507000 subs r7, r0, #0
a00098d8: e59d2004 ldr r2, [sp, #4]
a00098dc: e59d3000 ldr r3, [sp]
a00098e0: 0a00002f beq a00099a4 <rtems_semaphore_create+0x154>
the_semaphore->attribute_set = attribute_set;
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
a00098e4: e3580000 cmp r8, #0
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
a00098e8: e5872010 str r2, [r7, #16]
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
a00098ec: 0a00001e beq a000996c <rtems_semaphore_create+0x11c>
} else {
/*
* It is either simple binary semaphore or a more powerful mutex
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
a00098f0: e2121004 ands r1, r2, #4
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
a00098f4: 13a01001 movne r1, #1
a00098f8: 158d1010 strne r1, [sp, #16]
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
a00098fc: 058d1010 streq r1, [sp, #16]
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
a0009900: e3580010 cmp r8, #16
a0009904: 0a000029 beq a00099b0 <rtems_semaphore_create+0x160>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
a0009908: e3a03002 mov r3, #2
a000990c: e58d3008 str r3, [sp, #8]
the_mutex_attr.only_owner_release = false;
a0009910: e3a03000 mov r3, #0
a0009914: e5cd300c strb r3, [sp, #12]
}
mutex_status = _CORE_mutex_Initialize(
a0009918: e3540001 cmp r4, #1
a000991c: 13a02000 movne r2, #0
a0009920: 03a02001 moveq r2, #1
a0009924: e2870014 add r0, r7, #20
a0009928: e28d1008 add r1, sp, #8
a000992c: eb0002f4 bl a000a504 <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attr,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
a0009930: e3500006 cmp r0, #6
a0009934: 0a00002e beq a00099f4 <rtems_semaphore_create+0x1a4>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0009938: e59f20d0 ldr r2, [pc, #208] ; a0009a10 <rtems_semaphore_create+0x1c0>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000993c: e5973008 ldr r3, [r7, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0009940: e592201c ldr r2, [r2, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0009944: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0009948: e7827721 str r7, [r2, r1, lsr #14]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000994c: e587500c str r5, [r7, #12]
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
a0009950: e5863000 str r3, [r6]
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
a0009954: eb00097a bl a000bf44 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009958: e3a00000 mov r0, #0
a000995c: eaffffcb b a0009890 <rtems_semaphore_create+0x40>
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 ) )
a0009960: e2128030 ands r8, r2, #48 ; 0x30
a0009964: 1affffcf bne a00098a8 <rtems_semaphore_create+0x58>
a0009968: eaffffd1 b a00098b4 <rtems_semaphore_create+0x64>
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
a000996c: e3120004 tst r2, #4
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
a0009970: e3e03000 mvn r3, #0
a0009974: e58d3018 str r3, [sp, #24]
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
a0009978: 13a03001 movne r3, #1
a000997c: 158d301c strne r3, [sp, #28]
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
a0009980: e2870014 add r0, r7, #20
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
a0009984: e3a03000 mov r3, #0
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
a0009988: e28d1018 add r1, sp, #24
a000998c: e1a02004 mov r2, r4
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
else
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
a0009990: 058d801c streq r8, [sp, #28]
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
a0009994: e58d3008 str r3, [sp, #8]
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
a0009998: e58d3014 str r3, [sp, #20]
_CORE_semaphore_Initialize(
a000999c: eb0003a7 bl a000a840 <_CORE_semaphore_Initialize>
a00099a0: eaffffe4 b a0009938 <rtems_semaphore_create+0xe8>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
a00099a4: eb000966 bl a000bf44 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
a00099a8: e3a00005 mov r0, #5
a00099ac: eaffffb7 b a0009890 <rtems_semaphore_create+0x40>
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
a00099b0: e59d0010 ldr r0, [sp, #16]
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
a00099b4: e3a01000 mov r1, #0
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
a00099b8: e58d3014 str r3, [sp, #20]
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
a00099bc: e3500001 cmp r0, #1
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
a00099c0: e58d1008 str r1, [sp, #8]
the_mutex_attr.only_owner_release = false;
a00099c4: e5cd100c strb r1, [sp, #12]
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
a00099c8: 1affffd2 bne a0009918 <rtems_semaphore_create+0xc8>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
a00099cc: e3120040 tst r2, #64 ; 0x40
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
a00099d0: 13a03002 movne r3, #2
a00099d4: 158d3010 strne r3, [sp, #16]
the_mutex_attr.only_owner_release = true;
a00099d8: 15cd000c strbne r0, [sp, #12]
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
a00099dc: 1affffcd bne a0009918 <rtems_semaphore_create+0xc8>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
the_mutex_attr.only_owner_release = true;
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
a00099e0: e3120080 tst r2, #128 ; 0x80
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
a00099e4: 13a03003 movne r3, #3
a00099e8: 158d3010 strne r3, [sp, #16]
the_mutex_attr.only_owner_release = true;
a00099ec: 15cd000c strbne r0, [sp, #12]
a00099f0: eaffffc8 b a0009918 <rtems_semaphore_create+0xc8>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
a00099f4: e59f0014 ldr r0, [pc, #20] ; a0009a10 <rtems_semaphore_create+0x1c0>
a00099f8: e1a01007 mov r1, r7
a00099fc: eb0005ee bl a000b1bc <_Objects_Free>
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
a0009a00: eb00094f bl a000bf44 <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
a0009a04: e3a00013 mov r0, #19
a0009a08: eaffffa0 b a0009890 <rtems_semaphore_create+0x40>
a0009a14 <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
a0009a14: e92d4010 push {r4, lr}
a0009a18: e24dd004 sub sp, sp, #4
a0009a1c: e1a01000 mov r1, r0
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
a0009a20: e1a0200d mov r2, sp
a0009a24: e59f0088 ldr r0, [pc, #136] ; a0009ab4 <rtems_semaphore_delete+0xa0>
a0009a28: eb00063c bl a000b320 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a0009a2c: e59d3000 ldr r3, [sp]
a0009a30: e1a04000 mov r4, r0
a0009a34: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0009a38: 13a00004 movne r0, #4
{
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a0009a3c: 1a000009 bne a0009a68 <rtems_semaphore_delete+0x54>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
a0009a40: e5941010 ldr r1, [r4, #16]
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
a0009a44: e2111030 ands r1, r1, #48 ; 0x30
a0009a48: 0a000015 beq a0009aa4 <rtems_semaphore_delete+0x90>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
a0009a4c: e5943064 ldr r3, [r4, #100] ; 0x64
a0009a50: e3530000 cmp r3, #0
a0009a54: 1a000005 bne a0009a70 <rtems_semaphore_delete+0x5c>
a0009a58: e3510020 cmp r1, #32
a0009a5c: 0a000003 beq a0009a70 <rtems_semaphore_delete+0x5c>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
a0009a60: eb000937 bl a000bf44 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
a0009a64: e3a0000c mov r0, #12 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0009a68: e28dd004 add sp, sp, #4
a0009a6c: e8bd8010 pop {r4, pc}
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
a0009a70: e2840014 add r0, r4, #20
a0009a74: e3a01000 mov r1, #0
a0009a78: e3a02004 mov r2, #4
a0009a7c: eb00029f bl a000a500 <_CORE_mutex_Flush>
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
a0009a80: e1a01004 mov r1, r4
a0009a84: e59f0028 ldr r0, [pc, #40] ; a0009ab4 <rtems_semaphore_delete+0xa0>
a0009a88: eb000514 bl a000aee0 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
a0009a8c: e59f0020 ldr r0, [pc, #32] ; a0009ab4 <rtems_semaphore_delete+0xa0>
a0009a90: e1a01004 mov r1, r4
a0009a94: eb0005c8 bl a000b1bc <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
a0009a98: eb000929 bl a000bf44 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009a9c: e3a00000 mov r0, #0
a0009aa0: eafffff0 b a0009a68 <rtems_semaphore_delete+0x54>
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
a0009aa4: e2840014 add r0, r4, #20
a0009aa8: e3a02002 mov r2, #2
a0009aac: eb000362 bl a000a83c <_CORE_semaphore_Flush>
a0009ab0: eafffff2 b a0009a80 <rtems_semaphore_delete+0x6c>
a00134d0 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
a00134d0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
a00134d4: e24dd004 sub sp, sp, #4
a00134d8: e1a01000 mov r1, r0
a00134dc: e1a0200d mov r2, sp
a00134e0: e59f004c ldr r0, [pc, #76] ; a0013534 <rtems_semaphore_flush+0x64>
a00134e4: ebffe43f bl a000c5e8 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a00134e8: e59d3000 ldr r3, [sp]
a00134ec: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a00134f0: 13a00004 movne r0, #4
{
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a00134f4: 1a000007 bne a0013518 <rtems_semaphore_flush+0x48>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
a00134f8: e5901010 ldr r1, [r0, #16]
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
a00134fc: e2111030 ands r1, r1, #48 ; 0x30
a0013500: 1a000006 bne a0013520 <rtems_semaphore_flush+0x50>
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
a0013504: e2800014 add r0, r0, #20
a0013508: e3a02001 mov r2, #1
a001350c: ebffe19c bl a000bb84 <_CORE_semaphore_Flush> <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
a0013510: ebffe743 bl a000d224 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0013514: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0013518: e28dd004 add sp, sp, #4
a001351c: 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(
a0013520: e2800014 add r0, r0, #20
a0013524: e1a01003 mov r1, r3
a0013528: e3a02001 mov r2, #1
a001352c: ebffe0c5 bl a000b848 <_CORE_mutex_Flush>
a0013530: eafffff6 b a0013510 <rtems_semaphore_flush+0x40>
a0009ab8 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
a0009ab8: e92d40f0 push {r4, r5, r6, r7, lr}
a0009abc: e1a04000 mov r4, r0
a0009ac0: e24dd00c sub sp, sp, #12
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
_Objects_Get_isr_disable( &_Semaphore_Information, id, location, level );
a0009ac4: e28d3004 add r3, sp, #4
a0009ac8: e1a05001 mov r5, r1
a0009acc: e1a06002 mov r6, r2
a0009ad0: e59f00f4 ldr r0, [pc, #244] ; a0009bcc <rtems_semaphore_obtain+0x114>
a0009ad4: e1a01004 mov r1, r4
a0009ad8: e28d2008 add r2, sp, #8
a0009adc: eb0005f3 bl a000b2b0 <_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 ) {
a0009ae0: e59d3008 ldr r3, [sp, #8]
a0009ae4: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0009ae8: 13a00004 movne r0, #4
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
a0009aec: 1a00000e bne a0009b2c <rtems_semaphore_obtain+0x74>
a0009af0: e5903010 ldr r3, [r0, #16]
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
a0009af4: e2133030 ands r3, r3, #48 ; 0x30
a0009af8: 0a00000d beq a0009b34 <rtems_semaphore_obtain+0x7c>
_CORE_mutex_Seize(
a0009afc: e59d3004 ldr r3, [sp, #4]
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
a0009b00: e2052001 and r2, r5, #1
a0009b04: e2800014 add r0, r0, #20
a0009b08: e58d3000 str r3, [sp]
a0009b0c: e2222001 eor r2, r2, #1
a0009b10: e1a03006 mov r3, r6
a0009b14: e1a01004 mov r1, r4
a0009b18: eb0002c3 bl a000a62c <_CORE_mutex_Seize>
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
_Thread_Executing->Wait.return_code );
a0009b1c: e59f30ac ldr r3, [pc, #172] ; a0009bd0 <rtems_semaphore_obtain+0x118>
a0009b20: e5933004 ldr r3, [r3, #4]
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
a0009b24: e5930034 ldr r0, [r3, #52] ; 0x34
a0009b28: eb00004c bl a0009c60 <_Semaphore_Translate_core_mutex_return_code>
break;
}
return RTEMS_INVALID_ID;
}
a0009b2c: e28dd00c add sp, sp, #12
a0009b30: e8bd80f0 pop {r4, r5, r6, r7, pc}
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a0009b34: e59f7094 ldr r7, [pc, #148] ; a0009bd0 <rtems_semaphore_obtain+0x118>
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
a0009b38: e590105c ldr r1, [r0, #92] ; 0x5c
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a0009b3c: e5972004 ldr r2, [r7, #4]
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
a0009b40: e3510000 cmp r1, #0
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
a0009b44: e5823034 str r3, [r2, #52] ; 0x34
if ( the_semaphore->count != 0 ) {
a0009b48: 1a000009 bne a0009b74 <rtems_semaphore_obtain+0xbc>
the_semaphore->count -= 1;
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
a0009b4c: e3150001 tst r5, #1
a0009b50: 0a00000c beq a0009b88 <rtems_semaphore_obtain+0xd0>
a0009b54: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
a0009b58: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Enable( *level_p );
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
a0009b5c: e3a03001 mov r3, #1 <== NOT EXECUTED
a0009b60: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
_Thread_Executing->Wait.return_code );
a0009b64: e5973004 ldr r3, [r7, #4]
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
a0009b68: e5930034 ldr r0, [r3, #52] ; 0x34
a0009b6c: eb00003f bl a0009c70 <_Semaphore_Translate_core_semaphore_return_code>
a0009b70: eaffffed b a0009b2c <rtems_semaphore_obtain+0x74>
/* 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;
a0009b74: e2411001 sub r1, r1, #1
a0009b78: e580105c str r1, [r0, #92] ; 0x5c
a0009b7c: e59d3004 ldr r3, [sp, #4]
a0009b80: e129f003 msr CPSR_fc, r3
a0009b84: eafffff6 b a0009b64 <rtems_semaphore_obtain+0xac>
a0009b88: e59f3044 ldr r3, [pc, #68] ; a0009bd4 <rtems_semaphore_obtain+0x11c>
a0009b8c: e5931000 ldr r1, [r3]
a0009b90: e2811001 add r1, r1, #1
a0009b94: e5831000 str r1, [r3]
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;
a0009b98: e3a01001 mov r1, #1
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
a0009b9c: e2803014 add r3, r0, #20
a0009ba0: e5801044 str r1, [r0, #68] ; 0x44
a0009ba4: e5823044 str r3, [r2, #68] ; 0x44
executing->Wait.id = id;
a0009ba8: e5824020 str r4, [r2, #32]
a0009bac: e59d2004 ldr r2, [sp, #4]
a0009bb0: e129f002 msr CPSR_fc, r2
_ISR_Enable( *level_p );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
a0009bb4: e59f201c ldr r2, [pc, #28] ; a0009bd8 <rtems_semaphore_obtain+0x120>
a0009bb8: e1a00003 mov r0, r3
a0009bbc: e1a01006 mov r1, r6
a0009bc0: eb000a11 bl a000c40c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
a0009bc4: eb0008de bl a000bf44 <_Thread_Enable_dispatch>
a0009bc8: eaffffe5 b a0009b64 <rtems_semaphore_obtain+0xac>
a0019268 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
a0019268: e92d4010 push {r4, lr}
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
a001926c: e2514000 subs r4, r1, #0
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
a0019270: e24dd004 sub sp, sp, #4
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
a0019274: 03a0000a moveq r0, #10
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
a0019278: 1a000001 bne a0019284 <rtems_signal_send+0x1c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a001927c: e28dd004 add sp, sp, #4
a0019280: e8bd8010 pop {r4, pc}
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
a0019284: e1a0100d mov r1, sp
a0019288: eb0011b2 bl a001d958 <_Thread_Get>
switch ( location ) {
a001928c: e59d3000 ldr r3, [sp]
a0019290: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0019294: 13a00004 movne r0, #4
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a0019298: 1afffff7 bne a001927c <rtems_signal_send+0x14>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
a001929c: e59030f8 ldr r3, [r0, #248] ; 0xf8
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
a00192a0: e593200c ldr r2, [r3, #12]
a00192a4: e3520000 cmp r2, #0
a00192a8: 0a00001c beq a0019320 <rtems_signal_send+0xb8>
if ( asr->is_enabled ) {
a00192ac: e5d32008 ldrb r2, [r3, #8]
a00192b0: e3520000 cmp r2, #0
a00192b4: 0a00000f beq a00192f8 <rtems_signal_send+0x90>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a00192b8: e10f2000 mrs r2, CPSR
a00192bc: e3821080 orr r1, r2, #128 ; 0x80
a00192c0: e129f001 msr CPSR_fc, r1
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
a00192c4: e5931014 ldr r1, [r3, #20]
a00192c8: e1814004 orr r4, r1, r4
a00192cc: e5834014 str r4, [r3, #20]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00192d0: e129f002 msr CPSR_fc, r2
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
a00192d4: e59f3050 ldr r3, [pc, #80] ; a001932c <rtems_signal_send+0xc4>
a00192d8: e5932000 ldr r2, [r3]
a00192dc: e3520000 cmp r2, #0
a00192e0: 0a00000b beq a0019314 <rtems_signal_send+0xac>
a00192e4: e5932004 ldr r2, [r3, #4]
a00192e8: e1500002 cmp r0, r2
_Thread_Dispatch_necessary = true;
a00192ec: 03a02001 moveq r2, #1
a00192f0: 05c32010 strbeq r2, [r3, #16] <== NOT EXECUTED
a00192f4: ea000006 b a0019314 <rtems_signal_send+0xac> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a00192f8: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a00192fc: e3821080 orr r1, r2, #128 ; 0x80 <== NOT EXECUTED
a0019300: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
a0019304: e5931018 ldr r1, [r3, #24] <== NOT EXECUTED
a0019308: e1814004 orr r4, r1, r4 <== NOT EXECUTED
a001930c: e5834018 str r4, [r3, #24] <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0019310: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
a0019314: eb001186 bl a001d934 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0019318: e3a00000 mov r0, #0
a001931c: eaffffd6 b a001927c <rtems_signal_send+0x14>
}
_Thread_Enable_dispatch();
a0019320: eb001183 bl a001d934 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
a0019324: e3a0000b mov r0, #11
a0019328: eaffffd3 b a001927c <rtems_signal_send+0x14> <== NOT EXECUTED
a0009dc0 <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
rtems_id id
)
{
a0009dc0: e92d4070 push {r4, r5, r6, lr}
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
a0009dc4: e59f4070 ldr r4, [pc, #112] ; a0009e3c <rtems_task_delete+0x7c>
*/
rtems_status_code rtems_task_delete(
rtems_id id
)
{
a0009dc8: e24dd004 sub sp, sp, #4
a0009dcc: e1a05000 mov r5, r0
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
a0009dd0: e5940000 ldr r0, [r4]
a0009dd4: eb000180 bl a000a3dc <_API_Mutex_Lock>
the_thread = _Thread_Get( id, &location );
a0009dd8: e1a00005 mov r0, r5
a0009ddc: e1a0100d mov r1, sp
a0009de0: eb000860 bl a000bf68 <_Thread_Get>
switch ( location ) {
a0009de4: e59d5000 ldr r5, [sp]
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
the_thread = _Thread_Get( id, &location );
a0009de8: e1a06000 mov r6, r0
switch ( location ) {
a0009dec: e3550000 cmp r5, #0
a0009df0: 1a00000d bne a0009e2c <rtems_task_delete+0x6c>
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
a0009df4: e5900008 ldr r0, [r0, #8]
a0009df8: eb00050d bl a000b234 <_Objects_Get_information_id>
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
a0009dfc: e1a01006 mov r1, r6
a0009e00: eb000782 bl a000bc10 <_Thread_Close>
a0009e04: e5960008 ldr r0, [r6, #8]
a0009e08: eb000509 bl a000b234 <_Objects_Get_information_id>
a0009e0c: e1a01006 mov r1, r6
a0009e10: eb0004e9 bl a000b1bc <_Objects_Free>
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
a0009e14: e5940000 ldr r0, [r4]
a0009e18: eb00018b bl a000a44c <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
a0009e1c: eb000848 bl a000bf44 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009e20: e1a00005 mov r0, r5
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
a0009e24: e28dd004 add sp, sp, #4
a0009e28: e8bd8070 pop {r4, r5, r6, pc}
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
a0009e2c: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0009e30: eb000185 bl a000a44c <_API_Mutex_Unlock> <== NOT EXECUTED
return RTEMS_INVALID_ID;
a0009e34: e3a00004 mov r0, #4 <== NOT EXECUTED
a0009e38: eafffff9 b a0009e24 <rtems_task_delete+0x64> <== NOT EXECUTED
a000bf40 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
a000bf40: e92d4030 push {r4, r5, lr}
a000bf44: e1a04001 mov r4, r1
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000bf48: e59f10a4 ldr r1, [pc, #164] ; a000bff4 <rtems_task_get_note+0xb4>
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
a000bf4c: e1a03000 mov r3, r0
a000bf50: e24dd008 sub sp, sp, #8
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000bf54: e5d11004 ldrb r1, [r1, #4]
a000bf58: e3510000 cmp r1, #0
return RTEMS_NOT_CONFIGURED;
a000bf5c: 03a00016 moveq r0, #22
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000bf60: 0a000019 beq a000bfcc <rtems_task_get_note+0x8c>
return RTEMS_NOT_CONFIGURED;
if ( !note )
a000bf64: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a000bf68: 03a00009 moveq r0, #9
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
a000bf6c: 0a000016 beq a000bfcc <rtems_task_get_note+0x8c>
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
a000bf70: e354000f cmp r4, #15
return RTEMS_INVALID_NUMBER;
a000bf74: 83a0000a movhi r0, #10
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
a000bf78: 8a000013 bhi a000bfcc <rtems_task_get_note+0x8c>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000bf7c: e3530000 cmp r3, #0
a000bf80: 0a000013 beq a000bfd4 <rtems_task_get_note+0x94>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
a000bf84: e59f106c ldr r1, [pc, #108] ; a000bff8 <rtems_task_get_note+0xb8>
a000bf88: e5911004 ldr r1, [r1, #4]
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000bf8c: e591c008 ldr ip, [r1, #8]
a000bf90: e153000c cmp r3, ip
a000bf94: 0a000010 beq a000bfdc <rtems_task_get_note+0x9c>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
a000bf98: e28d1004 add r1, sp, #4
a000bf9c: e58d2000 str r2, [sp]
a000bfa0: eb000923 bl a000e434 <_Thread_Get>
switch ( location ) {
a000bfa4: e89d0024 ldm sp, {r2, r5}
a000bfa8: e3550000 cmp r5, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000bfac: 13a00004 movne r0, #4
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000bfb0: 1a000005 bne a000bfcc <rtems_task_get_note+0x8c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
a000bfb4: e59030f8 ldr r3, [r0, #248] ; 0xf8
a000bfb8: e2844008 add r4, r4, #8
a000bfbc: e7933104 ldr r3, [r3, r4, lsl #2]
a000bfc0: e5823000 str r3, [r2]
_Thread_Enable_dispatch();
a000bfc4: eb000911 bl a000e410 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000bfc8: e1a00005 mov r0, r5
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000bfcc: e28dd008 add sp, sp, #8
a000bfd0: e8bd8030 pop {r4, r5, pc}
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000bfd4: e59f301c ldr r3, [pc, #28] ; a000bff8 <rtems_task_get_note+0xb8>
a000bfd8: e5931004 ldr r1, [r3, #4]
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
a000bfdc: e59130f8 ldr r3, [r1, #248] ; 0xf8 <== NOT EXECUTED
a000bfe0: e2844008 add r4, r4, #8 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000bfe4: e3a00000 mov r0, #0 <== NOT EXECUTED
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
a000bfe8: e7933104 ldr r3, [r3, r4, lsl #2] <== NOT EXECUTED
a000bfec: e5823000 str r3, [r2] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000bff0: eafffff5 b a000bfcc <rtems_task_get_note+0x8c> <== NOT EXECUTED
a0009e40 <rtems_task_ident>:
rtems_id *id
)
{
Objects_Name_or_id_lookup_errors status;
if ( !id )
a0009e40: e2523000 subs r3, r2, #0
rtems_status_code rtems_task_ident(
rtems_name name,
uint32_t node,
rtems_id *id
)
{
a0009e44: e52de004 push {lr} ; (str lr, [sp, #-4]!)
a0009e48: e1a0c000 mov ip, r0
a0009e4c: e1a02001 mov r2, r1
Objects_Name_or_id_lookup_errors status;
if ( !id )
a0009e50: 0a00000c beq a0009e88 <rtems_task_ident+0x48>
return RTEMS_INVALID_ADDRESS;
if ( name == OBJECTS_ID_OF_SELF ) {
a0009e54: e3500000 cmp r0, #0
a0009e58: 1a000004 bne a0009e70 <rtems_task_ident+0x30>
*id = _Thread_Executing->Object.id;
a0009e5c: e59f202c ldr r2, [pc, #44] ; a0009e90 <rtems_task_ident+0x50>
a0009e60: e5922004 ldr r2, [r2, #4]
a0009e64: e5922008 ldr r2, [r2, #8]
a0009e68: e5832000 str r2, [r3]
return RTEMS_SUCCESSFUL;
a0009e6c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
a0009e70: e59f001c ldr r0, [pc, #28] ; a0009e94 <rtems_task_ident+0x54>
a0009e74: e1a0100c mov r1, ip
a0009e78: eb00058c bl a000b4b0 <_Objects_Name_to_id_u32>
return _Status_Object_name_errors_to_status[ status ];
a0009e7c: e59f3014 ldr r3, [pc, #20] ; a0009e98 <rtems_task_ident+0x58>
a0009e80: e7930100 ldr r0, [r3, r0, lsl #2]
a0009e84: e49df004 pop {pc} ; (ldr pc, [sp], #4)
)
{
Objects_Name_or_id_lookup_errors status;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a0009e88: e3a00009 mov r0, #9 <== NOT EXECUTED
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
return _Status_Object_name_errors_to_status[ status ];
}
a0009e8c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0019694 <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
rtems_id id
)
{
a0019694: e92d4010 push {r4, lr}
a0019698: e24dd004 sub sp, sp, #4
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a001969c: e1a0100d mov r1, sp
a00196a0: eb0010ac bl a001d958 <_Thread_Get>
switch ( location ) {
a00196a4: e59d3000 ldr r3, [sp]
a00196a8: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a00196ac: 13a00004 movne r0, #4
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a00196b0: 1a000004 bne a00196c8 <rtems_task_is_suspended+0x34>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
States_Control the_states
)
{
return (the_states & STATES_SUSPENDED);
a00196b4: e5904010 ldr r4, [r0, #16]
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
a00196b8: e2144002 ands r4, r4, #2 <== NOT EXECUTED
a00196bc: 0a000003 beq a00196d0 <rtems_task_is_suspended+0x3c> <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
a00196c0: eb00109b bl a001d934 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_ALREADY_SUSPENDED;
a00196c4: e3a0000f mov r0, #15 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00196c8: e28dd004 add sp, sp, #4
a00196cc: e8bd8010 pop {r4, pc}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Enable_dispatch();
a00196d0: eb001097 bl a001d934 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a00196d4: e1a00004 mov r0, r4 <== NOT EXECUTED
a00196d8: eafffffa b a00196c8 <rtems_task_is_suspended+0x34> <== NOT EXECUTED
a0011b94 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a0011b94: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
a0011b98: e2525000 subs r5, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a0011b9c: e1a04000 mov r4, r0
a0011ba0: e1a06001 mov r6, r1
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
a0011ba4: 0a000053 beq a0011cf8 <rtems_task_mode+0x164>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
a0011ba8: e59f9158 ldr r9, [pc, #344] ; a0011d08 <rtems_task_mode+0x174>
a0011bac: e5997004 ldr r7, [r9, #4]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
a0011bb0: e59780f8 ldr r8, [r7, #248] ; 0xf8
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
a0011bb4: e5d7a074 ldrb sl, [r7, #116] ; 0x74
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a0011bb8: e597307c ldr r3, [r7, #124] ; 0x7c
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a0011bbc: e5d8b008 ldrb fp, [r8, #8]
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
a0011bc0: e35a0000 cmp sl, #0
a0011bc4: 03a0ac01 moveq sl, #256 ; 0x100
a0011bc8: 13a0a000 movne sl, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a0011bcc: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
a0011bd0: 138aac02 orrne sl, sl, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a0011bd4: e35b0000 cmp fp, #0
a0011bd8: 03a0bb01 moveq fp, #1024 ; 0x400
a0011bdc: 13a0b000 movne fp, #0
old_mode |= _ISR_Get_level();
a0011be0: ebffee6c bl a000d598 <_CPU_ISR_Get_level>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a0011be4: e18bb000 orr fp, fp, r0
old_mode |= _ISR_Get_level();
a0011be8: e18ba00a orr sl, fp, sl
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a0011bec: e3160c01 tst r6, #256 ; 0x100
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
a0011bf0: e585a000 str sl, [r5]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a0011bf4: 0a000003 beq a0011c08 <rtems_task_mode+0x74>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
a0011bf8: e3140c01 tst r4, #256 ; 0x100
a0011bfc: 13a03000 movne r3, #0
a0011c00: 03a03001 moveq r3, #1
a0011c04: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
a0011c08: e3160c02 tst r6, #512 ; 0x200
a0011c0c: 1a00001c bne a0011c84 <rtems_task_mode+0xf0>
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
a0011c10: e3160080 tst r6, #128 ; 0x80
a0011c14: 1a000023 bne a0011ca8 <rtems_task_mode+0x114>
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
a0011c18: e2166b01 ands r6, r6, #1024 ; 0x400
a0011c1c: 0a000012 beq a0011c6c <rtems_task_mode+0xd8>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
a0011c20: e5d82008 ldrb r2, [r8, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
a0011c24: e3140b01 tst r4, #1024 ; 0x400
a0011c28: 13a03000 movne r3, #0
a0011c2c: 03a03001 moveq r3, #1
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
a0011c30: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a0011c34: 03a06000 moveq r6, #0
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
a0011c38: 0a00000b beq a0011c6c <rtems_task_mode+0xd8>
asr->is_enabled = is_asr_enabled;
a0011c3c: e5c83008 strb r3, [r8, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0011c40: e10f3000 mrs r3, CPSR
a0011c44: e3832080 orr r2, r3, #128 ; 0x80
a0011c48: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
a0011c4c: e5981018 ldr r1, [r8, #24]
information->signals_pending = information->signals_posted;
a0011c50: e5982014 ldr r2, [r8, #20]
information->signals_posted = _signals;
a0011c54: e5881014 str r1, [r8, #20]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
a0011c58: e5882018 str r2, [r8, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0011c5c: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
a0011c60: e5986014 ldr r6, [r8, #20]
a0011c64: e3560000 cmp r6, #0
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a0011c68: 13a06001 movne r6, #1
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
a0011c6c: e59f3098 ldr r3, [pc, #152] ; a0011d0c <rtems_task_mode+0x178>
a0011c70: e5933000 ldr r3, [r3]
a0011c74: e3530003 cmp r3, #3
a0011c78: 0a00000d beq a0011cb4 <rtems_task_mode+0x120>
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a0011c7c: e3a00000 mov r0, #0 <== NOT EXECUTED
a0011c80: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
*/
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
a0011c84: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
a0011c88: 13a03001 movne r3, #1
a0011c8c: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
a0011c90: 159f3078 ldrne r3, [pc, #120] ; a0011d10 <rtems_task_mode+0x17c>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
a0011c94: 0587307c streq r3, [r7, #124] ; 0x7c
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
a0011c98: 15933000 ldrne r3, [r3]
a0011c9c: 15873078 strne r3, [r7, #120] ; 0x78
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
a0011ca0: e3160080 tst r6, #128 ; 0x80
a0011ca4: 0affffdb beq a0011c18 <rtems_task_mode+0x84>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
a0011ca8: e2040080 and r0, r4, #128 ; 0x80
a0011cac: ebffee34 bl a000d584 <_CPU_ISR_Set_level>
a0011cb0: eaffffd8 b a0011c18 <rtems_task_mode+0x84>
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
a0011cb4: e3560000 cmp r6, #0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
a0011cb8: e5993004 ldr r3, [r9, #4]
if ( are_signals_pending ||
a0011cbc: 1a000008 bne a0011ce4 <rtems_task_mode+0x150>
a0011cc0: e59f2040 ldr r2, [pc, #64] ; a0011d08 <rtems_task_mode+0x174>
a0011cc4: e5922008 ldr r2, [r2, #8]
a0011cc8: e1530002 cmp r3, r2
a0011ccc: 0a00000b beq a0011d00 <rtems_task_mode+0x16c>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
a0011cd0: e5d33074 ldrb r3, [r3, #116] ; 0x74
a0011cd4: e3530000 cmp r3, #0
a0011cd8: 1a000001 bne a0011ce4 <rtems_task_mode+0x150>
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a0011cdc: e1a00006 mov r0, r6 <== NOT EXECUTED
}
a0011ce0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
a0011ce4: e3a03001 mov r3, #1
a0011ce8: e5c93010 strb r3, [r9, #16]
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
a0011cec: ebffe83e bl a000bdec <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
a0011cf0: e3a00000 mov r0, #0
a0011cf4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
a0011cf8: e3a00009 mov r0, #9 <== NOT EXECUTED
a0011cfc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a0011d00: e1a00006 mov r0, r6
a0011d04: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000d2b8 <rtems_task_resume>:
*/
rtems_status_code rtems_task_resume(
rtems_id id
)
{
a000d2b8: e92d4010 push {r4, lr}
a000d2bc: e24dd004 sub sp, sp, #4
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000d2c0: e1a0100d mov r1, sp
a000d2c4: eb000828 bl a000f36c <_Thread_Get>
switch ( location ) {
a000d2c8: e59d4000 ldr r4, [sp]
)
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000d2cc: e1a03000 mov r3, r0
switch ( location ) {
a000d2d0: e3540000 cmp r4, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000d2d4: 13a00004 movne r0, #4
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000d2d8: 1a000004 bne a000d2f0 <rtems_task_resume+0x38>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
States_Control the_states
)
{
return (the_states & STATES_SUSPENDED);
a000d2dc: e5933010 ldr r3, [r3, #16]
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
a000d2e0: e3130002 tst r3, #2
a000d2e4: 1a000003 bne a000d2f8 <rtems_task_resume+0x40>
_Thread_Resume( the_thread, true );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
a000d2e8: eb000816 bl a000f348 <_Thread_Enable_dispatch>
return RTEMS_INCORRECT_STATE;
a000d2ec: e3a0000e mov r0, #14
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000d2f0: e28dd004 add sp, sp, #4
a000d2f4: e8bd8010 pop {r4, pc}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
_Thread_Resume( the_thread, true );
a000d2f8: e3a01001 mov r1, #1
a000d2fc: eb000a38 bl a000fbe4 <_Thread_Resume>
_Thread_Enable_dispatch();
a000d300: eb000810 bl a000f348 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000d304: e1a00004 mov r0, r4
a000d308: eafffff8 b a000d2f0 <rtems_task_resume+0x38>
a000c0f4 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
a000c0f4: e92d4030 push {r4, r5, lr}
a000c0f8: e1a04001 mov r4, r1
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000c0fc: e59f1090 ldr r1, [pc, #144] ; a000c194 <rtems_task_set_note+0xa0>
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
a000c100: e1a03000 mov r3, r0
a000c104: e24dd008 sub sp, sp, #8
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000c108: e5d11004 ldrb r1, [r1, #4]
a000c10c: e3510000 cmp r1, #0
return RTEMS_NOT_CONFIGURED;
a000c110: 03a00016 moveq r0, #22
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000c114: 0a000015 beq a000c170 <rtems_task_set_note+0x7c>
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
a000c118: e354000f cmp r4, #15
return RTEMS_INVALID_NUMBER;
a000c11c: 83a0000a movhi r0, #10
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
a000c120: 8a000012 bhi a000c170 <rtems_task_set_note+0x7c>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000c124: e3530000 cmp r3, #0
a000c128: 0a000012 beq a000c178 <rtems_task_set_note+0x84>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
a000c12c: e59f1064 ldr r1, [pc, #100] ; a000c198 <rtems_task_set_note+0xa4>
a000c130: e5911004 ldr r1, [r1, #4]
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000c134: e591c008 ldr ip, [r1, #8]
a000c138: e153000c cmp r3, ip
a000c13c: 0a00000f beq a000c180 <rtems_task_set_note+0x8c>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
a000c140: e28d1004 add r1, sp, #4
a000c144: e58d2000 str r2, [sp]
a000c148: eb0008b9 bl a000e434 <_Thread_Get>
switch ( location ) {
a000c14c: e89d0024 ldm sp, {r2, r5}
a000c150: e3550000 cmp r5, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000c154: 13a00004 movne r0, #4
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000c158: 1a000004 bne a000c170 <rtems_task_set_note+0x7c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
a000c15c: e59030f8 ldr r3, [r0, #248] ; 0xf8
a000c160: e2844008 add r4, r4, #8
a000c164: e7832104 str r2, [r3, r4, lsl #2]
_Thread_Enable_dispatch();
a000c168: eb0008a8 bl a000e410 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000c16c: e1a00005 mov r0, r5
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000c170: e28dd008 add sp, sp, #8
a000c174: e8bd8030 pop {r4, r5, pc}
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000c178: e59f3018 ldr r3, [pc, #24] ; a000c198 <rtems_task_set_note+0xa4>
a000c17c: e5931004 ldr r1, [r3, #4]
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
a000c180: e59130f8 ldr r3, [r1, #248] ; 0xf8 <== NOT EXECUTED
a000c184: e2844008 add r4, r4, #8 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000c188: e3a00000 mov r0, #0 <== NOT EXECUTED
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
a000c18c: e7832104 str r2, [r3, r4, lsl #2] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000c190: eafffff6 b a000c170 <rtems_task_set_note+0x7c> <== NOT EXECUTED
a000e47c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
a000e47c: e92d4030 push {r4, r5, lr}
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
a000e480: e2514000 subs r4, r1, #0
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
a000e484: e24dd004 sub sp, sp, #4
a000e488: e1a05002 mov r5, r2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
a000e48c: 0a000004 beq a000e4a4 <rtems_task_set_priority+0x28>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
a000e490: e59f3078 ldr r3, [pc, #120] ; a000e510 <rtems_task_set_priority+0x94>
a000e494: e5d33000 ldrb r3, [r3]
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
a000e498: e1540003 cmp r4, r3
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
a000e49c: 83a00013 movhi r0, #19
a000e4a0: 8a000018 bhi a000e508 <rtems_task_set_priority+0x8c>
if ( !old_priority )
a000e4a4: e3550000 cmp r5, #0
return RTEMS_INVALID_ADDRESS;
a000e4a8: 03a00009 moveq r0, #9
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
a000e4ac: 0a000015 beq a000e508 <rtems_task_set_priority+0x8c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
a000e4b0: e1a0100d mov r1, sp
a000e4b4: eb0008a4 bl a001074c <_Thread_Get>
switch ( location ) {
a000e4b8: e59d3000 ldr r3, [sp]
a000e4bc: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000e4c0: 13a00004 movne r0, #4
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000e4c4: 1a00000f bne a000e508 <rtems_task_set_priority+0x8c>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
a000e4c8: e5903014 ldr r3, [r0, #20]
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
a000e4cc: e3540000 cmp r4, #0
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
a000e4d0: e5853000 str r3, [r5]
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
a000e4d4: 0a000009 beq a000e500 <rtems_task_set_priority+0x84>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
a000e4d8: e590301c ldr r3, [r0, #28]
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
the_thread->real_priority = new_priority;
a000e4dc: e5804018 str r4, [r0, #24]
if ( the_thread->resource_count == 0 ||
a000e4e0: e3530000 cmp r3, #0
a000e4e4: 0a000002 beq a000e4f4 <rtems_task_set_priority+0x78>
a000e4e8: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
a000e4ec: e1540003 cmp r4, r3 <== NOT EXECUTED
a000e4f0: 2a000002 bcs a000e500 <rtems_task_set_priority+0x84> <== NOT EXECUTED
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
a000e4f4: e1a01004 mov r1, r4
a000e4f8: e3a02000 mov r2, #0
a000e4fc: eb000749 bl a0010228 <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
a000e500: eb000888 bl a0010728 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000e504: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000e508: e28dd004 add sp, sp, #4
a000e50c: e8bd8030 pop {r4, r5, pc}
a0009f2c <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
a0009f2c: e92d4070 push {r4, r5, r6, lr}
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
a0009f30: e2515000 subs r5, r1, #0
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
a0009f34: e24dd008 sub sp, sp, #8
a0009f38: e1a06002 mov r6, r2
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
a0009f3c: 03a00009 moveq r0, #9
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
a0009f40: 0a00000e beq a0009f80 <rtems_task_start+0x54>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
a0009f44: e28d1004 add r1, sp, #4
a0009f48: eb000806 bl a000bf68 <_Thread_Get>
switch ( location ) {
a0009f4c: e59d4004 ldr r4, [sp, #4]
a0009f50: e3540000 cmp r4, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0009f54: 13a00004 movne r0, #4
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a0009f58: 1a000008 bne a0009f80 <rtems_task_start+0x54>
case OBJECTS_LOCAL:
if ( _Thread_Start(
a0009f5c: e1a01004 mov r1, r4
a0009f60: e1a02005 mov r2, r5
a0009f64: e1a03004 mov r3, r4
a0009f68: e58d6000 str r6, [sp]
a0009f6c: eb000a9b bl a000c9e0 <_Thread_Start>
a0009f70: e3500000 cmp r0, #0
a0009f74: 1a000003 bne a0009f88 <rtems_task_start+0x5c>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
a0009f78: eb0007f1 bl a000bf44 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
a0009f7c: e3a0000e mov r0, #14 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0009f80: e28dd008 add sp, sp, #8
a0009f84: e8bd8070 pop {r4, r5, r6, pc}
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
a0009f88: eb0007ed bl a000bf44 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009f8c: e1a00004 mov r0, r4
a0009f90: eafffffa b a0009f80 <rtems_task_start+0x54>
a000d56c <rtems_task_suspend>:
*/
rtems_status_code rtems_task_suspend(
rtems_id id
)
{
a000d56c: e92d4010 push {r4, lr}
a000d570: e24dd004 sub sp, sp, #4
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000d574: e1a0100d mov r1, sp
a000d578: eb0007f4 bl a000f550 <_Thread_Get>
switch ( location ) {
a000d57c: e59d3000 ldr r3, [sp]
)
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000d580: e1a02000 mov r2, r0
switch ( location ) {
a000d584: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000d588: 13a00004 movne r0, #4
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000d58c: 1a000004 bne a000d5a4 <rtems_task_suspend+0x38>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
States_Control the_states
)
{
return (the_states & STATES_SUSPENDED);
a000d590: e5924010 ldr r4, [r2, #16]
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
a000d594: e2144002 ands r4, r4, #2
a000d598: 0a000003 beq a000d5ac <rtems_task_suspend+0x40>
_Thread_Suspend( the_thread );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
a000d59c: eb0007e2 bl a000f52c <_Thread_Enable_dispatch>
return RTEMS_ALREADY_SUSPENDED;
a000d5a0: e3a0000f mov r0, #15
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000d5a4: e28dd004 add sp, sp, #4
a000d5a8: e8bd8010 pop {r4, pc}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Suspend( the_thread );
a000d5ac: eb000a98 bl a0010014 <_Thread_Suspend>
_Thread_Enable_dispatch();
a000d5b0: eb0007dd bl a000f52c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000d5b4: e1a00004 mov r0, r4
a000d5b8: eafffff9 b a000d5a4 <rtems_task_suspend+0x38>
a000ad5c <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
a000ad5c: e92d4070 push {r4, r5, r6, lr}
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
a000ad60: e2514000 subs r4, r1, #0
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
a000ad64: e24dd004 sub sp, sp, #4
a000ad68: e1a05002 mov r5, r2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
a000ad6c: 03a00009 moveq r0, #9
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
a000ad70: 0a000016 beq a000add0 <rtems_task_variable_add+0x74>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
a000ad74: e1a0100d mov r1, sp
a000ad78: eb000851 bl a000cec4 <_Thread_Get>
switch (location) {
a000ad7c: e59d3000 ldr r3, [sp]
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
a000ad80: e1a06000 mov r6, r0
switch (location) {
a000ad84: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000ad88: 13a00004 movne r0, #4
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
a000ad8c: 1a00000f bne a000add0 <rtems_task_variable_add+0x74>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
a000ad90: e5963104 ldr r3, [r6, #260] ; 0x104
while (tvp) {
a000ad94: e3530000 cmp r3, #0
a000ad98: 1a000011 bne a000ade4 <rtems_task_variable_add+0x88>
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
a000ad9c: e3a00014 mov r0, #20
a000ada0: eb000cd7 bl a000e104 <_Workspace_Allocate>
if (new == NULL) {
a000ada4: e3500000 cmp r0, #0
a000ada8: 0a000014 beq a000ae00 <rtems_task_variable_add+0xa4>
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
a000adac: e5942000 ldr r2, [r4]
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
a000adb0: e5963104 ldr r3, [r6, #260] ; 0x104
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
new->ptr = ptr;
a000adb4: e5804004 str r4, [r0, #4]
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
a000adb8: e5802008 str r2, [r0, #8]
new->ptr = ptr;
new->dtor = dtor;
a000adbc: e5805010 str r5, [r0, #16]
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
a000adc0: e5803000 str r3, [r0]
the_thread->task_variables = new;
a000adc4: e5860104 str r0, [r6, #260] ; 0x104
_Thread_Enable_dispatch();
a000adc8: eb000834 bl a000cea0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000adcc: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000add0: e28dd004 add sp, sp, #4
a000add4: e8bd8070 pop {r4, r5, r6, pc}
if (tvp->ptr == ptr) {
tvp->dtor = dtor;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
a000add8: e5933000 ldr r3, [r3]
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
a000addc: e3530000 cmp r3, #0
a000ade0: 0affffed beq a000ad9c <rtems_task_variable_add+0x40> <== NOT EXECUTED
if (tvp->ptr == ptr) {
a000ade4: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000ade8: e1520004 cmp r2, r4 <== NOT EXECUTED
a000adec: 1afffff9 bne a000add8 <rtems_task_variable_add+0x7c> <== NOT EXECUTED
tvp->dtor = dtor;
a000adf0: e5835010 str r5, [r3, #16] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000adf4: eb000829 bl a000cea0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000adf8: e3a00000 mov r0, #0 <== NOT EXECUTED
a000adfc: eafffff3 b a000add0 <rtems_task_variable_add+0x74> <== NOT EXECUTED
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
a000ae00: eb000826 bl a000cea0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
a000ae04: e3a0001a mov r0, #26 <== NOT EXECUTED
a000ae08: eafffff0 b a000add0 <rtems_task_variable_add+0x74> <== NOT EXECUTED
a000ae0c <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
a000ae0c: e92d4010 push {r4, lr} <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
a000ae10: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
a000ae14: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
a000ae18: 03a00009 moveq r0, #9 <== NOT EXECUTED
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
a000ae1c: 0a000015 beq a000ae78 <rtems_task_variable_delete+0x6c> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
a000ae20: e1a0100d mov r1, sp <== NOT EXECUTED
a000ae24: eb000826 bl a000cec4 <_Thread_Get> <== NOT EXECUTED
switch (location) {
a000ae28: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000ae2c: e3530000 cmp r3, #0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000ae30: 13a00004 movne r0, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
switch (location) {
a000ae34: 1a00000f bne a000ae78 <rtems_task_variable_delete+0x6c> <== NOT EXECUTED
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
a000ae38: e5903104 ldr r3, [r0, #260] ; 0x104 <== NOT EXECUTED
while (tvp) {
a000ae3c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ae40: 0a00000a beq a000ae70 <rtems_task_variable_delete+0x64> <== NOT EXECUTED
if (tvp->ptr == ptr) {
a000ae44: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000ae48: e1520004 cmp r2, r4 <== NOT EXECUTED
a000ae4c: 1a000004 bne a000ae64 <rtems_task_variable_delete+0x58> <== NOT EXECUTED
a000ae50: ea000010 b a000ae98 <rtems_task_variable_delete+0x8c> <== NOT EXECUTED
a000ae54: e5912004 ldr r2, [r1, #4] <== NOT EXECUTED
a000ae58: e1520004 cmp r2, r4 <== NOT EXECUTED
a000ae5c: 0a000007 beq a000ae80 <rtems_task_variable_delete+0x74> <== NOT EXECUTED
a000ae60: e1a03001 mov r3, r1 <== NOT EXECUTED
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
a000ae64: e5931000 ldr r1, [r3] <== NOT EXECUTED
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
a000ae68: e3510000 cmp r1, #0 <== NOT EXECUTED
a000ae6c: 1afffff8 bne a000ae54 <rtems_task_variable_delete+0x48> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
a000ae70: eb00080a bl a000cea0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
a000ae74: e3a00009 mov r0, #9 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000ae78: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000ae7c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
a000ae80: e5912000 ldr r2, [r1] <== NOT EXECUTED
a000ae84: e5832000 str r2, [r3] <== NOT EXECUTED
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
a000ae88: eb000028 bl a000af30 <_RTEMS_Tasks_Invoke_task_variable_dtor><== NOT EXECUTED
_Thread_Enable_dispatch();
a000ae8c: eb000803 bl a000cea0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000ae90: e3a00000 mov r0, #0 <== NOT EXECUTED
a000ae94: eafffff7 b a000ae78 <rtems_task_variable_delete+0x6c> <== NOT EXECUTED
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
a000ae98: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000ae9c: e1a01003 mov r1, r3 <== NOT EXECUTED
a000aea0: e5802104 str r2, [r0, #260] ; 0x104 <== NOT EXECUTED
a000aea4: eafffff7 b a000ae88 <rtems_task_variable_delete+0x7c> <== NOT EXECUTED
a000aea8 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
a000aea8: e92d4030 push {r4, r5, lr}
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
a000aeac: e2514000 subs r4, r1, #0
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
a000aeb0: e24dd004 sub sp, sp, #4
a000aeb4: e1a05002 mov r5, r2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
a000aeb8: 0a000017 beq a000af1c <rtems_task_variable_get+0x74>
return RTEMS_INVALID_ADDRESS;
if ( !result )
a000aebc: e3520000 cmp r2, #0
a000aec0: 0a000015 beq a000af1c <rtems_task_variable_get+0x74>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
a000aec4: e1a0100d mov r1, sp
a000aec8: eb0007fd bl a000cec4 <_Thread_Get>
switch (location) {
a000aecc: e59d3000 ldr r3, [sp]
a000aed0: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000aed4: 13a00004 movne r0, #4
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
a000aed8: 1a00000d bne a000af14 <rtems_task_variable_get+0x6c>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
a000aedc: e5903104 ldr r3, [r0, #260] ; 0x104 <== NOT EXECUTED
while (tvp) {
a000aee0: e3530000 cmp r3, #0 <== NOT EXECUTED
a000aee4: 1a000003 bne a000aef8 <rtems_task_variable_get+0x50> <== NOT EXECUTED
a000aee8: ea00000d b a000af24 <rtems_task_variable_get+0x7c> <== NOT EXECUTED
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
a000aeec: e5933000 ldr r3, [r3] <== NOT EXECUTED
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
a000aef0: e3530000 cmp r3, #0 <== NOT EXECUTED
a000aef4: 0a00000a beq a000af24 <rtems_task_variable_get+0x7c> <== NOT EXECUTED
if (tvp->ptr == ptr) {
a000aef8: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000aefc: e1520004 cmp r2, r4 <== NOT EXECUTED
a000af00: 1afffff9 bne a000aeec <rtems_task_variable_get+0x44> <== NOT EXECUTED
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
a000af04: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
a000af08: e5853000 str r3, [r5] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000af0c: eb0007e3 bl a000cea0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000af10: e3a00000 mov r0, #0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000af14: e28dd004 add sp, sp, #4
a000af18: e8bd8030 pop {r4, r5, pc}
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
a000af1c: e3a00009 mov r0, #9
a000af20: eafffffb b a000af14 <rtems_task_variable_get+0x6c>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
a000af24: eb0007dd bl a000cea0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
a000af28: e3a00009 mov r0, #9 <== NOT EXECUTED
a000af2c: eafffff8 b a000af14 <rtems_task_variable_get+0x6c> <== NOT EXECUTED
a0009f94 <rtems_task_wake_after>:
a0009f94: e59f307c ldr r3, [pc, #124] ; a000a018 <rtems_task_wake_after+0x84>
*/
rtems_status_code rtems_task_wake_after(
rtems_interval ticks
)
{
a0009f98: e92d4030 push {r4, r5, lr}
a0009f9c: e5932000 ldr r2, [r3]
a0009fa0: e1a04000 mov r4, r0
a0009fa4: e2822001 add r2, r2, #1
a0009fa8: e5832000 str r2, [r3]
_Thread_Disable_dispatch();
if ( ticks == 0 ) {
a0009fac: e3500000 cmp r0, #0
a0009fb0: 0a000012 beq a000a000 <rtems_task_wake_after+0x6c>
_Scheduler_Yield();
} else {
_Thread_Set_state( _Thread_Executing, STATES_DELAYING );
a0009fb4: e59f5060 ldr r5, [pc, #96] ; a000a01c <rtems_task_wake_after+0x88>
a0009fb8: e3a01008 mov r1, #8
a0009fbc: e5950004 ldr r0, [r5, #4]
a0009fc0: eb000a10 bl a000c808 <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
a0009fc4: e5951004 ldr r1, [r5, #4]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a0009fc8: e59f0050 ldr r0, [pc, #80] ; a000a020 <rtems_task_wake_after+0x8c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0009fcc: e3a03000 mov r3, #0
_Thread_Disable_dispatch();
if ( ticks == 0 ) {
_Scheduler_Yield();
} else {
_Thread_Set_state( _Thread_Executing, STATES_DELAYING );
_Watchdog_Initialize(
a0009fd0: e5912008 ldr r2, [r1, #8]
a0009fd4: e5813050 str r3, [r1, #80] ; 0x50
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a0009fd8: e581306c str r3, [r1, #108] ; 0x6c
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
a0009fdc: e5812068 str r2, [r1, #104] ; 0x68
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a0009fe0: e5810064 str r0, [r1, #100] ; 0x64
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a0009fe4: e5814054 str r4, [r1, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0009fe8: e59f0034 ldr r0, [pc, #52] ; a000a024 <rtems_task_wake_after+0x90>
a0009fec: e2811048 add r1, r1, #72 ; 0x48
a0009ff0: eb000b90 bl a000ce38 <_Watchdog_Insert>
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
}
_Thread_Enable_dispatch();
a0009ff4: eb0007d2 bl a000bf44 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
}
a0009ff8: e3a00000 mov r0, #0 <== NOT EXECUTED
a0009ffc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield( &_Scheduler );
a000a000: e59f0020 ldr r0, [pc, #32] ; a000a028 <rtems_task_wake_after+0x94>
a000a004: e5903008 ldr r3, [r0, #8]
a000a008: e12fff33 blx r3
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
}
_Thread_Enable_dispatch();
a000a00c: eb0007cc bl a000bf44 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
}
a000a010: e3a00000 mov r0, #0
a000a014: e8bd8030 pop {r4, r5, pc}
a000b08c <rtems_task_wake_when>:
rtems_time_of_day *time_buffer
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
a000b08c: e59f30c8 ldr r3, [pc, #200] ; a000b15c <rtems_task_wake_when+0xd0>
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
a000b090: e92d40f0 push {r4, r5, r6, r7, lr}
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
a000b094: e5d33000 ldrb r3, [r3]
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
a000b098: e1a05000 mov r5, r0
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
a000b09c: e3530000 cmp r3, #0
a000b0a0: 0a000011 beq a000b0ec <rtems_task_wake_when+0x60>
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
a000b0a4: e3500000 cmp r0, #0
a000b0a8: 0a000029 beq a000b154 <rtems_task_wake_when+0xc8>
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
a000b0ac: e3a04000 mov r4, #0
a000b0b0: e5804018 str r4, [r0, #24]
if ( !_TOD_Validate( time_buffer ) )
a000b0b4: ebfffcfb bl a000a4a8 <_TOD_Validate>
a000b0b8: e1500004 cmp r0, r4
a000b0bc: 1a000001 bne a000b0c8 <rtems_task_wake_when+0x3c>
return RTEMS_INVALID_CLOCK;
a000b0c0: e3a00014 mov r0, #20 <== NOT EXECUTED
a000b0c4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
seconds = _TOD_To_seconds( time_buffer );
a000b0c8: e1a00005 mov r0, r5
a000b0cc: ebfffcce bl a000a40c <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
a000b0d0: e59f6088 ldr r6, [pc, #136] ; a000b160 <rtems_task_wake_when+0xd4>
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
a000b0d4: e1a05000 mov r5, r0
if ( seconds <= _TOD_Seconds_since_epoch() )
a000b0d8: e5963000 ldr r3, [r6]
a000b0dc: e1500003 cmp r0, r3
a000b0e0: 8a000003 bhi a000b0f4 <rtems_task_wake_when+0x68>
return RTEMS_INVALID_CLOCK;
a000b0e4: e3a00014 mov r0, #20
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000b0e8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
a000b0ec: e3a0000b mov r0, #11 <== NOT EXECUTED
a000b0f0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a000b0f4: e59f3068 ldr r3, [pc, #104] ; a000b164 <rtems_task_wake_when+0xd8>
a000b0f8: e5932000 ldr r2, [r3]
a000b0fc: e2822001 add r2, r2, #1
a000b100: e5832000 str r2, [r3]
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
a000b104: e59f705c ldr r7, [pc, #92] ; a000b168 <rtems_task_wake_when+0xdc>
a000b108: e3a01010 mov r1, #16
a000b10c: e5970004 ldr r0, [r7, #4]
a000b110: eb000a1b bl a000d984 <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
a000b114: e5971004 ldr r1, [r7, #4]
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_seconds(
a000b118: e5962000 ldr r2, [r6]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a000b11c: e59f0048 ldr r0, [pc, #72] ; a000b16c <rtems_task_wake_when+0xe0>
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
_Watchdog_Initialize(
a000b120: e5913008 ldr r3, [r1, #8]
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_seconds(
a000b124: e0625005 rsb r5, r2, r5
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000b128: e59f2040 ldr r2, [pc, #64] ; a000b170 <rtems_task_wake_when+0xe4>
the_watchdog->id = id;
a000b12c: e5813068 str r3, [r1, #104] ; 0x68
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000b130: e5814050 str r4, [r1, #80] ; 0x50
the_watchdog->routine = routine;
a000b134: e5812064 str r2, [r1, #100] ; 0x64
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a000b138: e581406c str r4, [r1, #108] ; 0x6c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000b13c: e5815054 str r5, [r1, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a000b140: e2811048 add r1, r1, #72 ; 0x48
a000b144: eb000bcb bl a000e078 <_Watchdog_Insert>
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
a000b148: eb0007dc bl a000d0c0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000b14c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b150: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
a000b154: e3a00009 mov r0, #9 <== NOT EXECUTED
a000b158: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a000a490 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
a000a490: e92d4070 push {r4, r5, r6, lr}
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
a000a494: e2504000 subs r4, r0, #0
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
a000a498: e1a05001 mov r5, r1
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
a000a49c: 0a00001a beq a000a50c <rtems_timer_create+0x7c>
return RTEMS_INVALID_NAME;
if ( !id )
a000a4a0: e3510000 cmp r1, #0
a000a4a4: 0a00001d beq a000a520 <rtems_timer_create+0x90>
a000a4a8: e59f3078 ldr r3, [pc, #120] ; a000a528 <rtems_timer_create+0x98>
a000a4ac: e5932000 ldr r2, [r3]
a000a4b0: e2822001 add r2, r2, #1
a000a4b4: e5832000 str r2, [r3]
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
a000a4b8: e59f606c ldr r6, [pc, #108] ; a000a52c <rtems_timer_create+0x9c>
a000a4bc: e1a00006 mov r0, r6
a000a4c0: eb0003e2 bl a000b450 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
a000a4c4: e3500000 cmp r0, #0
a000a4c8: 0a000011 beq a000a514 <rtems_timer_create+0x84>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000a4cc: e5903008 ldr r3, [r0, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a4d0: e596201c ldr r2, [r6, #28]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
a000a4d4: e3a0c004 mov ip, #4
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000a4d8: e3a06000 mov r6, #0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000a4dc: e1a01803 lsl r1, r3, #16
a000a4e0: e580c038 str ip, [r0, #56] ; 0x38
a000a4e4: e5806018 str r6, [r0, #24]
the_watchdog->routine = routine;
a000a4e8: e580602c str r6, [r0, #44] ; 0x2c
the_watchdog->id = id;
a000a4ec: e5806030 str r6, [r0, #48] ; 0x30
the_watchdog->user_data = user_data;
a000a4f0: e5806034 str r6, [r0, #52] ; 0x34
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a4f4: e7820721 str r0, [r2, r1, lsr #14]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000a4f8: e580400c str r4, [r0, #12]
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
a000a4fc: e5853000 str r3, [r5]
_Thread_Enable_dispatch();
a000a500: eb0007ee bl a000c4c0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a504: e1a00006 mov r0, r6
a000a508: e8bd8070 pop {r4, r5, r6, pc}
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a000a50c: e3a00003 mov r0, #3 <== NOT EXECUTED
a000a510: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
a000a514: eb0007e9 bl a000c4c0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a000a518: e3a00005 mov r0, #5 <== NOT EXECUTED
a000a51c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a000a520: e3a00009 mov r0, #9 <== NOT EXECUTED
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000a524: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000a530 <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a000a530: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
a000a534: e2516000 subs r6, r1, #0
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a000a538: e1a05000 mov r5, r0
a000a53c: e24dd004 sub sp, sp, #4
a000a540: e1a04002 mov r4, r2
a000a544: e1a07003 mov r7, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
a000a548: 03a0000a moveq r0, #10
{
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
a000a54c: 0a000020 beq a000a5d4 <rtems_timer_fire_after+0xa4>
return RTEMS_INVALID_NUMBER;
if ( !routine )
a000a550: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a000a554: 03a00009 moveq r0, #9
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
a000a558: 0a00001d beq a000a5d4 <rtems_timer_fire_after+0xa4>
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
a000a55c: e59f0088 ldr r0, [pc, #136] ; a000a5ec <rtems_timer_fire_after+0xbc>
a000a560: e1a01005 mov r1, r5
a000a564: e1a0200d mov r2, sp
a000a568: eb0004ed bl a000b924 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a000a56c: e59d3000 ldr r3, [sp]
a000a570: e1a08000 mov r8, r0
a000a574: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a578: 13a00004 movne r0, #4
if ( !routine )
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a000a57c: 1a000014 bne a000a5d4 <rtems_timer_fire_after+0xa4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a000a580: e288a010 add sl, r8, #16
a000a584: e1a0000a mov r0, sl
a000a588: eb000bf8 bl a000d570 <_Watchdog_Remove>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a58c: e10f2000 mrs r2, CPSR
a000a590: e3823080 orr r3, r2, #128 ; 0x80
a000a594: 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 ) {
a000a598: e5983018 ldr r3, [r8, #24]
a000a59c: e3530000 cmp r3, #0
a000a5a0: 1a00000d bne a000a5dc <rtems_timer_fire_after+0xac>
/*
* 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;
a000a5a4: e5883038 str r3, [r8, #56] ; 0x38
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000a5a8: e5883018 str r3, [r8, #24]
the_watchdog->routine = routine;
a000a5ac: e588402c str r4, [r8, #44] ; 0x2c
the_watchdog->id = id;
a000a5b0: e5885030 str r5, [r8, #48] ; 0x30
the_watchdog->user_data = user_data;
a000a5b4: e5887034 str r7, [r8, #52] ; 0x34
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a5b8: e129f002 msr CPSR_fc, r2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a5bc: e59f002c ldr r0, [pc, #44] ; a000a5f0 <rtems_timer_fire_after+0xc0>
a000a5c0: e1a0100a mov r1, sl
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000a5c4: e588601c str r6, [r8, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a5c8: eb000b79 bl a000d3b4 <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
a000a5cc: eb0007bb bl a000c4c0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a5d0: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000a5d4: e28dd004 add sp, sp, #4
a000a5d8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a000a5dc: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
_Thread_Enable_dispatch();
a000a5e0: eb0007b6 bl a000c4c0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000a5e4: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a5e8: eafffff9 b a000a5d4 <rtems_timer_fire_after+0xa4> <== NOT EXECUTED
a0019e90 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a0019e90: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0019e94: e1a06001 mov r6, r1
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
a0019e98: e59f10d0 ldr r1, [pc, #208] ; a0019f70 <rtems_timer_fire_when+0xe0>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a0019e9c: e1a05000 mov r5, r0
a0019ea0: e24dd004 sub sp, sp, #4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
a0019ea4: e5d11000 ldrb r1, [r1]
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a0019ea8: e1a04002 mov r4, r2
a0019eac: e1a07003 mov r7, r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
a0019eb0: e3510000 cmp r1, #0
return RTEMS_NOT_DEFINED;
a0019eb4: 03a0000b moveq r0, #11
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
a0019eb8: 1a000001 bne a0019ec4 <rtems_timer_fire_when+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0019ebc: e28dd004 add sp, sp, #4
a0019ec0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
a0019ec4: e1a00006 mov r0, r6
a0019ec8: ebfff4ac bl a0017180 <_TOD_Validate>
a0019ecc: e3500000 cmp r0, #0
a0019ed0: 0a000009 beq a0019efc <rtems_timer_fire_when+0x6c>
return RTEMS_INVALID_CLOCK;
if ( !routine )
a0019ed4: e3540000 cmp r4, #0
return RTEMS_INVALID_ADDRESS;
a0019ed8: 03a00009 moveq r0, #9
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
a0019edc: 0afffff6 beq a0019ebc <rtems_timer_fire_when+0x2c>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
a0019ee0: e1a00006 mov r0, r6
a0019ee4: ebfff47e bl a00170e4 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
a0019ee8: e59f8084 ldr r8, [pc, #132] ; a0019f74 <rtems_timer_fire_when+0xe4>
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
a0019eec: e1a06000 mov r6, r0
if ( seconds <= _TOD_Seconds_since_epoch() )
a0019ef0: e5983000 ldr r3, [r8]
a0019ef4: e1500003 cmp r0, r3
a0019ef8: 8a000001 bhi a0019f04 <rtems_timer_fire_when+0x74>
return RTEMS_INVALID_CLOCK;
a0019efc: e3a00014 mov r0, #20 <== NOT EXECUTED
a0019f00: eaffffed b a0019ebc <rtems_timer_fire_when+0x2c> <== NOT EXECUTED
a0019f04: e59f006c ldr r0, [pc, #108] ; a0019f78 <rtems_timer_fire_when+0xe8>
a0019f08: e1a01005 mov r1, r5
a0019f0c: e1a0200d mov r2, sp
a0019f10: eb000b7e bl a001cd10 <_Objects_Get>
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0019f14: e59da000 ldr sl, [sp]
a0019f18: e1a09000 mov r9, r0
a0019f1c: e35a0000 cmp sl, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0019f20: 13a00004 movne r0, #4
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0019f24: 1affffe4 bne a0019ebc <rtems_timer_fire_when+0x2c>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a0019f28: e289b010 add fp, r9, #16
a0019f2c: e1a0000b mov r0, fp
a0019f30: eb00137c bl a001ed28 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
a0019f34: e5983000 ldr r3, [r8]
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;
a0019f38: e3a02002 mov r2, #2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a0019f3c: e59f0038 ldr r0, [pc, #56] ; a0019f7c <rtems_timer_fire_when+0xec>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
a0019f40: e0636006 rsb r6, r3, r6
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;
a0019f44: e5892038 str r2, [r9, #56] ; 0x38
a0019f48: e1a0100b mov r1, fp
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0019f4c: e589a018 str sl, [r9, #24]
the_watchdog->routine = routine;
a0019f50: e589402c str r4, [r9, #44] ; 0x2c
the_watchdog->id = id;
a0019f54: e5895030 str r5, [r9, #48] ; 0x30
the_watchdog->user_data = user_data;
a0019f58: e5897034 str r7, [r9, #52] ; 0x34
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a0019f5c: e589601c str r6, [r9, #28]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a0019f60: eb001301 bl a001eb6c <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
a0019f64: eb000e72 bl a001d934 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0019f68: e1a0000a mov r0, sl
a0019f6c: eaffffd2 b a0019ebc <rtems_timer_fire_when+0x2c>
a0019f80 <rtems_timer_get_information>:
rtems_status_code rtems_timer_get_information(
rtems_id id,
rtems_timer_information *the_info
)
{
a0019f80: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
a0019f84: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_timer_get_information(
rtems_id id,
rtems_timer_information *the_info
)
{
a0019f88: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a0019f8c: e1a01000 mov r1, r0 <== NOT EXECUTED
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
a0019f90: 03a00009 moveq r0, #9 <== NOT EXECUTED
)
{
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
a0019f94: 0a00000e beq a0019fd4 <rtems_timer_get_information+0x54> <== NOT EXECUTED
a0019f98: e59f003c ldr r0, [pc, #60] ; a0019fdc <rtems_timer_get_information+0x5c><== NOT EXECUTED
a0019f9c: e1a0200d mov r2, sp <== NOT EXECUTED
a0019fa0: eb000b5a bl a001cd10 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0019fa4: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a0019fa8: e3550000 cmp r5, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0019fac: 13a00004 movne r0, #4 <== NOT EXECUTED
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0019fb0: 1a000007 bne a0019fd4 <rtems_timer_get_information+0x54> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
a0019fb4: e590c038 ldr ip, [r0, #56] ; 0x38 <== NOT EXECUTED
the_info->initial = the_timer->Ticker.initial;
a0019fb8: e590101c ldr r1, [r0, #28] <== NOT EXECUTED
the_info->start_time = the_timer->Ticker.start_time;
a0019fbc: e5902024 ldr r2, [r0, #36] ; 0x24 <== NOT EXECUTED
the_info->stop_time = the_timer->Ticker.stop_time;
a0019fc0: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
a0019fc4: e584c000 str ip, [r4] <== NOT EXECUTED
the_info->initial = the_timer->Ticker.initial;
a0019fc8: e984000e stmib r4, {r1, r2, r3} <== NOT EXECUTED
the_info->start_time = the_timer->Ticker.start_time;
the_info->stop_time = the_timer->Ticker.stop_time;
_Thread_Enable_dispatch();
a0019fcc: eb000e58 bl a001d934 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0019fd0: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0019fd4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0019fd8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a001a010 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
a001a010: e92d4070 push {r4, r5, r6, lr}
a001a014: e24dd004 sub sp, sp, #4
a001a018: e1a01000 mov r1, r0
a001a01c: e1a0200d mov r2, sp
a001a020: e59f0088 ldr r0, [pc, #136] ; a001a0b0 <rtems_timer_reset+0xa0>
a001a024: eb000b39 bl a001cd10 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001a028: e59d4000 ldr r4, [sp]
a001a02c: e1a06000 mov r6, r0
a001a030: e3540000 cmp r4, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001a034: 13a05004 movne r5, #4
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001a038: 1a000006 bne a001a058 <rtems_timer_reset+0x48>
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
a001a03c: e5905038 ldr r5, [r0, #56] ; 0x38
a001a040: e3550000 cmp r5, #0
a001a044: 0a000006 beq a001a064 <rtems_timer_reset+0x54>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a001a048: e3550001 cmp r5, #1 <== NOT EXECUTED
/*
* Must be dormant or time of day timer (e.g. TIMER_DORMANT,
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
a001a04c: 13a0500b movne r5, #11 <== NOT EXECUTED
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a001a050: 0a00000b beq a001a084 <rtems_timer_reset+0x74> <== NOT EXECUTED
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
a001a054: eb000e36 bl a001d934 <_Thread_Enable_dispatch> <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a001a058: e1a00005 mov r0, r5
a001a05c: e28dd004 add sp, sp, #4
a001a060: e8bd8070 pop {r4, r5, r6, pc}
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
a001a064: e2806010 add r6, r0, #16
a001a068: e1a00006 mov r0, r6
a001a06c: eb00132d bl a001ed28 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
a001a070: e59f003c ldr r0, [pc, #60] ; a001a0b4 <rtems_timer_reset+0xa4>
a001a074: e1a01006 mov r1, r6
a001a078: eb0012bb bl a001eb6c <_Watchdog_Insert>
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
a001a07c: eb000e2c bl a001d934 <_Thread_Enable_dispatch>
a001a080: eafffff4 b a001a058 <rtems_timer_reset+0x48>
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
a001a084: e59f302c ldr r3, [pc, #44] ; a001a0b8 <rtems_timer_reset+0xa8><== NOT EXECUTED
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
a001a088: e2800010 add r0, r0, #16 <== NOT EXECUTED
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
a001a08c: e5935000 ldr r5, [r3] <== NOT EXECUTED
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
a001a090: eb001324 bl a001ed28 <_Watchdog_Remove> <== NOT EXECUTED
(*timer_server->schedule_operation)( timer_server, the_timer );
a001a094: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
a001a098: e1a00005 mov r0, r5 <== NOT EXECUTED
a001a09c: e1a01006 mov r1, r6 <== NOT EXECUTED
a001a0a0: e12fff33 blx r3 <== NOT EXECUTED
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
a001a0a4: e1a05004 mov r5, r4 <== NOT EXECUTED
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
a001a0a8: eb000e21 bl a001d934 <_Thread_Enable_dispatch> <== NOT EXECUTED
a001a0ac: eaffffe9 b a001a058 <rtems_timer_reset+0x48> <== NOT EXECUTED
a001a0bc <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001a0bc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a001a0c0: e1a06001 mov r6, r1
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
a001a0c4: e59f10cc ldr r1, [pc, #204] ; a001a198 <rtems_timer_server_fire_after+0xdc>
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001a0c8: e1a07000 mov r7, r0
a001a0cc: e24dd004 sub sp, sp, #4
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
a001a0d0: e5914000 ldr r4, [r1]
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001a0d4: e1a05002 mov r5, r2
a001a0d8: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a001a0dc: e3540000 cmp r4, #0
return RTEMS_INCORRECT_STATE;
a001a0e0: 03a0000e moveq r0, #14
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a001a0e4: 0a000005 beq a001a100 <rtems_timer_server_fire_after+0x44>
return RTEMS_INCORRECT_STATE;
if ( !routine )
a001a0e8: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a001a0ec: 03a00009 moveq r0, #9
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !routine )
a001a0f0: 0a000002 beq a001a100 <rtems_timer_server_fire_after+0x44>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
a001a0f4: e3560000 cmp r6, #0
return RTEMS_INVALID_NUMBER;
a001a0f8: 03a0000a moveq r0, #10
return RTEMS_INCORRECT_STATE;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
a001a0fc: 1a000001 bne a001a108 <rtems_timer_server_fire_after+0x4c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a001a100: e28dd004 add sp, sp, #4
a001a104: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a001a108: e59f008c ldr r0, [pc, #140] ; a001a19c <rtems_timer_server_fire_after+0xe0>
a001a10c: e1a01007 mov r1, r7
a001a110: e1a0200d mov r2, sp
a001a114: eb000afd bl a001cd10 <_Objects_Get>
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001a118: e59d3000 ldr r3, [sp]
a001a11c: e1a0a000 mov sl, r0
a001a120: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001a124: 13a00004 movne r0, #4
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001a128: 1afffff4 bne a001a100 <rtems_timer_server_fire_after+0x44>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a001a12c: e28a0010 add r0, sl, #16
a001a130: eb0012fc bl a001ed28 <_Watchdog_Remove>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a001a134: e10f2000 mrs r2, CPSR
a001a138: e3823080 orr r3, r2, #128 ; 0x80
a001a13c: 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 ) {
a001a140: e59a3018 ldr r3, [sl, #24]
a001a144: e3530000 cmp r3, #0
a001a148: 1a00000e bne a001a188 <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;
a001a14c: e3a01001 mov r1, #1
a001a150: e58a1038 str r1, [sl, #56] ; 0x38
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a001a154: e58a3018 str r3, [sl, #24]
the_watchdog->routine = routine;
a001a158: e58a502c str r5, [sl, #44] ; 0x2c
the_watchdog->id = id;
a001a15c: e58a7030 str r7, [sl, #48] ; 0x30
the_watchdog->user_data = user_data;
a001a160: e58a8034 str r8, [sl, #52] ; 0x34
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
a001a164: e58a601c str r6, [sl, #28]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a001a168: e129f002 msr CPSR_fc, r2
_ISR_Enable( level );
(*timer_server->schedule_operation)( timer_server, the_timer );
a001a16c: e1a00004 mov r0, r4
a001a170: e5943004 ldr r3, [r4, #4]
a001a174: e1a0100a mov r1, sl
a001a178: e12fff33 blx r3
_Thread_Enable_dispatch();
a001a17c: eb000dec bl a001d934 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001a180: e3a00000 mov r0, #0
a001a184: eaffffdd b a001a100 <rtems_timer_server_fire_after+0x44>
a001a188: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
_Thread_Enable_dispatch();
a001a18c: eb000de8 bl a001d934 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a001a190: e3a00000 mov r0, #0 <== NOT EXECUTED
a001a194: eaffffd9 b a001a100 <rtems_timer_server_fire_after+0x44> <== NOT EXECUTED
a001a1a0 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001a1a0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a001a1a4: e1a07001 mov r7, r1
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
a001a1a8: e59f10e0 ldr r1, [pc, #224] ; a001a290 <rtems_timer_server_fire_when+0xf0>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001a1ac: e1a06000 mov r6, r0
a001a1b0: e24dd004 sub sp, sp, #4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
a001a1b4: e5914000 ldr r4, [r1]
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001a1b8: e1a05002 mov r5, r2
a001a1bc: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a001a1c0: e3540000 cmp r4, #0
return RTEMS_INCORRECT_STATE;
a001a1c4: 03a0000e moveq r0, #14
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a001a1c8: 0a00000c beq a001a200 <rtems_timer_server_fire_when+0x60>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
a001a1cc: e59f30c0 ldr r3, [pc, #192] ; a001a294 <rtems_timer_server_fire_when+0xf4>
a001a1d0: e5d33000 ldrb r3, [r3]
a001a1d4: e3530000 cmp r3, #0
return RTEMS_NOT_DEFINED;
a001a1d8: 03a0000b moveq r0, #11
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
a001a1dc: 0a000007 beq a001a200 <rtems_timer_server_fire_when+0x60>
return RTEMS_NOT_DEFINED;
if ( !routine )
a001a1e0: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a001a1e4: 03a00009 moveq r0, #9
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
a001a1e8: 0a000004 beq a001a200 <rtems_timer_server_fire_when+0x60>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
a001a1ec: e1a00007 mov r0, r7
a001a1f0: ebfff3e2 bl a0017180 <_TOD_Validate>
a001a1f4: e3500000 cmp r0, #0
a001a1f8: 1a000002 bne a001a208 <rtems_timer_server_fire_when+0x68>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
a001a1fc: e3a00014 mov r0, #20 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a001a200: e28dd004 add sp, sp, #4
a001a204: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
a001a208: e1a00007 mov r0, r7
a001a20c: ebfff3b4 bl a00170e4 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
a001a210: e59fa080 ldr sl, [pc, #128] ; a001a298 <rtems_timer_server_fire_when+0xf8>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
a001a214: e1a07000 mov r7, r0
if ( seconds <= _TOD_Seconds_since_epoch() )
a001a218: e59a3000 ldr r3, [sl]
a001a21c: e1500003 cmp r0, r3
a001a220: 9afffff5 bls a001a1fc <rtems_timer_server_fire_when+0x5c>
a001a224: e59f0070 ldr r0, [pc, #112] ; a001a29c <rtems_timer_server_fire_when+0xfc>
a001a228: e1a01006 mov r1, r6
a001a22c: e1a0200d mov r2, sp
a001a230: eb000ab6 bl a001cd10 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001a234: e59d9000 ldr r9, [sp]
a001a238: e1a0b000 mov fp, r0
a001a23c: e3590000 cmp r9, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001a240: 13a00004 movne r0, #4
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001a244: 1affffed bne a001a200 <rtems_timer_server_fire_when+0x60>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a001a248: e28b0010 add r0, fp, #16
a001a24c: eb0012b5 bl a001ed28 <_Watchdog_Remove>
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();
a001a250: e59a3000 ldr r3, [sl]
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;
a001a254: e3a02003 mov r2, #3
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
a001a258: e1a00004 mov r0, r4
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
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();
a001a25c: e0637007 rsb r7, r3, r7
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;
a001a260: e58b2038 str r2, [fp, #56] ; 0x38
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
a001a264: e5943004 ldr r3, [r4, #4]
a001a268: e1a0100b mov r1, fp
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a001a26c: e58b9018 str r9, [fp, #24]
the_watchdog->routine = routine;
a001a270: e58b502c str r5, [fp, #44] ; 0x2c
the_watchdog->id = id;
a001a274: e58b6030 str r6, [fp, #48] ; 0x30
the_watchdog->user_data = user_data;
a001a278: e58b8034 str r8, [fp, #52] ; 0x34
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
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();
a001a27c: e58b701c str r7, [fp, #28]
(*timer_server->schedule_operation)( timer_server, the_timer );
a001a280: e12fff33 blx r3
_Thread_Enable_dispatch();
a001a284: eb000daa bl a001d934 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001a288: e1a00009 mov r0, r9
a001a28c: eaffffdb b a001a200 <rtems_timer_server_fire_when+0x60>
a000a508 <sched_get_priority_max>:
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
a000a508: e3500004 cmp r0, #4
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
a000a50c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
switch ( policy ) {
a000a510: 9a000004 bls a000a528 <sched_get_priority_max+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a000a514: eb0022c8 bl a001303c <__errno> <== NOT EXECUTED
a000a518: e3a03016 mov r3, #22 <== NOT EXECUTED
a000a51c: e5803000 str r3, [r0] <== NOT EXECUTED
a000a520: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a524: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
a000a528: e3a03001 mov r3, #1
a000a52c: e1a00013 lsl r0, r3, r0
a000a530: e3100017 tst r0, #23
a000a534: 0afffff6 beq a000a514 <sched_get_priority_max+0xc>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
a000a538: e59f3008 ldr r3, [pc, #8] ; a000a548 <sched_get_priority_max+0x40>
a000a53c: e5d30000 ldrb r0, [r3]
a000a540: e2400001 sub r0, r0, #1
}
a000a544: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a000a54c <sched_get_priority_min>:
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
a000a54c: e3500004 cmp r0, #4 <== NOT EXECUTED
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
a000a550: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
switch ( policy ) {
a000a554: 9a000004 bls a000a56c <sched_get_priority_min+0x20> <== NOT EXECUTED
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a000a558: eb0022b7 bl a001303c <__errno> <== NOT EXECUTED
a000a55c: e3a03016 mov r3, #22 <== NOT EXECUTED
a000a560: e5803000 str r3, [r0] <== NOT EXECUTED
a000a564: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a568: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
a000a56c: e3a03001 mov r3, #1 <== NOT EXECUTED
a000a570: e1a00013 lsl r0, r3, r0 <== NOT EXECUTED
a000a574: e3100017 tst r0, #23 <== NOT EXECUTED
a000a578: 0afffff6 beq a000a558 <sched_get_priority_min+0xc> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
a000a57c: e1a00003 mov r0, r3 <== NOT EXECUTED
}
a000a580: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a00099c0 <sched_getparam>:
int sched_getparam(
pid_t pid __attribute__((unused)),
struct sched_param *param __attribute__((unused))
)
{
a00099c0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a00099c4: eb002415 bl a0012a20 <__errno> <== NOT EXECUTED
a00099c8: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a00099cc: e5803000 str r3, [r0] <== NOT EXECUTED
}
a00099d0: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00099d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a00099d8 <sched_getscheduler>:
#include <rtems/posix/time.h>
int sched_getscheduler(
pid_t pid __attribute__((unused))
)
{
a00099d8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a00099dc: eb00240f bl a0012a20 <__errno> <== NOT EXECUTED
a00099e0: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a00099e4: e5803000 str r3, [r0] <== NOT EXECUTED
}
a00099e8: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00099ec: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000a584 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
a000a584: e92d4010 push {r4, lr} <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
a000a588: e2504000 subs r4, r0, #0 <== NOT EXECUTED
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
a000a58c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
a000a590: 1a000007 bne a000a5b4 <sched_rr_get_interval+0x30> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
a000a594: e3510000 cmp r1, #0 <== NOT EXECUTED
a000a598: 0a00000f beq a000a5dc <sched_rr_get_interval+0x58> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
a000a59c: e59f304c ldr r3, [pc, #76] ; a000a5f0 <sched_rr_get_interval+0x6c><== NOT EXECUTED
a000a5a0: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000a5a4: eb000de8 bl a000dd4c <_Timespec_From_ticks> <== NOT EXECUTED
return 0;
a000a5a8: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a000a5ac: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000a5b0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
a000a5b4: e58d1000 str r1, [sp] <== NOT EXECUTED
a000a5b8: ebfff1ff bl a0006dbc <getpid> <== NOT EXECUTED
a000a5bc: e1500004 cmp r0, r4 <== NOT EXECUTED
a000a5c0: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a000a5c4: 0afffff2 beq a000a594 <sched_rr_get_interval+0x10> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ESRCH );
a000a5c8: eb00229b bl a001303c <__errno> <== NOT EXECUTED
a000a5cc: e3a03003 mov r3, #3 <== NOT EXECUTED
a000a5d0: e5803000 str r3, [r0] <== NOT EXECUTED
a000a5d4: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a5d8: eafffff3 b a000a5ac <sched_rr_get_interval+0x28> <== NOT EXECUTED
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
a000a5dc: eb002296 bl a001303c <__errno> <== NOT EXECUTED
a000a5e0: e3a03016 mov r3, #22 <== NOT EXECUTED
a000a5e4: e5803000 str r3, [r0] <== NOT EXECUTED
a000a5e8: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a5ec: eaffffee b a000a5ac <sched_rr_get_interval+0x28> <== NOT EXECUTED
a00099f0 <sched_setparam>:
int sched_setparam(
pid_t pid __attribute__((unused)),
const struct sched_param *param __attribute__((unused))
)
{
a00099f0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a00099f4: eb002409 bl a0012a20 <__errno> <== NOT EXECUTED
a00099f8: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a00099fc: e5803000 str r3, [r0] <== NOT EXECUTED
}
a0009a00: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0009a04: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0009a08 <sched_setscheduler>:
int sched_setscheduler(
pid_t pid __attribute__((unused)),
int policy __attribute__((unused)),
const struct sched_param *param __attribute__((unused))
)
{
a0009a08: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a0009a0c: eb002403 bl a0012a20 <__errno> <== NOT EXECUTED
a0009a10: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a0009a14: e5803000 str r3, [r0] <== NOT EXECUTED
}
a0009a18: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0009a1c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000c8e8 <sem_close>:
*/
int sem_close(
sem_t *sem
)
{
a000c8e8: e92d4010 push {r4, lr} <== NOT EXECUTED
a000c8ec: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
_Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location );
a000c8f0: e5901000 ldr r1, [r0] <== NOT EXECUTED
a000c8f4: e1a0200d mov r2, sp <== NOT EXECUTED
a000c8f8: e59f0040 ldr r0, [pc, #64] ; a000c940 <sem_close+0x58> <== NOT EXECUTED
a000c8fc: eb00088c bl a000eb34 <_Objects_Get> <== NOT EXECUTED
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
a000c900: e59d4000 ldr r4, [sp] <== NOT EXECUTED
a000c904: e3540000 cmp r4, #0 <== NOT EXECUTED
a000c908: 0a000005 beq a000c924 <sem_close+0x3c> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000c90c: eb00266f bl a00162d0 <__errno> <== NOT EXECUTED
a000c910: e3a03016 mov r3, #22 <== NOT EXECUTED
a000c914: e5803000 str r3, [r0] <== NOT EXECUTED
a000c918: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a000c91c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000c920: e8bd8010 pop {r4, pc} <== NOT EXECUTED
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_semaphore->open_count -= 1;
a000c924: e5902018 ldr r2, [r0, #24] <== NOT EXECUTED
a000c928: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a000c92c: e5802018 str r2, [r0, #24] <== NOT EXECUTED
_POSIX_Semaphore_Delete( the_semaphore );
a000c930: eb001a0e bl a0013170 <_POSIX_Semaphore_Delete> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000c934: eb000b88 bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000c938: e1a00004 mov r0, r4 <== NOT EXECUTED
a000c93c: eafffff6 b a000c91c <sem_close+0x34> <== NOT EXECUTED
a000c944 <sem_destroy>:
*/
int sem_destroy(
sem_t *sem
)
{
a000c944: e92d4010 push {r4, lr} <== NOT EXECUTED
a000c948: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000c94c: e5901000 ldr r1, [r0] <== NOT EXECUTED
a000c950: e1a0200d mov r2, sp <== NOT EXECUTED
a000c954: e59f0058 ldr r0, [pc, #88] ; a000c9b4 <sem_destroy+0x70> <== NOT EXECUTED
a000c958: eb000875 bl a000eb34 <_Objects_Get> <== NOT EXECUTED
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
a000c95c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000c960: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c964: 0a000005 beq a000c980 <sem_destroy+0x3c> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000c968: eb002658 bl a00162d0 <__errno> <== NOT EXECUTED
a000c96c: e3a03016 mov r3, #22 <== NOT EXECUTED
a000c970: e5803000 str r3, [r0] <== NOT EXECUTED
a000c974: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a000c978: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000c97c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
a000c980: e5d04014 ldrb r4, [r0, #20] <== NOT EXECUTED
a000c984: e3540000 cmp r4, #0 <== NOT EXECUTED
a000c988: 1a000003 bne a000c99c <sem_destroy+0x58> <== NOT EXECUTED
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
a000c98c: eb0019f7 bl a0013170 <_POSIX_Semaphore_Delete> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000c990: eb000b71 bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000c994: e1a00004 mov r0, r4 <== NOT EXECUTED
a000c998: eafffff6 b a000c978 <sem_destroy+0x34> <== NOT EXECUTED
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
_Thread_Enable_dispatch();
a000c99c: eb000b6e bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a000c9a0: eb00264a bl a00162d0 <__errno> <== NOT EXECUTED
a000c9a4: e3a03016 mov r3, #22 <== NOT EXECUTED
a000c9a8: e5803000 str r3, [r0] <== NOT EXECUTED
a000c9ac: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000c9b0: eafffff0 b a000c978 <sem_destroy+0x34> <== NOT EXECUTED
a000c9b8 <sem_getvalue>:
int sem_getvalue(
sem_t *sem,
int *sval
)
{
a000c9b8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000c9bc: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000c9c0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000c9c4: e1a04001 mov r4, r1 <== NOT EXECUTED
a000c9c8: e59f0040 ldr r0, [pc, #64] ; a000ca10 <sem_getvalue+0x58> <== NOT EXECUTED
a000c9cc: e1a01003 mov r1, r3 <== NOT EXECUTED
a000c9d0: e1a0200d mov r2, sp <== NOT EXECUTED
a000c9d4: eb000856 bl a000eb34 <_Objects_Get> <== NOT EXECUTED
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
a000c9d8: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a000c9dc: e3550000 cmp r5, #0 <== NOT EXECUTED
a000c9e0: 0a000005 beq a000c9fc <sem_getvalue+0x44> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000c9e4: eb002639 bl a00162d0 <__errno> <== NOT EXECUTED
a000c9e8: e3a03016 mov r3, #22 <== NOT EXECUTED
a000c9ec: e5803000 str r3, [r0] <== NOT EXECUTED
a000c9f0: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a000c9f4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000c9f8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
a000c9fc: e5903064 ldr r3, [r0, #100] ; 0x64 <== NOT EXECUTED
a000ca00: e5843000 str r3, [r4] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000ca04: eb000b54 bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000ca08: e1a00005 mov r0, r5 <== NOT EXECUTED
a000ca0c: eafffff8 b a000c9f4 <sem_getvalue+0x3c> <== NOT EXECUTED
a000ca5c <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
a000ca5c: e92d000e push {r1, r2, r3} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000ca60: e59f30f4 ldr r3, [pc, #244] ; a000cb5c <sem_open+0x100> <== NOT EXECUTED
a000ca64: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
a000ca68: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000ca6c: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
a000ca70: e59d4028 ldr r4, [sp, #40] ; 0x28 <== NOT EXECUTED
a000ca74: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000ca78: e5832000 str r2, [r3] <== NOT EXECUTED
a000ca7c: e1a05000 mov r5, r0 <== NOT EXECUTED
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
a000ca80: e2146c02 ands r6, r4, #512 ; 0x200 <== NOT EXECUTED
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
a000ca84: 128d3034 addne r3, sp, #52 ; 0x34 <== NOT EXECUTED
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
a000ca88: e28d1008 add r1, sp, #8 <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
a000ca8c: 158d300c strne r3, [sp, #12] <== NOT EXECUTED
a000ca90: 159d7030 ldrne r7, [sp, #48] ; 0x30 <== NOT EXECUTED
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
a000ca94: 01a07006 moveq r7, r6 <== NOT EXECUTED
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
a000ca98: eb0019c9 bl a00131c4 <_POSIX_Semaphore_Name_to_id> <== NOT EXECUTED
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
a000ca9c: e2508000 subs r8, r0, #0 <== NOT EXECUTED
a000caa0: 0a000008 beq a000cac8 <sem_open+0x6c> <== NOT EXECUTED
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
a000caa4: e3580002 cmp r8, #2 <== NOT EXECUTED
a000caa8: 1a000001 bne a000cab4 <sem_open+0x58> <== NOT EXECUTED
a000caac: e3560000 cmp r6, #0 <== NOT EXECUTED
a000cab0: 1a000018 bne a000cb18 <sem_open+0xbc> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000cab4: eb000b28 bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
a000cab8: eb002604 bl a00162d0 <__errno> <== NOT EXECUTED
a000cabc: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000cac0: e5808000 str r8, [r0] <== NOT EXECUTED
a000cac4: ea00000e b a000cb04 <sem_open+0xa8> <== NOT EXECUTED
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
a000cac8: e2044c0a and r4, r4, #2560 ; 0xa00 <== NOT EXECUTED
a000cacc: e3540c0a cmp r4, #2560 ; 0xa00 <== NOT EXECUTED
a000cad0: 0a00001b beq a000cb44 <sem_open+0xe8> <== NOT EXECUTED
a000cad4: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
a000cad8: e1a0200d mov r2, sp <== NOT EXECUTED
a000cadc: e59f007c ldr r0, [pc, #124] ; a000cb60 <sem_open+0x104> <== NOT EXECUTED
a000cae0: eb000813 bl a000eb34 <_Objects_Get> <== NOT EXECUTED
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
a000cae4: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
a000cae8: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
the_semaphore->open_count += 1;
a000caec: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000caf0: e5803018 str r3, [r0, #24] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000caf4: eb000b18 bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000caf8: eb000b17 bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
a000cafc: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
a000cb00: e2833008 add r3, r3, #8 <== NOT EXECUTED
#endif
return id;
}
a000cb04: e1a00003 mov r0, r3 <== NOT EXECUTED
a000cb08: e28dd010 add sp, sp, #16 <== NOT EXECUTED
a000cb0c: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
a000cb10: e28dd00c add sp, sp, #12 <== NOT EXECUTED
a000cb14: e12fff1e bx lr <== NOT EXECUTED
/*
* At this point, the semaphore does not exist and everything has been
* checked. We should go ahead and create a semaphore.
*/
status =_POSIX_Semaphore_Create_support(
a000cb18: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a000cb1c: e3a01000 mov r1, #0 <== NOT EXECUTED
a000cb20: e1a02007 mov r2, r7 <== NOT EXECUTED
a000cb24: e1a00005 mov r0, r5 <== NOT EXECUTED
a000cb28: eb00194f bl a001306c <_POSIX_Semaphore_Create_support> <== NOT EXECUTED
a000cb2c: e1a04000 mov r4, r0 <== NOT EXECUTED
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
a000cb30: eb000b09 bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( status == -1 )
a000cb34: e3740001 cmn r4, #1 <== NOT EXECUTED
return SEM_FAILED;
a000cb38: 01a03004 moveq r3, r4 <== NOT EXECUTED
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
if ( status == -1 )
a000cb3c: 1affffee bne a000cafc <sem_open+0xa0> <== NOT EXECUTED
a000cb40: eaffffef b a000cb04 <sem_open+0xa8> <== NOT EXECUTED
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
a000cb44: eb000b04 bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
a000cb48: eb0025e0 bl a00162d0 <__errno> <== NOT EXECUTED
a000cb4c: e3a03011 mov r3, #17 <== NOT EXECUTED
a000cb50: e5803000 str r3, [r0] <== NOT EXECUTED
a000cb54: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000cb58: eaffffe9 b a000cb04 <sem_open+0xa8> <== NOT EXECUTED
a000cb64 <sem_post>:
*/
int sem_post(
sem_t *sem
)
{
a000cb64: e92d4010 push {r4, lr} <== NOT EXECUTED
a000cb68: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000cb6c: e5901000 ldr r1, [r0] <== NOT EXECUTED
a000cb70: e1a0200d mov r2, sp <== NOT EXECUTED
a000cb74: e59f0044 ldr r0, [pc, #68] ; a000cbc0 <sem_post+0x5c> <== NOT EXECUTED
a000cb78: eb0007ed bl a000eb34 <_Objects_Get> <== NOT EXECUTED
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
a000cb7c: e59d4000 ldr r4, [sp] <== NOT EXECUTED
a000cb80: e1a03000 mov r3, r0 <== NOT EXECUTED
a000cb84: e3540000 cmp r4, #0 <== NOT EXECUTED
a000cb88: 0a000005 beq a000cba4 <sem_post+0x40> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000cb8c: eb0025cf bl a00162d0 <__errno> <== NOT EXECUTED
a000cb90: e3a03016 mov r3, #22 <== NOT EXECUTED
a000cb94: e5803000 str r3, [r0] <== NOT EXECUTED
a000cb98: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a000cb9c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000cba0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Surrender(
a000cba4: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
a000cba8: e1a02004 mov r2, r4 <== NOT EXECUTED
a000cbac: e280001c add r0, r0, #28 <== NOT EXECUTED
a000cbb0: eb000534 bl a000e088 <_CORE_semaphore_Surrender> <== NOT EXECUTED
NULL /* XXX need to define a routine to handle this case */
#else
NULL
#endif
);
_Thread_Enable_dispatch();
a000cbb4: eb000ae8 bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000cbb8: e1a00004 mov r0, r4 <== NOT EXECUTED
a000cbbc: eafffff6 b a000cb9c <sem_post+0x38> <== NOT EXECUTED
a000cbc4 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
a000cbc4: e92d4010 push {r4, lr} <== NOT EXECUTED
a000cbc8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000cbcc: e1a04000 mov r4, r0 <== NOT EXECUTED
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
a000cbd0: e1a00001 mov r0, r1 <== NOT EXECUTED
a000cbd4: e1a0100d mov r1, sp <== NOT EXECUTED
a000cbd8: eb001685 bl a00125f4 <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
a000cbdc: e3500003 cmp r0, #3 <== NOT EXECUTED
a000cbe0: 0a000005 beq a000cbfc <sem_timedwait+0x38> <== NOT EXECUTED
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
a000cbe4: e1a00004 mov r0, r4 <== NOT EXECUTED
a000cbe8: e3a01000 mov r1, #0 <== NOT EXECUTED
a000cbec: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000cbf0: eb00199b bl a0013264 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
a000cbf4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000cbf8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
a000cbfc: e1a00004 mov r0, r4 <== NOT EXECUTED
a000cc00: e3a01001 mov r1, #1 <== NOT EXECUTED
a000cc04: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000cc08: eb001995 bl a0013264 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
a000cc0c: eafffff8 b a000cbf4 <sem_timedwait+0x30> <== NOT EXECUTED
a000cc10 <sem_trywait>:
int sem_trywait(
sem_t *sem
)
{
return _POSIX_Semaphore_Wait_support(sem, false, THREAD_QUEUE_WAIT_FOREVER);
a000cc10: e3a01000 mov r1, #0 <== NOT EXECUTED
a000cc14: e1a02001 mov r2, r1 <== NOT EXECUTED
a000cc18: ea001991 b a0013264 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
a000cc1c <sem_unlink>:
a000cc1c: e59f306c ldr r3, [pc, #108] ; a000cc90 <sem_unlink+0x74> <== NOT EXECUTED
*/
int sem_unlink(
const char *name
)
{
a000cc20: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000cc24: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000cc28: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000cc2c: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000cc30: e5832000 str r2, [r3] <== NOT EXECUTED
register POSIX_Semaphore_Control *the_semaphore;
sem_t the_semaphore_id;
_Thread_Disable_dispatch();
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
a000cc34: e1a0100d mov r1, sp <== NOT EXECUTED
a000cc38: eb001961 bl a00131c4 <_POSIX_Semaphore_Name_to_id> <== NOT EXECUTED
if ( status != 0 ) {
a000cc3c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a000cc40: 1a00000d bne a000cc7c <sem_unlink+0x60> <== NOT EXECUTED
_POSIX_Semaphore_Namespace_remove( the_semaphore );
_POSIX_Semaphore_Delete( the_semaphore );
_Thread_Enable_dispatch();
return 0;
}
a000cc44: e59f0048 ldr r0, [pc, #72] ; a000cc94 <sem_unlink+0x78> <== NOT EXECUTED
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
a000cc48: e1dd20b0 ldrh r2, [sp] <== NOT EXECUTED
a000cc4c: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
if ( status != 0 ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( status );
}
the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object(
a000cc50: e7934102 ldr r4, [r3, r2, lsl #2] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Namespace_remove(
a000cc54: e1a01004 mov r1, r4 <== NOT EXECUTED
&_POSIX_Semaphore_Information,
_Objects_Get_index( the_semaphore_id )
);
the_semaphore->linked = false;
a000cc58: e5c45015 strb r5, [r4, #21] <== NOT EXECUTED
a000cc5c: eb00080c bl a000ec94 <_Objects_Namespace_remove> <== NOT EXECUTED
_POSIX_Semaphore_Namespace_remove( the_semaphore );
_POSIX_Semaphore_Delete( the_semaphore );
a000cc60: e1a00004 mov r0, r4 <== NOT EXECUTED
a000cc64: eb001941 bl a0013170 <_POSIX_Semaphore_Delete> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000cc68: eb000abb bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000cc6c: e1a03005 mov r3, r5 <== NOT EXECUTED
}
a000cc70: e1a00003 mov r0, r3 <== NOT EXECUTED
a000cc74: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000cc78: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
_Thread_Disable_dispatch();
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
if ( status != 0 ) {
_Thread_Enable_dispatch();
a000cc7c: eb000ab6 bl a000f75c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( status );
a000cc80: eb002592 bl a00162d0 <__errno> <== NOT EXECUTED
a000cc84: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000cc88: e5805000 str r5, [r0] <== NOT EXECUTED
a000cc8c: eafffff7 b a000cc70 <sem_unlink+0x54> <== NOT EXECUTED
a000cc98 <sem_wait>:
int sem_wait(
sem_t *sem
)
{
return _POSIX_Semaphore_Wait_support( sem, true, THREAD_QUEUE_WAIT_FOREVER );
a000cc98: e3a01001 mov r1, #1 <== NOT EXECUTED
a000cc9c: e3a02000 mov r2, #0 <== NOT EXECUTED
a000cca0: ea00196f b a0013264 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
a000990c <setitimer>:
int which,
const struct itimerval *value,
struct itimerval *ovalue
)
{
if ( !value )
a000990c: e3510000 cmp r1, #0 <== NOT EXECUTED
int setitimer(
int which,
const struct itimerval *value,
struct itimerval *ovalue
)
{
a0009910: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if ( !value )
a0009914: 0a00000d beq a0009950 <setitimer+0x44> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
a0009918: e3520000 cmp r2, #0 <== NOT EXECUTED
a000991c: 0a00000b beq a0009950 <setitimer+0x44> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT );
switch ( which ) {
a0009920: e3500002 cmp r0, #2 <== NOT EXECUTED
a0009924: 9a000004 bls a000993c <setitimer+0x30> <== NOT EXECUTED
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a0009928: eb0023fe bl a0012928 <__errno> <== NOT EXECUTED
a000992c: e3a03016 mov r3, #22 <== NOT EXECUTED
a0009930: e5803000 str r3, [r0] <== NOT EXECUTED
}
a0009934: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0009938: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
switch ( which ) {
case ITIMER_REAL:
case ITIMER_VIRTUAL:
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
a000993c: eb0023f9 bl a0012928 <__errno> <== NOT EXECUTED
a0009940: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a0009944: e5803000 str r3, [r0] <== NOT EXECUTED
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
a0009948: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000994c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
{
if ( !value )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
rtems_set_errno_and_return_minus_one( EFAULT );
a0009950: eb0023f4 bl a0012928 <__errno> <== NOT EXECUTED
a0009954: e3a0300e mov r3, #14 <== NOT EXECUTED
a0009958: e5803000 str r3, [r0] <== NOT EXECUTED
a000995c: eafffff4 b a0009934 <setitimer+0x28> <== NOT EXECUTED
a000a410 <sigaction>:
struct sigaction *oact
)
{
ISR_Level level;
if ( oact )
a000a410: e3520000 cmp r2, #0
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
a000a414: e92d4070 push {r4, r5, r6, lr}
a000a418: e1a04000 mov r4, r0
a000a41c: e1a05001 mov r5, r1
ISR_Level level;
if ( oact )
a000a420: 0a00000a beq a000a450 <sigaction+0x40>
*oact = _POSIX_signals_Vectors[ sig ];
a000a424: e3a0100c mov r1, #12
a000a428: e59f00ec ldr r0, [pc, #236] ; a000a51c <sigaction+0x10c>
a000a42c: e0010194 mul r1, r4, r1
a000a430: e1a03002 mov r3, r2
a000a434: e790c001 ldr ip, [r0, r1]
a000a438: e0801001 add r1, r0, r1
a000a43c: e483c004 str ip, [r3], #4
a000a440: e5910004 ldr r0, [r1, #4]
a000a444: e5820004 str r0, [r2, #4]
a000a448: e5912008 ldr r2, [r1, #8]
a000a44c: e5832004 str r2, [r3, #4]
if ( !sig )
a000a450: e3540000 cmp r4, #0
a000a454: 0a00002b beq a000a508 <sigaction+0xf8>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
a000a458: e2443001 sub r3, r4, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
a000a45c: e353001f cmp r3, #31
a000a460: 8a000028 bhi a000a508 <sigaction+0xf8>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
a000a464: e3540009 cmp r4, #9
a000a468: 0a000026 beq a000a508 <sigaction+0xf8>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
a000a46c: e3550000 cmp r5, #0
a000a470: 0a000022 beq a000a500 <sigaction+0xf0>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a474: e10f6000 mrs r6, CPSR
a000a478: e3863080 orr r3, r6, #128 ; 0x80
a000a47c: e129f003 msr CPSR_fc, r3
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
a000a480: e5953008 ldr r3, [r5, #8]
a000a484: e3530000 cmp r3, #0
a000a488: 0a00000f beq a000a4cc <sigaction+0xbc>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
a000a48c: e1a00004 mov r0, r4
a000a490: eb00175b bl a0010204 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
a000a494: e1a03005 mov r3, r5
a000a498: e3a0000c mov r0, #12
a000a49c: e4931004 ldr r1, [r3], #4
a000a4a0: e59f2074 ldr r2, [pc, #116] ; a000a51c <sigaction+0x10c>
a000a4a4: e0040490 mul r4, r0, r4
a000a4a8: e7821004 str r1, [r2, r4]
a000a4ac: e5951004 ldr r1, [r5, #4]
a000a4b0: e0824004 add r4, r2, r4
a000a4b4: e5841004 str r1, [r4, #4]
a000a4b8: e5933004 ldr r3, [r3, #4]
a000a4bc: e5843008 str r3, [r4, #8]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a4c0: e129f006 msr CPSR_fc, r6
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
a000a4c4: e3a00000 mov r0, #0
a000a4c8: e8bd8070 pop {r4, r5, r6, pc}
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
a000a4cc: e3a0300c mov r3, #12
a000a4d0: e0040493 mul r4, r3, r4
a000a4d4: e59f1044 ldr r1, [pc, #68] ; a000a520 <sigaction+0x110>
a000a4d8: e59f203c ldr r2, [pc, #60] ; a000a51c <sigaction+0x10c>
a000a4dc: e0813004 add r3, r1, r4
a000a4e0: e791c004 ldr ip, [r1, r4]
a000a4e4: e9930003 ldmib r3, {r0, r1}
a000a4e8: e0823004 add r3, r2, r4
a000a4ec: e782c004 str ip, [r2, r4]
a000a4f0: e9830003 stmib r3, {r0, r1}
a000a4f4: e129f006 msr CPSR_fc, r6
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
a000a4f8: e3a00000 mov r0, #0
a000a4fc: e8bd8070 pop {r4, r5, r6, pc}
a000a500: e1a00005 mov r0, r5 <== NOT EXECUTED
}
a000a504: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
a000a508: eb0023d2 bl a0013458 <__errno> <== NOT EXECUTED
a000a50c: e3a03016 mov r3, #22 <== NOT EXECUTED
a000a510: e5803000 str r3, [r0] <== NOT EXECUTED
a000a514: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a518: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000a524 <sigaddset>:
int sigaddset(
sigset_t *set,
int signo
)
{
if ( !set )
a000a524: e2503000 subs r3, r0, #0
int sigaddset(
sigset_t *set,
int signo
)
{
a000a528: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !set )
a000a52c: 0a00000a beq a000a55c <sigaddset+0x38>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
a000a530: e3510000 cmp r1, #0
a000a534: 0a000008 beq a000a55c <sigaddset+0x38>
a000a538: e2411001 sub r1, r1, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
a000a53c: e351001f cmp r1, #31
a000a540: 8a000005 bhi a000a55c <sigaddset+0x38>
rtems_set_errno_and_return_minus_one( EINVAL );
*set |= signo_to_mask(signo);
a000a544: e5932000 ldr r2, [r3]
a000a548: e3a0c001 mov ip, #1
return 0;
a000a54c: e3a00000 mov r0, #0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
*set |= signo_to_mask(signo);
a000a550: e182111c orr r1, r2, ip, lsl r1
a000a554: e5831000 str r1, [r3]
return 0;
}
a000a558: e49df004 pop {pc} ; (ldr pc, [sp], #4)
if ( !signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
a000a55c: eb0023bd bl a0013458 <__errno> <== NOT EXECUTED
a000a560: e3a03016 mov r3, #22 <== NOT EXECUTED
a000a564: e5803000 str r3, [r0] <== NOT EXECUTED
a000a568: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a56c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000c648 <sigdelset>:
int sigdelset(
sigset_t *set,
int signo
)
{
if ( !set )
a000c648: e2503000 subs r3, r0, #0
int sigdelset(
sigset_t *set,
int signo
)
{
a000c64c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !set )
a000c650: 0a00000c beq a000c688 <sigdelset+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
a000c654: e3510000 cmp r1, #0
a000c658: 0a000008 beq a000c680 <sigdelset+0x38>
a000c65c: e2411001 sub r1, r1, #1
return 0;
if ( !is_valid_signo(signo) )
a000c660: e351001f cmp r1, #31
a000c664: 8a000007 bhi a000c688 <sigdelset+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
*set &= ~signo_to_mask(signo);
a000c668: e5932000 ldr r2, [r3]
a000c66c: e3a0c001 mov ip, #1
return 0;
a000c670: e3a00000 mov r0, #0
return 0;
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
*set &= ~signo_to_mask(signo);
a000c674: e1c2111c bic r1, r2, ip, lsl r1
a000c678: e5831000 str r1, [r3]
return 0;
a000c67c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
{
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
return 0;
a000c680: e1a00001 mov r0, r1 <== NOT EXECUTED
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
*set &= ~signo_to_mask(signo);
return 0;
}
a000c684: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
if ( !signo )
return 0;
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
a000c688: eb00242d bl a0015744 <__errno> <== NOT EXECUTED
a000c68c: e3a03016 mov r3, #22 <== NOT EXECUTED
a000c690: e5803000 str r3, [r0] <== NOT EXECUTED
a000c694: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000c698: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000f4b0 <sigemptyset>:
int sigemptyset(
sigset_t *set
)
{
if ( !set )
a000f4b0: e2503000 subs r3, r0, #0
#include <rtems/seterr.h>
int sigemptyset(
sigset_t *set
)
{
a000f4b4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !set )
a000f4b8: 0a000002 beq a000f4c8 <sigemptyset+0x18>
rtems_set_errno_and_return_minus_one( EINVAL );
*set = 0;
a000f4bc: e3a00000 mov r0, #0
a000f4c0: e5830000 str r0, [r3]
return 0;
}
a000f4c4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
int sigemptyset(
sigset_t *set
)
{
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
a000f4c8: eb000aff bl a00120cc <__errno> <== NOT EXECUTED
a000f4cc: e3a03016 mov r3, #22 <== NOT EXECUTED
a000f4d0: e5803000 str r3, [r0] <== NOT EXECUTED
a000f4d4: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000f4d8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000c6c8 <sigfillset>:
int sigfillset(
sigset_t *set
)
{
if ( !set )
a000c6c8: e3500000 cmp r0, #0
#include <rtems/seterr.h>
int sigfillset(
sigset_t *set
)
{
a000c6cc: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !set )
a000c6d0: 0a000003 beq a000c6e4 <sigfillset+0x1c>
rtems_set_errno_and_return_minus_one( EINVAL );
*set = SIGNAL_ALL_MASK;
a000c6d4: e3e03000 mvn r3, #0
a000c6d8: e5803000 str r3, [r0]
return 0;
a000c6dc: e3a00000 mov r0, #0
}
a000c6e0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
int sigfillset(
sigset_t *set
)
{
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
a000c6e4: eb002416 bl a0015744 <__errno>
a000c6e8: e3a03016 mov r3, #22
a000c6ec: e5803000 str r3, [r0] <== NOT EXECUTED
a000c6f0: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000c6f4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000c6f8 <sigismember>:
int sigismember(
const sigset_t *set,
int signo
)
{
if ( !set )
a000c6f8: e3500000 cmp r0, #0 <== NOT EXECUTED
int sigismember(
const sigset_t *set,
int signo
)
{
a000c6fc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if ( !set )
a000c700: 0a00000c beq a000c738 <sigismember+0x40> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
a000c704: e3510000 cmp r1, #0 <== NOT EXECUTED
a000c708: 0a000008 beq a000c730 <sigismember+0x38> <== NOT EXECUTED
a000c70c: e2411001 sub r1, r1, #1 <== NOT EXECUTED
return 0;
if ( !is_valid_signo(signo) )
a000c710: e351001f cmp r1, #31 <== NOT EXECUTED
a000c714: 8a000007 bhi a000c738 <sigismember+0x40> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( *set & signo_to_mask(signo) )
a000c718: e5903000 ldr r3, [r0] <== NOT EXECUTED
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a000c71c: e3a02001 mov r2, #1 <== NOT EXECUTED
const sigset_t *set,
int signo
)
{
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
a000c720: e0133112 ands r3, r3, r2, lsl r1 <== NOT EXECUTED
a000c724: 03a00000 moveq r0, #0 <== NOT EXECUTED
a000c728: 13a00001 movne r0, #1 <== NOT EXECUTED
a000c72c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
if ( !signo )
return 0;
a000c730: e1a00001 mov r0, r1 <== NOT EXECUTED
if ( *set & signo_to_mask(signo) )
return 1;
return 0;
}
a000c734: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
if ( !signo )
return 0;
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
a000c738: eb002401 bl a0015744 <__errno> <== NOT EXECUTED
a000c73c: e3a03016 mov r3, #22 <== NOT EXECUTED
a000c740: e5803000 str r3, [r0] <== NOT EXECUTED
a000c744: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000c748: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000a59c <sigpending>:
sigset_t *set
)
{
POSIX_API_Control *api;
if ( !set )
a000a59c: e2503000 subs r3, r0, #0
#include <rtems/seterr.h>
int sigpending(
sigset_t *set
)
{
a000a5a0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
POSIX_API_Control *api;
if ( !set )
a000a5a4: 0a000009 beq a000a5d0 <sigpending+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a000a5a8: e59f2034 ldr r2, [pc, #52] ; a000a5e4 <sigpending+0x48>
*set = api->signals_pending | _POSIX_signals_Pending;
a000a5ac: e59f1034 ldr r1, [pc, #52] ; a000a5e8 <sigpending+0x4c>
return 0;
a000a5b0: e3a00000 mov r0, #0
POSIX_API_Control *api;
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a000a5b4: e5922004 ldr r2, [r2, #4]
*set = api->signals_pending | _POSIX_signals_Pending;
a000a5b8: e5911000 ldr r1, [r1]
a000a5bc: e59220fc ldr r2, [r2, #252] ; 0xfc
a000a5c0: e59220d4 ldr r2, [r2, #212] ; 0xd4
a000a5c4: e1812002 orr r2, r1, r2
a000a5c8: e5832000 str r2, [r3]
return 0;
}
a000a5cc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
)
{
POSIX_API_Control *api;
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
a000a5d0: eb0023a0 bl a0013458 <__errno>
a000a5d4: e3a03016 mov r3, #22 <== NOT EXECUTED
a000a5d8: e5803000 str r3, [r0] <== NOT EXECUTED
a000a5dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a5e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000c7a0 <sigqueue>:
int sigqueue(
pid_t pid,
int signo,
const union sigval value
)
{
a000c7a0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
a000c7a4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000c7a8: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a000c7ac: e5232004 str r2, [r3, #-4]! <== NOT EXECUTED
return killinfo( pid, signo, &value );
a000c7b0: e1a0200d mov r2, sp <== NOT EXECUTED
a000c7b4: eb001768 bl a001255c <killinfo> <== NOT EXECUTED
}
a000c7b8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000c7bc: e8bd8000 pop {pc} <== NOT EXECUTED
a000c7c0 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
a000c7c0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000c7c4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
/*
* We use SIG_BLOCK and not SIG_SETMASK because there may be
* signals which might be pending, which might get caught here.
* We want the signals to be caught inside sigtimedwait.
*/
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
a000c7c8: e28d4004 add r4, sp, #4 <== NOT EXECUTED
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
a000c7cc: e1a05000 mov r5, r0 <== NOT EXECUTED
/*
* We use SIG_BLOCK and not SIG_SETMASK because there may be
* signals which might be pending, which might get caught here.
* We want the signals to be caught inside sigtimedwait.
*/
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
a000c7d0: e1a01000 mov r1, r0 <== NOT EXECUTED
a000c7d4: e1a02004 mov r2, r4 <== NOT EXECUTED
a000c7d8: e3a00001 mov r0, #1 <== NOT EXECUTED
a000c7dc: ebffffee bl a000c79c <sigprocmask> <== NOT EXECUTED
current_unblocked_signals = ~(*sigmask);
a000c7e0: e5953000 ldr r3, [r5] <== NOT EXECUTED
a000c7e4: e28d0008 add r0, sp, #8 <== NOT EXECUTED
status = sigtimedwait( ¤t_unblocked_signals, NULL, NULL );
a000c7e8: e3a01000 mov r1, #0 <== NOT EXECUTED
* signals which might be pending, which might get caught here.
* We want the signals to be caught inside sigtimedwait.
*/
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
current_unblocked_signals = ~(*sigmask);
a000c7ec: e1e03003 mvn r3, r3 <== NOT EXECUTED
a000c7f0: e5203008 str r3, [r0, #-8]! <== NOT EXECUTED
status = sigtimedwait( ¤t_unblocked_signals, NULL, NULL );
a000c7f4: e1a02001 mov r2, r1 <== NOT EXECUTED
a000c7f8: e1a0000d mov r0, sp <== NOT EXECUTED
a000c7fc: eb00001c bl a000c874 <sigtimedwait> <== NOT EXECUTED
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
a000c800: e3a00000 mov r0, #0 <== NOT EXECUTED
a000c804: e1a01004 mov r1, r4 <== NOT EXECUTED
a000c808: e1a02000 mov r2, r0 <== NOT EXECUTED
a000c80c: ebffffe2 bl a000c79c <sigprocmask> <== NOT EXECUTED
*/
#if defined(RTEMS_DEBUG)
assert( status != -1 );
#endif
rtems_set_errno_and_return_minus_one( EINTR );
a000c810: eb0023cb bl a0015744 <__errno> <== NOT EXECUTED
a000c814: e3a03004 mov r3, #4 <== NOT EXECUTED
a000c818: e5803000 str r3, [r0] <== NOT EXECUTED
}
a000c81c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000c820: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000c824: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000a944 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
a000a944: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
a000a948: e2506000 subs r6, r0, #0
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
a000a94c: e24dd010 sub sp, sp, #16
a000a950: e1a04001 mov r4, r1
a000a954: e1a05002 mov r5, r2
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
a000a958: 0a000062 beq a000aae8 <sigtimedwait+0x1a4>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
a000a95c: e3520000 cmp r2, #0
a000a960: 0a00004e beq a000aaa0 <sigtimedwait+0x15c>
if ( !_Timespec_Is_valid( timeout ) )
a000a964: e1a00002 mov r0, r2
a000a968: eb000dff bl a000e16c <_Timespec_Is_valid>
a000a96c: e3500000 cmp r0, #0
a000a970: 0a00005c beq a000aae8 <sigtimedwait+0x1a4>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
a000a974: e1a00005 mov r0, r5
a000a978: eb000e23 bl a000e20c <_Timespec_To_ticks>
if ( !interval )
a000a97c: e2501000 subs r1, r0, #0
a000a980: 0a000058 beq a000aae8 <sigtimedwait+0x1a4>
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
the_thread = _Thread_Executing;
a000a984: e59f7188 ldr r7, [pc, #392] ; a000ab14 <sigtimedwait+0x1d0>
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
a000a988: e3540000 cmp r4, #0
a000a98c: 028d4004 addeq r4, sp, #4
the_thread = _Thread_Executing;
a000a990: e5973004 ldr r3, [r7, #4]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000a994: e593a0fc ldr sl, [r3, #252] ; 0xfc
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a998: e10f8000 mrs r8, CPSR
a000a99c: e3882080 orr r2, r8, #128 ; 0x80
a000a9a0: e129f002 msr CPSR_fc, r2
*/
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
a000a9a4: e5962000 ldr r2, [r6]
a000a9a8: e59a00d4 ldr r0, [sl, #212] ; 0xd4
a000a9ac: e0129000 ands r9, r2, r0
a000a9b0: 1a00003c bne a000aaa8 <sigtimedwait+0x164>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
a000a9b4: e59f015c ldr r0, [pc, #348] ; a000ab18 <sigtimedwait+0x1d4>
a000a9b8: e5900000 ldr r0, [r0]
a000a9bc: e1120000 tst r2, r0
a000a9c0: 1a000027 bne a000aa64 <sigtimedwait+0x120>
a000a9c4: e59f2150 ldr r2, [pc, #336] ; a000ab1c <sigtimedwait+0x1d8>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
a000a9c8: e3e00000 mvn r0, #0
a000a9cc: e5840000 str r0, [r4]
a000a9d0: e5920000 ldr r0, [r2]
a000a9d4: e2800001 add r0, r0, #1
a000a9d8: e5820000 str r0, [r2]
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
a000a9dc: e3a02004 mov r2, #4
a000a9e0: e5832034 str r2, [r3, #52] ; 0x34
the_thread->Wait.option = *set;
a000a9e4: e5960000 ldr r0, [r6]
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
a000a9e8: e59f2130 ldr r2, [pc, #304] ; a000ab20 <sigtimedwait+0x1dc>
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
the_thread->Wait.return_argument = the_info;
a000a9ec: e5834028 str r4, [r3, #40] ; 0x28
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
a000a9f0: e5830030 str r0, [r3, #48] ; 0x30
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
a000a9f4: e5832044 str r2, [r3, #68] ; 0x44
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;
a000a9f8: e3a03001 mov r3, #1
a000a9fc: e5823030 str r3, [r2, #48] ; 0x30
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000aa00: e129f008 msr CPSR_fc, r8
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
the_thread->Wait.return_argument = the_info;
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
a000aa04: e59f0114 ldr r0, [pc, #276] ; a000ab20 <sigtimedwait+0x1dc>
a000aa08: e59f2114 ldr r2, [pc, #276] ; a000ab24 <sigtimedwait+0x1e0>
a000aa0c: eb000c0e bl a000da4c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
a000aa10: eb000adb bl a000d584 <_Thread_Enable_dispatch>
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
a000aa14: e3a0c000 mov ip, #0 <== NOT EXECUTED
a000aa18: e5941000 ldr r1, [r4] <== NOT EXECUTED
a000aa1c: e1a0300c mov r3, ip <== NOT EXECUTED
a000aa20: e1a0000a mov r0, sl <== NOT EXECUTED
a000aa24: e1a02004 mov r2, r4 <== NOT EXECUTED
a000aa28: e58dc000 str ip, [sp] <== NOT EXECUTED
a000aa2c: eb001804 bl a0010a44 <_POSIX_signals_Clear_signals> <== NOT EXECUTED
/* Set errno only if return code is not EINTR or
* if EINTR was caused by a signal being caught, which
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
a000aa30: e5973004 ldr r3, [r7, #4] <== NOT EXECUTED
a000aa34: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
a000aa38: e3530004 cmp r3, #4 <== NOT EXECUTED
a000aa3c: 1a00002e bne a000aafc <sigtimedwait+0x1b8> <== NOT EXECUTED
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
a000aa40: e5945000 ldr r5, [r4] <== NOT EXECUTED
a000aa44: e5963000 ldr r3, [r6] <== NOT EXECUTED
a000aa48: e3a01001 mov r1, #1 <== NOT EXECUTED
a000aa4c: e2452001 sub r2, r5, #1 <== NOT EXECUTED
a000aa50: e0133211 ands r3, r3, r1, lsl r2 <== NOT EXECUTED
a000aa54: 0a000028 beq a000aafc <sigtimedwait+0x1b8> <== NOT EXECUTED
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
a000aa58: e1a00005 mov r0, r5
a000aa5c: e28dd010 add sp, sp, #16
a000aa60: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
a000aa64: ebffffa3 bl a000a8f8 <_POSIX_signals_Get_lowest> <== NOT EXECUTED
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
a000aa68: e1a02004 mov r2, r4 <== NOT EXECUTED
a000aa6c: e1a01000 mov r1, r0 <== NOT EXECUTED
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
a000aa70: e1a05000 mov r5, r0 <== NOT EXECUTED
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
a000aa74: e3a03001 mov r3, #1 <== NOT EXECUTED
a000aa78: e1a0000a mov r0, sl <== NOT EXECUTED
a000aa7c: e58d9000 str r9, [sp] <== NOT EXECUTED
a000aa80: eb0017ef bl a0010a44 <_POSIX_signals_Clear_signals> <== NOT EXECUTED
a000aa84: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
_ISR_Enable( level );
the_info->si_signo = signo;
the_info->si_code = SI_USER;
a000aa88: e3a03001 mov r3, #1 <== NOT EXECUTED
a000aa8c: e5843004 str r3, [r4, #4] <== NOT EXECUTED
the_info->si_value.sival_int = 0;
a000aa90: e3a03000 mov r3, #0 <== NOT EXECUTED
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
_ISR_Enable( level );
the_info->si_signo = signo;
a000aa94: e5845000 str r5, [r4] <== NOT EXECUTED
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
a000aa98: e5843008 str r3, [r4, #8] <== NOT EXECUTED
return signo;
a000aa9c: eaffffed b a000aa58 <sigtimedwait+0x114> <== NOT EXECUTED
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
a000aaa0: e1a01002 mov r1, r2
a000aaa4: eaffffb6 b a000a984 <sigtimedwait+0x40>
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
a000aaa8: ebffff92 bl a000a8f8 <_POSIX_signals_Get_lowest> <== NOT EXECUTED
_POSIX_signals_Clear_signals(
a000aaac: e3a0c000 mov ip, #0 <== NOT EXECUTED
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
a000aab0: e5840000 str r0, [r4] <== NOT EXECUTED
a000aab4: e1a01000 mov r1, r0 <== NOT EXECUTED
_POSIX_signals_Clear_signals(
a000aab8: e1a02004 mov r2, r4 <== NOT EXECUTED
a000aabc: e1a0000a mov r0, sl <== NOT EXECUTED
a000aac0: e1a0300c mov r3, ip <== NOT EXECUTED
a000aac4: e58dc000 str ip, [sp] <== NOT EXECUTED
a000aac8: eb0017dd bl a0010a44 <_POSIX_signals_Clear_signals> <== NOT EXECUTED
a000aacc: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
a000aad0: e3a03001 mov r3, #1 <== NOT EXECUTED
a000aad4: e5843004 str r3, [r4, #4] <== NOT EXECUTED
the_info->si_value.sival_int = 0;
a000aad8: e3a03000 mov r3, #0 <== NOT EXECUTED
a000aadc: e5843008 str r3, [r4, #8] <== NOT EXECUTED
return the_info->si_signo;
a000aae0: e5945000 ldr r5, [r4] <== NOT EXECUTED
a000aae4: eaffffdb b a000aa58 <sigtimedwait+0x114> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
a000aae8: eb002438 bl a0013bd0 <__errno>
a000aaec: e3a03016 mov r3, #22
a000aaf0: e5803000 str r3, [r0]
a000aaf4: e3e05000 mvn r5, #0
a000aaf8: eaffffd6 b a000aa58 <sigtimedwait+0x114>
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
errno = _Thread_Executing->Wait.return_code;
a000aafc: eb002433 bl a0013bd0 <__errno> <== NOT EXECUTED
a000ab00: e5973004 ldr r3, [r7, #4] <== NOT EXECUTED
return -1;
a000ab04: e3e05000 mvn r5, #0 <== NOT EXECUTED
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
errno = _Thread_Executing->Wait.return_code;
a000ab08: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
a000ab0c: e5803000 str r3, [r0] <== NOT EXECUTED
return -1;
a000ab10: eaffffd0 b a000aa58 <sigtimedwait+0x114> <== NOT EXECUTED
a000ca60 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
a000ca60: e92d4010 push {r4, lr}
a000ca64: e1a04001 mov r4, r1
int status;
status = sigtimedwait( set, NULL, NULL );
a000ca68: e3a01000 mov r1, #0
a000ca6c: e1a02001 mov r2, r1
a000ca70: ebffff7f bl a000c874 <sigtimedwait>
if ( status != -1 ) {
a000ca74: e3700001 cmn r0, #1
a000ca78: 0a000004 beq a000ca90 <sigwait+0x30>
if ( sig )
a000ca7c: e3540000 cmp r4, #0 <== NOT EXECUTED
a000ca80: 0a000005 beq a000ca9c <sigwait+0x3c> <== NOT EXECUTED
*sig = status;
a000ca84: e5840000 str r0, [r4] <== NOT EXECUTED
return 0;
a000ca88: e3a00000 mov r0, #0 <== NOT EXECUTED
a000ca8c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
}
return errno;
a000ca90: eb00232b bl a0015744 <__errno>
a000ca94: e5900000 ldr r0, [r0]
a000ca98: e8bd8010 pop {r4, pc}
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
a000ca9c: e1a00004 mov r0, r4 <== NOT EXECUTED
}
return errno;
}
a000caa0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000ca58 <sigwaitinfo>:
int sigwaitinfo(
const sigset_t *set,
siginfo_t *info
)
{
return sigtimedwait( set, info, NULL );
a000ca58: e3a02000 mov r2, #0 <== NOT EXECUTED
a000ca5c: eaffff84 b a000c874 <sigtimedwait> <== NOT EXECUTED
a000a284 <timer_delete>:
int timer_delete(
timer_t timerid
)
{
a000a284: e92d4030 push {r4, r5, lr}
a000a288: e24dd004 sub sp, sp, #4
a000a28c: e1a01000 mov r1, r0
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
_Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location );
a000a290: e1a0200d mov r2, sp
a000a294: e59f005c ldr r0, [pc, #92] ; a000a2f8 <timer_delete+0x74>
a000a298: eb000872 bl a000c468 <_Objects_Get>
*/
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
a000a29c: e59d5000 ldr r5, [sp]
a000a2a0: e1a04000 mov r4, r0
a000a2a4: e3550000 cmp r5, #0
a000a2a8: 0a000005 beq a000a2c4 <timer_delete+0x40>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000a2ac: eb0025b0 bl a0013974 <__errno>
a000a2b0: e3a03016 mov r3, #22
a000a2b4: e5803000 str r3, [r0]
a000a2b8: e3e00000 mvn r0, #0
}
a000a2bc: e28dd004 add sp, sp, #4
a000a2c0: e8bd8030 pop {r4, r5, pc}
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Timer_Information, &ptimer->Object );
a000a2c4: e1a01000 mov r1, r0
a000a2c8: e59f0028 ldr r0, [pc, #40] ; a000a2f8 <timer_delete+0x74> <== NOT EXECUTED
a000a2cc: eb000755 bl a000c028 <_Objects_Close> <== NOT EXECUTED
ptimer->state = POSIX_TIMER_STATE_FREE;
a000a2d0: e3a03001 mov r3, #1 <== NOT EXECUTED
a000a2d4: e5c4303c strb r3, [r4, #60] ; 0x3c <== NOT EXECUTED
(void) _Watchdog_Remove( &ptimer->Timer );
a000a2d8: e2840010 add r0, r4, #16 <== NOT EXECUTED
a000a2dc: eb000fb8 bl a000e1c4 <_Watchdog_Remove> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free (
POSIX_Timer_Control *the_timer
)
{
_Objects_Free( &_POSIX_Timer_Information, &the_timer->Object );
a000a2e0: e59f0010 ldr r0, [pc, #16] ; a000a2f8 <timer_delete+0x74> <== NOT EXECUTED
a000a2e4: e1a01004 mov r1, r4 <== NOT EXECUTED
a000a2e8: eb000805 bl a000c304 <_Objects_Free> <== NOT EXECUTED
_POSIX_Timer_Free( ptimer );
_Thread_Enable_dispatch();
a000a2ec: eb000b44 bl a000d004 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000a2f0: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a2f4: eafffff0 b a000a2bc <timer_delete+0x38> <== NOT EXECUTED
a000aed4 <timer_getoverrun>:
* its execution, _POSIX_Timer_TSR will have to set this counter to 0.
*/
int timer_getoverrun(
timer_t timerid
)
{
a000aed4: e92d4010 push {r4, lr}
a000aed8: e24dd004 sub sp, sp, #4
a000aedc: e1a01000 mov r1, r0
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
_Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location );
a000aee0: e1a0200d mov r2, sp
a000aee4: e59f0038 ldr r0, [pc, #56] ; a000af24 <timer_getoverrun+0x50>
a000aee8: eb000854 bl a000d040 <_Objects_Get>
int overrun;
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
a000aeec: e59d3000 ldr r3, [sp]
a000aef0: e3530000 cmp r3, #0
a000aef4: 0a000006 beq a000af14 <timer_getoverrun+0x40>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000aef8: eb0024a6 bl a0014198 <__errno>
a000aefc: e3a03016 mov r3, #22
a000af00: e5803000 str r3, [r0]
a000af04: e3e04000 mvn r4, #0
}
a000af08: e1a00004 mov r0, r4
a000af0c: e28dd004 add sp, sp, #4
a000af10: e8bd8010 pop {r4, pc}
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
overrun = ptimer->overrun;
a000af14: e5904068 ldr r4, [r0, #104] ; 0x68
ptimer->overrun = 0;
a000af18: e5803068 str r3, [r0, #104] ; 0x68 <== NOT EXECUTED
_Thread_Enable_dispatch();
a000af1c: eb000b2e bl a000dbdc <_Thread_Enable_dispatch> <== NOT EXECUTED
return overrun;
a000af20: eafffff8 b a000af08 <timer_getoverrun+0x34> <== NOT EXECUTED
a000af28 <timer_gettime>:
int timer_gettime(
timer_t timerid,
struct itimerspec *value
)
{
a000af28: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
POSIX_Timer_Control *ptimer;
Objects_Locations location;
struct timespec current_time;
Watchdog_Interval left;
if ( !value )
a000af2c: e2514000 subs r4, r1, #0 <== NOT EXECUTED
int timer_gettime(
timer_t timerid,
struct itimerspec *value
)
{
a000af30: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
a000af34: e1a05000 mov r5, r0 <== NOT EXECUTED
POSIX_Timer_Control *ptimer;
Objects_Locations location;
struct timespec current_time;
Watchdog_Interval left;
if ( !value )
a000af38: 0a000018 beq a000afa0 <timer_gettime+0x78> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
/* Reads the current time */
_TOD_Get( ¤t_time );
a000af3c: e1a0000d mov r0, sp <== NOT EXECUTED
a000af40: eb00059c bl a000c5b8 <_TOD_Get> <== NOT EXECUTED
a000af44: e1a01005 mov r1, r5 <== NOT EXECUTED
a000af48: e59f0064 ldr r0, [pc, #100] ; a000afb4 <timer_gettime+0x8c><== NOT EXECUTED
a000af4c: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a000af50: eb00083a bl a000d040 <_Objects_Get> <== NOT EXECUTED
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
a000af54: e59d6008 ldr r6, [sp, #8] <== NOT EXECUTED
a000af58: e1a05000 mov r5, r0 <== NOT EXECUTED
a000af5c: e3560000 cmp r6, #0 <== NOT EXECUTED
a000af60: 1a00000e bne a000afa0 <timer_gettime+0x78> <== NOT EXECUTED
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
a000af64: e59f304c ldr r3, [pc, #76] ; a000afb8 <timer_gettime+0x90> <== NOT EXECUTED
a000af68: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED
a000af6c: e590001c ldr r0, [r0, #28] <== NOT EXECUTED
a000af70: e5933000 ldr r3, [r3] <== NOT EXECUTED
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
a000af74: e2841008 add r1, r4, #8 <== NOT EXECUTED
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
a000af78: e0800002 add r0, r0, r2 <== NOT EXECUTED
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
a000af7c: e0630000 rsb r0, r3, r0 <== NOT EXECUTED
a000af80: eb000e0f bl a000e7c4 <_Timespec_From_ticks> <== NOT EXECUTED
value->it_interval = ptimer->timer_data.it_interval;
a000af84: e2853054 add r3, r5, #84 ; 0x54 <== NOT EXECUTED
a000af88: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000af8c: e884000c stm r4, {r2, r3} <== NOT EXECUTED
_Thread_Enable_dispatch();
a000af90: eb000b11 bl a000dbdc <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000af94: e1a00006 mov r0, r6 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
a000af98: e28dd00c add sp, sp, #12 <== NOT EXECUTED
a000af9c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000afa0: eb00247c bl a0014198 <__errno> <== NOT EXECUTED
a000afa4: e3a03016 mov r3, #22 <== NOT EXECUTED
a000afa8: e5803000 str r3, [r0] <== NOT EXECUTED
a000afac: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000afb0: eafffff8 b a000af98 <timer_gettime+0x70> <== NOT EXECUTED
a0009b10 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
a0009b10: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
a0009b14: e2525000 subs r5, r2, #0
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
a0009b18: e24dd020 sub sp, sp, #32
a0009b1c: e1a06000 mov r6, r0
a0009b20: e1a08001 mov r8, r1
a0009b24: e1a07003 mov r7, r3
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
a0009b28: 0a00004e beq a0009c68 <timer_settime+0x158>
/*
* First, it verifies if the structure "value" is correct
* if the number of nanoseconds is not correct return EINVAL
*/
if ( !_Timespec_Is_valid( &(value->it_value) ) ) {
a0009b2c: e2850008 add r0, r5, #8
a0009b30: eb000e8e bl a000d570 <_Timespec_Is_valid>
a0009b34: e3500000 cmp r0, #0
a0009b38: 0a00004a beq a0009c68 <timer_settime+0x158>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
a0009b3c: e1a00005 mov r0, r5
a0009b40: eb000e8a bl a000d570 <_Timespec_Is_valid>
a0009b44: e3500000 cmp r0, #0
a0009b48: 0a000046 beq a0009c68 <timer_settime+0x158>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
a0009b4c: e3580000 cmp r8, #0
a0009b50: 13580004 cmpne r8, #4
a0009b54: 1a000043 bne a0009c68 <timer_settime+0x158>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
a0009b58: e28d4004 add r4, sp, #4
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
a0009b5c: e3580004 cmp r8, #4
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
a0009b60: e895000f ldm r5, {r0, r1, r2, r3}
a0009b64: e884000f stm r4, {r0, r1, r2, r3}
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
a0009b68: 0a000029 beq a0009c14 <timer_settime+0x104>
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
_Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location );
a0009b6c: e1a01006 mov r1, r6
a0009b70: e59f0148 ldr r0, [pc, #328] ; a0009cc0 <timer_settime+0x1b0>
a0009b74: e28d201c add r2, sp, #28
a0009b78: eb00088d bl a000bdb4 <_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 ) {
a0009b7c: e59d301c ldr r3, [sp, #28]
a0009b80: e1a06000 mov r6, r0
a0009b84: e3530000 cmp r3, #0
a0009b88: 1a000036 bne a0009c68 <timer_settime+0x158>
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 ) {
a0009b8c: e59d300c ldr r3, [sp, #12]
a0009b90: e3530000 cmp r3, #0
a0009b94: 1a000002 bne a0009ba4 <timer_settime+0x94>
a0009b98: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
a0009b9c: e3530000 cmp r3, #0 <== NOT EXECUTED
a0009ba0: 0a000035 beq a0009c7c <timer_settime+0x16c> <== NOT EXECUTED
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
a0009ba4: e1a00005 mov r0, r5
a0009ba8: eb000e98 bl a000d610 <_Timespec_To_ticks>
a0009bac: e5860064 str r0, [r6, #100] ; 0x64
initial_period = _Timespec_To_ticks( &normalize.it_value );
a0009bb0: e2840008 add r0, r4, #8
a0009bb4: eb000e95 bl a000d610 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
a0009bb8: e5962008 ldr r2, [r6, #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 );
a0009bbc: e1a01000 mov r1, r0
activated = _POSIX_Timer_Insert_helper(
a0009bc0: e59f30fc ldr r3, [pc, #252] ; a0009cc4 <timer_settime+0x1b4>
a0009bc4: e2860010 add r0, r6, #16
a0009bc8: e58d6000 str r6, [sp]
a0009bcc: eb00195a bl a001013c <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
a0009bd0: e2505000 subs r5, r0, #0
a0009bd4: 0a000036 beq a0009cb4 <timer_settime+0x1a4>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
a0009bd8: e3570000 cmp r7, #0
*ovalue = ptimer->timer_data;
a0009bdc: 1286c054 addne ip, r6, #84 ; 0x54
a0009be0: 189c000f ldmne ip, {r0, r1, r2, r3}
a0009be4: 1887000f stmne r7, {r0, r1, r2, r3}
a0009be8: 0286c054 addeq ip, r6, #84 ; 0x54
ptimer->timer_data = normalize;
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
a0009bec: e3a0e003 mov lr, #3
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
a0009bf0: e894000f ldm r4, {r0, r1, r2, r3}
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
a0009bf4: e5c6e03c strb lr, [r6, #60] ; 0x3c
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
a0009bf8: e88c000f stm ip, {r0, r1, r2, r3}
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
a0009bfc: e286006c add r0, r6, #108 ; 0x6c
a0009c00: eb0005d2 bl a000b350 <_TOD_Get>
_Thread_Enable_dispatch();
a0009c04: eb000b51 bl a000c950 <_Thread_Enable_dispatch>
return 0;
a0009c08: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
a0009c0c: e28dd020 add sp, sp, #32
a0009c10: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
normalize = *value;
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
a0009c14: e28d8014 add r8, sp, #20
a0009c18: e1a00008 mov r0, r8
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
a0009c1c: e284a008 add sl, r4, #8
normalize = *value;
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
a0009c20: eb0005ca bl a000b350 <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
a0009c24: e1a00008 mov r0, r8
a0009c28: e1a0100a mov r1, sl
a0009c2c: eb000e41 bl a000d538 <_Timespec_Greater_than>
a0009c30: e3500000 cmp r0, #0
a0009c34: 1a00000b bne a0009c68 <timer_settime+0x158>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
a0009c38: e1a0100a mov r1, sl
a0009c3c: e1a00008 mov r0, r8
a0009c40: e1a0200a mov r2, sl
a0009c44: eb000e5a bl a000d5b4 <_Timespec_Subtract>
a0009c48: e1a01006 mov r1, r6
a0009c4c: e59f006c ldr r0, [pc, #108] ; a0009cc0 <timer_settime+0x1b0>
a0009c50: e28d201c add r2, sp, #28
a0009c54: eb000856 bl a000bdb4 <_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 ) {
a0009c58: e59d301c ldr r3, [sp, #28]
a0009c5c: e1a06000 mov r6, r0
a0009c60: e3530000 cmp r3, #0
a0009c64: 0affffc8 beq a0009b8c <timer_settime+0x7c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a0009c68: eb002492 bl a0012eb8 <__errno> <== NOT EXECUTED
a0009c6c: e3a03016 mov r3, #22 <== NOT EXECUTED
a0009c70: e5803000 str r3, [r0] <== NOT EXECUTED
a0009c74: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0009c78: eaffffe3 b a0009c0c <timer_settime+0xfc> <== NOT EXECUTED
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 );
a0009c7c: e2800010 add r0, r0, #16 <== NOT EXECUTED
a0009c80: eb000f91 bl a000dacc <_Watchdog_Remove> <== NOT EXECUTED
/* The old data of the timer are returned */
if ( ovalue )
a0009c84: e3570000 cmp r7, #0 <== NOT EXECUTED
*ovalue = ptimer->timer_data;
a0009c88: 1286c054 addne ip, r6, #84 ; 0x54 <== NOT EXECUTED
a0009c8c: 189c000f ldmne ip, {r0, r1, r2, r3} <== NOT EXECUTED
a0009c90: 1887000f stmne r7, {r0, r1, r2, r3} <== NOT EXECUTED
a0009c94: 0286c054 addeq ip, r6, #84 ; 0x54 <== NOT EXECUTED
/* The new data are set */
ptimer->timer_data = normalize;
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
a0009c98: e3a0e004 mov lr, #4 <== NOT EXECUTED
(void) _Watchdog_Remove( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
/* The new data are set */
ptimer->timer_data = normalize;
a0009c9c: e894000f ldm r4, {r0, r1, r2, r3} <== NOT EXECUTED
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
a0009ca0: e5c6e03c strb lr, [r6, #60] ; 0x3c <== NOT EXECUTED
(void) _Watchdog_Remove( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
/* The new data are set */
ptimer->timer_data = normalize;
a0009ca4: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
/* Returns with success */
_Thread_Enable_dispatch();
a0009ca8: eb000b28 bl a000c950 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a0009cac: e3a00000 mov r0, #0 <== NOT EXECUTED
a0009cb0: eaffffd5 b a0009c0c <timer_settime+0xfc> <== NOT EXECUTED
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
a0009cb4: eb000b25 bl a000c950 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a0009cb8: e1a00005 mov r0, r5 <== NOT EXECUTED
a0009cbc: eaffffd2 b a0009c0c <timer_settime+0xfc> <== NOT EXECUTED
a000997c <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
a000997c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
a0009980: e59f40e8 ldr r4, [pc, #232] ; a0009a70 <ualarm+0xf4> <== NOT EXECUTED
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
a0009984: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
a0009988: e1a05000 mov r5, r0 <== NOT EXECUTED
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
a000998c: e594601c ldr r6, [r4, #28] <== NOT EXECUTED
a0009990: e3560000 cmp r6, #0 <== NOT EXECUTED
a0009994: 0a00001e beq a0009a14 <ualarm+0x98> <== NOT EXECUTED
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
a0009998: e1a00004 mov r0, r4 <== NOT EXECUTED
a000999c: eb000f48 bl a000d6c4 <_Watchdog_Remove> <== NOT EXECUTED
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
a00099a0: e2400002 sub r0, r0, #2 <== NOT EXECUTED
a00099a4: e3500001 cmp r0, #1 <== NOT EXECUTED
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
a00099a8: 83a06000 movhi r6, #0 <== NOT EXECUTED
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
a00099ac: 9a00001e bls a0009a2c <ualarm+0xb0> <== 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 ) {
a00099b0: e3550000 cmp r5, #0 <== NOT EXECUTED
a00099b4: 0a000013 beq a0009a08 <ualarm+0x8c> <== NOT EXECUTED
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
a00099b8: e59f30b4 ldr r3, [pc, #180] ; a0009a74 <ualarm+0xf8> <== NOT EXECUTED
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
a00099bc: e3a0293d mov r2, #999424 ; 0xf4000 <== NOT EXECUTED
a00099c0: e2822d09 add r2, r2, #576 ; 0x240 <== NOT EXECUTED
* 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;
a00099c4: e0831395 umull r1, r3, r5, r3 <== NOT EXECUTED
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
a00099c8: e1a0000d mov r0, sp <== NOT EXECUTED
* 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;
a00099cc: e1a03923 lsr r3, r3, #18 <== NOT EXECUTED
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
a00099d0: e0020293 mul r2, r3, r2 <== NOT EXECUTED
* 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;
a00099d4: e58d3000 str r3, [sp] <== NOT EXECUTED
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
a00099d8: e0625005 rsb r5, r2, r5 <== NOT EXECUTED
a00099dc: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED
a00099e0: e0050592 mul r5, r2, r5 <== NOT EXECUTED
ticks = _Timespec_To_ticks( &tp );
a00099e4: e1a0700d mov r7, sp <== NOT EXECUTED
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
a00099e8: e58d5004 str r5, [sp, #4] <== NOT EXECUTED
ticks = _Timespec_To_ticks( &tp );
a00099ec: eb000dd4 bl a000d144 <_Timespec_To_ticks> <== NOT EXECUTED
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
a00099f0: e1a0000d mov r0, sp <== NOT EXECUTED
a00099f4: eb000dd2 bl a000d144 <_Timespec_To_ticks> <== NOT EXECUTED
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a00099f8: e59f1070 ldr r1, [pc, #112] ; a0009a70 <ualarm+0xf4> <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a00099fc: e584000c str r0, [r4, #12] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0009a00: e59f0070 ldr r0, [pc, #112] ; a0009a78 <ualarm+0xfc> <== NOT EXECUTED
a0009a04: eb000ebf bl a000d508 <_Watchdog_Insert> <== NOT EXECUTED
}
return remaining;
}
a0009a08: e1a00006 mov r0, r6 <== NOT EXECUTED
a0009a0c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a0009a10: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a0009a14: e59f3060 ldr r3, [pc, #96] ; a0009a7c <ualarm+0x100> <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0009a18: e5846008 str r6, [r4, #8] <== NOT EXECUTED
the_watchdog->routine = routine;
the_watchdog->id = id;
a0009a1c: e5846020 str r6, [r4, #32] <== NOT EXECUTED
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a0009a20: e584301c str r3, [r4, #28] <== NOT EXECUTED
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a0009a24: e5846024 str r6, [r4, #36] ; 0x24 <== NOT EXECUTED
a0009a28: eaffffe0 b a00099b0 <ualarm+0x34> <== NOT EXECUTED
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
a0009a2c: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
a0009a30: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
a0009a34: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
a0009a38: e1a0100d mov r1, sp <== NOT EXECUTED
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
a0009a3c: e0800002 add r0, r0, r2 <== NOT EXECUTED
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
a0009a40: e0630000 rsb r0, r3, r0 <== NOT EXECUTED
a0009a44: eb000d96 bl a000d0a4 <_Timespec_From_ticks> <== NOT EXECUTED
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
remaining += tp.tv_nsec / 1000;
a0009a48: e59f6030 ldr r6, [pc, #48] ; a0009a80 <ualarm+0x104> <== NOT EXECUTED
a0009a4c: e59d2004 ldr r2, [sp, #4] <== 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;
a0009a50: e3a0393d mov r3, #999424 ; 0xf4000 <== NOT EXECUTED
a0009a54: e2833d09 add r3, r3, #576 ; 0x240 <== NOT EXECUTED
remaining += tp.tv_nsec / 1000;
a0009a58: e0c61692 smull r1, r6, r2, r6 <== NOT EXECUTED
a0009a5c: e1a02fc2 asr r2, r2, #31 <== NOT EXECUTED
a0009a60: e0622346 rsb r2, r2, r6, asr #6 <== NOT EXECUTED
a0009a64: e59d6000 ldr r6, [sp] <== NOT EXECUTED
a0009a68: e0262693 mla r6, r3, r6, r2 <== NOT EXECUTED
a0009a6c: eaffffcf b a00099b0 <ualarm+0x34> <== NOT EXECUTED
a0009a20 <vfork>:
#include <unistd.h>
pid_t vfork(void)
{
return -1;
}
a0009a20: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0009a24: e12fff1e bx lr <== NOT EXECUTED
a0009a28 <wait>:
#include <rtems/seterr.h>
int wait(
int *stat_loc
)
{
a0009a28: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a0009a2c: eb0023fb bl a0012a20 <__errno> <== NOT EXECUTED
a0009a30: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a0009a34: e5803000 str r3, [r0] <== NOT EXECUTED
}
a0009a38: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0009a3c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0009a40 <waitpid>:
int waitpid(
pid_t pid,
int *stat_loc,
int options
)
{
a0009a40: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a0009a44: eb0023f5 bl a0012a20 <__errno> <== NOT EXECUTED
a0009a48: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a0009a4c: e5803000 str r3, [r0] <== NOT EXECUTED
}
a0009a50: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0009a54: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED