a001537c <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a001537c: 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 ) { a0015380: 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 ) { a0015384: 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 ) { a0015388: e1a06000 mov r6, r0 a001538c: e1a07002 mov r7, r2 a0015390: e1a0a001 mov sl, r1 a0015394: 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 ) { a0015398: 9a000001 bls a00153a4 <_CORE_message_queue_Broadcast+0x28> a001539c: e3a00001 mov r0, #1 <== NOT EXECUTED a00153a0: 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 ) { a00153a4: e5905048 ldr r5, [r0, #72] ; 0x48 a00153a8: e3550000 cmp r5, #0 a00153ac: 0a000009 beq a00153d8 <_CORE_message_queue_Broadcast+0x5c> *count = 0; a00153b0: e3a00000 mov r0, #0 a00153b4: e5880000 str r0, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a00153b8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); a00153bc: e594002c ldr r0, [r4, #44] ; 0x2c a00153c0: e1a0100a mov r1, sl a00153c4: e1a02007 mov r2, r7 a00153c8: eb0023f4 bl a001e3a0 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a00153cc: 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; a00153d0: e2855001 add r5, r5, #1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a00153d4: 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))) { a00153d8: e1a00006 mov r0, r6 a00153dc: eb0009dd bl a0017b58 <_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 = a00153e0: e2504000 subs r4, r0, #0 a00153e4: 1afffff4 bne a00153bc <_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; a00153e8: e5885000 str r5, [r8] a00153ec: e1a00004 mov r0, r4 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } a00153f0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} a000f310 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { a000f310: e92d41f0 push {r4, r5, r6, r7, r8, lr} a000f314: 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; a000f318: e594c018 ldr ip, [r4, #24] uintptr_t const heap_area_end = heap->area_end; a000f31c: e590001c ldr r0, [r0, #28] Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { a000f320: 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; a000f324: 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; a000f328: e1510000 cmp r1, r0 a000f32c: 23a05000 movcs r5, #0 a000f330: 33a05001 movcc r5, #1 a000f334: e151000c cmp r1, ip a000f338: 33a05000 movcc r5, #0 a000f33c: e3550000 cmp r5, #0 a000f340: 0a000001 beq a000f34c <_Heap_Extend+0x3c> a000f344: e3a00001 mov r0, #1 a000f348: 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 ) { a000f34c: e1510000 cmp r1, r0 a000f350: 0a000001 beq a000f35c <_Heap_Extend+0x4c> a000f354: e3a00002 mov r0, #2 a000f358: 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 a000f35c: 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; a000f360: e0821001 add r1, r2, r1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end a000f364: e0667007 rsb r7, r6, r7 a000f368: 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; a000f36c: e584101c str r1, [r4, #28] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000f370: e1a00007 mov r0, r7 a000f374: e5941010 ldr r1, [r4, #16] a000f378: ebffcf2a bl a0003028 <__umodsi3> a000f37c: 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; a000f380: e5880000 str r0, [r8] if( extend_size >= heap->min_block_size ) { a000f384: e5943014 ldr r3, [r4, #20] a000f388: e1500003 cmp r0, r3 a000f38c: 2a000001 bcs a000f398 <_Heap_Extend+0x88> a000f390: e1a00005 mov r0, r5 <== NOT EXECUTED a000f394: 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; a000f398: 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 = a000f39c: 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); a000f3a0: 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; a000f3a4: e2011001 and r1, r1, #1 a000f3a8: e0632002 rsb r2, r3, r2 a000f3ac: e1801001 orr r1, r0, r1 a000f3b0: e3822001 orr r2, r2, #1 a000f3b4: e5861004 str r1, [r6, #4] a000f3b8: e5832004 str r2, [r3, #4] | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; a000f3bc: e594702c ldr r7, [r4, #44] ; 0x2c ++stats->used_blocks; a000f3c0: e5941040 ldr r1, [r4, #64] ; 0x40 --stats->frees; /* Do not count subsequent call as actual free() */ a000f3c4: e5942050 ldr r2, [r4, #80] ; 0x50 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; a000f3c8: e0870000 add r0, r7, r0 ++stats->used_blocks; a000f3cc: e2811001 add r1, r1, #1 --stats->frees; /* Do not count subsequent call as actual free() */ a000f3d0: e2422001 sub r2, r2, #1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; a000f3d4: e584002c str r0, [r4, #44] ; 0x2c ++stats->used_blocks; a000f3d8: 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; a000f3dc: e5843024 str r3, [r4, #36] ; 0x24 /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ a000f3e0: e5842050 str r2, [r4, #80] ; 0x50 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); a000f3e4: e1a00004 mov r0, r4 a000f3e8: e2861008 add r1, r6, #8 a000f3ec: ebffea2b bl a0009ca0 <_Heap_Free> a000f3f0: e1a00005 mov r0, r5 } return HEAP_EXTEND_SUCCESSFUL; } a000f3f4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} a0006824 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { a0006824: e92d40f0 push {r4, r5, r6, r7, lr} a0006828: e1a06000 mov r6, r0 a000682c: e1a05001 mov r5, r1 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a0006830: e1a00002 mov r0, r2 a0006834: e1d613ba ldrh r1, [r6, #58] ; 0x3a bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { a0006838: e1a07002 mov r7, r2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a000683c: eb00223e bl a000f13c #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { a0006840: e5d63038 ldrb r3, [r6, #56] ; 0x38 { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a0006844: e1a04000 mov r4, r0 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { a0006848: e3530000 cmp r3, #0 a000684c: 0a000014 beq a00068a4 <_Objects_Set_name+0x80> char *d; d = _Workspace_Allocate( length + 1 ); a0006850: e2800001 add r0, r0, #1 a0006854: eb0006be bl a0008354 <_Workspace_Allocate> if ( !d ) a0006858: e2506000 subs r6, r0, #0 a000685c: 1a000001 bne a0006868 <_Objects_Set_name+0x44> a0006860: e1a00006 mov r0, r6 <== NOT EXECUTED a0006864: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED return false; if ( the_object->name.name_p ) { a0006868: e595000c ldr r0, [r5, #12] a000686c: e3500000 cmp r0, #0 a0006870: 0a000002 beq a0006880 <_Objects_Set_name+0x5c> _Workspace_Free( (void *)the_object->name.name_p ); a0006874: eb0006bc bl a000836c <_Workspace_Free> the_object->name.name_p = NULL; a0006878: e3a03000 mov r3, #0 a000687c: e585300c str r3, [r5, #12] } strncpy( d, name, length ); a0006880: e1a01007 mov r1, r7 a0006884: e1a00006 mov r0, r6 a0006888: e1a02004 mov r2, r4 a000688c: eb0021f0 bl a000f054 d[length] = '\0'; a0006890: e3a03000 mov r3, #0 a0006894: e7c63004 strb r3, [r6, r4] the_object->name.name_p = d; a0006898: e3a00001 mov r0, #1 a000689c: e585600c str r6, [r5, #12] a00068a0: e8bd80f0 pop {r4, r5, r6, r7, pc} } else #endif { the_object->name.name_u32 = _Objects_Build_name( a00068a4: e3500001 cmp r0, #1 a00068a8: e5d70000 ldrb r0, [r7] a00068ac: 9a00000e bls a00068ec <_Objects_Set_name+0xc8> a00068b0: e5d71001 ldrb r1, [r7, #1] a00068b4: e3540002 cmp r4, #2 a00068b8: e1a01801 lsl r1, r1, #16 a00068bc: 9a00000b bls a00068f0 <_Objects_Set_name+0xcc> a00068c0: e5d72002 ldrb r2, [r7, #2] a00068c4: e3540003 cmp r4, #3 a00068c8: 85d73003 ldrbhi r3, [r7, #3] a00068cc: e1a02402 lsl r2, r2, #8 a00068d0: 9a000007 bls a00068f4 <_Objects_Set_name+0xd0> a00068d4: e1811c00 orr r1, r1, r0, lsl #24 a00068d8: e1812002 orr r2, r1, r2 a00068dc: e1823003 orr r3, r2, r3 a00068e0: e585300c str r3, [r5, #12] a00068e4: e3a00001 mov r0, #1 ); } return true; } a00068e8: 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( a00068ec: e3a01602 mov r1, #2097152 ; 0x200000 a00068f0: e3a02a02 mov r2, #8192 ; 0x2000 a00068f4: e3a03020 mov r3, #32 a00068f8: eafffff5 b a00068d4 <_Objects_Set_name+0xb0> a00059a8 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { a00059a8: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} a00059ac: e1a04001 mov r4, r1 a00059b0: 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 ) ) { a00059b4: e1a0100d mov r1, sp a00059b8: e1a00004 mov r0, r4 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { a00059bc: e1a08002 mov r8, r2 a00059c0: 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 ) ) { a00059c4: eb000071 bl a0005b90 <_POSIX_Mutex_Get> a00059c8: e3500000 cmp r0, #0 a00059cc: 0a000032 beq a0005a9c <_POSIX_Condition_variables_Wait_support+0xf4> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; a00059d0: e59f30d0 ldr r3, [pc, #208] ; a0005aa8 <_POSIX_Condition_variables_Wait_support+0x100> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); a00059d4: e1a0100d mov r1, sp a00059d8: e1a00006 mov r0, r6 a00059dc: e5932000 ldr r2, [r3] a00059e0: e2422001 sub r2, r2, #1 a00059e4: e5832000 str r2, [r3] a00059e8: ebffff7b bl a00057dc <_POSIX_Condition_variables_Get> switch ( location ) { a00059ec: e59d3000 ldr r3, [sp] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); a00059f0: e1a0a000 mov sl, r0 switch ( location ) { a00059f4: e3530000 cmp r3, #0 a00059f8: 1a000027 bne a0005a9c <_POSIX_Condition_variables_Wait_support+0xf4> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { a00059fc: e5903014 ldr r3, [r0, #20] a0005a00: e3530000 cmp r3, #0 a0005a04: 0a000004 beq a0005a1c <_POSIX_Condition_variables_Wait_support+0x74> a0005a08: e5942000 ldr r2, [r4] a0005a0c: e1530002 cmp r3, r2 a0005a10: 0a000001 beq a0005a1c <_POSIX_Condition_variables_Wait_support+0x74> _Thread_Enable_dispatch(); a0005a14: eb000bf2 bl a00089e4 <_Thread_Enable_dispatch> a0005a18: ea00001f b a0005a9c <_POSIX_Condition_variables_Wait_support+0xf4> return EINVAL; } (void) pthread_mutex_unlock( mutex ); a0005a1c: e1a00004 mov r0, r4 a0005a20: eb0000e3 bl a0005db4 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { a0005a24: e3570000 cmp r7, #0 a0005a28: 1a000015 bne a0005a84 <_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; a0005a2c: e59f5078 ldr r5, [pc, #120] ; a0005aac <_POSIX_Condition_variables_Wait_support+0x104> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; a0005a30: 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; a0005a34: 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; a0005a38: e5953000 ldr r3, [r5] return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; a0005a3c: 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; a0005a40: e3a00001 mov r0, #1 _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; a0005a44: e5837034 str r7, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; a0005a48: 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; a0005a4c: e5832044 str r2, [r3, #68] ; 0x44 a0005a50: e58a0048 str r0, [sl, #72] ; 0x48 _Thread_Executing->Wait.id = *cond; a0005a54: e5831020 str r1, [r3, #32] _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); a0005a58: e1a00002 mov r0, r2 a0005a5c: e1a01008 mov r1, r8 a0005a60: e59f2048 ldr r2, [pc, #72] ; a0005ab0 <_POSIX_Condition_variables_Wait_support+0x108> a0005a64: eb000d1c bl a0008edc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); a0005a68: eb000bdd bl a00089e4 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; a0005a6c: e5953000 ldr r3, [r5] a0005a70: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) a0005a74: e3550074 cmp r5, #116 ; 0x74 a0005a78: 13550000 cmpne r5, #0 a0005a7c: 0a000002 beq a0005a8c <_POSIX_Condition_variables_Wait_support+0xe4> a0005a80: ea000006 b a0005aa0 <_POSIX_Condition_variables_Wait_support+0xf8><== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); a0005a84: eb000bd6 bl a00089e4 <_Thread_Enable_dispatch> a0005a88: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); a0005a8c: e1a00004 mov r0, r4 a0005a90: eb0000a8 bl a0005d38 if ( mutex_status ) a0005a94: e3500000 cmp r0, #0 a0005a98: 0a000000 beq a0005aa0 <_POSIX_Condition_variables_Wait_support+0xf8> a0005a9c: e3a05016 mov r5, #22 case OBJECTS_ERROR: break; } return EINVAL; } a0005aa0: e1a00005 mov r0, r5 a0005aa4: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} a00069b8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { a00069b8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { a00069bc: e2525000 subs r5, r2, #0 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; a00069c0: e3a02000 mov r2, #0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { a00069c4: e1a06000 mov r6, r0 a00069c8: e5dd9028 ldrb r9, [sp, #40] ; 0x28 a00069cc: e1a04001 mov r4, r1 a00069d0: e1a07003 mov r7, r3 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; a00069d4: e5812104 str r2, [r1, #260] ; 0x104 a00069d8: e5812108 str r2, [r1, #264] ; 0x108 a00069dc: e581210c str r2, [r1, #268] ; 0x10c extensions_area = NULL; the_thread->libc_reent = NULL; a00069e0: e5812100 str r2, [r1, #256] ; 0x100 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { a00069e4: e59da024 ldr sl, [sp, #36] ; 0x24 a00069e8: e59d802c ldr r8, [sp, #44] ; 0x2c stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; a00069ec: 15c120c0 strbne r2, [r1, #192] ; 0xc0 a00069f0: 11a00003 movne r0, r3 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { a00069f4: 1a00000c bne a0006a2c <_Thread_Initialize+0x74> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); a00069f8: e1a00001 mov r0, r1 a00069fc: e1a01003 mov r1, r3 a0006a00: eb00026f bl a00073c4 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) a0006a04: e2703001 rsbs r3, r0, #1 a0006a08: 33a03000 movcc r3, #0 a0006a0c: e1500007 cmp r0, r7 a0006a10: 21a07003 movcs r7, r3 a0006a14: 33837001 orrcc r7, r3, #1 a0006a18: e3570000 cmp r7, #0 return false; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; a0006a1c: 03a03001 moveq r3, #1 a0006a20: 05c430c0 strbeq r3, [r4, #192] ; 0xc0 if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; a0006a24: 059450cc ldreq r5, [r4, #204] ; 0xcc stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) a0006a28: 1a000052 bne a0006b78 <_Thread_Initialize+0x1c0> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { a0006a2c: e59f214c ldr r2, [pc, #332] ; a0006b80 <_Thread_Initialize+0x1c8> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a0006a30: e3a03000 mov r3, #0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; a0006a34: e58450c8 str r5, [r4, #200] ; 0xc8 a0006a38: e5927000 ldr r7, [r2] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; a0006a3c: e584306c str r3, [r4, #108] ; 0x6c the_stack->size = size; a0006a40: e58400c4 str r0, [r4, #196] ; 0xc4 a0006a44: e1570003 cmp r7, r3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a0006a48: e5843050 str r3, [r4, #80] ; 0x50 the_watchdog->routine = routine; a0006a4c: e5843064 str r3, [r4, #100] ; 0x64 the_watchdog->id = id; a0006a50: e5843068 str r3, [r4, #104] ; 0x68 a0006a54: 0a000004 beq a0006a6c <_Thread_Initialize+0xb4> extensions_area = _Workspace_Allocate( a0006a58: e2877001 add r7, r7, #1 a0006a5c: e1a00107 lsl r0, r7, #2 a0006a60: eb000473 bl a0007c34 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) a0006a64: e2507000 subs r7, r0, #0 a0006a68: 0a00002b beq a0006b1c <_Thread_Initialize+0x164> * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { a0006a6c: e3570000 cmp r7, #0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; a0006a70: e5847110 str r7, [r4, #272] ; 0x110 * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { a0006a74: 0a000009 beq a0006aa0 <_Thread_Initialize+0xe8> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) a0006a78: e59f2100 ldr r2, [pc, #256] ; a0006b80 <_Thread_Initialize+0x1c8> a0006a7c: e3a03000 mov r3, #0 the_thread->extensions[i] = NULL; a0006a80: e1a01003 mov r1, r3 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) a0006a84: e5922000 ldr r2, [r2] a0006a88: ea000002 b a0006a98 <_Thread_Initialize+0xe0> the_thread->extensions[i] = NULL; a0006a8c: e5940110 ldr r0, [r4, #272] ; 0x110 a0006a90: e7801103 str r1, [r0, r3, lsl #2] * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) a0006a94: e2833001 add r3, r3, #1 a0006a98: e1530002 cmp r3, r2 a0006a9c: 9afffffa bls a0006a8c <_Thread_Initialize+0xd4> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; a0006aa0: e59d3030 ldr r3, [sp, #48] ; 0x30 switch ( budget_algorithm ) { a0006aa4: e3580002 cmp r8, #2 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; a0006aa8: e58480b0 str r8, [r4, #176] ; 0xb0 the_thread->Start.budget_callout = budget_callout; a0006aac: e58430b4 str r3, [r4, #180] ; 0xb4 case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; a0006ab0: 059f30cc ldreq r3, [pc, #204] ; a0006b84 <_Thread_Initialize+0x1cc> } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; a0006ab4: e3a08000 mov r8, #0 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; a0006ab8: e3a05001 mov r5, #1 case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; a0006abc: 05933000 ldreq r3, [r3] #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); a0006ac0: e1a0100a mov r1, sl a0006ac4: e1a00004 mov r0, r4 case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; a0006ac8: 05843078 streq r3, [r4, #120] ; 0x78 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; a0006acc: e59d3034 ldr r3, [sp, #52] ; 0x34 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; a0006ad0: e5c490ac strb r9, [r4, #172] ; 0xac #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; a0006ad4: e5845010 str r5, [r4, #16] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; a0006ad8: e58430b8 str r3, [r4, #184] ; 0xb8 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; a0006adc: e5848044 str r8, [r4, #68] ; 0x44 the_thread->resource_count = 0; a0006ae0: e584801c str r8, [r4, #28] #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; a0006ae4: e584a018 str sl, [r4, #24] the_thread->Start.initial_priority = priority; a0006ae8: e584a0bc str sl, [r4, #188] ; 0xbc _Thread_Set_priority( the_thread, priority ); a0006aec: eb00019e bl a000716c <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); a0006af0: e5848088 str r8, [r4, #136] ; 0x88 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; a0006af4: e59d1038 ldr r1, [sp, #56] ; 0x38 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0006af8: e596301c ldr r3, [r6, #28] a0006afc: e1d420b8 ldrh r2, [r4, #8] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; a0006b00: e584100c str r1, [r4, #12] a0006b04: e5848084 str r8, [r4, #132] ; 0x84 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0006b08: e7834102 str r4, [r3, r2, lsl #2] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); a0006b0c: e1a00004 mov r0, r4 a0006b10: eb00034a bl a0007840 <_User_extensions_Thread_create> if ( extension_status ) a0006b14: e1500008 cmp r0, r8 a0006b18: 1a000016 bne a0006b78 <_Thread_Initialize+0x1c0> return true; failed: if ( the_thread->libc_reent ) a0006b1c: e5940100 ldr r0, [r4, #256] ; 0x100 a0006b20: e3500000 cmp r0, #0 a0006b24: 0a000000 beq a0006b2c <_Thread_Initialize+0x174> _Workspace_Free( the_thread->libc_reent ); a0006b28: eb000447 bl a0007c4c <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) a0006b2c: e5940104 ldr r0, [r4, #260] ; 0x104 a0006b30: e3500000 cmp r0, #0 a0006b34: 0a000000 beq a0006b3c <_Thread_Initialize+0x184> _Workspace_Free( the_thread->API_Extensions[i] ); a0006b38: eb000443 bl a0007c4c <_Workspace_Free> failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) a0006b3c: e5940108 ldr r0, [r4, #264] ; 0x108 a0006b40: e3500000 cmp r0, #0 a0006b44: 0a000000 beq a0006b4c <_Thread_Initialize+0x194> _Workspace_Free( the_thread->API_Extensions[i] ); a0006b48: eb00043f bl a0007c4c <_Workspace_Free> failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) a0006b4c: e594010c ldr r0, [r4, #268] ; 0x10c a0006b50: e3500000 cmp r0, #0 a0006b54: 0a000000 beq a0006b5c <_Thread_Initialize+0x1a4> _Workspace_Free( the_thread->API_Extensions[i] ); a0006b58: eb00043b bl a0007c4c <_Workspace_Free> <== NOT EXECUTED if ( extensions_area ) a0006b5c: e3570000 cmp r7, #0 a0006b60: 0a000001 beq a0006b6c <_Thread_Initialize+0x1b4> (void) _Workspace_Free( extensions_area ); a0006b64: e1a00007 mov r0, r7 a0006b68: eb000437 bl a0007c4c <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); a0006b6c: e1a00004 mov r0, r4 a0006b70: eb00022b bl a0007424 <_Thread_Stack_Free> a0006b74: e3a05000 mov r5, #0 return false; } a0006b78: e1a00005 mov r0, r5 a0006b7c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} a0006e94 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; a0006e94: 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 ) { a0006e98: 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); a0006e9c: e281503c add r5, r1, #60 ; 0x3c a0006ea0: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; a0006ea4: e3a05000 mov r5, #0 the_chain->last = _Chain_Head(the_chain); a0006ea8: 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 ) ) a0006eac: 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 ]; a0006eb0: 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; a0006eb4: e581503c str r5, [r1, #60] ; 0x3c a0006eb8: e285500c add r5, r5, #12 the_chain->last = _Chain_Head(the_chain); a0006ebc: e581c040 str ip, [r1, #64] ; 0x40 block_state = the_thread_queue->state; a0006ec0: 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 ]; a0006ec4: 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; a0006ec8: 159f8158 ldrne r8, [pc, #344] ; a0007028 <_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 ) ) a0006ecc: 1a000023 bne a0006f60 <_Thread_queue_Enqueue_priority+0xcc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0006ed0: e28c8004 add r8, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0006ed4: e10f5000 mrs r5, CPSR a0006ed8: e3854080 orr r4, r5, #128 ; 0x80 a0006edc: 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; a0006ee0: e3e06000 mvn r6, #0 a0006ee4: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { a0006ee8: ea00000b b a0006f1c <_Thread_queue_Enqueue_priority+0x88> search_priority = search_thread->current_priority; a0006eec: e5946014 ldr r6, [r4, #20] if ( priority <= search_priority ) a0006ef0: e1530006 cmp r3, r6 a0006ef4: 9a00000a bls a0006f24 <_Thread_queue_Enqueue_priority+0x90> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( a0006ef8: e10fa000 mrs sl, CPSR a0006efc: e129f005 msr CPSR_fc, r5 a0006f00: 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) ) { a0006f04: e594a010 ldr sl, [r4, #16] a0006f08: e117000a tst r7, sl a0006f0c: 1a000001 bne a0006f18 <_Thread_queue_Enqueue_priority+0x84> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0006f10: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED a0006f14: eaffffee b a0006ed4 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; a0006f18: 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 ) ) { a0006f1c: e1540008 cmp r4, r8 a0006f20: 1afffff1 bne a0006eec <_Thread_queue_Enqueue_priority+0x58> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != a0006f24: 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 ) ) { a0006f28: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != a0006f2c: e3570001 cmp r7, #1 a0006f30: 1a000039 bne a000701c <_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 ) a0006f34: 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; a0006f38: e3a03000 mov r3, #0 a0006f3c: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) a0006f40: 0a00002b beq a0006ff4 <_Thread_queue_Enqueue_priority+0x160> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; a0006f44: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; a0006f48: 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; a0006f4c: 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; a0006f50: e5813004 str r3, [r1, #4] previous_node->next = the_node; a0006f54: e5831000 str r1, [r3] search_node->previous = the_node; a0006f58: e5841004 str r1, [r4, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); a0006f5c: ea000022 b a0006fec <_Thread_queue_Enqueue_priority+0x158> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; a0006f60: e5d86000 ldrb r6, [r8] a0006f64: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0006f68: e10f5000 mrs r5, CPSR a0006f6c: e3854080 orr r4, r5, #128 ; 0x80 a0006f70: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; a0006f74: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { a0006f78: ea00000b b a0006fac <_Thread_queue_Enqueue_priority+0x118> search_priority = search_thread->current_priority; a0006f7c: e5946014 ldr r6, [r4, #20] if ( priority >= search_priority ) a0006f80: e1530006 cmp r3, r6 a0006f84: 2a00000a bcs a0006fb4 <_Thread_queue_Enqueue_priority+0x120> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( a0006f88: e10fa000 mrs sl, CPSR a0006f8c: e129f005 msr CPSR_fc, r5 a0006f90: 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) ) { a0006f94: e594a010 ldr sl, [r4, #16] a0006f98: e117000a tst r7, sl a0006f9c: 1a000001 bne a0006fa8 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0006fa0: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED a0006fa4: eaffffed b a0006f60 <_Thread_queue_Enqueue_priority+0xcc> <== NOT EXECUTED _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) a0006fa8: 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 ) ) { a0006fac: e154000c cmp r4, ip a0006fb0: 1afffff1 bne a0006f7c <_Thread_queue_Enqueue_priority+0xe8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != a0006fb4: 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 ) ) { a0006fb8: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != a0006fbc: e3570001 cmp r7, #1 a0006fc0: 1a000015 bne a000701c <_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 ) a0006fc4: 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; a0006fc8: e3a03000 mov r3, #0 a0006fcc: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) a0006fd0: 0a000007 beq a0006ff4 <_Thread_queue_Enqueue_priority+0x160> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; a0006fd4: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; a0006fd8: e5814004 str r4, [r1, #4] search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; a0006fdc: 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; a0006fe0: e5813000 str r3, [r1] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; a0006fe4: 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; a0006fe8: e5841000 str r1, [r4] a0006fec: e129f005 msr CPSR_fc, r5 a0006ff0: ea000007 b a0007014 <_Thread_queue_Enqueue_priority+0x180> a0006ff4: 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; a0006ff8: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; a0006ffc: 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; a0007000: 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; a0007004: e5813004 str r3, [r1, #4] previous_node->next = the_node; a0007008: e5831000 str r1, [r3] search_node->previous = the_node; a000700c: e5841004 str r1, [r4, #4] a0007010: e129f00c msr CPSR_fc, ip a0007014: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a0007018: 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; a000701c: 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; a0007020: e582c000 str ip, [r2] return the_thread_queue->sync_state; } a0007024: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} a001494c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { a001494c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0014950: e24dd020 sub sp, sp, #32 a0014954: e28d3014 add r3, sp, #20 a0014958: 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; a001495c: e3a09000 mov r9, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0014960: e283a004 add sl, r3, #4 a0014964: 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); a0014968: e58d301c str r3, [sp, #28] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); a001496c: e2802008 add r2, r0, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); a0014970: 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 ) { a0014974: e1a04000 mov r4, r0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a0014978: e58da014 str sl, [sp, #20] the_chain->permanent_null = NULL; a001497c: e58d9018 str r9, [sp, #24] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a0014980: e58d8008 str r8, [sp, #8] the_chain->permanent_null = NULL; a0014984: e58d900c str r9, [sp, #12] the_chain->last = _Chain_Head(the_chain); a0014988: 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 ); a001498c: 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 ); a0014990: 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 ); a0014994: e58d2004 str r2, [sp, #4] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); a0014998: 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; a001499c: e28d2014 add r2, sp, #20 a00149a0: 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; a00149a4: e59f216c ldr r2, [pc, #364] ; a0014b18 <_Timer_server_Body+0x1cc> */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a00149a8: 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; a00149ac: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; a00149b0: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a00149b4: e1a02005 mov r2, r5 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; a00149b8: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a00149bc: e0611003 rsb r1, r1, r3 a00149c0: eb001094 bl a0018c18 <_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(); a00149c4: e59f3150 ldr r3, [pc, #336] ; a0014b1c <_Timer_server_Body+0x1d0> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; a00149c8: 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(); a00149cc: 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 ) { a00149d0: e1560002 cmp r6, r2 a00149d4: 9a000004 bls a00149ec <_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 ); a00149d8: e0621006 rsb r1, r2, r6 a00149dc: e1a00007 mov r0, r7 a00149e0: e1a02005 mov r2, r5 a00149e4: eb00108b bl a0018c18 <_Watchdog_Adjust_to_chain> a00149e8: ea000004 b a0014a00 <_Timer_server_Body+0xb4> } else if ( snapshot < last_snapshot ) { a00149ec: 2a000003 bcs a0014a00 <_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 ); a00149f0: e0662002 rsb r2, r6, r2 a00149f4: e1a00007 mov r0, r7 a00149f8: e3a01001 mov r1, #1 a00149fc: eb00105d bl a0018b78 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; a0014a00: 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 ); a0014a04: e5940078 ldr r0, [r4, #120] ; 0x78 a0014a08: eb00023f bl a001530c <_Chain_Get> if ( timer == NULL ) { a0014a0c: e2501000 subs r1, r0, #0 a0014a10: 0a00000a beq a0014a40 <_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 ) { a0014a14: e5913038 ldr r3, [r1, #56] ; 0x38 a0014a18: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); a0014a1c: 02811010 addeq r1, r1, #16 a0014a20: 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 ) { a0014a24: 0a000003 beq a0014a38 <_Timer_server_Body+0xec> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { a0014a28: e3530003 cmp r3, #3 a0014a2c: 1afffff4 bne a0014a04 <_Timer_server_Body+0xb8> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); a0014a30: e2811010 add r1, r1, #16 a0014a34: e1a00007 mov r0, r7 a0014a38: eb0010a3 bl a0018ccc <_Watchdog_Insert> a0014a3c: eafffff0 b a0014a04 <_Timer_server_Body+0xb8> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0014a40: e10f3000 mrs r3, CPSR a0014a44: e3832080 orr r2, r3, #128 ; 0x80 a0014a48: e129f002 msr CPSR_fc, r2 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { a0014a4c: e59d2014 ldr r2, [sp, #20] a0014a50: e152000a cmp r2, sl a0014a54: 1a000005 bne a0014a70 <_Timer_server_Body+0x124> ts->insert_chain = NULL; a0014a58: e5841078 str r1, [r4, #120] ; 0x78 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0014a5c: 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 ) ) { a0014a60: e59d3008 ldr r3, [sp, #8] a0014a64: e1530008 cmp r3, r8 a0014a68: 1a000002 bne a0014a78 <_Timer_server_Body+0x12c> a0014a6c: ea000015 b a0014ac8 <_Timer_server_Body+0x17c> a0014a70: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED a0014a74: eaffffca b a00149a4 <_Timer_server_Body+0x58> <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0014a78: e10f3000 mrs r3, CPSR a0014a7c: e3832080 orr r2, r3, #128 ; 0x80 a0014a80: e129f002 msr CPSR_fc, r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a0014a84: e59d2008 ldr r2, [sp, #8] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) a0014a88: e1520008 cmp r2, r8 a0014a8c: 0a00000b beq a0014ac0 <_Timer_server_Body+0x174> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; a0014a90: e5921000 ldr r1, [r2] * 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 ) { a0014a94: e3520000 cmp r2, #0 the_chain->first = new_first; a0014a98: e58d1008 str r1, [sp, #8] new_first->previous = _Chain_Head(the_chain); a0014a9c: e5815004 str r5, [r1, #4] a0014aa0: 0a000006 beq a0014ac0 <_Timer_server_Body+0x174> watchdog->state = WATCHDOG_INACTIVE; a0014aa4: e5829008 str r9, [r2, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0014aa8: e129f003 msr CPSR_fc, r3 /* * 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 ); a0014aac: e5921024 ldr r1, [r2, #36] ; 0x24 a0014ab0: e592301c ldr r3, [r2, #28] a0014ab4: e5920020 ldr r0, [r2, #32] a0014ab8: e12fff33 blx r3 } a0014abc: eaffffed b a0014a78 <_Timer_server_Body+0x12c> a0014ac0: e129f003 msr CPSR_fc, r3 a0014ac4: eaffffb4 b a001499c <_Timer_server_Body+0x50> a0014ac8: e59f3050 ldr r3, [pc, #80] ; a0014b20 <_Timer_server_Body+0x1d4> } else { ts->active = false; a0014acc: e5c4907c strb r9, [r4, #124] ; 0x7c a0014ad0: e5932000 ldr r2, [r3] a0014ad4: e2822001 add r2, r2, #1 a0014ad8: e5832000 str r2, [r3] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); a0014adc: e3a01008 mov r1, #8 a0014ae0: e5940000 ldr r0, [r4] a0014ae4: eb000dc2 bl a00181f4 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); a0014ae8: e1a00004 mov r0, r4 a0014aec: ebffff6a bl a001489c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); a0014af0: e1a00004 mov r0, r4 a0014af4: ebffff7e bl a00148f4 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); a0014af8: eb000b1b bl a001776c <_Thread_Enable_dispatch> ts->active = true; a0014afc: e3a03001 mov r3, #1 a0014b00: 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 ); a0014b04: e59d0004 ldr r0, [sp, #4] a0014b08: eb0010c8 bl a0018e30 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); a0014b0c: e59d0000 ldr r0, [sp] a0014b10: eb0010c6 bl a0018e30 <_Watchdog_Remove> a0014b14: eaffffa0 b a001499c <_Timer_server_Body+0x50> a0005a60 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { a0005a60: e92d40f1 push {r0, r4, r5, r6, r7, lr} a0005a64: e1a05000 mov r5, r0 a0005a68: e1a04001 mov r4, r1 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) a0005a6c: e59f0168 ldr r0, [pc, #360] ; a0005bdc a0005a70: e1a01005 mov r1, r5 a0005a74: e1a0200d mov r2, sp a0005a78: eb000818 bl a0007ae0 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { a0005a7c: e59d3000 ldr r3, [sp] a0005a80: e1a06000 mov r6, r0 a0005a84: e3530000 cmp r3, #0 a0005a88: 1a000050 bne a0005bd0 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { a0005a8c: e59f314c ldr r3, [pc, #332] ; a0005be0 a0005a90: e5902040 ldr r2, [r0, #64] ; 0x40 a0005a94: e5933000 ldr r3, [r3] a0005a98: e1520003 cmp r2, r3 a0005a9c: 0a000002 beq a0005aac _Thread_Enable_dispatch(); a0005aa0: eb000a53 bl a00083f4 <_Thread_Enable_dispatch> a0005aa4: e3a04017 mov r4, #23 return RTEMS_NOT_OWNER_OF_RESOURCE; a0005aa8: ea000049 b a0005bd4 } if ( length == RTEMS_PERIOD_STATUS ) { a0005aac: e3540000 cmp r4, #0 a0005ab0: 1a000004 bne a0005ac8 switch ( the_period->state ) { a0005ab4: e5903038 ldr r3, [r0, #56] ; 0x38 a0005ab8: e3530004 cmp r3, #4 a0005abc: 959f2120 ldrls r2, [pc, #288] ; a0005be4 a0005ac0: 97924103 ldrls r4, [r2, r3, lsl #2] a0005ac4: ea00003f b a0005bc8 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0005ac8: e10f7000 mrs r7, CPSR a0005acc: e3873080 orr r3, r7, #128 ; 0x80 a0005ad0: e129f003 msr CPSR_fc, r3 _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); switch ( the_period->state ) { a0005ad4: e5903038 ldr r3, [r0, #56] ; 0x38 a0005ad8: e3530002 cmp r3, #2 a0005adc: 0a000014 beq a0005b34 a0005ae0: e3530004 cmp r3, #4 a0005ae4: 0a00002d beq a0005ba0 a0005ae8: e3530000 cmp r3, #0 a0005aec: 1a000037 bne a0005bd0 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0005af0: e129f007 msr CPSR_fc, r7 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); a0005af4: ebffff58 bl a000585c <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; a0005af8: e3a03002 mov r3, #2 a0005afc: e5863038 str r3, [r6, #56] ; 0x38 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; a0005b00: e59f30e0 ldr r3, [pc, #224] ; a0005be8 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a0005b04: e3a07000 mov r7, #0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; a0005b08: e586401c str r4, [r6, #28] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; a0005b0c: e586403c str r4, [r6, #60] ; 0x3c Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; a0005b10: e586302c str r3, [r6, #44] ; 0x2c the_watchdog->id = id; a0005b14: e5865030 str r5, [r6, #48] ; 0x30 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a0005b18: e2861010 add r1, r6, #16 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a0005b1c: e5867018 str r7, [r6, #24] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; a0005b20: e5867034 str r7, [r6, #52] ; 0x34 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a0005b24: e59f00c0 ldr r0, [pc, #192] ; a0005bec a0005b28: eb000eed bl a00096e4 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); a0005b2c: e1a04007 mov r4, r7 a0005b30: ea000024 b a0005bc8 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); a0005b34: ebffff93 bl a0005988 <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; a0005b38: e3a03001 mov r3, #1 the_period->next_length = length; a0005b3c: e586403c str r4, [r6, #60] ; 0x3c /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; a0005b40: e5863038 str r3, [r6, #56] ; 0x38 a0005b44: e129f007 msr CPSR_fc, r7 the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; a0005b48: e59f2090 ldr r2, [pc, #144] ; a0005be0 a0005b4c: e5963008 ldr r3, [r6, #8] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); a0005b50: e3a01901 mov r1, #16384 ; 0x4000 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; a0005b54: e5920000 ldr r0, [r2] a0005b58: e5803020 str r3, [r0, #32] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); a0005b5c: eb000c73 bl a0008d30 <_Thread_Set_state> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0005b60: e10f2000 mrs r2, CPSR a0005b64: e3823080 orr r3, r2, #128 ; 0x80 a0005b68: e129f003 msr CPSR_fc, r3 * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; a0005b6c: e3a01002 mov r1, #2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; a0005b70: e5963038 ldr r3, [r6, #56] ; 0x38 the_period->state = RATE_MONOTONIC_ACTIVE; a0005b74: e5861038 str r1, [r6, #56] ; 0x38 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0005b78: e129f002 msr CPSR_fc, r2 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) a0005b7c: e3530003 cmp r3, #3 a0005b80: 1a000003 bne a0005b94 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); a0005b84: e59f3054 ldr r3, [pc, #84] ; a0005be0 <== NOT EXECUTED a0005b88: e3a01901 mov r1, #16384 ; 0x4000 <== NOT EXECUTED a0005b8c: e5930000 ldr r0, [r3] <== NOT EXECUTED a0005b90: eb00091c bl a0008008 <_Thread_Clear_state> <== NOT EXECUTED _Thread_Enable_dispatch(); a0005b94: eb000a16 bl a00083f4 <_Thread_Enable_dispatch> a0005b98: e3a04000 mov r4, #0 return RTEMS_SUCCESSFUL; a0005b9c: ea00000c b a0005bd4 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); a0005ba0: ebffff78 bl a0005988 <_Rate_monotonic_Update_statistics> a0005ba4: e129f007 msr CPSR_fc, r7 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; a0005ba8: e3a03002 mov r3, #2 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; a0005bac: e586401c str r4, [r6, #28] the_period->next_length = length; a0005bb0: e586403c str r4, [r6, #60] ; 0x3c */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; a0005bb4: e5863038 str r3, [r6, #56] ; 0x38 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a0005bb8: e2861010 add r1, r6, #16 a0005bbc: e59f0028 ldr r0, [pc, #40] ; a0005bec a0005bc0: eb000ec7 bl a00096e4 <_Watchdog_Insert> the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); a0005bc4: e3a04006 mov r4, #6 a0005bc8: eb000a09 bl a00083f4 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; a0005bcc: ea000000 b a0005bd4 a0005bd0: e3a04004 mov r4, #4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a0005bd4: e1a00004 mov r0, r4 a0005bd8: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} a0005260 : struct sigaction *oact ) { ISR_Level level; if ( oact ) a0005260: e3520000 cmp r2, #0 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { a0005264: e92d40f0 push {r4, r5, r6, r7, lr} a0005268: e1a04000 mov r4, r0 a000526c: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) a0005270: 0a00000a beq a00052a0 *oact = _POSIX_signals_Vectors[ sig ]; a0005274: e3a0300c mov r3, #12 a0005278: e0010093 mul r1, r3, r0 a000527c: e59f00e4 ldr r0, [pc, #228] ; a0005368 a0005280: e1a03002 mov r3, r2 a0005284: e790c001 ldr ip, [r0, r1] a0005288: e0801001 add r1, r0, r1 a000528c: e483c004 str ip, [r3], #4 a0005290: e5910004 ldr r0, [r1, #4] a0005294: e5820004 str r0, [r2, #4] a0005298: e5912008 ldr r2, [r1, #8] a000529c: e5832004 str r2, [r3, #4] if ( !sig ) a00052a0: e3540000 cmp r4, #0 a00052a4: 0a000004 beq a00052bc rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) a00052a8: e2443001 sub r3, r4, #1 a00052ac: e353001f cmp r3, #31 a00052b0: 8a000001 bhi a00052bc * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) a00052b4: e3540009 cmp r4, #9 a00052b8: 1a000004 bne a00052d0 rtems_set_errno_and_return_minus_one( EINVAL ); a00052bc: eb0022c9 bl a000dde8 <__errno> a00052c0: e3a03016 mov r3, #22 a00052c4: e5803000 str r3, [r0] a00052c8: e3e00000 mvn r0, #0 a00052cc: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { a00052d0: e3550000 cmp r5, #0 a00052d4: 1a000001 bne a00052e0 a00052d8: e1a00005 mov r0, r5 <== NOT EXECUTED a00052dc: 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 ( a00052e0: e10f7000 mrs r7, CPSR a00052e4: e3873080 orr r3, r7, #128 ; 0x80 a00052e8: 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 ) { a00052ec: e5953008 ldr r3, [r5, #8] a00052f0: e59f6070 ldr r6, [pc, #112] ; a0005368 a00052f4: e3530000 cmp r3, #0 a00052f8: 1a00000b bne a000532c _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; a00052fc: e3a0200c mov r2, #12 a0005300: e0030492 mul r3, r2, r4 a0005304: e59f0060 ldr r0, [pc, #96] ; a000536c a0005308: e0862003 add r2, r6, r3 a000530c: e0801003 add r1, r0, r3 a0005310: e790c003 ldr ip, [r0, r3] a0005314: e5910008 ldr r0, [r1, #8] a0005318: e5911004 ldr r1, [r1, #4] a000531c: e786c003 str ip, [r6, r3] a0005320: e5820008 str r0, [r2, #8] a0005324: e5821004 str r1, [r2, #4] a0005328: ea00000b b a000535c } else { _POSIX_signals_Clear_process_signals( sig ); a000532c: e1a00004 mov r0, r4 a0005330: eb001584 bl a000a948 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; a0005334: e1a03005 mov r3, r5 a0005338: e3a0200c mov r2, #12 a000533c: e4930004 ldr r0, [r3], #4 a0005340: e0010492 mul r1, r2, r4 a0005344: e7860001 str r0, [r6, r1] a0005348: e0862001 add r2, r6, r1 a000534c: e5951004 ldr r1, [r5, #4] a0005350: e5821004 str r1, [r2, #4] a0005354: e5933004 ldr r3, [r3, #4] a0005358: e5823008 str r3, [r2, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000535c: e129f007 msr CPSR_fc, r7 a0005360: e3a00000 mov r0, #0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } a0005364: e8bd80f0 pop {r4, r5, r6, r7, pc}