RTEMS 4.11Annotated Report
Sat Dec 22 16:22:07 2012
a0010698 <TOD_MICROSECONDS_TO_TICKS>:
/**
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
microseconds_per_tick = rtems_configuration_get_microseconds_per_tick();
a0010698: e59f3030 ldr r3, [pc, #48] ; a00106d0 <TOD_MICROSECONDS_TO_TICKS+0x38><== NOT EXECUTED
#include <rtems/score/tod.h>
uint32_t TOD_MICROSECONDS_TO_TICKS(
uint32_t microseconds
)
{
a001069c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
/**
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
microseconds_per_tick = rtems_configuration_get_microseconds_per_tick();
a00106a0: e593500c ldr r5, [r3, #12] <== NOT EXECUTED
#include <rtems/score/tod.h>
uint32_t TOD_MICROSECONDS_TO_TICKS(
uint32_t microseconds
)
{
a00106a4: e1a06000 mov r6, r0 <== NOT EXECUTED
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
microseconds_per_tick = rtems_configuration_get_microseconds_per_tick();
ticks = microseconds / microseconds_per_tick;
a00106a8: e1a01005 mov r1, r5 <== NOT EXECUTED
a00106ac: eb004fab bl a0024560 <__aeabi_uidiv> <== NOT EXECUTED
if ( (microseconds % microseconds_per_tick) != 0 )
a00106b0: e1a01005 mov r1, r5 <== NOT EXECUTED
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
microseconds_per_tick = rtems_configuration_get_microseconds_per_tick();
ticks = microseconds / microseconds_per_tick;
a00106b4: e1a04000 mov r4, r0 <== NOT EXECUTED
if ( (microseconds % microseconds_per_tick) != 0 )
a00106b8: e1a00006 mov r0, r6 <== NOT EXECUTED
a00106bc: eb004fed bl a0024678 <__umodsi3> <== NOT EXECUTED
a00106c0: e3500000 cmp r0, #0 <== NOT EXECUTED
ticks += 1;
a00106c4: 12844001 addne r4, r4, #1 <== NOT EXECUTED
return ticks;
}
a00106c8: e1a00004 mov r0, r4 <== NOT EXECUTED
a00106cc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000d888 <_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;
a000d888: e59fc0bc ldr ip, [pc, #188] ; a000d94c <_CORE_RWLock_Obtain_for_reading+0xc4>
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
a000d88c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
a000d890: e59c5008 ldr r5, [ip, #8]
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
a000d894: e1a04000 mov r4, r0
a000d898: e1a07001 mov r7, r1
a000d89c: e1a06003 mov r6, r3
a000d8a0: e202a0ff and sl, r2, #255 ; 0xff
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000d8a4: e10f8000 mrs r8, CPSR
a000d8a8: e3883080 orr r3, r8, #128 ; 0x80
a000d8ac: e129f003 msr CPSR_fc, r3
* 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 ) {
a000d8b0: e5903044 ldr r3, [r0, #68] ; 0x44
a000d8b4: e3530000 cmp r3, #0
a000d8b8: 1a000008 bne a000d8e0 <_CORE_RWLock_Obtain_for_reading+0x58>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
the_rwlock->number_of_readers += 1;
a000d8bc: e5903048 ldr r3, [r0, #72] ; 0x48
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
a000d8c0: e3a02001 mov r2, #1
a000d8c4: e5802044 str r2, [r0, #68] ; 0x44
the_rwlock->number_of_readers += 1;
a000d8c8: e0833002 add r3, r3, r2
case CORE_RWLOCK_LOCKED_FOR_READING: {
Thread_Control *waiter;
waiter = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !waiter ) {
the_rwlock->number_of_readers += 1;
a000d8cc: e5843048 str r3, [r4, #72] ; 0x48
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000d8d0: e129f008 msr CPSR_fc, r8
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
a000d8d4: e3a03000 mov r3, #0
a000d8d8: e5853034 str r3, [r5, #52] ; 0x34
return;
a000d8dc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* 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 ) {
a000d8e0: e3530001 cmp r3, #1
a000d8e4: 0a000012 beq a000d934 <_CORE_RWLock_Obtain_for_reading+0xac>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
a000d8e8: e35a0000 cmp sl, #0
a000d8ec: 1a000003 bne a000d900 <_CORE_RWLock_Obtain_for_reading+0x78>
a000d8f0: e129f008 msr CPSR_fc, r8
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
a000d8f4: e3a03002 mov r3, #2
a000d8f8: e5853034 str r3, [r5, #52] ; 0x34
return;
a000d8fc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
*/
_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;
a000d900: e3a03000 mov r3, #0
a000d904: e3a02001 mov r2, #1
a000d908: e5842030 str r2, [r4, #48] ; 0x30
/*
* 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;
a000d90c: e5854044 str r4, [r5, #68] ; 0x44
executing->Wait.id = id;
a000d910: e5857020 str r7, [r5, #32]
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
a000d914: e5853030 str r3, [r5, #48] ; 0x30
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
a000d918: e5853034 str r3, [r5, #52] ; 0x34
a000d91c: e129f008 msr CPSR_fc, r8
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
a000d920: e59f2028 ldr r2, [pc, #40] ; a000d950 <_CORE_RWLock_Obtain_for_reading+0xc8>
a000d924: e1a00004 mov r0, r4
a000d928: e1a01006 mov r1, r6
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
a000d92c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr}
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(
a000d930: ea000834 b a000fa08 <_Thread_queue_Enqueue_with_handler>
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
return;
case CORE_RWLOCK_LOCKED_FOR_READING: {
Thread_Control *waiter;
waiter = _Thread_queue_First( &the_rwlock->Wait_queue );
a000d934: eb000917 bl a000fd98 <_Thread_queue_First> <== NOT EXECUTED
if ( !waiter ) {
a000d938: e3500000 cmp r0, #0 <== NOT EXECUTED
a000d93c: 1affffe9 bne a000d8e8 <_CORE_RWLock_Obtain_for_reading+0x60><== NOT EXECUTED
the_rwlock->number_of_readers += 1;
a000d940: e5943048 ldr r3, [r4, #72] ; 0x48 <== NOT EXECUTED
a000d944: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000d948: eaffffdf b a000d8cc <_CORE_RWLock_Obtain_for_reading+0x44> <== NOT EXECUTED
a000d9e8 <_CORE_RWLock_Release>:
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
a000d9e8: e59f30e0 ldr r3, [pc, #224] ; a000dad0 <_CORE_RWLock_Release+0xe8>
#include <rtems/score/watchdog.h>
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
a000d9ec: e92d4010 push {r4, lr}
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
a000d9f0: e5931008 ldr r1, [r3, #8]
#include <rtems/score/watchdog.h>
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
a000d9f4: e1a04000 mov r4, r0
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000d9f8: e10f2000 mrs r2, CPSR
a000d9fc: e3823080 orr r3, r2, #128 ; 0x80
a000da00: e129f003 msr CPSR_fc, r3
* 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){
a000da04: e5903044 ldr r3, [r0, #68] ; 0x44
a000da08: e3530000 cmp r3, #0
a000da0c: 0a00002a beq a000dabc <_CORE_RWLock_Release+0xd4>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
a000da10: e3530001 cmp r3, #1
a000da14: 0a000020 beq a000da9c <_CORE_RWLock_Release+0xb4>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
a000da18: e3a03000 mov r3, #0
a000da1c: e5813034 str r3, [r1, #52] ; 0x34
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
a000da20: e5843044 str r3, [r4, #68] ; 0x44
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000da24: e129f002 msr CPSR_fc, r2
_ISR_Enable( level );
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
a000da28: e1a00004 mov r0, r4
a000da2c: eb00079a bl a000f89c <_Thread_queue_Dequeue>
if ( next ) {
a000da30: e3500000 cmp r0, #0
a000da34: 0a000016 beq a000da94 <_CORE_RWLock_Release+0xac>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
a000da38: e5903030 ldr r3, [r0, #48] ; 0x30
a000da3c: e3530001 cmp r3, #1
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
a000da40: 03a03002 moveq r3, #2
a000da44: 05843044 streq r3, [r4, #68] ; 0x44
_ISR_Enable( level );
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
a000da48: 0a000011 beq a000da94 <_CORE_RWLock_Release+0xac>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
a000da4c: e5943048 ldr r3, [r4, #72] ; 0x48 <== NOT EXECUTED
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
a000da50: e3a02001 mov r2, #1 <== NOT EXECUTED
a000da54: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
a000da58: e0833002 add r3, r3, r2 <== NOT EXECUTED
a000da5c: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
a000da60: ea000007 b a000da84 <_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 ||
a000da64: 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 );
a000da68: 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 ||
a000da6c: e3530001 cmp r3, #1 <== NOT EXECUTED
a000da70: 0a000007 beq a000da94 <_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;
a000da74: e5943048 ldr r3, [r4, #72] ; 0x48 <== NOT EXECUTED
a000da78: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000da7c: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
a000da80: eb000877 bl a000fc64 <_Thread_queue_Extract> <== NOT EXECUTED
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
a000da84: e1a00004 mov r0, r4 <== NOT EXECUTED
a000da88: eb0008c2 bl a000fd98 <_Thread_queue_First> <== NOT EXECUTED
if ( !next ||
a000da8c: e2501000 subs r1, r0, #0 <== NOT EXECUTED
a000da90: 1afffff3 bne a000da64 <_CORE_RWLock_Release+0x7c> <== NOT EXECUTED
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
a000da94: e3a00000 mov r0, #0
a000da98: e8bd8010 pop {r4, pc}
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
a000da9c: e5903048 ldr r3, [r0, #72] ; 0x48
a000daa0: e2433001 sub r3, r3, #1
if ( the_rwlock->number_of_readers != 0 ) {
a000daa4: e3530000 cmp r3, #0
_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;
a000daa8: e5803048 str r3, [r0, #72] ; 0x48
if ( the_rwlock->number_of_readers != 0 ) {
a000daac: 0affffd9 beq a000da18 <_CORE_RWLock_Release+0x30>
a000dab0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
a000dab4: e3a00000 mov r0, #0 <== NOT EXECUTED
a000dab8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000dabc: 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;
a000dac0: e3a03002 mov r3, #2 <== NOT EXECUTED
a000dac4: e5813034 str r3, [r1, #52] ; 0x34 <== NOT EXECUTED
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
a000dac8: e3a00000 mov r0, #0 <== NOT EXECUTED
a000dacc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000dad4 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
a000dad4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
a000dad8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000dadc: e1a0100d mov r1, sp <== NOT EXECUTED
a000dae0: eb00069a bl a000f550 <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
a000dae4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000dae8: e3530000 cmp r3, #0 <== NOT EXECUTED
a000daec: 1a000004 bne a000db04 <_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 );
a000daf0: eb0008e4 bl a000fe88 <_Thread_queue_Process_timeout> <== NOT EXECUTED
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000daf4: e59f3010 ldr r3, [pc, #16] ; a000db0c <_CORE_RWLock_Timeout+0x38><== NOT EXECUTED
a000daf8: e5932000 ldr r2, [r3] <== NOT EXECUTED
--level;
a000dafc: e2422001 sub r2, r2, #1 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
a000db00: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Unnest_dispatch();
break;
}
}
a000db04: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000db08: e8bd8000 pop {pc} <== NOT EXECUTED
a001bb6c <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a001bb6c: 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
)
{
a001bb70: 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 ) {
a001bb74: 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
)
{
a001bb78: e1a07000 mov r7, r0
a001bb7c: e1a05002 mov r5, r2
a001bb80: e1a08001 mov r8, r1
a001bb84: 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 ) {
a001bb88: 3a000013 bcc a001bbdc <_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 ) {
a001bb8c: e5906048 ldr r6, [r0, #72] ; 0x48
a001bb90: e3560000 cmp r6, #0
a001bb94: 0a000009 beq a001bbc0 <_CORE_message_queue_Broadcast+0x54>
*count = 0;
a001bb98: e3a00000 mov r0, #0
a001bb9c: e58a0000 str r0, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a001bba0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a001bba4: e594002c ldr r0, [r4, #44] ; 0x2c
a001bba8: e1a01008 mov r1, r8
a001bbac: e1a02005 mov r2, r5
a001bbb0: eb002292 bl a0024600 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a001bbb4: 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;
a001bbb8: e2866001 add r6, r6, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a001bbbc: 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 =
a001bbc0: e1a00007 mov r0, r7
a001bbc4: eb000c08 bl a001ebec <_Thread_queue_Dequeue>
a001bbc8: e2504000 subs r4, r0, #0
a001bbcc: 1afffff4 bne a001bba4 <_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;
a001bbd0: e58a6000 str r6, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a001bbd4: e1a00004 mov r0, r4
a001bbd8: 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;
a001bbdc: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
a001bbe0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a0013ac4 <_CORE_message_queue_Initialize>:
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
a0013ac4: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
a0013ac8: e3130003 tst r3, #3
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
a0013acc: e1a04000 mov r4, r0
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
a0013ad0: e3a00000 mov r0, #0
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
a0013ad4: e1a05002 mov r5, r2
a0013ad8: e1a07001 mov r7, r1
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
a0013adc: e5842044 str r2, [r4, #68] ; 0x44
the_message_queue->number_of_pending_messages = 0;
a0013ae0: e5840048 str r0, [r4, #72] ; 0x48
the_message_queue->maximum_message_size = maximum_message_size;
a0013ae4: e584304c str r3, [r4, #76] ; 0x4c
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
a0013ae8: e5840060 str r0, [r4, #96] ; 0x60
the_message_queue->notify_argument = the_argument;
a0013aec: e5840064 str r0, [r4, #100] ; 0x64
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
a0013af0: 01a06003 moveq r6, r3
a0013af4: 0a000004 beq a0013b0c <_CORE_message_queue_Initialize+0x48>
allocated_message_size += sizeof(uintptr_t);
a0013af8: e2836004 add r6, r3, #4
allocated_message_size &= ~(sizeof(uintptr_t) - 1);
a0013afc: e3c66003 bic r6, r6, #3
/*
* Check for an overflow. It can occur while increasing allocated_message_size
* to multiplicity of uintptr_t above.
*/
if (allocated_message_size < maximum_message_size)
a0013b00: e1530006 cmp r3, r6
a0013b04: 9a000000 bls a0013b0c <_CORE_message_queue_Initialize+0x48>
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
a0013b08: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
a0013b0c: e2866014 add r6, r6, #20
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
a0013b10: e0810695 umull r0, r1, r5, r6
if ( x > SIZE_MAX )
a0013b14: e3e02000 mvn r2, #0
a0013b18: e3a03000 mov r3, #0
a0013b1c: e1520000 cmp r2, r0
a0013b20: e0d3c001 sbcs ip, r3, r1
a0013b24: ba000018 blt a0013b8c <_CORE_message_queue_Initialize+0xc8>
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
a0013b28: eb000c2a bl a0016bd8 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
a0013b2c: e3500000 cmp r0, #0
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
a0013b30: e1a01000 mov r1, r0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
a0013b34: e584005c str r0, [r4, #92] ; 0x5c
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
a0013b38: 0afffff2 beq a0013b08 <_CORE_message_queue_Initialize+0x44>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
a0013b3c: e2840068 add r0, r4, #104 ; 0x68
a0013b40: e1a02005 mov r2, r5
a0013b44: e1a03006 mov r3, r6
a0013b48: ebffffc4 bl a0013a60 <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
a0013b4c: e5971000 ldr r1, [r7]
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 );
a0013b50: e2843050 add r3, r4, #80 ; 0x50
a0013b54: e2842054 add r2, r4, #84 ; 0x54
head->next = tail;
head->previous = NULL;
tail->previous = head;
a0013b58: e5843058 str r3, [r4, #88] ; 0x58
a0013b5c: e2413001 sub r3, r1, #1
a0013b60: e2731000 rsbs r1, r3, #0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a0013b64: e5842050 str r2, [r4, #80] ; 0x50
head->previous = NULL;
a0013b68: e3a02000 mov r2, #0
a0013b6c: e5842054 str r2, [r4, #84] ; 0x54
a0013b70: e1a00004 mov r0, r4
a0013b74: e0a11003 adc r1, r1, r3
a0013b78: e3a02080 mov r2, #128 ; 0x80
a0013b7c: e3a03006 mov r3, #6
a0013b80: eb0009e0 bl a0016308 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
a0013b84: e3a00001 mov r0, #1
a0013b88: e8bd80f0 pop {r4, r5, r6, r7, pc}
*/
if ( !size_t_mult32_with_overflow(
(size_t) maximum_pending_messages,
allocated_message_size + sizeof(CORE_message_queue_Buffer_control),
&message_buffering_required ) )
return false;
a0013b8c: e3a00000 mov r0, #0 <== NOT EXECUTED
a0013b90: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a0019094 <_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 ) {
a0019094: 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
)
{
a0019098: e92d4030 push {r4, r5, lr}
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
a001909c: 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 ) {
a00190a0: 0a000025 beq a001913c <_CORE_message_queue_Insert_message+0xa8>
_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 ) {
a00190a4: e3520102 cmp r2, #-2147483648 ; 0x80000000
a00190a8: 0a000033 beq a001917c <_CORE_message_queue_Insert_message+0xe8>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
a00190ac: e5903050 ldr r3, [r0, #80] ; 0x50
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
const Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Immutable_tail( the_chain ));
a00190b0: 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 ) ) {
a00190b4: e15c0003 cmp ip, r3
a00190b8: 0a000008 beq a00190e0 <_CORE_message_queue_Insert_message+0x4c>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
a00190bc: e5934008 ldr r4, [r3, #8] <== NOT EXECUTED
a00190c0: e1540002 cmp r4, r2 <== NOT EXECUTED
a00190c4: ca000005 bgt a00190e0 <_CORE_message_queue_Insert_message+0x4c><== NOT EXECUTED
the_node = the_node->next;
a00190c8: 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 ) ) {
a00190cc: e15c0003 cmp ip, r3 <== NOT EXECUTED
a00190d0: 0a000002 beq a00190e0 <_CORE_message_queue_Insert_message+0x4c><== 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 ) {
a00190d4: e5934008 ldr r4, [r3, #8] <== NOT EXECUTED
a00190d8: e1520004 cmp r2, r4 <== NOT EXECUTED
a00190dc: aafffff9 bge a00190c8 <_CORE_message_queue_Insert_message+0x34><== NOT EXECUTED
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a00190e0: e10f4000 mrs r4, CPSR
a00190e4: e3842080 orr r2, r4, #128 ; 0x80
a00190e8: 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 );
a00190ec: e5933004 ldr r3, [r3, #4]
continue;
}
break;
}
_ISR_Disable( level );
SET_NOTIFY();
a00190f0: e5902048 ldr r2, [r0, #72] ; 0x48
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
a00190f4: e593c000 ldr ip, [r3]
the_message_queue->number_of_pending_messages++;
a00190f8: e2825001 add r5, r2, #1
#include <rtems/score/coremsg.h>
#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
void _CORE_message_queue_Insert_message(
a00190fc: e2722001 rsbs r2, r2, #1
}
break;
}
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
a0019100: e5805048 str r5, [r0, #72] ; 0x48
#include <rtems/score/coremsg.h>
#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
void _CORE_message_queue_Insert_message(
a0019104: 33a02000 movcc r2, #0
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
a0019108: e5813004 str r3, [r1, #4]
before_node = after_node->next;
after_node->next = the_node;
a001910c: e5831000 str r1, [r3]
the_node->next = before_node;
before_node->previous = the_node;
a0019110: 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;
a0019114: e581c000 str ip, [r1]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a0019118: 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 )
a001911c: e3520000 cmp r2, #0
a0019120: 0a000004 beq a0019138 <_CORE_message_queue_Insert_message+0xa4>
a0019124: e5903060 ldr r3, [r0, #96] ; 0x60
a0019128: e3530000 cmp r3, #0
a001912c: 0a000001 beq a0019138 <_CORE_message_queue_Insert_message+0xa4>
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
a0019130: e5900064 ldr r0, [r0, #100] ; 0x64 <== NOT EXECUTED
a0019134: e12fff33 blx r3 <== NOT EXECUTED
a0019138: e8bd8030 pop {r4, r5, pc}
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a001913c: e10fc000 mrs ip, CPSR
a0019140: e38c3080 orr r3, ip, #128 ; 0x80
a0019144: 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();
a0019148: 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;
a001914c: 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 );
a0019150: e2804054 add r4, r0, #84 ; 0x54
the_message_queue->number_of_pending_messages++;
a0019154: e2825001 add r5, r2, #1
#include <rtems/score/coremsg.h>
#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
void _CORE_message_queue_Insert_message(
a0019158: e2722001 rsbs r2, r2, #1
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
a001915c: e5805048 str r5, [r0, #72] ; 0x48
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
a0019160: e5801058 str r1, [r0, #88] ; 0x58
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
a0019164: e5814000 str r4, [r1]
#include <rtems/score/coremsg.h>
#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
void _CORE_message_queue_Insert_message(
a0019168: 33a02000 movcc r2, #0
tail->previous = the_node;
old_last->next = the_node;
a001916c: e5831000 str r1, [r3]
the_node->previous = old_last;
a0019170: e5813004 str r3, [r1, #4]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a0019174: e129f00c msr CPSR_fc, ip
a0019178: eaffffe7 b a001911c <_CORE_message_queue_Insert_message+0x88>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a001917c: e10fc000 mrs ip, CPSR
a0019180: e38c3080 orr r3, ip, #128 ; 0x80
a0019184: 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();
a0019188: e5902048 ldr r2, [r0, #72] ; 0x48
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
a001918c: 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);
a0019190: e2804050 add r4, r0, #80 ; 0x50
the_message_queue->number_of_pending_messages++;
a0019194: e2825001 add r5, r2, #1
#include <rtems/score/coremsg.h>
#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
void _CORE_message_queue_Insert_message(
a0019198: e2722001 rsbs r2, r2, #1
_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();
the_message_queue->number_of_pending_messages++;
a001919c: 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;
a00191a0: e5801050 str r1, [r0, #80] ; 0x50
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
a00191a4: e5814004 str r4, [r1, #4]
#include <rtems/score/coremsg.h>
#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
void _CORE_message_queue_Insert_message(
a00191a8: 33a02000 movcc r2, #0
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
a00191ac: e5813000 str r3, [r1]
before_node->previous = the_node;
a00191b0: e5831004 str r1, [r3, #4]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a00191b4: e129f00c msr CPSR_fc, ip
a00191b8: eaffffd7 b a001911c <_CORE_message_queue_Insert_message+0x88>
a0013b94 <_CORE_message_queue_Seize>:
{
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
a0013b94: e59fc114 ldr ip, [pc, #276] ; a0013cb0 <_CORE_message_queue_Seize+0x11c>
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
a0013b98: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
a0013b9c: e59c5008 ldr r5, [ip, #8]
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
a0013ba0: 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;
a0013ba4: e3a00000 mov r0, #0
a0013ba8: e5850034 str r0, [r5, #52] ; 0x34
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
a0013bac: e59d8024 ldr r8, [sp, #36] ; 0x24
a0013bb0: e5dd6020 ldrb r6, [sp, #32]
a0013bb4: e1a00002 mov r0, r2
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a0013bb8: e10fa000 mrs sl, CPSR
a0013bbc: e38a2080 orr r2, sl, #128 ; 0x80
a0013bc0: e129f002 msr CPSR_fc, r2
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a0013bc4: e1a02004 mov r2, r4
a0013bc8: e5b27050 ldr r7, [r2, #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 );
a0013bcc: e2849054 add r9, r4, #84 ; 0x54
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a0013bd0: e1570009 cmp r7, r9
a0013bd4: 0a00001f beq a0013c58 <_CORE_message_queue_Seize+0xc4>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
a0013bd8: e5971000 ldr r1, [r7]
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;
a0013bdc: e594e048 ldr lr, [r4, #72] ; 0x48
head->next = new_first;
a0013be0: e5841050 str r1, [r4, #80] ; 0x50
new_first->previous = head;
a0013be4: e5812004 str r2, [r1, #4]
a0013be8: e24e2001 sub r2, lr, #1
a0013bec: e5842048 str r2, [r4, #72] ; 0x48
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a0013bf0: e129f00a msr CPSR_fc, sl
_ISR_Enable( level );
*size_p = the_message->Contents.size;
_Thread_Executing->Wait.count =
a0013bf4: e59c2008 ldr r2, [ip, #8]
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;
a0013bf8: e597e00c ldr lr, [r7, #12]
_Thread_Executing->Wait.count =
a0013bfc: e5971008 ldr r1, [r7, #8]
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
a0013c00: e2875010 add r5, r7, #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;
a0013c04: e583e000 str lr, [r3]
_Thread_Executing->Wait.count =
a0013c08: e5821024 str r1, [r2, #36] ; 0x24
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0013c0c: e5932000 ldr r2, [r3]
a0013c10: e1a01005 mov r1, r5
a0013c14: eb00208d bl a001be50 <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 );
a0013c18: e1a00004 mov r0, r4
a0013c1c: eb0008b1 bl a0015ee8 <_Thread_queue_Dequeue>
if ( !the_thread ) {
a0013c20: e2503000 subs r3, r0, #0
a0013c24: 0a00001d beq a0013ca0 <_CORE_message_queue_Seize+0x10c>
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
a0013c28: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
a0013c2c: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0013c30: e1a00005 mov r0, r5 <== NOT EXECUTED
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
a0013c34: e5871008 str r1, [r7, #8] <== NOT EXECUTED
a0013c38: e587200c str r2, [r7, #12] <== NOT EXECUTED
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0013c3c: e593102c ldr r1, [r3, #44] ; 0x2c <== NOT EXECUTED
a0013c40: eb002082 bl a001be50 <memcpy> <== NOT EXECUTED
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
a0013c44: e5972008 ldr r2, [r7, #8] <== NOT EXECUTED
a0013c48: e1a00004 mov r0, r4 <== NOT EXECUTED
a0013c4c: e1a01007 mov r1, r7 <== 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 );
}
a0013c50: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, 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(
a0013c54: ea00150e b a0019094 <_CORE_message_queue_Insert_message> <== NOT EXECUTED
return;
}
#endif
}
if ( !wait ) {
a0013c58: e3560000 cmp r6, #0
a0013c5c: 1a000003 bne a0013c70 <_CORE_message_queue_Seize+0xdc>
a0013c60: e129f00a msr CPSR_fc, sl
_ISR_Enable( level );
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
a0013c64: e3a03004 mov r3, #4
a0013c68: 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 );
}
a0013c6c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, 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;
a0013c70: e3a02001 mov r2, #1
a0013c74: e5842030 str r2, [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;
a0013c78: e5854044 str r4, [r5, #68] ; 0x44
executing->Wait.id = id;
a0013c7c: e5851020 str r1, [r5, #32]
executing->Wait.return_argument_second.mutable_object = buffer;
a0013c80: e585002c str r0, [r5, #44] ; 0x2c
executing->Wait.return_argument = size_p;
a0013c84: e5853028 str r3, [r5, #40] ; 0x28
a0013c88: e129f00a msr CPSR_fc, sl
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
a0013c8c: e59f2020 ldr r2, [pc, #32] ; a0013cb4 <_CORE_message_queue_Seize+0x120>
a0013c90: e1a00004 mov r0, r4
a0013c94: e1a01008 mov r1, r8
}
a0013c98: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, 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 );
a0013c9c: ea0008ec b a0016054 <_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 );
a0013ca0: e2840068 add r0, r4, #104 ; 0x68
a0013ca4: e1a01007 mov r1, r7
}
a0013ca8: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
a0013cac: eaffff53 b a0013a00 <_Chain_Append>
a0013cb8 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
a0013cb8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
a0013cbc: e590c04c ldr ip, [r0, #76] ; 0x4c
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
a0013cc0: e1a04000 mov r4, r0
a0013cc4: e1a05002 mov r5, r2
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
a0013cc8: e15c0002 cmp ip, r2
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
a0013ccc: e1a0a001 mov sl, r1
a0013cd0: e1a0b003 mov fp, r3
a0013cd4: e59d6028 ldr r6, [sp, #40] ; 0x28
a0013cd8: 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 ) {
a0013cdc: 3a00001e bcc a0013d5c <_CORE_message_queue_Submit+0xa4>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
a0013ce0: e5907048 ldr r7, [r0, #72] ; 0x48
a0013ce4: e3570000 cmp r7, #0
a0013ce8: 0a00000f beq a0013d2c <_CORE_message_queue_Submit+0x74>
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
a0013cec: e2840068 add r0, r4, #104 ; 0x68
a0013cf0: ebffff4d bl a0013a2c <_Chain_Get>
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
the_message =
_CORE_message_queue_Allocate_message_buffer( the_message_queue );
if ( the_message ) {
a0013cf4: e2507000 subs r7, r0, #0
a0013cf8: 0a000019 beq a0013d64 <_CORE_message_queue_Submit+0xac>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0013cfc: e1a0100a mov r1, sl
a0013d00: e1a02005 mov r2, r5
a0013d04: e2870010 add r0, r7, #16
a0013d08: eb002050 bl a001be50 <memcpy>
size
);
the_message->Contents.size = size;
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
a0013d0c: e1a00004 mov r0, r4
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
a0013d10: e587500c str r5, [r7, #12]
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
a0013d14: e5876008 str r6, [r7, #8]
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
a0013d18: e1a01007 mov r1, r7
a0013d1c: e1a02006 mov r2, r6
a0013d20: eb0014db bl a0019094 <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0013d24: e3a00000 mov r0, #0
a0013d28: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
a0013d2c: eb00086d bl a0015ee8 <_Thread_queue_Dequeue>
if ( the_thread ) {
a0013d30: e2508000 subs r8, r0, #0
a0013d34: 0affffec beq a0013cec <_CORE_message_queue_Submit+0x34>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0013d38: e598002c ldr r0, [r8, #44] ; 0x2c
a0013d3c: e1a0100a mov r1, sl
a0013d40: e1a02005 mov r2, r5
a0013d44: eb002041 bl a001be50 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0013d48: 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;
a0013d4c: e1a00007 mov r0, r7
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0013d50: e5835000 str r5, [r3]
the_thread->Wait.count = (uint32_t) submit_type;
a0013d54: e5886024 str r6, [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;
a0013d58: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
{
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;
a0013d5c: e3a00001 mov r0, #1 <== NOT EXECUTED
a0013d60: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== 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 ) {
a0013d64: e3590000 cmp r9, #0 <== NOT EXECUTED
a0013d68: 1a000001 bne a0013d74 <_CORE_message_queue_Submit+0xbc> <== NOT EXECUTED
return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY;
a0013d6c: e3a00002 mov r0, #2 <== NOT EXECUTED
a0013d70: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== 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() ) {
a0013d74: e59f3058 ldr r3, [pc, #88] ; a0013dd4 <_CORE_message_queue_Submit+0x11c><== NOT EXECUTED
a0013d78: e5932000 ldr r2, [r3] <== NOT EXECUTED
a0013d7c: e3520000 cmp r2, #0 <== NOT EXECUTED
a0013d80: 0a000001 beq a0013d8c <_CORE_message_queue_Submit+0xd4> <== NOT EXECUTED
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
a0013d84: e3a00003 mov r0, #3 <== NOT EXECUTED
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
a0013d88: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* 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;
a0013d8c: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a0013d90: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a0013d94: e3821080 orr r1, r2, #128 ; 0x80 <== NOT EXECUTED
a0013d98: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
a0013d9c: e3a01001 mov r1, #1 <== NOT EXECUTED
a0013da0: e5841030 str r1, [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;
a0013da4: e5834044 str r4, [r3, #68] ; 0x44 <== NOT EXECUTED
executing->Wait.id = id;
a0013da8: e583b020 str fp, [r3, #32] <== NOT EXECUTED
executing->Wait.return_argument_second.immutable_object = buffer;
a0013dac: e583a02c str sl, [r3, #44] ; 0x2c <== NOT EXECUTED
executing->Wait.option = (uint32_t) size;
a0013db0: e5835030 str r5, [r3, #48] ; 0x30 <== NOT EXECUTED
executing->Wait.count = submit_type;
a0013db4: e5836024 str r6, [r3, #36] ; 0x24 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a0013db8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
a0013dbc: e59f2014 ldr r2, [pc, #20] ; a0013dd8 <_CORE_message_queue_Submit+0x120><== NOT EXECUTED
a0013dc0: e1a00004 mov r0, r4 <== NOT EXECUTED
a0013dc4: e59d1030 ldr r1, [sp, #48] ; 0x30 <== NOT EXECUTED
a0013dc8: eb0008a1 bl a0016054 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
a0013dcc: e3a00007 mov r0, #7 <== NOT EXECUTED
a0013dd0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
a000b2e8 <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
a000b2e8: 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;
a000b2ec: 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
)
{
a000b2f0: 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 ) {
a000b2f4: 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
)
{
a000b2f8: 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;
a000b2fc: e2804040 add r4, r0, #64 ; 0x40
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
a000b300: e1a07001 mov r7, r1
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
a000b304: e891000f ldm r1, {r0, r1, r2, r3}
the_mutex->lock = initial_lock;
a000b308: 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;
a000b30c: e884000f stm r4, {r0, r1, r2, r3}
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
a000b310: e58c5058 str r5, [ip, #88] ; 0x58
#endif
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
a000b314: 158c5054 strne r5, [ip, #84] ; 0x54
the_mutex->holder = NULL;
a000b318: 158c505c strne r5, [ip, #92] ; 0x5c
the_mutex->holder_id = 0;
a000b31c: 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 ) {
a000b320: 1a00000b bne a000b354 <_CORE_mutex_Initialize+0x6c>
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
a000b324: e59f3074 ldr r3, [pc, #116] ; a000b3a0 <_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;
a000b328: e3a01001 mov r1, #1
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
a000b32c: e59c2048 ldr r2, [ip, #72] ; 0x48
the_mutex->holder = _Thread_Executing;
a000b330: e5933008 ldr r3, [r3, #8]
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;
a000b334: 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 ) ||
a000b338: 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;
a000b33c: 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;
a000b340: e58c305c str r3, [ip, #92] ; 0x5c
the_mutex->holder_id = _Thread_Executing->Object.id;
a000b344: e58c1060 str r1, [ip, #96] ; 0x60
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a000b348: 0a00000a beq a000b378 <_CORE_mutex_Initialize+0x90>
a000b34c: e3520003 cmp r2, #3
a000b350: 0a000008 beq a000b378 <_CORE_mutex_Initialize+0x90>
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
a000b354: e5971008 ldr r1, [r7, #8]
a000b358: e1a0000c mov r0, ip
a000b35c: e3a02b01 mov r2, #1024 ; 0x400
a000b360: e2911000 adds r1, r1, #0
a000b364: 13a01001 movne r1, #1
a000b368: e3a03005 mov r3, #5
a000b36c: eb000927 bl a000d810 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000b370: e3a00000 mov r0, #0
a000b374: 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 <
a000b378: e5931014 ldr r1, [r3, #20]
a000b37c: e59c204c ldr r2, [ip, #76] ; 0x4c
a000b380: e1510002 cmp r1, r2
a000b384: 2a000001 bcs a000b390 <_CORE_mutex_Initialize+0xa8>
the_mutex->Attributes.priority_ceiling )
return CORE_MUTEX_STATUS_CEILING_VIOLATED;
a000b388: e3a00006 mov r0, #6
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
a000b38c: e8bd80f0 pop {r4, r5, r6, r7, pc}
_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++;
a000b390: e593201c ldr r2, [r3, #28] <== NOT EXECUTED
a000b394: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000b398: e583201c str r2, [r3, #28] <== NOT EXECUTED
a000b39c: eaffffec b a000b354 <_CORE_mutex_Initialize+0x6c> <== NOT EXECUTED
a000b4f8 <_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 ) {
a000b4f8: 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
)
{
a000b4fc: 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 ) {
a000b500: e3530000 cmp r3, #0
#else
Objects_Id id __attribute__((unused)),
CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused))
#endif
)
{
a000b504: e1a04000 mov r4, r0
Thread_Control *the_thread;
Thread_Control *holder;
holder = the_mutex->holder;
a000b508: 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 ) {
a000b50c: 0a000005 beq a000b528 <_CORE_mutex_Surrender+0x30>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a000b510: e59f3120 ldr r3, [pc, #288] ; a000b638 <_CORE_mutex_Surrender+0x140>
if ( !_Thread_Is_executing( holder ) )
a000b514: e5933008 ldr r3, [r3, #8]
a000b518: e1520003 cmp r2, r3
a000b51c: 0a000001 beq a000b528 <_CORE_mutex_Surrender+0x30>
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
a000b520: e3a00003 mov r0, #3
a000b524: e8bd8030 pop {r4, r5, pc}
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
a000b528: e5940054 ldr r0, [r4, #84] ; 0x54
a000b52c: e3500000 cmp r0, #0
a000b530: 0a000023 beq a000b5c4 <_CORE_mutex_Surrender+0xcc>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
a000b534: e2400001 sub r0, r0, #1
if ( the_mutex->nest_count != 0 ) {
a000b538: e3500000 cmp r0, #0
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
a000b53c: e5840054 str r0, [r4, #84] ; 0x54
if ( the_mutex->nest_count != 0 ) {
a000b540: 1a00002d bne a000b5fc <_CORE_mutex_Surrender+0x104>
a000b544: 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 ) ||
a000b548: e3530002 cmp r3, #2
a000b54c: 0a00001d beq a000b5c8 <_CORE_mutex_Surrender+0xd0>
a000b550: e3530003 cmp r3, #3
a000b554: 0a00001b beq a000b5c8 <_CORE_mutex_Surrender+0xd0>
if ( holder->resource_count == 0 &&
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
}
}
the_mutex->holder = NULL;
a000b558: e3a05000 mov r5, #0
a000b55c: e584505c str r5, [r4, #92] ; 0x5c
the_mutex->holder_id = 0;
a000b560: 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 ) ) ) {
a000b564: e1a00004 mov r0, r4
a000b568: eb0007a0 bl a000d3f0 <_Thread_queue_Dequeue>
a000b56c: e2503000 subs r3, r0, #0
a000b570: 0a00002c beq a000b628 <_CORE_mutex_Surrender+0x130>
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
a000b574: e5931008 ldr r1, [r3, #8]
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
a000b578: e5942048 ldr r2, [r4, #72] ; 0x48
} else
#endif
{
the_mutex->holder = the_thread;
a000b57c: e584305c str r3, [r4, #92] ; 0x5c
the_mutex->holder_id = the_thread->Object.id;
a000b580: e5841060 str r1, [r4, #96] ; 0x60
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
a000b584: e3520002 cmp r2, #2
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
a000b588: e3a01001 mov r1, #1
a000b58c: e5841054 str r1, [r4, #84] ; 0x54
switch ( the_mutex->Attributes.discipline ) {
a000b590: 0a00001b beq a000b604 <_CORE_mutex_Surrender+0x10c>
a000b594: e3520003 cmp r2, #3
a000b598: 0a000001 beq a000b5a4 <_CORE_mutex_Surrender+0xac>
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000b59c: e1a00005 mov r0, r5
a000b5a0: e8bd8030 pop {r4, r5, pc}
_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++;
a000b5a4: e593c01c ldr ip, [r3, #28] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
a000b5a8: e594104c ldr r1, [r4, #76] ; 0x4c <== NOT EXECUTED
a000b5ac: 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++;
a000b5b0: e28cc001 add ip, ip, #1 <== NOT EXECUTED
a000b5b4: e583c01c str ip, [r3, #28] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
a000b5b8: e1510002 cmp r1, r2 <== NOT EXECUTED
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000b5bc: 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 <
a000b5c0: 3a000014 bcc a000b618 <_CORE_mutex_Surrender+0x120> <== NOT EXECUTED
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
a000b5c4: 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--;
a000b5c8: e592301c ldr r3, [r2, #28]
a000b5cc: 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 &&
a000b5d0: e3530000 cmp r3, #0
_CORE_mutex_Pop_priority( the_mutex, holder );
if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL )
return pop_status;
holder->resource_count--;
a000b5d4: 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 &&
a000b5d8: 1affffde bne a000b558 <_CORE_mutex_Surrender+0x60>
holder->real_priority != holder->current_priority ) {
a000b5dc: 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 &&
a000b5e0: e5923014 ldr r3, [r2, #20]
a000b5e4: e1510003 cmp r1, r3
a000b5e8: 0affffda beq a000b558 <_CORE_mutex_Surrender+0x60>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
a000b5ec: e1a00002 mov r0, r2
a000b5f0: e3a02001 mov r2, #1
a000b5f4: eb00056f bl a000cbb8 <_Thread_Change_priority>
a000b5f8: eaffffd6 b a000b558 <_CORE_mutex_Surrender+0x60>
/* 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;
a000b5fc: e3a00000 mov r0, #0
a000b600: e8bd8030 pop {r4, r5, pc}
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++;
a000b604: e593201c ldr r2, [r3, #28]
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000b608: 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++;
a000b60c: e2822001 add r2, r2, #1
a000b610: e583201c str r2, [r3, #28]
break;
a000b614: 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(
a000b618: e1a02005 mov r2, r5 <== NOT EXECUTED
a000b61c: eb000565 bl a000cbb8 <_Thread_Change_priority> <== NOT EXECUTED
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000b620: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b624: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a000b628: e3a02001 mov r2, #1
a000b62c: e5842050 str r2, [r4, #80] ; 0x50
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000b630: e1a00003 mov r0, r3
a000b634: e8bd8030 pop {r4, r5, pc}
a000bfcc <_CORE_spinlock_Release>:
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000bfcc: e10f2000 mrs r2, CPSR
a000bfd0: e3823080 orr r3, r2, #128 ; 0x80
a000bfd4: e129f003 msr CPSR_fc, r3
_ISR_Disable( level );
/*
* It must locked before it can be unlocked.
*/
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
a000bfd8: e5903004 ldr r3, [r0, #4]
a000bfdc: e3530000 cmp r3, #0
a000bfe0: 1a000002 bne a000bff0 <_CORE_spinlock_Release+0x24>
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000bfe4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_ISR_Enable( level );
return CORE_SPINLOCK_NOT_LOCKED;
a000bfe8: e3a00006 mov r0, #6 <== NOT EXECUTED
a000bfec: 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 ) {
a000bff0: e59f3040 ldr r3, [pc, #64] ; a000c038 <_CORE_spinlock_Release+0x6c>
a000bff4: e590100c ldr r1, [r0, #12]
a000bff8: e5933008 ldr r3, [r3, #8]
a000bffc: e5933008 ldr r3, [r3, #8]
a000c000: e1510003 cmp r1, r3
a000c004: 0a000002 beq a000c014 <_CORE_spinlock_Release+0x48>
a000c008: e129f002 msr CPSR_fc, r2
_ISR_Enable( level );
return CORE_SPINLOCK_NOT_HOLDER;
a000c00c: e3a00002 mov r0, #2
a000c010: e12fff1e bx lr
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
a000c014: e5901008 ldr r1, [r0, #8] <== NOT EXECUTED
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
a000c018: e3a03000 mov r3, #0 <== NOT EXECUTED
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
a000c01c: e2411001 sub r1, r1, #1 <== NOT EXECUTED
a000c020: e5801008 str r1, [r0, #8] <== NOT EXECUTED
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
a000c024: e5803004 str r3, [r0, #4] <== NOT EXECUTED
the_spinlock->holder = 0;
a000c028: e580300c str r3, [r0, #12] <== NOT EXECUTED
a000c02c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_ISR_Enable( level );
return CORE_SPINLOCK_SUCCESSFUL;
a000c030: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a000c034: e12fff1e bx lr <== NOT EXECUTED
a000c03c <_CORE_spinlock_Wait>:
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
a000c03c: e92d4030 push {r4, r5, lr}
a000c040: e20110ff and r1, r1, #255 ; 0xff
a000c044: e1a05000 mov r5, r0
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000c048: e10f2000 mrs r2, CPSR
a000c04c: e3823080 orr r3, r2, #128 ; 0x80
a000c050: e129f003 msr CPSR_fc, r3
a000c054: e1a03002 mov r3, 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) &&
a000c058: e5900004 ldr r0, [r0, #4]
a000c05c: e3500001 cmp r0, #1
a000c060: 0a000022 beq a000c0f0 <_CORE_spinlock_Wait+0xb4>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
a000c064: e5950008 ldr r0, [r5, #8]
a000c068: e2800001 add r0, r0, #1
a000c06c: e5850008 str r0, [r5, #8]
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
a000c070: e5950004 ldr r0, [r5, #4]
a000c074: e3500000 cmp r0, #0
a000c078: 0a00000d beq a000c0b4 <_CORE_spinlock_Wait+0x78>
}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
a000c07c: e3510000 cmp r1, #0
a000c080: 159f408c ldrne r4, [pc, #140] ; a000c114 <_CORE_spinlock_Wait+0xd8>
a000c084: 0a000013 beq a000c0d8 <_CORE_spinlock_Wait+0x9c>
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000c088: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
*/
_ISR_Enable( level );
/* An ISR could occur here */
_Thread_Enable_dispatch();
a000c08c: eb000673 bl a000da60 <_Thread_Enable_dispatch> <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000c090: e5943000 ldr r3, [r4] <== NOT EXECUTED
++level;
a000c094: e2833001 add r3, r3, #1 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
a000c098: e5843000 str r3, [r4] <== NOT EXECUTED
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000c09c: e10f3000 mrs r3, CPSR <== NOT EXECUTED
a000c0a0: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
a000c0a4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
a000c0a8: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED
a000c0ac: e3520000 cmp r2, #0 <== NOT EXECUTED
a000c0b0: 1afffff4 bne a000c088 <_CORE_spinlock_Wait+0x4c> <== NOT EXECUTED
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
a000c0b4: e3a02001 mov r2, #1
a000c0b8: e5852004 str r2, [r5, #4]
the_spinlock->holder = _Thread_Executing->Object.id;
a000c0bc: e59f2054 ldr r2, [pc, #84] ; a000c118 <_CORE_spinlock_Wait+0xdc>
a000c0c0: e5922008 ldr r2, [r2, #8]
a000c0c4: e5922008 ldr r2, [r2, #8]
a000c0c8: e585200c str r2, [r5, #12]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000c0cc: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
return CORE_SPINLOCK_SUCCESSFUL;
a000c0d0: e3a00000 mov r0, #0
a000c0d4: e8bd8030 pop {r4, r5, pc}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
the_spinlock->users -= 1;
a000c0d8: e5953008 ldr r3, [r5, #8]
a000c0dc: e2433001 sub r3, r3, #1
a000c0e0: e5853008 str r3, [r5, #8]
a000c0e4: e129f002 msr CPSR_fc, r2
_ISR_Enable( level );
return CORE_SPINLOCK_UNAVAILABLE;
a000c0e8: e3a00005 mov r0, #5
a000c0ec: 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) ) {
a000c0f0: e59f0020 ldr r0, [pc, #32] ; a000c118 <_CORE_spinlock_Wait+0xdc>
a000c0f4: e595c00c ldr ip, [r5, #12]
a000c0f8: e5900008 ldr r0, [r0, #8]
#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) &&
a000c0fc: e5900008 ldr r0, [r0, #8]
a000c100: e15c0000 cmp ip, r0
a000c104: 1affffd6 bne a000c064 <_CORE_spinlock_Wait+0x28>
a000c108: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
a000c10c: e3a00001 mov r0, #1 <== NOT EXECUTED
a000c110: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000baa8 <_Chain_Get_with_empty_check>:
bool _Chain_Get_with_empty_check(
Chain_Control *chain,
Chain_Node **node
)
{
a000baa8: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000baac: e10f4000 mrs r4, CPSR <== NOT EXECUTED
a000bab0: e3843080 orr r3, r4, #128 ; 0x80 <== NOT EXECUTED
a000bab4: 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;
a000bab8: 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 );
a000babc: e280c004 add ip, r0, #4 <== NOT EXECUTED
Chain_Node *old_first = head->next;
if ( old_first != tail ) {
a000bac0: e15c0003 cmp ip, r3 <== NOT EXECUTED
*the_node = old_first;
is_empty_now = new_first == tail;
} else
*the_node = NULL;
a000bac4: 03a03000 moveq r3, #0 <== NOT EXECUTED
a000bac8: 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;
a000bacc: 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 ) {
a000bad0: 0a000006 beq a000baf0 <_Chain_Get_with_empty_check+0x48> <== NOT EXECUTED
Chain_Node *new_first = old_first->next;
a000bad4: e5932000 ldr r2, [r3] <== NOT EXECUTED
head->next = new_first;
a000bad8: e5802000 str r2, [r0] <== NOT EXECUTED
new_first->previous = head;
a000badc: e5820004 str r0, [r2, #4] <== NOT EXECUTED
*the_node = old_first;
is_empty_now = new_first == tail;
a000bae0: e062200c rsb r2, r2, ip <== NOT EXECUTED
a000bae4: e2720000 rsbs r0, r2, #0 <== NOT EXECUTED
a000bae8: e0a00002 adc r0, r0, r2 <== NOT EXECUTED
Chain_Node *new_first = old_first->next;
head->next = new_first;
new_first->previous = head;
*the_node = old_first;
a000baec: e5813000 str r3, [r1] <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000baf0: 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;
}
a000baf4: e8bd0010 pop {r4} <== NOT EXECUTED
a000baf8: e12fff1e bx lr <== NOT EXECUTED
a000a1ec <_Event_Seize>:
Thread_Control *executing,
Event_Control *event,
Thread_blocking_operation_States *sync_state,
States_Control wait_state
)
{
a000a1ec: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a000a1f0: e59d401c ldr r4, [sp, #28]
rtems_event_set seized_events;
rtems_event_set pending_events;
ISR_Level level;
Thread_blocking_operation_States current_sync_state;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
a000a1f4: e3a06000 mov r6, #0
Thread_Control *executing,
Event_Control *event,
Thread_blocking_operation_States *sync_state,
States_Control wait_state
)
{
a000a1f8: e59dc020 ldr ip, [sp, #32]
a000a1fc: e59d5024 ldr r5, [sp, #36] ; 0x24
a000a200: e59d7028 ldr r7, [sp, #40] ; 0x28
rtems_event_set seized_events;
rtems_event_set pending_events;
ISR_Level level;
Thread_blocking_operation_States current_sync_state;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
a000a204: e5846034 str r6, [r4, #52] ; 0x34
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000a208: e10fa000 mrs sl, CPSR
a000a20c: e38a6080 orr r6, sl, #128 ; 0x80
a000a210: e129f006 msr CPSR_fc, r6
_ISR_Disable( level );
pending_events = event->pending_events;
a000a214: e59c6000 ldr r6, [ip]
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
a000a218: e0108006 ands r8, r0, r6
a000a21c: 0a000003 beq a000a230 <_Event_Seize+0x44>
a000a220: e1500008 cmp r0, r8
a000a224: 0a00001e beq a000a2a4 <_Event_Seize+0xb8>
(seized_events == event_in || _Options_Is_any( option_set )) ) {
a000a228: e3110002 tst r1, #2 <== NOT EXECUTED
a000a22c: 1a00001c bne a000a2a4 <_Event_Seize+0xb8> <== NOT EXECUTED
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
a000a230: e3110001 tst r1, #1
a000a234: 1a000015 bne a000a290 <_Event_Seize+0xa4>
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = option_set;
executing->Wait.count = event_in;
executing->Wait.return_argument = event_out;
a000a238: e5843028 str r3, [r4, #40] ; 0x28
*sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000a23c: 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 = option_set;
a000a240: e5841030 str r1, [r4, #48] ; 0x30
executing->Wait.count = event_in;
a000a244: e5840024 str r0, [r4, #36] ; 0x24
executing->Wait.return_argument = event_out;
*sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000a248: e5853000 str r3, [r5]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000a24c: e129f00a msr CPSR_fc, sl
_ISR_Enable( level );
if ( ticks ) {
a000a250: e3520000 cmp r2, #0
a000a254: 1a000019 bne a000a2c0 <_Event_Seize+0xd4>
sync_state
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, wait_state );
a000a258: e1a00004 mov r0, r4
a000a25c: e1a01007 mov r1, r7
a000a260: eb000db7 bl a000d944 <_Thread_Set_state>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000a264: e10f2000 mrs r2, CPSR
a000a268: e3823080 orr r3, r2, #128 ; 0x80
a000a26c: e129f003 msr CPSR_fc, r3
_ISR_Disable( level );
current_sync_state = *sync_state;
a000a270: e5950000 ldr r0, [r5]
*sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000a274: e3a03000 mov r3, #0
a000a278: e5853000 str r3, [r5]
if ( current_sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
a000a27c: e3500001 cmp r0, #1
a000a280: 0a00000c beq a000a2b8 <_Event_Seize+0xcc>
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Entering with interrupts disabled and returning with interrupts
* enabled!
*/
_Thread_blocking_operation_Cancel( current_sync_state, executing, level );
a000a284: e1a01004 mov r1, r4 <== NOT EXECUTED
}
a000a288: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Entering with interrupts disabled and returning with interrupts
* enabled!
*/
_Thread_blocking_operation_Cancel( current_sync_state, executing, level );
a000a28c: ea000a33 b a000cb60 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000a290: e129f00a msr CPSR_fc, sl
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
executing->Wait.return_code = RTEMS_UNSATISFIED;
a000a294: e3a0200d mov r2, #13
a000a298: e5842034 str r2, [r4, #52] ; 0x34
*event_out = seized_events;
a000a29c: e5838000 str r8, [r3]
return;
a000a2a0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, 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) );
a000a2a4: e1c66008 bic r6, r6, r8
pending_events = event->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 )) ) {
event->pending_events =
a000a2a8: e58c6000 str r6, [ip]
a000a2ac: e129f00a msr CPSR_fc, sl
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
*event_out = seized_events;
a000a2b0: e5838000 str r8, [r3]
return;
a000a2b4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a000a2b8: e129f002 msr CPSR_fc, r2
a000a2bc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000a2c0: e3a01000 mov r1, #0
*sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
a000a2c4: e5943008 ldr r3, [r4, #8]
a000a2c8: e5841050 str r1, [r4, #80] ; 0x50
the_watchdog->routine = routine;
a000a2cc: e59f101c ldr r1, [pc, #28] ; a000a2f0 <_Event_Seize+0x104>
the_watchdog->id = id;
a000a2d0: e5843068 str r3, [r4, #104] ; 0x68
the_watchdog->user_data = user_data;
a000a2d4: e584506c str r5, [r4, #108] ; 0x6c
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000a2d8: e5841064 str r1, [r4, #100] ; 0x64
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000a2dc: e5842054 str r2, [r4, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a2e0: e59f000c ldr r0, [pc, #12] ; a000a2f4 <_Event_Seize+0x108>
a000a2e4: e2841048 add r1, r4, #72 ; 0x48
a000a2e8: eb000e72 bl a000dcb8 <_Watchdog_Insert>
a000a2ec: eaffffd9 b a000a258 <_Event_Seize+0x6c>
a000a34c <_Event_Surrender>:
rtems_event_set event_in,
Event_Control *event,
Thread_blocking_operation_States *sync_state,
States_Control wait_state
)
{
a000a34c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_event_set pending_events;
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
option_set = the_thread->Wait.option;
a000a350: e590c030 ldr ip, [r0, #48] ; 0x30
rtems_event_set event_in,
Event_Control *event,
Thread_blocking_operation_States *sync_state,
States_Control wait_state
)
{
a000a354: e1a04000 mov r4, r0
a000a358: e59d001c ldr r0, [sp, #28]
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000a35c: e10f6000 mrs r6, CPSR
a000a360: e3865080 orr r5, r6, #128 ; 0x80
a000a364: e129f005 msr CPSR_fc, r5
RTEMS_INLINE_ROUTINE void _Event_sets_Post(
rtems_event_set the_new_events,
rtems_event_set *the_event_set
)
{
*the_event_set |= the_new_events;
a000a368: e5925000 ldr r5, [r2]
a000a36c: e1811005 orr r1, r1, r5
a000a370: e5821000 str r1, [r2]
option_set = the_thread->Wait.option;
_ISR_Disable( level );
_Event_sets_Post( event_in, &event->pending_events );
pending_events = event->pending_events;
event_condition = the_thread->Wait.count;
a000a374: e5945024 ldr r5, [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 ) ) {
a000a378: e0117005 ands r7, r1, r5
a000a37c: 0a00002e beq a000a43c <_Event_Surrender+0xf0>
/*
* 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() &&
a000a380: e59f80e0 ldr r8, [pc, #224] ; a000a468 <_Event_Surrender+0x11c>
a000a384: e598a000 ldr sl, [r8]
a000a388: e35a0000 cmp sl, #0
a000a38c: 0a000002 beq a000a39c <_Event_Surrender+0x50>
a000a390: e5988008 ldr r8, [r8, #8] <== NOT EXECUTED
a000a394: e1540008 cmp r4, r8 <== NOT EXECUTED
a000a398: 0a000017 beq a000a3fc <_Event_Surrender+0xb0> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
a000a39c: e5943010 ldr r3, [r4, #16]
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Are_set( the_thread->current_state, wait_state ) ) {
a000a3a0: e1100003 tst r0, r3
a000a3a4: 0a000024 beq a000a43c <_Event_Surrender+0xf0>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
a000a3a8: e1550007 cmp r5, r7
a000a3ac: 0a000001 beq a000a3b8 <_Event_Surrender+0x6c>
a000a3b0: e31c0002 tst ip, #2 <== NOT EXECUTED
a000a3b4: 0a000020 beq a000a43c <_Event_Surrender+0xf0> <== NOT EXECUTED
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
a000a3b8: 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) );
a000a3bc: e1c11007 bic r1, r1, r7
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Are_set( the_thread->current_state, wait_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
event->pending_events = _Event_sets_Clear(
a000a3c0: e5821000 str r1, [r2]
pending_events,
seized_events
);
the_thread->Wait.count = 0;
a000a3c4: e3a02000 mov r2, #0
a000a3c8: e5842024 str r2, [r4, #36] ; 0x24
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
a000a3cc: e5837000 str r7, [r3]
static inline void arm_interrupt_flash( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000a3d0: e10f3000 mrs r3, CPSR
a000a3d4: e129f006 msr CPSR_fc, r6
a000a3d8: e129f003 msr CPSR_fc, r3
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a000a3dc: e5943050 ldr r3, [r4, #80] ; 0x50
a000a3e0: e3530002 cmp r3, #2
a000a3e4: 0a000016 beq a000a444 <_Event_Surrender+0xf8>
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000a3e8: e129f006 msr CPSR_fc, r6
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000a3ec: e59f1078 ldr r1, [pc, #120] ; a000a46c <_Event_Surrender+0x120>
a000a3f0: e1a00004 mov r0, r4
}
return;
}
}
_ISR_Enable( level );
}
a000a3f4: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr}
a000a3f8: ea000a2b b a000ccac <_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 ) &&
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
a000a3fc: e5938000 ldr r8, [r3] <== NOT EXECUTED
a000a400: e2488001 sub r8, r8, #1 <== 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 ) &&
a000a404: e3580001 cmp r8, #1 <== NOT EXECUTED
a000a408: 8affffe3 bhi a000a39c <_Event_Surrender+0x50> <== NOT EXECUTED
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
a000a40c: e1550007 cmp r5, r7 <== NOT EXECUTED
a000a410: 0a000001 beq a000a41c <_Event_Surrender+0xd0> <== NOT EXECUTED
a000a414: e31c0002 tst ip, #2 <== NOT EXECUTED
a000a418: 0a000007 beq a000a43c <_Event_Surrender+0xf0> <== NOT EXECUTED
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
a000a41c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
a000a420: e1c11007 bic r1, r1, r7 <== NOT EXECUTED
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
event->pending_events = _Event_sets_Clear(
a000a424: e5821000 str r1, [r2] <== NOT EXECUTED
pending_events,
seized_events
);
the_thread->Wait.count = 0;
a000a428: e3a02000 mov r2, #0 <== NOT EXECUTED
a000a42c: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
*sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
a000a430: e3a02003 mov r2, #3 <== NOT EXECUTED
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
a000a434: e5807000 str r7, [r0] <== NOT EXECUTED
*sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
a000a438: e5832000 str r2, [r3] <== NOT EXECUTED
a000a43c: e129f006 msr CPSR_fc, r6
a000a440: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a000a444: e3a03003 mov r3, #3
a000a448: e5843050 str r3, [r4, #80] ; 0x50
a000a44c: e129f006 msr CPSR_fc, r6
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a000a450: e2840048 add r0, r4, #72 ; 0x48
a000a454: eb000e84 bl a000de6c <_Watchdog_Remove>
a000a458: e59f100c ldr r1, [pc, #12] ; a000a46c <_Event_Surrender+0x120>
a000a45c: e1a00004 mov r0, r4
}
return;
}
}
_ISR_Enable( level );
}
a000a460: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr}
a000a464: ea000a10 b a000ccac <_Thread_Clear_state>
a000a470 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *arg
)
{
a000a470: e92d4010 push {r4, lr} <== NOT EXECUTED
a000a474: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000a478: e1a04001 mov r4, r1 <== NOT EXECUTED
ISR_Level level;
Thread_blocking_operation_States *sync_state;
sync_state = arg;
the_thread = _Thread_Get( id, &location );
a000a47c: e1a0100d mov r1, sp <== NOT EXECUTED
a000a480: eb000b07 bl a000d0a4 <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
a000a484: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000a488: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a48c: 1a000010 bne a000a4d4 <_Event_Timeout+0x64> <== NOT EXECUTED
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000a490: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a000a494: e3821080 orr r1, r2, #128 ; 0x80 <== NOT EXECUTED
a000a498: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
a000a49c: e5803024 str r3, [r0, #36] ; 0x24 <== NOT EXECUTED
if ( _Thread_Is_executing( the_thread ) ) {
a000a4a0: e59f3048 ldr r3, [pc, #72] ; a000a4f0 <_Event_Timeout+0x80><== NOT EXECUTED
a000a4a4: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
a000a4a8: e1500003 cmp r0, r3 <== NOT EXECUTED
a000a4ac: 0a00000a beq a000a4dc <_Event_Timeout+0x6c> <== NOT EXECUTED
if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
*sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
a000a4b0: e3a03006 mov r3, #6 <== NOT EXECUTED
a000a4b4: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000a4b8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
a000a4bc: e59f1030 ldr r1, [pc, #48] ; a000a4f4 <_Event_Timeout+0x84><== NOT EXECUTED
a000a4c0: eb0009f9 bl a000ccac <_Thread_Clear_state> <== NOT EXECUTED
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000a4c4: e59f302c ldr r3, [pc, #44] ; a000a4f8 <_Event_Timeout+0x88><== NOT EXECUTED
a000a4c8: e5932000 ldr r2, [r3] <== NOT EXECUTED
--level;
a000a4cc: e2422001 sub r2, r2, #1 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
a000a4d0: e5832000 str r2, [r3] <== NOT EXECUTED
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
a000a4d4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000a4d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
a000a4dc: e5943000 ldr r3, [r4] <== NOT EXECUTED
a000a4e0: e3530001 cmp r3, #1 <== NOT EXECUTED
*sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
a000a4e4: 03a03002 moveq r3, #2 <== NOT EXECUTED
a000a4e8: 05843000 streq r3, [r4] <== NOT EXECUTED
a000a4ec: eaffffef b a000a4b0 <_Event_Timeout+0x40> <== NOT EXECUTED
a00105cc <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a00105cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a00105d0: 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;
a00105d4: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a00105d8: e24dd01c sub sp, sp, #28
a00105dc: e1a06001 mov r6, 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 ) {
a00105e0: e2911004 adds r1, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a00105e4: 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 ) {
a00105e8: e58d1000 str r1, [sp]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a00105ec: 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;
a00105f0: 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 ) {
a00105f4: 2a000086 bcs a0010814 <_Heap_Allocate_aligned_with_boundary+0x248>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
a00105f8: e3530000 cmp r3, #0
a00105fc: 1a000078 bne a00107e4 <_Heap_Allocate_aligned_with_boundary+0x218>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
a0010600: e597a008 ldr sl, [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 ) {
a0010604: e3a05000 mov r5, #0
a0010608: e157000a cmp r7, sl
a001060c: 0a00007b beq a0010800 <_Heap_Allocate_aligned_with_boundary+0x234>
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
a0010610: e59d300c ldr r3, [sp, #12]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
a0010614: e2662004 rsb r2, r6, #4
a0010618: e58d2014 str r2, [sp, #20]
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
a001061c: e2833007 add r3, r3, #7
a0010620: e58d3010 str r3, [sp, #16]
a0010624: ea000005 b a0010640 <_Heap_Allocate_aligned_with_boundary+0x74>
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
a0010628: e3540000 cmp r4, #0
);
}
}
/* Statistics */
++search_count;
a001062c: e2855001 add r5, r5, #1
if ( alloc_begin != 0 ) {
a0010630: 1a00005a bne a00107a0 <_Heap_Allocate_aligned_with_boundary+0x1d4>
break;
}
block = block->next;
a0010634: e59aa008 ldr sl, [sl, #8]
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a0010638: e157000a cmp r7, sl
a001063c: 0a00006f beq a0010800 <_Heap_Allocate_aligned_with_boundary+0x234>
/*
* 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 ) {
a0010640: e59a9004 ldr r9, [sl, #4]
a0010644: e59d3000 ldr r3, [sp]
a0010648: e1530009 cmp r3, r9
);
}
}
/* Statistics */
++search_count;
a001064c: 22855001 addcs r5, r5, #1
/*
* 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 ) {
a0010650: 2afffff7 bcs a0010634 <_Heap_Allocate_aligned_with_boundary+0x68>
if ( alignment == 0 ) {
a0010654: 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;
a0010658: 028a4008 addeq r4, sl, #8
a001065c: 0afffff1 beq a0010628 <_Heap_Allocate_aligned_with_boundary+0x5c>
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;
a0010660: e59d3014 ldr r3, [sp, #20]
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a0010664: e5972014 ldr r2, [r7, #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;
a0010668: e59d1010 ldr r1, [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;
a001066c: e3c99001 bic r9, r9, #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;
a0010670: e08a9009 add r9, sl, r9
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;
a0010674: e0834009 add r4, r3, r9
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0010678: e1a00004 mov r0, r4
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;
a001067c: e0623001 rsb r3, r2, r1
a0010680: e1a01008 mov r1, r8
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a0010684: e58d2004 str r2, [sp, #4]
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
a0010688: e0839009 add r9, r3, r9
a001068c: eb002cb7 bl a001b970 <__umodsi3>
a0010690: e0604004 rsb r4, r0, r4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
a0010694: e28a2008 add r2, sl, #8
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 ) {
a0010698: e1590004 cmp r9, r4
a001069c: e58d2008 str r2, [sp, #8]
a00106a0: 2a000003 bcs a00106b4 <_Heap_Allocate_aligned_with_boundary+0xe8>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a00106a4: e1a00009 mov r0, r9 <== NOT EXECUTED
a00106a8: e1a01008 mov r1, r8 <== NOT EXECUTED
a00106ac: eb002caf bl a001b970 <__umodsi3> <== NOT EXECUTED
a00106b0: e0604009 rsb r4, r0, r9 <== NOT EXECUTED
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
a00106b4: e35b0000 cmp fp, #0
a00106b8: 0a000025 beq a0010754 <_Heap_Allocate_aligned_with_boundary+0x188>
/* 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;
a00106bc: e0849006 add r9, r4, r6 <== NOT EXECUTED
a00106c0: e1a00009 mov r0, r9 <== NOT EXECUTED
a00106c4: e1a0100b mov r1, fp <== NOT EXECUTED
a00106c8: eb002ca8 bl a001b970 <__umodsi3> <== NOT EXECUTED
a00106cc: e0600009 rsb r0, r0, r9 <== 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 ) {
a00106d0: e1540000 cmp r4, r0 <== NOT EXECUTED
a00106d4: 23a03000 movcs r3, #0 <== NOT EXECUTED
a00106d8: 33a03001 movcc r3, #1 <== NOT EXECUTED
a00106dc: e1590000 cmp r9, r0 <== NOT EXECUTED
a00106e0: 93a03000 movls r3, #0 <== NOT EXECUTED
a00106e4: e3530000 cmp r3, #0 <== NOT EXECUTED
a00106e8: 0a000019 beq a0010754 <_Heap_Allocate_aligned_with_boundary+0x188><== NOT EXECUTED
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
a00106ec: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a00106f0: e0839006 add r9, r3, r6 <== 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 ) {
a00106f4: e1590000 cmp r9, r0 <== NOT EXECUTED
a00106f8: 958da018 strls sl, [sp, #24] <== NOT EXECUTED
a00106fc: 9a000002 bls a001070c <_Heap_Allocate_aligned_with_boundary+0x140><== NOT EXECUTED
a0010700: ea00003c b a00107f8 <_Heap_Allocate_aligned_with_boundary+0x22c><== NOT EXECUTED
a0010704: e1590000 cmp r9, r0 <== NOT EXECUTED
a0010708: 8a00003e bhi a0010808 <_Heap_Allocate_aligned_with_boundary+0x23c><== NOT EXECUTED
return 0;
}
alloc_begin = boundary_line - alloc_size;
a001070c: e0664000 rsb r4, r6, r0 <== NOT EXECUTED
a0010710: e1a01008 mov r1, r8 <== NOT EXECUTED
a0010714: e1a00004 mov r0, r4 <== NOT EXECUTED
a0010718: eb002c94 bl a001b970 <__umodsi3> <== NOT EXECUTED
a001071c: e0604004 rsb r4, r0, r4 <== NOT EXECUTED
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
a0010720: e084a006 add sl, r4, r6 <== NOT EXECUTED
a0010724: e1a0000a mov r0, sl <== NOT EXECUTED
a0010728: e1a0100b mov r1, fp <== NOT EXECUTED
a001072c: eb002c8f bl a001b970 <__umodsi3> <== NOT EXECUTED
a0010730: 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 ) {
a0010734: e15a0000 cmp sl, r0 <== NOT EXECUTED
a0010738: 93a0a000 movls sl, #0 <== NOT EXECUTED
a001073c: 83a0a001 movhi sl, #1 <== NOT EXECUTED
a0010740: e1540000 cmp r4, r0 <== NOT EXECUTED
a0010744: 23a0a000 movcs sl, #0 <== NOT EXECUTED
a0010748: e35a0000 cmp sl, #0 <== NOT EXECUTED
a001074c: 1affffec bne a0010704 <_Heap_Allocate_aligned_with_boundary+0x138><== NOT EXECUTED
a0010750: e59da018 ldr sl, [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 ) {
a0010754: e59d2008 ldr r2, [sp, #8]
a0010758: e1520004 cmp r2, r4
a001075c: 8a000025 bhi a00107f8 <_Heap_Allocate_aligned_with_boundary+0x22c>
a0010760: e1a00004 mov r0, r4
a0010764: e59d100c ldr r1, [sp, #12]
a0010768: eb002c80 bl a001b970 <__umodsi3>
a001076c: e3e09007 mvn r9, #7
a0010770: e06a9009 rsb r9, sl, r9
if ( free_size >= min_block_size || free_size == 0 ) {
return alloc_begin;
}
}
return 0;
a0010774: e59d2004 ldr r2, [sp, #4]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a0010778: e0899004 add r9, r9, r4
if ( alloc_begin >= alloc_begin_floor ) {
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 ) {
a001077c: e0603009 rsb r3, r0, r9
return alloc_begin;
}
}
return 0;
a0010780: e1590000 cmp r9, r0
a0010784: 11520003 cmpne r2, r3
a0010788: 83a03000 movhi r3, #0
a001078c: 93a03001 movls r3, #1
a0010790: 81a04003 movhi r4, r3
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
a0010794: e3540000 cmp r4, #0
);
}
}
/* Statistics */
++search_count;
a0010798: e2855001 add r5, r5, #1
if ( alloc_begin != 0 ) {
a001079c: 0affffa4 beq a0010634 <_Heap_Allocate_aligned_with_boundary+0x68>
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a00107a0: e5972048 ldr r2, [r7, #72] ; 0x48
stats->searches += search_count;
a00107a4: e597304c ldr r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a00107a8: e1a00007 mov r0, r7
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a00107ac: e2822001 add r2, r2, #1
stats->searches += search_count;
a00107b0: e0833005 add r3, r3, r5
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a00107b4: e5872048 str r2, [r7, #72] ; 0x48
stats->searches += search_count;
a00107b8: e587304c str r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a00107bc: e1a0100a mov r1, sl
a00107c0: e1a02004 mov r2, r4
a00107c4: e1a03006 mov r3, r6
a00107c8: ebffecb7 bl a000baac <_Heap_Block_allocate>
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
a00107cc: e5973044 ldr r3, [r7, #68] ; 0x44
stats->max_search = search_count;
}
return (void *) alloc_begin;
a00107d0: e1a00004 mov r0, r4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
a00107d4: e1530005 cmp r3, r5
stats->max_search = search_count;
a00107d8: 35875044 strcc r5, [r7, #68] ; 0x44
}
return (void *) alloc_begin;
}
a00107dc: e28dd01c add sp, sp, #28
a00107e0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
a00107e4: e1560003 cmp r6, r3 <== NOT EXECUTED
a00107e8: 8a000009 bhi a0010814 <_Heap_Allocate_aligned_with_boundary+0x248><== NOT EXECUTED
return NULL;
}
if ( alignment == 0 ) {
alignment = page_size;
a00107ec: e3580000 cmp r8, #0 <== NOT EXECUTED
a00107f0: 01a08002 moveq r8, r2 <== NOT EXECUTED
a00107f4: eaffff81 b a0010600 <_Heap_Allocate_aligned_with_boundary+0x34><== NOT EXECUTED
if ( free_size >= min_block_size || free_size == 0 ) {
return alloc_begin;
}
}
return 0;
a00107f8: e3a04000 mov r4, #0
a00107fc: eaffff89 b a0010628 <_Heap_Allocate_aligned_with_boundary+0x5c>
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a0010800: e3a04000 mov r4, #0
a0010804: eafffff0 b a00107cc <_Heap_Allocate_aligned_with_boundary+0x200>
a0010808: e59da018 ldr sl, [sp, #24] <== NOT EXECUTED
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 ) {
if ( boundary_line < boundary_floor ) {
return 0;
a001080c: e3a04000 mov r4, #0 <== NOT EXECUTED
a0010810: eaffff84 b a0010628 <_Heap_Allocate_aligned_with_boundary+0x5c><== NOT EXECUTED
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
a0010814: e3a00000 mov r0, #0
a0010818: eaffffef b a00107dc <_Heap_Allocate_aligned_with_boundary+0x210>
a000baac <_Heap_Block_allocate>:
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
a000baac: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 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;
a000bab0: e5917004 ldr r7, [r1, #4]
a000bab4: 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;
a000bab8: 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;
a000babc: 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);
a000bac0: 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;
a000bac4: e598c004 ldr ip, [r8, #4]
a000bac8: e1a0a003 mov sl, r3
a000bacc: e1a04000 mov r4, r0
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
a000bad0: 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;
a000bad4: 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 );
a000bad8: 11a09000 movne r9, r0
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
a000badc: 1a00000c bne a000bb14 <_Heap_Block_allocate+0x68>
free_list_anchor = block->prev;
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
a000bae0: e590e038 ldr lr, [r0, #56] ; 0x38
++stats->used_blocks;
a000bae4: e590c040 ldr ip, [r0, #64] ; 0x40
stats->free_size -= _Heap_Block_size( block );
a000bae8: 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;
a000baec: e595900c ldr r9, [r5, #12]
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
a000baf0: e5950008 ldr r0, [r5, #8]
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
a000baf4: e24ee001 sub lr, lr, #1
++stats->used_blocks;
a000baf8: e28cc001 add ip, ip, #1
stats->free_size -= _Heap_Block_size( block );
a000bafc: e061100b rsb r1, r1, fp
Heap_Block *prev = block->prev;
prev->next = next;
a000bb00: e5890008 str r0, [r9, #8]
next->prev = prev;
a000bb04: e580900c str r9, [r0, #12]
free_list_anchor = block->prev;
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
a000bb08: e584e038 str lr, [r4, #56] ; 0x38
++stats->used_blocks;
a000bb0c: e584c040 str ip, [r4, #64] ; 0x40
stats->free_size -= _Heap_Block_size( block );
a000bb10: e5841030 str r1, [r4, #48] ; 0x30
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
a000bb14: e5941010 ldr r1, [r4, #16]
a000bb18: e1530001 cmp r3, r1
a000bb1c: 2a00000a bcs a000bb4c <_Heap_Block_allocate+0xa0>
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
a000bb20: e1a00004 mov r0, r4
a000bb24: e1a02009 mov r2, r9
a000bb28: e083300a add r3, r3, sl
a000bb2c: e1a01005 mov r1, r5
a000bb30: ebffff28 bl a000b7d8 <_Heap_Block_split>
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
a000bb34: e5943030 ldr r3, [r4, #48] ; 0x30
a000bb38: e5942034 ldr r2, [r4, #52] ; 0x34
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000bb3c: e1a00005 mov r0, r5
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
a000bb40: e1520003 cmp r2, r3
stats->min_free_size = stats->free_size;
a000bb44: 85843034 strhi r3, [r4, #52] ; 0x34
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000bb48: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000bb4c: e1a00002 mov r0, r2
a000bb50: eb003f86 bl a001b970 <__umodsi3>
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
a000bb54: 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);
a000bb58: 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;
a000bb5c: 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;
a000bb60: e0833001 add r3, r3, r1
if ( _Heap_Is_prev_used( block ) ) {
a000bb64: 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;
a000bb68: 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;
a000bb6c: e5843030 str r3, [r4, #48] ; 0x30
if ( _Heap_Is_prev_used( block ) ) {
a000bb70: 1a000014 bne a000bbc8 <_Heap_Block_allocate+0x11c>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
a000bb74: 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;
a000bb78: e1a02009 mov r2, r9 <== NOT EXECUTED
a000bb7c: 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;
a000bb80: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
a000bb84: e3c33001 bic r3, r3, #1 <== NOT EXECUTED
a000bb88: e0811003 add r1, r1, r3 <== NOT EXECUTED
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
a000bb8c: e3813001 orr r3, r1, #1
a000bb90: e5853004 str r3, [r5, #4]
new_block->prev_size = block_size;
a000bb94: e5861000 str r1, [r6]
new_block->size_and_flag = new_block_size;
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
a000bb98: e1a00004 mov r0, r4
a000bb9c: 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;
a000bba0: e5868004 str r8, [r6, #4]
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
a000bba4: e1a01006 mov r1, r6
a000bba8: ebffff0a bl a000b7d8 <_Heap_Block_split>
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
a000bbac: e5943030 ldr r3, [r4, #48] ; 0x30
a000bbb0: e5942034 ldr r2, [r4, #52] ; 0x34
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
a000bbb4: e1a05006 mov r5, r6
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000bbb8: e1a00005 mov r0, r5
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
a000bbbc: e1520003 cmp r2, r3
stats->min_free_size = stats->free_size;
a000bbc0: 85843034 strhi r3, [r4, #52] ; 0x34
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000bbc4: 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;
a000bbc8: 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;
a000bbcc: e5993008 ldr r3, [r9, #8]
new_block->next = next;
new_block->prev = block_before;
a000bbd0: e585900c str r9, [r5, #12]
a000bbd4: e2800001 add r0, r0, #1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
a000bbd8: e5853008 str r3, [r5, #8]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
a000bbdc: 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;
a000bbe0: e5895008 str r5, [r9, #8]
a000bbe4: e1a02005 mov r2, r5
a000bbe8: e5840038 str r0, [r4, #56] ; 0x38
a000bbec: eaffffe6 b a000bb8c <_Heap_Block_allocate+0xe0>
a000b7d8 <_Heap_Block_split>:
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
a000b7d8: e92d45f0 push {r4, r5, r6, r7, r8, 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;
a000b7dc: e5906014 ldr r6, [r0, #20]
uintptr_t alloc_size
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
a000b7e0: e5907010 ldr r7, [r0, #16]
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
a000b7e4: 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;
a000b7e8: 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;
a000b7ec: e1530008 cmp r3, r8
a000b7f0: 21a08003 movcs r8, r3
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const used_size =
a000b7f4: e2888008 add r8, r8, #8
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
a000b7f8: e1a01007 mov r1, r7
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
a000b7fc: e1a04000 mov r4, r0
a000b800: e1a00008 mov r0, r8
a000b804: e1a0a002 mov sl, r2
a000b808: eb004058 bl a001b970 <__umodsi3>
- 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;
a000b80c: e5953004 ldr r3, [r5, #4]
if ( remainder != 0 ) {
a000b810: e3500000 cmp r0, #0
return value - remainder + alignment;
a000b814: 10887007 addne r7, r8, r7
a000b818: e3c31001 bic r1, r3, #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;
a000b81c: e2812004 add r2, r1, #4
} else {
return value;
a000b820: 01a07008 moveq r7, r8
uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS;
a000b824: 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;
a000b828: e0688002 rsb r8, r8, r2
)
{
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
return value - remainder + alignment;
a000b82c: 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 ) {
a000b830: 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);
a000b834: e0852001 add r2, r5, r1
a000b838: 3a00001c bcc a000b8b0 <_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;
a000b83c: e2033001 and r3, r3, #1
block->size_and_flag = size | flag;
a000b840: e1873003 orr r3, r7, r3
a000b844: e5853004 str r3, [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;
a000b848: e5923004 ldr r3, [r2, #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;
a000b84c: 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;
a000b850: e0671001 rsb r1, r7, r1
a000b854: e3c33001 bic r3, r3, #1
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;
a000b858: e082c003 add ip, r2, r3
a000b85c: 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;
a000b860: e0800001 add r0, r0, r1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000b864: e0875005 add r5, r7, r5
if ( _Heap_Is_used( next_block ) ) {
a000b868: 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;
a000b86c: e5840030 str r0, [r4, #48] ; 0x30
if ( _Heap_Is_used( next_block ) ) {
a000b870: 1a000012 bne a000b8c0 <_Heap_Block_split+0xe8>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
a000b874: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED
Heap_Block *prev = old_block->prev;
a000b878: e592200c ldr r2, [r2, #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;
a000b87c: e0811003 add r1, r1, r3 <== NOT EXECUTED
new_block->next = next;
a000b880: e5850008 str r0, [r5, #8] <== NOT EXECUTED
new_block->prev = prev;
a000b884: e585200c str r2, [r5, #12] <== NOT EXECUTED
next->prev = new_block;
prev->next = new_block;
a000b888: e5825008 str r5, [r2, #8] <== NOT EXECUTED
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
a000b88c: 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);
a000b890: e0812005 add r2, r1, 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;
a000b894: e3813001 orr r3, r1, #1
a000b898: e5853004 str r3, [r5, #4]
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000b89c: e5923004 ldr r3, [r2, #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;
a000b8a0: e5821000 str r1, [r2]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000b8a4: e3c33001 bic r3, r3, #1
a000b8a8: e5823004 str r3, [r2, #4]
a000b8ac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
_Heap_Protection_block_initialize( heap, free_block );
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a000b8b0: e5923004 ldr r3, [r2, #4]
a000b8b4: e3833001 orr r3, r3, #1
a000b8b8: e5823004 str r3, [r2, #4]
a000b8bc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
if ( _Heap_Is_used( next_block ) ) {
_Heap_Free_list_insert_after( free_list_anchor, free_block );
/* Statistics */
++stats->free_blocks;
a000b8c0: 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;
a000b8c4: e59a3008 ldr r3, [sl, #8]
new_block->next = next;
new_block->prev = block_before;
a000b8c8: e585a00c str sl, [r5, #12]
a000b8cc: e2800001 add r0, r0, #1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
a000b8d0: e5853008 str r3, [r5, #8]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
a000b8d4: 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;
a000b8d8: e58a5008 str r5, [sl, #8]
a000b8dc: e5840038 str r0, [r4, #56] ; 0x38
a000b8e0: eaffffeb b a000b894 <_Heap_Block_split+0xbc>
a001088c <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t unused __attribute__((unused))
)
{
a001088c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0010890: 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 ) {
a0010894: e0916002 adds r6, r1, r2
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t unused __attribute__((unused))
)
{
a0010898: e1a04001 mov r4, r1
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
a001089c: 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;
a00108a0: 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;
a00108a4: e5900010 ldr r0, [r0, #16]
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t unused __attribute__((unused))
)
{
a00108a8: e24dd020 sub sp, sp, #32
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;
a00108ac: e3a07000 mov r7, #0
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
a00108b0: 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;
a00108b4: e58d7018 str r7, [sp, #24]
Heap_Block *extend_last_block = NULL;
a00108b8: e58d701c str r7, [sp, #28]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a00108bc: 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;
a00108c0: e58d1014 str r1, [sp, #20]
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 0;
a00108c4: 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 ) {
a00108c8: 3a000001 bcc a00108d4 <_Heap_Extend+0x48>
/* Statistics */
stats->size += extended_size;
return extended_size;
}
a00108cc: e28dd020 add sp, sp, #32
a00108d0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
if ( extend_area_end < extend_area_begin ) {
return 0;
}
extend_area_ok = _Heap_Get_first_and_last_block(
a00108d4: e28dc018 add ip, sp, #24
a00108d8: e1a01002 mov r1, r2
a00108dc: e58dc000 str ip, [sp]
a00108e0: e1a00004 mov r0, r4
a00108e4: e28dc01c add ip, sp, #28
a00108e8: e59d2008 ldr r2, [sp, #8]
a00108ec: e58dc004 str ip, [sp, #4]
a00108f0: ebffec10 bl a000b938 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
a00108f4: e3500000 cmp r0, #0
a00108f8: 0afffff3 beq a00108cc <_Heap_Extend+0x40>
a00108fc: e1a09008 mov r9, r8
a0010900: e1a0b007 mov fp, r7
a0010904: e58d700c str r7, [sp, #12]
a0010908: e58d7010 str r7, [sp, #16]
return 0;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
a001090c: e1590008 cmp r9, r8
a0010910: 05953018 ldreq r3, [r5, #24]
uintptr_t const sub_area_end = start_block->prev_size;
a0010914: e599a000 ldr sl, [r9]
return 0;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
a0010918: 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 (
a001091c: e1530006 cmp r3, r6
a0010920: 3154000a cmpcc r4, sl
a0010924: 3a000067 bcc a0010ac8 <_Heap_Extend+0x23c>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return 0;
}
if ( extend_area_end == sub_area_begin ) {
a0010928: e1530006 cmp r3, r6
a001092c: 058d9010 streq r9, [sp, #16]
a0010930: 0a000001 beq a001093c <_Heap_Extend+0xb0>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
a0010934: e156000a cmp r6, sl
a0010938: 31a0b009 movcc fp, r9
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a001093c: e1a0000a mov r0, sl
a0010940: e59d1008 ldr r1, [sp, #8]
a0010944: eb002ccc bl a001bc7c <__umodsi3>
a0010948: e24a3008 sub r3, sl, #8
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
a001094c: 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);
a0010950: e0603003 rsb r3, r0, r3
start_block->prev_size = extend_area_end;
a0010954: 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 )
a0010958: 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 ) {
a001095c: 0a000001 beq a0010968 <_Heap_Extend+0xdc>
a0010960: e154000a cmp r4, sl
a0010964: 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;
a0010968: e5939004 ldr r9, [r3, #4]
a001096c: 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);
a0010970: 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 );
a0010974: e1580009 cmp r8, r9
a0010978: 1affffe3 bne a001090c <_Heap_Extend+0x80>
if ( extend_area_begin < heap->area_begin ) {
a001097c: e5953018 ldr r3, [r5, #24]
a0010980: e1540003 cmp r4, r3
heap->area_begin = extend_area_begin;
a0010984: 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 ) {
a0010988: 3a000002 bcc a0010998 <_Heap_Extend+0x10c>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
a001098c: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
a0010990: e1560003 cmp r6, r3 <== NOT EXECUTED
heap->area_end = extend_area_end;
a0010994: 8585601c strhi r6, [r5, #28] <== NOT EXECUTED
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
a0010998: e59d3018 ldr r3, [sp, #24]
a001099c: 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 ) {
a00109a0: 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;
a00109a4: 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 =
a00109a8: 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;
a00109ac: e3810001 orr r0, r1, #1
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
a00109b0: 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 ) {
a00109b4: 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;
a00109b8: 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 =
a00109bc: 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;
a00109c0: 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;
a00109c4: 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 ) {
a00109c8: 8a000002 bhi a00109d8 <_Heap_Extend+0x14c>
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
a00109cc: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED
a00109d0: e1530002 cmp r3, r2 <== NOT EXECUTED
heap->last_block = extend_last_block;
a00109d4: 35852024 strcc r2, [r5, #36] ; 0x24 <== NOT EXECUTED
}
if ( merge_below_block != NULL ) {
a00109d8: e59d3010 ldr r3, [sp, #16]
a00109dc: e3530000 cmp r3, #0
a00109e0: 0a00004b beq a0010b14 <_Heap_Extend+0x288>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
a00109e4: 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 );
a00109e8: 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;
a00109ec: e1a00004 mov r0, r4 <== NOT EXECUTED
a00109f0: e1a01008 mov r1, r8 <== NOT EXECUTED
a00109f4: eb002ca0 bl a001bc7c <__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;
a00109f8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
if ( remainder != 0 ) {
a00109fc: e3500000 cmp r0, #0 <== NOT EXECUTED
return value - remainder + alignment;
a0010a00: 10844008 addne r4, r4, r8 <== NOT EXECUTED
a0010a04: 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 =
a0010a08: 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;
a0010a0c: e5932000 ldr r2, [r3] <== 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 =
a0010a10: e0613003 rsb r3, r1, r3 <== 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;
a0010a14: 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;
a0010a18: e5042008 str r2, [r4, #-8] <== NOT EXECUTED
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
a0010a1c: e5813004 str r3, [r1, #4] <== NOT EXECUTED
_Heap_Free_block( heap, new_first_block );
a0010a20: e1a00005 mov r0, r5 <== NOT EXECUTED
a0010a24: ebffff83 bl a0010838 <_Heap_Free_block> <== NOT EXECUTED
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
a0010a28: e59d400c ldr r4, [sp, #12]
a0010a2c: e3540000 cmp r4, #0
a0010a30: 0a000026 beq a0010ad0 <_Heap_Extend+0x244>
)
{
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,
a0010a34: 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(
a0010a38: e0646006 rsb r6, r4, r6 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0010a3c: e5951010 ldr r1, [r5, #16] <== NOT EXECUTED
a0010a40: e1a00006 mov r0, r6 <== NOT EXECUTED
a0010a44: eb002c8c bl a001bc7c <__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)
a0010a48: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
a0010a4c: e0606006 rsb r6, r0, r6 <== 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 =
a0010a50: e0862004 add r2, r6, r4 <== NOT EXECUTED
(last_block->size_and_flag - last_block_new_size)
a0010a54: e0663003 rsb r3, r6, r3 <== NOT EXECUTED
| HEAP_PREV_BLOCK_USED;
a0010a58: 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 =
a0010a5c: 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;
a0010a60: e5943004 ldr r3, [r4, #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 );
a0010a64: e1a00005 mov r0, r5 <== NOT EXECUTED
a0010a68: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
a0010a6c: e2033001 and r3, r3, #1 <== NOT EXECUTED
block->size_and_flag = size | flag;
a0010a70: e1866003 orr r6, r6, r3 <== NOT EXECUTED
a0010a74: e5846004 str r6, [r4, #4] <== NOT EXECUTED
a0010a78: ebffff6e bl a0010838 <_Heap_Free_block> <== NOT EXECUTED
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
a0010a7c: e59d200c ldr r2, [sp, #12]
a0010a80: e59d3010 ldr r3, [sp, #16]
a0010a84: e3520000 cmp r2, #0
a0010a88: 03530000 cmpeq r3, #0
a0010a8c: 0a00001c beq a0010b04 <_Heap_Extend+0x278>
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
a0010a90: 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(
a0010a94: 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;
a0010a98: e5950030 ldr r0, [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;
a0010a9c: e5931004 ldr r1, [r3, #4]
a0010aa0: e59d4014 ldr r4, [sp, #20]
/* Statistics */
stats->size += extended_size;
a0010aa4: e595202c ldr r2, [r5, #44] ; 0x2c
* 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(
a0010aa8: e063c00c rsb ip, r3, ip
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;
a0010aac: e2011001 and r1, r1, #1
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
a0010ab0: e0640000 rsb r0, r4, r0
block->size_and_flag = size | flag;
a0010ab4: e18c1001 orr r1, ip, r1
/* Statistics */
stats->size += extended_size;
a0010ab8: e0822000 add r2, r2, r0
a0010abc: e5831004 str r1, [r3, #4]
a0010ac0: e585202c str r2, [r5, #44] ; 0x2c
return extended_size;
a0010ac4: eaffff80 b a00108cc <_Heap_Extend+0x40>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return 0;
a0010ac8: e3a00000 mov r0, #0 <== NOT EXECUTED
a0010acc: eaffff7e b a00108cc <_Heap_Extend+0x40> <== NOT EXECUTED
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
a0010ad0: e3570000 cmp r7, #0
a0010ad4: 0affffe8 beq a0010a7c <_Heap_Extend+0x1f0>
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;
a0010ad8: 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 );
a0010adc: e59d2018 ldr r2, [sp, #24] <== 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(
a0010ae0: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
a0010ae4: 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 );
a0010ae8: e0672002 rsb r2, r7, r2 <== NOT EXECUTED
block->size_and_flag = size | flag;
a0010aec: e1822001 orr r2, r2, r1 <== NOT EXECUTED
a0010af0: e5872004 str r2, [r7, #4] <== NOT EXECUTED
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a0010af4: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a0010af8: e3822001 orr r2, r2, #1 <== NOT EXECUTED
a0010afc: e5832004 str r2, [r3, #4] <== NOT EXECUTED
a0010b00: eaffffdd b a0010a7c <_Heap_Extend+0x1f0> <== NOT EXECUTED
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
_Heap_Free_block( heap, extend_first_block );
a0010b04: e1a00005 mov r0, r5
a0010b08: e59d1018 ldr r1, [sp, #24]
a0010b0c: ebffff49 bl a0010838 <_Heap_Free_block>
a0010b10: eaffffde b a0010a90 <_Heap_Extend+0x204>
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 ) {
a0010b14: 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;
a0010b18: 1062b00b rsbne fp, r2, fp
a0010b1c: 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 =
a0010b20: 1582b004 strne fp, [r2, #4]
a0010b24: eaffffbf b a0010a28 <_Heap_Extend+0x19c>
a001081c <_Heap_Free>:
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
a001081c: e2513000 subs r3, r1, #0
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
a0010820: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a0010824: e1a04000 mov r4, r0
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
a0010828: 0a000052 beq a0010978 <_Heap_Free+0x15c>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a001082c: e1a00003 mov r0, r3
a0010830: e5941010 ldr r1, [r4, #16]
a0010834: e2435008 sub r5, r3, #8
a0010838: eb002c4c bl a001b970 <__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
a001083c: e5942020 ldr r2, [r4, #32]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a0010840: 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;
a0010844: e1550002 cmp r5, r2
a0010848: 3a000030 bcc a0010910 <_Heap_Free+0xf4>
a001084c: e5941024 ldr r1, [r4, #36] ; 0x24
a0010850: e1550001 cmp r5, r1
a0010854: 8a00002d bhi a0010910 <_Heap_Free+0xf4>
- 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;
a0010858: e595c004 ldr ip, [r5, #4]
a001085c: 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);
a0010860: e0853006 add r3, 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;
a0010864: e1520003 cmp r2, r3
a0010868: 8a000028 bhi a0010910 <_Heap_Free+0xf4>
a001086c: e1510003 cmp r1, r3
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
return false;
a0010870: 33a00000 movcc r0, #0
a0010874: 3a000027 bcc a0010918 <_Heap_Free+0xfc>
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;
a0010878: e5937004 ldr r7, [r3, #4]
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
a001087c: e2170001 ands r0, r7, #1
a0010880: 0a000024 beq a0010918 <_Heap_Free+0xfc>
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 ));
a0010884: e1510003 cmp r1, 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;
a0010888: e3c77001 bic r7, r7, #1
a001088c: 03a08000 moveq r8, #0
a0010890: 0a000004 beq a00108a8 <_Heap_Free+0x8c>
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;
a0010894: e0830007 add r0, r3, r7
a0010898: e5900004 ldr r0, [r0, #4]
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
a001089c: e3100001 tst r0, #1
a00108a0: 13a08000 movne r8, #0
a00108a4: 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 ) ) {
a00108a8: e21c0001 ands r0, ip, #1
a00108ac: 1a00001a bne a001091c <_Heap_Free+0x100>
uintptr_t const prev_size = block->prev_size;
a00108b0: 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);
a00108b4: 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;
a00108b8: e152000a cmp r2, sl
a00108bc: 8a000015 bhi a0010918 <_Heap_Free+0xfc>
a00108c0: e151000a cmp r1, sl
a00108c4: 3a000013 bcc a0010918 <_Heap_Free+0xfc>
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;
a00108c8: 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) ) {
a00108cc: e2100001 ands r0, r0, #1
a00108d0: 0a000010 beq a0010918 <_Heap_Free+0xfc>
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
a00108d4: e3580000 cmp r8, #0
a00108d8: 0a00003a beq a00109c8 <_Heap_Free+0x1ac>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
a00108dc: e5940038 ldr r0, [r4, #56] ; 0x38
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
a00108e0: e5932008 ldr r2, [r3, #8]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
a00108e4: e0867007 add r7, r6, r7
Heap_Block *prev = block->prev;
a00108e8: e593300c ldr r3, [r3, #12]
a00108ec: e087c00c add ip, r7, ip
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
a00108f0: e2400001 sub r0, r0, #1
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a00108f4: e38c1001 orr r1, ip, #1
prev->next = next;
a00108f8: e5832008 str r2, [r3, #8]
next->prev = prev;
a00108fc: e582300c str r3, [r2, #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;
a0010900: e5840038 str r0, [r4, #56] ; 0x38
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a0010904: 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;
a0010908: e78ac00c str ip, [sl, ip]
a001090c: ea00000e b a001094c <_Heap_Free+0x130>
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
return false;
a0010910: e3a00000 mov r0, #0
a0010914: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
a0010918: 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 */
a001091c: e3580000 cmp r8, #0
a0010920: 0a000016 beq a0010980 <_Heap_Free+0x164>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
a0010924: e5932008 ldr r2, [r3, #8]
Heap_Block *prev = old_block->prev;
a0010928: e593300c ldr r3, [r3, #12]
uintptr_t const size = block_size + next_block_size;
a001092c: e0877006 add r7, r7, r6
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a0010930: e3871001 orr r1, r7, #1
new_block->next = next;
a0010934: e5852008 str r2, [r5, #8]
new_block->prev = prev;
a0010938: e585300c str r3, [r5, #12]
next->prev = new_block;
prev->next = new_block;
a001093c: e5835008 str r5, [r3, #8]
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
a0010940: e582500c str r5, [r2, #12]
a0010944: e5851004 str r1, [r5, #4]
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
a0010948: e7857007 str r7, [r5, r7]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a001094c: e5942040 ldr r2, [r4, #64] ; 0x40
++stats->frees;
a0010950: e5943050 ldr r3, [r4, #80] ; 0x50
stats->free_size += block_size;
a0010954: e5941030 ldr r1, [r4, #48] ; 0x30
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a0010958: e2422001 sub r2, r2, #1
++stats->frees;
a001095c: e2833001 add r3, r3, #1
stats->free_size += block_size;
a0010960: e0816006 add r6, r1, r6
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
a0010964: e5842040 str r2, [r4, #64] ; 0x40
++stats->frees;
a0010968: e5843050 str r3, [r4, #80] ; 0x50
stats->free_size += block_size;
a001096c: e5846030 str r6, [r4, #48] ; 0x30
return( true );
a0010970: e3a00001 mov r0, #1
a0010974: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
a0010978: e3a00001 mov r0, #1
a001097c: 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;
a0010980: e3862001 orr r2, r6, #1
a0010984: e5852004 str r2, [r5, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
a0010988: e5942038 ldr r2, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
a001098c: 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;
a0010990: e5930004 ldr r0, [r3, #4]
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
a0010994: e5941008 ldr r1, [r4, #8]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
a0010998: e2822001 add r2, r2, #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;
a001099c: e3c00001 bic r0, r0, #1
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
a00109a0: e152000c cmp r2, ip
new_block->next = next;
a00109a4: e5851008 str r1, [r5, #8]
new_block->prev = block_before;
a00109a8: 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;
a00109ac: e5830004 str r0, [r3, #4]
block_before->next = new_block;
next->prev = new_block;
a00109b0: e581500c str r5, [r1, #12]
next_block->prev_size = block_size;
a00109b4: 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;
a00109b8: e5845008 str r5, [r4, #8]
/* Statistics */
++stats->free_blocks;
a00109bc: e5842038 str r2, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
a00109c0: 8584203c strhi r2, [r4, #60] ; 0x3c
a00109c4: eaffffe0 b a001094c <_Heap_Free+0x130>
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;
a00109c8: e086c00c add ip, r6, ip
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
a00109cc: e38c2001 orr r2, ip, #1
a00109d0: e58a2004 str r2, [sl, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a00109d4: e5932004 ldr r2, [r3, #4]
next_block->prev_size = size;
a00109d8: 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;
a00109dc: e3c22001 bic r2, r2, #1
a00109e0: e5832004 str r2, [r3, #4]
a00109e4: eaffffd8 b a001094c <_Heap_Free+0x130>
a000d694 <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
a000d694: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
a000d698: e2528000 subs r8, r2, #0
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
a000d69c: e1a04000 mov r4, r0
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *allocated_blocks = NULL;
a000d6a0: 01a05008 moveq r5, r8
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
a000d6a4: 0a000012 beq a000d6f4 <_Heap_Greedy_allocate+0x60>
a000d6a8: e3a06000 mov r6, #0
a000d6ac: e1a07001 mov r7, r1
const uintptr_t *block_sizes,
size_t block_count
)
{
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *allocated_blocks = NULL;
a000d6b0: e1a05006 mov r5, r6
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and
* boundary equals zero.
*/
RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size )
{
return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
a000d6b4: e3a02000 mov r2, #0
a000d6b8: e4971004 ldr r1, [r7], #4
a000d6bc: e1a03002 mov r3, r2
a000d6c0: e1a00004 mov r0, r4
a000d6c4: eb001e45 bl a0014fe0 <_Heap_Allocate_aligned_with_boundary>
size_t i;
for (i = 0; i < block_count; ++i) {
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
a000d6c8: e250a000 subs sl, r0, #0
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
a000d6cc: e2866001 add r6, r6, #1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000d6d0: e24aa008 sub sl, sl, #8
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
a000d6d4: 0a000004 beq a000d6ec <_Heap_Greedy_allocate+0x58>
a000d6d8: e5941010 ldr r1, [r4, #16]
a000d6dc: eb004b1c bl a0020354 <__umodsi3>
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a000d6e0: e060000a rsb r0, r0, sl
Heap_Block *next_block = _Heap_Block_of_alloc_area(
(uintptr_t) next,
heap->page_size
);
next_block->next = allocated_blocks;
a000d6e4: e5805008 str r5, [r0, #8]
a000d6e8: e1a05000 mov r5, r0
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
a000d6ec: e1560008 cmp r6, r8
a000d6f0: 1affffef bne a000d6b4 <_Heap_Greedy_allocate+0x20>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
a000d6f4: e5946008 ldr r6, [r4, #8]
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
a000d6f8: e1540006 cmp r4, r6
a000d6fc: 13a07000 movne r7, #0
a000d700: 1a000001 bne a000d70c <_Heap_Greedy_allocate+0x78>
a000d704: ea000018 b a000d76c <_Heap_Greedy_allocate+0xd8> <== NOT EXECUTED
a000d708: e1a06003 mov r6, 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;
a000d70c: e5963004 ldr r3, [r6, #4]
_Heap_Block_allocate(
a000d710: e1a01006 mov r1, r6
a000d714: e2862008 add r2, r6, #8
a000d718: e3c33001 bic r3, r3, #1
a000d71c: e2433008 sub r3, r3, #8
a000d720: e1a00004 mov r0, r4
a000d724: eb0000d2 bl a000da74 <_Heap_Block_allocate>
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
a000d728: e5867008 str r7, [r6, #8]
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
a000d72c: e5943008 ldr r3, [r4, #8]
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
a000d730: e1a07006 mov r7, r6
a000d734: e1540003 cmp r4, r3
a000d738: 1afffff2 bne a000d708 <_Heap_Greedy_allocate+0x74>
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
a000d73c: e3550000 cmp r5, #0
a000d740: 1a000001 bne a000d74c <_Heap_Greedy_allocate+0xb8>
a000d744: ea000006 b a000d764 <_Heap_Greedy_allocate+0xd0>
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
a000d748: e1a05007 mov r5, r7 <== NOT EXECUTED
a000d74c: e1a01005 mov r1, r5
a000d750: e5b17008 ldr r7, [r1, #8]!
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
a000d754: e1a00004 mov r0, r4
a000d758: eb001eb4 bl a0015230 <_Heap_Free>
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
a000d75c: e3570000 cmp r7, #0
a000d760: 1afffff8 bne a000d748 <_Heap_Greedy_allocate+0xb4>
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
return blocks;
}
a000d764: e1a00006 mov r0, r6
a000d768: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
a000d76c: e3a06000 mov r6, #0 <== NOT EXECUTED
a000d770: eafffff1 b a000d73c <_Heap_Greedy_allocate+0xa8> <== NOT EXECUTED
a0015e94 <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
a0015e94: e92d40f0 push {r4, r5, r6, r7, lr}
Heap_Block *current = heap->first_block;
a0015e98: e590c020 ldr ip, [r0, #32]
Heap_Block *end = heap->last_block;
a0015e9c: e5904024 ldr r4, [r0, #36] ; 0x24
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
a0015ea0: e1a06001 mov r6, r1
a0015ea4: e1a05002 mov r5, r2
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
a0015ea8: e15c0004 cmp ip, r4
a0015eac: 1a000003 bne a0015ec0 <_Heap_Iterate+0x2c>
a0015eb0: ea00000d b a0015eec <_Heap_Iterate+0x58> <== NOT EXECUTED
a0015eb4: e1540007 cmp r4, r7
a0015eb8: 0a00000a beq a0015ee8 <_Heap_Iterate+0x54>
a0015ebc: e1a0c007 mov ip, r7
a0015ec0: e59c1004 ldr r1, [ip, #4]
uintptr_t size = _Heap_Block_size( current );
Heap_Block *next = _Heap_Block_at( current, size );
bool used = _Heap_Is_prev_used( next );
stop = (*visitor)( current, size, used, visitor_arg );
a0015ec4: e1a0000c mov r0, ip
a0015ec8: e1a03005 mov r3, r5
a0015ecc: e3c11001 bic r1, r1, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a0015ed0: e08c7001 add r7, ip, 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;
a0015ed4: e5972004 ldr r2, [r7, #4]
a0015ed8: e2022001 and r2, r2, #1
a0015edc: e12fff36 blx r6
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
a0015ee0: e3500000 cmp r0, #0
a0015ee4: 0afffff2 beq a0015eb4 <_Heap_Iterate+0x20>
a0015ee8: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0015eec: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a0010360 <_Heap_No_extend>:
uintptr_t unused_2 __attribute__((unused)),
uintptr_t unused_3 __attribute__((unused))
)
{
return 0;
}
a0010360: e3a00000 mov r0, #0 <== NOT EXECUTED
a0010364: e12fff1e bx lr <== NOT EXECUTED
a00109e8 <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
a00109e8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a00109ec: e1a04000 mov r4, r0
a00109f0: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a00109f4: e1a00001 mov r0, r1
a00109f8: e5941010 ldr r1, [r4, #16]
a00109fc: e1a07003 mov r7, r3
a0010a00: e1a08002 mov r8, r2
a0010a04: eb002bd9 bl a001b970 <__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;
a0010a08: e5943020 ldr r3, [r4, #32]
a0010a0c: e59d601c ldr r6, [sp, #28]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0010a10: e2451008 sub r1, r5, #8
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a0010a14: e0601001 rsb r1, r0, r1
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;
a0010a18: 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;
a0010a1c: e1530001 cmp r3, r1
a0010a20: e5872000 str r2, [r7]
*new_size = 0;
a0010a24: e5862000 str r2, [r6]
a0010a28: 8a000038 bhi a0010b10 <_Heap_Resize_block+0x128>
a0010a2c: e5943024 ldr r3, [r4, #36] ; 0x24
a0010a30: e1530001 cmp r3, r1
a0010a34: 3a000037 bcc a0010b18 <_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;
a0010a38: 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;
a0010a3c: e2652004 rsb r2, r5, #4
a0010a40: 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;
a0010a44: e0813000 add r3, r1, r0
a0010a48: e593c004 ldr ip, [r3, #4]
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
a0010a4c: e0822003 add r2, r2, r3
a0010a50: e3ccc001 bic ip, ip, #1
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;
a0010a54: e083a00c add sl, r3, ip
a0010a58: e59aa004 ldr sl, [sl, #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;
a0010a5c: e5872000 str r2, [r7]
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
a0010a60: e31a0001 tst sl, #1
a0010a64: 13a07000 movne r7, #0
a0010a68: 03a07001 moveq r7, #1
if ( next_block_is_free ) {
a0010a6c: e3570000 cmp r7, #0
block_size += next_block_size;
alloc_size += next_block_size;
a0010a70: 1082200c addne r2, r2, ip
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
a0010a74: 1080000c addne r0, r0, ip
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
a0010a78: e1580002 cmp r8, r2
a0010a7c: 8a000027 bhi a0010b20 <_Heap_Resize_block+0x138>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
a0010a80: e3570000 cmp r7, #0
a0010a84: 0a000011 beq a0010ad0 <_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;
a0010a88: 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);
a0010a8c: e0802001 add r2, 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;
a0010a90: 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;
a0010a94: e2077001 and r7, r7, #1 <== NOT EXECUTED
block->size_and_flag = size | flag;
a0010a98: e1800007 orr r0, r0, r7 <== NOT EXECUTED
a0010a9c: e5810004 str r0, [r1, #4] <== NOT EXECUTED
stats->free_size -= next_block_size;
a0010aa0: e594a030 ldr sl, [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;
a0010aa4: e5927004 ldr r7, [r2, #4] <== NOT EXECUTED
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
a0010aa8: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
Heap_Block *prev = block->prev;
a0010aac: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
a0010ab0: e3877001 orr r7, r7, #1 <== NOT EXECUTED
/* Statistics */
--stats->free_blocks;
a0010ab4: e24ee001 sub lr, lr, #1 <== NOT EXECUTED
stats->free_size -= next_block_size;
a0010ab8: e06cc00a rsb ip, ip, sl <== NOT EXECUTED
prev->next = next;
a0010abc: e5830008 str r0, [r3, #8] <== NOT EXECUTED
next->prev = prev;
a0010ac0: e580300c str r3, [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;
a0010ac4: e5827004 str r7, [r2, #4] <== NOT EXECUTED
/* Statistics */
--stats->free_blocks;
a0010ac8: e584e038 str lr, [r4, #56] ; 0x38 <== NOT EXECUTED
stats->free_size -= next_block_size;
a0010acc: e584c030 str ip, [r4, #48] ; 0x30 <== NOT EXECUTED
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
a0010ad0: e1a02005 mov r2, r5
a0010ad4: e1a03008 mov r3, r8
a0010ad8: e1a00004 mov r0, r4
a0010adc: ebffebf2 bl a000baac <_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;
a0010ae0: e5902004 ldr r2, [r0, #4]
a0010ae4: e1a03000 mov r3, r0
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
/* Statistics */
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
a0010ae8: e3a00000 mov r0, #0
a0010aec: 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);
a0010af0: 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;
a0010af4: e0655002 rsb r5, r5, r2
a0010af8: e0833005 add r3, r3, r5
a0010afc: e5863000 str r3, [r6]
/* Statistics */
++stats->resizes;
a0010b00: e5943054 ldr r3, [r4, #84] ; 0x54
a0010b04: e2833001 add r3, r3, #1
a0010b08: e5843054 str r3, [r4, #84] ; 0x54
a0010b0c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
new_alloc_size,
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
a0010b10: e3a00002 mov r0, #2 <== NOT EXECUTED
a0010b14: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a0010b18: e3a00002 mov r0, #2 <== NOT EXECUTED
}
a0010b1c: 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;
a0010b20: e3a00001 mov r0, #1
*old_size = 0;
*new_size = 0;
if ( _Heap_Is_block_in_heap( heap, block ) ) {
_Heap_Protection_block_check( heap, block );
return _Heap_Resize_block_checked(
a0010b24: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a0010b28 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
a0010b28: e92d4070 push {r4, r5, r6, lr}
a0010b2c: e1a04000 mov r4, r0
a0010b30: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0010b34: e1a00001 mov r0, r1
a0010b38: e5941010 ldr r1, [r4, #16]
a0010b3c: e1a06002 mov r6, r2
a0010b40: eb002b8a bl a001b970 <__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
a0010b44: e5943020 ldr r3, [r4, #32]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a0010b48: e2452008 sub r2, r5, #8
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a0010b4c: e0602002 rsb r2, r0, r2
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;
a0010b50: e1520003 cmp r2, r3
a0010b54: 3a000012 bcc a0010ba4 <_Heap_Size_of_alloc_area+0x7c>
a0010b58: e5941024 ldr r1, [r4, #36] ; 0x24
a0010b5c: e1520001 cmp r2, r1
a0010b60: 8a00000f bhi a0010ba4 <_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;
a0010b64: e5920004 ldr r0, [r2, #4]
a0010b68: e3c00001 bic r0, r0, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a0010b6c: e0822000 add r2, r2, r0
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;
a0010b70: e1530002 cmp r3, r2
a0010b74: 8a00000a bhi a0010ba4 <_Heap_Size_of_alloc_area+0x7c>
a0010b78: e1510002 cmp r1, r2
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
a0010b7c: 33a00000 movcc r0, #0
a0010b80: 3a000009 bcc a0010bac <_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;
a0010b84: e5920004 ldr r0, [r2, #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 )
a0010b88: e2100001 ands r0, r0, #1
a0010b8c: 0a000006 beq a0010bac <_Heap_Size_of_alloc_area+0x84>
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
a0010b90: e2655004 rsb r5, r5, #4
a0010b94: e0852002 add r2, r5, r2
a0010b98: e5862000 str r2, [r6]
return true;
a0010b9c: e3a00001 mov r0, #1
a0010ba0: e8bd8070 pop {r4, r5, r6, pc}
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
a0010ba4: e3a00000 mov r0, #0 <== NOT EXECUTED
a0010ba8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
a0010bac: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000c5e8 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000c5e8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
uintptr_t const page_size = heap->page_size;
a000c5ec: e590c010 ldr ip, [r0, #16]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000c5f0: e24dd038 sub sp, sp, #56 ; 0x38
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() ) ) {
a000c5f4: e59f3560 ldr r3, [pc, #1376] ; a000cb5c <_Heap_Walk+0x574>
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
a000c5f8: e58dc024 str ip, [sp, #36] ; 0x24
uintptr_t const min_block_size = heap->min_block_size;
a000c5fc: e590c014 ldr ip, [r0, #20]
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;
a000c600: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a000c604: 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;
a000c608: e59f2550 ldr r2, [pc, #1360] ; a000cb60 <_Heap_Walk+0x578>
a000c60c: e59f9550 ldr r9, [pc, #1360] ; a000cb64 <_Heap_Walk+0x57c>
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000c610: e58dc028 str ip, [sp, #40] ; 0x28
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
a000c614: e590c024 ldr ip, [r0, #36] ; 0x24
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a000c618: 11a09002 movne r9, r2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a000c61c: e3530003 cmp r3, #3
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000c620: e1a04000 mov r4, r0
a000c624: e1a0a001 mov sl, r1
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
a000c628: e5908020 ldr r8, [r0, #32]
Heap_Block *const last_block = heap->last_block;
a000c62c: e58dc02c str ip, [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() ) ) {
a000c630: 0a000002 beq a000c640 <_Heap_Walk+0x58>
}
block = next_block;
} while ( block != first_block );
return true;
a000c634: e3a00001 mov r0, #1
}
a000c638: e28dd038 add sp, sp, #56 ; 0x38
a000c63c: 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)(
a000c640: e59dc028 ldr ip, [sp, #40] ; 0x28
a000c644: e5900018 ldr r0, [r0, #24]
a000c648: e594101c ldr r1, [r4, #28]
a000c64c: e5942008 ldr r2, [r4, #8]
a000c650: e594300c ldr r3, [r4, #12]
a000c654: e58dc000 str ip, [sp]
a000c658: e59dc02c ldr ip, [sp, #44] ; 0x2c
a000c65c: e98d0103 stmib sp, {r0, r1, r8}
a000c660: e58dc010 str ip, [sp, #16]
a000c664: e58d2014 str r2, [sp, #20]
a000c668: e58d3018 str r3, [sp, #24]
a000c66c: e1a0000a mov r0, sl
a000c670: e3a01000 mov r1, #0
a000c674: e59f24ec ldr r2, [pc, #1260] ; a000cb68 <_Heap_Walk+0x580>
a000c678: e59d3024 ldr r3, [sp, #36] ; 0x24
a000c67c: e12fff39 blx r9
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
a000c680: e59dc024 ldr ip, [sp, #36] ; 0x24
a000c684: e35c0000 cmp ip, #0
a000c688: 0a000024 beq a000c720 <_Heap_Walk+0x138>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
a000c68c: e59dc024 ldr ip, [sp, #36] ; 0x24
a000c690: e21c5007 ands r5, ip, #7
a000c694: 1a000027 bne a000c738 <_Heap_Walk+0x150>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000c698: e59d0028 ldr r0, [sp, #40] ; 0x28
a000c69c: e59d1024 ldr r1, [sp, #36] ; 0x24
a000c6a0: ebffe256 bl a0005000 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
a000c6a4: e2506000 subs r6, r0, #0
a000c6a8: 1a000029 bne a000c754 <_Heap_Walk+0x16c>
a000c6ac: e2880008 add r0, r8, #8
a000c6b0: e59d1024 ldr r1, [sp, #36] ; 0x24
a000c6b4: ebffe251 bl a0005000 <__umodsi3>
);
return false;
}
if (
a000c6b8: e2507000 subs r7, r0, #0
a000c6bc: 1a00002b bne a000c770 <_Heap_Walk+0x188>
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;
a000c6c0: e598b004 ldr fp, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
a000c6c4: e21b5001 ands r5, fp, #1
a000c6c8: 0a00002f beq a000c78c <_Heap_Walk+0x1a4>
- 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;
a000c6cc: e59dc02c ldr ip, [sp, #44] ; 0x2c
a000c6d0: e59c3004 ldr r3, [ip, #4]
a000c6d4: 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);
a000c6d8: 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;
a000c6dc: e5935004 ldr r5, [r3, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
a000c6e0: e2155001 ands r5, r5, #1
a000c6e4: 0a000007 beq a000c708 <_Heap_Walk+0x120>
);
return false;
}
if (
a000c6e8: e1580003 cmp r8, r3
a000c6ec: 0a00002c beq a000c7a4 <_Heap_Walk+0x1bc>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
a000c6f0: e1a0000a mov r0, sl <== NOT EXECUTED
a000c6f4: e3a01001 mov r1, #1 <== NOT EXECUTED
a000c6f8: e59f246c ldr r2, [pc, #1132] ; a000cb6c <_Heap_Walk+0x584> <== NOT EXECUTED
a000c6fc: 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;
a000c700: e1a00007 mov r0, r7 <== NOT EXECUTED
a000c704: eaffffcb b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
a000c708: e1a0000a mov r0, sl <== NOT EXECUTED
a000c70c: e3a01001 mov r1, #1 <== NOT EXECUTED
a000c710: e59f2458 ldr r2, [pc, #1112] ; a000cb70 <_Heap_Walk+0x588> <== NOT EXECUTED
a000c714: 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;
a000c718: e1a00005 mov r0, r5 <== NOT EXECUTED
a000c71c: eaffffc5 b a000c638 <_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" );
a000c720: e1a0000a mov r0, sl
a000c724: e3a01001 mov r1, #1
a000c728: e59f2444 ldr r2, [pc, #1092] ; a000cb74 <_Heap_Walk+0x58c>
a000c72c: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000c730: e59d0024 ldr r0, [sp, #36] ; 0x24
a000c734: eaffffbf b a000c638 <_Heap_Walk+0x50>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
a000c738: e1a0000a mov r0, sl
a000c73c: e3a01001 mov r1, #1
a000c740: e59f2430 ldr r2, [pc, #1072] ; a000cb78 <_Heap_Walk+0x590>
a000c744: e1a0300c mov r3, ip
a000c748: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000c74c: e3a00000 mov r0, #0
a000c750: eaffffb8 b a000c638 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
a000c754: e1a0000a mov r0, sl
a000c758: e3a01001 mov r1, #1
a000c75c: e59f2418 ldr r2, [pc, #1048] ; a000cb7c <_Heap_Walk+0x594>
a000c760: e59d3028 ldr r3, [sp, #40] ; 0x28
a000c764: e12fff39 blx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000c768: e1a00005 mov r0, r5
a000c76c: eaffffb1 b a000c638 <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
a000c770: e1a0000a mov r0, sl <== NOT EXECUTED
a000c774: e3a01001 mov r1, #1 <== NOT EXECUTED
a000c778: e59f2400 ldr r2, [pc, #1024] ; a000cb80 <_Heap_Walk+0x598> <== NOT EXECUTED
a000c77c: e1a03008 mov r3, r8 <== NOT EXECUTED
a000c780: 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;
a000c784: e1a00006 mov r0, r6 <== NOT EXECUTED
a000c788: eaffffaa b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
a000c78c: e1a0000a mov r0, sl <== NOT EXECUTED
a000c790: e3a01001 mov r1, #1 <== NOT EXECUTED
a000c794: e59f23e8 ldr r2, [pc, #1000] ; a000cb84 <_Heap_Walk+0x59c> <== NOT EXECUTED
a000c798: 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;
a000c79c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000c7a0: eaffffa4 b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
a000c7a4: e5945008 ldr r5, [r4, #8]
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
a000c7a8: e5947010 ldr r7, [r4, #16]
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
a000c7ac: e5943020 ldr r3, [r4, #32]
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 ) {
a000c7b0: e1540005 cmp r4, r5
a000c7b4: 0a00000b beq a000c7e8 <_Heap_Walk+0x200>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a000c7b8: e1530005 cmp r3, r5
a000c7bc: 9a0000a0 bls a000ca44 <_Heap_Walk+0x45c>
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
a000c7c0: e1a0000a mov r0, sl <== NOT EXECUTED
a000c7c4: e3a01001 mov r1, #1 <== NOT EXECUTED
a000c7c8: e59f23b8 ldr r2, [pc, #952] ; a000cb88 <_Heap_Walk+0x5a0> <== NOT EXECUTED
a000c7cc: e1a03005 mov r3, r5 <== NOT EXECUTED
a000c7d0: 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;
a000c7d4: e3a00000 mov r0, #0 <== NOT EXECUTED
a000c7d8: eaffff96 b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
a000c7dc: e1a03008 mov r3, r8
a000c7e0: e59db034 ldr fp, [sp, #52] ; 0x34
a000c7e4: e59d8030 ldr r8, [sp, #48] ; 0x30
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a000c7e8: 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;
a000c7ec: 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);
a000c7f0: 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;
a000c7f4: e1530005 cmp r3, r5
a000c7f8: 9a000007 bls a000c81c <_Heap_Walk+0x234>
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)(
a000c7fc: e1a0000a mov r0, sl <== NOT EXECUTED
a000c800: e58d5000 str r5, [sp] <== NOT EXECUTED
a000c804: e3a01001 mov r1, #1 <== NOT EXECUTED
a000c808: e59f237c ldr r2, [pc, #892] ; a000cb8c <_Heap_Walk+0x5a4> <== NOT EXECUTED
a000c80c: e1a03006 mov r3, r6 <== NOT EXECUTED
a000c810: e12fff39 blx r9 <== NOT EXECUTED
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
a000c814: e3a00000 mov r0, #0 <== NOT EXECUTED
a000c818: eaffff86 b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
a000c81c: e5943024 ldr r3, [r4, #36] ; 0x24
a000c820: e1530005 cmp r3, r5
a000c824: 3afffff4 bcc a000c7fc <_Heap_Walk+0x214>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000c828: e1a00007 mov r0, r7
a000c82c: e59d1024 ldr r1, [sp, #36] ; 0x24
a000c830: ebffe1f2 bl a0005000 <__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;
a000c834: e59dc02c ldr ip, [sp, #44] ; 0x2c
a000c838: e056300c subs r3, r6, ip
a000c83c: 13a03001 movne r3, #1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
a000c840: e3500000 cmp r0, #0
a000c844: 0a000001 beq a000c850 <_Heap_Walk+0x268>
a000c848: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c84c: 1a000063 bne a000c9e0 <_Heap_Walk+0x3f8> <== NOT EXECUTED
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
a000c850: e59dc028 ldr ip, [sp, #40] ; 0x28
a000c854: e15c0007 cmp ip, r7
a000c858: 9a000001 bls a000c864 <_Heap_Walk+0x27c>
a000c85c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c860: 1a000066 bne a000ca00 <_Heap_Walk+0x418> <== NOT EXECUTED
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
a000c864: e1560005 cmp r6, r5
a000c868: 3a000001 bcc a000c874 <_Heap_Walk+0x28c>
a000c86c: e3530000 cmp r3, #0
a000c870: 1a00006b bne a000ca24 <_Heap_Walk+0x43c>
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;
a000c874: e5953004 ldr r3, [r5, #4]
a000c878: e20bb001 and fp, fp, #1
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
a000c87c: e3130001 tst r3, #1
a000c880: 0a000015 beq a000c8dc <_Heap_Walk+0x2f4>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
a000c884: e35b0000 cmp fp, #0
(*printer)(
a000c888: e58d7000 str r7, [sp]
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
a000c88c: 0a00000a beq a000c8bc <_Heap_Walk+0x2d4>
(*printer)(
a000c890: e1a0000a mov r0, sl
a000c894: e3a01000 mov r1, #0
a000c898: e59f22f0 ldr r2, [pc, #752] ; a000cb90 <_Heap_Walk+0x5a8>
a000c89c: e1a03006 mov r3, r6
a000c8a0: e12fff39 blx r9
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a000c8a4: e1580005 cmp r8, r5
a000c8a8: 0affff61 beq a000c634 <_Heap_Walk+0x4c>
a000c8ac: e595b004 ldr fp, [r5, #4]
a000c8b0: e5943020 ldr r3, [r4, #32]
a000c8b4: e1a06005 mov r6, r5
a000c8b8: eaffffcb b a000c7ec <_Heap_Walk+0x204>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
a000c8bc: e5963000 ldr r3, [r6]
a000c8c0: e1a0000a mov r0, sl
a000c8c4: e1a0100b mov r1, fp
a000c8c8: e58d3004 str r3, [sp, #4]
a000c8cc: e59f22c0 ldr r2, [pc, #704] ; a000cb94 <_Heap_Walk+0x5ac>
a000c8d0: e1a03006 mov r3, r6
a000c8d4: e12fff39 blx r9
a000c8d8: eafffff1 b a000c8a4 <_Heap_Walk+0x2bc>
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 ?
a000c8dc: 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)(
a000c8e0: e5943008 ldr r3, [r4, #8]
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
a000c8e4: e594100c ldr r1, [r4, #12]
a000c8e8: e1530002 cmp r3, r2
a000c8ec: 059f02a4 ldreq r0, [pc, #676] ; a000cb98 <_Heap_Walk+0x5b0>
a000c8f0: 0a000003 beq a000c904 <_Heap_Walk+0x31c>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
a000c8f4: e59f32a0 ldr r3, [pc, #672] ; a000cb9c <_Heap_Walk+0x5b4>
a000c8f8: e1540002 cmp r4, r2
a000c8fc: e59f029c ldr r0, [pc, #668] ; a000cba0 <_Heap_Walk+0x5b8>
a000c900: 11a00003 movne r0, r3
block->next,
block->next == last_free_block ?
a000c904: 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)(
a000c908: e1510003 cmp r1, r3
a000c90c: 059f1290 ldreq r1, [pc, #656] ; a000cba4 <_Heap_Walk+0x5bc>
a000c910: 0a000003 beq a000c924 <_Heap_Walk+0x33c>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
a000c914: e59fc28c ldr ip, [pc, #652] ; a000cba8 <_Heap_Walk+0x5c0>
a000c918: e1540003 cmp r4, r3
a000c91c: e59f1278 ldr r1, [pc, #632] ; a000cb9c <_Heap_Walk+0x5b4>
a000c920: 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)(
a000c924: e58d2004 str r2, [sp, #4]
a000c928: e58d0008 str r0, [sp, #8]
a000c92c: e58d300c str r3, [sp, #12]
a000c930: e58d1010 str r1, [sp, #16]
a000c934: e1a03006 mov r3, r6
a000c938: e58d7000 str r7, [sp]
a000c93c: e1a0000a mov r0, sl
a000c940: e3a01000 mov r1, #0
a000c944: e59f2260 ldr r2, [pc, #608] ; a000cbac <_Heap_Walk+0x5c4>
a000c948: e12fff39 blx r9
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
a000c94c: e5953000 ldr r3, [r5]
a000c950: e1570003 cmp r7, r3
a000c954: 1a000010 bne a000c99c <_Heap_Walk+0x3b4>
);
return false;
}
if ( !prev_used ) {
a000c958: e35b0000 cmp fp, #0
a000c95c: 0a000018 beq a000c9c4 <_Heap_Walk+0x3dc>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
a000c960: 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 ) {
a000c964: e1540003 cmp r4, r3
a000c968: 0a000004 beq a000c980 <_Heap_Walk+0x398>
if ( free_block == block ) {
a000c96c: e1560003 cmp r6, r3
a000c970: 0affffcb beq a000c8a4 <_Heap_Walk+0x2bc>
return true;
}
free_block = free_block->next;
a000c974: 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 ) {
a000c978: e1540003 cmp r4, r3
a000c97c: 1afffffa bne a000c96c <_Heap_Walk+0x384>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
a000c980: e1a0000a mov r0, sl <== NOT EXECUTED
a000c984: e3a01001 mov r1, #1 <== NOT EXECUTED
a000c988: e59f2220 ldr r2, [pc, #544] ; a000cbb0 <_Heap_Walk+0x5c8> <== NOT EXECUTED
a000c98c: e1a03006 mov r3, r6 <== NOT EXECUTED
a000c990: 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;
a000c994: e3a00000 mov r0, #0 <== NOT EXECUTED
a000c998: eaffff26 b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
a000c99c: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a000c9a0: e1a0000a mov r0, sl <== NOT EXECUTED
a000c9a4: e58d7000 str r7, [sp] <== NOT EXECUTED
a000c9a8: e58d5008 str r5, [sp, #8] <== NOT EXECUTED
a000c9ac: e3a01001 mov r1, #1 <== NOT EXECUTED
a000c9b0: e59f21fc ldr r2, [pc, #508] ; a000cbb4 <_Heap_Walk+0x5cc> <== NOT EXECUTED
a000c9b4: e1a03006 mov r3, r6 <== NOT EXECUTED
a000c9b8: 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;
a000c9bc: e3a00000 mov r0, #0 <== NOT EXECUTED
a000c9c0: eaffff1c b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( !prev_used ) {
(*printer)(
a000c9c4: e1a0000a mov r0, sl <== NOT EXECUTED
a000c9c8: e3a01001 mov r1, #1 <== NOT EXECUTED
a000c9cc: e59f21e4 ldr r2, [pc, #484] ; a000cbb8 <_Heap_Walk+0x5d0> <== NOT EXECUTED
a000c9d0: e1a03006 mov r3, r6 <== NOT EXECUTED
a000c9d4: 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;
a000c9d8: e1a0000b mov r0, fp <== NOT EXECUTED
a000c9dc: eaffff15 b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
a000c9e0: e1a0000a mov r0, sl <== NOT EXECUTED
a000c9e4: e58d7000 str r7, [sp] <== NOT EXECUTED
a000c9e8: e3a01001 mov r1, #1 <== NOT EXECUTED
a000c9ec: e59f21c8 ldr r2, [pc, #456] ; a000cbbc <_Heap_Walk+0x5d4> <== NOT EXECUTED
a000c9f0: e1a03006 mov r3, r6 <== NOT EXECUTED
a000c9f4: e12fff39 blx r9 <== NOT EXECUTED
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
a000c9f8: e3a00000 mov r0, #0 <== NOT EXECUTED
a000c9fc: eaffff0d b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
a000ca00: e1a0000a mov r0, sl <== NOT EXECUTED
a000ca04: e58d7000 str r7, [sp] <== NOT EXECUTED
a000ca08: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
a000ca0c: e3a01001 mov r1, #1 <== NOT EXECUTED
a000ca10: e59f21a8 ldr r2, [pc, #424] ; a000cbc0 <_Heap_Walk+0x5d8> <== NOT EXECUTED
a000ca14: e1a03006 mov r3, r6 <== NOT EXECUTED
a000ca18: e12fff39 blx r9 <== NOT EXECUTED
block,
block_size,
min_block_size
);
return false;
a000ca1c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000ca20: eaffff04 b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
a000ca24: e1a0000a mov r0, sl <== NOT EXECUTED
a000ca28: e58d5000 str r5, [sp] <== NOT EXECUTED
a000ca2c: e3a01001 mov r1, #1 <== NOT EXECUTED
a000ca30: e59f218c ldr r2, [pc, #396] ; a000cbc4 <_Heap_Walk+0x5dc> <== NOT EXECUTED
a000ca34: e1a03006 mov r3, r6 <== NOT EXECUTED
a000ca38: e12fff39 blx r9 <== NOT EXECUTED
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
a000ca3c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000ca40: eafffefc b a000c638 <_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;
a000ca44: e594c024 ldr ip, [r4, #36] ; 0x24
a000ca48: e15c0005 cmp ip, r5
a000ca4c: 3affff5b bcc a000c7c0 <_Heap_Walk+0x1d8>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000ca50: e2850008 add r0, r5, #8
a000ca54: e1a01007 mov r1, r7
a000ca58: e58d3020 str r3, [sp, #32]
a000ca5c: e58dc01c str ip, [sp, #28]
a000ca60: ebffe166 bl a0005000 <__umodsi3>
);
return false;
}
if (
a000ca64: e3500000 cmp r0, #0
a000ca68: e59d3020 ldr r3, [sp, #32]
a000ca6c: e59dc01c ldr ip, [sp, #28]
a000ca70: 1a000032 bne a000cb40 <_Heap_Walk+0x558>
- 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;
a000ca74: e5952004 ldr r2, [r5, #4]
a000ca78: e3c22001 bic r2, r2, #1
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;
a000ca7c: e0852002 add r2, r5, r2
a000ca80: e5922004 ldr r2, [r2, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a000ca84: e3120001 tst r2, #1
a000ca88: 1a000025 bne a000cb24 <_Heap_Walk+0x53c>
a000ca8c: e58d8030 str r8, [sp, #48] ; 0x30
a000ca90: e58db034 str fp, [sp, #52] ; 0x34
a000ca94: e1a01004 mov r1, r4
a000ca98: e1a06005 mov r6, r5
a000ca9c: e1a08003 mov r8, r3
a000caa0: e1a0b00c mov fp, ip
a000caa4: ea000013 b a000caf8 <_Heap_Walk+0x510>
return false;
}
prev_block = free_block;
free_block = free_block->next;
a000caa8: e5955008 ldr r5, [r5, #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 ) {
a000caac: e1540005 cmp r4, r5
a000cab0: 0affff49 beq a000c7dc <_Heap_Walk+0x1f4>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
a000cab4: e1550008 cmp r5, r8
a000cab8: 3affff40 bcc a000c7c0 <_Heap_Walk+0x1d8>
a000cabc: e155000b cmp r5, fp
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000cac0: e2850008 add r0, r5, #8
a000cac4: 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;
a000cac8: 8affff3c bhi a000c7c0 <_Heap_Walk+0x1d8>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000cacc: ebffe14b bl a0005000 <__umodsi3>
);
return false;
}
if (
a000cad0: e3500000 cmp r0, #0
a000cad4: 1a000019 bne a000cb40 <_Heap_Walk+0x558>
- 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;
a000cad8: e5953004 ldr r3, [r5, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a000cadc: e1a01006 mov r1, r6
a000cae0: e1a06005 mov r6, r5
a000cae4: e3c33001 bic r3, r3, #1
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;
a000cae8: e0833005 add r3, r3, r5
a000caec: e5933004 ldr r3, [r3, #4]
a000caf0: e3130001 tst r3, #1
a000caf4: 1a00000a bne a000cb24 <_Heap_Walk+0x53c>
);
return false;
}
if ( free_block->prev != prev_block ) {
a000caf8: e595200c ldr r2, [r5, #12]
a000cafc: e1520001 cmp r2, r1
a000cb00: 0affffe8 beq a000caa8 <_Heap_Walk+0x4c0>
(*printer)(
a000cb04: e58d2000 str r2, [sp] <== NOT EXECUTED
a000cb08: e1a0000a mov r0, sl <== NOT EXECUTED
a000cb0c: e3a01001 mov r1, #1 <== NOT EXECUTED
a000cb10: e59f20b0 ldr r2, [pc, #176] ; a000cbc8 <_Heap_Walk+0x5e0> <== NOT EXECUTED
a000cb14: e1a03005 mov r3, r5 <== NOT EXECUTED
a000cb18: 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;
a000cb1c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000cb20: eafffec4 b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
a000cb24: e1a0000a mov r0, sl <== NOT EXECUTED
a000cb28: e3a01001 mov r1, #1 <== NOT EXECUTED
a000cb2c: e59f2098 ldr r2, [pc, #152] ; a000cbcc <_Heap_Walk+0x5e4> <== NOT EXECUTED
a000cb30: e1a03005 mov r3, r5 <== NOT EXECUTED
a000cb34: 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;
a000cb38: e3a00000 mov r0, #0 <== NOT EXECUTED
a000cb3c: eafffebd b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
a000cb40: e1a0000a mov r0, sl <== NOT EXECUTED
a000cb44: e3a01001 mov r1, #1 <== NOT EXECUTED
a000cb48: e59f2080 ldr r2, [pc, #128] ; a000cbd0 <_Heap_Walk+0x5e8> <== NOT EXECUTED
a000cb4c: e1a03005 mov r3, r5 <== NOT EXECUTED
a000cb50: 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;
a000cb54: e3a00000 mov r0, #0 <== NOT EXECUTED
a000cb58: eafffeb6 b a000c638 <_Heap_Walk+0x50> <== NOT EXECUTED
a000c59c <_Heap_Walk_print>:
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
a000c59c: e92d000c push {r2, r3} <== NOT EXECUTED
a000c5a0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
va_list ap;
if ( error ) {
a000c5a4: e31100ff tst r1, #255 ; 0xff <== NOT EXECUTED
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
a000c5a8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000c5ac: e1a01000 mov r1, r0 <== NOT EXECUTED
va_list ap;
if ( error ) {
printk( "FAIL[%d]: ", source );
a000c5b0: 159f0028 ldrne r0, [pc, #40] ; a000c5e0 <_Heap_Walk_print+0x44><== NOT EXECUTED
} else {
printk( "PASS[%d]: ", source );
a000c5b4: 059f0028 ldreq r0, [pc, #40] ; a000c5e4 <_Heap_Walk_print+0x48><== NOT EXECUTED
a000c5b8: ebffed15 bl a0007a14 <printk> <== NOT EXECUTED
}
va_start( ap, fmt );
a000c5bc: e28d300c add r3, sp, #12 <== NOT EXECUTED
vprintk( fmt, ap );
a000c5c0: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
a000c5c4: e1a01003 mov r1, r3 <== NOT EXECUTED
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
a000c5c8: e58d3000 str r3, [sp] <== NOT EXECUTED
vprintk( fmt, ap );
a000c5cc: ebfff75f bl a000a350 <vprintk> <== NOT EXECUTED
va_end( ap );
}
a000c5d0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000c5d4: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
a000c5d8: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000c5dc: e12fff1e bx lr <== NOT EXECUTED
a000bbf0 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000bbf0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
a000bbf4: e24dd00c sub sp, sp, #12
a000bbf8: e1a04000 mov r4, r0
a000bbfc: e20160ff and r6, r1, #255 ; 0xff
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
a000bc00: e1a0000d mov r0, sp
a000bc04: e59f1040 ldr r1, [pc, #64] ; a000bc4c <_Internal_error_Occurred+0x5c>
a000bc08: e1a05002 mov r5, r2
Internal_errors_Source source,
bool is_internal,
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
a000bc0c: e58d2008 str r2, [sp, #8]
a000bc10: e58d4000 str r4, [sp]
a000bc14: e5cd6004 strb r6, [sp, #4]
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
a000bc18: eb0007e1 bl a000dba4 <_User_extensions_Iterate>
_User_extensions_Fatal( the_source, is_internal, the_error );
_Internal_errors_What_happened.the_source = the_source;
a000bc1c: e59f302c ldr r3, [pc, #44] ; a000bc50 <_Internal_error_Occurred+0x60><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
a000bc20: e3a02005 mov r2, #5 <== NOT EXECUTED
a000bc24: e5834000 str r4, [r3] <== NOT EXECUTED
_Internal_errors_What_happened.is_internal = is_internal;
a000bc28: e5c36004 strb r6, [r3, #4] <== NOT EXECUTED
_Internal_errors_What_happened.the_error = the_error;
a000bc2c: e5835008 str r5, [r3, #8] <== NOT EXECUTED
a000bc30: e59f301c ldr r3, [pc, #28] ; a000bc54 <_Internal_error_Occurred+0x64><== NOT EXECUTED
a000bc34: e5832000 str r2, [r3] <== NOT EXECUTED
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000bc38: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a000bc3c: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
a000bc40: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
a000bc44: e1a00005 mov r0, r5 <== NOT EXECUTED
a000bc48: eafffffe b a000bc48 <_Internal_error_Occurred+0x58> <== NOT EXECUTED
a000bd0c <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
a000bd0c: 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 )
a000bd10: e5904034 ldr r4, [r0, #52] ; 0x34
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
a000bd14: e24dd014 sub sp, sp, #20
a000bd18: 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 )
a000bd1c: 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 );
a000bd20: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
a000bd24: e1d081b0 ldrh r8, [r0, #16]
a000bd28: 0a0000a0 beq a000bfb0 <_Objects_Extend_information+0x2a4>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
a000bd2c: e1d0a1b4 ldrh sl, [r0, #20]
a000bd30: e1a00008 mov r0, r8
a000bd34: e1a0100a mov r1, sl
a000bd38: eb003ec6 bl a001b858 <__aeabi_uidiv>
a000bd3c: e1a0b800 lsl fp, r0, #16
for ( ; block < block_count; block++ ) {
a000bd40: e1b0b82b lsrs fp, fp, #16
a000bd44: 0a0000a1 beq a000bfd0 <_Objects_Extend_information+0x2c4>
if ( information->object_blocks[ block ] == NULL ) {
a000bd48: e5949000 ldr r9, [r4]
a000bd4c: e1a0200a mov r2, sl
a000bd50: e3590000 cmp r9, #0
a000bd54: 11a03004 movne r3, r4
/*
* 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 );
a000bd58: 11a06007 movne r6, r7
index_base = minimum_index;
block = 0;
a000bd5c: 13a04000 movne 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 );
a000bd60: 01a06007 moveq r6, r7
index_base = minimum_index;
block = 0;
a000bd64: 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 ) {
a000bd68: 1a000003 bne a000bd7c <_Objects_Extend_information+0x70>
a000bd6c: ea000007 b a000bd90 <_Objects_Extend_information+0x84> <== NOT EXECUTED
a000bd70: e5b39004 ldr r9, [r3, #4]!
a000bd74: e3590000 cmp r9, #0
a000bd78: 0a000004 beq a000bd90 <_Objects_Extend_information+0x84>
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
a000bd7c: e2844001 add r4, r4, #1
a000bd80: e15b0004 cmp fp, r4
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
break;
} else
index_base += information->allocation_size;
a000bd84: e086600a add r6, r6, sl
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
a000bd88: 8afffff8 bhi a000bd70 <_Objects_Extend_information+0x64>
/*
* 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;
a000bd8c: e3a09001 mov r9, #1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
a000bd90: e0888002 add r8, r8, r2
/*
* 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 ) {
a000bd94: e3580801 cmp r8, #65536 ; 0x10000
a000bd98: 2a000063 bcs a000bf2c <_Objects_Extend_information+0x220>
/*
* 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 ) {
a000bd9c: e5d53012 ldrb r3, [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;
a000bda0: e5950018 ldr r0, [r5, #24]
if ( information->auto_extend ) {
a000bda4: e3530000 cmp r3, #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;
a000bda8: e0000092 mul r0, r2, r0
if ( information->auto_extend ) {
a000bdac: 1a000060 bne a000bf34 <_Objects_Extend_information+0x228>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
a000bdb0: eb0008d4 bl a000e108 <_Workspace_Allocate_or_fatal_error>
a000bdb4: e58d0004 str r0, [sp, #4]
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
a000bdb8: e3590000 cmp r9, #0
a000bdbc: 0a000039 beq a000bea8 <_Objects_Extend_information+0x19c>
*/
/*
* Up the block count and maximum
*/
block_count++;
a000bdc0: e28b9001 add r9, fp, #1
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
if ( information->auto_extend ) {
a000bdc4: e5d53012 ldrb r3, [r5, #18]
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
a000bdc8: e0890089 add r0, r9, r9, lsl #1
((maximum + minimum_index) * sizeof(Objects_Control *));
a000bdcc: e0880000 add r0, r8, r0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
a000bdd0: e0800007 add r0, r0, r7
((maximum + minimum_index) * sizeof(Objects_Control *));
if ( information->auto_extend ) {
a000bdd4: e3530000 cmp r3, #0
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
a000bdd8: e1a00100 lsl r0, r0, #2
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
if ( information->auto_extend ) {
a000bddc: 0a000059 beq a000bf48 <_Objects_Extend_information+0x23c>
object_blocks = _Workspace_Allocate( block_size );
a000bde0: eb0008be bl a000e0e0 <_Workspace_Allocate>
if ( !object_blocks ) {
a000bde4: e250a000 subs sl, r0, #0
a000bde8: 0a000075 beq a000bfc4 <_Objects_Extend_information+0x2b8>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
a000bdec: e1d521b0 ldrh r2, [r5, #16]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
a000bdf0: e08a3109 add r3, sl, r9, lsl #2
a000bdf4: e08a9189 add r9, sl, r9, lsl #3
a000bdf8: e1570002 cmp r7, r2
a000bdfc: 3a000058 bcc a000bf64 <_Objects_Extend_information+0x258>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a000be00: e3570000 cmp r7, #0
a000be04: 13a02000 movne r2, #0
a000be08: 11a01009 movne r1, r9
local_table[ index ] = NULL;
a000be0c: 11a00002 movne r0, r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a000be10: 0a000003 beq a000be24 <_Objects_Extend_information+0x118>
a000be14: e2822001 add r2, r2, #1
a000be18: e1570002 cmp r7, r2
local_table[ index ] = NULL;
a000be1c: e4810004 str r0, [r1], #4
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
a000be20: 8afffffb bhi a000be14 <_Objects_Extend_information+0x108>
a000be24: e1a0b10b lsl fp, fp, #2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
a000be28: e1d501b4 ldrh r0, [r5, #20]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
a000be2c: e3a0c000 mov ip, #0
a000be30: e78ac00b str ip, [sl, fp]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
a000be34: e0860000 add r0, r6, r0
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
a000be38: e1560000 cmp r6, r0
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
a000be3c: e783c00b str ip, [r3, fp]
for ( index=index_base ;
a000be40: 2a000005 bcs a000be5c <_Objects_Extend_information+0x150>
a000be44: e0891106 add r1, r9, r6, lsl #2
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
a000be48: e1a02006 mov r2, r6
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
a000be4c: e2822001 add r2, r2, #1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
a000be50: e1500002 cmp r0, r2
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
a000be54: e481c004 str ip, [r1], #4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
a000be58: 8afffffb bhi a000be4c <_Objects_Extend_information+0x140>
a000be5c: e10f2000 mrs r2, CPSR
a000be60: e3821080 orr r1, r2, #128 ; 0x80
a000be64: e129f001 msr CPSR_fc, r1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a000be68: e5951000 ldr r1, [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(
a000be6c: e1d500b4 ldrh r0, [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;
a000be70: e1a08808 lsl r8, r8, #16
a000be74: e1a01c01 lsl r1, r1, #24
a000be78: e3811801 orr r1, r1, #65536 ; 0x10000
a000be7c: e1a08828 lsr r8, r8, #16
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a000be80: e1811d80 orr r1, r1, r0, lsl #27
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a000be84: e1811008 orr r1, r1, r8
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
a000be88: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
a000be8c: e5853030 str r3, [r5, #48] ; 0x30
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
a000be90: e585a034 str sl, [r5, #52] ; 0x34
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
a000be94: e585901c str r9, [r5, #28]
information->maximum = (Objects_Maximum) maximum;
a000be98: e1c581b0 strh r8, [r5, #16]
information->maximum_id = _Objects_Build_id(
a000be9c: e585100c str r1, [r5, #12]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000bea0: e129f002 msr CPSR_fc, r2
information->maximum
);
_ISR_Enable( level );
_Workspace_Free( old_tables );
a000bea4: eb000893 bl a000e0f8 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a000bea8: e5953034 ldr r3, [r5, #52] ; 0x34
a000beac: e59d2004 ldr r2, [sp, #4]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
a000beb0: e28d0008 add r0, sp, #8
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a000beb4: e2857020 add r7, r5, #32
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a000beb8: e7832104 str r2, [r3, r4, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
a000bebc: e5951034 ldr r1, [r5, #52] ; 0x34
a000bec0: e1d521b4 ldrh r2, [r5, #20]
a000bec4: e5953018 ldr r3, [r5, #24]
a000bec8: e7911104 ldr r1, [r1, r4, lsl #2]
a000becc: ebfffceb bl a000b280 <_Chain_Initialize>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
a000bed0: e1a04104 lsl r4, r4, #2
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
a000bed4: ea000008 b a000befc <_Objects_Extend_information+0x1f0>
a000bed8: e5952000 ldr r2, [r5]
the_object->id = _Objects_Build_id(
a000bedc: e1d5c0b4 ldrh ip, [r5, #4]
a000bee0: e1a02c02 lsl r2, r2, #24
a000bee4: e3822801 orr r2, r2, #65536 ; 0x10000
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a000bee8: e1822d8c orr r2, r2, ip, lsl #27
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a000beec: e1822006 orr r2, r2, r6
a000bef0: e5832008 str r2, [r3, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a000bef4: ebfffcc9 bl a000b220 <_Chain_Append>
index++;
a000bef8: 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 ) {
a000befc: e28d0008 add r0, sp, #8
a000bf00: ebfffcd1 bl a000b24c <_Chain_Get>
a000bf04: e2503000 subs r3, r0, #0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
a000bf08: e1a01003 mov r1, r3
a000bf0c: e1a00007 mov r0, r7
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
a000bf10: 1afffff0 bne a000bed8 <_Objects_Extend_information+0x1cc>
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
a000bf14: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a000bf18: e1d531b4 ldrh r3, [r5, #20]
a000bf1c: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
a000bf20: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
a000bf24: e7813004 str r3, [r1, r4]
information->inactive =
a000bf28: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size);
}
a000bf2c: e28dd014 add sp, sp, #20
a000bf30: 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 );
a000bf34: eb000869 bl a000e0e0 <_Workspace_Allocate>
if ( !new_object_block )
a000bf38: e3500000 cmp r0, #0
a000bf3c: e58d0004 str r0, [sp, #4]
a000bf40: 1affff9c bne a000bdb8 <_Objects_Extend_information+0xac>
a000bf44: eafffff8 b a000bf2c <_Objects_Extend_information+0x220>
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
return;
}
} else {
object_blocks = _Workspace_Allocate_or_fatal_error( block_size );
a000bf48: eb00086e bl a000e108 <_Workspace_Allocate_or_fatal_error>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
a000bf4c: e1d521b0 ldrh r2, [r5, #16]
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
return;
}
} else {
object_blocks = _Workspace_Allocate_or_fatal_error( block_size );
a000bf50: e1a0a000 mov sl, r0
a000bf54: e08a3109 add r3, sl, r9, lsl #2
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
a000bf58: e1570002 cmp r7, r2
a000bf5c: e08a9189 add r9, sl, r9, lsl #3
a000bf60: 2affffa6 bcs a000be00 <_Objects_Extend_information+0xf4>
/*
* 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,
a000bf64: e1a0b10b lsl fp, fp, #2
a000bf68: e5951034 ldr r1, [r5, #52] ; 0x34
a000bf6c: e1a0200b mov r2, fp
a000bf70: e1a0000a mov r0, sl
a000bf74: e58d3000 str r3, [sp]
a000bf78: eb001c7f bl a001317c <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
a000bf7c: e59d3000 ldr r3, [sp]
a000bf80: e5951030 ldr r1, [r5, #48] ; 0x30
a000bf84: e1a0200b mov r2, fp
a000bf88: e1a00003 mov r0, r3
a000bf8c: eb001c7a bl a001317c <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
a000bf90: 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,
a000bf94: e1a00009 mov r0, r9
a000bf98: e595101c ldr r1, [r5, #28]
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
a000bf9c: 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,
a000bfa0: e1a02102 lsl r2, r2, #2
a000bfa4: eb001c74 bl a001317c <memcpy>
a000bfa8: e59d3000 ldr r3, [sp]
a000bfac: eaffff9d b a000be28 <_Objects_Extend_information+0x11c>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
a000bfb0: e1d021b4 ldrh r2, [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 );
a000bfb4: 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;
a000bfb8: e3a09001 mov r9, #1
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
a000bfbc: e1a0b004 mov fp, r4
a000bfc0: eaffff72 b a000bd90 <_Objects_Extend_information+0x84>
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
if ( information->auto_extend ) {
object_blocks = _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
a000bfc4: e59d0004 ldr r0, [sp, #4]
a000bfc8: eb00084a bl a000e0f8 <_Workspace_Free>
return;
a000bfcc: eaffffd6 b a000bf2c <_Objects_Extend_information+0x220>
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
a000bfd0: e1a0200a mov r2, sl <== 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 );
a000bfd4: 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;
a000bfd8: e3a09001 mov r9, #1 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
a000bfdc: e1a0400b mov r4, fp <== NOT EXECUTED
a000bfe0: eaffff6a b a000bd90 <_Objects_Extend_information+0x84> <== NOT EXECUTED
a000c070 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
a000c070: e1a01801 lsl r1, r1, #16
a000c074: e92d4030 push {r4, r5, lr}
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
a000c078: e1b04821 lsrs r4, r1, #16
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
a000c07c: e1a05000 mov r5, r0
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
a000c080: 0a000011 beq a000c0cc <_Objects_Get_information+0x5c>
/*
* 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 );
a000c084: eb0012c9 bl a0010bb0 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
a000c088: e3500000 cmp r0, #0
a000c08c: 0a00000d beq a000c0c8 <_Objects_Get_information+0x58>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
a000c090: e1500004 cmp r0, r4
a000c094: 3a00000a bcc a000c0c4 <_Objects_Get_information+0x54>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
a000c098: e59f3034 ldr r3, [pc, #52] ; a000c0d4 <_Objects_Get_information+0x64>
a000c09c: e7930105 ldr r0, [r3, r5, lsl #2]
a000c0a0: e3500000 cmp r0, #0
a000c0a4: 0a000007 beq a000c0c8 <_Objects_Get_information+0x58>
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
a000c0a8: e7900104 ldr r0, [r0, r4, lsl #2]
if ( !info )
a000c0ac: e3500000 cmp r0, #0
a000c0b0: 0a000004 beq a000c0c8 <_Objects_Get_information+0x58>
* 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 )
a000c0b4: e1d031b0 ldrh r3, [r0, #16]
return NULL;
a000c0b8: e3530000 cmp r3, #0
a000c0bc: 03a00000 moveq r0, #0
a000c0c0: e8bd8030 pop {r4, r5, pc}
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 )
return NULL;
a000c0c4: e3a00000 mov r0, #0 <== NOT EXECUTED
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
a000c0c8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
a000c0cc: e1a00004 mov r0, r4 <== NOT EXECUTED
a000c0d0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000c0d8 <_Objects_Get_isr_disable>:
{
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
a000c0d8: e590c008 ldr ip, [r0, #8]
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
a000c0dc: e52d4004 push {r4} ; (str r4, [sp, #-4]!)
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
a000c0e0: e26cc001 rsb ip, ip, #1
a000c0e4: e08cc001 add ip, ip, r1
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000c0e8: e10f4000 mrs r4, CPSR
a000c0ec: e3841080 orr r1, r4, #128 ; 0x80
a000c0f0: e129f001 msr CPSR_fc, r1
_ISR_Disable( level );
if ( information->maximum >= index ) {
a000c0f4: e1d011b0 ldrh r1, [r0, #16]
a000c0f8: e15c0001 cmp ip, r1
a000c0fc: 8a000008 bhi a000c124 <_Objects_Get_isr_disable+0x4c>
if ( (the_object = information->local_table[ index ]) != NULL ) {
a000c100: e590101c ldr r1, [r0, #28]
a000c104: e791010c ldr r0, [r1, ip, lsl #2]
a000c108: e3500000 cmp r0, #0
*location = OBJECTS_LOCAL;
a000c10c: 13a01000 movne r1, #0
a000c110: 15821000 strne r1, [r2]
*level_p = level;
a000c114: 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 ) {
a000c118: 0a000006 beq a000c138 <_Objects_Get_isr_disable+0x60>
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
a000c11c: e8bd0010 pop {r4}
a000c120: e12fff1e bx lr
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000c124: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
_ISR_Enable( level );
*location = OBJECTS_ERROR;
return NULL;
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
a000c128: e3a03001 mov r3, #1 <== NOT EXECUTED
a000c12c: 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;
a000c130: e3a00000 mov r0, #0 <== NOT EXECUTED
a000c134: eafffff8 b a000c11c <_Objects_Get_isr_disable+0x44> <== NOT EXECUTED
a000c138: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
*location = OBJECTS_LOCAL;
*level_p = level;
return the_object;
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
a000c13c: e3a03001 mov r3, #1 <== NOT EXECUTED
a000c140: e5823000 str r3, [r2] <== NOT EXECUTED
return NULL;
a000c144: eafffff4 b a000c11c <_Objects_Get_isr_disable+0x44> <== NOT EXECUTED
a000c48c <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
a000c48c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000c490: e1a05000 mov r5, r0
a000c494: e1a06001 mov r6, r1
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a000c498: e1a00002 mov r0, r2
a000c49c: e1d513ba ldrh r1, [r5, #58] ; 0x3a
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
a000c4a0: e1a08002 mov r8, r2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a000c4a4: eb0020e8 bl a001484c <strnlen>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
a000c4a8: e5d53038 ldrb r3, [r5, #56] ; 0x38
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a000c4ac: e1a04000 mov r4, r0
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
a000c4b0: e3530000 cmp r3, #0
a000c4b4: 1a000017 bne a000c518 <_Objects_Set_name+0x8c>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
a000c4b8: e5d82000 ldrb r2, [r8] <== NOT EXECUTED
a000c4bc: e3500001 cmp r0, #1 <== NOT EXECUTED
a000c4c0: e1a02c02 lsl r2, r2, #24 <== NOT EXECUTED
a000c4c4: 9a00000c bls a000c4fc <_Objects_Set_name+0x70> <== NOT EXECUTED
a000c4c8: e5d83001 ldrb r3, [r8, #1] <== NOT EXECUTED
a000c4cc: e3500002 cmp r0, #2 <== NOT EXECUTED
a000c4d0: e1822803 orr r2, r2, r3, lsl #16 <== NOT EXECUTED
a000c4d4: 0a000009 beq a000c500 <_Objects_Set_name+0x74> <== NOT EXECUTED
a000c4d8: e5d83002 ldrb r3, [r8, #2] <== NOT EXECUTED
a000c4dc: e3500003 cmp r0, #3 <== NOT EXECUTED
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
a000c4e0: 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(
a000c4e4: e1822403 orr r2, r2, r3, lsl #8 <== NOT EXECUTED
a000c4e8: 15d83003 ldrbne r3, [r8, #3] <== NOT EXECUTED
a000c4ec: 03a03020 moveq r3, #32 <== NOT EXECUTED
a000c4f0: e1823003 orr r3, r2, r3 <== NOT EXECUTED
a000c4f4: e586300c str r3, [r6, #12] <== NOT EXECUTED
a000c4f8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a000c4fc: e3822602 orr r2, r2, #2097152 ; 0x200000 <== NOT EXECUTED
a000c500: e3822a02 orr r2, r2, #8192 ; 0x2000 <== NOT EXECUTED
a000c504: e3a03020 mov r3, #32 <== NOT EXECUTED
a000c508: e1823003 orr r3, r2, r3 <== NOT EXECUTED
a000c50c: e586300c str r3, [r6, #12] <== NOT EXECUTED
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
a000c510: e3a00001 mov r0, #1 <== NOT EXECUTED
a000c514: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
a000c518: e2800001 add r0, r0, #1
a000c51c: eb000775 bl a000e2f8 <_Workspace_Allocate>
if ( !d )
a000c520: e2505000 subs r5, r0, #0
a000c524: 0a00000b beq a000c558 <_Objects_Set_name+0xcc>
return false;
_Workspace_Free( (void *)the_object->name.name_p );
a000c528: e596000c ldr r0, [r6, #12]
the_object->name.name_p = NULL;
a000c52c: e3a07000 mov r7, #0
d = _Workspace_Allocate( length + 1 );
if ( !d )
return false;
_Workspace_Free( (void *)the_object->name.name_p );
a000c530: eb000776 bl a000e310 <_Workspace_Free>
the_object->name.name_p = NULL;
a000c534: e586700c str r7, [r6, #12]
strncpy( d, name, length );
a000c538: e1a00005 mov r0, r5
a000c53c: e1a01008 mov r1, r8
a000c540: e1a02004 mov r2, r4
a000c544: eb00208b bl a0014778 <strncpy>
d[length] = '\0';
a000c548: e7c57004 strb r7, [r5, r4]
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
a000c54c: e3a00001 mov r0, #1
_Workspace_Free( (void *)the_object->name.name_p );
the_object->name.name_p = NULL;
strncpy( d, name, length );
d[length] = '\0';
the_object->name.name_p = d;
a000c550: e586500c str r5, [r6, #12]
a000c554: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
return false;
a000c558: e1a00005 mov r0, r5
);
}
return true;
}
a000c55c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000c348 <_Objects_Shrink_information>:
#include <rtems/score/isr.h>
void _Objects_Shrink_information(
Objects_Information *information
)
{
a000c348: 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 );
a000c34c: e1d040b8 ldrh r4, [r0, #8]
block_count = (information->maximum - index_base) /
a000c350: e1d051b4 ldrh r5, [r0, #20]
#include <rtems/score/isr.h>
void _Objects_Shrink_information(
Objects_Information *information
)
{
a000c354: 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) /
a000c358: e1d001b0 ldrh r0, [r0, #16]
a000c35c: e1a01005 mov r1, r5
a000c360: e0640000 rsb r0, r4, r0
a000c364: eb003d3b bl a001b858 <__aeabi_uidiv>
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
a000c368: e3500000 cmp r0, #0
a000c36c: 0a00000d beq a000c3a8 <_Objects_Shrink_information+0x60>
if ( information->inactive_per_block[ block ] ==
a000c370: e5962030 ldr r2, [r6, #48] ; 0x30
a000c374: e5923000 ldr r3, [r2]
a000c378: 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++ ) {
a000c37c: 13a03000 movne r3, #0
if ( information->inactive_per_block[ block ] ==
a000c380: 1a000005 bne a000c39c <_Objects_Shrink_information+0x54>
a000c384: ea000008 b a000c3ac <_Objects_Shrink_information+0x64> <== NOT EXECUTED
a000c388: e5b21004 ldr r1, [r2, #4]!
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
a000c38c: e0844005 add r4, r4, r5
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 ] ==
a000c390: e1a07103 lsl r7, r3, #2
a000c394: e1550001 cmp r5, r1
a000c398: 0a000004 beq a000c3b0 <_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++ ) {
a000c39c: e2833001 add r3, r3, #1
a000c3a0: e1530000 cmp r3, r0
a000c3a4: 1afffff7 bne a000c388 <_Objects_Shrink_information+0x40>
a000c3a8: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( information->inactive_per_block[ block ] ==
a000c3ac: e3a07000 mov r7, #0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
a000c3b0: e5960020 ldr r0, [r6, #32]
a000c3b4: ea000002 b a000c3c4 <_Objects_Shrink_information+0x7c>
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
a000c3b8: e3550000 cmp r5, #0
a000c3bc: 0a00000b beq a000c3f0 <_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;
a000c3c0: 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 );
a000c3c4: 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;
a000c3c8: e5905000 ldr r5, [r0]
if ((index >= index_base) &&
a000c3cc: e1530004 cmp r3, r4
a000c3d0: 3afffff8 bcc a000c3b8 <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
a000c3d4: e1d621b4 ldrh r2, [r6, #20]
a000c3d8: 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) &&
a000c3dc: e1530002 cmp r3, r2
a000c3e0: 2afffff4 bcs a000c3b8 <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
a000c3e4: eb00101a bl a0010454 <_Chain_Extract>
}
}
while ( the_object );
a000c3e8: e3550000 cmp r5, #0
a000c3ec: 1afffff3 bne a000c3c0 <_Objects_Shrink_information+0x78>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
a000c3f0: e5963034 ldr r3, [r6, #52] ; 0x34
a000c3f4: e7930007 ldr r0, [r3, r7]
a000c3f8: eb00073e bl a000e0f8 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
a000c3fc: e5962034 ldr r2, [r6, #52] ; 0x34
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
a000c400: e1d612bc ldrh r1, [r6, #44] ; 0x2c
a000c404: 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;
a000c408: e7825007 str r5, [r2, r7]
information->inactive_per_block[ block ] = 0;
a000c40c: e5962030 ldr r2, [r6, #48] ; 0x30
information->inactive -= information->allocation_size;
a000c410: e0633001 rsb r3, r3, r1
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
a000c414: e7825007 str r5, [r2, r7]
information->inactive -= information->allocation_size;
a000c418: e1c632bc strh r3, [r6, #44] ; 0x2c
return;
a000c41c: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000b41c <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
a000b41c: e92d4030 push {r4, r5, lr}
int status;
if ( !cond ) {
a000b420: e2504000 subs r4, r0, #0
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
a000b424: e1a05001 mov r5, r1
int status;
if ( !cond ) {
a000b428: 0a00000f beq a000b46c <_POSIX_Condition_variables_Get+0x50>
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *cond == PTHREAD_COND_INITIALIZER ) {
a000b42c: e5941000 ldr r1, [r4]
a000b430: e3710001 cmn r1, #1
a000b434: 0a000003 beq a000b448 <_POSIX_Condition_variables_Get+0x2c>
}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)_Objects_Get(
a000b438: e59f003c ldr r0, [pc, #60] ; a000b47c <_POSIX_Condition_variables_Get+0x60>
a000b43c: e1a02005 mov r2, r5
&_POSIX_Condition_variables_Information,
(Objects_Id) *cond,
location
);
}
a000b440: e8bd4030 pop {r4, r5, lr}
}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)_Objects_Get(
a000b444: ea000b7c b a000e23c <_Objects_Get>
if ( *cond == PTHREAD_COND_INITIALIZER ) {
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( cond, 0 );
a000b448: e3a01000 mov r1, #0
a000b44c: eb00000b bl a000b480 <pthread_cond_init>
if ( status ) {
a000b450: e3500000 cmp r0, #0
a000b454: 05941000 ldreq r1, [r4]
a000b458: 0afffff6 beq a000b438 <_POSIX_Condition_variables_Get+0x1c>
*location = OBJECTS_ERROR;
a000b45c: e3a03001 mov r3, #1
a000b460: e5853000 str r3, [r5]
return (POSIX_Condition_variables_Control *) 0;
a000b464: e3a00000 mov r0, #0
a000b468: e8bd8030 pop {r4, r5, pc}
)
{
int status;
if ( !cond ) {
*location = OBJECTS_ERROR;
a000b46c: e3a03001 mov r3, #1 <== NOT EXECUTED
a000b470: e5813000 str r3, [r1] <== NOT EXECUTED
return (POSIX_Condition_variables_Control *) 0;
a000b474: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b478: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000b60c <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
a000b60c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a000b610: e1a04001 mov r4, r1
a000b614: e24dd004 sub sp, sp, #4
a000b618: e1a05000 mov r5, r0
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
a000b61c: e1a0100d mov r1, sp
a000b620: e1a00004 mov r0, r4
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
a000b624: e1a08002 mov r8, r2
a000b628: 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 ) ) {
a000b62c: eb00005a bl a000b79c <_POSIX_Mutex_Get>
a000b630: e3500000 cmp r0, #0
a000b634: 0a000013 beq a000b688 <_POSIX_Condition_variables_Wait_support+0x7c>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000b638: e59f30d8 ldr r3, [pc, #216] ; a000b718 <_POSIX_Condition_variables_Wait_support+0x10c>
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
a000b63c: e1a00005 mov r0, r5
a000b640: e1a0100d mov r1, sp
a000b644: e5932000 ldr r2, [r3]
--level;
a000b648: e2422001 sub r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000b64c: e5832000 str r2, [r3]
a000b650: ebffff71 bl a000b41c <_POSIX_Condition_variables_Get>
switch ( location ) {
a000b654: e59d3000 ldr r3, [sp]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
a000b658: e1a0a000 mov sl, r0
switch ( location ) {
a000b65c: e3530000 cmp r3, #0
a000b660: 1a000008 bne a000b688 <_POSIX_Condition_variables_Wait_support+0x7c>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
a000b664: e5903014 ldr r3, [r0, #20]
a000b668: e3530000 cmp r3, #0
a000b66c: 0a000009 beq a000b698 <_POSIX_Condition_variables_Wait_support+0x8c>
a000b670: e5942000 ldr r2, [r4] <== NOT EXECUTED
a000b674: e1530002 cmp r3, r2 <== NOT EXECUTED
a000b678: 0a000006 beq a000b698 <_POSIX_Condition_variables_Wait_support+0x8c><== NOT EXECUTED
_Thread_Enable_dispatch();
a000b67c: eb000e9c bl a000f0f4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return EINVAL;
a000b680: e3a05016 mov r5, #22 <== NOT EXECUTED
a000b684: ea000000 b a000b68c <_POSIX_Condition_variables_Wait_support+0x80><== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000b688: e3a05016 mov r5, #22 <== NOT EXECUTED
}
a000b68c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b690: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000b694: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
_Thread_Enable_dispatch();
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
a000b698: e1a00004 mov r0, r4
a000b69c: eb0000e6 bl a000ba3c <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
a000b6a0: e3570000 cmp r7, #0
a000b6a4: 0a000006 beq a000b6c4 <_POSIX_Condition_variables_Wait_support+0xb8>
status = _Thread_Executing->Wait.return_code;
if ( status == EINTR )
status = 0;
} else {
_Thread_Enable_dispatch();
a000b6a8: eb000e91 bl a000f0f4 <_Thread_Enable_dispatch> <== NOT EXECUTED
status = ETIMEDOUT;
a000b6ac: e3a05074 mov r5, #116 ; 0x74 <== NOT EXECUTED
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
a000b6b0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b6b4: eb0000bf bl a000b9b8 <pthread_mutex_lock> <== NOT EXECUTED
if ( mutex_status )
return EINVAL;
a000b6b8: e3500000 cmp r0, #0 <== NOT EXECUTED
a000b6bc: 13a05016 movne r5, #22 <== NOT EXECUTED
a000b6c0: eafffff1 b a000b68c <_POSIX_Condition_variables_Wait_support+0x80><== NOT EXECUTED
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
a000b6c4: e59f6050 ldr r6, [pc, #80] ; a000b71c <_POSIX_Condition_variables_Wait_support+0x110>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
a000b6c8: 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;
a000b6cc: e28ac018 add ip, sl, #24
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
a000b6d0: e5963008 ldr r3, [r6, #8]
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
a000b6d4: 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;
a000b6d8: e3a02001 mov r2, #1
a000b6dc: e58a2048 str r2, [sl, #72] ; 0x48
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
a000b6e0: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
a000b6e4: e595e000 ldr lr, [r5]
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
a000b6e8: e1a0000c mov r0, ip
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;
a000b6ec: e583c044 str ip, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond;
a000b6f0: e583e020 str lr, [r3, #32]
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
a000b6f4: e1a01008 mov r1, r8
a000b6f8: e59f2020 ldr r2, [pc, #32] ; a000b720 <_POSIX_Condition_variables_Wait_support+0x114>
a000b6fc: eb000fb2 bl a000f5cc <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
a000b700: eb000e7b bl a000f0f4 <_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;
a000b704: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED
a000b708: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
if ( status == EINTR )
status = 0;
a000b70c: e3550004 cmp r5, #4 <== NOT EXECUTED
a000b710: 03a05000 moveq r5, #0 <== NOT EXECUTED
a000b714: eaffffe5 b a000b6b0 <_POSIX_Condition_variables_Wait_support+0xa4><== NOT EXECUTED
a00120f4 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
a00120f4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
a00120f8: e5908008 ldr r8, [r0, #8]
a00120fc: e59f5088 ldr r5, [pc, #136] ; a001218c <_POSIX_Keys_Run_destructors+0x98>
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
if ( value != NULL ) {
key->Values [ thread_api ][ thread_index ] = NULL;
a0012100: 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 ];
a0012104: e1a07808 lsl r7, r8, #16
a0012108: e1a08c28 lsr r8, r8, #24
a001210c: e2088007 and r8, r8, #7
a0012110: 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;
a0012114: e1d541b0 ldrh r4, [r5, #16]
done = true;
for ( index = 1 ; index <= max ; ++index ) {
a0012118: e3540000 cmp r4, #0
a001211c: 1a000000 bne a0012124 <_POSIX_Keys_Run_destructors+0x30>
a0012120: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a0012124: e3a06001 mov r6, #1
a0012128: e1a02006 mov r2, r6
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
a001212c: e595301c ldr r3, [r5, #28]
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
a0012130: e2881005 add r1, r8, #5
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
a0012134: e7933106 ldr r3, [r3, r6, lsl #2]
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
a0012138: e3530000 cmp r3, #0
a001213c: 0a00000a beq a001216c <_POSIX_Keys_Run_destructors+0x78>
a0012140: e5930010 ldr r0, [r3, #16]
a0012144: e3500000 cmp r0, #0
a0012148: 0a000007 beq a001216c <_POSIX_Keys_Run_destructors+0x78>
void *value = key->Values [ thread_api ][ thread_index ];
a001214c: e7931101 ldr r1, [r3, r1, lsl #2] <== NOT EXECUTED
a0012150: e7910007 ldr r0, [r1, r7] <== NOT EXECUTED
if ( value != NULL ) {
a0012154: e3500000 cmp r0, #0 <== NOT EXECUTED
a0012158: 0a000003 beq a001216c <_POSIX_Keys_Run_destructors+0x78> <== NOT EXECUTED
key->Values [ thread_api ][ thread_index ] = NULL;
a001215c: e781a007 str sl, [r1, r7] <== NOT EXECUTED
(*key->destructor)( value );
a0012160: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
a0012164: e12fff33 blx r3 <== NOT EXECUTED
done = false;
a0012168: e3a02000 mov r2, #0 <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
a001216c: e2866001 add r6, r6, #1
a0012170: e1a06806 lsl r6, r6, #16
a0012174: e1a06826 lsr r6, r6, #16
a0012178: e1540006 cmp r4, r6
a001217c: 2affffea bcs a001212c <_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 ) {
a0012180: e3520000 cmp r2, #0
a0012184: 0affffe2 beq a0012114 <_POSIX_Keys_Run_destructors+0x20>
a0012188: eaffffe4 b a0012120 <_POSIX_Keys_Run_destructors+0x2c>
a00115ac <_POSIX_Message_queue_Create_support>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a00115ac: e59fc148 ldr ip, [pc, #328] ; a00116fc <_POSIX_Message_queue_Create_support+0x150>
size_t name_len,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
a00115b0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
a00115b4: e1a07001 mov r7, r1
a00115b8: e59c1000 ldr r1, [ip]
a00115bc: e1a06000 mov r6, r0
a00115c0: e1a09002 mov r9, r2
++level;
a00115c4: e2811001 add r1, r1, #1
_Thread_Dispatch_disable_level = level;
a00115c8: e58c1000 str r1, [ip]
* 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 ) {
a00115cc: e3530000 cmp r3, #0
a00115d0: 0a000026 beq a0011670 <_POSIX_Message_queue_Create_support+0xc4>
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
a00115d4: e593a004 ldr sl, [r3, #4]
a00115d8: e35a0000 cmp sl, #0
a00115dc: da000031 ble a00116a8 <_POSIX_Message_queue_Create_support+0xfc>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
a00115e0: e5938008 ldr r8, [r3, #8]
a00115e4: e3580000 cmp r8, #0
a00115e8: da00002e ble a00116a8 <_POSIX_Message_queue_Create_support+0xfc>
*/
RTEMS_INLINE_ROUTINE
POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
{
return (POSIX_Message_queue_Control *)
a00115ec: e59f510c ldr r5, [pc, #268] ; a0011700 <_POSIX_Message_queue_Create_support+0x154>
a00115f0: e1a00005 mov r0, r5
a00115f4: ebfff083 bl a000d808 <_Objects_Allocate>
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
a00115f8: e2504000 subs r4, r0, #0
a00115fc: 0a000038 beq a00116e4 <_POSIX_Message_queue_Create_support+0x138>
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_String_duplicate( name_arg, name_len );
a0011600: e1a01007 mov r1, r7
a0011604: e1a00006 mov r0, r6
a0011608: eb00065a bl a0012f78 <_Workspace_String_duplicate>
if ( !name ) {
a001160c: e2507000 subs r7, r0, #0
a0011610: 0a00002a beq a00116c0 <_POSIX_Message_queue_Create_support+0x114>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
the_mq->process_shared = pshared;
the_mq->named = true;
a0011614: e3a03001 mov r3, #1
*
* 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;
a0011618: e3a06000 mov r6, #0
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
the_mq->process_shared = pshared;
the_mq->named = true;
a001161c: e5c43014 strb r3, [r4, #20]
the_mq->open_count = 1;
a0011620: e5843018 str r3, [r4, #24]
the_mq->linked = true;
a0011624: e5c43015 strb r3, [r4, #21]
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
the_mq->process_shared = pshared;
a0011628: e5849010 str r9, [r4, #16]
*
* 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;
a001162c: e584605c str r6, [r4, #92] ; 0x5c
if ( !_CORE_message_queue_Initialize(
a0011630: e284001c add r0, r4, #28
a0011634: e284105c add r1, r4, #92 ; 0x5c
a0011638: e1a0200a mov r2, sl
a001163c: e1a03008 mov r3, r8
a0011640: eb00035a bl a00123b0 <_CORE_message_queue_Initialize>
a0011644: e1500006 cmp r0, r6
a0011648: 0a00000b beq a001167c <_POSIX_Message_queue_Create_support+0xd0>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a001164c: e595301c ldr r3, [r5, #28]
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
a0011650: e1d420b8 ldrh r2, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0011654: e7834102 str r4, [r3, r2, lsl #2]
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
a0011658: e59d3020 ldr r3, [sp, #32]
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
a001165c: e584700c str r7, [r4, #12]
a0011660: e5834000 str r4, [r3]
_Thread_Enable_dispatch();
a0011664: ebfff584 bl a000ec7c <_Thread_Enable_dispatch>
return 0;
a0011668: e1a00006 mov r0, r6
}
a001166c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, 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;
a0011670: 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;
a0011674: e3a0a00a mov sl, #10 <== NOT EXECUTED
a0011678: eaffffdb b a00115ec <_POSIX_Message_queue_Create_support+0x40><== 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 );
a001167c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0011680: e1a00005 mov r0, r5 <== NOT EXECUTED
a0011684: ebfff13d bl a000db80 <_Objects_Free> <== NOT EXECUTED
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
a0011688: e1a00007 mov r0, r7 <== NOT EXECUTED
a001168c: ebfff9c0 bl a000fd94 <_Workspace_Free> <== NOT EXECUTED
_Thread_Enable_dispatch();
a0011690: ebfff579 bl a000ec7c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
a0011694: eb000c18 bl a00146fc <__errno> <== NOT EXECUTED
a0011698: e3a0301c mov r3, #28 <== NOT EXECUTED
a001169c: e5803000 str r3, [r0] <== NOT EXECUTED
a00116a0: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00116a4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
_Thread_Enable_dispatch();
a00116a8: ebfff573 bl a000ec7c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
a00116ac: eb000c12 bl a00146fc <__errno>
a00116b0: e3a03016 mov r3, #22
a00116b4: e5803000 str r3, [r0]
a00116b8: e3e00000 mvn r0, #0
a00116bc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a00116c0: e1a00005 mov r0, r5
a00116c4: e1a01004 mov r1, r4
a00116c8: ebfff12c bl a000db80 <_Objects_Free>
* dynamically constructed.
*/
name = _Workspace_String_duplicate( name_arg, name_len );
if ( !name ) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
a00116cc: ebfff56a bl a000ec7c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOMEM );
a00116d0: eb000c09 bl a00146fc <__errno>
a00116d4: e3a0300c mov r3, #12
a00116d8: e5803000 str r3, [r0]
a00116dc: e3e00000 mvn r0, #0
a00116e0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
a00116e4: ebfff564 bl a000ec7c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
a00116e8: eb000c03 bl a00146fc <__errno>
a00116ec: e3a03017 mov r3, #23
a00116f0: e5803000 str r3, [r0]
a00116f4: e3e00000 mvn r0, #0
a00116f8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a000fb0c <_POSIX_Message_queue_Notify_handler>:
*/
static void _POSIX_Message_queue_Notify_handler(
void *user_data
)
{
a000fb0c: e92d4010 push {r4, lr} <== NOT EXECUTED
a000fb10: e1a04000 mov r4, r0 <== NOT EXECUTED
POSIX_Message_queue_Control *the_mq;
the_mq = user_data;
kill( getpid(), the_mq->notification.sigev_signo );
a000fb14: eb0019b4 bl a00161ec <getpid> <== NOT EXECUTED
a000fb18: e5941094 ldr r1, [r4, #148] ; 0x94 <== NOT EXECUTED
a000fb1c: eb001bfc bl a0016b14 <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;
a000fb20: e3a03000 mov r3, #0 <== NOT EXECUTED
a000fb24: e584307c str r3, [r4, #124] ; 0x7c <== NOT EXECUTED
the_message_queue->notify_argument = the_argument;
a000fb28: e5843080 str r3, [r4, #128] ; 0x80 <== NOT EXECUTED
_CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
}
a000fb2c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000fdb4 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
a000fdb4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000fdb8: e1a04000 mov r4, r0
a000fdbc: e24dd010 sub sp, sp, #16
a000fdc0: e1a07001 mov r7, r1
a000fdc4: e1a06002 mov r6, r2
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(
a000fdc8: e59f011c ldr r0, [pc, #284] ; a000feec <_POSIX_Message_queue_Receive_support+0x138>
a000fdcc: e1a01004 mov r1, r4
a000fdd0: e28d2008 add r2, sp, #8
a000fdd4: e1a05003 mov r5, r3
a000fdd8: e5dd8028 ldrb r8, [sp, #40] ; 0x28
a000fddc: eb000cfd bl a00131d8 <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
a000fde0: e59d3008 ldr r3, [sp, #8]
a000fde4: e3530000 cmp r3, #0
a000fde8: 0a000006 beq a000fe08 <_POSIX_Message_queue_Receive_support+0x54>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
a000fdec: eb0028bc bl a001a0e4 <__errno> <== NOT EXECUTED
a000fdf0: e3a03009 mov r3, #9 <== NOT EXECUTED
a000fdf4: e5803000 str r3, [r0] <== NOT EXECUTED
a000fdf8: e3e03000 mvn r3, #0 <== NOT EXECUTED
}
a000fdfc: e1a00003 mov r0, r3
a000fe00: e28dd010 add sp, sp, #16
a000fe04: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
a000fe08: e5903014 ldr r3, [r0, #20]
a000fe0c: e2032003 and r2, r3, #3
a000fe10: e3520001 cmp r2, #1
a000fe14: 0a00002e beq a000fed4 <_POSIX_Message_queue_Receive_support+0x120>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
a000fe18: e5900010 ldr r0, [r0, #16]
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
a000fe1c: e5902068 ldr r2, [r0, #104] ; 0x68
a000fe20: e1520006 cmp r2, r6
a000fe24: 8a000024 bhi a000febc <_POSIX_Message_queue_Receive_support+0x108>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
a000fe28: e3e02000 mvn r2, #0
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
a000fe2c: e3580000 cmp r8, #0
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
a000fe30: e58d200c str r2, [sp, #12]
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
a000fe34: 1a00001c bne a000feac <_POSIX_Message_queue_Receive_support+0xf8>
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
a000fe38: e59dc02c ldr ip, [sp, #44] ; 0x2c
a000fe3c: e1a01004 mov r1, r4
);
_Thread_Enable_dispatch();
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
a000fe40: e59f40a8 ldr r4, [pc, #168] ; a000fef0 <_POSIX_Message_queue_Receive_support+0x13c>
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
a000fe44: e28d300c add r3, sp, #12
a000fe48: e280001c add r0, r0, #28
a000fe4c: e1a02007 mov r2, r7
a000fe50: e58dc004 str ip, [sp, #4]
a000fe54: e58d8000 str r8, [sp]
a000fe58: eb00089c bl a00120d0 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
a000fe5c: eb0010ae bl a001411c <_Thread_Enable_dispatch>
if (msg_prio) {
a000fe60: e3550000 cmp r5, #0
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
a000fe64: e5943008 ldr r3, [r4, #8]
do_wait,
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
a000fe68: 0a000003 beq a000fe7c <_POSIX_Message_queue_Receive_support+0xc8>
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return (unsigned int) ((priority >= 0) ? priority : -priority);
a000fe6c: e5932024 ldr r2, [r3, #36] ; 0x24
a000fe70: e3520000 cmp r2, #0
a000fe74: b2622000 rsblt r2, r2, #0
*msg_prio = _POSIX_Message_queue_Priority_from_core(
a000fe78: e5852000 str r2, [r5]
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
a000fe7c: e5933034 ldr r3, [r3, #52] ; 0x34
a000fe80: e3530000 cmp r3, #0
return length_out;
a000fe84: 059d300c ldreq r3, [sp, #12]
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
a000fe88: 0affffdb beq a000fdfc <_POSIX_Message_queue_Receive_support+0x48>
return length_out;
rtems_set_errno_and_return_minus_one(
a000fe8c: eb002894 bl a001a0e4 <__errno> <== NOT EXECUTED
a000fe90: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a000fe94: e1a05000 mov r5, r0 <== NOT EXECUTED
a000fe98: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
a000fe9c: eb0000bb bl a0010190 <_POSIX_Message_queue_Translate_core_message_queue_return_code><== NOT EXECUTED
a000fea0: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000fea4: e5850000 str r0, [r5] <== NOT EXECUTED
a000fea8: eaffffd3 b a000fdfc <_POSIX_Message_queue_Receive_support+0x48><== NOT EXECUTED
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
a000feac: e3130901 tst r3, #16384 ; 0x4000
a000feb0: 13a08000 movne r8, #0
a000feb4: 03a08001 moveq r8, #1
a000feb8: eaffffde b a000fe38 <_POSIX_Message_queue_Receive_support+0x84>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
a000febc: eb001096 bl a001411c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EMSGSIZE );
a000fec0: eb002887 bl a001a0e4 <__errno> <== NOT EXECUTED
a000fec4: e3a0307a mov r3, #122 ; 0x7a <== NOT EXECUTED
a000fec8: e5803000 str r3, [r0] <== NOT EXECUTED
a000fecc: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000fed0: eaffffc9 b a000fdfc <_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();
a000fed4: eb001090 bl a001411c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
a000fed8: eb002881 bl a001a0e4 <__errno> <== NOT EXECUTED
a000fedc: e3a03009 mov r3, #9 <== NOT EXECUTED
a000fee0: e5803000 str r3, [r0] <== NOT EXECUTED
a000fee4: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000fee8: eaffffc3 b a000fdfc <_POSIX_Message_queue_Receive_support+0x48><== NOT EXECUTED
a000ff18 <_POSIX_Message_queue_Send_support>:
size_t msg_len,
unsigned int msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
a000ff18: 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 )
a000ff1c: e3530020 cmp r3, #32
size_t msg_len,
unsigned int msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
a000ff20: e24dd014 sub sp, sp, #20
a000ff24: e1a04003 mov r4, r3
a000ff28: e1a05000 mov r5, r0
a000ff2c: e1a08001 mov r8, r1
a000ff30: e1a07002 mov r7, r2
a000ff34: 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 )
a000ff38: 8a00002c bhi a000fff0 <_POSIX_Message_queue_Send_support+0xd8>
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(
a000ff3c: e59f00f4 ldr r0, [pc, #244] ; a0010038 <_POSIX_Message_queue_Send_support+0x120>
a000ff40: e1a01005 mov r1, r5
a000ff44: e28d2010 add r2, sp, #16
a000ff48: eb000ca2 bl a00131d8 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
a000ff4c: e59d3010 ldr r3, [sp, #16]
a000ff50: e3530000 cmp r3, #0
a000ff54: 1a000020 bne a000ffdc <_POSIX_Message_queue_Send_support+0xc4>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
a000ff58: e5903014 ldr r3, [r0, #20]
a000ff5c: e3130003 tst r3, #3
a000ff60: 0a000027 beq a0010004 <_POSIX_Message_queue_Send_support+0xec>
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
a000ff64: 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;
a000ff68: e5900010 ldr r0, [r0, #16]
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
a000ff6c: 1a000016 bne a000ffcc <_POSIX_Message_queue_Send_support+0xb4>
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
a000ff70: e3a0c000 mov ip, #0
a000ff74: e58dc000 str ip, [sp]
a000ff78: e59dc030 ldr ip, [sp, #48] ; 0x30
a000ff7c: e1a03005 mov r3, r5
a000ff80: e1a01008 mov r1, r8
a000ff84: e1a02007 mov r2, r7
RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core(
unsigned int priority
)
{
return (CORE_message_queue_Submit_types) priority * -1;
a000ff88: e2644000 rsb r4, r4, #0
a000ff8c: e280001c add r0, r0, #28
a000ff90: e58d4004 str r4, [sp, #4]
a000ff94: e58dc00c str ip, [sp, #12]
a000ff98: e58d6008 str r6, [sp, #8]
a000ff9c: eb000894 bl a00121f4 <_CORE_message_queue_Submit>
a000ffa0: e1a04000 mov r4, r0
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
a000ffa4: eb00105c bl a001411c <_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 )
a000ffa8: e3540007 cmp r4, #7
msg_status = _Thread_Executing->Wait.return_code;
a000ffac: 059f3088 ldreq r3, [pc, #136] ; a001003c <_POSIX_Message_queue_Send_support+0x124>
a000ffb0: 05933008 ldreq r3, [r3, #8]
a000ffb4: 05934034 ldreq r4, [r3, #52] ; 0x34
if ( !msg_status )
a000ffb8: e3540000 cmp r4, #0
a000ffbc: 1a000016 bne a001001c <_POSIX_Message_queue_Send_support+0x104>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
a000ffc0: e1a00004 mov r0, r4
a000ffc4: e28dd014 add sp, sp, #20
a000ffc8: 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 )
a000ffcc: e3130901 tst r3, #16384 ; 0x4000
a000ffd0: 13a06000 movne r6, #0
a000ffd4: 03a06001 moveq r6, #1
a000ffd8: eaffffe4 b a000ff70 <_POSIX_Message_queue_Send_support+0x58>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
a000ffdc: eb002840 bl a001a0e4 <__errno> <== NOT EXECUTED
a000ffe0: e3a03009 mov r3, #9 <== NOT EXECUTED
a000ffe4: e5803000 str r3, [r0] <== NOT EXECUTED
a000ffe8: e3e04000 mvn r4, #0 <== NOT EXECUTED
a000ffec: eafffff3 b a000ffc0 <_POSIX_Message_queue_Send_support+0xa8><== 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 );
a000fff0: eb00283b bl a001a0e4 <__errno> <== NOT EXECUTED
a000fff4: e3a03016 mov r3, #22 <== NOT EXECUTED
a000fff8: e5803000 str r3, [r0] <== NOT EXECUTED
a000fffc: e3e04000 mvn r4, #0 <== NOT EXECUTED
a0010000: eaffffee b a000ffc0 <_POSIX_Message_queue_Send_support+0xa8><== 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();
a0010004: eb001044 bl a001411c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
a0010008: eb002835 bl a001a0e4 <__errno> <== NOT EXECUTED
a001000c: e3a03009 mov r3, #9 <== NOT EXECUTED
a0010010: e5803000 str r3, [r0] <== NOT EXECUTED
a0010014: e3e04000 mvn r4, #0 <== NOT EXECUTED
a0010018: eaffffe8 b a000ffc0 <_POSIX_Message_queue_Send_support+0xa8><== NOT EXECUTED
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
a001001c: eb002830 bl a001a0e4 <__errno> <== NOT EXECUTED
a0010020: e1a05000 mov r5, r0 <== NOT EXECUTED
a0010024: e1a00004 mov r0, r4 <== NOT EXECUTED
a0010028: eb000058 bl a0010190 <_POSIX_Message_queue_Translate_core_message_queue_return_code><== NOT EXECUTED
a001002c: e3e04000 mvn r4, #0 <== NOT EXECUTED
a0010030: e5850000 str r0, [r5] <== NOT EXECUTED
a0010034: eaffffe1 b a000ffc0 <_POSIX_Message_queue_Send_support+0xa8><== NOT EXECUTED
a0010190 <_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];
a0010190: e59f3004 ldr r3, [pc, #4] ; a001019c <_POSIX_Message_queue_Translate_core_message_queue_return_code+0xc><== NOT EXECUTED
}
a0010194: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED
a0010198: e12fff1e bx lr <== NOT EXECUTED
a000c46c <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
a000c46c: e92d4030 push {r4, r5, lr}
___POSIX_Mutex_Get_support_error_check( mutex, location );
a000c470: e2504000 subs r4, r0, #0
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
a000c474: e1a05001 mov r5, r1
___POSIX_Mutex_Get_support_error_check( mutex, location );
a000c478: 0a00000f beq a000c4bc <_POSIX_Mutex_Get+0x50>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
a000c47c: e5941000 ldr r1, [r4]
a000c480: e3710001 cmn r1, #1
a000c484: 0a000003 beq a000c498 <_POSIX_Mutex_Get+0x2c>
return (POSIX_Mutex_Control *)
a000c488: e59f003c ldr r0, [pc, #60] ; a000c4cc <_POSIX_Mutex_Get+0x60>
a000c48c: e1a02005 mov r2, r5
_Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location );
}
a000c490: 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 *)
a000c494: ea000b85 b a000f2b0 <_Objects_Get>
Objects_Locations *location
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
a000c498: e3a01000 mov r1, #0
a000c49c: eb00003b bl a000c590 <pthread_mutex_init>
a000c4a0: e3500000 cmp r0, #0
a000c4a4: 05941000 ldreq r1, [r4]
a000c4a8: 0afffff6 beq a000c488 <_POSIX_Mutex_Get+0x1c>
a000c4ac: e3a03001 mov r3, #1
a000c4b0: e5853000 str r3, [r5]
a000c4b4: e3a00000 mov r0, #0
a000c4b8: 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 );
a000c4bc: e3a03001 mov r3, #1 <== NOT EXECUTED
a000c4c0: e5813000 str r3, [r1] <== NOT EXECUTED
a000c4c4: e1a00004 mov r0, r4 <== NOT EXECUTED
a000c4c8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000c4d0 <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
a000c4d0: e92d4070 push {r4, r5, r6, lr}
___POSIX_Mutex_Get_support_error_check( mutex, location );
a000c4d4: e2504000 subs r4, r0, #0
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
a000c4d8: e1a05001 mov r5, r1
a000c4dc: e1a06002 mov r6, r2
___POSIX_Mutex_Get_support_error_check( mutex, location );
a000c4e0: 0a000010 beq a000c528 <_POSIX_Mutex_Get_interrupt_disable+0x58>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
a000c4e4: e5941000 ldr r1, [r4]
a000c4e8: e3710001 cmn r1, #1
a000c4ec: 0a000004 beq a000c504 <_POSIX_Mutex_Get_interrupt_disable+0x34>
return (POSIX_Mutex_Control *) _Objects_Get_isr_disable(
a000c4f0: e59f0040 ldr r0, [pc, #64] ; a000c538 <_POSIX_Mutex_Get_interrupt_disable+0x68>
a000c4f4: e1a02005 mov r2, r5
a000c4f8: e1a03006 mov r3, r6
&_POSIX_Mutex_Information,
(Objects_Id) *mutex,
location,
level
);
}
a000c4fc: 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(
a000c500: ea000b4e b a000f240 <_Objects_Get_isr_disable>
ISR_Level *level
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
a000c504: e3a01000 mov r1, #0
a000c508: eb000020 bl a000c590 <pthread_mutex_init>
a000c50c: e3500000 cmp r0, #0
a000c510: 05941000 ldreq r1, [r4]
a000c514: 0afffff5 beq a000c4f0 <_POSIX_Mutex_Get_interrupt_disable+0x20>
a000c518: e3a03001 mov r3, #1
a000c51c: e5853000 str r3, [r5]
a000c520: e3a00000 mov r0, #0
a000c524: e8bd8070 pop {r4, r5, r6, pc}
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
a000c528: e3a03001 mov r3, #1 <== NOT EXECUTED
a000c52c: e5813000 str r3, [r1] <== NOT EXECUTED
a000c530: e1a00004 mov r0, r4 <== NOT EXECUTED
a000c534: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a0010d60 <_POSIX_Priority_Is_valid>:
bool _POSIX_Priority_Is_valid(
int priority
)
{
return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) &&
a0010d60: e3500000 cmp r0, #0
a0010d64: da000005 ble a0010d80 <_POSIX_Priority_Is_valid+0x20>
(priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY));
a0010d68: e59f3018 ldr r3, [pc, #24] ; a0010d88 <_POSIX_Priority_Is_valid+0x28>
a0010d6c: e5d33000 ldrb r3, [r3]
#endif
#include <rtems/system.h>
#include <rtems/posix/priority.h>
bool _POSIX_Priority_Is_valid(
a0010d70: e1500003 cmp r0, r3
a0010d74: a3a00000 movge r0, #0
a0010d78: b3a00001 movlt r0, #1
a0010d7c: e12fff1e bx lr
int priority
)
{
return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) &&
a0010d80: e3a00000 mov r0, #0 <== NOT EXECUTED
(priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY));
}
a0010d84: e12fff1e bx lr <== NOT EXECUTED
a0011cd0 <_POSIX_Semaphore_Create_support>:
size_t name_len,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
a0011cd0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
a0011cd4: e2527000 subs r7, r2, #0
size_t name_len,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
a0011cd8: e1a05000 mov r5, r0
a0011cdc: e1a0a001 mov sl, r1
a0011ce0: e1a08003 mov r8, r3
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
a0011ce4: 1a00002a bne a0011d94 <_POSIX_Semaphore_Create_support+0xc4>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a0011ce8: e59f30f4 ldr r3, [pc, #244] ; a0011de4 <_POSIX_Semaphore_Create_support+0x114>
a0011cec: e5932000 ldr r2, [r3]
++level;
a0011cf0: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a0011cf4: e5832000 str r2, [r3]
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
a0011cf8: e59f60e8 ldr r6, [pc, #232] ; a0011de8 <_POSIX_Semaphore_Create_support+0x118>
a0011cfc: e1a00006 mov r0, r6
a0011d00: ebffeec0 bl a000d808 <_Objects_Allocate>
rtems_set_errno_and_return_minus_one( ENOSYS );
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
a0011d04: e2504000 subs r4, r0, #0
a0011d08: 0a000026 beq a0011da8 <_POSIX_Semaphore_Create_support+0xd8>
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
if ( name_arg != NULL ) {
a0011d0c: e3550000 cmp r5, #0
a0011d10: 0a00001a beq a0011d80 <_POSIX_Semaphore_Create_support+0xb0>
name = _Workspace_String_duplicate( name_arg, name_len );
a0011d14: e1a00005 mov r0, r5
a0011d18: e1a0100a mov r1, sl
a0011d1c: eb000495 bl a0012f78 <_Workspace_String_duplicate>
if ( !name ) {
a0011d20: e2505000 subs r5, r0, #0
a0011d24: 0a000025 beq a0011dc0 <_POSIX_Semaphore_Create_support+0xf0>
}
the_semaphore->process_shared = pshared;
if ( name ) {
the_semaphore->named = true;
a0011d28: e3a03001 mov r3, #1
}
} else {
name = NULL;
}
the_semaphore->process_shared = pshared;
a0011d2c: e5847010 str r7, [r4, #16]
if ( name ) {
the_semaphore->named = true;
a0011d30: e5c43014 strb r3, [r4, #20]
the_semaphore->open_count = 1;
a0011d34: e5843018 str r3, [r4, #24]
the_semaphore->linked = true;
a0011d38: e5c43015 strb r3, [r4, #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;
a0011d3c: e3a07000 mov r7, #0
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
a0011d40: e3e03000 mvn r3, #0
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
a0011d44: e284001c add r0, r4, #28
a0011d48: e284105c add r1, r4, #92 ; 0x5c
a0011d4c: e1a02008 mov r2, r8
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
a0011d50: e584305c str r3, [r4, #92] ; 0x5c
* 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;
a0011d54: e5847060 str r7, [r4, #96] ; 0x60
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
a0011d58: ebffed18 bl a000d1c0 <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0011d5c: e596301c ldr r3, [r6, #28]
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
a0011d60: e1d420b8 ldrh r2, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0011d64: e7834102 str r4, [r3, r2, lsl #2]
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name
);
*the_sem = the_semaphore;
a0011d68: e59d301c ldr r3, [sp, #28]
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
a0011d6c: e584500c str r5, [r4, #12]
a0011d70: e5834000 str r4, [r3]
_Thread_Enable_dispatch();
a0011d74: ebfff3c0 bl a000ec7c <_Thread_Enable_dispatch>
return 0;
a0011d78: e1a00007 mov r0, r7
}
a0011d7c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
} else {
name = NULL;
}
the_semaphore->process_shared = pshared;
a0011d80: e5845010 str r5, [r4, #16]
if ( name ) {
the_semaphore->named = true;
the_semaphore->open_count = 1;
the_semaphore->linked = true;
} else {
the_semaphore->named = false;
a0011d84: e5c45014 strb r5, [r4, #20]
the_semaphore->open_count = 0;
a0011d88: e5845018 str r5, [r4, #24]
the_semaphore->linked = false;
a0011d8c: e5c45015 strb r5, [r4, #21]
a0011d90: eaffffe9 b a0011d3c <_POSIX_Semaphore_Create_support+0x6c>
CORE_semaphore_Attributes *the_sem_attr;
char *name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
rtems_set_errno_and_return_minus_one( ENOSYS );
a0011d94: eb000a58 bl a00146fc <__errno>
a0011d98: e3a03058 mov r3, #88 ; 0x58
a0011d9c: e5803000 str r3, [r0]
a0011da0: e3e00000 mvn r0, #0
a0011da4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
a0011da8: ebfff3b3 bl a000ec7c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
a0011dac: eb000a52 bl a00146fc <__errno>
a0011db0: e3a0301c mov r3, #28
a0011db4: e5803000 str r3, [r0]
a0011db8: e3e00000 mvn r0, #0
a0011dbc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
a0011dc0: e1a00006 mov r0, r6 <== NOT EXECUTED
a0011dc4: e1a01004 mov r1, r4 <== NOT EXECUTED
a0011dc8: ebffef6c bl a000db80 <_Objects_Free> <== NOT EXECUTED
*/
if ( name_arg != NULL ) {
name = _Workspace_String_duplicate( name_arg, name_len );
if ( !name ) {
_POSIX_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
a0011dcc: ebfff3aa bl a000ec7c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
a0011dd0: eb000a49 bl a00146fc <__errno> <== NOT EXECUTED
a0011dd4: e3a0300c mov r3, #12 <== NOT EXECUTED
a0011dd8: e5803000 str r3, [r0] <== NOT EXECUTED
a0011ddc: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0011de0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a0010e78 <_POSIX_Semaphore_Wait_support>:
int _POSIX_Semaphore_Wait_support(
sem_t *sem,
bool blocking,
Watchdog_Interval timeout
)
{
a0010e78: e92d4070 push {r4, r5, r6, lr}
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
a0010e7c: e5903000 ldr r3, [r0]
a0010e80: e24dd004 sub sp, sp, #4
a0010e84: e1a06001 mov r6, r1
a0010e88: e1a05002 mov r5, r2
a0010e8c: e1a01003 mov r1, r3
a0010e90: e1a0200d mov r2, sp
a0010e94: e59f007c ldr r0, [pc, #124] ; a0010f18 <_POSIX_Semaphore_Wait_support+0xa0>
a0010e98: ebffef8b bl a000cccc <_Objects_Get>
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
a0010e9c: e59d2000 ldr r2, [sp]
int _POSIX_Semaphore_Wait_support(
sem_t *sem,
bool blocking,
Watchdog_Interval timeout
)
{
a0010ea0: e20660ff and r6, r6, #255 ; 0xff
a0010ea4: e1a03000 mov r3, r0
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
a0010ea8: e3520000 cmp r2, #0
a0010eac: 0a000006 beq a0010ecc <_POSIX_Semaphore_Wait_support+0x54>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a0010eb0: eb0009e6 bl a0013650 <__errno> <== NOT EXECUTED
a0010eb4: e3a03016 mov r3, #22 <== NOT EXECUTED
a0010eb8: e5803000 str r3, [r0] <== NOT EXECUTED
a0010ebc: e3e03000 mvn r3, #0 <== NOT EXECUTED
}
a0010ec0: e1a00003 mov r0, r3
a0010ec4: e28dd004 add sp, sp, #4
a0010ec8: e8bd8070 pop {r4, r5, r6, pc}
blocking,
timeout
);
_Thread_Enable_dispatch();
if ( !_Thread_Executing->Wait.return_code )
a0010ecc: e59f4048 ldr r4, [pc, #72] ; a0010f1c <_POSIX_Semaphore_Wait_support+0xa4>
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Seize(
a0010ed0: e5931008 ldr r1, [r3, #8]
a0010ed4: e280001c add r0, r0, #28
a0010ed8: e1a03005 mov r3, r5
a0010edc: e1a02006 mov r2, r6
a0010ee0: eb0001b7 bl a00115c4 <_CORE_semaphore_Seize>
&the_semaphore->Semaphore,
the_semaphore->Object.id,
blocking,
timeout
);
_Thread_Enable_dispatch();
a0010ee4: ebfff326 bl a000db84 <_Thread_Enable_dispatch>
if ( !_Thread_Executing->Wait.return_code )
a0010ee8: e5943008 ldr r3, [r4, #8]
a0010eec: e5933034 ldr r3, [r3, #52] ; 0x34
a0010ef0: e3530000 cmp r3, #0
a0010ef4: 0afffff1 beq a0010ec0 <_POSIX_Semaphore_Wait_support+0x48>
return 0;
rtems_set_errno_and_return_minus_one(
a0010ef8: eb0009d4 bl a0013650 <__errno>
a0010efc: e5943008 ldr r3, [r4, #8]
a0010f00: e1a05000 mov r5, r0
a0010f04: e5930034 ldr r0, [r3, #52] ; 0x34
a0010f08: eb0008fa bl a00132f8 <_POSIX_Semaphore_Translate_core_semaphore_return_code>
a0010f0c: e3e03000 mvn r3, #0
a0010f10: e5850000 str r0, [r5]
a0010f14: eaffffe9 b a0010ec0 <_POSIX_Semaphore_Wait_support+0x48>
a000f8e8 <_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 ];
a000f8e8: e59030f4 ldr r3, [r0, #244] ; 0xf4
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
a000f8ec: e59320d8 ldr r2, [r3, #216] ; 0xd8
a000f8f0: e3520000 cmp r2, #0
a000f8f4: 1a000002 bne a000f904 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1c>
a000f8f8: e59320dc ldr r2, [r3, #220] ; 0xdc
a000f8fc: e3520001 cmp r2, #1
a000f900: 0a000000 beq a000f908 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x20>
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();
a000f904: eafff640 b a000d20c <_Thread_Enable_dispatch>
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 &&
a000f908: e59330e0 ldr r3, [r3, #224] ; 0xe0 <== NOT EXECUTED
a000f90c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000f910: 0afffffb beq a000f904 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1c><== NOT EXECUTED
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000f914: e59f3010 ldr r3, [pc, #16] ; a000f92c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44><== NOT EXECUTED
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
a000f918: e3e01000 mvn r1, #0 <== NOT EXECUTED
a000f91c: e5932000 ldr r2, [r3] <== NOT EXECUTED
--level;
a000f920: e0822001 add r2, r2, r1 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
a000f924: e5832000 str r2, [r3] <== NOT EXECUTED
a000f928: ea0001db b a001009c <_POSIX_Thread_Exit> <== NOT EXECUTED
a00123c8 <_POSIX_Thread_Exit>:
void _POSIX_Thread_Exit(
Thread_Control *the_thread,
void *value_ptr
)
{
a00123c8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a00123cc: e1a04000 mov r4, r0
Objects_Information *the_information;
Thread_Control *unblocked;
POSIX_API_Control *api;
the_information = _Objects_Get_information_id( the_thread->Object.id );
a00123d0: e5900008 ldr r0, [r0, #8]
void _POSIX_Thread_Exit(
Thread_Control *the_thread,
void *value_ptr
)
{
a00123d4: e1a08001 mov r8, r1
Objects_Information *the_information;
Thread_Control *unblocked;
POSIX_API_Control *api;
the_information = _Objects_Get_information_id( the_thread->Object.id );
a00123d8: ebffe71f bl a000c05c <_Objects_Get_information_id>
* are ready to be switched out. Otherwise, an ISR could
* occur and preempt us out while we still hold the
* allocator mutex.
*/
_RTEMS_Lock_allocator();
a00123dc: e59f50b8 ldr r5, [pc, #184] ; a001249c <_POSIX_Thread_Exit+0xd4>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a00123e0: e59f60b8 ldr r6, [pc, #184] ; a00124a0 <_POSIX_Thread_Exit+0xd8>
{
Objects_Information *the_information;
Thread_Control *unblocked;
POSIX_API_Control *api;
the_information = _Objects_Get_information_id( the_thread->Object.id );
a00123e4: e1a07000 mov r7, r0
* are ready to be switched out. Otherwise, an ISR could
* occur and preempt us out while we still hold the
* allocator mutex.
*/
_RTEMS_Lock_allocator();
a00123e8: e5950000 ldr r0, [r5]
Thread_Control *unblocked;
POSIX_API_Control *api;
the_information = _Objects_Get_information_id( the_thread->Object.id );
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a00123ec: e594a0f4 ldr sl, [r4, #244] ; 0xf4
* are ready to be switched out. Otherwise, an ISR could
* occur and preempt us out while we still hold the
* allocator mutex.
*/
_RTEMS_Lock_allocator();
a00123f0: ebffe362 bl a000b180 <_API_Mutex_Lock>
a00123f4: e5963000 ldr r3, [r6]
++level;
a00123f8: e2833001 add r3, r3, #1
_Thread_Dispatch_disable_level = level;
a00123fc: e5863000 str r3, [r6]
the_thread->Wait.return_argument = value_ptr;
/*
* Process join
*/
if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) {
a0012400: e59a3040 ldr r3, [sl, #64] ; 0x40
*/
_RTEMS_Lock_allocator();
_Thread_Disable_dispatch();
the_thread->Wait.return_argument = value_ptr;
a0012404: e5848028 str r8, [r4, #40] ; 0x28
/*
* Process join
*/
if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) {
a0012408: e3530001 cmp r3, #1
a001240c: 0a000009 beq a0012438 <_POSIX_Thread_Exit+0x70>
}
/*
* Now shut down the thread
*/
_Thread_Close( the_information, the_thread );
a0012410: e1a00007 mov r0, r7
a0012414: e1a01004 mov r1, r4
a0012418: ebffea36 bl a000ccf8 <_Thread_Close>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
a001241c: e1a01004 mov r1, r4
a0012420: e59f007c ldr r0, [pc, #124] ; a00124a4 <_POSIX_Thread_Exit+0xdc>
a0012424: ebffe6ee bl a000bfe4 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
a0012428: e5950000 ldr r0, [r5]
a001242c: ebffe36f bl a000b1f0 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
}
a0012430: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr}
_Thread_Close( the_information, the_thread );
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
_Thread_Enable_dispatch();
a0012434: eaffeb12 b a000d084 <_Thread_Enable_dispatch>
/*
* Process join
*/
if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) {
unblocked = _Thread_queue_Dequeue( &api->Join_List );
a0012438: e28aa044 add sl, sl, #68 ; 0x44
a001243c: e1a0000a mov r0, sl
a0012440: ebffebea bl a000d3f0 <_Thread_queue_Dequeue>
if ( unblocked ) {
a0012444: e3500000 cmp r0, #0
a0012448: 0a000006 beq a0012468 <_POSIX_Thread_Exit+0xa0>
do {
*(void **)unblocked->Wait.return_argument = value_ptr;
a001244c: e5903028 ldr r3, [r0, #40] ; 0x28
} while ( (unblocked = _Thread_queue_Dequeue( &api->Join_List )) );
a0012450: e1a0000a mov r0, sl
*/
if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) {
unblocked = _Thread_queue_Dequeue( &api->Join_List );
if ( unblocked ) {
do {
*(void **)unblocked->Wait.return_argument = value_ptr;
a0012454: e5838000 str r8, [r3]
} while ( (unblocked = _Thread_queue_Dequeue( &api->Join_List )) );
a0012458: ebffebe4 bl a000d3f0 <_Thread_queue_Dequeue>
a001245c: e3500000 cmp r0, #0
a0012460: 1afffff9 bne a001244c <_POSIX_Thread_Exit+0x84>
a0012464: eaffffe9 b a0012410 <_POSIX_Thread_Exit+0x48>
} else {
_Thread_Set_state(
a0012468: e3a01a01 mov r1, #4096 ; 0x1000
a001246c: e2811004 add r1, r1, #4
a0012470: e1a00004 mov r0, r4
a0012474: ebffed32 bl a000d944 <_Thread_Set_state>
the_thread,
STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT
);
_RTEMS_Unlock_allocator();
a0012478: e5950000 ldr r0, [r5]
a001247c: ebffe35b bl a000b1f0 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
a0012480: ebffeaff bl a000d084 <_Thread_Enable_dispatch>
/* now waiting for thread to arrive */
_RTEMS_Lock_allocator();
a0012484: e5950000 ldr r0, [r5] <== NOT EXECUTED
a0012488: ebffe33c bl a000b180 <_API_Mutex_Lock> <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a001248c: e5963000 ldr r3, [r6] <== NOT EXECUTED
++level;
a0012490: e2833001 add r3, r3, #1 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
a0012494: e5863000 str r3, [r6] <== NOT EXECUTED
void _Thread_Disable_dispatch( void );
#else
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
_Thread_Dispatch_increment_disable_level();
RTEMS_COMPILER_MEMORY_BARRIER();
a0012498: eaffffdc b a0012410 <_POSIX_Thread_Exit+0x48> <== NOT EXECUTED
a000fbc8 <_POSIX_Threads_Delete_extension>:
*/
static void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
a000fbc8: 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 ];
a000fbcc: e59170f4 ldr r7, [r1, #244] ; 0xf4
*/
static void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
a000fbd0: e1a06001 mov r6, r1
api = deleted->API_Extensions[ THREAD_API_POSIX ];
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
a000fbd4: e1a00001 mov r0, r1
a000fbd8: eb00092b bl a001208c <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
a000fbdc: e1a00006 mov r0, r6
a000fbe0: eb000943 bl a00120f4 <_POSIX_Keys_Run_destructors>
a000fbe4: e2874044 add r4, r7, #68 ; 0x44
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
a000fbe8: e5965028 ldr r5, [r6, #40] ; 0x28
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
a000fbec: ea000001 b a000fbf8 <_POSIX_Threads_Delete_extension+0x30>
*(void **)the_thread->Wait.return_argument = value_ptr;
a000fbf0: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
a000fbf4: e5835000 str r5, [r3] <== NOT EXECUTED
/*
* 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 )) )
a000fbf8: e1a00004 mov r0, r4
a000fbfc: ebfff5fb bl a000d3f0 <_Thread_queue_Dequeue>
a000fc00: e3500000 cmp r0, #0
a000fc04: 1afffff9 bne a000fbf0 <_POSIX_Threads_Delete_extension+0x28>
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
a000fc08: e5973084 ldr r3, [r7, #132] ; 0x84
a000fc0c: e3530004 cmp r3, #4
a000fc10: 0a000004 beq a000fc28 <_POSIX_Threads_Delete_extension+0x60>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
a000fc14: e3a03000 mov r3, #0
_Workspace_Free( api );
a000fc18: 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;
a000fc1c: e58630f4 str r3, [r6, #244] ; 0xf4
_Workspace_Free( api );
}
a000fc20: 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;
_Workspace_Free( api );
a000fc24: eafff933 b a000e0f8 <_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 );
a000fc28: e28700a8 add r0, r7, #168 ; 0xa8 <== NOT EXECUTED
a000fc2c: ebfff88e bl a000de6c <_Watchdog_Remove> <== NOT EXECUTED
a000fc30: eafffff7 b a000fc14 <_POSIX_Threads_Delete_extension+0x4c> <== NOT EXECUTED
a000fdc8 <_POSIX_Threads_Sporadic_budget_callout>:
)
{
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000fdc8: e59020f4 ldr r2, [r0, #244] ; 0xf4 <== NOT EXECUTED
a000fdcc: e59f1034 ldr r1, [pc, #52] ; a000fe08 <_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 ) {
a000fdd0: e590c01c ldr ip, [r0, #28] <== NOT EXECUTED
a000fdd4: e592208c ldr r2, [r2, #140] ; 0x8c <== NOT EXECUTED
a000fdd8: e5d11000 ldrb r1, [r1] <== NOT EXECUTED
a000fddc: e35c0000 cmp ip, #0 <== NOT EXECUTED
a000fde0: 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 */
a000fde4: e3e02000 mvn r2, #0 <== NOT EXECUTED
a000fde8: e5802074 str r2, [r0, #116] ; 0x74 <== NOT EXECUTED
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
a000fdec: 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 ) {
a000fdf0: 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 ) {
a000fdf4: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
a000fdf8: e1530001 cmp r3, r1 <== NOT EXECUTED
a000fdfc: 212fff1e bxcs lr <== NOT EXECUTED
_Thread_Change_priority( the_thread, new_priority, true );
a000fe00: e3a02001 mov r2, #1 <== NOT EXECUTED
a000fe04: eafff36b b a000cbb8 <_Thread_Change_priority> <== NOT EXECUTED
a001208c <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
a001208c: 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 ];
a0012090: e59050f4 ldr r5, [r0, #244] ; 0xf4
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
a0012094: e3a02001 mov r2, #1
while ( !_Chain_Is_empty( handler_stack ) ) {
a0012098: 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 );
a001209c: 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;
a00120a0: e58520d8 str r2, [r5, #216] ; 0xd8
while ( !_Chain_Is_empty( handler_stack ) ) {
a00120a4: e1530006 cmp r3, r6
a00120a8: 0a000010 beq a00120f0 <_POSIX_Threads_cancel_run+0x64>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a00120ac: e10f1000 mrs r1, CPSR <== NOT EXECUTED
a00120b0: e3813080 orr r3, r1, #128 ; 0x80 <== NOT EXECUTED
a00120b4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Disable( level );
handler = (POSIX_Cancel_Handler_control *)
a00120b8: e59540ec ldr r4, [r5, #236] ; 0xec <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
a00120bc: e5942000 ldr r2, [r4] <== NOT EXECUTED
previous = the_node->previous;
a00120c0: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
next->previous = previous;
a00120c4: e5823004 str r3, [r2, #4] <== NOT EXECUTED
previous->next = next;
a00120c8: e5832000 str r2, [r3] <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a00120cc: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
(*handler->routine)( handler->arg );
a00120d0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a00120d4: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
a00120d8: e12fff33 blx r3 <== NOT EXECUTED
_Workspace_Free( handler );
a00120dc: e1a00004 mov r0, r4 <== NOT EXECUTED
a00120e0: ebfff004 bl a000e0f8 <_Workspace_Free> <== NOT EXECUTED
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
a00120e4: e59530e4 ldr r3, [r5, #228] ; 0xe4 <== NOT EXECUTED
a00120e8: e1530006 cmp r3, r6 <== NOT EXECUTED
a00120ec: 1affffee bne a00120ac <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED
a00120f0: e8bd8070 pop {r4, r5, r6, pc}
a00106b8 <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
a00106b8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a00106bc: e1a04000 mov r4, r0
a00106c0: e1a05001 mov r5, r1
a00106c4: e1a07002 mov r7, r2
a00106c8: e1a08003 mov r8, r3
ISR_Level level;
(void) _Watchdog_Remove( timer );
a00106cc: ebfff791 bl a000e518 <_Watchdog_Remove>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a00106d0: e10f6000 mrs r6, CPSR
a00106d4: e3863080 orr r3, r6, #128 ; 0x80
a00106d8: 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 ) {
a00106dc: e5943008 ldr r3, [r4, #8]
a00106e0: e3530000 cmp r3, #0
a00106e4: 0a000002 beq a00106f4 <_POSIX_Timer_Insert_helper+0x3c>
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a00106e8: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
_ISR_Enable( level );
return false;
a00106ec: e3a00000 mov r0, #0 <== NOT EXECUTED
a00106f0: 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;
a00106f4: e5843008 str r3, [r4, #8]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a00106f8: e59d3018 ldr r3, [sp, #24]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a00106fc: e584801c str r8, [r4, #28]
the_watchdog->id = id;
a0010700: e5847020 str r7, [r4, #32]
the_watchdog->user_data = user_data;
a0010704: e5843024 str r3, [r4, #36] ; 0x24
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a0010708: e584500c str r5, [r4, #12]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a001070c: e59f0010 ldr r0, [pc, #16] ; a0010724 <_POSIX_Timer_Insert_helper+0x6c>
a0010710: e1a01004 mov r1, r4
a0010714: ebfff712 bl a000e364 <_Watchdog_Insert>
a0010718: 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;
a001071c: e3a00001 mov r0, #1
}
a0010720: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000a4c8 <_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)
{
a000a4c8: e92d40d0 push {r4, r6, r7, lr} <== NOT EXECUTED
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
a000a4cc: e5913068 ldr r3, [r1, #104] ; 0x68 <== NOT EXECUTED
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
a000a4d0: 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)
{
a000a4d4: e24dd00c sub sp, sp, #12 <== NOT EXECUTED
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
a000a4d8: e2833001 add r3, r3, #1 <== NOT EXECUTED
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
a000a4dc: 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)
{
a000a4e0: e1a04001 mov r4, r1 <== NOT EXECUTED
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
a000a4e4: e5813068 str r3, [r1, #104] ; 0x68 <== NOT EXECUTED
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
a000a4e8: 1a000004 bne a000a500 <_POSIX_Timer_TSR+0x38> <== NOT EXECUTED
a000a4ec: e5913058 ldr r3, [r1, #88] ; 0x58 <== NOT EXECUTED
a000a4f0: 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;
a000a4f4: 03a03004 moveq r3, #4 <== NOT EXECUTED
a000a4f8: 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 ) ||
a000a4fc: 0a00001b beq a000a570 <_POSIX_Timer_TSR+0xa8> <== NOT EXECUTED
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
a000a500: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
a000a504: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
a000a508: e2840010 add r0, r4, #16 <== NOT EXECUTED
a000a50c: e59f3074 ldr r3, [pc, #116] ; a000a588 <_POSIX_Timer_TSR+0xc0><== NOT EXECUTED
a000a510: e58d4000 str r4, [sp] <== NOT EXECUTED
a000a514: eb001867 bl a00106b8 <_POSIX_Timer_Insert_helper> <== NOT EXECUTED
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
a000a518: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a51c: 1a000001 bne a000a528 <_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;
}
a000a520: e28dd00c add sp, sp, #12 <== NOT EXECUTED
a000a524: e8bd80d0 pop {r4, r6, r7, pc} <== NOT EXECUTED
a000a528: e59f105c ldr r1, [pc, #92] ; a000a58c <_POSIX_Timer_TSR+0xc4><== NOT EXECUTED
a000a52c: e28d0004 add r0, sp, #4 <== NOT EXECUTED
a000a530: eb0005df bl a000bcb4 <_TOD_Get_with_nanoseconds> <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a000a534: e59f2054 ldr r2, [pc, #84] ; a000a590 <_POSIX_Timer_TSR+0xc8><== NOT EXECUTED
a000a538: e89000c0 ldm r0, {r6, r7} <== NOT EXECUTED
a000a53c: e3a03000 mov r3, #0 <== NOT EXECUTED
a000a540: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a544: e1a01007 mov r1, r7 <== NOT EXECUTED
a000a548: eb004ab6 bl a001d028 <__divdi3> <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a000a54c: e3a03000 mov r3, #0 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a000a550: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a000a554: e59f2034 ldr r2, [pc, #52] ; a000a590 <_POSIX_Timer_TSR+0xc8><== NOT EXECUTED
a000a558: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a55c: e1a01007 mov r1, r7 <== NOT EXECUTED
a000a560: eb004beb bl a001d514 <__moddi3> <== NOT EXECUTED
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
a000a564: e3a03003 mov r3, #3 <== NOT EXECUTED
a000a568: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED
a000a56c: 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 ) ) {
a000a570: e5940038 ldr r0, [r4, #56] ; 0x38 <== NOT EXECUTED
a000a574: e5941044 ldr r1, [r4, #68] ; 0x44 <== NOT EXECUTED
a000a578: eb00172f bl a001023c <pthread_kill> <== NOT EXECUTED
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
a000a57c: e3a03000 mov r3, #0 <== NOT EXECUTED
a000a580: e5843068 str r3, [r4, #104] ; 0x68 <== NOT EXECUTED
a000a584: eaffffe5 b a000a520 <_POSIX_Timer_TSR+0x58> <== NOT EXECUTED
a000fa38 <_POSIX_signals_Abnormal_termination_handler>:
sigset_t _POSIX_signals_Pending;
void _POSIX_signals_Abnormal_termination_handler(
int signo __attribute__((unused)) )
{
a000fa38: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
exit( 1 );
a000fa3c: e3a00001 mov r0, #1 <== NOT EXECUTED
a000fa40: eb000b97 bl a00128a4 <exit> <== NOT EXECUTED
a000c18c <_POSIX_signals_Alarm_TSR>:
static void _POSIX_signals_Alarm_TSR(
Objects_Id id __attribute__((unused)),
void *argument __attribute__((unused))
)
{
a000c18c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
kill( getpid(), SIGALRM );
a000c190: ebfff18c bl a00087c8 <getpid> <== NOT EXECUTED
a000c194: e3a0100e mov r1, #14 <== NOT EXECUTED
/* XXX can't print from an ISR, should this be fatal? */
}
a000c198: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
static void _POSIX_signals_Alarm_TSR(
Objects_Id id __attribute__((unused)),
void *argument __attribute__((unused))
)
{
kill( getpid(), SIGALRM );
a000c19c: ea000053 b a000c2f0 <kill> <== NOT EXECUTED
a00127fc <_POSIX_signals_Clear_process_signals>:
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a00127fc: e10f2000 mrs r2, CPSR
a0012800: e3823080 orr r3, r2, #128 ; 0x80
a0012804: 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 ) {
a0012808: e3a0300c mov r3, #12
a001280c: e0030390 mul r3, r0, r3
a0012810: e59f1048 ldr r1, [pc, #72] ; a0012860 <_POSIX_signals_Clear_process_signals+0x64>
a0012814: e7911003 ldr r1, [r1, r3]
a0012818: e3510002 cmp r1, #2
a001281c: 0a000007 beq a0012840 <_POSIX_signals_Clear_process_signals+0x44>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
a0012820: e59f303c ldr r3, [pc, #60] ; a0012864 <_POSIX_signals_Clear_process_signals+0x68>
a0012824: e3a0c001 mov ip, #1
a0012828: e2400001 sub r0, r0, #1
a001282c: e5931000 ldr r1, [r3]
a0012830: e1c1001c bic r0, r1, ip, lsl r0
a0012834: e5830000 str r0, [r3]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a0012838: e129f002 msr CPSR_fc, r2
}
_ISR_Enable( level );
}
a001283c: e12fff1e bx lr
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
a0012840: e59f1020 ldr r1, [pc, #32] ; a0012868 <_POSIX_signals_Clear_process_signals+0x6c>
a0012844: e793c001 ldr ip, [r3, r1]
a0012848: e0833001 add r3, r3, r1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a001284c: e2833004 add r3, r3, #4
a0012850: e15c0003 cmp ip, r3
a0012854: 0afffff1 beq a0012820 <_POSIX_signals_Clear_process_signals+0x24>
a0012858: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
}
a001285c: e12fff1e bx lr <== NOT EXECUTED
a0012288 <_POSIX_signals_Clear_signals>:
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
a0012288: e92d4070 push {r4, r5, r6, lr}
a001228c: e24dd008 sub sp, sp, #8
a0012290: e5ddc018 ldrb ip, [sp, #24]
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a0012294: e2414001 sub r4, r1, #1
a0012298: 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 )
a001229c: e35c0000 cmp ip, #0
a00122a0: e3a0c001 mov ip, #1
a00122a4: e1a0441c lsl r4, ip, r4
signals_blocked = ~api->signals_blocked;
a00122a8: 1590c0d0 ldrne ip, [r0, #208] ; 0xd0
else
signals_blocked = SIGNAL_ALL_MASK;
a00122ac: 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;
a00122b0: 11e0c00c mvnne ip, ip
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a00122b4: e10f5000 mrs r5, CPSR
a00122b8: e3856080 orr r6, r5, #128 ; 0x80
a00122bc: 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 ) {
a00122c0: e3530000 cmp r3, #0
a00122c4: 0a000010 beq a001230c <_POSIX_signals_Clear_signals+0x84>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
a00122c8: e59f30e8 ldr r3, [pc, #232] ; a00123b8 <_POSIX_signals_Clear_signals+0x130>
a00122cc: e5930000 ldr r0, [r3]
a00122d0: e0044000 and r4, r4, r0
a00122d4: e014000c ands r0, r4, ip
a00122d8: 0a000008 beq a0012300 <_POSIX_signals_Clear_signals+0x78>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
a00122dc: e3a0300c mov r3, #12
a00122e0: e0030391 mul r3, r1, r3
a00122e4: e59f00d0 ldr r0, [pc, #208] ; a00123bc <_POSIX_signals_Clear_signals+0x134>
a00122e8: e7900003 ldr r0, [r0, r3]
a00122ec: e3500002 cmp r0, #2
a00122f0: 0a00000d beq a001232c <_POSIX_signals_Clear_signals+0xa4>
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
a00122f4: e1a00001 mov r0, r1
a00122f8: eb00013f bl a00127fc <_POSIX_signals_Clear_process_signals>
do_callout = true;
a00122fc: e3a00001 mov r0, #1
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a0012300: e129f005 msr CPSR_fc, r5
do_callout = true;
}
}
_ISR_Enable( level );
return do_callout;
}
a0012304: e28dd008 add sp, sp, #8
a0012308: e8bd8070 pop {r4, r5, r6, pc}
}
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
a001230c: e59020d4 ldr r2, [r0, #212] ; 0xd4
a0012310: e0041002 and r1, r4, r2
a0012314: e111000c tst r1, ip
api->signals_pending &= ~mask;
a0012318: 11c24004 bicne r4, r2, r4
a001231c: 158040d4 strne r4, [r0, #212] ; 0xd4
bool do_callout;
POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo );
do_callout = false;
a0012320: 01a00003 moveq r0, r3
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
do_callout = true;
a0012324: 13a00001 movne r0, #1
a0012328: eafffff4 b a0012300 <_POSIX_signals_Clear_signals+0x78>
_ISR_Disable( level );
if ( is_global ) {
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
a001232c: e59fc08c ldr ip, [pc, #140] ; a00123c0 <_POSIX_signals_Clear_signals+0x138>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a0012330: e79c4003 ldr r4, [ip, r3]
a0012334: e08ce003 add lr, ip, r3
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a0012338: e28e0004 add r0, lr, #4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a001233c: e1540000 cmp r4, r0
a0012340: 0a000017 beq a00123a4 <_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;
a0012344: e5946000 ldr r6, [r4] <== NOT EXECUTED
_POSIX_signals_Clear_process_signals( signo );
a0012348: e1a00001 mov r0, r1 <== NOT EXECUTED
head->next = new_first;
a001234c: e78c6003 str r6, [ip, r3] <== NOT EXECUTED
new_first->previous = head;
a0012350: e586e004 str lr, [r6, #4] <== NOT EXECUTED
a0012354: e58d1000 str r1, [sp] <== NOT EXECUTED
a0012358: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
a001235c: eb000126 bl a00127fc <_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;
a0012360: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
a0012364: 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;
a0012368: e59f3054 ldr r3, [pc, #84] ; a00123c4 <_POSIX_signals_Clear_signals+0x13c><== NOT EXECUTED
a001236c: e1a00002 mov r0, r2 <== NOT EXECUTED
a0012370: e480c004 str ip, [r0], #4 <== NOT EXECUTED
a0012374: e594600c ldr r6, [r4, #12] <== NOT EXECUTED
a0012378: e593c008 ldr ip, [r3, #8] <== NOT EXECUTED
the_node->next = tail;
a001237c: e283e004 add lr, r3, #4 <== NOT EXECUTED
a0012380: e5826004 str r6, [r2, #4] <== NOT EXECUTED
a0012384: e5942010 ldr r2, [r4, #16] <== NOT EXECUTED
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
a0012388: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a001238c: e5802004 str r2, [r0, #4] <== NOT EXECUTED
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
a0012390: e584e000 str lr, [r4] <== NOT EXECUTED
tail->previous = the_node;
a0012394: e5834008 str r4, [r3, #8] <== NOT EXECUTED
old_last->next = the_node;
a0012398: e58c4000 str r4, [ip] <== NOT EXECUTED
the_node->previous = old_last;
a001239c: e584c004 str ip, [r4, #4] <== NOT EXECUTED
a00123a0: eaffffd3 b a00122f4 <_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 );
a00123a4: e1a00001 mov r0, r1
a00123a8: e58d1000 str r1, [sp]
a00123ac: eb000112 bl a00127fc <_POSIX_signals_Clear_process_signals>
a00123b0: e59d1000 ldr r1, [sp]
a00123b4: eaffffce b a00122f4 <_POSIX_signals_Clear_signals+0x6c>
a000f970 <_POSIX_signals_Post_switch_hook>:
*/
static void _POSIX_signals_Post_switch_hook(
Thread_Control *the_thread
)
{
a000f970: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
a000f974: e59f70b4 ldr r7, [pc, #180] ; a000fa30 <_POSIX_signals_Post_switch_hook+0xc0>
POSIX_API_Control *api;
int signo;
ISR_Level level;
int hold_errno;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000f978: e59050f4 ldr r5, [r0, #244] ; 0xf4
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
a000f97c: e5973008 ldr r3, [r7, #8]
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
a000f980: e3550000 cmp r5, #0
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
a000f984: e5938034 ldr r8, [r3, #52] ; 0x34
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
a000f988: 0a000024 beq a000fa20 <_POSIX_signals_Post_switch_hook+0xb0>
a000f98c: e59f60a0 ldr r6, [pc, #160] ; a000fa34 <_POSIX_signals_Post_switch_hook+0xc4>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000f990: e10f3000 mrs r3, CPSR
a000f994: e3832080 orr r2, r3, #128 ; 0x80
a000f998: e129f002 msr CPSR_fc, r2
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
a000f99c: e5960000 ldr r0, [r6]
a000f9a0: e59520d4 ldr r2, [r5, #212] ; 0xd4
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
a000f9a4: e59510d0 ldr r1, [r5, #208] ; 0xd0
a000f9a8: e1802002 orr r2, r0, r2
a000f9ac: e1c22001 bic r2, r2, r1
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000f9b0: e129f003 msr CPSR_fc, r3
a000f9b4: e3520000 cmp r2, #0
a000f9b8: 0a000019 beq a000fa24 <_POSIX_signals_Post_switch_hook+0xb4>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
a000f9bc: e3a0401b mov r4, #27
_POSIX_signals_Check_signal( api, signo, false );
a000f9c0: e1a01004 mov r1, r4
a000f9c4: e3a02000 mov r2, #0
a000f9c8: e1a00005 mov r0, r5
a000f9cc: eb0009ef bl a0012190 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, true );
a000f9d0: e3a02001 mov r2, #1
a000f9d4: e1a01004 mov r1, r4
a000f9d8: e1a00005 mov r0, r5
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
a000f9dc: e0844002 add r4, r4, r2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
a000f9e0: eb0009ea bl a0012190 <_POSIX_signals_Check_signal>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
a000f9e4: e3540020 cmp r4, #32
a000f9e8: 1afffff4 bne a000f9c0 <_POSIX_signals_Post_switch_hook+0x50>
a000f9ec: e3a04001 mov r4, #1
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
a000f9f0: e1a01004 mov r1, r4
a000f9f4: e3a02000 mov r2, #0
a000f9f8: e1a00005 mov r0, r5
a000f9fc: eb0009e3 bl a0012190 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, true );
a000fa00: e3a02001 mov r2, #1
a000fa04: e1a01004 mov r1, r4
a000fa08: e1a00005 mov r0, r5
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
a000fa0c: e0844002 add r4, r4, r2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
a000fa10: eb0009de bl a0012190 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
a000fa14: e354001b cmp r4, #27
a000fa18: 1afffff4 bne a000f9f0 <_POSIX_signals_Post_switch_hook+0x80>
a000fa1c: eaffffdb b a000f990 <_POSIX_signals_Post_switch_hook+0x20>
a000fa20: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
_Thread_Executing->Wait.return_code = hold_errno;
a000fa24: e5973008 ldr r3, [r7, #8]
a000fa28: e5838034 str r8, [r3, #52] ; 0x34
a000fa2c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000a454 <_POSIX_signals_Ualarm_TSR>:
static void _POSIX_signals_Ualarm_TSR(
Objects_Id id __attribute__((unused)),
void *argument __attribute__((unused))
)
{
a000a454: e92d4010 push {r4, lr} <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Reset(
Watchdog_Control *the_watchdog
)
{
(void) _Watchdog_Remove( the_watchdog );
a000a458: e59f4020 ldr r4, [pc, #32] ; a000a480 <_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 );
a000a45c: ebfff0ce bl a000679c <getpid> <== NOT EXECUTED
a000a460: e3a0100e mov r1, #14 <== NOT EXECUTED
a000a464: ebffff6a bl a000a214 <kill> <== NOT EXECUTED
a000a468: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a46c: eb000fd6 bl a000e3cc <_Watchdog_Remove> <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a470: e59f000c ldr r0, [pc, #12] ; a000a484 <_POSIX_signals_Ualarm_TSR+0x30><== NOT EXECUTED
a000a474: e1a01004 mov r1, r4 <== NOT EXECUTED
/*
* If the reset interval is non-zero, reschedule ourselves.
*/
_Watchdog_Reset( &_POSIX_signals_Ualarm_timer );
}
a000a478: e8bd4010 pop {r4, lr} <== NOT EXECUTED
a000a47c: ea000f65 b a000e218 <_Watchdog_Insert> <== NOT EXECUTED
a001df54 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
a001df54: 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 ) ) {
a001df58: e5905010 ldr r5, [r0, #16]
a001df5c: e3a03201 mov r3, #268435456 ; 0x10000000
a001df60: e2833902 add r3, r3, #32768 ; 0x8000
a001df64: e1a0c003 mov ip, r3
a001df68: e0053003 and r3, r5, r3
a001df6c: e2417001 sub r7, r1, #1
a001df70: e3a06001 mov r6, #1
a001df74: e153000c cmp r3, ip
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
a001df78: e1a04000 mov r4, r0
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a001df7c: e59030f4 ldr r3, [r0, #244] ; 0xf4
a001df80: e1a07716 lsl r7, r6, r7
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
a001df84: 0a000012 beq a001dfd4 <_POSIX_signals_Unblock_thread+0x80>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
a001df88: e59330d0 ldr r3, [r3, #208] ; 0xd0
a001df8c: e1d77003 bics r7, r7, r3
a001df90: 0a00000d beq a001dfcc <_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 ) ) {
a001df94: e2157201 ands r7, r5, #268435456 ; 0x10000000
a001df98: 0a000009 beq a001dfc4 <_POSIX_signals_Unblock_thread+0x70>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
a001df9c: e3a06bef mov r6, #244736 ; 0x3bc00
a001dfa0: e2866e2e add r6, r6, #736 ; 0x2e0
a001dfa4: e0056006 and r6, r5, r6
the_thread->Wait.return_code = EINTR;
a001dfa8: e3a03004 mov r3, #4
/*
* 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) )
a001dfac: e3560000 cmp r6, #0
* 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;
a001dfb0: e5803034 str r3, [r0, #52] ; 0x34
/*
* 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) )
a001dfb4: 1a000030 bne a001e07c <_POSIX_signals_Unblock_thread+0x128>
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
a001dfb8: e2150008 ands r0, r5, #8
a001dfbc: 1a000027 bne a001e060 <_POSIX_signals_Unblock_thread+0x10c>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
a001dfc0: 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 ) {
a001dfc4: e3550000 cmp r5, #0 <== NOT EXECUTED
a001dfc8: 0a000019 beq a001e034 <_POSIX_signals_Unblock_thread+0xe0> <== NOT EXECUTED
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
a001dfcc: e1a00007 mov r0, r7
a001dfd0: 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) ) {
a001dfd4: e5900030 ldr r0, [r0, #48] ; 0x30 <== NOT EXECUTED
a001dfd8: e1170000 tst r7, r0 <== NOT EXECUTED
a001dfdc: 0a000010 beq a001e024 <_POSIX_signals_Unblock_thread+0xd0> <== NOT EXECUTED
the_thread->Wait.return_code = EINTR;
a001dfe0: e3a03004 mov r3, #4 <== NOT EXECUTED
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
a001dfe4: 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;
a001dfe8: e5843034 str r3, [r4, #52] ; 0x34 <== NOT EXECUTED
the_info = (siginfo_t *) the_thread->Wait.return_argument;
a001dfec: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
if ( !info ) {
a001dff0: 0a000024 beq a001e088 <_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;
a001dff4: e1a01002 mov r1, r2 <== NOT EXECUTED
a001dff8: e491c004 ldr ip, [r1], #4 <== NOT EXECUTED
a001dffc: e1a03000 mov r3, r0 <== NOT EXECUTED
a001e000: e483c004 str ip, [r3], #4 <== NOT EXECUTED
a001e004: e5922004 ldr r2, [r2, #4] <== NOT EXECUTED
a001e008: e5802004 str r2, [r0, #4] <== NOT EXECUTED
a001e00c: e5912004 ldr r2, [r1, #4] <== NOT EXECUTED
a001e010: e5832004 str r2, [r3, #4] <== NOT EXECUTED
}
_Thread_queue_Extract_with_proxy( the_thread );
a001e014: e1a00004 mov r0, r4 <== NOT EXECUTED
a001e018: ebffbde6 bl a000d7b8 <_Thread_queue_Extract_with_proxy> <== NOT EXECUTED
return true;
a001e01c: e3a00001 mov r0, #1 <== NOT EXECUTED
a001e020: 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) ) {
a001e024: e59300d0 ldr r0, [r3, #208] ; 0xd0 <== NOT EXECUTED
a001e028: e1d70000 bics r0, r7, r0 <== NOT EXECUTED
a001e02c: 1affffeb bne a001dfe0 <_POSIX_signals_Unblock_thread+0x8c> <== NOT EXECUTED
a001e030: eaffffe2 b a001dfc0 <_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 ) )
a001e034: e59f2060 ldr r2, [pc, #96] ; a001e09c <_POSIX_signals_Unblock_thread+0x148><== NOT EXECUTED
a001e038: e5920000 ldr r0, [r2] <== NOT EXECUTED
a001e03c: e3500000 cmp r0, #0 <== NOT EXECUTED
a001e040: 0affffde beq a001dfc0 <_POSIX_signals_Unblock_thread+0x6c> <== NOT EXECUTED
a001e044: e5923008 ldr r3, [r2, #8] <== NOT EXECUTED
a001e048: e1540003 cmp r4, r3 <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
}
}
return false;
a001e04c: 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 ) )
a001e050: 1affffda bne a001dfc0 <_POSIX_signals_Unblock_thread+0x6c> <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
a001e054: e5c26004 strb r6, [r2, #4] <== NOT EXECUTED
}
}
return false;
a001e058: e1a00005 mov r0, r5 <== NOT EXECUTED
a001e05c: 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 );
a001e060: e2840048 add r0, r4, #72 ; 0x48
a001e064: ebffbf80 bl a000de6c <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a001e068: e1a00004 mov r0, r4
a001e06c: e59f102c ldr r1, [pc, #44] ; a001e0a0 <_POSIX_signals_Unblock_thread+0x14c>
a001e070: ebffbb0d bl a000ccac <_Thread_Clear_state>
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
a001e074: e1a00006 mov r0, r6
a001e078: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* 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 );
a001e07c: ebffbdcd bl a000d7b8 <_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;
a001e080: e3a00000 mov r0, #0 <== NOT EXECUTED
a001e084: 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;
a001e088: 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;
a001e08c: e5801000 str r1, [r0] <== NOT EXECUTED
the_info->si_code = SI_USER;
a001e090: e5803004 str r3, [r0, #4] <== NOT EXECUTED
the_info->si_value.sival_int = 0;
a001e094: e5802008 str r2, [r0, #8] <== NOT EXECUTED
a001e098: eaffffdd b a001e014 <_POSIX_signals_Unblock_thread+0xc0> <== NOT EXECUTED
a0011884 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
a0011884: e92d4070 push {r4, r5, r6, lr}
if ( !the_heap )
a0011888: e2505000 subs r5, r0, #0
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
a001188c: e1a06001 mov r6, r1
if ( !the_heap )
a0011890: 0a00000d beq a00118cc <_Protected_heap_Get_information+0x48>
return false;
if ( !the_info )
a0011894: e3510000 cmp r1, #0
a0011898: 0a000009 beq a00118c4 <_Protected_heap_Get_information+0x40>
return false;
_RTEMS_Lock_allocator();
a001189c: e59f4030 ldr r4, [pc, #48] ; a00118d4 <_Protected_heap_Get_information+0x50>
a00118a0: e5940000 ldr r0, [r4]
a00118a4: ebfff7a2 bl a000f734 <_API_Mutex_Lock>
_Heap_Get_information( the_heap, the_info );
a00118a8: e1a00005 mov r0, r5
a00118ac: e1a01006 mov r1, r6
a00118b0: eb00116a bl a0015e60 <_Heap_Get_information>
_RTEMS_Unlock_allocator();
a00118b4: e5940000 ldr r0, [r4]
a00118b8: ebfff7b9 bl a000f7a4 <_API_Mutex_Unlock>
return true;
a00118bc: e3a00001 mov r0, #1
a00118c0: e8bd8070 pop {r4, r5, r6, pc}
{
if ( !the_heap )
return false;
if ( !the_info )
return false;
a00118c4: e1a00001 mov r0, r1 <== NOT EXECUTED
_RTEMS_Lock_allocator();
_Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
return true;
}
a00118c8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
if ( !the_heap )
return false;
a00118cc: e1a00005 mov r0, r5 <== NOT EXECUTED
a00118d0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a001193c <_Protected_heap_Walk>:
* This routine returns true if thread dispatch indicates
* that we are in a critical section.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void)
{
if ( _Thread_Dispatch_disable_level == 0 )
a001193c: e59f3054 ldr r3, [pc, #84] ; a0011998 <_Protected_heap_Walk+0x5c><== NOT EXECUTED
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
a0011940: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
a0011944: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0011948: e1a07000 mov r7, r0 <== NOT EXECUTED
a001194c: e1a06001 mov r6, r1 <== NOT EXECUTED
a0011950: e3530000 cmp r3, #0 <== NOT EXECUTED
a0011954: e20250ff and r5, r2, #255 ; 0xff <== NOT EXECUTED
a0011958: 1a00000b bne a001198c <_Protected_heap_Walk+0x50> <== NOT EXECUTED
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( _Thread_Dispatch_in_critical_section() == false ) {
_RTEMS_Lock_allocator();
a001195c: e59f4038 ldr r4, [pc, #56] ; a001199c <_Protected_heap_Walk+0x60><== NOT EXECUTED
a0011960: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0011964: ebfff772 bl a000f734 <_API_Mutex_Lock> <== NOT EXECUTED
status = _Heap_Walk( the_heap, source, do_dump );
a0011968: e1a02005 mov r2, r5 <== NOT EXECUTED
a001196c: e1a01006 mov r1, r6 <== NOT EXECUTED
a0011970: e1a00007 mov r0, r7 <== NOT EXECUTED
a0011974: ebfffbe7 bl a0010918 <_Heap_Walk> <== NOT EXECUTED
a0011978: e1a05000 mov r5, r0 <== NOT EXECUTED
_RTEMS_Unlock_allocator();
a001197c: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0011980: ebfff787 bl a000f7a4 <_API_Mutex_Unlock> <== NOT EXECUTED
} else {
status = _Heap_Walk( the_heap, source, do_dump );
}
return status;
}
a0011984: e1a00005 mov r0, r5 <== NOT EXECUTED
a0011988: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
if ( _Thread_Dispatch_in_critical_section() == false ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
a001198c: e1a02005 mov r2, r5 <== NOT EXECUTED
}
return status;
}
a0011990: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED
if ( _Thread_Dispatch_in_critical_section() == false ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
a0011994: eafffbdf b a0010918 <_Heap_Walk> <== NOT EXECUTED
a000d0c4 <_RBTree_Extract_validate_unprotected>:
)
{
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
a000d0c4: e5903000 ldr r3, [r0]
* of the extract operation.
*/
static void _RBTree_Extract_validate_unprotected(
RBTree_Node *the_node
)
{
a000d0c8: e92d05f0 push {r4, r5, r6, r7, r8, sl}
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
if(!parent->parent) return;
a000d0cc: e5932000 ldr r2, [r3]
a000d0d0: e3520000 cmp r2, #0
a000d0d4: 0a00002f beq a000d198 <_RBTree_Extract_validate_unprotected+0xd4>
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
a000d0d8: e5932004 ldr r2, [r3, #4]
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
a000d0dc: e3a06000 mov r6, #0
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
a000d0e0: e3a05001 mov r5, #1
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
a000d0e4: e1500002 cmp r0, r2
return the_node->parent->child[RBT_RIGHT];
a000d0e8: 05932008 ldreq r2, [r3, #8]
a000d0ec: ea000022 b a000d17c <_RBTree_Extract_validate_unprotected+0xb8>
if(!parent->parent) return;
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
a000d0f0: e5931000 ldr r1, [r3]
a000d0f4: e3510000 cmp r1, #0
a000d0f8: 0a000022 beq a000d188 <_RBTree_Extract_validate_unprotected+0xc4>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
a000d0fc: e3520000 cmp r2, #0
a000d100: 0a000002 beq a000d110 <_RBTree_Extract_validate_unprotected+0x4c>
a000d104: e592c00c ldr ip, [r2, #12]
a000d108: e35c0001 cmp ip, #1
a000d10c: 0a000023 beq a000d1a0 <_RBTree_Extract_validate_unprotected+0xdc>
_RBTree_Rotate(parent, dir);
sibling = parent->child[_RBTree_Opposite_direction(dir)];
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
a000d110: e5921008 ldr r1, [r2, #8]
a000d114: e3510000 cmp r1, #0
a000d118: 0a000002 beq a000d128 <_RBTree_Extract_validate_unprotected+0x64>
a000d11c: e591c00c ldr ip, [r1, #12]
a000d120: e35c0001 cmp ip, #1
a000d124: 0a000042 beq a000d234 <_RBTree_Extract_validate_unprotected+0x170>
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
a000d128: e592c004 ldr ip, [r2, #4]
a000d12c: e35c0000 cmp ip, #0
a000d130: 0a000002 beq a000d140 <_RBTree_Extract_validate_unprotected+0x7c>
a000d134: e59cc00c ldr ip, [ip, #12]
a000d138: e35c0001 cmp ip, #1
a000d13c: 0a00003c beq a000d234 <_RBTree_Extract_validate_unprotected+0x170>
sibling->color = RBT_RED;
a000d140: e582500c str r5, [r2, #12]
a000d144: e593200c ldr r2, [r3, #12]
a000d148: e3520001 cmp r2, #1
a000d14c: 0a000033 beq a000d220 <_RBTree_Extract_validate_unprotected+0x15c>
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
a000d150: e5931000 ldr r1, [r3]
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
a000d154: e3510000 cmp r1, #0
a000d158: 0a000033 beq a000d22c <_RBTree_Extract_validate_unprotected+0x168>
if(!(the_node->parent->parent)) return NULL;
a000d15c: e5912000 ldr r2, [r1]
a000d160: e3520000 cmp r2, #0
a000d164: 0a000002 beq a000d174 <_RBTree_Extract_validate_unprotected+0xb0>
if(the_node == the_node->parent->child[RBT_LEFT])
a000d168: e5912004 ldr r2, [r1, #4]
a000d16c: e1530002 cmp r3, r2
return the_node->parent->child[RBT_RIGHT];
a000d170: 05912008 ldreq r2, [r1, #8]
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
the_node->parent = c;
a000d174: e1a00003 mov r0, r3
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
a000d178: e1a03001 mov r3, r1
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
a000d17c: e590100c ldr r1, [r0, #12]
a000d180: e3510001 cmp r1, #1
a000d184: 1affffd9 bne a000d0f0 <_RBTree_Extract_validate_unprotected+0x2c>
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
a000d188: e5903000 ldr r3, [r0]
a000d18c: e5933000 ldr r3, [r3]
a000d190: e3530000 cmp r3, #0
a000d194: 0580300c streq r3, [r0, #12]
}
a000d198: e8bd05f0 pop {r4, r5, r6, r7, r8, sl}
a000d19c: e12fff1e bx lr
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
a000d1a0: e5934004 ldr r4, [r3, #4]
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
a000d1a4: e583c00c str ip, [r3, #12]
sibling->color = RBT_BLACK;
a000d1a8: e582600c str r6, [r2, #12]
dir = the_node != parent->child[0];
a000d1ac: e0542000 subs r2, r4, r0
a000d1b0: 13a02001 movne r2, #1
* This function maintains the properties of the red-black tree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
static void _RBTree_Extract_validate_unprotected(
a000d1b4: e2227001 eor r7, r2, #1
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
a000d1b8: e2878001 add r8, r7, #1
a000d1bc: e793a108 ldr sl, [r3, r8, lsl #2]
a000d1c0: e35a0000 cmp sl, #0
a000d1c4: 01a0200a moveq r2, sl
a000d1c8: 0affffd0 beq a000d110 <_RBTree_Extract_validate_unprotected+0x4c>
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
a000d1cc: e3570000 cmp r7, #0
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
a000d1d0: 15934008 ldrne r4, [r3, #8]
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
a000d1d4: e2822001 add r2, r2, #1
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
a000d1d8: 01a0c007 moveq ip, r7
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
a000d1dc: e794a102 ldr sl, [r4, r2, lsl #2]
a000d1e0: e28cc001 add ip, ip, #1
a000d1e4: e783a10c str sl, [r3, ip, lsl #2]
if (c->child[dir])
a000d1e8: e794c102 ldr ip, [r4, r2, lsl #2]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
a000d1ec: e7843102 str r3, [r4, r2, lsl #2]
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
if (c->child[dir])
a000d1f0: e35c0000 cmp ip, #0
c->child[dir]->parent = the_node;
a000d1f4: 158c3000 strne r3, [ip]
a000d1f8: 15931000 ldrne r1, [r3]
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
a000d1fc: e5912004 ldr r2, [r1, #4]
c->parent = the_node->parent;
a000d200: e5841000 str r1, [r4]
the_node->parent = c;
a000d204: e5834000 str r4, [r3]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
a000d208: e1530002 cmp r3, r2
a000d20c: 13a02008 movne r2, #8
a000d210: 03a02004 moveq r2, #4
a000d214: e7824001 str r4, [r2, r1]
c->parent = the_node->parent;
the_node->parent = c;
a000d218: e7932108 ldr r2, [r3, r8, lsl #2]
a000d21c: eaffffbb b a000d110 <_RBTree_Extract_validate_unprotected+0x4c>
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
a000d220: e3a02000 mov r2, #0
a000d224: e583200c str r2, [r3, #12]
break;
a000d228: eaffffd6 b a000d188 <_RBTree_Extract_validate_unprotected+0xc4>
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
a000d22c: e1a02001 mov r2, r1 <== NOT EXECUTED
a000d230: eaffffcf b a000d174 <_RBTree_Extract_validate_unprotected+0xb0><== NOT EXECUTED
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
a000d234: e5936004 ldr r6, [r3, #4]
a000d238: e0566000 subs r6, r6, r0
a000d23c: 13a06001 movne r6, #1
* This function maintains the properties of the red-black tree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
static void _RBTree_Extract_validate_unprotected(
a000d240: e2265001 eor r5, r6, #1
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) {
a000d244: e285c001 add ip, r5, #1
a000d248: e792410c ldr r4, [r2, ip, lsl #2]
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
a000d24c: e3540000 cmp r4, #0
a000d250: 0a000003 beq a000d264 <_RBTree_Extract_validate_unprotected+0x1a0>
a000d254: e594700c ldr r7, [r4, #12]
a000d258: e3570001 cmp r7, #1
a000d25c: 0793710c ldreq r7, [r3, ip, lsl #2]
a000d260: 0a00001f beq a000d2e4 <_RBTree_Extract_validate_unprotected+0x220>
* This function maintains the properties of the red-black tree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
static void _RBTree_Extract_validate_unprotected(
a000d264: e2254001 eor r4, r5, #1
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
a000d268: e2848001 add r8, r4, #1
a000d26c: e792a108 ldr sl, [r2, r8, lsl #2]
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) {
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
a000d270: e2867001 add r7, r6, #1
a000d274: e7928107 ldr r8, [r2, r7, lsl #2]
a000d278: e35a0000 cmp sl, #0
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) {
sibling->color = RBT_RED;
a000d27c: e3a07001 mov r7, #1
sibling->child[dir]->color = RBT_BLACK;
a000d280: e3a0a000 mov sl, #0
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) {
sibling->color = RBT_RED;
a000d284: e582700c str r7, [r2, #12]
sibling->child[dir]->color = RBT_BLACK;
a000d288: e588a00c str sl, [r8, #12]
a000d28c: 0a000011 beq a000d2d8 <_RBTree_Extract_validate_unprotected+0x214>
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
a000d290: e3540000 cmp r4, #0
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
a000d294: 05921004 ldreq r1, [r2, #4]
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
a000d298: 11a04007 movne r4, r7
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
a000d29c: e2844001 add r4, r4, #1
a000d2a0: e791810c ldr r8, [r1, ip, lsl #2]
a000d2a4: e7828104 str r8, [r2, r4, lsl #2]
if (c->child[dir])
a000d2a8: e791410c ldr r4, [r1, ip, lsl #2]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
a000d2ac: e781210c str r2, [r1, ip, lsl #2]
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
if (c->child[dir])
a000d2b0: e3540000 cmp r4, #0
c->child[dir]->parent = the_node;
a000d2b4: 15842000 strne r2, [r4]
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
a000d2b8: e5924000 ldr r4, [r2]
a000d2bc: e5947004 ldr r7, [r4, #4]
c->parent = the_node->parent;
a000d2c0: e5814000 str r4, [r1]
the_node->parent = c;
a000d2c4: e5821000 str r1, [r2]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
a000d2c8: e1520007 cmp r2, r7
a000d2cc: 13a02008 movne r2, #8
a000d2d0: 03a02004 moveq r2, #4
a000d2d4: e7821004 str r1, [r2, r4]
_RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir));
sibling = parent->child[_RBTree_Opposite_direction(dir)];
a000d2d8: e793210c ldr r2, [r3, ip, lsl #2]
a000d2dc: e792410c ldr r4, [r2, ip, lsl #2]
a000d2e0: e1a07002 mov r7, r2
}
sibling->color = parent->color;
a000d2e4: e593c00c ldr ip, [r3, #12]
parent->color = RBT_BLACK;
a000d2e8: e3a01000 mov r1, #0
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
a000d2ec: e1570001 cmp r7, r1
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir));
sibling = parent->child[_RBTree_Opposite_direction(dir)];
}
sibling->color = parent->color;
a000d2f0: e582c00c str ip, [r2, #12]
parent->color = RBT_BLACK;
a000d2f4: e583100c str r1, [r3, #12]
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
a000d2f8: e584100c str r1, [r4, #12]
a000d2fc: 0affffa1 beq a000d188 <_RBTree_Extract_validate_unprotected+0xc4>
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
a000d300: e1550001 cmp r5, r1
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
a000d304: 05932004 ldreq r2, [r3, #4]
a000d308: 15932008 ldrne r2, [r3, #8]
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
a000d30c: e2866001 add r6, r6, #1
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
a000d310: 13a05001 movne r5, #1
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
a000d314: e7921106 ldr r1, [r2, r6, lsl #2]
a000d318: e2855001 add r5, r5, #1
a000d31c: e7831105 str r1, [r3, r5, lsl #2]
if (c->child[dir])
a000d320: e7921106 ldr r1, [r2, r6, lsl #2]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
a000d324: e7823106 str r3, [r2, r6, lsl #2]
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
if (c->child[dir])
a000d328: e3510000 cmp r1, #0
c->child[dir]->parent = the_node;
a000d32c: 15813000 strne r3, [r1]
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
a000d330: e5931000 ldr r1, [r3]
a000d334: e591c004 ldr ip, [r1, #4]
c->parent = the_node->parent;
a000d338: e5821000 str r1, [r2]
the_node->parent = c;
a000d33c: e5832000 str r2, [r3]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
a000d340: e153000c cmp r3, ip
a000d344: 13a03008 movne r3, #8
a000d348: 03a03004 moveq r3, #4
a000d34c: e7832001 str r2, [r3, r1]
a000d350: eaffff8c b a000d188 <_RBTree_Extract_validate_unprotected+0xc4>
a0010228 <_RTEMS_tasks_Delete_extension>:
static void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
a0010228: e92d4030 push {r4, r5, lr}
a001022c: e1a05001 mov r5, r1
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
a0010230: e59110fc ldr r1, [r1, #252] ; 0xfc
deleted->task_variables = NULL;
a0010234: e3a03000 mov r3, #0
a0010238: e58530fc str r3, [r5, #252] ; 0xfc
while (tvp) {
a001023c: e1510003 cmp r1, r3
a0010240: 1a000001 bne a001024c <_RTEMS_tasks_Delete_extension+0x24>
a0010244: ea000005 b a0010260 <_RTEMS_tasks_Delete_extension+0x38>
next = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
tvp = next;
a0010248: e1a01004 mov r1, r4 <== NOT EXECUTED
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
next = (rtems_task_variable_t *)tvp->next;
a001024c: e5914000 ldr r4, [r1] <== NOT EXECUTED
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
a0010250: e1a00005 mov r0, r5 <== NOT EXECUTED
a0010254: eb000040 bl a001035c <_RTEMS_Tasks_Invoke_task_variable_dtor><== NOT EXECUTED
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
a0010258: e3540000 cmp r4, #0 <== NOT EXECUTED
a001025c: 1afffff9 bne a0010248 <_RTEMS_tasks_Delete_extension+0x20> <== NOT EXECUTED
/*
* Free API specific memory
*/
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
a0010260: e59500f0 ldr r0, [r5, #240] ; 0xf0
a0010264: ebfff7a3 bl a000e0f8 <_Workspace_Free>
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
a0010268: e3a03000 mov r3, #0
a001026c: e58530f0 str r3, [r5, #240] ; 0xf0
}
a0010270: e8bd8030 pop {r4, r5, pc}
a00101ac <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
a00101ac: e59030fc ldr r3, [r0, #252] ; 0xfc
while (tvp) {
a00101b0: e3530000 cmp r3, #0
a00101b4: 0a000007 beq a00101d8 <_RTEMS_tasks_Switch_extension+0x2c>
tvp->tval = *tvp->ptr;
a00101b8: e5932004 ldr r2, [r3, #4]
*tvp->ptr = tvp->gval;
a00101bc: e5930008 ldr r0, [r3, #8]
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
a00101c0: e592c000 ldr ip, [r2]
a00101c4: e583c00c str ip, [r3, #12]
*tvp->ptr = tvp->gval;
a00101c8: e5820000 str r0, [r2]
tvp = (rtems_task_variable_t *)tvp->next;
a00101cc: e5933000 ldr r3, [r3]
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
a00101d0: e3530000 cmp r3, #0
a00101d4: 1afffff7 bne a00101b8 <_RTEMS_tasks_Switch_extension+0xc>
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
a00101d8: e59130fc ldr r3, [r1, #252] ; 0xfc
while (tvp) {
a00101dc: e3530000 cmp r3, #0
a00101e0: 012fff1e bxeq lr
tvp->gval = *tvp->ptr;
a00101e4: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
*tvp->ptr = tvp->tval;
a00101e8: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
a00101ec: e5920000 ldr r0, [r2] <== NOT EXECUTED
a00101f0: e5830008 str r0, [r3, #8] <== NOT EXECUTED
*tvp->ptr = tvp->tval;
a00101f4: e5821000 str r1, [r2] <== NOT EXECUTED
tvp = (rtems_task_variable_t *)tvp->next;
a00101f8: e5933000 ldr r3, [r3] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
a00101fc: e3530000 cmp r3, #0 <== NOT EXECUTED
a0010200: 1afffff7 bne a00101e4 <_RTEMS_tasks_Switch_extension+0x38> <== NOT EXECUTED
a0010204: e12fff1e bx lr <== NOT EXECUTED
a0037708 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
a0037708: e92d4010 push {r4, lr} <== NOT EXECUTED
a003770c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a0037710: e1a01000 mov r1, r0 <== NOT EXECUTED
a0037714: e1a0200d mov r2, sp <== NOT EXECUTED
a0037718: e59f0094 ldr r0, [pc, #148] ; a00377b4 <_Rate_monotonic_Timeout+0xac><== NOT EXECUTED
a003771c: ebff549c bl a000c994 <_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 ) {
a0037720: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a0037724: e1a04000 mov r4, r0 <== NOT EXECUTED
a0037728: e3530000 cmp r3, #0 <== NOT EXECUTED
a003772c: 1a000010 bne a0037774 <_Rate_monotonic_Timeout+0x6c> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_thread = the_period->owner;
a0037730: 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);
a0037734: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
a0037738: e3130901 tst r3, #16384 ; 0x4000 <== NOT EXECUTED
a003773c: 0a000003 beq a0037750 <_Rate_monotonic_Timeout+0x48> <== NOT EXECUTED
a0037740: e5902020 ldr r2, [r0, #32] <== NOT EXECUTED
a0037744: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a0037748: e1520003 cmp r2, r3 <== NOT EXECUTED
a003774c: 0a000014 beq a00377a4 <_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 ) {
a0037750: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
a0037754: 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;
a0037758: 13a03004 movne r3, #4 <== NOT EXECUTED
a003775c: 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 ) {
a0037760: 0a000005 beq a003777c <_Rate_monotonic_Timeout+0x74> <== NOT EXECUTED
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a0037764: e59f304c ldr r3, [pc, #76] ; a00377b8 <_Rate_monotonic_Timeout+0xb0><== NOT EXECUTED
a0037768: e5932000 ldr r2, [r3] <== NOT EXECUTED
--level;
a003776c: e2422001 sub r2, r2, #1 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
a0037770: e5832000 str r2, [r3] <== NOT EXECUTED
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
a0037774: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0037778: 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;
a003777c: e3a03003 mov r3, #3 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
a0037780: 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;
a0037784: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
a0037788: ebffff49 bl a00374b4 <_Rate_monotonic_Initiate_statistics> <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a003778c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0037790: e59f0024 ldr r0, [pc, #36] ; a00377bc <_Rate_monotonic_Timeout+0xb4><== NOT EXECUTED
a0037794: e2841010 add r1, r4, #16 <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a0037798: e584301c str r3, [r4, #28] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a003779c: ebff5b37 bl a000e480 <_Watchdog_Insert> <== NOT EXECUTED
a00377a0: eaffffef b a0037764 <_Rate_monotonic_Timeout+0x5c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a00377a4: e59f1014 ldr r1, [pc, #20] ; a00377c0 <_Rate_monotonic_Timeout+0xb8><== NOT EXECUTED
a00377a8: ebff5731 bl a000d474 <_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 );
a00377ac: e1a00004 mov r0, r4 <== NOT EXECUTED
a00377b0: eafffff4 b a0037788 <_Rate_monotonic_Timeout+0x80> <== NOT EXECUTED
a000e334 <_Scheduler_CBS_Budget_callout>:
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server_id server_id;
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
a000e334: e59010ac ldr r1, [r0, #172] ; 0xac <== NOT EXECUTED
if ( the_thread->real_priority != new_priority )
a000e338: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
a000e33c: e92d4010 push {r4, lr} <== NOT EXECUTED
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server_id server_id;
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
if ( the_thread->real_priority != new_priority )
a000e340: e1530001 cmp r3, r1 <== NOT EXECUTED
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
a000e344: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
Scheduler_CBS_Server_id server_id;
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
if ( the_thread->real_priority != new_priority )
the_thread->real_priority = new_priority;
a000e348: 15801018 strne r1, [r0, #24] <== NOT EXECUTED
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
a000e34c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
if ( the_thread->real_priority != new_priority )
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
a000e350: e1530001 cmp r3, r1 <== NOT EXECUTED
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
a000e354: e1a04000 mov r4, r0 <== NOT EXECUTED
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
if ( the_thread->real_priority != new_priority )
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
a000e358: 0a000001 beq a000e364 <_Scheduler_CBS_Budget_callout+0x30> <== NOT EXECUTED
_Thread_Change_priority(the_thread, new_priority, true);
a000e35c: e3a02001 mov r2, #1 <== NOT EXECUTED
a000e360: eb000173 bl a000e934 <_Thread_Change_priority> <== NOT EXECUTED
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
a000e364: e5944088 ldr r4, [r4, #136] ; 0x88 <== NOT EXECUTED
if ( sched_info->cbs_server->cbs_budget_overrun ) {
a000e368: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
a000e36c: e593200c ldr r2, [r3, #12] <== NOT EXECUTED
a000e370: e3520000 cmp r2, #0 <== NOT EXECUTED
a000e374: 0a000006 beq a000e394 <_Scheduler_CBS_Budget_callout+0x60> <== NOT EXECUTED
_Scheduler_CBS_Get_server_id(
a000e378: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000e37c: e1a0100d mov r1, sp <== NOT EXECUTED
a000e380: ebffffd2 bl a000e2d0 <_Scheduler_CBS_Get_server_id> <== NOT EXECUTED
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
a000e384: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
a000e388: e59d0000 ldr r0, [sp] <== NOT EXECUTED
a000e38c: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
a000e390: e12fff33 blx r3 <== NOT EXECUTED
}
}
a000e394: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000e398: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000dea8 <_Scheduler_CBS_Cleanup>:
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Cleanup (void)
{
a000dea8: e92d4070 push {r4, r5, r6, lr}
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
a000deac: e59f5058 ldr r5, [pc, #88] ; a000df0c <_Scheduler_CBS_Cleanup+0x64>
a000deb0: e5953000 ldr r3, [r5]
a000deb4: e3530000 cmp r3, #0
a000deb8: 0a000010 beq a000df00 <_Scheduler_CBS_Cleanup+0x58>
a000debc: e59f604c ldr r6, [pc, #76] ; a000df10 <_Scheduler_CBS_Cleanup+0x68>
a000dec0: e3a04000 mov r4, #0
a000dec4: e5962000 ldr r2, [r6]
if ( _Scheduler_CBS_Server_list[ i ] )
a000dec8: e7923104 ldr r3, [r2, r4, lsl #2]
_Scheduler_CBS_Destroy_server( i );
a000decc: e1a00004 mov r0, r4
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
a000ded0: e2844001 add r4, r4, #1
if ( _Scheduler_CBS_Server_list[ i ] )
a000ded4: e3530000 cmp r3, #0
a000ded8: 0a000001 beq a000dee4 <_Scheduler_CBS_Cleanup+0x3c>
_Scheduler_CBS_Destroy_server( i );
a000dedc: eb000043 bl a000dff0 <_Scheduler_CBS_Destroy_server>
a000dee0: e5962000 ldr r2, [r6]
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
a000dee4: e5953000 ldr r3, [r5]
a000dee8: e1530004 cmp r3, r4
a000deec: 8afffff5 bhi a000dec8 <_Scheduler_CBS_Cleanup+0x20>
if ( _Scheduler_CBS_Server_list[ i ] )
_Scheduler_CBS_Destroy_server( i );
}
_Workspace_Free( _Scheduler_CBS_Server_list );
a000def0: e1a00002 mov r0, r2
a000def4: eb0007de bl a000fe74 <_Workspace_Free>
return SCHEDULER_CBS_OK;
}
a000def8: e3a00000 mov r0, #0
a000defc: e8bd8070 pop {r4, r5, r6, pc}
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
a000df00: e59f3008 ldr r3, [pc, #8] ; a000df10 <_Scheduler_CBS_Cleanup+0x68><== NOT EXECUTED
a000df04: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000df08: eafffff8 b a000def0 <_Scheduler_CBS_Cleanup+0x48> <== NOT EXECUTED
a000df14 <_Scheduler_CBS_Create_server>:
)
{
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
a000df14: e5903004 ldr r3, [r0, #4]
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
a000df18: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
a000df1c: e3530000 cmp r3, #0
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
a000df20: e1a04000 mov r4, r0
a000df24: e1a05001 mov r5, r1
a000df28: e1a07002 mov r7, r2
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
a000df2c: da000029 ble a000dfd8 <_Scheduler_CBS_Create_server+0xc4>
a000df30: e5903000 ldr r3, [r0]
a000df34: e3530000 cmp r3, #0
a000df38: da000026 ble a000dfd8 <_Scheduler_CBS_Create_server+0xc4>
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
a000df3c: e59f30a4 ldr r3, [pc, #164] ; a000dfe8 <_Scheduler_CBS_Create_server+0xd4>
a000df40: e5930000 ldr r0, [r3]
a000df44: e3500000 cmp r0, #0
a000df48: 0a00000d beq a000df84 <_Scheduler_CBS_Create_server+0x70>
if ( !_Scheduler_CBS_Server_list[i] )
a000df4c: e59f8098 ldr r8, [pc, #152] ; a000dfec <_Scheduler_CBS_Create_server+0xd8>
a000df50: e5986000 ldr r6, [r8]
a000df54: e596a000 ldr sl, [r6]
a000df58: e35a0000 cmp sl, #0
a000df5c: 11a02006 movne r2, r6
a000df60: 13a03000 movne r3, #0
a000df64: 1a000003 bne a000df78 <_Scheduler_CBS_Create_server+0x64>
a000df68: ea000018 b a000dfd0 <_Scheduler_CBS_Create_server+0xbc>
a000df6c: e5b21004 ldr r1, [r2, #4]!
a000df70: e3510000 cmp r1, #0
a000df74: 0a000004 beq a000df8c <_Scheduler_CBS_Create_server+0x78>
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
a000df78: e2833001 add r3, r3, #1
a000df7c: e1530000 cmp r3, r0
a000df80: 1afffff9 bne a000df6c <_Scheduler_CBS_Create_server+0x58>
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
a000df84: e3e00019 mvn r0, #25
a000df88: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
a000df8c: e1a0a103 lsl sl, r3, #2
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
a000df90: e5873000 str r3, [r7]
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
a000df94: e3a00010 mov r0, #16
a000df98: eb0007af bl a000fe5c <_Workspace_Allocate>
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
a000df9c: e786000a str r0, [r6, sl]
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
a000dfa0: e5972000 ldr r2, [r7]
a000dfa4: e5983000 ldr r3, [r8]
a000dfa8: e7933102 ldr r3, [r3, r2, lsl #2]
if ( !the_server )
a000dfac: e3530000 cmp r3, #0
a000dfb0: 0a00000a beq a000dfe0 <_Scheduler_CBS_Create_server+0xcc>
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
the_server->task_id = -1;
a000dfb4: e3e02000 mvn r2, #0
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
a000dfb8: e89400c0 ldm r4, {r6, r7}
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
a000dfbc: e3a00000 mov r0, #0
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
a000dfc0: e98300c0 stmib r3, {r6, r7}
the_server->task_id = -1;
a000dfc4: e5832000 str r2, [r3]
the_server->cbs_budget_overrun = budget_overrun_callback;
a000dfc8: e583500c str r5, [r3, #12]
return SCHEDULER_CBS_OK;
a000dfcc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( !_Scheduler_CBS_Server_list[i] )
a000dfd0: e1a0300a mov r3, sl
a000dfd4: eaffffed b a000df90 <_Scheduler_CBS_Create_server+0x7c>
if ( params->budget <= 0 ||
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
a000dfd8: e3e00011 mvn r0, #17
a000dfdc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
a000dfe0: e3e00010 mvn r0, #16 <== NOT EXECUTED
the_server->parameters = *params;
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
a000dfe4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000e154 <_Scheduler_CBS_Get_execution_time>:
)
{
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
a000e154: e59f3098 ldr r3, [pc, #152] ; a000e1f4 <_Scheduler_CBS_Get_execution_time+0xa0>
int _Scheduler_CBS_Get_execution_time (
Scheduler_CBS_Server_id server_id,
time_t *exec_time,
time_t *abs_time
)
{
a000e158: e92d40f0 push {r4, r5, r6, r7, lr}
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
a000e15c: e5933000 ldr r3, [r3]
int _Scheduler_CBS_Get_execution_time (
Scheduler_CBS_Server_id server_id,
time_t *exec_time,
time_t *abs_time
)
{
a000e160: e1a04000 mov r4, r0
a000e164: e24dd004 sub sp, sp, #4
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
a000e168: e1530000 cmp r3, r0
int _Scheduler_CBS_Get_execution_time (
Scheduler_CBS_Server_id server_id,
time_t *exec_time,
time_t *abs_time
)
{
a000e16c: e1a06001 mov r6, r1
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
a000e170: 93e00011 mvnls r0, #17
)
{
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
a000e174: 9a000016 bls a000e1d4 <_Scheduler_CBS_Get_execution_time+0x80>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
a000e178: e59f5078 ldr r5, [pc, #120] ; a000e1f8 <_Scheduler_CBS_Get_execution_time+0xa4>
a000e17c: e5953000 ldr r3, [r5]
a000e180: e7933104 ldr r3, [r3, r4, lsl #2]
a000e184: e3530000 cmp r3, #0
return SCHEDULER_CBS_ERROR_NOSERVER;
a000e188: 03e00018 mvneq r0, #24
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
a000e18c: 0a000010 beq a000e1d4 <_Scheduler_CBS_Get_execution_time+0x80>
return SCHEDULER_CBS_ERROR_NOSERVER;
if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) {
a000e190: e5930000 ldr r0, [r3]
a000e194: e3700001 cmn r0, #1
*exec_time = 0;
a000e198: 03a00000 moveq r0, #0
a000e19c: 05810000 streq r0, [r1]
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) {
a000e1a0: 0a00000b beq a000e1d4 <_Scheduler_CBS_Get_execution_time+0x80>
*exec_time = 0;
return SCHEDULER_CBS_OK;
}
the_thread = _Thread_Get(
a000e1a4: e1a0100d mov r1, sp <== NOT EXECUTED
a000e1a8: eb00031c bl a000ee20 <_Thread_Get> <== NOT EXECUTED
_Scheduler_CBS_Server_list[server_id]->task_id,
&location
);
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
a000e1ac: e2507000 subs r7, r0, #0 <== NOT EXECUTED
a000e1b0: 0a000009 beq a000e1dc <_Scheduler_CBS_Get_execution_time+0x88><== NOT EXECUTED
_Thread_Enable_dispatch();
a000e1b4: eb000311 bl a000ee00 <_Thread_Enable_dispatch> <== NOT EXECUTED
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget -
a000e1b8: e5952000 ldr r2, [r5] <== NOT EXECUTED
a000e1bc: e5973074 ldr r3, [r7, #116] ; 0x74 <== NOT EXECUTED
the_thread->cpu_time_budget;
}
else {
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
}
return SCHEDULER_CBS_OK;
a000e1c0: e3a00000 mov r0, #0 <== NOT EXECUTED
&location
);
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
_Thread_Enable_dispatch();
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget -
a000e1c4: e7922104 ldr r2, [r2, r4, lsl #2] <== NOT EXECUTED
a000e1c8: e5922008 ldr r2, [r2, #8] <== NOT EXECUTED
a000e1cc: e0633002 rsb r3, r3, r2 <== NOT EXECUTED
a000e1d0: e5863000 str r3, [r6] <== NOT EXECUTED
}
else {
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
}
return SCHEDULER_CBS_OK;
}
a000e1d4: e28dd004 add sp, sp, #4
a000e1d8: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Thread_Enable_dispatch();
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget -
the_thread->cpu_time_budget;
}
else {
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
a000e1dc: e5953000 ldr r3, [r5] <== NOT EXECUTED
}
return SCHEDULER_CBS_OK;
a000e1e0: e1a00007 mov r0, r7 <== NOT EXECUTED
_Thread_Enable_dispatch();
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget -
the_thread->cpu_time_budget;
}
else {
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
a000e1e4: e7933104 ldr r3, [r3, r4, lsl #2] <== NOT EXECUTED
a000e1e8: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
a000e1ec: e5863000 str r3, [r6] <== NOT EXECUTED
a000e1f0: eafffff7 b a000e1d4 <_Scheduler_CBS_Get_execution_time+0x80><== NOT EXECUTED
a000e244 <_Scheduler_CBS_Get_remaining_budget>:
)
{
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
a000e244: e59f307c ldr r3, [pc, #124] ; a000e2c8 <_Scheduler_CBS_Get_remaining_budget+0x84>
int _Scheduler_CBS_Get_remaining_budget (
Scheduler_CBS_Server_id server_id,
time_t *remaining_budget
)
{
a000e248: e92d4030 push {r4, r5, lr}
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
a000e24c: e5933000 ldr r3, [r3]
int _Scheduler_CBS_Get_remaining_budget (
Scheduler_CBS_Server_id server_id,
time_t *remaining_budget
)
{
a000e250: e24dd004 sub sp, sp, #4
a000e254: e1a04001 mov r4, r1
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
a000e258: e1530000 cmp r3, r0
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
a000e25c: 93e00011 mvnls r0, #17
)
{
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
a000e260: 9a000012 bls a000e2b0 <_Scheduler_CBS_Get_remaining_budget+0x6c>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
a000e264: e59f3060 ldr r3, [pc, #96] ; a000e2cc <_Scheduler_CBS_Get_remaining_budget+0x88>
a000e268: e5933000 ldr r3, [r3]
a000e26c: e7933100 ldr r3, [r3, r0, lsl #2]
a000e270: e3530000 cmp r3, #0
return SCHEDULER_CBS_ERROR_NOSERVER;
a000e274: 03e00018 mvneq r0, #24
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
a000e278: 0a00000c beq a000e2b0 <_Scheduler_CBS_Get_remaining_budget+0x6c>
return SCHEDULER_CBS_ERROR_NOSERVER;
if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) {
a000e27c: e5930000 ldr r0, [r3]
a000e280: e3700001 cmn r0, #1
a000e284: 0a00000b beq a000e2b8 <_Scheduler_CBS_Get_remaining_budget+0x74>
*remaining_budget = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
return SCHEDULER_CBS_OK;
}
the_thread = _Thread_Get(
a000e288: e1a0100d mov r1, sp <== NOT EXECUTED
a000e28c: eb0002e3 bl a000ee20 <_Thread_Get> <== NOT EXECUTED
_Scheduler_CBS_Server_list[server_id]->task_id,
&location
);
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
a000e290: e2505000 subs r5, r0, #0 <== NOT EXECUTED
_Thread_Enable_dispatch();
*remaining_budget = the_thread->cpu_time_budget;
}
else {
*remaining_budget = 0;
a000e294: 05845000 streq r5, [r4] <== NOT EXECUTED
}
return SCHEDULER_CBS_OK;
a000e298: 01a00005 moveq r0, r5 <== NOT EXECUTED
the_thread = _Thread_Get(
_Scheduler_CBS_Server_list[server_id]->task_id,
&location
);
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
a000e29c: 0a000003 beq a000e2b0 <_Scheduler_CBS_Get_remaining_budget+0x6c><== NOT EXECUTED
_Thread_Enable_dispatch();
a000e2a0: eb0002d6 bl a000ee00 <_Thread_Enable_dispatch> <== NOT EXECUTED
*remaining_budget = the_thread->cpu_time_budget;
a000e2a4: e5953074 ldr r3, [r5, #116] ; 0x74 <== NOT EXECUTED
}
else {
*remaining_budget = 0;
}
return SCHEDULER_CBS_OK;
a000e2a8: e3a00000 mov r0, #0 <== NOT EXECUTED
&location
);
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
_Thread_Enable_dispatch();
*remaining_budget = the_thread->cpu_time_budget;
a000e2ac: e5843000 str r3, [r4] <== NOT EXECUTED
else {
*remaining_budget = 0;
}
return SCHEDULER_CBS_OK;
}
a000e2b0: e28dd004 add sp, sp, #4
a000e2b4: e8bd8030 pop {r4, r5, pc}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) {
*remaining_budget = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
a000e2b8: e5933008 ldr r3, [r3, #8]
return SCHEDULER_CBS_OK;
a000e2bc: e3a00000 mov r0, #0
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) {
*remaining_budget = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
a000e2c0: e5813000 str r3, [r1]
return SCHEDULER_CBS_OK;
a000e2c4: eafffff9 b a000e2b0 <_Scheduler_CBS_Get_remaining_budget+0x6c>
a000e39c <_Scheduler_CBS_Initialize>:
int _Scheduler_CBS_Initialize(void)
{
a000e39c: e92d4010 push {r4, lr}
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
a000e3a0: e59f405c ldr r4, [pc, #92] ; a000e404 <_Scheduler_CBS_Initialize+0x68>
a000e3a4: e5940000 ldr r0, [r4]
a000e3a8: e1a00100 lsl r0, r0, #2
a000e3ac: eb0006aa bl a000fe5c <_Workspace_Allocate>
a000e3b0: e59f1050 ldr r1, [pc, #80] ; a000e408 <_Scheduler_CBS_Initialize+0x6c>
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
a000e3b4: e3500000 cmp r0, #0
}
int _Scheduler_CBS_Initialize(void)
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
a000e3b8: e5810000 str r0, [r1]
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
a000e3bc: 0a00000e beq a000e3fc <_Scheduler_CBS_Initialize+0x60>
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
a000e3c0: e5942000 ldr r2, [r4]
a000e3c4: e3520000 cmp r2, #0
a000e3c8: 0a000009 beq a000e3f4 <_Scheduler_CBS_Initialize+0x58>
a000e3cc: e3a03000 mov r3, #0
_Scheduler_CBS_Server_list[i] = NULL;
a000e3d0: e1a0c003 mov ip, r3
a000e3d4: ea000000 b a000e3dc <_Scheduler_CBS_Initialize+0x40>
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
a000e3d8: e5910000 ldr r0, [r1]
_Scheduler_CBS_Server_list[i] = NULL;
a000e3dc: e780c103 str ip, [r0, r3, lsl #2]
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
a000e3e0: e2833001 add r3, r3, #1
a000e3e4: e1530002 cmp r3, r2
a000e3e8: 1afffffa bne a000e3d8 <_Scheduler_CBS_Initialize+0x3c>
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
a000e3ec: e3a00000 mov r0, #0
}
a000e3f0: e8bd8010 pop {r4, pc}
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
a000e3f4: e1a00002 mov r0, r2 <== NOT EXECUTED
a000e3f8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
a000e3fc: e3e00010 mvn r0, #16 <== NOT EXECUTED
a000e400: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000cf04 <_Scheduler_CBS_Release_job>:
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
(Scheduler_CBS_Server *) sched_info->cbs_server;
a000cf04: e5903088 ldr r3, [r0, #136] ; 0x88 <== NOT EXECUTED
if (deadline) {
a000cf08: e3510000 cmp r1, #0 <== NOT EXECUTED
)
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
a000cf0c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
(Scheduler_CBS_Server *) sched_info->cbs_server;
if (deadline) {
a000cf10: 0a00000b beq a000cf44 <_Scheduler_CBS_Release_job+0x40> <== NOT EXECUTED
/* Initializing or shifting deadline. */
if (serv_info)
a000cf14: e3530000 cmp r3, #0 <== NOT EXECUTED
a000cf18: 0a00000d beq a000cf54 <_Scheduler_CBS_Release_job+0x50> <== NOT EXECUTED
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
a000cf1c: e59f1044 ldr r1, [pc, #68] ; a000cf68 <_Scheduler_CBS_Release_job+0x64><== NOT EXECUTED
a000cf20: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000cf24: e5911000 ldr r1, [r1] <== NOT EXECUTED
a000cf28: e0811002 add r1, r1, r2 <== NOT EXECUTED
a000cf2c: e3c11102 bic r1, r1, #-2147483648 ; 0x80000000 <== NOT EXECUTED
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
the_thread->cpu_time_budget = serv_info->parameters.budget;
a000cf30: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
a000cf34: e5803074 str r3, [r0, #116] ; 0x74 <== NOT EXECUTED
the_thread->real_priority = new_priority;
_Thread_Change_priority(the_thread, new_priority, true);
a000cf38: e3a02001 mov r2, #1 <== NOT EXECUTED
/* Budget replenishment for the next job. */
if (serv_info)
the_thread->cpu_time_budget = serv_info->parameters.budget;
the_thread->real_priority = new_priority;
a000cf3c: e5801018 str r1, [r0, #24] <== NOT EXECUTED
_Thread_Change_priority(the_thread, new_priority, true);
a000cf40: ea00011f b a000d3c4 <_Thread_Change_priority> <== NOT EXECUTED
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
a000cf44: e3530000 cmp r3, #0 <== NOT EXECUTED
new_priority = (_Watchdog_Ticks_since_boot + deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
a000cf48: e59010ac ldr r1, [r0, #172] ; 0xac <== NOT EXECUTED
}
/* Budget replenishment for the next job. */
if (serv_info)
a000cf4c: 1afffff7 bne a000cf30 <_Scheduler_CBS_Release_job+0x2c> <== NOT EXECUTED
a000cf50: eafffff8 b a000cf38 <_Scheduler_CBS_Release_job+0x34> <== NOT EXECUTED
/* Initializing or shifting deadline. */
if (serv_info)
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
a000cf54: e59f300c ldr r3, [pc, #12] ; a000cf68 <_Scheduler_CBS_Release_job+0x64><== NOT EXECUTED
a000cf58: e5933000 ldr r3, [r3] <== NOT EXECUTED
a000cf5c: e0811003 add r1, r1, r3 <== NOT EXECUTED
a000cf60: e3c11102 bic r1, r1, #-2147483648 ; 0x80000000 <== NOT EXECUTED
a000cf64: eafffff3 b a000cf38 <_Scheduler_CBS_Release_job+0x34> <== NOT EXECUTED
a000cf6c <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
a000cf6c: e92d4030 push {r4, r5, lr}
a000cf70: e1a04000 mov r4, r0
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
a000cf74: eb000041 bl a000d080 <_Scheduler_EDF_Enqueue>
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
a000cf78: e5943088 ldr r3, [r4, #136] ; 0x88
a000cf7c: e5933018 ldr r3, [r3, #24]
* Late unblock rule for deadline-driven tasks. The remaining time to
* deadline must be sufficient to serve the remaining computation time
* without increased utilization of this task. It might cause a deadline
* miss of another task.
*/
if (serv_info) {
a000cf80: e3530000 cmp r3, #0
a000cf84: 0a00000a beq a000cfb4 <_Scheduler_CBS_Unblock+0x48>
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
a000cf88: e59f10a0 ldr r1, [pc, #160] ; a000d030 <_Scheduler_CBS_Unblock+0xc4><== NOT EXECUTED
a000cf8c: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
a000cf90: e593c004 ldr ip, [r3, #4] <== NOT EXECUTED
*/
if (serv_info) {
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
a000cf94: e5911000 ldr r1, [r1] <== NOT EXECUTED
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
a000cf98: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
a000cf9c: e5940074 ldr r0, [r4, #116] ; 0x74 <== NOT EXECUTED
*/
if (serv_info) {
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
a000cfa0: e0611002 rsb r1, r1, r2 <== NOT EXECUTED
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
a000cfa4: e001019c mul r1, ip, r1 <== NOT EXECUTED
a000cfa8: e0030390 mul r3, r0, r3 <== NOT EXECUTED
a000cfac: e1510003 cmp r1, r3 <== NOT EXECUTED
a000cfb0: ca000010 bgt a000cff8 <_Scheduler_CBS_Unblock+0x8c> <== NOT EXECUTED
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
if ( the_thread->real_priority != new_priority )
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
_Thread_Change_priority(the_thread, new_priority, true);
a000cfb4: e5940014 ldr r0, [r4, #20]
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
a000cfb8: e59f5074 ldr r5, [pc, #116] ; a000d034 <_Scheduler_CBS_Unblock+0xc8>
a000cfbc: e59f3074 ldr r3, [pc, #116] ; a000d038 <_Scheduler_CBS_Unblock+0xcc>
a000cfc0: e595200c ldr r2, [r5, #12]
a000cfc4: e5933030 ldr r3, [r3, #48] ; 0x30
a000cfc8: e5921014 ldr r1, [r2, #20]
a000cfcc: e12fff33 blx r3
a000cfd0: e3500000 cmp r0, #0
a000cfd4: da000006 ble a000cff4 <_Scheduler_CBS_Unblock+0x88>
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
a000cfd8: e5953008 ldr r3, [r5, #8]
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
a000cfdc: e585400c str r4, [r5, #12]
if ( _Thread_Executing->is_preemptible ||
a000cfe0: e5d33070 ldrb r3, [r3, #112] ; 0x70
a000cfe4: e3530000 cmp r3, #0
a000cfe8: 0a00000c beq a000d020 <_Scheduler_CBS_Unblock+0xb4>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
a000cfec: e3a03001 mov r3, #1
a000cff0: e5c53004 strb r3, [r5, #4]
a000cff4: e8bd8030 pop {r4, r5, pc}
time_t budget_left = the_thread->real_priority -
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
a000cff8: e59410ac ldr r1, [r4, #172] ; 0xac <== NOT EXECUTED
if ( the_thread->real_priority != new_priority )
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
a000cffc: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
if ( the_thread->real_priority != new_priority )
a000d000: e1520001 cmp r2, r1 <== NOT EXECUTED
the_thread->real_priority = new_priority;
a000d004: 15841018 strne r1, [r4, #24] <== NOT EXECUTED
if ( the_thread->current_priority != new_priority )
a000d008: e1500001 cmp r0, r1 <== NOT EXECUTED
a000d00c: 0affffe9 beq a000cfb8 <_Scheduler_CBS_Unblock+0x4c> <== NOT EXECUTED
_Thread_Change_priority(the_thread, new_priority, true);
a000d010: e1a00004 mov r0, r4 <== NOT EXECUTED
a000d014: e3a02001 mov r2, #1 <== NOT EXECUTED
a000d018: eb0000e9 bl a000d3c4 <_Thread_Change_priority> <== NOT EXECUTED
a000d01c: eaffffe4 b a000cfb4 <_Scheduler_CBS_Unblock+0x48> <== NOT EXECUTED
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
a000d020: e5943014 ldr r3, [r4, #20]
a000d024: e3530000 cmp r3, #0
a000d028: 0affffef beq a000cfec <_Scheduler_CBS_Unblock+0x80>
a000d02c: e8bd8030 pop {r4, r5, pc}
a000d07c <_Scheduler_EDF_Enqueue_first>:
void _Scheduler_EDF_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler_EDF_Enqueue(the_thread);
a000d07c: eaffffff b a000d080 <_Scheduler_EDF_Enqueue> <== NOT EXECUTED
a000d020 <_Scheduler_EDF_Release_job>:
uint32_t deadline
)
{
Priority_Control new_priority;
if (deadline) {
a000d020: e3510000 cmp r1, #0 <== NOT EXECUTED
/* Initializing or shifting deadline. */
new_priority = (_Watchdog_Ticks_since_boot + deadline)
a000d024: 159f3018 ldrne r3, [pc, #24] ; a000d044 <_Scheduler_EDF_Release_job+0x24><== NOT EXECUTED
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
a000d028: 059010ac ldreq r1, [r0, #172] ; 0xac <== NOT EXECUTED
}
the_thread->real_priority = new_priority;
_Thread_Change_priority(the_thread, new_priority, true);
a000d02c: e3a02001 mov r2, #1 <== NOT EXECUTED
{
Priority_Control new_priority;
if (deadline) {
/* Initializing or shifting deadline. */
new_priority = (_Watchdog_Ticks_since_boot + deadline)
a000d030: 15933000 ldrne r3, [r3] <== NOT EXECUTED
a000d034: 10811003 addne r1, r1, r3 <== NOT EXECUTED
a000d038: 13c11102 bicne r1, r1, #-2147483648 ; 0x80000000 <== NOT EXECUTED
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
the_thread->real_priority = new_priority;
a000d03c: e5801018 str r1, [r0, #24] <== NOT EXECUTED
_Thread_Change_priority(the_thread, new_priority, true);
a000d040: ea0000b5 b a000d31c <_Thread_Change_priority> <== NOT EXECUTED
a000d068 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
a000d068: e92d4030 push {r4, r5, lr}
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
a000d06c: e59f4060 ldr r4, [pc, #96] ; a000d0d4 <_Scheduler_EDF_Unblock+0x6c>
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
a000d070: e1a05000 mov r5, r0
_Scheduler_EDF_Enqueue(the_thread);
a000d074: ebffffb0 bl a000cf3c <_Scheduler_EDF_Enqueue>
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
a000d078: e594300c ldr r3, [r4, #12]
a000d07c: e5951014 ldr r1, [r5, #20]
a000d080: e5930014 ldr r0, [r3, #20]
a000d084: e59f304c ldr r3, [pc, #76] ; a000d0d8 <_Scheduler_EDF_Unblock+0x70>
a000d088: e5933030 ldr r3, [r3, #48] ; 0x30
a000d08c: e12fff33 blx r3
a000d090: e3500000 cmp r0, #0
a000d094: ba000000 blt a000d09c <_Scheduler_EDF_Unblock+0x34>
a000d098: e8bd8030 pop {r4, r5, pc}
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
a000d09c: e5943008 ldr r3, [r4, #8]
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
a000d0a0: e584500c str r5, [r4, #12]
if ( _Thread_Executing->is_preemptible ||
a000d0a4: e5d33070 ldrb r3, [r3, #112] ; 0x70
a000d0a8: e3530000 cmp r3, #0
a000d0ac: 0a000002 beq a000d0bc <_Scheduler_EDF_Unblock+0x54>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
a000d0b0: e3a03001 mov r3, #1
a000d0b4: e5c43004 strb r3, [r4, #4]
a000d0b8: e8bd8030 pop {r4, r5, pc}
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
a000d0bc: e5953014 ldr r3, [r5, #20]
a000d0c0: e3530000 cmp r3, #0
a000d0c4: 1afffff3 bne a000d098 <_Scheduler_EDF_Unblock+0x30>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
a000d0c8: e3a03001 mov r3, #1 <== NOT EXECUTED
a000d0cc: e5c43004 strb r3, [r4, #4] <== NOT EXECUTED
a000d0d0: eafffff8 b a000d0b8 <_Scheduler_EDF_Unblock+0x50> <== NOT EXECUTED
a000c8fc <_Scheduler_priority_Tick>:
void _Scheduler_priority_Tick( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
a000c8fc: e59f3090 ldr r3, [pc, #144] ; a000c994 <_Scheduler_priority_Tick+0x98>
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
a000c900: e92d4010 push {r4, lr}
Thread_Control *executing;
executing = _Thread_Executing;
a000c904: e5934008 ldr r4, [r3, #8]
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
a000c908: e5d43070 ldrb r3, [r4, #112] ; 0x70
a000c90c: e3530000 cmp r3, #0
a000c910: 0a000009 beq a000c93c <_Scheduler_priority_Tick+0x40>
return;
if ( !_States_Is_ready( executing->current_state ) )
a000c914: e5943010 ldr r3, [r4, #16]
a000c918: e3530000 cmp r3, #0
a000c91c: 1a000006 bne a000c93c <_Scheduler_priority_Tick+0x40>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
a000c920: e5943078 ldr r3, [r4, #120] ; 0x78
a000c924: e3530001 cmp r3, #1
a000c928: 3a000003 bcc a000c93c <_Scheduler_priority_Tick+0x40>
a000c92c: e3530002 cmp r3, #2 <== NOT EXECUTED
a000c930: 9a00000b bls a000c964 <_Scheduler_priority_Tick+0x68> <== NOT EXECUTED
a000c934: e3530003 cmp r3, #3 <== NOT EXECUTED
a000c938: 0a000000 beq a000c940 <_Scheduler_priority_Tick+0x44> <== NOT EXECUTED
a000c93c: 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 )
a000c940: e5943074 ldr r3, [r4, #116] ; 0x74 <== NOT EXECUTED
a000c944: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a000c948: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c94c: e5843074 str r3, [r4, #116] ; 0x74 <== NOT EXECUTED
a000c950: 1afffff9 bne a000c93c <_Scheduler_priority_Tick+0x40> <== NOT EXECUTED
(*executing->budget_callout)( executing );
a000c954: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
a000c958: e1a00004 mov r0, r4 <== NOT EXECUTED
a000c95c: e12fff33 blx r3 <== NOT EXECUTED
a000c960: eafffff5 b a000c93c <_Scheduler_priority_Tick+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 ) {
a000c964: e5943074 ldr r3, [r4, #116] ; 0x74 <== NOT EXECUTED
a000c968: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a000c96c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c970: e5843074 str r3, [r4, #116] ; 0x74 <== NOT EXECUTED
a000c974: cafffff0 bgt a000c93c <_Scheduler_priority_Tick+0x40> <== NOT EXECUTED
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
a000c978: e59f3018 ldr r3, [pc, #24] ; a000c998 <_Scheduler_priority_Tick+0x9c><== NOT EXECUTED
a000c97c: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
a000c980: 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;
a000c984: e59f3010 ldr r3, [pc, #16] ; a000c99c <_Scheduler_priority_Tick+0xa0><== NOT EXECUTED
a000c988: e5933000 ldr r3, [r3] <== NOT EXECUTED
a000c98c: e5843074 str r3, [r4, #116] ; 0x74 <== NOT EXECUTED
a000c990: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a002ab6c <_TOD_Get_uptime_as_timespec>:
#include <rtems/score/tod.h>
void _TOD_Get_uptime_as_timespec(
struct timespec *uptime
)
{
a002ab6c: e92d40d0 push {r4, r6, r7, lr} <== NOT EXECUTED
a002ab70: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
a002ab74: e1a04000 mov r4, r0 <== NOT EXECUTED
a002ab78: e59f1040 ldr r1, [pc, #64] ; a002abc0 <_TOD_Get_uptime_as_timespec+0x54><== NOT EXECUTED
a002ab7c: e1a0000d mov r0, sp <== NOT EXECUTED
a002ab80: ebff84e0 bl a000bf08 <_TOD_Get_with_nanoseconds> <== NOT EXECUTED
Timestamp_Control uptime_ts;
/* assume time checked for NULL by caller */
_TOD_Get_uptime( &uptime_ts );
_Timestamp_To_timespec( &uptime_ts, uptime );
a002ab84: e89d00c0 ldm sp, {r6, r7} <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a002ab88: e59f2034 ldr r2, [pc, #52] ; a002abc4 <_TOD_Get_uptime_as_timespec+0x58><== NOT EXECUTED
a002ab8c: e3a03000 mov r3, #0 <== NOT EXECUTED
a002ab90: e1a00006 mov r0, r6 <== NOT EXECUTED
a002ab94: e1a01007 mov r1, r7 <== NOT EXECUTED
a002ab98: eb00a853 bl a0054cec <__divdi3> <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a002ab9c: e59f2020 ldr r2, [pc, #32] ; a002abc4 <_TOD_Get_uptime_as_timespec+0x58><== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a002aba0: e5840000 str r0, [r4] <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a002aba4: e3a03000 mov r3, #0 <== NOT EXECUTED
a002aba8: e1a00006 mov r0, r6 <== NOT EXECUTED
a002abac: e1a01007 mov r1, r7 <== NOT EXECUTED
a002abb0: eb00a988 bl a00551d8 <__moddi3> <== NOT EXECUTED
a002abb4: e5840004 str r0, [r4, #4] <== NOT EXECUTED
}
a002abb8: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a002abbc: e8bd80d0 pop {r4, r6, r7, pc} <== NOT EXECUTED
a000b738 <_TOD_Tickle_ticks>:
void _TOD_Tickle_ticks( void )
{
Timestamp_Control tick;
uint32_t nanoseconds_per_tick;
nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick();
a000b738: e59f2084 ldr r2, [pc, #132] ; a000b7c4 <_TOD_Tickle_ticks+0x8c>
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
a000b73c: e59f3084 ldr r3, [pc, #132] ; a000b7c8 <_TOD_Tickle_ticks+0x90>
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, nanoseconds_per_tick );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
a000b740: e59fc084 ldr ip, [pc, #132] ; a000b7cc <_TOD_Tickle_ticks+0x94>
void _TOD_Tickle_ticks( void )
{
Timestamp_Control tick;
uint32_t nanoseconds_per_tick;
nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick();
a000b744: e5922010 ldr r2, [r2, #16]
#include <rtems/score/tod.h>
#include <rtems/score/watchdog.h>
#include <rtems/config.h>
void _TOD_Tickle_ticks( void )
{
a000b748: e92d03f0 push {r4, r5, r6, r7, r8, r9}
a000b74c: e2837008 add r7, r3, #8
a000b750: e89700c0 ldm r7, {r6, r7}
a000b754: e8930300 ldm r3, {r8, r9}
uint32_t nanoseconds_per_tick;
nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick();
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, nanoseconds_per_tick );
a000b758: e1a00002 mov r0, r2
a000b75c: e3a01000 mov r1, #0
a000b760: e0966000 adds r6, r6, r0
a000b764: e0a77001 adc r7, r7, r1
/* we do not care how much the uptime changed */
/* Update the current TOD */
_Timestamp_Add_to( &_TOD.now, &tick );
_TOD.seconds_trigger += nanoseconds_per_tick;
a000b768: e5935010 ldr r5, [r3, #16]
a000b76c: e0988000 adds r8, r8, r0
a000b770: e0a99001 adc r9, r9, r1
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, nanoseconds_per_tick );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
a000b774: e59c4000 ldr r4, [ip]
/* Update the current TOD */
_Timestamp_Add_to( &_TOD.now, &tick );
_TOD.seconds_trigger += nanoseconds_per_tick;
if ( _TOD.seconds_trigger >= 1000000000UL ) {
a000b778: e59f1050 ldr r1, [pc, #80] ; a000b7d0 <_TOD_Tickle_ticks+0x98>
/* we do not care how much the uptime changed */
/* Update the current TOD */
_Timestamp_Add_to( &_TOD.now, &tick );
_TOD.seconds_trigger += nanoseconds_per_tick;
a000b77c: e0822005 add r2, r2, r5
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, nanoseconds_per_tick );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
a000b780: e2844001 add r4, r4, #1
/* Update the current TOD */
_Timestamp_Add_to( &_TOD.now, &tick );
_TOD.seconds_trigger += nanoseconds_per_tick;
if ( _TOD.seconds_trigger >= 1000000000UL ) {
a000b784: e1520001 cmp r2, r1
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, nanoseconds_per_tick );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
a000b788: e58c4000 str r4, [ip]
a000b78c: e5836008 str r6, [r3, #8]
a000b790: e583700c str r7, [r3, #12]
a000b794: e8830300 stm r3, {r8, r9}
/* we do not care how much the uptime changed */
/* Update the current TOD */
_Timestamp_Add_to( &_TOD.now, &tick );
_TOD.seconds_trigger += nanoseconds_per_tick;
a000b798: e5832010 str r2, [r3, #16]
if ( _TOD.seconds_trigger >= 1000000000UL ) {
a000b79c: 8a000001 bhi a000b7a8 <_TOD_Tickle_ticks+0x70>
_TOD.seconds_trigger -= 1000000000UL;
_Watchdog_Tickle_seconds();
}
}
a000b7a0: e8bd03f0 pop {r4, r5, r6, r7, r8, r9}
a000b7a4: e12fff1e bx lr
/* Update the current TOD */
_Timestamp_Add_to( &_TOD.now, &tick );
_TOD.seconds_trigger += nanoseconds_per_tick;
if ( _TOD.seconds_trigger >= 1000000000UL ) {
_TOD.seconds_trigger -= 1000000000UL;
a000b7a8: e2822331 add r2, r2, #-1006632960 ; 0xc4000000 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
a000b7ac: e59f0020 ldr r0, [pc, #32] ; a000b7d4 <_TOD_Tickle_ticks+0x9c><== NOT EXECUTED
a000b7b0: e2822865 add r2, r2, #6619136 ; 0x650000 <== NOT EXECUTED
a000b7b4: e2822c36 add r2, r2, #13824 ; 0x3600 <== NOT EXECUTED
a000b7b8: e5832010 str r2, [r3, #16] <== NOT EXECUTED
_Watchdog_Tickle_seconds();
}
}
a000b7bc: e8bd03f0 pop {r4, r5, r6, r7, r8, r9} <== NOT EXECUTED
a000b7c0: ea0009d4 b a000df18 <_Watchdog_Tickle> <== NOT EXECUTED
a000b3c8 <_TOD_Validate>:
};
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
a000b3c8: 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) ||
a000b3cc: e2504000 subs r4, r0, #0
a000b3d0: 0a000029 beq a000b47c <_TOD_Validate+0xb4>
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
a000b3d4: e59f30a8 ldr r3, [pc, #168] ; a000b484 <_TOD_Validate+0xbc>
a000b3d8: e3a0093d mov r0, #999424 ; 0xf4000
a000b3dc: e2800d09 add r0, r0, #576 ; 0x240
a000b3e0: e593100c ldr r1, [r3, #12]
a000b3e4: eb004927 bl a001d888 <__aeabi_uidiv>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a000b3e8: e5943018 ldr r3, [r4, #24]
a000b3ec: e1500003 cmp r0, r3
a000b3f0: 9a00001d bls a000b46c <_TOD_Validate+0xa4>
(the_tod->ticks >= ticks_per_second) ||
a000b3f4: e5943014 ldr r3, [r4, #20]
a000b3f8: e353003b cmp r3, #59 ; 0x3b
a000b3fc: 8a00001a bhi a000b46c <_TOD_Validate+0xa4>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
a000b400: e5943010 ldr r3, [r4, #16]
a000b404: e353003b cmp r3, #59 ; 0x3b
a000b408: 8a000017 bhi a000b46c <_TOD_Validate+0xa4>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
a000b40c: e594300c ldr r3, [r4, #12]
a000b410: e3530017 cmp r3, #23
a000b414: 8a000014 bhi a000b46c <_TOD_Validate+0xa4>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
a000b418: 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) ||
a000b41c: e3500000 cmp r0, #0
a000b420: 0a000014 beq a000b478 <_TOD_Validate+0xb0>
(the_tod->month == 0) ||
a000b424: e350000c cmp r0, #12
a000b428: 8a00000f bhi a000b46c <_TOD_Validate+0xa4>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a000b42c: 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) ||
a000b430: e3a03d1f mov r3, #1984 ; 0x7c0
a000b434: e2833003 add r3, r3, #3
a000b438: e1520003 cmp r2, r3
a000b43c: 9a00000a bls a000b46c <_TOD_Validate+0xa4>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
a000b440: 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) ||
a000b444: e3540000 cmp r4, #0
a000b448: 0a000009 beq a000b474 <_TOD_Validate+0xac>
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a000b44c: e59f3034 ldr r3, [pc, #52] ; a000b488 <_TOD_Validate+0xc0>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
a000b450: e3120003 tst r2, #3
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
a000b454: 0280000d addeq r0, r0, #13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a000b458: e7930100 ldr r0, [r3, r0, lsl #2]
const uint32_t _TOD_Days_per_month[ 2 ][ 13 ] = {
{ 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
{ 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
};
bool _TOD_Validate(
a000b45c: e1500004 cmp r0, r4
a000b460: 33a00000 movcc r0, #0
a000b464: 23a00001 movcs r0, #1
a000b468: 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;
a000b46c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000b470: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000b474: e1a00004 mov r0, r4 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
a000b478: 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;
a000b47c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b480: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000ccf8 <_Thread_Close>:
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
a000ccf8: e1d120b8 ldrh r2, [r1, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000ccfc: e590301c ldr r3, [r0, #28]
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
a000cd00: e92d4070 push {r4, r5, r6, lr}
a000cd04: e1a04001 mov r4, r1
a000cd08: e3a01000 mov r1, #0
a000cd0c: e7831102 str r1, [r3, r2, lsl #2]
a000cd10: e1a06000 mov r6, r0
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000cd14: e59f5090 ldr r5, [pc, #144] ; a000cdac <_Thread_Close+0xb4>
return ctx.ok;
}
static inline void _User_extensions_Thread_delete( Thread_Control *deleted )
{
_User_extensions_Iterate(
a000cd18: e1a00004 mov r0, r4
a000cd1c: e59f108c ldr r1, [pc, #140] ; a000cdb0 <_Thread_Close+0xb8>
a000cd20: e5953000 ldr r3, [r5]
--level;
a000cd24: e2433001 sub r3, r3, #1
_Thread_Dispatch_disable_level = level;
a000cd28: e5853000 str r3, [r5]
a000cd2c: eb00039c bl a000dba4 <_User_extensions_Iterate>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000cd30: e5953000 ldr r3, [r5]
++level;
a000cd34: e2833001 add r3, r3, #1
_Thread_Dispatch_disable_level = level;
a000cd38: e5853000 str r3, [r5]
/*
* 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 );
a000cd3c: e1a01004 mov r1, r4
a000cd40: e1a00006 mov r0, r6
a000cd44: ebfffbeb bl a000bcf8 <_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 );
a000cd48: e1a00004 mov r0, r4
a000cd4c: e3a01001 mov r1, #1
a000cd50: eb0002fb bl a000d944 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
a000cd54: e1a00004 mov r0, r4
a000cd58: eb000296 bl a000d7b8 <_Thread_queue_Extract_with_proxy>
a000cd5c: e3500000 cmp r0, #0
a000cd60: 1a000002 bne a000cd70 <_Thread_Close+0x78>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
a000cd64: e5943050 ldr r3, [r4, #80] ; 0x50
a000cd68: e3530002 cmp r3, #2
a000cd6c: 0a00000b beq a000cda0 <_Thread_Close+0xa8>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Free(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.free( the_thread );
a000cd70: e59f303c ldr r3, [pc, #60] ; a000cdb4 <_Thread_Close+0xbc>
a000cd74: e1a00004 mov r0, r4
/*
* 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;
a000cd78: e3a05000 mov r5, #0
a000cd7c: e593301c ldr r3, [r3, #28]
a000cd80: 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 );
a000cd84: e1a00004 mov r0, r4
a000cd88: eb00031f bl a000da0c <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
a000cd8c: e58450bc str r5, [r4, #188] ; 0xbc
_Workspace_Free( the_thread->extensions );
a000cd90: e59400f8 ldr r0, [r4, #248] ; 0xf8
a000cd94: eb0004d7 bl a000e0f8 <_Workspace_Free>
the_thread->extensions = NULL;
a000cd98: e58450f8 str r5, [r4, #248] ; 0xf8
}
a000cd9c: 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 );
a000cda0: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000cda4: eb000430 bl a000de6c <_Watchdog_Remove> <== NOT EXECUTED
a000cda8: eafffff0 b a000cd70 <_Thread_Close+0x78> <== NOT EXECUTED
a000ced4 <_Thread_Dispatch>:
#if defined(RTEMS_SMP)
#include <rtems/score/smp.h>
#endif
void _Thread_Dispatch( void )
{
a000ced4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
a000ced8: e59f7188 ldr r7, [pc, #392] ; a000d068 <_Thread_Dispatch+0x194>
#if defined(RTEMS_SMP)
#include <rtems/score/smp.h>
#endif
void _Thread_Dispatch( void )
{
a000cedc: e24dd018 sub sp, sp, #24
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
a000cee0: e5975008 ldr r5, [r7, #8]
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000cee4: e10f3000 mrs r3, CPSR
a000cee8: e3832080 orr r2, r3, #128 ; 0x80
a000ceec: e129f002 msr CPSR_fc, r2
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
a000cef0: e5d72004 ldrb r2, [r7, #4]
a000cef4: e3520000 cmp r2, #0
a000cef8: 059f916c ldreq r9, [pc, #364] ; a000d06c <_Thread_Dispatch+0x198>
a000cefc: 0a00004a beq a000d02c <_Thread_Dispatch+0x158>
heir = _Thread_Heir;
a000cf00: e597400c ldr r4, [r7, #12]
* This routine sets thread dispatch level to the
* value passed in.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value)
{
_Thread_Dispatch_disable_level = value;
a000cf04: e59f9160 ldr r9, [pc, #352] ; a000d06c <_Thread_Dispatch+0x198>
a000cf08: e3a02001 mov r2, #1
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
a000cf0c: 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 )
a000cf10: e1550004 cmp r5, r4
a000cf14: e5892000 str r2, [r9]
heir = _Thread_Heir;
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
_Thread_Executing = heir;
a000cf18: e5874008 str r4, [r7, #8]
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
a000cf1c: e5c71004 strb r1, [r7, #4]
/*
* 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 )
a000cf20: 0a000041 beq a000d02c <_Thread_Dispatch+0x158>
a000cf24: e59f0144 ldr r0, [pc, #324] ; a000d070 <_Thread_Dispatch+0x19c>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
a000cf28: e1a08007 mov r8, r7
a000cf2c: e2806004 add r6, r0, #4
*/
#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 )
a000cf30: e5942078 ldr r2, [r4, #120] ; 0x78
a000cf34: e3520001 cmp r2, #1
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
a000cf38: 059fa134 ldreq sl, [pc, #308] ; a000d074 <_Thread_Dispatch+0x1a0>
a000cf3c: 059a2000 ldreq r2, [sl]
a000cf40: 05842074 streq r2, [r4, #116] ; 0x74
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000cf44: e129f003 msr CPSR_fc, r3
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
a000cf48: e59f1128 ldr r1, [pc, #296] ; a000d078 <_Thread_Dispatch+0x1a4>
a000cf4c: e28d0010 add r0, sp, #16
a000cf50: ebfff9d9 bl a000b6bc <_TOD_Get_with_nanoseconds>
a000cf54: e2851080 add r1, r5, #128 ; 0x80
a000cf58: e8910003 ldm r1, {r0, r1}
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
a000cf5c: e28db010 add fp, sp, #16
a000cf60: e89b0c00 ldm fp, {sl, fp}
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
a000cf64: e59f2110 ldr r2, [pc, #272] ; a000d07c <_Thread_Dispatch+0x1a8>
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
a000cf68: e88d0003 stm sp, {r0, r1}
a000cf6c: e5921000 ldr r1, [r2]
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
a000cf70: e2873014 add r3, r7, #20
a000cf74: e893000c ldm r3, {r2, r3}
a000cf78: e05aa002 subs sl, sl, r2
a000cf7c: e0cbb003 sbc fp, fp, r3
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
a000cf80: e89d000c ldm sp, {r2, r3}
a000cf84: e092200a adds r2, r2, sl
a000cf88: e0a3300b adc r3, r3, fp
a000cf8c: e3510000 cmp r1, #0
a000cf90: e5852080 str r2, [r5, #128] ; 0x80
a000cf94: e5853084 str r3, [r5, #132] ; 0x84
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
a000cf98: e28db010 add fp, sp, #16
a000cf9c: e89b0c00 ldm fp, {sl, fp}
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
a000cfa0: 15913000 ldrne r3, [r1]
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
a000cfa4: e587a014 str sl, [r7, #20]
a000cfa8: e587b018 str fp, [r7, #24]
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
a000cfac: 158530ec strne r3, [r5, #236] ; 0xec
*_Thread_libc_reent = heir->libc_reent;
a000cfb0: 159430ec ldrne r3, [r4, #236] ; 0xec
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a000cfb4: e59fb0b4 ldr fp, [pc, #180] ; a000d070 <_Thread_Dispatch+0x19c>
a000cfb8: 15813000 strne r3, [r1]
a000cfbc: e59ba000 ldr sl, [fp]
{
const Chain_Control *chain = &_User_extensions_Switches_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
a000cfc0: e15a0006 cmp sl, r6
a000cfc4: 0a000006 beq a000cfe4 <_Thread_Dispatch+0x110>
const User_extensions_Switch_control *extension =
(const User_extensions_Switch_control *) node;
(*extension->thread_switch)( executing, heir );
a000cfc8: e59a3008 ldr r3, [sl, #8]
a000cfcc: e1a00005 mov r0, r5
a000cfd0: e1a01004 mov r1, r4
a000cfd4: e12fff33 blx r3
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_next(
const Chain_Node *the_node
)
{
return the_node->next;
a000cfd8: e59aa000 ldr sl, [sl]
{
const Chain_Control *chain = &_User_extensions_Switches_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
a000cfdc: e15a0006 cmp sl, r6
a000cfe0: 1afffff8 bne a000cfc8 <_Thread_Dispatch+0xf4>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
a000cfe4: e28500c0 add r0, r5, #192 ; 0xc0
a000cfe8: e28410c0 add r1, r4, #192 ; 0xc0
a000cfec: eb000521 bl a000e478 <_CPU_Context_switch>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
a000cff0: e5975008 ldr r5, [r7, #8]
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000cff4: e10f3000 mrs r3, CPSR
a000cff8: e3832080 orr r2, r3, #128 ; 0x80
a000cffc: e129f002 msr CPSR_fc, r2
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
a000d000: e5d72004 ldrb r2, [r7, #4]
a000d004: e3520000 cmp r2, #0
a000d008: 0a000007 beq a000d02c <_Thread_Dispatch+0x158>
heir = _Thread_Heir;
a000d00c: e598400c ldr r4, [r8, #12] <== NOT EXECUTED
a000d010: e3a01001 mov r1, #1 <== NOT EXECUTED
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
a000d014: e3a02000 mov r2, #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 )
a000d018: e1540005 cmp r4, r5 <== NOT EXECUTED
a000d01c: e5891000 str r1, [r9] <== NOT EXECUTED
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
a000d020: e5c82004 strb r2, [r8, #4] <== NOT EXECUTED
_Thread_Executing = heir;
a000d024: e5884008 str r4, [r8, #8] <== 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 )
a000d028: 1affffc0 bne a000cf30 <_Thread_Dispatch+0x5c> <== NOT EXECUTED
a000d02c: e3a02000 mov r2, #0
a000d030: e5892000 str r2, [r9]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000d034: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a000d038: e59f6040 ldr r6, [pc, #64] ; a000d080 <_Thread_Dispatch+0x1ac>
a000d03c: e4964004 ldr r4, [r6], #4
{
const Chain_Control *chain = &_API_extensions_Post_switch_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
a000d040: e1540006 cmp r4, r6
a000d044: 0a000005 beq a000d060 <_Thread_Dispatch+0x18c>
const API_extensions_Post_switch_control *post_switch =
(const API_extensions_Post_switch_control *) node;
(*post_switch->hook)( executing );
a000d048: e5943008 ldr r3, [r4, #8]
a000d04c: e1a00005 mov r0, r5
a000d050: e12fff33 blx r3
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_next(
const Chain_Node *the_node
)
{
return the_node->next;
a000d054: e5944000 ldr r4, [r4]
{
const Chain_Control *chain = &_API_extensions_Post_switch_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
a000d058: e1540006 cmp r4, r6
a000d05c: 1afffff9 bne a000d048 <_Thread_Dispatch+0x174>
#ifdef RTEMS_SMP
_Thread_Unnest_dispatch();
#endif
_API_extensions_Run_post_switch( executing );
}
a000d060: e28dd018 add sp, sp, #24
a000d064: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000d0a4 <_Thread_Get>:
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
a000d0a4: e2503000 subs r3, r0, #0
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
a000d0a8: e1a02001 mov r2, r1
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
a000d0ac: 0a000014 beq a000d104 <_Thread_Get+0x60>
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
a000d0b0: e1a01c23 lsr r1, r3, #24
a000d0b4: e2011007 and r1, r1, #7
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
a000d0b8: e2410001 sub r0, r1, #1
a000d0bc: e3500002 cmp r0, #2
a000d0c0: 8a00000b bhi a000d0f4 <_Thread_Get+0x50>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
a000d0c4: e1a0cda3 lsr ip, r3, #27
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
a000d0c8: e35c0001 cmp ip, #1
a000d0cc: 1a000008 bne a000d0f4 <_Thread_Get+0x50>
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
a000d0d0: e59f0054 ldr r0, [pc, #84] ; a000d12c <_Thread_Get+0x88>
a000d0d4: e7900101 ldr r0, [r0, r1, lsl #2]
* There is no way for this to happen if POSIX is enabled. But there
* is actually a test case in sp43 for this which trips it whether or
* not POSIX is enabled. So in the interest of safety, this is left
* on in all configurations.
*/
if ( !api_information ) {
a000d0d8: e3500000 cmp r0, #0
a000d0dc: 0a000010 beq a000d124 <_Thread_Get+0x80>
*location = OBJECTS_ERROR;
goto done;
}
information = api_information[ the_class ];
a000d0e0: e5900004 ldr r0, [r0, #4]
if ( !information ) {
a000d0e4: e3500000 cmp r0, #0
a000d0e8: 0a00000d beq a000d124 <_Thread_Get+0x80>
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
a000d0ec: e1a01003 mov r1, r3
a000d0f0: eafffc14 b a000c148 <_Objects_Get>
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
a000d0f4: e3a03001 mov r3, #1
a000d0f8: e5823000 str r3, [r2]
{
uint32_t the_api;
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
a000d0fc: e3a00000 mov r0, #0
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
goto done;
a000d100: e12fff1e bx lr
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000d104: e59f1024 ldr r1, [pc, #36] ; a000d130 <_Thread_Get+0x8c>
a000d108: e5910000 ldr r0, [r1]
++level;
a000d10c: e2800001 add r0, r0, #1
_Thread_Dispatch_disable_level = level;
a000d110: e5810000 str r0, [r1]
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
a000d114: e5823000 str r3, [r2]
tp = _Thread_Executing;
a000d118: e59f3014 ldr r3, [pc, #20] ; a000d134 <_Thread_Get+0x90>
a000d11c: e5930008 ldr r0, [r3, #8]
goto done;
a000d120: e12fff1e bx lr
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
a000d124: e582c000 str ip, [r2] <== NOT EXECUTED
goto done;
a000d128: e12fff1e bx lr <== NOT EXECUTED
a0011780 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a0011780: 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;
a0011784: e590c0a0 ldr ip, [r0, #160] ; 0xa0
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
a0011788: e5d0e09c ldrb lr, [r0, #156] ; 0x9c
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
a001178c: e59030a4 ldr r3, [r0, #164] ; 0xa4
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
a0011790: e3a05000 mov r5, #0
a0011794: e580501c str r5, [r0, #28]
the_thread->is_preemptible = the_thread->Start.is_preemptible;
a0011798: e5c0e070 strb lr, [r0, #112] ; 0x70
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
a001179c: e580c078 str ip, [r0, #120] ; 0x78
the_thread->budget_callout = the_thread->Start.budget_callout;
a00117a0: e580307c str r3, [r0, #124] ; 0x7c
the_thread->Start.pointer_argument = pointer_argument;
a00117a4: e5801094 str r1, [r0, #148] ; 0x94
the_thread->Start.numeric_argument = numeric_argument;
a00117a8: e5802098 str r2, [r0, #152] ; 0x98
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a00117ac: 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 ) ) {
a00117b0: ebfff21e bl a000e030 <_Thread_queue_Extract_with_proxy>
a00117b4: e1500005 cmp r0, r5
a00117b8: 1a000002 bne a00117c8 <_Thread_Reset+0x48>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
a00117bc: e5943050 ldr r3, [r4, #80] ; 0x50
a00117c0: e3530002 cmp r3, #2
a00117c4: 0a000008 beq a00117ec <_Thread_Reset+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
a00117c8: e59410ac ldr r1, [r4, #172] ; 0xac
a00117cc: e5943014 ldr r3, [r4, #20]
a00117d0: e1530001 cmp r3, r1
a00117d4: 0a000003 beq a00117e8 <_Thread_Reset+0x68>
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
a00117d8: 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;
a00117dc: e5841018 str r1, [r4, #24]
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
}
}
a00117e0: 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 );
a00117e4: eafff28c b a000e21c <_Thread_Set_priority>
a00117e8: 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 );
a00117ec: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a00117f0: ebfff3da bl a000e760 <_Watchdog_Remove> <== NOT EXECUTED
a00117f4: eafffff3 b a00117c8 <_Thread_Reset+0x48> <== NOT EXECUTED
a000da74 <_Thread_Start>:
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
a000da74: e590c010 ldr ip, [r0, #16]
Thread_Start_types the_prototype,
void *entry_point,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a000da78: e92d4010 push {r4, lr}
if ( _States_Is_dormant( the_thread->current_state ) ) {
a000da7c: e21cc001 ands ip, ip, #1
Thread_Start_types the_prototype,
void *entry_point,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a000da80: e1a04000 mov r4, r0
if ( _States_Is_dormant( the_thread->current_state ) ) {
a000da84: 1a000001 bne a000da90 <_Thread_Start+0x1c>
_User_extensions_Thread_start( the_thread );
return true;
}
return false;
a000da88: e1a0000c mov r0, ip <== NOT EXECUTED
}
a000da8c: 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;
a000da90: e5803094 str r3, [r0, #148] ; 0x94
the_thread->Start.numeric_argument = numeric_argument;
a000da94: 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;
a000da98: e580208c str r2, [r0, #140] ; 0x8c
the_thread->Start.prototype = the_prototype;
a000da9c: e5801090 str r1, [r0, #144] ; 0x90
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
a000daa0: e5803098 str r3, [r0, #152] ; 0x98
_Thread_Load_environment( the_thread );
a000daa4: eb000c48 bl a0010bcc <_Thread_Load_environment>
_Thread_Ready( the_thread );
a000daa8: e1a00004 mov r0, r4
a000daac: eb000cea bl a0010e5c <_Thread_Ready>
);
}
static inline void _User_extensions_Thread_start( Thread_Control *started )
{
_User_extensions_Iterate(
a000dab0: e1a00004 mov r0, r4
a000dab4: e59f1008 ldr r1, [pc, #8] ; a000dac4 <_Thread_Start+0x50>
a000dab8: eb000039 bl a000dba4 <_User_extensions_Iterate>
_User_extensions_Thread_start( the_thread );
return true;
a000dabc: e3a00001 mov r0, #1
a000dac0: e8bd8010 pop {r4, pc}
a000cb60 <_Thread_blocking_operation_Cancel>:
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
a000cb60: 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 ) ) {
a000cb64: e5913050 ldr r3, [r1, #80] ; 0x50 <== NOT EXECUTED
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
a000cb68: 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 ) ) {
a000cb6c: e3530002 cmp r3, #2 <== NOT EXECUTED
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
a000cb70: e3a03000 mov r3, #0 <== NOT EXECUTED
a000cb74: 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 ) ) {
a000cb78: 0a000005 beq a000cb94 <_Thread_blocking_operation_Cancel+0x34><== NOT EXECUTED
a000cb7c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000cb80: e1a00001 mov r0, r1 <== NOT EXECUTED
a000cb84: e59f1028 ldr r1, [pc, #40] ; a000cbb4 <_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
}
a000cb88: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000cb8c: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
a000cb90: ea000045 b a000ccac <_Thread_Clear_state> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a000cb94: e3a03003 mov r3, #3 <== NOT EXECUTED
a000cb98: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED
a000cb9c: 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 );
a000cba0: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED
a000cba4: e58d1000 str r1, [sp] <== NOT EXECUTED
a000cba8: eb0004af bl a000de6c <_Watchdog_Remove> <== NOT EXECUTED
a000cbac: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a000cbb0: eafffff2 b a000cb80 <_Thread_blocking_operation_Cancel+0x20><== NOT EXECUTED
a0010c1c <_Thread_queue_Dequeue_fifo>:
#include <rtems/score/tqdata.h>
Thread_Control *_Thread_queue_Dequeue_fifo(
Thread_queue_Control *the_thread_queue
)
{
a0010c1c: e92d4010 push {r4, lr}
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a0010c20: e10f2000 mrs r2, CPSR
a0010c24: e3823080 orr r3, r2, #128 ; 0x80
a0010c28: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a0010c2c: e1a03000 mov r3, r0
a0010c30: e4934004 ldr r4, [r3], #4
ISR_Level level;
Thread_Control *the_thread;
_ISR_Disable( level );
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) {
a0010c34: e1540003 cmp r4, r3
a0010c38: 0a000017 beq a0010c9c <_Thread_queue_Dequeue_fifo+0x80>
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 ) ) {
a0010c3c: 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;
a0010c40: e5943000 ldr r3, [r4]
a0010c44: e3510002 cmp r1, #2
head->next = new_first;
a0010c48: e5803000 str r3, [r0]
new_first->previous = head;
a0010c4c: 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;
a0010c50: e3a03000 mov r3, #0
a0010c54: e5843044 str r3, [r4, #68] ; 0x44
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a0010c58: 0a000005 beq a0010c74 <_Thread_queue_Dequeue_fifo+0x58>
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a0010c5c: e129f002 msr CPSR_fc, r2
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a0010c60: e59f1040 ldr r1, [pc, #64] ; a0010ca8 <_Thread_queue_Dequeue_fifo+0x8c>
a0010c64: e1a00004 mov r0, r4
a0010c68: ebfff00f bl a000ccac <_Thread_Clear_state>
return the_thread;
}
_ISR_Enable( level );
return NULL;
}
a0010c6c: e1a00004 mov r0, r4
a0010c70: e8bd8010 pop {r4, pc}
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a0010c74: e3a03003 mov r3, #3 <== NOT EXECUTED
a0010c78: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED
a0010c7c: 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 );
a0010c80: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a0010c84: ebfff478 bl a000de6c <_Watchdog_Remove> <== NOT EXECUTED
a0010c88: e1a00004 mov r0, r4 <== NOT EXECUTED
a0010c8c: e59f1014 ldr r1, [pc, #20] ; a0010ca8 <_Thread_queue_Dequeue_fifo+0x8c><== NOT EXECUTED
a0010c90: ebfff005 bl a000ccac <_Thread_Clear_state> <== NOT EXECUTED
return the_thread;
}
_ISR_Enable( level );
return NULL;
}
a0010c94: e1a00004 mov r0, r4 <== NOT EXECUTED
a0010c98: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0010c9c: e129f002 msr CPSR_fc, r2
return the_thread;
}
_ISR_Enable( level );
return NULL;
a0010ca0: e3a04000 mov r4, #0
a0010ca4: eafffff0 b a0010c6c <_Thread_queue_Dequeue_fifo+0x50>
a000d45c <_Thread_queue_Dequeue_priority>:
#include <rtems/score/tqdata.h>
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
a000d45c: e92d4010 push {r4, lr}
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000d460: e10fc000 mrs ip, CPSR
a000d464: e38c3080 orr r3, ip, #128 ; 0x80
a000d468: e129f003 msr CPSR_fc, r3
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
a000d46c: e3a03000 mov r3, #0
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
a000d470: e3a0100c mov r1, #12
a000d474: e0020391 mul r2, r1, r3
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a000d478: e7904002 ldr r4, [r0, r2]
a000d47c: e0802002 add r2, r0, r2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000d480: e2822004 add r2, r2, #4
a000d484: e1540002 cmp r4, r2
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a000d488: e2833001 add r3, r3, #1
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
a000d48c: 1a000005 bne a000d4a8 <_Thread_queue_Dequeue_priority+0x4c>
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
a000d490: e3530004 cmp r3, #4
a000d494: 1afffff6 bne a000d474 <_Thread_queue_Dequeue_priority+0x18>
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000d498: e129f00c msr CPSR_fc, ip
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
return NULL;
a000d49c: e3a04000 mov r4, #0
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
a000d4a0: e1a00004 mov r0, r4
a000d4a4: e8bd8010 pop {r4, pc}
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
a000d4a8: e5943038 ldr r3, [r4, #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 );
a000d4ac: e284203c add r2, r4, #60 ; 0x3c
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;
previous_node = the_thread->Object.Node.previous;
a000d4b0: e5941004 ldr r1, [r4, #4]
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000d4b4: e1530002 cmp r3, r2
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
a000d4b8: e3a02000 mov r2, #0
a000d4bc: 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;
a000d4c0: e5942000 ldr r2, [r4]
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000d4c4: 0a000020 beq a000d54c <_Thread_queue_Dequeue_priority+0xf0>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
a000d4c8: e5940040 ldr r0, [r4, #64] ; 0x40 <== NOT EXECUTED
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
a000d4cc: e593e000 ldr lr, [r3] <== NOT EXECUTED
previous_node->next = new_first_node;
next_node->previous = new_first_node;
a000d4d0: 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;
a000d4d4: e5813000 str r3, [r1] <== NOT EXECUTED
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
a000d4d8: 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;
a000d4dc: e5832000 str r2, [r3] <== NOT EXECUTED
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a000d4e0: e5941038 ldr r1, [r4, #56] ; 0x38 <== NOT EXECUTED
a000d4e4: e5942040 ldr r2, [r4, #64] ; 0x40 <== NOT EXECUTED
a000d4e8: e1510002 cmp r1, r2 <== NOT EXECUTED
a000d4ec: 0a000005 beq a000d508 <_Thread_queue_Dequeue_priority+0xac><== NOT EXECUTED
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
a000d4f0: e2831038 add r1, r3, #56 ; 0x38 <== NOT EXECUTED
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
a000d4f4: e283203c add r2, r3, #60 ; 0x3c <== NOT EXECUTED
new_second_node->previous = head;
a000d4f8: e58e1004 str r1, [lr, #4] <== NOT EXECUTED
head->next = new_second_node;
a000d4fc: e583e038 str lr, [r3, #56] ; 0x38 <== NOT EXECUTED
tail->previous = last_node;
a000d500: e5830040 str r0, [r3, #64] ; 0x40 <== NOT EXECUTED
last_node->next = tail;
a000d504: e5802000 str r2, [r0] <== NOT EXECUTED
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a000d508: e5943050 ldr r3, [r4, #80] ; 0x50
a000d50c: e3530002 cmp r3, #2
a000d510: 0a000004 beq a000d528 <_Thread_queue_Dequeue_priority+0xcc>
a000d514: e129f00c msr CPSR_fc, ip
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000d518: e59f1038 ldr r1, [pc, #56] ; a000d558 <_Thread_queue_Dequeue_priority+0xfc>
a000d51c: e1a00004 mov r0, r4
a000d520: ebfffde1 bl a000ccac <_Thread_Clear_state>
a000d524: eaffffdd b a000d4a0 <_Thread_queue_Dequeue_priority+0x44>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a000d528: e3a03003 mov r3, #3 <== NOT EXECUTED
a000d52c: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED
a000d530: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a000d534: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000d538: eb00024b bl a000de6c <_Watchdog_Remove> <== NOT EXECUTED
a000d53c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000d540: e59f1010 ldr r1, [pc, #16] ; a000d558 <_Thread_queue_Dequeue_priority+0xfc><== NOT EXECUTED
a000d544: ebfffdd8 bl a000ccac <_Thread_Clear_state> <== NOT EXECUTED
a000d548: eaffffd4 b a000d4a0 <_Thread_queue_Dequeue_priority+0x44> <== NOT EXECUTED
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
a000d54c: e5812000 str r2, [r1]
next_node->previous = previous_node;
a000d550: e5821004 str r1, [r2, #4]
a000d554: eaffffeb b a000d508 <_Thread_queue_Dequeue_priority+0xac>
a000d608 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
a000d608: 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
)
{
a000d60c: e92d07f0 push {r4, r5, r6, r7, r8, r9, 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 );
a000d610: e2814038 add r4, r1, #56 ; 0x38
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
a000d614: e1a0c323 lsr ip, r3, #6
head->next = tail;
head->previous = NULL;
tail->previous = head;
a000d618: e5814040 str r4, [r1, #64] ; 0x40
_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 ];
a000d61c: e3a0400c mov r4, #12
a000d620: e02c0c94 mla ip, r4, ip, r0
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 );
a000d624: e281503c add r5, r1, #60 ; 0x3c
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
a000d628: e3130020 tst r3, #32
head->next = tail;
a000d62c: e5815038 str r5, [r1, #56] ; 0x38
head->previous = NULL;
a000d630: e3a05000 mov r5, #0
a000d634: e581503c str r5, [r1, #60] ; 0x3c
_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;
a000d638: e5906038 ldr r6, [r0, #56] ; 0x38
a000d63c: 028c9004 addeq r9, ip, #4
a000d640: 159f916c ldrne r9, [pc, #364] ; a000d7b4 <_Thread_queue_Enqueue_priority+0x1ac>
if ( _Thread_queue_Is_reverse_search( priority ) )
a000d644: 1a00001b bne a000d6b8 <_Thread_queue_Enqueue_priority+0xb0>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000d648: e10fa000 mrs sl, CPSR
a000d64c: e38a4080 orr r4, sl, #128 ; 0x80
a000d650: e129f004 msr CPSR_fc, r4
a000d654: e1a0800a mov r8, sl
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
a000d658: e59c4000 ldr r4, [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 ) ) {
a000d65c: e1540009 cmp r4, r9
a000d660: 1a000009 bne a000d68c <_Thread_queue_Enqueue_priority+0x84>
a000d664: ea000050 b a000d7ac <_Thread_queue_Enqueue_priority+0x1a4>
static inline void arm_interrupt_flash( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000d668: e10f7000 mrs r7, CPSR
a000d66c: e129f00a msr CPSR_fc, sl
a000d670: e129f007 msr CPSR_fc, r7
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
a000d674: e5947010 ldr r7, [r4, #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) ) {
a000d678: e1160007 tst r6, r7
a000d67c: 0a000032 beq a000d74c <_Thread_queue_Enqueue_priority+0x144>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
a000d680: e5944000 ldr r4, [r4]
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 ) ) {
a000d684: e1540009 cmp r4, r9
a000d688: 0a000002 beq a000d698 <_Thread_queue_Enqueue_priority+0x90>
search_priority = search_thread->current_priority;
a000d68c: e5945014 ldr r5, [r4, #20]
if ( priority <= search_priority )
a000d690: e1530005 cmp r3, r5
a000d694: 8afffff3 bhi a000d668 <_Thread_queue_Enqueue_priority+0x60>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
a000d698: e590c030 ldr ip, [r0, #48] ; 0x30
a000d69c: e35c0001 cmp ip, #1
a000d6a0: 0a00002b beq a000d754 <_Thread_queue_Enqueue_priority+0x14c>
* 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;
a000d6a4: e5828000 str r8, [r2] <== NOT EXECUTED
return the_thread_queue->sync_state;
}
a000d6a8: e1a0000c mov r0, ip
a000d6ac: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl}
a000d6b0: e12fff1e bx lr
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000d6b4: e129f00a msr CPSR_fc, sl <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
a000d6b8: e5d95000 ldrb r5, [r9]
a000d6bc: e2855001 add r5, r5, #1
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000d6c0: e10fa000 mrs sl, CPSR
a000d6c4: e38a4080 orr r4, sl, #128 ; 0x80
a000d6c8: e129f004 msr CPSR_fc, r4
a000d6cc: e1a0800a mov r8, sl
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
a000d6d0: e59c4008 ldr r4, [ip, #8]
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
a000d6d4: e154000c cmp r4, ip
a000d6d8: 1a000009 bne a000d704 <_Thread_queue_Enqueue_priority+0xfc>
a000d6dc: ea00000b b a000d710 <_Thread_queue_Enqueue_priority+0x108>
static inline void arm_interrupt_flash( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000d6e0: e10f7000 mrs r7, CPSR <== NOT EXECUTED
a000d6e4: e129f00a msr CPSR_fc, sl <== NOT EXECUTED
a000d6e8: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
a000d6ec: e5947010 ldr r7, [r4, #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) ) {
a000d6f0: e1160007 tst r6, r7 <== NOT EXECUTED
a000d6f4: 0affffee beq a000d6b4 <_Thread_queue_Enqueue_priority+0xac><== NOT EXECUTED
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
a000d6f8: e5944004 ldr r4, [r4, #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 ) ) {
a000d6fc: e154000c cmp r4, ip <== NOT EXECUTED
a000d700: 0a000002 beq a000d710 <_Thread_queue_Enqueue_priority+0x108><== NOT EXECUTED
search_priority = search_thread->current_priority;
a000d704: e5945014 ldr r5, [r4, #20]
if ( priority >= search_priority )
a000d708: e1530005 cmp r3, r5
a000d70c: 3afffff3 bcc a000d6e0 <_Thread_queue_Enqueue_priority+0xd8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
a000d710: e590c030 ldr ip, [r0, #48] ; 0x30
a000d714: e35c0001 cmp ip, #1
a000d718: 1affffe1 bne a000d6a4 <_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 )
a000d71c: e1530005 cmp r3, r5
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000d720: e3a03000 mov r3, #0
a000d724: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
a000d728: 0a000015 beq a000d784 <_Thread_queue_Enqueue_priority+0x17c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
a000d72c: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
a000d730: e5814004 str r4, [r1, #4]
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
a000d734: e5813000 str r3, [r1]
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
a000d738: 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;
a000d73c: e5841000 str r1, [r4]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
a000d740: e5810044 str r0, [r1, #68] ; 0x44
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000d744: e129f00a msr CPSR_fc, sl
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000d748: eaffffd6 b a000d6a8 <_Thread_queue_Enqueue_priority+0xa0>
a000d74c: e129f00a msr CPSR_fc, sl <== NOT EXECUTED
a000d750: eaffffbc b a000d648 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
a000d754: e1530005 cmp r3, r5
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000d758: e3a03000 mov r3, #0
a000d75c: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
a000d760: 0a000007 beq a000d784 <_Thread_queue_Enqueue_priority+0x17c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
a000d764: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a000d768: e5814000 str r4, [r1]
the_node->previous = previous_node;
a000d76c: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
a000d770: e5831000 str r1, [r3]
search_node->previous = the_node;
a000d774: e5841004 str r1, [r4, #4]
the_thread->Wait.queue = the_thread_queue;
a000d778: e5810044 str r0, [r1, #68] ; 0x44
a000d77c: e129f00a msr CPSR_fc, sl
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000d780: eaffffc8 b a000d6a8 <_Thread_queue_Enqueue_priority+0xa0>
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
a000d784: e5943040 ldr r3, [r4, #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 );
a000d788: e284203c add r2, r4, #60 ; 0x3c <== NOT EXECUTED
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a000d78c: e5812000 str r2, [r1] <== NOT EXECUTED
the_node->previous = previous_node;
a000d790: e5813004 str r3, [r1, #4] <== NOT EXECUTED
previous_node->next = the_node;
a000d794: e5831000 str r1, [r3] <== NOT EXECUTED
search_node->previous = the_node;
a000d798: e5841040 str r1, [r4, #64] ; 0x40 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
a000d79c: e5810044 str r0, [r1, #68] ; 0x44 <== NOT EXECUTED
a000d7a0: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000d7a4: e3a0c001 mov ip, #1 <== NOT EXECUTED
a000d7a8: eaffffbe b a000d6a8 <_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;
a000d7ac: e3e05000 mvn r5, #0
a000d7b0: eaffffb8 b a000d698 <_Thread_queue_Enqueue_priority+0x90>
a000d55c <_Thread_queue_Enqueue_with_handler>:
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
a000d55c: e59f3094 ldr r3, [pc, #148] ; a000d5f8 <_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
)
{
a000d560: e92d40f0 push {r4, r5, r6, r7, lr}
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
a000d564: e5934008 ldr r4, [r3, #8]
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
a000d568: e1a06001 mov r6, r1
a000d56c: 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 );
a000d570: 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
)
{
a000d574: 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 );
a000d578: e1a00004 mov r0, r4
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
a000d57c: 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 );
a000d580: eb0000ef bl a000d944 <_Thread_Set_state>
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
a000d584: e3560000 cmp r6, #0
a000d588: 1a00000f bne a000d5cc <_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 )
a000d58c: e595c034 ldr ip, [r5, #52] ; 0x34
enqueue_p = _Thread_queue_Enqueue_priority;
a000d590: e59f2064 ldr r2, [pc, #100] ; a000d5fc <_Thread_queue_Enqueue_with_handler+0xa0>
a000d594: e59f3064 ldr r3, [pc, #100] ; a000d600 <_Thread_queue_Enqueue_with_handler+0xa4>
a000d598: e35c0001 cmp ip, #1
a000d59c: 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 );
a000d5a0: e1a00005 mov r0, r5
a000d5a4: e1a01004 mov r1, r4
a000d5a8: e1a0200d mov r2, sp
a000d5ac: e12fff33 blx r3
if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
a000d5b0: e3500001 cmp r0, #1
a000d5b4: 0a000002 beq a000d5c4 <_Thread_queue_Enqueue_with_handler+0x68>
_Thread_blocking_operation_Cancel( sync_state, the_thread, level );
a000d5b8: e1a01004 mov r1, r4 <== NOT EXECUTED
a000d5bc: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000d5c0: ebfffd66 bl a000cb60 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED
}
a000d5c4: e28dd004 add sp, sp, #4
a000d5c8: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
_Watchdog_Initialize(
a000d5cc: e5942008 ldr r2, [r4, #8]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000d5d0: e3a03000 mov r3, #0
a000d5d4: e5843050 str r3, [r4, #80] ; 0x50
the_watchdog->routine = routine;
a000d5d8: e5847064 str r7, [r4, #100] ; 0x64
the_watchdog->id = id;
a000d5dc: e5842068 str r2, [r4, #104] ; 0x68
the_watchdog->user_data = user_data;
a000d5e0: e584306c str r3, [r4, #108] ; 0x6c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000d5e4: e5846054 str r6, [r4, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000d5e8: e59f0014 ldr r0, [pc, #20] ; a000d604 <_Thread_queue_Enqueue_with_handler+0xa8>
a000d5ec: e2841048 add r1, r4, #72 ; 0x48
a000d5f0: eb0001b0 bl a000dcb8 <_Watchdog_Insert>
a000d5f4: eaffffe4 b a000d58c <_Thread_queue_Enqueue_with_handler+0x30>
a001272c <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
a001272c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
a0012730: e24dd004 sub sp, sp, #4
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a0012734: e10f0000 mrs r0, CPSR
a0012738: e3803080 orr r3, r0, #128 ; 0x80
a001273c: e129f003 msr CPSR_fc, r3
a0012740: e5912010 ldr r2, [r1, #16]
a0012744: e3a03bef mov r3, #244736 ; 0x3bc00
a0012748: e2833e2e add r3, r3, #736 ; 0x2e0
a001274c: e0023003 and r3, r2, r3
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
a0012750: e3530000 cmp r3, #0
a0012754: 0a00000e beq a0012794 <_Thread_queue_Extract_fifo+0x68>
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a0012758: e591c050 ldr ip, [r1, #80] ; 0x50
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
a001275c: e5913004 ldr r3, [r1, #4]
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
a0012760: e5912000 ldr r2, [r1]
a0012764: e35c0002 cmp ip, #2
previous = the_node->previous;
next->previous = previous;
a0012768: e5823004 str r3, [r2, #4]
previous->next = next;
a001276c: e5832000 str r2, [r3]
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
a0012770: e3a03000 mov r3, #0
a0012774: e5813044 str r3, [r1, #68] ; 0x44
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a0012778: 0a000008 beq a00127a0 <_Thread_queue_Extract_fifo+0x74>
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a001277c: e129f000 msr CPSR_fc, r0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a0012780: e1a00001 mov r0, r1
a0012784: e59f1034 ldr r1, [pc, #52] ; a00127c0 <_Thread_queue_Extract_fifo+0x94>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a0012788: e28dd004 add sp, sp, #4
a001278c: e49de004 pop {lr} ; (ldr lr, [sp], #4)
a0012790: eaffe945 b a000ccac <_Thread_Clear_state>
a0012794: e129f000 msr CPSR_fc, r0
a0012798: e28dd004 add sp, sp, #4
a001279c: e8bd8000 pop {pc}
a00127a0: e3a03003 mov r3, #3 <== NOT EXECUTED
a00127a4: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED
a00127a8: 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 );
a00127ac: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED
a00127b0: e58d1000 str r1, [sp] <== NOT EXECUTED
a00127b4: ebffedac bl a000de6c <_Watchdog_Remove> <== NOT EXECUTED
a00127b8: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a00127bc: eaffffef b a0012780 <_Thread_queue_Extract_fifo+0x54> <== NOT EXECUTED
a0010d1c <_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
)
{
a0010d1c: e92d4070 push {r4, r5, r6, lr}
a0010d20: e20220ff and r2, r2, #255 ; 0xff
a0010d24: e24dd004 sub sp, sp, #4
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a0010d28: e10fc000 mrs ip, CPSR
a0010d2c: e38c3080 orr r3, ip, #128 ; 0x80
a0010d30: 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);
a0010d34: e5910010 ldr r0, [r1, #16]
a0010d38: e3a03bef mov r3, #244736 ; 0x3bc00
a0010d3c: e2833e2e add r3, r3, #736 ; 0x2e0
a0010d40: 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 ) ) {
a0010d44: e3530000 cmp r3, #0
a0010d48: 0a000022 beq a0010dd8 <_Thread_queue_Extract_priority_helper+0xbc>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a0010d4c: 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 );
a0010d50: 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;
a0010d54: e5910000 ldr r0, [r1]
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a0010d58: 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;
a0010d5c: e5914004 ldr r4, [r1, #4]
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
a0010d60: 05840000 streq r0, [r4]
next_node->previous = previous_node;
a0010d64: 05804004 streq r4, [r0, #4]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a0010d68: 0a00000f beq a0010dac <_Thread_queue_Extract_priority_helper+0x90>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
a0010d6c: e5915040 ldr r5, [r1, #64] ; 0x40 <== 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;
a0010d70: e5936000 ldr r6, [r3] <== NOT EXECUTED
previous_node->next = new_first_node;
next_node->previous = new_first_node;
a0010d74: 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;
a0010d78: e5843000 str r3, [r4] <== NOT EXECUTED
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
a0010d7c: e5834004 str r4, [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;
a0010d80: e5830000 str r0, [r3] <== NOT EXECUTED
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a0010d84: e5914038 ldr r4, [r1, #56] ; 0x38 <== NOT EXECUTED
a0010d88: e5910040 ldr r0, [r1, #64] ; 0x40 <== NOT EXECUTED
a0010d8c: e1540000 cmp r4, r0 <== NOT EXECUTED
a0010d90: 0a000005 beq a0010dac <_Thread_queue_Extract_priority_helper+0x90><== NOT EXECUTED
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
a0010d94: e2834038 add r4, r3, #56 ; 0x38 <== NOT EXECUTED
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
a0010d98: e283003c add r0, r3, #60 ; 0x3c <== NOT EXECUTED
new_second_node->previous = head;
a0010d9c: e5864004 str r4, [r6, #4] <== NOT EXECUTED
head->next = new_second_node;
a0010da0: e5836038 str r6, [r3, #56] ; 0x38 <== NOT EXECUTED
tail->previous = last_node;
a0010da4: e5835040 str r5, [r3, #64] ; 0x40 <== NOT EXECUTED
last_node->next = tail;
a0010da8: e5850000 str r0, [r5] <== NOT EXECUTED
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
a0010dac: e3520000 cmp r2, #0
a0010db0: 1a000008 bne a0010dd8 <_Thread_queue_Extract_priority_helper+0xbc>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a0010db4: e5913050 ldr r3, [r1, #80] ; 0x50 <== NOT EXECUTED
a0010db8: e3530002 cmp r3, #2 <== NOT EXECUTED
a0010dbc: 0a000008 beq a0010de4 <_Thread_queue_Extract_priority_helper+0xc8><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a0010dc0: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
a0010dc4: e1a00001 mov r0, r1 <== NOT EXECUTED
a0010dc8: e59f1034 ldr r1, [pc, #52] ; a0010e04 <_Thread_queue_Extract_priority_helper+0xe8><== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a0010dcc: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0010dd0: e8bd4070 pop {r4, r5, r6, lr} <== NOT EXECUTED
a0010dd4: eaffefb4 b a000ccac <_Thread_Clear_state> <== NOT EXECUTED
a0010dd8: e129f00c msr CPSR_fc, ip
a0010ddc: e28dd004 add sp, sp, #4
a0010de0: e8bd8070 pop {r4, r5, r6, pc}
a0010de4: e3a03003 mov r3, #3 <== NOT EXECUTED
a0010de8: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED
a0010dec: 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 );
a0010df0: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED
a0010df4: e58d1000 str r1, [sp] <== NOT EXECUTED
a0010df8: ebfff41b bl a000de6c <_Watchdog_Remove> <== NOT EXECUTED
a0010dfc: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a0010e00: eaffffef b a0010dc4 <_Thread_queue_Extract_priority_helper+0xa8><== NOT EXECUTED
a000f880 <_Thread_queue_First_priority>:
Thread_queue_Control *the_thread_queue
)
{
uint32_t index;
for( index=0 ;
a000f880: e3a03000 mov r3, #0 <== NOT EXECUTED
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
a000f884: e3a0c00c mov ip, #12 <== NOT EXECUTED
a000f888: e002039c mul r2, ip, r3 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a000f88c: e7901002 ldr r1, [r0, r2] <== NOT EXECUTED
a000f890: e0802002 add r2, r0, r2 <== 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 );
a000f894: e2822004 add r2, r2, #4 <== NOT EXECUTED
a000f898: e1510002 cmp r1, r2 <== NOT EXECUTED
{
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a000f89c: e2833001 add r3, r3, #1 <== NOT EXECUTED
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
a000f8a0: 1a000002 bne a000f8b0 <_Thread_queue_First_priority+0x30> <== NOT EXECUTED
Thread_queue_Control *the_thread_queue
)
{
uint32_t index;
for( index=0 ;
a000f8a4: e3530004 cmp r3, #4 <== NOT EXECUTED
a000f8a8: 1afffff6 bne a000f888 <_Thread_queue_First_priority+0x8> <== 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;
a000f8ac: e3a01000 mov r1, #0 <== NOT EXECUTED
}
a000f8b0: e1a00001 mov r0, r1 <== NOT EXECUTED
a000f8b4: e12fff1e bx lr <== NOT EXECUTED
a0010e08 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
a0010e08: e1a03000 mov r3, r0 <== NOT EXECUTED
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
a0010e0c: 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 &&
a0010e10: e5902030 ldr r2, [r0, #48] ; 0x30 <== NOT EXECUTED
a0010e14: e3520000 cmp r2, #0 <== NOT EXECUTED
a0010e18: 0a000003 beq a0010e2c <_Thread_queue_Process_timeout+0x24> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a0010e1c: e59f1034 ldr r1, [pc, #52] ; a0010e58 <_Thread_queue_Process_timeout+0x50><== NOT EXECUTED
a0010e20: e5911008 ldr r1, [r1, #8] <== NOT EXECUTED
a0010e24: e1530001 cmp r3, r1 <== NOT EXECUTED
a0010e28: 0a000003 beq a0010e3c <_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;
a0010e2c: e590203c ldr r2, [r0, #60] ; 0x3c <== NOT EXECUTED
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
a0010e30: 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;
a0010e34: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
a0010e38: eaffffb1 b a0010d04 <_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 ) {
a0010e3c: e3520003 cmp r2, #3 <== NOT EXECUTED
a0010e40: 012fff1e bxeq lr <== NOT EXECUTED
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
a0010e44: e590203c ldr r2, [r0, #60] ; 0x3c <== NOT EXECUTED
a0010e48: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
a0010e4c: e3a03002 mov r3, #2 <== NOT EXECUTED
a0010e50: e5803030 str r3, [r0, #48] ; 0x30 <== NOT EXECUTED
a0010e54: e12fff1e bx lr <== NOT EXECUTED
a000d8ec <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
a000d8ec: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
a000d8f0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000d8f4: e1a0100d mov r1, sp <== NOT EXECUTED
a000d8f8: ebfffde9 bl a000d0a4 <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
a000d8fc: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000d900: e3530000 cmp r3, #0 <== NOT EXECUTED
a000d904: 1a000004 bne a000d91c <_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 );
a000d908: eb000d3e bl a0010e08 <_Thread_queue_Process_timeout> <== NOT EXECUTED
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000d90c: e59f3010 ldr r3, [pc, #16] ; a000d924 <_Thread_queue_Timeout+0x38><== NOT EXECUTED
a000d910: e5932000 ldr r2, [r3] <== NOT EXECUTED
--level;
a000d914: e2422001 sub r2, r2, #1 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
a000d918: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Unnest_dispatch();
break;
}
}
a000d91c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000d920: e8bd8000 pop {pc} <== NOT EXECUTED
a001ae64 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
a001ae64: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a001ae68: e24dd024 sub sp, sp, #36 ; 0x24
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a001ae6c: e28d6018 add r6, sp, #24
a001ae70: e28d1010 add r1, sp, #16
a001ae74: e2862004 add r2, r6, #4
a001ae78: e58d100c str r1, [sp, #12]
a001ae7c: e58d2018 str r2, [sp, #24]
head->previous = NULL;
tail->previous = head;
a001ae80: e28d100c add r1, sp, #12
a001ae84: e28d201c add r2, sp, #28
a001ae88: e59f81e0 ldr r8, [pc, #480] ; a001b070 <_Timer_server_Body+0x20c>
a001ae8c: e59f91e0 ldr r9, [pc, #480] ; a001b074 <_Timer_server_Body+0x210>
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
a001ae90: e3a03000 mov r3, #0
a001ae94: e2807068 add r7, r0, #104 ; 0x68
tail->previous = head;
a001ae98: e58d1014 str r1, [sp, #20]
a001ae9c: e2805030 add r5, r0, #48 ; 0x30
a001aea0: e58d2000 str r2, [sp]
a001aea4: e2801008 add r1, r0, #8
a001aea8: e2802040 add r2, r0, #64 ; 0x40
* 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;
a001aeac: e1a0a007 mov sl, r7
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
a001aeb0: e1a04000 mov r4, r0
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
a001aeb4: e58d3010 str r3, [sp, #16]
a001aeb8: e58d301c str r3, [sp, #28]
tail->previous = head;
a001aebc: e58d6020 str r6, [sp, #32]
a001aec0: e28db010 add fp, sp, #16
a001aec4: e58d1004 str r1, [sp, #4]
a001aec8: e58d2008 str r2, [sp, #8]
* 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;
a001aecc: e1a07005 mov r7, r5
{
/*
* 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;
a001aed0: e28d300c add r3, sp, #12
a001aed4: e5843078 str r3, [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;
a001aed8: e5983000 ldr r3, [r8]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
a001aedc: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a001aee0: e1a00007 mov r0, r7
a001aee4: e1a02006 mov r2, r6
a001aee8: e0611003 rsb r1, r1, r3
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
a001aeec: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a001aef0: eb0011bc bl a001f5e8 <_Watchdog_Adjust_to_chain>
a001aef4: e8990003 ldm r9, {r0, r1}
a001aef8: e59f2178 ldr r2, [pc, #376] ; a001b078 <_Timer_server_Body+0x214>
a001aefc: e3a03000 mov r3, #0
a001af00: eb00516b bl a002f4b4 <__divdi3>
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
a001af04: e5942074 ldr r2, [r4, #116] ; 0x74
a001af08: e1a05000 mov r5, r0
/*
* 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 ) {
a001af0c: e1500002 cmp r0, r2
a001af10: 8a000022 bhi a001afa0 <_Timer_server_Body+0x13c>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
a001af14: 3a000018 bcc a001af7c <_Timer_server_Body+0x118>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
a001af18: 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 );
a001af1c: e5940078 ldr r0, [r4, #120] ; 0x78
a001af20: eb0002eb bl a001bad4 <_Chain_Get>
if ( timer == NULL ) {
a001af24: e2501000 subs r1, r0, #0
a001af28: 0a00000b beq a001af5c <_Timer_server_Body+0xf8>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a001af2c: e5913038 ldr r3, [r1, #56] ; 0x38 <== NOT EXECUTED
a001af30: e3530001 cmp r3, #1 <== NOT EXECUTED
a001af34: 0a000015 beq a001af90 <_Timer_server_Body+0x12c> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
a001af38: e3530003 cmp r3, #3 <== NOT EXECUTED
a001af3c: 1afffff6 bne a001af1c <_Timer_server_Body+0xb8> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a001af40: e2811010 add r1, r1, #16 <== NOT EXECUTED
a001af44: e1a0000a mov r0, sl <== NOT EXECUTED
a001af48: eb0011cf bl a001f68c <_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 );
a001af4c: e5940078 ldr r0, [r4, #120] ; 0x78 <== NOT EXECUTED
a001af50: eb0002df bl a001bad4 <_Chain_Get> <== NOT EXECUTED
if ( timer == NULL ) {
a001af54: e2501000 subs r1, r0, #0 <== NOT EXECUTED
a001af58: 1afffff3 bne a001af2c <_Timer_server_Body+0xc8> <== NOT EXECUTED
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a001af5c: e10f2000 mrs r2, CPSR
a001af60: e3823080 orr r3, r2, #128 ; 0x80
a001af64: e129f003 msr CPSR_fc, r3
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
a001af68: e59d300c ldr r3, [sp, #12]
a001af6c: e153000b cmp r3, fp
a001af70: 0a00000f beq a001afb4 <_Timer_server_Body+0x150>
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a001af74: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
a001af78: eaffffd6 b a001aed8 <_Timer_server_Body+0x74> <== NOT EXECUTED
/*
* 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 );
a001af7c: e1a0000a mov r0, sl <== NOT EXECUTED
a001af80: e3a01001 mov r1, #1 <== NOT EXECUTED
a001af84: e0652002 rsb r2, r5, r2 <== NOT EXECUTED
a001af88: eb001168 bl a001f530 <_Watchdog_Adjust> <== NOT EXECUTED
a001af8c: eaffffe1 b a001af18 <_Timer_server_Body+0xb4> <== 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 );
a001af90: e1a00007 mov r0, r7 <== NOT EXECUTED
a001af94: e2811010 add r1, r1, #16 <== NOT EXECUTED
a001af98: eb0011bb bl a001f68c <_Watchdog_Insert> <== NOT EXECUTED
a001af9c: eaffffde b a001af1c <_Timer_server_Body+0xb8> <== 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 );
a001afa0: e0621005 rsb r1, r2, r5
a001afa4: e1a0000a mov r0, sl
a001afa8: e1a02006 mov r2, r6
a001afac: eb00118d bl a001f5e8 <_Watchdog_Adjust_to_chain>
a001afb0: eaffffd8 b a001af18 <_Timer_server_Body+0xb4>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
a001afb4: e5841078 str r1, [r4, #120] ; 0x78
a001afb8: e129f002 msr CPSR_fc, r2
_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 ) ) {
a001afbc: e59d3018 ldr r3, [sp, #24]
a001afc0: e59d1000 ldr r1, [sp]
a001afc4: e1530001 cmp r3, r1
a001afc8: 1a00000a bne a001aff8 <_Timer_server_Body+0x194>
a001afcc: ea000012 b a001b01c <_Timer_server_Body+0x1b8>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
a001afd0: e5923000 ldr r3, [r2]
head->next = new_first;
new_first->previous = head;
a001afd4: e5836004 str r6, [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;
a001afd8: e58d3018 str r3, [sp, #24]
* 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;
a001afdc: e3a03000 mov r3, #0
a001afe0: e5823008 str r3, [r2, #8]
a001afe4: 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 );
a001afe8: e592301c ldr r3, [r2, #28]
a001afec: e5920020 ldr r0, [r2, #32]
a001aff0: e5921024 ldr r1, [r2, #36] ; 0x24
a001aff4: e12fff33 blx r3
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a001aff8: e10f1000 mrs r1, CPSR
a001affc: e3813080 orr r3, r1, #128 ; 0x80
a001b000: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a001b004: e59d2018 ldr r2, [sp, #24]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a001b008: e59d3000 ldr r3, [sp]
a001b00c: e1520003 cmp r2, r3
a001b010: 1affffee bne a001afd0 <_Timer_server_Body+0x16c>
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a001b014: e129f001 msr CPSR_fc, r1
a001b018: eaffffac b a001aed0 <_Timer_server_Body+0x6c>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a001b01c: e59f2058 ldr r2, [pc, #88] ; a001b07c <_Timer_server_Body+0x218>
}
} else {
ts->active = false;
a001b020: e3a01000 mov r1, #0
a001b024: e5c4107c strb r1, [r4, #124] ; 0x7c
a001b028: e5923000 ldr r3, [r2]
++level;
a001b02c: e2833001 add r3, r3, #1
_Thread_Dispatch_disable_level = level;
a001b030: e5823000 str r3, [r2]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
a001b034: e3a01008 mov r1, #8
a001b038: e5940000 ldr r0, [r4]
a001b03c: eb00105e bl a001f1bc <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
a001b040: e1a00004 mov r0, r4
a001b044: ebffff5a bl a001adb4 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
a001b048: e1a00004 mov r0, r4
a001b04c: ebffff6e bl a001ae0c <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
a001b050: eb000e0a bl a001e880 <_Thread_Enable_dispatch>
ts->active = true;
a001b054: e3a03001 mov r3, #1
a001b058: e5c4307c strb r3, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
a001b05c: e59d0004 ldr r0, [sp, #4]
a001b060: eb0011f6 bl a001f840 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
a001b064: e59d0008 ldr r0, [sp, #8]
a001b068: eb0011f4 bl a001f840 <_Watchdog_Remove>
a001b06c: eaffff97 b a001aed0 <_Timer_server_Body+0x6c>
a001b080 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
a001b080: e92d40f0 push {r4, r5, r6, r7, lr}
if ( ts->insert_chain == NULL ) {
a001b084: e5905078 ldr r5, [r0, #120] ; 0x78
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
a001b088: e1a04000 mov r4, r0
a001b08c: e1a06001 mov r6, r1
if ( ts->insert_chain == NULL ) {
a001b090: e3550000 cmp r5, #0
a001b094: 0a000002 beq a001b0a4 <_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 );
a001b098: e5900078 ldr r0, [r0, #120] ; 0x78 <== NOT EXECUTED
}
}
a001b09c: e8bd40f0 pop {r4, r5, r6, r7, 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 );
a001b0a0: ea000280 b a001baa8 <_Chain_Append> <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a001b0a4: e59f3110 ldr r3, [pc, #272] ; a001b1bc <_Timer_server_Schedule_operation_method+0x13c>
a001b0a8: e5932000 ldr r2, [r3]
++level;
a001b0ac: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a001b0b0: e5832000 str r2, [r3]
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a001b0b4: e5913038 ldr r3, [r1, #56] ; 0x38
a001b0b8: e3530001 cmp r3, #1
a001b0bc: 0a000024 beq a001b154 <_Timer_server_Schedule_operation_method+0xd4>
_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 ) {
a001b0c0: e3530003 cmp r3, #3
a001b0c4: 0a000001 beq a001b0d0 <_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 );
}
}
a001b0c8: e8bd40f0 pop {r4, r5, r6, r7, lr}
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
a001b0cc: ea000deb b a001e880 <_Thread_Enable_dispatch>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a001b0d0: e10f7000 mrs r7, CPSR
a001b0d4: e3873080 orr r3, r7, #128 ; 0x80
a001b0d8: e129f003 msr CPSR_fc, r3
a001b0dc: e59f10dc ldr r1, [pc, #220] ; a001b1c0 <_Timer_server_Schedule_operation_method+0x140>
a001b0e0: e59f20dc ldr r2, [pc, #220] ; a001b1c4 <_Timer_server_Schedule_operation_method+0x144>
a001b0e4: e3a03000 mov r3, #0
a001b0e8: e8910003 ldm r1, {r0, r1}
a001b0ec: eb0050f0 bl a002f4b4 <__divdi3>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a001b0f0: e5943068 ldr r3, [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 );
a001b0f4: e284106c add r1, 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;
a001b0f8: e5942074 ldr r2, [r4, #116] ; 0x74
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
a001b0fc: e1530001 cmp r3, r1
a001b100: 0a000008 beq a001b128 <_Timer_server_Schedule_operation_method+0xa8>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
a001b104: e5931010 ldr r1, [r3, #16] <== NOT EXECUTED
if ( snapshot > last_snapshot ) {
a001b108: e1500002 cmp r0, r2 <== NOT EXECUTED
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
a001b10c: 90812002 addls r2, r1, r2 <== NOT EXECUTED
delta_interval += delta;
a001b110: 90605002 rsbls r5, 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 ) {
a001b114: 9a000002 bls a001b124 <_Timer_server_Schedule_operation_method+0xa4><== NOT EXECUTED
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
a001b118: e0622000 rsb r2, r2, r0 <== NOT EXECUTED
if (delta_interval > delta) {
a001b11c: e1510002 cmp r1, r2 <== NOT EXECUTED
delta_interval -= delta;
a001b120: 80625001 rsbhi r5, r2, r1 <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
a001b124: e5835010 str r5, [r3, #16] <== NOT EXECUTED
}
ts->TOD_watchdogs.last_snapshot = snapshot;
a001b128: e5840074 str r0, [r4, #116] ; 0x74
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a001b12c: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a001b130: e2840068 add r0, r4, #104 ; 0x68
a001b134: e2861010 add r1, r6, #16
a001b138: eb001153 bl a001f68c <_Watchdog_Insert>
if ( !ts->active ) {
a001b13c: e5d4307c ldrb r3, [r4, #124] ; 0x7c
a001b140: e3530000 cmp r3, #0
a001b144: 1affffdf bne a001b0c8 <_Timer_server_Schedule_operation_method+0x48>
_Timer_server_Reset_tod_system_watchdog( ts );
a001b148: e1a00004 mov r0, r4
a001b14c: ebffff2e bl a001ae0c <_Timer_server_Reset_tod_system_watchdog>
a001b150: eaffffdc b a001b0c8 <_Timer_server_Schedule_operation_method+0x48>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a001b154: e10fc000 mrs ip, CPSR
a001b158: e38c3080 orr r3, ip, #128 ; 0x80
a001b15c: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a001b160: e5903030 ldr r3, [r0, #48] ; 0x30
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a001b164: e2802034 add r2, r0, #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 ) ) {
a001b168: e1530002 cmp r3, r2
/*
* 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;
a001b16c: e59f2054 ldr r2, [pc, #84] ; a001b1c8 <_Timer_server_Schedule_operation_method+0x148>
a001b170: e5922000 ldr r2, [r2]
last_snapshot = ts->Interval_watchdogs.last_snapshot;
a001b174: e590103c ldr r1, [r0, #60] ; 0x3c
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
a001b178: 0a000004 beq a001b190 <_Timer_server_Schedule_operation_method+0x110>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
a001b17c: e5930010 ldr r0, [r3, #16]
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
a001b180: e0611002 rsb r1, r1, r2
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
a001b184: e1510000 cmp r1, r0
delta_interval -= delta;
a001b188: 30615000 rsbcc r5, r1, r0
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
a001b18c: e5835010 str r5, [r3, #16]
}
ts->Interval_watchdogs.last_snapshot = snapshot;
a001b190: e584203c str r2, [r4, #60] ; 0x3c
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a001b194: e129f00c msr CPSR_fc, ip
_ISR_Enable( level );
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
a001b198: e2840030 add r0, r4, #48 ; 0x30
a001b19c: e2861010 add r1, r6, #16
a001b1a0: eb001139 bl a001f68c <_Watchdog_Insert>
if ( !ts->active ) {
a001b1a4: e5d4307c ldrb r3, [r4, #124] ; 0x7c
a001b1a8: e3530000 cmp r3, #0
a001b1ac: 1affffc5 bne a001b0c8 <_Timer_server_Schedule_operation_method+0x48>
_Timer_server_Reset_interval_system_watchdog( ts );
a001b1b0: e1a00004 mov r0, r4
a001b1b4: ebfffefe bl a001adb4 <_Timer_server_Reset_interval_system_watchdog>
a001b1b8: eaffffc2 b a001b0c8 <_Timer_server_Schedule_operation_method+0x48>
a000e914 <_Timespec_Subtract>:
const struct timespec *end,
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
a000e914: e591c004 ldr ip, [r1, #4]
a000e918: e5903004 ldr r3, [r0, #4]
void _Timespec_Subtract(
const struct timespec *start,
const struct timespec *end,
struct timespec *result
)
{
a000e91c: e52d4004 push {r4} ; (str r4, [sp, #-4]!)
if (end->tv_nsec < start->tv_nsec) {
a000e920: e15c0003 cmp ip, r3
result->tv_sec = end->tv_sec - start->tv_sec - 1;
a000e924: e5914000 ldr r4, [r1]
a000e928: e5901000 ldr r1, [r0]
const struct timespec *end,
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
a000e92c: ba000005 blt a000e948 <_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;
result->tv_nsec = end->tv_nsec - start->tv_nsec;
a000e930: e063300c rsb r3, r3, ip
a000e934: 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;
a000e938: e0613004 rsb r3, r1, r4
a000e93c: e5823000 str r3, [r2]
result->tv_nsec = end->tv_nsec - start->tv_nsec;
}
}
a000e940: e8bd0010 pop {r4}
a000e944: e12fff1e bx lr
{
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;
a000e948: e28cc5ee add ip, ip, #998244352 ; 0x3b800000 <== NOT EXECUTED
a000e94c: 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;
a000e950: e0611004 rsb r1, r1, r4 <== NOT EXECUTED
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
a000e954: 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;
a000e958: e2411001 sub r1, r1, #1 <== NOT EXECUTED
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
a000e95c: 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;
a000e960: e5821000 str r1, [r2] <== NOT EXECUTED
result->tv_nsec =
a000e964: e5823004 str r3, [r2, #4] <== NOT EXECUTED
a000e968: eafffff4 b a000e940 <_Timespec_Subtract+0x2c> <== NOT EXECUTED
a000f228 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
a000f228: e92d43f0 push {r4, r5, r6, r7, r8, r9, lr} <== NOT EXECUTED
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
a000f22c: e8910300 ldm r1, {r8, r9} <== NOT EXECUTED
a000f230: e1981009 orrs r1, r8, r9 <== NOT EXECUTED
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
a000f234: e1a04002 mov r4, r2 <== NOT EXECUTED
a000f238: e1a05003 mov r5, r3 <== NOT EXECUTED
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
a000f23c: 0a000017 beq a000f2a0 <_Timestamp64_Divide+0x78> <== NOT EXECUTED
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
a000f240: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000f244: e3a01b61 mov r1, #99328 ; 0x18400 <== NOT EXECUTED
a000f248: e2811e2a add r1, r1, #672 ; 0x2a0 <== NOT EXECUTED
a000f24c: e0876193 umull r6, r7, r3, r1 <== NOT EXECUTED
a000f250: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED
a000f254: e1a02008 mov r2, r8 <== NOT EXECUTED
a000f258: e1a03009 mov r3, r9 <== NOT EXECUTED
a000f25c: e0277091 mla r7, r1, r0, r7 <== NOT EXECUTED
a000f260: e1a00006 mov r0, r6 <== NOT EXECUTED
a000f264: e1a01007 mov r1, r7 <== NOT EXECUTED
a000f268: eb003c79 bl a001e454 <__divdi3> <== NOT EXECUTED
*_ival_percentage = answer / 1000;
a000f26c: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED
a000f270: e3a03000 mov r3, #0 <== NOT EXECUTED
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
a000f274: e1a06000 mov r6, r0 <== NOT EXECUTED
a000f278: e1a07001 mov r7, r1 <== NOT EXECUTED
*_ival_percentage = answer / 1000;
a000f27c: eb003c74 bl a001e454 <__divdi3> <== NOT EXECUTED
*_fval_percentage = answer % 1000;
a000f280: e1a01007 mov r1, r7 <== NOT EXECUTED
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
*_ival_percentage = answer / 1000;
a000f284: e5840000 str r0, [r4] <== NOT EXECUTED
*_fval_percentage = answer % 1000;
a000f288: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED
a000f28c: e3a03000 mov r3, #0 <== NOT EXECUTED
a000f290: e1a00006 mov r0, r6 <== NOT EXECUTED
a000f294: eb003da9 bl a001e940 <__moddi3> <== NOT EXECUTED
a000f298: e5850000 str r0, [r5] <== NOT EXECUTED
a000f29c: e8bd83f0 pop {r4, r5, r6, r7, r8, r9, pc} <== NOT EXECUTED
)
{
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
*_ival_percentage = 0;
a000f2a0: e3a03000 mov r3, #0 <== NOT EXECUTED
a000f2a4: e5823000 str r3, [r2] <== NOT EXECUTED
*_fval_percentage = 0;
a000f2a8: e5853000 str r3, [r5] <== NOT EXECUTED
return;
a000f2ac: e8bd83f0 pop {r4, r5, r6, r7, r8, r9, pc} <== NOT EXECUTED
a0013894 <_User_extensions_Remove_set>:
#include <rtems/score/userextimpl.h>
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
a0013894: e92d4010 push {r4, lr}
a0013898: e1a04000 mov r4, r0
_Chain_Extract( &the_extension->Node );
a001389c: eb0014ef bl a0018c60 <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
a00138a0: e5943024 ldr r3, [r4, #36] ; 0x24
a00138a4: e3530000 cmp r3, #0
a00138a8: 0a000002 beq a00138b8 <_User_extensions_Remove_set+0x24>
_Chain_Extract( &the_extension->Switch.Node );
a00138ac: e2840008 add r0, r4, #8 <== NOT EXECUTED
}
a00138b0: e8bd4010 pop {r4, lr} <== NOT EXECUTED
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
a00138b4: ea0014e9 b a0018c60 <_Chain_Extract> <== NOT EXECUTED
a00138b8: e8bd8010 pop {r4, pc}
a000f4e0 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
a000f4e0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000f4e4: e1a04000 mov r4, r0
a000f4e8: e1a05002 mov r5, r2
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000f4ec: e10f2000 mrs r2, CPSR
a000f4f0: e3823080 orr r3, r2, #128 ; 0x80
a000f4f4: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a000f4f8: e1a07000 mov r7, r0
a000f4fc: 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 ) ) {
a000f500: e1530007 cmp r3, r7
a000f504: 0a000017 beq a000f568 <_Watchdog_Adjust+0x88>
switch ( direction ) {
a000f508: e3510000 cmp r1, #0
a000f50c: 1a000017 bne a000f570 <_Watchdog_Adjust+0x90>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000f510: e3550000 cmp r5, #0
a000f514: 0a000013 beq a000f568 <_Watchdog_Adjust+0x88>
if ( units < _Watchdog_First( header )->delta_interval ) {
a000f518: e5936010 ldr r6, [r3, #16]
a000f51c: e1550006 cmp r5, r6
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000f520: 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 ) {
a000f524: 2a000005 bcs a000f540 <_Watchdog_Adjust+0x60>
a000f528: ea000017 b a000f58c <_Watchdog_Adjust+0xac> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000f52c: e0555006 subs r5, r5, r6 <== NOT EXECUTED
a000f530: 0a00000c beq a000f568 <_Watchdog_Adjust+0x88> <== NOT EXECUTED
if ( units < _Watchdog_First( header )->delta_interval ) {
a000f534: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED
a000f538: e1560005 cmp r6, r5 <== NOT EXECUTED
a000f53c: 8a000012 bhi a000f58c <_Watchdog_Adjust+0xac> <== NOT EXECUTED
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000f540: e5838010 str r8, [r3, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000f544: e129f002 msr CPSR_fc, r2
_ISR_Enable( level );
_Watchdog_Tickle( header );
a000f548: e1a00004 mov r0, r4
a000f54c: eb0000a9 bl a000f7f8 <_Watchdog_Tickle>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000f550: e10f2000 mrs r2, CPSR
a000f554: e3823080 orr r3, r2, #128 ; 0x80
a000f558: e129f003 msr CPSR_fc, r3
a000f55c: e5943000 ldr r3, [r4]
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a000f560: e1570003 cmp r7, r3
a000f564: 1afffff0 bne a000f52c <_Watchdog_Adjust+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000f568: e129f002 msr CPSR_fc, r2
}
}
_ISR_Enable( level );
}
a000f56c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
a000f570: e3510001 cmp r1, #1 <== NOT EXECUTED
a000f574: 1afffffb bne a000f568 <_Watchdog_Adjust+0x88> <== NOT EXECUTED
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
a000f578: e5931010 ldr r1, [r3, #16] <== NOT EXECUTED
a000f57c: e0815005 add r5, r1, r5 <== NOT EXECUTED
a000f580: e5835010 str r5, [r3, #16] <== NOT EXECUTED
a000f584: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
}
}
_ISR_Enable( level );
}
a000f588: 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;
a000f58c: e0655006 rsb r5, r5, r6 <== NOT EXECUTED
a000f590: e5835010 str r5, [r3, #16] <== NOT EXECUTED
break;
a000f594: eafffff3 b a000f568 <_Watchdog_Adjust+0x88> <== NOT EXECUTED
a001f5e8 <_Watchdog_Adjust_to_chain>:
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
a001f5e8: e92d05f0 push {r4, r5, r6, r7, r8, sl}
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a001f5ec: e10f7000 mrs r7, CPSR
a001f5f0: e3873080 orr r3, r7, #128 ; 0x80
a001f5f4: e129f003 msr CPSR_fc, r3
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
_ISR_Disable( level );
a001f5f8: e1a06000 mov r6, r0
a001f5fc: 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;
a001f600: e3a0a000 mov sl, #0
a001f604: e2828004 add r8, r2, #4
Watchdog_Control *first;
_ISR_Disable( level );
while ( 1 ) {
if ( _Chain_Is_empty( header ) ) {
a001f608: e1560003 cmp r6, r3
a001f60c: 0a000018 beq a001f674 <_Watchdog_Adjust_to_chain+0x8c>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
a001f610: e593c010 ldr ip, [r3, #16]
a001f614: e151000c cmp r1, ip
a001f618: 3a000018 bcc a001f680 <_Watchdog_Adjust_to_chain+0x98>
/*
* 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;
a001f61c: e06c1001 rsb r1, ip, r1
first->delta_interval = 0;
a001f620: e583a010 str sl, [r3, #16]
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
a001f624: e5935000 ldr r5, [r3]
previous = the_node->previous;
a001f628: e5934004 ldr r4, [r3, #4]
next->previous = previous;
a001f62c: 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;
a001f630: e592c008 ldr ip, [r2, #8]
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
a001f634: e5845000 str r5, [r4]
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
a001f638: e5838000 str r8, [r3]
tail->previous = the_node;
old_last->next = the_node;
a001f63c: 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;
a001f640: e5823008 str r3, [r2, #8]
old_last->next = the_node;
the_node->previous = old_last;
a001f644: e583c004 str ip, [r3, #4]
static inline void arm_interrupt_flash( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a001f648: e10f3000 mrs r3, CPSR
a001f64c: e129f007 msr CPSR_fc, r7
a001f650: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a001f654: e5903000 ldr r3, [r0]
_Chain_Extract_unprotected( &first->Node );
_Chain_Append_unprotected( to_fire, &first->Node );
_ISR_Flash( level );
if ( _Chain_Is_empty( header ) )
a001f658: e1560003 cmp r6, r3
a001f65c: 0affffe9 beq a001f608 <_Watchdog_Adjust_to_chain+0x20>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
a001f660: e593c010 ldr ip, [r3, #16] <== NOT EXECUTED
a001f664: e35c0000 cmp ip, #0 <== NOT EXECUTED
a001f668: 0affffed beq a001f624 <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED
Watchdog_Control *first;
_ISR_Disable( level );
while ( 1 ) {
if ( _Chain_Is_empty( header ) ) {
a001f66c: e1560003 cmp r6, r3 <== NOT EXECUTED
a001f670: 1affffe6 bne a001f610 <_Watchdog_Adjust_to_chain+0x28> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a001f674: e129f007 msr CPSR_fc, r7
break;
}
}
_ISR_Enable( level );
}
a001f678: e8bd05f0 pop {r4, r5, r6, r7, r8, sl}
a001f67c: 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;
a001f680: e061100c rsb r1, r1, ip
a001f684: e5831010 str r1, [r3, #16]
break;
a001f688: eafffff9 b a001f674 <_Watchdog_Adjust_to_chain+0x8c>
a000dcb8 <_Watchdog_Insert>:
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
a000dcb8: e59f3138 ldr r3, [pc, #312] ; a000ddf8 <_Watchdog_Insert+0x140>
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
a000dcbc: 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;
a000dcc0: e5935000 ldr r5, [r3]
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000dcc4: e10f4000 mrs r4, CPSR
a000dcc8: e3843080 orr r3, r4, #128 ; 0x80
a000dccc: 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 ) {
a000dcd0: e5913008 ldr r3, [r1, #8]
a000dcd4: e3530000 cmp r3, #0
a000dcd8: 1a00003e bne a000ddd8 <_Watchdog_Insert+0x120>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
a000dcdc: e59f7118 ldr r7, [pc, #280] ; a000ddfc <_Watchdog_Insert+0x144>
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
a000dce0: e3a02001 mov r2, #1
a000dce4: e59f6114 ldr r6, [pc, #276] ; a000de00 <_Watchdog_Insert+0x148>
_Watchdog_Sync_count++;
a000dce8: e5973000 ldr r3, [r7]
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
a000dcec: e5812008 str r2, [r1, #8]
_Watchdog_Sync_count++;
a000dcf0: e0833002 add r3, r3, r2
a000dcf4: e5873000 str r3, [r7]
restart:
delta_interval = the_watchdog->initial;
a000dcf8: e591300c ldr r3, [r1, #12]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
a000dcfc: e5902000 ldr r2, [r0]
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
a000dd00: e3530000 cmp r3, #0
a000dd04: 0a000023 beq a000dd98 <_Watchdog_Insert+0xe0>
a000dd08: e592c000 ldr ip, [r2]
a000dd0c: e35c0000 cmp ip, #0
a000dd10: 0a000020 beq a000dd98 <_Watchdog_Insert+0xe0>
break;
if ( delta_interval < after->delta_interval ) {
a000dd14: e592c010 ldr ip, [r2, #16]
a000dd18: e153000c cmp r3, ip
a000dd1c: 3a000030 bcc a000dde4 <_Watchdog_Insert+0x12c>
static inline void arm_interrupt_flash( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000dd20: e10f8000 mrs r8, CPSR
a000dd24: e129f004 msr CPSR_fc, r4
a000dd28: e129f008 msr CPSR_fc, r8
delta_interval -= after->delta_interval;
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
a000dd2c: e5918008 ldr r8, [r1, #8]
a000dd30: e3580001 cmp r8, #1
a000dd34: 1a000023 bne a000ddc8 <_Watchdog_Insert+0x110>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
a000dd38: e5968000 ldr r8, [r6]
a000dd3c: e1550008 cmp r5, r8
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
a000dd40: 206c3003 rsbcs r3, ip, r3
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
a000dd44: 2a000010 bcs a000dd8c <_Watchdog_Insert+0xd4>
a000dd48: ea000028 b a000ddf0 <_Watchdog_Insert+0x138> <== NOT EXECUTED
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
a000dd4c: e592c000 ldr ip, [r2]
a000dd50: e35c0000 cmp ip, #0
a000dd54: 0a00000f beq a000dd98 <_Watchdog_Insert+0xe0>
break;
if ( delta_interval < after->delta_interval ) {
a000dd58: e592c010 ldr ip, [r2, #16]
a000dd5c: e15c0003 cmp ip, r3
a000dd60: 8a00001f bhi a000dde4 <_Watchdog_Insert+0x12c>
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
a000dd64: e06c3003 rsb r3, ip, r3
a000dd68: e10fc000 mrs ip, CPSR
a000dd6c: e129f004 msr CPSR_fc, r4
a000dd70: e129f00c msr CPSR_fc, ip
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
a000dd74: e591c008 ldr ip, [r1, #8]
a000dd78: e35c0001 cmp ip, #1
a000dd7c: 1a000011 bne a000ddc8 <_Watchdog_Insert+0x110>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
a000dd80: e596c000 ldr ip, [r6]
a000dd84: e155000c cmp r5, ip
a000dd88: 3a000018 bcc a000ddf0 <_Watchdog_Insert+0x138>
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
a000dd8c: e3530000 cmp r3, #0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
a000dd90: e5922000 ldr r2, [r2]
a000dd94: 1affffec bne a000dd4c <_Watchdog_Insert+0x94>
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
a000dd98: e5922004 ldr r2, [r2, #4]
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
a000dd9c: e59fc060 ldr ip, [pc, #96] ; a000de04 <_Watchdog_Insert+0x14c>
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
a000dda0: e3a08002 mov r8, #2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
a000dda4: e5920000 ldr r0, [r2]
a000dda8: e59cc000 ldr ip, [ip]
a000ddac: e5818008 str r8, [r1, #8]
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
a000ddb0: e5813010 str r3, [r1, #16]
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
a000ddb4: e5812004 str r2, [r1, #4]
before_node = after_node->next;
after_node->next = the_node;
a000ddb8: e5821000 str r1, [r2]
the_node->next = before_node;
before_node->previous = the_node;
a000ddbc: 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;
a000ddc0: e5810000 str r0, [r1]
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
a000ddc4: e581c014 str ip, [r1, #20]
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
a000ddc8: e5865000 str r5, [r6]
_Watchdog_Sync_count--;
a000ddcc: e5973000 ldr r3, [r7]
a000ddd0: e2433001 sub r3, r3, #1
a000ddd4: e5873000 str r3, [r7]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000ddd8: e129f004 msr CPSR_fc, r4
_ISR_Enable( level );
}
a000dddc: e8bd01f0 pop {r4, r5, r6, r7, r8}
a000dde0: e12fff1e bx lr
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
a000dde4: e063c00c rsb ip, r3, ip
a000dde8: e582c010 str ip, [r2, #16]
break;
a000ddec: eaffffe9 b a000dd98 <_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;
a000ddf0: e5865000 str r5, [r6] <== NOT EXECUTED
goto restart;
a000ddf4: eaffffbf b a000dcf8 <_Watchdog_Insert+0x40> <== NOT EXECUTED
a000efb0 <_Watchdog_Report>:
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
a000efb0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
printk(
a000efb4: e2507000 subs r7, r0, #0 <== NOT EXECUTED
a000efb8: 059f7048 ldreq r7, [pc, #72] ; a000f008 <_Watchdog_Report+0x58><== NOT EXECUTED
a000efbc: e591600c ldr r6, [r1, #12] <== NOT EXECUTED
a000efc0: e591501c ldr r5, [r1, #28] <== NOT EXECUTED
a000efc4: e5914020 ldr r4, [r1, #32] <== NOT EXECUTED
a000efc8: e591e024 ldr lr, [r1, #36] ; 0x24 <== NOT EXECUTED
a000efcc: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
a000efd0: e24dd014 sub sp, sp, #20 <== NOT EXECUTED
a000efd4: e1a0c001 mov ip, r1 <== NOT EXECUTED
printk(
a000efd8: 01a02007 moveq r2, r7 <== NOT EXECUTED
a000efdc: 159f2028 ldrne r2, [pc, #40] ; a000f00c <_Watchdog_Report+0x5c><== NOT EXECUTED
a000efe0: e59f0028 ldr r0, [pc, #40] ; a000f010 <_Watchdog_Report+0x60><== NOT EXECUTED
a000efe4: e1a01007 mov r1, r7 <== NOT EXECUTED
a000efe8: e58d6000 str r6, [sp] <== NOT EXECUTED
a000efec: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
a000eff0: e58d5008 str r5, [sp, #8] <== NOT EXECUTED
a000eff4: e58d400c str r4, [sp, #12] <== NOT EXECUTED
a000eff8: e58de010 str lr, [sp, #16] <== NOT EXECUTED
a000effc: ebffe343 bl a0007d10 <printk> <== NOT EXECUTED
watch,
watch->routine,
watch->id,
watch->user_data
);
}
a000f000: e28dd014 add sp, sp, #20 <== NOT EXECUTED
a000f004: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a000ef38 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
a000ef38: e92d40f0 push {r4, r5, r6, r7, lr}
a000ef3c: e1a02001 mov r2, r1
a000ef40: e1a05000 mov r5, r0
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000ef44: e10f6000 mrs r6, CPSR
a000ef48: e3863080 orr r3, r6, #128 ; 0x80
a000ef4c: e129f003 msr CPSR_fc, r3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
a000ef50: e59f004c ldr r0, [pc, #76] ; a000efa4 <_Watchdog_Report_chain+0x6c>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a000ef54: e1a04001 mov r4, r1
a000ef58: e1a01005 mov r1, r5
a000ef5c: ebffe36b bl a0007d10 <printk>
a000ef60: e4947004 ldr r7, [r4], #4
if ( !_Chain_Is_empty( header ) ) {
a000ef64: e1570004 cmp r7, r4
a000ef68: 0a00000a beq a000ef98 <_Watchdog_Report_chain+0x60>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
a000ef6c: e1a01007 mov r1, r7 <== NOT EXECUTED
a000ef70: e3a00000 mov r0, #0 <== NOT EXECUTED
a000ef74: eb00000d bl a000efb0 <_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 )
a000ef78: 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 ) ;
a000ef7c: e1570004 cmp r7, r4 <== NOT EXECUTED
a000ef80: 1afffff9 bne a000ef6c <_Watchdog_Report_chain+0x34> <== NOT EXECUTED
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
a000ef84: e59f001c ldr r0, [pc, #28] ; a000efa8 <_Watchdog_Report_chain+0x70><== NOT EXECUTED
a000ef88: e1a01005 mov r1, r5 <== NOT EXECUTED
a000ef8c: ebffe35f bl a0007d10 <printk> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000ef90: e129f006 msr CPSR_fc, r6
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
a000ef94: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
a000ef98: e59f000c ldr r0, [pc, #12] ; a000efac <_Watchdog_Report_chain+0x74>
a000ef9c: ebffe35b bl a0007d10 <printk>
a000efa0: eafffffa b a000ef90 <_Watchdog_Report_chain+0x58>
a000df18 <_Watchdog_Tickle>:
#include <rtems/score/watchdog.h>
void _Watchdog_Tickle(
Chain_Control *header
)
{
a000df18: e92d40f0 push {r4, r5, r6, r7, lr}
a000df1c: e1a05000 mov r5, r0
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000df20: e10f7000 mrs r7, CPSR
a000df24: e3873080 orr r3, r7, #128 ; 0x80
a000df28: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a000df2c: e1a04000 mov r4, r0
a000df30: e4946004 ldr r6, [r4], #4
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a000df34: e1560004 cmp r6, r4
a000df38: 0a000006 beq a000df58 <_Watchdog_Tickle+0x40>
* 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) {
a000df3c: e5963010 ldr r3, [r6, #16]
a000df40: e3530000 cmp r3, #0
a000df44: 0a000012 beq a000df94 <_Watchdog_Tickle+0x7c>
the_watchdog->delta_interval--;
a000df48: e2433001 sub r3, r3, #1
if ( the_watchdog->delta_interval != 0 )
a000df4c: e3530000 cmp r3, #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--;
a000df50: e5863010 str r3, [r6, #16]
if ( the_watchdog->delta_interval != 0 )
a000df54: 0a00000e beq a000df94 <_Watchdog_Tickle+0x7c>
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000df58: e129f007 msr CPSR_fc, r7
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
a000df5c: e8bd80f0 pop {r4, r5, r6, r7, pc}
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
a000df60: e596301c ldr r3, [r6, #28]
a000df64: e5960020 ldr r0, [r6, #32]
a000df68: e5961024 ldr r1, [r6, #36] ; 0x24
a000df6c: e12fff33 blx r3
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000df70: e10f7000 mrs r7, CPSR
a000df74: e3873080 orr r3, r7, #128 ; 0x80
a000df78: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
a000df7c: e5956000 ldr r6, [r5]
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
a000df80: e1540006 cmp r4, r6
a000df84: 0afffff3 beq a000df58 <_Watchdog_Tickle+0x40>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
a000df88: e5963010 ldr r3, [r6, #16] <== NOT EXECUTED
a000df8c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000df90: 1afffff0 bne a000df58 <_Watchdog_Tickle+0x40> <== NOT EXECUTED
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
a000df94: e1a00006 mov r0, r6
a000df98: ebffffb3 bl a000de6c <_Watchdog_Remove>
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000df9c: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
switch( watchdog_state ) {
a000dfa0: e3500002 cmp r0, #2
a000dfa4: 1afffff1 bne a000df70 <_Watchdog_Tickle+0x58>
a000dfa8: eaffffec b a000df60 <_Watchdog_Tickle+0x48>
a000dfac <_Workspace_Handler_initialization>:
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
a000dfac: e59f3120 ldr r3, [pc, #288] ; a000e0d4 <_Workspace_Handler_initialization+0x128>
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
a000dfb0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000dfb4: e1a08001 mov r8, r1
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
a000dfb8: e5d31032 ldrb r1, [r3, #50] ; 0x32
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
a000dfbc: e24dd004 sub sp, sp, #4
a000dfc0: e58d2000 str r2, [sp]
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
a000dfc4: e3510000 cmp r1, #0
a000dfc8: 05937004 ldreq r7, [r3, #4]
a000dfcc: e5932000 ldr r2, [r3]
a000dfd0: 13a07000 movne r7, #0
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
a000dfd4: e3580000 cmp r8, #0
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
a000dfd8: e0877002 add r7, r7, r2
bool do_zero = rtems_configuration_get_do_zero_of_workspace();
a000dfdc: e5d3a030 ldrb sl, [r3, #48] ; 0x30
bool unified = rtems_configuration_get_unified_work_area();
a000dfe0: e5d3b031 ldrb fp, [r3, #49] ; 0x31
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
a000dfe4: 0a000032 beq a000e0b4 <_Workspace_Handler_initialization+0x108>
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
a000dfe8: e59f90e8 ldr r9, [pc, #232] ; a000e0d8 <_Workspace_Handler_initialization+0x12c>
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
a000dfec: e1a04000 mov r4, r0
a000dff0: e3a06000 mov r6, #0
a000dff4: ea00001d b a000e070 <_Workspace_Handler_initialization+0xc4>
if ( do_zero ) {
memset( area->begin, 0, area->size );
}
if ( area->size > overhead ) {
a000dff8: e5945004 ldr r5, [r4, #4]
a000dffc: e3550016 cmp r5, #22
a000e000: 9a000016 bls a000e060 <_Workspace_Handler_initialization+0xb4>
uintptr_t space_available;
uintptr_t size;
if ( unified ) {
a000e004: e35b0000 cmp fp, #0
a000e008: 1a000004 bne a000e020 <_Workspace_Handler_initialization+0x74>
size = area->size;
} else {
if ( remaining > 0 ) {
a000e00c: e3570000 cmp r7, #0
a000e010: 0a00001d beq a000e08c <_Workspace_Handler_initialization+0xe0>
size = remaining < area->size - overhead ?
a000e014: e2453016 sub r3, r5, #22
remaining + overhead : area->size;
a000e018: e1530007 cmp r3, r7
a000e01c: 82875016 addhi r5, r7, #22
} else {
size = 0;
}
}
space_available = (*init_or_extend)(
a000e020: e1a02005 mov r2, r5
a000e024: e3a03008 mov r3, #8
a000e028: e59f00ac ldr r0, [pc, #172] ; a000e0dc <_Workspace_Handler_initialization+0x130>
a000e02c: e5941000 ldr r1, [r4]
a000e030: e12fff39 blx r9
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
a000e034: e5943000 ldr r3, [r4]
area->size -= size;
a000e038: e5942004 ldr r2, [r4, #4]
if ( space_available < remaining ) {
a000e03c: e1500007 cmp r0, r7
remaining -= space_available;
} else {
remaining = 0;
}
init_or_extend = extend;
a000e040: 359d9000 ldrcc r9, [sp]
a000e044: 259d9000 ldrcs r9, [sp]
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
a000e048: e0833005 add r3, r3, r5
area->size -= size;
a000e04c: e0655002 rsb r5, r5, r2
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
a000e050: e5843000 str r3, [r4]
area->size -= size;
a000e054: e5845004 str r5, [r4, #4]
if ( space_available < remaining ) {
remaining -= space_available;
a000e058: 30607007 rsbcc r7, r0, r7
} else {
remaining = 0;
a000e05c: 23a07000 movcs r7, #0
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
a000e060: e2866001 add r6, r6, #1
a000e064: e1560008 cmp r6, r8
a000e068: e2844008 add r4, r4, #8
a000e06c: 0a000010 beq a000e0b4 <_Workspace_Handler_initialization+0x108>
Heap_Area *area = &areas [i];
if ( do_zero ) {
a000e070: e35a0000 cmp sl, #0
a000e074: 0affffdf beq a000dff8 <_Workspace_Handler_initialization+0x4c>
memset( area->begin, 0, area->size );
a000e078: e5940000 ldr r0, [r4]
a000e07c: e3a01000 mov r1, #0
a000e080: e5942004 ldr r2, [r4, #4]
a000e084: eb001472 bl a0013254 <memset>
a000e088: eaffffda b a000dff8 <_Workspace_Handler_initialization+0x4c>
} else {
size = 0;
}
}
space_available = (*init_or_extend)(
a000e08c: e5941000 ldr r1, [r4] <== NOT EXECUTED
a000e090: e59f0044 ldr r0, [pc, #68] ; a000e0dc <_Workspace_Handler_initialization+0x130><== NOT EXECUTED
a000e094: e1a02007 mov r2, r7 <== NOT EXECUTED
a000e098: e3a03008 mov r3, #8 <== NOT EXECUTED
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
a000e09c: e2866001 add r6, r6, #1 <== NOT EXECUTED
} else {
size = 0;
}
}
space_available = (*init_or_extend)(
a000e0a0: e12fff39 blx r9 <== NOT EXECUTED
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
a000e0a4: e1560008 cmp r6, r8 <== NOT EXECUTED
remaining -= space_available;
} else {
remaining = 0;
}
init_or_extend = extend;
a000e0a8: e59d9000 ldr r9, [sp] <== NOT EXECUTED
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
a000e0ac: e2844008 add r4, r4, #8 <== NOT EXECUTED
a000e0b0: 1affffee bne a000e070 <_Workspace_Handler_initialization+0xc4><== NOT EXECUTED
init_or_extend = extend;
}
}
if ( remaining > 0 ) {
a000e0b4: e3570000 cmp r7, #0
a000e0b8: 1a000001 bne a000e0c4 <_Workspace_Handler_initialization+0x118>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
}
a000e0bc: e28dd004 add sp, sp, #4
a000e0c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
init_or_extend = extend;
}
}
if ( remaining > 0 ) {
_Internal_error_Occurred(
a000e0c4: e3a00000 mov r0, #0
a000e0c8: e3a01001 mov r1, #1
a000e0cc: e3a02002 mov r2, #2
a000e0d0: ebfff6c6 bl a000bbf0 <_Internal_error_Occurred>
a000a618 <adjtime>:
*/
int adjtime(
const struct timeval *delta,
struct timeval *olddelta
)
{
a000a618: e92d4370 push {r4, r5, r6, r8, r9, lr}
long adjustment;
/*
* Simple validations
*/
if ( !delta )
a000a61c: e2505000 subs r5, r0, #0
*/
int adjtime(
const struct timeval *delta,
struct timeval *olddelta
)
{
a000a620: e24dd008 sub sp, sp, #8
a000a624: e1a06001 mov r6, r1
long adjustment;
/*
* Simple validations
*/
if ( !delta )
a000a628: 0a00004e beq a000a768 <adjtime+0x150>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
a000a62c: e5952004 ldr r2, [r5, #4]
a000a630: e59f3144 ldr r3, [pc, #324] ; a000a77c <adjtime+0x164>
a000a634: e1520003 cmp r2, r3
a000a638: 8a00004a bhi a000a768 <adjtime+0x150>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
a000a63c: e3510000 cmp r1, #0
olddelta->tv_sec = 0;
a000a640: 13a03000 movne r3, #0
olddelta->tv_usec = 0;
a000a644: 15813004 strne r3, [r1, #4]
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
olddelta->tv_sec = 0;
a000a648: 15813000 strne r3, [r1]
olddelta->tv_usec = 0;
a000a64c: 15952004 ldrne r2, [r5, #4]
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
a000a650: e5951000 ldr r1, [r5]
a000a654: e3a0393d mov r3, #999424 ; 0xf4000
a000a658: e2833d09 add r3, r3, #576 ; 0x240
adjustment += delta->tv_usec;
a000a65c: e0232391 mla r3, r1, r3, r2
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
a000a660: e59f2118 ldr r2, [pc, #280] ; a000a780 <adjtime+0x168>
a000a664: e592100c ldr r1, [r2, #12]
a000a668: e1530001 cmp r3, r1
return 0;
a000a66c: 33a00000 movcc r0, #0
/* 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() )
a000a670: 2a000001 bcs a000a67c <adjtime+0x64>
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
a000a674: e28dd008 add sp, sp, #8
a000a678: e8bd8370 pop {r4, r5, r6, r8, r9, pc}
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000a67c: e59f3100 ldr r3, [pc, #256] ; a000a784 <adjtime+0x16c> <== NOT EXECUTED
a000a680: e5932000 ldr r2, [r3] <== NOT EXECUTED
++level;
a000a684: e2822001 add r2, r2, #1 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
a000a688: e5832000 str r2, [r3] <== NOT EXECUTED
)
{
Timestamp_Control tod_as_timestamp;
Timestamp_Control *tod_as_timestamp_ptr;
tod_as_timestamp_ptr =
a000a68c: e59f10f4 ldr r1, [pc, #244] ; a000a788 <adjtime+0x170> <== NOT EXECUTED
a000a690: e1a0000d mov r0, sp <== NOT EXECUTED
a000a694: eb000660 bl a000c01c <_TOD_Get_with_nanoseconds> <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a000a698: e59f20ec ldr r2, [pc, #236] ; a000a78c <adjtime+0x174> <== NOT EXECUTED
a000a69c: e8900300 ldm r0, {r8, r9} <== NOT EXECUTED
a000a6a0: e3a03000 mov r3, #0 <== NOT EXECUTED
a000a6a4: e1a00008 mov r0, r8 <== NOT EXECUTED
a000a6a8: e1a01009 mov r1, r9 <== NOT EXECUTED
a000a6ac: eb005101 bl a001eab8 <__divdi3> <== NOT EXECUTED
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
a000a6b0: e5954000 ldr r4, [r5] <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a000a6b4: e59f20d0 ldr r2, [pc, #208] ; a000a78c <adjtime+0x174> <== NOT EXECUTED
a000a6b8: e3a03000 mov r3, #0 <== NOT EXECUTED
a000a6bc: e0844000 add r4, r4, r0 <== NOT EXECUTED
a000a6c0: e1a01009 mov r1, r9 <== NOT EXECUTED
a000a6c4: e1a00008 mov r0, r8 <== NOT EXECUTED
a000a6c8: eb005235 bl a001efa4 <__moddi3> <== NOT EXECUTED
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
a000a6cc: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED
a000a6d0: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000a6d4: e59f30b4 ldr r3, [pc, #180] ; a000a790 <adjtime+0x178> <== NOT EXECUTED
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
a000a6d8: e0220291 mla r2, r1, r2, r0 <== NOT EXECUTED
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000a6dc: e1520003 cmp r2, r3 <== NOT EXECUTED
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
a000a6e0: 91a01002 movls r1, r2 <== NOT EXECUTED
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000a6e4: 9a000006 bls a000a704 <adjtime+0xec> <== NOT EXECUTED
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
a000a6e8: e2822331 add r2, r2, #-1006632960 ; 0xc4000000 <== NOT EXECUTED
a000a6ec: e2822865 add r2, r2, #6619136 ; 0x650000 <== NOT EXECUTED
a000a6f0: e2822c36 add r2, r2, #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 ) {
a000a6f4: e1520003 cmp r2, r3 <== NOT EXECUTED
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
a000a6f8: e1a01002 mov r1, r2 <== NOT EXECUTED
ts.tv_sec++;
a000a6fc: e2844001 add r4, r4, #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 ) {
a000a700: 8afffff8 bhi a000a6e8 <adjtime+0xd0> <== 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) ) {
a000a704: e59f3088 ldr r3, [pc, #136] ; a000a794 <adjtime+0x17c> <== NOT EXECUTED
a000a708: e1520003 cmp r2, r3 <== NOT EXECUTED
a000a70c: 8a000006 bhi a000a72c <adjtime+0x114> <== NOT EXECUTED
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
a000a710: e28225ee add r2, r2, #998244352 ; 0x3b800000 <== NOT EXECUTED
a000a714: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED
a000a718: e2822c0a add r2, r2, #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) ) {
a000a71c: e1520003 cmp r2, r3 <== NOT EXECUTED
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
a000a720: e1a01002 mov r1, r2 <== NOT EXECUTED
ts.tv_sec--;
a000a724: e2444001 sub r4, r4, #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) ) {
a000a728: 9afffff8 bls a000a710 <adjtime+0xf8> <== NOT EXECUTED
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
a000a72c: e1a02001 mov r2, r1 <== NOT EXECUTED
a000a730: e1a03fc1 asr r3, r1, #31 <== NOT EXECUTED
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
a000a734: e59f1050 ldr r1, [pc, #80] ; a000a78c <adjtime+0x174> <== NOT EXECUTED
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
a000a738: e1a0000d mov r0, sp <== NOT EXECUTED
a000a73c: e0e32491 smlal r2, r3, r1, r4 <== NOT EXECUTED
a000a740: e88d000c stm sp, {r2, r3} <== NOT EXECUTED
a000a744: eb000653 bl a000c098 <_TOD_Set_with_timestamp> <== NOT EXECUTED
ts.tv_sec--;
}
_TOD_Set( &ts );
_Thread_Enable_dispatch();
a000a748: eb000caf bl a000da0c <_Thread_Enable_dispatch> <== NOT EXECUTED
/* set the user's output */
if ( olddelta )
a000a74c: e3560000 cmp r6, #0 <== NOT EXECUTED
*olddelta = *delta;
return 0;
a000a750: 01a00006 moveq r0, r6 <== NOT EXECUTED
_TOD_Set( &ts );
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
a000a754: 0affffc6 beq a000a674 <adjtime+0x5c> <== NOT EXECUTED
*olddelta = *delta;
a000a758: e895000c ldm r5, {r2, r3} <== NOT EXECUTED
return 0;
a000a75c: e3a00000 mov r0, #0 <== NOT EXECUTED
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
a000a760: e886000c stm r6, {r2, r3} <== NOT EXECUTED
a000a764: eaffffc2 b a000a674 <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 );
a000a768: eb0022ff bl a001336c <__errno>
a000a76c: e3a03016 mov r3, #22
a000a770: e5803000 str r3, [r0]
a000a774: e3e00000 mvn r0, #0
a000a778: eaffffbd b a000a674 <adjtime+0x5c>
a000a9d0 <aio_cancel>:
#include <stdlib.h>
#include <rtems/system.h>
#include <rtems/seterr.h>
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
a000a9d0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
a000a9d4: e59f41b8 ldr r4, [pc, #440] ; a000ab94 <aio_cancel+0x1c4>
#include <stdlib.h>
#include <rtems/system.h>
#include <rtems/seterr.h>
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
a000a9d8: e1a06000 mov r6, r0
a000a9dc: e1a05001 mov r5, r1
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
a000a9e0: e1a00004 mov r0, r4
a000a9e4: eb000460 bl a000bb6c <pthread_mutex_lock>
if (fcntl (fildes, F_GETFD) < 0) {
a000a9e8: e1a00006 mov r0, r6
a000a9ec: e3a01001 mov r1, #1
a000a9f0: eb001adf bl a0011574 <fcntl>
a000a9f4: e3500000 cmp r0, #0
a000a9f8: ba00005e blt a000ab78 <aio_cancel+0x1a8>
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) {
a000a9fc: e3550000 cmp r5, #0 <== NOT EXECUTED
a000aa00: 0a000032 beq a000aad0 <aio_cancel+0x100> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
a000aa04: e5957000 ldr r7, [r5] <== NOT EXECUTED
a000aa08: e1570006 cmp r7, r6 <== NOT EXECUTED
a000aa0c: 1a000028 bne a000aab4 <aio_cancel+0xe4> <== 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);
a000aa10: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000aa14: e1a01007 mov r1, r7 <== NOT EXECUTED
a000aa18: e3a02000 mov r2, #0 <== NOT EXECUTED
a000aa1c: eb00017b bl a000b010 <rtems_aio_search_fd> <== NOT EXECUTED
if (r_chain == NULL) {
a000aa20: e2506000 subs r6, r0, #0 <== NOT EXECUTED
a000aa24: 0a00000c beq a000aa5c <aio_cancel+0x8c> <== NOT EXECUTED
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
a000aa28: e286801c add r8, r6, #28 <== NOT EXECUTED
a000aa2c: e1a00008 mov r0, r8 <== NOT EXECUTED
a000aa30: eb00044d bl a000bb6c <pthread_mutex_lock> <== NOT EXECUTED
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
a000aa34: e1a01005 mov r1, r5 <== NOT EXECUTED
a000aa38: e2860008 add r0, r6, #8 <== NOT EXECUTED
a000aa3c: eb0001c0 bl a000b144 <rtems_aio_remove_req> <== NOT EXECUTED
a000aa40: e1a05000 mov r5, r0 <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
a000aa44: e1a00008 mov r0, r8 <== NOT EXECUTED
a000aa48: eb000468 bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
a000aa4c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000aa50: eb000466 bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
return result;
}
return AIO_ALLDONE;
}
a000aa54: e1a00005 mov r0, r5
a000aa58: e8bd81f0 pop {r4, r5, r6, r7, r8, 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)) {
a000aa5c: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED
a000aa60: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED
a000aa64: e1520003 cmp r2, r3 <== NOT EXECUTED
a000aa68: 0a00000d beq a000aaa4 <aio_cancel+0xd4> <== NOT EXECUTED
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
a000aa6c: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED
a000aa70: e1a01007 mov r1, r7 <== NOT EXECUTED
a000aa74: e1a02006 mov r2, r6 <== NOT EXECUTED
a000aa78: eb000164 bl a000b010 <rtems_aio_search_fd> <== NOT EXECUTED
if (r_chain == NULL) {
a000aa7c: e3500000 cmp r0, #0 <== NOT EXECUTED
a000aa80: 0a00000b beq a000aab4 <aio_cancel+0xe4> <== 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);
a000aa84: e1a01005 mov r1, r5 <== NOT EXECUTED
a000aa88: e2800008 add r0, r0, #8 <== NOT EXECUTED
a000aa8c: eb0001ac bl a000b144 <rtems_aio_remove_req> <== NOT EXECUTED
a000aa90: e1a05000 mov r5, r0 <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
a000aa94: e1a00004 mov r0, r4 <== NOT EXECUTED
a000aa98: eb000454 bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
a000aa9c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000aaa0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== 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);
a000aaa4: e1a00004 mov r0, r4 <== NOT EXECUTED
a000aaa8: eb000450 bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_ALLDONE;
a000aaac: e3a05002 mov r5, #2 <== NOT EXECUTED
a000aab0: eaffffe7 b a000aa54 <aio_cancel+0x84> <== 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);
a000aab4: e1a00004 mov r0, r4 <== NOT EXECUTED
a000aab8: eb00044c bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one (EINVAL);
a000aabc: eb0028a5 bl a0014d58 <__errno> <== NOT EXECUTED
a000aac0: e3a03016 mov r3, #22 <== NOT EXECUTED
a000aac4: e5803000 str r3, [r0] <== NOT EXECUTED
a000aac8: e3e05000 mvn r5, #0 <== NOT EXECUTED
a000aacc: eaffffe0 b a000aa54 <aio_cancel+0x84> <== 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);
a000aad0: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000aad4: e1a01006 mov r1, r6 <== NOT EXECUTED
a000aad8: e1a02005 mov r2, r5 <== NOT EXECUTED
a000aadc: eb00014b bl a000b010 <rtems_aio_search_fd> <== NOT EXECUTED
if (r_chain == NULL) {
a000aae0: e2507000 subs r7, r0, #0 <== NOT EXECUTED
a000aae4: 0a00000b beq a000ab18 <aio_cancel+0x148> <== NOT EXECUTED
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
a000aae8: e287601c add r6, r7, #28 <== NOT EXECUTED
a000aaec: e1a00006 mov r0, r6 <== NOT EXECUTED
a000aaf0: eb00041d bl a000bb6c <pthread_mutex_lock> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
a000aaf4: e1a00007 mov r0, r7 <== NOT EXECUTED
a000aaf8: eb000abb bl a000d5ec <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
a000aafc: e1a00007 mov r0, r7 <== NOT EXECUTED
a000ab00: eb00017a bl a000b0f0 <rtems_aio_remove_fd> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
a000ab04: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ab08: eb000438 bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
a000ab0c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ab10: eb000436 bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_CANCELED;
a000ab14: eaffffce b a000aa54 <aio_cancel+0x84> <== 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)) {
a000ab18: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED
a000ab1c: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED
a000ab20: e1520003 cmp r2, r3 <== NOT EXECUTED
a000ab24: 0affffde beq a000aaa4 <aio_cancel+0xd4> <== NOT EXECUTED
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
a000ab28: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED
a000ab2c: e1a01006 mov r1, r6 <== NOT EXECUTED
a000ab30: e1a02007 mov r2, r7 <== NOT EXECUTED
a000ab34: eb000135 bl a000b010 <rtems_aio_search_fd> <== NOT EXECUTED
if (r_chain == NULL) {
a000ab38: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a000ab3c: 0affffd8 beq a000aaa4 <aio_cancel+0xd4> <== 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);
a000ab40: e285601c add r6, r5, #28 <== NOT EXECUTED
a000ab44: eb000aa8 bl a000d5ec <_Chain_Extract> <== NOT EXECUTED
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
a000ab48: e1a00005 mov r0, r5 <== NOT EXECUTED
a000ab4c: eb000167 bl a000b0f0 <rtems_aio_remove_fd> <== NOT EXECUTED
pthread_mutex_destroy (&r_chain->mutex);
a000ab50: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ab54: eb00035f bl a000b8d8 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_cond_destroy (&r_chain->mutex);
a000ab58: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ab5c: eb000283 bl a000b570 <pthread_cond_destroy> <== NOT EXECUTED
free (r_chain);
a000ab60: e1a00005 mov r0, r5 <== NOT EXECUTED
a000ab64: ebfff069 bl a0006d10 <free> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
a000ab68: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ab6c: eb00041f bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_CANCELED;
a000ab70: e1a05007 mov r5, r7 <== NOT EXECUTED
a000ab74: eaffffb6 b a000aa54 <aio_cancel+0x84> <== NOT EXECUTED
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
if (fcntl (fildes, F_GETFD) < 0) {
pthread_mutex_unlock(&aio_request_queue.mutex);
a000ab78: e1a00004 mov r0, r4
a000ab7c: eb00041b bl a000bbf0 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
a000ab80: eb002874 bl a0014d58 <__errno>
a000ab84: e3a03009 mov r3, #9
a000ab88: e5803000 str r3, [r0]
a000ab8c: e3e05000 mvn r5, #0
a000ab90: eaffffaf b a000aa54 <aio_cancel+0x84>
a000aba0 <aio_fsync>:
)
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
a000aba0: e3500a02 cmp r0, #8192 ; 0x2000
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
a000aba4: e92d4030 push {r4, r5, lr}
a000aba8: e1a04001 mov r4, r1
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
a000abac: 13a05016 movne r5, #22
)
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
a000abb0: 1a000011 bne a000abfc <aio_fsync+0x5c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
a000abb4: e5910000 ldr r0, [r1]
a000abb8: e3a01003 mov r1, #3
a000abbc: eb001a6c bl a0011574 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
a000abc0: e2000003 and r0, r0, #3
a000abc4: e2400001 sub r0, r0, #1
a000abc8: e3500001 cmp r0, #1
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
a000abcc: 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)))
a000abd0: 8a000009 bhi a000abfc <aio_fsync+0x5c>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
a000abd4: e3a00018 mov r0, #24 <== NOT EXECUTED
a000abd8: ebfff175 bl a00071b4 <malloc> <== NOT EXECUTED
if (req == NULL)
a000abdc: e2503000 subs r3, r0, #0 <== NOT EXECUTED
a000abe0: 0a000004 beq a000abf8 <aio_fsync+0x58> <== NOT EXECUTED
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
a000abe4: e5834014 str r4, [r3, #20] <== NOT EXECUTED
req->aiocbp->aio_lio_opcode = LIO_SYNC;
a000abe8: e3a03003 mov r3, #3 <== NOT EXECUTED
a000abec: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED
return rtems_aio_enqueue (req);
}
a000abf0: 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);
a000abf4: ea00016c b a000b1ac <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);
a000abf8: e3a0500b mov r5, #11 <== NOT EXECUTED
a000abfc: e3e03000 mvn r3, #0
a000ac00: e5845030 str r5, [r4, #48] ; 0x30
a000ac04: e5843034 str r3, [r4, #52] ; 0x34
a000ac08: eb002852 bl a0014d58 <__errno>
a000ac0c: e5805000 str r5, [r0]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
a000ac10: e3e00000 mvn r0, #0
a000ac14: e8bd8030 pop {r4, r5, pc}
a000b388 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
a000b388: e92d4030 push {r4, r5, lr}
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
a000b38c: e3a01003 mov r1, #3
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
a000b390: e1a04000 mov r4, r0
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
a000b394: e5900000 ldr r0, [r0]
a000b398: eb001875 bl a0011574 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
a000b39c: e2000003 and r0, r0, #3
a000b3a0: e3500002 cmp r0, #2
a000b3a4: 13500000 cmpne r0, #0
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
a000b3a8: 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)))
a000b3ac: 1a000010 bne a000b3f4 <aio_read+0x6c>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
a000b3b0: e5943014 ldr r3, [r4, #20]
a000b3b4: e3530000 cmp r3, #0
a000b3b8: 1a000014 bne a000b410 <aio_read+0x88>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
a000b3bc: e994000c ldmib r4, {r2, r3}
a000b3c0: e3520000 cmp r2, #0
a000b3c4: e2d31000 sbcs r1, r3, #0
a000b3c8: ba000010 blt a000b410 <aio_read+0x88>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
a000b3cc: e3a00018 mov r0, #24
a000b3d0: ebffef77 bl a00071b4 <malloc>
if (req == NULL)
a000b3d4: e2503000 subs r3, r0, #0
a000b3d8: 0a000004 beq a000b3f0 <aio_read+0x68>
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
a000b3dc: e5834014 str r4, [r3, #20]
req->aiocbp->aio_lio_opcode = LIO_READ;
a000b3e0: e3a03001 mov r3, #1
a000b3e4: e584302c str r3, [r4, #44] ; 0x2c
return rtems_aio_enqueue (req);
}
a000b3e8: e8bd4030 pop {r4, r5, lr}
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
a000b3ec: eaffff6e b a000b1ac <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);
a000b3f0: e3a0500b mov r5, #11 <== NOT EXECUTED
a000b3f4: e3e03000 mvn r3, #0
a000b3f8: e5845030 str r5, [r4, #48] ; 0x30
a000b3fc: e5843034 str r3, [r4, #52] ; 0x34
a000b400: eb002654 bl a0014d58 <__errno>
a000b404: e5805000 str r5, [r0]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
a000b408: e3e00000 mvn r0, #0
a000b40c: 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);
a000b410: e3a05016 mov r5, #22
a000b414: eafffff6 b a000b3f4 <aio_read+0x6c>
a000b420 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
a000b420: e92d4030 push {r4, r5, lr}
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
a000b424: e3a01003 mov r1, #3
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
a000b428: e1a04000 mov r4, r0
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
a000b42c: e5900000 ldr r0, [r0]
a000b430: eb00184f bl a0011574 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
a000b434: e2000003 and r0, r0, #3
a000b438: e2400001 sub r0, r0, #1
a000b43c: e3500001 cmp r0, #1
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
a000b440: 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)))
a000b444: 8a000010 bhi a000b48c <aio_write+0x6c>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
a000b448: e5943014 ldr r3, [r4, #20]
a000b44c: e3530000 cmp r3, #0
a000b450: 1a000014 bne a000b4a8 <aio_write+0x88>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
a000b454: e994000c ldmib r4, {r2, r3}
a000b458: e3520000 cmp r2, #0
a000b45c: e2d31000 sbcs r1, r3, #0
a000b460: ba000010 blt a000b4a8 <aio_write+0x88>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
a000b464: e3a00018 mov r0, #24
a000b468: ebffef51 bl a00071b4 <malloc>
if (req == NULL)
a000b46c: e2503000 subs r3, r0, #0
a000b470: 0a000004 beq a000b488 <aio_write+0x68>
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
a000b474: e5834014 str r4, [r3, #20]
req->aiocbp->aio_lio_opcode = LIO_WRITE;
a000b478: e3a03002 mov r3, #2
a000b47c: e584302c str r3, [r4, #44] ; 0x2c
return rtems_aio_enqueue (req);
}
a000b480: 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);
a000b484: eaffff48 b a000b1ac <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);
a000b488: e3a0500b mov r5, #11 <== NOT EXECUTED
a000b48c: e3e03000 mvn r3, #0
a000b490: e5845030 str r5, [r4, #48] ; 0x30
a000b494: e5843034 str r3, [r4, #52] ; 0x34
a000b498: eb00262e bl a0014d58 <__errno>
a000b49c: e5805000 str r5, [r0]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
a000b4a0: e3e00000 mvn r0, #0
a000b4a4: 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);
a000b4a8: e3a05016 mov r5, #22
a000b4ac: eafffff6 b a000b48c <aio_write+0x6c>
a000c1a0 <alarm>:
}
unsigned int alarm(
unsigned int seconds
)
{
a000c1a0: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
a000c1a4: e59f4084 ldr r4, [pc, #132] ; a000c230 <alarm+0x90>
}
unsigned int alarm(
unsigned int seconds
)
{
a000c1a8: e1a05000 mov r5, r0
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
a000c1ac: e594601c ldr r6, [r4, #28]
a000c1b0: e3560000 cmp r6, #0
a000c1b4: 0a00000d beq a000c1f0 <alarm+0x50>
_Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
a000c1b8: e1a00004 mov r0, r4 <== NOT EXECUTED
a000c1bc: eb00141b bl a0011230 <_Watchdog_Remove> <== NOT EXECUTED
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
a000c1c0: e2400002 sub r0, r0, #2 <== NOT EXECUTED
a000c1c4: e3500001 cmp r0, #1 <== NOT EXECUTED
unsigned int alarm(
unsigned int seconds
)
{
unsigned int remaining = 0;
a000c1c8: 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) ) {
a000c1cc: 9a00000d bls a000c208 <alarm+0x68> <== NOT EXECUTED
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
a000c1d0: e3550000 cmp r5, #0
a000c1d4: 0a000003 beq a000c1e8 <alarm+0x48>
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a000c1d8: e59f0054 ldr r0, [pc, #84] ; a000c234 <alarm+0x94>
a000c1dc: e59f104c ldr r1, [pc, #76] ; a000c230 <alarm+0x90>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000c1e0: e584500c str r5, [r4, #12]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a000c1e4: eb0013a4 bl a001107c <_Watchdog_Insert>
_Watchdog_Insert_seconds( the_timer, seconds );
return remaining;
}
a000c1e8: e1a00006 mov r0, r6
a000c1ec: e8bd80f0 pop {r4, r5, r6, r7, pc}
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000c1f0: e59f3040 ldr r3, [pc, #64] ; a000c238 <alarm+0x98>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000c1f4: e5846008 str r6, [r4, #8]
the_watchdog->routine = routine;
the_watchdog->id = id;
a000c1f8: e5846020 str r6, [r4, #32]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000c1fc: e584301c str r3, [r4, #28]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a000c200: e5846024 str r6, [r4, #36] ; 0x24
a000c204: eafffff1 b a000c1d0 <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);
a000c208: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
a000c20c: e5947018 ldr r7, [r4, #24] <== NOT EXECUTED
* 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 -
a000c210: e594600c ldr r6, [r4, #12] <== NOT EXECUTED
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
a000c214: e0637007 rsb r7, r3, r7 <== NOT EXECUTED
a000c218: eb000a10 bl a000ea60 <TOD_TICKS_PER_SECOND_method> <== NOT EXECUTED
a000c21c: e1a01000 mov r1, r0 <== NOT EXECUTED
a000c220: e1a00007 mov r0, r7 <== NOT EXECUTED
a000c224: eb004e6b bl a001fbd8 <__aeabi_uidiv> <== NOT EXECUTED
* 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 -
a000c228: e0606006 rsb r6, r0, r6 <== NOT EXECUTED
a000c22c: eaffffe7 b a000c1d0 <alarm+0x30> <== NOT EXECUTED
a000abd0 <clock_getres>:
int clock_getres(
clockid_t clock_id,
struct timespec *res
)
{
if ( !res )
a000abd0: e3510000 cmp r1, #0 <== NOT EXECUTED
int clock_getres(
clockid_t clock_id,
struct timespec *res
)
{
a000abd4: e92d4010 push {r4, lr} <== NOT EXECUTED
if ( !res )
a000abd8: 0a000011 beq a000ac24 <clock_getres+0x54> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
switch ( clock_id ) {
a000abdc: e2400001 sub r0, r0, #1 <== NOT EXECUTED
a000abe0: e3500002 cmp r0, #2 <== NOT EXECUTED
a000abe4: 9a000004 bls a000abfc <clock_getres+0x2c> <== NOT EXECUTED
res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick();
}
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a000abe8: eb00232d bl a00138a4 <__errno> <== NOT EXECUTED
a000abec: e3a03016 mov r3, #22 <== NOT EXECUTED
a000abf0: e5803000 str r3, [r0] <== NOT EXECUTED
a000abf4: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
return 0;
}
a000abf8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
case CLOCK_REALTIME:
case CLOCK_PROCESS_CPUTIME_ID:
case CLOCK_THREAD_CPUTIME_ID:
if ( res ) {
res->tv_sec = rtems_configuration_get_microseconds_per_tick() /
a000abfc: e59f3034 ldr r3, [pc, #52] ; a000ac38 <clock_getres+0x68> <== NOT EXECUTED
a000ac00: e59f2034 ldr r2, [pc, #52] ; a000ac3c <clock_getres+0x6c> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return 0;
a000ac04: e3a00000 mov r0, #0 <== NOT EXECUTED
case CLOCK_REALTIME:
case CLOCK_PROCESS_CPUTIME_ID:
case CLOCK_THREAD_CPUTIME_ID:
if ( res ) {
res->tv_sec = rtems_configuration_get_microseconds_per_tick() /
a000ac08: e593c00c ldr ip, [r3, #12] <== NOT EXECUTED
TOD_MICROSECONDS_PER_SECOND;
res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick();
a000ac0c: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
case CLOCK_REALTIME:
case CLOCK_PROCESS_CPUTIME_ID:
case CLOCK_THREAD_CPUTIME_ID:
if ( res ) {
res->tv_sec = rtems_configuration_get_microseconds_per_tick() /
a000ac10: e082429c umull r4, r2, ip, r2 <== NOT EXECUTED
a000ac14: e1a02922 lsr r2, r2, #18 <== NOT EXECUTED
a000ac18: e5812000 str r2, [r1] <== NOT EXECUTED
TOD_MICROSECONDS_PER_SECOND;
res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick();
a000ac1c: e5813004 str r3, [r1, #4] <== NOT EXECUTED
a000ac20: e8bd8010 pop {r4, pc} <== NOT EXECUTED
clockid_t clock_id,
struct timespec *res
)
{
if ( !res )
rtems_set_errno_and_return_minus_one( EINVAL );
a000ac24: eb00231e bl a00138a4 <__errno> <== NOT EXECUTED
a000ac28: e3a03016 mov r3, #22 <== NOT EXECUTED
a000ac2c: e5803000 str r3, [r0] <== NOT EXECUTED
a000ac30: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000ac34: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000a4dc <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
a000a4dc: e92d40d0 push {r4, r6, r7, lr}
if ( !tp )
a000a4e0: e2514000 subs r4, r1, #0
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
a000a4e4: e24dd008 sub sp, sp, #8
if ( !tp )
a000a4e8: 0a000007 beq a000a50c <clock_gettime+0x30>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
a000a4ec: e3500001 cmp r0, #1
a000a4f0: 0a000015 beq a000a54c <clock_gettime+0x70>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
a000a4f4: e3500004 cmp r0, #4
a000a4f8: 0a00000f beq a000a53c <clock_gettime+0x60>
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
a000a4fc: e3500002 cmp r0, #2
a000a500: 0a00000d beq a000a53c <clock_gettime+0x60>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
a000a504: e3500003 cmp r0, #3
a000a508: 0a000006 beq a000a528 <clock_gettime+0x4c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
a000a50c: eb00253d bl a0013a08 <__errno>
a000a510: e3a03016 mov r3, #22
a000a514: e5803000 str r3, [r0]
a000a518: e3e03000 mvn r3, #0
return 0;
}
a000a51c: e1a00003 mov r0, r3
a000a520: e28dd008 add sp, sp, #8
a000a524: e8bd80d0 pop {r4, r6, r7, pc}
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
a000a528: eb002536 bl a0013a08 <__errno> <== NOT EXECUTED
a000a52c: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a000a530: e5803000 str r3, [r0] <== NOT EXECUTED
a000a534: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000a538: eafffff7 b a000a51c <clock_gettime+0x40> <== NOT EXECUTED
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
_TOD_Get_uptime_as_timespec( tp );
a000a53c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a540: eb00080d bl a000c57c <_TOD_Get_uptime_as_timespec> <== NOT EXECUTED
return 0;
a000a544: e3a03000 mov r3, #0 <== NOT EXECUTED
a000a548: eafffff3 b a000a51c <clock_gettime+0x40> <== NOT EXECUTED
)
{
Timestamp_Control tod_as_timestamp;
Timestamp_Control *tod_as_timestamp_ptr;
tod_as_timestamp_ptr =
a000a54c: e59f1040 ldr r1, [pc, #64] ; a000a594 <clock_gettime+0xb8>
a000a550: e1a0000d mov r0, sp
a000a554: eb0007f7 bl a000c538 <_TOD_Get_with_nanoseconds>
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a000a558: e59f2038 ldr r2, [pc, #56] ; a000a598 <clock_gettime+0xbc>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
a000a55c: e89000c0 ldm r0, {r6, r7}
a000a560: e3a03000 mov r3, #0
a000a564: e1a00006 mov r0, r6
a000a568: e1a01007 mov r1, r7
a000a56c: eb0055be bl a001fc6c <__divdi3>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a000a570: e3a03000 mov r3, #0
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a000a574: e5840000 str r0, [r4]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a000a578: e59f2018 ldr r2, [pc, #24] ; a000a598 <clock_gettime+0xbc>
a000a57c: e1a00006 mov r0, r6
a000a580: e1a01007 mov r1, r7
a000a584: eb0056f3 bl a0020158 <__moddi3>
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
return 0;
a000a588: e3a03000 mov r3, #0
a000a58c: e5840004 str r0, [r4, #4]
a000a590: eaffffe1 b a000a51c <clock_gettime+0x40>
a0029afc <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
a0029afc: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !tp )
a0029b00: e3510000 cmp r1, #0
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
a0029b04: e24dd008 sub sp, sp, #8
if ( !tp )
a0029b08: 0a000005 beq a0029b24 <clock_settime+0x28>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
a0029b0c: e3500001 cmp r0, #1
a0029b10: 0a000009 beq a0029b3c <clock_settime+0x40>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
a0029b14: e3500002 cmp r0, #2
a0029b18: 0a00001c beq a0029b90 <clock_settime+0x94>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
a0029b1c: e3500003 cmp r0, #3
a0029b20: 0a00001a beq a0029b90 <clock_settime+0x94>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
a0029b24: eb0044df bl a003aea8 <__errno>
a0029b28: e3a03016 mov r3, #22
a0029b2c: e5803000 str r3, [r0]
a0029b30: e3e00000 mvn r0, #0
return 0;
}
a0029b34: e28dd008 add sp, sp, #8
a0029b38: e8bd8000 pop {pc}
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
a0029b3c: e5912000 ldr r2, [r1]
a0029b40: e59f305c ldr r3, [pc, #92] ; a0029ba4 <clock_settime+0xa8>
a0029b44: e1520003 cmp r2, r3
a0029b48: 9afffff5 bls a0029b24 <clock_settime+0x28>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a0029b4c: e59f3054 ldr r3, [pc, #84] ; a0029ba8 <clock_settime+0xac>
a0029b50: e5932000 ldr r2, [r3]
++level;
a0029b54: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a0029b58: e5832000 str r2, [r3]
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
a0029b5c: e591c004 ldr ip, [r1, #4]
a0029b60: e5910000 ldr r0, [r1]
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
a0029b64: e59f1040 ldr r1, [pc, #64] ; a0029bac <clock_settime+0xb0>
a0029b68: e1a0200c mov r2, ip
a0029b6c: e1a03fcc asr r3, ip, #31
a0029b70: e0e32091 smlal r2, r3, r1, r0
a0029b74: e28d0008 add r0, sp, #8
a0029b78: e920000c stmdb r0!, {r2, r3}
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
a0029b7c: e1a0000d mov r0, sp
a0029b80: eb000410 bl a002abc8 <_TOD_Set_with_timestamp>
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
a0029b84: ebff8f30 bl a000d84c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
a0029b88: e3a00000 mov r0, #0
a0029b8c: eaffffe8 b a0029b34 <clock_settime+0x38>
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
a0029b90: eb0044c4 bl a003aea8 <__errno> <== NOT EXECUTED
a0029b94: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a0029b98: e5803000 str r3, [r0] <== NOT EXECUTED
a0029b9c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0029ba0: eaffffe3 b a0029b34 <clock_settime+0x38> <== NOT EXECUTED
a000a308 <fork>:
#include <errno.h>
#include <rtems/seterr.h>
int fork( void )
{
a000a308: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a000a30c: eb00230d bl a0012f48 <__errno> <== NOT EXECUTED
a000a310: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a000a314: e5803000 str r3, [r0] <== NOT EXECUTED
}
a000a318: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a31c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a001dc60 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
a001dc60: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a001dc64: e24dd00c sub sp, sp, #12
a001dc68: e1a04000 mov r4, r0
a001dc6c: e1a05001 mov r5, r1
a001dc70: e1a07002 mov r7, r2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
a001dc74: ebffff7b bl a001da68 <getpid>
a001dc78: e1500004 cmp r0, r4
a001dc7c: 1a000091 bne a001dec8 <killinfo+0x268>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
a001dc80: e3550000 cmp r5, #0
a001dc84: 0a000094 beq a001dedc <killinfo+0x27c>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
a001dc88: e2454001 sub r4, r5, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
a001dc8c: e354001f cmp r4, #31
a001dc90: 8a000091 bhi a001dedc <killinfo+0x27c>
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 )
a001dc94: e59f626c ldr r6, [pc, #620] ; a001df08 <killinfo+0x2a8>
a001dc98: e3a0300c mov r3, #12
a001dc9c: e0236395 mla r3, r5, r3, r6
a001dca0: e5933008 ldr r3, [r3, #8]
a001dca4: e3530001 cmp r3, #1
return 0;
a001dca8: 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 )
a001dcac: 0a000035 beq a001dd88 <killinfo+0x128>
/*
* 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 ) )
a001dcb0: e3550008 cmp r5, #8
a001dcb4: 13550004 cmpne r5, #4
a001dcb8: 0a000034 beq a001dd90 <killinfo+0x130>
a001dcbc: e355000b cmp r5, #11
a001dcc0: 0a000032 beq a001dd90 <killinfo+0x130>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a001dcc4: e3a03001 mov r3, #1
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
a001dcc8: e3570000 cmp r7, #0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
a001dccc: e58d3004 str r3, [sp, #4]
a001dcd0: e1a04413 lsl r4, r3, r4
if ( !value ) {
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
a001dcd4: 15973000 ldrne r3, [r7]
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
a001dcd8: e58d5000 str r5, [sp]
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
a001dcdc: 058d7008 streq r7, [sp, #8]
} else {
siginfo->si_value = *value;
a001dce0: 158d3008 strne r3, [sp, #8]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a001dce4: e59f3220 ldr r3, [pc, #544] ; a001df0c <killinfo+0x2ac>
a001dce8: e5932000 ldr r2, [r3]
++level;
a001dcec: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a001dcf0: e5832000 str r2, [r3]
*/
void _POSIX_signals_Manager_Initialization(void);
static inline void _POSIX_signals_Add_post_switch_extension(void)
{
_API_extensions_Add_post_switch( &_POSIX_signals_Post_switch );
a001dcf4: e59f0214 ldr r0, [pc, #532] ; a001df10 <killinfo+0x2b0>
a001dcf8: ebffb4eb bl a000b0ac <_API_extensions_Add_post_switch>
/*
* 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;
a001dcfc: e59f3210 ldr r3, [pc, #528] ; a001df14 <killinfo+0x2b4>
a001dd00: e5930008 ldr r0, [r3, #8]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
a001dd04: e59030f4 ldr r3, [r0, #244] ; 0xf4
a001dd08: e59330d0 ldr r3, [r3, #208] ; 0xd0
a001dd0c: e1d43003 bics r3, r4, r3
a001dd10: 1a00000e bne a001dd50 <killinfo+0xf0>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
a001dd14: e59f11fc ldr r1, [pc, #508] ; a001df18 <killinfo+0x2b8>
a001dd18: e4910004 ldr r0, [r1], #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 );
a001dd1c: e1500001 cmp r0, r1
a001dd20: 1a000006 bne a001dd40 <killinfo+0xe0>
a001dd24: ea00002b b a001ddd8 <killinfo+0x178>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
a001dd28: e59230d0 ldr r3, [r2, #208] ; 0xd0 <== NOT EXECUTED
a001dd2c: e1d43003 bics r3, r4, r3 <== NOT EXECUTED
a001dd30: 1a000006 bne a001dd50 <killinfo+0xf0> <== 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 ) {
a001dd34: e5900000 ldr r0, [r0] <== 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 );
a001dd38: e1500001 cmp r0, r1 <== NOT EXECUTED
a001dd3c: 0a000025 beq a001ddd8 <killinfo+0x178> <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a001dd40: e5903030 ldr r3, [r0, #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 ];
a001dd44: e59020f4 ldr r2, [r0, #244] ; 0xf4 <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
a001dd48: e1140003 tst r4, r3 <== NOT EXECUTED
a001dd4c: 0afffff5 beq a001dd28 <killinfo+0xc8> <== 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 ) ) {
a001dd50: e1a01005 mov r1, r5 <== NOT EXECUTED
a001dd54: e1a0200d mov r2, sp <== NOT EXECUTED
a001dd58: eb00007d bl a001df54 <_POSIX_signals_Unblock_thread> <== NOT EXECUTED
a001dd5c: e3500000 cmp r0, #0 <== NOT EXECUTED
a001dd60: 1a000006 bne a001dd80 <killinfo+0x120> <== 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 );
a001dd64: e1a00004 mov r0, r4
a001dd68: eb00006f bl a001df2c <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
a001dd6c: e3a0300c mov r3, #12
a001dd70: e0050593 mul r5, r3, r5
a001dd74: e7963005 ldr r3, [r6, r5]
a001dd78: e3530002 cmp r3, #2
a001dd7c: 0a000007 beq a001dda0 <killinfo+0x140>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
a001dd80: ebffbcbf bl a000d084 <_Thread_Enable_dispatch>
return 0;
a001dd84: e3a00000 mov r0, #0
}
a001dd88: e28dd00c add sp, sp, #12
a001dd8c: 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 );
a001dd90: eb0000fc bl a001e188 <pthread_self> <== NOT EXECUTED
a001dd94: e1a01005 mov r1, r5 <== NOT EXECUTED
a001dd98: eb0000c1 bl a001e0a4 <pthread_kill> <== NOT EXECUTED
a001dd9c: eafffff9 b a001dd88 <killinfo+0x128> <== NOT EXECUTED
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
a001dda0: e59f0174 ldr r0, [pc, #372] ; a001df1c <killinfo+0x2bc> <== NOT EXECUTED
a001dda4: ebffb528 bl a000b24c <_Chain_Get> <== NOT EXECUTED
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
a001dda8: e2501000 subs r1, r0, #0 <== NOT EXECUTED
a001ddac: 0a00004f beq a001def0 <killinfo+0x290> <== NOT EXECUTED
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
a001ddb0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
a001ddb4: e59f0164 ldr r0, [pc, #356] ; a001df20 <killinfo+0x2c0> <== NOT EXECUTED
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
a001ddb8: e5813008 str r3, [r1, #8] <== NOT EXECUTED
a001ddbc: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
a001ddc0: e0800005 add r0, r0, r5 <== NOT EXECUTED
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
a001ddc4: e581300c str r3, [r1, #12] <== NOT EXECUTED
a001ddc8: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a001ddcc: e5813010 str r3, [r1, #16] <== NOT EXECUTED
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
a001ddd0: ebffb512 bl a000b220 <_Chain_Append> <== NOT EXECUTED
a001ddd4: eaffffe9 b a001dd80 <killinfo+0x120> <== NOT EXECUTED
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
a001ddd8: e59f3144 ldr r3, [pc, #324] ; a001df24 <killinfo+0x2c4>
a001dddc: e59fa144 ldr sl, [pc, #324] ; a001df28 <killinfo+0x2c8>
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
a001dde0: e3a00000 mov r0, #0
interested_priority = PRIORITY_MAXIMUM + 1;
a001dde4: e5d3e000 ldrb lr, [r3]
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
a001dde8: e28a9008 add r9, sl, #8
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
a001ddec: 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 ] )
a001ddf0: e5ba3004 ldr r3, [sl, #4]!
a001ddf4: e3530000 cmp r3, #0
a001ddf8: 0a000022 beq a001de88 <killinfo+0x228>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
a001ddfc: e5933004 ldr r3, [r3, #4]
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
a001de00: e1d371b0 ldrh r7, [r3, #16]
object_table = the_info->local_table;
a001de04: e593101c ldr r1, [r3, #28]
for ( index = 1 ; index <= maximum ; index++ ) {
a001de08: e3570000 cmp r7, #0
a001de0c: 0a00001d beq a001de88 <killinfo+0x228>
a001de10: e3a02001 mov r2, #1
the_thread = (Thread_Control *) object_table[ index ];
a001de14: e5b13004 ldr r3, [r1, #4]!
if ( !the_thread )
a001de18: e3530000 cmp r3, #0
a001de1c: 0a000016 beq a001de7c <killinfo+0x21c>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
a001de20: e593c014 ldr ip, [r3, #20]
a001de24: e15c000e cmp ip, lr
a001de28: 8a000013 bhi a001de7c <killinfo+0x21c>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
a001de2c: e59380f4 ldr r8, [r3, #244] ; 0xf4
a001de30: e59880d0 ldr r8, [r8, #208] ; 0xd0
a001de34: e1d48008 bics r8, r4, r8
a001de38: 0a00000f beq a001de7c <killinfo+0x21c>
*
* 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 ) {
a001de3c: e15c000e cmp ip, lr <== NOT EXECUTED
a001de40: 3a00001a bcc a001deb0 <killinfo+0x250> <== 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 ) ) {
a001de44: e3500000 cmp r0, #0 <== NOT EXECUTED
a001de48: 0a00000b beq a001de7c <killinfo+0x21c> <== NOT EXECUTED
a001de4c: e5908010 ldr r8, [r0, #16] <== NOT EXECUTED
a001de50: e3580000 cmp r8, #0 <== NOT EXECUTED
a001de54: 0a000008 beq a001de7c <killinfo+0x21c> <== NOT EXECUTED
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
a001de58: e593b010 ldr fp, [r3, #16] <== NOT EXECUTED
a001de5c: e35b0000 cmp fp, #0 <== NOT EXECUTED
a001de60: 0a000012 beq a001deb0 <killinfo+0x250> <== NOT EXECUTED
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
a001de64: e3180201 tst r8, #268435456 ; 0x10000000 <== NOT EXECUTED
a001de68: 1a000003 bne a001de7c <killinfo+0x21c> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal (
States_Control the_states
)
{
return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL);
a001de6c: e20bb201 and fp, fp, #268435456 ; 0x10000000 <== NOT EXECUTED
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
a001de70: e35b0000 cmp fp, #0 <== NOT EXECUTED
a001de74: 11a0e00c movne lr, ip <== NOT EXECUTED
a001de78: 11a00003 movne r0, r3 <== NOT EXECUTED
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a001de7c: e2822001 add r2, r2, #1
a001de80: e1570002 cmp r7, r2
a001de84: 2affffe2 bcs a001de14 <killinfo+0x1b4>
* + 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++) {
a001de88: e15a0009 cmp sl, r9
a001de8c: 1affffd7 bne a001ddf0 <killinfo+0x190>
}
}
}
}
if ( interested ) {
a001de90: e3500000 cmp r0, #0
a001de94: 0affffb2 beq a001dd64 <killinfo+0x104>
/*
* 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 ) ) {
a001de98: e1a01005 mov r1, r5 <== NOT EXECUTED
a001de9c: e1a0200d mov r2, sp <== NOT EXECUTED
a001dea0: eb00002b bl a001df54 <_POSIX_signals_Unblock_thread> <== NOT EXECUTED
a001dea4: e3500000 cmp r0, #0 <== NOT EXECUTED
a001dea8: 0affffad beq a001dd64 <killinfo+0x104> <== NOT EXECUTED
a001deac: eaffffb3 b a001dd80 <killinfo+0x120> <== NOT EXECUTED
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a001deb0: e2822001 add r2, r2, #1 <== NOT EXECUTED
a001deb4: 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 ) ) {
a001deb8: e1a0e00c mov lr, ip <== NOT EXECUTED
a001debc: e1a00003 mov r0, r3 <== NOT EXECUTED
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
a001dec0: 2affffd3 bcs a001de14 <killinfo+0x1b4> <== NOT EXECUTED
a001dec4: eaffffef b a001de88 <killinfo+0x228> <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
a001dec8: ebffd271 bl a0012894 <__errno> <== NOT EXECUTED
a001decc: e3a03003 mov r3, #3 <== NOT EXECUTED
a001ded0: e5803000 str r3, [r0] <== NOT EXECUTED
a001ded4: e3e00000 mvn r0, #0 <== NOT EXECUTED
a001ded8: eaffffaa b a001dd88 <killinfo+0x128> <== 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 );
a001dedc: ebffd26c bl a0012894 <__errno> <== NOT EXECUTED
a001dee0: e3a03016 mov r3, #22 <== NOT EXECUTED
a001dee4: e5803000 str r3, [r0] <== NOT EXECUTED
a001dee8: e3e00000 mvn r0, #0 <== NOT EXECUTED
a001deec: eaffffa5 b a001dd88 <killinfo+0x128> <== 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();
a001def0: ebffbc63 bl a000d084 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EAGAIN );
a001def4: ebffd266 bl a0012894 <__errno> <== NOT EXECUTED
a001def8: e3a0300b mov r3, #11 <== NOT EXECUTED
a001defc: e5803000 str r3, [r0] <== NOT EXECUTED
a001df00: e3e00000 mvn r0, #0 <== NOT EXECUTED
a001df04: eaffff9f b a001dd88 <killinfo+0x128> <== NOT EXECUTED
a000a338 <mprotect>:
const void *addr __attribute__((unused)),
size_t len __attribute__((unused)),
int prot __attribute__((unused)) )
{
return 0;
}
a000a338: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a33c: e12fff1e bx lr <== NOT EXECUTED
a000f9ac <mq_close>:
*/
int mq_close(
mqd_t mqdes
)
{
a000f9ac: e92d4030 push {r4, r5, lr}
a000f9b0: e24dd004 sub sp, sp, #4
a000f9b4: 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(
a000f9b8: e1a0200d mov r2, sp
a000f9bc: e59f0064 ldr r0, [pc, #100] ; a000fa28 <mq_close+0x7c>
a000f9c0: eb000e04 bl a00131d8 <_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 ) {
a000f9c4: e59d5000 ldr r5, [sp]
a000f9c8: e1a04000 mov r4, r0
a000f9cc: e3550000 cmp r5, #0
a000f9d0: 1a00000f bne a000fa14 <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;
a000f9d4: e5903010 ldr r3, [r0, #16]
the_mq->open_count -= 1;
a000f9d8: e5932018 ldr r2, [r3, #24]
_POSIX_Message_queue_Delete( the_mq );
a000f9dc: 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;
a000f9e0: e2422001 sub r2, r2, #1
a000f9e4: e5832018 str r2, [r3, #24]
_POSIX_Message_queue_Delete( the_mq );
a000f9e8: eb00000f bl a000fa2c <_POSIX_Message_queue_Delete>
/*
* Now close this file descriptor.
*/
_Objects_Close(
a000f9ec: e59f0034 ldr r0, [pc, #52] ; a000fa28 <mq_close+0x7c>
a000f9f0: e1a01004 mov r1, r4
a000f9f4: eb000ce3 bl a0012d88 <_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 );
a000f9f8: e59f0028 ldr r0, [pc, #40] ; a000fa28 <mq_close+0x7c>
a000f9fc: e1a01004 mov r1, r4
a000fa00: eb000d9b bl a0013074 <_Objects_Free>
&_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
a000fa04: eb0011c4 bl a001411c <_Thread_Enable_dispatch>
return 0;
a000fa08: e1a00005 mov r0, r5
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
}
a000fa0c: e28dd004 add sp, sp, #4
a000fa10: e8bd8030 pop {r4, r5, pc}
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
a000fa14: eb0029b2 bl a001a0e4 <__errno> <== NOT EXECUTED
a000fa18: e3a03009 mov r3, #9 <== NOT EXECUTED
a000fa1c: e5803000 str r3, [r0] <== NOT EXECUTED
a000fa20: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000fa24: eafffff8 b a000fa0c <mq_close+0x60> <== NOT EXECUTED
a000fa80 <mq_getattr>:
int mq_getattr(
mqd_t mqdes,
struct mq_attr *mqstat
)
{
a000fa80: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
POSIX_Message_queue_Control *the_mq;
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
if ( !mqstat )
a000fa84: e2514000 subs r4, r1, #0 <== NOT EXECUTED
int mq_getattr(
mqd_t mqdes,
struct mq_attr *mqstat
)
{
a000fa88: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000fa8c: e1a01000 mov r1, r0 <== NOT EXECUTED
POSIX_Message_queue_Control *the_mq;
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
if ( !mqstat )
a000fa90: 0a000017 beq a000faf4 <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(
a000fa94: e59f006c ldr r0, [pc, #108] ; a000fb08 <mq_getattr+0x88> <== NOT EXECUTED
a000fa98: e1a0200d mov r2, sp <== NOT EXECUTED
a000fa9c: eb000dcd bl a00131d8 <_Objects_Get> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
a000faa0: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a000faa4: e3550000 cmp r5, #0 <== NOT EXECUTED
a000faa8: 1a00000c bne a000fae0 <mq_getattr+0x60> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
a000faac: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
/*
* Return the old values.
*/
mqstat->mq_flags = the_mq_fd->oflag;
a000fab0: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED
mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
a000fab4: e5931068 ldr r1, [r3, #104] ; 0x68 <== NOT EXECUTED
mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages;
a000fab8: e5932060 ldr r2, [r3, #96] ; 0x60 <== NOT EXECUTED
mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
a000fabc: e5933064 ldr r3, [r3, #100] ; 0x64 <== NOT EXECUTED
the_mq = the_mq_fd->Queue;
/*
* Return the old values.
*/
mqstat->mq_flags = the_mq_fd->oflag;
a000fac0: e5840000 str r0, [r4] <== NOT EXECUTED
mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
a000fac4: e5841008 str r1, [r4, #8] <== NOT EXECUTED
mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages;
a000fac8: e5842004 str r2, [r4, #4] <== NOT EXECUTED
mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
a000facc: e584300c str r3, [r4, #12] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000fad0: eb001191 bl a001411c <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000fad4: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
a000fad8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000fadc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
a000fae0: eb00297f bl a001a0e4 <__errno> <== NOT EXECUTED
a000fae4: e3a03009 mov r3, #9 <== NOT EXECUTED
a000fae8: e5803000 str r3, [r0] <== NOT EXECUTED
a000faec: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000faf0: eafffff8 b a000fad8 <mq_getattr+0x58> <== NOT EXECUTED
POSIX_Message_queue_Control *the_mq;
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
if ( !mqstat )
rtems_set_errno_and_return_minus_one( EINVAL );
a000faf4: eb00297a bl a001a0e4 <__errno> <== NOT EXECUTED
a000faf8: e3a03016 mov r3, #22 <== NOT EXECUTED
a000fafc: e5803000 str r3, [r0] <== NOT EXECUTED
a000fb00: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000fb04: eafffff3 b a000fad8 <mq_getattr+0x58> <== NOT EXECUTED
a000fb30 <mq_notify>:
int mq_notify(
mqd_t mqdes,
const struct sigevent *notification
)
{
a000fb30: e92d4030 push {r4, r5, lr}
a000fb34: e1a03000 mov r3, r0
a000fb38: e24dd004 sub sp, sp, #4
a000fb3c: e1a05001 mov r5, r1
a000fb40: e59f0098 ldr r0, [pc, #152] ; a000fbe0 <mq_notify+0xb0>
a000fb44: e1a01003 mov r1, r3
a000fb48: e1a0200d mov r2, sp
a000fb4c: eb000da1 bl a00131d8 <_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 );
switch ( location ) {
a000fb50: e59d3000 ldr r3, [sp]
a000fb54: e3530000 cmp r3, #0
a000fb58: 0a000005 beq a000fb74 <mq_notify+0x44>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
a000fb5c: eb002960 bl a001a0e4 <__errno> <== NOT EXECUTED
a000fb60: e3a03009 mov r3, #9 <== NOT EXECUTED
a000fb64: e5803000 str r3, [r0] <== NOT EXECUTED
a000fb68: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a000fb6c: e28dd004 add sp, sp, #4
a000fb70: e8bd8030 pop {r4, r5, pc}
switch ( location ) {
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
if ( notification ) {
a000fb74: e3550000 cmp r5, #0
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
a000fb78: e5904010 ldr r4, [r0, #16]
if ( notification ) {
a000fb7c: 0a00000e beq a000fbbc <mq_notify+0x8c>
if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) {
a000fb80: e594307c ldr r3, [r4, #124] ; 0x7c
a000fb84: e3530000 cmp r3, #0
a000fb88: 1a00000e bne a000fbc8 <mq_notify+0x98>
rtems_set_errno_and_return_minus_one( EBUSY );
}
_CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
the_mq->notification = *notification;
a000fb8c: e284c090 add ip, r4, #144 ; 0x90
a000fb90: e1a0e005 mov lr, r5
a000fb94: e8be000f ldm lr!, {r0, r1, r2, r3}
a000fb98: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000fb9c: e59e3000 ldr r3, [lr]
a000fba0: e58c3000 str r3, [ip]
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
a000fba4: e59f3038 ldr r3, [pc, #56] ; a000fbe4 <mq_notify+0xb4>
the_message_queue->notify_argument = the_argument;
a000fba8: e5844080 str r4, [r4, #128] ; 0x80
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
a000fbac: e584307c str r3, [r4, #124] ; 0x7c
_CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
}
_Thread_Enable_dispatch();
a000fbb0: eb001159 bl a001411c <_Thread_Enable_dispatch>
return 0;
a000fbb4: e3a00000 mov r0, #0
a000fbb8: eaffffeb b a000fb6c <mq_notify+0x3c>
a000fbbc: e584507c str r5, [r4, #124] ; 0x7c <== NOT EXECUTED
the_message_queue->notify_argument = the_argument;
a000fbc0: e5845080 str r5, [r4, #128] ; 0x80 <== NOT EXECUTED
a000fbc4: eafffff9 b a000fbb0 <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();
a000fbc8: eb001153 bl a001411c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBUSY );
a000fbcc: eb002944 bl a001a0e4 <__errno> <== NOT EXECUTED
a000fbd0: e3a03010 mov r3, #16 <== NOT EXECUTED
a000fbd4: e5803000 str r3, [r0] <== NOT EXECUTED
a000fbd8: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000fbdc: eaffffe2 b a000fb6c <mq_notify+0x3c> <== NOT EXECUTED
a000a964 <mq_open>:
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
a000a964: e92d000e push {r1, r2, r3}
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000a968: e59f3190 ldr r3, [pc, #400] ; a000ab00 <mq_open+0x19c>
a000a96c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
a000a970: e5932000 ldr r2, [r3]
a000a974: e24dd018 sub sp, sp, #24
a000a978: e59d4038 ldr r4, [sp, #56] ; 0x38
++level;
a000a97c: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000a980: e5832000 str r2, [r3]
a000a984: e1a08000 mov r8, r0
*/
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
a000a988: e59f6174 ldr r6, [pc, #372] ; a000ab04 <mq_open+0x1a0>
Objects_Locations location;
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
a000a98c: e2147c02 ands r7, r4, #512 ; 0x200
va_start(arg, oflag);
mode = va_arg( arg, mode_t );
attr = va_arg( arg, struct mq_attr * );
a000a990: 128d3044 addne r3, sp, #68 ; 0x44
a000a994: e1a00006 mov r0, r6
a000a998: 158d3004 strne r3, [sp, #4]
a000a99c: 159d9040 ldrne r9, [sp, #64] ; 0x40
/* struct mq_attr attr */
)
{
va_list arg;
mode_t mode;
struct mq_attr *attr = NULL;
a000a9a0: 01a09007 moveq r9, r7
a000a9a4: eb000b97 bl a000d808 <_Objects_Allocate>
attr = va_arg( arg, struct mq_attr * );
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
a000a9a8: e2505000 subs r5, r0, #0
a000a9ac: 0a000029 beq a000aa58 <mq_open+0xf4>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
a000a9b0: e5854014 str r4, [r5, #20]
const char *name,
Objects_Id *id,
size_t *len
)
{
return _POSIX_Name_to_id( &_POSIX_Message_queue_Information, name, id, len );
a000a9b4: e59f014c ldr r0, [pc, #332] ; a000ab08 <mq_open+0x1a4>
a000a9b8: e1a01008 mov r1, r8
a000a9bc: e28d2008 add r2, sp, #8
a000a9c0: e28d3014 add r3, sp, #20
a000a9c4: eb00012a bl a000ae74 <_POSIX_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 ) {
a000a9c8: e250a000 subs sl, r0, #0
a000a9cc: 1a000017 bne a000aa30 <mq_open+0xcc>
} else { /* name -> ID translation succeeded */
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
a000a9d0: e2044c0a and r4, r4, #2560 ; 0xa00
a000a9d4: e3540c0a cmp r4, #2560 ; 0xa00
a000a9d8: 0a000024 beq a000aa70 <mq_open+0x10c>
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control *)
a000a9dc: e59d1008 ldr r1, [sp, #8]
a000a9e0: e28d2010 add r2, sp, #16
a000a9e4: e59f011c ldr r0, [pc, #284] ; a000ab08 <mq_open+0x1a4>
a000a9e8: eb000cbd bl a000dce4 <_Objects_Get>
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
the_mq->open_count += 1;
a000a9ec: e5901018 ldr r1, [r0, #24]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a9f0: e596301c ldr r3, [r6, #28]
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
a000a9f4: e1d520b8 ldrh r2, [r5, #8]
a000a9f8: e2811001 add r1, r1, #1
a000a9fc: e5801018 str r1, [r0, #24]
/*
* 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 );
a000aa00: e58d000c str r0, [sp, #12]
the_mq->open_count += 1;
the_mq_fd->Queue = the_mq;
a000aa04: e5850010 str r0, [r5, #16]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000aa08: 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;
a000aa0c: e585a00c str sl, [r5, #12]
_Objects_Open_string(
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
a000aa10: eb001099 bl a000ec7c <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
a000aa14: eb001098 bl a000ec7c <_Thread_Enable_dispatch>
return (mqd_t)the_mq_fd->Object.id;
a000aa18: e5954008 ldr r4, [r5, #8]
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
a000aa1c: e1a00004 mov r0, r4
a000aa20: e28dd018 add sp, sp, #24
a000aa24: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
a000aa28: e28dd00c add sp, sp, #12
a000aa2c: 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) ) ) {
a000aa30: e35a0002 cmp sl, #2
a000aa34: 0a000016 beq a000aa94 <mq_open+0x130>
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 );
a000aa38: e59f00c4 ldr r0, [pc, #196] ; a000ab04 <mq_open+0x1a0>
a000aa3c: e1a01005 mov r1, r5
a000aa40: eb000c4e bl a000db80 <_Objects_Free>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
a000aa44: eb00108c bl a000ec7c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
a000aa48: eb00272b bl a00146fc <__errno>
a000aa4c: e3e04000 mvn r4, #0
a000aa50: e580a000 str sl, [r0]
a000aa54: eafffff0 b a000aa1c <mq_open+0xb8>
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
_Thread_Enable_dispatch();
a000aa58: eb001087 bl a000ec7c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENFILE );
a000aa5c: eb002726 bl a00146fc <__errno> <== NOT EXECUTED
a000aa60: e3a03017 mov r3, #23 <== NOT EXECUTED
a000aa64: e5803000 str r3, [r0] <== NOT EXECUTED
a000aa68: e3e04000 mvn r4, #0 <== NOT EXECUTED
a000aa6c: eaffffea b a000aa1c <mq_open+0xb8> <== NOT EXECUTED
a000aa70: e1a00006 mov r0, r6 <== NOT EXECUTED
a000aa74: e1a01005 mov r1, r5 <== NOT EXECUTED
a000aa78: eb000c40 bl a000db80 <_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();
a000aa7c: eb00107e bl a000ec7c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
a000aa80: eb00271d bl a00146fc <__errno> <== NOT EXECUTED
a000aa84: e3a03011 mov r3, #17 <== NOT EXECUTED
a000aa88: e5803000 str r3, [r0] <== NOT EXECUTED
a000aa8c: e3e04000 mvn r4, #0 <== NOT EXECUTED
a000aa90: eaffffe1 b a000aa1c <mq_open+0xb8> <== 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) ) ) {
a000aa94: e3570000 cmp r7, #0
a000aa98: 0affffe6 beq a000aa38 <mq_open+0xd4>
/*
* 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(
a000aa9c: e28dc00c add ip, sp, #12
a000aaa0: e1a00008 mov r0, r8
a000aaa4: e59d1014 ldr r1, [sp, #20]
a000aaa8: e3a02001 mov r2, #1
a000aaac: e1a03009 mov r3, r9
a000aab0: e58dc000 str ip, [sp]
a000aab4: eb001abc bl a00115ac <_POSIX_Message_queue_Create_support>
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
a000aab8: 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(
a000aabc: e1a04000 mov r4, r0
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
a000aac0: 0a000009 beq a000aaec <mq_open+0x188>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000aac4: e596301c ldr r3, [r6, #28]
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
a000aac8: e59d100c ldr r1, [sp, #12]
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
a000aacc: e1d520b8 ldrh r2, [r5, #8]
a000aad0: e5851010 str r1, [r5, #16]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000aad4: 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;
a000aad8: e3a03000 mov r3, #0
a000aadc: e585300c str r3, [r5, #12]
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
a000aae0: eb001065 bl a000ec7c <_Thread_Enable_dispatch>
return (mqd_t) the_mq_fd->Object.id;
a000aae4: e5954008 ldr r4, [r5, #8]
a000aae8: eaffffcb b a000aa1c <mq_open+0xb8>
a000aaec: e1a00006 mov r0, r6
a000aaf0: e1a01005 mov r1, r5
a000aaf4: eb000c21 bl a000db80 <_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();
a000aaf8: eb00105f bl a000ec7c <_Thread_Enable_dispatch>
return (mqd_t) -1;
a000aafc: eaffffc6 b a000aa1c <mq_open+0xb8>
a0010040 <mq_setattr>:
int mq_setattr(
mqd_t mqdes,
const struct mq_attr *mqstat,
struct mq_attr *omqstat
)
{
a0010040: 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 )
a0010044: e2515000 subs r5, r1, #0 <== NOT EXECUTED
int mq_setattr(
mqd_t mqdes,
const struct mq_attr *mqstat,
struct mq_attr *omqstat
)
{
a0010048: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a001004c: e1a01000 mov r1, r0 <== NOT EXECUTED
a0010050: 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 )
a0010054: 0a00001b beq a00100c8 <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(
a0010058: e59f007c ldr r0, [pc, #124] ; a00100dc <mq_setattr+0x9c> <== NOT EXECUTED
a001005c: e1a0200d mov r2, sp <== NOT EXECUTED
a0010060: eb000c5c bl a00131d8 <_Objects_Get> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
a0010064: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a0010068: e3530000 cmp r3, #0 <== NOT EXECUTED
a001006c: 1a000010 bne a00100b4 <mq_setattr+0x74> <== NOT EXECUTED
/*
* Return the old values.
*/
if ( omqstat ) {
a0010070: 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;
a0010074: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
/*
* Return the old values.
*/
if ( omqstat ) {
a0010078: 0a000007 beq a001009c <mq_setattr+0x5c> <== NOT EXECUTED
omqstat->mq_flags = the_mq_fd->oflag;
omqstat->mq_msgsize = the_core_mq->maximum_message_size;
a001007c: e5931068 ldr r1, [r3, #104] ; 0x68 <== NOT EXECUTED
omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages;
a0010080: e5932060 ldr r2, [r3, #96] ; 0x60 <== NOT EXECUTED
/*
* Return the old values.
*/
if ( omqstat ) {
omqstat->mq_flags = the_mq_fd->oflag;
a0010084: 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;
a0010088: 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;
a001008c: e5841008 str r1, [r4, #8] <== NOT EXECUTED
/*
* Return the old values.
*/
if ( omqstat ) {
omqstat->mq_flags = the_mq_fd->oflag;
a0010090: e584c000 str ip, [r4] <== NOT EXECUTED
omqstat->mq_msgsize = the_core_mq->maximum_message_size;
omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages;
a0010094: e5842004 str r2, [r4, #4] <== NOT EXECUTED
omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages;
a0010098: e584300c str r3, [r4, #12] <== NOT EXECUTED
}
the_mq_fd->oflag = mqstat->mq_flags;
a001009c: e5953000 ldr r3, [r5] <== NOT EXECUTED
a00100a0: e5803014 str r3, [r0, #20] <== NOT EXECUTED
_Thread_Enable_dispatch();
a00100a4: eb00101c bl a001411c <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a00100a8: e3a00000 mov r0, #0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
a00100ac: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a00100b0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
a00100b4: eb00280a bl a001a0e4 <__errno> <== NOT EXECUTED
a00100b8: e3a03009 mov r3, #9 <== NOT EXECUTED
a00100bc: e5803000 str r3, [r0] <== NOT EXECUTED
a00100c0: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00100c4: eafffff8 b a00100ac <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 );
a00100c8: eb002805 bl a001a0e4 <__errno> <== NOT EXECUTED
a00100cc: e3a03016 mov r3, #22 <== NOT EXECUTED
a00100d0: e5803000 str r3, [r0] <== NOT EXECUTED
a00100d4: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00100d8: eafffff3 b a00100ac <mq_setattr+0x6c> <== NOT EXECUTED
a00101a0 <mq_unlink>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a00101a0: e59f307c ldr r3, [pc, #124] ; a0010224 <mq_unlink+0x84>
*/
int mq_unlink(
const char *name
)
{
a00101a4: e92d4030 push {r4, r5, lr}
a00101a8: e5932000 ldr r2, [r3]
a00101ac: e24dd008 sub sp, sp, #8
a00101b0: e1a01000 mov r1, r0
++level;
a00101b4: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a00101b8: e5832000 str r2, [r3]
const char *name,
Objects_Id *id,
size_t *len
)
{
return _POSIX_Name_to_id( &_POSIX_Message_queue_Information, name, id, len );
a00101bc: e59f4064 ldr r4, [pc, #100] ; a0010228 <mq_unlink+0x88>
a00101c0: e1a0200d mov r2, sp
a00101c4: e28d3004 add r3, sp, #4
a00101c8: e1a00004 mov r0, r4
a00101cc: eb000044 bl a00102e4 <_POSIX_Name_to_id>
size_t name_len;
_Thread_Disable_dispatch();
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id, &name_len );
if ( status != 0 ) {
a00101d0: e2505000 subs r5, r0, #0
a00101d4: 1a00000d bne a0010210 <mq_unlink+0x70>
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
a00101d8: e594301c ldr r3, [r4, #28]
a00101dc: e1dd20b0 ldrh r2, [sp]
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Namespace_remove(
a00101e0: e1a00004 mov r0, r4
a00101e4: e7934102 ldr r4, [r3, r2, lsl #2]
a00101e8: e1a01004 mov r1, r4
the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object(
&_POSIX_Message_queue_Information,
_Objects_Get_index( the_mq_id )
);
the_mq->linked = false;
a00101ec: e5c45015 strb r5, [r4, #21]
a00101f0: eb000c4d bl a001332c <_Objects_Namespace_remove>
_POSIX_Message_queue_Namespace_remove( the_mq );
_POSIX_Message_queue_Delete( the_mq );
a00101f4: e1a00004 mov r0, r4
a00101f8: ebfffe0b bl a000fa2c <_POSIX_Message_queue_Delete>
_Thread_Enable_dispatch();
a00101fc: eb000fc6 bl a001411c <_Thread_Enable_dispatch>
return 0;
a0010200: e1a03005 mov r3, r5
}
a0010204: e1a00003 mov r0, r3
a0010208: e28dd008 add sp, sp, #8
a001020c: e8bd8030 pop {r4, r5, pc}
_Thread_Disable_dispatch();
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id, &name_len );
if ( status != 0 ) {
_Thread_Enable_dispatch();
a0010210: eb000fc1 bl a001411c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( status );
a0010214: eb0027b2 bl a001a0e4 <__errno> <== NOT EXECUTED
a0010218: e3e03000 mvn r3, #0 <== NOT EXECUTED
a001021c: e5805000 str r5, [r0] <== NOT EXECUTED
a0010220: eafffff7 b a0010204 <mq_unlink+0x64> <== NOT EXECUTED
a002d064 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
a002d064: e92d4070 push {r4, r5, r6, lr}
a002d068: e1a05000 mov r5, r0
a002d06c: 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 ) )
a002d070: eb000054 bl a002d1c8 <_Timespec_Is_valid>
a002d074: e3500000 cmp r0, #0
a002d078: 0a000032 beq a002d148 <nanosleep+0xe4>
rtems_set_errno_and_return_minus_one( EINVAL );
ticks = _Timespec_To_ticks( rqtp );
a002d07c: e1a00005 mov r0, r5
a002d080: ebffb284 bl a0019a98 <_Timespec_To_ticks>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a002d084: e59f30e4 ldr r3, [pc, #228] ; a002d170 <nanosleep+0x10c>
a002d088: e5932000 ldr r2, [r3]
++level;
a002d08c: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a002d090: e5832000 str r2, [r3]
* 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 ) {
a002d094: e2505000 subs r5, r0, #0
a002d098: 0a00001e beq a002d118 <nanosleep+0xb4>
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
a002d09c: e59f60d0 ldr r6, [pc, #208] ; a002d174 <nanosleep+0x110>
a002d0a0: e3a01281 mov r1, #268435464 ; 0x10000008
a002d0a4: e5960008 ldr r0, [r6, #8]
a002d0a8: ebff990c bl a00134e0 <_Thread_Set_state>
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
&_Thread_Executing->Timer,
a002d0ac: e5963008 ldr r3, [r6, #8]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a002d0b0: e59fe0c0 ldr lr, [pc, #192] ; a002d178 <nanosleep+0x114>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a002d0b4: e3a02000 mov r2, #0
_Thread_Disable_dispatch();
_Thread_Set_state(
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
a002d0b8: e593c008 ldr ip, [r3, #8]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a002d0bc: e59f00b8 ldr r0, [pc, #184] ; a002d17c <nanosleep+0x118>
a002d0c0: e2831048 add r1, r3, #72 ; 0x48
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a002d0c4: e5832050 str r2, [r3, #80] ; 0x50
the_watchdog->routine = routine;
a002d0c8: e583e064 str lr, [r3, #100] ; 0x64
the_watchdog->id = id;
a002d0cc: e583c068 str ip, [r3, #104] ; 0x68
the_watchdog->user_data = user_data;
a002d0d0: e583206c str r2, [r3, #108] ; 0x6c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a002d0d4: e5835054 str r5, [r3, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a002d0d8: ebff99f7 bl a00138bc <_Watchdog_Insert>
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
a002d0dc: ebff96cf bl a0012c20 <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
a002d0e0: e3540000 cmp r4, #0
a002d0e4: 0a000015 beq a002d140 <nanosleep+0xdc>
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
a002d0e8: e5963008 ldr r3, [r6, #8]
_Timespec_From_ticks( ticks, rmtp );
a002d0ec: e1a01004 mov r1, r4
/* calculate time remaining */
if ( rmtp ) {
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
a002d0f0: e593405c ldr r4, [r3, #92] ; 0x5c
a002d0f4: e5933060 ldr r3, [r3, #96] ; 0x60
a002d0f8: e0634004 rsb r4, r3, r4
_Thread_Enable_dispatch();
/* calculate time remaining */
if ( rmtp ) {
ticks -=
a002d0fc: e0845005 add r5, r4, r5
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
a002d100: e1a00005 mov r0, r5
a002d104: eb00001e bl a002d184 <_Timespec_From_ticks>
*/
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
a002d108: e3550000 cmp r5, #0
a002d10c: 1a000012 bne a002d15c <nanosleep+0xf8>
rtems_set_errno_and_return_minus_one( EINTR );
#endif
}
return 0;
a002d110: e1a00005 mov r0, r5 <== NOT EXECUTED
}
a002d114: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
a002d118: e59f3060 ldr r3, [pc, #96] ; a002d180 <nanosleep+0x11c>
a002d11c: e593300c ldr r3, [r3, #12]
a002d120: e12fff33 blx r3
*/
if ( !ticks ) {
_Thread_Disable_dispatch();
_Scheduler_Yield();
_Thread_Enable_dispatch();
a002d124: ebff96bd bl a0012c20 <_Thread_Enable_dispatch>
if ( rmtp ) {
a002d128: e3540000 cmp r4, #0
a002d12c: 0a000003 beq a002d140 <nanosleep+0xdc>
rmtp->tv_sec = 0;
a002d130: e5845000 str r5, [r4]
rmtp->tv_nsec = 0;
a002d134: e5845004 str r5, [r4, #4]
}
return 0;
a002d138: e1a00005 mov r0, r5
a002d13c: e8bd8070 pop {r4, r5, r6, pc}
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
#endif
}
return 0;
a002d140: e1a00004 mov r0, r4
a002d144: e8bd8070 pop {r4, r5, r6, pc}
*
* 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 );
a002d148: ebffbcbf bl a001c44c <__errno> <== NOT EXECUTED
a002d14c: e3a03016 mov r3, #22 <== NOT EXECUTED
a002d150: e5803000 str r3, [r0] <== NOT EXECUTED
a002d154: e3e00000 mvn r0, #0 <== NOT EXECUTED
a002d158: 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 );
a002d15c: ebffbcba bl a001c44c <__errno>
a002d160: e3a03004 mov r3, #4
a002d164: e5803000 str r3, [r0]
a002d168: e3e00000 mvn r0, #0
a002d16c: e8bd8070 pop {r4, r5, r6, pc}
a000c2f8 <pause>:
/**
* 3.4.2 Suspend Process Execution, P1003.1b-1993, p. 81
*/
int pause( void )
{
a000c2f8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
a000c2fc: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
sigset_t all_signals;
int status;
(void) sigfillset( &all_signals );
a000c300: e1a0000d mov r0, sp <== NOT EXECUTED
a000c304: eb000322 bl a000cf94 <sigfillset> <== NOT EXECUTED
status = sigtimedwait( &all_signals, NULL, NULL );
a000c308: e3a01000 mov r1, #0 <== NOT EXECUTED
a000c30c: e1a0000d mov r0, sp <== NOT EXECUTED
a000c310: e1a02001 mov r2, r1 <== NOT EXECUTED
a000c314: eb000374 bl a000d0ec <sigtimedwait> <== NOT EXECUTED
return status;
}
a000c318: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000c31c: e8bd8000 pop {pc} <== NOT EXECUTED
a000a340 <pthread_atfork>:
int pthread_atfork(
void (*prepare)(void) __attribute__((unused)),
void (*parent)(void) __attribute__((unused)),
void (*child)(void) __attribute__((unused))
)
{
a000a340: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a000a344: eb0022ff bl a0012f48 <__errno> <== NOT EXECUTED
a000a348: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a000a34c: e5803000 str r3, [r0] <== NOT EXECUTED
}
a000a350: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a354: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000eaf0 <pthread_attr_getdetachstate>:
int pthread_attr_getdetachstate(
const pthread_attr_t *attr,
int *detachstate
)
{
if ( !attr || !attr->is_initialized || !detachstate )
a000eaf0: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000eaf4: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getdetachstate(
const pthread_attr_t *attr,
int *detachstate
)
{
if ( !attr || !attr->is_initialized || !detachstate )
a000eaf8: 012fff1e bxeq lr <== NOT EXECUTED
a000eafc: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000eb00: e3530000 cmp r3, #0 <== NOT EXECUTED
a000eb04: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*detachstate = attr->detachstate;
a000eb08: 1590203c ldrne r2, [r0, #60] ; 0x3c <== NOT EXECUTED
int pthread_attr_getdetachstate(
const pthread_attr_t *attr,
int *detachstate
)
{
if ( !attr || !attr->is_initialized || !detachstate )
a000eb0c: 13a03000 movne r3, #0 <== NOT EXECUTED
a000eb10: 03a03001 moveq r3, #1 <== NOT EXECUTED
return EINVAL;
*detachstate = attr->detachstate;
return 0;
a000eb14: 11a00003 movne r0, r3 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized || !detachstate )
return EINVAL;
*detachstate = attr->detachstate;
a000eb18: 15812000 strne r2, [r1] <== NOT EXECUTED
const pthread_attr_t *attr,
int *detachstate
)
{
if ( !attr || !attr->is_initialized || !detachstate )
return EINVAL;
a000eb1c: 03a00016 moveq r0, #22 <== NOT EXECUTED
*detachstate = attr->detachstate;
return 0;
}
a000eb20: e12fff1e bx lr <== NOT EXECUTED
a000eb24 <pthread_attr_getguardsize>:
int pthread_attr_getguardsize(
const pthread_attr_t *attr,
size_t *guardsize
)
{
if ( !attr || !attr->is_initialized || !guardsize )
a000eb24: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000eb28: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getguardsize(
const pthread_attr_t *attr,
size_t *guardsize
)
{
if ( !attr || !attr->is_initialized || !guardsize )
a000eb2c: 012fff1e bxeq lr <== NOT EXECUTED
a000eb30: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000eb34: e3530000 cmp r3, #0 <== NOT EXECUTED
a000eb38: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*guardsize = attr->guardsize;
a000eb3c: 15902034 ldrne r2, [r0, #52] ; 0x34 <== NOT EXECUTED
int pthread_attr_getguardsize(
const pthread_attr_t *attr,
size_t *guardsize
)
{
if ( !attr || !attr->is_initialized || !guardsize )
a000eb40: 13a03000 movne r3, #0 <== NOT EXECUTED
a000eb44: 03a03001 moveq r3, #1 <== NOT EXECUTED
return EINVAL;
*guardsize = attr->guardsize;
return 0;
a000eb48: 11a00003 movne r0, r3 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized || !guardsize )
return EINVAL;
*guardsize = attr->guardsize;
a000eb4c: 15812000 strne r2, [r1] <== NOT EXECUTED
const pthread_attr_t *attr,
size_t *guardsize
)
{
if ( !attr || !attr->is_initialized || !guardsize )
return EINVAL;
a000eb50: 03a00016 moveq r0, #22 <== NOT EXECUTED
*guardsize = attr->guardsize;
return 0;
}
a000eb54: e12fff1e bx lr <== NOT EXECUTED
a000eb58 <pthread_attr_getinheritsched>:
int pthread_attr_getinheritsched(
const pthread_attr_t *attr,
int *inheritsched
)
{
if ( !attr || !attr->is_initialized || !inheritsched )
a000eb58: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000eb5c: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getinheritsched(
const pthread_attr_t *attr,
int *inheritsched
)
{
if ( !attr || !attr->is_initialized || !inheritsched )
a000eb60: 012fff1e bxeq lr <== NOT EXECUTED
a000eb64: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000eb68: e3530000 cmp r3, #0 <== NOT EXECUTED
a000eb6c: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*inheritsched = attr->inheritsched;
a000eb70: 15902010 ldrne r2, [r0, #16] <== NOT EXECUTED
int pthread_attr_getinheritsched(
const pthread_attr_t *attr,
int *inheritsched
)
{
if ( !attr || !attr->is_initialized || !inheritsched )
a000eb74: 13a03000 movne r3, #0 <== NOT EXECUTED
a000eb78: 03a03001 moveq r3, #1 <== NOT EXECUTED
return EINVAL;
*inheritsched = attr->inheritsched;
return 0;
a000eb7c: 11a00003 movne r0, r3 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized || !inheritsched )
return EINVAL;
*inheritsched = attr->inheritsched;
a000eb80: 15812000 strne r2, [r1] <== NOT EXECUTED
const pthread_attr_t *attr,
int *inheritsched
)
{
if ( !attr || !attr->is_initialized || !inheritsched )
return EINVAL;
a000eb84: 03a00016 moveq r0, #22 <== NOT EXECUTED
*inheritsched = attr->inheritsched;
return 0;
}
a000eb88: e12fff1e bx lr <== NOT EXECUTED
a000eb8c <pthread_attr_getschedparam>:
int pthread_attr_getschedparam(
const pthread_attr_t *attr,
struct sched_param *param
)
{
if ( !attr || !attr->is_initialized || !param )
a000eb8c: e3500000 cmp r0, #0 <== NOT EXECUTED
int pthread_attr_getschedparam(
const pthread_attr_t *attr,
struct sched_param *param
)
{
a000eb90: e92d0030 push {r4, r5} <== NOT EXECUTED
if ( !attr || !attr->is_initialized || !param )
a000eb94: 0a000005 beq a000ebb0 <pthread_attr_getschedparam+0x24> <== NOT EXECUTED
a000eb98: e5905000 ldr r5, [r0] <== NOT EXECUTED
a000eb9c: e3550000 cmp r5, #0 <== NOT EXECUTED
a000eba0: 13510000 cmpne r1, #0 <== NOT EXECUTED
a000eba4: 13a05000 movne r5, #0 <== NOT EXECUTED
a000eba8: 03a05001 moveq r5, #1 <== NOT EXECUTED
a000ebac: 1a000003 bne a000ebc0 <pthread_attr_getschedparam+0x34> <== NOT EXECUTED
return EINVAL;
a000ebb0: e3a05016 mov r5, #22 <== NOT EXECUTED
*param = attr->schedparam;
return 0;
}
a000ebb4: e1a00005 mov r0, r5 <== NOT EXECUTED
a000ebb8: e8bd0030 pop {r4, r5} <== NOT EXECUTED
a000ebbc: e12fff1e bx lr <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized || !param )
return EINVAL;
*param = attr->schedparam;
a000ebc0: e1a0c001 mov ip, r1 <== NOT EXECUTED
a000ebc4: e2804018 add r4, r0, #24 <== NOT EXECUTED
a000ebc8: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED
a000ebcc: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
a000ebd0: e8940007 ldm r4, {r0, r1, r2} <== NOT EXECUTED
a000ebd4: e88c0007 stm ip, {r0, r1, r2} <== NOT EXECUTED
return 0;
a000ebd8: eafffff5 b a000ebb4 <pthread_attr_getschedparam+0x28> <== NOT EXECUTED
a000ebdc <pthread_attr_getschedpolicy>:
int pthread_attr_getschedpolicy(
const pthread_attr_t *attr,
int *policy
)
{
if ( !attr || !attr->is_initialized || !policy )
a000ebdc: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000ebe0: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getschedpolicy(
const pthread_attr_t *attr,
int *policy
)
{
if ( !attr || !attr->is_initialized || !policy )
a000ebe4: 012fff1e bxeq lr <== NOT EXECUTED
a000ebe8: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000ebec: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ebf0: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*policy = attr->schedpolicy;
a000ebf4: 15902014 ldrne r2, [r0, #20] <== NOT EXECUTED
int pthread_attr_getschedpolicy(
const pthread_attr_t *attr,
int *policy
)
{
if ( !attr || !attr->is_initialized || !policy )
a000ebf8: 13a03000 movne r3, #0 <== NOT EXECUTED
a000ebfc: 03a03001 moveq r3, #1 <== NOT EXECUTED
return EINVAL;
*policy = attr->schedpolicy;
return 0;
a000ec00: 11a00003 movne r0, r3 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized || !policy )
return EINVAL;
*policy = attr->schedpolicy;
a000ec04: 15812000 strne r2, [r1] <== NOT EXECUTED
const pthread_attr_t *attr,
int *policy
)
{
if ( !attr || !attr->is_initialized || !policy )
return EINVAL;
a000ec08: 03a00016 moveq r0, #22 <== NOT EXECUTED
*policy = attr->schedpolicy;
return 0;
}
a000ec0c: e12fff1e bx lr <== NOT EXECUTED
a000ec10 <pthread_attr_getscope>:
int pthread_attr_getscope(
const pthread_attr_t *attr,
int *contentionscope
)
{
if ( !attr || !attr->is_initialized || !contentionscope )
a000ec10: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000ec14: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getscope(
const pthread_attr_t *attr,
int *contentionscope
)
{
if ( !attr || !attr->is_initialized || !contentionscope )
a000ec18: 012fff1e bxeq lr <== NOT EXECUTED
a000ec1c: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000ec20: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ec24: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*contentionscope = attr->contentionscope;
a000ec28: 1590200c ldrne r2, [r0, #12] <== NOT EXECUTED
int pthread_attr_getscope(
const pthread_attr_t *attr,
int *contentionscope
)
{
if ( !attr || !attr->is_initialized || !contentionscope )
a000ec2c: 13a03000 movne r3, #0 <== NOT EXECUTED
a000ec30: 03a03001 moveq r3, #1 <== NOT EXECUTED
return EINVAL;
*contentionscope = attr->contentionscope;
return 0;
a000ec34: 11a00003 movne r0, r3 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized || !contentionscope )
return EINVAL;
*contentionscope = attr->contentionscope;
a000ec38: 15812000 strne r2, [r1] <== NOT EXECUTED
const pthread_attr_t *attr,
int *contentionscope
)
{
if ( !attr || !attr->is_initialized || !contentionscope )
return EINVAL;
a000ec3c: 03a00016 moveq r0, #22 <== NOT EXECUTED
*contentionscope = attr->contentionscope;
return 0;
}
a000ec40: e12fff1e bx lr <== NOT EXECUTED
a000ec78 <pthread_attr_getstack>:
const pthread_attr_t *attr,
void **stackaddr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stackaddr || !stacksize )
a000ec78: e3500000 cmp r0, #0 <== NOT EXECUTED
int pthread_attr_getstack(
const pthread_attr_t *attr,
void **stackaddr,
size_t *stacksize
)
{
a000ec7c: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED
if ( !attr || !attr->is_initialized || !stackaddr || !stacksize )
a000ec80: 0a000005 beq a000ec9c <pthread_attr_getstack+0x24> <== NOT EXECUTED
a000ec84: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000ec88: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ec8c: 13510000 cmpne r1, #0 <== NOT EXECUTED
a000ec90: 13a03000 movne r3, #0 <== NOT EXECUTED
a000ec94: 03a03001 moveq r3, #1 <== NOT EXECUTED
a000ec98: 1a000002 bne a000eca8 <pthread_attr_getstack+0x30> <== NOT EXECUTED
return EINVAL;
a000ec9c: e3a00016 mov r0, #22 <== NOT EXECUTED
*stackaddr = attr->stackaddr;
*stacksize = attr->stacksize;
return 0;
}
a000eca0: e8bd0010 pop {r4} <== NOT EXECUTED
a000eca4: e12fff1e bx lr <== NOT EXECUTED
const pthread_attr_t *attr,
void **stackaddr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stackaddr || !stacksize )
a000eca8: e3520000 cmp r2, #0 <== NOT EXECUTED
a000ecac: 0afffffa beq a000ec9c <pthread_attr_getstack+0x24> <== NOT EXECUTED
return EINVAL;
*stackaddr = attr->stackaddr;
a000ecb0: e5904004 ldr r4, [r0, #4] <== NOT EXECUTED
*stacksize = attr->stacksize;
a000ecb4: e590c008 ldr ip, [r0, #8] <== NOT EXECUTED
return 0;
a000ecb8: e1a00003 mov r0, r3 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized || !stackaddr || !stacksize )
return EINVAL;
*stackaddr = attr->stackaddr;
a000ecbc: e5814000 str r4, [r1] <== NOT EXECUTED
*stacksize = attr->stacksize;
a000ecc0: e582c000 str ip, [r2] <== NOT EXECUTED
return 0;
a000ecc4: eafffff5 b a000eca0 <pthread_attr_getstack+0x28> <== NOT EXECUTED
a000ec44 <pthread_attr_getstackaddr>:
int pthread_attr_getstackaddr(
const pthread_attr_t *attr,
void **stackaddr
)
{
if ( !attr || !attr->is_initialized || !stackaddr )
a000ec44: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000ec48: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getstackaddr(
const pthread_attr_t *attr,
void **stackaddr
)
{
if ( !attr || !attr->is_initialized || !stackaddr )
a000ec4c: 012fff1e bxeq lr <== NOT EXECUTED
a000ec50: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000ec54: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ec58: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*stackaddr = attr->stackaddr;
a000ec5c: 15902004 ldrne r2, [r0, #4] <== NOT EXECUTED
int pthread_attr_getstackaddr(
const pthread_attr_t *attr,
void **stackaddr
)
{
if ( !attr || !attr->is_initialized || !stackaddr )
a000ec60: 13a03000 movne r3, #0 <== NOT EXECUTED
a000ec64: 03a03001 moveq r3, #1 <== NOT EXECUTED
return EINVAL;
*stackaddr = attr->stackaddr;
return 0;
a000ec68: 11a00003 movne r0, r3 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized || !stackaddr )
return EINVAL;
*stackaddr = attr->stackaddr;
a000ec6c: 15812000 strne r2, [r1] <== NOT EXECUTED
const pthread_attr_t *attr,
void **stackaddr
)
{
if ( !attr || !attr->is_initialized || !stackaddr )
return EINVAL;
a000ec70: 03a00016 moveq r0, #22 <== NOT EXECUTED
*stackaddr = attr->stackaddr;
return 0;
}
a000ec74: e12fff1e bx lr <== NOT EXECUTED
a000ecc8 <pthread_attr_getstacksize>:
int pthread_attr_getstacksize(
const pthread_attr_t *attr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stacksize )
a000ecc8: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000eccc: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_getstacksize(
const pthread_attr_t *attr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stacksize )
a000ecd0: 012fff1e bxeq lr <== NOT EXECUTED
a000ecd4: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000ecd8: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ecdc: 13510000 cmpne r1, #0 <== NOT EXECUTED
return EINVAL;
*stacksize = attr->stacksize;
a000ece0: 15902008 ldrne r2, [r0, #8] <== NOT EXECUTED
int pthread_attr_getstacksize(
const pthread_attr_t *attr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stacksize )
a000ece4: 13a03000 movne r3, #0 <== NOT EXECUTED
a000ece8: 03a03001 moveq r3, #1 <== NOT EXECUTED
return EINVAL;
*stacksize = attr->stacksize;
return 0;
a000ecec: 11a00003 movne r0, r3 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized || !stacksize )
return EINVAL;
*stacksize = attr->stacksize;
a000ecf0: 15812000 strne r2, [r1] <== NOT EXECUTED
const pthread_attr_t *attr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stacksize )
return EINVAL;
a000ecf4: 03a00016 moveq r0, #22 <== NOT EXECUTED
*stacksize = attr->stacksize;
return 0;
}
a000ecf8: e12fff1e bx lr <== NOT EXECUTED
a000ed44 <pthread_attr_setdetachstate>:
int pthread_attr_setdetachstate(
pthread_attr_t *attr,
int detachstate
)
{
if ( !attr || !attr->is_initialized )
a000ed44: e3500000 cmp r0, #0
a000ed48: 0a000002 beq a000ed58 <pthread_attr_setdetachstate+0x14>
a000ed4c: e5903000 ldr r3, [r0]
a000ed50: e3530000 cmp r3, #0
a000ed54: 1a000001 bne a000ed60 <pthread_attr_setdetachstate+0x1c>
return EINVAL;
a000ed58: e3a00016 mov r0, #22 <== NOT EXECUTED
a000ed5c: e12fff1e bx lr <== NOT EXECUTED
switch ( detachstate ) {
a000ed60: e3510001 cmp r1, #1
case PTHREAD_CREATE_DETACHED:
case PTHREAD_CREATE_JOINABLE:
attr->detachstate = detachstate;
a000ed64: 9580103c strls r1, [r0, #60] ; 0x3c
return 0;
a000ed68: 93a00000 movls r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( detachstate ) {
a000ed6c: 912fff1e bxls lr
case PTHREAD_CREATE_JOINABLE:
attr->detachstate = detachstate;
return 0;
default:
return EINVAL;
a000ed70: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a000ed74: e12fff1e bx lr <== NOT EXECUTED
a000ed78 <pthread_attr_setguardsize>:
int pthread_attr_setguardsize(
pthread_attr_t *attr,
size_t guardsize
)
{
if ( !attr || !attr->is_initialized )
a000ed78: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000ed7c: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_setguardsize(
pthread_attr_t *attr,
size_t guardsize
)
{
if ( !attr || !attr->is_initialized )
a000ed80: 012fff1e bxeq lr <== NOT EXECUTED
a000ed84: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000ed88: e3530000 cmp r3, #0 <== NOT EXECUTED
return EINVAL;
attr->guardsize = guardsize;
a000ed8c: 15801034 strne r1, [r0, #52] ; 0x34 <== NOT EXECUTED
pthread_attr_t *attr,
size_t guardsize
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a000ed90: 03a00016 moveq r0, #22 <== NOT EXECUTED
attr->guardsize = guardsize;
return 0;
a000ed94: 13a00000 movne r0, #0 <== NOT EXECUTED
}
a000ed98: e12fff1e bx lr <== NOT EXECUTED
a0010ec4 <pthread_attr_setinheritsched>:
int pthread_attr_setinheritsched(
pthread_attr_t *attr,
int inheritsched
)
{
if ( !attr || !attr->is_initialized )
a0010ec4: e3500000 cmp r0, #0
a0010ec8: 0a000002 beq a0010ed8 <pthread_attr_setinheritsched+0x14>
a0010ecc: e5903000 ldr r3, [r0]
a0010ed0: e3530000 cmp r3, #0
a0010ed4: 1a000001 bne a0010ee0 <pthread_attr_setinheritsched+0x1c>
return EINVAL;
a0010ed8: e3a00016 mov r0, #22 <== NOT EXECUTED
a0010edc: e12fff1e bx lr <== NOT EXECUTED
switch ( inheritsched ) {
a0010ee0: e2413001 sub r3, r1, #1
a0010ee4: e3530001 cmp r3, #1
case PTHREAD_INHERIT_SCHED:
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
a0010ee8: 95801010 strls r1, [r0, #16]
return 0;
a0010eec: 93a00000 movls r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( inheritsched ) {
a0010ef0: 912fff1e bxls lr
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
return 0;
default:
return ENOTSUP;
a0010ef4: e3a00086 mov r0, #134 ; 0x86 <== NOT EXECUTED
}
}
a0010ef8: e12fff1e bx lr <== NOT EXECUTED
a000edd4 <pthread_attr_setschedparam>:
int pthread_attr_setschedparam(
pthread_attr_t *attr,
const struct sched_param *param
)
{
if ( !attr || !attr->is_initialized || !param )
a000edd4: e3500000 cmp r0, #0
int pthread_attr_setschedparam(
pthread_attr_t *attr,
const struct sched_param *param
)
{
a000edd8: e92d0030 push {r4, r5}
if ( !attr || !attr->is_initialized || !param )
a000eddc: 0a000005 beq a000edf8 <pthread_attr_setschedparam+0x24>
a000ede0: e5905000 ldr r5, [r0]
a000ede4: e3550000 cmp r5, #0
a000ede8: 13510000 cmpne r1, #0
a000edec: 13a05000 movne r5, #0
a000edf0: 03a05001 moveq r5, #1
a000edf4: 1a000003 bne a000ee08 <pthread_attr_setschedparam+0x34>
return EINVAL;
a000edf8: e3a05016 mov r5, #22 <== NOT EXECUTED
attr->schedparam = *param;
return 0;
}
a000edfc: e1a00005 mov r0, r5
a000ee00: e8bd0030 pop {r4, r5}
a000ee04: e12fff1e bx lr
)
{
if ( !attr || !attr->is_initialized || !param )
return EINVAL;
attr->schedparam = *param;
a000ee08: e280c018 add ip, r0, #24
a000ee0c: e1a04001 mov r4, r1
a000ee10: e8b4000f ldm r4!, {r0, r1, r2, r3}
a000ee14: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000ee18: e8940007 ldm r4, {r0, r1, r2}
a000ee1c: e88c0007 stm ip, {r0, r1, r2}
return 0;
a000ee20: eafffff5 b a000edfc <pthread_attr_setschedparam+0x28>
a000ee24 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
a000ee24: e3500000 cmp r0, #0
a000ee28: 0a000002 beq a000ee38 <pthread_attr_setschedpolicy+0x14>
a000ee2c: e5903000 ldr r3, [r0]
a000ee30: e3530000 cmp r3, #0
a000ee34: 1a000001 bne a000ee40 <pthread_attr_setschedpolicy+0x1c>
return EINVAL;
a000ee38: e3a00016 mov r0, #22 <== NOT EXECUTED
a000ee3c: e12fff1e bx lr <== NOT EXECUTED
switch ( policy ) {
a000ee40: e3510004 cmp r1, #4
a000ee44: 9a000001 bls a000ee50 <pthread_attr_setschedpolicy+0x2c>
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
a000ee48: e3a00086 mov r0, #134 ; 0x86 <== NOT EXECUTED
}
}
a000ee4c: e12fff1e bx lr <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
a000ee50: e3a03001 mov r3, #1
a000ee54: e1a03113 lsl r3, r3, r1
a000ee58: e3130017 tst r3, #23
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
a000ee5c: 15801014 strne r1, [r0, #20]
return 0;
a000ee60: 13a00000 movne r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
a000ee64: 112fff1e bxne lr
a000ee68: eafffff6 b a000ee48 <pthread_attr_setschedpolicy+0x24> <== NOT EXECUTED
a000ee6c <pthread_attr_setscope>:
int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope
)
{
if ( !attr || !attr->is_initialized )
a000ee6c: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000ee70: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope
)
{
if ( !attr || !attr->is_initialized )
a000ee74: 012fff1e bxeq lr <== NOT EXECUTED
a000ee78: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000ee7c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ee80: 1a000001 bne a000ee8c <pthread_attr_setscope+0x20> <== NOT EXECUTED
return EINVAL;
a000ee84: e3a00016 mov r0, #22 <== NOT EXECUTED
return ENOTSUP;
default:
return EINVAL;
}
}
a000ee88: e12fff1e bx lr <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
a000ee8c: e3510000 cmp r1, #0 <== NOT EXECUTED
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
a000ee90: 0580100c streq r1, [r0, #12] <== NOT EXECUTED
return 0;
a000ee94: 01a00001 moveq r0, r1 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
a000ee98: 012fff1e bxeq lr <== NOT EXECUTED
case PTHREAD_SCOPE_SYSTEM:
return ENOTSUP;
default:
return EINVAL;
a000ee9c: e3510001 cmp r1, #1 <== NOT EXECUTED
a000eea0: 03a00086 moveq r0, #134 ; 0x86 <== NOT EXECUTED
a000eea4: 13a00016 movne r0, #22 <== NOT EXECUTED
a000eea8: e12fff1e bx lr <== NOT EXECUTED
a000eed0 <pthread_attr_setstack>:
pthread_attr_t *attr,
void *stackaddr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
a000eed0: e2503000 subs r3, r0, #0
return EINVAL;
a000eed4: 03a00016 moveq r0, #22
pthread_attr_t *attr,
void *stackaddr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
a000eed8: 012fff1e bxeq lr
a000eedc: e5930000 ldr r0, [r3]
a000eee0: e3500000 cmp r0, #0
a000eee4: 1a000001 bne a000eef0 <pthread_attr_setstack+0x20>
return EINVAL;
a000eee8: e3a00016 mov r0, #22 <== NOT EXECUTED
else
attr->stacksize = stacksize;
attr->stackaddr = stackaddr;
return 0;
}
a000eeec: e12fff1e bx lr <== NOT EXECUTED
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
attr->stackaddr = stackaddr;
a000eef0: e5831004 str r1, [r3, #4]
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
a000eef4: e59f1018 ldr r1, [pc, #24] ; a000ef14 <pthread_attr_setstack+0x44>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
attr->stackaddr = stackaddr;
return 0;
a000eef8: e3a00000 mov r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
a000eefc: e5911000 ldr r1, [r1]
a000ef00: e1a01081 lsl r1, r1, #1
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
a000ef04: e1510002 cmp r1, r2
a000ef08: 25831008 strcs r1, [r3, #8]
a000ef0c: 35832008 strcc r2, [r3, #8]
else
attr->stacksize = stacksize;
attr->stackaddr = stackaddr;
return 0;
a000ef10: e12fff1e bx lr
a0010efc <pthread_attr_setstacksize>:
int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
a0010efc: e3500000 cmp r0, #0
return EINVAL;
a0010f00: 03a00016 moveq r0, #22
int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
a0010f04: 012fff1e bxeq lr
a0010f08: e5903000 ldr r3, [r0]
a0010f0c: e3530000 cmp r3, #0
a0010f10: 1a000001 bne a0010f1c <pthread_attr_setstacksize+0x20>
return EINVAL;
a0010f14: e3a00016 mov r0, #22 <== NOT EXECUTED
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
return 0;
}
a0010f18: e12fff1e bx lr <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
a0010f1c: e59f3018 ldr r3, [pc, #24] ; a0010f3c <pthread_attr_setstacksize+0x40>
a0010f20: e5933000 ldr r3, [r3]
a0010f24: e1a03083 lsl r3, r3, #1
a0010f28: e1530001 cmp r3, r1
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
a0010f2c: 85803008 strhi r3, [r0, #8]
else
attr->stacksize = stacksize;
a0010f30: 95801008 strls r1, [r0, #8]
return 0;
a0010f34: e3a00000 mov r0, #0
a0010f38: e12fff1e bx lr
a000ab0c <pthread_barrier_destroy>:
* source of the error.
*/
int pthread_barrier_destroy(
pthread_barrier_t *barrier
)
{
a000ab0c: e92d4030 push {r4, r5, lr}
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
a000ab10: e2503000 subs r3, r0, #0
* source of the error.
*/
int pthread_barrier_destroy(
pthread_barrier_t *barrier
)
{
a000ab14: e24dd004 sub sp, sp, #4
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
a000ab18: 0a00000d beq a000ab54 <pthread_barrier_destroy+0x48>
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get (
pthread_barrier_t *barrier,
Objects_Locations *location
)
{
return (POSIX_Barrier_Control *) _Objects_Get(
a000ab1c: e5931000 ldr r1, [r3]
a000ab20: e59f005c ldr r0, [pc, #92] ; a000ab84 <pthread_barrier_destroy+0x78>
a000ab24: e1a0200d mov r2, sp
a000ab28: eb0009f1 bl a000d2f4 <_Objects_Get>
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
switch ( location ) {
a000ab2c: e59d3000 ldr r3, [sp]
a000ab30: e1a04000 mov r4, r0
a000ab34: e3530000 cmp r3, #0
a000ab38: 1a000005 bne a000ab54 <pthread_barrier_destroy+0x48>
case OBJECTS_LOCAL:
if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) {
a000ab3c: e5905058 ldr r5, [r0, #88] ; 0x58
a000ab40: e3550000 cmp r5, #0
a000ab44: 0a000005 beq a000ab60 <pthread_barrier_destroy+0x54>
_Thread_Enable_dispatch();
a000ab48: eb000d97 bl a000e1ac <_Thread_Enable_dispatch> <== NOT EXECUTED
return EBUSY;
a000ab4c: e3a00010 mov r0, #16 <== NOT EXECUTED
a000ab50: ea000000 b a000ab58 <pthread_barrier_destroy+0x4c> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000ab54: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000ab58: e28dd004 add sp, sp, #4
a000ab5c: e8bd8030 pop {r4, r5, pc}
if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object );
a000ab60: e59f001c ldr r0, [pc, #28] ; a000ab84 <pthread_barrier_destroy+0x78>
a000ab64: e1a01004 mov r1, r4
a000ab68: eb0008cd bl a000cea4 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free (
POSIX_Barrier_Control *the_barrier
)
{
_Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object );
a000ab6c: e59f0010 ldr r0, [pc, #16] ; a000ab84 <pthread_barrier_destroy+0x78>
a000ab70: e1a01004 mov r1, r4
a000ab74: eb000985 bl a000d190 <_Objects_Free>
_POSIX_Barrier_Free( the_barrier );
_Thread_Enable_dispatch();
a000ab78: eb000d8b bl a000e1ac <_Thread_Enable_dispatch>
return 0;
a000ab7c: e1a00005 mov r0, r5
a000ab80: eafffff4 b a000ab58 <pthread_barrier_destroy+0x4c>
a000ab88 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
a000ab88: e92d40f0 push {r4, r5, r6, r7, lr}
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
a000ab8c: e2504000 subs r4, r0, #0
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
a000ab90: e24dd014 sub sp, sp, #20
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
a000ab94: 0a000001 beq a000aba0 <pthread_barrier_init+0x18>
return EINVAL;
if ( count == 0 )
a000ab98: e3520000 cmp r2, #0
a000ab9c: 1a000002 bne a000abac <pthread_barrier_init+0x24>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
a000aba0: 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;
}
a000aba4: e28dd014 add sp, sp, #20
a000aba8: e8bd80f0 pop {r4, r5, r6, r7, pc}
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
a000abac: e3510000 cmp r1, #0
a000abb0: 0a00001c beq a000ac28 <pthread_barrier_init+0xa0>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
a000abb4: e5913000 ldr r3, [r1]
a000abb8: e3530000 cmp r3, #0
a000abbc: 0afffff7 beq a000aba0 <pthread_barrier_init+0x18>
return EINVAL;
switch ( the_attr->process_shared ) {
a000abc0: e5915004 ldr r5, [r1, #4]
a000abc4: e3550000 cmp r5, #0
a000abc8: 1afffff4 bne a000aba0 <pthread_barrier_init+0x18>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000abcc: e59f3078 ldr r3, [pc, #120] ; a000ac4c <pthread_barrier_init+0xc4>
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
the_attributes.maximum_count = count;
a000abd0: e58d2008 str r2, [sp, #8]
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
a000abd4: e58d5004 str r5, [sp, #4]
a000abd8: e5932000 ldr r2, [r3]
++level;
a000abdc: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000abe0: e5832000 str r2, [r3]
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
a000abe4: e59f7064 ldr r7, [pc, #100] ; a000ac50 <pthread_barrier_init+0xc8>
a000abe8: e1a00007 mov r0, r7
a000abec: eb000889 bl a000ce18 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
a000abf0: e2506000 subs r6, r0, #0
a000abf4: 0a000011 beq a000ac40 <pthread_barrier_init+0xb8>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
a000abf8: e2860010 add r0, r6, #16
a000abfc: e28d1004 add r1, sp, #4
a000ac00: eb0005f5 bl a000c3dc <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000ac04: e5963008 ldr r3, [r6, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000ac08: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a000ac0c: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000ac10: e7826721 str r6, [r2, r1, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a000ac14: e586500c str r5, [r6, #12]
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
a000ac18: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
a000ac1c: eb000d62 bl a000e1ac <_Thread_Enable_dispatch>
return 0;
a000ac20: e1a00005 mov r0, r5
a000ac24: eaffffde b a000aba4 <pthread_barrier_init+0x1c>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
a000ac28: e28d000c add r0, sp, #12
a000ac2c: e58d2000 str r2, [sp]
a000ac30: ebffffa1 bl a000aabc <pthread_barrierattr_init>
the_attr = &my_attr;
a000ac34: e28d100c add r1, sp, #12
a000ac38: e59d2000 ldr r2, [sp]
a000ac3c: eaffffdc b a000abb4 <pthread_barrier_init+0x2c>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
a000ac40: eb000d59 bl a000e1ac <_Thread_Enable_dispatch> <== NOT EXECUTED
return EAGAIN;
a000ac44: e3a0000b mov r0, #11 <== NOT EXECUTED
a000ac48: eaffffd5 b a000aba4 <pthread_barrier_init+0x1c> <== NOT EXECUTED
a000ac54 <pthread_barrier_wait>:
*/
int pthread_barrier_wait(
pthread_barrier_t *barrier
)
{
a000ac54: e52de004 push {lr} ; (str lr, [sp, #-4]!)
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
a000ac58: e2503000 subs r3, r0, #0
*/
int pthread_barrier_wait(
pthread_barrier_t *barrier
)
{
a000ac5c: e24dd008 sub sp, sp, #8
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
a000ac60: 0a000006 beq a000ac80 <pthread_barrier_wait+0x2c>
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get (
pthread_barrier_t *barrier,
Objects_Locations *location
)
{
return (POSIX_Barrier_Control *) _Objects_Get(
a000ac64: e59f0050 ldr r0, [pc, #80] ; a000acbc <pthread_barrier_wait+0x68>
a000ac68: e5931000 ldr r1, [r3]
a000ac6c: e28d2004 add r2, sp, #4
a000ac70: eb00099f bl a000d2f4 <_Objects_Get>
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
switch ( location ) {
a000ac74: e59dc004 ldr ip, [sp, #4]
a000ac78: e35c0000 cmp ip, #0
a000ac7c: 0a000002 beq a000ac8c <pthread_barrier_wait+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000ac80: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000ac84: e28dd008 add sp, sp, #8
a000ac88: e8bd8000 pop {pc}
the_barrier = _POSIX_Barrier_Get( barrier, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_barrier_Wait(
a000ac8c: e5901008 ldr r1, [r0, #8]
a000ac90: e1a0300c mov r3, ip
a000ac94: e2800010 add r0, r0, #16
a000ac98: e3a02001 mov r2, #1
a000ac9c: e58dc000 str ip, [sp]
a000aca0: eb0005d8 bl a000c408 <_CORE_barrier_Wait>
the_barrier->Object.id,
true,
0,
NULL
);
_Thread_Enable_dispatch();
a000aca4: eb000d40 bl a000e1ac <_Thread_Enable_dispatch>
return _POSIX_Barrier_Translate_core_barrier_return_code(
_Thread_Executing->Wait.return_code );
a000aca8: e59f3010 ldr r3, [pc, #16] ; a000acc0 <pthread_barrier_wait+0x6c>
a000acac: e5933008 ldr r3, [r3, #8]
true,
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_Barrier_Translate_core_barrier_return_code(
a000acb0: e5930034 ldr r0, [r3, #52] ; 0x34
a000acb4: eb0017cf bl a0010bf8 <_POSIX_Barrier_Translate_core_barrier_return_code>
a000acb8: eafffff1 b a000ac84 <pthread_barrier_wait+0x30>
a000aa70 <pthread_barrierattr_destroy>:
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
a000aa70: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000aa74: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
a000aa78: 012fff1e bxeq lr <== NOT EXECUTED
a000aa7c: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000aa80: e3520000 cmp r2, #0 <== NOT EXECUTED
return EINVAL;
attr->is_initialized = false;
a000aa84: 13a00000 movne r0, #0 <== NOT EXECUTED
a000aa88: 15830000 strne r0, [r3] <== NOT EXECUTED
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
a000aa8c: 03a00016 moveq r0, #22 <== NOT EXECUTED
attr->is_initialized = false;
return 0;
}
a000aa90: e12fff1e bx lr <== NOT EXECUTED
a000aa94 <pthread_barrierattr_getpshared>:
int pthread_barrierattr_getpshared(
const pthread_barrierattr_t *attr,
int *pshared
)
{
if ( !attr )
a000aa94: e3500000 cmp r0, #0
return EINVAL;
a000aa98: 03a00016 moveq r0, #22
int pthread_barrierattr_getpshared(
const pthread_barrierattr_t *attr,
int *pshared
)
{
if ( !attr )
a000aa9c: 012fff1e bxeq lr
return EINVAL;
if ( !attr->is_initialized )
a000aaa0: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000aaa4: e3530000 cmp r3, #0 <== NOT EXECUTED
return EINVAL;
*pshared = attr->process_shared;
a000aaa8: 15903004 ldrne r3, [r0, #4] <== NOT EXECUTED
{
if ( !attr )
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
a000aaac: 03a00016 moveq r0, #22 <== NOT EXECUTED
*pshared = attr->process_shared;
return 0;
a000aab0: 13a00000 movne r0, #0 <== NOT EXECUTED
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
*pshared = attr->process_shared;
a000aab4: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000aab8: e12fff1e bx lr <== NOT EXECUTED
a000aad8 <pthread_barrierattr_setpshared>:
int pthread_barrierattr_setpshared(
pthread_barrierattr_t *attr,
int pshared
)
{
if ( !attr )
a000aad8: e3500000 cmp r0, #0
a000aadc: 0a000002 beq a000aaec <pthread_barrierattr_setpshared+0x14>
return EINVAL;
if ( !attr->is_initialized )
a000aae0: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000aae4: e3530000 cmp r3, #0 <== NOT EXECUTED
a000aae8: 1a000001 bne a000aaf4 <pthread_barrierattr_setpshared+0x1c><== NOT EXECUTED
return EINVAL;
a000aaec: e3a00016 mov r0, #22
a000aaf0: e12fff1e bx lr
switch ( pshared ) {
a000aaf4: e3510001 cmp r1, #1 <== NOT EXECUTED
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
a000aaf8: 95801004 strls r1, [r0, #4] <== NOT EXECUTED
return 0;
a000aafc: 93a00000 movls r0, #0 <== NOT EXECUTED
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
a000ab00: 912fff1e bxls lr <== NOT EXECUTED
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
a000ab04: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a000ab08: e12fff1e bx lr <== NOT EXECUTED
a0009b88 <pthread_cleanup_pop>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a0009b88: e59f3084 ldr r3, [pc, #132] ; a0009c14 <pthread_cleanup_pop+0x8c>
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 ];
a0009b8c: e59f2084 ldr r2, [pc, #132] ; a0009c18 <pthread_cleanup_pop+0x90>
*/
void pthread_cleanup_pop(
int execute
)
{
a0009b90: e92d4070 push {r4, r5, r6, lr}
a0009b94: 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 ];
a0009b98: e5922008 ldr r2, [r2, #8]
*/
void pthread_cleanup_pop(
int execute
)
{
a0009b9c: e1a04000 mov r4, r0
++level;
a0009ba0: 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 ];
a0009ba4: e59220f4 ldr r2, [r2, #244] ; 0xf4
_Thread_Dispatch_disable_level = level;
a0009ba8: e5831000 str r1, [r3]
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a0009bac: e10f5000 mrs r5, CPSR
a0009bb0: e3853080 orr r3, r5, #128 ; 0x80
a0009bb4: e129f003 msr CPSR_fc, r3
*/
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
a0009bb8: 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 );
a0009bbc: e28230e8 add r3, r2, #232 ; 0xe8
a0009bc0: e1510003 cmp r1, r3
a0009bc4: 0a00000f beq a0009c08 <pthread_cleanup_pop+0x80>
_Thread_Enable_dispatch();
_ISR_Enable( level );
return;
}
handler = (POSIX_Cancel_Handler_control *)
a0009bc8: e59230ec ldr r3, [r2, #236] ; 0xec
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
a0009bcc: e5931000 ldr r1, [r3]
previous = the_node->previous;
a0009bd0: e5932004 ldr r2, [r3, #4]
next->previous = previous;
a0009bd4: e5812004 str r2, [r1, #4]
previous->next = next;
a0009bd8: e5821000 str r1, [r2]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a0009bdc: e129f005 msr CPSR_fc, r5
_ISR_Enable( level );
tmp_handler = *handler;
_Workspace_Free( handler );
a0009be0: e1a00003 mov r0, r3
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
tmp_handler = *handler;
a0009be4: e5935008 ldr r5, [r3, #8]
a0009be8: e593600c ldr r6, [r3, #12]
_Workspace_Free( handler );
a0009bec: eb000f20 bl a000d874 <_Workspace_Free>
_Thread_Enable_dispatch();
a0009bf0: eb000b27 bl a000c894 <_Thread_Enable_dispatch>
if ( execute )
a0009bf4: e3540000 cmp r4, #0
a0009bf8: 0a000001 beq a0009c04 <pthread_cleanup_pop+0x7c>
(*tmp_handler.routine)( tmp_handler.arg );
a0009bfc: e1a00006 mov r0, r6
a0009c00: e12fff35 blx r5
a0009c04: e8bd8070 pop {r4, r5, r6, pc}
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
_Thread_Enable_dispatch();
a0009c08: eb000b21 bl a000c894 <_Thread_Enable_dispatch> <== NOT EXECUTED
a0009c0c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
a0009c10: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000a340 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
a000a340: 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 )
a000a344: e2505000 subs r5, r0, #0
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
a000a348: 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 )
a000a34c: 0a000011 beq a000a398 <pthread_cleanup_push+0x58>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000a350: e59f3044 ldr r3, [pc, #68] ; a000a39c <pthread_cleanup_push+0x5c>
a000a354: e5932000 ldr r2, [r3]
++level;
a000a358: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000a35c: e5832000 str r2, [r3]
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
a000a360: e3a00010 mov r0, #16
a000a364: eb0011ec bl a000eb1c <_Workspace_Allocate>
if ( handler ) {
a000a368: e3500000 cmp r0, #0
a000a36c: 0a000007 beq a000a390 <pthread_cleanup_push+0x50>
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a000a370: e59f3028 ldr r3, [pc, #40] ; a000a3a0 <pthread_cleanup_push+0x60>
handler_stack = &thread_support->Cancellation_Handlers;
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
a000a374: 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 ];
a000a378: e5933008 ldr r3, [r3, #8]
handler_stack = &thread_support->Cancellation_Handlers;
a000a37c: e59330f4 ldr r3, [r3, #244] ; 0xf4
handler->routine = routine;
a000a380: e5805008 str r5, [r0, #8]
handler->arg = arg;
a000a384: e580400c str r4, [r0, #12]
_Chain_Append( handler_stack, &handler->Node );
a000a388: e28300e4 add r0, r3, #228 ; 0xe4
a000a38c: eb00062a bl a000bc3c <_Chain_Append>
}
_Thread_Enable_dispatch();
}
a000a390: e8bd4030 pop {r4, r5, lr}
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
a000a394: ea000da0 b a000da1c <_Thread_Enable_dispatch>
a000a398: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000b3b0 <pthread_cond_destroy>:
* P1003.1c/Draft 10, p. 87
*/
int pthread_cond_destroy(
pthread_cond_t *cond
)
{
a000b3b0: e92d4030 push {r4, r5, lr}
a000b3b4: e24dd004 sub sp, sp, #4
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
a000b3b8: e1a0100d mov r1, sp
a000b3bc: eb000016 bl a000b41c <_POSIX_Condition_variables_Get>
switch ( location ) {
a000b3c0: e59d3000 ldr r3, [sp]
)
{
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
a000b3c4: e1a04000 mov r4, r0
switch ( location ) {
a000b3c8: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000b3cc: 13a00016 movne r0, #22
{
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
a000b3d0: 1a000005 bne a000b3ec <pthread_cond_destroy+0x3c>
case OBJECTS_LOCAL:
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
a000b3d4: e2840018 add r0, r4, #24
a000b3d8: eb00111e bl a000f858 <_Thread_queue_First>
a000b3dc: e2505000 subs r5, r0, #0
a000b3e0: 0a000003 beq a000b3f4 <pthread_cond_destroy+0x44>
_Thread_Enable_dispatch();
a000b3e4: eb000f42 bl a000f0f4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return EBUSY;
a000b3e8: e3a00010 mov r0, #16 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a000b3ec: e28dd004 add sp, sp, #4
a000b3f0: e8bd8030 pop {r4, r5, pc}
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close(
a000b3f4: e59f001c ldr r0, [pc, #28] ; a000b418 <pthread_cond_destroy+0x68>
a000b3f8: e1a01004 mov r1, r4
a000b3fc: eb000a7a bl a000ddec <_Objects_Close>
RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
POSIX_Condition_variables_Control *the_condition_variable
)
{
_Objects_Free(
a000b400: e59f0010 ldr r0, [pc, #16] ; a000b418 <pthread_cond_destroy+0x68>
a000b404: e1a01004 mov r1, r4
a000b408: eb000b32 bl a000e0d8 <_Objects_Free>
&_POSIX_Condition_variables_Information,
&the_cond->Object
);
_POSIX_Condition_variables_Free( the_cond );
_Thread_Enable_dispatch();
a000b40c: eb000f38 bl a000f0f4 <_Thread_Enable_dispatch>
return 0;
a000b410: e1a00005 mov r0, r5
a000b414: eafffff4 b a000b3ec <pthread_cond_destroy+0x3c>
a000b480 <pthread_cond_init>:
*/
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
a000b480: 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;
a000b484: e59f60ac ldr r6, [pc, #172] ; a000b538 <pthread_cond_init+0xb8>
a000b488: e3510000 cmp r1, #0
a000b48c: 11a06001 movne r6, r1
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
a000b490: e5963004 ldr r3, [r6, #4]
*/
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
a000b494: e1a04000 mov r4, r0
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
a000b498: e3530001 cmp r3, #1
a000b49c: 0a000004 beq a000b4b4 <pthread_cond_init+0x34>
return EINVAL;
if ( !the_attr->is_initialized )
a000b4a0: e5963000 ldr r3, [r6]
a000b4a4: e3530000 cmp r3, #0
a000b4a8: 1a000003 bne a000b4bc <pthread_cond_init+0x3c>
return EINVAL;
a000b4ac: e3a00016 mov r0, #22 <== NOT EXECUTED
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
a000b4b0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
a000b4b4: e3a00016 mov r0, #22 <== NOT EXECUTED
a000b4b8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000b4bc: e59f3078 ldr r3, [pc, #120] ; a000b53c <pthread_cond_init+0xbc>
a000b4c0: e5932000 ldr r2, [r3]
++level;
a000b4c4: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000b4c8: e5832000 str r2, [r3]
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
a000b4cc: e59f706c ldr r7, [pc, #108] ; a000b540 <pthread_cond_init+0xc0>
a000b4d0: e1a00007 mov r0, r7
a000b4d4: eb000a21 bl a000dd60 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
a000b4d8: e2505000 subs r5, r0, #0
a000b4dc: 0a000012 beq a000b52c <pthread_cond_init+0xac>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
a000b4e0: e596c004 ldr ip, [r6, #4]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
a000b4e4: e3a02201 mov r2, #268435456 ; 0x10000000
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
a000b4e8: e3a06000 mov r6, #0
_Thread_queue_Initialize(
a000b4ec: e2850018 add r0, r5, #24
a000b4f0: e1a01006 mov r1, r6
a000b4f4: e2822b02 add r2, r2, #2048 ; 0x800
a000b4f8: e3a03074 mov r3, #116 ; 0x74
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
a000b4fc: e585c010 str ip, [r5, #16]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
a000b500: e5856014 str r6, [r5, #20]
_Thread_queue_Initialize(
a000b504: eb0010f5 bl a000f8e0 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000b508: e5953008 ldr r3, [r5, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000b50c: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a000b510: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000b514: 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;
a000b518: e585600c str r6, [r5, #12]
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
a000b51c: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
a000b520: eb000ef3 bl a000f0f4 <_Thread_Enable_dispatch>
return 0;
a000b524: e1a00006 mov r0, r6
a000b528: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
a000b52c: eb000ef0 bl a000f0f4 <_Thread_Enable_dispatch>
return ENOMEM;
a000b530: e3a0000c mov r0, #12
a000b534: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000b5ac <pthread_cond_timedwait>:
int pthread_cond_timedwait(
pthread_cond_t *cond,
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
a000b5ac: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000b5b0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000b5b4: e1a05000 mov r5, r0 <== NOT EXECUTED
a000b5b8: 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);
a000b5bc: e1a00002 mov r0, r2 <== NOT EXECUTED
a000b5c0: e1a0100d mov r1, sp <== NOT EXECUTED
a000b5c4: eb00012d bl a000ba80 <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
a000b5c8: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000b5cc: 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 )
a000b5d0: 1a000001 bne a000b5dc <pthread_cond_timedwait+0x30> <== NOT EXECUTED
cond,
mutex,
ticks,
already_timedout
);
}
a000b5d4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000b5d8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
already_timedout = false;
status = _POSIX_Absolute_timeout_to_ticks(abstime, &ticks);
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a000b5dc: e2403001 sub r3, r0, #1 <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
already_timedout = true;
return _POSIX_Condition_variables_Wait_support(
a000b5e0: e3530001 cmp r3, #1 <== NOT EXECUTED
a000b5e4: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b5e8: e1a01004 mov r1, r4 <== NOT EXECUTED
a000b5ec: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000b5f0: 83a03000 movhi r3, #0 <== NOT EXECUTED
a000b5f4: 93a03001 movls r3, #1 <== NOT EXECUTED
a000b5f8: eb000003 bl a000b60c <_POSIX_Condition_variables_Wait_support><== NOT EXECUTED
a000b5fc: eafffff4 b a000b5d4 <pthread_cond_timedwait+0x28> <== NOT EXECUTED
a000b344 <pthread_condattr_getpshared>:
int pthread_condattr_getpshared(
const pthread_condattr_t *attr,
int *pshared
)
{
if ( !attr )
a000b344: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
*pshared = attr->process_shared;
a000b348: 15903004 ldrne r3, [r0, #4] <== NOT EXECUTED
const pthread_condattr_t *attr,
int *pshared
)
{
if ( !attr )
return EINVAL;
a000b34c: 03a00016 moveq r0, #22 <== NOT EXECUTED
*pshared = attr->process_shared;
return 0;
a000b350: 13a00000 movne r0, #0 <== NOT EXECUTED
)
{
if ( !attr )
return EINVAL;
*pshared = attr->process_shared;
a000b354: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000b358: e12fff1e bx lr <== NOT EXECUTED
a000b388 <pthread_condattr_setpshared>:
int pthread_condattr_setpshared(
pthread_condattr_t *attr,
int pshared
)
{
if ( !attr )
a000b388: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
a000b38c: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_condattr_setpshared(
pthread_condattr_t *attr,
int pshared
)
{
if ( !attr )
a000b390: 012fff1e bxeq lr <== NOT EXECUTED
return EINVAL;
switch ( pshared ) {
a000b394: e3510001 cmp r1, #1 <== NOT EXECUTED
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
a000b398: 95801004 strls r1, [r0, #4] <== NOT EXECUTED
return 0;
default:
return EINVAL;
a000b39c: 83a00016 movhi r0, #22 <== NOT EXECUTED
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
a000b3a0: 93a00000 movls r0, #0 <== NOT EXECUTED
default:
return EINVAL;
}
}
a000b3a4: e12fff1e bx lr <== NOT EXECUTED
a000a800 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
a000a800: 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 )
a000a804: e2528000 subs r8, r2, #0
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
a000a808: e24dd048 sub sp, sp, #72 ; 0x48
a000a80c: e1a07000 mov r7, r0
a000a810: e1a05003 mov r5, r3
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
a000a814: 03a0600e moveq r6, #14
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
a000a818: 0a000006 beq a000a838 <pthread_create+0x38>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
a000a81c: e59f4238 ldr r4, [pc, #568] ; a000aa5c <pthread_create+0x25c>
a000a820: e3510000 cmp r1, #0
a000a824: 11a04001 movne r4, r1
if ( !the_attr->is_initialized )
a000a828: e5943000 ldr r3, [r4]
a000a82c: e3530000 cmp r3, #0
a000a830: 1a000003 bne a000a844 <pthread_create+0x44>
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
a000a834: e3a06016 mov r6, #22 <== NOT EXECUTED
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
a000a838: e1a00006 mov r0, r6
a000a83c: e28dd048 add sp, sp, #72 ; 0x48
a000a840: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* 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) )
a000a844: e5943004 ldr r3, [r4, #4]
a000a848: e3530000 cmp r3, #0
a000a84c: 0a000004 beq a000a864 <pthread_create+0x64>
a000a850: e59f3208 ldr r3, [pc, #520] ; a000aa60 <pthread_create+0x260>
a000a854: e5942008 ldr r2, [r4, #8]
a000a858: e5933000 ldr r3, [r3]
a000a85c: e1520003 cmp r2, r3
a000a860: 3afffff3 bcc a000a834 <pthread_create+0x34>
* 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 ) {
a000a864: e5943010 ldr r3, [r4, #16]
a000a868: e3530001 cmp r3, #1
a000a86c: 0a000044 beq a000a984 <pthread_create+0x184>
a000a870: e3530002 cmp r3, #2
a000a874: 1affffee bne a000a834 <pthread_create+0x34>
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
a000a878: e28d9024 add r9, sp, #36 ; 0x24
a000a87c: e1a0c009 mov ip, r9
a000a880: e2846018 add r6, r4, #24
a000a884: e8b6000f ldm r6!, {r0, r1, r2, r3}
a000a888: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000a88c: e8960007 ldm r6, {r0, r1, r2}
a000a890: e88c0007 stm ip, {r0, r1, r2}
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
a000a894: e594b014 ldr fp, [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 )
a000a898: e594300c ldr r3, [r4, #12]
a000a89c: e3530000 cmp r3, #0
return ENOTSUP;
a000a8a0: 13a06086 movne r6, #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 )
a000a8a4: 1affffe3 bne a000a838 <pthread_create+0x38>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
a000a8a8: e59d0024 ldr r0, [sp, #36] ; 0x24
a000a8ac: eb00192b bl a0010d60 <_POSIX_Priority_Is_valid>
a000a8b0: e3500000 cmp r0, #0
a000a8b4: 0affffde beq a000a834 <pthread_create+0x34>
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
a000a8b8: e59dc024 ldr ip, [sp, #36] ; 0x24
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
a000a8bc: e1a0000b mov r0, fp
a000a8c0: e1a01009 mov r1, r9
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
a000a8c4: e58dc020 str ip, [sp, #32]
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
a000a8c8: e59fc194 ldr ip, [pc, #404] ; a000aa64 <pthread_create+0x264>
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
a000a8cc: e28d2040 add r2, sp, #64 ; 0x40
a000a8d0: e28d3044 add r3, sp, #68 ; 0x44
a000a8d4: e5dca000 ldrb sl, [ip]
a000a8d8: eb00192b bl a0010d8c <_POSIX_Thread_Translate_sched_param>
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
a000a8dc: e2506000 subs r6, r0, #0
a000a8e0: 1affffd4 bne a000a838 <pthread_create+0x38>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
a000a8e4: e59f117c ldr r1, [pc, #380] ; a000aa68 <pthread_create+0x268>
a000a8e8: e5910000 ldr r0, [r1]
a000a8ec: eb00063d bl a000c1e8 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
a000a8f0: e59f0174 ldr r0, [pc, #372] ; a000aa6c <pthread_create+0x26c>
a000a8f4: eb0008f6 bl a000ccd4 <_Objects_Allocate>
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
a000a8f8: e3500000 cmp r0, #0
a000a8fc: e58d001c str r0, [sp, #28]
a000a900: 0a00001a beq a000a970 <pthread_create+0x170>
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
a000a904: e59f3154 ldr r3, [pc, #340] ; a000aa60 <pthread_create+0x260>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
a000a908: e3a01001 mov r1, #1
a000a90c: e59dc020 ldr ip, [sp, #32]
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
a000a910: e5932000 ldr r2, [r3]
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
a000a914: e5943008 ldr r3, [r4, #8]
a000a918: e58d1008 str r1, [sp, #8]
a000a91c: e59d1040 ldr r1, [sp, #64] ; 0x40
a000a920: e06ca00a rsb sl, ip, sl
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
a000a924: e1a02082 lsl r2, r2, #1
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
a000a928: e58d100c str r1, [sp, #12]
a000a92c: e59d1044 ldr r1, [sp, #68] ; 0x44
a000a930: e58d6000 str r6, [sp]
a000a934: e58da004 str sl, [sp, #4]
a000a938: e58d1010 str r1, [sp, #16]
a000a93c: e58d6014 str r6, [sp, #20]
a000a940: e58d6018 str r6, [sp, #24]
a000a944: e1520003 cmp r2, r3
a000a948: 21a03002 movcs r3, r2
a000a94c: e59f0118 ldr r0, [pc, #280] ; a000aa6c <pthread_create+0x26c>
a000a950: e59d101c ldr r1, [sp, #28]
a000a954: e5942004 ldr r2, [r4, #4]
a000a958: eb000def bl a000e11c <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
a000a95c: e3500000 cmp r0, #0
a000a960: 1a000013 bne a000a9b4 <pthread_create+0x1b4>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
a000a964: e59f0100 ldr r0, [pc, #256] ; a000aa6c <pthread_create+0x26c>
a000a968: e59d101c ldr r1, [sp, #28]
a000a96c: eb0009b6 bl a000d04c <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
a000a970: e59f20f0 ldr r2, [pc, #240] ; a000aa68 <pthread_create+0x268>
return EAGAIN;
a000a974: e3a0600b mov r6, #11
name /* posix threads don't have a name */
);
if ( !status ) {
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
a000a978: e5920000 ldr r0, [r2]
a000a97c: eb000635 bl a000c258 <_API_Mutex_Unlock>
return EAGAIN;
a000a980: eaffffac b a000a838 <pthread_create+0x38>
* 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 ];
a000a984: e59f30e4 ldr r3, [pc, #228] ; a000aa70 <pthread_create+0x270>
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
a000a988: e28d9024 add r9, sp, #36 ; 0x24
a000a98c: e1a0a009 mov sl, r9
* 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 ];
a000a990: e5933008 ldr r3, [r3, #8]
a000a994: e59360f4 ldr r6, [r3, #244] ; 0xf4
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
a000a998: e286c088 add ip, r6, #136 ; 0x88
a000a99c: e8bc000f ldm ip!, {r0, r1, r2, r3}
a000a9a0: e8aa000f stmia sl!, {r0, r1, r2, r3}
a000a9a4: e89c0007 ldm ip, {r0, r1, r2}
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
a000a9a8: e596b084 ldr fp, [r6, #132] ; 0x84
schedparam = api->schedparam;
a000a9ac: e88a0007 stm sl, {r0, r1, r2}
break;
a000a9b0: eaffffb8 b a000a898 <pthread_create+0x98>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000a9b4: e59dc01c ldr ip, [sp, #28]
api->Attributes = *the_attr;
a000a9b8: e1a0e004 mov lr, r4
a000a9bc: e8be000f ldm lr!, {r0, r1, r2, r3}
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000a9c0: e59ca0f4 ldr sl, [ip, #244] ; 0xf4
api->Attributes = *the_attr;
a000a9c4: e1a0c00a mov ip, sl
a000a9c8: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000a9cc: e8be000f ldm lr!, {r0, r1, r2, r3}
a000a9d0: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000a9d4: e8be000f ldm lr!, {r0, r1, r2, r3}
a000a9d8: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000a9dc: e89e000f ldm lr, {r0, r1, r2, r3}
a000a9e0: e88c000f stm ip, {r0, r1, r2, r3}
api->detachstate = the_attr->detachstate;
a000a9e4: e594303c ldr r3, [r4, #60] ; 0x3c
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
a000a9e8: e28ac088 add ip, sl, #136 ; 0x88
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
a000a9ec: e58ab084 str fp, [sl, #132] ; 0x84
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
a000a9f0: e58a3040 str r3, [sl, #64] ; 0x40
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
a000a9f4: e8b9000f ldm r9!, {r0, r1, r2, r3}
a000a9f8: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000a9fc: e8990007 ldm r9, {r0, r1, r2}
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
a000aa00: e1a03005 mov r3, r5
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
a000aa04: e88c0007 stm ip, {r0, r1, r2}
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
a000aa08: e59d001c ldr r0, [sp, #28]
a000aa0c: e3a01001 mov r1, #1
a000aa10: e1a02008 mov r2, r8
a000aa14: e58d6000 str r6, [sp]
a000aa18: eb00100e bl a000ea58 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
a000aa1c: e35b0004 cmp fp, #4
a000aa20: 0a000006 beq a000aa40 <pthread_create+0x240>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
a000aa24: e59dc01c ldr ip, [sp, #28]
_RTEMS_Unlock_allocator();
a000aa28: e59f1038 ldr r1, [pc, #56] ; a000aa68 <pthread_create+0x268>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
a000aa2c: e59c3008 ldr r3, [ip, #8]
_RTEMS_Unlock_allocator();
a000aa30: e5910000 ldr r0, [r1]
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
a000aa34: e5873000 str r3, [r7]
_RTEMS_Unlock_allocator();
a000aa38: eb000606 bl a000c258 <_API_Mutex_Unlock>
return 0;
a000aa3c: eaffff7d b a000a838 <pthread_create+0x38>
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
a000aa40: e28a0090 add r0, sl, #144 ; 0x90 <== NOT EXECUTED
a000aa44: eb001029 bl a000eaf0 <_Timespec_To_ticks> <== NOT EXECUTED
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000aa48: e28a10a8 add r1, sl, #168 ; 0xa8 <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000aa4c: e58a00b4 str r0, [sl, #180] ; 0xb4 <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000aa50: e59f001c ldr r0, [pc, #28] ; a000aa74 <pthread_create+0x274><== NOT EXECUTED
a000aa54: eb0010ca bl a000ed84 <_Watchdog_Insert> <== NOT EXECUTED
a000aa58: eafffff1 b a000aa24 <pthread_create+0x224> <== NOT EXECUTED
a000a358 <pthread_getcpuclockid>:
int pthread_getcpuclockid(
pthread_t pid,
clockid_t *clock_id
)
{
a000a358: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a000a35c: eb0022f9 bl a0012f48 <__errno> <== NOT EXECUTED
a000a360: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a000a364: e5803000 str r3, [r0] <== NOT EXECUTED
}
a000a368: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a36c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000f3dc <pthread_join>:
int pthread_join(
pthread_t thread,
void **value_ptr
)
{
a000f3dc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a000f3e0: e59f40d4 ldr r4, [pc, #212] ; a000f4bc <pthread_join+0xe0>
a000f3e4: e24dd008 sub sp, sp, #8
/*
* Put ourself on the threads join list
*/
if ( the_thread->current_state ==
a000f3e8: e3a05a01 mov r5, #4096 ; 0x1000
int pthread_join(
pthread_t thread,
void **value_ptr
)
{
a000f3ec: e1a06000 mov r6, r0
a000f3f0: e1a0a001 mov sl, r1
/*
* Put ourself on the threads join list
*/
if ( the_thread->current_state ==
a000f3f4: e2855004 add r5, r5, #4
_Thread_Clear_state(
the_thread,
(STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT)
);
} else {
_Thread_Executing->Wait.return_argument = &return_pointer;
a000f3f8: e28d7004 add r7, sp, #4
POSIX_API_Control *api;
Objects_Locations location;
void *return_pointer;
on_EINTR:
the_thread = _Thread_Get( thread, &location );
a000f3fc: e1a0100d mov r1, sp
a000f400: e1a00006 mov r0, r6
a000f404: eb000d09 bl a0012830 <_Thread_Get>
switch ( location ) {
a000f408: e59d1000 ldr r1, [sp]
a000f40c: e3510000 cmp r1, #0
a000f410: 0a000002 beq a000f420 <pthread_join+0x44>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
a000f414: e3a00003 mov r0, #3
}
a000f418: e28dd008 add sp, sp, #8
a000f41c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
on_EINTR:
the_thread = _Thread_Get( thread, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000f420: e590c0f4 ldr ip, [r0, #244] ; 0xf4
(STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT)
);
} else {
_Thread_Executing->Wait.return_argument = &return_pointer;
_Thread_queue_Enter_critical_section( &api->Join_List );
_Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
a000f424: e59f2094 ldr r2, [pc, #148] ; a000f4c0 <pthread_join+0xe4>
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
a000f428: e59ce040 ldr lr, [ip, #64] ; 0x40
a000f42c: e35e0000 cmp lr, #0
a000f430: 0a00001b beq a000f4a4 <pthread_join+0xc8>
a000f434: e594e008 ldr lr, [r4, #8]
_Thread_Enable_dispatch();
return EINVAL;
}
if ( _Thread_Is_executing( the_thread ) ) {
a000f438: e150000e cmp r0, lr
a000f43c: 0a00001b beq a000f4b0 <pthread_join+0xd4>
/*
* Put ourself on the threads join list
*/
if ( the_thread->current_state ==
a000f440: e5908010 ldr r8, [r0, #16]
a000f444: e1580005 cmp r8, r5
a000f448: 0a000010 beq a000f490 <pthread_join+0xb4>
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;
a000f44c: e3a03001 mov r3, #1
_Thread_Clear_state(
the_thread,
(STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT)
);
} else {
_Thread_Executing->Wait.return_argument = &return_pointer;
a000f450: e58e7028 str r7, [lr, #40] ; 0x28
_Thread_queue_Enter_critical_section( &api->Join_List );
_Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
a000f454: e28c0044 add r0, ip, #68 ; 0x44
a000f458: e58c3074 str r3, [ip, #116] ; 0x74
a000f45c: eb000e21 bl a0012ce8 <_Thread_queue_Enqueue_with_handler>
}
_Thread_Enable_dispatch();
a000f460: eb000cea bl a0012810 <_Thread_Enable_dispatch>
if ( _Thread_Executing->Wait.return_code == EINTR )
a000f464: e5943008 ldr r3, [r4, #8]
a000f468: e5933034 ldr r3, [r3, #52] ; 0x34
a000f46c: e3530004 cmp r3, #4
a000f470: 0affffe1 beq a000f3fc <pthread_join+0x20>
goto on_EINTR;
if ( value_ptr )
a000f474: e35a0000 cmp sl, #0
*value_ptr = return_pointer;
return 0;
a000f478: 01a0000a moveq r0, sl
_Thread_Enable_dispatch();
if ( _Thread_Executing->Wait.return_code == EINTR )
goto on_EINTR;
if ( value_ptr )
a000f47c: 0affffe5 beq a000f418 <pthread_join+0x3c>
*value_ptr = return_pointer;
a000f480: e59d3004 ldr r3, [sp, #4]
return 0;
a000f484: e3a00000 mov r0, #0
if ( _Thread_Executing->Wait.return_code == EINTR )
goto on_EINTR;
if ( value_ptr )
*value_ptr = return_pointer;
a000f488: e58a3000 str r3, [sl]
a000f48c: eaffffe1 b a000f418 <pthread_join+0x3c>
* Put ourself on the threads join list
*/
if ( the_thread->current_state ==
(STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT) ) {
return_pointer = the_thread->Wait.return_argument;
a000f490: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
_Thread_Clear_state(
a000f494: e1a01005 mov r1, r5 <== NOT EXECUTED
* Put ourself on the threads join list
*/
if ( the_thread->current_state ==
(STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT) ) {
return_pointer = the_thread->Wait.return_argument;
a000f498: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
_Thread_Clear_state(
a000f49c: eb000be5 bl a0012438 <_Thread_Clear_state> <== NOT EXECUTED
a000f4a0: eaffffee b a000f460 <pthread_join+0x84> <== NOT EXECUTED
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
_Thread_Enable_dispatch();
a000f4a4: eb000cd9 bl a0012810 <_Thread_Enable_dispatch>
return EINVAL;
a000f4a8: e3a00016 mov r0, #22
a000f4ac: eaffffd9 b a000f418 <pthread_join+0x3c>
}
if ( _Thread_Is_executing( the_thread ) ) {
_Thread_Enable_dispatch();
a000f4b0: eb000cd6 bl a0012810 <_Thread_Enable_dispatch> <== NOT EXECUTED
return EDEADLK;
a000f4b4: e3a0002d mov r0, #45 ; 0x2d <== NOT EXECUTED
a000f4b8: eaffffd6 b a000f418 <pthread_join+0x3c> <== NOT EXECUTED
a001e0a4 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
a001e0a4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
a001e0a8: e2516000 subs r6, r1, #0
int pthread_kill(
pthread_t thread,
int sig
)
{
a001e0ac: e24dd004 sub sp, sp, #4
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
a001e0b0: 0a000027 beq a001e154 <pthread_kill+0xb0>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
a001e0b4: e2467001 sub r7, r6, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
a001e0b8: e357001f cmp r7, #31
a001e0bc: 8a000024 bhi a001e154 <pthread_kill+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
a001e0c0: e1a0100d mov r1, sp
a001e0c4: ebffbbf6 bl a000d0a4 <_Thread_Get>
switch ( location ) {
a001e0c8: e59d8000 ldr r8, [sp]
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
a001e0cc: e1a04000 mov r4, r0
switch ( location ) {
a001e0d0: e3580000 cmp r8, #0
a001e0d4: 1a000023 bne a001e168 <pthread_kill+0xc4>
a001e0d8: e59f009c ldr r0, [pc, #156] ; a001e17c <pthread_kill+0xd8>
a001e0dc: ebffb3f2 bl a000b0ac <_API_extensions_Add_post_switch>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
a001e0e0: e59f2098 ldr r2, [pc, #152] ; a001e180 <pthread_kill+0xdc>
a001e0e4: e3a0100c mov r1, #12
* If sig == 0 then just validate arguments
*/
_POSIX_signals_Add_post_switch_extension();
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a001e0e8: e59430f4 ldr r3, [r4, #244] ; 0xf4
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
a001e0ec: e0222691 mla r2, r1, r6, r2
a001e0f0: e5922008 ldr r2, [r2, #8]
a001e0f4: e3520001 cmp r2, #1
a001e0f8: 0a000012 beq a001e148 <pthread_kill+0xa4>
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
a001e0fc: e59320d4 ldr r2, [r3, #212] ; 0xd4
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a001e100: e3a05001 mov r5, #1
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
a001e104: e1a00004 mov r0, r4
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
a001e108: e1827715 orr r7, r2, r5, lsl r7
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
a001e10c: e1a01006 mov r1, r6
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
a001e110: e58370d4 str r7, [r3, #212] ; 0xd4
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
a001e114: e1a02008 mov r2, r8
a001e118: ebffff8d bl a001df54 <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
a001e11c: e59f3060 ldr r3, [pc, #96] ; a001e184 <pthread_kill+0xe0>
a001e120: e5932000 ldr r2, [r3]
a001e124: e3520000 cmp r2, #0
a001e128: 0a000002 beq a001e138 <pthread_kill+0x94>
a001e12c: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED
a001e130: e1540002 cmp r4, r2 <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
a001e134: 05c35004 strbeq r5, [r3, #4] <== NOT EXECUTED
}
_Thread_Enable_dispatch();
a001e138: ebffbbd1 bl a000d084 <_Thread_Enable_dispatch>
return 0;
a001e13c: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
a001e140: e28dd004 add sp, sp, #4
a001e144: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
_Thread_Enable_dispatch();
a001e148: ebffbbcd bl a000d084 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a001e14c: e1a00008 mov r0, r8 <== NOT EXECUTED
a001e150: eafffffa b a001e140 <pthread_kill+0x9c> <== 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 );
a001e154: ebffd1ce bl a0012894 <__errno> <== NOT EXECUTED
a001e158: e3a03016 mov r3, #22 <== NOT EXECUTED
a001e15c: e5803000 str r3, [r0] <== NOT EXECUTED
a001e160: e3e00000 mvn r0, #0 <== NOT EXECUTED
a001e164: eafffff5 b a001e140 <pthread_kill+0x9c> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
a001e168: ebffd1c9 bl a0012894 <__errno> <== NOT EXECUTED
a001e16c: e3a03003 mov r3, #3 <== NOT EXECUTED
a001e170: e5803000 str r3, [r0] <== NOT EXECUTED
a001e174: e3e00000 mvn r0, #0 <== NOT EXECUTED
a001e178: eafffff0 b a001e140 <pthread_kill+0x9c> <== NOT EXECUTED
a000c3f4 <pthread_mutex_destroy>:
*/
int pthread_mutex_destroy(
pthread_mutex_t *mutex
)
{
a000c3f4: e92d4030 push {r4, r5, lr}
a000c3f8: e24dd004 sub sp, sp, #4
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
a000c3fc: e1a0100d mov r1, sp
a000c400: eb000019 bl a000c46c <_POSIX_Mutex_Get>
switch ( location ) {
a000c404: e59d4000 ldr r4, [sp]
)
{
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
a000c408: e1a05000 mov r5, r0
switch ( location ) {
a000c40c: e3540000 cmp r4, #0
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000c410: 13a00016 movne r0, #22
{
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
a000c414: 1a000004 bne a000c42c <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 ) ) {
a000c418: e5953064 ldr r3, [r5, #100] ; 0x64
a000c41c: e3530000 cmp r3, #0
a000c420: 1a000003 bne a000c434 <pthread_mutex_destroy+0x40>
_Thread_Enable_dispatch();
a000c424: eb000f4f bl a0010168 <_Thread_Enable_dispatch> <== NOT EXECUTED
return EBUSY;
a000c428: e3a00010 mov r0, #16 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a000c42c: e28dd004 add sp, sp, #4
a000c430: 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 );
a000c434: e59f002c ldr r0, [pc, #44] ; a000c468 <pthread_mutex_destroy+0x74>
a000c438: e1a01005 mov r1, r5
a000c43c: eb000a87 bl a000ee60 <_Objects_Close>
_CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL );
a000c440: e3a02016 mov r2, #22
a000c444: e2850014 add r0, r5, #20
a000c448: e1a01004 mov r1, r4
a000c44c: eb0007d3 bl a000e3a0 <_CORE_mutex_Flush>
RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
POSIX_Mutex_Control *the_mutex
)
{
_Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object );
a000c450: e59f0010 ldr r0, [pc, #16] ; a000c468 <pthread_mutex_destroy+0x74>
a000c454: e1a01005 mov r1, r5
a000c458: eb000b3b bl a000f14c <_Objects_Free>
_POSIX_Mutex_Free( the_mutex );
_Thread_Enable_dispatch();
a000c45c: eb000f41 bl a0010168 <_Thread_Enable_dispatch>
return 0;
a000c460: e1a00004 mov r0, r4
a000c464: eafffff0 b a000c42c <pthread_mutex_destroy+0x38>
a000c590 <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;
a000c590: e59f3134 ldr r3, [pc, #308] ; a000c6cc <pthread_mutex_init+0x13c>
a000c594: e3510000 cmp r1, #0
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
a000c598: e92d41f0 push {r4, r5, r6, r7, r8, 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;
a000c59c: 11a08001 movne r8, r1
a000c5a0: 01a08003 moveq r8, r3
/* Check for NULL mutex */
if ( !mutex )
a000c5a4: e2504000 subs r4, r0, #0
a000c5a8: 0a000002 beq a000c5b8 <pthread_mutex_init+0x28>
}
}
}
#endif
if ( !the_attr->is_initialized )
a000c5ac: e5983000 ldr r3, [r8]
a000c5b0: e3530000 cmp r3, #0
a000c5b4: 1a000001 bne a000c5c0 <pthread_mutex_init+0x30>
/*
* Validate the priority ceiling field -- should always be valid.
*/
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
return EINVAL;
a000c5b8: e3a00016 mov r0, #22 <== NOT EXECUTED
a000c5bc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
return EINVAL;
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
a000c5c0: e5983004 ldr r3, [r8, #4]
a000c5c4: e3530001 cmp r3, #1
a000c5c8: 0a000034 beq a000c6a0 <pthread_mutex_init+0x110>
return ENOSYS;
if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE )
a000c5cc: e3530000 cmp r3, #0
a000c5d0: 1afffff8 bne a000c5b8 <pthread_mutex_init+0x28>
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
a000c5d4: e598500c ldr r5, [r8, #12]
a000c5d8: e3550001 cmp r5, #1
a000c5dc: 0a000031 beq a000c6a8 <pthread_mutex_init+0x118>
a000c5e0: e3550002 cmp r5, #2
a000c5e4: 0a000031 beq a000c6b0 <pthread_mutex_init+0x120>
a000c5e8: e3550000 cmp r5, #0
a000c5ec: 1afffff1 bne a000c5b8 <pthread_mutex_init+0x28>
}
/*
* Validate the priority ceiling field -- should always be valid.
*/
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
a000c5f0: e5980008 ldr r0, [r8, #8]
a000c5f4: eb0000dd bl a000c970 <_POSIX_Priority_Is_valid>
a000c5f8: e3500000 cmp r0, #0
a000c5fc: 0affffed beq a000c5b8 <pthread_mutex_init+0x28>
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
/*
* Validate the mutex type and set appropriate SuperCore mutex
* attributes.
*/
switch ( the_attr->type ) {
a000c600: e5983010 ldr r3, [r8, #16]
a000c604: e3530003 cmp r3, #3
a000c608: 8a00002a bhi a000c6b8 <pthread_mutex_init+0x128>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000c60c: e59f30bc ldr r3, [pc, #188] ; a000c6d0 <pthread_mutex_init+0x140>
a000c610: e5932000 ldr r2, [r3]
++level;
a000c614: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000c618: 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 );
a000c61c: e59f70b0 ldr r7, [pc, #176] ; a000c6d4 <pthread_mutex_init+0x144>
a000c620: e1a00007 mov r0, r7
a000c624: eb0009ea bl a000edd4 <_Objects_Allocate>
*/
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
a000c628: e2506000 subs r6, r0, #0
a000c62c: 0a000023 beq a000c6c0 <pthread_mutex_init+0x130>
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
a000c630: e59f30a0 ldr r3, [pc, #160] ; a000c6d8 <pthread_mutex_init+0x148>
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;
a000c634: e598c014 ldr ip, [r8, #20]
a000c638: e5982008 ldr r2, [r8, #8]
a000c63c: e5d30000 ldrb r0, [r3]
if ( !the_mutex ) {
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
a000c640: e598e004 ldr lr, [r8, #4]
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
a000c644: e27cc001 rsbs ip, ip, #1
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = true;
a000c648: e3a03001 mov r3, #1
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;
a000c64c: 33a0c000 movcc ip, #0
a000c650: e0620000 rsb r0, r2, r0
the_mutex_attr->discipline = the_discipline;
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
a000c654: e2861054 add r1, r6, #84 ; 0x54
a000c658: e1a02003 mov r2, r3
if ( !the_mutex ) {
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
a000c65c: e586e010 str lr, [r6, #16]
a000c660: e586c054 str ip, [r6, #84] ; 0x54
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;
a000c664: e5c63058 strb r3, [r6, #88] ; 0x58
the_mutex_attr->priority_ceiling =
a000c668: e5860060 str r0, [r6, #96] ; 0x60
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
a000c66c: e586505c str r5, [r6, #92] ; 0x5c
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
a000c670: e2860014 add r0, r6, #20
a000c674: eb00074a bl a000e3a4 <_CORE_mutex_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000c678: e5963008 ldr r3, [r6, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000c67c: e597201c ldr r2, [r7, #28]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a000c680: e3a05000 mov r5, #0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a000c684: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000c688: e7826721 str r6, [r2, r1, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a000c68c: e586500c str r5, [r6, #12]
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
a000c690: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
a000c694: eb000eb3 bl a0010168 <_Thread_Enable_dispatch>
return 0;
a000c698: e1a00005 mov r0, r5
a000c69c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return ENOSYS;
a000c6a0: e3a00058 mov r0, #88 ; 0x58 <== NOT EXECUTED
a000c6a4: e8bd81f0 pop {r4, r5, r6, r7, r8, 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;
a000c6a8: e3a05002 mov r5, #2 <== NOT EXECUTED
a000c6ac: eaffffcf b a000c5f0 <pthread_mutex_init+0x60> <== NOT EXECUTED
break;
case PTHREAD_PRIO_PROTECT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
a000c6b0: e3a05003 mov r5, #3 <== NOT EXECUTED
break;
a000c6b4: eaffffcd b a000c5f0 <pthread_mutex_init+0x60> <== NOT EXECUTED
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
break;
default:
return EINVAL;
a000c6b8: e3a00016 mov r0, #22 <== NOT EXECUTED
*mutex = the_mutex->Object.id;
_Thread_Enable_dispatch();
return 0;
}
a000c6bc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
_Thread_Enable_dispatch();
a000c6c0: eb000ea8 bl a0010168 <_Thread_Enable_dispatch>
return EAGAIN;
a000c6c4: e3a0000b mov r0, #11
a000c6c8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000c750 <pthread_mutex_setprioceiling>:
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
a000c750: e92d41f0 push {r4, r5, r6, r7, r8, lr}
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
if ( !old_ceiling )
a000c754: e2526000 subs r6, r2, #0
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
a000c758: e24dd004 sub sp, sp, #4
a000c75c: e1a04000 mov r4, r0
a000c760: e1a05001 mov r5, r1
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
if ( !old_ceiling )
a000c764: 0a000003 beq a000c778 <pthread_mutex_setprioceiling+0x28>
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
a000c768: e1a00001 mov r0, r1
a000c76c: eb00007f bl a000c970 <_POSIX_Priority_Is_valid>
a000c770: e3500000 cmp r0, #0
a000c774: 1a000002 bne a000c784 <pthread_mutex_setprioceiling+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000c778: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000c77c: e28dd004 add sp, sp, #4
a000c780: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000c784: e59f7054 ldr r7, [pc, #84] ; a000c7e0 <pthread_mutex_setprioceiling+0x90>
/*
* Must acquire the mutex before we can change it's ceiling.
* POSIX says block until we acquire it.
*/
(void) pthread_mutex_lock( mutex );
a000c788: e1a00004 mov r0, r4
a000c78c: e5d78000 ldrb r8, [r7]
a000c790: ebffffd1 bl a000c6dc <pthread_mutex_lock>
* 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 );
a000c794: e1a00004 mov r0, r4
a000c798: e1a0100d mov r1, sp
a000c79c: ebffff32 bl a000c46c <_POSIX_Mutex_Get>
switch ( location ) {
a000c7a0: e59d4000 ldr r4, [sp]
a000c7a4: e3540000 cmp r4, #0
a000c7a8: 1afffff2 bne a000c778 <pthread_mutex_setprioceiling+0x28>
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
a000c7ac: e5903060 ldr r3, [r0, #96] ; 0x60
a000c7b0: e5d72000 ldrb r2, [r7]
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
a000c7b4: e0655008 rsb r5, r5, r8
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
/*
* We are required to unlock the mutex before we return.
*/
_CORE_mutex_Surrender(
a000c7b8: e5901008 ldr r1, [r0, #8]
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
a000c7bc: e0633002 rsb r3, r3, r2
*/
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
a000c7c0: e5863000 str r3, [r6]
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
/*
* We are required to unlock the mutex before we return.
*/
_CORE_mutex_Surrender(
a000c7c4: e1a02004 mov r2, r4
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
a000c7c8: e5805060 str r5, [r0, #96] ; 0x60
/*
* We are required to unlock the mutex before we return.
*/
_CORE_mutex_Surrender(
a000c7cc: e2800014 add r0, r0, #20
a000c7d0: eb000777 bl a000e5b4 <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
a000c7d4: eb000e63 bl a0010168 <_Thread_Enable_dispatch>
return 0;
a000c7d8: e1a00004 mov r0, r4
a000c7dc: eaffffe6 b a000c77c <pthread_mutex_setprioceiling+0x2c>
a000c7e4 <pthread_mutex_timedlock>:
*/
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
a000c7e4: e92d4030 push {r4, r5, lr}
a000c7e8: e24dd004 sub sp, sp, #4
a000c7ec: e1a05000 mov r5, r0
*
* 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 );
a000c7f0: e1a00001 mov r0, r1
a000c7f4: e1a0100d mov r1, sp
a000c7f8: eb00002e bl a000c8b8 <_POSIX_Absolute_timeout_to_ticks>
a000c7fc: e1a04000 mov r4, r0
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
a000c800: e3540003 cmp r4, #3
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
a000c804: e1a00005 mov r0, r5
* 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 );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
a000c808: 0a000006 beq a000c828 <pthread_mutex_timedlock+0x44>
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
a000c80c: e3a01000 mov r1, #0
a000c810: e59d2000 ldr r2, [sp]
a000c814: ebffffb3 bl a000c6e8 <_POSIX_Mutex_Lock_support>
* 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) ) {
a000c818: e3500010 cmp r0, #16
a000c81c: 0a000005 beq a000c838 <pthread_mutex_timedlock+0x54>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
a000c820: e28dd004 add sp, sp, #4
a000c824: e8bd8030 pop {r4, r5, pc}
*/
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 );
a000c828: e3a01001 mov r1, #1 <== NOT EXECUTED
a000c82c: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000c830: ebffffac bl a000c6e8 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED
a000c834: eafffff9 b a000c820 <pthread_mutex_timedlock+0x3c> <== 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 )
a000c838: e3540000 cmp r4, #0 <== NOT EXECUTED
return EINVAL;
a000c83c: 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 )
a000c840: 0afffff6 beq a000c820 <pthread_mutex_timedlock+0x3c> <== NOT EXECUTED
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a000c844: e2440001 sub r0, r4, #1 <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
a000c848: e3500001 cmp r0, #1 <== NOT EXECUTED
a000c84c: 83a00010 movhi r0, #16 <== NOT EXECUTED
a000c850: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED
a000c854: eafffff1 b a000c820 <pthread_mutex_timedlock+0x3c> <== NOT EXECUTED
a000c244 <pthread_mutexattr_destroy>:
*/
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
if ( !attr || !attr->is_initialized )
a000c244: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return EINVAL;
a000c248: 03a00016 moveq r0, #22 <== NOT EXECUTED
*/
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
if ( !attr || !attr->is_initialized )
a000c24c: 012fff1e bxeq lr <== NOT EXECUTED
a000c250: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000c254: e3520000 cmp r2, #0 <== NOT EXECUTED
return EINVAL;
attr->is_initialized = false;
a000c258: 13a00000 movne r0, #0 <== NOT EXECUTED
a000c25c: 15830000 strne r0, [r3] <== NOT EXECUTED
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a000c260: 03a00016 moveq r0, #22 <== NOT EXECUTED
attr->is_initialized = false;
return 0;
}
a000c264: e12fff1e bx lr <== NOT EXECUTED
a0009ee0 <pthread_mutexattr_gettype>:
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
if ( !attr )
a0009ee0: e3500000 cmp r0, #0
a0009ee4: 0a000002 beq a0009ef4 <pthread_mutexattr_gettype+0x14>
return EINVAL;
if ( !attr->is_initialized )
a0009ee8: e5903000 ldr r3, [r0]
a0009eec: e3530000 cmp r3, #0
a0009ef0: 1a000001 bne a0009efc <pthread_mutexattr_gettype+0x1c>
return EINVAL;
a0009ef4: e3a00016 mov r0, #22
a0009ef8: e12fff1e bx lr
if ( !type )
a0009efc: e3510000 cmp r1, #0
a0009f00: 0a000003 beq a0009f14 <pthread_mutexattr_gettype+0x34>
return EINVAL;
*type = attr->type;
a0009f04: e5903010 ldr r3, [r0, #16]
return 0;
a0009f08: e3a00000 mov r0, #0
return EINVAL;
if ( !type )
return EINVAL;
*type = attr->type;
a0009f0c: e5813000 str r3, [r1]
return 0;
a0009f10: e12fff1e bx lr
if ( !attr->is_initialized )
return EINVAL;
if ( !type )
return EINVAL;
a0009f14: e3a00016 mov r0, #22 <== NOT EXECUTED
*type = attr->type;
return 0;
}
a0009f18: e12fff1e bx lr <== NOT EXECUTED
a000c340 <pthread_mutexattr_setprioceiling>:
int pthread_mutexattr_setprioceiling(
pthread_mutexattr_t *attr,
int prioceiling
)
{
a000c340: e92d4010 push {r4, lr} <== NOT EXECUTED
if ( !attr || !attr->is_initialized )
a000c344: e2504000 subs r4, r0, #0 <== NOT EXECUTED
int pthread_mutexattr_setprioceiling(
pthread_mutexattr_t *attr,
int prioceiling
)
{
a000c348: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
if ( !attr || !attr->is_initialized )
a000c34c: 0a000002 beq a000c35c <pthread_mutexattr_setprioceiling+0x1c><== NOT EXECUTED
a000c350: e5943000 ldr r3, [r4] <== NOT EXECUTED
a000c354: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c358: 1a000002 bne a000c368 <pthread_mutexattr_setprioceiling+0x28><== NOT EXECUTED
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
return EINVAL;
a000c35c: e3a00016 mov r0, #22 <== NOT EXECUTED
attr->prio_ceiling = prioceiling;
return 0;
}
a000c360: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000c364: e8bd8010 pop {r4, pc} <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
a000c368: e1a00001 mov r0, r1 <== NOT EXECUTED
a000c36c: e58d1000 str r1, [sp] <== NOT EXECUTED
a000c370: eb00017e bl a000c970 <_POSIX_Priority_Is_valid> <== NOT EXECUTED
a000c374: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a000c378: e3500000 cmp r0, #0 <== NOT EXECUTED
return EINVAL;
attr->prio_ceiling = prioceiling;
return 0;
a000c37c: 13a00000 movne r0, #0 <== NOT EXECUTED
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
return EINVAL;
attr->prio_ceiling = prioceiling;
a000c380: 15841008 strne r1, [r4, #8] <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
a000c384: 0afffff4 beq a000c35c <pthread_mutexattr_setprioceiling+0x1c><== NOT EXECUTED
a000c388: eafffff4 b a000c360 <pthread_mutexattr_setprioceiling+0x20><== NOT EXECUTED
a000c38c <pthread_mutexattr_setprotocol>:
int pthread_mutexattr_setprotocol(
pthread_mutexattr_t *attr,
int protocol
)
{
if ( !attr || !attr->is_initialized )
a000c38c: e3500000 cmp r0, #0 <== NOT EXECUTED
a000c390: 0a000002 beq a000c3a0 <pthread_mutexattr_setprotocol+0x14> <== NOT EXECUTED
a000c394: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000c398: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c39c: 1a000001 bne a000c3a8 <pthread_mutexattr_setprotocol+0x1c> <== NOT EXECUTED
return EINVAL;
a000c3a0: e3a00016 mov r0, #22 <== NOT EXECUTED
a000c3a4: e12fff1e bx lr <== NOT EXECUTED
switch ( protocol ) {
a000c3a8: e3510002 cmp r1, #2 <== NOT EXECUTED
case PTHREAD_PRIO_NONE:
case PTHREAD_PRIO_INHERIT:
case PTHREAD_PRIO_PROTECT:
attr->protocol = protocol;
a000c3ac: 9580100c strls r1, [r0, #12] <== NOT EXECUTED
return 0;
a000c3b0: 93a00000 movls r0, #0 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( protocol ) {
a000c3b4: 912fff1e bxls lr <== NOT EXECUTED
case PTHREAD_PRIO_PROTECT:
attr->protocol = protocol;
return 0;
default:
return EINVAL;
a000c3b8: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a000c3bc: e12fff1e bx lr <== NOT EXECUTED
a000c3c0 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
a000c3c0: e3500000 cmp r0, #0 <== NOT EXECUTED
a000c3c4: 0a000002 beq a000c3d4 <pthread_mutexattr_setpshared+0x14> <== NOT EXECUTED
a000c3c8: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000c3cc: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c3d0: 1a000001 bne a000c3dc <pthread_mutexattr_setpshared+0x1c> <== NOT EXECUTED
return EINVAL;
a000c3d4: e3a00016 mov r0, #22 <== NOT EXECUTED
a000c3d8: e12fff1e bx lr <== NOT EXECUTED
switch ( pshared ) {
a000c3dc: e3510001 cmp r1, #1 <== NOT EXECUTED
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
a000c3e0: 95801004 strls r1, [r0, #4] <== NOT EXECUTED
return 0;
a000c3e4: 93a00000 movls r0, #0 <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
a000c3e8: 912fff1e bxls lr <== NOT EXECUTED
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
a000c3ec: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a000c3f0: e12fff1e bx lr <== NOT EXECUTED
a000aee4 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
a000aee4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
if ( !once_control || !init_routine )
a000aee8: e3500000 cmp r0, #0 <== NOT EXECUTED
a000aeec: 13510000 cmpne r1, #0 <== NOT EXECUTED
a000aef0: e1a04000 mov r4, r0 <== NOT EXECUTED
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
a000aef4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
if ( !once_control || !init_routine )
a000aef8: 13a00000 movne r0, #0 <== NOT EXECUTED
a000aefc: 03a00001 moveq r0, #1 <== NOT EXECUTED
a000af00: e1a05001 mov r5, r1 <== NOT EXECUTED
return EINVAL;
a000af04: 03a00016 moveq r0, #22 <== NOT EXECUTED
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
a000af08: 1a000001 bne a000af14 <pthread_once+0x30> <== NOT EXECUTED
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
a000af0c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000af10: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
)
{
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
a000af14: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
a000af18: e3530000 cmp r3, #0 <== NOT EXECUTED
a000af1c: 1afffffa bne a000af0c <pthread_once+0x28> <== NOT EXECUTED
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
a000af20: e3a00c01 mov r0, #256 ; 0x100 <== NOT EXECUTED
a000af24: e1a01000 mov r1, r0 <== NOT EXECUTED
a000af28: e1a0200d mov r2, sp <== NOT EXECUTED
a000af2c: eb0002fb bl a000bb20 <rtems_task_mode> <== NOT EXECUTED
if ( !once_control->init_executed ) {
a000af30: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
a000af34: e3530000 cmp r3, #0 <== NOT EXECUTED
a000af38: 0a000005 beq a000af54 <pthread_once+0x70> <== NOT EXECUTED
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
a000af3c: e59d0000 ldr r0, [sp] <== NOT EXECUTED
a000af40: e3a01c01 mov r1, #256 ; 0x100 <== NOT EXECUTED
a000af44: e1a0200d mov r2, sp <== NOT EXECUTED
a000af48: eb0002f4 bl a000bb20 <rtems_task_mode> <== NOT EXECUTED
}
return 0;
a000af4c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000af50: eaffffed b a000af0c <pthread_once+0x28> <== 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;
a000af54: e3a03001 mov r3, #1 <== NOT EXECUTED
a000af58: e5843000 str r3, [r4] <== NOT EXECUTED
once_control->init_executed = true;
a000af5c: e5843004 str r3, [r4, #4] <== NOT EXECUTED
(*init_routine)();
a000af60: e12fff35 blx r5 <== NOT EXECUTED
a000af64: eafffff4 b a000af3c <pthread_once+0x58> <== NOT EXECUTED
a000b838 <pthread_rwlock_destroy>:
* source of the error.
*/
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
{
a000b838: e92d4030 push {r4, r5, lr}
POSIX_RWLock_Control *the_rwlock = NULL;
Objects_Locations location;
if ( !rwlock )
a000b83c: e2503000 subs r3, r0, #0
* source of the error.
*/
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
{
a000b840: e24dd004 sub sp, sp, #4
POSIX_RWLock_Control *the_rwlock = NULL;
Objects_Locations location;
if ( !rwlock )
a000b844: 0a00000e beq a000b884 <pthread_rwlock_destroy+0x4c>
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get (
pthread_rwlock_t *RWLock,
Objects_Locations *location
)
{
return (POSIX_RWLock_Control *) _Objects_Get(
a000b848: e5931000 ldr r1, [r3]
a000b84c: e59f0060 ldr r0, [pc, #96] ; a000b8b4 <pthread_rwlock_destroy+0x7c>
a000b850: e1a0200d mov r2, sp
a000b854: eb000b87 bl a000e678 <_Objects_Get>
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000b858: e59d3000 ldr r3, [sp]
a000b85c: e1a04000 mov r4, r0
a000b860: e3530000 cmp r3, #0
a000b864: 1a000006 bne a000b884 <pthread_rwlock_destroy+0x4c>
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 ) {
a000b868: e2800010 add r0, r0, #16
a000b86c: eb001149 bl a000fd98 <_Thread_queue_First>
a000b870: e2505000 subs r5, r0, #0
a000b874: 0a000005 beq a000b890 <pthread_rwlock_destroy+0x58>
_Thread_Enable_dispatch();
a000b878: eb000f2c bl a000f530 <_Thread_Enable_dispatch> <== NOT EXECUTED
return EBUSY;
a000b87c: e3a00010 mov r0, #16 <== NOT EXECUTED
a000b880: ea000000 b a000b888 <pthread_rwlock_destroy+0x50> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000b884: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000b888: e28dd004 add sp, sp, #4
a000b88c: e8bd8030 pop {r4, r5, pc}
/*
* POSIX doesn't require behavior when it is locked.
*/
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
a000b890: e59f001c ldr r0, [pc, #28] ; a000b8b4 <pthread_rwlock_destroy+0x7c>
a000b894: e1a01004 mov r1, r4
a000b898: eb000a62 bl a000e228 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free (
POSIX_RWLock_Control *the_RWLock
)
{
_Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object );
a000b89c: e59f0010 ldr r0, [pc, #16] ; a000b8b4 <pthread_rwlock_destroy+0x7c>
a000b8a0: e1a01004 mov r1, r4
a000b8a4: eb000b1a bl a000e514 <_Objects_Free>
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
a000b8a8: eb000f20 bl a000f530 <_Thread_Enable_dispatch>
return 0;
a000b8ac: e1a00005 mov r0, r5
a000b8b0: eafffff4 b a000b888 <pthread_rwlock_destroy+0x50>
a000ad24 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
a000ad24: e92d40f0 push {r4, r5, r6, r7, lr}
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
a000ad28: e2504000 subs r4, r0, #0
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
a000ad2c: e24dd00c sub sp, sp, #12
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
a000ad30: 0a000004 beq a000ad48 <pthread_rwlock_init+0x24>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
a000ad34: e3510000 cmp r1, #0
a000ad38: 0a00001e beq a000adb8 <pthread_rwlock_init+0x94>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
a000ad3c: e5913000 ldr r3, [r1]
a000ad40: e3530000 cmp r3, #0
a000ad44: 1a000002 bne a000ad54 <pthread_rwlock_init+0x30>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
a000ad48: e3a00016 mov r0, #22 <== NOT EXECUTED
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
a000ad4c: e28dd00c add sp, sp, #12
a000ad50: e8bd80f0 pop {r4, r5, r6, r7, pc}
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
return EINVAL;
switch ( the_attr->process_shared ) {
a000ad54: e5915004 ldr r5, [r1, #4]
a000ad58: e3550000 cmp r5, #0
a000ad5c: 1afffff9 bne a000ad48 <pthread_rwlock_init+0x24>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000ad60: e59f306c ldr r3, [pc, #108] ; a000add4 <pthread_rwlock_init+0xb0>
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
a000ad64: e58d5008 str r5, [sp, #8]
a000ad68: e5932000 ldr r2, [r3]
++level;
a000ad6c: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000ad70: e5832000 str r2, [r3]
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
a000ad74: e59f705c ldr r7, [pc, #92] ; a000add8 <pthread_rwlock_init+0xb4>
a000ad78: e1a00007 mov r0, r7
a000ad7c: eb000aa1 bl a000d808 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
a000ad80: e2506000 subs r6, r0, #0
a000ad84: 0a00000f beq a000adc8 <pthread_rwlock_init+0xa4>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
a000ad88: e2860010 add r0, r6, #16
a000ad8c: e28d1008 add r1, sp, #8
a000ad90: eb000901 bl a000d19c <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000ad94: e5963008 ldr r3, [r6, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000ad98: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a000ad9c: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000ada0: e7826721 str r6, [r2, r1, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a000ada4: e586500c str r5, [r6, #12]
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
a000ada8: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
a000adac: eb000fb2 bl a000ec7c <_Thread_Enable_dispatch>
return 0;
a000adb0: e1a00005 mov r0, r5
a000adb4: eaffffe4 b a000ad4c <pthread_rwlock_init+0x28>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
a000adb8: e1a0000d mov r0, sp <== NOT EXECUTED
a000adbc: eb0001ad bl a000b478 <pthread_rwlockattr_init> <== NOT EXECUTED
the_attr = &default_attr;
a000adc0: e1a0100d mov r1, sp <== NOT EXECUTED
a000adc4: eaffffdc b a000ad3c <pthread_rwlock_init+0x18> <== NOT EXECUTED
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
a000adc8: eb000fab bl a000ec7c <_Thread_Enable_dispatch> <== NOT EXECUTED
return EAGAIN;
a000adcc: e3a0000b mov r0, #11 <== NOT EXECUTED
a000add0: eaffffdd b a000ad4c <pthread_rwlock_init+0x28> <== NOT EXECUTED
a000b970 <pthread_rwlock_rdlock>:
*/
int pthread_rwlock_rdlock(
pthread_rwlock_t *rwlock
)
{
a000b970: e92d4010 push {r4, lr}
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000b974: e2504000 subs r4, r0, #0
*/
int pthread_rwlock_rdlock(
pthread_rwlock_t *rwlock
)
{
a000b978: e24dd008 sub sp, sp, #8
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000b97c: 0a000006 beq a000b99c <pthread_rwlock_rdlock+0x2c>
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get (
pthread_rwlock_t *RWLock,
Objects_Locations *location
)
{
return (POSIX_RWLock_Control *) _Objects_Get(
a000b980: e59f0050 ldr r0, [pc, #80] ; a000b9d8 <pthread_rwlock_rdlock+0x68>
a000b984: e5941000 ldr r1, [r4]
a000b988: e28d2004 add r2, sp, #4
a000b98c: eb000b39 bl a000e678 <_Objects_Get>
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000b990: e59dc004 ldr ip, [sp, #4]
a000b994: e35c0000 cmp ip, #0
a000b998: 0a000002 beq a000b9a8 <pthread_rwlock_rdlock+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000b99c: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000b9a0: e28dd008 add sp, sp, #8
a000b9a4: e8bd8010 pop {r4, pc}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
a000b9a8: e5941000 ldr r1, [r4]
a000b9ac: e1a0300c mov r3, ip
a000b9b0: e2800010 add r0, r0, #16
a000b9b4: e3a02001 mov r2, #1
a000b9b8: e58dc000 str ip, [sp]
a000b9bc: eb0007b1 bl a000d888 <_CORE_RWLock_Obtain_for_reading>
true, /* we are willing to wait forever */
0,
NULL
);
_Thread_Enable_dispatch();
a000b9c0: eb000eda bl a000f530 <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
a000b9c4: e59f3010 ldr r3, [pc, #16] ; a000b9dc <pthread_rwlock_rdlock+0x6c>
a000b9c8: e5933008 ldr r3, [r3, #8]
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000b9cc: e5930034 ldr r0, [r3, #52] ; 0x34
a000b9d0: eb000060 bl a000bb58 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a000b9d4: eafffff1 b a000b9a0 <pthread_rwlock_rdlock+0x30>
a000b9e0 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a000b9e0: e92d4030 push {r4, r5, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a000b9e4: e2505000 subs r5, r0, #0
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a000b9e8: e24dd00c sub sp, sp, #12
a000b9ec: e1a00001 mov r0, r1
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a000b9f0: 0a00001c beq a000ba68 <pthread_rwlock_timedrdlock+0x88>
*
* 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 );
a000b9f4: e28d1008 add r1, sp, #8
a000b9f8: eb0019cd bl a0012134 <_POSIX_Absolute_timeout_to_ticks>
a000b9fc: e5951000 ldr r1, [r5]
a000ba00: e1a04000 mov r4, r0
a000ba04: e28d2004 add r2, sp, #4
a000ba08: e59f0084 ldr r0, [pc, #132] ; a000ba94 <pthread_rwlock_timedrdlock+0xb4>
a000ba0c: eb000b19 bl a000e678 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000ba10: e59dc004 ldr ip, [sp, #4]
a000ba14: e35c0000 cmp ip, #0
a000ba18: 1a000012 bne a000ba68 <pthread_rwlock_timedrdlock+0x88>
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,
a000ba1c: e2443003 sub r3, r4, #3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
a000ba20: e5951000 ldr r1, [r5]
a000ba24: e2735000 rsbs r5, r3, #0
a000ba28: e0a55003 adc r5, r5, r3
a000ba2c: e2800010 add r0, r0, #16
a000ba30: e59d3008 ldr r3, [sp, #8]
a000ba34: e1a02005 mov r2, r5
a000ba38: e58dc000 str ip, [sp]
a000ba3c: eb000791 bl a000d888 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
a000ba40: eb000eba bl a000f530 <_Thread_Enable_dispatch>
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
a000ba44: e59f304c ldr r3, [pc, #76] ; a000ba98 <pthread_rwlock_timedrdlock+0xb8>
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
a000ba48: e3550000 cmp r5, #0
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
a000ba4c: e5933008 ldr r3, [r3, #8]
a000ba50: e5930034 ldr r0, [r3, #52] ; 0x34
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
a000ba54: 1a000001 bne a000ba60 <pthread_rwlock_timedrdlock+0x80>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
a000ba58: e3500002 cmp r0, #2
a000ba5c: 0a000004 beq a000ba74 <pthread_rwlock_timedrdlock+0x94>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000ba60: eb00003c bl a000bb58 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a000ba64: ea000000 b a000ba6c <pthread_rwlock_timedrdlock+0x8c>
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
a000ba68: e3a00016 mov r0, #22 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a000ba6c: e28dd00c add sp, sp, #12
a000ba70: e8bd8030 pop {r4, r5, pc}
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
a000ba74: e3540000 cmp r4, #0 <== NOT EXECUTED
a000ba78: 0afffffa beq a000ba68 <pthread_rwlock_timedrdlock+0x88> <== NOT EXECUTED
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a000ba7c: e2444001 sub r4, r4, #1 <== NOT EXECUTED
a000ba80: e3540001 cmp r4, #1 <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
a000ba84: 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 ||
a000ba88: 9afffff7 bls a000ba6c <pthread_rwlock_timedrdlock+0x8c> <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000ba8c: eb000031 bl a000bb58 <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000ba90: eafffff5 b a000ba6c <pthread_rwlock_timedrdlock+0x8c> <== NOT EXECUTED
a000ba9c <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a000ba9c: e92d4030 push {r4, r5, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a000baa0: e2505000 subs r5, r0, #0
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
a000baa4: e24dd00c sub sp, sp, #12
a000baa8: e1a00001 mov r0, r1
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
a000baac: 0a00001c beq a000bb24 <pthread_rwlock_timedwrlock+0x88>
*
* 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 );
a000bab0: e28d1008 add r1, sp, #8
a000bab4: eb00199e bl a0012134 <_POSIX_Absolute_timeout_to_ticks>
a000bab8: e5951000 ldr r1, [r5]
a000babc: e1a04000 mov r4, r0
a000bac0: e28d2004 add r2, sp, #4
a000bac4: e59f0084 ldr r0, [pc, #132] ; a000bb50 <pthread_rwlock_timedwrlock+0xb4>
a000bac8: eb000aea bl a000e678 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000bacc: e59dc004 ldr ip, [sp, #4]
a000bad0: e35c0000 cmp ip, #0
a000bad4: 1a000012 bne a000bb24 <pthread_rwlock_timedwrlock+0x88>
(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,
a000bad8: e2443003 sub r3, r4, #3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
a000badc: e5951000 ldr r1, [r5]
a000bae0: e2735000 rsbs r5, r3, #0
a000bae4: e0a55003 adc r5, r5, r3
a000bae8: e2800010 add r0, r0, #16
a000baec: e59d3008 ldr r3, [sp, #8]
a000baf0: e1a02005 mov r2, r5
a000baf4: e58dc000 str ip, [sp]
a000baf8: eb000795 bl a000d954 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
a000bafc: eb000e8b bl a000f530 <_Thread_Enable_dispatch>
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
a000bb00: e59f304c ldr r3, [pc, #76] ; a000bb54 <pthread_rwlock_timedwrlock+0xb8>
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
a000bb04: e3550000 cmp r5, #0
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
a000bb08: e5933008 ldr r3, [r3, #8]
a000bb0c: e5930034 ldr r0, [r3, #52] ; 0x34
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
a000bb10: 1a000001 bne a000bb1c <pthread_rwlock_timedwrlock+0x80>
a000bb14: e3500002 cmp r0, #2
a000bb18: 0a000004 beq a000bb30 <pthread_rwlock_timedwrlock+0x94>
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000bb1c: eb00000d bl a000bb58 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a000bb20: ea000000 b a000bb28 <pthread_rwlock_timedwrlock+0x8c>
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
a000bb24: e3a00016 mov r0, #22 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
a000bb28: e28dd00c add sp, sp, #12
a000bb2c: e8bd8030 pop {r4, r5, pc}
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
a000bb30: e3540000 cmp r4, #0 <== NOT EXECUTED
a000bb34: 0afffffa beq a000bb24 <pthread_rwlock_timedwrlock+0x88> <== NOT EXECUTED
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
a000bb38: e2444001 sub r4, r4, #1 <== NOT EXECUTED
a000bb3c: e3540001 cmp r4, #1 <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
a000bb40: 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 ||
a000bb44: 9afffff7 bls a000bb28 <pthread_rwlock_timedwrlock+0x8c> <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000bb48: eb000002 bl a000bb58 <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED
a000bb4c: eafffff5 b a000bb28 <pthread_rwlock_timedwrlock+0x8c> <== NOT EXECUTED
a000bb68 <pthread_rwlock_tryrdlock>:
*/
int pthread_rwlock_tryrdlock(
pthread_rwlock_t *rwlock
)
{
a000bb68: e92d4010 push {r4, lr}
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000bb6c: e2504000 subs r4, r0, #0
*/
int pthread_rwlock_tryrdlock(
pthread_rwlock_t *rwlock
)
{
a000bb70: e24dd008 sub sp, sp, #8
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000bb74: 0a000006 beq a000bb94 <pthread_rwlock_tryrdlock+0x2c>
a000bb78: e59f0050 ldr r0, [pc, #80] ; a000bbd0 <pthread_rwlock_tryrdlock+0x68>
a000bb7c: e5941000 ldr r1, [r4]
a000bb80: e28d2004 add r2, sp, #4
a000bb84: eb000abb bl a000e678 <_Objects_Get>
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000bb88: e59dc004 ldr ip, [sp, #4]
a000bb8c: e35c0000 cmp ip, #0
a000bb90: 0a000002 beq a000bba0 <pthread_rwlock_tryrdlock+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000bb94: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000bb98: e28dd008 add sp, sp, #8
a000bb9c: e8bd8010 pop {r4, pc}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
a000bba0: e5941000 ldr r1, [r4]
a000bba4: e1a0300c mov r3, ip
a000bba8: e1a0200c mov r2, ip
a000bbac: e2800010 add r0, r0, #16
a000bbb0: e58dc000 str ip, [sp]
a000bbb4: eb000733 bl a000d888 <_CORE_RWLock_Obtain_for_reading>
0,
NULL
);
_Thread_Enable_dispatch();
a000bbb8: eb000e5c bl a000f530 <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
a000bbbc: e59f3010 ldr r3, [pc, #16] ; a000bbd4 <pthread_rwlock_tryrdlock+0x6c>
a000bbc0: e5933008 ldr r3, [r3, #8]
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000bbc4: e5930034 ldr r0, [r3, #52] ; 0x34
a000bbc8: ebffffe2 bl a000bb58 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a000bbcc: eafffff1 b a000bb98 <pthread_rwlock_tryrdlock+0x30>
a000bbd8 <pthread_rwlock_trywrlock>:
*/
int pthread_rwlock_trywrlock(
pthread_rwlock_t *rwlock
)
{
a000bbd8: e92d4010 push {r4, lr}
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000bbdc: e2504000 subs r4, r0, #0
*/
int pthread_rwlock_trywrlock(
pthread_rwlock_t *rwlock
)
{
a000bbe0: e24dd008 sub sp, sp, #8
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000bbe4: 0a000006 beq a000bc04 <pthread_rwlock_trywrlock+0x2c>
a000bbe8: e59f0050 ldr r0, [pc, #80] ; a000bc40 <pthread_rwlock_trywrlock+0x68>
a000bbec: e5941000 ldr r1, [r4]
a000bbf0: e28d2004 add r2, sp, #4
a000bbf4: eb000a9f bl a000e678 <_Objects_Get>
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000bbf8: e59dc004 ldr ip, [sp, #4]
a000bbfc: e35c0000 cmp ip, #0
a000bc00: 0a000002 beq a000bc10 <pthread_rwlock_trywrlock+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000bc04: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000bc08: e28dd008 add sp, sp, #8
a000bc0c: e8bd8010 pop {r4, pc}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
a000bc10: e5941000 ldr r1, [r4]
a000bc14: e1a0300c mov r3, ip
a000bc18: e1a0200c mov r2, ip
a000bc1c: e2800010 add r0, r0, #16
a000bc20: e58dc000 str ip, [sp]
a000bc24: eb00074a bl a000d954 <_CORE_RWLock_Obtain_for_writing>
false, /* we are not willing to wait */
0,
NULL
);
_Thread_Enable_dispatch();
a000bc28: eb000e40 bl a000f530 <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
a000bc2c: e59f3010 ldr r3, [pc, #16] ; a000bc44 <pthread_rwlock_trywrlock+0x6c>
a000bc30: e5933008 ldr r3, [r3, #8]
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000bc34: e5930034 ldr r0, [r3, #52] ; 0x34
a000bc38: ebffffc6 bl a000bb58 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a000bc3c: eafffff1 b a000bc08 <pthread_rwlock_trywrlock+0x30>
a000bc48 <pthread_rwlock_unlock>:
*/
int pthread_rwlock_unlock(
pthread_rwlock_t *rwlock
)
{
a000bc48: e92d4010 push {r4, lr}
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
CORE_RWLock_Status status;
if ( !rwlock )
a000bc4c: e2503000 subs r3, r0, #0
*/
int pthread_rwlock_unlock(
pthread_rwlock_t *rwlock
)
{
a000bc50: e24dd004 sub sp, sp, #4
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
CORE_RWLock_Status status;
if ( !rwlock )
a000bc54: 0a000006 beq a000bc74 <pthread_rwlock_unlock+0x2c>
a000bc58: e5931000 ldr r1, [r3]
a000bc5c: e59f0038 ldr r0, [pc, #56] ; a000bc9c <pthread_rwlock_unlock+0x54>
a000bc60: e1a0200d mov r2, sp
a000bc64: eb000a83 bl a000e678 <_Objects_Get>
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000bc68: e59d3000 ldr r3, [sp]
a000bc6c: e3530000 cmp r3, #0
a000bc70: 0a000002 beq a000bc80 <pthread_rwlock_unlock+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000bc74: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000bc78: e28dd004 add sp, sp, #4
a000bc7c: e8bd8010 pop {r4, pc}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_RWLock_Release( &the_rwlock->RWLock );
a000bc80: e2800010 add r0, r0, #16
a000bc84: eb000757 bl a000d9e8 <_CORE_RWLock_Release>
a000bc88: e1a04000 mov r4, r0
_Thread_Enable_dispatch();
a000bc8c: eb000e27 bl a000f530 <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code( status );
a000bc90: e1a00004 mov r0, r4
a000bc94: ebffffaf bl a000bb58 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a000bc98: eafffff6 b a000bc78 <pthread_rwlock_unlock+0x30>
a000bca0 <pthread_rwlock_wrlock>:
*/
int pthread_rwlock_wrlock(
pthread_rwlock_t *rwlock
)
{
a000bca0: e92d4010 push {r4, lr}
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000bca4: e2504000 subs r4, r0, #0
*/
int pthread_rwlock_wrlock(
pthread_rwlock_t *rwlock
)
{
a000bca8: e24dd008 sub sp, sp, #8
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
a000bcac: 0a000006 beq a000bccc <pthread_rwlock_wrlock+0x2c>
a000bcb0: e59f0050 ldr r0, [pc, #80] ; a000bd08 <pthread_rwlock_wrlock+0x68>
a000bcb4: e5941000 ldr r1, [r4]
a000bcb8: e28d2004 add r2, sp, #4
a000bcbc: eb000a6d bl a000e678 <_Objects_Get>
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
a000bcc0: e59dc004 ldr ip, [sp, #4]
a000bcc4: e35c0000 cmp ip, #0
a000bcc8: 0a000002 beq a000bcd8 <pthread_rwlock_wrlock+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000bccc: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000bcd0: e28dd008 add sp, sp, #8
a000bcd4: e8bd8010 pop {r4, pc}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
a000bcd8: e5941000 ldr r1, [r4]
a000bcdc: e1a0300c mov r3, ip
a000bce0: e2800010 add r0, r0, #16
a000bce4: e3a02001 mov r2, #1
a000bce8: e58dc000 str ip, [sp]
a000bcec: eb000718 bl a000d954 <_CORE_RWLock_Obtain_for_writing>
true, /* do not timeout -- wait forever */
0,
NULL
);
_Thread_Enable_dispatch();
a000bcf0: eb000e0e bl a000f530 <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
a000bcf4: e59f3010 ldr r3, [pc, #16] ; a000bd0c <pthread_rwlock_wrlock+0x6c>
a000bcf8: e5933008 ldr r3, [r3, #8]
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
a000bcfc: e5930034 ldr r0, [r3, #52] ; 0x34
a000bd00: ebffff94 bl a000bb58 <_POSIX_RWLock_Translate_core_RWLock_return_code>
a000bd04: eafffff1 b a000bcd0 <pthread_rwlock_wrlock+0x30>
a000c2b0 <pthread_rwlockattr_destroy>:
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
a000c2b0: e2503000 subs r3, r0, #0
return EINVAL;
a000c2b4: 03a00016 moveq r0, #22
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
a000c2b8: 012fff1e bxeq lr
a000c2bc: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000c2c0: e3520000 cmp r2, #0 <== NOT EXECUTED
return EINVAL;
attr->is_initialized = false;
a000c2c4: 13a00000 movne r0, #0 <== NOT EXECUTED
a000c2c8: 15830000 strne r0, [r3] <== NOT EXECUTED
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
a000c2cc: 03a00016 moveq r0, #22 <== NOT EXECUTED
attr->is_initialized = false;
return 0;
}
a000c2d0: e12fff1e bx lr <== NOT EXECUTED
a000c2d4 <pthread_rwlockattr_getpshared>:
int pthread_rwlockattr_getpshared(
const pthread_rwlockattr_t *attr,
int *pshared
)
{
if ( !attr )
a000c2d4: e3500000 cmp r0, #0
return EINVAL;
a000c2d8: 03a00016 moveq r0, #22
int pthread_rwlockattr_getpshared(
const pthread_rwlockattr_t *attr,
int *pshared
)
{
if ( !attr )
a000c2dc: 012fff1e bxeq lr
return EINVAL;
if ( !attr->is_initialized )
a000c2e0: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000c2e4: e3530000 cmp r3, #0 <== NOT EXECUTED
return EINVAL;
*pshared = attr->process_shared;
a000c2e8: 15903004 ldrne r3, [r0, #4] <== NOT EXECUTED
{
if ( !attr )
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
a000c2ec: 03a00016 moveq r0, #22 <== NOT EXECUTED
*pshared = attr->process_shared;
return 0;
a000c2f0: 13a00000 movne r0, #0 <== NOT EXECUTED
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
*pshared = attr->process_shared;
a000c2f4: 15813000 strne r3, [r1] <== NOT EXECUTED
return 0;
}
a000c2f8: e12fff1e bx lr <== NOT EXECUTED
a000c318 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
a000c318: e3500000 cmp r0, #0
a000c31c: 0a000002 beq a000c32c <pthread_rwlockattr_setpshared+0x14>
return EINVAL;
if ( !attr->is_initialized )
a000c320: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000c324: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c328: 1a000001 bne a000c334 <pthread_rwlockattr_setpshared+0x1c> <== NOT EXECUTED
return EINVAL;
a000c32c: e3a00016 mov r0, #22
a000c330: e12fff1e bx lr
switch ( pshared ) {
a000c334: e3510001 cmp r1, #1 <== NOT EXECUTED
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
a000c338: 95801004 strls r1, [r0, #4] <== NOT EXECUTED
return 0;
a000c33c: 93a00000 movls r0, #0 <== NOT EXECUTED
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
a000c340: 912fff1e bxls lr <== NOT EXECUTED
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
a000c344: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
a000c348: e12fff1e bx lr <== NOT EXECUTED
a000a158 <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() )
a000a158: e59f306c ldr r3, [pc, #108] ; a000a1cc <pthread_setcancelstate+0x74>
int pthread_setcancelstate(
int state,
int *oldstate
)
{
a000a15c: 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() )
a000a160: e5934000 ldr r4, [r3]
int pthread_setcancelstate(
int state,
int *oldstate
)
{
a000a164: 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() )
a000a168: e3540000 cmp r4, #0
a000a16c: 0a000001 beq a000a178 <pthread_setcancelstate+0x20>
return EPROTO;
a000a170: e3a00047 mov r0, #71 ; 0x47 <== NOT EXECUTED
a000a174: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( !oldstate )
a000a178: e3510000 cmp r1, #0
a000a17c: 0a000003 beq a000a190 <pthread_setcancelstate+0x38>
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
a000a180: e3500001 cmp r0, #1
a000a184: 9a000003 bls a000a198 <pthread_setcancelstate+0x40>
return EINVAL;
a000a188: e3a00016 mov r0, #22
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
a000a18c: e8bd8010 pop {r4, pc}
if ( _ISR_Is_in_progress() )
return EPROTO;
if ( !oldstate )
return EINVAL;
a000a190: e3a00016 mov r0, #22
a000a194: e8bd8010 pop {r4, pc}
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000a198: e59f0030 ldr r0, [pc, #48] ; a000a1d0 <pthread_setcancelstate+0x78>
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a000a19c: e593c008 ldr ip, [r3, #8]
a000a1a0: e590e000 ldr lr, [r0]
a000a1a4: e59cc0f4 ldr ip, [ip, #244] ; 0xf4
++level;
a000a1a8: e28ee001 add lr, lr, #1
_Thread_Dispatch_disable_level = level;
a000a1ac: e580e000 str lr, [r0]
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
a000a1b0: e59ce0d8 ldr lr, [ip, #216] ; 0xd8
thread_support->cancelability_state = state;
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
a000a1b4: e5930008 ldr r0, [r3, #8]
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
a000a1b8: e581e000 str lr, [r1]
thread_support->cancelability_state = state;
a000a1bc: e58c20d8 str r2, [ip, #216] ; 0xd8
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
a000a1c0: eb0015c8 bl a000f8e8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
a000a1c4: e1a00004 mov r0, r4
a000a1c8: e8bd8010 pop {r4, pc}
a000a1d4 <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() )
a000a1d4: e59f306c ldr r3, [pc, #108] ; a000a248 <pthread_setcanceltype+0x74>
int pthread_setcanceltype(
int type,
int *oldtype
)
{
a000a1d8: 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() )
a000a1dc: e5934000 ldr r4, [r3]
int pthread_setcanceltype(
int type,
int *oldtype
)
{
a000a1e0: 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() )
a000a1e4: e3540000 cmp r4, #0
a000a1e8: 0a000001 beq a000a1f4 <pthread_setcanceltype+0x20>
return EPROTO;
a000a1ec: e3a00047 mov r0, #71 ; 0x47 <== NOT EXECUTED
a000a1f0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( !oldtype )
a000a1f4: e3510000 cmp r1, #0
a000a1f8: 0a000003 beq a000a20c <pthread_setcanceltype+0x38>
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
a000a1fc: e3500001 cmp r0, #1
a000a200: 9a000003 bls a000a214 <pthread_setcanceltype+0x40>
return EINVAL;
a000a204: e3a00016 mov r0, #22
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
a000a208: e8bd8010 pop {r4, pc}
if ( _ISR_Is_in_progress() )
return EPROTO;
if ( !oldtype )
return EINVAL;
a000a20c: e3a00016 mov r0, #22
a000a210: e8bd8010 pop {r4, pc}
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000a214: e59f0030 ldr r0, [pc, #48] ; a000a24c <pthread_setcanceltype+0x78>
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a000a218: e593c008 ldr ip, [r3, #8]
a000a21c: e590e000 ldr lr, [r0]
a000a220: e59cc0f4 ldr ip, [ip, #244] ; 0xf4
++level;
a000a224: e28ee001 add lr, lr, #1
_Thread_Dispatch_disable_level = level;
a000a228: e580e000 str lr, [r0]
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
a000a22c: e59ce0dc ldr lr, [ip, #220] ; 0xdc
thread_support->cancelability_type = type;
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
a000a230: e5930008 ldr r0, [r3, #8]
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
a000a234: e581e000 str lr, [r1]
thread_support->cancelability_type = type;
a000a238: e58c20dc str r2, [ip, #220] ; 0xdc
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
a000a23c: eb0015a9 bl a000f8e8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
a000a240: e1a00004 mov r0, r4
a000a244: e8bd8010 pop {r4, pc}
a000d10c <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
a000d10c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
int rc;
/*
* Check all the parameters
*/
if ( !param )
a000d110: e2526000 subs r6, r2, #0
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
a000d114: e24dd00c sub sp, sp, #12
a000d118: e1a07000 mov r7, r0
a000d11c: e1a05001 mov r5, r1
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
a000d120: 03a04016 moveq r4, #22
int rc;
/*
* Check all the parameters
*/
if ( !param )
a000d124: 0a000006 beq a000d144 <pthread_setschedparam+0x38>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
a000d128: e1a00001 mov r0, r1
a000d12c: e1a0200d mov r2, sp
a000d130: e1a01006 mov r1, r6
a000d134: e28d3004 add r3, sp, #4
a000d138: eb00179a bl a0012fa8 <_POSIX_Thread_Translate_sched_param>
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
a000d13c: e2504000 subs r4, r0, #0
a000d140: 0a000002 beq a000d150 <pthread_setschedparam+0x44>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
a000d144: e1a00004 mov r0, r4
a000d148: e28dd00c add sp, sp, #12
a000d14c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
a000d150: e1a00007 mov r0, r7
a000d154: e28d1008 add r1, sp, #8
a000d158: eb000c0a bl a0010188 <_Thread_Get>
switch ( location ) {
a000d15c: e59d3008 ldr r3, [sp, #8]
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
a000d160: e1a07000 mov r7, r0
switch ( location ) {
a000d164: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
a000d168: 13a04003 movne r4, #3
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
switch ( location ) {
a000d16c: 1afffff4 bne a000d144 <pthread_setschedparam+0x38>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000d170: e59080f4 ldr r8, [r0, #244] ; 0xf4
if ( api->schedpolicy == SCHED_SPORADIC )
a000d174: e5983084 ldr r3, [r8, #132] ; 0x84
a000d178: e3530004 cmp r3, #4
a000d17c: 0a000025 beq a000d218 <pthread_setschedparam+0x10c>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
a000d180: e5885084 str r5, [r8, #132] ; 0x84
api->schedparam = *param;
a000d184: e288c088 add ip, r8, #136 ; 0x88
a000d188: e8b6000f ldm r6!, {r0, r1, r2, r3}
a000d18c: e8ac000f stmia ip!, {r0, r1, r2, r3}
the_thread->budget_algorithm = budget_algorithm;
a000d190: e59d3000 ldr r3, [sp]
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
a000d194: e8960007 ldm r6, {r0, r1, r2}
a000d198: e88c0007 stm ip, {r0, r1, r2}
the_thread->budget_algorithm = budget_algorithm;
a000d19c: e5873078 str r3, [r7, #120] ; 0x78
the_thread->budget_callout = budget_callout;
a000d1a0: e59d3004 ldr r3, [sp, #4]
switch ( api->schedpolicy ) {
a000d1a4: 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;
a000d1a8: e587307c str r3, [r7, #124] ; 0x7c
switch ( api->schedpolicy ) {
a000d1ac: ba00000a blt a000d1dc <pthread_setschedparam+0xd0>
a000d1b0: e3550002 cmp r5, #2
a000d1b4: da00000a ble a000d1e4 <pthread_setschedparam+0xd8>
a000d1b8: e3550004 cmp r5, #4
a000d1bc: 1a000006 bne a000d1dc <pthread_setschedparam+0xd0>
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
a000d1c0: e5983088 ldr r3, [r8, #136] ; 0x88
_Watchdog_Remove( &api->Sporadic_timer );
a000d1c4: e28800a8 add r0, r8, #168 ; 0xa8
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
a000d1c8: e58830a4 str r3, [r8, #164] ; 0xa4
_Watchdog_Remove( &api->Sporadic_timer );
a000d1cc: eb000feb bl a0011180 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
a000d1d0: e3a00000 mov r0, #0
a000d1d4: e1a01007 mov r1, r7
a000d1d8: ebffff7f bl a000cfdc <_POSIX_Threads_Sporadic_budget_TSR>
break;
}
_Thread_Enable_dispatch();
a000d1dc: eb000be1 bl a0010168 <_Thread_Enable_dispatch>
return 0;
a000d1e0: eaffffd7 b a000d144 <pthread_setschedparam+0x38>
a000d1e4: e59f3038 ldr r3, [pc, #56] ; a000d224 <pthread_setschedparam+0x118>
a000d1e8: e5982088 ldr r2, [r8, #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(
a000d1ec: e1a00007 mov r0, r7
a000d1f0: 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;
a000d1f4: e59f302c ldr r3, [pc, #44] ; a000d228 <pthread_setschedparam+0x11c>
a000d1f8: e0621001 rsb r1, r2, r1
a000d1fc: e5933000 ldr r3, [r3]
the_thread->real_priority =
a000d200: e5871018 str r1, [r7, #24]
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
a000d204: 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;
a000d208: e5873074 str r3, [r7, #116] ; 0x74
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
a000d20c: eb000aa2 bl a000fc9c <_Thread_Change_priority>
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
a000d210: eb000bd4 bl a0010168 <_Thread_Enable_dispatch>
a000d214: eaffffca b a000d144 <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 );
a000d218: e28800a8 add r0, r8, #168 ; 0xa8 <== NOT EXECUTED
a000d21c: eb000fd7 bl a0011180 <_Watchdog_Remove> <== NOT EXECUTED
a000d220: eaffffd6 b a000d180 <pthread_setschedparam+0x74> <== NOT EXECUTED
a001120c <pthread_sigmask>:
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
a001120c: e2713001 rsbs r3, r1, #1
a0011210: 33a03000 movcc r3, #0
a0011214: e3520000 cmp r2, #0
a0011218: 03510000 cmpeq r1, #0
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
a001121c: e92d4010 push {r4, lr}
POSIX_API_Control *api;
if ( !set && !oset )
a0011220: 0a000025 beq a00112bc <pthread_sigmask+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a0011224: e59fc0c0 ldr ip, [pc, #192] ; a00112ec <pthread_sigmask+0xe0>
if ( oset )
a0011228: 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 ];
a001122c: e59cc008 ldr ip, [ip, #8]
a0011230: e59cc0f4 ldr ip, [ip, #244] ; 0xf4
if ( oset )
*oset = api->signals_blocked;
a0011234: 159c40d0 ldrne r4, [ip, #208] ; 0xd0
a0011238: 15824000 strne r4, [r2]
if ( !set )
a001123c: e3530000 cmp r3, #0
a0011240: 1a000027 bne a00112e4 <pthread_sigmask+0xd8>
return 0;
switch ( how ) {
a0011244: e3500001 cmp r0, #1
a0011248: 0a000020 beq a00112d0 <pthread_sigmask+0xc4>
a001124c: e3500002 cmp r0, #2
a0011250: 0a00000b beq a0011284 <pthread_sigmask+0x78>
a0011254: e3500000 cmp r0, #0 <== NOT EXECUTED
a0011258: 1a000017 bne a00112bc <pthread_sigmask+0xb0> <== NOT EXECUTED
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
a001125c: e5913000 ldr r3, [r1] <== NOT EXECUTED
a0011260: e58c30d0 str r3, [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) ) {
a0011264: e59f1084 ldr r1, [pc, #132] ; a00112f0 <pthread_sigmask+0xe4>
a0011268: e59c20d4 ldr r2, [ip, #212] ; 0xd4
a001126c: e5910000 ldr r0, [r1]
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
a0011270: e1800002 orr r0, r0, r2
a0011274: e1c00003 bic r0, r0, r3
a0011278: e3500000 cmp r0, #0
a001127c: 1a00000b bne a00112b0 <pthread_sigmask+0xa4>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
a0011280: e8bd8010 pop {r4, pc}
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
a0011284: e5912000 ldr r2, [r1]
a0011288: e59c30d0 ldr r3, [ip, #208] ; 0xd0
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
a001128c: e59f105c ldr r1, [pc, #92] ; a00112f0 <pthread_sigmask+0xe4>
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
a0011290: e1c33002 bic r3, r3, r2
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
a0011294: e5910000 ldr r0, [r1]
a0011298: e59c20d4 ldr r2, [ip, #212] ; 0xd4
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
a001129c: e58c30d0 str r3, [ip, #208] ; 0xd0
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
a00112a0: e1800002 orr r0, r0, r2
a00112a4: e1c00003 bic r0, r0, r3
a00112a8: e3500000 cmp r0, #0
a00112ac: 0afffff3 beq a0011280 <pthread_sigmask+0x74>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
a00112b0: ebfff2c7 bl a000ddd4 <_Thread_Dispatch>
}
return 0;
a00112b4: e3a00000 mov r0, #0
a00112b8: e8bd8010 pop {r4, pc}
break;
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a00112bc: eb0009d1 bl a0013a08 <__errno> <== NOT EXECUTED
a00112c0: e3a03016 mov r3, #22 <== NOT EXECUTED
a00112c4: e5803000 str r3, [r0] <== NOT EXECUTED
a00112c8: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00112cc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
a00112d0: e5912000 ldr r2, [r1]
a00112d4: e59c30d0 ldr r3, [ip, #208] ; 0xd0
a00112d8: e1823003 orr r3, r2, r3
a00112dc: e58c30d0 str r3, [ip, #208] ; 0xd0
break;
a00112e0: eaffffdf b a0011264 <pthread_sigmask+0x58>
if ( oset )
*oset = api->signals_blocked;
if ( !set )
return 0;
a00112e4: e3a00000 mov r0, #0
a00112e8: eaffffe4 b a0011280 <pthread_sigmask+0x74>
a000a7e0 <pthread_spin_destroy>:
* source of the error.
*/
int pthread_spin_destroy(
pthread_spinlock_t *spinlock
)
{
a000a7e0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
if ( !spinlock )
a000a7e4: e2503000 subs r3, r0, #0 <== NOT EXECUTED
* source of the error.
*/
int pthread_spin_destroy(
pthread_spinlock_t *spinlock
)
{
a000a7e8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
if ( !spinlock )
a000a7ec: 0a00000d beq a000a828 <pthread_spin_destroy+0x48> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get (
pthread_spinlock_t *spinlock,
Objects_Locations *location
)
{
return (POSIX_Spinlock_Control *) _Objects_Get(
a000a7f0: e5931000 ldr r1, [r3] <== NOT EXECUTED
a000a7f4: e59f005c ldr r0, [pc, #92] ; a000a858 <pthread_spin_destroy+0x78><== NOT EXECUTED
a000a7f8: e1a0200d mov r2, sp <== NOT EXECUTED
a000a7fc: eb0008e9 bl a000cba8 <_Objects_Get> <== NOT EXECUTED
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
a000a800: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000a804: e1a04000 mov r4, r0 <== NOT EXECUTED
a000a808: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a80c: 1a000005 bne a000a828 <pthread_spin_destroy+0x48> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy(
CORE_spinlock_Control *the_spinlock
)
{
return (the_spinlock->users != 0);
a000a810: e5905018 ldr r5, [r0, #24] <== NOT EXECUTED
case OBJECTS_LOCAL:
if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) {
a000a814: e3550000 cmp r5, #0 <== NOT EXECUTED
a000a818: 0a000005 beq a000a834 <pthread_spin_destroy+0x54> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000a81c: eb000c8f bl a000da60 <_Thread_Enable_dispatch> <== NOT EXECUTED
return EBUSY;
a000a820: e3a00010 mov r0, #16 <== NOT EXECUTED
a000a824: ea000000 b a000a82c <pthread_spin_destroy+0x4c> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000a828: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000a82c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000a830: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object );
a000a834: e59f001c ldr r0, [pc, #28] ; a000a858 <pthread_spin_destroy+0x78><== NOT EXECUTED
a000a838: e1a01004 mov r1, r4 <== NOT EXECUTED
a000a83c: eb0007c5 bl a000c758 <_Objects_Close> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free (
POSIX_Spinlock_Control *the_spinlock
)
{
_Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object );
a000a840: e59f0010 ldr r0, [pc, #16] ; a000a858 <pthread_spin_destroy+0x78><== NOT EXECUTED
a000a844: e1a01004 mov r1, r4 <== NOT EXECUTED
a000a848: eb00087d bl a000ca44 <_Objects_Free> <== NOT EXECUTED
_POSIX_Spinlock_Free( the_spinlock );
_Thread_Enable_dispatch();
a000a84c: eb000c83 bl a000da60 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000a850: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a854: eafffff4 b a000a82c <pthread_spin_destroy+0x4c> <== NOT EXECUTED
a000addc <pthread_spin_init>:
int pthread_spin_init(
pthread_spinlock_t *spinlock,
int pshared
)
{
a000addc: e92d40f0 push {r4, r5, r6, r7, lr}
POSIX_Spinlock_Control *the_spinlock;
CORE_spinlock_Attributes attributes;
if ( !spinlock )
a000ade0: e2505000 subs r5, r0, #0
int pthread_spin_init(
pthread_spinlock_t *spinlock,
int pshared
)
{
a000ade4: e24dd004 sub sp, sp, #4
a000ade8: e1a04001 mov r4, r1
POSIX_Spinlock_Control *the_spinlock;
CORE_spinlock_Attributes attributes;
if ( !spinlock )
a000adec: 0a000018 beq a000ae54 <pthread_spin_init+0x78>
return EINVAL;
switch ( pshared ) {
a000adf0: e3510000 cmp r1, #0
a000adf4: 1a000016 bne a000ae54 <pthread_spin_init+0x78>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000adf8: e59f306c ldr r3, [pc, #108] ; a000ae6c <pthread_spin_init+0x90>
a000adfc: e5932000 ldr r2, [r3]
++level;
a000ae00: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000ae04: e5832000 str r2, [r3]
* This function allocates a spinlock control block from
* the inactive chain of free spinlock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void )
{
return (POSIX_Spinlock_Control *)
a000ae08: e59f7060 ldr r7, [pc, #96] ; a000ae70 <pthread_spin_init+0x94>
a000ae0c: e1a00007 mov r0, r7
a000ae10: eb000a7c bl a000d808 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_spinlock = _POSIX_Spinlock_Allocate();
if ( !the_spinlock ) {
a000ae14: e2506000 subs r6, r0, #0
a000ae18: 0a000010 beq a000ae60 <pthread_spin_init+0x84>
*/
RTEMS_INLINE_ROUTINE void _CORE_spinlock_Initialize_attributes(
CORE_spinlock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
a000ae1c: e28d1004 add r1, sp, #4
return EAGAIN;
}
_CORE_spinlock_Initialize_attributes( &attributes );
_CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes );
a000ae20: e2860010 add r0, r6, #16
a000ae24: e5214004 str r4, [r1, #-4]!
a000ae28: e1a0100d mov r1, sp
a000ae2c: eb000902 bl a000d23c <_CORE_spinlock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000ae30: e5963008 ldr r3, [r6, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000ae34: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
a000ae38: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000ae3c: e7826721 str r6, [r2, r1, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
a000ae40: e586400c str r4, [r6, #12]
_Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 );
*spinlock = the_spinlock->Object.id;
a000ae44: e5853000 str r3, [r5]
_Thread_Enable_dispatch();
a000ae48: eb000f8b bl a000ec7c <_Thread_Enable_dispatch>
return 0;
a000ae4c: e1a00004 mov r0, r4
a000ae50: ea000000 b a000ae58 <pthread_spin_init+0x7c>
switch ( pshared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
a000ae54: e3a00016 mov r0, #22
*spinlock = the_spinlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
a000ae58: e28dd004 add sp, sp, #4
a000ae5c: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Thread_Disable_dispatch(); /* prevents deletion */
the_spinlock = _POSIX_Spinlock_Allocate();
if ( !the_spinlock ) {
_Thread_Enable_dispatch();
a000ae60: eb000f85 bl a000ec7c <_Thread_Enable_dispatch> <== NOT EXECUTED
return EAGAIN;
a000ae64: e3a0000b mov r0, #11 <== NOT EXECUTED
a000ae68: eafffffa b a000ae58 <pthread_spin_init+0x7c> <== NOT EXECUTED
a000a8f4 <pthread_spin_lock>:
* source of the error.
*/
int pthread_spin_lock(
pthread_spinlock_t *spinlock
)
{
a000a8f4: e92d4010 push {r4, lr}
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
a000a8f8: e2503000 subs r3, r0, #0
* source of the error.
*/
int pthread_spin_lock(
pthread_spinlock_t *spinlock
)
{
a000a8fc: e24dd004 sub sp, sp, #4
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
a000a900: 0a000006 beq a000a920 <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(
a000a904: e1a0200d mov r2, sp
a000a908: e59f003c ldr r0, [pc, #60] ; a000a94c <pthread_spin_lock+0x58>
a000a90c: e5931000 ldr r1, [r3]
a000a910: eb0008a4 bl a000cba8 <_Objects_Get>
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
a000a914: e59d2000 ldr r2, [sp]
a000a918: e3520000 cmp r2, #0
a000a91c: 0a000002 beq a000a92c <pthread_spin_lock+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000a920: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000a924: e28dd004 add sp, sp, #4
a000a928: 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 );
a000a92c: e3a01001 mov r1, #1
a000a930: e2800010 add r0, r0, #16
a000a934: eb0005c0 bl a000c03c <_CORE_spinlock_Wait>
a000a938: e1a04000 mov r4, r0
_Thread_Enable_dispatch();
a000a93c: eb000c47 bl a000da60 <_Thread_Enable_dispatch>
return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
a000a940: e1a00004 mov r0, r4
a000a944: eb000001 bl a000a950 <_POSIX_Spinlock_Translate_core_spinlock_return_code>
a000a948: eafffff5 b a000a924 <pthread_spin_lock+0x30>
a000a960 <pthread_spin_trylock>:
*/
int pthread_spin_trylock(
pthread_spinlock_t *spinlock
)
{
a000a960: e92d4010 push {r4, lr}
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
a000a964: e2503000 subs r3, r0, #0
*/
int pthread_spin_trylock(
pthread_spinlock_t *spinlock
)
{
a000a968: e24dd004 sub sp, sp, #4
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
a000a96c: 0a000006 beq a000a98c <pthread_spin_trylock+0x2c>
a000a970: e5931000 ldr r1, [r3]
a000a974: e59f003c ldr r0, [pc, #60] ; a000a9b8 <pthread_spin_trylock+0x58>
a000a978: e1a0200d mov r2, sp
a000a97c: eb000889 bl a000cba8 <_Objects_Get>
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
a000a980: e59d1000 ldr r1, [sp]
a000a984: e3510000 cmp r1, #0
a000a988: 0a000002 beq a000a998 <pthread_spin_trylock+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000a98c: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000a990: e28dd004 add sp, sp, #4
a000a994: 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 );
a000a998: e1a02001 mov r2, r1
a000a99c: e2800010 add r0, r0, #16
a000a9a0: eb0005a5 bl a000c03c <_CORE_spinlock_Wait>
a000a9a4: e1a04000 mov r4, r0
_Thread_Enable_dispatch();
a000a9a8: eb000c2c bl a000da60 <_Thread_Enable_dispatch>
return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
a000a9ac: e1a00004 mov r0, r4
a000a9b0: ebffffe6 bl a000a950 <_POSIX_Spinlock_Translate_core_spinlock_return_code>
a000a9b4: eafffff5 b a000a990 <pthread_spin_trylock+0x30>
a000a9bc <pthread_spin_unlock>:
*/
int pthread_spin_unlock(
pthread_spinlock_t *spinlock
)
{
a000a9bc: e92d4010 push {r4, lr}
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
a000a9c0: e2503000 subs r3, r0, #0
*/
int pthread_spin_unlock(
pthread_spinlock_t *spinlock
)
{
a000a9c4: e24dd004 sub sp, sp, #4
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
a000a9c8: 0a000006 beq a000a9e8 <pthread_spin_unlock+0x2c>
a000a9cc: e5931000 ldr r1, [r3]
a000a9d0: e59f0038 ldr r0, [pc, #56] ; a000aa10 <pthread_spin_unlock+0x54>
a000a9d4: e1a0200d mov r2, sp
a000a9d8: eb000872 bl a000cba8 <_Objects_Get>
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
a000a9dc: e59d3000 ldr r3, [sp]
a000a9e0: e3530000 cmp r3, #0
a000a9e4: 0a000002 beq a000a9f4 <pthread_spin_unlock+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
a000a9e8: e3a00016 mov r0, #22 <== NOT EXECUTED
}
a000a9ec: e28dd004 add sp, sp, #4
a000a9f0: e8bd8010 pop {r4, pc}
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_spinlock_Release( &the_spinlock->Spinlock );
a000a9f4: e2800010 add r0, r0, #16
a000a9f8: eb000573 bl a000bfcc <_CORE_spinlock_Release>
a000a9fc: e1a04000 mov r4, r0
_Thread_Enable_dispatch();
a000aa00: eb000c16 bl a000da60 <_Thread_Enable_dispatch>
return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
a000aa04: e1a00004 mov r0, r4
a000aa08: ebffffd0 bl a000a950 <_POSIX_Spinlock_Translate_core_spinlock_return_code>
a000aa0c: eafffff6 b a000a9ec <pthread_spin_unlock+0x30>
a000ab64 <pthread_testcancel>:
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
a000ab64: 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() )
a000ab68: e59f4058 ldr r4, [pc, #88] ; a000abc8 <pthread_testcancel+0x64><== NOT EXECUTED
a000ab6c: e5943000 ldr r3, [r4] <== NOT EXECUTED
a000ab70: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ab74: 1a000010 bne a000abbc <pthread_testcancel+0x58> <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000ab78: e59f304c ldr r3, [pc, #76] ; a000abcc <pthread_testcancel+0x68><== NOT EXECUTED
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a000ab7c: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
a000ab80: e5931000 ldr r1, [r3] <== NOT EXECUTED
a000ab84: e59220f4 ldr r2, [r2, #244] ; 0xf4 <== NOT EXECUTED
++level;
a000ab88: e2811001 add r1, r1, #1 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
a000ab8c: e5831000 str r1, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
a000ab90: e59230d8 ldr r3, [r2, #216] ; 0xd8 <== NOT EXECUTED
a000ab94: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ab98: 1a000008 bne a000abc0 <pthread_testcancel+0x5c> <== NOT EXECUTED
a000ab9c: e59230e0 ldr r3, [r2, #224] ; 0xe0 <== NOT EXECUTED
a000aba0: e3530000 cmp r3, #0 <== NOT EXECUTED
a000aba4: 0a000005 beq a000abc0 <pthread_testcancel+0x5c> <== NOT EXECUTED
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
a000aba8: eb000b9b bl a000da1c <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
a000abac: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
a000abb0: e3e01000 mvn r1, #0 <== NOT EXECUTED
}
a000abb4: e8bd4010 pop {r4, lr} <== NOT EXECUTED
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
a000abb8: ea00174e b a00108f8 <_POSIX_Thread_Exit> <== NOT EXECUTED
a000abbc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
}
a000abc0: 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();
a000abc4: ea000b94 b a000da1c <_Thread_Enable_dispatch> <== NOT EXECUTED
a000b1ac <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
a000b1ac: 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);
a000b1b0: e59f41bc ldr r4, [pc, #444] ; a000b374 <rtems_aio_enqueue+0x1c8>
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
a000b1b4: e24dd024 sub sp, sp, #36 ; 0x24
a000b1b8: 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);
a000b1bc: e1a00004 mov r0, r4
a000b1c0: eb000269 bl a000bb6c <pthread_mutex_lock>
if (result != 0) {
a000b1c4: e2505000 subs r5, r0, #0
a000b1c8: 1a00002a bne a000b278 <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);
a000b1cc: eb000493 bl a000c420 <pthread_self>
a000b1d0: e28d1020 add r1, sp, #32
a000b1d4: e1a0200d mov r2, sp
a000b1d8: eb000394 bl a000c030 <pthread_getschedparam>
req->caller_thread = pthread_self ();
a000b1dc: eb00048f bl a000c420 <pthread_self>
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
a000b1e0: e5963014 ldr r3, [r6, #20]
a000b1e4: e59dc000 ldr ip, [sp]
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
a000b1e8: 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;
a000b1ec: 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 ();
a000b1f0: 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) &&
a000b1f4: 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;
a000b1f8: e062200c rsb r2, r2, ip
a000b1fc: e586200c str r2, [r6, #12]
req->policy = policy;
a000b200: e59d2020 ldr r2, [sp, #32]
a000b204: e5862008 str r2, [r6, #8]
req->aiocbp->error_code = EINPROGRESS;
a000b208: e3a02077 mov r2, #119 ; 0x77
a000b20c: e5832030 str r2, [r3, #48] ; 0x30
req->aiocbp->return_value = 0;
a000b210: e5835034 str r5, [r3, #52] ; 0x34
if ((aio_request_queue.idle_threads == 0) &&
a000b214: 1a000002 bne a000b224 <rtems_aio_enqueue+0x78>
a000b218: e5942064 ldr r2, [r4, #100] ; 0x64
a000b21c: e3520004 cmp r2, #4
a000b220: da000017 ble a000b284 <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,
a000b224: e59f014c ldr r0, [pc, #332] ; a000b378 <rtems_aio_enqueue+0x1cc><== NOT EXECUTED
a000b228: e5931000 ldr r1, [r3] <== NOT EXECUTED
a000b22c: e3a02000 mov r2, #0 <== NOT EXECUTED
a000b230: ebffff76 bl a000b010 <rtems_aio_search_fd> <== NOT EXECUTED
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
a000b234: e2507000 subs r7, r0, #0 <== NOT EXECUTED
a000b238: 0a00002e beq a000b2f8 <rtems_aio_enqueue+0x14c> <== NOT EXECUTED
{
pthread_mutex_lock (&r_chain->mutex);
a000b23c: e287401c add r4, r7, #28
a000b240: e1a00004 mov r0, r4
a000b244: eb000248 bl a000bb6c <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
a000b248: e2870008 add r0, r7, #8 <== NOT EXECUTED
a000b24c: e1a01006 mov r1, r6 <== NOT EXECUTED
a000b250: ebffff17 bl a000aeb4 <rtems_aio_insert_prio> <== NOT EXECUTED
pthread_cond_signal (&r_chain->cond);
a000b254: e2870020 add r0, r7, #32 <== NOT EXECUTED
a000b258: eb000129 bl a000b704 <pthread_cond_signal> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
a000b25c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b260: eb000262 bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
if (aio_request_queue.idle_threads > 0)
pthread_cond_signal (&aio_request_queue.new_req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
a000b264: e59f0108 ldr r0, [pc, #264] ; a000b374 <rtems_aio_enqueue+0x1c8>
a000b268: eb000260 bl a000bbf0 <pthread_mutex_unlock>
return 0;
}
a000b26c: e1a00005 mov r0, r5
a000b270: e28dd024 add sp, sp, #36 ; 0x24
a000b274: 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);
a000b278: e1a00006 mov r0, r6 <== NOT EXECUTED
a000b27c: ebffeea3 bl a0006d10 <free> <== NOT EXECUTED
return result;
a000b280: eafffff9 b a000b26c <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);
a000b284: e5931000 ldr r1, [r3]
a000b288: e2840048 add r0, r4, #72 ; 0x48
a000b28c: e3a02001 mov r2, #1
a000b290: ebffff5e bl a000b010 <rtems_aio_search_fd>
if (r_chain->new_fd == 1) {
a000b294: 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);
a000b298: e1a07000 mov r7, r0
if (r_chain->new_fd == 1) {
a000b29c: e3530001 cmp r3, #1
a000b2a0: 1affffe5 bne a000b23c <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);
a000b2a4: e1a01006 mov r1, r6
a000b2a8: e2800008 add r0, r0, #8
a000b2ac: eb0008e4 bl a000d644 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
a000b2b0: 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;
a000b2b4: e5875018 str r5, [r7, #24]
pthread_mutex_init (&r_chain->mutex, NULL);
a000b2b8: e287001c add r0, r7, #28
a000b2bc: eb0001d7 bl a000ba20 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
a000b2c0: e1a01005 mov r1, r5
a000b2c4: e2870020 add r0, r7, #32
a000b2c8: eb0000dc bl a000b640 <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
a000b2cc: e28d001c add r0, sp, #28
a000b2d0: e2841008 add r1, r4, #8
a000b2d4: e59f20a0 ldr r2, [pc, #160] ; a000b37c <rtems_aio_enqueue+0x1d0>
a000b2d8: e1a03007 mov r3, r7
a000b2dc: eb0002b5 bl a000bdb8 <pthread_create>
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
a000b2e0: e2506000 subs r6, r0, #0
a000b2e4: 1a00001e bne a000b364 <rtems_aio_enqueue+0x1b8>
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
++aio_request_queue.active_threads;
a000b2e8: e5943064 ldr r3, [r4, #100] ; 0x64
a000b2ec: e2833001 add r3, r3, #1
a000b2f0: e5843064 str r3, [r4, #100] ; 0x64
a000b2f4: eaffffda b a000b264 <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);
a000b2f8: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
a000b2fc: e59f007c ldr r0, [pc, #124] ; a000b380 <rtems_aio_enqueue+0x1d4><== NOT EXECUTED
a000b300: e3a02001 mov r2, #1 <== NOT EXECUTED
a000b304: e5931000 ldr r1, [r3] <== NOT EXECUTED
a000b308: ebffff40 bl a000b010 <rtems_aio_search_fd> <== NOT EXECUTED
if (r_chain->new_fd == 1) {
a000b30c: 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);
a000b310: e1a08000 mov r8, r0 <== NOT EXECUTED
a000b314: e1a01006 mov r1, r6 <== NOT EXECUTED
if (r_chain->new_fd == 1) {
a000b318: e3530001 cmp r3, #1 <== NOT EXECUTED
a000b31c: e2800008 add r0, r0, #8 <== NOT EXECUTED
a000b320: 0a000006 beq a000b340 <rtems_aio_enqueue+0x194> <== NOT EXECUTED
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
pthread_cond_init (&r_chain->cond, NULL);
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
a000b324: ebfffee2 bl a000aeb4 <rtems_aio_insert_prio> <== NOT EXECUTED
if (aio_request_queue.idle_threads > 0)
a000b328: e5943068 ldr r3, [r4, #104] ; 0x68 <== NOT EXECUTED
a000b32c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000b330: daffffcb ble a000b264 <rtems_aio_enqueue+0xb8> <== NOT EXECUTED
pthread_cond_signal (&aio_request_queue.new_req);
a000b334: e59f0048 ldr r0, [pc, #72] ; a000b384 <rtems_aio_enqueue+0x1d8><== NOT EXECUTED
a000b338: eb0000f1 bl a000b704 <pthread_cond_signal> <== NOT EXECUTED
a000b33c: eaffffc8 b a000b264 <rtems_aio_enqueue+0xb8> <== NOT EXECUTED
a000b340: eb0008bf bl a000d644 <_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);
a000b344: 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;
a000b348: e5887018 str r7, [r8, #24] <== NOT EXECUTED
pthread_mutex_init (&r_chain->mutex, NULL);
a000b34c: e288001c add r0, r8, #28 <== NOT EXECUTED
a000b350: eb0001b2 bl a000ba20 <pthread_mutex_init> <== NOT EXECUTED
pthread_cond_init (&r_chain->cond, NULL);
a000b354: e2880020 add r0, r8, #32 <== NOT EXECUTED
a000b358: e1a01007 mov r1, r7 <== NOT EXECUTED
a000b35c: eb0000b7 bl a000b640 <pthread_cond_init> <== NOT EXECUTED
a000b360: eafffff0 b a000b328 <rtems_aio_enqueue+0x17c> <== 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);
a000b364: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b368: eb000220 bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
return result;
a000b36c: e1a05006 mov r5, r6 <== NOT EXECUTED
a000b370: eaffffbd b a000b26c <rtems_aio_enqueue+0xc0> <== NOT EXECUTED
a000ac18 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
a000ac18: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
a000ac1c: e59f7288 ldr r7, [pc, #648] ; a000aeac <rtems_aio_handle+0x294><== NOT EXECUTED
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
a000ac20: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED
a000ac24: e1a05000 mov r5, r0 <== NOT EXECUTED
a000ac28: e280601c add r6, r0, #28 <== NOT EXECUTED
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
a000ac2c: e1a09007 mov r9, r7 <== NOT EXECUTED
pthread_cond_destroy (&r_chain->cond);
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)) {
a000ac30: e287b058 add fp, r7, #88 ; 0x58 <== 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);
a000ac34: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ac38: eb0003cb bl a000bb6c <pthread_mutex_lock> <== NOT EXECUTED
if (result != 0)
a000ac3c: e2508000 subs r8, r0, #0 <== NOT EXECUTED
a000ac40: 1a000022 bne a000acd0 <rtems_aio_handle+0xb8> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a000ac44: 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 );
a000ac48: 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)) {
a000ac4c: e1540003 cmp r4, r3 <== NOT EXECUTED
a000ac50: 0a00003a beq a000ad40 <rtems_aio_handle+0x128> <== 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);
a000ac54: eb0005f1 bl a000c420 <pthread_self> <== NOT EXECUTED
a000ac58: e28d1028 add r1, sp, #40 ; 0x28 <== NOT EXECUTED
a000ac5c: e28d2004 add r2, sp, #4 <== NOT EXECUTED
a000ac60: eb0004f2 bl a000c030 <pthread_getschedparam> <== NOT EXECUTED
param.sched_priority = req->priority;
a000ac64: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
a000ac68: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
pthread_setschedparam (pthread_self(), req->policy, ¶m);
a000ac6c: eb0005eb bl a000c420 <pthread_self> <== NOT EXECUTED
a000ac70: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
a000ac74: e28d2004 add r2, sp, #4 <== NOT EXECUTED
a000ac78: eb0005ed bl a000c434 <pthread_setschedparam> <== NOT EXECUTED
a000ac7c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ac80: eb000a59 bl a000d5ec <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
a000ac84: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ac88: eb0003d8 bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
switch (req->aiocbp->aio_lio_opcode) {
a000ac8c: e5948014 ldr r8, [r4, #20] <== NOT EXECUTED
a000ac90: e598302c ldr r3, [r8, #44] ; 0x2c <== NOT EXECUTED
a000ac94: e3530002 cmp r3, #2 <== NOT EXECUTED
a000ac98: 0a000020 beq a000ad20 <rtems_aio_handle+0x108> <== NOT EXECUTED
a000ac9c: e3530003 cmp r3, #3 <== NOT EXECUTED
a000aca0: 0a00001b beq a000ad14 <rtems_aio_handle+0xfc> <== NOT EXECUTED
a000aca4: e3530001 cmp r3, #1 <== NOT EXECUTED
a000aca8: 0a00000b beq a000acdc <rtems_aio_handle+0xc4> <== NOT EXECUTED
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
a000acac: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000acb0: e5883034 str r3, [r8, #52] ; 0x34 <== NOT EXECUTED
req->aiocbp->error_code = errno;
a000acb4: eb002827 bl a0014d58 <__errno> <== NOT EXECUTED
a000acb8: 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);
a000acbc: e1a00006 mov r0, r6 <== NOT EXECUTED
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
a000acc0: e5883030 str r3, [r8, #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);
a000acc4: eb0003a8 bl a000bb6c <pthread_mutex_lock> <== NOT EXECUTED
if (result != 0)
a000acc8: e2508000 subs r8, r0, #0 <== NOT EXECUTED
a000accc: 0affffdc beq a000ac44 <rtems_aio_handle+0x2c> <== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
a000acd0: e3a00000 mov r0, #0 <== NOT EXECUTED
a000acd4: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED
a000acd8: 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:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
a000acdc: e598c008 ldr ip, [r8, #8] <== NOT EXECUTED
a000ace0: e5980000 ldr r0, [r8] <== NOT EXECUTED
a000ace4: e598100c ldr r1, [r8, #12] <== NOT EXECUTED
a000ace8: e5982010 ldr r2, [r8, #16] <== NOT EXECUTED
a000acec: e5983004 ldr r3, [r8, #4] <== NOT EXECUTED
a000acf0: e58dc000 str ip, [sp] <== NOT EXECUTED
a000acf4: eb002af1 bl a00158c0 <pread> <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
a000acf8: e3700001 cmn r0, #1 <== NOT EXECUTED
a000acfc: 0a000062 beq a000ae8c <rtems_aio_handle+0x274> <== NOT EXECUTED
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
a000ad00: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
req->aiocbp->error_code = 0;
a000ad04: e3a02000 mov r2, #0 <== NOT EXECUTED
}
if (result == -1) {
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
a000ad08: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED
req->aiocbp->error_code = 0;
a000ad0c: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED
a000ad10: eaffffc7 b a000ac34 <rtems_aio_handle+0x1c> <== NOT EXECUTED
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
a000ad14: e5980000 ldr r0, [r8] <== NOT EXECUTED
a000ad18: eb001ab0 bl a00117e0 <fsync> <== NOT EXECUTED
break;
a000ad1c: eafffff5 b a000acf8 <rtems_aio_handle+0xe0> <== NOT EXECUTED
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
a000ad20: e598c008 ldr ip, [r8, #8] <== NOT EXECUTED
a000ad24: e5980000 ldr r0, [r8] <== NOT EXECUTED
a000ad28: e598100c ldr r1, [r8, #12] <== NOT EXECUTED
a000ad2c: e5982010 ldr r2, [r8, #16] <== NOT EXECUTED
a000ad30: e5983004 ldr r3, [r8, #4] <== NOT EXECUTED
a000ad34: e58dc000 str ip, [sp] <== NOT EXECUTED
a000ad38: eb002b23 bl a00159cc <pwrite> <== NOT EXECUTED
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
a000ad3c: eaffffed b a000acf8 <rtems_aio_handle+0xe0> <== NOT EXECUTED
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
a000ad40: e59fa164 ldr sl, [pc, #356] ; a000aeac <rtems_aio_handle+0x294><== NOT EXECUTED
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
a000ad44: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ad48: eb0003a8 bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_lock (&aio_request_queue.mutex);
a000ad4c: e1a0000a mov r0, sl <== NOT EXECUTED
a000ad50: eb000385 bl a000bb6c <pthread_mutex_lock> <== NOT EXECUTED
if (rtems_chain_is_empty (chain))
a000ad54: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
a000ad58: e1540003 cmp r4, r3 <== NOT EXECUTED
a000ad5c: 0a000002 beq a000ad6c <rtems_aio_handle+0x154> <== NOT EXECUTED
}
}
/* 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);
a000ad60: e59f0144 ldr r0, [pc, #324] ; a000aeac <rtems_aio_handle+0x294><== NOT EXECUTED
a000ad64: eb0003a1 bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
a000ad68: eaffffb1 b a000ac34 <rtems_aio_handle+0x1c> <== 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);
a000ad6c: e28d1020 add r1, sp, #32 <== NOT EXECUTED
a000ad70: e3a00001 mov r0, #1 <== NOT EXECUTED
a000ad74: eb0001cd bl a000b4b0 <clock_gettime> <== NOT EXECUTED
timeout.tv_sec += 3;
a000ad78: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
a000ad7c: e2854020 add r4, r5, #32 <== NOT EXECUTED
a000ad80: e1a00004 mov r0, r4 <== NOT EXECUTED
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
a000ad84: e2833003 add r3, r3, #3 <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
a000ad88: e1a0100a mov r1, sl <== NOT EXECUTED
a000ad8c: e28d2020 add r2, sp, #32 <== NOT EXECUTED
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
a000ad90: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
a000ad94: e58d8024 str r8, [sp, #36] ; 0x24 <== NOT EXECUTED
result = pthread_cond_timedwait (&r_chain->cond,
a000ad98: eb000273 bl a000b76c <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) {
a000ad9c: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED
a000ada0: 1affffee bne a000ad60 <rtems_aio_handle+0x148> <== NOT EXECUTED
a000ada4: e1a00005 mov r0, r5 <== NOT EXECUTED
a000ada8: eb000a0f bl a000d5ec <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
a000adac: e1a00006 mov r0, r6 <== NOT EXECUTED
a000adb0: eb0002c8 bl a000b8d8 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_cond_destroy (&r_chain->cond);
a000adb4: e1a00004 mov r0, r4 <== NOT EXECUTED
a000adb8: eb0001ec bl a000b570 <pthread_cond_destroy> <== NOT EXECUTED
free (r_chain);
a000adbc: e1a00005 mov r0, r5 <== NOT EXECUTED
a000adc0: ebffefd2 bl a0006d10 <free> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a000adc4: e5995054 ldr r5, [r9, #84] ; 0x54 <== 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)) {
a000adc8: e155000b cmp r5, fp <== NOT EXECUTED
a000adcc: 0a000019 beq a000ae38 <rtems_aio_handle+0x220> <== NOT EXECUTED
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
a000add0: e5972068 ldr r2, [r7, #104] ; 0x68 <== NOT EXECUTED
++aio_request_queue.active_threads;
a000add4: e5973064 ldr r3, [r7, #100] ; 0x64 <== NOT EXECUTED
a000add8: e1a00005 mov r0, r5 <== NOT EXECUTED
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
a000addc: e2422001 sub r2, r2, #1 <== NOT EXECUTED
++aio_request_queue.active_threads;
a000ade0: e2833001 add r3, r3, #1 <== NOT EXECUTED
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
a000ade4: e5872068 str r2, [r7, #104] ; 0x68 <== NOT EXECUTED
++aio_request_queue.active_threads;
a000ade8: e5873064 str r3, [r7, #100] ; 0x64 <== NOT EXECUTED
a000adec: eb0009fe bl a000d5ec <_Chain_Extract> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
a000adf0: e5973048 ldr r3, [r7, #72] ; 0x48 <== NOT EXECUTED
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
a000adf4: e5951014 ldr r1, [r5, #20] <== NOT EXECUTED
a000adf8: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED
a000adfc: e1520001 cmp r2, r1 <== NOT EXECUTED
a000ae00: aa000007 bge a000ae24 <rtems_aio_handle+0x20c> <== NOT EXECUTED
a000ae04: e59f00a4 ldr r0, [pc, #164] ; a000aeb0 <rtems_aio_handle+0x298><== NOT EXECUTED
a000ae08: ea000003 b a000ae1c <rtems_aio_handle+0x204> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
a000ae0c: e5933000 ldr r3, [r3] <== NOT EXECUTED
a000ae10: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED
a000ae14: e1510002 cmp r1, r2 <== NOT EXECUTED
a000ae18: da000001 ble a000ae24 <rtems_aio_handle+0x20c> <== NOT EXECUTED
a000ae1c: e1530000 cmp r3, r0 <== NOT EXECUTED
a000ae20: 1afffff9 bne a000ae0c <rtems_aio_handle+0x1f4> <== 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 );
a000ae24: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
a000ae28: e1a01005 mov r1, r5 <== NOT EXECUTED
a000ae2c: eb000a04 bl a000d644 <_Chain_Insert> <== NOT EXECUTED
a000ae30: e285601c add r6, r5, #28 <== NOT EXECUTED
a000ae34: eaffffc9 b a000ad60 <rtems_aio_handle+0x148> <== 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_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
a000ae38: e5992068 ldr r2, [r9, #104] ; 0x68 <== NOT EXECUTED
--aio_request_queue.active_threads;
a000ae3c: e5993064 ldr r3, [r9, #100] ; 0x64 <== NOT EXECUTED
clock_gettime (CLOCK_REALTIME, &timeout);
a000ae40: e28d1020 add r1, 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_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
a000ae44: e2822001 add r2, r2, #1 <== NOT EXECUTED
--aio_request_queue.active_threads;
a000ae48: e2433001 sub r3, r3, #1 <== 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_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
a000ae4c: e5892068 str r2, [r9, #104] ; 0x68 <== NOT EXECUTED
--aio_request_queue.active_threads;
a000ae50: e5893064 str r3, [r9, #100] ; 0x64 <== NOT EXECUTED
clock_gettime (CLOCK_REALTIME, &timeout);
a000ae54: e3a00001 mov r0, #1 <== NOT EXECUTED
a000ae58: eb000194 bl a000b4b0 <clock_gettime> <== NOT EXECUTED
timeout.tv_sec += 3;
a000ae5c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
a000ae60: e28a0004 add r0, sl, #4 <== NOT EXECUTED
a000ae64: e1a0100a mov r1, sl <== NOT EXECUTED
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
a000ae68: e2833003 add r3, r3, #3 <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
a000ae6c: e28d2020 add r2, sp, #32 <== NOT EXECUTED
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
a000ae70: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
a000ae74: e58d8024 str r8, [sp, #36] ; 0x24 <== NOT EXECUTED
result = pthread_cond_timedwait (&aio_request_queue.new_req,
a000ae78: eb00023b bl a000b76c <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) {
a000ae7c: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED
a000ae80: 0a000003 beq a000ae94 <rtems_aio_handle+0x27c> <== NOT EXECUTED
a000ae84: e5995054 ldr r5, [r9, #84] ; 0x54 <== NOT EXECUTED
a000ae88: eaffffd0 b a000add0 <rtems_aio_handle+0x1b8> <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
a000ae8c: e5948014 ldr r8, [r4, #20] <== NOT EXECUTED
a000ae90: eaffff85 b a000acac <rtems_aio_handle+0x94> <== NOT EXECUTED
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
a000ae94: e59a3068 ldr r3, [sl, #104] ; 0x68 <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
a000ae98: e1a0000a mov r0, sl <== NOT EXECUTED
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
a000ae9c: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a000aea0: e58a3068 str r3, [sl, #104] ; 0x68 <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
a000aea4: eb000351 bl a000bbf0 <pthread_mutex_unlock> <== NOT EXECUTED
return NULL;
a000aea8: eaffff88 b a000acd0 <rtems_aio_handle+0xb8> <== NOT EXECUTED
a000af0c <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
a000af0c: e92d4070 push {r4, r5, r6, lr}
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
a000af10: e59f00e8 ldr r0, [pc, #232] ; a000b000 <rtems_aio_init+0xf4>
a000af14: eb000388 bl a000bd3c <pthread_attr_init>
if (result != 0)
a000af18: e2505000 subs r5, r0, #0
a000af1c: 0a000001 beq a000af28 <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;
}
a000af20: e1a00005 mov r0, r5 <== NOT EXECUTED
a000af24: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
result = pthread_attr_init (&aio_request_queue.attr);
if (result != 0)
return result;
result =
a000af28: e59f00d0 ldr r0, [pc, #208] ; a000b000 <rtems_aio_init+0xf4>
a000af2c: e1a01005 mov r1, r5
a000af30: eb000393 bl a000bd84 <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
a000af34: e3500000 cmp r0, #0
a000af38: 1a00001c bne a000afb0 <rtems_aio_init+0xa4>
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
a000af3c: e59f40c0 ldr r4, [pc, #192] ; a000b004 <rtems_aio_init+0xf8>
a000af40: e3a01000 mov r1, #0
a000af44: e1a00004 mov r0, r4
a000af48: eb0002b4 bl a000ba20 <pthread_mutex_init>
if (result != 0)
a000af4c: e3500000 cmp r0, #0
a000af50: 1a00001e bne a000afd0 <rtems_aio_init+0xc4>
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
a000af54: e59f00ac ldr r0, [pc, #172] ; a000b008 <rtems_aio_init+0xfc>
a000af58: e3a01000 mov r1, #0
a000af5c: eb0001b7 bl a000b640 <pthread_cond_init>
if (result != 0) {
a000af60: e2505000 subs r5, r0, #0
a000af64: 1a000020 bne a000afec <rtems_aio_init+0xe0>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a000af68: e59f209c ldr r2, [pc, #156] ; a000b00c <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;
a000af6c: e3a01a0b mov r1, #45056 ; 0xb000
head->previous = NULL;
a000af70: e3a03000 mov r3, #0
tail->previous = head;
a000af74: e2820008 add r0, r2, #8
a000af78: e2426004 sub r6, r2, #4
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a000af7c: e282c00c add ip, r2, #12
a000af80: e281100b add r1, r1, #11
head->previous = NULL;
tail->previous = head;
a000af84: e584005c str r0, [r4, #92] ; 0x5c
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a000af88: e5842048 str r2, [r4, #72] ; 0x48
head->previous = NULL;
a000af8c: e584304c str r3, [r4, #76] ; 0x4c
tail->previous = head;
a000af90: e5846050 str r6, [r4, #80] ; 0x50
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a000af94: e584c054 str ip, [r4, #84] ; 0x54
head->previous = NULL;
a000af98: 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;
a000af9c: e5843064 str r3, [r4, #100] ; 0x64
aio_request_queue.idle_threads = 0;
a000afa0: e5843068 str r3, [r4, #104] ; 0x68
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
a000afa4: e5841060 str r1, [r4, #96] ; 0x60
return result;
}
a000afa8: e1a00005 mov r0, r5
a000afac: 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);
a000afb0: e59f404c ldr r4, [pc, #76] ; a000b004 <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);
a000afb4: e59f0044 ldr r0, [pc, #68] ; a000b000 <rtems_aio_init+0xf4><== NOT EXECUTED
a000afb8: eb000356 bl a000bd18 <pthread_attr_destroy> <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
a000afbc: e3a01000 mov r1, #0 <== NOT EXECUTED
a000afc0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000afc4: eb000295 bl a000ba20 <pthread_mutex_init> <== NOT EXECUTED
if (result != 0)
a000afc8: e3500000 cmp r0, #0 <== NOT EXECUTED
a000afcc: 0affffe0 beq a000af54 <rtems_aio_init+0x48> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
a000afd0: e2840008 add r0, r4, #8 <== NOT EXECUTED
a000afd4: eb00034f bl a000bd18 <pthread_attr_destroy> <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
a000afd8: e59f0028 ldr r0, [pc, #40] ; a000b008 <rtems_aio_init+0xfc><== NOT EXECUTED
a000afdc: e3a01000 mov r1, #0 <== NOT EXECUTED
a000afe0: eb000196 bl a000b640 <pthread_cond_init> <== NOT EXECUTED
if (result != 0) {
a000afe4: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a000afe8: 0affffde beq a000af68 <rtems_aio_init+0x5c> <== NOT EXECUTED
pthread_mutex_destroy (&aio_request_queue.mutex);
a000afec: e59f0010 ldr r0, [pc, #16] ; a000b004 <rtems_aio_init+0xf8><== NOT EXECUTED
a000aff0: eb000238 bl a000b8d8 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
a000aff4: e59f0004 ldr r0, [pc, #4] ; a000b000 <rtems_aio_init+0xf4> <== NOT EXECUTED
a000aff8: eb000346 bl a000bd18 <pthread_attr_destroy> <== NOT EXECUTED
a000affc: eaffffd9 b a000af68 <rtems_aio_init+0x5c> <== NOT EXECUTED
a000aeb4 <rtems_aio_insert_prio>:
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
a000aeb4: e1a02000 mov r2, r0 <== NOT EXECUTED
a000aeb8: e4923004 ldr r3, [r2], #4 <== NOT EXECUTED
* NONE
*/
static void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
a000aebc: 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)) {
a000aec0: e1530002 cmp r3, r2 <== NOT EXECUTED
a000aec4: 0a00000f beq a000af08 <rtems_aio_insert_prio+0x54> <== 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 &&
a000aec8: 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;
a000aecc: e5931014 ldr r1, [r3, #20] <== NOT EXECUTED
while (req->aiocbp->aio_reqprio > prio &&
a000aed0: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED
a000aed4: e5911014 ldr r1, [r1, #20] <== NOT EXECUTED
a000aed8: e1510000 cmp r1, r0 <== NOT EXECUTED
a000aedc: ba000002 blt a000aeec <rtems_aio_insert_prio+0x38> <== NOT EXECUTED
a000aee0: ea000006 b a000af00 <rtems_aio_insert_prio+0x4c> <== NOT EXECUTED
a000aee4: e1520003 cmp r2, r3 <== NOT EXECUTED
a000aee8: 0a000004 beq a000af00 <rtems_aio_insert_prio+0x4c> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
a000aeec: e5933000 ldr r3, [r3] <== NOT EXECUTED
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
a000aef0: e5931014 ldr r1, [r3, #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 &&
a000aef4: e5911014 ldr r1, [r1, #20] <== NOT EXECUTED
a000aef8: e1510000 cmp r1, r0 <== NOT EXECUTED
a000aefc: bafffff8 blt a000aee4 <rtems_aio_insert_prio+0x30> <== NOT EXECUTED
a000af00: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
a000af04: e1a0100c mov r1, ip <== NOT EXECUTED
a000af08: ea0009cd b a000d644 <_Chain_Insert> <== NOT EXECUTED
a000b0f0 <rtems_aio_remove_fd>:
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
a000b0f0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
a000b0f4: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
const Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Immutable_tail( the_chain ));
a000b0f8: 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))
a000b0fc: 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;
a000b100: 13a0808c movne r8, #140 ; 0x8c <== NOT EXECUTED
req->aiocbp->return_value = -1;
a000b104: 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))
a000b108: 1a000001 bne a000b114 <rtems_aio_remove_fd+0x24> <== NOT EXECUTED
a000b10c: ea00000b b a000b140 <rtems_aio_remove_fd+0x50> <== NOT EXECUTED
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
a000b110: e1a04005 mov r4, r5 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
a000b114: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b118: eb000933 bl a000d5ec <_Chain_Extract> <== NOT EXECUTED
req->aiocbp->error_code = ECANCELED;
a000b11c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
a000b120: e5945000 ldr r5, [r4] <== NOT EXECUTED
req->aiocbp->return_value = -1;
free (req);
a000b124: 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;
a000b128: e5838030 str r8, [r3, #48] ; 0x30 <== NOT EXECUTED
req->aiocbp->return_value = -1;
a000b12c: e5837034 str r7, [r3, #52] ; 0x34 <== NOT EXECUTED
free (req);
a000b130: ebffeef6 bl a0006d10 <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))
a000b134: e1550006 cmp r5, r6 <== NOT EXECUTED
a000b138: 1afffff4 bne a000b110 <rtems_aio_remove_fd+0x20> <== NOT EXECUTED
a000b13c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a000b140: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a000b144 <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)
{
a000b144: e92d4010 push {r4, lr} <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a000b148: e4904004 ldr r4, [r0], #4 <== NOT EXECUTED
if (rtems_chain_is_empty (chain))
a000b14c: e1540000 cmp r4, r0 <== NOT EXECUTED
a000b150: 1a000003 bne a000b164 <rtems_aio_remove_req+0x20> <== NOT EXECUTED
a000b154: ea000012 b a000b1a4 <rtems_aio_remove_req+0x60> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
a000b158: e5944000 ldr r4, [r4] <== 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) {
a000b15c: e1500004 cmp r0, r4 <== NOT EXECUTED
a000b160: 0a00000d beq a000b19c <rtems_aio_remove_req+0x58> <== NOT EXECUTED
a000b164: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
a000b168: e1530001 cmp r3, r1 <== NOT EXECUTED
a000b16c: 1afffff9 bne a000b158 <rtems_aio_remove_req+0x14> <== NOT EXECUTED
a000b170: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b174: eb00091c bl a000d5ec <_Chain_Extract> <== NOT EXECUTED
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
a000b178: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
a000b17c: e3a0208c mov r2, #140 ; 0x8c <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
a000b180: 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;
a000b184: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED
current->aiocbp->return_value = -1;
a000b188: e3e02000 mvn r2, #0 <== NOT EXECUTED
a000b18c: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED
free (current);
a000b190: ebffeede bl a0006d10 <free> <== NOT EXECUTED
}
return AIO_CANCELED;
a000b194: e3a00000 mov r0, #0 <== NOT EXECUTED
a000b198: 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;
a000b19c: e3a00001 mov r0, #1 <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
a000b1a0: 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;
a000b1a4: e3a00002 mov r0, #2 <== NOT EXECUTED
a000b1a8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000b010 <rtems_aio_search_fd>:
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
a000b010: e5903000 ldr r3, [r0]
*
*/
rtems_aio_request_chain *
rtems_aio_search_fd (rtems_chain_control *chain, int fildes, int create)
{
a000b014: e92d40f0 push {r4, r5, r6, r7, lr}
a000b018: e1a04001 mov r4, 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)) {
a000b01c: e5931014 ldr r1, [r3, #20]
*
*/
rtems_aio_request_chain *
rtems_aio_search_fd (rtems_chain_control *chain, int fildes, int create)
{
a000b020: e1a05000 mov r5, r0
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)) {
a000b024: e1510004 cmp r1, r4
a000b028: aa00002c bge a000b0e0 <rtems_aio_search_fd+0xd0>
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
const Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Immutable_tail( the_chain ));
a000b02c: e2800004 add r0, r0, #4
a000b030: e1530000 cmp r3, r0
a000b034: 1a000002 bne a000b044 <rtems_aio_search_fd+0x34>
a000b038: ea00002a b a000b0e8 <rtems_aio_search_fd+0xd8> <== NOT EXECUTED
a000b03c: e1570000 cmp r7, r0 <== NOT EXECUTED
a000b040: 0a000020 beq a000b0c8 <rtems_aio_search_fd+0xb8> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
a000b044: e5937000 ldr r7, [r3]
a000b048: e5971014 ldr r1, [r7, #20]
a000b04c: e1a03007 mov r3, r7
a000b050: e1510004 cmp r1, r4
a000b054: bafffff8 blt a000b03c <rtems_aio_search_fd+0x2c>
node = rtems_chain_next (node);
r_chain = (rtems_aio_request_chain *) node;
}
if (r_chain->fildes == fildes)
a000b058: e1540001 cmp r4, r1
r_chain->new_fd = 0;
a000b05c: 03a03000 moveq r3, #0
a000b060: 05873018 streq r3, [r7, #24]
a000b064: 01a06007 moveq r6, r7
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)
a000b068: 0a000014 beq a000b0c0 <rtems_aio_search_fd+0xb0>
r_chain->new_fd = 0;
else {
if (create == 0)
a000b06c: e3520000 cmp r2, #0
a000b070: 0a000017 beq a000b0d4 <rtems_aio_search_fd+0xc4>
r_chain = NULL;
else {
r_chain = malloc (sizeof (rtems_aio_request_chain));
a000b074: e3a00024 mov r0, #36 ; 0x24
a000b078: ebfff04d bl a00071b4 <malloc>
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 );
a000b07c: e280300c add r3, r0, #12
head->next = tail;
a000b080: e5803008 str r3, [r0, #8]
rtems_chain_initialize_empty (&r_chain->perfd);
if (rtems_chain_is_empty (chain))
a000b084: e5951000 ldr r1, [r5]
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000b088: e2852004 add r2, r5, #4
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 );
a000b08c: e2803008 add r3, r0, #8
a000b090: e1510002 cmp r1, r2
head->next = tail;
head->previous = NULL;
a000b094: 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));
a000b098: e1a06000 mov r6, r0
tail->previous = head;
a000b09c: e5803010 str r3, [r0, #16]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
a000b0a0: e580200c str r2, [r0, #12]
a000b0a4: 15970004 ldrne r0, [r7, #4]
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
a000b0a8: 01a00005 moveq r0, r5
a000b0ac: e1a01006 mov r1, r6
a000b0b0: eb000963 bl a000d644 <_Chain_Insert>
if (rtems_chain_is_empty (chain))
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;
a000b0b4: e3a03001 mov r3, #1
a000b0b8: e5863018 str r3, [r6, #24]
r_chain->fildes = fildes;
a000b0bc: e5864014 str r4, [r6, #20]
}
}
return r_chain;
}
a000b0c0: e1a00006 mov r0, r6
a000b0c4: e8bd80f0 pop {r4, r5, r6, r7, pc}
}
if (r_chain->fildes == fildes)
r_chain->new_fd = 0;
else {
if (create == 0)
a000b0c8: e3520000 cmp r2, #0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
a000b0cc: e1a07000 mov r7, r0 <== NOT EXECUTED
a000b0d0: 1affffe7 bne a000b074 <rtems_aio_search_fd+0x64> <== NOT EXECUTED
r_chain = NULL;
a000b0d4: e1a06002 mov r6, r2 <== NOT EXECUTED
r_chain->new_fd = 1;
r_chain->fildes = fildes;
}
}
return r_chain;
}
a000b0d8: e1a00006 mov r0, r6 <== NOT EXECUTED
a000b0dc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== 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)) {
a000b0e0: e1a07003 mov r7, r3
a000b0e4: eaffffdb b a000b058 <rtems_aio_search_fd+0x48>
a000b0e8: e1a07003 mov r7, r3 <== NOT EXECUTED
a000b0ec: eaffffde b a000b06c <rtems_aio_search_fd+0x5c> <== NOT EXECUTED
a000c030 <rtems_build_id>:
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a000c030: e1a00c00 lsl r0, r0, #24 <== NOT EXECUTED
a000c034: e1800d81 orr r0, r0, r1, lsl #27 <== NOT EXECUTED
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a000c038: e1800003 orr r0, r0, r3 <== NOT EXECUTED
uint32_t node,
uint32_t index
)
{
return _Objects_Build_id( api, class, node, index );
}
a000c03c: e1800802 orr r0, r0, r2, lsl #16 <== NOT EXECUTED
a000c040: e12fff1e bx lr <== NOT EXECUTED
a000c044 <rtems_build_name>:
char C1,
char C2,
char C3,
char C4
)
{
a000c044: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
a000c048: e1a02402 lsl r2, r2, #8 <== NOT EXECUTED
return _Objects_Build_name( C1, C2, C3, C4 );
a000c04c: e20118ff and r1, r1, #16711680 ; 0xff0000 <== NOT EXECUTED
a000c050: e1811c00 orr r1, r1, r0, lsl #24 <== NOT EXECUTED
a000c054: e2022cff and r2, r2, #65280 ; 0xff00 <== NOT EXECUTED
char C1,
char C2,
char C3,
char C4
)
{
a000c058: e20330ff and r3, r3, #255 ; 0xff <== NOT EXECUTED
return _Objects_Build_name( C1, C2, C3, C4 );
a000c05c: e1811002 orr r1, r1, r2 <== NOT EXECUTED
}
a000c060: e1810003 orr r0, r1, r3 <== NOT EXECUTED
a000c064: e12fff1e bx lr <== NOT EXECUTED
a000b470 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a000b470: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000b474: e1a04002 mov r4, r2 <== NOT EXECUTED
a000b478: 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 );
a000b47c: eb00016d bl a000ba38 <_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 ) {
a000b480: e3500000 cmp r0, #0 <== NOT EXECUTED
a000b484: 1a000000 bne a000b48c <rtems_chain_append_with_notification+0x1c><== NOT EXECUTED
sc = rtems_event_send( task, events );
}
return sc;
}
a000b488: 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 );
a000b48c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b490: e1a01005 mov r1, r5 <== NOT EXECUTED
}
return sc;
}
a000b494: 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 );
a000b498: eafffd76 b a000aa78 <rtems_event_send> <== NOT EXECUTED
a000b49c <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
a000b49c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000b4a0: 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 );
a000b4a4: e1a01003 mov r1, r3 <== NOT EXECUTED
a000b4a8: e1a05002 mov r5, r2 <== NOT EXECUTED
a000b4ac: eb00017d bl a000baa8 <_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 ) {
a000b4b0: e3500000 cmp r0, #0 <== NOT EXECUTED
a000b4b4: 1a000000 bne a000b4bc <rtems_chain_get_with_notification+0x20><== NOT EXECUTED
sc = rtems_event_send( task, events );
}
return sc;
}
a000b4b8: 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 );
a000b4bc: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b4c0: e1a01005 mov r1, r5 <== NOT EXECUTED
}
return sc;
}
a000b4c4: 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 );
a000b4c8: eafffd6a b a000aa78 <rtems_event_send> <== NOT EXECUTED
a000b4cc <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
a000b4cc: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
a000b4d0: e1a07000 mov r7, r0 <== NOT EXECUTED
a000b4d4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000b4d8: e1a06001 mov r6, r1 <== NOT EXECUTED
a000b4dc: e1a05002 mov r5, r2 <== NOT EXECUTED
a000b4e0: e1a08003 mov r8, r3 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
a000b4e4: e1a00007 mov r0, r7 <== NOT EXECUTED
a000b4e8: eb000183 bl a000bafc <_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
a000b4ec: e2504000 subs r4, r0, #0 <== NOT EXECUTED
) {
rtems_event_set out;
sc = rtems_event_receive(
a000b4f0: e1a02005 mov r2, r5 <== NOT EXECUTED
a000b4f4: e1a0300d mov r3, sp <== NOT EXECUTED
a000b4f8: e1a01004 mov r1, r4 <== NOT EXECUTED
a000b4fc: 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
a000b500: 1a000005 bne a000b51c <rtems_chain_get_with_wait+0x50> <== NOT EXECUTED
) {
rtems_event_set out;
sc = rtems_event_receive(
a000b504: ebfffcf7 bl a000a8e8 <rtems_event_receive> <== NOT EXECUTED
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
a000b508: e3500000 cmp r0, #0 <== NOT EXECUTED
a000b50c: 0afffff4 beq a000b4e4 <rtems_chain_get_with_wait+0x18> <== NOT EXECUTED
timeout,
&out
);
}
*node_ptr = node;
a000b510: e5884000 str r4, [r8] <== NOT EXECUTED
return sc;
}
a000b514: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000b518: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
a000b51c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000b520: eafffffa b a000b510 <rtems_chain_get_with_wait+0x44> <== NOT EXECUTED
a000b524 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a000b524: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000b528: e1a04002 mov r4, r2 <== NOT EXECUTED
a000b52c: 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 );
a000b530: eb0001a1 bl a000bbbc <_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) {
a000b534: e3500000 cmp r0, #0 <== NOT EXECUTED
a000b538: 1a000000 bne a000b540 <rtems_chain_prepend_with_notification+0x1c><== NOT EXECUTED
sc = rtems_event_send( task, events );
}
return sc;
}
a000b53c: 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 );
a000b540: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b544: e1a01005 mov r1, r5 <== NOT EXECUTED
}
return sc;
}
a000b548: 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 );
a000b54c: eafffd49 b a000aa78 <rtems_event_send> <== NOT EXECUTED
a000b1c4 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
a000b1c4: e92d4010 push {r4, lr}
if ( !time_buffer )
a000b1c8: e2514000 subs r4, r1, #0
a000b1cc: 0a00000c beq a000b204 <rtems_clock_get+0x40>
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
a000b1d0: e3500000 cmp r0, #0
a000b1d4: 0a00000d beq a000b210 <rtems_clock_get+0x4c>
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
a000b1d8: e3500001 cmp r0, #1
a000b1dc: 0a00000e beq a000b21c <rtems_clock_get+0x58>
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
a000b1e0: e3500002 cmp r0, #2
a000b1e4: 0a00000f beq a000b228 <rtems_clock_get+0x64>
*interval = rtems_clock_get_ticks_since_boot();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
a000b1e8: e3500003 cmp r0, #3
a000b1ec: 0a000011 beq a000b238 <rtems_clock_get+0x74>
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
a000b1f0: e3500004 cmp r0, #4
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
a000b1f4: 13a0300a movne r3, #10
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
a000b1f8: 0a000012 beq a000b248 <rtems_clock_get+0x84>
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
a000b1fc: e1a00003 mov r0, r3
a000b200: e8bd8010 pop {r4, pc}
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
a000b204: 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;
}
a000b208: e1a00003 mov r0, r3
a000b20c: e8bd8010 pop {r4, pc}
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
a000b210: 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;
}
a000b214: 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 );
a000b218: ea00002e b a000b2d8 <rtems_clock_get_tod>
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
a000b21c: 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;
}
a000b220: 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);
a000b224: ea00000a b a000b254 <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();
a000b228: eb000026 bl a000b2c8 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b22c: e3a03000 mov r3, #0 <== NOT EXECUTED
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();
a000b230: e5840000 str r0, [r4] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b234: eafffff0 b a000b1fc <rtems_clock_get+0x38> <== NOT EXECUTED
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
a000b238: eb00001a bl a000b2a8 <rtems_clock_get_ticks_per_second> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b23c: e3a03000 mov r3, #0 <== NOT EXECUTED
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
a000b240: e5840000 str r0, [r4] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b244: eaffffec b a000b1fc <rtems_clock_get+0x38> <== NOT EXECUTED
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
a000b248: e1a00004 mov r0, r4 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
}
a000b24c: 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 );
a000b250: ea00005b b a000b3c4 <rtems_clock_get_tod_timeval> <== NOT EXECUTED
a000b0ac <rtems_clock_get_seconds_since_epoch>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
a000b0ac: e92d4010 push {r4, lr}
if ( !the_interval )
a000b0b0: e2504000 subs r4, r0, #0
return RTEMS_INVALID_ADDRESS;
a000b0b4: 03a03009 moveq r3, #9
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
if ( !the_interval )
a000b0b8: 0a000004 beq a000b0d0 <rtems_clock_get_seconds_since_epoch+0x24>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD.is_set )
a000b0bc: e59f3034 ldr r3, [pc, #52] ; a000b0f8 <rtems_clock_get_seconds_since_epoch+0x4c>
a000b0c0: e5d32014 ldrb r2, [r3, #20]
a000b0c4: e3520000 cmp r2, #0
return RTEMS_NOT_DEFINED;
a000b0c8: 03a0300b moveq r3, #11
)
{
if ( !the_interval )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD.is_set )
a000b0cc: 1a000001 bne a000b0d8 <rtems_clock_get_seconds_since_epoch+0x2c>
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch();
return RTEMS_SUCCESSFUL;
}
a000b0d0: e1a00003 mov r0, r3 <== NOT EXECUTED
a000b0d4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
a000b0d8: e8930003 ldm r3, {r0, r1}
a000b0dc: e59f2018 ldr r2, [pc, #24] ; a000b0fc <rtems_clock_get_seconds_since_epoch+0x50>
a000b0e0: e3a03000 mov r3, #0
a000b0e4: eb004cda bl a001e454 <__divdi3>
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch();
return RTEMS_SUCCESSFUL;
a000b0e8: e3a03000 mov r3, #0
a000b0ec: e5840000 str r0, [r4]
}
a000b0f0: e1a00003 mov r0, r3
a000b0f4: e8bd8010 pop {r4, pc}
a0018e1c <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
a0018e1c: e92d40d0 push {r4, r6, r7, lr}
if ( !time )
a0018e20: e2504000 subs r4, r0, #0
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
a0018e24: e24dd008 sub sp, sp, #8
if ( !time )
return RTEMS_INVALID_ADDRESS;
a0018e28: 03a03009 moveq r3, #9
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
if ( !time )
a0018e2c: 0a000004 beq a0018e44 <rtems_clock_get_tod_timeval+0x28>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD.is_set )
a0018e30: e59f1068 ldr r1, [pc, #104] ; a0018ea0 <rtems_clock_get_tod_timeval+0x84>
a0018e34: e5d13014 ldrb r3, [r1, #20]
a0018e38: e3530000 cmp r3, #0
return RTEMS_NOT_DEFINED;
a0018e3c: 03a0300b moveq r3, #11
)
{
if ( !time )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD.is_set )
a0018e40: 1a000002 bne a0018e50 <rtems_clock_get_tod_timeval+0x34>
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
a0018e44: e1a00003 mov r0, r3
a0018e48: e28dd008 add sp, sp, #8
a0018e4c: e8bd80d0 pop {r4, r6, r7, pc}
)
{
Timestamp_Control snapshot_as_timestamp;
Timestamp_Control *snapshot_as_timestamp_ptr;
snapshot_as_timestamp_ptr =
a0018e50: e1a0000d mov r0, sp <== NOT EXECUTED
a0018e54: ebffd285 bl a000d870 <_TOD_Get_with_nanoseconds> <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timeval(
const Timestamp64_Control *_timestamp,
struct timeval *_timeval
)
{
_timeval->tv_sec = (time_t) (*_timestamp / 1000000000U);
a0018e58: e59f2044 ldr r2, [pc, #68] ; a0018ea4 <rtems_clock_get_tod_timeval+0x88><== NOT EXECUTED
a0018e5c: e89000c0 ldm r0, {r6, r7} <== NOT EXECUTED
a0018e60: e3a03000 mov r3, #0 <== NOT EXECUTED
a0018e64: e1a00006 mov r0, r6 <== NOT EXECUTED
a0018e68: e1a01007 mov r1, r7 <== NOT EXECUTED
a0018e6c: ebffb24e bl a00057ac <__divdi3> <== NOT EXECUTED
_timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U);
a0018e70: e59f202c ldr r2, [pc, #44] ; a0018ea4 <rtems_clock_get_tod_timeval+0x88><== NOT EXECUTED
a0018e74: e3a03000 mov r3, #0 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timeval(
const Timestamp64_Control *_timestamp,
struct timeval *_timeval
)
{
_timeval->tv_sec = (time_t) (*_timestamp / 1000000000U);
a0018e78: e5840000 str r0, [r4] <== NOT EXECUTED
_timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U);
a0018e7c: e1a01007 mov r1, r7 <== NOT EXECUTED
a0018e80: e1a00006 mov r0, r6 <== NOT EXECUTED
a0018e84: eb004f7b bl a002cc78 <__moddi3> <== NOT EXECUTED
a0018e88: e3a03000 mov r3, #0 <== NOT EXECUTED
a0018e8c: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED
a0018e90: ebffb245 bl a00057ac <__divdi3> <== NOT EXECUTED
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
a0018e94: e3a03000 mov r3, #0 <== NOT EXECUTED
a0018e98: e5840004 str r0, [r4, #4] <== NOT EXECUTED
a0018e9c: eaffffe8 b a0018e44 <rtems_clock_get_tod_timeval+0x28> <== NOT EXECUTED
a002a210 <rtems_clock_get_uptime>:
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
a002a210: e3500000 cmp r0, #0 <== NOT EXECUTED
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
a002a214: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if ( !uptime )
a002a218: 0a000002 beq a002a228 <rtems_clock_get_uptime+0x18> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
a002a21c: eb000252 bl a002ab6c <_TOD_Get_uptime_as_timespec> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a002a220: e3a00000 mov r0, #0 <== NOT EXECUTED
a002a224: 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;
a002a228: e3a00009 mov r0, #9 <== NOT EXECUTED
_TOD_Get_uptime_as_timespec( uptime );
return RTEMS_SUCCESSFUL;
}
a002a22c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a001780c <rtems_clock_get_uptime_seconds>:
#endif
#include <rtems/rtems/clock.h>
time_t rtems_clock_get_uptime_seconds( void )
{
a001780c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a0017810: e10f3000 mrs r3, CPSR <== NOT EXECUTED
a0017814: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
a0017818: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
Timestamp_Control snapshot_as_timestamp;
struct timespec snapshot_as_timespec;
ISR_Level level;
_ISR_Disable( level );
snapshot_as_timestamp = _TOD.uptime;
a001781c: e59f2018 ldr r2, [pc, #24] ; a001783c <rtems_clock_get_uptime_seconds+0x30><== NOT EXECUTED
a0017820: e2821008 add r1, r2, #8 <== NOT EXECUTED
a0017824: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a0017828: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a001782c: e59f200c ldr r2, [pc, #12] ; a0017840 <rtems_clock_get_uptime_seconds+0x34><== NOT EXECUTED
a0017830: e3a03000 mov r3, #0 <== NOT EXECUTED
a0017834: eb005f1e bl a002f4b4 <__divdi3> <== NOT EXECUTED
_ISR_Enable( level );
_Timestamp_To_timespec( &snapshot_as_timestamp, &snapshot_as_timespec );
return snapshot_as_timespec.tv_sec;
}
a0017838: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0017844 <rtems_clock_get_uptime_timeval>:
#endif
#include <rtems/rtems/clock.h>
void rtems_clock_get_uptime_timeval( struct timeval *uptime )
{
a0017844: e92d40d0 push {r4, r6, r7, lr} <== NOT EXECUTED
a0017848: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
a001784c: e1a04000 mov r4, r0 <== NOT EXECUTED
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
a0017850: e59f104c ldr r1, [pc, #76] ; a00178a4 <rtems_clock_get_uptime_timeval+0x60><== NOT EXECUTED
a0017854: e1a0000d mov r0, sp <== NOT EXECUTED
a0017858: eb0012c6 bl a001c378 <_TOD_Get_with_nanoseconds> <== NOT EXECUTED
Timestamp_Control snapshot_as_timestamp;
_TOD_Get_uptime( &snapshot_as_timestamp );
_Timestamp_To_timeval( &snapshot_as_timestamp, uptime );
a001785c: e89d00c0 ldm sp, {r6, r7} <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timeval(
const Timestamp64_Control *_timestamp,
struct timeval *_timeval
)
{
_timeval->tv_sec = (time_t) (*_timestamp / 1000000000U);
a0017860: e59f2040 ldr r2, [pc, #64] ; a00178a8 <rtems_clock_get_uptime_timeval+0x64><== NOT EXECUTED
a0017864: e3a03000 mov r3, #0 <== NOT EXECUTED
a0017868: e1a00006 mov r0, r6 <== NOT EXECUTED
a001786c: e1a01007 mov r1, r7 <== NOT EXECUTED
a0017870: eb005f0f bl a002f4b4 <__divdi3> <== NOT EXECUTED
_timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U);
a0017874: e59f202c ldr r2, [pc, #44] ; a00178a8 <rtems_clock_get_uptime_timeval+0x64><== NOT EXECUTED
a0017878: e3a03000 mov r3, #0 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timeval(
const Timestamp64_Control *_timestamp,
struct timeval *_timeval
)
{
_timeval->tv_sec = (time_t) (*_timestamp / 1000000000U);
a001787c: e5840000 str r0, [r4] <== NOT EXECUTED
_timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U);
a0017880: e1a01007 mov r1, r7 <== NOT EXECUTED
a0017884: e1a00006 mov r0, r6 <== NOT EXECUTED
a0017888: eb006044 bl a002f9a0 <__moddi3> <== NOT EXECUTED
a001788c: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED
a0017890: e3a03000 mov r3, #0 <== NOT EXECUTED
a0017894: eb005f06 bl a002f4b4 <__divdi3> <== NOT EXECUTED
a0017898: e5840004 str r0, [r4, #4] <== NOT EXECUTED
}
a001789c: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a00178a0: e8bd80d0 pop {r4, r6, r7, pc} <== NOT EXECUTED
a000a110 <rtems_clock_tick>:
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_tick( void )
{
a000a110: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_TOD_Tickle_ticks();
a000a114: eb000587 bl a000b738 <_TOD_Tickle_ticks>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
{
_Watchdog_Tickle( &_Watchdog_Ticks_chain );
a000a118: e59f0038 ldr r0, [pc, #56] ; a000a158 <rtems_clock_tick+0x48>
a000a11c: eb000f7d bl a000df18 <_Watchdog_Tickle>
* scheduler which support standard RTEMS features, this includes
* time-slicing management.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Tick( void )
{
_Scheduler.Operations.tick();
a000a120: e59f3034 ldr r3, [pc, #52] ; a000a15c <rtems_clock_tick+0x4c>
a000a124: e5933038 ldr r3, [r3, #56] ; 0x38
a000a128: e12fff33 blx r3
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
{
return ( _Thread_Dispatch_necessary );
a000a12c: e59f302c ldr r3, [pc, #44] ; a000a160 <rtems_clock_tick+0x50>
a000a130: e5d33004 ldrb r3, [r3, #4]
_Watchdog_Tickle_ticks();
_Scheduler_Tick();
if ( _Thread_Is_context_switch_necessary() &&
a000a134: e3530000 cmp r3, #0
a000a138: 0a000004 beq a000a150 <rtems_clock_tick+0x40>
* This routine returns true if thread dispatch indicates
* that we are in a critical section.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void)
{
if ( _Thread_Dispatch_disable_level == 0 )
a000a13c: e59f3020 ldr r3, [pc, #32] ; a000a164 <rtems_clock_tick+0x54><== NOT EXECUTED
a000a140: e5933000 ldr r3, [r3] <== NOT EXECUTED
a000a144: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a148: 1a000000 bne a000a150 <rtems_clock_tick+0x40> <== NOT EXECUTED
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
a000a14c: eb000b60 bl a000ced4 <_Thread_Dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
a000a150: e3a00000 mov r0, #0
a000a154: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a0014408 <rtems_event_system_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
a0014408: e92d4070 push {r4, r5, r6, lr}
rtems_status_code sc;
if ( event_out != NULL ) {
a001440c: e2535000 subs r5, r3, #0
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
a0014410: e1a0c000 mov ip, r0
a0014414: e24dd010 sub sp, sp, #16
} else {
*event_out = event->pending_events;
sc = RTEMS_SUCCESSFUL;
}
} else {
sc = RTEMS_INVALID_ADDRESS;
a0014418: 03a00009 moveq r0, #9
rtems_event_set *event_out
)
{
rtems_status_code sc;
if ( event_out != NULL ) {
a001441c: 0a000007 beq a0014440 <rtems_event_system_receive+0x38>
Thread_Control *executing = _Thread_Executing;
a0014420: e59f405c ldr r4, [pc, #92] ; a0014484 <rtems_event_system_receive+0x7c>
RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ];
Event_Control *event = &api->System_event;
if ( !_Event_sets_Is_empty( event_in ) ) {
a0014424: e35c0000 cmp ip, #0
)
{
rtems_status_code sc;
if ( event_out != NULL ) {
Thread_Control *executing = _Thread_Executing;
a0014428: e5944008 ldr r4, [r4, #8]
RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ];
a001442c: e59460f0 ldr r6, [r4, #240] ; 0xf0
Event_Control *event = &api->System_event;
if ( !_Event_sets_Is_empty( event_in ) ) {
a0014430: 1a000004 bne a0014448 <rtems_event_system_receive+0x40>
);
_Thread_Enable_dispatch();
sc = executing->Wait.return_code;
} else {
*event_out = event->pending_events;
a0014434: e5963004 ldr r3, [r6, #4] <== NOT EXECUTED
sc = RTEMS_SUCCESSFUL;
a0014438: e1a0000c mov r0, ip <== NOT EXECUTED
);
_Thread_Enable_dispatch();
sc = executing->Wait.return_code;
} else {
*event_out = event->pending_events;
a001443c: e5853000 str r3, [r5] <== NOT EXECUTED
} else {
sc = RTEMS_INVALID_ADDRESS;
}
return sc;
}
a0014440: e28dd010 add sp, sp, #16
a0014444: e8bd8070 pop {r4, r5, r6, pc}
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a0014448: e59fc038 ldr ip, [pc, #56] ; a0014488 <rtems_event_system_receive+0x80>
a001444c: e59ce000 ldr lr, [ip]
++level;
a0014450: e28ee001 add lr, lr, #1
_Thread_Dispatch_disable_level = level;
a0014454: e58ce000 str lr, [ip]
RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ];
Event_Control *event = &api->System_event;
if ( !_Event_sets_Is_empty( event_in ) ) {
_Thread_Disable_dispatch();
_Event_Seize(
a0014458: e59fc02c ldr ip, [pc, #44] ; a001448c <rtems_event_system_receive+0x84>
rtems_status_code sc;
if ( event_out != NULL ) {
Thread_Control *executing = _Thread_Executing;
RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ];
Event_Control *event = &api->System_event;
a001445c: e2866004 add r6, r6, #4
if ( !_Event_sets_Is_empty( event_in ) ) {
_Thread_Disable_dispatch();
_Event_Seize(
a0014460: e58d4000 str r4, [sp]
a0014464: e58dc008 str ip, [sp, #8]
a0014468: e3a0c701 mov ip, #262144 ; 0x40000
a001446c: e58dc00c str ip, [sp, #12]
a0014470: e58d6004 str r6, [sp, #4]
a0014474: ebffdc77 bl a000b658 <_Event_Seize>
executing,
event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
a0014478: ebffe7cb bl a000e3ac <_Thread_Enable_dispatch>
sc = executing->Wait.return_code;
a001447c: e5940034 ldr r0, [r4, #52] ; 0x34
a0014480: eaffffee b a0014440 <rtems_event_system_receive+0x38>
a000cf18 <rtems_extension_ident>:
rtems_status_code rtems_extension_ident(
rtems_name name,
rtems_id *id
)
{
a000cf18: e1a02000 mov r2, r0 <== NOT EXECUTED
a000cf1c: e1a03001 mov r3, r1 <== NOT EXECUTED
a000cf20: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
Objects_Name_or_id_lookup_errors status;
status = _Objects_Name_to_id_u32(
a000cf24: e1a01002 mov r1, r2 <== NOT EXECUTED
a000cf28: e59f0010 ldr r0, [pc, #16] ; a000cf40 <rtems_extension_ident+0x28><== NOT EXECUTED
a000cf2c: e3e02102 mvn r2, #-2147483648 ; 0x80000000 <== NOT EXECUTED
a000cf30: eb000514 bl a000e388 <_Objects_Name_to_id_u32> <== NOT EXECUTED
name,
OBJECTS_SEARCH_LOCAL_NODE,
id
);
return _Status_Object_name_errors_to_status[ status ];
a000cf34: e59f3008 ldr r3, [pc, #8] ; a000cf44 <rtems_extension_ident+0x2c><== NOT EXECUTED
}
a000cf38: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED
a000cf3c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000b158 <rtems_interrupt_disable>:
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000b158: e10f0000 mrs r0, CPSR <== NOT EXECUTED
a000b15c: e3803080 orr r3, r0, #128 ; 0x80 <== NOT EXECUTED
a000b160: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_level previous_level;
_ISR_Disable( previous_level );
return previous_level;
}
a000b164: e12fff1e bx lr <== NOT EXECUTED
a000b168 <rtems_interrupt_enable>:
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000b168: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
void rtems_interrupt_enable(
rtems_interrupt_level previous_level
)
{
_ISR_Enable( previous_level );
}
a000b16c: e12fff1e bx lr <== NOT EXECUTED
a000b170 <rtems_interrupt_flash>:
static inline void arm_interrupt_flash( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000b170: e10f3000 mrs r3, CPSR <== NOT EXECUTED
a000b174: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
a000b178: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
void rtems_interrupt_flash(
rtems_interrupt_level previous_level
)
{
_ISR_Flash( previous_level );
}
a000b17c: e12fff1e bx lr <== NOT EXECUTED
a000b180 <rtems_interrupt_is_in_progress>:
#undef rtems_interrupt_is_in_progress
bool rtems_interrupt_is_in_progress( void )
{
return _ISR_Is_in_progress();
a000b180: e59f300c ldr r3, [pc, #12] ; a000b194 <rtems_interrupt_is_in_progress+0x14><== NOT EXECUTED
a000b184: e5930000 ldr r0, [r3] <== NOT EXECUTED
}
a000b188: e2900000 adds r0, r0, #0 <== NOT EXECUTED
a000b18c: 13a00001 movne r0, #1 <== NOT EXECUTED
a000b190: e12fff1e bx lr <== NOT EXECUTED
a000b198 <rtems_interrupt_level_body>:
Modes_Control rtems_interrupt_level_body(
uint32_t level
)
{
return RTEMS_INTERRUPT_LEVEL(level);
}
a000b198: e2000080 and r0, r0, #128 ; 0x80 <== NOT EXECUTED
a000b19c: e12fff1e bx lr <== NOT EXECUTED
a00124bc <rtems_io_close>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00124bc: e59fc044 ldr ip, [pc, #68] ; a0012508 <rtems_io_close+0x4c>
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a00124c0: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00124c4: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a00124c8: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00124cc: e15c0000 cmp ip, r0
a00124d0: 8a000001 bhi a00124dc <rtems_io_close+0x20>
return RTEMS_INVALID_NUMBER;
a00124d4: e3a0000a mov r0, #10 <== NOT EXECUTED
a00124d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].close_entry;
a00124dc: e59fc028 ldr ip, [pc, #40] ; a001250c <rtems_io_close+0x50>
a00124e0: e3a04018 mov r4, #24
a00124e4: e59cc000 ldr ip, [ip]
a00124e8: e023c394 mla r3, r4, r3, ip
a00124ec: e5933008 ldr r3, [r3, #8]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a00124f0: e3530000 cmp r3, #0
a00124f4: 0a000001 beq a0012500 <rtems_io_close+0x44>
a00124f8: e12fff33 blx r3
a00124fc: e8bd8010 pop {r4, pc}
a0012500: e1a00003 mov r0, r3
}
a0012504: e8bd8010 pop {r4, pc}
a0012510 <rtems_io_control>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0012510: e59fc044 ldr ip, [pc, #68] ; a001255c <rtems_io_control+0x4c>
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0012514: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0012518: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a001251c: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0012520: e15c0000 cmp ip, r0
a0012524: 8a000001 bhi a0012530 <rtems_io_control+0x20>
return RTEMS_INVALID_NUMBER;
a0012528: e3a0000a mov r0, #10 <== NOT EXECUTED
a001252c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].control_entry;
a0012530: e59fc028 ldr ip, [pc, #40] ; a0012560 <rtems_io_control+0x50>
a0012534: e3a04018 mov r4, #24
a0012538: e59cc000 ldr ip, [ip]
a001253c: e023c394 mla r3, r4, r3, ip
a0012540: e5933014 ldr r3, [r3, #20]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0012544: e3530000 cmp r3, #0
a0012548: 0a000001 beq a0012554 <rtems_io_control+0x44>
a001254c: e12fff33 blx r3
a0012550: e8bd8010 pop {r4, pc}
a0012554: e1a00003 mov r0, r3 <== NOT EXECUTED
}
a0012558: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0012564 <rtems_io_open>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0012564: e59fc044 ldr ip, [pc, #68] ; a00125b0 <rtems_io_open+0x4c>
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0012568: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a001256c: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0012570: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0012574: e15c0000 cmp ip, r0
a0012578: 8a000001 bhi a0012584 <rtems_io_open+0x20>
return RTEMS_INVALID_NUMBER;
a001257c: e3a0000a mov r0, #10 <== NOT EXECUTED
a0012580: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].open_entry;
a0012584: e59fc028 ldr ip, [pc, #40] ; a00125b4 <rtems_io_open+0x50>
a0012588: e3a04018 mov r4, #24
a001258c: e59cc000 ldr ip, [ip]
a0012590: e023c394 mla r3, r4, r3, ip
a0012594: e5933004 ldr r3, [r3, #4]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0012598: e3530000 cmp r3, #0
a001259c: 0a000001 beq a00125a8 <rtems_io_open+0x44>
a00125a0: e12fff33 blx r3
a00125a4: e8bd8010 pop {r4, pc}
a00125a8: e1a00003 mov r0, r3
}
a00125ac: e8bd8010 pop {r4, pc}
a00125b8 <rtems_io_read>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00125b8: e59fc044 ldr ip, [pc, #68] ; a0012604 <rtems_io_read+0x4c>
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a00125bc: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00125c0: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a00125c4: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00125c8: e15c0000 cmp ip, r0
a00125cc: 8a000001 bhi a00125d8 <rtems_io_read+0x20>
return RTEMS_INVALID_NUMBER;
a00125d0: e3a0000a mov r0, #10 <== NOT EXECUTED
a00125d4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].read_entry;
a00125d8: e59fc028 ldr ip, [pc, #40] ; a0012608 <rtems_io_read+0x50>
a00125dc: e3a04018 mov r4, #24
a00125e0: e59cc000 ldr ip, [ip]
a00125e4: e023c394 mla r3, r4, r3, ip
a00125e8: e593300c ldr r3, [r3, #12]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a00125ec: e3530000 cmp r3, #0
a00125f0: 0a000001 beq a00125fc <rtems_io_read+0x44>
a00125f4: e12fff33 blx r3
a00125f8: e8bd8010 pop {r4, pc}
a00125fc: e1a00003 mov r0, r3
}
a0012600: e8bd8010 pop {r4, pc}
a000c3ec <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
)
{
a000c3ec: e92d4010 push {r4, lr}
a000c3f0: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
a000c3f4: e59f0150 ldr r0, [pc, #336] ; a000c54c <rtems_io_register_driver+0x160>
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;
a000c3f8: e59f3150 ldr r3, [pc, #336] ; a000c550 <rtems_io_register_driver+0x164>
if ( rtems_interrupt_is_in_progress() )
a000c3fc: e5900000 ldr r0, [r0]
a000c400: 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;
a000c404: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
a000c408: 0a000001 beq a000c414 <rtems_io_register_driver+0x28>
return RTEMS_CALLED_FROM_ISR;
a000c40c: e3a00012 mov r0, #18 <== NOT EXECUTED
a000c410: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( registered_major == NULL )
a000c414: e3520000 cmp r2, #0
a000c418: 0a00000c beq a000c450 <rtems_io_register_driver+0x64>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
a000c41c: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
a000c420: e5820000 str r0, [r2]
if ( driver_table == NULL )
a000c424: 0a000009 beq a000c450 <rtems_io_register_driver+0x64>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000c428: e591c000 ldr ip, [r1]
a000c42c: e35c0000 cmp ip, #0
a000c430: 0a000003 beq a000c444 <rtems_io_register_driver+0x58>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
a000c434: e1500004 cmp r0, r4
a000c438: 8a000006 bhi a000c458 <rtems_io_register_driver+0x6c>
return RTEMS_INVALID_NUMBER;
a000c43c: e3a0000a mov r0, #10 <== NOT EXECUTED
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
a000c440: e8bd8010 pop {r4, 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;
a000c444: e591c004 ldr ip, [r1, #4]
a000c448: e35c0000 cmp ip, #0
a000c44c: 1afffff8 bne a000c434 <rtems_io_register_driver+0x48>
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
a000c450: e3a00009 mov r0, #9 <== NOT EXECUTED
a000c454: e8bd8010 pop {r4, pc} <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000c458: e59f00f4 ldr r0, [pc, #244] ; a000c554 <rtems_io_register_driver+0x168>
a000c45c: e590c000 ldr ip, [r0]
++level;
a000c460: e28cc001 add ip, ip, #1
_Thread_Dispatch_disable_level = level;
a000c464: e580c000 str ip, [r0]
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
a000c468: e3540000 cmp r4, #0
a000c46c: 1a000022 bne a000c4fc <rtems_io_register_driver+0x110>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
a000c470: e593c000 ldr ip, [r3]
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
a000c474: e35c0000 cmp ip, #0
a000c478: 0a00002a beq a000c528 <rtems_io_register_driver+0x13c>
a000c47c: e59fe0d4 ldr lr, [pc, #212] ; a000c558 <rtems_io_register_driver+0x16c>
a000c480: e59e3000 ldr r3, [lr]
a000c484: ea000003 b a000c498 <rtems_io_register_driver+0xac>
a000c488: e2844001 add r4, r4, #1
a000c48c: e154000c cmp r4, ip
a000c490: e2833018 add r3, r3, #24
a000c494: 0a000023 beq a000c528 <rtems_io_register_driver+0x13c>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000c498: e5930000 ldr r0, [r3]
a000c49c: e3500000 cmp r0, #0
a000c4a0: 1afffff8 bne a000c488 <rtems_io_register_driver+0x9c>
a000c4a4: e5930004 ldr r0, [r3, #4]
a000c4a8: e3500000 cmp r0, #0
a000c4ac: 1afffff5 bne a000c488 <rtems_io_register_driver+0x9c>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
a000c4b0: e15c0004 cmp ip, r4
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a000c4b4: e5824000 str r4, [r2]
if ( m != n )
a000c4b8: 0a00001b beq a000c52c <rtems_io_register_driver+0x140>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
a000c4bc: e59e3000 ldr r3, [lr]
a000c4c0: e3a0c018 mov ip, #24
a000c4c4: e1a0e001 mov lr, r1
a000c4c8: e02c3c94 mla ip, r4, ip, r3
a000c4cc: e8be000f ldm lr!, {r0, r1, r2, r3}
a000c4d0: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000c4d4: e59e1004 ldr r1, [lr, #4]
a000c4d8: e59e0000 ldr r0, [lr]
a000c4dc: e58c1004 str r1, [ip, #4]
a000c4e0: e58c0000 str r0, [ip]
_Thread_Enable_dispatch();
a000c4e4: eb0007b0 bl a000e3ac <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
a000c4e8: e3a01000 mov r1, #0
a000c4ec: e1a00004 mov r0, r4
a000c4f0: e1a02001 mov r2, r1
}
a000c4f4: e8bd4010 pop {r4, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
a000c4f8: ea0020e4 b a0014890 <rtems_io_initialize>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
a000c4fc: e59fe054 ldr lr, [pc, #84] ; a000c558 <rtems_io_register_driver+0x16c>
a000c500: e3a03018 mov r3, #24
a000c504: e0030394 mul r3, r4, r3
a000c508: e59e0000 ldr r0, [lr]
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000c50c: e790c003 ldr ip, [r0, r3]
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
a000c510: e0803003 add r3, r0, r3
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000c514: e35c0000 cmp ip, #0
a000c518: 0a000006 beq a000c538 <rtems_io_register_driver+0x14c>
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();
a000c51c: eb0007a2 bl a000e3ac <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
a000c520: e3a0000c mov r0, #12
a000c524: e8bd8010 pop {r4, pc}
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a000c528: e5824000 str r4, [r2]
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
a000c52c: eb00079e bl a000e3ac <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
a000c530: 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;
a000c534: e8bd8010 pop {r4, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000c538: e5933004 ldr r3, [r3, #4]
a000c53c: e3530000 cmp r3, #0
a000c540: 1afffff5 bne a000c51c <rtems_io_register_driver+0x130>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
a000c544: e5824000 str r4, [r2] <== NOT EXECUTED
a000c548: eaffffdb b a000c4bc <rtems_io_register_driver+0xd0> <== NOT EXECUTED
a000c55c <rtems_io_unregister_driver>:
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
a000c55c: e59f3064 ldr r3, [pc, #100] ; a000c5c8 <rtems_io_unregister_driver+0x6c>
#include <string.h>
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
a000c560: e92d4010 push {r4, lr}
if ( rtems_interrupt_is_in_progress() )
a000c564: e5934000 ldr r4, [r3]
a000c568: e3540000 cmp r4, #0
a000c56c: 0a000001 beq a000c578 <rtems_io_unregister_driver+0x1c>
return RTEMS_CALLED_FROM_ISR;
a000c570: e3a00012 mov r0, #18 <== NOT EXECUTED
a000c574: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( major < _IO_Number_of_drivers ) {
a000c578: e59f304c ldr r3, [pc, #76] ; a000c5cc <rtems_io_unregister_driver+0x70>
a000c57c: e5933000 ldr r3, [r3]
a000c580: e1530000 cmp r3, r0
a000c584: 8a000001 bhi a000c590 <rtems_io_unregister_driver+0x34>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
a000c588: e3a0000d mov r0, #13 <== NOT EXECUTED
}
a000c58c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000c590: e59f3038 ldr r3, [pc, #56] ; a000c5d0 <rtems_io_unregister_driver+0x74>
a000c594: e5932000 ldr r2, [r3]
++level;
a000c598: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000c59c: 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(
a000c5a0: e59f202c ldr r2, [pc, #44] ; a000c5d4 <rtems_io_unregister_driver+0x78>
&_IO_Driver_address_table[major],
a000c5a4: 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(
a000c5a8: e1a01004 mov r1, r4
a000c5ac: e592c000 ldr ip, [r2]
a000c5b0: e1a02003 mov r2, r3
a000c5b4: e020c093 mla r0, r3, r0, ip
a000c5b8: eb002c6e bl a0017778 <memset>
&_IO_Driver_address_table[major],
0,
sizeof( rtems_driver_address_table )
);
_Thread_Enable_dispatch();
a000c5bc: eb00077a bl a000e3ac <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000c5c0: e1a00004 mov r0, r4
a000c5c4: e8bd8010 pop {r4, pc}
a001260c <rtems_io_write>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a001260c: e59fc044 ldr ip, [pc, #68] ; a0012658 <rtems_io_write+0x4c>
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0012610: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0012614: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0012618: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a001261c: e15c0000 cmp ip, r0
a0012620: 8a000001 bhi a001262c <rtems_io_write+0x20>
return RTEMS_INVALID_NUMBER;
a0012624: e3a0000a mov r0, #10 <== NOT EXECUTED
a0012628: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].write_entry;
a001262c: e59fc028 ldr ip, [pc, #40] ; a001265c <rtems_io_write+0x50>
a0012630: e3a04018 mov r4, #24
a0012634: e59cc000 ldr ip, [ip]
a0012638: e023c394 mla r3, r4, r3, ip
a001263c: e5933010 ldr r3, [r3, #16]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0012640: e3530000 cmp r3, #0
a0012644: 0a000001 beq a0012650 <rtems_io_write+0x44>
a0012648: e12fff33 blx r3
a001264c: e8bd8010 pop {r4, pc}
a0012650: e1a00003 mov r0, r3 <== NOT EXECUTED
}
a0012654: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a00180d8 <rtems_message_queue_broadcast>:
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
a00180d8: 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 )
a00180dc: e2516000 subs r6, r1, #0
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
a00180e0: e24dd00c sub sp, sp, #12
a00180e4: e1a05000 mov r5, r0
a00180e8: e1a07002 mov r7, r2
a00180ec: e1a04003 mov r4, r3
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
a00180f0: 0a000015 beq a001814c <rtems_message_queue_broadcast+0x74>
return RTEMS_INVALID_ADDRESS;
if ( !count )
a00180f4: e3530000 cmp r3, #0
a00180f8: 0a000013 beq a001814c <rtems_message_queue_broadcast+0x74>
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
a00180fc: e59f0054 ldr r0, [pc, #84] ; a0018158 <rtems_message_queue_broadcast+0x80>
a0018100: e1a01005 mov r1, r5
a0018104: e28d2008 add r2, sp, #8
a0018108: eb00160d bl a001d944 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a001810c: e59dc008 ldr ip, [sp, #8]
a0018110: e35c0000 cmp ip, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0018114: 13a00004 movne r0, #4
if ( !count )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0018118: 1a00000c bne a0018150 <rtems_message_queue_broadcast+0x78>
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
a001811c: e1a01006 mov r1, r6
a0018120: e1a02007 mov r2, r7
a0018124: e1a03005 mov r3, r5
a0018128: e2800014 add r0, r0, #20
a001812c: e58dc000 str ip, [sp]
a0018130: e58d4004 str r4, [sp, #4]
a0018134: eb000e8c bl a001bb6c <_CORE_message_queue_Broadcast>
a0018138: e1a04000 mov r4, r0
NULL,
#endif
count
);
_Thread_Enable_dispatch();
a001813c: eb0019cf bl a001e880 <_Thread_Enable_dispatch>
return
a0018140: e1a00004 mov r0, r4
a0018144: eb0000d6 bl a00184a4 <_Message_queue_Translate_core_message_queue_return_code>
a0018148: ea000000 b a0018150 <rtems_message_queue_broadcast+0x78>
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !count )
return RTEMS_INVALID_ADDRESS;
a001814c: e3a00009 mov r0, #9 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0018150: e28dd00c add sp, sp, #12
a0018154: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0012664 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0012664: e92d41f0 push {r4, r5, r6, r7, r8, lr}
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
size_t max_packet_payload_size;
#endif
if ( !rtems_is_name_valid( name ) )
a0012668: e2507000 subs r7, r0, #0
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a001266c: e24dd008 sub sp, sp, #8
a0012670: e1a05001 mov r5, r1
a0012674: e1a06002 mov r6, r2
a0012678: e59d4020 ldr r4, [sp, #32]
bool is_global;
size_t max_packet_payload_size;
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a001267c: 03a00003 moveq r0, #3
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
size_t max_packet_payload_size;
#endif
if ( !rtems_is_name_valid( name ) )
a0012680: 1a000001 bne a001268c <rtems_message_queue_create+0x28>
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a0012684: e28dd008 add sp, sp, #8
a0012688: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a001268c: e3540000 cmp r4, #0
return RTEMS_INVALID_ADDRESS;
a0012690: 03a00009 moveq r0, #9
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a0012694: 0afffffa beq a0012684 <rtems_message_queue_create+0x20>
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
a0012698: e3510000 cmp r1, #0
return RTEMS_INVALID_NUMBER;
a001269c: 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 )
a00126a0: 0afffff7 beq a0012684 <rtems_message_queue_create+0x20>
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
a00126a4: e3520000 cmp r2, #0
return RTEMS_INVALID_SIZE;
a00126a8: 03a00008 moveq r0, #8
#endif
if ( count == 0 )
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
a00126ac: 0afffff4 beq a0012684 <rtems_message_queue_create+0x20>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a00126b0: e59f2098 ldr r2, [pc, #152] ; a0012750 <rtems_message_queue_create+0xec>
a00126b4: e5921000 ldr r1, [r2]
++level;
a00126b8: e2811001 add r1, r1, #1
_Thread_Dispatch_disable_level = level;
a00126bc: e5821000 str r1, [r2]
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
a00126c0: e58d3000 str r3, [sp]
a00126c4: eb001959 bl a0018c30 <_Message_queue_Allocate>
if ( !the_message_queue ) {
a00126c8: e2508000 subs r8, r0, #0
a00126cc: e59d3000 ldr r3, [sp]
a00126d0: 0a00001b beq a0012744 <rtems_message_queue_create+0xe0>
#endif
the_message_queue->attribute_set = attribute_set;
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
a00126d4: e3130004 tst r3, #4
a00126d8: 03a02000 moveq r2, #0
a00126dc: 13a02001 movne r2, #1
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
a00126e0: e28d1008 add r1, sp, #8
a00126e4: e5212004 str r2, [r1, #-4]!
a00126e8: e5883010 str r3, [r8, #16]
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
a00126ec: e2880014 add r0, r8, #20
a00126f0: e1a02005 mov r2, r5
a00126f4: e1a03006 mov r3, r6
a00126f8: eb0004f1 bl a0013ac4 <_CORE_message_queue_Initialize>
a00126fc: e3500000 cmp r0, #0
a0012700: 1a000005 bne a001271c <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 );
a0012704: e59f0048 ldr r0, [pc, #72] ; a0012754 <rtems_message_queue_create+0xf0>
a0012708: e1a01008 mov r1, r8
a001270c: eb0008f2 bl a0014adc <_Objects_Free>
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
a0012710: eb000d19 bl a0015b7c <_Thread_Enable_dispatch>
return RTEMS_UNSATISFIED;
a0012714: e3a0000d mov r0, #13
a0012718: eaffffd9 b a0012684 <rtems_message_queue_create+0x20>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a001271c: e59f2030 ldr r2, [pc, #48] ; a0012754 <rtems_message_queue_create+0xf0>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a0012720: e5983008 ldr r3, [r8, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0012724: e592201c ldr r2, [r2, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0012728: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a001272c: e7828721 str r8, [r2, r1, lsr #14]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0012730: e588700c str r7, [r8, #12]
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
a0012734: e5843000 str r3, [r4]
name,
0
);
#endif
_Thread_Enable_dispatch();
a0012738: eb000d0f bl a0015b7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001273c: e3a00000 mov r0, #0
a0012740: eaffffcf b a0012684 <rtems_message_queue_create+0x20>
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
if ( !the_message_queue ) {
_Thread_Enable_dispatch();
a0012744: eb000d0c bl a0015b7c <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a0012748: e3a00005 mov r0, #5 <== NOT EXECUTED
a001274c: eaffffcc b a0012684 <rtems_message_queue_create+0x20> <== NOT EXECUTED
a001830c <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
a001830c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
a0018310: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
a0018314: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a0018318: e1a01000 mov r1, r0 <== NOT EXECUTED
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
return RTEMS_INVALID_ADDRESS;
a001831c: 03a00009 moveq r0, #9 <== NOT EXECUTED
)
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
a0018320: 0a00000a beq a0018350 <rtems_message_queue_get_number_pending+0x44><== NOT EXECUTED
a0018324: e59f002c ldr r0, [pc, #44] ; a0018358 <rtems_message_queue_get_number_pending+0x4c><== NOT EXECUTED
a0018328: e1a0200d mov r2, sp <== NOT EXECUTED
a001832c: eb001584 bl a001d944 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0018330: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a0018334: e3550000 cmp r5, #0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0018338: 13a00004 movne r0, #4 <== NOT EXECUTED
if ( !count )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a001833c: 1a000003 bne a0018350 <rtems_message_queue_get_number_pending+0x44><== NOT EXECUTED
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
a0018340: e590305c ldr r3, [r0, #92] ; 0x5c <== NOT EXECUTED
a0018344: e5843000 str r3, [r4] <== NOT EXECUTED
_Thread_Enable_dispatch();
a0018348: eb00194c bl a001e880 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a001834c: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0018350: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0018354: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a001278c <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
a001278c: e92d4070 push {r4, r5, r6, lr}
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
a0012790: e2515000 subs r5, r1, #0
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
a0012794: e24dd00c sub sp, sp, #12
a0012798: e1a01000 mov r1, r0
a001279c: e1a04002 mov r4, r2
a00127a0: e1a06003 mov r6, r3
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
a00127a4: 0a000018 beq a001280c <rtems_message_queue_receive+0x80>
return RTEMS_INVALID_ADDRESS;
if ( !size )
a00127a8: e3520000 cmp r2, #0
a00127ac: 0a000016 beq a001280c <rtems_message_queue_receive+0x80>
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
a00127b0: e59f0060 ldr r0, [pc, #96] ; a0012818 <rtems_message_queue_receive+0x8c>
a00127b4: e28d2008 add r2, sp, #8
a00127b8: eb000920 bl a0014c40 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a00127bc: e59d3008 ldr r3, [sp, #8]
a00127c0: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a00127c4: 13a00004 movne r0, #4
if ( !size )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a00127c8: 1a000010 bne a0012810 <rtems_message_queue_receive+0x84>
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
a00127cc: e59dc01c ldr ip, [sp, #28]
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
a00127d0: e2066001 and r6, r6, #1
a00127d4: e5901008 ldr r1, [r0, #8]
a00127d8: e1a03004 mov r3, r4
a00127dc: e2800014 add r0, r0, #20
a00127e0: e1a02005 mov r2, r5
a00127e4: e2266001 eor r6, r6, #1
a00127e8: e58dc004 str ip, [sp, #4]
a00127ec: e58d6000 str r6, [sp]
a00127f0: eb0004e7 bl a0013b94 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
a00127f4: eb000ce0 bl a0015b7c <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
_Thread_Executing->Wait.return_code
a00127f8: e59f301c ldr r3, [pc, #28] ; a001281c <rtems_message_queue_receive+0x90>
a00127fc: e5933008 ldr r3, [r3, #8]
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
a0012800: e5930034 ldr r0, [r3, #52] ; 0x34
a0012804: eb000025 bl a00128a0 <_Message_queue_Translate_core_message_queue_return_code>
a0012808: ea000000 b a0012810 <rtems_message_queue_receive+0x84>
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
a001280c: e3a00009 mov r0, #9 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0012810: e28dd00c add sp, sp, #12
a0012814: e8bd8070 pop {r4, r5, r6, pc}
a000a53c <rtems_object_api_maximum_class>:
int rtems_object_api_maximum_class(
int api
)
{
return _Objects_API_maximum_class(api);
a000a53c: ea00060d b a000bd78 <_Objects_API_maximum_class> <== NOT EXECUTED
a000a554 <rtems_object_get_api_class_name>:
)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
a000a554: e3500001 cmp r0, #1 <== NOT EXECUTED
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
a000a558: 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 )
a000a55c: 0a00000d beq a000a598 <rtems_object_get_api_class_name+0x44><== NOT EXECUTED
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
a000a560: e3500002 cmp r0, #2 <== NOT EXECUTED
a000a564: 0a000004 beq a000a57c <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 )
a000a568: e3500003 cmp r0, #3 <== NOT EXECUTED
api_assoc = rtems_object_api_posix_assoc;
a000a56c: 059f003c ldreq r0, [pc, #60] ; a000a5b0 <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 )
a000a570: 0a000002 beq a000a580 <rtems_object_get_api_class_name+0x2c><== NOT EXECUTED
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
a000a574: e59f0038 ldr r0, [pc, #56] ; a000a5b4 <rtems_object_get_api_class_name+0x60><== NOT EXECUTED
a000a578: 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;
a000a57c: e59f0034 ldr r0, [pc, #52] ; a000a5b8 <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 );
a000a580: eb0012a1 bl a000f00c <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if ( class_assoc )
a000a584: e3500000 cmp r0, #0 <== NOT EXECUTED
return class_assoc->name;
a000a588: 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 )
a000a58c: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED
return class_assoc->name;
return "BAD CLASS";
a000a590: e59f0024 ldr r0, [pc, #36] ; a000a5bc <rtems_object_get_api_class_name+0x68><== NOT EXECUTED
}
a000a594: 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;
a000a598: e59f0020 ldr r0, [pc, #32] ; a000a5c0 <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 );
a000a59c: eb00129a bl a000f00c <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if ( class_assoc )
a000a5a0: e3500000 cmp r0, #0 <== NOT EXECUTED
return class_assoc->name;
a000a5a4: 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 )
a000a5a8: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED
a000a5ac: eafffff7 b a000a590 <rtems_object_get_api_class_name+0x3c> <== NOT EXECUTED
a000a5c4 <rtems_object_get_api_name>:
};
const char *rtems_object_get_api_name(
int api
)
{
a000a5c4: e1a01000 mov r1, r0 <== NOT EXECUTED
a000a5c8: 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 );
a000a5cc: e59f0010 ldr r0, [pc, #16] ; a000a5e4 <rtems_object_get_api_name+0x20><== NOT EXECUTED
a000a5d0: eb00128d bl a000f00c <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if ( api_assoc )
a000a5d4: e3500000 cmp r0, #0 <== NOT EXECUTED
return api_assoc->name;
a000a5d8: 15900000 ldrne r0, [r0] <== NOT EXECUTED
return "BAD CLASS";
a000a5dc: 059f0004 ldreq r0, [pc, #4] ; a000a5e8 <rtems_object_get_api_name+0x24><== NOT EXECUTED
}
a000a5e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000c150 <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
)
{
a000c150: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
a000c154: e2524000 subs r4, r2, #0 <== NOT EXECUTED
a000c158: 0a00001d beq a000c1d4 <rtems_object_get_class_information+0x84><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
a000c15c: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
a000c160: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
a000c164: eb000748 bl a000de8c <_Objects_Get_information> <== NOT EXECUTED
if ( !obj_info )
a000c168: e3500000 cmp r0, #0 <== NOT EXECUTED
a000c16c: 0a00001a beq a000c1dc <rtems_object_get_class_information+0x8c><== 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;
a000c170: 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;
a000c174: e5901008 ldr r1, [r0, #8] <== NOT EXECUTED
info->maximum_id = obj_info->maximum_id;
a000c178: e590200c ldr r2, [r0, #12] <== NOT EXECUTED
info->auto_extend = obj_info->auto_extend;
a000c17c: e5d03012 ldrb r3, [r0, #18] <== NOT EXECUTED
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
a000c180: 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;
a000c184: e5841000 str r1, [r4] <== NOT EXECUTED
info->maximum_id = obj_info->maximum_id;
a000c188: e5842004 str r2, [r4, #4] <== NOT EXECUTED
info->auto_extend = obj_info->auto_extend;
a000c18c: e5c4300c strb r3, [r4, #12] <== NOT EXECUTED
info->maximum = obj_info->maximum;
a000c190: e584c008 str ip, [r4, #8] <== NOT EXECUTED
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
a000c194: 01a0500c moveq r5, ip <== NOT EXECUTED
a000c198: 0a00000a beq a000c1c8 <rtems_object_get_class_information+0x78><== NOT EXECUTED
a000c19c: e590001c ldr r0, [r0, #28] <== NOT EXECUTED
a000c1a0: e3a02001 mov r2, #1 <== NOT EXECUTED
a000c1a4: e1a03002 mov r3, r2 <== NOT EXECUTED
a000c1a8: e3a05000 mov r5, #0 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
a000c1ac: 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++ )
a000c1b0: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000c1b4: e1a02003 mov r2, r3 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
a000c1b8: e3510000 cmp r1, #0 <== NOT EXECUTED
unallocated++;
a000c1bc: 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++ )
a000c1c0: e15c0003 cmp ip, r3 <== NOT EXECUTED
a000c1c4: 2afffff8 bcs a000c1ac <rtems_object_get_class_information+0x5c><== NOT EXECUTED
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
a000c1c8: e5845010 str r5, [r4, #16] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000c1cc: e3a00000 mov r0, #0 <== NOT EXECUTED
a000c1d0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
a000c1d4: e3a00009 mov r0, #9 <== NOT EXECUTED
a000c1d8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
a000c1dc: e3a0000a mov r0, #10 <== NOT EXECUTED
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
a000c1e0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000c1e8 <rtems_object_id_api_maximum>:
#undef rtems_object_id_api_maximum
int rtems_object_id_api_maximum(void)
{
return OBJECTS_APIS_LAST;
}
a000c1e8: e3a00003 mov r0, #3 <== NOT EXECUTED
a000c1ec: e12fff1e bx lr <== NOT EXECUTED
a000c1f0 <rtems_object_id_api_minimum>:
#undef rtems_object_id_api_minimum
int rtems_object_id_api_minimum(void)
{
return OBJECTS_INTERNAL_API;
}
a000c1f0: e3a00001 mov r0, #1 <== NOT EXECUTED
a000c1f4: e12fff1e bx lr <== NOT EXECUTED
a000c1f8 <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);
a000c1f8: e1a00c20 lsr r0, r0, #24 <== NOT EXECUTED
int rtems_object_id_get_api(
rtems_id id
)
{
return _Objects_Get_API( id );
}
a000c1fc: e2000007 and r0, r0, #7 <== NOT EXECUTED
a000c200: e12fff1e bx lr <== NOT EXECUTED
a000c204 <rtems_object_id_get_class>:
int rtems_object_id_get_class(
rtems_id id
)
{
return _Objects_Get_class( id );
}
a000c204: e1a00da0 lsr r0, r0, #27 <== NOT EXECUTED
a000c208: e12fff1e bx lr <== NOT EXECUTED
a000c20c <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 );
a000c20c: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
}
a000c210: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
a000c214: e12fff1e bx lr <== NOT EXECUTED
a000c218 <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;
a000c218: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
int rtems_object_id_get_node(
rtems_id id
)
{
return _Objects_Get_node( id );
}
a000c21c: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
a000c220: e12fff1e bx lr <== NOT EXECUTED
a000a5f0 <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
a000a5f0: e92d4070 push {r4, r5, r6, lr}
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
a000a5f4: e2514000 subs r4, r1, #0
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
a000a5f8: e24dd004 sub sp, sp, #4
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
a000a5fc: 03a00009 moveq r0, #9
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
a000a600: 0a00000f beq a000a644 <rtems_object_set_name+0x54>
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a000a604: e3500000 cmp r0, #0
a000a608: 059f3058 ldreq r3, [pc, #88] ; a000a668 <rtems_object_set_name+0x78>
a000a60c: 11a05000 movne r5, r0
a000a610: 05933008 ldreq r3, [r3, #8]
a000a614: 05935008 ldreq r5, [r3, #8]
information = _Objects_Get_information_id( tmpId );
a000a618: e1a00005 mov r0, r5
a000a61c: eb0006b5 bl a000c0f8 <_Objects_Get_information_id>
if ( !information )
a000a620: e2506000 subs r6, r0, #0
a000a624: 0a000005 beq a000a640 <rtems_object_set_name+0x50>
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
a000a628: e1a01005 mov r1, r5
a000a62c: e1a0200d mov r2, sp
a000a630: eb000736 bl a000c310 <_Objects_Get>
switch ( location ) {
a000a634: e59d5000 ldr r5, [sp]
a000a638: e3550000 cmp r5, #0
a000a63c: 0a000002 beq a000a64c <rtems_object_set_name+0x5c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a640: e3a00004 mov r0, #4 <== NOT EXECUTED
}
a000a644: e28dd004 add sp, sp, #4
a000a648: 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 );
a000a64c: e1a01000 mov r1, r0
a000a650: e1a02004 mov r2, r4
a000a654: e1a00006 mov r0, r6
a000a658: eb00078b bl a000c48c <_Objects_Set_name>
_Thread_Enable_dispatch();
a000a65c: eb000b0e bl a000d29c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a660: e1a00005 mov r0, r5
a000a664: eafffff6 b a000a644 <rtems_object_set_name+0x54>
a000bb08 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a000bb08: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
a000bb0c: e2506000 subs r6, r0, #0
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a000bb10: e24dd008 sub sp, sp, #8
a000bb14: e1a04001 mov r4, r1
a000bb18: e59d502c ldr r5, [sp, #44] ; 0x2c
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a000bb1c: 03a00003 moveq r0, #3
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
a000bb20: 1a000001 bne a000bb2c <rtems_partition_create+0x24>
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000bb24: e28dd008 add sp, sp, #8
a000bb28: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
a000bb2c: e3510000 cmp r1, #0
a000bb30: 0a000006 beq a000bb50 <rtems_partition_create+0x48>
return RTEMS_INVALID_ADDRESS;
if ( !id )
a000bb34: e3550000 cmp r5, #0
a000bb38: 0a000004 beq a000bb50 <rtems_partition_create+0x48>
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
a000bb3c: e3520000 cmp r2, #0
a000bb40: 13530000 cmpne r3, #0
a000bb44: 1a000003 bne a000bb58 <rtems_partition_create+0x50>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
a000bb48: e3a00008 mov r0, #8 <== NOT EXECUTED
a000bb4c: eafffff4 b a000bb24 <rtems_partition_create+0x1c> <== NOT EXECUTED
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
a000bb50: e3a00009 mov r0, #9 <== NOT EXECUTED
a000bb54: eafffff2 b a000bb24 <rtems_partition_create+0x1c> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
a000bb58: e1520003 cmp r2, r3
a000bb5c: 3afffff9 bcc a000bb48 <rtems_partition_create+0x40>
a000bb60: e3130003 tst r3, #3
a000bb64: 1afffff7 bne a000bb48 <rtems_partition_create+0x40>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
a000bb68: e2118007 ands r8, r1, #7
a000bb6c: 1afffff7 bne a000bb50 <rtems_partition_create+0x48>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000bb70: e59f109c ldr r1, [pc, #156] ; a000bc14 <rtems_partition_create+0x10c>
a000bb74: e5910000 ldr r0, [r1]
++level;
a000bb78: e2800001 add r0, r0, #1
_Thread_Dispatch_disable_level = level;
a000bb7c: 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 );
a000bb80: e59fa090 ldr sl, [pc, #144] ; a000bc18 <rtems_partition_create+0x110>
a000bb84: e58d2004 str r2, [sp, #4]
a000bb88: e58d3000 str r3, [sp]
a000bb8c: e1a0000a mov r0, sl
a000bb90: eb00071c bl a000d808 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
a000bb94: e2507000 subs r7, r0, #0
a000bb98: e59d2004 ldr r2, [sp, #4]
a000bb9c: e59d3000 ldr r3, [sp]
a000bba0: 0a000018 beq a000bc08 <rtems_partition_create+0x100>
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
a000bba4: e59d1028 ldr r1, [sp, #40] ; 0x28
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
a000bba8: e5872014 str r2, [r7, #20]
the_partition->buffer_size = buffer_size;
a000bbac: e5873018 str r3, [r7, #24]
the_partition->attribute_set = attribute_set;
a000bbb0: e587101c str r1, [r7, #28]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
a000bbb4: 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,
a000bbb8: 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;
a000bbbc: e5878020 str r8, [r7, #32]
_Chain_Initialize( &the_partition->Memory, starting_address,
a000bbc0: e1a00002 mov r0, r2
a000bbc4: e58d3000 str r3, [sp]
a000bbc8: eb0046d1 bl a001d714 <__aeabi_uidiv>
a000bbcc: e2879024 add r9, r7, #36 ; 0x24
a000bbd0: e1a02000 mov r2, r0
a000bbd4: e1a01004 mov r1, r4
a000bbd8: e1a00009 mov r0, r9
a000bbdc: e59d3000 ldr r3, [sp]
a000bbe0: eb000473 bl a000cdb4 <_Chain_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000bbe4: e59a201c ldr r2, [sl, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000bbe8: e5973008 ldr r3, [r7, #8]
a000bbec: e1d710b8 ldrh r1, [r7, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000bbf0: e7827101 str r7, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000bbf4: e587600c str r6, [r7, #12]
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
a000bbf8: e5853000 str r3, [r5]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
a000bbfc: eb000c1e bl a000ec7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000bc00: e1a00008 mov r0, r8
a000bc04: eaffffc6 b a000bb24 <rtems_partition_create+0x1c>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
a000bc08: eb000c1b bl a000ec7c <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a000bc0c: e3a00005 mov r0, #5 <== NOT EXECUTED
a000bc10: eaffffc3 b a000bb24 <rtems_partition_create+0x1c> <== NOT EXECUTED
a0018648 <rtems_partition_delete>:
#include <rtems/score/sysstate.h>
rtems_status_code rtems_partition_delete(
rtems_id id
)
{
a0018648: e92d4030 push {r4, r5, lr}
a001864c: e24dd004 sub sp, sp, #4
a0018650: e1a01000 mov r1, r0
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
a0018654: e1a0200d mov r2, sp
a0018658: e59f0054 ldr r0, [pc, #84] ; a00186b4 <rtems_partition_delete+0x6c>
a001865c: eb0014b8 bl a001d944 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0018660: e59d3000 ldr r3, [sp]
a0018664: e1a04000 mov r4, r0
a0018668: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001866c: 13a00004 movne r0, #4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0018670: 1a000004 bne a0018688 <rtems_partition_delete+0x40>
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
a0018674: e5945020 ldr r5, [r4, #32]
a0018678: e3550000 cmp r5, #0
a001867c: 0a000003 beq a0018690 <rtems_partition_delete+0x48>
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
a0018680: eb00187e bl a001e880 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
a0018684: e3a0000c mov r0, #12 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0018688: e28dd004 add sp, sp, #4
a001868c: 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 );
a0018690: e59f001c ldr r0, [pc, #28] ; a00186b4 <rtems_partition_delete+0x6c>
a0018694: e1a01004 mov r1, r4
a0018698: eb001387 bl a001d4bc <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Partition_Free (
Partition_Control *the_partition
)
{
_Objects_Free( &_Partition_Information, &the_partition->Object );
a001869c: e59f0010 ldr r0, [pc, #16] ; a00186b4 <rtems_partition_delete+0x6c>
a00186a0: e1a01004 mov r1, r4
a00186a4: eb00143f bl a001d7a8 <_Objects_Free>
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
a00186a8: eb001874 bl a001e880 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00186ac: e1a00005 mov r0, r5
a00186b0: eafffff4 b a0018688 <rtems_partition_delete+0x40>
a0018764 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
a0018764: e92d4070 push {r4, r5, r6, lr}
a0018768: e1a03000 mov r3, r0
a001876c: e24dd004 sub sp, sp, #4
a0018770: e1a04001 mov r4, r1
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
a0018774: e59f008c ldr r0, [pc, #140] ; a0018808 <rtems_partition_return_buffer+0xa4>
a0018778: e1a01003 mov r1, r3
a001877c: e1a0200d mov r2, sp
a0018780: eb00146f bl a001d944 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0018784: e59d3000 ldr r3, [sp]
a0018788: e1a05000 mov r5, r0
a001878c: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0018790: 13a00004 movne r0, #4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0018794: 1a000016 bne a00187f4 <rtems_partition_return_buffer+0x90>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
a0018798: e5950010 ldr r0, [r5, #16]
a001879c: e5953014 ldr r3, [r5, #20]
a00187a0: e0803003 add r3, r0, r3
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
a00187a4: e1540003 cmp r4, r3
a00187a8: 83a03000 movhi r3, #0
a00187ac: 93a03001 movls r3, #1
a00187b0: e1540000 cmp r4, r0
a00187b4: 33a03000 movcc r3, #0
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
a00187b8: e3530000 cmp r3, #0
a00187bc: 0a00000e beq a00187fc <rtems_partition_return_buffer+0x98>
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
a00187c0: e0600004 rsb r0, r0, r4
a00187c4: e5951018 ldr r1, [r5, #24]
a00187c8: eb00588c bl a002ea00 <__umodsi3>
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
a00187cc: e2506000 subs r6, r0, #0
a00187d0: 1a000009 bne a00187fc <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 );
a00187d4: e2850024 add r0, r5, #36 ; 0x24
a00187d8: e1a01004 mov r1, r4
a00187dc: eb000cb1 bl a001baa8 <_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;
a00187e0: e5953020 ldr r3, [r5, #32]
a00187e4: e2433001 sub r3, r3, #1
a00187e8: e5853020 str r3, [r5, #32]
_Thread_Enable_dispatch();
a00187ec: eb001823 bl a001e880 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00187f0: e1a00006 mov r0, r6
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00187f4: e28dd004 add sp, sp, #4
a00187f8: 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();
a00187fc: eb00181f bl a001e880 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
a0018800: e3a00009 mov r0, #9 <== NOT EXECUTED
a0018804: eafffffa b a00187f4 <rtems_partition_return_buffer+0x90> <== NOT EXECUTED
a0017b1c <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
a0017b1c: e92d40f0 push {r4, r5, r6, r7, lr}
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
a0017b20: e2504000 subs r4, r0, #0
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
a0017b24: e24dd00c sub sp, sp, #12
a0017b28: e59d5020 ldr r5, [sp, #32]
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0017b2c: 03a00003 moveq r0, #3
rtems_id *id
)
{
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
a0017b30: 1a000001 bne a0017b3c <rtems_port_create+0x20>
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a0017b34: e28dd00c add sp, sp, #12
a0017b38: e8bd80f0 pop {r4, r5, r6, r7, pc}
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a0017b3c: e3550000 cmp r5, #0
a0017b40: 0a000002 beq a0017b50 <rtems_port_create+0x34>
#include <rtems/rtems/dpmem.h>
#include <rtems/score/object.h>
#include <rtems/score/thread.h>
#include <rtems/rtems/dpmem.h>
rtems_status_code rtems_port_create(
a0017b44: e1826001 orr r6, r2, r1
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
a0017b48: e2166007 ands r6, r6, #7
a0017b4c: 0a000001 beq a0017b58 <rtems_port_create+0x3c>
!_Addresses_Is_aligned( external_start ) )
return RTEMS_INVALID_ADDRESS;
a0017b50: e3a00009 mov r0, #9 <== NOT EXECUTED
a0017b54: eafffff6 b a0017b34 <rtems_port_create+0x18> <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a0017b58: e59f0074 ldr r0, [pc, #116] ; a0017bd4 <rtems_port_create+0xb8>
a0017b5c: e590c000 ldr ip, [r0]
++level;
a0017b60: e28cc001 add ip, ip, #1
_Thread_Dispatch_disable_level = level;
a0017b64: e580c000 str ip, [r0]
* of free port control blocks.
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
a0017b68: e59f7068 ldr r7, [pc, #104] ; a0017bd8 <rtems_port_create+0xbc>
a0017b6c: e58d1008 str r1, [sp, #8]
a0017b70: e58d2004 str r2, [sp, #4]
a0017b74: e1a00007 mov r0, r7
a0017b78: e58d3000 str r3, [sp]
a0017b7c: eb00162b bl a001d430 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
a0017b80: e3500000 cmp r0, #0
a0017b84: e59d1008 ldr r1, [sp, #8]
a0017b88: e59d2004 ldr r2, [sp, #4]
a0017b8c: e59d3000 ldr r3, [sp]
a0017b90: 0a00000c beq a0017bc8 <rtems_port_create+0xac>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a0017b94: e590c008 ldr ip, [r0, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0017b98: 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;
a0017b9c: e2433001 sub r3, r3, #1
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0017ba0: e1a0780c lsl r7, ip, #16
if ( !the_port ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
a0017ba4: e5801010 str r1, [r0, #16]
the_port->external_base = external_start;
a0017ba8: e5802014 str r2, [r0, #20]
the_port->length = length - 1;
a0017bac: e5803018 str r3, [r0, #24]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0017bb0: e78e0727 str r0, [lr, r7, lsr #14]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0017bb4: e580400c str r4, [r0, #12]
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
a0017bb8: e585c000 str ip, [r5]
_Thread_Enable_dispatch();
a0017bbc: eb001b2f bl a001e880 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0017bc0: e1a00006 mov r0, r6
a0017bc4: eaffffda b a0017b34 <rtems_port_create+0x18>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
_Thread_Enable_dispatch();
a0017bc8: eb001b2c bl a001e880 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
a0017bcc: e3a00005 mov r0, #5
a0017bd0: eaffffd7 b a0017b34 <rtems_port_create+0x18>
a001880c <rtems_rate_monotonic_cancel>:
#include <rtems/score/thread.h>
rtems_status_code rtems_rate_monotonic_cancel(
rtems_id id
)
{
a001880c: e92d4030 push {r4, r5, lr}
a0018810: e24dd004 sub sp, sp, #4
a0018814: e1a01000 mov r1, r0
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
a0018818: e1a0200d mov r2, sp
a001881c: e59f0064 ldr r0, [pc, #100] ; a0018888 <rtems_rate_monotonic_cancel+0x7c>
a0018820: eb001447 bl a001d944 <_Objects_Get>
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a0018824: e59d4000 ldr r4, [sp]
a0018828: e1a05000 mov r5, r0
a001882c: e3540000 cmp r4, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0018830: 13a00004 movne r0, #4
{
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a0018834: 1a000006 bne a0018854 <rtems_rate_monotonic_cancel+0x48>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
a0018838: e59f304c ldr r3, [pc, #76] ; a001888c <rtems_rate_monotonic_cancel+0x80>
a001883c: e5952040 ldr r2, [r5, #64] ; 0x40
a0018840: e5933008 ldr r3, [r3, #8]
a0018844: e1520003 cmp r2, r3
a0018848: 0a000003 beq a001885c <rtems_rate_monotonic_cancel+0x50>
_Thread_Enable_dispatch();
a001884c: eb00180b bl a001e880 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_OWNER_OF_RESOURCE;
a0018850: e3a00017 mov r0, #23 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0018854: e28dd004 add sp, sp, #4
a0018858: 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 );
a001885c: e2850010 add r0, r5, #16
a0018860: eb001bf6 bl a001f840 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Scheduler_Release_job(
Thread_Control *the_thread,
uint32_t length
)
{
_Scheduler.Operations.release_job(the_thread, length);
a0018864: e59f3024 ldr r3, [pc, #36] ; a0018890 <rtems_rate_monotonic_cancel+0x84>
a0018868: e5950040 ldr r0, [r5, #64] ; 0x40
a001886c: e1a01004 mov r1, r4
a0018870: e5933034 ldr r3, [r3, #52] ; 0x34
the_period->state = RATE_MONOTONIC_INACTIVE;
a0018874: e5854038 str r4, [r5, #56] ; 0x38
a0018878: e12fff33 blx r3
_Scheduler_Release_job(the_period->owner, 0);
_Thread_Enable_dispatch();
a001887c: eb0017ff bl a001e880 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0018880: e1a00004 mov r0, r4
a0018884: eafffff2 b a0018854 <rtems_rate_monotonic_cancel+0x48>
a000bc1c <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
a000bc1c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
a000bc20: e2506000 subs r6, r0, #0
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
a000bc24: e1a05001 mov r5, r1
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
a000bc28: 1a000001 bne a000bc34 <rtems_rate_monotonic_create+0x18>
return RTEMS_INVALID_NAME;
a000bc2c: e3a00003 mov r0, #3 <== NOT EXECUTED
a000bc30: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
if ( !id )
a000bc34: e3510000 cmp r1, #0
a000bc38: 0a000024 beq a000bcd0 <rtems_rate_monotonic_create+0xb4>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000bc3c: e59f30a0 ldr r3, [pc, #160] ; a000bce4 <rtems_rate_monotonic_create+0xc8>
a000bc40: e5932000 ldr r2, [r3]
++level;
a000bc44: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000bc48: e5832000 str r2, [r3]
* This function allocates a period control block from
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
a000bc4c: e59f8094 ldr r8, [pc, #148] ; a000bce8 <rtems_rate_monotonic_create+0xcc>
a000bc50: e1a00008 mov r0, r8
a000bc54: eb0006eb bl a000d808 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
a000bc58: e2504000 subs r4, r0, #0
a000bc5c: 0a00001d beq a000bcd8 <rtems_rate_monotonic_create+0xbc>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
a000bc60: e59f3084 ldr r3, [pc, #132] ; a000bcec <rtems_rate_monotonic_create+0xd0>
the_period->state = RATE_MONOTONIC_INACTIVE;
a000bc64: e3a07000 mov r7, #0
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
a000bc68: e1a01007 mov r1, r7
if ( !the_period ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
a000bc6c: e5933008 ldr r3, [r3, #8]
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
a000bc70: e3a02038 mov r2, #56 ; 0x38
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
the_period->state = RATE_MONOTONIC_INACTIVE;
a000bc74: e5847038 str r7, [r4, #56] ; 0x38
if ( !the_period ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
a000bc78: e5843040 str r3, [r4, #64] ; 0x40
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000bc7c: e5847018 str r7, [r4, #24]
the_watchdog->routine = routine;
a000bc80: e584702c str r7, [r4, #44] ; 0x2c
the_watchdog->id = id;
a000bc84: e5847030 str r7, [r4, #48] ; 0x30
the_watchdog->user_data = user_data;
a000bc88: e5847034 str r7, [r4, #52] ; 0x34
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
a000bc8c: e2840054 add r0, r4, #84 ; 0x54
a000bc90: eb002509 bl a00150bc <memset>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000bc94: e5943008 ldr r3, [r4, #8]
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
a000bc98: e59f0050 ldr r0, [pc, #80] ; a000bcf0 <rtems_rate_monotonic_create+0xd4>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000bc9c: e598201c ldr r2, [r8, #28]
a000bca0: e59f104c ldr r1, [pc, #76] ; a000bcf4 <rtems_rate_monotonic_create+0xd8>
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000bca4: e1a0c803 lsl ip, r3, #16
a000bca8: e584005c str r0, [r4, #92] ; 0x5c
a000bcac: e5841060 str r1, [r4, #96] ; 0x60
a000bcb0: e5840074 str r0, [r4, #116] ; 0x74
a000bcb4: e5841078 str r1, [r4, #120] ; 0x78
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000bcb8: e782472c str r4, [r2, ip, lsr #14]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000bcbc: e584600c str r6, [r4, #12]
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
a000bcc0: e5853000 str r3, [r5]
_Thread_Enable_dispatch();
a000bcc4: eb000bec bl a000ec7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000bcc8: e1a00007 mov r0, r7
a000bccc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a000bcd0: e3a00009 mov r0, #9 <== NOT EXECUTED
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000bcd4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
_Thread_Enable_dispatch();
a000bcd8: eb000be7 bl a000ec7c <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a000bcdc: e3a00005 mov r0, #5 <== NOT EXECUTED
a000bce0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0037068 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
a0037068: e92d4370 push {r4, r5, r6, r8, r9, lr} <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
a003706c: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
a0037070: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a0037074: 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;
a0037078: 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 )
a003707c: 0a000061 beq a0037208 <rtems_rate_monotonic_get_statistics+0x1a0><== NOT EXECUTED
a0037080: e59f0188 ldr r0, [pc, #392] ; a0037210 <rtems_rate_monotonic_get_statistics+0x1a8><== NOT EXECUTED
a0037084: e1a0200d mov r2, sp <== NOT EXECUTED
a0037088: ebff5641 bl a000c994 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a003708c: e59d6000 ldr r6, [sp] <== NOT EXECUTED
a0037090: e1a05000 mov r5, r0 <== NOT EXECUTED
a0037094: e3560000 cmp r6, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0037098: 13a00004 movne r0, #4 <== NOT EXECUTED
if ( !statistics )
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a003709c: 1a000059 bne a0037208 <rtems_rate_monotonic_get_statistics+0x1a0><== NOT EXECUTED
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
a00370a0: e5950054 ldr r0, [r5, #84] ; 0x54 <== NOT EXECUTED
dst->missed_count = src->missed_count;
a00370a4: e5951058 ldr r1, [r5, #88] ; 0x58 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00370a8: e285905c add r9, r5, #92 ; 0x5c <== NOT EXECUTED
a00370ac: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00370b0: e59f215c ldr r2, [pc, #348] ; a0037214 <rtems_rate_monotonic_get_statistics+0x1ac><== NOT EXECUTED
a00370b4: e3a03000 mov r3, #0 <== NOT EXECUTED
switch ( location ) {
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
a00370b8: e5840000 str r0, [r4] <== NOT EXECUTED
dst->missed_count = src->missed_count;
a00370bc: e5841004 str r1, [r4, #4] <== NOT EXECUTED
a00370c0: e1a00008 mov r0, r8 <== NOT EXECUTED
a00370c4: e1a01009 mov r1, r9 <== NOT EXECUTED
a00370c8: eb007707 bl a0054cec <__divdi3> <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00370cc: e59f2140 ldr r2, [pc, #320] ; a0037214 <rtems_rate_monotonic_get_statistics+0x1ac><== NOT EXECUTED
a00370d0: e3a03000 mov r3, #0 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00370d4: e5840008 str r0, [r4, #8] <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00370d8: e1a01009 mov r1, r9 <== NOT EXECUTED
a00370dc: e1a00008 mov r0, r8 <== NOT EXECUTED
a00370e0: eb00783c bl a00551d8 <__moddi3> <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00370e4: e2859064 add r9, r5, #100 ; 0x64 <== NOT EXECUTED
a00370e8: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00370ec: e59f2120 ldr r2, [pc, #288] ; a0037214 <rtems_rate_monotonic_get_statistics+0x1ac><== NOT EXECUTED
a00370f0: e3a03000 mov r3, #0 <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00370f4: e584000c str r0, [r4, #12] <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00370f8: e1a01009 mov r1, r9 <== NOT EXECUTED
a00370fc: e1a00008 mov r0, r8 <== NOT EXECUTED
a0037100: eb0076f9 bl a0054cec <__divdi3> <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a0037104: e59f2108 ldr r2, [pc, #264] ; a0037214 <rtems_rate_monotonic_get_statistics+0x1ac><== NOT EXECUTED
a0037108: e3a03000 mov r3, #0 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a003710c: e5840010 str r0, [r4, #16] <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a0037110: e1a01009 mov r1, r9 <== NOT EXECUTED
a0037114: e1a00008 mov r0, r8 <== NOT EXECUTED
a0037118: eb00782e bl a00551d8 <__moddi3> <== NOT EXECUTED
a003711c: e285906c add r9, r5, #108 ; 0x6c <== NOT EXECUTED
a0037120: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a0037124: e59f20e8 ldr r2, [pc, #232] ; a0037214 <rtems_rate_monotonic_get_statistics+0x1ac><== NOT EXECUTED
a0037128: e3a03000 mov r3, #0 <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a003712c: e5840014 str r0, [r4, #20] <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a0037130: e1a01009 mov r1, r9 <== NOT EXECUTED
a0037134: e1a00008 mov r0, r8 <== NOT EXECUTED
a0037138: eb0076eb bl a0054cec <__divdi3> <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a003713c: e59f20d0 ldr r2, [pc, #208] ; a0037214 <rtems_rate_monotonic_get_statistics+0x1ac><== NOT EXECUTED
a0037140: e3a03000 mov r3, #0 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a0037144: e5840018 str r0, [r4, #24] <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a0037148: e1a01009 mov r1, r9 <== NOT EXECUTED
a003714c: e1a00008 mov r0, r8 <== NOT EXECUTED
a0037150: eb007820 bl a00551d8 <__moddi3> <== NOT EXECUTED
a0037154: e2859074 add r9, r5, #116 ; 0x74 <== NOT EXECUTED
a0037158: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a003715c: e59f20b0 ldr r2, [pc, #176] ; a0037214 <rtems_rate_monotonic_get_statistics+0x1ac><== NOT EXECUTED
a0037160: e3a03000 mov r3, #0 <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a0037164: e584001c str r0, [r4, #28] <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a0037168: e1a01009 mov r1, r9 <== NOT EXECUTED
a003716c: e1a00008 mov r0, r8 <== NOT EXECUTED
a0037170: eb0076dd bl a0054cec <__divdi3> <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a0037174: e59f2098 ldr r2, [pc, #152] ; a0037214 <rtems_rate_monotonic_get_statistics+0x1ac><== NOT EXECUTED
a0037178: e3a03000 mov r3, #0 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a003717c: e5840020 str r0, [r4, #32] <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a0037180: e1a01009 mov r1, r9 <== NOT EXECUTED
a0037184: e1a00008 mov r0, r8 <== NOT EXECUTED
a0037188: eb007812 bl a00551d8 <__moddi3> <== NOT EXECUTED
a003718c: e285907c add r9, r5, #124 ; 0x7c <== NOT EXECUTED
a0037190: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a0037194: e59f2078 ldr r2, [pc, #120] ; a0037214 <rtems_rate_monotonic_get_statistics+0x1ac><== NOT EXECUTED
a0037198: e3a03000 mov r3, #0 <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a003719c: e5840024 str r0, [r4, #36] ; 0x24 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00371a0: e1a01009 mov r1, r9 <== NOT EXECUTED
a00371a4: e1a00008 mov r0, r8 <== NOT EXECUTED
a00371a8: eb0076cf bl a0054cec <__divdi3> <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00371ac: e59f2060 ldr r2, [pc, #96] ; a0037214 <rtems_rate_monotonic_get_statistics+0x1ac><== NOT EXECUTED
a00371b0: e3a03000 mov r3, #0 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00371b4: e5840028 str r0, [r4, #40] ; 0x28 <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00371b8: e1a01009 mov r1, r9 <== NOT EXECUTED
a00371bc: e1a00008 mov r0, r8 <== NOT EXECUTED
a00371c0: eb007804 bl a00551d8 <__moddi3> <== NOT EXECUTED
a00371c4: e2859084 add r9, r5, #132 ; 0x84 <== NOT EXECUTED
a00371c8: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00371cc: e59f2040 ldr r2, [pc, #64] ; a0037214 <rtems_rate_monotonic_get_statistics+0x1ac><== NOT EXECUTED
a00371d0: e3a03000 mov r3, #0 <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00371d4: e584002c str r0, [r4, #44] ; 0x2c <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00371d8: e1a01009 mov r1, r9 <== NOT EXECUTED
a00371dc: e1a00008 mov r0, r8 <== NOT EXECUTED
a00371e0: eb0076c1 bl a0054cec <__divdi3> <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00371e4: e59f2028 ldr r2, [pc, #40] ; a0037214 <rtems_rate_monotonic_get_statistics+0x1ac><== NOT EXECUTED
a00371e8: e3a03000 mov r3, #0 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00371ec: e5840030 str r0, [r4, #48] ; 0x30 <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00371f0: e1a01009 mov r1, r9 <== NOT EXECUTED
a00371f4: e1a00008 mov r0, r8 <== NOT EXECUTED
a00371f8: eb0077f6 bl a00551d8 <__moddi3> <== NOT EXECUTED
a00371fc: e5840034 str r0, [r4, #52] ; 0x34 <== 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();
a0037200: ebff5991 bl a000d84c <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0037204: e1a00006 mov r0, r6 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0037208: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a003720c: e8bd8370 pop {r4, r5, r6, r8, r9, pc} <== NOT EXECUTED
a0037218 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
a0037218: e92d40d0 push {r4, r6, r7, lr}
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
a003721c: e2514000 subs r4, r1, #0
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
a0037220: e24dd014 sub sp, sp, #20
a0037224: 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;
a0037228: 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 )
a003722c: 0a000014 beq a0037284 <rtems_rate_monotonic_get_status+0x6c>
a0037230: e28d2010 add r2, sp, #16
a0037234: e59f00e0 ldr r0, [pc, #224] ; a003731c <rtems_rate_monotonic_get_status+0x104>
a0037238: ebff55d5 bl a000c994 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a003723c: e59d3010 ldr r3, [sp, #16]
a0037240: e1a02000 mov r2, r0
a0037244: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0037248: 13a00004 movne r0, #4
if ( !status )
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a003724c: 1a00000c bne a0037284 <rtems_rate_monotonic_get_status+0x6c>
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
a0037250: e5921040 ldr r1, [r2, #64] ; 0x40
status->state = the_period->state;
a0037254: e5923038 ldr r3, [r2, #56] ; 0x38
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
a0037258: e5912008 ldr r2, [r1, #8]
status->state = the_period->state;
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
a003725c: 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;
a0037260: e5843004 str r3, [r4, #4]
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
a0037264: e5842000 str r2, [r4]
status->state = the_period->state;
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
a0037268: 1a000007 bne a003728c <rtems_rate_monotonic_get_status+0x74>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
a003726c: e5843008 str r3, [r4, #8]
a0037270: e584300c str r3, [r4, #12]
_Timespec_Set_to_zero( &status->executed_since_last_period );
a0037274: e5843010 str r3, [r4, #16]
a0037278: e5843014 str r3, [r4, #20]
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
a003727c: ebff5972 bl a000d84c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0037280: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0037284: e28dd014 add sp, sp, #20
a0037288: e8bd80d0 pop {r4, r6, r7, pc}
} else {
/*
* Grab the current status.
*/
valid_status =
a003728c: e28d1008 add r1, sp, #8 <== NOT EXECUTED
a0037290: e1a0200d mov r2, sp <== NOT EXECUTED
a0037294: eb000022 bl a0037324 <_Rate_monotonic_Get_status> <== NOT EXECUTED
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
a0037298: e3500000 cmp r0, #0 <== NOT EXECUTED
a003729c: 0a00001b beq a0037310 <rtems_rate_monotonic_get_status+0xf8><== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
a00372a0: e28d7008 add r7, sp, #8 <== NOT EXECUTED
a00372a4: e89700c0 ldm r7, {r6, r7} <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00372a8: e59f2070 ldr r2, [pc, #112] ; a0037320 <rtems_rate_monotonic_get_status+0x108><== NOT EXECUTED
a00372ac: e3a03000 mov r3, #0 <== NOT EXECUTED
a00372b0: e1a00006 mov r0, r6 <== NOT EXECUTED
a00372b4: e1a01007 mov r1, r7 <== NOT EXECUTED
a00372b8: eb00768b bl a0054cec <__divdi3> <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00372bc: e59f205c ldr r2, [pc, #92] ; a0037320 <rtems_rate_monotonic_get_status+0x108><== NOT EXECUTED
a00372c0: e3a03000 mov r3, #0 <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00372c4: e5840008 str r0, [r4, #8] <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00372c8: e1a01007 mov r1, r7 <== NOT EXECUTED
a00372cc: e1a00006 mov r0, r6 <== NOT EXECUTED
a00372d0: eb0077c0 bl a00551d8 <__moddi3> <== NOT EXECUTED
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
a00372d4: e89d00c0 ldm sp, {r6, r7} <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00372d8: e59f2040 ldr r2, [pc, #64] ; a0037320 <rtems_rate_monotonic_get_status+0x108><== NOT EXECUTED
a00372dc: e3a03000 mov r3, #0 <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00372e0: e584000c str r0, [r4, #12] <== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00372e4: e1a01007 mov r1, r7 <== NOT EXECUTED
a00372e8: e1a00006 mov r0, r6 <== NOT EXECUTED
a00372ec: eb00767e bl a0054cec <__divdi3> <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00372f0: e59f2028 ldr r2, [pc, #40] ; a0037320 <rtems_rate_monotonic_get_status+0x108><== NOT EXECUTED
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a00372f4: e5840010 str r0, [r4, #16] <== NOT EXECUTED
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a00372f8: e3a03000 mov r3, #0 <== NOT EXECUTED
a00372fc: e1a00006 mov r0, r6 <== NOT EXECUTED
a0037300: e1a01007 mov r1, r7 <== NOT EXECUTED
a0037304: eb0077b3 bl a00551d8 <__moddi3> <== NOT EXECUTED
a0037308: e5840014 str r0, [r4, #20] <== NOT EXECUTED
a003730c: eaffffda b a003727c <rtems_rate_monotonic_get_status+0x64> <== NOT EXECUTED
valid_status =
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
_Thread_Enable_dispatch();
a0037310: ebff594d bl a000d84c <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
a0037314: e3a0000b mov r0, #11 <== NOT EXECUTED
a0037318: eaffffd9 b a0037284 <rtems_rate_monotonic_get_status+0x6c> <== NOT EXECUTED
a0037548 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
a0037548: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a003754c: e1a04000 mov r4, r0
a0037550: e24dd008 sub sp, sp, #8
a0037554: e1a05001 mov r5, r1
a0037558: e59f0190 ldr r0, [pc, #400] ; a00376f0 <rtems_rate_monotonic_period+0x1a8>
a003755c: e1a01004 mov r1, r4
a0037560: e28d2004 add r2, sp, #4
a0037564: ebff550a bl a000c994 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a0037568: e59d3004 ldr r3, [sp, #4]
a003756c: e1a06000 mov r6, r0
a0037570: e3530000 cmp r3, #0
a0037574: 1a000007 bne a0037598 <rtems_rate_monotonic_period+0x50>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a0037578: e59f7174 ldr r7, [pc, #372] ; a00376f4 <rtems_rate_monotonic_period+0x1ac>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
a003757c: e5902040 ldr r2, [r0, #64] ; 0x40
a0037580: e5973008 ldr r3, [r7, #8]
a0037584: e1520003 cmp r2, r3
a0037588: 0a000005 beq a00375a4 <rtems_rate_monotonic_period+0x5c>
_Thread_Enable_dispatch();
a003758c: ebff58ae bl a000d84c <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_OWNER_OF_RESOURCE;
a0037590: e3a00017 mov r0, #23 <== NOT EXECUTED
a0037594: ea000000 b a003759c <rtems_rate_monotonic_period+0x54> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0037598: e3a00004 mov r0, #4 <== NOT EXECUTED
}
a003759c: e28dd008 add sp, sp, #8
a00375a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
a00375a4: e3550000 cmp r5, #0
a00375a8: 0a00001c beq a0037620 <rtems_rate_monotonic_period+0xd8>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a00375ac: e10f8000 mrs r8, CPSR
a00375b0: e3883080 orr r3, r8, #128 ; 0x80
a00375b4: e129f003 msr CPSR_fc, r3
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
a00375b8: e5903038 ldr r3, [r0, #56] ; 0x38
a00375bc: e3530000 cmp r3, #0
a00375c0: 0a00001c beq a0037638 <rtems_rate_monotonic_period+0xf0>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
a00375c4: e3530002 cmp r3, #2
a00375c8: 0a00002d beq a0037684 <rtems_rate_monotonic_period+0x13c>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
a00375cc: e3530004 cmp r3, #4 <== NOT EXECUTED
a00375d0: 1afffff0 bne a0037598 <rtems_rate_monotonic_period+0x50> <== NOT EXECUTED
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
a00375d4: ebffff7d bl a00373d0 <_Rate_monotonic_Update_statistics> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a00375d8: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
a00375dc: e3a03002 mov r3, #2 <== NOT EXECUTED
a00375e0: e59f0110 ldr r0, [pc, #272] ; a00376f8 <rtems_rate_monotonic_period+0x1b0><== NOT EXECUTED
a00375e4: e2861010 add r1, r6, #16 <== NOT EXECUTED
a00375e8: e5863038 str r3, [r6, #56] ; 0x38 <== NOT EXECUTED
the_period->next_length = length;
a00375ec: e586503c str r5, [r6, #60] ; 0x3c <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a00375f0: e586501c str r5, [r6, #28] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a00375f4: ebff5ba1 bl a000e480 <_Watchdog_Insert> <== NOT EXECUTED
a00375f8: e59f30fc ldr r3, [pc, #252] ; a00376fc <rtems_rate_monotonic_period+0x1b4><== NOT EXECUTED
a00375fc: e5960040 ldr r0, [r6, #64] ; 0x40 <== NOT EXECUTED
a0037600: e596103c ldr r1, [r6, #60] ; 0x3c <== NOT EXECUTED
a0037604: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
a0037608: e12fff33 blx r3 <== NOT EXECUTED
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
a003760c: e3a00006 mov r0, #6 <== NOT EXECUTED
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
a0037610: e58d0000 str r0, [sp]
a0037614: ebff588c bl a000d84c <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
a0037618: e59d0000 ldr r0, [sp]
a003761c: eaffffde b a003759c <rtems_rate_monotonic_period+0x54>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
a0037620: e5903038 ldr r3, [r0, #56] ; 0x38
a0037624: e3530004 cmp r3, #4
a0037628: 959f20d0 ldrls r2, [pc, #208] ; a0037700 <rtems_rate_monotonic_period+0x1b8>
a003762c: 81a00005 movhi r0, r5
a0037630: 97920103 ldrls r0, [r2, r3, lsl #2]
a0037634: eafffff5 b a0037610 <rtems_rate_monotonic_period+0xc8>
a0037638: e129f008 msr CPSR_fc, r8
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
the_period->next_length = length;
a003763c: e586503c str r5, [r6, #60] ; 0x3c
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
a0037640: ebffff9b bl a00374b4 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
a0037644: e3a03002 mov r3, #2
a0037648: e5863038 str r3, [r6, #56] ; 0x38
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a003764c: e59f30b0 ldr r3, [pc, #176] ; a0037704 <rtems_rate_monotonic_period+0x1bc>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0037650: e3a07000 mov r7, #0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0037654: e59f009c ldr r0, [pc, #156] ; a00376f8 <rtems_rate_monotonic_period+0x1b0>
a0037658: e2861010 add r1, r6, #16
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a003765c: e586302c str r3, [r6, #44] ; 0x2c
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0037660: e5867018 str r7, [r6, #24]
the_watchdog->routine = routine;
the_watchdog->id = id;
a0037664: e5864030 str r4, [r6, #48] ; 0x30
the_watchdog->user_data = user_data;
a0037668: e5867034 str r7, [r6, #52] ; 0x34
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a003766c: e586501c str r5, [r6, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0037670: ebff5b82 bl a000e480 <_Watchdog_Insert>
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
a0037674: e58d7000 str r7, [sp]
a0037678: ebff5873 bl a000d84c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a003767c: e59d0000 ldr r0, [sp]
a0037680: eaffffc5 b a003759c <rtems_rate_monotonic_period+0x54>
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
a0037684: ebffff51 bl a00373d0 <_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;
a0037688: e3a03001 mov r3, #1
a003768c: e5863038 str r3, [r6, #56] ; 0x38
the_period->next_length = length;
a0037690: e586503c str r5, [r6, #60] ; 0x3c
a0037694: e129f008 msr CPSR_fc, r8
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
a0037698: e5973008 ldr r3, [r7, #8]
a003769c: e5962008 ldr r2, [r6, #8]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a00376a0: e3a01901 mov r1, #16384 ; 0x4000
a00376a4: 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;
a00376a8: e5832020 str r2, [r3, #32]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a00376ac: ebff5a96 bl a000e10c <_Thread_Set_state>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a00376b0: e10f2000 mrs r2, CPSR
a00376b4: e3823080 orr r3, r2, #128 ; 0x80
a00376b8: 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;
a00376bc: e3a01002 mov r1, #2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
a00376c0: e5963038 ldr r3, [r6, #56] ; 0x38
the_period->state = RATE_MONOTONIC_ACTIVE;
a00376c4: e5861038 str r1, [r6, #56] ; 0x38
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a00376c8: 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 )
a00376cc: e3530003 cmp r3, #3
a00376d0: 0a000002 beq a00376e0 <rtems_rate_monotonic_period+0x198>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
a00376d4: ebff585c bl a000d84c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00376d8: e3a00000 mov r0, #0 <== NOT EXECUTED
a00376dc: eaffffae b a003759c <rtems_rate_monotonic_period+0x54> <== 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 );
a00376e0: e5970008 ldr r0, [r7, #8] <== NOT EXECUTED
a00376e4: e3a01901 mov r1, #16384 ; 0x4000 <== NOT EXECUTED
a00376e8: ebff5761 bl a000d474 <_Thread_Clear_state> <== NOT EXECUTED
a00376ec: eafffff8 b a00376d4 <rtems_rate_monotonic_period+0x18c> <== NOT EXECUTED
a002a628 <rtems_rate_monotonic_report_statistics>:
}
}
void rtems_rate_monotonic_report_statistics( void )
{
rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin );
a002a628: e59f1004 ldr r1, [pc, #4] ; a002a634 <rtems_rate_monotonic_report_statistics+0xc><== NOT EXECUTED
a002a62c: e3a00000 mov r0, #0 <== NOT EXECUTED
a002a630: eaffff7d b a002a42c <rtems_rate_monotonic_report_statistics_with_plugin><== NOT EXECUTED
a002a42c <rtems_rate_monotonic_report_statistics_with_plugin>:
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a002a42c: e92d45f0 push {r4, r5, r6, r7, r8, sl, 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 )
a002a430: e2515000 subs r5, r1, #0 <== NOT EXECUTED
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a002a434: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED
a002a438: e1a07000 mov r7, r0 <== NOT EXECUTED
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
a002a43c: 0a000039 beq a002a528 <rtems_rate_monotonic_report_statistics_with_plugin+0xfc><== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
a002a440: e59f11b4 ldr r1, [pc, #436] ; a002a5fc <rtems_rate_monotonic_report_statistics_with_plugin+0x1d0><== NOT EXECUTED
a002a444: e12fff35 blx r5 <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
a002a448: e59f11b0 ldr r1, [pc, #432] ; a002a600 <rtems_rate_monotonic_report_statistics_with_plugin+0x1d4><== NOT EXECUTED
a002a44c: e1a00007 mov r0, r7 <== NOT EXECUTED
a002a450: 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 ;
a002a454: e59f61a8 ldr r6, [pc, #424] ; a002a604 <rtems_rate_monotonic_report_statistics_with_plugin+0x1d8><== 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" );
a002a458: e59f11a8 ldr r1, [pc, #424] ; a002a608 <rtems_rate_monotonic_report_statistics_with_plugin+0x1dc><== NOT EXECUTED
a002a45c: e1a00007 mov r0, r7 <== NOT EXECUTED
a002a460: e12fff35 blx r5 <== NOT EXECUTED
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
a002a464: e59f11a0 ldr r1, [pc, #416] ; a002a60c <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0><== NOT EXECUTED
a002a468: e1a00007 mov r0, r7 <== NOT EXECUTED
a002a46c: e12fff35 blx r5 <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
a002a470: e1a00007 mov r0, r7 <== NOT EXECUTED
a002a474: e59f1194 ldr r1, [pc, #404] ; a002a610 <rtems_rate_monotonic_report_statistics_with_plugin+0x1e4><== NOT EXECUTED
a002a478: 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 ;
a002a47c: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED
a002a480: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
a002a484: e1540003 cmp r4, r3 <== NOT EXECUTED
a002a488: 8a000026 bhi a002a528 <rtems_rate_monotonic_report_statistics_with_plugin+0xfc><== 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,
a002a48c: e59f8180 ldr r8, [pc, #384] ; a002a614 <rtems_rate_monotonic_report_statistics_with_plugin+0x1e8><== NOT EXECUTED
a002a490: ea000003 b a002a4a4 <rtems_rate_monotonic_report_statistics_with_plugin+0x78><== 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 ;
a002a494: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
a002a498: 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 ;
a002a49c: e1530004 cmp r3, r4 <== NOT EXECUTED
a002a4a0: 3a000020 bcc a002a528 <rtems_rate_monotonic_report_statistics_with_plugin+0xfc><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
a002a4a4: e1a00004 mov r0, r4 <== NOT EXECUTED
a002a4a8: e28d1010 add r1, sp, #16 <== NOT EXECUTED
a002a4ac: eb0032ed bl a0037068 <rtems_rate_monotonic_get_statistics> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL )
a002a4b0: e3500000 cmp r0, #0 <== NOT EXECUTED
a002a4b4: 1afffff6 bne a002a494 <rtems_rate_monotonic_report_statistics_with_plugin+0x68><== 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 );
a002a4b8: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED
a002a4bc: e1a00004 mov r0, r4 <== NOT EXECUTED
a002a4c0: eb003354 bl a0037218 <rtems_rate_monotonic_get_status> <== NOT EXECUTED
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
a002a4c4: e28d2068 add r2, sp, #104 ; 0x68 <== NOT EXECUTED
a002a4c8: e3a01005 mov r1, #5 <== NOT EXECUTED
a002a4cc: e59d0048 ldr r0, [sp, #72] ; 0x48 <== NOT EXECUTED
a002a4d0: ebffa282 bl a0012ee0 <rtems_object_get_name> <== NOT EXECUTED
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
a002a4d4: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
a002a4d8: e1a02004 mov r2, r4 <== NOT EXECUTED
a002a4dc: e28d3068 add r3, sp, #104 ; 0x68 <== NOT EXECUTED
a002a4e0: e58d0000 str r0, [sp] <== NOT EXECUTED
a002a4e4: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
a002a4e8: e59f1128 ldr r1, [pc, #296] ; a002a618 <rtems_rate_monotonic_report_statistics_with_plugin+0x1ec><== NOT EXECUTED
a002a4ec: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
a002a4f0: e1a00007 mov r0, r7 <== NOT EXECUTED
a002a4f4: e12fff35 blx r5 <== NOT EXECUTED
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
a002a4f8: e59d3010 ldr r3, [sp, #16] <== 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 );
a002a4fc: e28d0028 add r0, sp, #40 ; 0x28 <== NOT EXECUTED
a002a500: e28d2060 add r2, sp, #96 ; 0x60 <== NOT EXECUTED
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
a002a504: e3530000 cmp r3, #0 <== NOT EXECUTED
(*print)( context, "\n" );
a002a508: e59f110c ldr r1, [pc, #268] ; a002a61c <rtems_rate_monotonic_report_statistics_with_plugin+0x1f0><== NOT EXECUTED
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
a002a50c: 1a000007 bne a002a530 <rtems_rate_monotonic_report_statistics_with_plugin+0x104><== NOT EXECUTED
(*print)( context, "\n" );
a002a510: e1a00007 mov r0, r7 <== NOT EXECUTED
a002a514: 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 ;
a002a518: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
a002a51c: 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 ;
a002a520: e1530004 cmp r3, r4 <== NOT EXECUTED
a002a524: 2affffde bcs a002a4a4 <rtems_rate_monotonic_report_statistics_with_plugin+0x78><== NOT EXECUTED
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
a002a528: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED
a002a52c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, 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 );
a002a530: e1a01003 mov r1, r3 <== NOT EXECUTED
a002a534: eb00029d bl a002afb0 <_Timespec_Divide_by_integer> <== NOT EXECUTED
(*print)( context,
a002a538: e59de024 ldr lr, [sp, #36] ; 0x24 <== NOT EXECUTED
a002a53c: e59d1064 ldr r1, [sp, #100] ; 0x64 <== NOT EXECUTED
a002a540: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
a002a544: e0cc0e98 smull r0, ip, r8, lr <== NOT EXECUTED
a002a548: e0c03198 smull r3, r0, r8, r1 <== NOT EXECUTED
a002a54c: e1a0efce asr lr, lr, #31 <== NOT EXECUTED
a002a550: e0c3a298 smull sl, r3, r8, r2 <== NOT EXECUTED
a002a554: e06ec34c rsb ip, lr, ip, asr #6 <== NOT EXECUTED
a002a558: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
a002a55c: e59de020 ldr lr, [sp, #32] <== NOT EXECUTED
a002a560: e59dc060 ldr ip, [sp, #96] ; 0x60 <== NOT EXECUTED
a002a564: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED
a002a568: e0610340 rsb r0, r1, r0, asr #6 <== NOT EXECUTED
a002a56c: e1a02fc2 asr r2, r2, #31 <== NOT EXECUTED
a002a570: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
a002a574: e0623343 rsb r3, r2, r3, asr #6 <== NOT EXECUTED
a002a578: e58de000 str lr, [sp] <== NOT EXECUTED
a002a57c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
a002a580: e58d000c str r0, [sp, #12] <== NOT EXECUTED
a002a584: e59f1094 ldr r1, [pc, #148] ; a002a620 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f4><== NOT EXECUTED
a002a588: e1a00007 mov r0, r7 <== NOT EXECUTED
a002a58c: 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);
a002a590: e28d0040 add r0, sp, #64 ; 0x40 <== NOT EXECUTED
a002a594: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
a002a598: e28d2060 add r2, sp, #96 ; 0x60 <== NOT EXECUTED
a002a59c: eb000283 bl a002afb0 <_Timespec_Divide_by_integer> <== NOT EXECUTED
(*print)( context,
a002a5a0: e59d103c ldr r1, [sp, #60] ; 0x3c <== NOT EXECUTED
a002a5a4: e59d2064 ldr r2, [sp, #100] ; 0x64 <== NOT EXECUTED
a002a5a8: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED
a002a5ac: e0cec198 smull ip, lr, r8, r1 <== NOT EXECUTED
a002a5b0: e0c0a298 smull sl, r0, r8, r2 <== NOT EXECUTED
a002a5b4: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED
a002a5b8: e0cca398 smull sl, ip, r8, r3 <== NOT EXECUTED
a002a5bc: e061134e rsb r1, r1, lr, asr #6 <== NOT EXECUTED
a002a5c0: e1a02fc2 asr r2, r2, #31 <== NOT EXECUTED
a002a5c4: e0622340 rsb r2, r2, r0, asr #6 <== NOT EXECUTED
a002a5c8: e58d1004 str r1, [sp, #4] <== NOT EXECUTED
a002a5cc: e59d0038 ldr r0, [sp, #56] ; 0x38 <== NOT EXECUTED
a002a5d0: e59d1060 ldr r1, [sp, #96] ; 0x60 <== NOT EXECUTED
a002a5d4: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED
a002a5d8: e58d0000 str r0, [sp] <== NOT EXECUTED
a002a5dc: e58d1008 str r1, [sp, #8] <== NOT EXECUTED
a002a5e0: e58d200c str r2, [sp, #12] <== NOT EXECUTED
a002a5e4: e1a00007 mov r0, r7 <== NOT EXECUTED
a002a5e8: e59f1034 ldr r1, [pc, #52] ; a002a624 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f8><== NOT EXECUTED
a002a5ec: e59d2030 ldr r2, [sp, #48] ; 0x30 <== NOT EXECUTED
a002a5f0: e063334c rsb r3, r3, ip, asr #6 <== NOT EXECUTED
a002a5f4: e12fff35 blx r5 <== NOT EXECUTED
a002a5f8: eaffffa5 b a002a494 <rtems_rate_monotonic_report_statistics_with_plugin+0x68><== NOT EXECUTED
a002a638 <rtems_rate_monotonic_reset_all_statistics>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a002a638: e59f3040 ldr r3, [pc, #64] ; a002a680 <rtems_rate_monotonic_reset_all_statistics+0x48><== NOT EXECUTED
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
a002a63c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a002a640: e5932000 ldr r2, [r3] <== NOT EXECUTED
++level;
a002a644: e2822001 add r2, r2, #1 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
a002a648: 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 ;
a002a64c: e59f5030 ldr r5, [pc, #48] ; a002a684 <rtems_rate_monotonic_reset_all_statistics+0x4c><== NOT EXECUTED
a002a650: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED
a002a654: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
a002a658: e1540003 cmp r4, r3 <== NOT EXECUTED
a002a65c: 8a000005 bhi a002a678 <rtems_rate_monotonic_reset_all_statistics+0x40><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
a002a660: e1a00004 mov r0, r4 <== NOT EXECUTED
a002a664: eb000007 bl a002a688 <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 ;
a002a668: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
a002a66c: 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 ;
a002a670: e1530004 cmp r3, r4 <== NOT EXECUTED
a002a674: 2afffff9 bcs a002a660 <rtems_rate_monotonic_reset_all_statistics+0x28><== NOT EXECUTED
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
a002a678: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
a002a67c: eaff8c72 b a000d84c <_Thread_Enable_dispatch> <== NOT EXECUTED
a002a688 <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
rtems_id id
)
{
a002a688: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a002a68c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a002a690: e1a01000 mov r1, r0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
a002a694: e1a0200d mov r2, sp <== NOT EXECUTED
a002a698: e59f004c ldr r0, [pc, #76] ; a002a6ec <rtems_rate_monotonic_reset_statistics+0x64><== NOT EXECUTED
a002a69c: ebff88bc bl a000c994 <_Objects_Get> <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a002a6a0: e59d4000 ldr r4, [sp] <== NOT EXECUTED
a002a6a4: e1a05000 mov r5, r0 <== NOT EXECUTED
a002a6a8: e3540000 cmp r4, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a002a6ac: 13a00004 movne r0, #4 <== NOT EXECUTED
{
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a002a6b0: 1a00000b bne a002a6e4 <rtems_rate_monotonic_reset_statistics+0x5c><== NOT EXECUTED
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
a002a6b4: e1a01004 mov r1, r4 <== NOT EXECUTED
a002a6b8: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
a002a6bc: e2850054 add r0, r5, #84 ; 0x54 <== NOT EXECUTED
a002a6c0: eb004f3d bl a003e3bc <memset> <== NOT EXECUTED
a002a6c4: e59f2024 ldr r2, [pc, #36] ; a002a6f0 <rtems_rate_monotonic_reset_statistics+0x68><== NOT EXECUTED
a002a6c8: e59f3024 ldr r3, [pc, #36] ; a002a6f4 <rtems_rate_monotonic_reset_statistics+0x6c><== NOT EXECUTED
a002a6cc: e585205c str r2, [r5, #92] ; 0x5c <== NOT EXECUTED
a002a6d0: e5853060 str r3, [r5, #96] ; 0x60 <== NOT EXECUTED
a002a6d4: e5852074 str r2, [r5, #116] ; 0x74 <== NOT EXECUTED
a002a6d8: e5853078 str r3, [r5, #120] ; 0x78 <== NOT EXECUTED
_Thread_Enable_dispatch();
a002a6dc: ebff8c5a bl a000d84c <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a002a6e0: e1a00004 mov r0, r4 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a002a6e4: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a002a6e8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000b900 <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
a000b900: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
a000b904: e5906030 ldr r6, [r0, #48] ; 0x30
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
a000b908: e1a05001 mov r5, r1
a000b90c: e1a04000 mov r4, r0
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
a000b910: e1a00001 mov r0, r1
a000b914: e1a01006 mov r1, r6
a000b918: eb0044dd bl a001cc94 <__umodsi3>
if (excess > 0) {
a000b91c: e3500000 cmp r0, #0
a000b920: 01a06005 moveq r6, r5
a000b924: 03a03001 moveq r3, #1
a000b928: 0a000004 beq a000b940 <rtems_rbheap_allocate+0x40>
value += alignment - excess;
a000b92c: e0856006 add r6, r5, r6 <== NOT EXECUTED
a000b930: e0606006 rsb r6, r0, r6 <== NOT EXECUTED
a000b934: e1550006 cmp r5, r6 <== NOT EXECUTED
a000b938: 83a03000 movhi r3, #0 <== NOT EXECUTED
a000b93c: 93a03001 movls r3, #1 <== NOT EXECUTED
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
a000b940: e3550000 cmp r5, #0
a000b944: 03a05000 moveq r5, #0
a000b948: 12035001 andne r5, r3, #1
a000b94c: e3550000 cmp r5, #0
a000b950: 0a000030 beq a000ba18 <rtems_rbheap_allocate+0x118>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
a000b954: e1a02004 mov r2, r4
a000b958: e4927004 ldr r7, [r2], #4
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
a000b95c: e1570002 cmp r7, r2
a000b960: 0a00002e beq a000ba20 <rtems_rbheap_allocate+0x120>
rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
if (free_chunk->size >= size) {
a000b964: e597801c ldr r8, [r7, #28]
a000b968: e1560008 cmp r6, r8
a000b96c: 8a000019 bhi a000b9d8 <rtems_rbheap_allocate+0xd8>
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
a000b970: e3570000 cmp r7, #0
a000b974: 0a000038 beq a000ba5c <rtems_rbheap_allocate+0x15c>
uintptr_t free_size = free_chunk->size;
if (free_size > aligned_size) {
a000b978: e1580006 cmp r8, r6
a000b97c: 9a00001c bls a000b9f4 <rtems_rbheap_allocate+0xf4>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a000b980: e1a0a004 mov sl, r4
a000b984: e5ba500c ldr r5, [sl, #12]!
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000b988: e2843010 add r3, r4, #16
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a000b98c: e1550003 cmp r5, r3
a000b990: 0a000024 beq a000ba28 <rtems_rbheap_allocate+0x128>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
a000b994: e5953000 ldr r3, [r5]
head->next = new_first;
a000b998: e584300c str r3, [r4, #12]
new_first->previous = head;
a000b99c: e583a004 str sl, [r3, #4]
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
a000b9a0: e5972018 ldr r2, [r7, #24]
if (free_size > aligned_size) {
rtems_rbheap_chunk *new_chunk = get_chunk(control);
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
a000b9a4: e0668008 rsb r8, r6, r8
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
a000b9a8: e3a03000 mov r3, #0
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
a000b9ac: e0882002 add r2, r8, r2
a000b9b0: e1a01005 mov r1, r5
rtems_rbheap_chunk *new_chunk = get_chunk(control);
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
a000b9b4: e587801c str r8, [r7, #28]
new_chunk->begin = free_chunk->begin + new_free_size;
a000b9b8: e5852018 str r2, [r5, #24]
new_chunk->size = aligned_size;
a000b9bc: e585601c str r6, [r5, #28]
a000b9c0: e5853004 str r3, [r5, #4]
a000b9c4: e4813008 str r3, [r1], #8
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
a000b9c8: e2840018 add r0, r4, #24
a000b9cc: eb0006c7 bl a000d4f0 <_RBTree_Insert_unprotected>
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
rtems_chain_set_off_chain(&new_chunk->chain_node);
insert_into_tree(chunk_tree, new_chunk);
ptr = (void *) new_chunk->begin;
a000b9d0: e5950018 ldr r0, [r5, #24]
a000b9d4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
a000b9d8: e5977000 ldr r7, [r7]
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
a000b9dc: e0523007 subs r3, r2, r7
a000b9e0: 13a03001 movne r3, #1
a000b9e4: e3530000 cmp r3, #0
a000b9e8: 1affffdd bne a000b964 <rtems_rbheap_allocate+0x64>
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
a000b9ec: e1a00003 mov r0, r3
a000b9f0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
a000b9f4: e5971000 ldr r1, [r7]
previous = the_node->previous;
a000b9f8: e5972004 ldr r2, [r7, #4]
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
a000b9fc: e3a03000 mov r3, #0
ptr = (void *) new_chunk->begin;
}
} else {
rtems_chain_extract_unprotected(&free_chunk->chain_node);
rtems_chain_set_off_chain(&free_chunk->chain_node);
ptr = (void *) free_chunk->begin;
a000ba00: e5970018 ldr r0, [r7, #24]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
a000ba04: e5812004 str r2, [r1, #4]
previous->next = next;
a000ba08: e5821000 str r1, [r2]
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
a000ba0c: e5873004 str r3, [r7, #4]
a000ba10: e5873000 str r3, [r7]
a000ba14: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
a000ba18: e1a00005 mov r0, r5
a000ba1c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a000ba20: e3a00000 mov r0, #0
a000ba24: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
{
rtems_chain_control *chain = &control->spare_descriptor_chain;
rtems_chain_node *chunk = rtems_chain_get_unprotected(chain);
if (chunk == NULL) {
(*control->extend_descriptors)(control);
a000ba28: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED
a000ba2c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ba30: e12fff33 blx r3 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
a000ba34: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a000ba38: e1550003 cmp r5, r3 <== NOT EXECUTED
a000ba3c: 0a000004 beq a000ba54 <rtems_rbheap_allocate+0x154> <== NOT EXECUTED
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
a000ba40: e5932000 ldr r2, [r3] <== NOT EXECUTED
head->next = new_first;
new_first->previous = head;
a000ba44: e1a05003 mov r5, r3 <== NOT EXECUTED
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
a000ba48: e584200c str r2, [r4, #12] <== NOT EXECUTED
new_first->previous = head;
a000ba4c: e582a004 str sl, [r2, #4] <== NOT EXECUTED
a000ba50: eaffffd2 b a000b9a0 <rtems_rbheap_allocate+0xa0> <== NOT EXECUTED
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
a000ba54: e3a00000 mov r0, #0 <== NOT EXECUTED
}
}
}
return ptr;
}
a000ba58: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
a000ba5c: e1a00007 mov r0, r7 <== NOT EXECUTED
a000ba60: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000bbe8 <rtems_rbheap_extend_descriptors_with_malloc>:
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
a000bbe8: e92d4010 push {r4, lr} <== NOT EXECUTED
a000bbec: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
a000bbf0: e3a00020 mov r0, #32 <== NOT EXECUTED
a000bbf4: ebffed4c bl a000712c <malloc> <== NOT EXECUTED
if (chunk != NULL) {
a000bbf8: e3500000 cmp r0, #0 <== NOT EXECUTED
a000bbfc: 0a000005 beq a000bc18 <rtems_rbheap_extend_descriptors_with_malloc+0x30><== NOT EXECUTED
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
a000bc00: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
a000bc04: e284200c add r2, r4, #12 <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
a000bc08: e5802004 str r2, [r0, #4] <== NOT EXECUTED
before_node = after_node->next;
after_node->next = the_node;
a000bc0c: e584000c str r0, [r4, #12] <== NOT EXECUTED
the_node->next = before_node;
before_node->previous = the_node;
a000bc10: e5830004 str r0, [r3, #4] <== NOT EXECUTED
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
a000bc14: e5803000 str r3, [r0] <== NOT EXECUTED
a000bc18: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000bcf8 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a000bcf8: 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 ) )
a000bcfc: e2508000 subs r8, r0, #0
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a000bd00: e24dd004 sub sp, sp, #4
a000bd04: e1a04001 mov r4, r1
a000bd08: e1a06002 mov r6, r2
a000bd0c: e1a05003 mov r5, r3
a000bd10: e59d7028 ldr r7, [sp, #40] ; 0x28
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a000bd14: 03a04003 moveq r4, #3
)
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
a000bd18: 1a000002 bne a000bd28 <rtems_region_create+0x30>
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
a000bd1c: e1a00004 mov r0, r4
a000bd20: e28dd004 add sp, sp, #4
a000bd24: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
a000bd28: e3540000 cmp r4, #0
a000bd2c: 0a00001a beq a000bd9c <rtems_region_create+0xa4>
return RTEMS_INVALID_ADDRESS;
if ( !id )
a000bd30: e59d202c ldr r2, [sp, #44] ; 0x2c
a000bd34: e3520000 cmp r2, #0
a000bd38: 0a000017 beq a000bd9c <rtems_region_create+0xa4>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
a000bd3c: e59f90c0 ldr r9, [pc, #192] ; a000be04 <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 );
a000bd40: e59fb0c0 ldr fp, [pc, #192] ; a000be08 <rtems_region_create+0x110>
a000bd44: e5990000 ldr r0, [r9]
a000bd48: eb0003d9 bl a000ccb4 <_API_Mutex_Lock>
a000bd4c: e1a0000b mov r0, fp
a000bd50: eb0006ac bl a000d808 <_Objects_Allocate>
the_region = _Region_Allocate();
if ( !the_region )
a000bd54: e250a000 subs sl, r0, #0
return_status = RTEMS_TOO_MANY;
a000bd58: 03a04005 moveq r4, #5
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
a000bd5c: 0a00000b beq a000bd90 <rtems_region_create+0x98>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
a000bd60: e28a0068 add r0, sl, #104 ; 0x68
a000bd64: e1a01004 mov r1, r4
a000bd68: e1a02006 mov r2, r6
a000bd6c: e1a03005 mov r3, r5
a000bd70: eb0005e8 bl a000d518 <_Heap_Initialize>
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
a000bd74: e3500000 cmp r0, #0
if ( !the_region )
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
a000bd78: e58a005c str r0, [sl, #92] ; 0x5c
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
a000bd7c: 1a000008 bne a000bda4 <rtems_region_create+0xac>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
a000bd80: e1a0000b mov r0, fp <== NOT EXECUTED
a000bd84: e1a0100a mov r1, sl <== NOT EXECUTED
a000bd88: eb00077c bl a000db80 <_Objects_Free> <== NOT EXECUTED
_Region_Free( the_region );
return_status = RTEMS_INVALID_SIZE;
a000bd8c: e3a04008 mov r4, #8 <== NOT EXECUTED
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
a000bd90: e5990000 ldr r0, [r9]
a000bd94: eb0003e2 bl a000cd24 <_API_Mutex_Unlock>
return return_status;
a000bd98: eaffffdf b a000bd1c <rtems_region_create+0x24>
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a000bd9c: e3a04009 mov r4, #9 <== NOT EXECUTED
a000bda0: eaffffdd b a000bd1c <rtems_region_create+0x24> <== NOT EXECUTED
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;
a000bda4: e3a0c000 mov ip, #0
_Thread_queue_Initialize(
a000bda8: e3170004 tst r7, #4
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
a000bdac: e58a4050 str r4, [sl, #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;
a000bdb0: e58ac064 str ip, [sl, #100] ; 0x64
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
a000bdb4: e58a6054 str r6, [sl, #84] ; 0x54
the_region->page_size = page_size;
a000bdb8: e58a5058 str r5, [sl, #88] ; 0x58
the_region->attribute_set = attribute_set;
a000bdbc: e58a7060 str r7, [sl, #96] ; 0x60
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
a000bdc0: 03a01000 moveq r1, #0
a000bdc4: 13a01001 movne r1, #1
a000bdc8: e3a02040 mov r2, #64 ; 0x40
a000bdcc: e3a03006 mov r3, #6
a000bdd0: e28a0010 add r0, sl, #16
a000bdd4: e58dc000 str ip, [sp]
a000bdd8: eb000d8a bl a000f408 <_Thread_queue_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000bddc: e59a3008 ldr r3, [sl, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000bde0: e59b201c ldr r2, [fp, #28]
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
a000bde4: e59dc000 ldr ip, [sp]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000bde8: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000bdec: e782a721 str sl, [r2, r1, lsr #14]
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
a000bdf0: e59d202c ldr r2, [sp, #44] ; 0x2c
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000bdf4: e58a800c str r8, [sl, #12]
return_status = RTEMS_SUCCESSFUL;
a000bdf8: e1a0400c mov r4, ip
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
a000bdfc: e5823000 str r3, [r2]
a000be00: eaffffe2 b a000bd90 <rtems_region_create+0x98>
a0019310 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
a0019310: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
uintptr_t amount_extended;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
a0019314: e2518000 subs r8, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
a0019318: e1a05000 mov r5, r0 <== NOT EXECUTED
a001931c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a0019320: 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;
a0019324: 03a05009 moveq r5, #9 <== NOT EXECUTED
uintptr_t amount_extended;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
a0019328: 0a00001b beq a001939c <rtems_region_extend+0x8c> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
a001932c: e59f4074 ldr r4, [pc, #116] ; a00193a8 <rtems_region_extend+0x98><== NOT EXECUTED
a0019330: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0019334: eb0009b3 bl a001ba08 <_API_Mutex_Lock> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
a0019338: e1a01005 mov r1, r5 <== NOT EXECUTED
a001933c: e59f0068 ldr r0, [pc, #104] ; a00193ac <rtems_region_extend+0x9c><== NOT EXECUTED
a0019340: e1a0200d mov r2, sp <== NOT EXECUTED
a0019344: eb001170 bl a001d90c <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a0019348: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a001934c: e1a06000 mov r6, r0 <== NOT EXECUTED
a0019350: e3550000 cmp r5, #0 <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a0019354: 13a05004 movne r5, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
a0019358: 1a00000d bne a0019394 <rtems_region_extend+0x84> <== NOT EXECUTED
case OBJECTS_LOCAL:
amount_extended = _Heap_Extend(
a001935c: e1a03005 mov r3, r5 <== NOT EXECUTED
a0019360: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0019364: e1a01008 mov r1, r8 <== NOT EXECUTED
a0019368: e1a02007 mov r2, r7 <== NOT EXECUTED
a001936c: eb000d33 bl a001c840 <_Heap_Extend> <== NOT EXECUTED
starting_address,
length,
0
);
if ( amount_extended > 0 ) {
a0019370: 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;
a0019374: 03a05009 moveq r5, #9 <== NOT EXECUTED
starting_address,
length,
0
);
if ( amount_extended > 0 ) {
a0019378: 0a000005 beq a0019394 <rtems_region_extend+0x84> <== NOT EXECUTED
the_region->length += amount_extended;
a001937c: e5963054 ldr r3, [r6, #84] ; 0x54 <== NOT EXECUTED
the_region->maximum_segment_size += amount_extended;
a0019380: e596205c ldr r2, [r6, #92] ; 0x5c <== NOT EXECUTED
length,
0
);
if ( amount_extended > 0 ) {
the_region->length += amount_extended;
a0019384: e0833000 add r3, r3, r0 <== NOT EXECUTED
the_region->maximum_segment_size += amount_extended;
a0019388: e0820000 add r0, r2, r0 <== NOT EXECUTED
length,
0
);
if ( amount_extended > 0 ) {
the_region->length += amount_extended;
a001938c: e5863054 str r3, [r6, #84] ; 0x54 <== NOT EXECUTED
the_region->maximum_segment_size += amount_extended;
a0019390: e586005c str r0, [r6, #92] ; 0x5c <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0019394: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0019398: eb0009b6 bl a001ba78 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a001939c: e1a00005 mov r0, r5 <== NOT EXECUTED
a00193a0: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a00193a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a00193b0 <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a00193b0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a00193b4: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a00193b8: e1a06000 mov r6, r0 <== NOT EXECUTED
a00193bc: 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;
a00193c0: 03a06009 moveq r6, #9 <== NOT EXECUTED
{
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a00193c4: 0a00000c beq a00193fc <rtems_region_get_free_information+0x4c><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a00193c8: e59f5054 ldr r5, [pc, #84] ; a0019424 <rtems_region_get_free_information+0x74><== NOT EXECUTED
a00193cc: e5950000 ldr r0, [r5] <== NOT EXECUTED
a00193d0: eb00098c bl a001ba08 <_API_Mutex_Lock> <== NOT EXECUTED
a00193d4: e1a01006 mov r1, r6 <== NOT EXECUTED
a00193d8: e59f0048 ldr r0, [pc, #72] ; a0019428 <rtems_region_get_free_information+0x78><== NOT EXECUTED
a00193dc: e1a0200d mov r2, sp <== NOT EXECUTED
a00193e0: eb001149 bl a001d90c <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a00193e4: e59d6000 ldr r6, [sp] <== NOT EXECUTED
a00193e8: e3560000 cmp r6, #0 <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a00193ec: 13a06004 movne r6, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
a00193f0: 0a000004 beq a0019408 <rtems_region_get_free_information+0x58><== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a00193f4: e5950000 ldr r0, [r5] <== NOT EXECUTED
a00193f8: eb00099e bl a001ba78 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a00193fc: e1a00006 mov r0, r6 <== NOT EXECUTED
a0019400: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0019404: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->Used.number = 0;
a0019408: e584600c str r6, [r4, #12] <== NOT EXECUTED
the_info->Used.total = 0;
a001940c: e5846014 str r6, [r4, #20] <== NOT EXECUTED
the_info->Used.largest = 0;
a0019410: e5846010 str r6, [r4, #16] <== NOT EXECUTED
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
a0019414: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0019418: e1a01004 mov r1, r4 <== NOT EXECUTED
a001941c: eb000e21 bl a001cca8 <_Heap_Get_free_information> <== NOT EXECUTED
return_status = RTEMS_SUCCESSFUL;
break;
a0019420: eafffff3 b a00193f4 <rtems_region_get_free_information+0x44><== NOT EXECUTED
a001942c <rtems_region_get_information>:
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a001942c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a0019430: e2515000 subs r5, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a0019434: e1a06000 mov r6, r0 <== NOT EXECUTED
a0019438: 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;
a001943c: 03a06009 moveq r6, #9 <== NOT EXECUTED
{
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a0019440: 0a00000c beq a0019478 <rtems_region_get_information+0x4c> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0019444: e59f4048 ldr r4, [pc, #72] ; a0019494 <rtems_region_get_information+0x68><== NOT EXECUTED
a0019448: e5940000 ldr r0, [r4] <== NOT EXECUTED
a001944c: eb00096d bl a001ba08 <_API_Mutex_Lock> <== NOT EXECUTED
a0019450: e1a01006 mov r1, r6 <== NOT EXECUTED
a0019454: e59f003c ldr r0, [pc, #60] ; a0019498 <rtems_region_get_information+0x6c><== NOT EXECUTED
a0019458: e1a0200d mov r2, sp <== NOT EXECUTED
a001945c: eb00112a bl a001d90c <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a0019460: e59d6000 ldr r6, [sp] <== NOT EXECUTED
a0019464: e3560000 cmp r6, #0 <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a0019468: 13a06004 movne r6, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
a001946c: 0a000004 beq a0019484 <rtems_region_get_information+0x58> <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0019470: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0019474: eb00097f bl a001ba78 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a0019478: e1a00006 mov r0, r6 <== NOT EXECUTED
a001947c: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a0019480: 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 );
a0019484: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0019488: e1a01005 mov r1, r5 <== NOT EXECUTED
a001948c: eb000e2c bl a001cd44 <_Heap_Get_information> <== NOT EXECUTED
return_status = RTEMS_SUCCESSFUL;
break;
a0019490: eafffff6 b a0019470 <rtems_region_get_information+0x44> <== NOT EXECUTED
a00195e0 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
a00195e0: e92d40f0 push {r4, r5, r6, r7, lr}
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
a00195e4: e2516000 subs r6, r1, #0
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
a00195e8: e24dd004 sub sp, sp, #4
a00195ec: e1a07000 mov r7, r0
a00195f0: e1a04002 mov r4, r2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
a00195f4: 0a000011 beq a0019640 <rtems_region_get_segment_size+0x60>
return RTEMS_INVALID_ADDRESS;
if ( !size )
a00195f8: e3520000 cmp r2, #0
a00195fc: 0a00000f beq a0019640 <rtems_region_get_segment_size+0x60>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0019600: e59f5068 ldr r5, [pc, #104] ; a0019670 <rtems_region_get_segment_size+0x90>
a0019604: e5950000 ldr r0, [r5]
a0019608: eb0008fe bl a001ba08 <_API_Mutex_Lock>
a001960c: e59f0060 ldr r0, [pc, #96] ; a0019674 <rtems_region_get_segment_size+0x94>
a0019610: e1a01007 mov r1, r7
a0019614: e1a0200d mov r2, sp
a0019618: eb0010bb bl a001d90c <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
a001961c: e59d3000 ldr r3, [sp]
a0019620: e3530000 cmp r3, #0
a0019624: 0a000009 beq a0019650 <rtems_region_get_segment_size+0x70>
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
a0019628: e3530001 cmp r3, #1 <== NOT EXECUTED
a001962c: 03a04004 moveq r4, #4 <== NOT EXECUTED
a0019630: 13a04000 movne r4, #0 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0019634: e5950000 ldr r0, [r5]
a0019638: eb00090e bl a001ba78 <_API_Mutex_Unlock>
return return_status;
a001963c: ea000000 b a0019644 <rtems_region_get_segment_size+0x64>
if ( !segment )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
a0019640: e3a04009 mov r4, #9 <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
a0019644: e1a00004 mov r0, r4
a0019648: e28dd004 add sp, sp, #4
a001964c: 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 ) )
a0019650: e1a02004 mov r2, r4
a0019654: e2800068 add r0, r0, #104 ; 0x68
a0019658: e1a01006 mov r1, r6
a001965c: eb000f32 bl a001d32c <_Heap_Size_of_alloc_area>
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
a0019660: e3500000 cmp r0, #0
a0019664: 03a04009 moveq r4, #9
a0019668: 13a04000 movne r4, #0
a001966c: eafffff0 b a0019634 <rtems_region_get_segment_size+0x54>
a00196a8 <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
a00196a8: 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 )
a00196ac: e2535000 subs r5, r3, #0 <== NOT EXECUTED
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
a00196b0: e1a06000 mov r6, r0 <== NOT EXECUTED
a00196b4: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
a00196b8: e1a08001 mov r8, r1 <== NOT EXECUTED
a00196bc: e1a07002 mov r7, r2 <== NOT EXECUTED
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
return RTEMS_INVALID_ADDRESS;
a00196c0: 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 )
a00196c4: 0a000018 beq a001972c <rtems_region_resize_segment+0x84> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a00196c8: e59f408c ldr r4, [pc, #140] ; a001975c <rtems_region_resize_segment+0xb4><== NOT EXECUTED
a00196cc: e5940000 ldr r0, [r4] <== NOT EXECUTED
a00196d0: eb0008cc bl a001ba08 <_API_Mutex_Lock> <== NOT EXECUTED
a00196d4: e1a01006 mov r1, r6 <== NOT EXECUTED
a00196d8: e59f0080 ldr r0, [pc, #128] ; a0019760 <rtems_region_resize_segment+0xb8><== NOT EXECUTED
a00196dc: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a00196e0: eb001089 bl a001d90c <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a00196e4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a00196e8: e1a06000 mov r6, r0 <== NOT EXECUTED
a00196ec: e3530000 cmp r3, #0 <== NOT EXECUTED
a00196f0: 1a00000f bne a0019734 <rtems_region_resize_segment+0x8c> <== NOT EXECUTED
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
a00196f4: e1a02007 mov r2, r7 <== NOT EXECUTED
a00196f8: e28d300c add r3, sp, #12 <== NOT EXECUTED
a00196fc: e28dc004 add ip, sp, #4 <== NOT EXECUTED
a0019700: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0019704: e1a01008 mov r1, r8 <== NOT EXECUTED
a0019708: e58dc000 str ip, [sp] <== NOT EXECUTED
a001970c: eb000eb6 bl a001d1ec <_Heap_Resize_block> <== NOT EXECUTED
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
a0019710: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
a0019714: e2507000 subs r7, r0, #0 <== NOT EXECUTED
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
a0019718: e5853000 str r3, [r5] <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
a001971c: 1a000008 bne a0019744 <rtems_region_resize_segment+0x9c> <== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
a0019720: e1a00006 mov r0, r6 <== NOT EXECUTED
a0019724: eb0020eb bl a0021ad8 <_Region_Process_queue> <== NOT EXECUTED
else
_RTEMS_Unlock_allocator();
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
a0019728: e1a00007 mov r0, r7 <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
a001972c: e28dd010 add sp, sp, #16 <== NOT EXECUTED
a0019730: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0019734: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0019738: eb0008ce bl a001ba78 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
a001973c: e3a00004 mov r0, #4 <== NOT EXECUTED
a0019740: eafffff9 b a001972c <rtems_region_resize_segment+0x84> <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
a0019744: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0019748: eb0008ca bl a001ba78 <_API_Mutex_Unlock> <== NOT EXECUTED
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
return RTEMS_UNSATISFIED;
a001974c: e3570001 cmp r7, #1 <== NOT EXECUTED
a0019750: 13a00009 movne r0, #9 <== NOT EXECUTED
a0019754: 03a0000d moveq r0, #13 <== NOT EXECUTED
a0019758: eafffff3 b a001972c <rtems_region_resize_segment+0x84> <== NOT EXECUTED
a0019764 <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
a0019764: e92d40f0 push {r4, r5, r6, r7, lr}
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
a0019768: e59f4078 ldr r4, [pc, #120] ; a00197e8 <rtems_region_return_segment+0x84>
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
a001976c: e24dd004 sub sp, sp, #4
a0019770: e1a06000 mov r6, r0
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
a0019774: e5940000 ldr r0, [r4]
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
a0019778: e1a05001 mov r5, r1
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
a001977c: eb0008a1 bl a001ba08 <_API_Mutex_Lock>
a0019780: e1a01006 mov r1, r6
a0019784: e59f0060 ldr r0, [pc, #96] ; a00197ec <rtems_region_return_segment+0x88>
a0019788: e1a0200d mov r2, sp
a001978c: eb00105e bl a001d90c <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
a0019790: e59d6000 ldr r6, [sp]
a0019794: e1a07000 mov r7, r0
a0019798: e3560000 cmp r6, #0
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a001979c: 13a06004 movne r6, #4
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
a00197a0: 1a000005 bne a00197bc <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 );
a00197a4: e2800068 add r0, r0, #104 ; 0x68
a00197a8: e1a01005 mov r1, r5
a00197ac: eb000cca bl a001cadc <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
a00197b0: e3500000 cmp r0, #0
return_status = RTEMS_INVALID_ADDRESS;
a00197b4: 03a06009 moveq r6, #9
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
a00197b8: 1a000004 bne a00197d0 <rtems_region_return_segment+0x6c>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a00197bc: e5940000 ldr r0, [r4] <== NOT EXECUTED
a00197c0: eb0008ac bl a001ba78 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a00197c4: e1a00006 mov r0, r6
a00197c8: e28dd004 add sp, sp, #4
a00197cc: 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;
a00197d0: e5973064 ldr r3, [r7, #100] ; 0x64
_Region_Process_queue(the_region); /* unlocks allocator */
a00197d4: 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;
a00197d8: e2433001 sub r3, r3, #1
a00197dc: e5873064 str r3, [r7, #100] ; 0x64
_Region_Process_queue(the_region); /* unlocks allocator */
a00197e0: eb0020bc bl a0021ad8 <_Region_Process_queue>
return RTEMS_SUCCESSFUL;
a00197e4: eafffff6 b a00197c4 <rtems_region_return_segment+0x60>
a000a4fc <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
a000a4fc: 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 ) )
a000a500: e2505000 subs r5, r0, #0
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
a000a504: e24dd020 sub sp, sp, #32
a000a508: e1a04001 mov r4, r1
a000a50c: 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;
a000a510: 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 ) )
a000a514: 1a000001 bne a000a520 <rtems_semaphore_create+0x24>
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000a518: e28dd020 add sp, sp, #32
a000a51c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a000a520: e3560000 cmp r6, #0
return RTEMS_INVALID_ADDRESS;
a000a524: 03a00009 moveq r0, #9
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a000a528: 0afffffa beq a000a518 <rtems_semaphore_create+0x1c>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
a000a52c: e21210c0 ands r1, r2, #192 ; 0xc0
a000a530: 1a000029 bne a000a5dc <rtems_semaphore_create+0xe0>
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 ) )
a000a534: e2128030 ands r8, r2, #48 ; 0x30
a000a538: 0a000002 beq a000a548 <rtems_semaphore_create+0x4c>
a000a53c: e3540001 cmp r4, #1
return RTEMS_INVALID_NUMBER;
a000a540: 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 ) )
a000a544: 8afffff3 bhi a000a518 <rtems_semaphore_create+0x1c>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000a548: e59f1164 ldr r1, [pc, #356] ; a000a6b4 <rtems_semaphore_create+0x1b8>
a000a54c: e5910000 ldr r0, [r1]
++level;
a000a550: e2800001 add r0, r0, #1
_Thread_Dispatch_disable_level = level;
a000a554: 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 );
a000a558: e59f0158 ldr r0, [pc, #344] ; a000a6b8 <rtems_semaphore_create+0x1bc>
a000a55c: e58d2004 str r2, [sp, #4]
a000a560: e58d3000 str r3, [sp]
a000a564: eb0005c0 bl a000bc6c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
a000a568: e2507000 subs r7, r0, #0
a000a56c: e59d2004 ldr r2, [sp, #4]
a000a570: e59d3000 ldr r3, [sp]
a000a574: 0a00003b beq a000a668 <rtems_semaphore_create+0x16c>
the_semaphore->attribute_set = attribute_set;
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
a000a578: e3580000 cmp r8, #0
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
a000a57c: e5872010 str r2, [r7, #16]
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
a000a580: 1a000020 bne a000a608 <rtems_semaphore_create+0x10c>
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
a000a584: e3120004 tst r2, #4
a000a588: 03a03000 moveq r3, #0
a000a58c: 13a03001 movne r3, #1
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
a000a590: e3e0c000 mvn ip, #0
* 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(
a000a594: e2870014 add r0, r7, #20
a000a598: e28d1018 add r1, sp, #24
a000a59c: e1a02004 mov r2, r4
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
a000a5a0: e58dc018 str ip, [sp, #24]
a000a5a4: e58d301c str r3, [sp, #28]
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;
a000a5a8: e58d8008 str r8, [sp, #8]
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
a000a5ac: e58d8014 str r8, [sp, #20]
_CORE_semaphore_Initialize(
a000a5b0: eb000422 bl a000b640 <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a5b4: e59f20fc ldr r2, [pc, #252] ; a000a6b8 <rtems_semaphore_create+0x1bc>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000a5b8: e5973008 ldr r3, [r7, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a5bc: e592201c ldr r2, [r2, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000a5c0: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a5c4: e7827721 str r7, [r2, r1, lsr #14]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000a5c8: e587500c str r5, [r7, #12]
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
a000a5cc: e5863000 str r3, [r6]
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
a000a5d0: eb000aab bl a000d084 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a5d4: e3a00000 mov r0, #0
a000a5d8: eaffffce b a000a518 <rtems_semaphore_create+0x1c>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
a000a5dc: e2028030 and r8, r2, #48 ; 0x30
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
a000a5e0: e3580010 cmp r8, #16
a000a5e4: 0a000001 beq a000a5f0 <rtems_semaphore_create+0xf4>
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
a000a5e8: e3a0000b mov r0, #11 <== NOT EXECUTED
a000a5ec: eaffffc9 b a000a518 <rtems_semaphore_create+0x1c> <== NOT EXECUTED
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
a000a5f0: e3120004 tst r2, #4
a000a5f4: 0afffffb beq a000a5e8 <rtems_semaphore_create+0xec>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
a000a5f8: e35100c0 cmp r1, #192 ; 0xc0
a000a5fc: 1affffce bne a000a53c <rtems_semaphore_create+0x40>
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
a000a600: e3a0000b mov r0, #11 <== NOT EXECUTED
a000a604: eaffffc3 b a000a518 <rtems_semaphore_create+0x1c> <== NOT EXECUTED
/*
* It is either simple binary semaphore or a more powerful mutex
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
a000a608: e3120004 tst r2, #4
a000a60c: 03a01000 moveq r1, #0
a000a610: 13a01001 movne r1, #1
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
a000a614: e3580010 cmp r8, #16
/*
* It is either simple binary semaphore or a more powerful mutex
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
a000a618: e58d1010 str r1, [sp, #16]
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
a000a61c: 0a000014 beq a000a674 <rtems_semaphore_create+0x178>
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;
a000a620: e3a03002 mov r3, #2
a000a624: e58d3008 str r3, [sp, #8]
the_mutex_attr.only_owner_release = false;
a000a628: e3a03000 mov r3, #0
a000a62c: e5cd300c strb r3, [sp, #12]
}
mutex_status = _CORE_mutex_Initialize(
a000a630: e2443001 sub r3, r4, #1
a000a634: e2732000 rsbs r2, r3, #0
a000a638: e0a22003 adc r2, r2, r3
a000a63c: e2870014 add r0, r7, #20
a000a640: e28d1008 add r1, sp, #8
a000a644: eb000327 bl a000b2e8 <_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 ) {
a000a648: e3500006 cmp r0, #6
a000a64c: 1affffd8 bne a000a5b4 <rtems_semaphore_create+0xb8>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
a000a650: e59f0060 ldr r0, [pc, #96] ; a000a6b8 <rtems_semaphore_create+0x1bc>
a000a654: e1a01007 mov r1, r7
a000a658: eb000661 bl a000bfe4 <_Objects_Free>
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
a000a65c: eb000a88 bl a000d084 <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
a000a660: e3a00013 mov r0, #19
a000a664: eaffffab b a000a518 <rtems_semaphore_create+0x1c>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
a000a668: eb000a85 bl a000d084 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
a000a66c: e3a00005 mov r0, #5
a000a670: eaffffa8 b a000a518 <rtems_semaphore_create+0x1c>
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;
a000a674: e3a00000 mov r0, #0
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
a000a678: e3510001 cmp r1, #1
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;
a000a67c: e58d3014 str r3, [sp, #20]
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
a000a680: e58d0008 str r0, [sp, #8]
the_mutex_attr.only_owner_release = false;
a000a684: e5cd000c strb r0, [sp, #12]
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
a000a688: 1affffe8 bne a000a630 <rtems_semaphore_create+0x134>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
a000a68c: e3120040 tst r2, #64 ; 0x40
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
a000a690: 13a03002 movne r3, #2
a000a694: 158d3010 strne r3, [sp, #16]
the_mutex_attr.only_owner_release = true;
a000a698: 15cd100c strbne r1, [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 ) ) {
a000a69c: 1affffe3 bne a000a630 <rtems_semaphore_create+0x134>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
the_mutex_attr.only_owner_release = true;
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
a000a6a0: e3120080 tst r2, #128 ; 0x80
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
a000a6a4: 13a03003 movne r3, #3
a000a6a8: 158d3010 strne r3, [sp, #16]
the_mutex_attr.only_owner_release = true;
a000a6ac: 15cd100c strbne r1, [sp, #12]
a000a6b0: eaffffde b a000a630 <rtems_semaphore_create+0x134>
a000a6bc <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
a000a6bc: e92d4010 push {r4, lr}
a000a6c0: e24dd004 sub sp, sp, #4
a000a6c4: e1a01000 mov r1, r0
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
a000a6c8: e1a0200d mov r2, sp
a000a6cc: e59f0088 ldr r0, [pc, #136] ; a000a75c <rtems_semaphore_delete+0xa0>
a000a6d0: eb00069c bl a000c148 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a000a6d4: e59d3000 ldr r3, [sp]
a000a6d8: e1a04000 mov r4, r0
a000a6dc: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a6e0: 13a00004 movne r0, #4
{
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a000a6e4: 1a000009 bne a000a710 <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);
a000a6e8: e5941010 ldr r1, [r4, #16]
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
a000a6ec: e2111030 ands r1, r1, #48 ; 0x30
a000a6f0: 0a000008 beq a000a718 <rtems_semaphore_delete+0x5c>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
a000a6f4: e5943064 ldr r3, [r4, #100] ; 0x64
a000a6f8: e3530000 cmp r3, #0
a000a6fc: 1a000011 bne a000a748 <rtems_semaphore_delete+0x8c>
a000a700: e3510020 cmp r1, #32
a000a704: 0a00000f beq a000a748 <rtems_semaphore_delete+0x8c>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
a000a708: eb000a5d bl a000d084 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
a000a70c: e3a0000c mov r0, #12 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000a710: e28dd004 add sp, sp, #4
a000a714: e8bd8010 pop {r4, pc}
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
a000a718: e2840014 add r0, r4, #20
a000a71c: e3a02002 mov r2, #2
a000a720: eb0003c5 bl a000b63c <_CORE_semaphore_Flush>
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
a000a724: e59f0030 ldr r0, [pc, #48] ; a000a75c <rtems_semaphore_delete+0xa0>
a000a728: e1a01004 mov r1, r4
a000a72c: eb000571 bl a000bcf8 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
a000a730: e59f0024 ldr r0, [pc, #36] ; a000a75c <rtems_semaphore_delete+0xa0>
a000a734: e1a01004 mov r1, r4
a000a738: eb000629 bl a000bfe4 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
a000a73c: eb000a50 bl a000d084 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a740: e3a00000 mov r0, #0
a000a744: eafffff1 b a000a710 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
a000a748: e2840014 add r0, r4, #20
a000a74c: e3a01000 mov r1, #0
a000a750: e3a02004 mov r2, #4
a000a754: eb0002e2 bl a000b2e4 <_CORE_mutex_Flush>
a000a758: eafffff1 b a000a724 <rtems_semaphore_delete+0x68>
a0014358 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
a0014358: e52de004 push {lr} ; (str lr, [sp, #-4]!)
a001435c: e24dd004 sub sp, sp, #4
a0014360: e1a01000 mov r1, r0
a0014364: e1a0200d mov r2, sp
a0014368: e59f0048 ldr r0, [pc, #72] ; a00143b8 <rtems_semaphore_flush+0x60>
a001436c: ebffe4cc bl a000d6a4 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a0014370: e59d3000 ldr r3, [sp]
a0014374: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0014378: 13a00004 movne r0, #4
{
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a001437c: 1a000007 bne a00143a0 <rtems_semaphore_flush+0x48>
a0014380: e5901010 ldr r1, [r0, #16]
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
_CORE_mutex_Flush(
a0014384: e2800014 add r0, r0, #20
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
a0014388: e2111030 ands r1, r1, #48 ; 0x30
a001438c: 1a000005 bne a00143a8 <rtems_semaphore_flush+0x50>
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
a0014390: e3a02001 mov r2, #1 <== NOT EXECUTED
a0014394: ebffe227 bl a000cc38 <_CORE_semaphore_Flush> <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
a0014398: ebffe803 bl a000e3ac <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001439c: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00143a0: e28dd004 add sp, sp, #4
a00143a4: 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(
a00143a8: e1a01003 mov r1, r3
a00143ac: e3a02001 mov r2, #1
a00143b0: ebffe14a bl a000c8e0 <_CORE_mutex_Flush>
a00143b4: eafffff7 b a0014398 <rtems_semaphore_flush+0x40>
a000a760 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
a000a760: e92d40f0 push {r4, r5, r6, r7, lr}
a000a764: e1a04000 mov r4, r0
a000a768: e24dd00c sub sp, sp, #12
Objects_Id id,
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
a000a76c: e28d3008 add r3, sp, #8
a000a770: e1a05001 mov r5, r1
a000a774: e1a06002 mov r6, r2
a000a778: e59f00f4 ldr r0, [pc, #244] ; a000a874 <rtems_semaphore_obtain+0x114>
a000a77c: e1a01004 mov r1, r4
a000a780: e28d2004 add r2, sp, #4
a000a784: eb000653 bl a000c0d8 <_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 ) {
a000a788: e59d3004 ldr r3, [sp, #4]
a000a78c: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a790: 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 ) {
a000a794: 1a00000f bne a000a7d8 <rtems_semaphore_obtain+0x78>
a000a798: e5903010 ldr r3, [r0, #16]
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
a000a79c: e2133030 ands r3, r3, #48 ; 0x30
a000a7a0: 1a00000e bne a000a7e0 <rtems_semaphore_obtain+0x80>
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a000a7a4: e59f70cc ldr r7, [pc, #204] ; a000a878 <rtems_semaphore_obtain+0x118>
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
a000a7a8: e590105c ldr r1, [r0, #92] ; 0x5c
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a000a7ac: e5972008 ldr r2, [r7, #8]
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
a000a7b0: e3510000 cmp r1, #0
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
a000a7b4: e5823034 str r3, [r2, #52] ; 0x34
if ( the_semaphore->count != 0 ) {
a000a7b8: 0a000015 beq a000a814 <rtems_semaphore_obtain+0xb4>
the_semaphore->count -= 1;
a000a7bc: e2411001 sub r1, r1, #1
a000a7c0: e580105c str r1, [r0, #92] ; 0x5c
a000a7c4: e59d3008 ldr r3, [sp, #8]
a000a7c8: e129f003 msr CPSR_fc, r3
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
_Thread_Executing->Wait.return_code );
a000a7cc: e5973008 ldr r3, [r7, #8]
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
a000a7d0: e5930034 ldr r0, [r3, #52] ; 0x34
a000a7d4: eb00004e bl a000a914 <_Semaphore_Translate_core_semaphore_return_code>
break;
}
return RTEMS_INVALID_ID;
}
a000a7d8: e28dd00c add sp, sp, #12
a000a7dc: e8bd80f0 pop {r4, r5, r6, r7, pc}
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
_CORE_mutex_Seize(
a000a7e0: e59dc008 ldr ip, [sp, #8]
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
a000a7e4: e2052001 and r2, r5, #1
a000a7e8: e1a03006 mov r3, r6
a000a7ec: e2800014 add r0, r0, #20
a000a7f0: e1a01004 mov r1, r4
a000a7f4: e2222001 eor r2, r2, #1
a000a7f8: e58dc000 str ip, [sp]
a000a7fc: eb000309 bl a000b428 <_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 );
a000a800: e59f3070 ldr r3, [pc, #112] ; a000a878 <rtems_semaphore_obtain+0x118>
a000a804: e5933008 ldr r3, [r3, #8]
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
a000a808: e5930034 ldr r0, [r3, #52] ; 0x34
a000a80c: eb00003c bl a000a904 <_Semaphore_Translate_core_mutex_return_code>
a000a810: eafffff0 b a000a7d8 <rtems_semaphore_obtain+0x78>
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
a000a814: e3150001 tst r5, #1
a000a818: 0a000004 beq a000a830 <rtems_semaphore_obtain+0xd0>
a000a81c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a000a820: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Enable( *level_p );
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
a000a824: e3a03001 mov r3, #1 <== NOT EXECUTED
a000a828: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED
a000a82c: eaffffe6 b a000a7cc <rtems_semaphore_obtain+0x6c> <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000a830: e59f3044 ldr r3, [pc, #68] ; a000a87c <rtems_semaphore_obtain+0x11c>
a000a834: e5931000 ldr r1, [r3]
++level;
a000a838: e2811001 add r1, r1, #1
_Thread_Dispatch_disable_level = level;
a000a83c: 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;
a000a840: e3a01001 mov r1, #1
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
a000a844: e2803014 add r3, r0, #20
a000a848: e5801044 str r1, [r0, #68] ; 0x44
a000a84c: e5823044 str r3, [r2, #68] ; 0x44
executing->Wait.id = id;
a000a850: e5824020 str r4, [r2, #32]
a000a854: e59d2008 ldr r2, [sp, #8]
a000a858: e129f002 msr CPSR_fc, r2
_ISR_Enable( *level_p );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
a000a85c: e59f201c ldr r2, [pc, #28] ; a000a880 <rtems_semaphore_obtain+0x120>
a000a860: e1a00003 mov r0, r3
a000a864: e1a01006 mov r1, r6
a000a868: eb000b3b bl a000d55c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
a000a86c: eb000a04 bl a000d084 <_Thread_Enable_dispatch>
a000a870: eaffffd5 b a000a7cc <rtems_semaphore_obtain+0x6c>
a0019cb4 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
a0019cb4: e92d4010 push {r4, lr}
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
a0019cb8: e2514000 subs r4, r1, #0
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
a0019cbc: e24dd004 sub sp, sp, #4
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
a0019cc0: 03a0000a moveq r0, #10
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
a0019cc4: 1a000001 bne a0019cd0 <rtems_signal_send+0x1c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0019cc8: e28dd004 add sp, sp, #4
a0019ccc: e8bd8010 pop {r4, pc}
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
a0019cd0: e1a0100d mov r1, sp
a0019cd4: eb0012f1 bl a001e8a0 <_Thread_Get>
switch ( location ) {
a0019cd8: e59d3000 ldr r3, [sp]
a0019cdc: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0019ce0: 13a00004 movne r0, #4
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a0019ce4: 1afffff7 bne a0019cc8 <rtems_signal_send+0x14>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
a0019ce8: e59030f0 ldr r3, [r0, #240] ; 0xf0
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
a0019cec: e593200c ldr r2, [r3, #12]
a0019cf0: e3520000 cmp r2, #0
a0019cf4: 0a000014 beq a0019d4c <rtems_signal_send+0x98>
if ( asr->is_enabled ) {
a0019cf8: e5d32008 ldrb r2, [r3, #8]
a0019cfc: e3520000 cmp r2, #0
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a0019d00: e10f2000 mrs r2, CPSR
a0019d04: e3821080 orr r1, r2, #128 ; 0x80
a0019d08: e129f001 msr CPSR_fc, r1
a0019d0c: 0a000011 beq a0019d58 <rtems_signal_send+0xa4>
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
a0019d10: e5931014 ldr r1, [r3, #20]
a0019d14: e1814004 orr r4, r1, r4
a0019d18: e5834014 str r4, [r3, #20]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a0019d1c: e129f002 msr CPSR_fc, r2
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
a0019d20: e59f3044 ldr r3, [pc, #68] ; a0019d6c <rtems_signal_send+0xb8>
a0019d24: e5932000 ldr r2, [r3]
a0019d28: e3520000 cmp r2, #0
a0019d2c: 0a000003 beq a0019d40 <rtems_signal_send+0x8c>
a0019d30: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED
a0019d34: e1500002 cmp r0, r2 <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
a0019d38: 03a02001 moveq r2, #1 <== NOT EXECUTED
a0019d3c: 05c32004 strbeq r2, [r3, #4] <== NOT EXECUTED
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
a0019d40: eb0012ce bl a001e880 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0019d44: e3a00000 mov r0, #0
a0019d48: eaffffde b a0019cc8 <rtems_signal_send+0x14>
}
_Thread_Enable_dispatch();
a0019d4c: eb0012cb bl a001e880 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
a0019d50: e3a0000b mov r0, #11 <== NOT EXECUTED
a0019d54: eaffffdb b a0019cc8 <rtems_signal_send+0x14> <== NOT EXECUTED
a0019d58: e5931018 ldr r1, [r3, #24] <== NOT EXECUTED
a0019d5c: e1814004 orr r4, r1, r4 <== NOT EXECUTED
a0019d60: e5834018 str r4, [r3, #24] <== NOT EXECUTED
a0019d64: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
a0019d68: eafffff4 b a0019d40 <rtems_signal_send+0x8c> <== NOT EXECUTED
a000c860 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
a000c860: e92d4030 push {r4, r5, lr}
a000c864: e1a04001 mov r4, r1
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000c868: e59f10ac ldr r1, [pc, #172] ; a000c91c <rtems_task_get_note+0xbc>
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
a000c86c: e1a03000 mov r3, r0
a000c870: e24dd008 sub sp, sp, #8
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000c874: e5d11004 ldrb r1, [r1, #4]
a000c878: e3510000 cmp r1, #0
return RTEMS_NOT_CONFIGURED;
a000c87c: 03a00016 moveq r0, #22
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000c880: 1a000001 bne a000c88c <rtems_task_get_note+0x2c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000c884: e28dd008 add sp, sp, #8
a000c888: e8bd8030 pop {r4, r5, pc}
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
a000c88c: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a000c890: 03a00009 moveq r0, #9
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
a000c894: 0afffffa beq a000c884 <rtems_task_get_note+0x24>
/*
* 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 )
a000c898: e354000f cmp r4, #15
return RTEMS_INVALID_NUMBER;
a000c89c: 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 )
a000c8a0: 8afffff7 bhi a000c884 <rtems_task_get_note+0x24>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000c8a4: e3530000 cmp r3, #0
a000c8a8: 0a000013 beq a000c8fc <rtems_task_get_note+0x9c>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
a000c8ac: e59f106c ldr r1, [pc, #108] ; a000c920 <rtems_task_get_note+0xc0>
a000c8b0: e5911008 ldr r1, [r1, #8]
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000c8b4: e591c008 ldr ip, [r1, #8]
a000c8b8: e153000c cmp r3, ip
a000c8bc: 0a000010 beq a000c904 <rtems_task_get_note+0xa4>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
a000c8c0: e28d1004 add r1, sp, #4
a000c8c4: e58d2000 str r2, [sp]
a000c8c8: eb000a26 bl a000f168 <_Thread_Get>
switch ( location ) {
a000c8cc: e59d5004 ldr r5, [sp, #4]
a000c8d0: e59d2000 ldr r2, [sp]
a000c8d4: e3550000 cmp r5, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000c8d8: 13a00004 movne r0, #4
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000c8dc: 1affffe8 bne a000c884 <rtems_task_get_note+0x24>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
a000c8e0: e59030f0 ldr r3, [r0, #240] ; 0xf0
a000c8e4: e2844008 add r4, r4, #8
a000c8e8: e7933104 ldr r3, [r3, r4, lsl #2]
a000c8ec: e5823000 str r3, [r2]
_Thread_Enable_dispatch();
a000c8f0: eb000a14 bl a000f148 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000c8f4: e1a00005 mov r0, r5
a000c8f8: eaffffe1 b a000c884 <rtems_task_get_note+0x24>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000c8fc: e59f301c ldr r3, [pc, #28] ; a000c920 <rtems_task_get_note+0xc0><== NOT EXECUTED
a000c900: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
a000c904: e59130f0 ldr r3, [r1, #240] ; 0xf0 <== NOT EXECUTED
a000c908: e2844008 add r4, r4, #8 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000c90c: 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 ];
a000c910: e7933104 ldr r3, [r3, r4, lsl #2] <== NOT EXECUTED
a000c914: e5823000 str r3, [r2] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000c918: eaffffd9 b a000c884 <rtems_task_get_note+0x24> <== NOT EXECUTED
a000ab48 <rtems_task_ident>:
rtems_id *id
)
{
Objects_Name_or_id_lookup_errors status;
if ( !id )
a000ab48: e2523000 subs r3, r2, #0
rtems_status_code rtems_task_ident(
rtems_name name,
uint32_t node,
rtems_id *id
)
{
a000ab4c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
a000ab50: e1a0c000 mov ip, r0
a000ab54: e1a02001 mov r2, r1
Objects_Name_or_id_lookup_errors status;
if ( !id )
a000ab58: 0a00000c beq a000ab90 <rtems_task_ident+0x48>
return RTEMS_INVALID_ADDRESS;
if ( name == OBJECTS_ID_OF_SELF ) {
a000ab5c: e3500000 cmp r0, #0
a000ab60: 1a000004 bne a000ab78 <rtems_task_ident+0x30>
*id = _Thread_Executing->Object.id;
a000ab64: e59f202c ldr r2, [pc, #44] ; a000ab98 <rtems_task_ident+0x50>
a000ab68: e5922008 ldr r2, [r2, #8]
a000ab6c: e5922008 ldr r2, [r2, #8]
a000ab70: e5832000 str r2, [r3]
return RTEMS_SUCCESSFUL;
a000ab74: e49df004 pop {pc} ; (ldr pc, [sp], #4)
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
a000ab78: e59f001c ldr r0, [pc, #28] ; a000ab9c <rtems_task_ident+0x54>
a000ab7c: e1a0100c mov r1, ip
a000ab80: eb0005cf bl a000c2c4 <_Objects_Name_to_id_u32>
return _Status_Object_name_errors_to_status[ status ];
a000ab84: e59f3014 ldr r3, [pc, #20] ; a000aba0 <rtems_task_ident+0x58>
a000ab88: e7930100 ldr r0, [r3, r0, lsl #2]
a000ab8c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
)
{
Objects_Name_or_id_lookup_errors status;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a000ab90: 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 ];
}
a000ab94: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a001a144 <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
rtems_id id
)
{
a001a144: e92d4010 push {r4, lr}
a001a148: e24dd004 sub sp, sp, #4
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a001a14c: e1a0100d mov r1, sp
a001a150: eb0011d2 bl a001e8a0 <_Thread_Get>
switch ( location ) {
a001a154: e59d3000 ldr r3, [sp]
a001a158: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001a15c: 13a00004 movne r0, #4
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a001a160: 1a000004 bne a001a178 <rtems_task_is_suspended+0x34>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
States_Control the_states
)
{
return (the_states & STATES_SUSPENDED);
a001a164: e5904010 ldr r4, [r0, #16] <== NOT EXECUTED
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
a001a168: e2144002 ands r4, r4, #2 <== NOT EXECUTED
a001a16c: 0a000003 beq a001a180 <rtems_task_is_suspended+0x3c> <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
a001a170: eb0011c2 bl a001e880 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_ALREADY_SUSPENDED;
a001a174: e3a0000f mov r0, #15 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a001a178: e28dd004 add sp, sp, #4
a001a17c: 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();
a001a180: eb0011be bl a001e880 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a001a184: e1a00004 mov r0, r4 <== NOT EXECUTED
a001a188: eafffffa b a001a178 <rtems_task_is_suspended+0x34> <== NOT EXECUTED
a0014490 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a0014490: 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 )
a0014494: e2525000 subs r5, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a0014498: e1a04000 mov r4, r0
a001449c: 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 )
a00144a0: 0a00004e beq a00145e0 <rtems_task_mode+0x150>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
a00144a4: e59f9158 ldr r9, [pc, #344] ; a0014604 <rtems_task_mode+0x174>
a00144a8: e5997008 ldr r7, [r9, #8]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
a00144ac: e59780f0 ldr r8, [r7, #240] ; 0xf0
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
a00144b0: e5d7a070 ldrb sl, [r7, #112] ; 0x70
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a00144b4: e5973078 ldr r3, [r7, #120] ; 0x78
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a00144b8: 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;
a00144bc: e35a0000 cmp sl, #0
a00144c0: 03a0ac01 moveq sl, #256 ; 0x100
a00144c4: 13a0a000 movne sl, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a00144c8: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
a00144cc: 138aac02 orrne sl, sl, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a00144d0: e35b0000 cmp fp, #0
a00144d4: 03a0bb01 moveq fp, #1024 ; 0x400
a00144d8: 13a0b000 movne fp, #0
old_mode |= _ISR_Get_level();
a00144dc: ebffeca0 bl a000f764 <_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;
a00144e0: e18bb000 orr fp, fp, r0
old_mode |= _ISR_Get_level();
a00144e4: e18ba00a orr sl, fp, sl
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a00144e8: 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;
a00144ec: e585a000 str sl, [r5]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a00144f0: 0a000003 beq a0014504 <rtems_task_mode+0x74>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
a00144f4: e3140c01 tst r4, #256 ; 0x100
a00144f8: 13a03000 movne r3, #0
a00144fc: 03a03001 moveq r3, #1
a0014500: e5c73070 strb r3, [r7, #112] ; 0x70
if ( mask & RTEMS_TIMESLICE_MASK ) {
a0014504: e3160c02 tst r6, #512 ; 0x200
a0014508: 1a00001c bne a0014580 <rtems_task_mode+0xf0>
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
a001450c: e3160080 tst r6, #128 ; 0x80
a0014510: 1a000023 bne a00145a4 <rtems_task_mode+0x114>
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
a0014514: e2166b01 ands r6, r6, #1024 ; 0x400
a0014518: 0a000012 beq a0014568 <rtems_task_mode+0xd8>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
a001451c: e5d82008 ldrb r2, [r8, #8]
#include <rtems/score/tod.h>
#include <rtems/score/wkspace.h>
#include <rtems/score/apiext.h>
#include <rtems/score/sysstate.h>
rtems_status_code rtems_task_mode(
a0014520: e3140b01 tst r4, #1024 ; 0x400
a0014524: 13a03000 movne r3, #0
a0014528: 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 ) {
a001452c: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a0014530: 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 ) {
a0014534: 0a00000b beq a0014568 <rtems_task_mode+0xd8>
asr->is_enabled = is_asr_enabled;
a0014538: e5c83008 strb r3, [r8, #8]
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a001453c: e10f3000 mrs r3, CPSR
a0014540: e3832080 orr r2, r3, #128 ; 0x80
a0014544: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
a0014548: e5981018 ldr r1, [r8, #24]
information->signals_pending = information->signals_posted;
a001454c: e5982014 ldr r2, [r8, #20]
information->signals_posted = _signals;
a0014550: 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;
a0014554: e5882018 str r2, [r8, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a0014558: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
a001455c: e5986014 ldr r6, [r8, #20]
a0014560: e3560000 cmp r6, #0
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a0014564: 13a06001 movne r6, #1
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
a0014568: e59f3098 ldr r3, [pc, #152] ; a0014608 <rtems_task_mode+0x178>
a001456c: e5933000 ldr r3, [r3]
a0014570: e3530003 cmp r3, #3
a0014574: 0a00000d beq a00145b0 <rtems_task_mode+0x120>
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a0014578: e3a00000 mov r0, #0
a001457c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
*/
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) ) {
a0014580: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
a0014584: 13a03001 movne r3, #1
a0014588: 15873078 strne r3, [r7, #120] ; 0x78
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
a001458c: 159f3078 ldrne r3, [pc, #120] ; a001460c <rtems_task_mode+0x17c>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
a0014590: 05873078 streq r3, [r7, #120] ; 0x78
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;
a0014594: 15933000 ldrne r3, [r3]
a0014598: 15873074 strne r3, [r7, #116] ; 0x74
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
a001459c: e3160080 tst r6, #128 ; 0x80
a00145a0: 0affffdb beq a0014514 <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 ) );
a00145a4: e2040080 and r0, r4, #128 ; 0x80
a00145a8: ebffec68 bl a000f750 <_CPU_ISR_Set_level>
a00145ac: eaffffd8 b a0014514 <rtems_task_mode+0x84>
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
a00145b0: e3560000 cmp r6, #0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
a00145b4: e5993008 ldr r3, [r9, #8]
if ( are_signals_pending ||
a00145b8: 1a00000a bne a00145e8 <rtems_task_mode+0x158>
a00145bc: e59f2040 ldr r2, [pc, #64] ; a0014604 <rtems_task_mode+0x174>
a00145c0: e592200c ldr r2, [r2, #12]
a00145c4: e1530002 cmp r3, r2
a00145c8: 0a00000b beq a00145fc <rtems_task_mode+0x16c>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
a00145cc: e5d33070 ldrb r3, [r3, #112] ; 0x70
a00145d0: e3530000 cmp r3, #0
a00145d4: 1a000003 bne a00145e8 <rtems_task_mode+0x158>
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a00145d8: e1a00006 mov r0, r6 <== NOT EXECUTED
}
a00145dc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
a00145e0: e3a00009 mov r0, #9 <== NOT EXECUTED
a00145e4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
a00145e8: e3a03001 mov r3, #1
a00145ec: e5c93004 strb r3, [r9, #4]
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
a00145f0: eb000298 bl a0015058 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
a00145f4: e3a00000 mov r0, #0
a00145f8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a00145fc: e1a00006 mov r0, r6
a0014600: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000deb4 <rtems_task_resume>:
#include <rtems/score/sysstate.h>
rtems_status_code rtems_task_resume(
rtems_id id
)
{
a000deb4: e92d4010 push {r4, lr}
a000deb8: e24dd004 sub sp, sp, #4
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000debc: e1a0100d mov r1, sp
a000dec0: eb0008fc bl a00102b8 <_Thread_Get>
switch ( location ) {
a000dec4: e59d4000 ldr r4, [sp]
)
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000dec8: e1a03000 mov r3, r0
switch ( location ) {
a000decc: e3540000 cmp r4, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000ded0: 13a00004 movne r0, #4
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000ded4: 1a000004 bne a000deec <rtems_task_resume+0x38>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
States_Control the_states
)
{
return (the_states & STATES_SUSPENDED);
a000ded8: e5933010 ldr r3, [r3, #16]
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
a000dedc: e3130002 tst r3, #2
a000dee0: 1a000003 bne a000def4 <rtems_task_resume+0x40>
_Thread_Resume( the_thread );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
a000dee4: eb0008eb bl a0010298 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
a000dee8: e3a0000e mov r0, #14 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000deec: e28dd004 add sp, sp, #4
a000def0: 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 );
a000def4: e3a01002 mov r1, #2
a000def8: eb0007f0 bl a000fec0 <_Thread_Clear_state>
_Thread_Enable_dispatch();
a000defc: eb0008e5 bl a0010298 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000df00: e1a00004 mov r0, r4
a000df04: eafffff8 b a000deec <rtems_task_resume+0x38>
a000ca20 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
a000ca20: e92d4030 push {r4, r5, lr}
a000ca24: e1a04001 mov r4, r1
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000ca28: e59f1098 ldr r1, [pc, #152] ; a000cac8 <rtems_task_set_note+0xa8>
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
a000ca2c: e1a03000 mov r3, r0
a000ca30: e24dd008 sub sp, sp, #8
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000ca34: e5d11004 ldrb r1, [r1, #4]
a000ca38: e3510000 cmp r1, #0
return RTEMS_NOT_CONFIGURED;
a000ca3c: 03a00016 moveq r0, #22
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000ca40: 1a000001 bne a000ca4c <rtems_task_set_note+0x2c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000ca44: e28dd008 add sp, sp, #8
a000ca48: e8bd8030 pop {r4, r5, pc}
/*
* 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 )
a000ca4c: e354000f cmp r4, #15
return RTEMS_INVALID_NUMBER;
a000ca50: 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 )
a000ca54: 8afffffa bhi a000ca44 <rtems_task_set_note+0x24>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000ca58: e3530000 cmp r3, #0
a000ca5c: 0a000012 beq a000caac <rtems_task_set_note+0x8c>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
a000ca60: e59f1064 ldr r1, [pc, #100] ; a000cacc <rtems_task_set_note+0xac>
a000ca64: e5911008 ldr r1, [r1, #8]
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000ca68: e591c008 ldr ip, [r1, #8]
a000ca6c: e153000c cmp r3, ip
a000ca70: 0a00000f beq a000cab4 <rtems_task_set_note+0x94>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
a000ca74: e28d1004 add r1, sp, #4
a000ca78: e58d2000 str r2, [sp]
a000ca7c: eb0009b9 bl a000f168 <_Thread_Get>
switch ( location ) {
a000ca80: e59d5004 ldr r5, [sp, #4]
a000ca84: e59d2000 ldr r2, [sp]
a000ca88: e3550000 cmp r5, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000ca8c: 13a00004 movne r0, #4
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000ca90: 1affffeb bne a000ca44 <rtems_task_set_note+0x24>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
a000ca94: e59030f0 ldr r3, [r0, #240] ; 0xf0
a000ca98: e2844008 add r4, r4, #8
a000ca9c: e7832104 str r2, [r3, r4, lsl #2]
_Thread_Enable_dispatch();
a000caa0: eb0009a8 bl a000f148 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000caa4: e1a00005 mov r0, r5
a000caa8: eaffffe5 b a000ca44 <rtems_task_set_note+0x24>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000caac: e59f3018 ldr r3, [pc, #24] ; a000cacc <rtems_task_set_note+0xac><== NOT EXECUTED
a000cab0: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
a000cab4: e59130f0 ldr r3, [r1, #240] ; 0xf0 <== NOT EXECUTED
a000cab8: e2844008 add r4, r4, #8 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000cabc: 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;
a000cac0: e7832104 str r2, [r3, r4, lsl #2] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000cac4: eaffffde b a000ca44 <rtems_task_set_note+0x24> <== NOT EXECUTED
a000ef58 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
a000ef58: e92d4030 push {r4, r5, lr}
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
a000ef5c: 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
)
{
a000ef60: e24dd004 sub sp, sp, #4
a000ef64: e1a05002 mov r5, r2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
a000ef68: 0a000004 beq a000ef80 <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 ) );
a000ef6c: e59f3078 ldr r3, [pc, #120] ; a000efec <rtems_task_set_priority+0x94>
a000ef70: e5d33000 ldrb r3, [r3]
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
a000ef74: e1540003 cmp r4, r3
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
a000ef78: 83a00013 movhi r0, #19
a000ef7c: 8a000018 bhi a000efe4 <rtems_task_set_priority+0x8c>
if ( !old_priority )
a000ef80: e3550000 cmp r5, #0
return RTEMS_INVALID_ADDRESS;
a000ef84: 03a00009 moveq r0, #9
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
a000ef88: 0a000015 beq a000efe4 <rtems_task_set_priority+0x8c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
a000ef8c: e1a0100d mov r1, sp
a000ef90: eb000981 bl a001159c <_Thread_Get>
switch ( location ) {
a000ef94: e59d3000 ldr r3, [sp]
a000ef98: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000ef9c: 13a00004 movne r0, #4
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000efa0: 1a00000f bne a000efe4 <rtems_task_set_priority+0x8c>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
a000efa4: e5903014 ldr r3, [r0, #20]
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
a000efa8: 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;
a000efac: e5853000 str r3, [r5]
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
a000efb0: 0a000009 beq a000efdc <rtems_task_set_priority+0x84>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
a000efb4: 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;
a000efb8: e5804018 str r4, [r0, #24]
if ( the_thread->resource_count == 0 ||
a000efbc: e3530000 cmp r3, #0
a000efc0: 0a000002 beq a000efd0 <rtems_task_set_priority+0x78>
a000efc4: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
a000efc8: e1540003 cmp r4, r3 <== NOT EXECUTED
a000efcc: 2a000002 bcs a000efdc <rtems_task_set_priority+0x84> <== NOT EXECUTED
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
a000efd0: e1a01004 mov r1, r4
a000efd4: e3a02000 mov r2, #0
a000efd8: eb000834 bl a00110b0 <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
a000efdc: eb000966 bl a001157c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000efe0: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000efe4: e28dd004 add sp, sp, #4
a000efe8: e8bd8030 pop {r4, r5, pc}
a000ac38 <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
a000ac38: e92d4070 push {r4, r5, r6, lr}
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
a000ac3c: e2516000 subs r6, r1, #0
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
a000ac40: e24dd008 sub sp, sp, #8
a000ac44: e1a05002 mov r5, r2
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
a000ac48: 03a00009 moveq r0, #9
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
a000ac4c: 0a00000e beq a000ac8c <rtems_task_start+0x54>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
a000ac50: e28d1004 add r1, sp, #4
a000ac54: eb000912 bl a000d0a4 <_Thread_Get>
switch ( location ) {
a000ac58: e59d4004 ldr r4, [sp, #4]
a000ac5c: e3540000 cmp r4, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000ac60: 13a00004 movne r0, #4
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000ac64: 1a000008 bne a000ac8c <rtems_task_start+0x54>
case OBJECTS_LOCAL:
if ( _Thread_Start(
a000ac68: e1a01004 mov r1, r4
a000ac6c: e1a02006 mov r2, r6
a000ac70: e1a03004 mov r3, r4
a000ac74: e58d5000 str r5, [sp]
a000ac78: eb000b7d bl a000da74 <_Thread_Start>
a000ac7c: e3500000 cmp r0, #0
a000ac80: 1a000003 bne a000ac94 <rtems_task_start+0x5c>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
a000ac84: eb0008fe bl a000d084 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
a000ac88: e3a0000e mov r0, #14 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000ac8c: e28dd008 add sp, sp, #8
a000ac90: 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();
a000ac94: eb0008fa bl a000d084 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000ac98: e1a00004 mov r0, r4
a000ac9c: eafffffa b a000ac8c <rtems_task_start+0x54>
a000e174 <rtems_task_suspend>:
#include <rtems/score/sysstate.h>
rtems_status_code rtems_task_suspend(
rtems_id id
)
{
a000e174: e92d4010 push {r4, lr}
a000e178: e24dd004 sub sp, sp, #4
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000e17c: e1a0100d mov r1, sp
a000e180: eb0008c8 bl a00104a8 <_Thread_Get>
switch ( location ) {
a000e184: e59d3000 ldr r3, [sp]
)
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000e188: e1a02000 mov r2, r0
switch ( location ) {
a000e18c: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000e190: 13a00004 movne r0, #4
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000e194: 1a000004 bne a000e1ac <rtems_task_suspend+0x38>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
States_Control the_states
)
{
return (the_states & STATES_SUSPENDED);
a000e198: e5924010 ldr r4, [r2, #16]
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
a000e19c: e2144002 ands r4, r4, #2
a000e1a0: 0a000003 beq a000e1b4 <rtems_task_suspend+0x40>
_Thread_Suspend( the_thread );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
a000e1a4: eb0008b7 bl a0010488 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_ALREADY_SUSPENDED;
a000e1a8: e3a0000f mov r0, #15 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000e1ac: e28dd004 add sp, sp, #4
a000e1b0: 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 );
a000e1b4: e3a01002 mov r1, #2
a000e1b8: eb000ae2 bl a0010d48 <_Thread_Set_state>
_Thread_Enable_dispatch();
a000e1bc: eb0008b1 bl a0010488 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000e1c0: e1a00004 mov r0, r4
a000e1c4: eafffff8 b a000e1ac <rtems_task_suspend+0x38>
a0009348 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
a0009348: e92d4070 push {r4, r5, r6, lr}
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
a000934c: e2514000 subs r4, r1, #0
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
a0009350: e24dd004 sub sp, sp, #4
a0009354: e1a05002 mov r5, r2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
a0009358: 03a00009 moveq r0, #9
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
a000935c: 0a000013 beq a00093b0 <rtems_task_variable_add+0x68>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
a0009360: e1a0100d mov r1, sp
a0009364: eb000839 bl a000b450 <_Thread_Get>
switch (location) {
a0009368: e59d3000 ldr r3, [sp]
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
a000936c: e1a06000 mov r6, r0
switch (location) {
a0009370: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0009374: 13a00004 movne r0, #4
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
a0009378: 1a00000c bne a00093b0 <rtems_task_variable_add+0x68>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
a000937c: e59630fc ldr r3, [r6, #252] ; 0xfc
while (tvp) {
a0009380: e3530000 cmp r3, #0
a0009384: 1a000003 bne a0009398 <rtems_task_variable_add+0x50>
a0009388: ea00000a b a00093b8 <rtems_task_variable_add+0x70>
if (tvp->ptr == ptr) {
tvp->dtor = dtor;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
a000938c: e5933000 ldr r3, [r3] <== NOT EXECUTED
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
a0009390: e3530000 cmp r3, #0 <== NOT EXECUTED
a0009394: 0a000007 beq a00093b8 <rtems_task_variable_add+0x70> <== NOT EXECUTED
if (tvp->ptr == ptr) {
a0009398: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000939c: e1520004 cmp r2, r4 <== NOT EXECUTED
a00093a0: 1afffff9 bne a000938c <rtems_task_variable_add+0x44> <== NOT EXECUTED
tvp->dtor = dtor;
a00093a4: e5835010 str r5, [r3, #16] <== NOT EXECUTED
_Thread_Enable_dispatch();
a00093a8: eb000820 bl a000b430 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a00093ac: e3a00000 mov r0, #0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00093b0: e28dd004 add sp, sp, #4
a00093b4: e8bd8070 pop {r4, r5, r6, pc}
}
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
a00093b8: e3a00014 mov r0, #20
a00093bc: eb000c1c bl a000c434 <_Workspace_Allocate>
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
a00093c0: e3500000 cmp r0, #0
a00093c4: 0a000009 beq a00093f0 <rtems_task_variable_add+0xa8>
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
a00093c8: e5942000 ldr r2, [r4]
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
a00093cc: e59630fc ldr r3, [r6, #252] ; 0xfc
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
new->ptr = ptr;
a00093d0: 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;
a00093d4: e5802008 str r2, [r0, #8]
new->ptr = ptr;
new->dtor = dtor;
a00093d8: e5805010 str r5, [r0, #16]
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
a00093dc: e5803000 str r3, [r0]
the_thread->task_variables = new;
a00093e0: e58600fc str r0, [r6, #252] ; 0xfc
_Thread_Enable_dispatch();
a00093e4: eb000811 bl a000b430 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00093e8: e3a00000 mov r0, #0
a00093ec: eaffffef b a00093b0 <rtems_task_variable_add+0x68>
* 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();
a00093f0: eb00080e bl a000b430 <_Thread_Enable_dispatch>
return RTEMS_NO_MEMORY;
a00093f4: e3a0001a mov r0, #26
a00093f8: eaffffec b a00093b0 <rtems_task_variable_add+0x68>
a00093fc <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
a00093fc: e92d4010 push {r4, lr}
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
a0009400: e2514000 subs r4, r1, #0
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
a0009404: e24dd004 sub sp, sp, #4
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
a0009408: 03a00009 moveq r0, #9
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
a000940c: 0a000015 beq a0009468 <rtems_task_variable_delete+0x6c>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
a0009410: e1a0100d mov r1, sp
a0009414: eb00080d bl a000b450 <_Thread_Get>
switch (location) {
a0009418: e59d3000 ldr r3, [sp]
a000941c: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0009420: 13a00004 movne r0, #4
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
switch (location) {
a0009424: 1a00000f bne a0009468 <rtems_task_variable_delete+0x6c>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
a0009428: e59030fc ldr r3, [r0, #252] ; 0xfc
while (tvp) {
a000942c: e3530000 cmp r3, #0
a0009430: 0a00000a beq a0009460 <rtems_task_variable_delete+0x64>
if (tvp->ptr == ptr) {
a0009434: e5932004 ldr r2, [r3, #4]
a0009438: e1520004 cmp r2, r4
a000943c: 1a000004 bne a0009454 <rtems_task_variable_delete+0x58>
a0009440: ea000010 b a0009488 <rtems_task_variable_delete+0x8c>
a0009444: e5912004 ldr r2, [r1, #4] <== NOT EXECUTED
a0009448: e1520004 cmp r2, r4 <== NOT EXECUTED
a000944c: 0a000007 beq a0009470 <rtems_task_variable_delete+0x74> <== NOT EXECUTED
a0009450: 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;
a0009454: e5931000 ldr r1, [r3] <== NOT EXECUTED
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
a0009458: e3510000 cmp r1, #0 <== NOT EXECUTED
a000945c: 1afffff8 bne a0009444 <rtems_task_variable_delete+0x48> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
a0009460: eb0007f2 bl a000b430 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
a0009464: e3a00009 mov r0, #9 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0009468: e28dd004 add sp, sp, #4
a000946c: e8bd8010 pop {r4, pc}
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
a0009470: e5912000 ldr r2, [r1] <== NOT EXECUTED
a0009474: 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 );
a0009478: eb000028 bl a0009520 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
a000947c: eb0007eb bl a000b430 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009480: e3a00000 mov r0, #0
a0009484: eafffff7 b a0009468 <rtems_task_variable_delete+0x6c>
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
a0009488: e5932000 ldr r2, [r3]
a000948c: e1a01003 mov r1, r3
a0009490: e58020fc str r2, [r0, #252] ; 0xfc
a0009494: eafffff7 b a0009478 <rtems_task_variable_delete+0x7c>
a0009498 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
a0009498: e92d4030 push {r4, r5, lr}
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
a000949c: e2514000 subs r4, r1, #0
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
a00094a0: e24dd004 sub sp, sp, #4
a00094a4: e1a05002 mov r5, r2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
a00094a8: 0a000016 beq a0009508 <rtems_task_variable_get+0x70>
return RTEMS_INVALID_ADDRESS;
if ( !result )
a00094ac: e3520000 cmp r2, #0
a00094b0: 0a000014 beq a0009508 <rtems_task_variable_get+0x70>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
a00094b4: e1a0100d mov r1, sp
a00094b8: eb0007e4 bl a000b450 <_Thread_Get>
switch (location) {
a00094bc: e59d3000 ldr r3, [sp]
a00094c0: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a00094c4: 13a00004 movne r0, #4
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
a00094c8: 1a00000f bne a000950c <rtems_task_variable_get+0x74>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
a00094cc: e59030fc ldr r3, [r0, #252] ; 0xfc
while (tvp) {
a00094d0: e3530000 cmp r3, #0
a00094d4: 1a000003 bne a00094e8 <rtems_task_variable_get+0x50>
a00094d8: ea00000d b a0009514 <rtems_task_variable_get+0x7c>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
a00094dc: 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) {
a00094e0: e3530000 cmp r3, #0 <== NOT EXECUTED
a00094e4: 0a00000a beq a0009514 <rtems_task_variable_get+0x7c> <== NOT EXECUTED
if (tvp->ptr == ptr) {
a00094e8: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a00094ec: e1520004 cmp r2, r4 <== NOT EXECUTED
a00094f0: 1afffff9 bne a00094dc <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;
a00094f4: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
a00094f8: e5853000 str r3, [r5] <== NOT EXECUTED
_Thread_Enable_dispatch();
a00094fc: eb0007cb bl a000b430 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0009500: e3a00000 mov r0, #0 <== NOT EXECUTED
a0009504: ea000000 b a000950c <rtems_task_variable_get+0x74> <== NOT EXECUTED
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
a0009508: e3a00009 mov r0, #9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000950c: e28dd004 add sp, sp, #4
a0009510: e8bd8030 pop {r4, r5, pc}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
a0009514: eb0007c5 bl a000b430 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
a0009518: e3a00009 mov r0, #9
a000951c: eafffffa b a000950c <rtems_task_variable_get+0x74>
a000aca0 <rtems_task_wake_after>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000aca0: e59f307c ldr r3, [pc, #124] ; a000ad24 <rtems_task_wake_after+0x84>
#include <rtems/score/sysstate.h>
rtems_status_code rtems_task_wake_after(
rtems_interval ticks
)
{
a000aca4: e92d4030 push {r4, r5, lr}
a000aca8: e5932000 ldr r2, [r3]
a000acac: e1a04000 mov r4, r0
++level;
a000acb0: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000acb4: e5832000 str r2, [r3]
_Thread_Disable_dispatch();
if ( ticks == 0 ) {
a000acb8: e3500000 cmp r0, #0
a000acbc: 0a000012 beq a000ad0c <rtems_task_wake_after+0x6c>
_Scheduler_Yield();
} else {
_Thread_Set_state( _Thread_Executing, STATES_DELAYING );
a000acc0: e59f5060 ldr r5, [pc, #96] ; a000ad28 <rtems_task_wake_after+0x88>
a000acc4: e3a01008 mov r1, #8
a000acc8: e5950008 ldr r0, [r5, #8]
a000accc: eb000b1c bl a000d944 <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
a000acd0: e5951008 ldr r1, [r5, #8]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000acd4: e59f0050 ldr r0, [pc, #80] ; a000ad2c <rtems_task_wake_after+0x8c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000acd8: e3a03000 mov r3, #0
_Thread_Disable_dispatch();
if ( ticks == 0 ) {
_Scheduler_Yield();
} else {
_Thread_Set_state( _Thread_Executing, STATES_DELAYING );
_Watchdog_Initialize(
a000acdc: e5912008 ldr r2, [r1, #8]
a000ace0: e5813050 str r3, [r1, #80] ; 0x50
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a000ace4: e581306c str r3, [r1, #108] ; 0x6c
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
a000ace8: e5812068 str r2, [r1, #104] ; 0x68
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000acec: e5810064 str r0, [r1, #100] ; 0x64
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000acf0: e5814054 str r4, [r1, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000acf4: e59f0034 ldr r0, [pc, #52] ; a000ad30 <rtems_task_wake_after+0x90>
a000acf8: e2811048 add r1, r1, #72 ; 0x48
a000acfc: eb000bed bl a000dcb8 <_Watchdog_Insert>
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
}
_Thread_Enable_dispatch();
a000ad00: eb0008df bl a000d084 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
}
a000ad04: e3a00000 mov r0, #0 <== NOT EXECUTED
a000ad08: 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();
a000ad0c: e59f3020 ldr r3, [pc, #32] ; a000ad34 <rtems_task_wake_after+0x94>
a000ad10: e593300c ldr r3, [r3, #12]
a000ad14: e12fff33 blx r3
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
}
_Thread_Enable_dispatch();
a000ad18: eb0008d9 bl a000d084 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
}
a000ad1c: e3a00000 mov r0, #0
a000ad20: e8bd8030 pop {r4, r5, pc}
a000ba14 <rtems_task_wake_when>:
#include <rtems/score/sysstate.h>
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
a000ba14: e92d40f0 push {r4, r5, r6, r7, lr}
Watchdog_Interval seconds;
if ( !_TOD.is_set )
a000ba18: e59f40d8 ldr r4, [pc, #216] ; a000baf8 <rtems_task_wake_when+0xe4>
#include <rtems/score/sysstate.h>
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
a000ba1c: e1a06000 mov r6, r0
Watchdog_Interval seconds;
if ( !_TOD.is_set )
a000ba20: e5d43014 ldrb r3, [r4, #20]
a000ba24: e3530000 cmp r3, #0
a000ba28: 1a000001 bne a000ba34 <rtems_task_wake_when+0x20>
return RTEMS_NOT_DEFINED;
a000ba2c: e3a0000b mov r0, #11 <== NOT EXECUTED
a000ba30: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
if ( !time_buffer )
a000ba34: e3500000 cmp r0, #0
a000ba38: 0a000006 beq a000ba58 <rtems_task_wake_when+0x44>
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
a000ba3c: e3a05000 mov r5, #0
a000ba40: e5805018 str r5, [r0, #24]
if ( !_TOD_Validate( time_buffer ) )
a000ba44: ebfffcd1 bl a000ad90 <_TOD_Validate>
a000ba48: e1500005 cmp r0, r5
a000ba4c: 1a000003 bne a000ba60 <rtems_task_wake_when+0x4c>
return RTEMS_INVALID_CLOCK;
a000ba50: e3a00014 mov r0, #20 <== NOT EXECUTED
a000ba54: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
a000ba58: e3a00009 mov r0, #9 <== NOT EXECUTED
a000ba5c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
a000ba60: e1a00006 mov r0, r6
a000ba64: ebfffc9e bl a000ace4 <_TOD_To_seconds>
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
a000ba68: e59f208c ldr r2, [pc, #140] ; a000bafc <rtems_task_wake_when+0xe8>
a000ba6c: e1a06000 mov r6, r0
a000ba70: e3a03000 mov r3, #0
a000ba74: e8940003 ldm r4, {r0, r1}
a000ba78: eb004821 bl a001db04 <__divdi3>
if ( seconds <= _TOD_Seconds_since_epoch() )
a000ba7c: e1560000 cmp r6, r0
a000ba80: 8a000001 bhi a000ba8c <rtems_task_wake_when+0x78>
return RTEMS_INVALID_CLOCK;
a000ba84: e3a00014 mov r0, #20 <== NOT EXECUTED
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000ba88: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000ba8c: e59f306c ldr r3, [pc, #108] ; a000bb00 <rtems_task_wake_when+0xec>
a000ba90: e5932000 ldr r2, [r3]
++level;
a000ba94: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000ba98: 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 );
a000ba9c: e59f7060 ldr r7, [pc, #96] ; a000bb04 <rtems_task_wake_when+0xf0>
a000baa0: e3a01010 mov r1, #16
a000baa4: e5970008 ldr r0, [r7, #8]
a000baa8: eb000b4b bl a000e7dc <_Thread_Set_state>
a000baac: e8940003 ldm r4, {r0, r1}
_Watchdog_Initialize(
&_Thread_Executing->Timer,
a000bab0: e5974008 ldr r4, [r7, #8]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000bab4: e59fe04c ldr lr, [pc, #76] ; a000bb08 <rtems_task_wake_when+0xf4>
a000bab8: e59f203c ldr r2, [pc, #60] ; a000bafc <rtems_task_wake_when+0xe8>
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
_Watchdog_Initialize(
a000babc: e594c008 ldr ip, [r4, #8]
a000bac0: e3a03000 mov r3, #0
a000bac4: e584e064 str lr, [r4, #100] ; 0x64
the_watchdog->id = id;
a000bac8: e584c068 str ip, [r4, #104] ; 0x68
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000bacc: e5845050 str r5, [r4, #80] ; 0x50
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a000bad0: e584506c str r5, [r4, #108] ; 0x6c
a000bad4: eb00480a bl a001db04 <__divdi3>
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_seconds(
a000bad8: e0606006 rsb r6, r0, r6
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a000badc: e2841048 add r1, r4, #72 ; 0x48
a000bae0: e59f0024 ldr r0, [pc, #36] ; a000bb0c <rtems_task_wake_when+0xf8>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000bae4: e5846054 str r6, [r4, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a000bae8: eb000c46 bl a000ec08 <_Watchdog_Insert>
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
a000baec: eb00090a bl a000df1c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000baf0: e1a00005 mov r0, r5 <== NOT EXECUTED
a000baf4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a000acc0 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
a000acc0: e92d4030 push {r4, r5, lr}
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
a000acc4: e2504000 subs r4, r0, #0
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
a000acc8: e24dd004 sub sp, sp, #4
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a000accc: 03a00003 moveq r0, #3
rtems_id *id
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
a000acd0: 1a000001 bne a000acdc <rtems_timer_create+0x1c>
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000acd4: e28dd004 add sp, sp, #4
a000acd8: e8bd8030 pop {r4, r5, pc}
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a000acdc: e3510000 cmp r1, #0
return RTEMS_INVALID_ADDRESS;
a000ace0: 03a00009 moveq r0, #9
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a000ace4: 0afffffa beq a000acd4 <rtems_timer_create+0x14>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000ace8: e59f3070 ldr r3, [pc, #112] ; a000ad60 <rtems_timer_create+0xa0>
a000acec: e5932000 ldr r2, [r3]
++level;
a000acf0: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000acf4: 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 );
a000acf8: e59f5064 ldr r5, [pc, #100] ; a000ad64 <rtems_timer_create+0xa4>
a000acfc: e58d1000 str r1, [sp]
a000ad00: e1a00005 mov r0, r5
a000ad04: eb000416 bl a000bd64 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
a000ad08: e3500000 cmp r0, #0
a000ad0c: e59d1000 ldr r1, [sp]
a000ad10: 0a00000f beq a000ad54 <rtems_timer_create+0x94>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
a000ad14: e5903008 ldr r3, [r0, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000ad18: e595201c ldr r2, [r5, #28]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
a000ad1c: e3a0e004 mov lr, #4
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000ad20: e3a05000 mov r5, #0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000ad24: e1a0c803 lsl ip, r3, #16
a000ad28: e580e038 str lr, [r0, #56] ; 0x38
a000ad2c: e5805018 str r5, [r0, #24]
the_watchdog->routine = routine;
a000ad30: e580502c str r5, [r0, #44] ; 0x2c
the_watchdog->id = id;
a000ad34: e5805030 str r5, [r0, #48] ; 0x30
the_watchdog->user_data = user_data;
a000ad38: e5805034 str r5, [r0, #52] ; 0x34
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000ad3c: e782072c str r0, [r2, ip, lsr #14]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000ad40: e580400c str r4, [r0, #12]
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
a000ad44: e5813000 str r3, [r1]
_Thread_Enable_dispatch();
a000ad48: eb0008ea bl a000d0f8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000ad4c: e1a00005 mov r0, r5
a000ad50: eaffffdf b a000acd4 <rtems_timer_create+0x14>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
a000ad54: eb0008e7 bl a000d0f8 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a000ad58: e3a00005 mov r0, #5 <== NOT EXECUTED
a000ad5c: eaffffdc b a000acd4 <rtems_timer_create+0x14> <== NOT EXECUTED
a000ad68 <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a000ad68: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
a000ad6c: e2516000 subs r6, r1, #0
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a000ad70: e1a05000 mov r5, r0
a000ad74: e24dd004 sub sp, sp, #4
a000ad78: e1a04002 mov r4, r2
a000ad7c: e1a07003 mov r7, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
a000ad80: 03a0000a moveq r0, #10
{
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
a000ad84: 1a000001 bne a000ad90 <rtems_timer_fire_after+0x28>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000ad88: e28dd004 add sp, sp, #4
a000ad8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
a000ad90: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a000ad94: 03a00009 moveq r0, #9
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
a000ad98: 0afffffa beq a000ad88 <rtems_timer_fire_after+0x20>
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
a000ad9c: e59f0084 ldr r0, [pc, #132] ; a000ae28 <rtems_timer_fire_after+0xc0>
a000ada0: e1a01005 mov r1, r5
a000ada4: e1a0200d mov r2, sp
a000ada8: eb000524 bl a000c240 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a000adac: e59d3000 ldr r3, [sp]
a000adb0: e1a08000 mov r8, r0
a000adb4: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000adb8: 13a00004 movne r0, #4
if ( !routine )
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a000adbc: 1afffff1 bne a000ad88 <rtems_timer_fire_after+0x20>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a000adc0: e288a010 add sl, r8, #16
a000adc4: e1a0000a mov r0, sl
a000adc8: eb000c44 bl a000dee0 <_Watchdog_Remove>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000adcc: e10f2000 mrs r2, CPSR
a000add0: e3823080 orr r3, r2, #128 ; 0x80
a000add4: 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 ) {
a000add8: e5983018 ldr r3, [r8, #24]
a000addc: e3530000 cmp r3, #0
a000ade0: 1a00000c bne a000ae18 <rtems_timer_fire_after+0xb0>
/*
* 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;
a000ade4: e5883038 str r3, [r8, #56] ; 0x38
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000ade8: e5883018 str r3, [r8, #24]
the_watchdog->routine = routine;
a000adec: e588402c str r4, [r8, #44] ; 0x2c
the_watchdog->id = id;
a000adf0: e5885030 str r5, [r8, #48] ; 0x30
the_watchdog->user_data = user_data;
a000adf4: e5887034 str r7, [r8, #52] ; 0x34
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000adf8: e129f002 msr CPSR_fc, r2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000adfc: e59f0028 ldr r0, [pc, #40] ; a000ae2c <rtems_timer_fire_after+0xc4>
a000ae00: e1a0100a mov r1, sl
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000ae04: e588601c str r6, [r8, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000ae08: eb000bc7 bl a000dd2c <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
a000ae0c: eb0008b9 bl a000d0f8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000ae10: e3a00000 mov r0, #0
a000ae14: eaffffdb b a000ad88 <rtems_timer_fire_after+0x20>
a000ae18: 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();
a000ae1c: eb0008b5 bl a000d0f8 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000ae20: e3a00000 mov r0, #0 <== NOT EXECUTED
a000ae24: eaffffd7 b a000ad88 <rtems_timer_fire_after+0x20> <== NOT EXECUTED
a001a96c <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001a96c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD.is_set )
a001a970: e59f40ec ldr r4, [pc, #236] ; a001aa64 <rtems_timer_fire_when+0xf8>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001a974: e1a06000 mov r6, r0
a001a978: e24dd008 sub sp, sp, #8
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD.is_set )
a001a97c: e5d40014 ldrb r0, [r4, #20]
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001a980: e1a05002 mov r5, r2
a001a984: e1a07003 mov r7, r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD.is_set )
a001a988: e3500000 cmp r0, #0
return RTEMS_NOT_DEFINED;
a001a98c: 03a0000b moveq r0, #11
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD.is_set )
a001a990: 1a000001 bne a001a99c <rtems_timer_fire_when+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a001a994: e28dd008 add sp, sp, #8
a001a998: 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 ) )
a001a99c: e1a00001 mov r0, r1
a001a9a0: e58d1000 str r1, [sp]
a001a9a4: ebfff42b bl a0017a58 <_TOD_Validate>
a001a9a8: e3500000 cmp r0, #0
a001a9ac: e59d1000 ldr r1, [sp]
a001a9b0: 1a000001 bne a001a9bc <rtems_timer_fire_when+0x50>
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
a001a9b4: e3a00014 mov r0, #20 <== NOT EXECUTED
a001a9b8: eafffff5 b a001a994 <rtems_timer_fire_when+0x28> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
a001a9bc: e3550000 cmp r5, #0
return RTEMS_INVALID_ADDRESS;
a001a9c0: 03a00009 moveq r0, #9
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
a001a9c4: 0afffff2 beq a001a994 <rtems_timer_fire_when+0x28>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
a001a9c8: e1a00001 mov r0, r1
a001a9cc: ebfff3f6 bl a00179ac <_TOD_To_seconds>
a001a9d0: e59f2090 ldr r2, [pc, #144] ; a001aa68 <rtems_timer_fire_when+0xfc>
a001a9d4: e1a08000 mov r8, r0
a001a9d8: e3a03000 mov r3, #0
a001a9dc: e8940003 ldm r4, {r0, r1}
a001a9e0: eb0052b3 bl a002f4b4 <__divdi3>
if ( seconds <= _TOD_Seconds_since_epoch() )
a001a9e4: e1580000 cmp r8, r0
a001a9e8: 9afffff1 bls a001a9b4 <rtems_timer_fire_when+0x48>
a001a9ec: e59f0078 ldr r0, [pc, #120] ; a001aa6c <rtems_timer_fire_when+0x100>
a001a9f0: e1a01006 mov r1, r6
a001a9f4: e28d2004 add r2, sp, #4
a001a9f8: eb000bd1 bl a001d944 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001a9fc: e59d9004 ldr r9, [sp, #4]
a001aa00: e1a0a000 mov sl, r0
a001aa04: e3590000 cmp r9, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001aa08: 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 ) {
a001aa0c: 1affffe0 bne a001a994 <rtems_timer_fire_when+0x28>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a001aa10: e28ab010 add fp, sl, #16
a001aa14: e1a0000b mov r0, fp
a001aa18: eb001388 bl a001f840 <_Watchdog_Remove>
a001aa1c: e8940003 ldm r4, {r0, r1}
the_timer->the_class = TIMER_TIME_OF_DAY;
a001aa20: e3a0c002 mov ip, #2
a001aa24: e59f203c ldr r2, [pc, #60] ; a001aa68 <rtems_timer_fire_when+0xfc>
a001aa28: e3a03000 mov r3, #0
a001aa2c: e58ac038 str ip, [sl, #56] ; 0x38
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a001aa30: e58a9018 str r9, [sl, #24]
the_watchdog->routine = routine;
a001aa34: e58a502c str r5, [sl, #44] ; 0x2c
the_watchdog->id = id;
a001aa38: e58a6030 str r6, [sl, #48] ; 0x30
the_watchdog->user_data = user_data;
a001aa3c: e58a7034 str r7, [sl, #52] ; 0x34
a001aa40: eb00529b bl a002f4b4 <__divdi3>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
a001aa44: e0608008 rsb r8, r0, r8
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a001aa48: e1a0100b mov r1, fp
a001aa4c: e59f001c ldr r0, [pc, #28] ; a001aa70 <rtems_timer_fire_when+0x104>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a001aa50: e58a801c str r8, [sl, #28]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a001aa54: eb00130c bl a001f68c <_Watchdog_Insert>
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
a001aa58: eb000f88 bl a001e880 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001aa5c: e1a00009 mov r0, r9
a001aa60: eaffffcb b a001a994 <rtems_timer_fire_when+0x28>
a001aa74 <rtems_timer_get_information>:
rtems_status_code rtems_timer_get_information(
rtems_id id,
rtems_timer_information *the_info
)
{
a001aa74: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
a001aa78: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_timer_get_information(
rtems_id id,
rtems_timer_information *the_info
)
{
a001aa7c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a001aa80: e1a01000 mov r1, r0 <== NOT EXECUTED
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
a001aa84: 03a00009 moveq r0, #9 <== NOT EXECUTED
)
{
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
a001aa88: 0a00000e beq a001aac8 <rtems_timer_get_information+0x54> <== NOT EXECUTED
a001aa8c: e59f003c ldr r0, [pc, #60] ; a001aad0 <rtems_timer_get_information+0x5c><== NOT EXECUTED
a001aa90: e1a0200d mov r2, sp <== NOT EXECUTED
a001aa94: eb000baa bl a001d944 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001aa98: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a001aa9c: e3550000 cmp r5, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001aaa0: 13a00004 movne r0, #4 <== NOT EXECUTED
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001aaa4: 1a000007 bne a001aac8 <rtems_timer_get_information+0x54> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
a001aaa8: e590c038 ldr ip, [r0, #56] ; 0x38 <== NOT EXECUTED
the_info->initial = the_timer->Ticker.initial;
a001aaac: e590101c ldr r1, [r0, #28] <== NOT EXECUTED
the_info->start_time = the_timer->Ticker.start_time;
a001aab0: e5902024 ldr r2, [r0, #36] ; 0x24 <== NOT EXECUTED
the_info->stop_time = the_timer->Ticker.stop_time;
a001aab4: 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;
a001aab8: e584c000 str ip, [r4] <== NOT EXECUTED
the_info->initial = the_timer->Ticker.initial;
the_info->start_time = the_timer->Ticker.start_time;
the_info->stop_time = the_timer->Ticker.stop_time;
a001aabc: e984000e stmib r4, {r1, r2, r3} <== NOT EXECUTED
_Thread_Enable_dispatch();
a001aac0: eb000f6e bl a001e880 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a001aac4: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a001aac8: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a001aacc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a001ab04 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
a001ab04: e92d4070 push {r4, r5, r6, lr}
a001ab08: e24dd004 sub sp, sp, #4
a001ab0c: e1a01000 mov r1, r0
a001ab10: e1a0200d mov r2, sp
a001ab14: e59f0088 ldr r0, [pc, #136] ; a001aba4 <rtems_timer_reset+0xa0>
a001ab18: eb000b89 bl a001d944 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001ab1c: e59d3000 ldr r3, [sp]
a001ab20: e1a05000 mov r5, r0
a001ab24: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001ab28: 13a04004 movne r4, #4
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001ab2c: 1a000006 bne a001ab4c <rtems_timer_reset+0x48>
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
a001ab30: e5904038 ldr r4, [r0, #56] ; 0x38
a001ab34: e3540000 cmp r4, #0
a001ab38: 0a000006 beq a001ab58 <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 ) {
a001ab3c: e3540001 cmp r4, #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;
a001ab40: 13a0400b movne r4, #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 ) {
a001ab44: 0a00000b beq a001ab78 <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();
a001ab48: eb000f4c bl a001e880 <_Thread_Enable_dispatch> <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a001ab4c: e1a00004 mov r0, r4
a001ab50: e28dd004 add sp, sp, #4
a001ab54: 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 );
a001ab58: e2805010 add r5, r0, #16
a001ab5c: e1a00005 mov r0, r5
a001ab60: eb001336 bl a001f840 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
a001ab64: e59f003c ldr r0, [pc, #60] ; a001aba8 <rtems_timer_reset+0xa4>
a001ab68: e1a01005 mov r1, r5
a001ab6c: eb0012c6 bl a001f68c <_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();
a001ab70: eb000f42 bl a001e880 <_Thread_Enable_dispatch>
a001ab74: eafffff4 b a001ab4c <rtems_timer_reset+0x48>
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
a001ab78: e1a04003 mov r4, r3 <== 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;
a001ab7c: e59f3028 ldr r3, [pc, #40] ; a001abac <rtems_timer_reset+0xa8><== NOT EXECUTED
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
a001ab80: 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;
a001ab84: e5936000 ldr r6, [r3] <== NOT EXECUTED
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
a001ab88: eb00132c bl a001f840 <_Watchdog_Remove> <== NOT EXECUTED
(*timer_server->schedule_operation)( timer_server, the_timer );
a001ab8c: e5963004 ldr r3, [r6, #4] <== NOT EXECUTED
a001ab90: e1a00006 mov r0, r6 <== NOT EXECUTED
a001ab94: e1a01005 mov r1, r5 <== NOT EXECUTED
a001ab98: e12fff33 blx r3 <== 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();
a001ab9c: eb000f37 bl a001e880 <_Thread_Enable_dispatch> <== NOT EXECUTED
a001aba0: eaffffe9 b a001ab4c <rtems_timer_reset+0x48> <== NOT EXECUTED
a001abb0 <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001abb0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a001abb4: e1a06001 mov r6, r1
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
a001abb8: e59f10d0 ldr r1, [pc, #208] ; a001ac90 <rtems_timer_server_fire_after+0xe0>
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001abbc: e1a07000 mov r7, r0
a001abc0: e24dd008 sub sp, sp, #8
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
a001abc4: e5914000 ldr r4, [r1]
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001abc8: e1a05002 mov r5, r2
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a001abcc: e3540000 cmp r4, #0
return RTEMS_INCORRECT_STATE;
a001abd0: 03a0000e moveq r0, #14
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a001abd4: 0a000005 beq a001abf0 <rtems_timer_server_fire_after+0x40>
return RTEMS_INCORRECT_STATE;
if ( !routine )
a001abd8: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a001abdc: 03a00009 moveq r0, #9
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !routine )
a001abe0: 0a000002 beq a001abf0 <rtems_timer_server_fire_after+0x40>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
a001abe4: e3560000 cmp r6, #0
return RTEMS_INVALID_NUMBER;
a001abe8: 03a0000a moveq r0, #10
return RTEMS_INCORRECT_STATE;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
a001abec: 1a000001 bne a001abf8 <rtems_timer_server_fire_after+0x48>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a001abf0: e28dd008 add sp, sp, #8
a001abf4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a001abf8: e28d2004 add r2, sp, #4
a001abfc: e59f0090 ldr r0, [pc, #144] ; a001ac94 <rtems_timer_server_fire_after+0xe4>
a001ac00: e1a01007 mov r1, r7
a001ac04: e58d3000 str r3, [sp]
a001ac08: eb000b4d bl a001d944 <_Objects_Get>
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001ac0c: e59d2004 ldr r2, [sp, #4]
a001ac10: e1a08000 mov r8, r0
a001ac14: e3520000 cmp r2, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001ac18: 13a00004 movne r0, #4
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001ac1c: 1afffff3 bne a001abf0 <rtems_timer_server_fire_after+0x40>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a001ac20: e2880010 add r0, r8, #16
a001ac24: eb001305 bl a001f840 <_Watchdog_Remove>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a001ac28: e10f1000 mrs r1, CPSR
a001ac2c: e3812080 orr r2, r1, #128 ; 0x80
a001ac30: e129f002 msr CPSR_fc, r2
/*
* 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 ) {
a001ac34: e5982018 ldr r2, [r8, #24]
a001ac38: e59d3000 ldr r3, [sp]
a001ac3c: e3520000 cmp r2, #0
a001ac40: 1a00000e bne a001ac80 <rtems_timer_server_fire_after+0xd0>
/*
* 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;
a001ac44: e3a00001 mov r0, #1
a001ac48: e5880038 str r0, [r8, #56] ; 0x38
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a001ac4c: e5882018 str r2, [r8, #24]
the_watchdog->routine = routine;
a001ac50: e588502c str r5, [r8, #44] ; 0x2c
the_watchdog->id = id;
a001ac54: e5887030 str r7, [r8, #48] ; 0x30
the_watchdog->user_data = user_data;
a001ac58: e5883034 str r3, [r8, #52] ; 0x34
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
a001ac5c: e588601c str r6, [r8, #28]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a001ac60: e129f001 msr CPSR_fc, r1
_ISR_Enable( level );
(*timer_server->schedule_operation)( timer_server, the_timer );
a001ac64: e1a00004 mov r0, r4
a001ac68: e1a01008 mov r1, r8
a001ac6c: e5943004 ldr r3, [r4, #4]
a001ac70: e12fff33 blx r3
_Thread_Enable_dispatch();
a001ac74: eb000f01 bl a001e880 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001ac78: e3a00000 mov r0, #0
a001ac7c: eaffffdb b a001abf0 <rtems_timer_server_fire_after+0x40>
a001ac80: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
_Thread_Enable_dispatch();
a001ac84: eb000efd bl a001e880 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a001ac88: e3a00000 mov r0, #0 <== NOT EXECUTED
a001ac8c: eaffffd7 b a001abf0 <rtems_timer_server_fire_after+0x40> <== NOT EXECUTED
a001ac98 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001ac98: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a001ac9c: e1a07000 mov r7, r0
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
a001aca0: e59f00fc ldr r0, [pc, #252] ; a001ada4 <rtems_timer_server_fire_when+0x10c>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001aca4: e24dd008 sub sp, sp, #8
a001aca8: e1a06002 mov r6, r2
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
a001acac: e5904000 ldr r4, [r0]
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a001acb0: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a001acb4: e3540000 cmp r4, #0
return RTEMS_INCORRECT_STATE;
a001acb8: 03a0000e moveq r0, #14
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a001acbc: 0a000004 beq a001acd4 <rtems_timer_server_fire_when+0x3c>
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
a001acc0: e59f50e0 ldr r5, [pc, #224] ; a001ada8 <rtems_timer_server_fire_when+0x110>
a001acc4: e5d53014 ldrb r3, [r5, #20]
a001acc8: e3530000 cmp r3, #0
return RTEMS_NOT_DEFINED;
a001accc: 03a0000b moveq r0, #11
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
a001acd0: 1a000001 bne a001acdc <rtems_timer_server_fire_when+0x44>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a001acd4: e28dd008 add sp, sp, #8
a001acd8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
a001acdc: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a001ace0: 03a00009 moveq r0, #9
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
a001ace4: 0afffffa beq a001acd4 <rtems_timer_server_fire_when+0x3c>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
a001ace8: e1a00001 mov r0, r1
a001acec: e58d1000 str r1, [sp]
a001acf0: ebfff358 bl a0017a58 <_TOD_Validate>
a001acf4: e3500000 cmp r0, #0
a001acf8: e59d1000 ldr r1, [sp]
a001acfc: 1a000001 bne a001ad08 <rtems_timer_server_fire_when+0x70>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
a001ad00: e3a00014 mov r0, #20 <== NOT EXECUTED
a001ad04: eafffff2 b a001acd4 <rtems_timer_server_fire_when+0x3c> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
a001ad08: e1a00001 mov r0, r1
a001ad0c: ebfff326 bl a00179ac <_TOD_To_seconds>
a001ad10: e59f2094 ldr r2, [pc, #148] ; a001adac <rtems_timer_server_fire_when+0x114>
a001ad14: e1a0a000 mov sl, r0
a001ad18: e3a03000 mov r3, #0
a001ad1c: e8950003 ldm r5, {r0, r1}
a001ad20: eb0051e3 bl a002f4b4 <__divdi3>
if ( seconds <= _TOD_Seconds_since_epoch() )
a001ad24: e15a0000 cmp sl, r0
a001ad28: 9afffff4 bls a001ad00 <rtems_timer_server_fire_when+0x68>
a001ad2c: e59f007c ldr r0, [pc, #124] ; a001adb0 <rtems_timer_server_fire_when+0x118>
a001ad30: e1a01007 mov r1, r7
a001ad34: e28d2004 add r2, sp, #4
a001ad38: eb000b01 bl a001d944 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a001ad3c: e59db004 ldr fp, [sp, #4]
a001ad40: e1a09000 mov r9, r0
a001ad44: e35b0000 cmp fp, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001ad48: 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 ) {
a001ad4c: 1affffe0 bne a001acd4 <rtems_timer_server_fire_when+0x3c>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a001ad50: e2890010 add r0, r9, #16
a001ad54: eb0012b9 bl a001f840 <_Watchdog_Remove>
a001ad58: e8950003 ldm r5, {r0, r1}
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
a001ad5c: e3a0c003 mov ip, #3
a001ad60: e59f2044 ldr r2, [pc, #68] ; a001adac <rtems_timer_server_fire_when+0x114>
a001ad64: e589c038 str ip, [r9, #56] ; 0x38
a001ad68: e3a03000 mov r3, #0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a001ad6c: e589b018 str fp, [r9, #24]
the_watchdog->routine = routine;
a001ad70: e589602c str r6, [r9, #44] ; 0x2c
the_watchdog->id = id;
a001ad74: e5897030 str r7, [r9, #48] ; 0x30
the_watchdog->user_data = user_data;
a001ad78: e5898034 str r8, [r9, #52] ; 0x34
a001ad7c: eb0051cc bl a002f4b4 <__divdi3>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
a001ad80: e060a00a rsb sl, r0, sl
(*timer_server->schedule_operation)( timer_server, the_timer );
a001ad84: e1a01009 mov r1, r9
a001ad88: e1a00004 mov r0, r4
a001ad8c: e5943004 ldr r3, [r4, #4]
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();
a001ad90: e589a01c str sl, [r9, #28]
(*timer_server->schedule_operation)( timer_server, the_timer );
a001ad94: e12fff33 blx r3
_Thread_Enable_dispatch();
a001ad98: eb000eb8 bl a001e880 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001ad9c: e1a0000b mov r0, fp
a001ada0: eaffffcb b a001acd4 <rtems_timer_server_fire_when+0x3c>
a000b0b8 <rtems_workspace_greedy_free>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000b0b8: e59f3020 ldr r3, [pc, #32] ; a000b0e0 <rtems_workspace_greedy_free+0x28><== NOT EXECUTED
void rtems_workspace_greedy_free( void *opaque )
{
a000b0bc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
a000b0c0: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000b0c4: e1a01000 mov r1, r0 <== NOT EXECUTED
++level;
a000b0c8: e2822001 add r2, r2, #1 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
a000b0cc: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch();
_Heap_Greedy_free( &_Workspace_Area, opaque );
a000b0d0: e59f000c ldr r0, [pc, #12] ; a000b0e4 <rtems_workspace_greedy_free+0x2c><== NOT EXECUTED
a000b0d4: eb00030e bl a000bd14 <_Heap_Greedy_free> <== NOT EXECUTED
_Thread_Enable_dispatch();
}
a000b0d8: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
void rtems_workspace_greedy_free( void *opaque )
{
_Thread_Disable_dispatch();
_Heap_Greedy_free( &_Workspace_Area, opaque );
_Thread_Enable_dispatch();
a000b0dc: ea000921 b a000d568 <_Thread_Enable_dispatch> <== NOT EXECUTED
a000af7c <sched_get_priority_max>:
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
a000af7c: e3500004 cmp r0, #4
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
a000af80: e52de004 push {lr} ; (str lr, [sp, #-4]!)
switch ( policy ) {
a000af84: 9a000004 bls a000af9c <sched_get_priority_max+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a000af88: eb0021cf bl a00136cc <__errno> <== NOT EXECUTED
a000af8c: e3a03016 mov r3, #22 <== NOT EXECUTED
a000af90: e5803000 str r3, [r0] <== NOT EXECUTED
a000af94: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000af98: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
a000af9c: e3a03001 mov r3, #1
a000afa0: e1a00013 lsl r0, r3, r0
a000afa4: e3100017 tst r0, #23
a000afa8: 0afffff6 beq a000af88 <sched_get_priority_max+0xc>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
a000afac: e59f3008 ldr r3, [pc, #8] ; a000afbc <sched_get_priority_max+0x40>
a000afb0: e5d30000 ldrb r0, [r3]
a000afb4: e2400001 sub r0, r0, #1
}
a000afb8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a000afc0 <sched_get_priority_min>:
*/
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
a000afc0: e3500004 cmp r0, #4
* 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
*/
int sched_get_priority_min(
int policy
)
{
a000afc4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
switch ( policy ) {
a000afc8: 9a000004 bls a000afe0 <sched_get_priority_min+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a000afcc: eb0021be bl a00136cc <__errno> <== NOT EXECUTED
a000afd0: e3a03016 mov r3, #22 <== NOT EXECUTED
a000afd4: e5803000 str r3, [r0] <== NOT EXECUTED
a000afd8: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000afdc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
*/
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
a000afe0: e3a03001 mov r3, #1
a000afe4: e1a00013 lsl r0, r3, r0
a000afe8: e3100017 tst r0, #23
a000afec: 0afffff6 beq a000afcc <sched_get_priority_min+0xc>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
a000aff0: e1a00003 mov r0, r3
}
a000aff4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a000a3fc <sched_getparam>:
*/
int sched_getparam(
pid_t pid __attribute__((unused)),
struct sched_param *param __attribute__((unused))
)
{
a000a3fc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a000a400: eb0022d0 bl a0012f48 <__errno> <== NOT EXECUTED
a000a404: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a000a408: e5803000 str r3, [r0] <== NOT EXECUTED
}
a000a40c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a410: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000a414 <sched_getscheduler>:
#include <rtems/posix/time.h>
int sched_getscheduler(
pid_t pid __attribute__((unused))
)
{
a000a414: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a000a418: eb0022ca bl a0012f48 <__errno> <== NOT EXECUTED
a000a41c: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a000a420: e5803000 str r3, [r0] <== NOT EXECUTED
}
a000a424: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a428: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000aff8 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
a000aff8: e92d4010 push {r4, lr} <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
a000affc: e2504000 subs r4, r0, #0 <== NOT EXECUTED
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
a000b000: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
a000b004: 1a000007 bne a000b028 <sched_rr_get_interval+0x30> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
a000b008: e3510000 cmp r1, #0 <== NOT EXECUTED
a000b00c: 0a00000f beq a000b050 <sched_rr_get_interval+0x58> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
a000b010: e59f304c ldr r3, [pc, #76] ; a000b064 <sched_rr_get_interval+0x6c><== NOT EXECUTED
a000b014: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000b018: eb000ea3 bl a000eaac <_Timespec_From_ticks> <== NOT EXECUTED
return 0;
a000b01c: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a000b020: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000b024: e8bd8010 pop {r4, pc} <== NOT EXECUTED
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
a000b028: e58d1000 str r1, [sp] <== NOT EXECUTED
a000b02c: ebffef58 bl a0006d94 <getpid> <== NOT EXECUTED
a000b030: e1500004 cmp r0, r4 <== NOT EXECUTED
a000b034: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a000b038: 0afffff2 beq a000b008 <sched_rr_get_interval+0x10> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ESRCH );
a000b03c: eb0021a2 bl a00136cc <__errno> <== NOT EXECUTED
a000b040: e3a03003 mov r3, #3 <== NOT EXECUTED
a000b044: e5803000 str r3, [r0] <== NOT EXECUTED
a000b048: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000b04c: eafffff3 b a000b020 <sched_rr_get_interval+0x28> <== NOT EXECUTED
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
a000b050: eb00219d bl a00136cc <__errno> <== NOT EXECUTED
a000b054: e3a03016 mov r3, #22 <== NOT EXECUTED
a000b058: e5803000 str r3, [r0] <== NOT EXECUTED
a000b05c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000b060: eaffffee b a000b020 <sched_rr_get_interval+0x28> <== NOT EXECUTED
a000a42c <sched_setparam>:
int sched_setparam(
pid_t pid __attribute__((unused)),
const struct sched_param *param __attribute__((unused))
)
{
a000a42c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a000a430: eb0022c4 bl a0012f48 <__errno> <== NOT EXECUTED
a000a434: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a000a438: e5803000 str r3, [r0] <== NOT EXECUTED
}
a000a43c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a440: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000a444 <sched_setscheduler>:
int sched_setscheduler(
pid_t pid __attribute__((unused)),
int policy __attribute__((unused)),
const struct sched_param *param __attribute__((unused))
)
{
a000a444: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a000a448: eb0022be bl a0012f48 <__errno> <== NOT EXECUTED
a000a44c: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a000a450: e5803000 str r3, [r0] <== NOT EXECUTED
}
a000a454: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a458: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000d334 <sem_close>:
#include <rtems/seterr.h>
int sem_close(
sem_t *sem
)
{
a000d334: e92d4010 push {r4, lr}
a000d338: e24dd004 sub sp, sp, #4
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
a000d33c: e5901000 ldr r1, [r0]
a000d340: e1a0200d mov r2, sp
a000d344: e59f0040 ldr r0, [pc, #64] ; a000d38c <sem_close+0x58>
a000d348: eb0008d9 bl a000f6b4 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
a000d34c: e59d4000 ldr r4, [sp]
a000d350: e3540000 cmp r4, #0
a000d354: 0a000005 beq a000d370 <sem_close+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000d358: eb0024fe bl a0016758 <__errno> <== NOT EXECUTED
a000d35c: e3a03016 mov r3, #22 <== NOT EXECUTED
a000d360: e5803000 str r3, [r0] <== NOT EXECUTED
a000d364: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a000d368: e28dd004 add sp, sp, #4
a000d36c: e8bd8010 pop {r4, pc}
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_semaphore->open_count -= 1;
a000d370: e5902018 ldr r2, [r0, #24]
a000d374: e2422001 sub r2, r2, #1
a000d378: e5802018 str r2, [r0, #24]
_POSIX_Semaphore_Delete( the_semaphore );
a000d37c: eb00196b bl a0013930 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
a000d380: eb000c79 bl a001056c <_Thread_Enable_dispatch>
return 0;
a000d384: e1a00004 mov r0, r4
a000d388: eafffff6 b a000d368 <sem_close+0x34>
a000d390 <sem_destroy>:
#include <rtems/seterr.h>
int sem_destroy(
sem_t *sem
)
{
a000d390: e92d4010 push {r4, lr}
a000d394: e24dd004 sub sp, sp, #4
a000d398: e5901000 ldr r1, [r0]
a000d39c: e1a0200d mov r2, sp
a000d3a0: e59f0058 ldr r0, [pc, #88] ; a000d400 <sem_destroy+0x70>
a000d3a4: eb0008c2 bl a000f6b4 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
a000d3a8: e59d3000 ldr r3, [sp]
a000d3ac: e3530000 cmp r3, #0
a000d3b0: 0a000005 beq a000d3cc <sem_destroy+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000d3b4: eb0024e7 bl a0016758 <__errno> <== NOT EXECUTED
a000d3b8: e3a03016 mov r3, #22 <== NOT EXECUTED
a000d3bc: e5803000 str r3, [r0] <== NOT EXECUTED
a000d3c0: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a000d3c4: e28dd004 add sp, sp, #4
a000d3c8: e8bd8010 pop {r4, pc}
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
a000d3cc: e5d04014 ldrb r4, [r0, #20]
a000d3d0: e3540000 cmp r4, #0
a000d3d4: 1a000003 bne a000d3e8 <sem_destroy+0x58>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
a000d3d8: eb001954 bl a0013930 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
a000d3dc: eb000c62 bl a001056c <_Thread_Enable_dispatch>
return 0;
a000d3e0: e1a00004 mov r0, r4
a000d3e4: eafffff6 b a000d3c4 <sem_destroy+0x34>
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
_Thread_Enable_dispatch();
a000d3e8: eb000c5f bl a001056c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a000d3ec: eb0024d9 bl a0016758 <__errno> <== NOT EXECUTED
a000d3f0: e3a03016 mov r3, #22 <== NOT EXECUTED
a000d3f4: e5803000 str r3, [r0] <== NOT EXECUTED
a000d3f8: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000d3fc: eafffff0 b a000d3c4 <sem_destroy+0x34> <== NOT EXECUTED
a000d404 <sem_getvalue>:
int sem_getvalue(
sem_t *sem,
int *sval
)
{
a000d404: e92d4030 push {r4, r5, lr}
a000d408: e5903000 ldr r3, [r0]
a000d40c: e24dd004 sub sp, sp, #4
a000d410: e1a04001 mov r4, r1
a000d414: e59f0040 ldr r0, [pc, #64] ; a000d45c <sem_getvalue+0x58>
a000d418: e1a01003 mov r1, r3
a000d41c: e1a0200d mov r2, sp
a000d420: eb0008a3 bl a000f6b4 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
a000d424: e59d5000 ldr r5, [sp]
a000d428: e3550000 cmp r5, #0
a000d42c: 0a000005 beq a000d448 <sem_getvalue+0x44>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000d430: eb0024c8 bl a0016758 <__errno> <== NOT EXECUTED
a000d434: e3a03016 mov r3, #22 <== NOT EXECUTED
a000d438: e5803000 str r3, [r0] <== NOT EXECUTED
a000d43c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a000d440: e28dd004 add sp, sp, #4
a000d444: e8bd8030 pop {r4, r5, pc}
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
a000d448: e5903064 ldr r3, [r0, #100] ; 0x64
a000d44c: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
a000d450: eb000c45 bl a001056c <_Thread_Enable_dispatch>
return 0;
a000d454: e1a00005 mov r0, r5
a000d458: eafffff8 b a000d440 <sem_getvalue+0x3c>
a000b494 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
a000b494: e92d000e push {r1, r2, r3}
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000b498: e59f3108 ldr r3, [pc, #264] ; a000b5a8 <sem_open+0x114>
a000b49c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000b4a0: e5932000 ldr r2, [r3]
a000b4a4: e24dd018 sub sp, sp, #24
a000b4a8: e59d4030 ldr r4, [sp, #48] ; 0x30
++level;
a000b4ac: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000b4b0: e5832000 str r2, [r3]
a000b4b4: e1a05000 mov r5, r0
Objects_Locations location;
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
a000b4b8: e2146c02 ands r6, r4, #512 ; 0x200
va_start(arg, oflag);
mode = va_arg( arg, mode_t );
value = va_arg( arg, unsigned int );
a000b4bc: 128d303c addne r3, sp, #60 ; 0x3c
a000b4c0: 158d3004 strne r3, [sp, #4]
const char *name,
Objects_Id *id,
size_t *len
)
{
return _POSIX_Name_to_id( &_POSIX_Semaphore_Information, name, id, len );
a000b4c4: e59f00e0 ldr r0, [pc, #224] ; a000b5ac <sem_open+0x118>
a000b4c8: e1a01005 mov r1, r5
a000b4cc: e28d2008 add r2, sp, #8
a000b4d0: e28d3014 add r3, sp, #20
a000b4d4: 159d7038 ldrne r7, [sp, #56] ; 0x38
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
a000b4d8: 01a07006 moveq r7, r6
a000b4dc: ebfffe64 bl a000ae74 <_POSIX_Name_to_id>
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
a000b4e0: e2508000 subs r8, r0, #0
a000b4e4: 0a000008 beq a000b50c <sem_open+0x78>
/*
* 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) ) ) {
a000b4e8: e3580002 cmp r8, #2
a000b4ec: 1a000001 bne a000b4f8 <sem_open+0x64>
a000b4f0: e3560000 cmp r6, #0
a000b4f4: 1a000018 bne a000b55c <sem_open+0xc8>
_Thread_Enable_dispatch();
a000b4f8: eb000ddf bl a000ec7c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
a000b4fc: eb00247e bl a00146fc <__errno> <== NOT EXECUTED
a000b500: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000b504: e5808000 str r8, [r0] <== NOT EXECUTED
a000b508: ea00000e b a000b548 <sem_open+0xb4> <== NOT EXECUTED
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
a000b50c: e2044c0a and r4, r4, #2560 ; 0xa00
a000b510: e3540c0a cmp r4, #2560 ; 0xa00
a000b514: 0a00001d beq a000b590 <sem_open+0xfc>
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
a000b518: e59d1008 ldr r1, [sp, #8]
a000b51c: e28d2010 add r2, sp, #16
a000b520: e59f0084 ldr r0, [pc, #132] ; a000b5ac <sem_open+0x118>
a000b524: eb0009ee bl a000dce4 <_Objects_Get>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( (sem_t *) &the_semaphore_id, &location );
the_semaphore->open_count += 1;
a000b528: e5903018 ldr r3, [r0, #24]
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( (sem_t *) &the_semaphore_id, &location );
a000b52c: e58d000c str r0, [sp, #12]
the_semaphore->open_count += 1;
a000b530: e2833001 add r3, r3, #1
a000b534: e5803018 str r3, [r0, #24]
_Thread_Enable_dispatch();
a000b538: eb000dcf bl a000ec7c <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
a000b53c: eb000dce bl a000ec7c <_Thread_Enable_dispatch>
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
return &the_semaphore->Semaphore_id;
#else
return (sem_t *)&the_semaphore->Object.id;
a000b540: e59d300c ldr r3, [sp, #12]
a000b544: e2833008 add r3, r3, #8
#endif
}
a000b548: e1a00003 mov r0, r3
a000b54c: e28dd018 add sp, sp, #24
a000b550: e8bd41f0 pop {r4, r5, r6, r7, r8, lr}
a000b554: e28dd00c add sp, sp, #12
a000b558: e12fff1e bx lr
/*
* 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(
a000b55c: e1a03007 mov r3, r7
a000b560: e28dc00c add ip, sp, #12
a000b564: e3a02000 mov r2, #0
a000b568: e59d1014 ldr r1, [sp, #20]
a000b56c: e1a00005 mov r0, r5
a000b570: e58dc000 str ip, [sp]
a000b574: eb0019d5 bl a0011cd0 <_POSIX_Semaphore_Create_support>
a000b578: e1a04000 mov r4, r0
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
a000b57c: eb000dbe bl a000ec7c <_Thread_Enable_dispatch>
if ( status == -1 )
a000b580: e3740001 cmn r4, #1
return SEM_FAILED;
a000b584: 01a03004 moveq r3, r4
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
if ( status == -1 )
a000b588: 1affffec bne a000b540 <sem_open+0xac>
a000b58c: eaffffed b a000b548 <sem_open+0xb4> <== NOT EXECUTED
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
a000b590: eb000db9 bl a000ec7c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
a000b594: eb002458 bl a00146fc <__errno> <== NOT EXECUTED
a000b598: e3a03011 mov r3, #17 <== NOT EXECUTED
a000b59c: e5803000 str r3, [r0] <== NOT EXECUTED
a000b5a0: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000b5a4: eaffffe7 b a000b548 <sem_open+0xb4> <== NOT EXECUTED
a000aae8 <sem_post>:
#include <rtems/seterr.h>
int sem_post(
sem_t *sem
)
{
a000aae8: e92d4010 push {r4, lr}
a000aaec: e24dd004 sub sp, sp, #4
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
a000aaf0: e5901000 ldr r1, [r0]
a000aaf4: e1a0200d mov r2, sp
a000aaf8: e59f0040 ldr r0, [pc, #64] ; a000ab40 <sem_post+0x58>
a000aafc: eb000872 bl a000cccc <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
a000ab00: e59d4000 ldr r4, [sp]
a000ab04: e3540000 cmp r4, #0
a000ab08: 0a000005 beq a000ab24 <sem_post+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000ab0c: eb0022cf bl a0013650 <__errno> <== NOT EXECUTED
a000ab10: e3a03016 mov r3, #22 <== NOT EXECUTED
a000ab14: e5803000 str r3, [r0] <== NOT EXECUTED
a000ab18: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a000ab1c: e28dd004 add sp, sp, #4
a000ab20: e8bd8010 pop {r4, pc}
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Surrender(
a000ab24: e5901008 ldr r1, [r0, #8]
a000ab28: e1a02004 mov r2, r4
a000ab2c: e280001c add r0, r0, #28
a000ab30: eb0005b0 bl a000c1f8 <_CORE_semaphore_Surrender>
NULL /* XXX need to define a routine to handle this case */
#else
NULL
#endif
);
_Thread_Enable_dispatch();
a000ab34: eb000c12 bl a000db84 <_Thread_Enable_dispatch>
return 0;
a000ab38: e1a00004 mov r0, r4
a000ab3c: eafffff6 b a000ab1c <sem_post+0x34>
a000d634 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
a000d634: e92d4010 push {r4, lr} <== NOT EXECUTED
a000d638: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000d63c: 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 );
a000d640: e1a00001 mov r0, r1 <== NOT EXECUTED
a000d644: e1a0100d mov r1, sp <== NOT EXECUTED
a000d648: eb0015f0 bl a0012e10 <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
a000d64c: e3500003 cmp r0, #3 <== NOT EXECUTED
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
a000d650: e1a00004 mov r0, r4 <== 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 );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
a000d654: 0a000004 beq a000d66c <sem_timedwait+0x38> <== NOT EXECUTED
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
a000d658: e3a01000 mov r1, #0 <== NOT EXECUTED
a000d65c: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000d660: eb0018d9 bl a00139cc <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
a000d664: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000d668: 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 );
a000d66c: e3a01001 mov r1, #1 <== NOT EXECUTED
a000d670: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000d674: eb0018d4 bl a00139cc <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
a000d678: eafffff9 b a000d664 <sem_timedwait+0x30> <== NOT EXECUTED
a000d688 <sem_unlink>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000d688: e59f307c ldr r3, [pc, #124] ; a000d70c <sem_unlink+0x84>
#include <rtems/seterr.h>
int sem_unlink(
const char *name
)
{
a000d68c: e92d4030 push {r4, r5, lr}
a000d690: e5932000 ldr r2, [r3]
a000d694: e24dd008 sub sp, sp, #8
a000d698: e1a01000 mov r1, r0
++level;
a000d69c: e2822001 add r2, r2, #1
_Thread_Dispatch_disable_level = level;
a000d6a0: e5832000 str r2, [r3]
const char *name,
Objects_Id *id,
size_t *len
)
{
return _POSIX_Name_to_id( &_POSIX_Semaphore_Information, name, id, len );
a000d6a4: e59f4064 ldr r4, [pc, #100] ; a000d710 <sem_unlink+0x88>
a000d6a8: e1a0200d mov r2, sp
a000d6ac: e28d3004 add r3, sp, #4
a000d6b0: e1a00004 mov r0, r4
a000d6b4: eb00169d bl a0013130 <_POSIX_Name_to_id>
size_t name_len;
_Thread_Disable_dispatch();
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id, &name_len );
if ( status != 0 ) {
a000d6b8: e2505000 subs r5, r0, #0
a000d6bc: 1a00000d bne a000d6f8 <sem_unlink+0x70>
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
a000d6c0: e594301c ldr r3, [r4, #28]
a000d6c4: e1dd20b0 ldrh r2, [sp]
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Namespace_remove(
a000d6c8: e1a00004 mov r0, r4
a000d6cc: e7934102 ldr r4, [r3, r2, lsl #2]
a000d6d0: e1a01004 mov r1, r4
the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object(
&_POSIX_Semaphore_Information,
_Objects_Get_index( the_semaphore_id )
);
the_semaphore->linked = false;
a000d6d4: e5c45015 strb r5, [r4, #21]
a000d6d8: eb00084a bl a000f808 <_Objects_Namespace_remove>
_POSIX_Semaphore_Namespace_remove( the_semaphore );
_POSIX_Semaphore_Delete( the_semaphore );
a000d6dc: e1a00004 mov r0, r4
a000d6e0: eb001892 bl a0013930 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
a000d6e4: eb000ba0 bl a001056c <_Thread_Enable_dispatch>
return 0;
a000d6e8: e1a03005 mov r3, r5
}
a000d6ec: e1a00003 mov r0, r3
a000d6f0: e28dd008 add sp, sp, #8
a000d6f4: e8bd8030 pop {r4, r5, pc}
_Thread_Disable_dispatch();
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id, &name_len );
if ( status != 0 ) {
_Thread_Enable_dispatch();
a000d6f8: eb000b9b bl a001056c <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( status );
a000d6fc: eb002415 bl a0016758 <__errno> <== NOT EXECUTED
a000d700: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000d704: e5805000 str r5, [r0] <== NOT EXECUTED
a000d708: eafffff7 b a000d6ec <sem_unlink+0x64> <== NOT EXECUTED
a000a33c <setitimer>:
int which,
const struct itimerval *value,
struct itimerval *ovalue
)
{
if ( !value )
a000a33c: e3510000 cmp r1, #0
int setitimer(
int which,
const struct itimerval *value,
struct itimerval *ovalue
)
{
a000a340: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !value )
a000a344: 0a00000d beq a000a380 <setitimer+0x44>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
a000a348: e3520000 cmp r2, #0
a000a34c: 0a00000b beq a000a380 <setitimer+0x44>
rtems_set_errno_and_return_minus_one( EFAULT );
switch ( which ) {
a000a350: e3500002 cmp r0, #2
a000a354: 9a000004 bls a000a36c <setitimer+0x30>
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000a358: eb0022b9 bl a0012e44 <__errno>
a000a35c: e3a03016 mov r3, #22
a000a360: e5803000 str r3, [r0]
}
a000a364: e3e00000 mvn r0, #0
a000a368: e49df004 pop {pc} ; (ldr pc, [sp], #4)
switch ( which ) {
case ITIMER_REAL:
case ITIMER_VIRTUAL:
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
a000a36c: eb0022b4 bl a0012e44 <__errno> <== NOT EXECUTED
a000a370: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a000a374: e5803000 str r3, [r0] <== NOT EXECUTED
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
a000a378: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a37c: 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 );
a000a380: eb0022af bl a0012e44 <__errno> <== NOT EXECUTED
a000a384: e3a0300e mov r3, #14 <== NOT EXECUTED
a000a388: e5803000 str r3, [r0] <== NOT EXECUTED
a000a38c: eafffff4 b a000a364 <setitimer+0x28> <== NOT EXECUTED
a000ae48 <sigaction>:
struct sigaction *oact
)
{
ISR_Level level;
if ( oact )
a000ae48: e3520000 cmp r2, #0
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
a000ae4c: e92d4070 push {r4, r5, r6, lr}
a000ae50: e1a04000 mov r4, r0
a000ae54: e1a05001 mov r5, r1
ISR_Level level;
if ( oact )
a000ae58: 0a00000a beq a000ae88 <sigaction+0x40>
*oact = _POSIX_signals_Vectors[ sig ];
a000ae5c: e3a0100c mov r1, #12
a000ae60: e0010190 mul r1, r0, r1
a000ae64: e59f00f0 ldr r0, [pc, #240] ; a000af5c <sigaction+0x114>
a000ae68: e1a03002 mov r3, r2
a000ae6c: e790c001 ldr ip, [r0, r1]
a000ae70: e0801001 add r1, r0, r1
a000ae74: e483c004 str ip, [r3], #4
a000ae78: e5910004 ldr r0, [r1, #4]
a000ae7c: e5820004 str r0, [r2, #4]
a000ae80: e5912008 ldr r2, [r1, #8]
a000ae84: e5832004 str r2, [r3, #4]
if ( !sig )
a000ae88: e3540000 cmp r4, #0
a000ae8c: 0a00002d beq a000af48 <sigaction+0x100>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
a000ae90: e2443001 sub r3, r4, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
a000ae94: e353001f cmp r3, #31
a000ae98: 8a00002a bhi a000af48 <sigaction+0x100>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
a000ae9c: e3540009 cmp r4, #9
a000aea0: 0a000028 beq a000af48 <sigaction+0x100>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
a000aea4: e3550000 cmp r5, #0
a000aea8: 0a000024 beq a000af40 <sigaction+0xf8>
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000aeac: e10f6000 mrs r6, CPSR
a000aeb0: e3863080 orr r3, r6, #128 ; 0x80
a000aeb4: 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 ) {
a000aeb8: e5953008 ldr r3, [r5, #8]
a000aebc: e3530000 cmp r3, #0
a000aec0: 0a00000f beq a000af04 <sigaction+0xbc>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
a000aec4: e1a00004 mov r0, r4
a000aec8: eb001722 bl a0010b58 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
a000aecc: e3a0300c mov r3, #12
a000aed0: e0040493 mul r4, r3, r4
a000aed4: e1a03005 mov r3, r5
a000aed8: e4931004 ldr r1, [r3], #4
a000aedc: e59f2078 ldr r2, [pc, #120] ; a000af5c <sigaction+0x114>
a000aee0: e7821004 str r1, [r2, r4]
a000aee4: e5951004 ldr r1, [r5, #4]
a000aee8: e0824004 add r4, r2, r4
a000aeec: e5841004 str r1, [r4, #4]
a000aef0: e5933004 ldr r3, [r3, #4]
a000aef4: e5843008 str r3, [r4, #8]
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000aef8: 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;
a000aefc: e3a00000 mov r0, #0
a000af00: 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 ];
a000af04: e3a0300c mov r3, #12
a000af08: e0040493 mul r4, r3, r4
a000af0c: e59f104c ldr r1, [pc, #76] ; a000af60 <sigaction+0x118>
a000af10: e59f2044 ldr r2, [pc, #68] ; a000af5c <sigaction+0x114>
a000af14: e0813004 add r3, r1, r4
a000af18: e791c004 ldr ip, [r1, r4]
a000af1c: e5930004 ldr r0, [r3, #4]
a000af20: e5931008 ldr r1, [r3, #8]
a000af24: e0823004 add r3, r2, r4
a000af28: e782c004 str ip, [r2, r4]
a000af2c: e5830004 str r0, [r3, #4]
a000af30: e5831008 str r1, [r3, #8]
a000af34: 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;
a000af38: e3a00000 mov r0, #0
a000af3c: e8bd8070 pop {r4, r5, r6, pc}
a000af40: e1a00005 mov r0, r5 <== NOT EXECUTED
}
a000af44: 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 );
a000af48: eb0022ae bl a0013a08 <__errno> <== NOT EXECUTED
a000af4c: e3a03016 mov r3, #22 <== NOT EXECUTED
a000af50: e5803000 str r3, [r0] <== NOT EXECUTED
a000af54: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000af58: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000af64 <sigaddset>:
int sigaddset(
sigset_t *set,
int signo
)
{
if ( !set )
a000af64: e2503000 subs r3, r0, #0
int sigaddset(
sigset_t *set,
int signo
)
{
a000af68: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !set )
a000af6c: 0a00000a beq a000af9c <sigaddset+0x38>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
a000af70: e3510000 cmp r1, #0
a000af74: 0a000008 beq a000af9c <sigaddset+0x38>
a000af78: e2411001 sub r1, r1, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
a000af7c: e351001f cmp r1, #31
a000af80: 8a000005 bhi a000af9c <sigaddset+0x38>
rtems_set_errno_and_return_minus_one( EINVAL );
*set |= signo_to_mask(signo);
a000af84: e5932000 ldr r2, [r3]
a000af88: e3a0c001 mov ip, #1
return 0;
a000af8c: 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);
a000af90: e182111c orr r1, r2, ip, lsl r1
a000af94: e5831000 str r1, [r3]
return 0;
}
a000af98: 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 );
a000af9c: eb002299 bl a0013a08 <__errno> <== NOT EXECUTED
a000afa0: e3a03016 mov r3, #22 <== NOT EXECUTED
a000afa4: e5803000 str r3, [r0] <== NOT EXECUTED
a000afa8: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000afac: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000cf14 <sigdelset>:
int sigdelset(
sigset_t *set,
int signo
)
{
if ( !set )
a000cf14: e2503000 subs r3, r0, #0
int sigdelset(
sigset_t *set,
int signo
)
{
a000cf18: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !set )
a000cf1c: 0a00000c beq a000cf54 <sigdelset+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
a000cf20: e3510000 cmp r1, #0
a000cf24: 0a000008 beq a000cf4c <sigdelset+0x38>
a000cf28: e2411001 sub r1, r1, #1
return 0;
if ( !is_valid_signo(signo) )
a000cf2c: e351001f cmp r1, #31
a000cf30: 8a000007 bhi a000cf54 <sigdelset+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
*set &= ~signo_to_mask(signo);
a000cf34: e5932000 ldr r2, [r3]
a000cf38: e3a0c001 mov ip, #1
return 0;
a000cf3c: e3a00000 mov r0, #0
return 0;
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
*set &= ~signo_to_mask(signo);
a000cf40: e1c2111c bic r1, r2, ip, lsl r1
a000cf44: e5831000 str r1, [r3]
return 0;
a000cf48: e49df004 pop {pc} ; (ldr pc, [sp], #4)
{
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
return 0;
a000cf4c: 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;
}
a000cf50: 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 );
a000cf54: eb002322 bl a0015be4 <__errno> <== NOT EXECUTED
a000cf58: e3a03016 mov r3, #22 <== NOT EXECUTED
a000cf5c: e5803000 str r3, [r0] <== NOT EXECUTED
a000cf60: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000cf64: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000fefc <sigemptyset>:
int sigemptyset(
sigset_t *set
)
{
if ( !set )
a000fefc: e2503000 subs r3, r0, #0
#include <rtems/seterr.h>
int sigemptyset(
sigset_t *set
)
{
a000ff00: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !set )
a000ff04: 0a000002 beq a000ff14 <sigemptyset+0x18>
rtems_set_errno_and_return_minus_one( EINVAL );
*set = 0;
a000ff08: e3a00000 mov r0, #0
a000ff0c: e5830000 str r0, [r3]
return 0;
}
a000ff10: e49df004 pop {pc} ; (ldr pc, [sp], #4)
int sigemptyset(
sigset_t *set
)
{
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
a000ff14: eb000a5e bl a0012894 <__errno> <== NOT EXECUTED
a000ff18: e3a03016 mov r3, #22 <== NOT EXECUTED
a000ff1c: e5803000 str r3, [r0] <== NOT EXECUTED
a000ff20: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000ff24: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000cf94 <sigfillset>:
int sigfillset(
sigset_t *set
)
{
if ( !set )
a000cf94: e3500000 cmp r0, #0
#include <rtems/seterr.h>
int sigfillset(
sigset_t *set
)
{
a000cf98: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !set )
a000cf9c: 0a000003 beq a000cfb0 <sigfillset+0x1c>
rtems_set_errno_and_return_minus_one( EINVAL );
*set = SIGNAL_ALL_MASK;
a000cfa0: e3e03000 mvn r3, #0
a000cfa4: e5803000 str r3, [r0]
return 0;
a000cfa8: e3a00000 mov r0, #0
}
a000cfac: e49df004 pop {pc} ; (ldr pc, [sp], #4)
int sigfillset(
sigset_t *set
)
{
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
a000cfb0: eb00230b bl a0015be4 <__errno> <== NOT EXECUTED
a000cfb4: e3a03016 mov r3, #22 <== NOT EXECUTED
a000cfb8: e5803000 str r3, [r0] <== NOT EXECUTED
a000cfbc: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000cfc0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000cfc4 <sigismember>:
int sigismember(
const sigset_t *set,
int signo
)
{
if ( !set )
a000cfc4: e3500000 cmp r0, #0
int sigismember(
const sigset_t *set,
int signo
)
{
a000cfc8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( !set )
a000cfcc: 0a00000c beq a000d004 <sigismember+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
a000cfd0: e3510000 cmp r1, #0
a000cfd4: 0a000008 beq a000cffc <sigismember+0x38>
a000cfd8: e2411001 sub r1, r1, #1
return 0;
if ( !is_valid_signo(signo) )
a000cfdc: e351001f cmp r1, #31
a000cfe0: 8a000007 bhi a000d004 <sigismember+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( *set & signo_to_mask(signo) )
a000cfe4: e5903000 ldr r3, [r0]
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a000cfe8: e3a02001 mov r2, #1
const sigset_t *set,
int signo
)
{
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
a000cfec: e0133112 ands r3, r3, r2, lsl r1
a000cff0: 03a00000 moveq r0, #0
a000cff4: 13a00001 movne r0, #1
a000cff8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
if ( !signo )
return 0;
a000cffc: e1a00001 mov r0, r1 <== NOT EXECUTED
if ( *set & signo_to_mask(signo) )
return 1;
return 0;
}
a000d000: 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 );
a000d004: eb0022f6 bl a0015be4 <__errno> <== NOT EXECUTED
a000d008: e3a03016 mov r3, #22 <== NOT EXECUTED
a000d00c: e5803000 str r3, [r0] <== NOT EXECUTED
a000d010: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000d014: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000afdc <sigpending>:
sigset_t *set
)
{
POSIX_API_Control *api;
if ( !set )
a000afdc: e2503000 subs r3, r0, #0
#include <rtems/seterr.h>
int sigpending(
sigset_t *set
)
{
a000afe0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
POSIX_API_Control *api;
if ( !set )
a000afe4: 0a000009 beq a000b010 <sigpending+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
a000afe8: e59f2034 ldr r2, [pc, #52] ; a000b024 <sigpending+0x48>
*set = api->signals_pending | _POSIX_signals_Pending;
a000afec: e59f1034 ldr r1, [pc, #52] ; a000b028 <sigpending+0x4c>
return 0;
a000aff0: 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 ];
a000aff4: e5922008 ldr r2, [r2, #8]
*set = api->signals_pending | _POSIX_signals_Pending;
a000aff8: e5911000 ldr r1, [r1]
a000affc: e59220f4 ldr r2, [r2, #244] ; 0xf4
a000b000: e59220d4 ldr r2, [r2, #212] ; 0xd4
a000b004: e1812002 orr r2, r1, r2
a000b008: e5832000 str r2, [r3]
return 0;
}
a000b00c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
)
{
POSIX_API_Control *api;
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
a000b010: eb00227c bl a0013a08 <__errno> <== NOT EXECUTED
a000b014: e3a03016 mov r3, #22 <== NOT EXECUTED
a000b018: e5803000 str r3, [r0] <== NOT EXECUTED
a000b01c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000b020: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000d06c <sigqueue>:
int sigqueue(
pid_t pid,
int signo,
const union sigval value
)
{
a000d06c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
a000d070: e24dd004 sub sp, sp, #4 <== NOT EXECUTED
a000d074: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a000d078: e5232004 str r2, [r3, #-4]! <== NOT EXECUTED
return killinfo( pid, signo, &value );
a000d07c: e1a0200d mov r2, sp <== NOT EXECUTED
a000d080: eb00170c bl a0012cb8 <killinfo> <== NOT EXECUTED
}
a000d084: e28dd004 add sp, sp, #4 <== NOT EXECUTED
a000d088: e8bd8000 pop {pc} <== NOT EXECUTED
a000d08c <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
a000d08c: e92d4010 push {r4, lr} <== NOT EXECUTED
a000d090: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
a000d094: e1a04000 mov r4, 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 );
a000d098: e1a01000 mov r1, r0 <== NOT EXECUTED
a000d09c: e1a0200d mov r2, sp <== NOT EXECUTED
a000d0a0: e3a00001 mov r0, #1 <== NOT EXECUTED
a000d0a4: ebffffef bl a000d068 <sigprocmask> <== NOT EXECUTED
current_unblocked_signals = ~(*sigmask);
a000d0a8: e5943000 ldr r3, [r4] <== NOT EXECUTED
a000d0ac: e28d0008 add r0, sp, #8 <== NOT EXECUTED
status = sigtimedwait( ¤t_unblocked_signals, NULL, NULL );
a000d0b0: 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);
a000d0b4: e1e03003 mvn r3, r3 <== NOT EXECUTED
a000d0b8: e5203004 str r3, [r0, #-4]! <== NOT EXECUTED
status = sigtimedwait( ¤t_unblocked_signals, NULL, NULL );
a000d0bc: e1a02001 mov r2, r1 <== NOT EXECUTED
a000d0c0: eb000009 bl a000d0ec <sigtimedwait> <== NOT EXECUTED
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
a000d0c4: e3a00000 mov r0, #0 <== NOT EXECUTED
a000d0c8: e1a0100d mov r1, sp <== NOT EXECUTED
a000d0cc: e1a02000 mov r2, r0 <== NOT EXECUTED
a000d0d0: ebffffe4 bl a000d068 <sigprocmask> <== NOT EXECUTED
*/
#if defined(RTEMS_DEBUG)
assert( status != -1 );
#endif
rtems_set_errno_and_return_minus_one( EINTR );
a000d0d4: eb0022c2 bl a0015be4 <__errno> <== NOT EXECUTED
a000d0d8: e3a03004 mov r3, #4 <== NOT EXECUTED
a000d0dc: e5803000 str r3, [r0] <== NOT EXECUTED
}
a000d0e0: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000d0e4: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000d0e8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000b394 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
a000b394: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
a000b398: e2506000 subs r6, r0, #0
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
a000b39c: e24dd010 sub sp, sp, #16
a000b3a0: e1a05001 mov r5, r1
a000b3a4: e1a04002 mov r4, r2
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
a000b3a8: 0a000085 beq a000b5c4 <sigtimedwait+0x230>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
a000b3ac: e3520000 cmp r2, #0
a000b3b0: 0a000007 beq a000b3d4 <sigtimedwait+0x40>
if ( !_Timespec_Is_valid( timeout ) )
a000b3b4: e1a00002 mov r0, r2
a000b3b8: eb000ef1 bl a000ef84 <_Timespec_Is_valid>
a000b3bc: e3500000 cmp r0, #0
a000b3c0: 0a00007f beq a000b5c4 <sigtimedwait+0x230>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
a000b3c4: e1a00004 mov r0, r4
a000b3c8: eb000efe bl a000efc8 <_Timespec_To_ticks>
if ( !interval )
a000b3cc: e2504000 subs r4, r0, #0
a000b3d0: 0a00007b beq a000b5c4 <sigtimedwait+0x230>
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
the_thread = _Thread_Executing;
a000b3d4: e59f71fc ldr r7, [pc, #508] ; a000b5d8 <sigtimedwait+0x244>
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
a000b3d8: e3550000 cmp r5, #0
a000b3dc: 028d5004 addeq r5, sp, #4
the_thread = _Thread_Executing;
a000b3e0: e5973008 ldr r3, [r7, #8]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
a000b3e4: e593a0f4 ldr sl, [r3, #244] ; 0xf4
uint32_t level;
#if defined(ARM_MULTILIB_ARCH_V4)
uint32_t arm_switch_reg;
__asm__ volatile (
a000b3e8: e10f8000 mrs r8, CPSR
a000b3ec: e3882080 orr r2, r8, #128 ; 0x80
a000b3f0: e129f002 msr CPSR_fc, r2
*/
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
a000b3f4: e5961000 ldr r1, [r6]
a000b3f8: e59a20d4 ldr r2, [sl, #212] ; 0xd4
a000b3fc: e1110002 tst r1, r2
a000b400: 1a000022 bne a000b490 <sigtimedwait+0xfc>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
a000b404: e59f21d0 ldr r2, [pc, #464] ; a000b5dc <sigtimedwait+0x248>
a000b408: e5922000 ldr r2, [r2]
a000b40c: e1110002 tst r1, r2
a000b410: 0a00003f beq a000b514 <sigtimedwait+0x180>
a000b414: e3a0401b mov r4, #27 <== NOT EXECUTED
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
a000b418: e3a01001 mov r1, #1 <== NOT EXECUTED
/* 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76
NOTE: P1003.1c/D10, p. 39 adds sigwait(). */
int _EXFUN(sigwaitinfo, (const sigset_t *set, siginfo_t *info));
int _EXFUN(sigtimedwait,
a000b41c: e2443001 sub r3, r4, #1 <== NOT EXECUTED
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
a000b420: e0123311 ands r3, r2, r1, lsl r3 <== NOT EXECUTED
a000b424: 1a00000b bne a000b458 <sigtimedwait+0xc4> <== NOT EXECUTED
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
a000b428: e2844001 add r4, r4, #1 <== NOT EXECUTED
a000b42c: e3540020 cmp r4, #32 <== NOT EXECUTED
a000b430: 1afffff9 bne a000b41c <sigtimedwait+0x88> <== NOT EXECUTED
a000b434: e3a04001 mov r4, #1 <== NOT EXECUTED
a000b438: e1a01004 mov r1, r4 <== NOT EXECUTED
a000b43c: ea000002 b a000b44c <sigtimedwait+0xb8> <== NOT EXECUTED
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
a000b440: e2844001 add r4, r4, #1 <== NOT EXECUTED
a000b444: e354001b cmp r4, #27 <== NOT EXECUTED
a000b448: 0a000002 beq a000b458 <sigtimedwait+0xc4> <== NOT EXECUTED
a000b44c: e2443001 sub r3, r4, #1 <== NOT EXECUTED
if ( set & signo_to_mask( signo ) ) {
a000b450: e0123311 ands r3, r2, r1, lsl r3 <== NOT EXECUTED
a000b454: 0afffff9 beq a000b440 <sigtimedwait+0xac> <== NOT EXECUTED
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
a000b458: e3a0c000 mov ip, #0 <== NOT EXECUTED
a000b45c: e1a0000a mov r0, sl <== NOT EXECUTED
a000b460: e1a01004 mov r1, r4 <== NOT EXECUTED
a000b464: e1a02005 mov r2, r5 <== NOT EXECUTED
a000b468: e3a03001 mov r3, #1 <== NOT EXECUTED
a000b46c: e58dc000 str ip, [sp] <== NOT EXECUTED
a000b470: eb0017e5 bl a001140c <_POSIX_signals_Clear_signals> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
#if defined(ARM_MULTILIB_ARCH_V4)
ARM_SWITCH_REGISTERS;
__asm__ volatile (
a000b474: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
_ISR_Enable( level );
the_info->si_signo = signo;
the_info->si_code = SI_USER;
a000b478: e3a03001 mov r3, #1 <== NOT EXECUTED
a000b47c: e5853004 str r3, [r5, #4] <== NOT EXECUTED
the_info->si_value.sival_int = 0;
a000b480: 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;
a000b484: e5854000 str r4, [r5] <== NOT EXECUTED
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
a000b488: e5853008 str r3, [r5, #8] <== NOT EXECUTED
return signo;
a000b48c: ea00001d b a000b508 <sigtimedwait+0x174> <== NOT EXECUTED
*/
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
a000b490: e3a0101b mov r1, #27 <== NOT EXECUTED
a000b494: e3a00001 mov r0, #1 <== NOT EXECUTED
a000b498: e2413001 sub r3, r1, #1 <== NOT EXECUTED
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
a000b49c: e0123310 ands r3, r2, r0, lsl r3 <== NOT EXECUTED
a000b4a0: 1a00000b bne a000b4d4 <sigtimedwait+0x140> <== NOT EXECUTED
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
a000b4a4: e2811001 add r1, r1, #1 <== NOT EXECUTED
a000b4a8: e3510020 cmp r1, #32 <== NOT EXECUTED
a000b4ac: 1afffff9 bne a000b498 <sigtimedwait+0x104> <== NOT EXECUTED
a000b4b0: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b4b4: e1a00001 mov r0, r1 <== NOT EXECUTED
a000b4b8: ea000002 b a000b4c8 <sigtimedwait+0x134> <== NOT EXECUTED
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
a000b4bc: e2811001 add r1, r1, #1 <== NOT EXECUTED
a000b4c0: e351001b cmp r1, #27 <== NOT EXECUTED
a000b4c4: 0a000002 beq a000b4d4 <sigtimedwait+0x140> <== NOT EXECUTED
a000b4c8: e2413001 sub r3, r1, #1 <== NOT EXECUTED
if ( set & signo_to_mask( signo ) ) {
a000b4cc: e0123310 ands r3, r2, r0, lsl r3 <== NOT EXECUTED
a000b4d0: 0afffff9 beq a000b4bc <sigtimedwait+0x128> <== NOT EXECUTED
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
_POSIX_signals_Clear_signals(
a000b4d4: 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 );
a000b4d8: e5851000 str r1, [r5] <== NOT EXECUTED
_POSIX_signals_Clear_signals(
a000b4dc: e1a0000a mov r0, sl <== NOT EXECUTED
a000b4e0: e1a02005 mov r2, r5 <== NOT EXECUTED
a000b4e4: e1a0300c mov r3, ip <== NOT EXECUTED
a000b4e8: e58dc000 str ip, [sp] <== NOT EXECUTED
a000b4ec: eb0017c6 bl a001140c <_POSIX_signals_Clear_signals> <== NOT EXECUTED
a000b4f0: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
a000b4f4: e3a03001 mov r3, #1 <== NOT EXECUTED
the_info->si_value.sival_int = 0;
return the_info->si_signo;
a000b4f8: e5954000 ldr r4, [r5] <== NOT EXECUTED
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
a000b4fc: e5853004 str r3, [r5, #4] <== NOT EXECUTED
the_info->si_value.sival_int = 0;
a000b500: e3a03000 mov r3, #0 <== NOT EXECUTED
a000b504: e5853008 str r3, [r5, #8] <== NOT EXECUTED
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
a000b508: e1a00004 mov r0, r4
a000b50c: e28dd010 add sp, sp, #16
a000b510: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
a000b514: e59f20c4 ldr r2, [pc, #196] ; a000b5e0 <sigtimedwait+0x24c>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
a000b518: e3e01000 mvn r1, #0
a000b51c: e5851000 str r1, [r5]
a000b520: e5921000 ldr r1, [r2]
++level;
a000b524: e2811001 add r1, r1, #1
_Thread_Dispatch_disable_level = level;
a000b528: e5821000 str r1, [r2]
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
a000b52c: e3a02004 mov r2, #4
a000b530: e5832034 str r2, [r3, #52] ; 0x34
the_thread->Wait.option = *set;
a000b534: e5961000 ldr r1, [r6]
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
a000b538: e59f20a4 ldr r2, [pc, #164] ; a000b5e4 <sigtimedwait+0x250>
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
the_thread->Wait.return_argument = the_info;
a000b53c: e5835028 str r5, [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;
a000b540: e5831030 str r1, [r3, #48] ; 0x30
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
a000b544: 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;
a000b548: e3a03001 mov r3, #1
a000b54c: e5823030 str r3, [r2, #48] ; 0x30
a000b550: 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 );
a000b554: e1a00002 mov r0, r2
a000b558: e1a01004 mov r1, r4
a000b55c: e59f2084 ldr r2, [pc, #132] ; a000b5e8 <sigtimedwait+0x254>
a000b560: eb000d2c bl a000ea18 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
a000b564: eb000bf5 bl a000e540 <_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 );
a000b568: e3a0c000 mov ip, #0 <== NOT EXECUTED
a000b56c: e5951000 ldr r1, [r5] <== NOT EXECUTED
a000b570: e1a0300c mov r3, ip <== NOT EXECUTED
a000b574: e1a0000a mov r0, sl <== NOT EXECUTED
a000b578: e1a02005 mov r2, r5 <== NOT EXECUTED
a000b57c: e58dc000 str ip, [sp] <== NOT EXECUTED
a000b580: eb0017a1 bl a001140c <_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)
a000b584: e5973008 ldr r3, [r7, #8] <== NOT EXECUTED
a000b588: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
a000b58c: e3530004 cmp r3, #4 <== NOT EXECUTED
a000b590: 1a000005 bne a000b5ac <sigtimedwait+0x218> <== NOT EXECUTED
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
a000b594: e5954000 ldr r4, [r5] <== NOT EXECUTED
a000b598: e5963000 ldr r3, [r6] <== NOT EXECUTED
a000b59c: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b5a0: e2442001 sub r2, r4, #1 <== NOT EXECUTED
a000b5a4: e0133211 ands r3, r3, r1, lsl r2 <== NOT EXECUTED
a000b5a8: 1affffd6 bne a000b508 <sigtimedwait+0x174> <== NOT EXECUTED
errno = _Thread_Executing->Wait.return_code;
a000b5ac: eb0022f3 bl a0014180 <__errno> <== NOT EXECUTED
a000b5b0: e5973008 ldr r3, [r7, #8] <== NOT EXECUTED
return -1;
a000b5b4: e3e04000 mvn r4, #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;
a000b5b8: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
a000b5bc: e5803000 str r3, [r0] <== NOT EXECUTED
return -1;
a000b5c0: eaffffd0 b a000b508 <sigtimedwait+0x174> <== 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 );
a000b5c4: eb0022ed bl a0014180 <__errno>
a000b5c8: e3a03016 mov r3, #22
a000b5cc: e5803000 str r3, [r0]
a000b5d0: e3e04000 mvn r4, #0
a000b5d4: eaffffcb b a000b508 <sigtimedwait+0x174>
a000d34c <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
a000d34c: e92d4010 push {r4, lr}
a000d350: e1a04001 mov r4, r1
int status;
status = sigtimedwait( set, NULL, NULL );
a000d354: e3a01000 mov r1, #0
a000d358: e1a02001 mov r2, r1
a000d35c: ebffff62 bl a000d0ec <sigtimedwait>
if ( status != -1 ) {
a000d360: e3700001 cmn r0, #1
a000d364: 0a000004 beq a000d37c <sigwait+0x30>
if ( sig )
a000d368: e3540000 cmp r4, #0 <== NOT EXECUTED
a000d36c: 0a000005 beq a000d388 <sigwait+0x3c> <== NOT EXECUTED
*sig = status;
a000d370: e5840000 str r0, [r4] <== NOT EXECUTED
return 0;
a000d374: e3a00000 mov r0, #0 <== NOT EXECUTED
a000d378: e8bd8010 pop {r4, pc} <== NOT EXECUTED
}
return errno;
a000d37c: eb002218 bl a0015be4 <__errno>
a000d380: e5900000 ldr r0, [r0]
a000d384: e8bd8010 pop {r4, pc}
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
a000d388: e1a00004 mov r0, r4 <== NOT EXECUTED
}
return errno;
}
a000d38c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000a0a0 <sysconf>:
long sysconf(
int name
)
{
if ( name == _SC_CLK_TCK )
a000a0a0: e3500002 cmp r0, #2
*/
long sysconf(
int name
)
{
a000a0a4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( name == _SC_CLK_TCK )
a000a0a8: 0a00000b beq a000a0dc <sysconf+0x3c>
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
a000a0ac: e3500004 cmp r0, #4
a000a0b0: 0a00000f beq a000a0f4 <sysconf+0x54>
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
a000a0b4: e3500033 cmp r0, #51 ; 0x33
return 1024;
a000a0b8: 03a00b01 moveq r0, #1024 ; 0x400
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
a000a0bc: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
return 1024;
if ( name == _SC_PAGESIZE )
a000a0c0: e3500008 cmp r0, #8
return PAGE_SIZE;
a000a0c4: 03a00a01 moveq r0, #4096 ; 0x1000
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
return 1024;
if ( name == _SC_PAGESIZE )
a000a0c8: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
a000a0cc: e350004f cmp r0, #79 ; 0x4f
a000a0d0: 1a00000a bne a000a100 <sysconf+0x60>
return RTEMS_FILESYSTEM_SYMLOOP_MAX;
a000a0d4: e3a00020 mov r0, #32 <== NOT EXECUTED
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
a000a0d8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
long sysconf(
int name
)
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
a000a0dc: e59f3030 ldr r3, [pc, #48] ; a000a114 <sysconf+0x74>
a000a0e0: e3a0093d mov r0, #999424 ; 0xf4000
a000a0e4: e2800d09 add r0, r0, #576 ; 0x240
a000a0e8: e593100c ldr r1, [r3, #12]
a000a0ec: eb0046a8 bl a001bb94 <__aeabi_uidiv>
a000a0f0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
a000a0f4: e59f301c ldr r3, [pc, #28] ; a000a118 <sysconf+0x78>
a000a0f8: e5930000 ldr r0, [r3]
a000a0fc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
a000a100: eb0022b2 bl a0012bd0 <__errno>
a000a104: e3a03016 mov r3, #22
a000a108: e5803000 str r3, [r0]
a000a10c: e3e00000 mvn r0, #0
a000a110: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a000ac60 <timer_delete>:
int timer_delete(
timer_t timerid
)
{
a000ac60: e92d4030 push {r4, r5, lr}
a000ac64: e24dd004 sub sp, sp, #4
a000ac68: e1a01000 mov r1, r0
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
a000ac6c: e1a0200d mov r2, sp
a000ac70: e59f005c ldr r0, [pc, #92] ; a000acd4 <timer_delete+0x74>
a000ac74: eb00090a bl a000d0a4 <_Objects_Get>
*/
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
a000ac78: e59d5000 ldr r5, [sp]
a000ac7c: e1a04000 mov r4, r0
a000ac80: e3550000 cmp r5, #0
a000ac84: 0a000005 beq a000aca0 <timer_delete+0x40>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000ac88: eb0024bc bl a0013f80 <__errno>
a000ac8c: e3a03016 mov r3, #22
a000ac90: e5803000 str r3, [r0]
a000ac94: e3e00000 mvn r0, #0
}
a000ac98: e28dd004 add sp, sp, #4
a000ac9c: e8bd8030 pop {r4, r5, pc}
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Timer_Information, &ptimer->Object );
a000aca0: e1a01000 mov r1, r0 <== NOT EXECUTED
a000aca4: e59f0028 ldr r0, [pc, #40] ; a000acd4 <timer_delete+0x74> <== NOT EXECUTED
a000aca8: eb0007e9 bl a000cc54 <_Objects_Close> <== NOT EXECUTED
ptimer->state = POSIX_TIMER_STATE_FREE;
a000acac: e3a03001 mov r3, #1 <== NOT EXECUTED
a000acb0: e5c4303c strb r3, [r4, #60] ; 0x3c <== NOT EXECUTED
(void) _Watchdog_Remove( &ptimer->Timer );
a000acb4: e2840010 add r0, r4, #16 <== NOT EXECUTED
a000acb8: eb001080 bl a000eec0 <_Watchdog_Remove> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free (
POSIX_Timer_Control *the_timer
)
{
_Objects_Free( &_POSIX_Timer_Information, &the_timer->Object );
a000acbc: e59f0010 ldr r0, [pc, #16] ; a000acd4 <timer_delete+0x74> <== NOT EXECUTED
a000acc0: e1a01004 mov r1, r4 <== NOT EXECUTED
a000acc4: eb00089d bl a000cf40 <_Objects_Free> <== NOT EXECUTED
_POSIX_Timer_Free( ptimer );
_Thread_Enable_dispatch();
a000acc8: eb000ca3 bl a000df5c <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000accc: e1a00005 mov r0, r5 <== NOT EXECUTED
a000acd0: eafffff0 b a000ac98 <timer_delete+0x38> <== NOT EXECUTED
a000b830 <timer_getoverrun>:
#include <rtems/posix/timer.h>
int timer_getoverrun(
timer_t timerid
)
{
a000b830: e92d4010 push {r4, lr}
a000b834: e24dd004 sub sp, sp, #4
a000b838: e1a01000 mov r1, r0
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
a000b83c: e1a0200d mov r2, sp
a000b840: e59f0038 ldr r0, [pc, #56] ; a000b880 <timer_getoverrun+0x50>
a000b844: eb0008ec bl a000dbfc <_Objects_Get>
int overrun;
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
a000b848: e59d3000 ldr r3, [sp]
a000b84c: e3530000 cmp r3, #0
a000b850: 0a000006 beq a000b870 <timer_getoverrun+0x40>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000b854: eb0023e1 bl a00147e0 <__errno>
a000b858: e3a03016 mov r3, #22
a000b85c: e5803000 str r3, [r0]
a000b860: e3e04000 mvn r4, #0
}
a000b864: e1a00004 mov r0, r4
a000b868: e28dd004 add sp, sp, #4
a000b86c: e8bd8010 pop {r4, pc}
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
overrun = ptimer->overrun;
a000b870: e5904068 ldr r4, [r0, #104] ; 0x68 <== NOT EXECUTED
ptimer->overrun = 0;
a000b874: e5803068 str r3, [r0, #104] ; 0x68 <== NOT EXECUTED
_Thread_Enable_dispatch();
a000b878: eb000c8d bl a000eab4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return overrun;
a000b87c: eafffff8 b a000b864 <timer_getoverrun+0x34> <== NOT EXECUTED
a000b884 <timer_gettime>:
int timer_gettime(
timer_t timerid,
struct itimerspec *value
)
{
a000b884: e92d4070 push {r4, r5, r6, lr}
POSIX_Timer_Control *ptimer;
Objects_Locations location;
struct timespec current_time;
Watchdog_Interval left;
if ( !value )
a000b888: e2514000 subs r4, r1, #0
int timer_gettime(
timer_t timerid,
struct itimerspec *value
)
{
a000b88c: e24dd00c sub sp, sp, #12
a000b890: e1a05000 mov r5, r0
POSIX_Timer_Control *ptimer;
Objects_Locations location;
struct timespec current_time;
Watchdog_Interval left;
if ( !value )
a000b894: 0a000019 beq a000b900 <timer_gettime+0x7c>
a000b898: e59f1074 ldr r1, [pc, #116] ; a000b914 <timer_gettime+0x90><== NOT EXECUTED
a000b89c: e1a0000d mov r0, sp <== NOT EXECUTED
a000b8a0: eb00061b bl a000d114 <_TOD_Get_with_nanoseconds> <== NOT EXECUTED
a000b8a4: e1a01005 mov r1, r5 <== NOT EXECUTED
a000b8a8: e59f0068 ldr r0, [pc, #104] ; a000b918 <timer_gettime+0x94><== NOT EXECUTED
a000b8ac: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a000b8b0: eb0008d1 bl a000dbfc <_Objects_Get> <== NOT EXECUTED
/* Reads the current time */
_TOD_Get( ¤t_time );
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
a000b8b4: e59d6008 ldr r6, [sp, #8] <== NOT EXECUTED
a000b8b8: e1a05000 mov r5, r0 <== NOT EXECUTED
a000b8bc: e3560000 cmp r6, #0 <== NOT EXECUTED
a000b8c0: 1a00000e bne a000b900 <timer_gettime+0x7c> <== NOT EXECUTED
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
a000b8c4: e59f3050 ldr r3, [pc, #80] ; a000b91c <timer_gettime+0x98> <== NOT EXECUTED
a000b8c8: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED
a000b8cc: e590001c ldr r0, [r0, #28] <== NOT EXECUTED
a000b8d0: e5933000 ldr r3, [r3] <== NOT EXECUTED
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
a000b8d4: 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 */
a000b8d8: e0800002 add r0, r0, r2 <== NOT EXECUTED
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
a000b8dc: e0630000 rsb r0, r3, r0 <== NOT EXECUTED
a000b8e0: eb000f1e bl a000f560 <_Timespec_From_ticks> <== NOT EXECUTED
value->it_interval = ptimer->timer_data.it_interval;
a000b8e4: e2853054 add r3, r5, #84 ; 0x54 <== NOT EXECUTED
a000b8e8: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000b8ec: e884000c stm r4, {r2, r3} <== NOT EXECUTED
_Thread_Enable_dispatch();
a000b8f0: eb000c6f bl a000eab4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000b8f4: e1a00006 mov r0, r6 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
a000b8f8: e28dd00c add sp, sp, #12
a000b8fc: e8bd8070 pop {r4, r5, r6, pc}
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000b900: eb0023b6 bl a00147e0 <__errno>
a000b904: e3a03016 mov r3, #22
a000b908: e5803000 str r3, [r0]
a000b90c: e3e00000 mvn r0, #0
a000b910: eafffff8 b a000b8f8 <timer_gettime+0x74>
a000a2a8 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
a000a2a8: e92d43f0 push {r4, r5, r6, r7, r8, r9, lr}
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
a000a2ac: e2524000 subs r4, r2, #0
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
a000a2b0: e24dd028 sub sp, sp, #40 ; 0x28
a000a2b4: e1a05000 mov r5, r0
a000a2b8: e1a08001 mov r8, r1
a000a2bc: e1a07003 mov r7, r3
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
a000a2c0: 0a000067 beq a000a464 <timer_settime+0x1bc>
/*
* 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) ) ) {
a000a2c4: e2840008 add r0, r4, #8
a000a2c8: eb000f5b bl a000e03c <_Timespec_Is_valid>
a000a2cc: e3500000 cmp r0, #0
a000a2d0: 0a000063 beq a000a464 <timer_settime+0x1bc>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
a000a2d4: e1a00004 mov r0, r4
a000a2d8: eb000f57 bl a000e03c <_Timespec_Is_valid>
a000a2dc: e3500000 cmp r0, #0
a000a2e0: 0a00005f beq a000a464 <timer_settime+0x1bc>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
a000a2e4: e3580000 cmp r8, #0
a000a2e8: 13580004 cmpne r8, #4
a000a2ec: 1a00005c bne a000a464 <timer_settime+0x1bc>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
a000a2f0: e28d6004 add r6, sp, #4
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
a000a2f4: e3580004 cmp r8, #4
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
a000a2f8: e894000f ldm r4, {r0, r1, r2, r3}
a000a2fc: e886000f stm r6, {r0, r1, r2, r3}
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
a000a300: 0a000036 beq a000a3e0 <timer_settime+0x138>
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
a000a304: e1a01005 mov r1, r5
a000a308: e59f01a8 ldr r0, [pc, #424] ; a000a4b8 <timer_settime+0x210>
a000a30c: e28d2024 add r2, sp, #36 ; 0x24
a000a310: eb00090a bl a000c740 <_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 ) {
a000a314: e59d3024 ldr r3, [sp, #36] ; 0x24
a000a318: e1a05000 mov r5, r0
a000a31c: e3530000 cmp r3, #0
a000a320: 1a00004f bne a000a464 <timer_settime+0x1bc>
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 ) {
a000a324: e59d300c ldr r3, [sp, #12]
a000a328: e3530000 cmp r3, #0
a000a32c: 1a000002 bne a000a33c <timer_settime+0x94>
a000a330: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
a000a334: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a338: 0a00004e beq a000a478 <timer_settime+0x1d0> <== NOT EXECUTED
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
a000a33c: e1a00004 mov r0, r4
a000a340: eb000f72 bl a000e110 <_Timespec_To_ticks>
a000a344: e5850064 str r0, [r5, #100] ; 0x64
initial_period = _Timespec_To_ticks( &normalize.it_value );
a000a348: e28d000c add r0, sp, #12
a000a34c: eb000f6f bl a000e110 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
a000a350: e5952008 ldr r2, [r5, #8]
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
initial_period = _Timespec_To_ticks( &normalize.it_value );
a000a354: e1a01000 mov r1, r0
activated = _POSIX_Timer_Insert_helper(
a000a358: e59f315c ldr r3, [pc, #348] ; a000a4bc <timer_settime+0x214>
a000a35c: e2850010 add r0, r5, #16
a000a360: e58d5000 str r5, [sp]
a000a364: eb0018d3 bl a00106b8 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
a000a368: e2504000 subs r4, r0, #0
a000a36c: 0a00004e beq a000a4ac <timer_settime+0x204>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
a000a370: e3570000 cmp r7, #0
*ovalue = ptimer->timer_data;
a000a374: e285c054 add ip, r5, #84 ; 0x54
ptimer->timer_data = normalize;
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
a000a378: 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;
a000a37c: 189c000f ldmne ip, {r0, r1, r2, r3}
a000a380: 1887000f stmne r7, {r0, r1, r2, r3}
ptimer->timer_data = normalize;
a000a384: e896000f ldm r6, {r0, r1, r2, r3}
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
a000a388: e5c5e03c strb lr, [r5, #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;
a000a38c: e88c000f stm ip, {r0, r1, r2, r3}
)
{
Timestamp_Control tod_as_timestamp;
Timestamp_Control *tod_as_timestamp_ptr;
tod_as_timestamp_ptr =
a000a390: e59f1128 ldr r1, [pc, #296] ; a000a4c0 <timer_settime+0x218>
a000a394: e28d001c add r0, sp, #28
a000a398: eb000645 bl a000bcb4 <_TOD_Get_with_nanoseconds>
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a000a39c: e59f2120 ldr r2, [pc, #288] ; a000a4c4 <timer_settime+0x21c>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
a000a3a0: e89000c0 ldm r0, {r6, r7}
a000a3a4: e3a03000 mov r3, #0
a000a3a8: e1a00006 mov r0, r6
a000a3ac: e1a01007 mov r1, r7
a000a3b0: eb004b1c bl a001d028 <__divdi3>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a000a3b4: e59f2108 ldr r2, [pc, #264] ; a000a4c4 <timer_settime+0x21c>
a000a3b8: e3a03000 mov r3, #0
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a000a3bc: e585006c str r0, [r5, #108] ; 0x6c
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a000a3c0: e1a01007 mov r1, r7
a000a3c4: e1a00006 mov r0, r6
a000a3c8: eb004c51 bl a001d514 <__moddi3>
a000a3cc: e5850070 str r0, [r5, #112] ; 0x70
ptimer->timer_data = normalize;
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
_Thread_Enable_dispatch();
a000a3d0: eb000c88 bl a000d5f8 <_Thread_Enable_dispatch>
return 0;
a000a3d4: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
a000a3d8: e28dd028 add sp, sp, #40 ; 0x28
a000a3dc: e8bd83f0 pop {r4, r5, r6, r7, r8, r9, pc}
a000a3e0: e59f10d8 ldr r1, [pc, #216] ; a000a4c0 <timer_settime+0x218>
a000a3e4: e28d001c add r0, sp, #28
a000a3e8: eb000631 bl a000bcb4 <_TOD_Get_with_nanoseconds>
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a000a3ec: e59f20d0 ldr r2, [pc, #208] ; a000a4c4 <timer_settime+0x21c>
a000a3f0: e8900300 ldm r0, {r8, r9}
a000a3f4: e3a03000 mov r3, #0
a000a3f8: e1a00008 mov r0, r8
a000a3fc: e1a01009 mov r1, r9
a000a400: eb004b08 bl a001d028 <__divdi3>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a000a404: e59f20b8 ldr r2, [pc, #184] ; a000a4c4 <timer_settime+0x21c>
a000a408: e3a03000 mov r3, #0
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
a000a40c: e58d0014 str r0, [sp, #20]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
a000a410: e1a01009 mov r1, r9
a000a414: e1a00008 mov r0, r8
a000a418: eb004c3d bl a001d514 <__moddi3>
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
a000a41c: e28d1014 add r1, sp, #20
a000a420: e58d0018 str r0, [sp, #24]
a000a424: e28d000c add r0, sp, #12
a000a428: eb000f14 bl a000e080 <_Timespec_Less_than>
a000a42c: e3500000 cmp r0, #0
a000a430: 1a00000b bne a000a464 <timer_settime+0x1bc>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
a000a434: e28d100c add r1, sp, #12
a000a438: e1a02001 mov r2, r1
a000a43c: e28d0014 add r0, sp, #20
a000a440: eb000f1c bl a000e0b8 <_Timespec_Subtract>
a000a444: e1a01005 mov r1, r5
a000a448: e59f0068 ldr r0, [pc, #104] ; a000a4b8 <timer_settime+0x210>
a000a44c: e28d2024 add r2, sp, #36 ; 0x24
a000a450: eb0008ba bl a000c740 <_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 ) {
a000a454: e59d3024 ldr r3, [sp, #36] ; 0x24
a000a458: e1a05000 mov r5, r0
a000a45c: e3530000 cmp r3, #0
a000a460: 0affffaf beq a000a324 <timer_settime+0x7c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
a000a464: eb002345 bl a0013180 <__errno> <== NOT EXECUTED
a000a468: e3a03016 mov r3, #22 <== NOT EXECUTED
a000a46c: e5803000 str r3, [r0] <== NOT EXECUTED
a000a470: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a474: eaffffd7 b a000a3d8 <timer_settime+0x130> <== 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 );
a000a478: e2800010 add r0, r0, #16 <== NOT EXECUTED
a000a47c: eb001025 bl a000e518 <_Watchdog_Remove> <== NOT EXECUTED
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
a000a480: e285c054 add ip, r5, #84 ; 0x54 <== NOT EXECUTED
/* 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 );
/* The old data of the timer are returned */
if ( ovalue )
a000a484: e3570000 cmp r7, #0 <== NOT EXECUTED
*ovalue = ptimer->timer_data;
/* The new data are set */
ptimer->timer_data = normalize;
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
a000a488: e3a0e004 mov lr, #4 <== NOT EXECUTED
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
a000a48c: 189c000f ldmne ip, {r0, r1, r2, r3} <== NOT EXECUTED
a000a490: 1887000f stmne r7, {r0, r1, r2, r3} <== NOT EXECUTED
/* The new data are set */
ptimer->timer_data = normalize;
a000a494: e896000f ldm r6, {r0, r1, r2, r3} <== NOT EXECUTED
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
a000a498: e5c5e03c strb lr, [r5, #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;
a000a49c: 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();
a000a4a0: eb000c54 bl a000d5f8 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000a4a4: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a4a8: eaffffca b a000a3d8 <timer_settime+0x130> <== NOT EXECUTED
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
a000a4ac: eb000c51 bl a000d5f8 <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
a000a4b0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a4b4: eaffffc7 b a000a3d8 <timer_settime+0x130> <== NOT EXECUTED
a000a488 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
a000a488: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
a000a48c: e59f40e4 ldr r4, [pc, #228] ; a000a578 <ualarm+0xf0> <== NOT EXECUTED
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
a000a490: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
a000a494: e1a05000 mov r5, r0 <== NOT EXECUTED
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
a000a498: e594601c ldr r6, [r4, #28] <== NOT EXECUTED
a000a49c: e3560000 cmp r6, #0 <== NOT EXECUTED
a000a4a0: 0a00001d beq a000a51c <ualarm+0x94> <== NOT EXECUTED
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
a000a4a4: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a4a8: eb000fc7 bl a000e3cc <_Watchdog_Remove> <== NOT EXECUTED
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
a000a4ac: e2400002 sub r0, r0, #2 <== NOT EXECUTED
a000a4b0: e3500001 cmp r0, #1 <== NOT EXECUTED
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
a000a4b4: 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) ) {
a000a4b8: 9a00001d bls a000a534 <ualarm+0xac> <== 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 ) {
a000a4bc: e3550000 cmp r5, #0 <== NOT EXECUTED
a000a4c0: 0a000012 beq a000a510 <ualarm+0x88> <== NOT EXECUTED
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
a000a4c4: e59f30b0 ldr r3, [pc, #176] ; a000a57c <ualarm+0xf4> <== NOT EXECUTED
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
a000a4c8: e3a0293d mov r2, #999424 ; 0xf4000 <== NOT EXECUTED
a000a4cc: 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;
a000a4d0: e0831395 umull r1, r3, r5, r3 <== NOT EXECUTED
a000a4d4: e1a03923 lsr r3, r3, #18 <== NOT EXECUTED
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
a000a4d8: e0020293 mul r2, r3, r2 <== NOT EXECUTED
a000a4dc: e0625005 rsb r5, r2, r5 <== NOT EXECUTED
a000a4e0: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED
a000a4e4: e0050592 mul r5, r2, r5 <== NOT EXECUTED
ticks = _Timespec_To_ticks( &tp );
a000a4e8: 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;
a000a4ec: e58d3000 str r3, [sp] <== NOT EXECUTED
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
a000a4f0: e58d5004 str r5, [sp, #4] <== NOT EXECUTED
ticks = _Timespec_To_ticks( &tp );
a000a4f4: eb000e84 bl a000df0c <_Timespec_To_ticks> <== NOT EXECUTED
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
a000a4f8: e1a0000d mov r0, sp <== NOT EXECUTED
a000a4fc: eb000e82 bl a000df0c <_Timespec_To_ticks> <== NOT EXECUTED
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a500: e59f1070 ldr r1, [pc, #112] ; a000a578 <ualarm+0xf0> <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000a504: e584000c str r0, [r4, #12] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a508: e59f0070 ldr r0, [pc, #112] ; a000a580 <ualarm+0xf8> <== NOT EXECUTED
a000a50c: eb000f41 bl a000e218 <_Watchdog_Insert> <== NOT EXECUTED
}
return remaining;
}
a000a510: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a514: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000a518: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000a51c: e59f3060 ldr r3, [pc, #96] ; a000a584 <ualarm+0xfc> <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000a520: e5846008 str r6, [r4, #8] <== NOT EXECUTED
the_watchdog->routine = routine;
the_watchdog->id = id;
a000a524: e5846020 str r6, [r4, #32] <== NOT EXECUTED
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000a528: e584301c str r3, [r4, #28] <== NOT EXECUTED
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a000a52c: e5846024 str r6, [r4, #36] ; 0x24 <== NOT EXECUTED
a000a530: eaffffe1 b a000a4bc <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);
a000a534: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
a000a538: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
a000a53c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
a000a540: 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);
a000a544: e0800002 add r0, r0, r2 <== NOT EXECUTED
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
a000a548: e0630000 rsb r0, r3, r0 <== NOT EXECUTED
a000a54c: eb000e5d bl a000dec8 <_Timespec_From_ticks> <== NOT EXECUTED
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
remaining += tp.tv_nsec / 1000;
a000a550: e59f6030 ldr r6, [pc, #48] ; a000a588 <ualarm+0x100> <== NOT EXECUTED
a000a554: 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;
a000a558: e3a0393d mov r3, #999424 ; 0xf4000 <== NOT EXECUTED
a000a55c: e2833d09 add r3, r3, #576 ; 0x240 <== NOT EXECUTED
remaining += tp.tv_nsec / 1000;
a000a560: e0c61692 smull r1, r6, r2, r6 <== NOT EXECUTED
a000a564: e1a02fc2 asr r2, r2, #31 <== NOT EXECUTED
a000a568: e0622346 rsb r2, r2, r6, asr #6 <== NOT EXECUTED
a000a56c: e59d6000 ldr r6, [sp] <== NOT EXECUTED
a000a570: e0262693 mla r6, r3, r6, r2 <== NOT EXECUTED
a000a574: eaffffd0 b a000a4bc <ualarm+0x34> <== NOT EXECUTED
a000a45c <vfork>:
#include <unistd.h>
pid_t vfork(void)
{
return -1;
}
a000a45c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a460: e12fff1e bx lr <== NOT EXECUTED
a000a464 <wait>:
#include <rtems/seterr.h>
int wait(
int *stat_loc
)
{
a000a464: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a000a468: eb0022b6 bl a0012f48 <__errno> <== NOT EXECUTED
a000a46c: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a000a470: e5803000 str r3, [r0] <== NOT EXECUTED
}
a000a474: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a478: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000a47c <waitpid>:
int waitpid(
pid_t pid,
int *stat_loc,
int options
)
{
a000a47c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSYS );
a000a480: eb0022b0 bl a0012f48 <__errno> <== NOT EXECUTED
a000a484: e3a03058 mov r3, #88 ; 0x58 <== NOT EXECUTED
a000a488: e5803000 str r3, [r0] <== NOT EXECUTED
}
a000a48c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000a490: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED