a0014670 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a0014670: 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 ) { a0014674: 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 ) { a0014678: 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 ) { a001467c: e1a06000 mov r6, r0 a0014680: e1a07002 mov r7, r2 a0014684: e1a0a001 mov sl, r1 a0014688: 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 ) { a001468c: 9a000001 bls a0014698 <_CORE_message_queue_Broadcast+0x28> a0014690: e3a00001 mov r0, #1 <== NOT EXECUTED a0014694: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED * 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 ) { a0014698: e5905048 ldr r5, [r0, #72] ; 0x48 a001469c: e3550000 cmp r5, #0 a00146a0: 0a000009 beq a00146cc <_CORE_message_queue_Broadcast+0x5c> *count = 0; a00146a4: e3a00000 mov r0, #0 a00146a8: e5880000 str r0, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a00146ac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); a00146b0: e594002c ldr r0, [r4, #44] ; 0x2c a00146b4: e1a0100a mov r1, sl a00146b8: e1a02007 mov r2, r7 a00146bc: eb0024f7 bl a001daa0 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a00146c0: e5943028 ldr r3, [r4, #40] ; 0x28 */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; a00146c4: e2855001 add r5, r5, #1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a00146c8: e5837000 str r7, [r3] * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { a00146cc: e1a00006 mov r0, r6 a00146d0: eb0009b9 bl a0016dbc <_Thread_queue_Dequeue> /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = a00146d4: e2504000 subs r4, r0, #0 a00146d8: 1afffff4 bne a00146b0 <_CORE_message_queue_Broadcast+0x40> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; a00146dc: e5885000 str r5, [r8] a00146e0: e1a00004 mov r0, r4 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } a00146e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} a000edd8 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { a000edd8: e92d41f0 push {r4, r5, r6, r7, r8, lr} a000eddc: e1a04000 mov r4, r0 Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; a000ede0: e594c018 ldr ip, [r4, #24] uintptr_t const heap_area_end = heap->area_end; a000ede4: e590001c ldr r0, [r0, #28] Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { a000ede8: e1a08003 mov r8, r3 uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; a000edec: e5946024 ldr r6, [r4, #36] ; 0x24 uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; a000edf0: e1510000 cmp r1, r0 a000edf4: 23a05000 movcs r5, #0 a000edf8: 33a05001 movcc r5, #1 a000edfc: e151000c cmp r1, ip a000ee00: 33a05000 movcc r5, #0 a000ee04: e3550000 cmp r5, #0 a000ee08: 0a000001 beq a000ee14 <_Heap_Extend+0x3c> a000ee0c: e3a00001 mov r0, #1 a000ee10: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { a000ee14: e1510000 cmp r1, r0 a000ee18: 0a000001 beq a000ee24 <_Heap_Extend+0x4c> a000ee1c: e3a00002 mov r0, #2 a000ee20: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end a000ee24: e3e07007 mvn r7, #7 { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; a000ee28: e0821001 add r1, r2, r1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end a000ee2c: e0667007 rsb r7, r6, r7 a000ee30: e0877001 add r7, r7, r1 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; a000ee34: e584101c str r1, [r4, #28] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000ee38: e1a00007 mov r0, r7 a000ee3c: e5941010 ldr r1, [r4, #16] a000ee40: ebffd058 bl a0002fa8 <__umodsi3> a000ee44: e0600007 rsb r0, r0, r7 extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; a000ee48: e5880000 str r0, [r8] if( extend_size >= heap->min_block_size ) { a000ee4c: e5943014 ldr r3, [r4, #20] a000ee50: e1500003 cmp r0, r3 a000ee54: 2a000001 bcs a000ee60 <_Heap_Extend+0x88> a000ee58: e1a00005 mov r0, r5 <== NOT EXECUTED a000ee5c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; a000ee60: e5961004 ldr r1, [r6, #4] Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = a000ee64: e5942020 ldr r2, [r4, #32] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000ee68: e0803006 add r3, r0, r6 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; a000ee6c: e2011001 and r1, r1, #1 a000ee70: e0632002 rsb r2, r3, r2 a000ee74: e1801001 orr r1, r0, r1 a000ee78: e3822001 orr r2, r2, #1 a000ee7c: e5861004 str r1, [r6, #4] a000ee80: e5832004 str r2, [r3, #4] | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; a000ee84: e594702c ldr r7, [r4, #44] ; 0x2c ++stats->used_blocks; a000ee88: e5941040 ldr r1, [r4, #64] ; 0x40 --stats->frees; /* Do not count subsequent call as actual free() */ a000ee8c: e5942050 ldr r2, [r4, #80] ; 0x50 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; a000ee90: e0870000 add r0, r7, r0 ++stats->used_blocks; a000ee94: e2811001 add r1, r1, #1 --stats->frees; /* Do not count subsequent call as actual free() */ a000ee98: e2422001 sub r2, r2, #1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; a000ee9c: e584002c str r0, [r4, #44] ; 0x2c ++stats->used_blocks; a000eea0: e5841040 str r1, [r4, #64] ; 0x40 new_last_block->size_and_flag = ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; a000eea4: e5843024 str r3, [r4, #36] ; 0x24 /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ a000eea8: e5842050 str r2, [r4, #80] ; 0x50 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); a000eeac: e1a00004 mov r0, r4 a000eeb0: e2861008 add r1, r6, #8 a000eeb4: ebffe9f0 bl a000967c <_Heap_Free> a000eeb8: e1a00005 mov r0, r5 } return HEAP_EXTEND_SUCCESSFUL; } a000eebc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} a0006004 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { a0006004: e92d40f0 push {r4, r5, r6, r7, lr} a0006008: e1a06000 mov r6, r0 a000600c: e1a05001 mov r5, r1 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a0006010: e1a00002 mov r0, r2 a0006014: e1d613ba ldrh r1, [r6, #58] ; 0x3a bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { a0006018: e1a07002 mov r7, r2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a000601c: eb00234e bl a000ed5c #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { a0006020: e5d63038 ldrb r3, [r6, #56] ; 0x38 { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a0006024: e1a04000 mov r4, r0 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { a0006028: e3530000 cmp r3, #0 a000602c: 0a000014 beq a0006084 <_Objects_Set_name+0x80> char *d; d = _Workspace_Allocate( length + 1 ); a0006030: e2800001 add r0, r0, #1 a0006034: eb000699 bl a0007aa0 <_Workspace_Allocate> if ( !d ) a0006038: e2506000 subs r6, r0, #0 a000603c: 1a000001 bne a0006048 <_Objects_Set_name+0x44> a0006040: e1a00006 mov r0, r6 <== NOT EXECUTED a0006044: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED return false; if ( the_object->name.name_p ) { a0006048: e595000c ldr r0, [r5, #12] a000604c: e3500000 cmp r0, #0 a0006050: 0a000002 beq a0006060 <_Objects_Set_name+0x5c> _Workspace_Free( (void *)the_object->name.name_p ); a0006054: eb000697 bl a0007ab8 <_Workspace_Free> the_object->name.name_p = NULL; a0006058: e3a03000 mov r3, #0 a000605c: e585300c str r3, [r5, #12] } strncpy( d, name, length ); a0006060: e1a01007 mov r1, r7 a0006064: e1a00006 mov r0, r6 a0006068: e1a02004 mov r2, r4 a000606c: eb002300 bl a000ec74 d[length] = '\0'; a0006070: e3a03000 mov r3, #0 a0006074: e7c63004 strb r3, [r6, r4] the_object->name.name_p = d; a0006078: e3a00001 mov r0, #1 a000607c: e585600c str r6, [r5, #12] a0006080: e8bd80f0 pop {r4, r5, r6, r7, pc} } else #endif { the_object->name.name_u32 = _Objects_Build_name( a0006084: e3500001 cmp r0, #1 a0006088: e5d70000 ldrb r0, [r7] a000608c: 9a00000e bls a00060cc <_Objects_Set_name+0xc8> a0006090: e5d71001 ldrb r1, [r7, #1] a0006094: e3540002 cmp r4, #2 a0006098: e1a01801 lsl r1, r1, #16 a000609c: 9a00000b bls a00060d0 <_Objects_Set_name+0xcc> a00060a0: e5d72002 ldrb r2, [r7, #2] a00060a4: e3540003 cmp r4, #3 a00060a8: 85d73003 ldrbhi r3, [r7, #3] a00060ac: e1a02402 lsl r2, r2, #8 a00060b0: 9a000007 bls a00060d4 <_Objects_Set_name+0xd0> a00060b4: e1811c00 orr r1, r1, r0, lsl #24 a00060b8: e1812002 orr r2, r1, r2 a00060bc: e1823003 orr r3, r2, r3 a00060c0: e585300c str r3, [r5, #12] a00060c4: e3a00001 mov r0, #1 ); } return true; } a00060c8: e8bd80f0 pop {r4, r5, r6, r7, pc} d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( a00060cc: e3a01602 mov r1, #2097152 ; 0x200000 a00060d0: e3a02a02 mov r2, #8192 ; 0x2000 a00060d4: e3a03020 mov r3, #32 a00060d8: eafffff5 b a00060b4 <_Objects_Set_name+0xb0> a00051c4 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { a00051c4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} a00051c8: e1a04001 mov r4, r1 a00051cc: e1a06000 mov r6, r0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { a00051d0: e1a0100d mov r1, sp a00051d4: e1a00004 mov r0, r4 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { a00051d8: e1a08002 mov r8, r2 a00051dc: e20370ff and r7, r3, #255 ; 0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { a00051e0: eb000071 bl a00053ac <_POSIX_Mutex_Get> a00051e4: e3500000 cmp r0, #0 a00051e8: 0a000032 beq a00052b8 <_POSIX_Condition_variables_Wait_support+0xf4> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; a00051ec: e59f30d0 ldr r3, [pc, #208] ; a00052c4 <_POSIX_Condition_variables_Wait_support+0x100> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); a00051f0: e1a0100d mov r1, sp a00051f4: e1a00006 mov r0, r6 a00051f8: e5932000 ldr r2, [r3] a00051fc: e2422001 sub r2, r2, #1 a0005200: e5832000 str r2, [r3] a0005204: ebffff7b bl a0004ff8 <_POSIX_Condition_variables_Get> switch ( location ) { a0005208: e59d3000 ldr r3, [sp] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); a000520c: e1a0a000 mov sl, r0 switch ( location ) { a0005210: e3530000 cmp r3, #0 a0005214: 1a000027 bne a00052b8 <_POSIX_Condition_variables_Wait_support+0xf4> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { a0005218: e5903014 ldr r3, [r0, #20] a000521c: e3530000 cmp r3, #0 a0005220: 0a000004 beq a0005238 <_POSIX_Condition_variables_Wait_support+0x74> a0005224: e5942000 ldr r2, [r4] a0005228: e1530002 cmp r3, r2 a000522c: 0a000001 beq a0005238 <_POSIX_Condition_variables_Wait_support+0x74> _Thread_Enable_dispatch(); a0005230: eb000bc3 bl a0008144 <_Thread_Enable_dispatch> a0005234: ea00001f b a00052b8 <_POSIX_Condition_variables_Wait_support+0xf4> return EINVAL; } (void) pthread_mutex_unlock( mutex ); a0005238: e1a00004 mov r0, r4 a000523c: eb0000e3 bl a00055d0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { a0005240: e3570000 cmp r7, #0 a0005244: 1a000015 bne a00052a0 <_POSIX_Condition_variables_Wait_support+0xdc> the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; a0005248: e59f5078 ldr r5, [pc, #120] ; a00052c8 <_POSIX_Condition_variables_Wait_support+0x104> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; a000524c: e5941000 ldr r1, [r4] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; a0005250: e28a2018 add r2, sl, #24 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; a0005254: e5953000 ldr r3, [r5] return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; a0005258: e58a1014 str r1, [sl, #20] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a000525c: e3a00001 mov r0, #1 _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; a0005260: e5837034 str r7, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; a0005264: e5961000 ldr r1, [r6] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; a0005268: e5832044 str r2, [r3, #68] ; 0x44 a000526c: e58a0048 str r0, [sl, #72] ; 0x48 _Thread_Executing->Wait.id = *cond; a0005270: e5831020 str r1, [r3, #32] _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); a0005274: e1a00002 mov r0, r2 a0005278: e1a01008 mov r1, r8 a000527c: e59f2048 ldr r2, [pc, #72] ; a00052cc <_POSIX_Condition_variables_Wait_support+0x108> a0005280: eb000ceb bl a0008634 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); a0005284: eb000bae bl a0008144 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; a0005288: e5953000 ldr r3, [r5] a000528c: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) a0005290: e3550074 cmp r5, #116 ; 0x74 a0005294: 13550000 cmpne r5, #0 a0005298: 0a000002 beq a00052a8 <_POSIX_Condition_variables_Wait_support+0xe4> a000529c: ea000006 b a00052bc <_POSIX_Condition_variables_Wait_support+0xf8> <== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); a00052a0: eb000ba7 bl a0008144 <_Thread_Enable_dispatch> a00052a4: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); a00052a8: e1a00004 mov r0, r4 a00052ac: eb0000a8 bl a0005554 if ( mutex_status ) a00052b0: e3500000 cmp r0, #0 a00052b4: 0a000000 beq a00052bc <_POSIX_Condition_variables_Wait_support+0xf8> a00052b8: e3a05016 mov r5, #22 case OBJECTS_ERROR: break; } return EINVAL; } a00052bc: e1a00005 mov r0, r5 a00052c0: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} a00052c4: a001c68c .word 0xa001c68c a00052c8: a001c740 .word 0xa001c740 a00052cc: a00089e0 .word 0xa00089e0 a00065ec <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; a00065ec: e5913014 ldr r3, [r1, #20] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { a00065f0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a00065f4: e281503c add r5, r1, #60 ; 0x3c a00065f8: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; a00065fc: e3a05000 mov r5, #0 the_chain->last = _Chain_Head(the_chain); a0006600: e281c038 add ip, r1, #56 ; 0x38 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) a0006604: e3130020 tst r3, #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 ]; a0006608: e1a04323 lsr r4, r3, #6 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; a000660c: e581503c str r5, [r1, #60] ; 0x3c a0006610: e285500c add r5, r5, #12 the_chain->last = _Chain_Head(the_chain); a0006614: e581c040 str ip, [r1, #64] ; 0x40 block_state = the_thread_queue->state; a0006618: e5907038 ldr r7, [r0, #56] ; 0x38 _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 ]; a000661c: e02c0495 mla ip, r5, r4, r0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; a0006620: 159f8158 ldrne r8, [pc, #344] ; a0006780 <_Thread_queue_Enqueue_priority+0x194> 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 ) ) a0006624: 1a000023 bne a00066b8 <_Thread_queue_Enqueue_priority+0xcc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0006628: e28c8004 add r8, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000662c: e10f5000 mrs r5, CPSR a0006630: e3854080 orr r4, r5, #128 ; 0x80 a0006634: e129f004 msr CPSR_fc, r4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; a0006638: e3e06000 mvn r6, #0 a000663c: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { a0006640: ea00000b b a0006674 <_Thread_queue_Enqueue_priority+0x88> search_priority = search_thread->current_priority; a0006644: e5946014 ldr r6, [r4, #20] if ( priority <= search_priority ) a0006648: e1530006 cmp r3, r6 a000664c: 9a00000a bls a000667c <_Thread_queue_Enqueue_priority+0x90> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( a0006650: e10fa000 mrs sl, CPSR a0006654: e129f005 msr CPSR_fc, r5 a0006658: e129f00a msr CPSR_fc, sl 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) ) { a000665c: e594a010 ldr sl, [r4, #16] a0006660: e117000a tst r7, sl a0006664: 1a000001 bne a0006670 <_Thread_queue_Enqueue_priority+0x84> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0006668: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED a000666c: eaffffee b a000662c <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; a0006670: e5944000 ldr r4, [r4] 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 ) ) { a0006674: e1540008 cmp r4, r8 a0006678: 1afffff1 bne a0006644 <_Thread_queue_Enqueue_priority+0x58> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != a000667c: e5907030 ldr r7, [r0, #48] ; 0x30 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 ) ) { a0006680: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != a0006684: e3570001 cmp r7, #1 a0006688: 1a000039 bne a0006774 <_Thread_queue_Enqueue_priority+0x188> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) a000668c: e1530006 cmp r3, r6 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; a0006690: e3a03000 mov r3, #0 a0006694: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) a0006698: 0a00002b beq a000674c <_Thread_queue_Enqueue_priority+0x160> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; a000669c: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; a00066a0: e5814000 str r4, [r1] the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; a00066a4: e5810044 str r0, [r1, #68] ; 0x44 search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; a00066a8: e5813004 str r3, [r1, #4] previous_node->next = the_node; a00066ac: e5831000 str r1, [r3] search_node->previous = the_node; a00066b0: e5841004 str r1, [r4, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); a00066b4: ea000022 b a0006744 <_Thread_queue_Enqueue_priority+0x158> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; a00066b8: e5d86000 ldrb r6, [r8] a00066bc: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a00066c0: e10f5000 mrs r5, CPSR a00066c4: e3854080 orr r4, r5, #128 ; 0x80 a00066c8: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; a00066cc: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { a00066d0: ea00000b b a0006704 <_Thread_queue_Enqueue_priority+0x118> search_priority = search_thread->current_priority; a00066d4: e5946014 ldr r6, [r4, #20] if ( priority >= search_priority ) a00066d8: e1530006 cmp r3, r6 a00066dc: 2a00000a bcs a000670c <_Thread_queue_Enqueue_priority+0x120> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( a00066e0: e10fa000 mrs sl, CPSR a00066e4: e129f005 msr CPSR_fc, r5 a00066e8: e129f00a msr CPSR_fc, sl 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) ) { a00066ec: e594a010 ldr sl, [r4, #16] a00066f0: e117000a tst r7, sl a00066f4: 1a000001 bne a0006700 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a00066f8: e129f005 msr CPSR_fc, r5 a00066fc: eaffffed b a00066b8 <_Thread_queue_Enqueue_priority+0xcc> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) a0006700: e5944004 ldr r4, [r4, #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 ) ) { a0006704: e154000c cmp r4, ip a0006708: 1afffff1 bne a00066d4 <_Thread_queue_Enqueue_priority+0xe8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != a000670c: e5907030 ldr r7, [r0, #48] ; 0x30 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 ) ) { a0006710: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != a0006714: e3570001 cmp r7, #1 a0006718: 1a000015 bne a0006774 <_Thread_queue_Enqueue_priority+0x188> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) a000671c: e1530006 cmp r3, r6 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; a0006720: e3a03000 mov r3, #0 a0006724: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) a0006728: 0a000007 beq a000674c <_Thread_queue_Enqueue_priority+0x160> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; a000672c: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; a0006730: e5814004 str r4, [r1, #4] search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; a0006734: e5810044 str r0, [r1, #68] ; 0x44 search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; a0006738: e5813000 str r3, [r1] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; a000673c: e5831004 str r1, [r3, #4] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; a0006740: e5841000 str r1, [r4] a0006744: e129f005 msr CPSR_fc, r5 a0006748: ea000007 b a000676c <_Thread_queue_Enqueue_priority+0x180> a000674c: e284403c add r4, r4, #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; a0006750: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; a0006754: e5814000 str r4, [r1] the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; a0006758: e5810044 str r0, [r1, #68] ; 0x44 search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; a000675c: e5813004 str r3, [r1, #4] previous_node->next = the_node; a0006760: e5831000 str r1, [r3] search_node->previous = the_node; a0006764: e5841004 str r1, [r4, #4] a0006768: e129f00c msr CPSR_fc, ip a000676c: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a0006770: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; a0006774: e5900030 ldr r0, [r0, #48] ; 0x30 * 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; a0006778: e582c000 str ip, [r2] return the_thread_queue->sync_state; } a000677c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} a0006780: a00182f0 .word 0xa00182f0 a0013c40 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { a0013c40: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0013c44: e24dd020 sub sp, sp, #32 a0013c48: e28d3014 add r3, sp, #20 a0013c4c: e28d5008 add r5, sp, #8 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; a0013c50: e3a09000 mov r9, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0013c54: e283a004 add sl, r3, #4 a0013c58: e2858004 add r8, r5, #4 Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); a0013c5c: e58d301c str r3, [sp, #28] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); a0013c60: e2802008 add r2, r0, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); a0013c64: e2803040 add r3, r0, #64 ; 0x40 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { a0013c68: e1a04000 mov r4, r0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a0013c6c: e58da014 str sl, [sp, #20] the_chain->permanent_null = NULL; a0013c70: e58d9018 str r9, [sp, #24] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a0013c74: e58d8008 str r8, [sp, #8] the_chain->permanent_null = NULL; a0013c78: e58d900c str r9, [sp, #12] the_chain->last = _Chain_Head(the_chain); a0013c7c: e58d5010 str r5, [sp, #16] */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0013c80: e280b030 add fp, r0, #48 ; 0x30 /* * 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 ); a0013c84: e2807068 add r7, r0, #104 ; 0x68 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); a0013c88: e58d2004 str r2, [sp, #4] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); a0013c8c: e58d3000 str r3, [sp] { /* * 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; a0013c90: e28d2014 add r2, sp, #20 a0013c94: e5842078 str r2, [r4, #120] ; 0x78 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; a0013c98: e59f216c ldr r2, [pc, #364] ; a0013e0c <_Timer_server_Body+0x1cc> */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0013c9c: e1a0000b mov r0, fp static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; a0013ca0: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; a0013ca4: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0013ca8: e1a02005 mov r2, r5 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; a0013cac: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0013cb0: e0611003 rsb r1, r1, r3 a0013cb4: eb00106f bl a0017e78 <_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(); a0013cb8: e59f3150 ldr r3, [pc, #336] ; a0013e10 <_Timer_server_Body+0x1d0> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; a0013cbc: 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(); a0013cc0: 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 ) { a0013cc4: e1560002 cmp r6, r2 a0013cc8: 9a000004 bls a0013ce0 <_Timer_server_Body+0xa0> /* * 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 ); a0013ccc: e0621006 rsb r1, r2, r6 a0013cd0: e1a00007 mov r0, r7 a0013cd4: e1a02005 mov r2, r5 a0013cd8: eb001066 bl a0017e78 <_Watchdog_Adjust_to_chain> a0013cdc: ea000004 b a0013cf4 <_Timer_server_Body+0xb4> } else if ( snapshot < last_snapshot ) { a0013ce0: 2a000003 bcs a0013cf4 <_Timer_server_Body+0xb4> /* * 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 ); a0013ce4: e0662002 rsb r2, r6, r2 a0013ce8: e1a00007 mov r0, r7 a0013cec: e3a01001 mov r1, #1 a0013cf0: eb001038 bl a0017dd8 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; a0013cf4: 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 ); a0013cf8: e5940078 ldr r0, [r4, #120] ; 0x78 a0013cfc: eb00023f bl a0014600 <_Chain_Get> if ( timer == NULL ) { a0013d00: e2501000 subs r1, r0, #0 a0013d04: 0a00000a beq a0013d34 <_Timer_server_Body+0xf4> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { a0013d08: e5913038 ldr r3, [r1, #56] ; 0x38 a0013d0c: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); a0013d10: 02811010 addeq r1, r1, #16 a0013d14: 01a0000b moveq r0, fp static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { a0013d18: 0a000003 beq a0013d2c <_Timer_server_Body+0xec> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { a0013d1c: e3530003 cmp r3, #3 a0013d20: 1afffff4 bne a0013cf8 <_Timer_server_Body+0xb8> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); a0013d24: e2811010 add r1, r1, #16 a0013d28: e1a00007 mov r0, r7 a0013d2c: eb00107e bl a0017f2c <_Watchdog_Insert> a0013d30: eafffff0 b a0013cf8 <_Timer_server_Body+0xb8> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0013d34: e10f3000 mrs r3, CPSR a0013d38: e3832080 orr r2, r3, #128 ; 0x80 a0013d3c: e129f002 msr CPSR_fc, r2 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { a0013d40: e59d2014 ldr r2, [sp, #20] a0013d44: e152000a cmp r2, sl a0013d48: 1a000005 bne a0013d64 <_Timer_server_Body+0x124> ts->insert_chain = NULL; a0013d4c: e5841078 str r1, [r4, #120] ; 0x78 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0013d50: e129f003 msr CPSR_fc, r3 _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 ) ) { a0013d54: e59d3008 ldr r3, [sp, #8] a0013d58: e1530008 cmp r3, r8 a0013d5c: 1a000002 bne a0013d6c <_Timer_server_Body+0x12c> a0013d60: ea000015 b a0013dbc <_Timer_server_Body+0x17c> a0013d64: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED a0013d68: eaffffca b a0013c98 <_Timer_server_Body+0x58> <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0013d6c: e10f2000 mrs r2, CPSR a0013d70: e3823080 orr r3, r2, #128 ; 0x80 a0013d74: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a0013d78: e59d3008 ldr r3, [sp, #8] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) a0013d7c: e1530008 cmp r3, r8 a0013d80: 0a00000b beq a0013db4 <_Timer_server_Body+0x174> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; a0013d84: e5931000 ldr r1, [r3] * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { a0013d88: e3530000 cmp r3, #0 the_chain->first = new_first; a0013d8c: e58d1008 str r1, [sp, #8] new_first->previous = _Chain_Head(the_chain); a0013d90: e5815004 str r5, [r1, #4] a0013d94: 0a000006 beq a0013db4 <_Timer_server_Body+0x174> watchdog->state = WATCHDOG_INACTIVE; a0013d98: e5839008 str r9, [r3, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0013d9c: e129f002 msr CPSR_fc, r2 /* * 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 ); a0013da0: e5930020 ldr r0, [r3, #32] a0013da4: e5931024 ldr r1, [r3, #36] ; 0x24 a0013da8: e1a0e00f mov lr, pc a0013dac: e593f01c ldr pc, [r3, #28] } a0013db0: eaffffed b a0013d6c <_Timer_server_Body+0x12c> a0013db4: e129f002 msr CPSR_fc, r2 a0013db8: eaffffb4 b a0013c90 <_Timer_server_Body+0x50> a0013dbc: e59f3050 ldr r3, [pc, #80] ; a0013e14 <_Timer_server_Body+0x1d4> } else { ts->active = false; a0013dc0: e5c4907c strb r9, [r4, #124] ; 0x7c a0013dc4: e5932000 ldr r2, [r3] a0013dc8: e2822001 add r2, r2, #1 a0013dcc: e5832000 str r2, [r3] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); a0013dd0: e3a01008 mov r1, #8 a0013dd4: e5940000 ldr r0, [r4] a0013dd8: eb000d9e bl a0017458 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); a0013ddc: e1a00004 mov r0, r4 a0013de0: ebffff6a bl a0013b90 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); a0013de4: e1a00004 mov r0, r4 a0013de8: ebffff7e bl a0013be8 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); a0013dec: eb000af9 bl a00169d8 <_Thread_Enable_dispatch> ts->active = true; a0013df0: e3a03001 mov r3, #1 a0013df4: 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 ); a0013df8: e59d0004 ldr r0, [sp, #4] a0013dfc: eb0010a3 bl a0018090 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); a0013e00: e59d0000 ldr r0, [sp] a0013e04: eb0010a1 bl a0018090 <_Watchdog_Remove> a0013e08: eaffffa0 b a0013c90 <_Timer_server_Body+0x50> a0013e0c: a0039364 .word 0xa0039364 a0013e10: a0039294 .word 0xa0039294 a0013e14: a003920c .word 0xa003920c a0004a7c : struct sigaction *oact ) { ISR_Level level; if ( oact ) a0004a7c: e3520000 cmp r2, #0 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { a0004a80: e92d40f0 push {r4, r5, r6, r7, lr} a0004a84: e1a04000 mov r4, r0 a0004a88: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) a0004a8c: 0a00000a beq a0004abc *oact = _POSIX_signals_Vectors[ sig ]; a0004a90: e3a0300c mov r3, #12 a0004a94: e0010093 mul r1, r3, r0 a0004a98: e59f00e4 ldr r0, [pc, #228] ; a0004b84 a0004a9c: e1a03002 mov r3, r2 a0004aa0: e790c001 ldr ip, [r0, r1] a0004aa4: e0801001 add r1, r0, r1 a0004aa8: e483c004 str ip, [r3], #4 a0004aac: e5910004 ldr r0, [r1, #4] a0004ab0: e5820004 str r0, [r2, #4] a0004ab4: e5912008 ldr r2, [r1, #8] a0004ab8: e5832004 str r2, [r3, #4] if ( !sig ) a0004abc: e3540000 cmp r4, #0 a0004ac0: 0a000004 beq a0004ad8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) a0004ac4: e2443001 sub r3, r4, #1 a0004ac8: e353001f cmp r3, #31 a0004acc: 8a000001 bhi a0004ad8 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) a0004ad0: e3540009 cmp r4, #9 a0004ad4: 1a000004 bne a0004aec rtems_set_errno_and_return_minus_one( EINVAL ); a0004ad8: eb0023ba bl a000d9c8 <__errno> a0004adc: e3a03016 mov r3, #22 a0004ae0: e5803000 str r3, [r0] a0004ae4: e3e00000 mvn r0, #0 a0004ae8: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { a0004aec: e3550000 cmp r5, #0 a0004af0: 1a000001 bne a0004afc a0004af4: e1a00005 mov r0, r5 <== NOT EXECUTED a0004af8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0004afc: e10f7000 mrs r7, CPSR a0004b00: e3873080 orr r3, r7, #128 ; 0x80 a0004b04: 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 ) { a0004b08: e5953008 ldr r3, [r5, #8] a0004b0c: e59f6070 ldr r6, [pc, #112] ; a0004b84 a0004b10: e3530000 cmp r3, #0 a0004b14: 1a00000b bne a0004b48 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; a0004b18: e3a0200c mov r2, #12 a0004b1c: e0030492 mul r3, r2, r4 a0004b20: e59f0060 ldr r0, [pc, #96] ; a0004b88 a0004b24: e0862003 add r2, r6, r3 a0004b28: e0801003 add r1, r0, r3 a0004b2c: e790c003 ldr ip, [r0, r3] a0004b30: e5910008 ldr r0, [r1, #8] a0004b34: e5911004 ldr r1, [r1, #4] a0004b38: e786c003 str ip, [r6, r3] a0004b3c: e5820008 str r0, [r2, #8] a0004b40: e5821004 str r1, [r2, #4] a0004b44: ea00000b b a0004b78 } else { _POSIX_signals_Clear_process_signals( sig ); a0004b48: e1a00004 mov r0, r4 a0004b4c: eb0015d3 bl a000a2a0 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; a0004b50: e1a03005 mov r3, r5 a0004b54: e3a0200c mov r2, #12 a0004b58: e4930004 ldr r0, [r3], #4 a0004b5c: e0010492 mul r1, r2, r4 a0004b60: e7860001 str r0, [r6, r1] a0004b64: e0862001 add r2, r6, r1 a0004b68: e5951004 ldr r1, [r5, #4] a0004b6c: e5821004 str r1, [r2, #4] a0004b70: e5933004 ldr r3, [r3, #4] a0004b74: e5823008 str r3, [r2, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0004b78: e129f007 msr CPSR_fc, r7 a0004b7c: e3a00000 mov r0, #0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } a0004b80: e8bd80f0 pop {r4, r5, r6, r7, pc} a0004b84: a001c3b8 .word 0xa001c3b8 a0004b88: a001ad14 .word 0xa001ad14