RTEMS 4.11Annotated Report
Sat Oct 16 12:55:01 2010
00014b3c <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
14b3c: 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
)
{
14b40: 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 ) {
14b44: e1520003 cmp r2, r3
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
14b48: e1a06000 mov r6, r0
14b4c: e1a0a001 mov sl, r1
14b50: e1a07002 mov r7, r2
14b54: e59d8020 ldr r8, [sp, #32]
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
14b58: 8a000013 bhi 14bac <_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 ) {
14b5c: e5905048 ldr r5, [r0, #72] ; 0x48
14b60: e3550000 cmp r5, #0
*count = 0;
14b64: 13a00000 movne r0, #0
14b68: 15880000 strne r0, [r8]
* 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 ) {
14b6c: 0a000007 beq 14b90 <_CORE_message_queue_Broadcast+0x54>
14b70: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
14b74: e594002c ldr r0, [r4, #44] ; 0x2c
14b78: e1a0100a mov r1, sl
14b7c: e1a02007 mov r2, r7
14b80: eb00222b bl 1d434 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
14b84: e5943028 ldr r3, [r4, #40] ; 0x28
14b88: e5837000 str r7, [r3]
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
14b8c: e2855001 add r5, r5, #1
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
14b90: e1a00006 mov r0, r6
14b94: eb0009df bl 17318 <_Thread_queue_Dequeue>
14b98: e2504000 subs r4, r0, #0
14b9c: 1afffff4 bne 14b74 <_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;
14ba0: e5885000 str r5, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
14ba4: e1a00004 mov r0, r4
14ba8: 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;
14bac: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
14bb0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00006c9c <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
6c9c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
6ca0: e5903014 ldr r3, [r0, #20]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
6ca4: e24dd030 sub sp, sp, #48 ; 0x30
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
6ca8: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
6cac: e5903024 ldr r3, [r0, #36] ; 0x24
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
6cb0: e59f4500 ldr r4, [pc, #1280] ; 71b8 <_Heap_Walk+0x51c>
)
{
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;
Heap_Block *const last_block = heap->last_block;
6cb4: e58d3028 str r3, [sp, #40] ; 0x28
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
6cb8: e59f34fc ldr r3, [pc, #1276] ; 71bc <_Heap_Walk+0x520>
6cbc: e31200ff tst r2, #255 ; 0xff
6cc0: 11a04003 movne r4, r3
if ( !_System_state_Is_up( _System_state_Get() ) ) {
6cc4: e59f34f4 ldr r3, [pc, #1268] ; 71c0 <_Heap_Walk+0x524>
6cc8: e5933000 ldr r3, [r3]
bool dump
)
{
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;
6ccc: e590c020 ldr ip, [r0, #32]
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() ) ) {
6cd0: e3530003 cmp r3, #3
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
6cd4: e1a06000 mov r6, r0
6cd8: e1a05001 mov r5, r1
uintptr_t const page_size = heap->page_size;
6cdc: e5909010 ldr r9, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
6ce0: e58dc020 str ip, [sp, #32]
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() ) ) {
6ce4: 1a000127 bne 7188 <_Heap_Walk+0x4ec>
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)(
6ce8: e59dc024 ldr ip, [sp, #36] ; 0x24
6cec: e58dc000 str ip, [sp]
6cf0: e5903018 ldr r3, [r0, #24]
6cf4: e58d3004 str r3, [sp, #4]
6cf8: e590301c ldr r3, [r0, #28]
6cfc: e59d2020 ldr r2, [sp, #32]
6d00: e58d3008 str r3, [sp, #8]
6d04: e59d3028 ldr r3, [sp, #40] ; 0x28
6d08: e58d200c str r2, [sp, #12]
6d0c: e58d3010 str r3, [sp, #16]
6d10: e5903008 ldr r3, [r0, #8]
6d14: e58d3014 str r3, [sp, #20]
6d18: e590300c ldr r3, [r0, #12]
6d1c: e59f24a0 ldr r2, [pc, #1184] ; 71c4 <_Heap_Walk+0x528>
6d20: e58d3018 str r3, [sp, #24]
6d24: e1a00001 mov r0, r1
6d28: e1a03009 mov r3, r9
6d2c: e3a01000 mov r1, #0
6d30: e1a0e00f mov lr, pc
6d34: e12fff14 bx r4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
6d38: e3590000 cmp r9, #0
6d3c: 1a000006 bne 6d5c <_Heap_Walk+0xc0>
(*printer)( source, true, "page size is zero\n" );
6d40: e1a00005 mov r0, r5
6d44: e3a01001 mov r1, #1
6d48: e59f2478 ldr r2, [pc, #1144] ; 71c8 <_Heap_Walk+0x52c>
6d4c: e1a0e00f mov lr, pc
6d50: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
6d54: e1a08009 mov r8, r9
6d58: ea00010b b 718c <_Heap_Walk+0x4f0>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
6d5c: e2198003 ands r8, r9, #3
(*printer)(
6d60: 11a00005 movne r0, r5
6d64: 13a01001 movne r1, #1
6d68: 159f245c ldrne r2, [pc, #1116] ; 71cc <_Heap_Walk+0x530>
6d6c: 11a03009 movne r3, r9
6d70: 1a00010c bne 71a8 <_Heap_Walk+0x50c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
6d74: e59d0024 ldr r0, [sp, #36] ; 0x24
6d78: e1a01009 mov r1, r9
6d7c: ebffe788 bl ba4 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
6d80: e250b000 subs fp, r0, #0
6d84: 0a000006 beq 6da4 <_Heap_Walk+0x108>
(*printer)(
6d88: e1a00005 mov r0, r5
6d8c: e3a01001 mov r1, #1
6d90: e59f2438 ldr r2, [pc, #1080] ; 71d0 <_Heap_Walk+0x534>
6d94: e59d3024 ldr r3, [sp, #36] ; 0x24
6d98: e1a0e00f mov lr, pc
6d9c: e12fff14 bx r4
6da0: ea0000f9 b 718c <_Heap_Walk+0x4f0>
6da4: e59dc020 ldr ip, [sp, #32]
6da8: e1a01009 mov r1, r9
6dac: e28c0008 add r0, ip, #8
6db0: ebffe77b bl ba4 <__umodsi3>
);
return false;
}
if (
6db4: e250a000 subs sl, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
6db8: 11a00005 movne r0, r5
6dbc: 13a01001 movne r1, #1
6dc0: 159f240c ldrne r2, [pc, #1036] ; 71d4 <_Heap_Walk+0x538>
6dc4: 159d3020 ldrne r3, [sp, #32]
6dc8: 1a0000cc bne 7100 <_Heap_Walk+0x464>
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;
6dcc: e59d2020 ldr r2, [sp, #32]
6dd0: e5928004 ldr r8, [r2, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
6dd4: e2188001 ands r8, r8, #1
(*printer)(
6dd8: 01a00005 moveq r0, r5
6ddc: 03a01001 moveq r1, #1
6de0: 059f23f0 ldreq r2, [pc, #1008] ; 71d8 <_Heap_Walk+0x53c>
6de4: 0a000009 beq 6e10 <_Heap_Walk+0x174>
- 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;
6de8: e59d3028 ldr r3, [sp, #40] ; 0x28
6dec: e5937004 ldr r7, [r3, #4]
6df0: e3c77001 bic r7, r7, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
6df4: e0837007 add r7, r3, r7
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
6df8: e5978004 ldr r8, [r7, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
6dfc: e2188001 ands r8, r8, #1
6e00: 1a000005 bne 6e1c <_Heap_Walk+0x180>
(*printer)(
6e04: e59f23d0 ldr r2, [pc, #976] ; 71dc <_Heap_Walk+0x540>
6e08: e1a00005 mov r0, r5
6e0c: e3a01001 mov r1, #1
6e10: e1a0e00f mov lr, pc
6e14: e12fff14 bx r4
6e18: ea0000db b 718c <_Heap_Walk+0x4f0>
);
return false;
}
if (
6e1c: e59dc020 ldr ip, [sp, #32]
6e20: e157000c cmp r7, ip
6e24: 0a000006 beq 6e44 <_Heap_Walk+0x1a8>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
6e28: e1a00005 mov r0, r5 <== NOT EXECUTED
6e2c: e3a01001 mov r1, #1 <== NOT EXECUTED
6e30: e59f23a8 ldr r2, [pc, #936] ; 71e0 <_Heap_Walk+0x544> <== NOT EXECUTED
6e34: e1a0e00f mov lr, pc <== NOT EXECUTED
6e38: e12fff14 bx r4 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
6e3c: e1a0800a mov r8, sl <== NOT EXECUTED
6e40: ea0000d1 b 718c <_Heap_Walk+0x4f0> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
6e44: e596b010 ldr fp, [r6, #16]
block = next_block;
} while ( block != first_block );
return true;
}
6e48: e5968008 ldr r8, [r6, #8]
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
6e4c: e1a0a006 mov sl, r6
6e50: ea000034 b 6f28 <_Heap_Walk+0x28c>
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;
6e54: e5963020 ldr r3, [r6, #32]
6e58: e1530008 cmp r3, r8
6e5c: 83a0c000 movhi ip, #0
6e60: 8a000003 bhi 6e74 <_Heap_Walk+0x1d8>
6e64: e596c024 ldr ip, [r6, #36] ; 0x24
6e68: e15c0008 cmp ip, r8
6e6c: 33a0c000 movcc ip, #0
6e70: 23a0c001 movcs ip, #1
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 ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
6e74: e21cc0ff ands ip, ip, #255 ; 0xff
(*printer)(
6e78: 01a00005 moveq r0, r5
6e7c: 03a01001 moveq r1, #1
6e80: 059f235c ldreq r2, [pc, #860] ; 71e4 <_Heap_Walk+0x548>
6e84: 0a000012 beq 6ed4 <_Heap_Walk+0x238>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
6e88: e2880008 add r0, r8, #8
6e8c: e1a0100b mov r1, fp
6e90: ebffe743 bl ba4 <__umodsi3>
);
return false;
}
if (
6e94: e250c000 subs ip, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
6e98: 11a00005 movne r0, r5
6e9c: 13a01001 movne r1, #1
6ea0: 159f2340 ldrne r2, [pc, #832] ; 71e8 <_Heap_Walk+0x54c>
6ea4: 11a03008 movne r3, r8
6ea8: 1a0000be bne 71a8 <_Heap_Walk+0x50c>
- 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;
6eac: e5983004 ldr r3, [r8, #4]
6eb0: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
6eb4: e0883003 add r3, r8, 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;
6eb8: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
6ebc: e2133001 ands r3, r3, #1
6ec0: e58d302c str r3, [sp, #44] ; 0x2c
6ec4: 0a000009 beq 6ef0 <_Heap_Walk+0x254>
(*printer)(
6ec8: e59f231c ldr r2, [pc, #796] ; 71ec <_Heap_Walk+0x550>
6ecc: e1a00005 mov r0, r5
6ed0: e3a01001 mov r1, #1
6ed4: e1a03008 mov r3, r8
6ed8: e58dc01c str ip, [sp, #28]
6edc: e1a0e00f mov lr, pc
6ee0: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
6ee4: e59dc01c ldr ip, [sp, #28]
6ee8: e1a0800c mov r8, ip
6eec: ea0000a6 b 718c <_Heap_Walk+0x4f0>
);
return false;
}
if ( free_block->prev != prev_block ) {
6ef0: e598300c ldr r3, [r8, #12]
6ef4: e153000a cmp r3, sl
6ef8: 0a000008 beq 6f20 <_Heap_Walk+0x284>
(*printer)(
6efc: e58d3000 str r3, [sp]
6f00: e1a00005 mov r0, r5
6f04: e1a03008 mov r3, r8
6f08: e3a01001 mov r1, #1
6f0c: e59f22dc ldr r2, [pc, #732] ; 71f0 <_Heap_Walk+0x554>
6f10: e1a0e00f mov lr, pc
6f14: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
6f18: e59d802c ldr r8, [sp, #44] ; 0x2c
6f1c: ea00009a b 718c <_Heap_Walk+0x4f0>
return false;
}
prev_block = free_block;
free_block = free_block->next;
6f20: e1a0a008 mov sl, r8
6f24: e5988008 ldr r8, [r8, #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 ) {
6f28: e1580006 cmp r8, r6
6f2c: 1affffc8 bne 6e54 <_Heap_Walk+0x1b8>
6f30: ea000000 b 6f38 <_Heap_Walk+0x29c>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
6f34: e1a07008 mov r7, r8
return true;
}
6f38: e5973004 ldr r3, [r7, #4]
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;
6f3c: e5962020 ldr r2, [r6, #32]
- 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;
6f40: e3c3a001 bic sl, r3, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
6f44: e087800a add r8, r7, sl
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;
6f48: e1520008 cmp r2, r8
6f4c: 83a0b000 movhi fp, #0
6f50: 8a000003 bhi 6f64 <_Heap_Walk+0x2c8>
6f54: e596b024 ldr fp, [r6, #36] ; 0x24
6f58: e15b0008 cmp fp, r8
6f5c: 33a0b000 movcc fp, #0
6f60: 23a0b001 movcs fp, #1
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;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
6f64: e21bb0ff ands fp, fp, #255 ; 0xff
6f68: 1a000007 bne 6f8c <_Heap_Walk+0x2f0>
(*printer)(
6f6c: e58d8000 str r8, [sp]
6f70: e1a00005 mov r0, r5
6f74: e3a01001 mov r1, #1
6f78: e59f2274 ldr r2, [pc, #628] ; 71f4 <_Heap_Walk+0x558>
6f7c: e1a03007 mov r3, r7
6f80: e1a0e00f mov lr, pc
6f84: e12fff14 bx r4
6f88: ea00005e b 7108 <_Heap_Walk+0x46c>
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;
6f8c: e59d2028 ldr r2, [sp, #40] ; 0x28
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
6f90: e1a0000a mov r0, sl
6f94: e1a01009 mov r1, r9
6f98: e057b002 subs fp, r7, r2
6f9c: 13a0b001 movne fp, #1
6fa0: e58d301c str r3, [sp, #28]
6fa4: ebffe6fe bl ba4 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
6fa8: e3500000 cmp r0, #0
6fac: e59d301c ldr r3, [sp, #28]
6fb0: 0a000005 beq 6fcc <_Heap_Walk+0x330>
6fb4: e35b0000 cmp fp, #0
(*printer)(
6fb8: 158da000 strne sl, [sp]
6fbc: 11a00005 movne r0, r5
6fc0: 13a01001 movne r1, #1
6fc4: 159f222c ldrne r2, [pc, #556] ; 71f8 <_Heap_Walk+0x55c>
6fc8: 1a000014 bne 7020 <_Heap_Walk+0x384>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
6fcc: e59dc024 ldr ip, [sp, #36] ; 0x24
6fd0: e15a000c cmp sl, ip
6fd4: 2a000009 bcs 7000 <_Heap_Walk+0x364>
6fd8: e35b0000 cmp fp, #0
6fdc: 0a000007 beq 7000 <_Heap_Walk+0x364>
(*printer)(
6fe0: e88d1400 stm sp, {sl, ip}
6fe4: e1a00005 mov r0, r5
6fe8: e3a01001 mov r1, #1
6fec: e59f2208 ldr r2, [pc, #520] ; 71fc <_Heap_Walk+0x560>
6ff0: e1a03007 mov r3, r7
6ff4: e1a0e00f mov lr, pc
6ff8: e12fff14 bx r4
6ffc: ea00006b b 71b0 <_Heap_Walk+0x514>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
7000: e1580007 cmp r8, r7
7004: 8a000009 bhi 7030 <_Heap_Walk+0x394>
7008: e35b0000 cmp fp, #0
700c: 0a000007 beq 7030 <_Heap_Walk+0x394>
(*printer)(
7010: e58d8000 str r8, [sp]
7014: e59f21e4 ldr r2, [pc, #484] ; 7200 <_Heap_Walk+0x564>
7018: e1a00005 mov r0, r5
701c: e3a01001 mov r1, #1
7020: e1a03007 mov r3, r7
7024: e1a0e00f mov lr, pc
7028: e12fff14 bx r4
702c: ea00005f b 71b0 <_Heap_Walk+0x514>
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;
7030: e203b001 and fp, r3, #1
7034: e5983004 ldr r3, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
7038: e3130001 tst r3, #1
703c: 1a00003b bne 7130 <_Heap_Walk+0x494>
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 ?
7040: e597200c ldr r2, [r7, #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)(
7044: e5963008 ldr r3, [r6, #8]
7048: e1520003 cmp r2, r3
block = next_block;
} while ( block != first_block );
return true;
}
704c: e596100c ldr r1, [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)(
7050: 059f01ac ldreq r0, [pc, #428] ; 7204 <_Heap_Walk+0x568>
7054: 0a000003 beq 7068 <_Heap_Walk+0x3cc>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
7058: e59f31a8 ldr r3, [pc, #424] ; 7208 <_Heap_Walk+0x56c>
705c: e1520006 cmp r2, r6
7060: e59f01a4 ldr r0, [pc, #420] ; 720c <_Heap_Walk+0x570>
7064: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
7068: e5973008 ldr r3, [r7, #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)(
706c: e1530001 cmp r3, r1
7070: 059f1198 ldreq r1, [pc, #408] ; 7210 <_Heap_Walk+0x574>
7074: 0a000003 beq 7088 <_Heap_Walk+0x3ec>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
7078: e59fc194 ldr ip, [pc, #404] ; 7214 <_Heap_Walk+0x578>
707c: e1530006 cmp r3, r6
7080: e59f1184 ldr r1, [pc, #388] ; 720c <_Heap_Walk+0x570>
7084: 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)(
7088: e58d2004 str r2, [sp, #4]
708c: e58d0008 str r0, [sp, #8]
7090: e58d300c str r3, [sp, #12]
7094: e58d1010 str r1, [sp, #16]
7098: e1a03007 mov r3, r7
709c: e58da000 str sl, [sp]
70a0: e1a00005 mov r0, r5
70a4: e3a01000 mov r1, #0
70a8: e59f2168 ldr r2, [pc, #360] ; 7218 <_Heap_Walk+0x57c>
70ac: e1a0e00f mov lr, pc
70b0: e12fff14 bx r4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
70b4: e5983000 ldr r3, [r8]
70b8: e15a0003 cmp sl, r3
70bc: 0a000009 beq 70e8 <_Heap_Walk+0x44c>
(*printer)(
70c0: e58d3004 str r3, [sp, #4]
70c4: e58da000 str sl, [sp]
70c8: e58d8008 str r8, [sp, #8]
70cc: e1a00005 mov r0, r5
70d0: e3a01001 mov r1, #1
70d4: e59f2140 ldr r2, [pc, #320] ; 721c <_Heap_Walk+0x580>
70d8: e1a03007 mov r3, r7
70dc: e1a0e00f mov lr, pc
70e0: e12fff14 bx r4
70e4: ea000031 b 71b0 <_Heap_Walk+0x514>
);
return false;
}
if ( !prev_used ) {
70e8: e35b0000 cmp fp, #0
70ec: 1a000007 bne 7110 <_Heap_Walk+0x474>
(*printer)(
70f0: e59f2128 ldr r2, [pc, #296] ; 7220 <_Heap_Walk+0x584>
70f4: e1a00005 mov r0, r5
70f8: e3a01001 mov r1, #1
70fc: e1a03007 mov r3, r7
7100: e1a0e00f mov lr, pc
7104: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
7108: e1a0800b mov r8, fp
710c: ea00001e b 718c <_Heap_Walk+0x4f0>
block = next_block;
} while ( block != first_block );
return true;
}
7110: e5963008 ldr r3, [r6, #8]
7114: ea000002 b 7124 <_Heap_Walk+0x488>
{
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 ) {
if ( free_block == block ) {
7118: e1530007 cmp r3, r7
711c: 0a000016 beq 717c <_Heap_Walk+0x4e0>
return true;
}
free_block = free_block->next;
7120: 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 ) {
7124: e1530006 cmp r3, r6
7128: 1afffffa bne 7118 <_Heap_Walk+0x47c>
712c: ea000019 b 7198 <_Heap_Walk+0x4fc>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
7130: e35b0000 cmp fp, #0
7134: 0a000007 beq 7158 <_Heap_Walk+0x4bc>
(*printer)(
7138: e58da000 str sl, [sp]
713c: e1a00005 mov r0, r5
7140: e3a01000 mov r1, #0
7144: e59f20d8 ldr r2, [pc, #216] ; 7224 <_Heap_Walk+0x588>
7148: e1a03007 mov r3, r7
714c: e1a0e00f mov lr, pc
7150: e12fff14 bx r4
7154: ea000008 b 717c <_Heap_Walk+0x4e0>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
7158: e58da000 str sl, [sp]
715c: e5973000 ldr r3, [r7]
7160: e1a00005 mov r0, r5
7164: e58d3004 str r3, [sp, #4]
7168: e1a0100b mov r1, fp
716c: e59f20b4 ldr r2, [pc, #180] ; 7228 <_Heap_Walk+0x58c>
7170: e1a03007 mov r3, r7
7174: e1a0e00f mov lr, pc
7178: e12fff14 bx r4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
717c: e59d2020 ldr r2, [sp, #32]
7180: e1580002 cmp r8, r2
7184: 1affff6a bne 6f34 <_Heap_Walk+0x298>
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() ) ) {
return true;
7188: e3a08001 mov r8, #1
block = next_block;
} while ( block != first_block );
return true;
}
718c: e1a00008 mov r0, r8
7190: e28dd030 add sp, sp, #48 ; 0x30
7194: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
7198: e59f208c ldr r2, [pc, #140] ; 722c <_Heap_Walk+0x590>
719c: e1a00005 mov r0, r5
71a0: e3a01001 mov r1, #1
71a4: e1a03007 mov r3, r7
71a8: e1a0e00f mov lr, pc
71ac: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
71b0: e3a08000 mov r8, #0
71b4: eafffff4 b 718c <_Heap_Walk+0x4f0>
00020824 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
20824: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
20828: e5903010 ldr r3, [r0, #16]
2082c: e59f50f8 ldr r5, [pc, #248] ; 2092c <_POSIX_signals_Unblock_thread+0x108>
20830: e59f80f4 ldr r8, [pc, #244] ; 2092c <_POSIX_signals_Unblock_thread+0x108>
20834: e0035005 and r5, r3, r5
20838: e241c001 sub ip, r1, #1
2083c: e3a06001 mov r6, #1
20840: e1550008 cmp r5, r8
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
20844: e1a04000 mov r4, r0
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
20848: e5907108 ldr r7, [r0, #264] ; 0x108
2084c: e1a0cc16 lsl ip, r6, ip
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
20850: 1a000013 bne 208a4 <_POSIX_signals_Unblock_thread+0x80>
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
20854: e5903030 ldr r3, [r0, #48] ; 0x30
20858: e11c0003 tst ip, r3
2085c: 1a000002 bne 2086c <_POSIX_signals_Unblock_thread+0x48>
20860: e59750d0 ldr r5, [r7, #208] ; 0xd0
20864: e1dc5005 bics r5, ip, r5
20868: 0a00002d beq 20924 <_POSIX_signals_Unblock_thread+0x100>
the_thread->Wait.return_code = EINTR;
2086c: e3a03004 mov r3, #4
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
20870: e3520000 cmp r2, #0
*/
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;
20874: e5843034 str r3, [r4, #52] ; 0x34
the_info = (siginfo_t *) the_thread->Wait.return_argument;
20878: e5943028 ldr r3, [r4, #40] ; 0x28
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
2087c: 18920007 ldmne r2, {r0, r1, r2}
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
20880: 05831000 streq r1, [r3]
the_info->si_code = SI_USER;
20884: 03a01001 moveq r1, #1
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
20888: 18830007 stmne r3, {r0, r1, r2}
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
2088c: 05831004 streq r1, [r3, #4]
the_info->si_value.sival_int = 0;
20890: 05832008 streq r2, [r3, #8]
} else {
*the_info = *info;
}
_Thread_queue_Extract_with_proxy( the_thread );
20894: e1a00004 mov r0, r4
20898: ebffaf1c bl c510 <_Thread_queue_Extract_with_proxy>
return true;
2089c: e3a05001 mov r5, #1
208a0: ea00001f b 20924 <_POSIX_signals_Unblock_thread+0x100>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
208a4: e59750d0 ldr r5, [r7, #208] ; 0xd0
208a8: e1dc5005 bics r5, ip, r5
208ac: 0a00001c beq 20924 <_POSIX_signals_Unblock_thread+0x100>
* 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 ) ) {
208b0: e2135201 ands r5, r3, #268435456 ; 0x10000000
208b4: 0a000010 beq 208fc <_POSIX_signals_Unblock_thread+0xd8>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
208b8: e59f5070 ldr r5, [pc, #112] ; 20930 <_POSIX_signals_Unblock_thread+0x10c>
208bc: e0035005 and r5, r3, r5
the_thread->Wait.return_code = EINTR;
208c0: e3a02004 mov r2, #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) )
208c4: e3550000 cmp r5, #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;
208c8: e5802034 str r2, [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) )
208cc: 0a000002 beq 208dc <_POSIX_signals_Unblock_thread+0xb8>
_Thread_queue_Extract_with_proxy( the_thread );
208d0: ebffaf0e bl c510 <_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;
208d4: e3a05000 mov r5, #0 <== NOT EXECUTED
208d8: ea000011 b 20924 <_POSIX_signals_Unblock_thread+0x100> <== NOT EXECUTED
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
208dc: e2133008 ands r3, r3, #8
208e0: 0a00000e beq 20920 <_POSIX_signals_Unblock_thread+0xfc>
(void) _Watchdog_Remove( &the_thread->Timer );
208e4: e2800048 add r0, r0, #72 ; 0x48
208e8: ebffb1a3 bl cf7c <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
208ec: e1a00004 mov r0, r4
208f0: e59f103c ldr r1, [pc, #60] ; 20934 <_POSIX_signals_Unblock_thread+0x110>
208f4: ebffac64 bl ba8c <_Thread_Clear_state>
208f8: ea000009 b 20924 <_POSIX_signals_Unblock_thread+0x100>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
208fc: e3530000 cmp r3, #0
20900: 1a000007 bne 20924 <_POSIX_signals_Unblock_thread+0x100>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
20904: e59f202c ldr r2, [pc, #44] ; 20938 <_POSIX_signals_Unblock_thread+0x114>
20908: e5925000 ldr r5, [r2]
2090c: e3550000 cmp r5, #0
20910: 0a000003 beq 20924 <_POSIX_signals_Unblock_thread+0x100>
20914: e5921004 ldr r1, [r2, #4]
20918: e1500001 cmp r0, r1
_Thread_Dispatch_necessary = true;
2091c: 05c26010 strbeq r6, [r2, #16]
}
}
return false;
20920: e1a05003 mov r5, r3
}
20924: e1a00005 mov r0, r5
20928: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00007384 <_Thread_queue_Enqueue_priority>:
7384: e281303c add r3, r1, #60 ; 0x3c
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
7388: e591c014 ldr ip, [r1, #20]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
738c: e5813038 str r3, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
7390: e3a03000 mov r3, #0
7394: e581303c str r3, [r1, #60] ; 0x3c
Chain_Node *previous_node;
Chain_Node *search_node;
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
7398: e2813038 add r3, r1, #56 ; 0x38
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
739c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
the_chain->last = _Chain_Head(the_chain);
73a0: e5813040 str r3, [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 ];
73a4: e3a0400c mov r4, #12
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
73a8: e1a0332c lsr r3, ip, #6
73ac: e0030394 mul r3, r4, r3
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
73b0: e31c0020 tst ip, #32
_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 ];
73b4: e0807003 add r7, r0, r3
block_state = the_thread_queue->state;
73b8: e5908038 ldr r8, [r0, #56] ; 0x38
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
73bc: 159fa15c ldrne sl, [pc, #348] ; 7520 <_Thread_queue_Enqueue_priority+0x19c>
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
73c0: 11a0b007 movne fp, r7
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
73c4: 1a000024 bne 745c <_Thread_queue_Enqueue_priority+0xd8>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
73c8: e2833004 add r3, r3, #4
73cc: e080a003 add sl, r0, r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
73d0: e10f4000 mrs r4, CPSR
73d4: e3843080 orr r3, r4, #128 ; 0x80
73d8: e129f003 msr CPSR_fc, r3
73dc: e1a05004 mov r5, r4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
73e0: e3e06000 mvn r6, #0
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
73e4: e5973000 ldr r3, [r7]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
73e8: ea00000b b 741c <_Thread_queue_Enqueue_priority+0x98>
search_priority = search_thread->current_priority;
73ec: e5936014 ldr r6, [r3, #20]
if ( priority <= search_priority )
73f0: e15c0006 cmp ip, r6
73f4: 9a00000a bls 7424 <_Thread_queue_Enqueue_priority+0xa0>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
73f8: e10f9000 mrs r9, CPSR
73fc: e129f004 msr CPSR_fc, r4
7400: e129f009 msr CPSR_fc, r9
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
7404: e5939010 ldr r9, [r3, #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) ) {
7408: e1180009 tst r8, r9
740c: 1a000001 bne 7418 <_Thread_queue_Enqueue_priority+0x94>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
7410: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
7414: eaffffed b 73d0 <_Thread_queue_Enqueue_priority+0x4c> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
7418: e5933000 ldr r3, [r3]
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
741c: e153000a cmp r3, sl
7420: 1afffff1 bne 73ec <_Thread_queue_Enqueue_priority+0x68>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
7424: e5907030 ldr r7, [r0, #48] ; 0x30
7428: e3570001 cmp r7, #1
742c: 1a000038 bne 7514 <_Thread_queue_Enqueue_priority+0x190>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7430: e3a02000 mov r2, #0
if ( priority == search_priority )
7434: e15c0006 cmp ip, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7438: e5802030 str r2, [r0, #48] ; 0x30
if ( priority == search_priority )
743c: 0a00002a beq 74ec <_Thread_queue_Enqueue_priority+0x168>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
7440: e5932004 ldr r2, [r3, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7444: e5813000 str r3, [r1]
the_node->previous = previous_node;
7448: e5812004 str r2, [r1, #4]
previous_node->next = the_node;
744c: e5821000 str r1, [r2]
search_node->previous = the_node;
7450: e5831004 str r1, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
7454: e5810044 str r0, [r1, #68] ; 0x44
_ISR_Enable( level );
7458: ea000021 b 74e4 <_Thread_queue_Enqueue_priority+0x160>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
745c: e5da6000 ldrb r6, [sl]
7460: e2866001 add r6, r6, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
7464: e10f4000 mrs r4, CPSR
7468: e3843080 orr r3, r4, #128 ; 0x80
746c: e129f003 msr CPSR_fc, r3
7470: e1a05004 mov r5, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
7474: e59b3008 ldr r3, [fp, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7478: ea00000b b 74ac <_Thread_queue_Enqueue_priority+0x128>
search_priority = search_thread->current_priority;
747c: e5936014 ldr r6, [r3, #20]
if ( priority >= search_priority )
7480: e15c0006 cmp ip, r6
7484: 2a00000a bcs 74b4 <_Thread_queue_Enqueue_priority+0x130>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7488: e10f9000 mrs r9, CPSR
748c: e129f004 msr CPSR_fc, r4
7490: e129f009 msr CPSR_fc, r9
7494: e5939010 ldr r9, [r3, #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) ) {
7498: e1180009 tst r8, r9
749c: 1a000001 bne 74a8 <_Thread_queue_Enqueue_priority+0x124>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
74a0: e129f004 msr CPSR_fc, r4
74a4: eaffffec b 745c <_Thread_queue_Enqueue_priority+0xd8>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
74a8: e5933004 ldr r3, [r3, #4]
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
74ac: e1530007 cmp r3, r7
74b0: 1afffff1 bne 747c <_Thread_queue_Enqueue_priority+0xf8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
74b4: e5907030 ldr r7, [r0, #48] ; 0x30
74b8: e3570001 cmp r7, #1
74bc: 1a000014 bne 7514 <_Thread_queue_Enqueue_priority+0x190>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
74c0: e3a02000 mov r2, #0
if ( priority == search_priority )
74c4: e15c0006 cmp ip, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
74c8: e5802030 str r2, [r0, #48] ; 0x30
if ( priority == search_priority )
74cc: 0a000006 beq 74ec <_Thread_queue_Enqueue_priority+0x168>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
74d0: e5932000 ldr r2, [r3]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
74d4: e881000c stm r1, {r2, r3}
search_node->next = the_node;
next_node->previous = the_node;
74d8: e5821004 str r1, [r2, #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;
74dc: e5831000 str r1, [r3]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
74e0: e5810044 str r0, [r1, #68] ; 0x44
74e4: e129f004 msr CPSR_fc, r4
74e8: ea000007 b 750c <_Thread_queue_Enqueue_priority+0x188>
74ec: e283303c add r3, r3, #60 ; 0x3c
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
74f0: e5932004 ldr r2, [r3, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
74f4: e5813000 str r3, [r1]
the_node->previous = previous_node;
74f8: e5812004 str r2, [r1, #4]
previous_node->next = the_node;
74fc: e5821000 str r1, [r2]
search_node->previous = the_node;
7500: e5831004 str r1, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
7504: e5810044 str r0, [r1, #68] ; 0x44
7508: e129f005 msr CPSR_fc, r5
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
750c: e3a00001 mov r0, #1
7510: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
7514: e5825000 str r5, [r2]
return the_thread_queue->sync_state;
7518: e5900030 ldr r0, [r0, #48] ; 0x30
}
751c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
00013fc0 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
13fc0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
13fc4: e24dd018 sub sp, sp, #24
13fc8: e28db00c add fp, sp, #12
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
13fcc: e3a03000 mov r3, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
13fd0: e28ba004 add sl, fp, #4
13fd4: e28d7004 add r7, sp, #4
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
13fd8: e58da00c str sl, [sp, #12]
the_chain->permanent_null = NULL;
13fdc: e58d3010 str r3, [sp, #16]
the_chain->last = _Chain_Head(the_chain);
13fe0: e58db014 str fp, [sp, #20]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
13fe4: e58d7000 str r7, [sp]
the_chain->permanent_null = NULL;
13fe8: e98d2008 stmib sp, {r3, sp}
13fec: e1a04000 mov r4, r0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
13ff0: e1a0500d mov r5, sp
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
13ff4: e2809030 add r9, r0, #48 ; 0x30
{
/*
* 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;
13ff8: e584b078 str fp, [r4, #120] ; 0x78
/*
* 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 );
13ffc: e2848068 add r8, r4, #104 ; 0x68
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
14000: e59f2150 ldr r2, [pc, #336] ; 14158 <_Timer_server_Body+0x198>
14004: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
14008: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1400c: e1a02005 mov r2, r5
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
14010: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
14014: e0611003 rsb r1, r1, r3
14018: e1a00009 mov r0, r9
1401c: eb0010dd bl 18398 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
14020: e59f3134 ldr r3, [pc, #308] ; 1415c <_Timer_server_Body+0x19c>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
14024: e5942074 ldr r2, [r4, #116] ; 0x74
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
14028: e5936000 ldr r6, [r3]
/*
* 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 ) {
1402c: e1560002 cmp r6, r2
14030: 9a000004 bls 14048 <_Timer_server_Body+0x88>
/*
* 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 );
14034: e0621006 rsb r1, r2, r6
14038: e1a00008 mov r0, r8
1403c: e1a02005 mov r2, r5
14040: eb0010d4 bl 18398 <_Watchdog_Adjust_to_chain>
14044: ea000003 b 14058 <_Timer_server_Body+0x98>
/*
* 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 );
14048: 31a00008 movcc r0, r8
1404c: 33a01001 movcc r1, #1
14050: 30662002 rsbcc r2, r6, r2
14054: 3b0010a7 blcc 182f8 <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
14058: e5846074 str r6, [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 );
1405c: e5940078 ldr r0, [r4, #120] ; 0x78
14060: eb000298 bl 14ac8 <_Chain_Get>
if ( timer == NULL ) {
14064: e2506000 subs r6, r0, #0
14068: 0a000009 beq 14094 <_Timer_server_Body+0xd4>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
1406c: e5963038 ldr r3, [r6, #56] ; 0x38
14070: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
14074: 01a00009 moveq r0, r9
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
14078: 0a000002 beq 14088 <_Timer_server_Body+0xc8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
1407c: e3530003 cmp r3, #3
14080: 1afffff5 bne 1405c <_Timer_server_Body+0x9c>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
14084: e1a00008 mov r0, r8
14088: e2861010 add r1, r6, #16
1408c: eb0010ec bl 18444 <_Watchdog_Insert>
14090: eafffff1 b 1405c <_Timer_server_Body+0x9c>
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
14094: ebffff97 bl 13ef8 <arm_interrupt_disable>
if ( _Chain_Is_empty( insert_chain ) ) {
14098: e59d300c ldr r3, [sp, #12]
1409c: e153000a cmp r3, sl
140a0: 1a000006 bne 140c0 <_Timer_server_Body+0x100>
ts->insert_chain = NULL;
140a4: e5846078 str r6, [r4, #120] ; 0x78
140a8: e129f000 msr CPSR_fc, r0
_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 ) ) {
140ac: e59d3000 ldr r3, [sp]
140b0: e1530007 cmp r3, r7
)
{
if ( !_Chain_Is_empty(the_chain))
return _Chain_Get_first_unprotected(the_chain);
else
return NULL;
140b4: 13a06000 movne r6, #0
140b8: 1a000002 bne 140c8 <_Timer_server_Body+0x108>
140bc: ea000013 b 14110 <_Timer_server_Body+0x150>
140c0: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
140c4: eaffffcd b 14000 <_Timer_server_Body+0x40> <== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
140c8: ebffff8a bl 13ef8 <arm_interrupt_disable>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
140cc: e59d3000 ldr r3, [sp]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
140d0: e1530007 cmp r3, r7
140d4: 0a00000b beq 14108 <_Timer_server_Body+0x148>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
140d8: e5932000 ldr r2, [r3]
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
140dc: e3530000 cmp r3, #0
the_chain->first = new_first;
140e0: e58d2000 str r2, [sp]
new_first->previous = _Chain_Head(the_chain);
140e4: e5825004 str r5, [r2, #4]
140e8: 0a000006 beq 14108 <_Timer_server_Body+0x148>
watchdog->state = WATCHDOG_INACTIVE;
140ec: e5836008 str r6, [r3, #8]
140f0: e129f000 msr CPSR_fc, r0
/*
* 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 );
140f4: e2830020 add r0, r3, #32
140f8: e8900003 ldm r0, {r0, r1}
140fc: e1a0e00f mov lr, pc
14100: e593f01c ldr pc, [r3, #28]
}
14104: eaffffef b 140c8 <_Timer_server_Body+0x108>
14108: e129f000 msr CPSR_fc, r0
1410c: eaffffb9 b 13ff8 <_Timer_server_Body+0x38>
} else {
ts->active = false;
14110: e3a03000 mov r3, #0
14114: e5c4307c strb r3, [r4, #124] ; 0x7c
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
14118: ebffff7a bl 13f08 <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
1411c: e3a01008 mov r1, #8
14120: e5940000 ldr r0, [r4]
14124: eb000e22 bl 179b4 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
14128: e1a00004 mov r0, r4
1412c: ebffff7b bl 13f20 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
14130: e1a00004 mov r0, r4
14134: ebffff8d bl 13f70 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
14138: eb000ba1 bl 16fc4 <_Thread_Enable_dispatch>
ts->active = true;
1413c: e3a03001 mov r3, #1
14140: 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 );
14144: e2840008 add r0, r4, #8
14148: eb001113 bl 1859c <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
1414c: e2840040 add r0, r4, #64 ; 0x40
14150: eb001111 bl 1859c <_Watchdog_Remove>
14154: eaffffa7 b 13ff8 <_Timer_server_Body+0x38>
00005224 <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
5224: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
5228: e59f41a4 ldr r4, [pc, #420] ; 53d4 <aio_cancel+0x1b0>
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
522c: e1a05001 mov r5, r1
5230: e1a07000 mov r7, r0
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
5234: e1a00004 mov r0, r4
5238: eb0003bf bl 613c <pthread_mutex_lock>
if (aiocbp == NULL)
523c: e3550000 cmp r5, #0
5240: 1a000036 bne 5320 <aio_cancel+0xfc>
{
if (fcntl (fildes, F_GETFL) < 0) {
5244: e1a00007 mov r0, r7 <== NOT EXECUTED
5248: e3a01003 mov r1, #3 <== NOT EXECUTED
524c: eb001968 bl b7f4 <fcntl> <== NOT EXECUTED
5250: e3500000 cmp r0, #0 <== NOT EXECUTED
5254: aa000004 bge 526c <aio_cancel+0x48> <== NOT EXECUTED
pthread_mutex_unlock(&aio_request_queue.mutex);
5258: e1a00004 mov r0, r4 <== NOT EXECUTED
525c: eb0003d5 bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one (EBADF);
5260: eb00272d bl ef1c <__errno> <== NOT EXECUTED
5264: e3a03009 mov r3, #9 <== NOT EXECUTED
5268: ea000033 b 533c <aio_cancel+0x118> <== NOT EXECUTED
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
526c: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
5270: e1a01007 mov r1, r7 <== NOT EXECUTED
5274: e1a02005 mov r2, r5 <== NOT EXECUTED
5278: eb000088 bl 54a0 <rtems_aio_search_fd> <== NOT EXECUTED
fildes,
0);
if (r_chain == NULL)
527c: e2506000 subs r6, r0, #0 <== NOT EXECUTED
5280: 1a00001c bne 52f8 <aio_cancel+0xd4> <== NOT EXECUTED
{
if (!rtems_chain_is_empty (&aio_request_queue.idle_req))
5284: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED
5288: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED
528c: e1520003 cmp r2, r3 <== NOT EXECUTED
5290: 0a000014 beq 52e8 <aio_cancel+0xc4> <== NOT EXECUTED
{
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req,
5294: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED
5298: e1a01007 mov r1, r7 <== NOT EXECUTED
529c: e1a02006 mov r2, r6 <== NOT EXECUTED
52a0: eb00007e bl 54a0 <rtems_aio_search_fd> <== NOT EXECUTED
fildes,
0);
if (r_chain == NULL) {
52a4: e2505000 subs r5, r0, #0 <== NOT EXECUTED
52a8: 0a00000e beq 52e8 <aio_cancel+0xc4> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
52ac: e2850008 add r0, r5, #8 <== NOT EXECUTED
return AIO_ALLDONE;
}
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
pthread_mutex_destroy (&r_chain->mutex);
52b0: e285701c add r7, r5, #28 <== NOT EXECUTED
52b4: eb0009b2 bl 7984 <_Chain_Extract> <== NOT EXECUTED
pthread_mutex_unlock(&aio_request_queue.mutex);
return AIO_ALLDONE;
}
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
52b8: e1a00005 mov r0, r5 <== NOT EXECUTED
52bc: eb00014a bl 57ec <rtems_aio_remove_fd> <== NOT EXECUTED
pthread_mutex_destroy (&r_chain->mutex);
52c0: e1a00007 mov r0, r7 <== NOT EXECUTED
52c4: eb0002fe bl 5ec4 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_cond_destroy (&r_chain->mutex);
52c8: e1a00007 mov r0, r7 <== NOT EXECUTED
52cc: eb000230 bl 5b94 <pthread_cond_destroy> <== NOT EXECUTED
free (r_chain);
52d0: e1a00005 mov r0, r5 <== NOT EXECUTED
52d4: ebfff478 bl 24bc <free> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
52d8: e1a00004 mov r0, r4 <== NOT EXECUTED
52dc: eb0003b5 bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_CANCELED;
52e0: e1a05006 mov r5, r6 <== NOT EXECUTED
52e4: ea000038 b 53cc <aio_cancel+0x1a8> <== NOT EXECUTED
}
pthread_mutex_unlock (&aio_request_queue.mutex);
52e8: e1a00004 mov r0, r4 <== NOT EXECUTED
52ec: eb0003b1 bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_ALLDONE;
52f0: e3a05002 mov r5, #2 <== NOT EXECUTED
52f4: ea000034 b 53cc <aio_cancel+0x1a8> <== NOT EXECUTED
}
pthread_mutex_lock (&r_chain->mutex);
52f8: e286701c add r7, r6, #28 <== NOT EXECUTED
52fc: e1a00007 mov r0, r7 <== NOT EXECUTED
5300: eb00038d bl 613c <pthread_mutex_lock> <== NOT EXECUTED
5304: e2860008 add r0, r6, #8 <== NOT EXECUTED
5308: eb00099d bl 7984 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
530c: e1a00006 mov r0, r6 <== NOT EXECUTED
5310: eb000135 bl 57ec <rtems_aio_remove_fd> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
5314: e1a00007 mov r0, r7 <== NOT EXECUTED
5318: eb0003a6 bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
531c: ea00001d b 5398 <aio_cancel+0x174> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
}
else
{
if (aiocbp->aio_fildes != fildes) {
5320: e5956000 ldr r6, [r5]
5324: e1560007 cmp r6, r7
5328: 0a000006 beq 5348 <aio_cancel+0x124>
pthread_mutex_unlock (&aio_request_queue.mutex);
532c: e1a00004 mov r0, r4
5330: eb0003a0 bl 61b8 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
5334: eb0026f8 bl ef1c <__errno>
5338: e3a03016 mov r3, #22
533c: e5803000 str r3, [r0]
5340: e3e05000 mvn r5, #0
5344: ea000020 b 53cc <aio_cancel+0x1a8>
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
5348: e2840048 add r0, r4, #72 ; 0x48
534c: e1a01006 mov r1, r6
5350: e3a02000 mov r2, #0
5354: eb000051 bl 54a0 <rtems_aio_search_fd>
fildes,
0);
if (r_chain == NULL)
5358: e2507000 subs r7, r0, #0
535c: 1a00000f bne 53a0 <aio_cancel+0x17c>
if (!rtems_chain_is_empty (&aio_request_queue.idle_req))
5360: e5942054 ldr r2, [r4, #84] ; 0x54
5364: e2843058 add r3, r4, #88 ; 0x58
5368: e1520003 cmp r2, r3
536c: 0a00000b beq 53a0 <aio_cancel+0x17c>
{
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req,
5370: e2840054 add r0, r4, #84 ; 0x54
5374: e1a01006 mov r1, r6
5378: e1a02007 mov r2, r7
537c: eb000047 bl 54a0 <rtems_aio_search_fd>
fildes,
0);
if (r_chain == NULL)
5380: e3500000 cmp r0, #0
5384: 0affffe8 beq 532c <aio_cancel+0x108>
{
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp);
5388: e1a01005 mov r1, r5 <== NOT EXECUTED
538c: e2800008 add r0, r0, #8 <== NOT EXECUTED
5390: eb000125 bl 582c <rtems_aio_remove_req> <== NOT EXECUTED
5394: e1a05000 mov r5, r0 <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
5398: e1a00004 mov r0, r4 <== NOT EXECUTED
539c: ea000009 b 53c8 <aio_cancel+0x1a4> <== NOT EXECUTED
return result;
}
pthread_mutex_lock (&r_chain->mutex);
53a0: e287401c add r4, r7, #28 <== NOT EXECUTED
53a4: e1a00004 mov r0, r4 <== NOT EXECUTED
53a8: eb000363 bl 613c <pthread_mutex_lock> <== NOT EXECUTED
result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp);
53ac: e1a01005 mov r1, r5 <== NOT EXECUTED
53b0: e2870008 add r0, r7, #8 <== NOT EXECUTED
53b4: eb00011c bl 582c <rtems_aio_remove_req> <== NOT EXECUTED
53b8: e1a05000 mov r5, r0 <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
53bc: e1a00004 mov r0, r4 <== NOT EXECUTED
53c0: eb00037c bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
53c4: e59f0008 ldr r0, [pc, #8] ; 53d4 <aio_cancel+0x1b0> <== NOT EXECUTED
53c8: eb00037a bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
return result;
}
return AIO_ALLDONE;
}
53cc: e1a00005 mov r0, r5
53d0: e8bd80f0 pop {r4, r5, r6, r7, pc}
00005a74 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
5a74: e92d4030 push {r4, r5, lr}
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
5a78: e3a01003 mov r1, #3
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
5a7c: e1a04000 mov r4, r0
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
5a80: e5900000 ldr r0, [r0]
5a84: eb001756 bl b7e4 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
5a88: e2000003 and r0, r0, #3
5a8c: e3500002 cmp r0, #2
5a90: 13500000 cmpne r0, #0
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
5a94: 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)))
5a98: 1a00000d bne 5ad4 <aio_read+0x60>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
5a9c: e5943014 ldr r3, [r4, #20]
5aa0: e3530000 cmp r3, #0
5aa4: 1a000007 bne 5ac8 <aio_read+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
5aa8: e5943008 ldr r3, [r4, #8]
5aac: e3530000 cmp r3, #0
5ab0: ba000004 blt 5ac8 <aio_read+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
5ab4: e3a00018 mov r0, #24
5ab8: ebfff388 bl 28e0 <malloc>
if (req == NULL)
5abc: e2503000 subs r3, r0, #0
5ac0: 1a00000a bne 5af0 <aio_read+0x7c>
5ac4: ea000001 b 5ad0 <aio_read+0x5c> <== NOT EXECUTED
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);
5ac8: e3a05016 mov r5, #22 <== NOT EXECUTED
5acc: ea000000 b 5ad4 <aio_read+0x60> <== NOT EXECUTED
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
5ad0: e3a0500b mov r5, #11 <== NOT EXECUTED
5ad4: e3e03000 mvn r3, #0
5ad8: e5845030 str r5, [r4, #48] ; 0x30
5adc: e5843034 str r3, [r4, #52] ; 0x34
5ae0: eb002509 bl ef0c <__errno>
5ae4: e5805000 str r5, [r0]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
5ae8: e3e00000 mvn r0, #0
5aec: e8bd8030 pop {r4, r5, pc}
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
5af0: e5834014 str r4, [r3, #20]
req->aiocbp->aio_lio_opcode = LIO_READ;
5af4: e3a03001 mov r3, #1
5af8: e584302c str r3, [r4, #44] ; 0x2c
return rtems_aio_enqueue (req);
}
5afc: 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);
5b00: eaffff5b b 5874 <rtems_aio_enqueue>
00005a8c <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
5a8c: e92d4030 push {r4, r5, lr}
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
5a90: e3a01003 mov r1, #3
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
5a94: e1a04000 mov r4, r0
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
5a98: e5900000 ldr r0, [r0]
5a9c: eb001754 bl b7f4 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
5aa0: e2000003 and r0, r0, #3
5aa4: e2400001 sub r0, r0, #1
5aa8: e3500001 cmp r0, #1
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
5aac: 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)))
5ab0: 8a00000d bhi 5aec <aio_write+0x60>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
5ab4: e5943014 ldr r3, [r4, #20]
5ab8: e3530000 cmp r3, #0
5abc: 1a000007 bne 5ae0 <aio_write+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
5ac0: e5943008 ldr r3, [r4, #8]
5ac4: e3530000 cmp r3, #0
5ac8: ba000004 blt 5ae0 <aio_write+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
5acc: e3a00018 mov r0, #24
5ad0: ebfff386 bl 28f0 <malloc>
if (req == NULL)
5ad4: e2503000 subs r3, r0, #0
5ad8: 1a00000a bne 5b08 <aio_write+0x7c>
5adc: ea000001 b 5ae8 <aio_write+0x5c> <== NOT EXECUTED
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);
5ae0: e3a05016 mov r5, #22 <== NOT EXECUTED
5ae4: ea000000 b 5aec <aio_write+0x60> <== NOT EXECUTED
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
5ae8: e3a0500b mov r5, #11 <== NOT EXECUTED
5aec: e3e03000 mvn r3, #0
5af0: e5845030 str r5, [r4, #48] ; 0x30
5af4: e5843034 str r3, [r4, #52] ; 0x34
5af8: eb002507 bl ef1c <__errno>
5afc: e5805000 str r5, [r0]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
5b00: e3e00000 mvn r0, #0
5b04: e8bd8030 pop {r4, r5, pc}
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
5b08: e5834014 str r4, [r3, #20]
req->aiocbp->aio_lio_opcode = LIO_WRITE;
5b0c: e3a03002 mov r3, #2
5b10: e584302c str r3, [r4, #44] ; 0x2c
return rtems_aio_enqueue (req);
}
5b14: 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);
5b18: eaffff59 b 5884 <rtems_aio_enqueue>
0000a1fc <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
a1fc: e3500000 cmp r0, #0
a200: 0a00000b beq a234 <pthread_attr_setschedpolicy+0x38>
a204: e5903000 ldr r3, [r0]
a208: e3530000 cmp r3, #0
a20c: 0a000008 beq a234 <pthread_attr_setschedpolicy+0x38>
return EINVAL;
switch ( policy ) {
a210: e3510004 cmp r1, #4
a214: 8a000008 bhi a23c <pthread_attr_setschedpolicy+0x40>
a218: e3a03001 mov r3, #1
a21c: e1a03113 lsl r3, r3, r1
a220: e3130017 tst r3, #23
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
a224: 15801014 strne r1, [r0, #20]
return 0;
a228: 13a00000 movne r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
a22c: 112fff1e bxne lr
a230: ea000001 b a23c <pthread_attr_setschedpolicy+0x40> <== NOT EXECUTED
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
a234: e3a00016 mov r0, #22
a238: e12fff1e bx lr
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
a23c: e3a00086 mov r0, #134 ; 0x86
}
}
a240: e12fff1e bx lr
00007040 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
7040: e3500000 cmp r0, #0
7044: 0a000007 beq 7068 <pthread_mutexattr_setpshared+0x28>
7048: e5903000 ldr r3, [r0]
704c: e3530000 cmp r3, #0
7050: 0a000004 beq 7068 <pthread_mutexattr_setpshared+0x28>
return EINVAL;
switch ( pshared ) {
7054: e3510001 cmp r1, #1
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
7058: 95801004 strls r1, [r0, #4]
return 0;
705c: 93a00000 movls r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
7060: 912fff1e bxls lr
7064: ea000001 b 7070 <pthread_mutexattr_setpshared+0x30> <== NOT EXECUTED
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
7068: e3a00016 mov r0, #22
706c: e12fff1e bx lr
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
7070: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
7074: e12fff1e bx lr <== NOT EXECUTED
00006aac <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
6aac: e3500000 cmp r0, #0
6ab0: 0a000007 beq 6ad4 <pthread_rwlockattr_setpshared+0x28>
return EINVAL;
if ( !attr->is_initialized )
6ab4: e5903000 ldr r3, [r0]
6ab8: e3530000 cmp r3, #0
6abc: 0a000004 beq 6ad4 <pthread_rwlockattr_setpshared+0x28>
return EINVAL;
switch ( pshared ) {
6ac0: e3510001 cmp r1, #1
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
6ac4: 95801004 strls r1, [r0, #4]
return 0;
6ac8: 93a00000 movls r0, #0
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
6acc: 912fff1e bxls lr
6ad0: ea000001 b 6adc <pthread_rwlockattr_setpshared+0x30> <== NOT EXECUTED
{
if ( !attr )
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
6ad4: e3a00016 mov r0, #22
6ad8: e12fff1e bx lr
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
6adc: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
6ae0: e12fff1e bx lr <== NOT EXECUTED
00005884 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
5884: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, 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);
5888: e59f41e0 ldr r4, [pc, #480] ; 5a70 <rtems_aio_enqueue+0x1ec>
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
588c: e24dd024 sub sp, sp, #36 ; 0x24
5890: 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);
5894: e1a00004 mov r0, r4
5898: eb000227 bl 613c <pthread_mutex_lock>
if (result != 0) {
589c: e2505000 subs r5, r0, #0
58a0: 0a000002 beq 58b0 <rtems_aio_enqueue+0x2c>
free (req);
58a4: e1a00006 mov r0, r6
58a8: ebfff303 bl 24bc <free>
return result;
58ac: ea00006c b 5a64 <rtems_aio_enqueue+0x1e0>
}
/* _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);
58b0: eb00042e bl 6970 <pthread_self> <== NOT EXECUTED
58b4: e28d101c add r1, sp, #28 <== NOT EXECUTED
58b8: e1a0200d mov r2, sp <== NOT EXECUTED
58bc: eb000333 bl 6590 <pthread_getschedparam> <== NOT EXECUTED
req->caller_thread = pthread_self ();
58c0: eb00042a bl 6970 <pthread_self> <== NOT EXECUTED
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
58c4: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
58c8: e59d1000 ldr r1, [sp] <== NOT EXECUTED
58cc: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED
58d0: e0622001 rsb r2, r2, r1 <== NOT EXECUTED
58d4: e5862004 str r2, [r6, #4] <== NOT EXECUTED
req->policy = policy;
58d8: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
58dc: e5862000 str r2, [r6] <== NOT EXECUTED
req->aiocbp->error_code = EINPROGRESS;
58e0: e3a02077 mov r2, #119 ; 0x77 <== NOT EXECUTED
/* _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 ();
58e4: e5860010 str r0, [r6, #16] <== NOT EXECUTED
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
58e8: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
58ec: e5942068 ldr r2, [r4, #104] ; 0x68 <== NOT EXECUTED
58f0: e3520000 cmp r2, #0 <== NOT EXECUTED
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
req->aiocbp->return_value = 0;
58f4: e5835034 str r5, [r3, #52] ; 0x34 <== NOT EXECUTED
if ((aio_request_queue.idle_threads == 0) &&
58f8: 1a00002e bne 59b8 <rtems_aio_enqueue+0x134> <== NOT EXECUTED
58fc: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED
5900: e3520004 cmp r2, #4 <== NOT EXECUTED
5904: ca00002b bgt 59b8 <rtems_aio_enqueue+0x134> <== NOT EXECUTED
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);
5908: e5931000 ldr r1, [r3] <== NOT EXECUTED
590c: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
5910: e3a02001 mov r2, #1 <== NOT EXECUTED
5914: ebfffee1 bl 54a0 <rtems_aio_search_fd> <== NOT EXECUTED
if (r_chain->new_fd == 1) {
5918: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
591c: e3530001 cmp r3, #1 <== 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);
5920: e1a07000 mov r7, r0 <== NOT EXECUTED
5924: e2809010 add r9, r0, #16 <== NOT EXECUTED
5928: e280801c add r8, r0, #28 <== NOT EXECUTED
592c: e280a020 add sl, r0, #32 <== NOT EXECUTED
if (r_chain->new_fd == 1) {
5930: 1a000017 bne 5994 <rtems_aio_enqueue+0x110> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
5934: e2861008 add r1, r6, #8 <== NOT EXECUTED
5938: e1a00009 mov r0, r9 <== NOT EXECUTED
593c: eb000825 bl 79d8 <_Chain_Insert> <== NOT EXECUTED
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
5940: e1a01005 mov r1, r5 <== NOT EXECUTED
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;
5944: e5875004 str r5, [r7, #4] <== NOT EXECUTED
pthread_mutex_init (&r_chain->mutex, NULL);
5948: e1a00008 mov r0, r8 <== NOT EXECUTED
594c: eb0001a8 bl 5ff4 <pthread_mutex_init> <== NOT EXECUTED
pthread_cond_init (&r_chain->cond, NULL);
5950: e1a01005 mov r1, r5 <== NOT EXECUTED
5954: e1a0000a mov r0, sl <== NOT EXECUTED
5958: eb0000bd bl 5c54 <pthread_cond_init> <== NOT EXECUTED
AIO_printf ("New thread");
result = pthread_create (&thid, &aio_request_queue.attr,
595c: e1a03007 mov r3, r7 <== NOT EXECUTED
5960: e28d0020 add r0, sp, #32 <== NOT EXECUTED
5964: e2841008 add r1, r4, #8 <== NOT EXECUTED
5968: e59f2104 ldr r2, [pc, #260] ; 5a74 <rtems_aio_enqueue+0x1f0><== NOT EXECUTED
596c: eb000273 bl 6340 <pthread_create> <== NOT EXECUTED
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
5970: e2506000 subs r6, r0, #0 <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
++aio_request_queue.active_threads;
5974: 05943064 ldreq r3, [r4, #100] ; 0x64 <== NOT EXECUTED
5978: 02833001 addeq r3, r3, #1 <== NOT EXECUTED
597c: 05843064 streq r3, [r4, #100] ; 0x64 <== NOT EXECUTED
pthread_cond_init (&r_chain->cond, NULL);
AIO_printf ("New thread");
result = pthread_create (&thid, &aio_request_queue.attr,
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
5980: 0a000035 beq 5a5c <rtems_aio_enqueue+0x1d8> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
5984: e1a00004 mov r0, r4 <== NOT EXECUTED
5988: eb00020a bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
return result;
598c: e1a05006 mov r5, r6 <== NOT EXECUTED
5990: ea000033 b 5a64 <rtems_aio_enqueue+0x1e0> <== NOT EXECUTED
}
++aio_request_queue.active_threads;
}
else {
/* put request in the fd chain it belongs to */
pthread_mutex_lock (&r_chain->mutex);
5994: e1a00008 mov r0, r8 <== NOT EXECUTED
5998: eb0001e7 bl 613c <pthread_mutex_lock> <== NOT EXECUTED
rtems_aio_insert_prio (&r_chain->perfd, req);
599c: e1a00009 mov r0, r9 <== NOT EXECUTED
59a0: e1a01006 mov r1, r6 <== NOT EXECUTED
59a4: ebffff7d bl 57a0 <rtems_aio_insert_prio> <== NOT EXECUTED
pthread_cond_signal (&r_chain->cond);
59a8: e1a0000a mov r0, sl <== NOT EXECUTED
59ac: eb0000d8 bl 5d14 <pthread_cond_signal> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
59b0: e1a00008 mov r0, r8 <== NOT EXECUTED
59b4: ea00000e b 59f4 <rtems_aio_enqueue+0x170> <== NOT EXECUTED
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,
59b8: e59f00b8 ldr r0, [pc, #184] ; 5a78 <rtems_aio_enqueue+0x1f4><== NOT EXECUTED
59bc: e5931000 ldr r1, [r3] <== NOT EXECUTED
59c0: e3a02000 mov r2, #0 <== NOT EXECUTED
59c4: ebfffeb5 bl 54a0 <rtems_aio_search_fd> <== NOT EXECUTED
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
59c8: e2504000 subs r4, r0, #0 <== NOT EXECUTED
59cc: 0a00000a beq 59fc <rtems_aio_enqueue+0x178> <== NOT EXECUTED
{
pthread_mutex_lock (&r_chain->mutex);
59d0: e284701c add r7, r4, #28 <== NOT EXECUTED
59d4: e1a00007 mov r0, r7 <== NOT EXECUTED
59d8: eb0001d7 bl 613c <pthread_mutex_lock> <== NOT EXECUTED
rtems_aio_insert_prio (&r_chain->perfd, req);
59dc: e2840010 add r0, r4, #16 <== NOT EXECUTED
59e0: e1a01006 mov r1, r6 <== NOT EXECUTED
59e4: ebffff6d bl 57a0 <rtems_aio_insert_prio> <== NOT EXECUTED
pthread_cond_signal (&r_chain->cond);
59e8: e2840020 add r0, r4, #32 <== NOT EXECUTED
59ec: eb0000c8 bl 5d14 <pthread_cond_signal> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
59f0: e1a00007 mov r0, r7 <== NOT EXECUTED
59f4: eb0001ef bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
59f8: ea000017 b 5a5c <rtems_aio_enqueue+0x1d8> <== 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);
59fc: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
5a00: e59f0074 ldr r0, [pc, #116] ; 5a7c <rtems_aio_enqueue+0x1f8><== NOT EXECUTED
5a04: e5931000 ldr r1, [r3] <== NOT EXECUTED
5a08: e3a02001 mov r2, #1 <== NOT EXECUTED
5a0c: ebfffea3 bl 54a0 <rtems_aio_search_fd> <== NOT EXECUTED
if (r_chain->new_fd == 1) {
5a10: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
5a14: e3530001 cmp r3, #1 <== 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);
5a18: e1a07000 mov r7, r0 <== NOT EXECUTED
5a1c: e2800010 add r0, r0, #16 <== NOT EXECUTED
if (r_chain->new_fd == 1) {
5a20: 1a00000b bne 5a54 <rtems_aio_enqueue+0x1d0> <== NOT EXECUTED
5a24: e2861008 add r1, r6, #8 <== NOT EXECUTED
5a28: eb0007ea bl 79d8 <_Chain_Insert> <== NOT EXECUTED
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
5a2c: e1a01004 mov r1, r4 <== 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 */
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
5a30: e5874004 str r4, [r7, #4] <== NOT EXECUTED
pthread_mutex_init (&r_chain->mutex, NULL);
5a34: e287001c add r0, r7, #28 <== NOT EXECUTED
5a38: eb00016d bl 5ff4 <pthread_mutex_init> <== NOT EXECUTED
pthread_cond_init (&r_chain->cond, NULL);
5a3c: e2870020 add r0, r7, #32 <== NOT EXECUTED
5a40: e1a01004 mov r1, r4 <== NOT EXECUTED
5a44: eb000082 bl 5c54 <pthread_cond_init> <== NOT EXECUTED
pthread_cond_signal (&aio_request_queue.new_req);
5a48: e59f0030 ldr r0, [pc, #48] ; 5a80 <rtems_aio_enqueue+0x1fc><== NOT EXECUTED
5a4c: eb0000b0 bl 5d14 <pthread_cond_signal> <== NOT EXECUTED
5a50: ea000001 b 5a5c <rtems_aio_enqueue+0x1d8> <== NOT EXECUTED
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
5a54: e1a01006 mov r1, r6 <== NOT EXECUTED
5a58: ebffff50 bl 57a0 <rtems_aio_insert_prio> <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
5a5c: e59f000c ldr r0, [pc, #12] ; 5a70 <rtems_aio_enqueue+0x1ec><== NOT EXECUTED
5a60: eb0001d4 bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
return 0;
}
5a64: e1a00005 mov r0, r5
5a68: e28dd024 add sp, sp, #36 ; 0x24
5a6c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
00005540 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
5540: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
The fd chain is already unlocked */
struct timespec timeout;
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
5544: e59f6248 ldr r6, [pc, #584] ; 5794 <rtems_aio_handle+0x254><== NOT EXECUTED
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
5548: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED
554c: e1a04000 mov r4, r0 <== 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);
5550: e28d7020 add r7, sp, #32 <== 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)) {
5554: e286b058 add fp, r6, #88 ; 0x58 <== NOT EXECUTED
node = chain->first;
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
5558: e28d9004 add r9, sp, #4 <== 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);
555c: e284a01c add sl, r4, #28 <== NOT EXECUTED
5560: e1a0000a mov r0, sl <== NOT EXECUTED
5564: eb0002f4 bl 613c <pthread_mutex_lock> <== NOT EXECUTED
if (result != 0)
5568: e2508000 subs r8, r0, #0 <== NOT EXECUTED
556c: 1a000085 bne 5788 <rtems_aio_handle+0x248> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5570: e5945010 ldr r5, [r4, #16] <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5574: e2843014 add r3, r4, #20 <== 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)) {
5578: e1550003 cmp r5, r3 <== NOT EXECUTED
557c: 0a000035 beq 5658 <rtems_aio_handle+0x118> <== NOT EXECUTED
node = chain->first;
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
5580: eb0004fa bl 6970 <pthread_self> <== NOT EXECUTED
5584: e28d1028 add r1, sp, #40 ; 0x28 <== NOT EXECUTED
5588: e1a02009 mov r2, r9 <== NOT EXECUTED
558c: eb0003ff bl 6590 <pthread_getschedparam> <== NOT EXECUTED
param.sched_priority = req->priority;
5590: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
5594: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
pthread_setschedparam (pthread_self(), req->policy, ¶m);
5598: eb0004f4 bl 6970 <pthread_self> <== NOT EXECUTED
559c: e1a02009 mov r2, r9 <== NOT EXECUTED
55a0: e5951000 ldr r1, [r5] <== NOT EXECUTED
55a4: eb0004f6 bl 6984 <pthread_setschedparam> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
55a8: e1a00005 mov r0, r5 <== NOT EXECUTED
55ac: eb0008f4 bl 7984 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
55b0: e1a0000a mov r0, sl <== NOT EXECUTED
55b4: eb0002ff bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
switch (req->aiocbp->aio_lio_opcode) {
55b8: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED
55bc: e592302c ldr r3, [r2, #44] ; 0x2c <== NOT EXECUTED
55c0: e3530002 cmp r3, #2 <== NOT EXECUTED
55c4: 0a00000b beq 55f8 <rtems_aio_handle+0xb8> <== NOT EXECUTED
55c8: e3530003 cmp r3, #3 <== NOT EXECUTED
55cc: 0a000011 beq 5618 <rtems_aio_handle+0xd8> <== NOT EXECUTED
55d0: e3530001 cmp r3, #1 <== NOT EXECUTED
55d4: 1a000013 bne 5628 <rtems_aio_handle+0xe8> <== NOT EXECUTED
case LIO_READ:
result = pread (req->aiocbp->aio_fildes,
55d8: e5921008 ldr r1, [r2, #8] <== NOT EXECUTED
55dc: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED
55e0: e58d1000 str r1, [sp] <== NOT EXECUTED
55e4: e592100c ldr r1, [r2, #12] <== NOT EXECUTED
55e8: e5920000 ldr r0, [r2] <== NOT EXECUTED
55ec: e5922010 ldr r2, [r2, #16] <== NOT EXECUTED
55f0: eb00294b bl fb24 <pread> <== NOT EXECUTED
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
55f4: ea000009 b 5620 <rtems_aio_handle+0xe0> <== NOT EXECUTED
case LIO_WRITE:
result = pwrite (req->aiocbp->aio_fildes,
55f8: e5921008 ldr r1, [r2, #8] <== NOT EXECUTED
55fc: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED
5600: e58d1000 str r1, [sp] <== NOT EXECUTED
5604: e592100c ldr r1, [r2, #12] <== NOT EXECUTED
5608: e5920000 ldr r0, [r2] <== NOT EXECUTED
560c: e5922010 ldr r2, [r2, #16] <== NOT EXECUTED
5610: eb00298b bl fc44 <pwrite> <== NOT EXECUTED
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
5614: ea000001 b 5620 <rtems_aio_handle+0xe0> <== NOT EXECUTED
case LIO_SYNC:
result = fsync (req->aiocbp->aio_fildes);
5618: e5920000 ldr r0, [r2] <== NOT EXECUTED
561c: eb0018e9 bl b9c8 <fsync> <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
5620: e3700001 cmn r0, #1 <== NOT EXECUTED
5624: 1a000006 bne 5644 <rtems_aio_handle+0x104> <== NOT EXECUTED
req->aiocbp->return_value = -1;
5628: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED
562c: e3e02000 mvn r2, #0 <== NOT EXECUTED
5630: e5852034 str r2, [r5, #52] ; 0x34 <== NOT EXECUTED
req->aiocbp->error_code = errno;
5634: eb002638 bl ef1c <__errno> <== NOT EXECUTED
5638: e5903000 ldr r3, [r0] <== NOT EXECUTED
563c: e5853030 str r3, [r5, #48] ; 0x30 <== NOT EXECUTED
5640: eaffffc5 b 555c <rtems_aio_handle+0x1c> <== NOT EXECUTED
} else {
req->aiocbp->return_value = result;
5644: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
req->aiocbp->error_code = 0;
5648: 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;
564c: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED
req->aiocbp->error_code = 0;
5650: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED
5654: eaffffc0 b 555c <rtems_aio_handle+0x1c> <== NOT EXECUTED
wait for a signal on chain, this will unlock the queue.
The fd chain is already unlocked */
struct timespec timeout;
pthread_mutex_unlock (&r_chain->mutex);
5658: e1a0000a mov r0, sl <== NOT EXECUTED
565c: eb0002d5 bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_lock (&aio_request_queue.mutex);
5660: e59f012c ldr r0, [pc, #300] ; 5794 <rtems_aio_handle+0x254><== NOT EXECUTED
5664: eb0002b4 bl 613c <pthread_mutex_lock> <== NOT EXECUTED
if (rtems_chain_is_empty (chain))
5668: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
566c: e1530005 cmp r3, r5 <== NOT EXECUTED
5670: 1affffb9 bne 555c <rtems_aio_handle+0x1c> <== NOT EXECUTED
{
clock_gettime (CLOCK_REALTIME, &timeout);
5674: e1a01007 mov r1, r7 <== NOT EXECUTED
5678: e3a00001 mov r0, #1 <== NOT EXECUTED
567c: eb000126 bl 5b1c <clock_gettime> <== NOT EXECUTED
timeout.tv_sec += 3;
5680: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
5684: e2845020 add r5, r4, #32 <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
5688: e2833003 add r3, r3, #3 <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
568c: e1a00005 mov r0, r5 <== NOT EXECUTED
5690: e59f10fc ldr r1, [pc, #252] ; 5794 <rtems_aio_handle+0x254><== NOT EXECUTED
5694: e1a02007 mov r2, r7 <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
5698: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
569c: e58d8024 str r8, [sp, #36] ; 0x24 <== NOT EXECUTED
result = pthread_cond_timedwait (&r_chain->cond,
56a0: eb0001b2 bl 5d70 <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) {
56a4: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED
56a8: 1affffab bne 555c <rtems_aio_handle+0x1c> <== NOT EXECUTED
56ac: e2840008 add r0, r4, #8 <== NOT EXECUTED
56b0: eb0008b3 bl 7984 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
56b4: e1a0000a mov r0, sl <== NOT EXECUTED
56b8: eb000201 bl 5ec4 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_cond_destroy (&r_chain->cond);
56bc: e1a00005 mov r0, r5 <== NOT EXECUTED
56c0: eb000133 bl 5b94 <pthread_cond_destroy> <== NOT EXECUTED
free (r_chain);
56c4: e1a00004 mov r0, r4 <== NOT EXECUTED
56c8: ebfff37b bl 24bc <free> <== NOT EXECUTED
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
56cc: e5963054 ldr r3, [r6, #84] ; 0x54 <== NOT EXECUTED
56d0: e153000b cmp r3, fp <== NOT EXECUTED
56d4: 1a000028 bne 577c <rtems_aio_handle+0x23c> <== NOT EXECUTED
++aio_request_queue.idle_threads;
56d8: e5963068 ldr r3, [r6, #104] ; 0x68 <== NOT EXECUTED
clock_gettime (CLOCK_REALTIME, &timeout);
56dc: e1a01007 mov r1, r7 <== NOT EXECUTED
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
56e0: e2833001 add r3, r3, #1 <== NOT EXECUTED
clock_gettime (CLOCK_REALTIME, &timeout);
56e4: e3a00001 mov r0, #1 <== NOT EXECUTED
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
56e8: e5863068 str r3, [r6, #104] ; 0x68 <== NOT EXECUTED
clock_gettime (CLOCK_REALTIME, &timeout);
56ec: eb00010a bl 5b1c <clock_gettime> <== NOT EXECUTED
timeout.tv_sec += 3;
56f0: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
56f4: e59f009c ldr r0, [pc, #156] ; 5798 <rtems_aio_handle+0x258><== NOT EXECUTED
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
56f8: e2833003 add r3, r3, #3 <== NOT EXECUTED
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
56fc: e59f1090 ldr r1, [pc, #144] ; 5794 <rtems_aio_handle+0x254><== NOT EXECUTED
5700: e1a02007 mov r2, r7 <== NOT EXECUTED
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
5704: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
timeout.tv_nsec = 0;
5708: e58d8024 str r8, [sp, #36] ; 0x24 <== NOT EXECUTED
result = pthread_cond_timedwait (&aio_request_queue.new_req,
570c: eb000197 bl 5d70 <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) {
5710: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED
5714: 1a000002 bne 5724 <rtems_aio_handle+0x1e4> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
5718: e59f0074 ldr r0, [pc, #116] ; 5794 <rtems_aio_handle+0x254><== NOT EXECUTED
571c: eb0002a5 bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
return NULL;
5720: ea000018 b 5788 <rtems_aio_handle+0x248> <== NOT EXECUTED
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
--aio_request_queue.idle_threads;
node = aio_request_queue.idle_req.first;
5724: e5965054 ldr r5, [r6, #84] ; 0x54 <== NOT EXECUTED
return NULL;
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
--aio_request_queue.idle_threads;
5728: e5963068 ldr r3, [r6, #104] ; 0x68 <== NOT EXECUTED
572c: e1a00005 mov r0, r5 <== NOT EXECUTED
5730: e2433001 sub r3, r3, #1 <== NOT EXECUTED
5734: e5863068 str r3, [r6, #104] ; 0x68 <== NOT EXECUTED
5738: eb000891 bl 7984 <_Chain_Extract> <== NOT EXECUTED
node = aio_request_queue.idle_req.first;
rtems_chain_extract (node);
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
573c: e3a02001 mov r2, #1 <== NOT EXECUTED
5740: e4951010 ldr r1, [r5], #16 <== NOT EXECUTED
5744: e59f0050 ldr r0, [pc, #80] ; 579c <rtems_aio_handle+0x25c> <== NOT EXECUTED
5748: ebffff54 bl 54a0 <rtems_aio_search_fd> <== NOT EXECUTED
((rtems_aio_request_chain *)node)->fildes,
1);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
574c: e1a01008 mov r1, r8 <== NOT EXECUTED
/* Otherwise move this chain to the working chain and
start the loop all over again */
--aio_request_queue.idle_threads;
node = aio_request_queue.idle_req.first;
rtems_chain_extract (node);
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
5750: e1a04000 mov r4, r0 <== NOT EXECUTED
((rtems_aio_request_chain *)node)->fildes,
1);
r_chain->new_fd = 0;
5754: e5808004 str r8, [r0, #4] <== NOT EXECUTED
pthread_mutex_init (&r_chain->mutex, NULL);
5758: e280001c add r0, r0, #28 <== NOT EXECUTED
575c: eb000224 bl 5ff4 <pthread_mutex_init> <== NOT EXECUTED
pthread_cond_init (&r_chain->cond, NULL);
5760: e1a01008 mov r1, r8 <== NOT EXECUTED
5764: e2840020 add r0, r4, #32 <== NOT EXECUTED
5768: eb000139 bl 5c54 <pthread_cond_init> <== NOT EXECUTED
r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd;
576c: e8950007 ldm r5, {r0, r1, r2} <== NOT EXECUTED
5770: e2843010 add r3, r4, #16 <== NOT EXECUTED
5774: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED
5778: eaffff77 b 555c <rtems_aio_handle+0x1c> <== NOT EXECUTED
}
else
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
577c: e59f0010 ldr r0, [pc, #16] ; 5794 <rtems_aio_handle+0x254> <== NOT EXECUTED
5780: eb00028c bl 61b8 <pthread_mutex_unlock> <== NOT EXECUTED
5784: eaffff74 b 555c <rtems_aio_handle+0x1c> <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
5788: e3a00000 mov r0, #0 <== NOT EXECUTED
578c: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED
5790: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000053e0 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
53e0: e92d4010 push {r4, lr} <== NOT EXECUTED
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
53e4: e59f00a4 ldr r0, [pc, #164] ; 5490 <rtems_aio_init+0xb0> <== NOT EXECUTED
53e8: eb0003b4 bl 62c0 <pthread_attr_init> <== NOT EXECUTED
if (result != 0)
53ec: e2504000 subs r4, r0, #0 <== NOT EXECUTED
53f0: 1a000024 bne 5488 <rtems_aio_init+0xa8> <== NOT EXECUTED
return result;
result =
53f4: e59f0094 ldr r0, [pc, #148] ; 5490 <rtems_aio_init+0xb0> <== NOT EXECUTED
53f8: e1a01004 mov r1, r4 <== NOT EXECUTED
53fc: eb0003c1 bl 6308 <pthread_attr_setdetachstate> <== NOT EXECUTED
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
5400: e3500000 cmp r0, #0 <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
5404: 159f0084 ldrne r0, [pc, #132] ; 5490 <rtems_aio_init+0xb0> <== NOT EXECUTED
5408: 1b0003a3 blne 629c <pthread_attr_destroy> <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
540c: e59f0080 ldr r0, [pc, #128] ; 5494 <rtems_aio_init+0xb4> <== NOT EXECUTED
5410: e3a01000 mov r1, #0 <== NOT EXECUTED
5414: eb0002f6 bl 5ff4 <pthread_mutex_init> <== NOT EXECUTED
if (result != 0)
5418: e3500000 cmp r0, #0 <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
541c: 159f006c ldrne r0, [pc, #108] ; 5490 <rtems_aio_init+0xb0> <== NOT EXECUTED
5420: 1b00039d blne 629c <pthread_attr_destroy> <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
5424: e59f006c ldr r0, [pc, #108] ; 5498 <rtems_aio_init+0xb8> <== NOT EXECUTED
5428: e3a01000 mov r1, #0 <== NOT EXECUTED
542c: eb000208 bl 5c54 <pthread_cond_init> <== NOT EXECUTED
if (result != 0) {
5430: e2504000 subs r4, r0, #0 <== NOT EXECUTED
5434: 0a000003 beq 5448 <rtems_aio_init+0x68> <== NOT EXECUTED
pthread_mutex_destroy (&aio_request_queue.mutex);
5438: e59f0054 ldr r0, [pc, #84] ; 5494 <rtems_aio_init+0xb4> <== NOT EXECUTED
543c: eb0002a0 bl 5ec4 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
5440: e59f0048 ldr r0, [pc, #72] ; 5490 <rtems_aio_init+0xb0> <== NOT EXECUTED
5444: eb000394 bl 629c <pthread_attr_destroy> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
5448: e59f3044 ldr r3, [pc, #68] ; 5494 <rtems_aio_init+0xb4> <== NOT EXECUTED
544c: e283204c add r2, r3, #76 ; 0x4c <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
5450: e2831048 add r1, r3, #72 ; 0x48 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
5454: e5832048 str r2, [r3, #72] ; 0x48 <== NOT EXECUTED
the_chain->permanent_null = NULL;
5458: e3a02000 mov r2, #0 <== NOT EXECUTED
545c: e583204c str r2, [r3, #76] ; 0x4c <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
5460: e5831050 str r1, [r3, #80] ; 0x50 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
5464: e5832058 str r2, [r3, #88] ; 0x58 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
5468: e2831058 add r1, r3, #88 ; 0x58 <== NOT EXECUTED
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
546c: e5832064 str r2, [r3, #100] ; 0x64 <== NOT EXECUTED
aio_request_queue.idle_threads = 0;
5470: e5832068 str r2, [r3, #104] ; 0x68 <== NOT EXECUTED
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
5474: e59f2020 ldr r2, [pc, #32] ; 549c <rtems_aio_init+0xbc> <== NOT EXECUTED
5478: e5831054 str r1, [r3, #84] ; 0x54 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
547c: e2831054 add r1, r3, #84 ; 0x54 <== NOT EXECUTED
5480: e583105c str r1, [r3, #92] ; 0x5c <== NOT EXECUTED
5484: e5832060 str r2, [r3, #96] ; 0x60 <== NOT EXECUTED
return result;
}
5488: e1a00004 mov r0, r4 <== NOT EXECUTED
548c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000057a0 <rtems_aio_insert_prio>:
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = chain->first;
57a0: e1a02000 mov r2, r0 <== NOT EXECUTED
57a4: e4923004 ldr r3, [r2], #4 <== NOT EXECUTED
if (rtems_chain_is_empty (chain)) {
57a8: e1530002 cmp r3, r2 <== NOT EXECUTED
57ac: 0a00000c beq 57e4 <rtems_aio_insert_prio+0x44> <== NOT EXECUTED
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;
57b0: e5930014 ldr r0, [r3, #20] <== NOT EXECUTED
while (req->aiocbp->aio_reqprio > prio &&
57b4: e591c014 ldr ip, [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;
57b8: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED
while (req->aiocbp->aio_reqprio > prio &&
57bc: e59cc014 ldr ip, [ip, #20] <== NOT EXECUTED
57c0: ea000002 b 57d0 <rtems_aio_insert_prio+0x30> <== NOT EXECUTED
!rtems_chain_is_tail (chain, node)) {
node = node->next;
57c4: e5933000 ldr r3, [r3] <== NOT EXECUTED
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
57c8: e5930014 ldr r0, [r3, #20] <== NOT EXECUTED
57cc: e5900014 ldr r0, [r0, #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 &&
57d0: e15c0000 cmp ip, r0 <== NOT EXECUTED
57d4: da000001 ble 57e0 <rtems_aio_insert_prio+0x40> <== NOT EXECUTED
57d8: e1530002 cmp r3, r2 <== NOT EXECUTED
57dc: 1afffff8 bne 57c4 <rtems_aio_insert_prio+0x24> <== 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 );
57e0: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
57e4: e2811008 add r1, r1, #8 <== NOT EXECUTED
57e8: ea00087a b 79d8 <_Chain_Insert> <== NOT EXECUTED
000057ec <rtems_aio_remove_fd>:
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
57ec: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = chain->first;
57f0: e5904010 ldr r4, [r0, #16] <== NOT EXECUTED
57f4: e2807014 add r7, r0, #20 <== NOT EXECUTED
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
req->aiocbp->error_code = ECANCELED;
57f8: e3a0608c mov r6, #140 ; 0x8c <== NOT EXECUTED
req->aiocbp->return_value = -1;
57fc: e3e05000 mvn r5, #0 <== NOT EXECUTED
rtems_chain_node *node;
chain = &r_chain->perfd;
node = chain->first;
while (!rtems_chain_is_tail (chain, node))
5800: ea000006 b 5820 <rtems_aio_remove_fd+0x34> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
5804: e1a00004 mov r0, r4 <== NOT EXECUTED
5808: eb00085d bl 7984 <_Chain_Extract> <== NOT EXECUTED
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
req->aiocbp->error_code = ECANCELED;
580c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
req->aiocbp->return_value = -1;
free (req);
5810: 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;
req->aiocbp->error_code = ECANCELED;
5814: e5836030 str r6, [r3, #48] ; 0x30 <== NOT EXECUTED
req->aiocbp->return_value = -1;
5818: e5835034 str r5, [r3, #52] ; 0x34 <== NOT EXECUTED
free (req);
581c: ebfff326 bl 24bc <free> <== NOT EXECUTED
rtems_chain_node *node;
chain = &r_chain->perfd;
node = chain->first;
while (!rtems_chain_is_tail (chain, node))
5820: e1540007 cmp r4, r7 <== NOT EXECUTED
5824: 1afffff6 bne 5804 <rtems_aio_remove_fd+0x18> <== NOT EXECUTED
rtems_aio_request *req = (rtems_aio_request *) node;
req->aiocbp->error_code = ECANCELED;
req->aiocbp->return_value = -1;
free (req);
}
}
5828: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0000582c <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)
{
582c: e92d4010 push {r4, lr} <== NOT EXECUTED
rtems_chain_node *node = chain->first;
5830: e4904004 ldr r4, [r0], #4 <== NOT EXECUTED
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
5834: ea000000 b 583c <rtems_aio_remove_req+0x10> <== NOT EXECUTED
node = node->next;
5838: e5944000 ldr r4, [r4] <== NOT EXECUTED
rtems_chain_node *node = chain->first;
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
583c: e1540000 cmp r4, r0 <== NOT EXECUTED
5840: 0a00000d beq 587c <rtems_aio_remove_req+0x50> <== NOT EXECUTED
5844: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
5848: e1530001 cmp r3, r1 <== NOT EXECUTED
584c: 1afffff9 bne 5838 <rtems_aio_remove_req+0xc> <== NOT EXECUTED
5850: e1a00004 mov r0, r4 <== NOT EXECUTED
5854: eb00084a bl 7984 <_Chain_Extract> <== NOT EXECUTED
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
5858: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
585c: e3a0208c mov r2, #140 ; 0x8c <== NOT EXECUTED
5860: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED
current->aiocbp->return_value = -1;
5864: e3e02000 mvn r2, #0 <== NOT EXECUTED
free (current);
5868: e1a00004 mov r0, r4 <== NOT EXECUTED
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
current->aiocbp->return_value = -1;
586c: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED
free (current);
5870: ebfff311 bl 24bc <free> <== NOT EXECUTED
}
return AIO_CANCELED;
5874: e3a00000 mov r0, #0 <== NOT EXECUTED
5878: e8bd8010 pop {r4, pc} <== NOT EXECUTED
node = node->next;
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
587c: e3a00001 mov r0, #1 <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
5880: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000054a0 <rtems_aio_search_fd>:
rtems_aio_search_fd (rtems_chain_control *chain, int fildes, int create)
{
rtems_aio_request_chain *r_chain;
rtems_chain_node *node;
node = chain->first;
54a0: e1a03000 mov r3, r0
*
*/
rtems_aio_request_chain *
rtems_aio_search_fd (rtems_chain_control *chain, int fildes, int create)
{
54a4: e92d40f0 push {r4, r5, r6, r7, lr}
54a8: e1a04000 mov r4, r0
rtems_aio_request_chain *r_chain;
rtems_chain_node *node;
node = chain->first;
54ac: e4937004 ldr r7, [r3], #4
54b0: ea000000 b 54b8 <rtems_aio_search_fd+0x18>
r_chain = (rtems_aio_request_chain *) node;
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
node = node->next;
54b4: e1a07000 mov r7, r0
rtems_chain_node *node;
node = chain->first;
r_chain = (rtems_aio_request_chain *) node;
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
54b8: e5970000 ldr r0, [r7]
54bc: e1500001 cmp r0, r1
node = node->next;
r_chain = (rtems_aio_request_chain *) node;
54c0: e1a06007 mov r6, r7
rtems_chain_node *node;
node = chain->first;
r_chain = (rtems_aio_request_chain *) node;
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
54c4: ba000003 blt 54d8 <rtems_aio_search_fd+0x38>
node = node->next;
r_chain = (rtems_aio_request_chain *) node;
}
if (r_chain->fildes == fildes)
r_chain->new_fd = 0;
54c8: 03a03000 moveq r3, #0
54cc: 05873004 streq r3, [r7, #4]
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
node = node->next;
r_chain = (rtems_aio_request_chain *) node;
}
if (r_chain->fildes == fildes)
54d0: 0a000018 beq 5538 <rtems_aio_search_fd+0x98>
54d4: ea000001 b 54e0 <rtems_aio_search_fd+0x40>
rtems_chain_node *node;
node = chain->first;
r_chain = (rtems_aio_request_chain *) node;
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
54d8: e1570003 cmp r7, r3
54dc: 1afffff4 bne 54b4 <rtems_aio_search_fd+0x14>
}
if (r_chain->fildes == fildes)
r_chain->new_fd = 0;
else {
if (create == 0)
54e0: e3520000 cmp r2, #0
r_chain = NULL;
54e4: 01a06002 moveq r6, r2
}
if (r_chain->fildes == fildes)
r_chain->new_fd = 0;
else {
if (create == 0)
54e8: 0a000012 beq 5538 <rtems_aio_search_fd+0x98>
r_chain = NULL;
else {
r_chain = malloc (sizeof (rtems_aio_request_chain));
54ec: e3a00024 mov r0, #36 ; 0x24 <== NOT EXECUTED
54f0: ebfff4fe bl 28f0 <malloc> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
54f4: e2803014 add r3, r0, #20 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
54f8: e5803010 str r3, [r0, #16] <== NOT EXECUTED
the_chain->permanent_null = NULL;
54fc: e3a03000 mov r3, #0 <== NOT EXECUTED
5500: e5803014 str r3, [r0, #20] <== NOT EXECUTED
rtems_chain_initialize_empty (&r_chain->perfd);
if (rtems_chain_is_empty (chain))
5504: e5942000 ldr r2, [r4] <== NOT EXECUTED
else {
if (create == 0)
r_chain = NULL;
else {
r_chain = malloc (sizeof (rtems_aio_request_chain));
rtems_chain_initialize_empty (&r_chain->perfd);
5508: e2803010 add r3, r0, #16 <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
550c: e5803018 str r3, [r0, #24] <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5510: e2843004 add r3, r4, #4 <== NOT EXECUTED
if (rtems_chain_is_empty (chain))
5514: e1520003 cmp r2, r3 <== NOT EXECUTED
r_chain->new_fd = 0;
else {
if (create == 0)
r_chain = NULL;
else {
r_chain = malloc (sizeof (rtems_aio_request_chain));
5518: e1a05000 mov r5, r0 <== NOT EXECUTED
551c: e1a06000 mov r6, r0 <== NOT EXECUTED
5520: e2801008 add r1, r0, #8 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
5524: 01a00004 moveq r0, r4 <== 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 );
5528: 15970004 ldrne r0, [r7, #4] <== NOT EXECUTED
552c: eb000929 bl 79d8 <_Chain_Insert> <== NOT EXECUTED
if (rtems_chain_is_empty (chain))
rtems_chain_prepend (chain, &r_chain->next_fd);
else
rtems_chain_insert (node->previous, &r_chain->next_fd);
r_chain->new_fd = 1;
5530: e3a03001 mov r3, #1 <== NOT EXECUTED
5534: e5853004 str r3, [r5, #4] <== NOT EXECUTED
}
}
return r_chain;
}
5538: e1a00006 mov r0, r6
553c: e8bd80f0 pop {r4, r5, r6, r7, pc}
0000c4c4 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
c4c4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
c4c8: e252a000 subs sl, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
c4cc: e1a04000 mov r4, r0
c4d0: e1a05001 mov r5, r1
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
c4d4: 03a00009 moveq r0, #9
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
c4d8: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
c4dc: e59f313c ldr r3, [pc, #316] ; c620 <rtems_task_mode+0x15c>
c4e0: e5937004 ldr r7, [r3, #4]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
c4e4: e5d78074 ldrb r8, [r7, #116] ; 0x74
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
c4e8: e5976104 ldr r6, [r7, #260] ; 0x104
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
c4ec: e597307c ldr r3, [r7, #124] ; 0x7c
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
c4f0: e3580000 cmp r8, #0
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;
c4f4: e5d69008 ldrb r9, [r6, #8]
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
c4f8: 03a08c01 moveq r8, #256 ; 0x100
c4fc: 13a08000 movne r8, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
c500: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
c504: 13888c02 orrne r8, r8, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
c508: e3590000 cmp r9, #0
c50c: 03a09b01 moveq r9, #1024 ; 0x400
c510: 13a09000 movne r9, #0
old_mode |= _ISR_Get_level();
c514: ebffeff9 bl 8500 <_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;
c518: e1899000 orr r9, r9, r0
old_mode |= _ISR_Get_level();
c51c: e1898008 orr r8, r9, r8
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
c520: e3150c01 tst r5, #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;
c524: e58a8000 str r8, [sl]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
c528: 0a000003 beq c53c <rtems_task_mode+0x78>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
c52c: e3140c01 tst r4, #256 ; 0x100
c530: 13a03000 movne r3, #0
c534: 03a03001 moveq r3, #1
c538: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
c53c: e3150c02 tst r5, #512 ; 0x200
c540: 0a000006 beq c560 <rtems_task_mode+0x9c>
if ( _Modes_Is_timeslice(mode_set) ) {
c544: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
c548: 13a03001 movne r3, #1
c54c: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
c550: 159f30cc ldrne r3, [pc, #204] ; c624 <rtems_task_mode+0x160>
c554: 15933000 ldrne r3, [r3]
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
c558: 0587307c streq r3, [r7, #124] ; 0x7c
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
c55c: 15873078 strne r3, [r7, #120] ; 0x78
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
c560: e3150080 tst r5, #128 ; 0x80
c564: 0a000001 beq c570 <rtems_task_mode+0xac>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
c568: e2040080 and r0, r4, #128 ; 0x80
c56c: ebffefde bl 84ec <_CPU_ISR_Set_level>
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
c570: e2150b01 ands r0, r5, #1024 ; 0x400
c574: 0a000013 beq c5c8 <rtems_task_mode+0x104>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
c578: e3140b01 tst r4, #1024 ; 0x400
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 ) {
c57c: e5d62008 ldrb r2, [r6, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
c580: 13a03000 movne r3, #0
c584: 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 ) {
c588: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
c58c: 03a00000 moveq r0, #0
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
c590: 0a00000c beq c5c8 <rtems_task_mode+0x104>
asr->is_enabled = is_asr_enabled;
c594: e5c63008 strb r3, [r6, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
c598: e10f3000 mrs r3, CPSR
c59c: e3832080 orr r2, r3, #128 ; 0x80
c5a0: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
c5a4: e2861014 add r1, r6, #20
c5a8: e8910006 ldm r1, {r1, r2}
information->signals_pending = information->signals_posted;
information->signals_posted = _signals;
c5ac: e5862014 str r2, [r6, #20]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
c5b0: e5861018 str r1, [r6, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
c5b4: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
c5b8: e5960014 ldr r0, [r6, #20]
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
c5bc: e3500000 cmp r0, #0
c5c0: 13a00001 movne r0, #1
c5c4: 03a00000 moveq r0, #0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
c5c8: e59f3058 ldr r3, [pc, #88] ; c628 <rtems_task_mode+0x164>
c5cc: e5933000 ldr r3, [r3]
c5d0: e3530003 cmp r3, #3
c5d4: 1a00000f bne c618 <rtems_task_mode+0x154>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
c5d8: e59f2040 ldr r2, [pc, #64] ; c620 <rtems_task_mode+0x15c>
if ( are_signals_pending ||
c5dc: e3500000 cmp r0, #0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
c5e0: e5923004 ldr r3, [r2, #4]
if ( are_signals_pending ||
c5e4: 1a000005 bne c600 <rtems_task_mode+0x13c>
c5e8: e5922008 ldr r2, [r2, #8]
c5ec: e1530002 cmp r3, r2
c5f0: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
c5f4: e5d33074 ldrb r3, [r3, #116] ; 0x74
c5f8: e3530000 cmp r3, #0
c5fc: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
_Thread_Dispatch_necessary = true;
c600: e59f3018 ldr r3, [pc, #24] ; c620 <rtems_task_mode+0x15c>
c604: e3a02001 mov r2, #1
c608: e5c32010 strb r2, [r3, #16]
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
c60c: ebffe9c2 bl 6d1c <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
c610: e3a00000 mov r0, #0
c614: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
c618: e3a00000 mov r0, #0 <== NOT EXECUTED
}
c61c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
00005734 <sigaction>:
struct sigaction *oact
)
{
ISR_Level level;
if ( oact )
5734: e2523000 subs r3, r2, #0
*oact = _POSIX_signals_Vectors[ sig ];
5738: 159f20b8 ldrne r2, [pc, #184] ; 57f8 <sigaction+0xc4>
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
573c: e92d40f0 push {r4, r5, r6, r7, lr}
5740: e1a05001 mov r5, r1
ISR_Level level;
if ( oact )
*oact = _POSIX_signals_Vectors[ sig ];
5744: 13a0100c movne r1, #12
5748: 10222091 mlane r2, r1, r0, r2
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
574c: e1a04000 mov r4, r0
ISR_Level level;
if ( oact )
*oact = _POSIX_signals_Vectors[ sig ];
5750: 18920007 ldmne r2, {r0, r1, r2}
5754: 18830007 stmne r3, {r0, r1, r2}
if ( !sig )
5758: e3540000 cmp r4, #0
575c: 0a000004 beq 5774 <sigaction+0x40>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
5760: e2443001 sub r3, r4, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
5764: e353001f cmp r3, #31
5768: 8a000001 bhi 5774 <sigaction+0x40>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
576c: e3540009 cmp r4, #9
5770: 1a000004 bne 5788 <sigaction+0x54>
rtems_set_errno_and_return_minus_one( EINVAL );
5774: eb002104 bl db8c <__errno>
5778: e3a03016 mov r3, #22
577c: e5803000 str r3, [r0]
5780: e3e00000 mvn r0, #0
5784: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
5788: e3550000 cmp r5, #0
578c: 0a000017 beq 57f0 <sigaction+0xbc>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
5790: e10f6000 mrs r6, CPSR
5794: e3863080 orr r3, r6, #128 ; 0x80
5798: 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 ) {
579c: e5953008 ldr r3, [r5, #8]
57a0: e3530000 cmp r3, #0
57a4: e59f704c ldr r7, [pc, #76] ; 57f8 <sigaction+0xc4>
57a8: 1a000007 bne 57cc <sigaction+0x98>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
57ac: e283300c add r3, r3, #12
57b0: e0040493 mul r4, r3, r4
57b4: e59f2040 ldr r2, [pc, #64] ; 57fc <sigaction+0xc8>
57b8: e0873004 add r3, r7, r4
57bc: e0824004 add r4, r2, r4
57c0: e8940007 ldm r4, {r0, r1, r2}
57c4: e8830007 stm r3, {r0, r1, r2}
57c8: ea000005 b 57e4 <sigaction+0xb0>
} else {
_POSIX_signals_Clear_process_signals( sig );
57cc: e1a00004 mov r0, r4
57d0: eb001575 bl adac <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
57d4: e3a0300c mov r3, #12
57d8: e0247493 mla r4, r3, r4, r7
57dc: e8950007 ldm r5, {r0, r1, r2}
57e0: e8840007 stm r4, {r0, r1, r2}
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
57e4: 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;
57e8: e3a00000 mov r0, #0
57ec: e8bd80f0 pop {r4, r5, r6, r7, pc}
57f0: e1a00005 mov r0, r5 <== NOT EXECUTED
}
57f4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00007dac <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
7dac: e92d4010 push {r4, lr}
7db0: e1a04001 mov r4, r1
int status;
status = sigtimedwait( set, NULL, NULL );
7db4: e3a01000 mov r1, #0
7db8: e1a02001 mov r2, r1
7dbc: ebffff84 bl 7bd4 <sigtimedwait>
if ( status != -1 ) {
7dc0: e3700001 cmn r0, #1
7dc4: 0a000004 beq 7ddc <sigwait+0x30>
if ( sig )
7dc8: e3540000 cmp r4, #0
*sig = status;
7dcc: 15840000 strne r0, [r4]
return 0;
7dd0: 13a00000 movne r0, #0
int status;
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
7dd4: 18bd8010 popne {r4, pc}
7dd8: ea000002 b 7de8 <sigwait+0x3c> <== NOT EXECUTED
*sig = status;
return 0;
}
return errno;
7ddc: eb002032 bl feac <__errno>
7de0: e5900000 ldr r0, [r0]
7de4: e8bd8010 pop {r4, pc}
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
7de8: e1a00004 mov r0, r4 <== NOT EXECUTED
}
return errno;
}
7dec: e8bd8010 pop {r4, pc} <== NOT EXECUTED