00006998 <_CORE_RWLock_Release>: CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ISR_Level level; Thread_Control *executing = _Thread_Executing; 6998: e59f30dc ldr r3, [pc, #220] ; 6a7c <_CORE_RWLock_Release+0xe4> */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 699c: e92d4010 push {r4, lr} ISR_Level level; Thread_Control *executing = _Thread_Executing; 69a0: e5931000 ldr r1, [r3] */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 69a4: e1a04000 mov r4, r0 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 69a8: e10f2000 mrs r2, CPSR 69ac: e38230c0 orr r3, r2, #192 ; 0xc0 69b0: e129f003 msr CPSR_fc, r3 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 69b4: e5903044 ldr r3, [r0, #68] 69b8: e3530000 cmp r3, #0 ; 0x0 69bc: 1a000003 bne 69d0 <_CORE_RWLock_Release+0x38> _ISR_Enable( level ); 69c0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 69c4: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 69c8: e5813034 str r3, [r1, #52] <== NOT EXECUTED 69cc: ea000028 b 6a74 <_CORE_RWLock_Release+0xdc> <== NOT EXECUTED return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 69d0: e3530001 cmp r3, #1 ; 0x1 69d4: 1a000006 bne 69f4 <_CORE_RWLock_Release+0x5c> the_rwlock->number_of_readers -= 1; 69d8: e5903048 ldr r3, [r0, #72] 69dc: e2433001 sub r3, r3, #1 ; 0x1 if ( the_rwlock->number_of_readers != 0 ) { 69e0: e3530000 cmp r3, #0 ; 0x0 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 69e4: e5803048 str r3, [r0, #72] if ( the_rwlock->number_of_readers != 0 ) { 69e8: 0a000001 beq 69f4 <_CORE_RWLock_Release+0x5c> /* must be unlocked again */ _ISR_Enable( level ); 69ec: e129f002 msr CPSR_fc, r2 69f0: ea00001f b 6a74 <_CORE_RWLock_Release+0xdc> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 69f4: e3a03000 mov r3, #0 ; 0x0 69f8: e5813034 str r3, [r1, #52] /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 69fc: e5843044 str r3, [r4, #68] _ISR_Enable( level ); 6a00: e129f002 msr CPSR_fc, r2 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 6a04: e1a00004 mov r0, r4 6a08: eb00055f bl 7f8c <_Thread_queue_Dequeue> if ( next ) { 6a0c: e3500000 cmp r0, #0 ; 0x0 6a10: 0a000017 beq 6a74 <_CORE_RWLock_Release+0xdc> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 6a14: e5903030 ldr r3, [r0, #48] 6a18: e3530001 cmp r3, #1 ; 0x1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 6a1c: 02833001 addeq r3, r3, #1 ; 0x1 6a20: 05843044 streq r3, [r4, #68] _ISR_Enable( level ); next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 6a24: 0a000012 beq 6a74 <_CORE_RWLock_Release+0xdc> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 6a28: e5943048 ldr r3, [r4, #72] 6a2c: e2833001 add r3, r3, #1 ; 0x1 6a30: e5843048 str r3, [r4, #72] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 6a34: e3a03001 mov r3, #1 ; 0x1 6a38: e5843044 str r3, [r4, #68] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 6a3c: e1a00004 mov r0, r4 6a40: eb000698 bl 84a8 <_Thread_queue_First> if ( !next || 6a44: e2503000 subs r3, r0, #0 ; 0x0 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 6a48: e1a01003 mov r1, r3 6a4c: e1a00004 mov r0, r4 /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 6a50: 0a000007 beq 6a74 <_CORE_RWLock_Release+0xdc> 6a54: e5933030 ldr r3, [r3, #48] 6a58: e3530001 cmp r3, #1 ; 0x1 6a5c: 0a000004 beq 6a74 <_CORE_RWLock_Release+0xdc> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 6a60: e5943048 ldr r3, [r4, #72] 6a64: e2833001 add r3, r3, #1 ; 0x1 6a68: e5843048 str r3, [r4, #72] _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 6a6c: eb000643 bl 8380 <_Thread_queue_Extract> 6a70: eafffff1 b 6a3c <_CORE_RWLock_Release+0xa4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 6a74: e3a00000 mov r0, #0 ; 0x0 6a78: e8bd8010 pop {r4, pc} 6a7c: 00018604 .word 0x00018604 00011b30 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11b30: e590304c ldr r3, [r0, #76] size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 11b34: 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 ) { 11b38: e1520003 cmp r2, r3 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 11b3c: e1a07000 mov r7, r0 11b40: e1a06002 mov r6, r2 11b44: e1a08001 mov r8, r1 11b48: e59da020 ldr sl, [sp, #32] Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11b4c: 83a00001 movhi r0, #1 ; 0x1 11b50: 88bd85f0 pophi {r4, r5, r6, r7, r8, sl, pc} * 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 ) { 11b54: e5973048 ldr r3, [r7, #72] 11b58: e3530000 cmp r3, #0 ; 0x0 *count = 0; 11b5c: 13a03000 movne r3, #0 ; 0x0 * 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))) { 11b60: 01a05003 moveq r5, r3 * 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 ) { *count = 0; 11b64: 158a3000 strne r3, [sl] 11b68: 11a00003 movne r0, r3 * 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 ) { 11b6c: 0a000005 beq 11b88 <_CORE_message_queue_Broadcast+0x58> 11b70: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11b74: e594002c ldr r0, [r4, #44] 11b78: eb001f1a bl 197e8 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11b7c: e5943028 ldr r3, [r4, #40] 11b80: e5836000 str r6, [r3] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 11b84: e2855001 add r5, r5, #1 ; 0x1 * 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))) { 11b88: e1a00007 mov r0, r7 11b8c: eb00092d bl 14048 <_Thread_queue_Dequeue> 11b90: e2504000 subs r4, r0, #0 ; 0x0 11b94: e1a01008 mov r1, r8 11b98: e1a02006 mov r2, r6 11b9c: 1afffff4 bne 11b74 <_CORE_message_queue_Broadcast+0x44> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 11ba0: e58a5000 str r5, [sl] 11ba4: e1a00004 mov r0, r4 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11ba8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 0001029c <_CORE_message_queue_Submit>: CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 1029c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 102a0: e590c04c ldr ip, [r0, #76] 102a4: e152000c cmp r2, ip CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 102a8: e1a05000 mov r5, r0 102ac: e1a06002 mov r6, r2 102b0: e1a07001 mov r7, r1 102b4: e1a0b003 mov fp, r3 102b8: e59d9028 ldr r9, [sp, #40] 102bc: e5dda02c ldrb sl, [sp, #44] ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 102c0: 83a00001 movhi r0, #1 ; 0x1 102c4: 88bd8ff0 pophi {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 102c8: e5958048 ldr r8, [r5, #72] 102cc: e3580000 cmp r8, #0 ; 0x0 102d0: 1a00000b bne 10304 <_CORE_message_queue_Submit+0x68> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 102d4: ebffea40 bl abdc <_Thread_queue_Dequeue> if ( the_thread ) { 102d8: e2504000 subs r4, r0, #0 ; 0x0 102dc: 0a000008 beq 10304 <_CORE_message_queue_Submit+0x68> 102e0: e1a01007 mov r1, r7 102e4: e594002c ldr r0, [r4, #44] 102e8: e1a02006 mov r2, r6 102ec: eb0012c1 bl 14df8 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 102f0: e5943028 ldr r3, [r4, #40] the_thread->Wait.count = submit_type; 102f4: e1a00008 mov r0, r8 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 102f8: e5836000 str r6, [r3] the_thread->Wait.count = submit_type; 102fc: e5849024 str r9, [r4, #36] 10300: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 10304: e5952048 ldr r2, [r5, #72] 10308: e5953044 ldr r3, [r5, #68] 1030c: e1520003 cmp r2, r3 10310: 2a00000f bcs 10354 <_CORE_message_queue_Submit+0xb8> RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 10314: e2850068 add r0, r5, #104 ; 0x68 10318: ebffe3e6 bl 92b8 <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 1031c: e2504000 subs r4, r0, #0 ; 0x0 10320: 0a000025 beq 103bc <_CORE_message_queue_Submit+0x120> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10324: e1a01007 mov r1, r7 10328: e1a02006 mov r2, r6 1032c: e2840010 add r0, r4, #16 ; 0x10 10330: eb0012b0 bl 14df8 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 10334: e1a00005 mov r0, r5 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10338: e584600c str r6, [r4, #12] the_message->priority = submit_type; 1033c: e5849008 str r9, [r4, #8] _CORE_message_queue_Insert_message( 10340: e1a01004 mov r1, r4 10344: e1a02009 mov r2, r9 10348: eb000b38 bl 13030 <_CORE_message_queue_Insert_message> 1034c: e3a00000 mov r0, #0 ; 0x0 10350: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 10354: e35a0000 cmp sl, #0 ; 0x0 10358: 03a00002 moveq r0, #2 ; 0x2 1035c: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 10360: e59f305c ldr r3, [pc, #92] ; 103c4 <_CORE_message_queue_Submit+0x128> 10364: e5933000 ldr r3, [r3] 10368: e3530000 cmp r3, #0 ; 0x0 1036c: 1a000012 bne 103bc <_CORE_message_queue_Submit+0x120> * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 10370: e59f3050 ldr r3, [pc, #80] ; 103c8 <_CORE_message_queue_Submit+0x12c> 10374: e5932000 ldr r2, [r3] _ISR_Disable( level ); 10378: e10f1000 mrs r1, CPSR 1037c: e38130c0 orr r3, r1, #192 ; 0xc0 10380: e129f003 msr CPSR_fc, r3 10384: e3a03001 mov r3, #1 ; 0x1 10388: e5853030 str r3, [r5, #48] _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 1038c: e5829024 str r9, [r2, #36] Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 10390: e582b020 str fp, [r2, #32] executing->Wait.return_argument_second.immutable_object = buffer; 10394: e582702c str r7, [r2, #44] executing->Wait.option = (uint32_t) size; 10398: e5826030 str r6, [r2, #48] { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 1039c: e5825044 str r5, [r2, #68] executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); 103a0: e129f001 msr CPSR_fc, r1 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 103a4: e59f2020 ldr r2, [pc, #32] ; 103cc <_CORE_message_queue_Submit+0x130> 103a8: e1a00005 mov r0, r5 103ac: e59d1030 ldr r1, [sp, #48] 103b0: ebffea62 bl ad40 <_Thread_queue_Enqueue_with_handler> 103b4: e3a00007 mov r0, #7 ; 0x7 103b8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 103bc: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED } 103c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 103c4: 00024420 .word 0x00024420 103c8: 00024444 .word 0x00024444 103cc: 0000b118 .word 0x0000b118 00009cb4 <_CORE_mutex_Seize_interrupt_trylock>: Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 9cb4: e59f3130 ldr r3, [pc, #304] ; 9dec <_CORE_mutex_Seize_interrupt_trylock+0x138> 9cb8: e593c000 ldr ip, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9cbc: e3a02000 mov r2, #0 ; 0x0 CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 9cc0: e5911000 ldr r1, [r1] /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9cc4: e58c2034 str r2, [ip, #52] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9cc8: e5903050 ldr r3, [r0, #80] 9ccc: e1530002 cmp r3, r2 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 9cd0: e52de004 push {lr} ; (str lr, [sp, #-4]!) 9cd4: 0a00002f beq 9d98 <_CORE_mutex_Seize_interrupt_trylock+0xe4> the_mutex->lock = CORE_MUTEX_LOCKED; 9cd8: e5802050 str r2, [r0, #80] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 9cdc: e5902048 ldr r2, [r0, #72] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 9ce0: e59c3008 ldr r3, [ip, #8] the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9ce4: e3520002 cmp r2, #2 ; 0x2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 9ce8: e5803060 str r3, [r0, #96] the_mutex->nest_count = 1; 9cec: e3a03001 mov r3, #1 ; 0x1 9cf0: e5803054 str r3, [r0, #84] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 9cf4: e580c05c str ip, [r0, #92] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9cf8: 0a000001 beq 9d04 <_CORE_mutex_Seize_interrupt_trylock+0x50> 9cfc: e3520003 cmp r2, #3 ; 0x3 9d00: 1a000002 bne 9d10 <_CORE_mutex_Seize_interrupt_trylock+0x5c> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 9d04: e59c301c ldr r3, [ip, #28] 9d08: e2833001 add r3, r3, #1 ; 0x1 9d0c: e58c301c str r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9d10: e5903048 ldr r3, [r0, #72] 9d14: e3530003 cmp r3, #3 ; 0x3 9d18: 0a000001 beq 9d24 <_CORE_mutex_Seize_interrupt_trylock+0x70> _ISR_Enable( level ); 9d1c: e129f001 msr CPSR_fc, r1 9d20: ea00002d b 9ddc <_CORE_mutex_Seize_interrupt_trylock+0x128> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 9d24: e590204c ldr r2, [r0, #76] current = executing->current_priority; 9d28: e59c3014 ldr r3, [ip, #20] if ( current == ceiling ) { 9d2c: e1530002 cmp r3, r2 9d30: 1a000001 bne 9d3c <_CORE_mutex_Seize_interrupt_trylock+0x88> _ISR_Enable( level ); 9d34: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 9d38: ea000027 b 9ddc <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 9d3c: 9a00000a bls 9d6c <_CORE_mutex_Seize_interrupt_trylock+0xb8> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 9d40: e59f20a8 ldr r2, [pc, #168] ; 9df0 <_CORE_mutex_Seize_interrupt_trylock+0x13c> 9d44: e5923000 ldr r3, [r2] 9d48: e2833001 add r3, r3, #1 ; 0x1 9d4c: e5823000 str r3, [r2] _Thread_Disable_dispatch(); _ISR_Enable( level ); 9d50: e129f001 msr CPSR_fc, r1 _Thread_Change_priority( 9d54: e3a02000 mov r2, #0 ; 0x0 9d58: e590104c ldr r1, [r0, #76] 9d5c: e590005c ldr r0, [r0, #92] 9d60: ebffefdc bl 5cd8 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 9d64: ebfff143 bl 6278 <_Thread_Enable_dispatch> 9d68: ea00001b b 9ddc <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 9d6c: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED 9d70: e58c3034 str r3, [ip, #52] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 9d74: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 9d78: e5803054 str r3, [r0, #84] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 9d7c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 9d80: e5803050 str r3, [r0, #80] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 9d84: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED 9d88: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 9d8c: e58c301c str r3, [ip, #28] <== NOT EXECUTED _ISR_Enable( level ); 9d90: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 9d94: ea000010 b 9ddc <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 9d98: e590205c ldr r2, [r0, #92] 9d9c: e152000c cmp r2, ip 9da0: 1a00000f bne 9de4 <_CORE_mutex_Seize_interrupt_trylock+0x130> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 9da4: e5903040 ldr r3, [r0, #64] 9da8: e3530000 cmp r3, #0 ; 0x0 9dac: 0a000002 beq 9dbc <_CORE_mutex_Seize_interrupt_trylock+0x108> 9db0: e3530001 cmp r3, #1 ; 0x1 9db4: 1a00000a bne 9de4 <_CORE_mutex_Seize_interrupt_trylock+0x130> 9db8: ea000004 b 9dd0 <_CORE_mutex_Seize_interrupt_trylock+0x11c> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 9dbc: e5903054 ldr r3, [r0, #84] 9dc0: e2833001 add r3, r3, #1 ; 0x1 9dc4: e5803054 str r3, [r0, #84] _ISR_Enable( level ); 9dc8: e129f001 msr CPSR_fc, r1 9dcc: ea000002 b 9ddc <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 9dd0: e3a03002 mov r3, #2 ; 0x2 9dd4: e5823034 str r3, [r2, #52] _ISR_Enable( level ); 9dd8: e129f001 msr CPSR_fc, r1 9ddc: e3a00000 mov r0, #0 ; 0x0 9de0: e49df004 pop {pc} ; (ldr pc, [sp], #4) 9de4: e3a00001 mov r0, #1 ; 0x1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 9de8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 9dec: 000162c4 .word 0x000162c4 9df0: 0001620c .word 0x0001620c 00004fc4 <_CORE_mutex_Surrender>: * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 4fc4: e5d03044 ldrb r3, [r0, #68] 4fc8: e3530000 cmp r3, #0 ; 0x0 CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 4fcc: e92d4010 push {r4, lr} 4fd0: e1a04000 mov r4, r0 Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 4fd4: e590005c ldr r0, [r0, #92] * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 4fd8: 0a000004 beq 4ff0 <_CORE_mutex_Surrender+0x2c> if ( !_Thread_Is_executing( holder ) ) 4fdc: e59f312c ldr r3, [pc, #300] ; 5110 <_CORE_mutex_Surrender+0x14c> 4fe0: e5933000 ldr r3, [r3] 4fe4: e1500003 cmp r0, r3 4fe8: 13a00003 movne r0, #3 ; 0x3 4fec: 18bd8010 popne {r4, pc} return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 4ff0: e5943054 ldr r3, [r4, #84] 4ff4: e3530000 cmp r3, #0 ; 0x0 4ff8: 0a000042 beq 5108 <_CORE_mutex_Surrender+0x144> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 4ffc: e2433001 sub r3, r3, #1 ; 0x1 if ( the_mutex->nest_count != 0 ) { 5000: e3530000 cmp r3, #0 ; 0x0 /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 5004: e5843054 str r3, [r4, #84] if ( the_mutex->nest_count != 0 ) { 5008: 0a000005 beq 5024 <_CORE_mutex_Surrender+0x60> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 500c: e5943040 ldr r3, [r4, #64] 5010: e3530000 cmp r3, #0 ; 0x0 5014: 0a00003b beq 5108 <_CORE_mutex_Surrender+0x144> 5018: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 501c: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 5020: 08bd8010 popeq {r4, pc} <== NOT EXECUTED 5024: e5943048 ldr r3, [r4, #72] /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 5028: e3530002 cmp r3, #2 ; 0x2 502c: 0a000001 beq 5038 <_CORE_mutex_Surrender+0x74> 5030: e3530003 cmp r3, #3 ; 0x3 5034: 1a000002 bne 5044 <_CORE_mutex_Surrender+0x80> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 5038: e590301c ldr r3, [r0, #28] 503c: e2433001 sub r3, r3, #1 ; 0x1 5040: e580301c str r3, [r0, #28] 5044: e5942048 ldr r2, [r4, #72] } the_mutex->holder = NULL; 5048: e3a03000 mov r3, #0 ; 0x0 /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 504c: e3520002 cmp r2, #2 ; 0x2 first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; the_mutex->holder_id = 0; 5050: e5843060 str r3, [r4, #96] } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 5054: e584305c str r3, [r4, #92] /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 5058: 0a000001 beq 5064 <_CORE_mutex_Surrender+0xa0> 505c: e3520003 cmp r2, #3 ; 0x3 5060: 1a000007 bne 5084 <_CORE_mutex_Surrender+0xc0> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE); #endif if ( holder->resource_count == 0 && 5064: e590301c ldr r3, [r0, #28] 5068: e3530000 cmp r3, #0 ; 0x0 506c: 1a000004 bne 5084 <_CORE_mutex_Surrender+0xc0> 5070: e5901018 ldr r1, [r0, #24] 5074: e5903014 ldr r3, [r0, #20] 5078: e1510003 cmp r1, r3 holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 507c: 13a02001 movne r2, #1 ; 0x1 5080: 1b000314 blne 5cd8 <_Thread_Change_priority> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 5084: e1a00004 mov r0, r4 5088: eb00055c bl 6600 <_Thread_queue_Dequeue> 508c: e2502000 subs r2, r0, #0 ; 0x0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 5090: 03a03001 moveq r3, #1 ; 0x1 5094: 05843050 streq r3, [r4, #80] 5098: 01a00002 moveq r0, r2 /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 509c: 08bd8010 popeq {r4, pc} } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 50a0: e5923008 ldr r3, [r2, #8] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 50a4: e5941048 ldr r1, [r4, #72] } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 50a8: e5843060 str r3, [r4, #96] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 50ac: e3510002 cmp r1, #2 ; 0x2 #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 50b0: e3a03001 mov r3, #1 ; 0x1 50b4: e5843054 str r3, [r4, #84] } else #endif { the_mutex->holder = the_thread; 50b8: e584205c str r2, [r4, #92] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 50bc: 0a000002 beq 50cc <_CORE_mutex_Surrender+0x108> 50c0: e3510003 cmp r1, #3 ; 0x3 50c4: 1a00000f bne 5108 <_CORE_mutex_Surrender+0x144> 50c8: ea000003 b 50dc <_CORE_mutex_Surrender+0x118> <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 50cc: e592301c ldr r3, [r2, #28] 50d0: e2833001 add r3, r3, #1 ; 0x1 50d4: e582301c str r3, [r2, #28] 50d8: ea000008 b 5100 <_CORE_mutex_Surrender+0x13c> case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 50dc: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 50e0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 50e4: e582301c str r3, [r2, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 50e8: e5923014 ldr r3, [r2, #20] <== NOT EXECUTED 50ec: e594104c ldr r1, [r4, #76] <== NOT EXECUTED 50f0: e1510003 cmp r1, r3 <== NOT EXECUTED 50f4: 2a000003 bcs 5108 <_CORE_mutex_Surrender+0x144> <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 50f8: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 50fc: eb0002f5 bl 5cd8 <_Thread_Change_priority> <== NOT EXECUTED 5100: e3a00000 mov r0, #0 ; 0x0 5104: e8bd8010 pop {r4, pc} } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 5108: e3a00000 mov r0, #0 ; 0x0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 510c: e8bd8010 pop {r4, pc} 5110: 000162c4 .word 0x000162c4 000058f0 <_CORE_spinlock_Release>: CORE_spinlock_Control *the_spinlock ) { ISR_Level level; _ISR_Disable( level ); 58f0: e10f1000 mrs r1, CPSR 58f4: e38130c0 orr r3, r1, #192 ; 0xc0 58f8: e129f003 msr CPSR_fc, r3 /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 58fc: e5903004 ldr r3, [r0, #4] 5900: e3530000 cmp r3, #0 ; 0x0 5904: 1a000002 bne 5914 <_CORE_spinlock_Release+0x24> _ISR_Enable( level ); 5908: e129f001 msr CPSR_fc, r1 590c: e3a00006 mov r0, #6 ; 0x6 5910: e12fff1e bx lr } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 5914: e59f3040 ldr r3, [pc, #64] ; 595c <_CORE_spinlock_Release+0x6c> 5918: e5933000 ldr r3, [r3] 591c: e5932008 ldr r2, [r3, #8] 5920: e590300c ldr r3, [r0, #12] 5924: e1530002 cmp r3, r2 5928: 0a000002 beq 5938 <_CORE_spinlock_Release+0x48> _ISR_Enable( level ); 592c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 5930: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 5934: e12fff1e bx lr <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 5938: e5903008 ldr r3, [r0, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 593c: e3a02000 mov r2, #0 ; 0x0 } /* * Let it be unlocked. */ the_spinlock->users -= 1; 5940: e2433001 sub r3, r3, #1 ; 0x1 5944: e5803008 str r3, [r0, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 5948: e5802004 str r2, [r0, #4] the_spinlock->holder = 0; 594c: e580200c str r2, [r0, #12] _ISR_Enable( level ); 5950: e129f001 msr CPSR_fc, r1 5954: e3a00000 mov r0, #0 ; 0x0 return CORE_SPINLOCK_SUCCESSFUL; } 5958: e12fff1e bx lr 595c: 00010fc4 .word 0x00010fc4 00005960 <_CORE_spinlock_Wait>: bool wait, Watchdog_Interval timeout ) { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 5960: e59f3104 ldr r3, [pc, #260] ; 5a6c <_CORE_spinlock_Wait+0x10c> 5964: e5933000 ldr r3, [r3] CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 5968: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 596c: e1a05002 mov r5, r2 5970: e1a04000 mov r4, r0 5974: e20180ff and r8, r1, #255 ; 0xff ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 5978: e0827003 add r7, r2, r3 _ISR_Disable( level ); 597c: e10f1000 mrs r1, CPSR 5980: e38130c0 orr r3, r1, #192 ; 0xc0 5984: e129f003 msr CPSR_fc, r3 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 5988: e5903004 ldr r3, [r0, #4] 598c: e3530001 cmp r3, #1 ; 0x1 5990: 1a000008 bne 59b8 <_CORE_spinlock_Wait+0x58> 5994: e59f30d4 ldr r3, [pc, #212] ; 5a70 <_CORE_spinlock_Wait+0x110> 5998: e5933000 ldr r3, [r3] 599c: e5932008 ldr r2, [r3, #8] 59a0: e590300c ldr r3, [r0, #12] 59a4: e1530002 cmp r3, r2 59a8: 1a000002 bne 59b8 <_CORE_spinlock_Wait+0x58> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 59ac: e129f001 msr CPSR_fc, r1 59b0: e3a00001 mov r0, #1 ; 0x1 59b4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 59b8: e5943008 ldr r3, [r4, #8] 59bc: e2833001 add r3, r3, #1 ; 0x1 59c0: e5843008 str r3, [r4, #8] } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 59c4: e59fa0a0 ldr sl, [pc, #160] ; 5a6c <_CORE_spinlock_Wait+0x10c> 59c8: e59f60a4 ldr r6, [pc, #164] ; 5a74 <_CORE_spinlock_Wait+0x114> _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 59cc: e5943004 ldr r3, [r4, #4] 59d0: e3530000 cmp r3, #0 ; 0x0 59d4: 1a000008 bne 59fc <_CORE_spinlock_Wait+0x9c> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 59d8: e2833001 add r3, r3, #1 ; 0x1 59dc: e5843004 str r3, [r4, #4] the_spinlock->holder = _Thread_Executing->Object.id; 59e0: e59f3088 ldr r3, [pc, #136] ; 5a70 <_CORE_spinlock_Wait+0x110> 59e4: e5933000 ldr r3, [r3] 59e8: e5933008 ldr r3, [r3, #8] 59ec: e584300c str r3, [r4, #12] _ISR_Enable( level ); 59f0: e129f001 msr CPSR_fc, r1 59f4: e3a00000 mov r0, #0 ; 0x0 59f8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 59fc: e3580000 cmp r8, #0 ; 0x0 5a00: 1a000005 bne 5a1c <_CORE_spinlock_Wait+0xbc> the_spinlock->users -= 1; 5a04: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 5a08: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 5a0c: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 5a10: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 5a14: e3a00005 mov r0, #5 ; 0x5 <== NOT EXECUTED 5a18: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 5a1c: e3550000 cmp r5, #0 ; 0x0 5a20: 0a000008 beq 5a48 <_CORE_spinlock_Wait+0xe8> 5a24: e59a3000 ldr r3, [sl] <== NOT EXECUTED 5a28: e1570003 cmp r7, r3 <== NOT EXECUTED 5a2c: 8a000005 bhi 5a48 <_CORE_spinlock_Wait+0xe8> <== NOT EXECUTED the_spinlock->users -= 1; 5a30: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 5a34: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 5a38: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 5a3c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 5a40: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 5a44: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 5a48: e129f001 msr CPSR_fc, r1 /* An ISR could occur here */ _Thread_Enable_dispatch(); 5a4c: eb000423 bl 6ae0 <_Thread_Enable_dispatch> 5a50: e5963000 ldr r3, [r6] 5a54: e2833001 add r3, r3, #1 ; 0x1 5a58: e5863000 str r3, [r6] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 5a5c: e10f1000 mrs r1, CPSR 5a60: e38130c0 orr r3, r1, #192 ; 0xc0 5a64: e129f003 msr CPSR_fc, r3 5a68: eaffffd7 b 59cc <_CORE_spinlock_Wait+0x6c> 5a6c: 00011064 .word 0x00011064 5a70: 00010fc4 .word 0x00010fc4 5a74: 00010f0c .word 0x00010f0c 0001f050 <_Chain_Insert>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 1f050: e10f2000 mrs r2, CPSR <== NOT EXECUTED 1f054: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 1f058: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 1f05c: e5903000 ldr r3, [r0] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 1f060: e5810004 str r0, [r1, #4] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 1f064: e5801000 str r1, [r0] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 1f068: e5831004 str r1, [r3, #4] <== NOT EXECUTED Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 1f06c: e5813000 str r3, [r1] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 1f070: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } 1f074: e12fff1e bx lr <== NOT EXECUTED 00009bb0 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 9bb0: e59f3010 ldr r3, [pc, #16] ; 9bc8 <_Debug_Is_enabled+0x18> <== NOT EXECUTED 9bb4: e5933000 ldr r3, [r3] <== NOT EXECUTED 9bb8: e1100003 tst r0, r3 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 9bbc: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED 9bc0: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 9bc4: e12fff1e bx lr <== NOT EXECUTED 9bc8: 000162c8 .word 0x000162c8 00003d54 <_Event_Seize>: rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 3d54: e59fc104 ldr ip, [pc, #260] ; 3e60 <_Event_Seize+0x10c> rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 3d58: e92d40f0 push {r4, r5, r6, r7, lr} rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 3d5c: e59c4000 ldr r4, [ip] executing->Wait.return_code = RTEMS_SUCCESSFUL; 3d60: e3a0c000 mov ip, #0 ; 0x0 3d64: e584c034 str ip, [r4, #52] rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 3d68: e1a07002 mov r7, r2 3d6c: e1a05003 mov r5, r3 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 3d70: e5946104 ldr r6, [r4, #260] _ISR_Disable( level ); 3d74: e10fc000 mrs ip, CPSR 3d78: e38c30c0 orr r3, ip, #192 ; 0xc0 3d7c: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 3d80: e5963000 ldr r3, [r6] seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 3d84: e0102003 ands r2, r0, r3 3d88: 0a000007 beq 3dac <_Event_Seize+0x58> 3d8c: e1520000 cmp r2, r0 3d90: 0a000001 beq 3d9c <_Event_Seize+0x48> 3d94: e3110002 tst r1, #2 ; 0x2 3d98: 0a000003 beq 3dac <_Event_Seize+0x58> (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 3d9c: e1c33002 bic r3, r3, r2 3da0: e5863000 str r3, [r6] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 3da4: e129f00c msr CPSR_fc, ip 3da8: ea000004 b 3dc0 <_Event_Seize+0x6c> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 3dac: e3110001 tst r1, #1 ; 0x1 3db0: 0a000004 beq 3dc8 <_Event_Seize+0x74> _ISR_Enable( level ); 3db4: e129f00c msr CPSR_fc, ip executing->Wait.return_code = RTEMS_UNSATISFIED; 3db8: e3a0300d mov r3, #13 ; 0xd 3dbc: e5843034 str r3, [r4, #52] *event_out = seized_events; 3dc0: e5852000 str r2, [r5] 3dc4: e8bd80f0 pop {r4, r5, r6, r7, pc} return; } _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 3dc8: e59f3094 ldr r3, [pc, #148] ; 3e64 <_Event_Seize+0x110> 3dcc: e3a02001 mov r2, #1 ; 0x1 3dd0: e5832000 str r2, [r3] executing->Wait.option = (uint32_t) option_set; 3dd4: e5841030 str r1, [r4, #48] executing->Wait.count = (uint32_t) event_in; 3dd8: e5840024 str r0, [r4, #36] executing->Wait.return_argument = event_out; 3ddc: e5845028 str r5, [r4, #40] _ISR_Enable( level ); 3de0: e129f00c msr CPSR_fc, ip if ( ticks ) { 3de4: e3570000 cmp r7, #0 ; 0x0 3de8: 0a00000a beq 3e18 <_Event_Seize+0xc4> _Watchdog_Initialize( 3dec: e5943008 ldr r3, [r4, #8] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 3df0: e59f2070 ldr r2, [pc, #112] ; 3e68 <_Event_Seize+0x114> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3df4: e3a01000 mov r1, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 3df8: e584106c str r1, [r4, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3dfc: e5841050 str r1, [r4, #80] the_watchdog->routine = routine; 3e00: e5842064 str r2, [r4, #100] the_watchdog->id = id; 3e04: e5843068 str r3, [r4, #104] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 3e08: e5847054 str r7, [r4, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 3e0c: e59f0058 ldr r0, [pc, #88] ; 3e6c <_Event_Seize+0x118> 3e10: e2841048 add r1, r4, #72 ; 0x48 3e14: eb000d52 bl 7364 <_Watchdog_Insert> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 3e18: e1a00004 mov r0, r4 3e1c: e3a01c01 mov r1, #256 ; 0x100 3e20: eb000b71 bl 6bec <_Thread_Set_state> _ISR_Disable( level ); 3e24: e10fc000 mrs ip, CPSR 3e28: e38c30c0 orr r3, ip, #192 ; 0xc0 3e2c: e129f003 msr CPSR_fc, r3 sync_state = _Event_Sync_state; 3e30: e59f202c ldr r2, [pc, #44] ; 3e64 <_Event_Seize+0x110> 3e34: e5920000 ldr r0, [r2] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 3e38: e3a03000 mov r3, #0 ; 0x0 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 3e3c: e3500001 cmp r0, #1 ; 0x1 _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 3e40: e5823000 str r3, [r2] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 3e44: 1a000001 bne 3e50 <_Event_Seize+0xfc> _ISR_Enable( level ); 3e48: e129f00c msr CPSR_fc, ip 3e4c: e8bd80f0 pop {r4, r5, r6, r7, pc} * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 3e50: e1a01004 mov r1, r4 <== NOT EXECUTED 3e54: e1a0200c mov r2, ip <== NOT EXECUTED } 3e58: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 3e5c: ea00078a b 5c8c <_Thread_blocking_operation_Cancel> <== NOT EXECUTED 3e60: 000162c4 .word 0x000162c4 3e64: 00016ab0 .word 0x00016ab0 3e68: 00004004 .word 0x00004004 3e6c: 000162e4 .word 0x000162e4 00003ec8 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 3ec8: e92d40f0 push {r4, r5, r6, r7, lr} 3ecc: e1a04000 mov r4, r0 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 3ed0: e5906104 ldr r6, [r0, #260] option_set = (rtems_option) the_thread->Wait.option; 3ed4: e5907030 ldr r7, [r0, #48] _ISR_Disable( level ); 3ed8: e10f5000 mrs r5, CPSR 3edc: e38530c0 orr r3, r5, #192 ; 0xc0 3ee0: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 3ee4: e596c000 ldr ip, [r6] event_condition = (rtems_event_set) the_thread->Wait.count; 3ee8: e5902024 ldr r2, [r0, #36] seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 3eec: e012000c ands r0, r2, ip 3ef0: 1a000001 bne 3efc <_Event_Surrender+0x34> _ISR_Enable( level ); 3ef4: e129f005 msr CPSR_fc, r5 3ef8: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 3efc: e59f30f0 ldr r3, [pc, #240] ; 3ff4 <_Event_Surrender+0x12c> 3f00: e5933000 ldr r3, [r3] 3f04: e3530000 cmp r3, #0 ; 0x0 3f08: 0a000019 beq 3f74 <_Event_Surrender+0xac> 3f0c: e59f30e4 ldr r3, [pc, #228] ; 3ff8 <_Event_Surrender+0x130> 3f10: e5933000 ldr r3, [r3] 3f14: e1540003 cmp r4, r3 3f18: 1a000015 bne 3f74 <_Event_Surrender+0xac> 3f1c: e59f10d8 ldr r1, [pc, #216] ; 3ffc <_Event_Surrender+0x134> <== NOT EXECUTED 3f20: e5913000 ldr r3, [r1] <== NOT EXECUTED 3f24: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 3f28: 0a000002 beq 3f38 <_Event_Surrender+0x70> <== NOT EXECUTED 3f2c: e5913000 ldr r3, [r1] <== NOT EXECUTED 3f30: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 3f34: 1a00000e bne 3f74 <_Event_Surrender+0xac> <== NOT EXECUTED _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 3f38: e1500002 cmp r0, r2 <== NOT EXECUTED 3f3c: 0a000001 beq 3f48 <_Event_Surrender+0x80> <== NOT EXECUTED 3f40: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED 3f44: 0a000008 beq 3f6c <_Event_Surrender+0xa4> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 3f48: e1cc3000 bic r3, ip, r0 <== NOT EXECUTED 3f4c: e5863000 str r3, [r6] <== NOT EXECUTED the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 3f50: e59f30a4 ldr r3, [pc, #164] ; 3ffc <_Event_Surrender+0x134> <== NOT EXECUTED ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3f54: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 3f58: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 3f5c: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 3f60: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 3f64: e5843024 str r3, [r4, #36] <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3f68: e5810000 str r0, [r1] <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); 3f6c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 3f70: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 3f74: e5943010 ldr r3, [r4, #16] 3f78: e3130c01 tst r3, #256 ; 0x100 3f7c: 0a00001a beq 3fec <_Event_Surrender+0x124> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 3f80: e1500002 cmp r0, r2 3f84: 0a000001 beq 3f90 <_Event_Surrender+0xc8> 3f88: e3170002 tst r7, #2 ; 0x2 3f8c: 0a000016 beq 3fec <_Event_Surrender+0x124> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 3f90: e1cc3000 bic r3, ip, r0 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3f94: e5942028 ldr r2, [r4, #40] /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 3f98: e5863000 str r3, [r6] the_thread->Wait.count = 0; 3f9c: e3a03000 mov r3, #0 ; 0x0 3fa0: e5843024 str r3, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3fa4: e5820000 str r0, [r2] _ISR_Flash( level ); 3fa8: e10f3000 mrs r3, CPSR 3fac: e129f005 msr CPSR_fc, r5 3fb0: e129f003 msr CPSR_fc, r3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3fb4: e5943050 ldr r3, [r4, #80] 3fb8: e3530002 cmp r3, #2 ; 0x2 3fbc: 0a000001 beq 3fc8 <_Event_Surrender+0x100> _ISR_Enable( level ); 3fc0: e129f005 msr CPSR_fc, r5 3fc4: ea000004 b 3fdc <_Event_Surrender+0x114> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 3fc8: e3a03003 mov r3, #3 ; 0x3 3fcc: e5843050 str r3, [r4, #80] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 3fd0: e129f005 msr CPSR_fc, r5 (void) _Watchdog_Remove( &the_thread->Timer ); 3fd4: e2840048 add r0, r4, #72 ; 0x48 3fd8: eb000d3d bl 74d4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3fdc: e59f101c ldr r1, [pc, #28] ; 4000 <_Event_Surrender+0x138> 3fe0: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } 3fe4: e8bd40f0 pop {r4, r5, r6, r7, lr} 3fe8: ea0007a2 b 5e78 <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 3fec: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 3ff0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 3ff4: 000162a0 .word 0x000162a0 3ff8: 000162c4 .word 0x000162c4 3ffc: 00016ab0 .word 0x00016ab0 4000: 1003fff8 .word 0x1003fff8 00004004 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 4004: e52de004 push {lr} ; (str lr, [sp, #-4]!) 4008: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 400c: e1a0100d mov r1, sp 4010: eb0008a1 bl 629c <_Thread_Get> switch ( location ) { 4014: e59d2000 ldr r2, [sp] 4018: e3520000 cmp r2, #0 ; 0x0 401c: 1a00001e bne 409c <_Event_Timeout+0x98> * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 4020: e10f1000 mrs r1, CPSR 4024: e38130c0 orr r3, r1, #192 ; 0xc0 4028: e129f003 msr CPSR_fc, r3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 402c: e5903024 ldr r3, [r0, #36] 4030: e3530000 cmp r3, #0 ; 0x0 4034: 1a000005 bne 4050 <_Event_Timeout+0x4c> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4038: e59f2064 ldr r2, [pc, #100] ; 40a4 <_Event_Timeout+0xa0> <== NOT EXECUTED 403c: e5923000 ldr r3, [r2] <== NOT EXECUTED 4040: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 4044: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4048: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 404c: ea000012 b 409c <_Event_Timeout+0x98> <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 4050: e59f3050 ldr r3, [pc, #80] ; 40a8 <_Event_Timeout+0xa4> 4054: e5933000 ldr r3, [r3] 4058: e1500003 cmp r0, r3 _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 405c: e5802024 str r2, [r0, #36] if ( _Thread_Is_executing( the_thread ) ) { 4060: 1a000004 bne 4078 <_Event_Timeout+0x74> Thread_blocking_operation_States sync = _Event_Sync_state; 4064: e59f2040 ldr r2, [pc, #64] ; 40ac <_Event_Timeout+0xa8> <== NOT EXECUTED 4068: e5923000 ldr r3, [r2] <== NOT EXECUTED if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 406c: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4070: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED 4074: 95823000 strls r3, [r2] <== NOT EXECUTED } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 4078: e3a03006 mov r3, #6 ; 0x6 407c: e5803034 str r3, [r0, #52] _ISR_Enable( level ); 4080: e129f001 msr CPSR_fc, r1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4084: e59f1024 ldr r1, [pc, #36] ; 40b0 <_Event_Timeout+0xac> 4088: eb00077a bl 5e78 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 408c: e59f2010 ldr r2, [pc, #16] ; 40a4 <_Event_Timeout+0xa0> 4090: e5923000 ldr r3, [r2] 4094: e2433001 sub r3, r3, #1 ; 0x1 4098: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 409c: e28dd004 add sp, sp, #4 ; 0x4 40a0: e8bd8000 pop {pc} 40a4: 0001620c .word 0x0001620c 40a8: 000162c4 .word 0x000162c4 40ac: 00016ab0 .word 0x00016ab0 40b0: 1003fff8 .word 0x1003fff8 00009e60 <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 9e60: e92d4070 push {r4, r5, r6, lr} 9e64: e1a04000 mov r4, r0 Heap_Block *the_block; void *ptr = NULL; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); the_size = 9e68: e5942014 ldr r2, [r4, #20] 9e6c: e1a00001 mov r0, r1 9e70: e5941010 ldr r1, [r4, #16] 9e74: ebffed5c bl 53ec <_Heap_Calc_block_size> _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 9e78: e3500000 cmp r0, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 9e7c: 15945008 ldrne r5, [r4, #8] 9e80: 13a06000 movne r6, #0 ; 0x0 9e84: 1a000012 bne 9ed4 <_Heap_Allocate+0x74> 9e88: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 9e8c: e5953004 ldr r3, [r5, #4] 9e90: e1530000 cmp r3, r0 9e94: 3a00000c bcc 9ecc <_Heap_Allocate+0x6c> (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 9e98: e1a02000 mov r2, r0 9e9c: e1a01005 mov r1, r5 9ea0: e1a00004 mov r0, r4 9ea4: ebffed60 bl 542c <_Heap_Block_allocate> ptr = _Heap_User_area(the_block); stats->allocs += 1; stats->searches += search_count + 1; 9ea8: e2842048 add r2, r4, #72 ; 0x48 9eac: e892000c ldm r2, {r2, r3} 9eb0: e2833001 add r3, r3, #1 ; 0x1 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 9eb4: e2822001 add r2, r2, #1 ; 0x1 stats->searches += search_count + 1; 9eb8: e0833006 add r3, r3, r6 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 9ebc: e5842048 str r2, [r4, #72] stats->searches += search_count + 1; 9ec0: e584304c str r3, [r4, #76] 9ec4: e2850008 add r0, r5, #8 ; 0x8 9ec8: ea000004 b 9ee0 <_Heap_Allocate+0x80> return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 9ecc: e5955008 ldr r5, [r5, #8] 9ed0: e2866001 add r6, r6, #1 ; 0x1 if(the_size == 0) return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 9ed4: e1550004 cmp r5, r4 9ed8: 1affffeb bne 9e8c <_Heap_Allocate+0x2c> 9edc: e3a00000 mov r0, #0 ; 0x0 _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 9ee0: e5943044 ldr r3, [r4, #68] 9ee4: e1530006 cmp r3, r6 stats->max_search = search_count; 9ee8: 35846044 strcc r6, [r4, #68] return ptr; } 9eec: e8bd8070 pop {r4, r5, r6, pc} 00028744 <_Heap_Get_information>: Heap_Block *const end = the_heap->final; _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 28744: e3a03000 mov r3, #0 ; 0x0 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 28748: e92d4030 push {r4, r5, lr} 2874c: e1a0c001 mov ip, r1 the_info->Free.number = 0; the_info->Free.total = 0; the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; 28750: e5813010 str r3, [r1, #16] Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 28754: e5905024 ldr r5, [r0, #36] _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 28758: e5813000 str r3, [r1] the_info->Free.total = 0; 2875c: e5813008 str r3, [r1, #8] the_info->Free.largest = 0; 28760: e5813004 str r3, [r1, #4] the_info->Used.number = 0; 28764: e581300c str r3, [r1, #12] the_info->Used.total = 0; 28768: e5813014 str r3, [r1, #20] Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; 2876c: e5902020 ldr r2, [r0, #32] 28770: ea00001e b 287f0 <_Heap_Get_information+0xac> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 28774: e5923004 ldr r3, [r2, #4] 28778: e3c30001 bic r0, r3, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 2877c: e0824000 add r4, r2, r0 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { 28780: e5943004 ldr r3, [r4, #4] 28784: e3130001 tst r3, #1 ; 0x1 28788: 0a000009 beq 287b4 <_Heap_Get_information+0x70> the_info->Used.number++; 2878c: e59c300c ldr r3, [ip, #12] the_info->Used.total += the_size; 28790: e59c1014 ldr r1, [ip, #20] if ( the_info->Used.largest < the_size ) 28794: e59c2010 ldr r2, [ip, #16] while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 28798: e2833001 add r3, r3, #1 ; 0x1 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 2879c: e1520000 cmp r2, r0 uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; the_info->Used.total += the_size; 287a0: e0811000 add r1, r1, r0 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 287a4: e58c300c str r3, [ip, #12] the_info->Used.total += the_size; 287a8: e58c1014 str r1, [ip, #20] if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; 287ac: 358c0010 strcc r0, [ip, #16] 287b0: ea00000d b 287ec <_Heap_Get_information+0xa8> } else { the_info->Free.number++; 287b4: e59c3000 ldr r3, [ip] the_info->Free.total += the_size; 287b8: e59c1008 ldr r1, [ip, #8] if ( the_info->Free.largest < the_size ) 287bc: e59c2004 ldr r2, [ip, #4] the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 287c0: e2833001 add r3, r3, #1 ; 0x1 the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 287c4: e1520000 cmp r2, r0 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; the_info->Free.total += the_size; 287c8: e0811000 add r1, r1, r0 if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; 287cc: 358c0004 strcc r0, [ip, #4] the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 287d0: e58c3000 str r3, [ip] the_info->Free.total += the_size; 287d4: e58c1008 str r1, [ip, #8] if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) 287d8: e5943000 ldr r3, [r4] 287dc: e1500003 cmp r0, r3 287e0: 0a000001 beq 287ec <_Heap_Get_information+0xa8> 287e4: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 287e8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 287ec: e1a02004 mov r2, r4 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 287f0: e1520005 cmp r2, r5 287f4: 1affffde bne 28774 <_Heap_Get_information+0x30> } /* Handle the last dummy block. Don't consider this block to be "used" as client never allocated it. Make 'Used.total' contain this blocks' overhead though. */ the_info->Used.total += HEAP_OVERHEAD; 287f8: e59c3014 ldr r3, [ip, #20] 287fc: e2833008 add r3, r3, #8 ; 0x8 28800: e58c3014 str r3, [ip, #20] 28804: e3a00000 mov r0, #0 ; 0x0 return HEAP_GET_INFORMATION_SUCCESSFUL; } 28808: e8bd8030 pop {r4, r5, pc} 00013de4 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13de4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 13de8: e1a05000 mov r5, r0 Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 13dec: e5900014 ldr r0, [r0, #20] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13df0: e24dd00c sub sp, sp, #12 ; 0xc Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 13df4: e58d0004 str r0, [sp, #4] uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; *avail_mem_size = 0; 13df8: e59d0030 ldr r0, [sp, #48] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13dfc: e1a09003 mov r9, r3 uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; 13e00: e3a03000 mov r3, #0 ; 0x0 uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; 13e04: e595c010 ldr ip, [r5, #16] *old_mem_size = 0; 13e08: e5893000 str r3, [r9] *avail_mem_size = 0; 13e0c: e5803000 str r3, [r0] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13e10: e1a04001 mov r4, r1 /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 13e14: e1a00001 mov r0, r1 13e18: e5951010 ldr r1, [r5, #16] 13e1c: e1a08002 mov r8, r2 uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; 13e20: e58dc008 str ip, [sp, #8] 13e24: ebfff8ca bl 12154 <__umodsi3> 13e28: e2443008 sub r3, r4, #8 ; 0x8 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in ( Heap_Control *the_heap, Heap_Block *the_block ) { return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final ); 13e2c: e2851020 add r1, r5, #32 ; 0x20 13e30: e8910006 ldm r1, {r1, r2} /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 13e34: e0607003 rsb r7, r0, r3 *old_mem_size = 0; *avail_mem_size = 0; _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 13e38: e1570001 cmp r7, r1 13e3c: 33a03000 movcc r3, #0 ; 0x0 13e40: 23a03001 movcs r3, #1 ; 0x1 13e44: e1570002 cmp r7, r2 13e48: 83a03000 movhi r3, #0 ; 0x0 13e4c: e3530000 cmp r3, #0 ; 0x0 13e50: 0a000075 beq 1402c <_Heap_Resize_block+0x248> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 13e54: e597c004 ldr ip, [r7, #4] */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 13e58: e3cc3001 bic r3, ip, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 13e5c: e0876003 add r6, r7, r3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 13e60: e58d3000 str r3, [sp] old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 13e64: e1560001 cmp r6, r1 13e68: 33a03000 movcc r3, #0 ; 0x0 13e6c: 23a03001 movcs r3, #1 ; 0x1 13e70: e1560002 cmp r6, r2 13e74: 83a03000 movhi r3, #0 ; 0x0 13e78: e3530000 cmp r3, #0 ; 0x0 13e7c: 0a00006a beq 1402c <_Heap_Resize_block+0x248> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 13e80: e5963004 ldr r3, [r6, #4] 13e84: e3130001 tst r3, #1 ; 0x1 13e88: 0a000067 beq 1402c <_Heap_Resize_block+0x248> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 13e8c: e3c3a001 bic sl, r3, #1 ; 0x1 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 13e90: e1560002 cmp r6, r2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 13e94: e086300a add r3, r6, sl 13e98: 15933004 ldrne r3, [r3, #4] 13e9c: 12032001 andne r2, r3, #1 ; 0x1 _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 13ea0: e0643006 rsb r3, r4, r6 13ea4: e2830004 add r0, r3, #4 ; 0x4 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 13ea8: 03a02001 moveq r2, #1 ; 0x1 old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 13eac: e1580000 cmp r8, r0 /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 13eb0: e5890000 str r0, [r9] !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 13eb4: e202b0ff and fp, r2, #255 ; 0xff _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 13eb8: e20c9001 and r9, ip, #1 ; 0x1 old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 13ebc: 9a000019 bls 13f28 <_Heap_Resize_block+0x144> /* Need to extend the block: allocate part of the next block and then merge 'the_block' and allocated block together. */ if (next_is_used) /* Next block is in use, -- no way to extend */ 13ec0: e35b0000 cmp fp, #0 ; 0x0 13ec4: 1a00005a bne 14034 <_Heap_Resize_block+0x250> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 13ec8: e0604008 rsb r4, r0, r8 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 13ecc: e1a00004 mov r0, r4 13ed0: e59d1008 ldr r1, [sp, #8] 13ed4: ebfff89e bl 12154 <__umodsi3> *value = r ? v - r + a : v; 13ed8: e3500000 cmp r0, #0 ; 0x0 13edc: 159dc008 ldrne ip, [sp, #8] 13ee0: e59d2004 ldr r2, [sp, #4] 13ee4: 1084300c addne r3, r4, ip 13ee8: 10604003 rsbne r4, r0, r3 13eec: e1540002 cmp r4, r2 13ef0: 21a02004 movcs r2, r4 _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 13ef4: e152000a cmp r2, sl 13ef8: 8a00004d bhi 14034 <_Heap_Resize_block+0x250> return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 13efc: e1a01006 mov r1, r6 13f00: e1a00005 mov r0, r5 13f04: ebffc548 bl 542c <_Heap_Block_allocate> _Heap_Block_allocate(the_heap, next_block, add_block_size); /* Merge two subsequent blocks */ the_block->size = (old_block_size + add_block_size) | prev_used_flag; 13f08: e59d2000 ldr r2, [sp] 13f0c: e0800002 add r0, r0, r2 13f10: e1800009 orr r0, r0, r9 13f14: e5870004 str r0, [r7, #4] --stats->used_blocks; 13f18: e5953040 ldr r3, [r5, #64] 13f1c: e2433001 sub r3, r3, #1 ; 0x1 13f20: e5853040 str r3, [r5, #64] 13f24: ea00003b b 14018 <_Heap_Resize_block+0x234> } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 13f28: e0684000 rsb r4, r8, r0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 13f2c: e1a00004 mov r0, r4 13f30: e59d1008 ldr r1, [sp, #8] 13f34: ebfff886 bl 12154 <__umodsi3> _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 13f38: e0544000 subs r4, r4, r0 13f3c: 0a000035 beq 14018 <_Heap_Resize_block+0x234> /* To free some memory the block should be shortened so that it can can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; 13f40: e89d1008 ldm sp, {r3, ip} 13f44: e0640003 rsb r0, r4, r3 if (new_block_size < min_block_size) { 13f48: e150000c cmp r0, ip 13f4c: 2a000007 bcs 13f70 <_Heap_Resize_block+0x18c> uint32_t delta = min_block_size - new_block_size; 13f50: e060300c rsb r3, r0, ip _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 13f54: e0544003 subs r4, r4, r3 ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 13f58: 10800003 addne r0, r0, r3 if (new_block_size < min_block_size) { uint32_t delta = min_block_size - new_block_size; _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { ++stats->resizes; 13f5c: 05953054 ldreq r3, [r5, #84] 13f60: 02833001 addeq r3, r3, #1 ; 0x1 13f64: 05853054 streq r3, [r5, #84] 13f68: 01a00004 moveq r0, r4 13f6c: 0a000031 beq 14038 <_Heap_Resize_block+0x254> _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 13f70: e35b0000 cmp fp, #0 ; 0x0 13f74: 1a000013 bne 13fc8 <_Heap_Resize_block+0x1e4> /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 13f78: e084200a add r2, r4, sl RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 13f7c: e0871000 add r1, r7, r0 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 13f80: e1803009 orr r3, r0, r9 new_next_block->size = new_next_block_size | HEAP_PREV_USED; 13f84: e3820001 orr r0, r2, #1 ; 0x1 Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 13f88: e5873004 str r3, [r7, #4] new_next_block->size = new_next_block_size | HEAP_PREV_USED; next_next_block->prev_size = new_next_block_size; 13f8c: e786200a str r2, [r6, sl] _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; 13f90: e5810004 str r0, [r1, #4] next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 13f94: e5953030 ldr r3, [r5, #48] 13f98: e0833004 add r3, r3, r4 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 13f9c: e596000c ldr r0, [r6, #12] Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 13fa0: e596c008 ldr ip, [r6, #8] 13fa4: e5853030 str r3, [r5, #48] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 13fa8: e59d3030 ldr r3, [sp, #48] 13fac: e2422004 sub r2, r2, #4 ; 0x4 Heap_Block *prev = block->prev; block = new_block; block->next = next; 13fb0: e581c008 str ip, [r1, #8] block->prev = prev; 13fb4: e581000c str r0, [r1, #12] 13fb8: e5832000 str r2, [r3] next->prev = prev->next = block; 13fbc: e5801008 str r1, [r0, #8] 13fc0: e58c100c str r1, [ip, #12] 13fc4: ea000013 b 14018 <_Heap_Resize_block+0x234> } else if (free_block_size >= min_block_size) { 13fc8: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 13fcc: e154000c cmp r4, ip <== NOT EXECUTED 13fd0: 3a000010 bcc 14018 <_Heap_Resize_block+0x234> <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 13fd4: e0871000 add r1, r7, r0 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 13fd8: e1803009 orr r3, r0, r9 <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 13fdc: e3842001 orr r2, r4, #1 ; 0x1 <== NOT EXECUTED the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 13fe0: e5873004 str r3, [r7, #4] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 13fe4: e5812004 str r2, [r1, #4] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 13fe8: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 13fec: e5952050 ldr r2, [r5, #80] <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 13ff0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 13ff4: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 13ff8: e5853040 str r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 13ffc: e5852050 str r2, [r5, #80] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 14000: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED 14004: e1a00005 mov r0, r5 <== NOT EXECUTED 14008: ebffd7b8 bl 9ef0 <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 1400c: e59d0030 ldr r0, [sp, #48] <== NOT EXECUTED 14010: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED 14014: e5803000 str r3, [r0] <== NOT EXECUTED } } } ++stats->resizes; 14018: e5953054 ldr r3, [r5, #84] 1401c: e2833001 add r3, r3, #1 ; 0x1 14020: e5853054 str r3, [r5, #84] 14024: e3a00000 mov r0, #0 ; 0x0 14028: ea000002 b 14038 <_Heap_Resize_block+0x254> return HEAP_RESIZE_SUCCESSFUL; 1402c: e3a00002 mov r0, #2 ; 0x2 14030: ea000000 b 14038 <_Heap_Resize_block+0x254> 14034: e3a00001 mov r0, #1 ; 0x1 } 14038: e28dd00c add sp, sp, #12 ; 0xc 1403c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0000d4e0 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { d4e0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *the_block = the_heap->start; d4e4: e5907020 ldr r7, [r0, #32] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { d4e8: e5973004 ldr r3, [r7, #4] /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) d4ec: e2516000 subs r6, r1, #0 ; 0x0 source = the_heap->stats.instance; d4f0: b5906028 ldrlt r6, [r0, #40] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { d4f4: e3130001 tst r3, #1 ; 0x1 bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { d4f8: e1a05000 mov r5, r0 Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; d4fc: e590b024 ldr fp, [r0, #36] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { d500: 13a04000 movne r4, #0 ; 0x0 d504: 1a000003 bne d518 <_Heap_Walk+0x38> printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); d508: e59f01a0 ldr r0, [pc, #416] ; d6b0 <_Heap_Walk+0x1d0> <== NOT EXECUTED d50c: e1a01006 mov r1, r6 <== NOT EXECUTED d510: ebffdc3f bl 4614 <== NOT EXECUTED d514: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { d518: e5972000 ldr r2, [r7] d51c: e5953010 ldr r3, [r5, #16] d520: e1520003 cmp r2, r3 d524: 0a00004c beq d65c <_Heap_Walk+0x17c> printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); d528: e59f0184 ldr r0, [pc, #388] ; d6b4 <_Heap_Walk+0x1d4> <== NOT EXECUTED d52c: e1a01006 mov r1, r6 <== NOT EXECUTED d530: ebffdc37 bl 4614 <== NOT EXECUTED d534: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED d538: ea000047 b d65c <_Heap_Walk+0x17c> <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); d53c: e5979004 ldr r9, [r7, #4] printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { d540: e5952020 ldr r2, [r5, #32] d544: e3c9a001 bic sl, r9, #1 ; 0x1 d548: e5953024 ldr r3, [r5, #36] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); d54c: e087800a add r8, r7, sl d550: e1580002 cmp r8, r2 d554: 33a01000 movcc r1, #0 ; 0x0 d558: 23a01001 movcs r1, #1 ; 0x1 d55c: e1580003 cmp r8, r3 d560: 83a01000 movhi r1, #0 ; 0x0 d564: e3510000 cmp r1, #0 ; 0x0 d568: 1a000004 bne d580 <_Heap_Walk+0xa0> if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); d56c: e1a02008 mov r2, r8 <== NOT EXECUTED d570: e59f0140 ldr r0, [pc, #320] ; d6b8 <_Heap_Walk+0x1d8> <== NOT EXECUTED d574: e1a01006 mov r1, r6 <== NOT EXECUTED d578: ebffdc25 bl 4614 <== NOT EXECUTED d57c: ea000039 b d668 <_Heap_Walk+0x188> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { d580: e5983004 ldr r3, [r8, #4] d584: e3130001 tst r3, #1 ; 0x1 d588: 1a00001e bne d608 <_Heap_Walk+0x128> if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { d58c: e5983000 ldr r3, [r8] d590: e15a0003 cmp sl, r3 d594: 0a000003 beq d5a8 <_Heap_Walk+0xc8> if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); d598: e59f011c ldr r0, [pc, #284] ; d6bc <_Heap_Walk+0x1dc> <== NOT EXECUTED d59c: e1a01006 mov r1, r6 <== NOT EXECUTED d5a0: ebffdc1b bl 4614 <== NOT EXECUTED d5a4: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (!prev_used) { d5a8: e3190001 tst r9, #1 ; 0x1 d5ac: 1a000006 bne d5cc <_Heap_Walk+0xec> if (do_dump || error) printk("\n"); d5b0: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED d5b4: 159f0104 ldrne r0, [pc, #260] ; d6c0 <_Heap_Walk+0x1e0> <== NOT EXECUTED d5b8: 1bffdc15 blne 4614 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); d5bc: e59f0100 ldr r0, [pc, #256] ; d6c4 <_Heap_Walk+0x1e4> <== NOT EXECUTED d5c0: e1a01006 mov r1, r6 <== NOT EXECUTED d5c4: ebffdc12 bl 4614 <== NOT EXECUTED d5c8: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; d5cc: e5953008 ldr r3, [r5, #8] d5d0: ea000000 b d5d8 <_Heap_Walk+0xf8> } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; d5d4: e5933008 ldr r3, [r3, #8] error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) d5d8: e1530007 cmp r3, r7 d5dc: 11530005 cmpne r3, r5 d5e0: 1afffffb bne d5d4 <_Heap_Walk+0xf4> block = block->next; if(block != the_block) { d5e4: e1530007 cmp r3, r7 d5e8: 0a000006 beq d608 <_Heap_Walk+0x128> if (do_dump || error) printk("\n"); d5ec: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED d5f0: 159f00c8 ldrne r0, [pc, #200] ; d6c0 <_Heap_Walk+0x1e0> <== NOT EXECUTED d5f4: 1bffdc06 blne 4614 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); d5f8: e59f00c8 ldr r0, [pc, #200] ; d6c8 <_Heap_Walk+0x1e8> <== NOT EXECUTED d5fc: e1a01006 mov r1, r6 <== NOT EXECUTED d600: ebffdc03 bl 4614 <== NOT EXECUTED d604: ea000001 b d610 <_Heap_Walk+0x130> <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); d608: e3540000 cmp r4, #0 ; 0x0 d60c: 0a000002 beq d61c <_Heap_Walk+0x13c> d610: e59f00a8 ldr r0, [pc, #168] ; d6c0 <_Heap_Walk+0x1e0> <== NOT EXECUTED d614: ebffdbfe bl 4614 <== NOT EXECUTED d618: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { d61c: e5953014 ldr r3, [r5, #20] d620: e15a0003 cmp sl, r3 printk("PASS: %d !block size is too small\n", source); d624: 359f00a0 ldrcc r0, [pc, #160] ; d6cc <_Heap_Walk+0x1ec> d628: 3a000005 bcc d644 <_Heap_Walk+0x164> error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { d62c: e1a0000a mov r0, sl d630: e5951010 ldr r1, [r5, #16] d634: eb0026bf bl 17138 <__umodsi3> d638: e3500000 cmp r0, #0 ; 0x0 d63c: 0a000003 beq d650 <_Heap_Walk+0x170> printk("PASS: %d !block size is misaligned\n", source); d640: e59f0088 ldr r0, [pc, #136] ; d6d0 <_Heap_Walk+0x1f0> <== NOT EXECUTED d644: e1a01006 mov r1, r6 <== NOT EXECUTED d648: ebffdbf1 bl 4614 <== NOT EXECUTED d64c: ea000005 b d668 <_Heap_Walk+0x188> <== NOT EXECUTED error = 1; } if (++passes > (do_dump ? 10 : 0) && error) d650: e3540000 cmp r4, #0 ; 0x0 d654: 1a000003 bne d668 <_Heap_Walk+0x188> break; d658: e1a07008 mov r7, r8 if (the_block->prev_size != the_heap->page_size) { printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); error = 1; } while ( the_block != end ) { d65c: e157000b cmp r7, fp d660: 1affffb5 bne d53c <_Heap_Walk+0x5c> d664: ea000005 b d680 <_Heap_Walk+0x1a0> the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", d668: e1a0300b mov r3, fp <== NOT EXECUTED d66c: e59f0060 ldr r0, [pc, #96] ; d6d4 <_Heap_Walk+0x1f4> <== NOT EXECUTED d670: e1a01006 mov r1, r6 <== NOT EXECUTED d674: e1a02007 mov r2, r7 <== NOT EXECUTED d678: ebffdbe5 bl 4614 <== NOT EXECUTED d67c: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); d680: e5973004 ldr r3, [r7, #4] source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { d684: e5950010 ldr r0, [r5, #16] d688: e3c32001 bic r2, r3, #1 ; 0x1 d68c: e1520000 cmp r2, r0 d690: 0a000004 beq d6a8 <_Heap_Walk+0x1c8> printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, d694: e1a03000 mov r3, r0 <== NOT EXECUTED d698: e1a01006 mov r1, r6 <== NOT EXECUTED d69c: e59f0034 ldr r0, [pc, #52] ; d6d8 <_Heap_Walk+0x1f8> <== NOT EXECUTED d6a0: ebffdbdb bl 4614 <== NOT EXECUTED d6a4: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } d6a8: e1a00004 mov r0, r4 d6ac: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} d6b0: 0001ad22 .word 0x0001ad22 d6b4: 0001ad58 .word 0x0001ad58 d6b8: 0001ad8a .word 0x0001ad8a d6bc: 0001adad .word 0x0001adad d6c0: 0001a725 .word 0x0001a725 d6c4: 0001add8 .word 0x0001add8 d6c8: 0001ae02 .word 0x0001ae02 d6cc: 0001ae2b .word 0x0001ae2b d6d0: 0001ae4e .word 0x0001ae4e d6d4: 0001ae72 .word 0x0001ae72 d6d8: 0001aead .word 0x0001aead 0000a0e4 <_Objects_API_maximum_class>: int _Objects_API_maximum_class( uint32_t api ) { switch (api) { a0e4: e2400001 sub r0, r0, #1 ; 0x1 a0e8: e3500003 cmp r0, #3 ; 0x3 a0ec: 979ff100 ldrls pc, [pc, r0, lsl #2] a0f0: ea00000b b a124 <_Objects_API_maximum_class+0x40> a0f4: 0000a10c .word 0x0000a10c <== NOT EXECUTED a0f8: 0000a104 .word 0x0000a104 <== NOT EXECUTED a0fc: 0000a114 .word 0x0000a114 <== NOT EXECUTED a100: 0000a11c .word 0x0000a11c <== NOT EXECUTED a104: e3a0000a mov r0, #10 ; 0xa a108: e12fff1e bx lr a10c: e3a00002 mov r0, #2 ; 0x2 a110: e12fff1e bx lr a114: e3a0000c mov r0, #12 ; 0xc a118: e12fff1e bx lr case OBJECTS_INTERNAL_API: return OBJECTS_INTERNAL_CLASSES_LAST; case OBJECTS_CLASSIC_API: return OBJECTS_RTEMS_CLASSES_LAST; case OBJECTS_POSIX_API: return OBJECTS_POSIX_CLASSES_LAST; a11c: e3a00008 mov r0, #8 ; 0x8 a120: e12fff1e bx lr case OBJECTS_ITRON_API: return OBJECTS_ITRON_CLASSES_LAST; a124: e3e00000 mvn r0, #0 ; 0x0 case OBJECTS_NO_API: default: break; } return -1; } a128: e12fff1e bx lr 000055e0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 55e0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 55e4: e1d060b8 ldrh r6, [r0, #8] minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 55e8: e1d041b0 ldrh r4, [r0, #16] 55ec: e1540006 cmp r4, r6 55f0: 33a07000 movcc r7, #0 ; 0x0 */ void _Objects_Extend_information( Objects_Information *information ) { 55f4: e24dd014 sub sp, sp, #20 ; 0x14 55f8: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 55fc: 31a0a006 movcc sl, r6 5600: 31a08007 movcc r8, r7 5604: 3a00000f bcc 5648 <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; 5608: e5909014 ldr r9, [r0, #20] 560c: e1a00004 mov r0, r4 5610: e1a01009 mov r1, r9 5614: eb00328a bl 12044 <__aeabi_uidiv> 5618: e1a0a006 mov sl, r6 561c: e1a07000 mov r7, r0 5620: e3a08000 mov r8, #0 ; 0x0 5624: ea000005 b 5640 <_Objects_Extend_information+0x60> for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 5628: e5953034 ldr r3, [r5, #52] 562c: e7933108 ldr r3, [r3, r8, lsl #2] 5630: e3530000 cmp r3, #0 ; 0x0 5634: 0a000003 beq 5648 <_Objects_Extend_information+0x68> break; else index_base += information->allocation_size; 5638: e08aa009 add sl, sl, r9 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 563c: e2888001 add r8, r8, #1 ; 0x1 5640: e1580007 cmp r8, r7 5644: 3afffff7 bcc 5628 <_Objects_Extend_information+0x48> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 5648: e15a0004 cmp sl, r4 564c: 3a000056 bcc 57ac <_Objects_Extend_information+0x1cc> /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5650: e5d52012 ldrb r2, [r5, #18] * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 5654: e5953014 ldr r3, [r5, #20] /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5658: e3520000 cmp r2, #0 ; 0x0 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 565c: e0843003 add r3, r4, r3 5660: e58d3004 str r3, [sp, #4] /* * Up the block count and maximum */ block_count++; 5664: e2874001 add r4, r7, #1 ; 0x1 5668: e0832006 add r2, r3, r6 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 566c: 0a000007 beq 5690 <_Objects_Extend_information+0xb0> object_blocks = (void**) 5670: e3a03003 mov r3, #3 ; 0x3 5674: e0202493 mla r0, r3, r4, r2 5678: e1a00100 lsl r0, r0, #2 567c: eb0007e6 bl 761c <_Workspace_Allocate> block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 5680: e3500000 cmp r0, #0 ; 0x0 5684: e58d0000 str r0, [sp] 5688: 1a000005 bne 56a4 <_Objects_Extend_information+0xc4> 568c: ea000078 b 5874 <_Objects_Extend_information+0x294> <== NOT EXECUTED return; } else { object_blocks = (void**) 5690: e3a03003 mov r3, #3 ; 0x3 5694: e0202493 mla r0, r3, r4, r2 5698: e1a00100 lsl r0, r0, #2 569c: eb0007e2 bl 762c <_Workspace_Allocate_or_fatal_error> 56a0: e58d0000 str r0, [sp] * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 56a4: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 56a8: e59d1000 ldr r1, [sp] 56ac: e1a02104 lsl r2, r4, #2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 56b0: e1530006 cmp r3, r6 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 56b4: e081b002 add fp, r1, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 56b8: 93a03000 movls r3, #0 ; 0x0 56bc: e08b9002 add r9, fp, r2 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 56c0: 91a02003 movls r2, r3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 56c4: 9a000011 bls 5710 <_Objects_Extend_information+0x130> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 56c8: e1a04107 lsl r4, r7, #2 56cc: e5951034 ldr r1, [r5, #52] 56d0: e1a02004 mov r2, r4 56d4: e59d0000 ldr r0, [sp] 56d8: eb0018f8 bl bac0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 56dc: e1a02004 mov r2, r4 56e0: e5951030 ldr r1, [r5, #48] 56e4: e1a0000b mov r0, fp 56e8: eb0018f4 bl bac0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 56ec: e1d521b0 ldrh r2, [r5, #16] 56f0: e0862002 add r2, r6, r2 56f4: e1a02102 lsl r2, r2, #2 56f8: e1a00009 mov r0, r9 56fc: e595101c ldr r1, [r5, #28] 5700: eb0018ee bl bac0 5704: ea000003 b 5718 <_Objects_Extend_information+0x138> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 5708: e7892103 str r2, [r9, r3, lsl #2] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 570c: e2833001 add r3, r3, #1 ; 0x1 5710: e1530006 cmp r3, r6 5714: 3afffffb bcc 5708 <_Objects_Extend_information+0x128> /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5718: e3a03000 mov r3, #0 ; 0x0 inactive_per_block[block_count] = 0; 571c: e78b3107 str r3, [fp, r7, lsl #2] /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5720: e59dc000 ldr ip, [sp] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5724: e5952014 ldr r2, [r5, #20] /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5728: e78c3107 str r3, [ip, r7, lsl #2] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 572c: e08a0002 add r0, sl, r2 5730: e089110a add r1, r9, sl, lsl #2 5734: e1a0200a mov r2, sl 5738: ea000000 b 5740 <_Objects_Extend_information+0x160> index++ ) { local_table[ index ] = NULL; 573c: e5013004 str r3, [r1, #-4] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5740: e1520000 cmp r2, r0 index++ ) { 5744: e2811004 add r1, r1, #4 ; 0x4 5748: e2822001 add r2, r2, #1 ; 0x1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 574c: 3afffffa bcc 573c <_Objects_Extend_information+0x15c> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 5750: e10f0000 mrs r0, CPSR 5754: e38030c0 orr r3, r0, #192 ; 0xc0 5758: e129f003 msr CPSR_fc, r3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 575c: e5953000 ldr r3, [r5] old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 5760: e59dc004 ldr ip, [sp, #4] information->maximum_id = _Objects_Build_id( 5764: e1d510b4 ldrh r1, [r5, #4] 5768: e1a03c03 lsl r3, r3, #24 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 576c: e1a0280c lsl r2, ip, #16 information->maximum_id = _Objects_Build_id( 5770: e3833801 orr r3, r3, #65536 ; 0x10000 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 5774: e1a02822 lsr r2, r2, #16 information->maximum_id = _Objects_Build_id( 5778: e1833d81 orr r3, r3, r1, lsl #27 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 577c: e59d1000 ldr r1, [sp] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 5780: e1833002 orr r3, r3, r2 5784: e585300c str r3, [r5, #12] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 5788: e585b030 str fp, [r5, #48] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 578c: e5953034 ldr r3, [r5, #52] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 5790: e585901c str r9, [r5, #28] information->maximum = maximum; 5794: e1c521b0 strh r2, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 5798: e5851034 str r1, [r5, #52] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 579c: e129f000 msr CPSR_fc, r0 if ( old_tables ) 57a0: e3530000 cmp r3, #0 ; 0x0 _Workspace_Free( old_tables ); 57a4: 11a00003 movne r0, r3 57a8: 1b000797 blne 760c <_Workspace_Free> /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 57ac: e5d53012 ldrb r3, [r5, #18] 57b0: e3530000 cmp r3, #0 ; 0x0 57b4: e5952014 ldr r2, [r5, #20] 57b8: e5954034 ldr r4, [r5, #52] 57bc: e5953018 ldr r3, [r5, #24] 57c0: 0a000007 beq 57e4 <_Objects_Extend_information+0x204> information->object_blocks[ block ] = 57c4: e0000392 mul r0, r2, r3 57c8: eb000793 bl 761c <_Workspace_Allocate> _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 57cc: e5953034 ldr r3, [r5, #52] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 57d0: e7840108 str r0, [r4, r8, lsl #2] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 57d4: e7933108 ldr r3, [r3, r8, lsl #2] 57d8: e3530000 cmp r3, #0 ; 0x0 57dc: 1a000003 bne 57f0 <_Objects_Extend_information+0x210> 57e0: ea000023 b 5874 <_Objects_Extend_information+0x294> <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 57e4: e0000392 mul r0, r2, r3 57e8: eb00078f bl 762c <_Workspace_Allocate_or_fatal_error> 57ec: e7840108 str r0, [r4, r8, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 57f0: e5953034 ldr r3, [r5, #52] 57f4: e28d4008 add r4, sp, #8 ; 0x8 57f8: e7931108 ldr r1, [r3, r8, lsl #2] 57fc: e1a00004 mov r0, r4 5800: e2852014 add r2, r5, #20 ; 0x14 5804: e892000c ldm r2, {r2, r3} 5808: eb001119 bl 9c74 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 580c: e1a0600a mov r6, sl /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 5810: e1a08108 lsl r8, r8, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5814: e2857020 add r7, r5, #32 ; 0x20 5818: ea000008 b 5840 <_Objects_Extend_information+0x260> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 581c: e5953000 ldr r3, [r5] 5820: e1d520b4 ldrh r2, [r5, #4] 5824: e1a03c03 lsl r3, r3, #24 5828: e3833801 orr r3, r3, #65536 ; 0x10000 582c: e1833d82 orr r3, r3, r2, lsl #27 5830: e1833006 orr r3, r3, r6 5834: e58c3008 str r3, [ip, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5838: ebfffd5d bl 4db4 <_Chain_Append> index++; 583c: e2866001 add r6, r6, #1 ; 0x1 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 5840: e1a00004 mov r0, r4 5844: eb0010fd bl 9c40 <_Chain_Get> 5848: e250c000 subs ip, r0, #0 ; 0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 584c: e1a0100c mov r1, ip 5850: e1a00007 mov r0, r7 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 5854: 1afffff0 bne 581c <_Objects_Extend_information+0x23c> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 5858: e5952030 ldr r2, [r5, #48] 585c: e5953014 ldr r3, [r5, #20] 5860: e7823008 str r3, [r2, r8] information->inactive += information->allocation_size; 5864: e1d522bc ldrh r2, [r5, #44] 5868: e5953014 ldr r3, [r5, #20] 586c: e0833002 add r3, r3, r2 5870: e1c532bc strh r3, [r5, #44] } 5874: e28dd014 add sp, sp, #20 ; 0x14 5878: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 00013458 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 13458: e1a0c001 mov ip, r1 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 1345c: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 13460: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 13464: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 13468: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; 1346c: 05904008 ldreq r4, [r0, #8] <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 13470: e1a05000 mov r5, r0 <== NOT EXECUTED 13474: e1a06002 mov r6, r2 <== NOT EXECUTED 13478: e1a07003 mov r7, r3 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 1347c: 11a0400c movne r4, ip <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 13480: e1a03804 lsl r3, r4, #16 <== NOT EXECUTED 13484: e1d5c1b0 ldrh ip, [r5, #16] <== NOT EXECUTED 13488: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 1348c: e153000c cmp r3, ip <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 13490: e1a01004 mov r1, r4 <== NOT EXECUTED 13494: e1a00005 mov r0, r5 <== NOT EXECUTED 13498: e1a02006 mov r2, r6 <== NOT EXECUTED next_id++; 1349c: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 134a0: 9a000005 bls 134bc <_Objects_Get_next+0x64> <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 134a4: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 134a8: e5863000 str r3, [r6] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 134ac: e3e03000 mvn r3, #0 ; 0x0 <== NOT EXECUTED 134b0: e5873000 str r3, [r7] <== NOT EXECUTED 134b4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 134b8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 134bc: ebffda8a bl 9eec <_Objects_Get> <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 134c0: e5963000 ldr r3, [r6] <== NOT EXECUTED 134c4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 134c8: 1affffec bne 13480 <_Objects_Get_next+0x28> <== NOT EXECUTED *next_id_p = next_id; 134cc: e5874000 str r4, [r7] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 134d0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 00006e34 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 6e34: e92d4030 push {r4, r5, lr} Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 6e38: e2515000 subs r5, r1, #0 ; 0x0 Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 6e3c: e24dd004 sub sp, sp, #4 ; 0x4 Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 6e40: 03a00001 moveq r0, #1 ; 0x1 6e44: 0a00001b beq 6eb8 <_Objects_Id_to_name+0x84> return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 6e48: e3500000 cmp r0, #0 ; 0x0 6e4c: 059f3080 ldreq r3, [pc, #128] ; 6ed4 <_Objects_Id_to_name+0xa0> 6e50: 05933000 ldreq r3, [r3] 6e54: 05931008 ldreq r1, [r3, #8] 6e58: 11a01000 movne r1, r0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 6e5c: e1a03c21 lsr r3, r1, #24 6e60: e2030007 and r0, r3, #7 ; 0x7 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 6e64: e2403001 sub r3, r0, #1 ; 0x1 6e68: e3530003 cmp r3, #3 ; 0x3 6e6c: 8a000010 bhi 6eb4 <_Objects_Id_to_name+0x80> 6e70: ea000012 b 6ec0 <_Objects_Id_to_name+0x8c> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 6e74: e1a03da1 lsr r3, r1, #27 6e78: e7900103 ldr r0, [r0, r3, lsl #2] if ( !information ) 6e7c: e3500000 cmp r0, #0 ; 0x0 6e80: 0a00000b beq 6eb4 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; if ( information->is_string ) 6e84: e5d04038 ldrb r4, [r0, #56] 6e88: e3540000 cmp r4, #0 ; 0x0 6e8c: 1a000008 bne 6eb4 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 6e90: e1a0200d mov r2, sp 6e94: ebffffcb bl 6dc8 <_Objects_Get> if ( !the_object ) 6e98: e3500000 cmp r0, #0 ; 0x0 6e9c: 0a000004 beq 6eb4 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; *name = the_object->name; 6ea0: e590300c ldr r3, [r0, #12] 6ea4: e5853000 str r3, [r5] _Thread_Enable_dispatch(); 6ea8: eb000216 bl 7708 <_Thread_Enable_dispatch> 6eac: e1a00004 mov r0, r4 6eb0: ea000000 b 6eb8 <_Objects_Id_to_name+0x84> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 6eb4: e3a00003 mov r0, #3 ; 0x3 } 6eb8: e28dd004 add sp, sp, #4 ; 0x4 6ebc: e8bd8030 pop {r4, r5, pc} the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 6ec0: e59f3010 ldr r3, [pc, #16] ; 6ed8 <_Objects_Id_to_name+0xa4> 6ec4: e7930100 ldr r0, [r3, r0, lsl #2] 6ec8: e3500000 cmp r0, #0 ; 0x0 6ecc: 1affffe8 bne 6e74 <_Objects_Id_to_name+0x40> 6ed0: eafffff7 b 6eb4 <_Objects_Id_to_name+0x80> <== NOT EXECUTED 6ed4: 0001a6e4 .word 0x0001a6e4 6ed8: 0001a5e8 .word 0x0001a5e8 00011164 <_Objects_Name_to_id_string>: Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 11164: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 11168: e252a000 subs sl, r2, #0 ; 0x0 Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 1116c: e1a06000 mov r6, r0 11170: e1a08001 mov r8, r1 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 11174: 03a00002 moveq r0, #2 ; 0x2 11178: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return OBJECTS_INVALID_ADDRESS; if ( !name ) 1117c: e3510000 cmp r1, #0 ; 0x0 11180: 0a000016 beq 111e0 <_Objects_Name_to_id_string+0x7c> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 11184: e1d671b0 ldrh r7, [r6, #16] 11188: e3570000 cmp r7, #0 ; 0x0 1118c: 13a05001 movne r5, #1 ; 0x1 11190: 1a00000f bne 111d4 <_Objects_Name_to_id_string+0x70> 11194: ea000011 b 111e0 <_Objects_Name_to_id_string+0x7c> <== NOT EXECUTED name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 11198: e596301c ldr r3, [r6, #28] 1119c: e7934105 ldr r4, [r3, r5, lsl #2] if ( !the_object ) 111a0: e3540000 cmp r4, #0 ; 0x0 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 111a4: e2855001 add r5, r5, #1 ; 0x1 the_object = information->local_table[ index ]; if ( !the_object ) 111a8: 0a000009 beq 111d4 <_Objects_Name_to_id_string+0x70> continue; if ( !the_object->name.name_p ) 111ac: e594300c ldr r3, [r4, #12] 111b0: e2531000 subs r1, r3, #0 ; 0x0 111b4: 0a000006 beq 111d4 <_Objects_Name_to_id_string+0x70> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 111b8: e1d623ba ldrh r2, [r6, #58] 111bc: eb000c1a bl 1422c 111c0: e3500000 cmp r0, #0 ; 0x0 111c4: 1a000002 bne 111d4 <_Objects_Name_to_id_string+0x70> *id = the_object->id; 111c8: e5943008 ldr r3, [r4, #8] 111cc: e58a3000 str r3, [sl] 111d0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 111d4: e1550007 cmp r5, r7 continue; if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 111d8: e1a00008 mov r0, r8 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 111dc: 9affffed bls 11198 <_Objects_Name_to_id_string+0x34> 111e0: e3a00001 mov r0, #1 ; 0x1 } } } return OBJECTS_INVALID_NAME; } 111e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 00004adc <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 4adc: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 4ae0: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 4ae4: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 4ae8: 0a000006 beq 4b08 <_POSIX_Condition_variables_Get+0x2c> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 4aec: e5953000 ldr r3, [r5] 4af0: e3730001 cmn r3, #1 ; 0x1 4af4: 1a000007 bne 4b18 <_POSIX_Condition_variables_Get+0x3c> /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 4af8: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 4afc: eb00000b bl 4b30 <== NOT EXECUTED if ( status ) { 4b00: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 4b04: 0a000003 beq 4b18 <_POSIX_Condition_variables_Get+0x3c> <== NOT EXECUTED *location = OBJECTS_ERROR; 4b08: e3a03001 mov r3, #1 ; 0x1 4b0c: e5843000 str r3, [r4] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 4b10: e3a00000 mov r0, #0 ; 0x0 4b14: e8bd8030 pop {r4, r5, pc} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 4b18: e5951000 ldr r1, [r5] 4b1c: e59f0008 ldr r0, [pc, #8] ; 4b2c <_POSIX_Condition_variables_Get+0x50> 4b20: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 4b24: e8bd4030 pop {r4, r5, lr} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 4b28: ea000b06 b 7748 <_Objects_Get> 4b2c: 000147c4 .word 0x000147c4 00004cc4 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 4cc4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 4cc8: e1a06001 mov r6, r1 4ccc: e24dd004 sub sp, sp, #4 ; 0x4 4cd0: e1a07000 mov r7, r0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 4cd4: e1a0100d mov r1, sp 4cd8: e1a00006 mov r0, r6 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 4cdc: e1a0a002 mov sl, r2 4ce0: e20380ff and r8, r3, #255 ; 0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 4ce4: eb000070 bl 4eac <_POSIX_Mutex_Get> 4ce8: e3500000 cmp r0, #0 ; 0x0 4cec: 0a000032 beq 4dbc <_POSIX_Condition_variables_Wait_support+0xf8> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4cf0: e59f30d4 ldr r3, [pc, #212] ; 4dcc <_POSIX_Condition_variables_Wait_support+0x108> 4cf4: e5932000 ldr r2, [r3] 4cf8: e2422001 sub r2, r2, #1 ; 0x1 4cfc: e5832000 str r2, [r3] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 4d00: e1a0100d mov r1, sp 4d04: e1a00007 mov r0, r7 4d08: ebffff73 bl 4adc <_POSIX_Condition_variables_Get> switch ( location ) { 4d0c: e59d3000 ldr r3, [sp] 4d10: e3530000 cmp r3, #0 ; 0x0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 4d14: e1a05000 mov r5, r0 switch ( location ) { 4d18: 1a000027 bne 4dbc <_POSIX_Condition_variables_Wait_support+0xf8> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 4d1c: e5902014 ldr r2, [r0, #20] 4d20: e3520000 cmp r2, #0 ; 0x0 4d24: 0a000004 beq 4d3c <_POSIX_Condition_variables_Wait_support+0x78> 4d28: e5963000 ldr r3, [r6] 4d2c: e1520003 cmp r2, r3 4d30: 0a000001 beq 4d3c <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 4d34: eb000c87 bl 7f58 <_Thread_Enable_dispatch> <== NOT EXECUTED 4d38: ea00001f b 4dbc <_POSIX_Condition_variables_Wait_support+0xf8> <== NOT EXECUTED return EINVAL; } (void) pthread_mutex_unlock( mutex ); 4d3c: e1a00006 mov r0, r6 4d40: eb0000df bl 50c4 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 4d44: e3580000 cmp r8, #0 ; 0x0 4d48: 1a000015 bne 4da4 <_POSIX_Condition_variables_Wait_support+0xe0> the_cond->Mutex = *mutex; 4d4c: e5963000 ldr r3, [r6] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 4d50: e59f4078 ldr r4, [pc, #120] ; 4dd0 <_POSIX_Condition_variables_Wait_support+0x10c> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 4d54: e5853014 str r3, [r5, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 4d58: e5942000 ldr r2, [r4] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 4d5c: e5973000 ldr r3, [r7] 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; 4d60: e285c018 add ip, r5, #24 ; 0x18 _Thread_Executing->Wait.id = *cond; 4d64: e5823020 str r3, [r2, #32] 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; 4d68: e3a03001 mov r3, #1 ; 0x1 4d6c: e5853048 str r3, [r5, #72] 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; 4d70: e582c044 str ip, [r2, #68] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 4d74: e5828034 str r8, [r2, #52] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 4d78: e1a0000c mov r0, ip 4d7c: e1a0100a mov r1, sl 4d80: e59f204c ldr r2, [pc, #76] ; 4dd4 <_POSIX_Condition_variables_Wait_support+0x110> 4d84: eb000dae bl 8444 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 4d88: eb000c72 bl 7f58 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 4d8c: e5943000 ldr r3, [r4] 4d90: e5934034 ldr r4, [r3, #52] if ( status && status != ETIMEDOUT ) 4d94: e3540000 cmp r4, #0 ; 0x0 4d98: 13540074 cmpne r4, #116 ; 0x74 4d9c: 0a000002 beq 4dac <_POSIX_Condition_variables_Wait_support+0xe8> 4da0: ea000006 b 4dc0 <_POSIX_Condition_variables_Wait_support+0xfc> <== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 4da4: eb000c6b bl 7f58 <_Thread_Enable_dispatch> 4da8: e3a04074 mov r4, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 4dac: e1a00006 mov r0, r6 4db0: eb0000a2 bl 5040 if ( mutex_status ) 4db4: e3500000 cmp r0, #0 ; 0x0 4db8: 0a000000 beq 4dc0 <_POSIX_Condition_variables_Wait_support+0xfc> 4dbc: e3a04016 mov r4, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 4dc0: e1a00004 mov r0, r4 4dc4: e28dd004 add sp, sp, #4 ; 0x4 4dc8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 4dcc: 000143ac .word 0x000143ac 4dd0: 00014464 .word 0x00014464 4dd4: 0000888c .word 0x0000888c 0000fda0 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { fda0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} fda4: e1a0a001 mov sl, r1 fda8: e24dd010 sub sp, sp, #16 ; 0x10 CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); fdac: e3a010ff mov r1, #255 ; 0xff const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { fdb0: e1a04002 mov r4, r2 fdb4: e1a0b003 mov fp, r3 fdb8: e1a09000 mov r9, r0 CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); fdbc: eb0011ae bl 1447c if ( n > NAME_MAX ) fdc0: e35000ff cmp r0, #255 ; 0xff CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); fdc4: e1a06000 mov r6, r0 if ( n > NAME_MAX ) fdc8: 83a0005b movhi r0, #91 ; 0x5b fdcc: 8a00004b bhi ff00 <_POSIX_Message_queue_Create_support+0x160> fdd0: e59f2130 ldr r2, [pc, #304] ; ff08 <_POSIX_Message_queue_Create_support+0x168> fdd4: e5923000 ldr r3, [r2] fdd8: e2833001 add r3, r3, #1 ; 0x1 fddc: e5823000 str r3, [r2] * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { fde0: e3540000 cmp r4, #0 ; 0x0 fde4: 03a08010 moveq r8, #16 ; 0x10 fde8: 03a0700a moveq r7, #10 ; 0xa fdec: 0a00000d beq fe28 <_POSIX_Message_queue_Create_support+0x88> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ fdf0: e5943004 ldr r3, [r4, #4] fdf4: e3530000 cmp r3, #0 ; 0x0 fdf8: da000002 ble fe08 <_POSIX_Message_queue_Create_support+0x68> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ fdfc: e5943008 ldr r3, [r4, #8] fe00: e3530000 cmp r3, #0 ; 0x0 fe04: ca000003 bgt fe18 <_POSIX_Message_queue_Create_support+0x78> _Thread_Enable_dispatch(); fe08: ebfff41a bl ce78 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); fe0c: eb0009e9 bl 125b8 <__errno> fe10: e3a03016 mov r3, #22 ; 0x16 fe14: ea00002f b fed8 <_POSIX_Message_queue_Create_support+0x138> } attr = *attr_ptr; fe18: e894000f ldm r4, {r0, r1, r2, r3} fe1c: e88d000f stm sp, {r0, r1, r2, r3} fe20: e1a08002 mov r8, r2 fe24: e1a07001 mov r7, r1 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) fe28: e59f50dc ldr r5, [pc, #220] ; ff0c <_POSIX_Message_queue_Create_support+0x16c> fe2c: e1a00005 mov r0, r5 fe30: ebfff0b1 bl c0fc <_Objects_Allocate> } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { fe34: e2504000 subs r4, r0, #0 ; 0x0 fe38: 1a000003 bne fe4c <_POSIX_Message_queue_Create_support+0xac> _Thread_Enable_dispatch(); fe3c: ebfff40d bl ce78 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); fe40: eb0009dc bl 125b8 <__errno> <== NOT EXECUTED fe44: e3a03017 mov r3, #23 ; 0x17 <== NOT EXECUTED fe48: ea000022 b fed8 <_POSIX_Message_queue_Create_support+0x138> <== NOT EXECUTED } the_mq->process_shared = pshared; the_mq->named = TRUE; fe4c: e3a03001 mov r3, #1 ; 0x1 /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); fe50: e1a00006 mov r0, r6 if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; fe54: e584a010 str sl, [r4, #16] the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; fe58: e5c43015 strb r3, [r4, #21] _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; fe5c: e5c43014 strb r3, [r4, #20] the_mq->open_count = 1; fe60: e5843018 str r3, [r4, #24] /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); fe64: ebfff930 bl e32c <_Workspace_Allocate> if (!name) { fe68: e2506000 subs r6, r0, #0 ; 0x0 fe6c: 1a000006 bne fe8c <_POSIX_Message_queue_Create_support+0xec> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); fe70: e1a00005 mov r0, r5 <== NOT EXECUTED fe74: e1a01004 mov r1, r4 <== NOT EXECUTED fe78: ebfff16e bl c438 <_Objects_Free> <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); fe7c: ebfff3fd bl ce78 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); fe80: eb0009cc bl 125b8 <__errno> <== NOT EXECUTED fe84: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED fe88: ea000012 b fed8 <_POSIX_Message_queue_Create_support+0x138> <== NOT EXECUTED } strcpy( name, name_arg ); fe8c: e1a01009 mov r1, r9 * Note that thread blocking discipline should be based on the * current scheduling policy. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; fe90: e3a0a000 mov sl, #0 ; 0x0 if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); fe94: eb000eff bl 13a98 * Note that thread blocking discipline should be based on the * current scheduling policy. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; fe98: e584a05c str sl, [r4, #92] if ( ! _CORE_message_queue_Initialize( fe9c: e1a02007 mov r2, r7 fea0: e1a03008 mov r3, r8 fea4: e284001c add r0, r4, #28 ; 0x1c fea8: e284105c add r1, r4, #92 ; 0x5c feac: eb000346 bl 10bcc <_CORE_message_queue_Initialize> feb0: e150000a cmp r0, sl feb4: 1a00000a bne fee4 <_POSIX_Message_queue_Create_support+0x144> feb8: e1a01004 mov r1, r4 <== NOT EXECUTED febc: e1a00005 mov r0, r5 <== NOT EXECUTED fec0: ebfff15c bl c438 <_Objects_Free> <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); fec4: e1a00006 mov r0, r6 <== NOT EXECUTED fec8: ebfff913 bl e31c <_Workspace_Free> <== NOT EXECUTED _Thread_Enable_dispatch(); fecc: ebfff3e9 bl ce78 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); fed0: eb0009b8 bl 125b8 <__errno> <== NOT EXECUTED fed4: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED fed8: e5803000 str r3, [r0] fedc: e3e00000 mvn r0, #0 ; 0x0 fee0: ea000006 b ff00 <_POSIX_Message_queue_Create_support+0x160> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; fee4: e595201c ldr r2, [r5, #28] fee8: e1d430b8 ldrh r3, [r4, #8] feec: e7824103 str r4, [r2, r3, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; fef0: e584600c str r6, [r4, #12] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; fef4: e58b4000 str r4, [fp] _Thread_Enable_dispatch(); fef8: ebfff3de bl ce78 <_Thread_Enable_dispatch> fefc: e1a0000a mov r0, sl return 0; } ff00: e28dd010 add sp, sp, #16 ; 0x10 ff04: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} ff08: 000210ac .word 0x000210ac ff0c: 000213c0 .word 0x000213c0 00005824 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 5824: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5828: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 582c: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5830: 0a000006 beq 5850 <_POSIX_Mutex_Get+0x2c> 5834: e5953000 ldr r3, [r5] 5838: e3730001 cmn r3, #1 ; 0x1 583c: 1a000007 bne 5860 <_POSIX_Mutex_Get+0x3c> 5840: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 5844: eb00001d bl 58c0 <== NOT EXECUTED 5848: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 584c: 0a000003 beq 5860 <_POSIX_Mutex_Get+0x3c> <== NOT EXECUTED 5850: e3a03001 mov r3, #1 ; 0x1 5854: e5843000 str r3, [r4] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 5858: e3a00000 mov r0, #0 ; 0x0 585c: e8bd8030 pop {r4, r5, pc} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 5860: e5951000 ldr r1, [r5] 5864: e59f0008 ldr r0, [pc, #8] ; 5874 <_POSIX_Mutex_Get+0x50> 5868: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 586c: e8bd4030 pop {r4, r5, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 5870: ea000add b 83ec <_Objects_Get> 5874: 000164e0 .word 0x000164e0 000057c8 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 57c8: e92d4070 push {r4, r5, r6, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 57cc: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 57d0: e1a04001 mov r4, r1 57d4: e1a06002 mov r6, r2 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 57d8: 0a000006 beq 57f8 <_POSIX_Mutex_Get_interrupt_disable+0x30> 57dc: e5953000 ldr r3, [r5] 57e0: e3730001 cmn r3, #1 ; 0x1 57e4: 1a000007 bne 5808 <_POSIX_Mutex_Get_interrupt_disable+0x40> 57e8: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 57ec: eb000033 bl 58c0 <== NOT EXECUTED 57f0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 57f4: 0a000003 beq 5808 <_POSIX_Mutex_Get_interrupt_disable+0x40> <== NOT EXECUTED 57f8: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 57fc: e5843000 str r3, [r4] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 5800: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 5804: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 5808: e5951000 ldr r1, [r5] 580c: e59f000c ldr r0, [pc, #12] ; 5820 <_POSIX_Mutex_Get_interrupt_disable+0x58> 5810: e1a02004 mov r2, r4 5814: e1a03006 mov r3, r6 _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 5818: e8bd4070 pop {r4, r5, r6, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 581c: ea000ad8 b 8384 <_Objects_Get_isr_disable> 5820: 000164e0 .word 0x000164e0 0000c988 <_POSIX_Semaphore_Create_support>: c988: e59fc0e8 ldr ip, [pc, #232] ; ca78 <_POSIX_Semaphore_Create_support+0xf0> const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { c98c: e92d41f0 push {r4, r5, r6, r7, r8, lr} c990: e59ce000 ldr lr, [ip] c994: e28ee001 add lr, lr, #1 ; 0x1 c998: e58ce000 str lr, [ip] c99c: e1a07002 mov r7, r2 c9a0: e1a08003 mov r8, r3 c9a4: e1a06000 mov r6, r0 char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { c9a8: e3510000 cmp r1, #0 ; 0x0 c9ac: 0a000003 beq c9c0 <_POSIX_Semaphore_Create_support+0x38> _Thread_Enable_dispatch(); c9b0: ebfff216 bl 9210 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); c9b4: eb000835 bl ea90 <__errno> c9b8: e3a03058 mov r3, #88 ; 0x58 c9bc: ea00000f b ca00 <_POSIX_Semaphore_Create_support+0x78> } if ( name ) { c9c0: e3500000 cmp r0, #0 ; 0x0 c9c4: 0a000006 beq c9e4 <_POSIX_Semaphore_Create_support+0x5c> if( strlen(name) > PATH_MAX ) { c9c8: eb000f07 bl 105ec c9cc: e35000ff cmp r0, #255 ; 0xff c9d0: 9a000003 bls c9e4 <_POSIX_Semaphore_Create_support+0x5c> _Thread_Enable_dispatch(); c9d4: ebfff20d bl 9210 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); c9d8: eb00082c bl ea90 <__errno> <== NOT EXECUTED c9dc: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED c9e0: ea000006 b ca00 <_POSIX_Semaphore_Create_support+0x78> <== NOT EXECUTED * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) c9e4: e59f0090 ldr r0, [pc, #144] ; ca7c <_POSIX_Semaphore_Create_support+0xf4> c9e8: ebffeedc bl 8560 <_Objects_Allocate> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { c9ec: e2505000 subs r5, r0, #0 ; 0x0 c9f0: 1a000005 bne ca0c <_POSIX_Semaphore_Create_support+0x84> _Thread_Enable_dispatch(); c9f4: ebfff205 bl 9210 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); c9f8: eb000824 bl ea90 <__errno> c9fc: e3a0301c mov r3, #28 ; 0x1c ca00: e5803000 str r3, [r0] ca04: e3e00000 mvn r0, #0 ; 0x0 ca08: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} } the_semaphore->process_shared = pshared; if ( name ) { ca0c: e3560000 cmp r6, #0 ; 0x0 if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; ca10: e3a03000 mov r3, #0 ; 0x0 ca14: e5853010 str r3, [r5, #16] if ( name ) { the_semaphore->named = TRUE; ca18: 12833001 addne r3, r3, #1 ; 0x1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; ca1c: 15c53015 strbne r3, [r5, #21] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; ca20: 15c53014 strbne r3, [r5, #20] the_semaphore->open_count = 1; ca24: 15853018 strne r3, [r5, #24] * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; ca28: e3a04000 mov r4, #0 ; 0x0 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; ca2c: e3e03000 mvn r3, #0 ; 0x0 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); ca30: e285001c add r0, r5, #28 ; 0x1c if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; ca34: 05c56014 strbeq r6, [r5, #20] the_semaphore->open_count = 0; ca38: 05856018 streq r6, [r5, #24] the_semaphore->linked = FALSE; ca3c: 05c56015 strbeq r6, [r5, #21] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; ca40: e585305c str r3, [r5, #92] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); ca44: e1a02007 mov r2, r7 ca48: e285105c add r1, r5, #92 ; 0x5c * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; ca4c: e5854060 str r4, [r5, #96] * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); ca50: ebffedb8 bl 8138 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ca54: e59f3020 ldr r3, [pc, #32] ; ca7c <_POSIX_Semaphore_Create_support+0xf4> ca58: e593201c ldr r2, [r3, #28] ca5c: e1d530b8 ldrh r3, [r5, #8] ca60: e7825103 str r5, [r2, r3, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; ca64: e585600c str r6, [r5, #12] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; ca68: e5885000 str r5, [r8] _Thread_Enable_dispatch(); ca6c: ebfff1e7 bl 9210 <_Thread_Enable_dispatch> ca70: e1a00004 mov r0, r4 return 0; } ca74: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} ca78: 0001c44c .word 0x0001c44c ca7c: 0001c6e0 .word 0x0001c6e0 0000aafc <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { aafc: e92d4070 push {r4, r5, r6, lr} POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; ab00: e5905108 ldr r5, [r0, #264] handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; ab04: e3a03001 mov r3, #1 ; 0x1 ab08: e58530cc str r3, [r5, #204] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ab0c: e28560dc add r6, r5, #220 ; 0xdc ab10: ea00000c b ab48 <_POSIX_Threads_cancel_run+0x4c> while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); ab14: e10f1000 mrs r1, CPSR <== NOT EXECUTED ab18: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED ab1c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) ab20: e5964004 ldr r4, [r6, #4] <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ab24: e894000c ldm r4, {r2, r3} <== NOT EXECUTED previous = the_node->previous; next->previous = previous; previous->next = next; ab28: e5832000 str r2, [r3] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ab2c: e5823004 str r3, [r2, #4] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); ab30: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED (*handler->routine)( handler->arg ); ab34: e594000c ldr r0, [r4, #12] <== NOT EXECUTED ab38: e1a0e00f mov lr, pc <== NOT EXECUTED ab3c: e594f008 ldr pc, [r4, #8] <== NOT EXECUTED _Workspace_Free( handler ); ab40: e1a00004 mov r0, r4 <== NOT EXECUTED ab44: ebfff2b0 bl 760c <_Workspace_Free> <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { ab48: e59530d8 ldr r3, [r5, #216] ab4c: e1530006 cmp r3, r6 ab50: 1affffef bne ab14 <_POSIX_Threads_cancel_run+0x18> (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } ab54: e8bd8070 pop {r4, r5, r6, pc} 0000b584 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { b584: e92d41f0 push {r4, r5, r6, r7, r8, lr} b588: e1a08001 mov r8, r1 b58c: e1a07002 mov r7, r2 b590: e1a05003 mov r5, r3 b594: e1a04000 mov r4, r0 ISR_Level level; (void) _Watchdog_Remove( timer ); b598: ebfff6da bl 9108 <_Watchdog_Remove> _ISR_Disable( level ); b59c: e10f6000 mrs r6, CPSR b5a0: e38630c0 orr r3, r6, #192 ; 0xc0 b5a4: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( timer->state != WATCHDOG_INACTIVE ) { b5a8: e5943008 ldr r3, [r4, #8] b5ac: e3530000 cmp r3, #0 ; 0x0 b5b0: 0a000002 beq b5c0 <_POSIX_Timer_Insert_helper+0x3c> _ISR_Enable( level ); b5b4: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED b5b8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED b5bc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; b5c0: e5843008 str r3, [r4, #8] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; b5c4: e59d3018 ldr r3, [sp, #24] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; b5c8: e584501c str r5, [r4, #28] the_watchdog->id = id; b5cc: e5847020 str r7, [r4, #32] the_watchdog->user_data = user_data; b5d0: e5843024 str r3, [r4, #36] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; b5d4: e584800c str r8, [r4, #12] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); b5d8: e1a01004 mov r1, r4 b5dc: e59f000c ldr r0, [pc, #12] ; b5f0 <_POSIX_Timer_Insert_helper+0x6c> b5e0: ebfff66c bl 8f98 <_Watchdog_Insert> * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); b5e4: e129f006 msr CPSR_fc, r6 b5e8: e3a00001 mov r0, #1 ; 0x1 return true; } b5ec: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} b5f0: 0001aa44 .word 0x0001aa44 000056b8 <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 56b8: e92d4010 push {r4, lr} bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 56bc: e5913068 ldr r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 56c0: e5912054 ldr r2, [r1, #84] bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 56c4: e2833001 add r3, r3, #1 ; 0x1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 56c8: e3520000 cmp r2, #0 ; 0x0 /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 56cc: e24dd004 sub sp, sp, #4 ; 0x4 56d0: e1a04001 mov r4, r1 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 56d4: e5813068 str r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 56d8: 1a000003 bne 56ec <_POSIX_Timer_TSR+0x34> 56dc: e5913058 ldr r3, [r1, #88] <== NOT EXECUTED 56e0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 56e4: 03a03004 moveq r3, #4 ; 0x4 <== NOT EXECUTED /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 56e8: 0a00000a beq 5718 <_POSIX_Timer_TSR+0x60> <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 56ec: e5941064 ldr r1, [r4, #100] 56f0: e5942008 ldr r2, [r4, #8] 56f4: e2840010 add r0, r4, #16 ; 0x10 56f8: e59f3038 ldr r3, [pc, #56] ; 5738 <_POSIX_Timer_TSR+0x80> 56fc: e58d4000 str r4, [sp] 5700: eb00179f bl b584 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 5704: e3500000 cmp r0, #0 ; 0x0 5708: 0a000008 beq 5730 <_POSIX_Timer_TSR+0x78> return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 570c: e284006c add r0, r4, #108 ; 0x6c 5710: eb000585 bl 6d2c <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 5714: e3a03003 mov r3, #3 ; 0x3 } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 5718: e5c4303c strb r3, [r4, #60] /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 571c: e5940038 ldr r0, [r4, #56] 5720: e5941044 ldr r1, [r4, #68] 5724: eb0016bd bl b220 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 5728: e3a03000 mov r3, #0 ; 0x0 572c: e5843068 str r3, [r4, #104] } 5730: e28dd004 add sp, sp, #4 ; 0x4 5734: e8bd8010 pop {r4, pc} 5738: 000056b8 .word 0x000056b8 00004ce8 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 4ce8: e1a02000 mov r2, r0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 4cec: e3a01001 mov r1, #1 ; 0x1 #include int _POSIX_signals_Get_highest( sigset_t set ) { 4cf0: e3a0001b mov r0, #27 ; 0x1b int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 4cf4: e2403001 sub r3, r0, #1 ; 0x1 4cf8: e0123311 ands r3, r2, r1, lsl r3 4cfc: 112fff1e bxne lr sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4d00: e2800001 add r0, r0, #1 ; 0x1 4d04: e3500020 cmp r0, #32 ; 0x20 4d08: 1afffff9 bne 4cf4 <_POSIX_signals_Get_highest+0xc> 4d0c: e3a00001 mov r0, #1 ; 0x1 } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) 4d10: e1a01000 mov r1, r0 4d14: e2403001 sub r3, r0, #1 ; 0x1 4d18: e0123311 ands r3, r2, r1, lsl r3 4d1c: 112fff1e bxne lr return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4d20: e2800001 add r0, r0, #1 ; 0x1 4d24: e350001b cmp r0, #27 ; 0x1b 4d28: 1afffff9 bne 4d14 <_POSIX_signals_Get_highest+0x2c> 4d2c: e1a00003 mov r0, r3 <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 4d30: e12fff1e bx lr <== NOT EXECUTED 0000920c <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 920c: e92d4070 push {r4, r5, r6, lr} POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 9210: e5905108 ldr r5, [r0, #264] if ( !api ) 9214: e3550000 cmp r5, #0 ; 0x0 9218: 08bd8070 popeq {r4, r5, r6, pc} * processed at all. No point in doing this loop otherwise. */ while (1) { restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & 921c: e59f60b0 ldr r6, [pc, #176] ; 92d4 <_POSIX_signals_Post_switch_extension+0xc8> * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { restart: _ISR_Disable( level ); 9220: e10f0000 mrs r0, CPSR 9224: e38030c0 orr r3, r0, #192 ; 0xc0 9228: e129f003 msr CPSR_fc, r3 if ( !(~api->signals_blocked & 922c: e5963000 ldr r3, [r6] 9230: e28510c4 add r1, r5, #196 ; 0xc4 9234: e8910006 ldm r1, {r1, r2} 9238: e1833002 orr r3, r3, r2 923c: e1d31001 bics r1, r3, r1 9240: 1a000001 bne 924c <_POSIX_signals_Post_switch_extension+0x40> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 9244: e129f000 msr CPSR_fc, r0 9248: e8bd8070 pop {r4, r5, r6, pc} break; } _ISR_Enable( level ); 924c: e129f000 msr CPSR_fc, r0 9250: e3a0401b mov r4, #27 ; 0x1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 9254: e1a01004 mov r1, r4 9258: e3a02000 mov r2, #0 ; 0x0 925c: e1a00005 mov r0, r5 9260: eb000668 bl ac08 <_POSIX_signals_Check_signal> 9264: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9268: e1a01004 mov r1, r4 926c: e3a02001 mov r2, #1 ; 0x1 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 9270: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9274: e1a00005 mov r0, r5 } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 9278: 1affffe8 bne 9220 <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 927c: eb000661 bl ac08 <_POSIX_signals_Check_signal> 9280: e3500000 cmp r0, #0 ; 0x0 9284: 1affffe5 bne 9220 <_POSIX_signals_Post_switch_extension+0x14> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 9288: e3540020 cmp r4, #32 ; 0x20 928c: 1afffff0 bne 9254 <_POSIX_signals_Post_switch_extension+0x48> 9290: e3a04001 mov r4, #1 ; 0x1 /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 9294: e1a01004 mov r1, r4 9298: e3a02000 mov r2, #0 ; 0x0 929c: e1a00005 mov r0, r5 92a0: eb000658 bl ac08 <_POSIX_signals_Check_signal> 92a4: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 92a8: e1a01004 mov r1, r4 92ac: e3a02001 mov r2, #1 ; 0x1 } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 92b0: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 92b4: e1a00005 mov r0, r5 /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 92b8: 1affffd8 bne 9220 <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 92bc: eb000651 bl ac08 <_POSIX_signals_Check_signal> 92c0: e3500000 cmp r0, #0 ; 0x0 92c4: 1affffd5 bne 9220 <_POSIX_signals_Post_switch_extension+0x14> } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 92c8: e354001b cmp r4, #27 ; 0x1b 92cc: 1afffff0 bne 9294 <_POSIX_signals_Post_switch_extension+0x88> 92d0: eaffffd2 b 9220 <_POSIX_signals_Post_switch_extension+0x14> <== NOT EXECUTED 92d4: 0001692c .word 0x0001692c 00008f68 <_Protected_heap_Extend>: bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ) { 8f68: e92d40f0 push {r4, r5, r6, r7, lr} Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); 8f6c: e59f7044 ldr r7, [pc, #68] ; 8fb8 <_Protected_heap_Extend+0x50> bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ) { 8f70: e24dd004 sub sp, sp, #4 ; 0x4 8f74: e1a04000 mov r4, r0 8f78: e1a05001 mov r5, r1 8f7c: e1a06002 mov r6, r2 Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); 8f80: e5970000 ldr r0, [r7] 8f84: ebfffa23 bl 7818 <_API_Mutex_Lock> status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 8f88: e1a01005 mov r1, r5 8f8c: e1a02006 mov r2, r6 8f90: e1a0300d mov r3, sp 8f94: e1a00004 mov r0, r4 8f98: eb0010a8 bl d240 <_Heap_Extend> 8f9c: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 8fa0: e5970000 ldr r0, [r7] 8fa4: ebfffa37 bl 7888 <_API_Mutex_Unlock> return (status == HEAP_EXTEND_SUCCESSFUL); } 8fa8: e2740001 rsbs r0, r4, #1 ; 0x1 8fac: 33a00000 movcc r0, #0 ; 0x0 8fb0: e28dd004 add sp, sp, #4 ; 0x4 8fb4: e8bd80f0 pop {r4, r5, r6, r7, pc} 8fb8: c1dc .short 0xc1dc <== NOT EXECUTED 8fba: 01 .byte 0x01 <== NOT EXECUTED ... 0001f740 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 1f740: e92d4070 push {r4, r5, r6, lr} Heap_Get_information_status status; if ( !the_heap ) 1f744: e2506000 subs r6, r0, #0 ; 0x0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 1f748: e1a04001 mov r4, r1 Heap_Get_information_status status; if ( !the_heap ) 1f74c: 0a00000d beq 1f788 <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) 1f750: e3510000 cmp r1, #0 ; 0x0 1f754: 0a00000b beq 1f788 <_Protected_heap_Get_information+0x48> return false; _RTEMS_Lock_allocator(); 1f758: e59f5030 ldr r5, [pc, #48] ; 1f790 <_Protected_heap_Get_information+0x50> 1f75c: e5950000 ldr r0, [r5] 1f760: ebffa27f bl 8164 <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 1f764: e1a01004 mov r1, r4 1f768: e1a00006 mov r0, r6 1f76c: eb0023f4 bl 28744 <_Heap_Get_information> 1f770: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 1f774: e5950000 ldr r0, [r5] 1f778: ebffa295 bl 81d4 <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 1f77c: e2740001 rsbs r0, r4, #1 ; 0x1 1f780: 33a00000 movcc r0, #0 ; 0x0 1f784: e8bd8070 pop {r4, r5, r6, pc} 1f788: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; return false; } 1f78c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 1f790: 000566dc .word 0x000566dc 000046e8 <_RTEMS_tasks_Initialize_user_tasks_body>: rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 46e8: e59f3094 ldr r3, [pc, #148] ; 4784 <_RTEMS_tasks_Initialize_user_tasks_body+0x9c> 46ec: e5933000 ldr r3, [r3] * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46f0: e92d40f0 push {r4, r5, r6, r7, lr} rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 46f4: e5933040 ldr r3, [r3, #64] /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 46f8: e593002c ldr r0, [r3, #44] maximum = api_configuration->number_of_initialization_tasks; 46fc: e5936028 ldr r6, [r3, #40] if ( !user_tasks || maximum == 0 ) 4700: e3560000 cmp r6, #0 ; 0x0 4704: 13500000 cmpne r0, #0 ; 0x0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 4708: e24dd00c sub sp, sp, #12 ; 0xc */ user_tasks = api_configuration->User_initialization_tasks_table; maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) 470c: 13a03000 movne r3, #0 ; 0x0 4710: 03a03001 moveq r3, #1 ; 0x1 return; 4714: 11a04000 movne r4, r0 4718: 11a05003 movne r5, r3 for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 471c: 128d7008 addne r7, sp, #8 ; 0x8 */ user_tasks = api_configuration->User_initialization_tasks_table; maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) 4720: 1a000013 bne 4774 <_RTEMS_tasks_Initialize_user_tasks_body+0x8c> 4724: ea000014 b 477c <_RTEMS_tasks_Initialize_user_tasks_body+0x94> <== NOT EXECUTED return; for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 4728: e594300c ldr r3, [r4, #12] 472c: e88d0088 stm sp, {r3, r7} 4730: e8940005 ldm r4, {r0, r2} 4734: e5941008 ldr r1, [r4, #8] 4738: e5943014 ldr r3, [r4, #20] 473c: ebffff63 bl 44d0 user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 4740: e2502000 subs r2, r0, #0 ; 0x0 4744: 1a000006 bne 4764 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 4748: e5942018 ldr r2, [r4, #24] 474c: e5941010 ldr r1, [r4, #16] 4750: e59d0008 ldr r0, [sp, #8] 4754: eb00000b bl 4788 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 4758: e2502000 subs r2, r0, #0 ; 0x0 ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 475c: e284401c add r4, r4, #28 ; 0x1c id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 4760: 0a000002 beq 4770 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 4764: e3a00001 mov r0, #1 ; 0x1 4768: e1a01000 mov r1, r0 476c: eb000359 bl 54d8 <_Internal_error_Occurred> maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 4770: e2855001 add r5, r5, #1 ; 0x1 4774: e1550006 cmp r5, r6 4778: 3affffea bcc 4728 <_RTEMS_tasks_Initialize_user_tasks_body+0x40> ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); } } 477c: e28dd00c add sp, sp, #12 ; 0xc 4780: e8bd80f0 pop {r4, r5, r6, r7, pc} 4784: 0001629c .word 0x0001629c 00005188 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 5188: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 518c: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get( struct timespec *time ) { 5190: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 5194: e58d3004 str r3, [sp, #4] */ void _TOD_Get( struct timespec *time ) { 5198: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 519c: e58d3000 str r3, [sp] offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); 51a0: e10f6000 mrs r6, CPSR 51a4: e38630c0 orr r3, r6, #192 ; 0xc0 51a8: e129f003 msr CPSR_fc, r3 *time = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 51ac: e59f3038 ldr r3, [pc, #56] ; 51ec <_TOD_Get+0x64> 51b0: e5932000 ldr r2, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 51b4: e59f3034 ldr r3, [pc, #52] ; 51f0 <_TOD_Get+0x68> 51b8: e8930018 ldm r3, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 51bc: e3520000 cmp r2, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 51c0: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 51c4: 0a000002 beq 51d4 <_TOD_Get+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 51c8: e1a0e00f mov lr, pc <== NOT EXECUTED 51cc: e12fff12 bx r2 <== NOT EXECUTED 51d0: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 51d4: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( time, &offset ); 51d8: e1a00005 mov r0, r5 51dc: e1a0100d mov r1, sp 51e0: eb000794 bl 7038 <_Timespec_Add_to> } 51e4: e28dd008 add sp, sp, #8 ; 0x8 51e8: e8bd8070 pop {r4, r5, r6, pc} 51ec: 000163b8 .word 0x000163b8 51f0: 00016294 .word 0x00016294 00009df4 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( struct timespec *uptime ) { 9df4: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 9df8: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get_uptime( struct timespec *uptime ) { 9dfc: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 9e00: e58d3004 str r3, [sp, #4] */ void _TOD_Get_uptime( struct timespec *uptime ) { 9e04: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 9e08: e58d3000 str r3, [sp] offset.tv_nsec = 0; _ISR_Disable( level ); 9e0c: e10f6000 mrs r6, CPSR 9e10: e38630c0 orr r3, r6, #192 ; 0xc0 9e14: e129f003 msr CPSR_fc, r3 *uptime = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 9e18: e59f3038 ldr r3, [pc, #56] ; 9e58 <_TOD_Get_uptime+0x64> 9e1c: e5932000 ldr r2, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 9e20: e59f3034 ldr r3, [pc, #52] ; 9e5c <_TOD_Get_uptime+0x68> 9e24: e8930018 ldm r3, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 9e28: e3520000 cmp r2, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 9e2c: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 9e30: 0a000002 beq 9e40 <_TOD_Get_uptime+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 9e34: e1a0e00f mov lr, pc <== NOT EXECUTED 9e38: e12fff12 bx r2 <== NOT EXECUTED 9e3c: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 9e40: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( uptime, &offset ); 9e44: e1a00005 mov r0, r5 9e48: e1a0100d mov r1, sp 9e4c: ebfff479 bl 7038 <_Timespec_Add_to> } 9e50: e28dd008 add sp, sp, #8 ; 0x8 9e54: e8bd8070 pop {r4, r5, r6, pc} 9e58: 000163b8 .word 0x000163b8 9e5c: 00016284 .word 0x00016284 0000b19c <_Thread_Handler>: #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; b19c: e59f30b0 ldr r3, [pc, #176] ; b254 <_Thread_Handler+0xb8> * * Output parameters: NONE */ void _Thread_Handler( void ) { b1a0: e92d4030 push {r4, r5, lr} #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; b1a4: e5935000 ldr r5, [r3] /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; b1a8: e59530b8 ldr r3, [r5, #184] _ISR_Set_level(level); b1ac: e3a02000 mov r2, #0 ; 0x0 b1b0: e10f2000 mrs r2, CPSR b1b4: e3c220c0 bic r2, r2, #192 ; 0xc0 b1b8: e1822003 orr r2, r2, r3 b1bc: e121f002 msr CPSR_c, r2 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; b1c0: e59f2090 ldr r2, [pc, #144] ; b258 <_Thread_Handler+0xbc> doneConstructors = 1; b1c4: e3a03001 mov r3, #1 ; 0x1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; b1c8: e5d24000 ldrb r4, [r2] * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); b1cc: e1a00005 mov r0, r5 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; doneConstructors = 1; b1d0: e5c23000 strb r3, [r2] * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); b1d4: ebffefe5 bl 7170 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); b1d8: ebffec26 bl 6278 <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ b1dc: e3540000 cmp r4, #0 ; 0x0 { _init (); b1e0: 0bffd3ce bleq 120 <_init> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { b1e4: e59530a0 ldr r3, [r5, #160] b1e8: e3530003 cmp r3, #3 ; 0x3 b1ec: 979ff103 ldrls pc, [pc, r3, lsl #2] b1f0: ea000011 b b23c <_Thread_Handler+0xa0> <== NOT EXECUTED b1f4: 0000b204 .word 0x0000b204 <== NOT EXECUTED b1f8: 0000b20c .word 0x0000b20c <== NOT EXECUTED b1fc: 0000b21c .word 0x0000b21c <== NOT EXECUTED b200: 0000b228 .word 0x0000b228 <== NOT EXECUTED case THREAD_START_NUMERIC: executing->Wait.return_argument = b204: e59500a8 ldr r0, [r5, #168] b208: ea000000 b b210 <_Thread_Handler+0x74> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = b20c: e59500a4 ldr r0, [r5, #164] b210: e1a0e00f mov lr, pc b214: e595f09c ldr pc, [r5, #156] b218: ea000006 b b238 <_Thread_Handler+0x9c> (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = b21c: e28500a4 add r0, r5, #164 ; 0xa4 <== NOT EXECUTED b220: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED b224: ea000001 b b230 <_Thread_Handler+0x94> <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = b228: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED b22c: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED b230: e1a0e00f mov lr, pc <== NOT EXECUTED b234: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED b238: e5850028 str r0, [r5, #40] * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); b23c: e1a00005 mov r0, r5 b240: ebffefd9 bl 71ac <_User_extensions_Thread_exitted> _Internal_error_Occurred( b244: e3a00000 mov r0, #0 ; 0x0 b248: e3a01001 mov r1, #1 ; 0x1 b24c: e3a02006 mov r2, #6 ; 0x6 b250: ebffe8a0 bl 54d8 <_Internal_error_Occurred> b254: 000162c4 .word 0x000162c4 b258: 00016050 .word 0x00016050 00006344 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 6344: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 6348: e2526000 subs r6, r2, #0 ; 0x0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 634c: e1a09000 mov r9, r0 6350: e1a05001 mov r5, r1 6354: e1a04003 mov r4, r3 6358: e59d8024 ldr r8, [sp, #36] 635c: e59da02c ldr sl, [sp, #44] 6360: e5dd7028 ldrb r7, [sp, #40] /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 6364: 1a00000e bne 63a4 <_Thread_Initialize+0x60> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 6368: e1a00001 mov r0, r1 636c: e1a01003 mov r1, r3 6370: eb000292 bl 6dc0 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 6374: e1500004 cmp r0, r4 6378: 23a03000 movcs r3, #0 ; 0x0 637c: 33a03001 movcc r3, #1 ; 0x1 6380: e3500000 cmp r0, #0 ; 0x0 6384: 03833001 orreq r3, r3, #1 ; 0x1 6388: e3530000 cmp r3, #0 ; 0x0 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 638c: 03a03001 moveq r3, #1 ; 0x1 if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 6390: e1a01000 mov r1, r0 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 6394: 05c530c0 strbeq r3, [r5, #192] 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; 6398: 059520cc ldreq r2, [r5, #204] if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 639c: 0a000004 beq 63b4 <_Thread_Initialize+0x70> 63a0: ea000017 b 6404 <_Thread_Initialize+0xc0> 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; 63a4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 63a8: e5c130c0 strb r3, [r1, #192] <== NOT EXECUTED 63ac: e1a02006 mov r2, r6 <== NOT EXECUTED 63b0: e1a01004 mov r1, r4 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 63b4: e59f3128 ldr r3, [pc, #296] ; 64e4 <_Thread_Initialize+0x1a0> 63b8: e5930000 ldr r0, [r3] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 63bc: e3a03000 mov r3, #0 ; 0x0 63c0: e3500000 cmp r0, #0 ; 0x0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 63c4: e58520c8 str r2, [r5, #200] the_stack->size = size; 63c8: e58510c4 str r1, [r5, #196] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 63cc: e5853100 str r3, [r5, #256] 63d0: e5853050 str r3, [r5, #80] the_watchdog->routine = routine; 63d4: e5853064 str r3, [r5, #100] the_watchdog->id = id; 63d8: e5853068 str r3, [r5, #104] the_watchdog->user_data = user_data; 63dc: e585306c str r3, [r5, #108] (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return FALSE; 63e0: 01a06000 moveq r6, r0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 63e4: 0a000008 beq 640c <_Thread_Initialize+0xc8> extensions_area = _Workspace_Allocate( 63e8: e2800001 add r0, r0, #1 ; 0x1 63ec: e1a00100 lsl r0, r0, #2 63f0: eb000489 bl 761c <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 63f4: e2506000 subs r6, r0, #0 ; 0x0 63f8: 1a000003 bne 640c <_Thread_Initialize+0xc8> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 63fc: e1a00005 mov r0, r5 <== NOT EXECUTED 6400: eb000289 bl 6e2c <_Thread_Stack_Free> <== NOT EXECUTED 6404: e1a00006 mov r0, r6 6408: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 640c: e3560000 cmp r6, #0 ; 0x0 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 6410: e5856110 str r6, [r5, #272] * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 6414: 0a00000a beq 6444 <_Thread_Initialize+0x100> 6418: e3a02000 mov r2, #0 ; 0x0 uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 641c: e59f00c0 ldr r0, [pc, #192] ; 64e4 <_Thread_Initialize+0x1a0> the_thread->extensions[i] = NULL; 6420: e1a01002 mov r1, r2 6424: ea000002 b 6434 <_Thread_Initialize+0xf0> 6428: e5953110 ldr r3, [r5, #272] 642c: e7831102 str r1, [r3, r2, lsl #2] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6430: e2822001 add r2, r2, #1 ; 0x1 6434: e5903000 ldr r3, [r0] 6438: e2833001 add r3, r3, #1 ; 0x1 643c: e1520003 cmp r2, r3 6440: 3afffff8 bcc 6428 <_Thread_Initialize+0xe4> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 6444: e59d3030 ldr r3, [sp, #48] switch ( budget_algorithm ) { 6448: e35a0002 cmp sl, #2 ; 0x2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 644c: e58530b4 str r3, [r5, #180] switch ( budget_algorithm ) { case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 6450: 059f3090 ldreq r3, [pc, #144] ; 64e8 <_Thread_Initialize+0x1a4> 6454: 05933000 ldreq r3, [r3] 6458: 05853078 streq r3, [r5, #120] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 645c: e59d3034 ldr r3, [sp, #52] the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 6460: e3a04000 mov r4, #0 ; 0x0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 6464: e5c570ac strb r7, [r5, #172] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 6468: e3a07001 mov r7, #1 ; 0x1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 646c: e58530b8 str r3, [r5, #184] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 6470: e1a01008 mov r1, r8 6474: e1a00005 mov r0, r5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 6478: e585a0b0 str sl, [r5, #176] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 647c: e5857010 str r7, [r5, #16] the_thread->Wait.queue = NULL; 6480: e5854044 str r4, [r5, #68] the_thread->resource_count = 0; 6484: e585401c str r4, [r5, #28] the_thread->suspend_count = 0; 6488: e5854070 str r4, [r5, #112] the_thread->real_priority = priority; 648c: e5858018 str r8, [r5, #24] the_thread->Start.initial_priority = priority; 6490: e58580bc str r8, [r5, #188] _Thread_Set_priority( the_thread, priority ); 6494: eb0001b7 bl 6b78 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 6498: e1d530b8 ldrh r3, [r5, #8] 649c: e599201c ldr r2, [r9, #28] * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; the_thread->cpu_time_used.tv_nsec = 0; 64a0: e5854088 str r4, [r5, #136] 64a4: e7825103 str r5, [r2, r3, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 64a8: e59d3038 ldr r3, [sp, #56] * 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 ); 64ac: e1a00005 mov r0, r5 64b0: e585300c str r3, [r5, #12] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 64b4: e5854084 str r4, [r5, #132] * 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 ); 64b8: eb00035f bl 723c <_User_extensions_Thread_create> if ( !extension_status ) { 64bc: e1500004 cmp r0, r4 64c0: 11a00007 movne r0, r7 64c4: 18bd87f0 popne {r4, r5, r6, r7, r8, r9, sl, pc} if ( extensions_area ) 64c8: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 64cc: 11a00006 movne r0, r6 <== NOT EXECUTED 64d0: 1b00044d blne 760c <_Workspace_Free> <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 64d4: e1a00005 mov r0, r5 <== NOT EXECUTED 64d8: eb000253 bl 6e2c <_Thread_Stack_Free> <== NOT EXECUTED 64dc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return FALSE; } return TRUE; } 64e0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 64e4: 000162a4 .word 0x000162a4 64e8: 000161c4 .word 0x000161c4 000077b0 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 77b0: e5903010 ldr r3, [r0, #16] 77b4: e3130001 tst r3, #1 ; 0x1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 77b8: e92d4070 push {r4, r5, r6, lr} 77bc: e1a04000 mov r4, r0 77c0: e1a05001 mov r5, r1 77c4: e1a06002 mov r6, r2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 77c8: 13a00000 movne r0, #0 ; 0x0 77cc: 18bd8070 popne {r4, r5, r6, pc} _Thread_Set_transient( the_thread ); 77d0: eb000081 bl 79dc <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 77d4: e1a01005 mov r1, r5 77d8: e1a02006 mov r2, r6 77dc: e1a00004 mov r0, r4 77e0: eb000eac bl b298 <_Thread_Reset> _Thread_Load_environment( the_thread ); 77e4: e1a00004 mov r0, r4 77e8: eb000dcc bl af20 <_Thread_Load_environment> _Thread_Ready( the_thread ); 77ec: e1a00004 mov r0, r4 77f0: eb000e65 bl b18c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 77f4: e1a00004 mov r0, r4 77f8: eb0001e3 bl 7f8c <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 77fc: e59f301c ldr r3, [pc, #28] ; 7820 <_Thread_Restart+0x70> 7800: e5933000 ldr r3, [r3] 7804: e1540003 cmp r4, r3 7808: 13a00001 movne r0, #1 ; 0x1 780c: 18bd8070 popne {r4, r5, r6, pc} #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 7810: e28400d0 add r0, r4, #208 ; 0xd0 7814: eb0002ec bl 83cc <_CPU_Context_restore> 7818: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return TRUE; } return FALSE; } 781c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 7820: 00019b84 .word 0x00019b84 000084e0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 84e0: e92d4030 push {r4, r5, lr} 84e4: e20110ff and r1, r1, #255 ; 0xff 84e8: e1a04000 mov r4, r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 84ec: e10f5000 mrs r5, CPSR 84f0: e38530c0 orr r3, r5, #192 ; 0xc0 84f4: e129f003 msr CPSR_fc, r3 if ( force == TRUE ) 84f8: e3510000 cmp r1, #0 ; 0x0 the_thread->suspend_count = 0; else the_thread->suspend_count--; 84fc: 05903070 ldreq r3, [r0, #112] States_Control current_state; _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; 8500: 13a03000 movne r3, #0 ; 0x0 else the_thread->suspend_count--; 8504: 02433001 subeq r3, r3, #1 ; 0x1 8508: e5803070 str r3, [r0, #112] if ( the_thread->suspend_count > 0 ) { 850c: e5903070 ldr r3, [r0, #112] 8510: e3530000 cmp r3, #0 ; 0x0 8514: 0a000001 beq 8520 <_Thread_Resume+0x40> _ISR_Enable( level ); 8518: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 851c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return; } current_state = the_thread->current_state; 8520: e5903010 ldr r3, [r0, #16] if ( current_state & STATES_SUSPENDED ) { 8524: e3130002 tst r3, #2 ; 0x2 8528: 0a000028 beq 85d0 <_Thread_Resume+0xf0> 852c: e3c33002 bic r3, r3, #2 ; 0x2 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 8530: e3530000 cmp r3, #0 ; 0x0 return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 8534: e5803010 str r3, [r0, #16] the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 8538: 1a000024 bne 85d0 <_Thread_Resume+0xf0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 853c: e5900090 ldr r0, [r0, #144] 8540: e1d429b6 ldrh r2, [r4, #150] 8544: e1d030b0 ldrh r3, [r0] _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 8548: e594108c ldr r1, [r4, #140] 854c: e1833002 orr r3, r3, r2 8550: e1c030b0 strh r3, [r0] _Priority_Major_bit_map |= the_priority_map->ready_major; 8554: e59fc07c ldr ip, [pc, #124] ; 85d8 <_Thread_Resume+0xf8> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8558: e2813004 add r3, r1, #4 ; 0x4 855c: e5843000 str r3, [r4] 8560: e1d429b4 ldrh r2, [r4, #148] 8564: e1dc30b0 ldrh r3, [ip] old_last_node = the_chain->last; 8568: e5910008 ldr r0, [r1, #8] 856c: e1833002 orr r3, r3, r2 the_chain->last = the_node; 8570: e5814008 str r4, [r1, #8] 8574: e1cc30b0 strh r3, [ip] old_last_node->next = the_node; the_node->previous = old_last_node; 8578: e5840004 str r0, [r4, #4] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 857c: e5804000 str r4, [r0] _ISR_Flash( level ); 8580: e10f3000 mrs r3, CPSR 8584: e129f005 msr CPSR_fc, r5 8588: e129f003 msr CPSR_fc, r3 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 858c: e59f1048 ldr r1, [pc, #72] ; 85dc <_Thread_Resume+0xfc> 8590: e5913000 ldr r3, [r1] 8594: e5942014 ldr r2, [r4, #20] 8598: e5933014 ldr r3, [r3, #20] 859c: e1520003 cmp r2, r3 85a0: 2a00000a bcs 85d0 <_Thread_Resume+0xf0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 85a4: e59f3034 ldr r3, [pc, #52] ; 85e0 <_Thread_Resume+0x100> 85a8: e5933000 ldr r3, [r3] 85ac: e5d33076 ldrb r3, [r3, #118] 85b0: e3530000 cmp r3, #0 ; 0x0 _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 85b4: e5814000 str r4, [r1] if ( _Thread_Executing->is_preemptible || 85b8: 1a000001 bne 85c4 <_Thread_Resume+0xe4> 85bc: e3520000 cmp r2, #0 ; 0x0 85c0: 1a000002 bne 85d0 <_Thread_Resume+0xf0> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 85c4: e59f3018 ldr r3, [pc, #24] ; 85e4 <_Thread_Resume+0x104> 85c8: e3a02001 mov r2, #1 ; 0x1 85cc: e5c32000 strb r2, [r3] } } } _ISR_Enable( level ); 85d0: e129f005 msr CPSR_fc, r5 85d4: e8bd8030 pop {r4, r5, pc} 85d8: 00022878 .word 0x00022878 85dc: 00022850 .word 0x00022850 85e0: 00022884 .word 0x00022884 85e4: 00022894 .word 0x00022894 00006dc0 <_Thread_Stack_Allocate>: * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 6dc0: e59f305c ldr r3, [pc, #92] ; 6e24 <_Thread_Stack_Allocate+0x64> 6dc4: e5933000 ldr r3, [r3] 6dc8: e5932020 ldr r2, [r3, #32] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 6dcc: e59f3054 ldr r3, [pc, #84] ; 6e28 <_Thread_Stack_Allocate+0x68> 6dd0: e5933000 ldr r3, [r3] 6dd4: e92d4030 push {r4, r5, lr} 6dd8: e1510003 cmp r1, r3 6ddc: 21a04001 movcs r4, r1 6de0: 31a04003 movcc r4, r3 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 6de4: e3520000 cmp r2, #0 ; 0x0 size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 6de8: e1a05000 mov r5, r0 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 6dec: 0a000003 beq 6e00 <_Thread_Stack_Allocate+0x40> stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 6df0: e1a00004 mov r0, r4 <== NOT EXECUTED 6df4: e1a0e00f mov lr, pc <== NOT EXECUTED 6df8: e12fff12 bx r2 <== NOT EXECUTED 6dfc: ea000002 b 6e0c <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 6e00: e2844004 add r4, r4, #4 ; 0x4 * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 6e04: e1a00004 mov r0, r4 6e08: eb000203 bl 761c <_Workspace_Allocate> 6e0c: e1a03000 mov r3, r0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 6e10: e3500000 cmp r0, #0 ; 0x0 6e14: 11a00004 movne r0, r4 6e18: 03a00000 moveq r0, #0 ; 0x0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 6e1c: e58530cc str r3, [r5, #204] return the_stack_size; } 6e20: e8bd8030 pop {r4, r5, pc} 6e24: 0001629c .word 0x0001629c 6e28: 0001448c .word 0x0001448c 00006e2c <_Thread_Stack_Free>: { /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 6e2c: e5d030c0 ldrb r3, [r0, #192] 6e30: e3530000 cmp r3, #0 ; 0x0 */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 6e34: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 6e38: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( _Configuration_Table->stack_free_hook ) 6e3c: e59f3028 ldr r3, [pc, #40] ; 6e6c <_Thread_Stack_Free+0x40> 6e40: e5933000 ldr r3, [r3] 6e44: e5933024 ldr r3, [r3, #36] 6e48: e3530000 cmp r3, #0 ; 0x0 6e4c: 0a000003 beq 6e60 <_Thread_Stack_Free+0x34> (*_Configuration_Table->stack_free_hook)( 6e50: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 6e54: e1a0e00f mov lr, pc <== NOT EXECUTED 6e58: e12fff13 bx r3 <== NOT EXECUTED 6e5c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 6e60: e59000c8 ldr r0, [r0, #200] } 6e64: e49de004 pop {lr} ; (ldr lr, [sp], #4) if ( _Configuration_Table->stack_free_hook ) (*_Configuration_Table->stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 6e68: ea0001e7 b 760c <_Workspace_Free> 6e6c: 0001629c .word 0x0001629c 00005c8c <_Thread_blocking_operation_Cancel>: /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 5c8c: e5913050 ldr r3, [r1, #80] <== NOT EXECUTED 5c90: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 5c94: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 5c98: e92d4010 push {r4, lr} <== NOT EXECUTED #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 5c9c: e5813044 str r3, [r1, #68] <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 5ca0: e1a04001 mov r4, r1 <== NOT EXECUTED /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 5ca4: 1a000005 bne 5cc0 <_Thread_blocking_operation_Cancel+0x34> <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 5ca8: e2833003 add r3, r3, #3 ; 0x3 <== NOT EXECUTED 5cac: e5813050 str r3, [r1, #80] <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 5cb0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 5cb4: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED 5cb8: eb000605 bl 74d4 <_Watchdog_Remove> <== NOT EXECUTED 5cbc: ea000000 b 5cc4 <_Thread_blocking_operation_Cancel+0x38> <== NOT EXECUTED } else _ISR_Enable( level ); 5cc0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 5cc4: e59f1008 ldr r1, [pc, #8] ; 5cd4 <_Thread_blocking_operation_Cancel+0x48> <== NOT EXECUTED 5cc8: e1a00004 mov r0, r4 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 5ccc: e8bd4010 pop {r4, lr} <== NOT EXECUTED 5cd0: ea000068 b 5e78 <_Thread_Clear_state> <== NOT EXECUTED 5cd4: 1003fff8 .word 0x1003fff8 0000680c <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 680c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 6810: e1a0c001 mov ip, r1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 6814: e5915014 ldr r5, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 6818: e281303c add r3, r1, #60 ; 0x3c 681c: e58c3038 str r3, [ip, #56] the_chain->permanent_null = NULL; 6820: e3a03000 mov r3, #0 ; 0x0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 6824: e1a04000 mov r4, r0 6828: e58c303c str r3, [ip, #60] RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 682c: e1a00325 lsr r0, r5, #6 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 6830: e283300c add r3, r3, #12 ; 0xc 6834: e0264093 mla r6, r3, r0, r4 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 6838: e3150020 tst r5, #32 ; 0x20 the_chain->last = _Chain_Head(the_chain); 683c: e2811038 add r1, r1, #56 ; 0x38 6840: e58c1040 str r1, [ip, #64] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 6844: e1a09002 mov r9, r2 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 6848: e5948038 ldr r8, [r4, #56] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 684c: 159fa19c ldrne sl, [pc, #412] ; 69f0 <_Thread_queue_Enqueue_priority+0x1e4> _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 6850: 12860008 addne r0, r6, #8 ; 0x8 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 ) ) 6854: 1a00002d bne 6910 <_Thread_queue_Enqueue_priority+0x104> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 6858: e3a03003 mov r3, #3 ; 0x3 685c: e0030390 mul r3, r0, r3 6860: e2833001 add r3, r3, #1 ; 0x1 6864: e0840103 add r0, r4, r3, lsl #2 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 6868: e1a07006 mov r7, r6 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 686c: e10f6000 mrs r6, CPSR 6870: e38630c0 orr r3, r6, #192 ; 0xc0 6874: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->first; 6878: e3e02000 mvn r2, #0 ; 0x0 687c: e5971000 ldr r1, [r7] 6880: ea000011 b 68cc <_Thread_queue_Enqueue_priority+0xc0> while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 6884: e5912014 ldr r2, [r1, #20] if ( priority <= search_priority ) 6888: e1550002 cmp r5, r2 688c: 9a000010 bls 68d4 <_Thread_queue_Enqueue_priority+0xc8> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 6890: e5911000 ldr r1, [r1] if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 6894: e1510000 cmp r1, r0 6898: 0a00000d beq 68d4 <_Thread_queue_Enqueue_priority+0xc8> break; search_priority = search_thread->current_priority; 689c: e5912014 ldr r2, [r1, #20] if ( priority <= search_priority ) 68a0: e1550002 cmp r5, r2 68a4: 9a00000a bls 68d4 <_Thread_queue_Enqueue_priority+0xc8> break; #endif _ISR_Flash( level ); 68a8: e10f3000 mrs r3, CPSR 68ac: e129f006 msr CPSR_fc, r6 68b0: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 68b4: e5913010 ldr r3, [r1, #16] 68b8: e1180003 tst r8, r3 68bc: 1a000001 bne 68c8 <_Thread_queue_Enqueue_priority+0xbc> _ISR_Enable( level ); 68c0: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 68c4: eaffffe8 b 686c <_Thread_queue_Enqueue_priority+0x60> <== NOT EXECUTED goto restart_forward_search; } search_thread = 68c8: e5911000 ldr r1, [r1] 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 ) ) { 68cc: e1510000 cmp r1, r0 68d0: 1affffeb bne 6884 <_Thread_queue_Enqueue_priority+0x78> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 68d4: e5943030 ldr r3, [r4, #48] 68d8: e3530001 cmp r3, #1 ; 0x1 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 ) ) { 68dc: e1a00006 mov r0, r6 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 68e0: 1a00003f bne 69e4 <_Thread_queue_Enqueue_priority+0x1d8> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 68e4: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 68e8: e1550002 cmp r5, r2 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 68ec: e5843030 str r3, [r4, #48] if ( priority == search_priority ) 68f0: 0a000031 beq 69bc <_Thread_queue_Enqueue_priority+0x1b0> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 68f4: e5913004 ldr r3, [r1, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 68f8: e88c000a stm ip, {r1, r3} the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 68fc: e58c4044 str r4, [ip, #68] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 6900: e583c000 str ip, [r3] search_node->previous = the_node; 6904: e581c004 str ip, [r1, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6908: e129f006 msr CPSR_fc, r6 690c: ea000032 b 69dc <_Thread_queue_Enqueue_priority+0x1d0> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 6910: e5da3000 ldrb r3, [sl] 6914: e2832001 add r2, r3, #1 ; 0x1 _ISR_Disable( level ); 6918: e10f7000 mrs r7, CPSR 691c: e38730c0 orr r3, r7, #192 ; 0xc0 6920: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->last; 6924: e5901000 ldr r1, [r0] 6928: ea000011 b 6974 <_Thread_queue_Enqueue_priority+0x168> while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 692c: e5912014 ldr r2, [r1, #20] if ( priority >= search_priority ) 6930: e1550002 cmp r5, r2 6934: 2a000010 bcs 697c <_Thread_queue_Enqueue_priority+0x170> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 6938: e5911004 ldr r1, [r1, #4] if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 693c: e1510006 cmp r1, r6 6940: 0a00000d beq 697c <_Thread_queue_Enqueue_priority+0x170> break; search_priority = search_thread->current_priority; 6944: e5912014 ldr r2, [r1, #20] if ( priority >= search_priority ) 6948: e1550002 cmp r5, r2 694c: 2a00000a bcs 697c <_Thread_queue_Enqueue_priority+0x170> break; #endif _ISR_Flash( level ); 6950: e10f3000 mrs r3, CPSR 6954: e129f007 msr CPSR_fc, r7 6958: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 695c: e5913010 ldr r3, [r1, #16] 6960: e1180003 tst r8, r3 6964: 1a000001 bne 6970 <_Thread_queue_Enqueue_priority+0x164> _ISR_Enable( level ); 6968: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 696c: eaffffe7 b 6910 <_Thread_queue_Enqueue_priority+0x104> <== NOT EXECUTED goto restart_reverse_search; } search_thread = (Thread_Control *) 6970: e5911004 ldr r1, [r1, #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 ) ) { 6974: e1510006 cmp r1, r6 6978: 1affffeb bne 692c <_Thread_queue_Enqueue_priority+0x120> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 697c: e5943030 ldr r3, [r4, #48] 6980: e3530001 cmp r3, #1 ; 0x1 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 ) ) { 6984: e1a00007 mov r0, r7 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 6988: 1a000015 bne 69e4 <_Thread_queue_Enqueue_priority+0x1d8> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 698c: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 6990: e1550002 cmp r5, r2 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 6994: e5843030 str r3, [r4, #48] if ( priority == search_priority ) 6998: 0a000007 beq 69bc <_Thread_queue_Enqueue_priority+0x1b0> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 699c: e5913000 ldr r3, [r1] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 69a0: e58c1004 str r1, [ip, #4] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 69a4: e58c3000 str r3, [ip] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 69a8: e58c4044 str r4, [ip, #68] 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; 69ac: e581c000 str ip, [r1] next_node->previous = the_node; 69b0: e583c004 str ip, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 69b4: e129f007 msr CPSR_fc, r7 69b8: ea000007 b 69dc <_Thread_queue_Enqueue_priority+0x1d0> 69bc: e281303c add r3, r1, #60 ; 0x3c 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; 69c0: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 69c4: e58c3000 str r3, [ip] the_node->previous = previous_node; 69c8: e58c2004 str r2, [ip, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 69cc: e58c4044 str r4, [ip, #68] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 69d0: e582c000 str ip, [r2] search_node->previous = the_node; 69d4: e583c004 str ip, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 69d8: e129f000 msr CPSR_fc, r0 69dc: e3a00001 mov r0, #1 ; 0x1 69e0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 69e4: e5890000 str r0, [r9] <== NOT EXECUTED return the_thread_queue->sync_state; 69e8: e5940030 ldr r0, [r4, #48] <== NOT EXECUTED } 69ec: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 69f0: 00014490 .word 0x00014490 0000b25c <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { b25c: e92d4010 push {r4, lr} b260: e1a04001 mov r4, r1 ISR_Level level; _ISR_Disable( level ); b264: e10f0000 mrs r0, CPSR b268: e38030c0 orr r3, r0, #192 ; 0xc0 b26c: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { b270: e59f3064 ldr r3, [pc, #100] ; b2dc <_Thread_queue_Extract_fifo+0x80> b274: e5912010 ldr r2, [r1, #16] b278: e0023003 and r3, r2, r3 b27c: e3530000 cmp r3, #0 ; 0x0 b280: 1a000001 bne b28c <_Thread_queue_Extract_fifo+0x30> _ISR_Enable( level ); b284: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } b288: e8bd8010 pop {r4, pc} <== NOT EXECUTED _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { b28c: e5913050 ldr r3, [r1, #80] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; b290: e5942004 ldr r2, [r4, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; b294: e5911000 ldr r1, [r1] b298: e3530002 cmp r3, #2 ; 0x2 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; b29c: e3a03000 mov r3, #0 ; 0x0 previous = the_node->previous; next->previous = previous; previous->next = next; b2a0: e5821000 str r1, [r2] b2a4: e5843044 str r3, [r4, #68] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; b2a8: e5812004 str r2, [r1, #4] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { b2ac: 0a000001 beq b2b8 <_Thread_queue_Extract_fifo+0x5c> _ISR_Enable( level ); b2b0: e129f000 msr CPSR_fc, r0 b2b4: ea000004 b b2cc <_Thread_queue_Extract_fifo+0x70> b2b8: e3a03003 mov r3, #3 ; 0x3 b2bc: e5843050 str r3, [r4, #80] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); b2c0: e129f000 msr CPSR_fc, r0 (void) _Watchdog_Remove( &the_thread->Timer ); b2c4: e2840048 add r0, r4, #72 ; 0x48 b2c8: ebfff081 bl 74d4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); b2cc: e59f100c ldr r1, [pc, #12] ; b2e0 <_Thread_queue_Extract_fifo+0x84> b2d0: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } b2d4: e8bd4010 pop {r4, lr} b2d8: eaffeae6 b 5e78 <_Thread_Clear_state> b2dc: 0003bee0 .word 0x0003bee0 b2e0: 1003fff8 .word 0x1003fff8 0000a2e4 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { a2e4: e92d4070 push {r4, r5, r6, lr} a2e8: e1a04001 mov r4, r1 a2ec: e20260ff and r6, r2, #255 ; 0xff Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); a2f0: e10fc000 mrs ip, CPSR a2f4: e38c30c0 orr r3, ip, #192 ; 0xc0 a2f8: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { a2fc: e59f30b4 ldr r3, [pc, #180] ; a3b8 <_Thread_queue_Extract_priority_helper+0xd4> a300: e5912010 ldr r2, [r1, #16] a304: e0023003 and r3, r2, r3 a308: e3530000 cmp r3, #0 ; 0x0 a30c: 1a000001 bne a318 <_Thread_queue_Extract_priority_helper+0x34> _ISR_Enable( level ); a310: e129f00c msr CPSR_fc, ip <== NOT EXECUTED a314: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a318: e5911038 ldr r1, [r1, #56] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a31c: e284303c add r3, r4, #60 ; 0x3c a320: e1510003 cmp r1, r3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; a324: e894000c ldm r4, {r2, r3} new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; a328: 05823004 streq r3, [r2, #4] new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; a32c: 05832000 streq r2, [r3] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a330: 0a00000e beq a370 <_Thread_queue_Extract_priority_helper+0x8c> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; a334: e5945040 ldr r5, [r4, #64] new_second_node = new_first_node->next; a338: e5910000 ldr r0, [r1] previous_node->next = new_first_node; next_node->previous = new_first_node; a33c: e5821004 str r1, [r2, #4] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; a340: e5831000 str r1, [r3] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; a344: e881000c stm r1, {r2, r3} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { a348: e5942038 ldr r2, [r4, #56] a34c: e5943040 ldr r3, [r4, #64] a350: e1520003 cmp r2, r3 a354: 0a000005 beq a370 <_Thread_queue_Extract_priority_helper+0x8c> new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); a358: e281203c add r2, r1, #60 ; 0x3c new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = a35c: e2813038 add r3, r1, #56 ; 0x38 a360: e5803004 str r3, [r0, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; a364: e5810038 str r0, [r1, #56] new_first_thread->Wait.Block2n.last = last_node; a368: e5815040 str r5, [r1, #64] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); a36c: e5852000 str r2, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { a370: e3560000 cmp r6, #0 ; 0x0 a374: 0a000001 beq a380 <_Thread_queue_Extract_priority_helper+0x9c> _ISR_Enable( level ); a378: e129f00c msr CPSR_fc, ip a37c: e8bd8070 pop {r4, r5, r6, pc} return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a380: e5943050 ldr r3, [r4, #80] a384: e3530002 cmp r3, #2 ; 0x2 a388: 0a000001 beq a394 <_Thread_queue_Extract_priority_helper+0xb0> _ISR_Enable( level ); a38c: e129f00c msr CPSR_fc, ip a390: ea000004 b a3a8 <_Thread_queue_Extract_priority_helper+0xc4> a394: e3a03003 mov r3, #3 ; 0x3 a398: e5843050 str r3, [r4, #80] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); a39c: e129f00c msr CPSR_fc, ip (void) _Watchdog_Remove( &the_thread->Timer ); a3a0: e2840048 add r0, r4, #72 ; 0x48 a3a4: ebfff44a bl 74d4 <_Watchdog_Remove> a3a8: e59f100c ldr r1, [pc, #12] ; a3bc <_Thread_queue_Extract_priority_helper+0xd8> a3ac: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } a3b0: e8bd4070 pop {r4, r5, r6, lr} a3b4: eaffeeaf b 5e78 <_Thread_Clear_state> a3b8: 0003bee0 .word 0x0003bee0 a3bc: 1003fff8 .word 0x1003fff8 0000a3c0 <_Thread_queue_Process_timeout>: void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; a3c0: e5902044 ldr r2, [r0, #68] * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && a3c4: e5921030 ldr r1, [r2, #48] a3c8: e3510000 cmp r1, #0 ; 0x0 a3cc: 0a000009 beq a3f8 <_Thread_queue_Process_timeout+0x38> a3d0: e59f3034 ldr r3, [pc, #52] ; a40c <_Thread_queue_Process_timeout+0x4c> <== NOT EXECUTED a3d4: e5933000 ldr r3, [r3] <== NOT EXECUTED a3d8: e1500003 cmp r0, r3 <== NOT EXECUTED a3dc: 1a000005 bne a3f8 <_Thread_queue_Process_timeout+0x38> <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { a3e0: e3510003 cmp r1, #3 ; 0x3 <== NOT EXECUTED the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a3e4: 1592303c ldrne r3, [r2, #60] <== NOT EXECUTED a3e8: 15803034 strne r3, [r0, #52] <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; a3ec: 13a03002 movne r3, #2 ; 0x2 <== NOT EXECUTED a3f0: 15823030 strne r3, [r2, #48] <== NOT EXECUTED a3f4: e12fff1e bx lr <== NOT EXECUTED } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a3f8: e592303c ldr r3, [r2, #60] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); a3fc: e1a01000 mov r1, r0 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a400: e5803034 str r3, [r0, #52] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); a404: e5900044 ldr r0, [r0, #68] a408: eaffffaf b a2cc <_Thread_queue_Extract> a40c: 000162c4 .word 0x000162c4 0001fc58 <_Timespec_Divide_by_integer>: /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 1fc58: e5903000 ldr r3, [r0] <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 1fc5c: e59fc06c ldr ip, [pc, #108] ; 1fcd0 <_Timespec_Divide_by_integer+0x78> <== NOT EXECUTED void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 1fc60: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 1fc64: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 1fc68: e086539c umull r5, r6, ip, r3 <== NOT EXECUTED 1fc6c: e026649c mla r6, ip, r4, r6 <== NOT EXECUTED t += time->tv_nsec; 1fc70: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 1fc74: e0957000 adds r7, r5, r0 <== NOT EXECUTED 1fc78: e0a68fc0 adc r8, r6, r0, asr #31 <== NOT EXECUTED 1fc7c: e1a03001 mov r3, r1 <== NOT EXECUTED 1fc80: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 1fc84: e1a06002 mov r6, r2 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 1fc88: e1a00007 mov r0, r7 <== NOT EXECUTED 1fc8c: e1a02003 mov r2, r3 <== NOT EXECUTED 1fc90: e1a01008 mov r1, r8 <== NOT EXECUTED 1fc94: e1a03004 mov r3, r4 <== NOT EXECUTED 1fc98: eb006b1f bl 3a91c <__udivdi3> <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 1fc9c: e59f202c ldr r2, [pc, #44] ; 1fcd0 <_Timespec_Divide_by_integer+0x78> <== NOT EXECUTED 1fca0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 1fca4: e1a04000 mov r4, r0 <== NOT EXECUTED 1fca8: e1a05001 mov r5, r1 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 1fcac: eb006b1a bl 3a91c <__udivdi3> <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 1fcb0: e1a01005 mov r1, r5 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 1fcb4: e5860000 str r0, [r6] <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 1fcb8: e59f2010 ldr r2, [pc, #16] ; 1fcd0 <_Timespec_Divide_by_integer+0x78> <== NOT EXECUTED 1fcbc: e1a00004 mov r0, r4 <== NOT EXECUTED 1fcc0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1fcc4: eb006c5c bl 3ae3c <__umoddi3> <== NOT EXECUTED 1fcc8: e5860004 str r0, [r6, #4] <== NOT EXECUTED } 1fccc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 1fcd0: 3b9aca00 .word 0x3b9aca00 0000b7a4 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { b7a4: e92d4010 push {r4, lr} b7a8: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); b7ac: eb001231 bl 10078 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) b7b0: e5943024 ldr r3, [r4, #36] b7b4: e3530000 cmp r3, #0 ; 0x0 b7b8: 08bd8010 popeq {r4, pc} _Chain_Extract( &the_extension->Switch.Node ); b7bc: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED } b7c0: e8bd4010 pop {r4, lr} <== NOT EXECUTED /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); b7c4: ea00122b b 10078 <_Chain_Extract> <== NOT EXECUTED 00007364 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 7364: e59f30fc ldr r3, [pc, #252] ; 7468 <_Watchdog_Insert+0x104> void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 7368: e92d41f0 push {r4, r5, r6, r7, r8, lr} 736c: e1a0c001 mov ip, r1 7370: e1a07000 mov r7, r0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 7374: e5934000 ldr r4, [r3] _ISR_Disable( level ); 7378: e10f5000 mrs r5, CPSR 737c: e38530c0 orr r3, r5, #192 ; 0xc0 7380: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 7384: e5913008 ldr r3, [r1, #8] 7388: e3530000 cmp r3, #0 ; 0x0 738c: 0a000001 beq 7398 <_Watchdog_Insert+0x34> _ISR_Enable( level ); 7390: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 7394: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 7398: e59f30cc ldr r3, [pc, #204] ; 746c <_Watchdog_Insert+0x108> 739c: e5932000 ldr r2, [r3] 73a0: e2822001 add r2, r2, #1 ; 0x1 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 73a4: e59f60c4 ldr r6, [pc, #196] ; 7470 <_Watchdog_Insert+0x10c> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 73a8: e5832000 str r2, [r3] if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 73ac: e3a03001 mov r3, #1 ; 0x1 73b0: e5813008 str r3, [r1, #8] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 73b4: e1a08006 mov r8, r6 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 73b8: e59c000c ldr r0, [ip, #12] * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 73bc: e5971000 ldr r1, [r7] ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 73c0: e3500000 cmp r0, #0 ; 0x0 73c4: 0a000014 beq 741c <_Watchdog_Insert+0xb8> 73c8: e5913000 ldr r3, [r1] 73cc: e3530000 cmp r3, #0 ; 0x0 73d0: 0a000011 beq 741c <_Watchdog_Insert+0xb8> break; if ( delta_interval < after->delta_interval ) { 73d4: e5912010 ldr r2, [r1, #16] 73d8: e1500002 cmp r0, r2 after->delta_interval -= delta_interval; 73dc: 30603002 rsbcc r3, r0, r2 73e0: 35813010 strcc r3, [r1, #16] 73e4: 3a00000c bcc 741c <_Watchdog_Insert+0xb8> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 73e8: e10f3000 mrs r3, CPSR 73ec: e129f005 msr CPSR_fc, r5 73f0: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 73f4: e59c3008 ldr r3, [ip, #8] 73f8: e3530001 cmp r3, #1 ; 0x1 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 73fc: e0620000 rsb r0, r2, r0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7400: 1a000010 bne 7448 <_Watchdog_Insert+0xe4> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7404: e5963000 ldr r3, [r6] 7408: e1530004 cmp r3, r4 _Watchdog_Sync_level = insert_isr_nest_level; 740c: 85884000 strhi r4, [r8] 7410: 8affffe8 bhi 73b8 <_Watchdog_Insert+0x54> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 7414: e5911000 ldr r1, [r1] 7418: eaffffe8 b 73c0 <_Watchdog_Insert+0x5c> the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 741c: e59f3050 ldr r3, [pc, #80] ; 7474 <_Watchdog_Insert+0x110> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 7420: e5912004 ldr r2, [r1, #4] the_watchdog->start_time = _Watchdog_Ticks_since_boot; 7424: e5933000 ldr r3, [r3] ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 7428: e5921000 ldr r1, [r2] 742c: e58c3014 str r3, [ip, #20] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 7430: e3a03002 mov r3, #2 ; 0x2 after_node->next = the_node; 7434: e582c000 str ip, [r2] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 7438: e98c000c stmib ip, {r2, r3} } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 743c: e58c0010 str r0, [ip, #16] before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 7440: e581c004 str ip, [r1, #4] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 7444: e58c1000 str r1, [ip] _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 7448: e59f3020 ldr r3, [pc, #32] ; 7470 <_Watchdog_Insert+0x10c> _Watchdog_Sync_count--; 744c: e59f2018 ldr r2, [pc, #24] ; 746c <_Watchdog_Insert+0x108> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 7450: e5834000 str r4, [r3] _Watchdog_Sync_count--; 7454: e5923000 ldr r3, [r2] 7458: e2433001 sub r3, r3, #1 ; 0x1 745c: e5823000 str r3, [r2] _ISR_Enable( level ); 7460: e129f005 msr CPSR_fc, r5 7464: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 7468: 000162a0 .word 0x000162a0 746c: 00016360 .word 0x00016360 7470: 000162c0 .word 0x000162c0 7474: 00016364 .word 0x00016364 00007654 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 7654: e92d4030 push {r4, r5, lr} uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 7658: e2504000 subs r4, r0, #0 ; 0x0 */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 765c: e1a05001 mov r5, r1 uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 7660: 0a000001 beq 766c <_Workspace_Handler_initialization+0x18> 7664: e2141003 ands r1, r4, #3 ; 0x3 7668: 0a000003 beq 767c <_Workspace_Handler_initialization+0x28> _Internal_error_Occurred( 766c: e3a00000 mov r0, #0 ; 0x0 7670: e3a01001 mov r1, #1 ; 0x1 7674: e3a02002 mov r2, #2 ; 0x2 7678: ea00000e b 76b8 <_Workspace_Handler_initialization+0x64> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 767c: e59f3038 ldr r3, [pc, #56] ; 76bc <_Workspace_Handler_initialization+0x68> 7680: e5933000 ldr r3, [r3] 7684: e5d33028 ldrb r3, [r3, #40] 7688: e3530000 cmp r3, #0 ; 0x0 memset( starting_address, 0, size ); 768c: 11a02005 movne r2, r5 7690: 1b001149 blne bbbc memory_available = _Heap_Initialize( 7694: e1a01004 mov r1, r4 7698: e1a02005 mov r2, r5 769c: e59f001c ldr r0, [pc, #28] ; 76c0 <_Workspace_Handler_initialization+0x6c> 76a0: e3a03004 mov r3, #4 ; 0x4 76a4: ebfff706 bl 52c4 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 76a8: e3500000 cmp r0, #0 ; 0x0 76ac: 18bd8030 popne {r4, r5, pc} _Internal_error_Occurred( 76b0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 76b4: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 76b8: ebfff786 bl 54d8 <_Internal_error_Occurred> 76bc: 0001629c .word 0x0001629c 76c0: 0001622c .word 0x0001622c 0001e524 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 1e524: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 1e528: e24dd00c sub sp, sp, #12 ; 0xc 1e52c: e1a04000 mov r4, r0 1e530: e1a06001 mov r6, r1 1e534: e1a05002 mov r5, r2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 1e538: ebffff3f bl 1e23c 1e53c: e1540000 cmp r4, r0 1e540: 0a000002 beq 1e550 rtems_set_errno_and_return_minus_one( ESRCH ); 1e544: ebffd44d bl 13680 <__errno> 1e548: e3a03003 mov r3, #3 ; 0x3 1e54c: ea000003 b 1e560 /* * Validate the signal passed. */ if ( !sig ) 1e550: e3560000 cmp r6, #0 ; 0x0 1e554: 1a000004 bne 1e56c rtems_set_errno_and_return_minus_one( EINVAL ); 1e558: ebffd448 bl 13680 <__errno> 1e55c: e3a03016 mov r3, #22 ; 0x16 1e560: e5803000 str r3, [r0] 1e564: e3e00000 mvn r0, #0 ; 0x0 1e568: ea000089 b 1e794 if ( !is_valid_signo(sig) ) 1e56c: e2460001 sub r0, r6, #1 ; 0x1 1e570: e350001f cmp r0, #31 ; 0x1f 1e574: 8afffff7 bhi 1e558 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 1e578: e59f321c ldr r3, [pc, #540] ; 1e79c 1e57c: e3a0200c mov r2, #12 ; 0xc 1e580: e0233692 mla r3, r2, r6, r3 1e584: e5933008 ldr r3, [r3, #8] 1e588: e3530001 cmp r3, #1 ; 0x1 1e58c: 0a00007f beq 1e790 * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 1e590: e3560004 cmp r6, #4 ; 0x4 1e594: 13560008 cmpne r6, #8 ; 0x8 1e598: 0a000001 beq 1e5a4 1e59c: e356000b cmp r6, #11 ; 0xb 1e5a0: 1a000003 bne 1e5b4 return pthread_kill( pthread_self(), sig ); 1e5a4: eb000118 bl 1ea0c 1e5a8: e1a01006 mov r1, r6 1e5ac: eb0000db bl 1e920 1e5b0: ea000077 b 1e794 mask = signo_to_mask( sig ); 1e5b4: e3a03001 mov r3, #1 ; 0x1 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 1e5b8: e58d3004 str r3, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 1e5bc: e58d6000 str r6, [sp] siginfo->si_code = SI_USER; if ( !value ) { 1e5c0: e3550000 cmp r5, #0 ; 0x0 */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); mask = signo_to_mask( sig ); 1e5c4: e1a07013 lsl r7, r3, r0 1e5c8: e59f21d0 ldr r2, [pc, #464] ; 1e7a0 siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 1e5cc: 15953000 ldrne r3, [r5] 1e5d0: 158d3008 strne r3, [sp, #8] 1e5d4: e5923000 ldr r3, [r2] 1e5d8: e2833001 add r3, r3, #1 ; 0x1 siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 1e5dc: 058d5008 streq r5, [sp, #8] 1e5e0: e5823000 str r3, [r2] /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 1e5e4: e59f31b8 ldr r3, [pc, #440] ; 1e7a4 1e5e8: e5930000 ldr r0, [r3] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 1e5ec: e5903108 ldr r3, [r0, #264] 1e5f0: e59330c4 ldr r3, [r3, #196] 1e5f4: e1d73003 bics r3, r7, r3 1e5f8: 1a000046 bne 1e718 goto process_it; 1e5fc: e59f11a4 ldr r1, [pc, #420] ; 1e7a8 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 1e600: e281e030 add lr, r1, #48 ; 0x30 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 1e604: e1a0c001 mov ip, r1 1e608: e49c2004 ldr r2, [ip], #4 1e60c: ea000008 b 1e634 the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 1e610: e5923030 ldr r3, [r2, #48] 1e614: e1170003 tst r7, r3 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 1e618: e1a00002 mov r0, r2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1e61c: e5923108 ldr r3, [r2, #264] if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 1e620: 1a00003c bne 1e718 1e624: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED 1e628: e1d73003 bics r3, r7, r3 <== NOT EXECUTED 1e62c: 1a000039 bne 1e718 <== NOT EXECUTED the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 1e630: e5922000 ldr r2, [r2] <== NOT EXECUTED index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 1e634: e152000c cmp r2, ip 1e638: 1afffff4 bne 1e610 1e63c: e281100c add r1, r1, #12 ; 0xc */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 1e640: e151000e cmp r1, lr 1e644: 1affffee bne 1e604 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 1e648: e59f315c ldr r3, [pc, #348] ; 1e7ac 1e64c: e59f415c ldr r4, [pc, #348] ; 1e7b0 1e650: e5d33000 ldrb r3, [r3] 1e654: e3a00000 mov r0, #0 ; 0x0 1e658: e2835001 add r5, r3, #1 ; 0x1 for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 1e65c: e284900c add r9, r4, #12 ; 0xc the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 1e660: e5943008 ldr r3, [r4, #8] 1e664: e3530000 cmp r3, #0 ; 0x0 1e668: 0a000025 beq 1e704 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 1e66c: e5933004 ldr r3, [r3, #4] /* * This cannot happen in the current (as of Dec 2007) implementation * of initialization but at some point, the object information * structure for a particular manager may not be installed. */ if ( !the_info ) 1e670: e3530000 cmp r3, #0 ; 0x0 continue; maximum = the_info->maximum; object_table = the_info->local_table; 1e674: 1593a01c ldrne sl, [r3, #28] * structure for a particular manager may not be installed. */ if ( !the_info ) continue; maximum = the_info->maximum; 1e678: 11d381b0 ldrhne r8, [r3, #16] object_table = the_info->local_table; 1e67c: 13a0e001 movne lr, #1 ; 0x1 /* * This cannot happen in the current (as of Dec 2007) implementation * of initialization but at some point, the object information * structure for a particular manager may not be installed. */ if ( !the_info ) 1e680: 1a00001d bne 1e6fc 1e684: ea00001e b 1e704 <== NOT EXECUTED maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { the_thread = (Thread_Control *) object_table[ index ]; 1e688: e79a210e ldr r2, [sl, lr, lsl #2] if ( !the_thread ) 1e68c: e3520000 cmp r2, #0 ; 0x0 1e690: 0a000014 beq 1e6e8 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 1e694: e592c014 ldr ip, [r2, #20] 1e698: e15c0005 cmp ip, r5 1e69c: 8a000011 bhi 1e6e8 /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1e6a0: e5923108 ldr r3, [r2, #264] if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 1e6a4: e3530000 cmp r3, #0 ; 0x0 1e6a8: 0a00000e beq 1e6e8 1e6ac: e59330c4 ldr r3, [r3, #196] 1e6b0: e1d73003 bics r3, r7, r3 1e6b4: 0a00000b beq 1e6e8 * Now we know the thread under connsideration is interested. * If the thread under consideration is of higher priority, then * it becomes the interested thread. */ if ( the_thread->current_priority < interested_priority ) { 1e6b8: e15c0005 cmp ip, r5 1e6bc: 3a00000b bcc 1e6f0 * Now the thread and the interested thread have the same priority. * If the interested thread is ready, then we don't need to send it * to a blocked thread. */ if ( _States_Is_ready( interested_thread->current_state ) ) 1e6c0: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED 1e6c4: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 1e6c8: 0a000006 beq 1e6e8 <== NOT EXECUTED * Now the interested thread is blocked. * If the thread we are considering is not, the it becomes the * interested thread. */ if ( _States_Is_ready( the_thread->current_state ) ) { 1e6cc: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 1e6d0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1e6d4: 0a000005 beq 1e6f0 <== NOT EXECUTED * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 1e6d8: e3110201 tst r1, #268435456 ; 0x10000000 <== NOT EXECUTED 1e6dc: 1a000001 bne 1e6e8 <== NOT EXECUTED * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 1e6e0: e3130201 tst r3, #268435456 ; 0x10000000 <== NOT EXECUTED 1e6e4: 1a000001 bne 1e6f0 <== NOT EXECUTED 1e6e8: e1a0c005 mov ip, r5 1e6ec: ea000000 b 1e6f4 1e6f0: e1a00002 mov r0, r2 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 1e6f4: e28ee001 add lr, lr, #1 ; 0x1 1e6f8: e1a0500c mov r5, ip 1e6fc: e15e0008 cmp lr, r8 1e700: 9affffe0 bls 1e688 1e704: e2844004 add r4, r4, #4 ; 0x4 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 1e708: e1540009 cmp r4, r9 1e70c: 1affffd3 bne 1e660 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 1e710: e3500000 cmp r0, #0 ; 0x0 1e714: 0a000006 beq 1e734 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 1e718: e3a03001 mov r3, #1 ; 0x1 1e71c: e5c03075 strb r3, [r0, #117] /* * Returns TRUE if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 1e720: e1a01006 mov r1, r6 1e724: e1a0200d mov r2, sp 1e728: eb000035 bl 1e804 <_POSIX_signals_Unblock_thread> 1e72c: e3500000 cmp r0, #0 ; 0x0 1e730: 1a000015 bne 1e78c /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 1e734: e1a00007 mov r0, r7 1e738: eb00001f bl 1e7bc <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 1e73c: e3a0300c mov r3, #12 ; 0xc 1e740: e0040693 mul r4, r3, r6 1e744: e59f3050 ldr r3, [pc, #80] ; 1e79c 1e748: e7933004 ldr r3, [r3, r4] 1e74c: e3530002 cmp r3, #2 ; 0x2 1e750: 1a00000d bne 1e78c psiginfo = (POSIX_signals_Siginfo_node *) 1e754: e59f0058 ldr r0, [pc, #88] ; 1e7b4 1e758: ebffaad6 bl 92b8 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 1e75c: e250c000 subs ip, r0, #0 ; 0x0 1e760: 1a000002 bne 1e770 rtems_set_errno_and_return_minus_one( EAGAIN ); 1e764: ebffd3c5 bl 13680 <__errno> <== NOT EXECUTED 1e768: e3a0300b mov r3, #11 ; 0xb <== NOT EXECUTED 1e76c: eaffff7b b 1e560 <== NOT EXECUTED } psiginfo->Info = *siginfo; 1e770: e89d0007 ldm sp, {r0, r1, r2} 1e774: e28c3008 add r3, ip, #8 ; 0x8 1e778: e8830007 stm r3, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 1e77c: e59f0034 ldr r0, [pc, #52] ; 1e7b8 1e780: e1a0100c mov r1, ip 1e784: e0800004 add r0, r0, r4 1e788: ebffaabf bl 928c <_Chain_Append> } _Thread_Enable_dispatch(); 1e78c: ebffb01a bl a7fc <_Thread_Enable_dispatch> 1e790: e3a00000 mov r0, #0 ; 0x0 return 0; } 1e794: e28dd00c add sp, sp, #12 ; 0xc 1e798: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 1e79c: 0002494c .word 0x0002494c 1e7a0: 0002438c .word 0x0002438c 1e7a4: 00024444 .word 0x00024444 1e7a8: 00024ad8 .word 0x00024ad8 1e7ac: 0001eb50 .word 0x0001eb50 1e7b0: 00024348 .word 0x00024348 1e7b4: 00024acc .word 0x00024acc 1e7b8: 00024b1c .word 0x00024b1c 0000f24c : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { f24c: e92d4070 push {r4, r5, r6, lr} f250: e1a06001 mov r6, r1 f254: e1a04000 mov r4, r0 Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) f258: eb0006fa bl 10e48 <_Timespec_Is_valid> f25c: e3500000 cmp r0, #0 ; 0x0 f260: 0a000005 beq f27c * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) f264: e5943000 ldr r3, [r4] f268: e3530000 cmp r3, #0 ; 0x0 f26c: ba000002 blt f27c f270: e5943004 ldr r3, [r4, #4] f274: e3530000 cmp r3, #0 ; 0x0 f278: aa000002 bge f288 rtems_set_errno_and_return_minus_one( EINVAL ); f27c: eb0010ff bl 13680 <__errno> f280: e3a03016 mov r3, #22 ; 0x16 f284: ea000031 b f350 ticks = _Timespec_To_ticks( rqtp ); f288: e1a00004 mov r0, r4 f28c: eb0006fd bl 10e88 <_Timespec_To_ticks> * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { f290: e2505000 subs r5, r0, #0 ; 0x0 f294: e59f20c8 ldr r2, [pc, #200] ; f364 f298: 1a00000a bne f2c8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; f29c: e5923000 ldr r3, [r2] f2a0: e2833001 add r3, r3, #1 ; 0x1 f2a4: e5823000 str r3, [r2] _Thread_Disable_dispatch(); _Thread_Yield_processor(); f2a8: ebfff0b1 bl b574 <_Thread_Yield_processor> _Thread_Enable_dispatch(); f2ac: ebffed52 bl a7fc <_Thread_Enable_dispatch> if ( rmtp ) { f2b0: e3560000 cmp r6, #0 ; 0x0 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; f2b4: 15865004 strne r5, [r6, #4] if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; f2b8: 15865000 strne r5, [r6] rmtp->tv_nsec = 0; f2bc: 11a00005 movne r0, r5 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { f2c0: 18bd8070 popne {r4, r5, r6, pc} f2c4: ea000024 b f35c <== NOT EXECUTED f2c8: e5923000 ldr r3, [r2] f2cc: e2833001 add r3, r3, #1 ; 0x1 f2d0: e5823000 str r3, [r2] /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( f2d4: e59f408c ldr r4, [pc, #140] ; f368 f2d8: e3a01281 mov r1, #268435464 ; 0x10000008 f2dc: e5940000 ldr r0, [r4] f2e0: ebffefb8 bl b1c8 <_Thread_Set_state> _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( f2e4: e5943000 ldr r3, [r4] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; f2e8: e59f207c ldr r2, [pc, #124] ; f36c f2ec: e5931008 ldr r1, [r3, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; f2f0: e3a00000 mov r0, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; f2f4: e5831068 str r1, [r3, #104] the_watchdog->user_data = user_data; f2f8: e583006c str r0, [r3, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; f2fc: e5830050 str r0, [r3, #80] the_watchdog->routine = routine; f300: e5832064 str r2, [r3, #100] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); f304: e2831048 add r1, r3, #72 ; 0x48 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; f308: e5835054 str r5, [r3, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); f30c: e59f005c ldr r0, [pc, #92] ; f370 f310: ebfff1a9 bl b9bc <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); f314: ebffed38 bl a7fc <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { f318: e3560000 cmp r6, #0 ; 0x0 f31c: 0a00000e beq f35c ticks -= f320: e5943000 ldr r3, [r4] f324: e283205c add r2, r3, #92 ; 0x5c f328: e8920014 ldm r2, {r2, r4} f32c: e0424004 sub r4, r2, r4 f330: e0844005 add r4, r4, r5 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); f334: e1a01006 mov r1, r6 f338: e1a00004 mov r0, r4 f33c: eb0006af bl 10e00 <_Timespec_From_ticks> /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) f340: e3540000 cmp r4, #0 ; 0x0 f344: 0a000004 beq f35c rtems_set_errno_and_return_minus_one( EINTR ); f348: eb0010cc bl 13680 <__errno> f34c: e3a03004 mov r3, #4 ; 0x4 f350: e5803000 str r3, [r0] f354: e3e00000 mvn r0, #0 ; 0x0 f358: e8bd8070 pop {r4, r5, r6, pc} f35c: e3a00000 mov r0, #0 ; 0x0 } return 0; } f360: e8bd8070 pop {r4, r5, r6, pc} f364: 0002438c .word 0x0002438c f368: 00024444 .word 0x00024444 f36c: 0000a670 .word 0x0000a670 f370: 00024464 .word 0x00024464 00004c54 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 4c54: e92d4030 push {r4, r5, lr} 4c58: e24dd004 sub sp, sp, #4 ; 0x4 4c5c: e1a04000 mov r4, r0 4c60: e1a05001 mov r5, r1 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) { 4c64: e1a00002 mov r0, r2 4c68: e1a0100d mov r1, sp 4c6c: eb000125 bl 5108 <_POSIX_Absolute_timeout_to_ticks> 4c70: e3500003 cmp r0, #3 ; 0x3 4c74: 979ff100 ldrls pc, [pc, r0, lsl #2] 4c78: ea000008 b 4ca0 <== NOT EXECUTED 4c7c: 00004c8c .word 0x00004c8c <== NOT EXECUTED 4c80: 00004c94 .word 0x00004c94 <== NOT EXECUTED 4c84: 00004c94 .word 0x00004c94 <== NOT EXECUTED 4c88: 00004c9c .word 0x00004c9c <== NOT EXECUTED 4c8c: e3a00016 mov r0, #22 ; 0x16 4c90: ea000006 b 4cb0 4c94: e3a03001 mov r3, #1 ; 0x1 4c98: ea000000 b 4ca0 4c9c: e3a03000 mov r3, #0 ; 0x0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: already_timedout = FALSE; break; } return _POSIX_Condition_variables_Wait_support( 4ca0: e1a00004 mov r0, r4 4ca4: e1a01005 mov r1, r5 4ca8: e59d2000 ldr r2, [sp] 4cac: eb000004 bl 4cc4 <_POSIX_Condition_variables_Wait_support> cond, mutex, ticks, already_timedout ); } 4cb0: e28dd004 add sp, sp, #4 ; 0x4 4cb4: e8bd8030 pop {r4, r5, pc} 00005070 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 5070: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 5074: e3520000 cmp r2, #0 ; 0x0 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 5078: e24dd040 sub sp, sp, #64 ; 0x40 507c: e58d0024 str r0, [sp, #36] POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 5080: e58d2020 str r2, [sp, #32] pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 5084: e58d301c str r3, [sp, #28] POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 5088: 03a0000e moveq r0, #14 ; 0xe 508c: 0a0000a1 beq 5318 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 5090: e59f3288 ldr r3, [pc, #648] ; 5320 5094: e3510000 cmp r1, #0 ; 0x0 5098: 11a06001 movne r6, r1 509c: 01a06003 moveq r6, r3 if ( !the_attr->is_initialized ) 50a0: e5963000 ldr r3, [r6] 50a4: e3530000 cmp r3, #0 ; 0x0 50a8: 0a000099 beq 5314 * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) ) 50ac: e5963004 ldr r3, [r6, #4] 50b0: e3530000 cmp r3, #0 ; 0x0 50b4: 0a000004 beq 50cc 50b8: e59f3264 ldr r3, [pc, #612] ; 5324 50bc: e5932000 ldr r2, [r3] 50c0: e5963008 ldr r3, [r6, #8] 50c4: e1530002 cmp r3, r2 50c8: 3a000091 bcc 5314 * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { 50cc: e5963010 ldr r3, [r6, #16] 50d0: e3530001 cmp r3, #1 ; 0x1 50d4: 0a000002 beq 50e4 50d8: e3530002 cmp r3, #2 ; 0x2 50dc: 1a00008c bne 5314 50e0: ea000007 b 5104 case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 50e4: e59f323c ldr r3, [pc, #572] ; 5328 50e8: e5933000 ldr r3, [r3] 50ec: e5935108 ldr r5, [r3, #264] schedpolicy = api->schedpolicy; schedparam = api->schedparam; 50f0: e2854080 add r4, r5, #128 ; 0x80 50f4: e8b4000f ldm r4!, {r0, r1, r2, r3} 50f8: e28dc028 add ip, sp, #40 ; 0x28 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 50fc: e595807c ldr r8, [r5, #124] 5100: ea000003 b 5114 schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; 5104: e2864018 add r4, r6, #24 ; 0x18 5108: e8b4000f ldm r4!, {r0, r1, r2, r3} schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 510c: e5968014 ldr r8, [r6, #20] schedparam = the_attr->schedparam; 5110: e28dc028 add ip, sp, #40 ; 0x28 5114: e8ac000f stmia ip!, {r0, r1, r2, r3} 5118: e8940003 ldm r4, {r0, r1} 511c: e88c0003 stm ip, {r0, r1} /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 5120: e596300c ldr r3, [r6, #12] 5124: e3530000 cmp r3, #0 ; 0x0 5128: 13a00086 movne r0, #134 ; 0x86 512c: 1a000079 bne 5318 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 5130: e59d9028 ldr r9, [sp, #40] 5134: e2493001 sub r3, r9, #1 ; 0x1 5138: e35300fd cmp r3, #253 ; 0xfd 513c: 8a000074 bhi 5314 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 5140: e3580003 cmp r8, #3 ; 0x3 5144: 979ff108 ldrls pc, [pc, r8, lsl #2] 5148: ea000071 b 5314 514c: 00005168 .word 0x00005168 <== NOT EXECUTED 5150: 0000515c .word 0x0000515c <== NOT EXECUTED 5154: 00005170 .word 0x00005170 <== NOT EXECUTED 5158: 0000517c .word 0x0000517c <== NOT EXECUTED 515c: e3a04000 mov r4, #0 ; 0x0 5160: e1a05004 mov r5, r4 5164: ea000012 b 51b4 5168: e3a04001 mov r4, #1 ; 0x1 516c: ea000000 b 5174 5170: e3a04002 mov r4, #2 ; 0x2 <== NOT EXECUTED 5174: e3a05000 mov r5, #0 ; 0x0 5178: ea00000d b 51b4 case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( &schedparam.ss_replenish_period ) < 517c: e28d4028 add r4, sp, #40 ; 0x28 5180: e2840008 add r0, r4, #8 ; 0x8 5184: eb000fe6 bl 9124 <_Timespec_To_ticks> 5188: e1a05000 mov r5, r0 518c: e2840010 add r0, r4, #16 ; 0x10 5190: eb000fe3 bl 9124 <_Timespec_To_ticks> 5194: e1550000 cmp r5, r0 5198: 3a00005d bcc 5314 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 519c: e59d302c ldr r3, [sp, #44] 51a0: e2433001 sub r3, r3, #1 ; 0x1 51a4: e35300fd cmp r3, #253 ; 0xfd 51a8: 8a000059 bhi 5314 51ac: e59f5178 ldr r5, [pc, #376] ; 532c 51b0: e3a04003 mov r4, #3 ; 0x3 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 51b4: e59fa174 ldr sl, [pc, #372] ; 5330 51b8: e59a0000 ldr r0, [sl] 51bc: eb000695 bl 6c18 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 51c0: e59f016c ldr r0, [pc, #364] ; 5334 51c4: eb0008d8 bl 752c <_Objects_Allocate> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 51c8: e2507000 subs r7, r0, #0 ; 0x0 51cc: 0a000018 beq 5234 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 51d0: e59f314c ldr r3, [pc, #332] ; 5324 51d4: e5933000 ldr r3, [r3] 51d8: e3a0b001 mov fp, #1 ; 0x1 51dc: e1a03b13 lsl r3, r3, fp 51e0: e26920ff rsb r2, r9, #255 ; 0xff /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ 51e4: e3a09000 mov r9, #0 ; 0x0 status = _Thread_Initialize( 51e8: e5961008 ldr r1, [r6, #8] 51ec: e58d2004 str r2, [sp, #4] 51f0: e58d400c str r4, [sp, #12] 51f4: e58d5010 str r5, [sp, #16] 51f8: e58d9000 str r9, [sp] 51fc: e58db008 str fp, [sp, #8] 5200: e58d9014 str r9, [sp, #20] 5204: e58d9018 str r9, [sp, #24] 5208: e1530001 cmp r3, r1 520c: 31a03001 movcc r3, r1 5210: e59f011c ldr r0, [pc, #284] ; 5334 5214: e1a01007 mov r1, r7 5218: e5962004 ldr r2, [r6, #4] 521c: eb000c37 bl 8300 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 5220: e1500009 cmp r0, r9 5224: 1a000006 bne 5244 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 5228: e1a01007 mov r1, r7 522c: e59f0100 ldr r0, [pc, #256] ; 5334 5230: eb00098c bl 7868 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 5234: e59a0000 ldr r0, [sl] 5238: eb000692 bl 6c88 <_API_Mutex_Unlock> 523c: e3a0000b mov r0, #11 ; 0xb 5240: ea000034 b 5318 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5244: e5975108 ldr r5, [r7, #264] api->Attributes = *the_attr; 5248: e1a0c006 mov ip, r6 524c: e8bc000f ldm ip!, {r0, r1, r2, r3} 5250: e1a0e005 mov lr, r5 5254: e8ae000f stmia lr!, {r0, r1, r2, r3} 5258: e8bc000f ldm ip!, {r0, r1, r2, r3} 525c: e8ae000f stmia lr!, {r0, r1, r2, r3} 5260: e8bc000f ldm ip!, {r0, r1, r2, r3} 5264: e8ae000f stmia lr!, {r0, r1, r2, r3} 5268: e89c0003 ldm ip, {r0, r1} 526c: e88e0003 stm lr, {r0, r1} api->detachstate = the_attr->detachstate; 5270: e5963034 ldr r3, [r6, #52] api->schedpolicy = schedpolicy; 5274: e585807c str r8, [r5, #124] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 5278: e5853038 str r3, [r5, #56] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 527c: e28de028 add lr, sp, #40 ; 0x28 5280: e8be000f ldm lr!, {r0, r1, r2, r3} 5284: e285c080 add ip, r5, #128 ; 0x80 5288: e8ac000f stmia ip!, {r0, r1, r2, r3} 528c: e89e0003 ldm lr, {r0, r1} * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 5290: e5c7b075 strb fp, [r7, #117] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 5294: e88c0003 stm ip, {r0, r1} /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 5298: e59d2020 ldr r2, [sp, #32] 529c: e1a0100b mov r1, fp 52a0: e59d301c ldr r3, [sp, #28] 52a4: e1a00007 mov r0, r7 52a8: e58d9000 str r9, [sp] 52ac: eb000ef0 bl 8e74 <_Thread_Start> start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 52b0: e3580003 cmp r8, #3 ; 0x3 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 52b4: e1a04000 mov r4, r0 start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 52b8: 1a000005 bne 52d4 _Watchdog_Insert_ticks( 52bc: e2850088 add r0, r5, #136 ; 0x88 52c0: eb000f97 bl 9124 <_Timespec_To_ticks> 52c4: e285109c add r1, r5, #156 ; 0x9c Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 52c8: e58500a8 str r0, [r5, #168] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 52cc: e59f0064 ldr r0, [pc, #100] ; 5338 52d0: eb001082 bl 94e0 <_Watchdog_Insert> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 52d4: e3540000 cmp r4, #0 ; 0x0 52d8: e59f4050 ldr r4, [pc, #80] ; 5330 52dc: 1a000005 bne 52f8 52e0: e1a01007 mov r1, r7 <== NOT EXECUTED 52e4: e59f0048 ldr r0, [pc, #72] ; 5334 <== NOT EXECUTED 52e8: eb00095e bl 7868 <_Objects_Free> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 52ec: e5940000 ldr r0, [r4] <== NOT EXECUTED 52f0: eb000664 bl 6c88 <_API_Mutex_Unlock> <== NOT EXECUTED 52f4: ea000006 b 5314 <== NOT EXECUTED /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 52f8: e5973008 ldr r3, [r7, #8] 52fc: e59d2024 ldr r2, [sp, #36] _RTEMS_Unlock_allocator(); 5300: e5940000 ldr r0, [r4] /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 5304: e5823000 str r3, [r2] _RTEMS_Unlock_allocator(); 5308: eb00065e bl 6c88 <_API_Mutex_Unlock> 530c: e3a00000 mov r0, #0 ; 0x0 5310: ea000000 b 5318 return 0; 5314: e3a00016 mov r0, #22 ; 0x16 } 5318: e28dd040 add sp, sp, #64 ; 0x40 531c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 5320: 00018888 .word 0x00018888 5324: 00017dac .word 0x00017dac 5328: 0001a4c4 .word 0x0001a4c4 532c: 000056a0 .word 0x000056a0 5330: 0001a4bc .word 0x0001a4bc 5334: 0001a620 .word 0x0001a620 5338: 0001a4e4 .word 0x0001a4e4 000040e4 : 40e4: e59f2100 ldr r2, [pc, #256] ; 41ec 40e8: e5923000 ldr r3, [r2] 40ec: e2833001 add r3, r3, #1 ; 0x1 int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 40f0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 40f4: e5823000 str r3, [r2] 40f8: e1a08000 mov r8, r0 40fc: e1a04001 mov r4, r1 * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 4100: e59f00e8 ldr r0, [pc, #232] ; 41f0 4104: eb0008e0 bl 648c <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 4108: e2506000 subs r6, r0, #0 ; 0x0 410c: 1a000002 bne 411c _Thread_Enable_dispatch(); 4110: eb000c09 bl 713c <_Thread_Enable_dispatch> 4114: e3a0000b mov r0, #11 ; 0xb 4118: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return EAGAIN; } the_key->destructor = destructor; 411c: e5864014 str r4, [r6, #20] for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 4120: e59fa0cc ldr sl, [pc, #204] ; 41f4 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 4124: e1a07006 mov r7, r6 4128: e3a05001 mov r5, #1 ; 0x1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 412c: e79a3105 ldr r3, [sl, r5, lsl #2] 4130: e3530000 cmp r3, #0 ; 0x0 4134: 0a00001a beq 41a4 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 4138: e5933004 ldr r3, [r3, #4] 413c: e1d341b0 ldrh r4, [r3, #16] 4140: e2844001 add r4, r4, #1 ; 0x1 4144: e1a04104 lsl r4, r4, #2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 4148: e1a00004 mov r0, r4 414c: eb001131 bl 8618 <_Workspace_Allocate> if ( !table ) { 4150: e2503000 subs r3, r0, #0 ; 0x0 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 4154: e1a02004 mov r2, r4 4158: e3a01000 mov r1, #0 ; 0x0 ); #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { 415c: 1a00000d bne 4198 4160: e2853005 add r3, r5, #5 ; 0x5 4164: e0864103 add r4, r6, r3, lsl #2 4168: ea000001 b 4174 for ( --the_api; the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 416c: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 4170: eb001124 bl 8608 <_Workspace_Free> <== NOT EXECUTED bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 4174: e2555001 subs r5, r5, #1 ; 0x1 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 4178: e2444004 sub r4, r4, #4 ; 0x4 bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 417c: 1afffffa bne 416c RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 4180: e59f0068 ldr r0, [pc, #104] ; 41f0 4184: e1a01006 mov r1, r6 4188: eb00098e bl 67c8 <_Objects_Free> the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 418c: eb000bea bl 713c <_Thread_Enable_dispatch> 4190: e3a0000c mov r0, #12 ; 0xc 4194: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return ENOMEM; } the_key->Values[ the_api ] = table; 4198: e587301c str r3, [r7, #28] memset( table, '\0', bytes_to_allocate ); 419c: eb00221f bl ca20 41a0: ea000000 b 41a8 } else { the_key->Values[ the_api ] = NULL; 41a4: e587301c str r3, [r7, #28] * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 41a8: e2855001 add r5, r5, #1 ; 0x1 * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 41ac: e3550005 cmp r5, #5 ; 0x5 the_api++ ) { 41b0: e2877004 add r7, r7, #4 ; 0x4 * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 41b4: 1affffdc bne 412c #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 41b8: e59f3030 ldr r3, [pc, #48] ; 41f0 41bc: e593201c ldr r2, [r3, #28] 41c0: e1d630b8 ldrh r3, [r6, #8] 41c4: e5961008 ldr r1, [r6, #8] 41c8: e7826103 str r6, [r2, r3, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 41cc: e3a04000 mov r4, #0 ; 0x0 } } the_key->is_active = TRUE; 41d0: e3a03001 mov r3, #1 ; 0x1 41d4: e586400c str r4, [r6, #12] 41d8: e5c63010 strb r3, [r6, #16] _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 41dc: e5881000 str r1, [r8] _Thread_Enable_dispatch(); 41e0: eb000bd5 bl 713c <_Thread_Enable_dispatch> 41e4: e1a00004 mov r0, r4 return 0; } 41e8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 41ec: 0001388c .word 0x0001388c 41f0: 00013c64 .word 0x00013c64 41f4: 00013848 .word 0x00013848 00005750 : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 5750: e92d4030 push {r4, r5, lr} 5754: e24dd004 sub sp, sp, #4 ; 0x4 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5758: e1a0100d mov r1, sp 575c: eb000030 bl 5824 <_POSIX_Mutex_Get> switch ( location ) { 5760: e59d5000 ldr r5, [sp] 5764: e3550000 cmp r5, #0 ; 0x0 ) { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5768: e1a04000 mov r4, r0 switch ( location ) { 576c: 13a00016 movne r0, #22 ; 0x16 5770: 1a000011 bne 57bc /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 5774: e5943064 ldr r3, [r4, #100] 5778: e3530000 cmp r3, #0 ; 0x0 577c: 1a000002 bne 578c _Thread_Enable_dispatch(); 5780: eb000d1d bl 8bfc <_Thread_Enable_dispatch> <== NOT EXECUTED 5784: e3a00010 mov r0, #16 ; 0x10 <== NOT EXECUTED 5788: ea00000b b 57bc <== NOT EXECUTED return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 578c: e59f0030 ldr r0, [pc, #48] ; 57c4 5790: e1a01004 mov r1, r4 5794: eb000a0f bl 7fd8 <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 5798: e3a02016 mov r2, #22 ; 0x16 579c: e2840014 add r0, r4, #20 ; 0x14 57a0: e1a01005 mov r1, r5 57a4: eb0007f1 bl 7770 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 57a8: e59f0014 ldr r0, [pc, #20] ; 57c4 57ac: e1a01004 mov r1, r4 57b0: eb000ab4 bl 8288 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 57b4: eb000d10 bl 8bfc <_Thread_Enable_dispatch> 57b8: e1a00005 mov r0, r5 case OBJECTS_ERROR: break; } return EINVAL; } 57bc: e28dd004 add sp, sp, #4 ; 0x4 57c0: e8bd8030 pop {r4, r5, pc} 57c4: 000164e0 .word 0x000164e0 00005878 : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 5878: e92d4030 push {r4, r5, lr} <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 587c: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 5880: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 5884: 0a00000a beq 58b4 <== NOT EXECUTED return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5888: e1a0100d mov r1, sp <== NOT EXECUTED 588c: ebffffe4 bl 5824 <_POSIX_Mutex_Get> <== NOT EXECUTED switch ( location ) { 5890: e59d4000 ldr r4, [sp] <== NOT EXECUTED 5894: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 5898: 1a000005 bne 58b4 <== NOT EXECUTED case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 589c: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED 58a0: e26330ff rsb r3, r3, #255 ; 0xff <== NOT EXECUTED 58a4: e5853000 str r3, [r5] <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 58a8: eb000cd3 bl 8bfc <_Thread_Enable_dispatch> <== NOT EXECUTED 58ac: e1a00004 mov r0, r4 <== NOT EXECUTED 58b0: ea000000 b 58b8 <== NOT EXECUTED return 0; 58b4: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 58b8: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 58bc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 000058c0 : #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 58c0: e59f3120 ldr r3, [pc, #288] ; 59e8 58c4: e3510000 cmp r1, #0 ; 0x0 int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 58c8: e92d40f0 push {r4, r5, r6, r7, lr} #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 58cc: 11a04001 movne r4, r1 58d0: 01a04003 moveq r4, r3 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 58d4: e2507000 subs r7, r0, #0 ; 0x0 58d8: 0a000040 beq 59e0 break; } } #endif if ( !the_attr->is_initialized ) 58dc: e5943000 ldr r3, [r4] 58e0: e3530000 cmp r3, #0 ; 0x0 58e4: 0a00003d beq 59e0 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 58e8: e5943004 ldr r3, [r4, #4] 58ec: e3530000 cmp r3, #0 ; 0x0 58f0: 159f00f4 ldrne r0, [pc, #244] ; 59ec 58f4: 13a01068 movne r1, #104 ; 0x68 58f8: 159f20f0 ldrne r2, [pc, #240] ; 59f0 58fc: 159f30f0 ldrne r3, [pc, #240] ; 59f4 5900: 1bfff4ca blne 2c30 <__assert_func> /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 5904: e594300c ldr r3, [r4, #12] 5908: e3530001 cmp r3, #1 ; 0x1 590c: 0a000005 beq 5928 5910: e3530002 cmp r3, #2 ; 0x2 5914: 0a000005 beq 5930 5918: e3530000 cmp r3, #0 ; 0x0 591c: 01a06003 moveq r6, r3 5920: 0a000003 beq 5934 5924: ea00002d b 59e0 5928: e3a06002 mov r6, #2 ; 0x2 592c: ea000000 b 5934 5930: e3a06003 mov r6, #3 ; 0x3 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 5934: e5943008 ldr r3, [r4, #8] 5938: e2433001 sub r3, r3, #1 ; 0x1 593c: e35300fd cmp r3, #253 ; 0xfd 5940: 8a000026 bhi 59e0 5944: e59f20ac ldr r2, [pc, #172] ; 59f8 5948: e5923000 ldr r3, [r2] 594c: e2833001 add r3, r3, #1 ; 0x1 5950: e5823000 str r3, [r2] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 5954: e59f00a0 ldr r0, [pc, #160] ; 59fc 5958: eb00097b bl 7f4c <_Objects_Allocate> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 595c: e2505000 subs r5, r0, #0 ; 0x0 5960: 1a000002 bne 5970 _Thread_Enable_dispatch(); 5964: eb000ca4 bl 8bfc <_Thread_Enable_dispatch> <== NOT EXECUTED 5968: e3a0000b mov r0, #11 ; 0xb <== NOT EXECUTED 596c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 5970: e5943004 ldr r3, [r4, #4] 5974: e5853010 str r3, [r5, #16] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 5978: e5943010 ldr r3, [r4, #16] 597c: e3530000 cmp r3, #0 ; 0x0 the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 5980: 13a03000 movne r3, #0 ; 0x0 else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 5984: 03a03001 moveq r3, #1 ; 0x1 5988: e5853054 str r3, [r5, #84] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 598c: e5943008 ldr r3, [r4, #8] if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 5990: e3a01001 mov r1, #1 ; 0x1 the_mutex_attr->priority_ceiling = 5994: e26330ff rsb r3, r3, #255 ; 0xff /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 5998: e1a02001 mov r2, r1 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 599c: e5853060 str r3, [r5, #96] if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 59a0: e5c51058 strb r1, [r5, #88] the_mutex_attr->priority_ceiling = _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 59a4: e585605c str r6, [r5, #92] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 59a8: e2851054 add r1, r5, #84 ; 0x54 59ac: e2850014 add r0, r5, #20 ; 0x14 59b0: eb00076f bl 7774 <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 59b4: e59f3040 ldr r3, [pc, #64] ; 59fc 59b8: e5951008 ldr r1, [r5, #8] 59bc: e593201c ldr r2, [r3, #28] 59c0: e1d530b8 ldrh r3, [r5, #8] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 59c4: e3a04000 mov r4, #0 ; 0x0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 59c8: e7825103 str r5, [r2, r3, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 59cc: e585400c str r4, [r5, #12] CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 59d0: e5871000 str r1, [r7] _Thread_Enable_dispatch(); 59d4: eb000c88 bl 8bfc <_Thread_Enable_dispatch> 59d8: e1a00004 mov r0, r4 59dc: e8bd80f0 pop {r4, r5, r6, r7, pc} return 0; 59e0: e3a00016 mov r0, #22 ; 0x16 } 59e4: e8bd80f0 pop {r4, r5, r6, r7, pc} 59e8: 00013f00 .word 0x00013f00 59ec: 00015982 .word 0x00015982 59f0: 00013f14 .word 0x00013f14 59f4: 000159c8 .word 0x000159c8 59f8: 0001618c .word 0x0001618c 59fc: 000164e0 .word 0x000164e0 00005a74 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 5a74: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 5a78: e2527000 subs r7, r2, #0 ; 0x0 <== NOT EXECUTED int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 5a7c: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 5a80: e1a06001 mov r6, r1 <== NOT EXECUTED 5a84: e1a05000 mov r5, r0 <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 5a88: 0a000016 beq 5ae8 <== NOT EXECUTED return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 5a8c: e2413001 sub r3, r1, #1 ; 0x1 <== NOT EXECUTED 5a90: e35300fd cmp r3, #253 ; 0xfd <== NOT EXECUTED 5a94: 8a000013 bhi 5ae8 <== NOT EXECUTED /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 5a98: ebffffd8 bl 5a00 <== NOT EXECUTED if ( status ) 5a9c: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 5aa0: 1a000011 bne 5aec <== NOT EXECUTED return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5aa4: e1a00005 mov r0, r5 <== NOT EXECUTED 5aa8: e1a0100d mov r1, sp <== NOT EXECUTED 5aac: ebffff5c bl 5824 <_POSIX_Mutex_Get> <== NOT EXECUTED switch ( location ) { 5ab0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 5ab4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 5ab8: 1a00000a bne 5ae8 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 5abc: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 5ac0: e26620ff rsb r2, r6, #255 ; 0xff <== NOT EXECUTED the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 5ac4: e26330ff rsb r3, r3, #255 ; 0xff <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 5ac8: e5901008 ldr r1, [r0, #8] <== NOT EXECUTED the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 5acc: e5873000 str r3, [r7] <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 5ad0: e5802060 str r2, [r0, #96] <== NOT EXECUTED _CORE_mutex_Surrender( 5ad4: e1a02004 mov r2, r4 <== NOT EXECUTED 5ad8: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED 5adc: eb00079c bl 7954 <_CORE_mutex_Surrender> <== NOT EXECUTED &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 5ae0: eb000c45 bl 8bfc <_Thread_Enable_dispatch> <== NOT EXECUTED 5ae4: ea000000 b 5aec <== NOT EXECUTED return 0; 5ae8: e3a04016 mov r4, #22 ; 0x16 <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 5aec: e1a00004 mov r0, r4 <== NOT EXECUTED 5af0: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 5af4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 00005af8 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 5af8: e92d4010 push {r4, lr} <== NOT EXECUTED 5afc: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 5b00: e1a04000 mov r4, r0 <== NOT EXECUTED * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 5b04: e1a00001 mov r0, r1 <== NOT EXECUTED 5b08: e1a0100d mov r1, sp <== NOT EXECUTED 5b0c: eb000022 bl 5b9c <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED switch ( status ) { 5b10: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED 5b14: 93a01000 movls r1, #0 ; 0x0 <== NOT EXECUTED 5b18: 9a000002 bls 5b28 <== NOT EXECUTED 5b1c: e3500003 cmp r0, #3 ; 0x3 <== NOT EXECUTED 5b20: 13a01000 movne r1, #0 ; 0x0 <== NOT EXECUTED 5b24: 03a01001 moveq r1, #1 ; 0x1 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 5b28: e1a00004 mov r0, r4 <== NOT EXECUTED 5b2c: e59d2000 ldr r2, [sp] <== NOT EXECUTED 5b30: ebffffb5 bl 5a0c <_POSIX_Mutex_Lock_support> <== NOT EXECUTED break; } } return lock_status; } 5b34: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 5b38: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00004724 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 4724: e92d40f0 push {r4, r5, r6, r7, lr} const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 4728: e2507000 subs r7, r0, #0 ; 0x0 int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 472c: e24dd00c sub sp, sp, #12 ; 0xc const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 4730: 0a000023 beq 47c4 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 4734: e3510000 cmp r1, #0 ; 0x0 4738: 1a000003 bne 474c the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 473c: e1a0000d mov r0, sp <== NOT EXECUTED 4740: eb00028d bl 517c <== NOT EXECUTED 4744: e1a0400d mov r4, sp <== NOT EXECUTED 4748: e1a0100d mov r1, sp <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 474c: e5913000 ldr r3, [r1] 4750: e3530000 cmp r3, #0 ; 0x0 4754: 0a00001a beq 47c4 return EINVAL; switch ( the_attr->process_shared ) { 4758: e5915004 ldr r5, [r1, #4] 475c: e3550000 cmp r5, #0 ; 0x0 4760: 1a000017 bne 47c4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4764: e59f2064 ldr r2, [pc, #100] ; 47d0 4768: e5923000 ldr r3, [r2] 476c: e2833001 add r3, r3, #1 ; 0x1 4770: e5823000 str r3, [r2] * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) 4774: e59f6058 ldr r6, [pc, #88] ; 47d4 4778: e1a00006 mov r0, r6 477c: eb0009f4 bl 6f54 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 4780: e2504000 subs r4, r0, #0 ; 0x0 4784: 1a000002 bne 4794 _Thread_Enable_dispatch(); 4788: eb000d1d bl 7c04 <_Thread_Enable_dispatch> 478c: e3a0000b mov r0, #11 ; 0xb 4790: ea00000c b 47c8 return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 4794: e2840010 add r0, r4, #16 ; 0x10 4798: e28d1008 add r1, sp, #8 ; 0x8 479c: eb00081b bl 6810 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47a0: e596301c ldr r3, [r6, #28] 47a4: e5941008 ldr r1, [r4, #8] 47a8: e1d420b8 ldrh r2, [r4, #8] 47ac: e7834102 str r4, [r3, r2, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 47b0: e584500c str r5, [r4, #12] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 47b4: e5871000 str r1, [r7] _Thread_Enable_dispatch(); 47b8: eb000d11 bl 7c04 <_Thread_Enable_dispatch> 47bc: e1a00005 mov r0, r5 47c0: ea000000 b 47c8 return 0; 47c4: e3a00016 mov r0, #22 ; 0x16 } 47c8: e28dd00c add sp, sp, #12 ; 0xc 47cc: e8bd80f0 pop {r4, r5, r6, r7, pc} 47d0: 0001854c .word 0x0001854c 47d4: 00018720 .word 0x00018720 00004844 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4844: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4848: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 484c: e24dd00c sub sp, sp, #12 ; 0xc 4850: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4854: 0a000027 beq 48f8 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 4858: e28d1004 add r1, sp, #4 ; 0x4 485c: eb00199b bl aed0 <_POSIX_Absolute_timeout_to_ticks> switch (status) { 4860: e3500002 cmp r0, #2 ; 0x2 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 4864: e1a05000 mov r5, r0 switch (status) { 4868: 93a04000 movls r4, #0 ; 0x0 486c: 9a000002 bls 487c 4870: e3500003 cmp r0, #3 ; 0x3 4874: 13a04000 movne r4, #0 ; 0x0 4878: 03a04001 moveq r4, #1 ; 0x1 487c: e59f0080 ldr r0, [pc, #128] ; 4904 4880: e5961000 ldr r1, [r6] 4884: e28d2008 add r2, sp, #8 ; 0x8 4888: eb000ad9 bl 73f4 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 488c: e59d3008 ldr r3, [sp, #8] 4890: e3530000 cmp r3, #0 ; 0x0 4894: 1a000017 bne 48f8 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 4898: e58d3000 str r3, [sp] 489c: e2800010 add r0, r0, #16 ; 0x10 48a0: e5961000 ldr r1, [r6] 48a4: e1a02004 mov r2, r4 48a8: e59d3004 ldr r3, [sp, #4] 48ac: eb0007df bl 6830 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 48b0: eb000cd3 bl 7c04 <_Thread_Enable_dispatch> if ( !do_wait && 48b4: e3540000 cmp r4, #0 ; 0x0 48b8: 1a000009 bne 48e4 48bc: e59f3044 ldr r3, [pc, #68] ; 4908 <== NOT EXECUTED 48c0: e5933000 ldr r3, [r3] <== NOT EXECUTED 48c4: e5933034 ldr r3, [r3, #52] <== NOT EXECUTED 48c8: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 48cc: 1a000004 bne 48e4 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 48d0: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 48d4: 0a000007 beq 48f8 <== NOT EXECUTED 48d8: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 48dc: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 48e0: 9a000005 bls 48fc <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 48e4: e59f301c ldr r3, [pc, #28] ; 4908 48e8: e5933000 ldr r3, [r3] 48ec: e5930034 ldr r0, [r3, #52] 48f0: eb000037 bl 49d4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 48f4: ea000000 b 48fc 48f8: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 48fc: e28dd00c add sp, sp, #12 ; 0xc 4900: e8bd8070 pop {r4, r5, r6, pc} 4904: 00018720 .word 0x00018720 4908: 00018604 .word 0x00018604 0000490c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 490c: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4910: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4914: e24dd00c sub sp, sp, #12 ; 0xc 4918: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 491c: 0a000027 beq 49c0 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 4920: e28d1004 add r1, sp, #4 ; 0x4 4924: eb001969 bl aed0 <_POSIX_Absolute_timeout_to_ticks> switch (status) { 4928: e3500002 cmp r0, #2 ; 0x2 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 492c: e1a05000 mov r5, r0 switch (status) { 4930: 93a04000 movls r4, #0 ; 0x0 4934: 9a000002 bls 4944 4938: e3500003 cmp r0, #3 ; 0x3 493c: 13a04000 movne r4, #0 ; 0x0 4940: 03a04001 moveq r4, #1 ; 0x1 4944: e59f0080 ldr r0, [pc, #128] ; 49cc 4948: e5961000 ldr r1, [r6] 494c: e28d2008 add r2, sp, #8 ; 0x8 4950: eb000aa7 bl 73f4 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4954: e59d3008 ldr r3, [sp, #8] 4958: e3530000 cmp r3, #0 ; 0x0 495c: 1a000017 bne 49c0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 4960: e58d3000 str r3, [sp] 4964: e2800010 add r0, r0, #16 ; 0x10 4968: e5961000 ldr r1, [r6] 496c: e1a02004 mov r2, r4 4970: e59d3004 ldr r3, [sp, #4] 4974: eb0007e2 bl 6904 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 4978: eb000ca1 bl 7c04 <_Thread_Enable_dispatch> if ( !do_wait && 497c: e3540000 cmp r4, #0 ; 0x0 4980: 1a000009 bne 49ac 4984: e59f3044 ldr r3, [pc, #68] ; 49d0 <== NOT EXECUTED 4988: e5933000 ldr r3, [r3] <== NOT EXECUTED 498c: e5933034 ldr r3, [r3, #52] <== NOT EXECUTED 4990: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 4994: 1a000004 bne 49ac <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4998: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 499c: 0a000007 beq 49c0 <== NOT EXECUTED 49a0: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 49a4: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 49a8: 9a000005 bls 49c4 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 49ac: e59f301c ldr r3, [pc, #28] ; 49d0 49b0: e5933000 ldr r3, [r3] 49b4: e5930034 ldr r0, [r3, #52] 49b8: eb000005 bl 49d4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 49bc: ea000000 b 49c4 49c0: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 49c4: e28dd00c add sp, sp, #12 ; 0xc 49c8: e8bd8070 pop {r4, r5, r6, pc} 49cc: 00018720 .word 0x00018720 49d0: 00018604 .word 0x00018604 000042fc : * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 42fc: e59f30a4 ldr r3, [pc, #164] ; 43a8 4300: e5933000 ldr r3, [r3] 4304: e3530000 cmp r3, #0 ; 0x0 int pthread_setcancelstate( int state, int *oldstate ) { 4308: e92d4010 push {r4, lr} 430c: e1a0c001 mov ip, r1 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 4310: 13a00047 movne r0, #71 ; 0x47 4314: 18bd8010 popne {r4, pc} return EPROTO; if ( !oldstate ) 4318: e3510000 cmp r1, #0 ; 0x0 431c: 0a00001f beq 43a0 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 4320: e3500001 cmp r0, #1 ; 0x1 4324: 8a00001d bhi 43a0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4328: e59f107c ldr r1, [pc, #124] ; 43ac return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 432c: e59f207c ldr r2, [pc, #124] ; 43b0 4330: e5913000 ldr r3, [r1] 4334: e5922000 ldr r2, [r2] 4338: e2833001 add r3, r3, #1 ; 0x1 433c: e5813000 str r3, [r1] 4340: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 4344: e59230cc ldr r3, [r2, #204] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4348: e3500000 cmp r0, #0 ; 0x0 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 434c: e58c3000 str r3, [ip] thread_support->cancelability_state = state; 4350: e58200cc str r0, [r2, #204] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4354: 1a000006 bne 4374 4358: e59230d0 ldr r3, [r2, #208] 435c: e3530001 cmp r3, #1 ; 0x1 4360: 1a000003 bne 4374 4364: e59230d4 ldr r3, [r2, #212] <== NOT EXECUTED 4368: e2534000 subs r4, r3, #0 ; 0x0 <== NOT EXECUTED 436c: 13a04001 movne r4, #1 ; 0x1 <== NOT EXECUTED 4370: ea000000 b 4378 <== NOT EXECUTED 4374: e3a04000 mov r4, #0 ; 0x0 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4378: eb000a22 bl 6c08 <_Thread_Enable_dispatch> if ( cancel ) 437c: e3540000 cmp r4, #0 ; 0x0 4380: 01a00004 moveq r0, r4 4384: 08bd8010 popeq {r4, pc} _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 4388: e59f3020 ldr r3, [pc, #32] ; 43b0 <== NOT EXECUTED 438c: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 4390: e5930000 ldr r0, [r3] <== NOT EXECUTED 4394: ebfffed4 bl 3eec <_POSIX_Thread_Exit> <== NOT EXECUTED 4398: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 439c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 43a0: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED return 0; } 43a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 43a8: 000137e0 .word 0x000137e0 43ac: 0001374c .word 0x0001374c 43b0: 00013804 .word 0x00013804 000043b4 : * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 43b4: e59f30a4 ldr r3, [pc, #164] ; 4460 43b8: e5933000 ldr r3, [r3] 43bc: e3530000 cmp r3, #0 ; 0x0 int pthread_setcanceltype( int type, int *oldtype ) { 43c0: e92d4010 push {r4, lr} 43c4: e1a0c001 mov ip, r1 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 43c8: 13a00047 movne r0, #71 ; 0x47 43cc: 18bd8010 popne {r4, pc} return EPROTO; if ( !oldtype ) 43d0: e3510000 cmp r1, #0 ; 0x0 43d4: 0a00001f beq 4458 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 43d8: e3500001 cmp r0, #1 ; 0x1 43dc: 8a00001d bhi 4458 43e0: e59f107c ldr r1, [pc, #124] ; 4464 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 43e4: e59f207c ldr r2, [pc, #124] ; 4468 43e8: e5913000 ldr r3, [r1] 43ec: e5922000 ldr r2, [r2] 43f0: e2833001 add r3, r3, #1 ; 0x1 43f4: e5813000 str r3, [r1] 43f8: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 43fc: e59230d0 ldr r3, [r2, #208] 4400: e58c3000 str r3, [ip] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4404: e59230cc ldr r3, [r2, #204] 4408: e3530000 cmp r3, #0 ; 0x0 thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; 440c: e58200d0 str r0, [r2, #208] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4410: 1a000005 bne 442c 4414: e3500001 cmp r0, #1 ; 0x1 4418: 1a000003 bne 442c 441c: e59230d4 ldr r3, [r2, #212] 4420: e2534000 subs r4, r3, #0 ; 0x0 4424: 13a04001 movne r4, #1 ; 0x1 4428: ea000000 b 4430 442c: e3a04000 mov r4, #0 ; 0x0 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4430: eb0009f4 bl 6c08 <_Thread_Enable_dispatch> if ( cancel ) 4434: e3540000 cmp r4, #0 ; 0x0 4438: 01a00004 moveq r0, r4 443c: 08bd8010 popeq {r4, pc} _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 4440: e59f3020 ldr r3, [pc, #32] ; 4468 <== NOT EXECUTED 4444: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 4448: e5930000 ldr r0, [r3] <== NOT EXECUTED 444c: ebfffea6 bl 3eec <_POSIX_Thread_Exit> <== NOT EXECUTED 4450: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 4454: e8bd8010 pop {r4, pc} <== NOT EXECUTED 4458: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED return 0; } 445c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 4460: 000137e0 .word 0x000137e0 4464: 0001374c .word 0x0001374c 4468: 00013804 .word 0x00013804 00006384 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 6384: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Check all the parameters */ if ( !param ) 6388: e2526000 subs r6, r2, #0 ; 0x0 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 638c: e24dd004 sub sp, sp, #4 ; 0x4 6390: e1a05000 mov r5, r0 6394: e1a0a001 mov sl, r1 /* * Check all the parameters */ if ( !param ) 6398: 0a000051 beq 64e4 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 639c: e5963000 ldr r3, [r6] 63a0: e2433001 sub r3, r3, #1 ; 0x1 63a4: e35300fd cmp r3, #253 ; 0xfd 63a8: 8a00004d bhi 64e4 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 63ac: e3510003 cmp r1, #3 ; 0x3 63b0: 979ff101 ldrls pc, [pc, r1, lsl #2] 63b4: ea00004a b 64e4 63b8: 000063d4 .word 0x000063d4 <== NOT EXECUTED 63bc: 000063c8 .word 0x000063c8 <== NOT EXECUTED 63c0: 000063dc .word 0x000063dc <== NOT EXECUTED 63c4: 000063e8 .word 0x000063e8 <== NOT EXECUTED 63c8: e3a07000 mov r7, #0 ; 0x0 63cc: e1a08007 mov r8, r7 63d0: ea000011 b 641c 63d4: e3a07001 mov r7, #1 ; 0x1 63d8: ea000000 b 63e0 63dc: e3a07002 mov r7, #2 ; 0x2 63e0: e3a08000 mov r8, #0 ; 0x0 63e4: ea00000c b 641c case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 63e8: e2860008 add r0, r6, #8 ; 0x8 63ec: eb000db9 bl 9ad8 <_Timespec_To_ticks> 63f0: e1a04000 mov r4, r0 63f4: e2860010 add r0, r6, #16 ; 0x10 63f8: eb000db6 bl 9ad8 <_Timespec_To_ticks> 63fc: e1540000 cmp r4, r0 6400: 3a000037 bcc 64e4 _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 6404: e5963004 ldr r3, [r6, #4] 6408: e2433001 sub r3, r3, #1 ; 0x1 640c: e35300fd cmp r3, #253 ; 0xfd 6410: 8a000033 bhi 64e4 6414: e59f80d4 ldr r8, [pc, #212] ; 64f0 6418: e3a07003 mov r7, #3 ; 0x3 641c: e1a01005 mov r1, r5 6420: e59f00cc ldr r0, [pc, #204] ; 64f4 6424: e1a0200d mov r2, sp 6428: eb0007ef bl 83ec <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 642c: e59d3000 ldr r3, [sp] 6430: e3530000 cmp r3, #0 ; 0x0 6434: e1a05000 mov r5, r0 6438: 13a00003 movne r0, #3 ; 0x3 643c: 1a000029 bne 64e8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 6440: e5954108 ldr r4, [r5, #264] if ( api->schedpolicy == SCHED_SPORADIC ) 6444: e594307c ldr r3, [r4, #124] 6448: e3530003 cmp r3, #3 ; 0x3 (void) _Watchdog_Remove( &api->Sporadic_timer ); 644c: 0284009c addeq r0, r4, #156 ; 0x9c 6450: 0b000eeb bleq a004 <_Watchdog_Remove> api->schedpolicy = policy; 6454: e584a07c str sl, [r4, #124] api->schedparam = *param; 6458: e1a0e006 mov lr, r6 645c: e8be000f ldm lr!, {r0, r1, r2, r3} 6460: e284c080 add ip, r4, #128 ; 0x80 6464: e8ac000f stmia ip!, {r0, r1, r2, r3} 6468: e89e0003 ldm lr, {r0, r1} the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 646c: e35a0000 cmp sl, #0 ; 0x0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 6470: e88c0003 stm ip, {r0, r1} the_thread->budget_algorithm = budget_algorithm; 6474: e585707c str r7, [r5, #124] the_thread->budget_callout = budget_callout; 6478: e5858080 str r8, [r5, #128] switch ( api->schedpolicy ) { 647c: ba000015 blt 64d8 6480: e35a0002 cmp sl, #2 ; 0x2 6484: da000002 ble 6494 6488: e35a0003 cmp sl, #3 ; 0x3 648c: 1a000011 bne 64d8 6490: ea000009 b 64bc case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 6494: e59f305c ldr r3, [pc, #92] ; 64f8 6498: e5941080 ldr r1, [r4, #128] 649c: e5933000 ldr r3, [r3] 64a0: e26110ff rsb r1, r1, #255 ; 0xff 64a4: e5853078 str r3, [r5, #120] the_thread->real_priority = 64a8: e5851018 str r1, [r5, #24] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 64ac: e1a00005 mov r0, r5 64b0: e3a02001 mov r2, #1 ; 0x1 64b4: eb000868 bl 865c <_Thread_Change_priority> 64b8: ea000006 b 64d8 TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 64bc: e5943080 ldr r3, [r4, #128] _Watchdog_Remove( &api->Sporadic_timer ); 64c0: e284009c add r0, r4, #156 ; 0x9c TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 64c4: e5843098 str r3, [r4, #152] _Watchdog_Remove( &api->Sporadic_timer ); 64c8: eb000ecd bl a004 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 64cc: e1a01005 mov r1, r5 64d0: e3a00000 mov r0, #0 ; 0x0 64d4: ebffff87 bl 62f8 <_POSIX_Threads_Sporadic_budget_TSR> break; } _Thread_Enable_dispatch(); 64d8: eb0009c7 bl 8bfc <_Thread_Enable_dispatch> 64dc: e3a00000 mov r0, #0 ; 0x0 64e0: ea000000 b 64e8 return 0; 64e4: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return ESRCH; } 64e8: e28dd004 add sp, sp, #4 ; 0x4 64ec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 64f0: 000062c0 .word 0x000062c0 64f4: 000163a0 .word 0x000163a0 64f8: 00016144 .word 0x00016144 00003aa0 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 3aa0: e92d4010 push {r4, lr} if ( !time_buffer ) 3aa4: e2514000 subs r4, r1, #0 ; 0x0 3aa8: 03a00009 moveq r0, #9 ; 0x9 3aac: 08bd8010 popeq {r4, pc} return RTEMS_INVALID_ADDRESS; switch ( option ) { 3ab0: e3500004 cmp r0, #4 ; 0x4 3ab4: 979ff100 ldrls pc, [pc, r0, lsl #2] 3ab8: ea000004 b 3ad0 3abc: 00003ad8 .word 0x00003ad8 <== NOT EXECUTED 3ac0: 00003ae4 .word 0x00003ae4 <== NOT EXECUTED 3ac4: 00003af0 .word 0x00003af0 <== NOT EXECUTED 3ac8: 00003af8 .word 0x00003af8 <== NOT EXECUTED 3acc: 00003b08 .word 0x00003b08 <== NOT EXECUTED 3ad0: e3a0000a mov r0, #10 ; 0xa 3ad4: e8bd8010 pop {r4, pc} case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 3ad8: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3adc: e8bd4010 pop {r4, lr} if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 3ae0: ea000025 b 3b7c case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 3ae4: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3ae8: e8bd4010 pop {r4, lr} switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 3aec: ea000008 b 3b14 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 3af0: eb00001d bl 3b6c 3af4: ea000000 b 3afc return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 3af8: eb000013 bl 3b4c 3afc: e5840000 str r0, [r4] 3b00: e3a00000 mov r0, #0 ; 0x0 3b04: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 3b08: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3b0c: e8bd4010 pop {r4, lr} *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 3b10: ea00004b b 3c44 00006d64 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 6d64: e92d41f0 push {r4, r5, r6, r7, r8, lr} uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 6d68: e2507000 subs r7, r0, #0 ; 0x0 6d6c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} return; 6d70: e59f6054 ldr r6, [pc, #84] ; 6dcc for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 6d74: e2868010 add r8, r6, #16 ; 0x10 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 6d78: e5963004 ldr r3, [r6, #4] 6d7c: e3530000 cmp r3, #0 ; 0x0 6d80: 0a00000d beq 6dbc continue; information = _Objects_Information_table[ api_index ][ 1 ]; 6d84: e5935004 ldr r5, [r3, #4] if ( information ) { 6d88: e3550000 cmp r5, #0 ; 0x0 6d8c: 13a04001 movne r4, #1 ; 0x1 6d90: 1a000006 bne 6db0 6d94: ea000008 b 6dbc <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 6d98: e595301c ldr r3, [r5, #28] 6d9c: e7933104 ldr r3, [r3, r4, lsl #2] if ( !the_thread ) 6da0: e2530000 subs r0, r3, #0 ; 0x0 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 6da4: e2844001 add r4, r4, #1 ; 0x1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; (*routine)(the_thread); 6da8: 11a0e00f movne lr, pc 6dac: 112fff17 bxne r7 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 6db0: e1d531b0 ldrh r3, [r5, #16] 6db4: e1540003 cmp r4, r3 6db8: 9afffff6 bls 6d98 6dbc: e2866004 add r6, r6, #4 ; 0x4 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 6dc0: e1560008 cmp r6, r8 6dc4: 1affffeb bne 6d78 6dc8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 6dcc: 00022788 .word 0x00022788 000281a4 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 281a4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 281a8: e2514000 subs r4, r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 281ac: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 281b0: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED 281b4: 0a000013 beq 28208 <== NOT EXECUTED 281b8: e1a01000 mov r1, r0 <== NOT EXECUTED 281bc: e1a0200d mov r2, sp <== NOT EXECUTED 281c0: e59f0048 ldr r0, [pc, #72] ; 28210 <== NOT EXECUTED 281c4: ebff8383 bl 8fd8 <_Objects_Get> <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 281c8: e59d5000 ldr r5, [sp] <== NOT EXECUTED 281cc: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 281d0: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 281d4: 1a00000b bne 28208 <== NOT EXECUTED case OBJECTS_LOCAL: *statistics = the_period->Statistics; 281d8: e280c054 add ip, r0, #84 ; 0x54 <== NOT EXECUTED 281dc: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 281e0: e1a0e004 mov lr, r4 <== NOT EXECUTED 281e4: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 281e8: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 281ec: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 281f0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 281f4: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 281f8: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED 281fc: e88e0003 stm lr, {r0, r1} <== NOT EXECUTED _Thread_Enable_dispatch(); 28200: ebff85b5 bl 98dc <_Thread_Enable_dispatch> <== NOT EXECUTED 28204: e1a00005 mov r0, r5 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 28208: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 2820c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 28210: 0005717c .word 0x0005717c 00028214 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 28214: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 28218: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 2821c: e24dd00c sub sp, sp, #12 ; 0xc Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 28220: 03a00009 moveq r0, #9 ; 0x9 28224: 0a000021 beq 282b0 28228: e1a01000 mov r1, r0 2822c: e28d2008 add r2, sp, #8 ; 0x8 28230: e59f0080 ldr r0, [pc, #128] ; 282b8 28234: ebff8367 bl 8fd8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 28238: e59d3008 ldr r3, [sp, #8] 2823c: e3530000 cmp r3, #0 ; 0x0 28240: e1a06000 mov r6, r0 28244: 13a00004 movne r0, #4 ; 0x4 28248: 1a000018 bne 282b0 case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 2824c: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED 28250: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 28254: 01a02003 moveq r2, r3 <== NOT EXECUTED 28258: 15932008 ldrne r2, [r3, #8] <== NOT EXECUTED status->state = the_period->state; 2825c: e5963038 ldr r3, [r6, #56] <== NOT EXECUTED if ( status->state == RATE_MONOTONIC_INACTIVE ) { 28260: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 28264: e885000c stm r5, {r2, r3} <== NOT EXECUTED #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; status->executed_since_last_period.tv_nsec = 0; 28268: 05853014 streq r3, [r5, #20] <== NOT EXECUTED status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS status->since_last_period.tv_sec = 0; 2826c: 05853008 streq r3, [r5, #8] <== NOT EXECUTED status->since_last_period.tv_nsec = 0; 28270: 0585300c streq r3, [r5, #12] <== NOT EXECUTED #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; 28274: 05853010 streq r3, [r5, #16] <== NOT EXECUTED 28278: 0a00000a beq 282a8 <== NOT EXECUTED * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 2827c: e1a0000d mov r0, sp <== NOT EXECUTED 28280: ebffdbdc bl 1f1f8 <_TOD_Get_uptime> <== NOT EXECUTED #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 28284: e2860044 add r0, r6, #68 ; 0x44 <== NOT EXECUTED 28288: e1a0100d mov r1, sp <== NOT EXECUTED 2828c: e2852008 add r2, r5, #8 ; 0x8 <== NOT EXECUTED 28290: ebff891a bl a700 <_Timespec_Subtract> <== NOT EXECUTED status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 28294: e1a0100d mov r1, sp <== NOT EXECUTED 28298: e2852010 add r2, r5, #16 ; 0x10 <== NOT EXECUTED 2829c: e59f0018 ldr r0, [pc, #24] ; 282bc <== NOT EXECUTED * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 282a0: e1a0400d mov r4, sp <== NOT EXECUTED status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 282a4: ebff8915 bl a700 <_Timespec_Subtract> <== NOT EXECUTED the_period->owner->cpu_time_used - the_period->owner_executed_at_period; #endif } _Thread_Enable_dispatch(); 282a8: ebff858b bl 98dc <_Thread_Enable_dispatch> <== NOT EXECUTED 282ac: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 282b0: e28dd00c add sp, sp, #12 ; 0xc 282b4: e8bd8070 pop {r4, r5, r6, pc} 282b8: 0005717c .word 0x0005717c 282bc: 000566ec .word 0x000566ec 0001e750 : void rtems_rate_monotonic_report_statistics( void ) { rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 1e750: e59f1004 ldr r1, [pc, #4] ; 1e75c <== NOT EXECUTED 1e754: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1e758: eaffff79 b 1e544 <== NOT EXECUTED 1e75c: 00005128 .word 0x00005128 0001e544 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 1e544: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 1e548: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 1e54c: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED 1e550: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 1e554: 0a000071 beq 1e720 <== NOT EXECUTED return; (*print)( context, "Period information by period\n" ); 1e558: e59f11c8 ldr r1, [pc, #456] ; 1e728 <== NOT EXECUTED 1e55c: e1a0e00f mov lr, pc <== NOT EXECUTED 1e560: e12fff15 bx r5 <== NOT EXECUTED #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 1e564: e59f11c0 ldr r1, [pc, #448] ; 1e72c <== NOT EXECUTED 1e568: e1a00006 mov r0, r6 <== NOT EXECUTED 1e56c: e1a0e00f mov lr, pc <== NOT EXECUTED 1e570: e12fff15 bx r5 <== NOT EXECUTED #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 1e574: e59f11b4 ldr r1, [pc, #436] ; 1e730 <== NOT EXECUTED 1e578: e1a00006 mov r0, r6 <== NOT EXECUTED 1e57c: e1a0e00f mov lr, pc <== NOT EXECUTED 1e580: e12fff15 bx r5 <== NOT EXECUTED Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 1e584: e59f11a8 ldr r1, [pc, #424] ; 1e734 <== NOT EXECUTED 1e588: e1a00006 mov r0, r6 <== NOT EXECUTED 1e58c: e1a0e00f mov lr, pc <== NOT EXECUTED 1e590: e12fff15 bx r5 <== NOT EXECUTED #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 1e594: e1a00006 mov r0, r6 <== NOT EXECUTED 1e598: e59f1198 ldr r1, [pc, #408] ; 1e738 <== NOT EXECUTED 1e59c: e1a0e00f mov lr, pc <== NOT EXECUTED 1e5a0: e12fff15 bx r5 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 1e5a4: e59f3190 ldr r3, [pc, #400] ; 1e73c <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 1e5a8: e28d8010 add r8, sp, #16 ; 0x10 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 1e5ac: e5937008 ldr r7, [r3, #8] <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 1e5b0: e2889018 add r9, r8, #24 ; 0x18 <== NOT EXECUTED 1e5b4: e28db060 add fp, sp, #96 ; 0x60 <== NOT EXECUTED * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 1e5b8: e288a030 add sl, r8, #48 ; 0x30 <== NOT EXECUTED 1e5bc: ea000051 b 1e708 <== NOT EXECUTED * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 1e5c0: eb0026f7 bl 281a4 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) 1e5c4: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 1e5c8: 1a00004d bne 1e704 <== NOT EXECUTED continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 1e5cc: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED 1e5d0: e1a00007 mov r0, r7 <== NOT EXECUTED 1e5d4: eb00270e bl 28214 <== NOT EXECUTED continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 1e5d8: e59d0048 ldr r0, [sp, #72] <== NOT EXECUTED 1e5dc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif name[ 0 ] = '\0'; 1e5e0: e5cd406b strb r4, [sp, #107] <== NOT EXECUTED if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 1e5e4: 128d206b addne r2, sp, #107 ; 0x6b <== NOT EXECUTED 1e5e8: 13a01005 movne r1, #5 ; 0x5 <== NOT EXECUTED 1e5ec: 1bffa3d9 blne 7558 <== NOT EXECUTED /* * Print part of report line that is not dependent on granularity */ (*print)( context, 1e5f0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1e5f4: e58d3000 str r3, [sp] <== NOT EXECUTED 1e5f8: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 1e5fc: e1a02007 mov r2, r7 <== NOT EXECUTED 1e600: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 1e604: e59f1134 ldr r1, [pc, #308] ; 1e740 <== NOT EXECUTED 1e608: e28d306b add r3, sp, #107 ; 0x6b <== NOT EXECUTED 1e60c: e1a00006 mov r0, r6 <== NOT EXECUTED 1e610: e1a0e00f mov lr, pc <== NOT EXECUTED 1e614: e12fff15 bx r5 <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 1e618: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1e61c: e2531000 subs r1, r3, #0 ; 0x0 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 1e620: e1a0200b mov r2, fp <== NOT EXECUTED 1e624: e1a00009 mov r0, r9 <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 1e628: 1a000004 bne 1e640 <== NOT EXECUTED (*print)( context, "\n" ); 1e62c: e1a00006 mov r0, r6 <== NOT EXECUTED 1e630: e59f110c ldr r1, [pc, #268] ; 1e744 <== NOT EXECUTED 1e634: e1a0e00f mov lr, pc <== NOT EXECUTED 1e638: e12fff15 bx r5 <== NOT EXECUTED 1e63c: ea000030 b 1e704 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 1e640: eb000584 bl 1fc58 <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 1e644: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED 1e648: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1e64c: eb006f57 bl 3a3b0 <__aeabi_idiv> <== NOT EXECUTED 1e650: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 1e654: e1a04000 mov r4, r0 <== NOT EXECUTED 1e658: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1e65c: e59d0024 ldr r0, [sp, #36] <== NOT EXECUTED 1e660: e58d3000 str r3, [sp] <== NOT EXECUTED 1e664: eb006f51 bl 3a3b0 <__aeabi_idiv> <== NOT EXECUTED 1e668: e59d3060 ldr r3, [sp, #96] <== NOT EXECUTED 1e66c: e58d0004 str r0, [sp, #4] <== NOT EXECUTED 1e670: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1e674: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 1e678: e58d3008 str r3, [sp, #8] <== NOT EXECUTED 1e67c: eb006f4b bl 3a3b0 <__aeabi_idiv> <== NOT EXECUTED 1e680: e1a03004 mov r3, r4 <== NOT EXECUTED 1e684: e58d000c str r0, [sp, #12] <== NOT EXECUTED 1e688: e59f10b8 ldr r1, [pc, #184] ; 1e748 <== NOT EXECUTED 1e68c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED 1e690: e1a00006 mov r0, r6 <== NOT EXECUTED 1e694: e1a0e00f mov lr, pc <== NOT EXECUTED 1e698: e12fff15 bx r5 <== NOT EXECUTED * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 1e69c: e1a0200b mov r2, fp <== NOT EXECUTED 1e6a0: e1a0000a mov r0, sl <== NOT EXECUTED 1e6a4: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 1e6a8: eb00056a bl 1fc58 <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 1e6ac: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1e6b0: e59d0034 ldr r0, [sp, #52] <== NOT EXECUTED 1e6b4: eb006f3d bl 3a3b0 <__aeabi_idiv> <== NOT EXECUTED 1e6b8: e59d3038 ldr r3, [sp, #56] <== NOT EXECUTED 1e6bc: e1a04000 mov r4, r0 <== NOT EXECUTED 1e6c0: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1e6c4: e59d003c ldr r0, [sp, #60] <== NOT EXECUTED 1e6c8: e58d3000 str r3, [sp] <== NOT EXECUTED 1e6cc: eb006f37 bl 3a3b0 <__aeabi_idiv> <== NOT EXECUTED 1e6d0: e59d3060 ldr r3, [sp, #96] <== NOT EXECUTED 1e6d4: e58d0004 str r0, [sp, #4] <== NOT EXECUTED 1e6d8: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1e6dc: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 1e6e0: e58d3008 str r3, [sp, #8] <== NOT EXECUTED 1e6e4: eb006f31 bl 3a3b0 <__aeabi_idiv> <== NOT EXECUTED 1e6e8: e1a03004 mov r3, r4 <== NOT EXECUTED 1e6ec: e58d000c str r0, [sp, #12] <== NOT EXECUTED 1e6f0: e59f1054 ldr r1, [pc, #84] ; 1e74c <== NOT EXECUTED 1e6f4: e1a00006 mov r0, r6 <== NOT EXECUTED 1e6f8: e59d2030 ldr r2, [sp, #48] <== NOT EXECUTED 1e6fc: e1a0e00f mov lr, pc <== NOT EXECUTED 1e700: e12fff15 bx r5 <== NOT EXECUTED * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 1e704: e2877001 add r7, r7, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 1e708: e59f202c ldr r2, [pc, #44] ; 1e73c <== NOT EXECUTED 1e70c: e592300c ldr r3, [r2, #12] <== NOT EXECUTED 1e710: e1570003 cmp r7, r3 <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 1e714: e1a00007 mov r0, r7 <== NOT EXECUTED 1e718: e1a01008 mov r1, r8 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 1e71c: 9affffa7 bls 1e5c0 <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 1e720: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED 1e724: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 1e728: 00041475 .word 0x00041475 1e72c: 00041493 .word 0x00041493 1e730: 000414b5 .word 0x000414b5 1e734: 000414d8 .word 0x000414d8 1e738: 00041523 .word 0x00041523 1e73c: 0005717c .word 0x0005717c 1e740: 0004156f .word 0x0004156f 1e744: 000417e0 .word 0x000417e0 1e748: 00041586 .word 0x00041586 1e74c: 000415a5 .word 0x000415a5 0001e760 : 1e760: e59f303c ldr r3, [pc, #60] ; 1e7a4 <== NOT EXECUTED 1e764: e5932000 ldr r2, [r3] <== NOT EXECUTED 1e768: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 1e76c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 1e770: e5832000 str r2, [r3] <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 1e774: e59f302c ldr r3, [pc, #44] ; 1e7a8 <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; 1e778: e1a05003 mov r5, r3 <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 1e77c: e5934008 ldr r4, [r3, #8] <== NOT EXECUTED 1e780: ea000000 b 1e788 <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 1e784: eb000008 bl 1e7ac <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 1e788: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 1e78c: e1540003 cmp r4, r3 <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 1e790: e1a00004 mov r0, r4 <== NOT EXECUTED * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 1e794: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 1e798: 9afffff9 bls 1e784 <== NOT EXECUTED /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 1e79c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 1e7a0: eaffac4d b 98dc <_Thread_Enable_dispatch> <== NOT EXECUTED 1e7a4: 0005662c .word 0x0005662c 1e7a8: 0005717c .word 0x0005717c 0001e7ac : */ rtems_status_code rtems_rate_monotonic_reset_statistics( Objects_Id id ) { 1e7ac: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 1e7b0: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 1e7b4: e1a01000 mov r1, r0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 1e7b8: e1a0200d mov r2, sp <== NOT EXECUTED 1e7bc: e59f0048 ldr r0, [pc, #72] ; 1e80c <== NOT EXECUTED 1e7c0: ebffaa04 bl 8fd8 <_Objects_Get> <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 1e7c4: e59d5000 ldr r5, [sp] <== NOT EXECUTED 1e7c8: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 1e7cc: e1a04000 mov r4, r0 <== NOT EXECUTED 1e7d0: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 1e7d4: 1a00000a bne 1e804 <== NOT EXECUTED case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 1e7d8: e1a01005 mov r1, r5 <== NOT EXECUTED 1e7dc: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED 1e7e0: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 1e7e4: eb003833 bl 2c8b8 <== NOT EXECUTED 1e7e8: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED 1e7ec: e5843078 str r3, [r4, #120] <== NOT EXECUTED 1e7f0: e584305c str r3, [r4, #92] <== NOT EXECUTED 1e7f4: e5843060 str r3, [r4, #96] <== NOT EXECUTED 1e7f8: e5843074 str r3, [r4, #116] <== NOT EXECUTED _Thread_Enable_dispatch(); 1e7fc: ebffac36 bl 98dc <_Thread_Enable_dispatch> <== NOT EXECUTED 1e800: e1a00005 mov r0, r5 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1e804: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 1e808: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 1e80c: 0005717c .word 0x0005717c 0000f614 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { f614: e92d40f0 push {r4, r5, r6, r7, lr} Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) f618: e2517000 subs r7, r1, #0 ; 0x0 rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { f61c: e1a04000 mov r4, r0 f620: e24dd008 sub sp, sp, #8 ; 0x8 f624: e1a06002 mov r6, r2 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) f628: 03a04009 moveq r4, #9 ; 0x9 f62c: 0a000029 beq f6d8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ f630: e59f30ac ldr r3, [pc, #172] ; f6e4 f634: e5930000 ldr r0, [r3] f638: eb0008ec bl 119f0 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) f63c: e1a01004 mov r1, r4 f640: e59f00a0 ldr r0, [pc, #160] ; f6e8 f644: e1a0200d mov r2, sp f648: eb000f65 bl 133e4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { f64c: e59d5000 ldr r5, [sp] f650: e3550000 cmp r5, #0 ; 0x0 f654: e1a04000 mov r4, r0 f658: 0a000003 beq f66c f65c: e3550001 cmp r5, #1 ; 0x1 f660: 03a04004 moveq r4, #4 ; 0x4 f664: 1a000017 bne f6c8 f668: ea000017 b f6cc case OBJECTS_LOCAL: heap_status = _Heap_Extend( f66c: e1a01007 mov r1, r7 f670: e1a02006 mov r2, r6 f674: e2800068 add r0, r0, #104 ; 0x68 f678: e28d3004 add r3, sp, #4 ; 0x4 f67c: eb000bd5 bl 125d8 <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { f680: e3500001 cmp r0, #1 ; 0x1 f684: 03a04009 moveq r4, #9 ; 0x9 f688: 0a00000f beq f6cc f68c: 3a000002 bcc f69c f690: e3500002 cmp r0, #2 ; 0x2 f694: 1a00000b bne f6c8 f698: ea000008 b f6c0 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; f69c: e59d1004 ldr r1, [sp, #4] f6a0: e5942054 ldr r2, [r4, #84] the_region->maximum_segment_size += amount_extended; f6a4: e594305c ldr r3, [r4, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; f6a8: e0822001 add r2, r2, r1 the_region->maximum_segment_size += amount_extended; f6ac: e0833001 add r3, r3, r1 f6b0: e584305c str r3, [r4, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; f6b4: e5842054 str r2, [r4, #84] the_region->maximum_segment_size += amount_extended; f6b8: e1a04005 mov r4, r5 f6bc: ea000002 b f6cc return_status = RTEMS_SUCCESSFUL; break; f6c0: e3a04018 mov r4, #24 ; 0x18 f6c4: ea000000 b f6cc f6c8: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); f6cc: e59f3010 ldr r3, [pc, #16] ; f6e4 f6d0: e5930000 ldr r0, [r3] f6d4: eb0008e1 bl 11a60 <_API_Mutex_Unlock> return return_status; } f6d8: e1a00004 mov r0, r4 f6dc: e28dd008 add sp, sp, #8 ; 0x8 f6e0: e8bd80f0 pop {r4, r5, r6, r7, pc} f6e4: 000300bc .word 0x000300bc f6e8: 0002fe94 .word 0x0002fe94 0000fa10 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { fa10: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) fa14: e253a000 subs sl, r3, #0 ; 0x0 Objects_Id id, void *segment, size_t size, size_t *old_size ) { fa18: e24dd010 sub sp, sp, #16 ; 0x10 fa1c: e1a04000 mov r4, r0 fa20: e1a06001 mov r6, r1 fa24: e1a07002 mov r7, r2 uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) fa28: 0a000029 beq fad4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); fa2c: e59f80b0 ldr r8, [pc, #176] ; fae4 fa30: e5980000 ldr r0, [r8] fa34: eb0007ed bl 119f0 <_API_Mutex_Lock> fa38: e1a01004 mov r1, r4 fa3c: e59f00a4 ldr r0, [pc, #164] ; fae8 fa40: e28d2008 add r2, sp, #8 ; 0x8 fa44: eb000e66 bl 133e4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { fa48: e59d3008 ldr r3, [sp, #8] fa4c: e3530000 cmp r3, #0 ; 0x0 fa50: e1a05000 mov r5, r0 fa54: 0a000005 beq fa70 fa58: e3530001 cmp r3, #1 ; 0x1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); fa5c: e5980000 ldr r0, [r8] return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { fa60: 03a04004 moveq r4, #4 ; 0x4 fa64: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); fa68: eb0007fc bl 11a60 <_API_Mutex_Unlock> fa6c: ea000019 b fad8 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( fa70: e28d3004 add r3, sp, #4 ; 0x4 fa74: e28dc00c add ip, sp, #12 ; 0xc fa78: e1a01006 mov r1, r6 fa7c: e1a02007 mov r2, r7 fa80: e2800068 add r0, r0, #104 ; 0x68 fa84: e58dc000 str ip, [sp] fa88: eb000c50 bl 12bd0 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; fa8c: e59d3004 ldr r3, [sp, #4] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) fa90: e2504000 subs r4, r0, #0 ; 0x0 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; fa94: e58a3000 str r3, [sl] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) fa98: 1a000005 bne fab4 fa9c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED faa0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED faa4: 0a000002 beq fab4 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ faa8: e1a00005 mov r0, r5 <== NOT EXECUTED faac: eb001f4f bl 177f0 <_Region_Process_queue> <== NOT EXECUTED fab0: ea000008 b fad8 <== NOT EXECUTED else _RTEMS_Unlock_allocator(); fab4: e59f3028 ldr r3, [pc, #40] ; fae4 fab8: e5930000 ldr r0, [r3] fabc: eb0007e7 bl 11a60 <_API_Mutex_Unlock> return fac0: e3540000 cmp r4, #0 ; 0x0 fac4: 0a000003 beq fad8 fac8: e3540001 cmp r4, #1 ; 0x1 facc: 0284400c addeq r4, r4, #12 ; 0xc fad0: 0a000000 beq fad8 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; fad4: e3a04009 mov r4, #9 ; 0x9 } fad8: e1a00004 mov r0, r4 fadc: e28dd010 add sp, sp, #16 ; 0x10 fae0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} fae4: 000300bc .word 0x000300bc fae8: 0002fe94 .word 0x0002fe94 000040b4 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40b4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 40b8: e250a000 subs sl, r0, #0 ; 0x0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40bc: e24dd018 sub sp, sp, #24 ; 0x18 40c0: e1a07001 mov r7, r1 40c4: e1a04002 mov r4, r2 40c8: e1a08003 mov r8, r3 40cc: e59d9038 ldr r9, [sp, #56] register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 40d0: 02800003 addeq r0, r0, #3 ; 0x3 40d4: 0a000062 beq 4264 return RTEMS_INVALID_NAME; if ( !id ) 40d8: e3590000 cmp r9, #0 ; 0x0 40dc: 03a00009 moveq r0, #9 ; 0x9 40e0: 0a00005f beq 4264 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 40e4: e21220c0 ands r2, r2, #192 ; 0xc0 40e8: 0a000008 beq 4110 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 40ec: e2043030 and r3, r4, #48 ; 0x30 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40f0: e3530010 cmp r3, #16 ; 0x10 40f4: 0a000001 beq 4100 40f8: e3530020 cmp r3, #32 ; 0x20 40fc: 1a000057 bne 4260 4100: e3140004 tst r4, #4 ; 0x4 4104: 0a000055 beq 4260 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 4108: e35200c0 cmp r2, #192 ; 0xc0 410c: 0a000053 beq 4260 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 4110: e2146030 ands r6, r4, #48 ; 0x30 4114: 0a000002 beq 4124 4118: e3570001 cmp r7, #1 ; 0x1 411c: 83a0000a movhi r0, #10 ; 0xa 4120: 8a00004f bhi 4264 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4124: e59f2140 ldr r2, [pc, #320] ; 426c 4128: e5923000 ldr r3, [r2] 412c: e2833001 add r3, r3, #1 ; 0x1 4130: e5823000 str r3, [r2] * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 4134: e59f0134 ldr r0, [pc, #308] ; 4270 4138: eb000500 bl 5540 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 413c: e2505000 subs r5, r0, #0 ; 0x0 4140: 1a000002 bne 4150 _Thread_Enable_dispatch(); 4144: eb00084b bl 6278 <_Thread_Enable_dispatch> 4148: e3a00005 mov r0, #5 ; 0x5 414c: ea000044 b 4264 * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 4150: e3560000 cmp r6, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 4154: e5854010 str r4, [r5, #16] * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 4158: 0a000029 beq 4204 CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 415c: e3140040 tst r4, #64 ; 0x40 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4160: 13a03002 movne r3, #2 ; 0x2 */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 4164: 1a000004 bne 417c the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 4168: e3140080 tst r4, #128 ; 0x80 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 416c: 13a03003 movne r3, #3 ; 0x3 if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 4170: 1a000001 bne 417c the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 4174: e2143004 ands r3, r4, #4 ; 0x4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 4178: 13a03001 movne r3, #1 ; 0x1 else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 417c: e3560010 cmp r6, #16 ; 0x10 else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 4180: e58d3008 str r3, [sp, #8] case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 4184: 13a03002 movne r3, #2 ; 0x2 4188: 158d3000 strne r3, [sp] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 418c: 1a00000b bne 41c0 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 4190: e59d2008 ldr r2, [sp, #8] else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 4194: e3a03000 mov r3, #0 ; 0x0 4198: e58d3000 str r3, [sp] switch ( the_mutex_attributes.discipline ) { 419c: e3520003 cmp r2, #3 ; 0x3 41a0: 979ff102 ldrls pc, [pc, r2, lsl #2] 41a4: ea000007 b 41c8 <== NOT EXECUTED 41a8: 000041c0 .word 0x000041c0 <== NOT EXECUTED 41ac: 000041c0 .word 0x000041c0 <== NOT EXECUTED 41b0: 000041b8 .word 0x000041b8 <== NOT EXECUTED 41b4: 000041b8 .word 0x000041b8 <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 41b8: e3a03001 mov r3, #1 ; 0x1 41bc: ea000000 b 41c4 break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 41c0: e3a03000 mov r3, #0 ; 0x0 41c4: e5cd3004 strb r3, [sp, #4] } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 41c8: e3570001 cmp r7, #1 ; 0x1 41cc: 13a02000 movne r2, #0 ; 0x0 41d0: 03a02001 moveq r2, #1 ; 0x1 41d4: e2850014 add r0, r5, #20 ; 0x14 41d8: e1a0100d mov r1, sp } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; 41dc: e58d800c str r8, [sp, #12] mutex_status = _CORE_mutex_Initialize( 41e0: eb0002ff bl 4de4 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attributes, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 41e4: e3500006 cmp r0, #6 ; 0x6 41e8: 1a000012 bne 4238 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 41ec: e59f007c ldr r0, [pc, #124] ; 4270 <== NOT EXECUTED 41f0: e1a01005 mov r1, r5 <== NOT EXECUTED 41f4: eb0005a0 bl 587c <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 41f8: eb00081e bl 6278 <_Thread_Enable_dispatch> <== NOT EXECUTED 41fc: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED 4200: ea000017 b 4264 <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 4204: e3140004 tst r4, #4 ; 0x4 the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 4208: 13a03001 movne r3, #1 ; 0x1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 420c: e3a0c000 mov ip, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 4210: 158d3014 strne r3, [sp, #20] */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 4214: e1a02007 mov r2, r7 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4218: e3e03000 mvn r3, #0 ; 0x0 */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 421c: e2850014 add r0, r5, #20 ; 0x14 4220: e28d1010 add r1, sp, #16 ; 0x10 } } else { if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; else the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 4224: 058d6014 streq r6, [sp, #20] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4228: e58d3010 str r3, [sp, #16] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 422c: e58dc00c str ip, [sp, #12] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 4230: e58dc000 str ip, [sp] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 4234: eb0003b7 bl 5118 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4238: e59f3030 ldr r3, [pc, #48] ; 4270 423c: e5952008 ldr r2, [r5, #8] 4240: e593101c ldr r1, [r3, #28] 4244: e1d530b8 ldrh r3, [r5, #8] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4248: e585a00c str sl, [r5, #12] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 424c: e7815103 str r5, [r1, r3, lsl #2] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 4250: e5892000 str r2, [r9] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 4254: eb000807 bl 6278 <_Thread_Enable_dispatch> 4258: e3a00000 mov r0, #0 ; 0x0 425c: ea000000 b 4264 return RTEMS_SUCCESSFUL; 4260: e3a0000b mov r0, #11 ; 0xb } 4264: e28dd018 add sp, sp, #24 ; 0x18 4268: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 426c: 0001620c .word 0x0001620c 4270: 0001612c .word 0x0001612c 0001e8a4 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 1e8a4: e52de004 push {lr} ; (str lr, [sp, #-4]!) 1e8a8: e24dd004 sub sp, sp, #4 ; 0x4 1e8ac: e1a01000 mov r1, r0 1e8b0: e1a0200d mov r2, sp 1e8b4: e59f0048 ldr r0, [pc, #72] ; 1e904 1e8b8: ebffa9c6 bl 8fd8 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 1e8bc: e59d2000 ldr r2, [sp] 1e8c0: e3520000 cmp r2, #0 ; 0x0 1e8c4: 13a00004 movne r0, #4 ; 0x4 1e8c8: 1a00000b bne 1e8fc case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 1e8cc: e5903010 ldr r3, [r0, #16] 1e8d0: e2131030 ands r1, r3, #48 ; 0x30 1e8d4: e2800014 add r0, r0, #20 ; 0x14 1e8d8: 0a000003 beq 1e8ec _CORE_mutex_Flush( 1e8dc: e1a01002 mov r1, r2 1e8e0: e3a02001 mov r2, #1 ; 0x1 1e8e4: ebffa65e bl 8264 <_CORE_mutex_Flush> 1e8e8: ea000001 b 1e8f4 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 1e8ec: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 1e8f0: ebffa728 bl 8598 <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 1e8f4: ebffabf8 bl 98dc <_Thread_Enable_dispatch> 1e8f8: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1e8fc: e28dd004 add sp, sp, #4 ; 0x4 1e900: e8bd8000 pop {pc} 1e904: 00056560 .word 0x00056560 00013b28 : */ void rtems_shutdown_executive( uint32_t result ) { 13b28: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 13b2c: e59f2024 ldr r2, [pc, #36] ; 13b58 13b30: e5923000 ldr r3, [r2] 13b34: e3530004 cmp r3, #4 ; 0x4 */ void rtems_shutdown_executive( uint32_t result ) { 13b38: e24dd030 sub sp, sp, #48 ; 0x30 13b3c: 13a03004 movne r3, #4 ; 0x4 Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 13b40: 11a0000d movne r0, sp 13b44: 159f1010 ldrne r1, [pc, #16] ; 13b5c 13b48: 15823000 strne r3, [r2] 13b4c: 1bffcedc blne 76c4 <_CPU_Context_switch> if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 13b50: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED 13b54: e8bd8000 pop {pc} <== NOT EXECUTED 13b58: 000163b4 .word 0x000163b4 13b5c: 000161dc .word 0x000161dc 0001ed58 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 1ed58: e92d40f0 push {r4, r5, r6, r7, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 1ed5c: e2516000 subs r6, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 1ed60: e24dd004 sub sp, sp, #4 ; 0x4 1ed64: e1a07002 mov r7, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 1ed68: 03a00009 moveq r0, #9 ; 0x9 1ed6c: 0a000022 beq 1edfc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1ed70: e1a0100d mov r1, sp 1ed74: ebffaae1 bl 9900 <_Thread_Get> switch (location) { 1ed78: e59d3000 ldr r3, [sp] rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1ed7c: e1a05000 mov r5, r0 switch (location) { 1ed80: e3530000 cmp r3, #0 ; 0x0 1ed84: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 1ed88: 05954114 ldreq r4, [r5, #276] if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 1ed8c: 0a000008 beq 1edb4 1ed90: ea000019 b 1edfc <== NOT EXECUTED /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 1ed94: e5943004 ldr r3, [r4, #4] 1ed98: e1530006 cmp r3, r6 1ed9c: 1a000003 bne 1edb0 tvp->dtor = dtor; 1eda0: e5847010 str r7, [r4, #16] _Thread_Enable_dispatch(); 1eda4: ebffaacc bl 98dc <_Thread_Enable_dispatch> 1eda8: e3a00000 mov r0, #0 ; 0x0 1edac: ea000012 b 1edfc return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 1edb0: e5944000 ldr r4, [r4] case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 1edb4: e3540000 cmp r4, #0 ; 0x0 1edb8: 1afffff5 bne 1ed94 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 1edbc: e3a00014 mov r0, #20 ; 0x14 1edc0: ebffafae bl ac80 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 1edc4: e3500000 cmp r0, #0 ; 0x0 1edc8: 1a000002 bne 1edd8 _Thread_Enable_dispatch(); 1edcc: ebffaac2 bl 98dc <_Thread_Enable_dispatch> 1edd0: e3a0001a mov r0, #26 ; 0x1a 1edd4: ea000008 b 1edfc } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 1edd8: e5952114 ldr r2, [r5, #276] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 1eddc: e5963000 ldr r3, [r6] new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; 1ede0: e5850114 str r0, [r5, #276] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 1ede4: e5803008 str r3, [r0, #8] new->ptr = ptr; 1ede8: e5806004 str r6, [r0, #4] new->dtor = dtor; 1edec: e5807010 str r7, [r0, #16] new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 1edf0: e5802000 str r2, [r0] the_thread->task_variables = new; _Thread_Enable_dispatch(); 1edf4: ebffaab8 bl 98dc <_Thread_Enable_dispatch> 1edf8: e1a00004 mov r0, r4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1edfc: e28dd004 add sp, sp, #4 ; 0x4 1ee00: e8bd80f0 pop {r4, r5, r6, r7, pc} 0001ee04 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 1ee04: e92d4010 push {r4, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 1ee08: e2514000 subs r4, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 1ee0c: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 1ee10: 0a000018 beq 1ee78 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 1ee14: e1a0100d mov r1, sp 1ee18: ebffaab8 bl 9900 <_Thread_Get> switch (location) { 1ee1c: e59d3000 ldr r3, [sp] 1ee20: e3530000 cmp r3, #0 ; 0x0 1ee24: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 1ee28: 01a02003 moveq r2, r3 1ee2c: 05901114 ldreq r1, [r0, #276] return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 1ee30: 0a00000d beq 1ee6c 1ee34: ea000010 b 1ee7c <== NOT EXECUTED case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 1ee38: e5913004 ldr r3, [r1, #4] 1ee3c: e1530004 cmp r3, r4 1ee40: 1a000007 bne 1ee64 1ee44: e5913000 ldr r3, [r1] if (prev) 1ee48: e3520000 cmp r2, #0 ; 0x0 prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 1ee4c: 05803114 streq r3, [r0, #276] case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 1ee50: 15823000 strne r3, [r2] else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 1ee54: eb000028 bl 1eefc <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 1ee58: ebffaa9f bl 98dc <_Thread_Enable_dispatch> 1ee5c: e3a00000 mov r0, #0 ; 0x0 1ee60: ea000005 b 1ee7c return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 1ee64: e1a02001 mov r2, r1 1ee68: e5911000 ldr r1, [r1] the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 1ee6c: e3510000 cmp r1, #0 ; 0x0 1ee70: 1afffff0 bne 1ee38 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 1ee74: ebffaa98 bl 98dc <_Thread_Enable_dispatch> 1ee78: e3a00009 mov r0, #9 ; 0x9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1ee7c: e28dd004 add sp, sp, #4 ; 0x4 1ee80: e8bd8010 pop {r4, pc} 0001ee84 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 1ee84: e92d4030 push {r4, r5, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 1ee88: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 1ee8c: e24dd004 sub sp, sp, #4 ; 0x4 1ee90: e1a04002 mov r4, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 1ee94: 0a000015 beq 1eef0 return RTEMS_INVALID_ADDRESS; if ( !result ) 1ee98: e3520000 cmp r2, #0 ; 0x0 1ee9c: 0a000013 beq 1eef0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1eea0: e1a0100d mov r1, sp 1eea4: ebffaa95 bl 9900 <_Thread_Get> switch (location) { 1eea8: e59d3000 ldr r3, [sp] 1eeac: e3530000 cmp r3, #0 ; 0x0 1eeb0: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 1eeb4: 05900114 ldreq r0, [r0, #276] if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 1eeb8: 0a000009 beq 1eee4 1eebc: ea00000c b 1eef4 <== NOT EXECUTED /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 1eec0: e5903004 ldr r3, [r0, #4] 1eec4: e1530005 cmp r3, r5 1eec8: 1a000004 bne 1eee0 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 1eecc: e590300c ldr r3, [r0, #12] 1eed0: e5843000 str r3, [r4] _Thread_Enable_dispatch(); 1eed4: ebffaa80 bl 98dc <_Thread_Enable_dispatch> 1eed8: e3a00000 mov r0, #0 ; 0x0 1eedc: ea000004 b 1eef4 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 1eee0: e5900000 ldr r0, [r0] case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 1eee4: e3500000 cmp r0, #0 ; 0x0 1eee8: 1afffff4 bne 1eec0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 1eeec: ebffaa7a bl 98dc <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 1eef0: e3a00009 mov r0, #9 ; 0x9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1eef4: e28dd004 add sp, sp, #4 ; 0x4 1eef8: e8bd8030 pop {r4, r5, pc} 00005434 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 5434: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 5438: e251a000 subs sl, r1, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 543c: e1a07000 mov r7, r0 5440: e24dd004 sub sp, sp, #4 ; 0x4 5444: e1a06002 mov r6, r2 5448: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 544c: 03a0000a moveq r0, #10 ; 0xa 5450: 0a000022 beq 54e0 return RTEMS_INVALID_NUMBER; if ( !routine ) 5454: e3520000 cmp r2, #0 ; 0x0 5458: 03a00009 moveq r0, #9 ; 0x9 545c: 0a00001f beq 54e0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 5460: e59f0080 ldr r0, [pc, #128] ; 54e8 5464: e1a01007 mov r1, r7 5468: e1a0200d mov r2, sp 546c: eb0004a9 bl 6718 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5470: e59d3000 ldr r3, [sp] 5474: e3530000 cmp r3, #0 ; 0x0 5478: e1a04000 mov r4, r0 547c: 13a00004 movne r0, #4 ; 0x4 5480: 1a000016 bne 54e0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 5484: e2845010 add r5, r4, #16 ; 0x10 5488: e1a00005 mov r0, r5 548c: eb000b63 bl 8220 <_Watchdog_Remove> _ISR_Disable( level ); 5490: e10f2000 mrs r2, CPSR 5494: e38230c0 orr r3, r2, #192 ; 0xc0 5498: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 549c: e5943018 ldr r3, [r4, #24] 54a0: e3530000 cmp r3, #0 ; 0x0 54a4: 0a000001 beq 54b0 _ISR_Enable( level ); 54a8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 54ac: ea000009 b 54d8 <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 54b0: e5843018 str r3, [r4, #24] the_watchdog->routine = routine; 54b4: e584602c str r6, [r4, #44] the_watchdog->id = id; 54b8: e5847030 str r7, [r4, #48] the_watchdog->user_data = user_data; 54bc: e5848034 str r8, [r4, #52] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 54c0: e5843038 str r3, [r4, #56] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 54c4: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 54c8: e59f001c ldr r0, [pc, #28] ; 54ec Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 54cc: e584a01c str sl, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 54d0: e1a01005 mov r1, r5 54d4: eb000af5 bl 80b0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 54d8: eb000692 bl 6f28 <_Thread_Enable_dispatch> 54dc: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 54e0: e28dd004 add sp, sp, #4 ; 0x4 54e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 54e8: 000148a4 .word 0x000148a4 54ec: 00014424 .word 0x00014424 00010c14 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 10c14: e92d4030 push {r4, r5, lr} 10c18: e24dd004 sub sp, sp, #4 ; 0x4 10c1c: e1a01000 mov r1, r0 10c20: e1a0200d mov r2, sp 10c24: e59f00a4 ldr r0, [pc, #164] ; 10cd0 10c28: eb0009fe bl 13428 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10c2c: e59d3000 ldr r3, [sp] 10c30: e3530000 cmp r3, #0 ; 0x0 10c34: e1a04000 mov r4, r0 10c38: 13a00004 movne r0, #4 ; 0x4 10c3c: 1a000021 bne 10cc8 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 10c40: e5943038 ldr r3, [r4, #56] 10c44: e3530004 cmp r3, #4 ; 0x4 10c48: 979ff103 ldrls pc, [pc, r3, lsl #2] 10c4c: ea00001b b 10cc0 <== NOT EXECUTED 10c50: 00010c64 .word 0x00010c64 <== NOT EXECUTED 10c54: 00010c80 .word 0x00010c80 <== NOT EXECUTED 10c58: 00010cb4 .word 0x00010cb4 <== NOT EXECUTED 10c5c: 00010cb4 .word 0x00010cb4 <== NOT EXECUTED 10c60: 00010cb4 .word 0x00010cb4 <== NOT EXECUTED case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 10c64: e2844010 add r4, r4, #16 ; 0x10 10c68: e1a00004 mov r0, r4 10c6c: eb0011dd bl 153e8 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 10c70: e1a01004 mov r1, r4 10c74: e59f0058 ldr r0, [pc, #88] ; 10cd4 10c78: eb00117e bl 15278 <_Watchdog_Insert> 10c7c: ea00000f b 10cc0 break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 10c80: e59f5050 ldr r5, [pc, #80] ; 10cd8 10c84: e5953000 ldr r3, [r5] 10c88: e3530000 cmp r3, #0 ; 0x0 10c8c: 1a000002 bne 10c9c _Thread_Enable_dispatch(); 10c90: eb000c0a bl 13cc0 <_Thread_Enable_dispatch> <== NOT EXECUTED 10c94: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED 10c98: ea00000a b 10cc8 <== NOT EXECUTED return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 10c9c: e2840010 add r0, r4, #16 ; 0x10 10ca0: eb0011d0 bl 153e8 <_Watchdog_Remove> (*_Timer_Server_schedule_operation)( the_timer ); 10ca4: e1a00004 mov r0, r4 10ca8: e1a0e00f mov lr, pc 10cac: e595f000 ldr pc, [r5] 10cb0: ea000002 b 10cc0 break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 10cb4: eb000c01 bl 13cc0 <_Thread_Enable_dispatch> 10cb8: e3a0000b mov r0, #11 ; 0xb 10cbc: ea000001 b 10cc8 return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 10cc0: eb000bfe bl 13cc0 <_Thread_Enable_dispatch> 10cc4: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc8: e28dd004 add sp, sp, #4 ; 0x4 10ccc: e8bd8030 pop {r4, r5, pc} 10cd0: 000308fc .word 0x000308fc 10cd4: 000300e4 .word 0x000300e4 10cd8: 0003093c .word 0x0003093c 00010cdc : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10cdc: e92d41f0 push {r4, r5, r6, r7, r8, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 10ce0: e59fc0c4 ldr ip, [pc, #196] ; 10dac 10ce4: e59cc000 ldr ip, [ip] 10ce8: e35c0000 cmp ip, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10cec: e1a06000 mov r6, r0 10cf0: e24dd004 sub sp, sp, #4 ; 0x4 10cf4: e1a07001 mov r7, r1 10cf8: e1a05002 mov r5, r2 10cfc: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 10d00: 03a0000e moveq r0, #14 ; 0xe 10d04: 0a000026 beq 10da4 return RTEMS_INCORRECT_STATE; if ( !routine ) 10d08: e3520000 cmp r2, #0 ; 0x0 10d0c: 03a00009 moveq r0, #9 ; 0x9 10d10: 0a000023 beq 10da4 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 10d14: e3510000 cmp r1, #0 ; 0x0 10d18: 03a0000a moveq r0, #10 ; 0xa 10d1c: 0a000020 beq 10da4 10d20: e59f0088 ldr r0, [pc, #136] ; 10db0 10d24: e1a01006 mov r1, r6 10d28: e1a0200d mov r2, sp 10d2c: eb0009bd bl 13428 <_Objects_Get> return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10d30: e59d3000 ldr r3, [sp] 10d34: e3530000 cmp r3, #0 ; 0x0 10d38: e1a04000 mov r4, r0 10d3c: 13a00004 movne r0, #4 ; 0x4 10d40: 1a000017 bne 10da4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10d44: e2840010 add r0, r4, #16 ; 0x10 10d48: eb0011a6 bl 153e8 <_Watchdog_Remove> _ISR_Disable( level ); 10d4c: e10f1000 mrs r1, CPSR 10d50: e38130c0 orr r3, r1, #192 ; 0xc0 10d54: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 10d58: e5942018 ldr r2, [r4, #24] 10d5c: e3520000 cmp r2, #0 ; 0x0 10d60: 0a000001 beq 10d6c _ISR_Enable( level ); 10d64: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 10d68: ea00000b b 10d9c <== NOT EXECUTED /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 10d6c: e3a03001 mov r3, #1 ; 0x1 10d70: e5843038 str r3, [r4, #56] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d74: e5842018 str r2, [r4, #24] the_watchdog->routine = routine; 10d78: e584502c str r5, [r4, #44] the_watchdog->id = id; 10d7c: e5846030 str r6, [r4, #48] the_watchdog->user_data = user_data; 10d80: e5848034 str r8, [r4, #52] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 10d84: e584701c str r7, [r4, #28] _ISR_Enable( level ); 10d88: e129f001 msr CPSR_fc, r1 /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 10d8c: e59f3020 ldr r3, [pc, #32] ; 10db4 10d90: e1a00004 mov r0, r4 10d94: e1a0e00f mov lr, pc 10d98: e593f000 ldr pc, [r3] _Thread_Enable_dispatch(); 10d9c: eb000bc7 bl 13cc0 <_Thread_Enable_dispatch> 10da0: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10da4: e28dd004 add sp, sp, #4 ; 0x4 10da8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 10dac: 00030940 .word 0x00030940 10db0: 000308fc .word 0x000308fc 10db4: 0003093c .word 0x0003093c 00005114 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 5114: e92d4010 push {r4, lr} void *ptr; /* * check the arguments */ if ( !pointer ) 5118: e2514000 subs r4, r1, #0 ; 0x0 511c: 0a000008 beq 5144 return false; if ( !bytes ) 5120: e3500000 cmp r0, #0 ; 0x0 5124: 0a000006 beq 5144 return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 5128: e1a01000 mov r1, r0 512c: e59f0018 ldr r0, [pc, #24] ; 514c 5130: eb00051c bl 65a8 <_Protected_heap_Allocate> if (!ptr) 5134: e3500000 cmp r0, #0 ; 0x0 return false; *pointer = ptr; 5138: 15840000 strne r0, [r4] 513c: 13a00001 movne r0, #1 ; 0x1 /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 5140: 18bd8010 popne {r4, pc} return false; *pointer = ptr; return true; 5144: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 5148: e8bd8010 pop {r4, pc} <== NOT EXECUTED 514c: 0001ab8c .word 0x0001ab8c 00005104 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 5104: e1a01000 mov r1, r0 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 5108: e59f0000 ldr r0, [pc, #0] ; 5110 <== NOT EXECUTED 510c: ea000534 b 65e4 <_Protected_heap_Free> <== NOT EXECUTED 5110: 0001ab8c .word 0x0001ab8c 00006884 : */ int sem_destroy( sem_t *sem ) { 6884: e92d4010 push {r4, lr} 6888: e24dd004 sub sp, sp, #4 ; 0x4 688c: e5901000 ldr r1, [r0] 6890: e1a0200d mov r2, sp 6894: e59f0048 ldr r0, [pc, #72] ; 68e4 6898: eb000858 bl 8a00 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 689c: e59d3000 ldr r3, [sp] 68a0: e3530000 cmp r3, #0 ; 0x0 68a4: 1a000008 bne 68cc case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 68a8: e5d04014 ldrb r4, [r0, #20] 68ac: e3540000 cmp r4, #0 ; 0x0 68b0: 0a000001 beq 68bc _Thread_Enable_dispatch(); 68b4: eb000a55 bl 9210 <_Thread_Enable_dispatch> <== NOT EXECUTED 68b8: ea000003 b 68cc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 68bc: eb00186f bl ca80 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 68c0: eb000a52 bl 9210 <_Thread_Enable_dispatch> 68c4: e1a00004 mov r0, r4 68c8: ea000003 b 68dc #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 68cc: eb00206f bl ea90 <__errno> 68d0: e3a03016 mov r3, #22 ; 0x16 68d4: e5803000 str r3, [r0] 68d8: e3e00000 mvn r0, #0 ; 0x0 } 68dc: e28dd004 add sp, sp, #4 ; 0x4 68e0: e8bd8010 pop {r4, pc} 68e4: 0001c6e0 .word 0x0001c6e0 00006940 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 6940: e92d4010 push {r4, lr} int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 6944: e2504000 subs r4, r0, #0 ; 0x0 int sem_init( sem_t *sem, int pshared, unsigned int value ) { 6948: e24dd004 sub sp, sp, #4 ; 0x4 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 694c: 1a000004 bne 6964 rtems_set_errno_and_return_minus_one( EINVAL ); 6950: eb00204e bl ea90 <__errno> <== NOT EXECUTED 6954: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 6958: e5803000 str r3, [r0] <== NOT EXECUTED 695c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 6960: ea000006 b 6980 <== NOT EXECUTED status = _POSIX_Semaphore_Create_support( 6964: e1a0300d mov r3, sp 6968: e3a00000 mov r0, #0 ; 0x0 696c: eb001805 bl c988 <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 6970: e3700001 cmn r0, #1 ; 0x1 *sem = the_semaphore->Object.id; 6974: 159d3000 ldrne r3, [sp] 6978: 15933008 ldrne r3, [r3, #8] 697c: 15843000 strne r3, [r4] return status; } 6980: e28dd004 add sp, sp, #4 ; 0x4 6984: e8bd8010 pop {r4, pc} 00006524 : int sigwait( const sigset_t *set, int *sig ) { 6524: e92d4010 push {r4, lr} 6528: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 652c: e3a01000 mov r1, #0 ; 0x0 6530: e1a02001 mov r2, r1 6534: ebffff8d bl 6370 if ( status != -1 ) { 6538: e3700001 cmn r0, #1 ; 0x1 653c: 0a000004 beq 6554 if ( sig ) 6540: e3540000 cmp r4, #0 ; 0x0 *sig = status; 6544: 15840000 strne r0, [r4] int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 6548: 01a00004 moveq r0, r4 *sig = status; 654c: 13a00000 movne r0, #0 ; 0x0 6550: e8bd8010 pop {r4, pc} return 0; } return errno; 6554: eb001ed0 bl e09c <__errno> <== NOT EXECUTED 6558: e5900000 ldr r0, [r0] <== NOT EXECUTED } 655c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00005520 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 5520: e92d40f0 push {r4, r5, r6, r7, lr} Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 5524: e2525000 subs r5, r2, #0 ; 0x0 timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 5528: e24dd018 sub sp, sp, #24 ; 0x18 552c: e1a07000 mov r7, r0 5530: e1a0c001 mov ip, r1 5534: e1a06003 mov r6, r3 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 5538: 0a000054 beq 5690 rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 553c: e59f2164 ldr r2, [pc, #356] ; 56a8 5540: e595300c ldr r3, [r5, #12] 5544: e1530002 cmp r3, r2 5548: 8a000050 bhi 5690 554c: e5953004 ldr r3, [r5, #4] 5550: e1530002 cmp r3, r2 5554: 8a00004d bhi 5690 5558: e3530000 cmp r3, #0 ; 0x0 555c: ba00004b blt 5690 ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 5560: e3510004 cmp r1, #4 ; 0x4 5564: 13510000 cmpne r1, #0 ; 0x0 5568: 1a000048 bne 5690 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 556c: e895000f ldm r5, {r0, r1, r2, r3} /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 5570: e35c0004 cmp ip, #4 ; 0x4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 5574: e28dc004 add ip, sp, #4 ; 0x4 5578: e88c000f stm ip, {r0, r1, r2, r3} /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 557c: 1a000009 bne 55a8 /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 5580: e28c4008 add r4, ip, #8 ; 0x8 5584: e59f0120 ldr r0, [pc, #288] ; 56ac 5588: e1a01004 mov r1, r4 558c: eb000d9b bl 8c00 <_Timespec_Greater_than> 5590: e3500000 cmp r0, #0 ; 0x0 5594: 1a00003d bne 5690 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 5598: e1a01004 mov r1, r4 559c: e59f0108 ldr r0, [pc, #264] ; 56ac 55a0: e1a02004 mov r2, r4 55a4: eb000da2 bl 8c34 <_Timespec_Subtract> 55a8: e1a01007 mov r1, r7 55ac: e59f00fc ldr r0, [pc, #252] ; 56b0 55b0: e28d2014 add r2, sp, #20 ; 0x14 55b4: eb0007f2 bl 7584 <_Objects_Get> * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 55b8: e59d3014 ldr r3, [sp, #20] 55bc: e3530000 cmp r3, #0 ; 0x0 55c0: e1a04000 mov r4, r0 55c4: 1a000031 bne 5690 case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 55c8: e59d300c ldr r3, [sp, #12] 55cc: e3530000 cmp r3, #0 ; 0x0 55d0: 1a00000f bne 5614 55d4: e59d3010 ldr r3, [sp, #16] 55d8: e3530000 cmp r3, #0 ; 0x0 55dc: 1a00000c bne 5614 /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 55e0: e2800010 add r0, r0, #16 ; 0x10 55e4: eb000ec7 bl 9108 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 55e8: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 55ec: 12843054 addne r3, r4, #84 ; 0x54 55f0: 1893000f ldmne r3, {r0, r1, r2, r3} 55f4: 1886000f stmne r6, {r0, r1, r2, r3} /* The new data are set */ ptimer->timer_data = normalize; 55f8: e28d3004 add r3, sp, #4 ; 0x4 55fc: e893000f ldm r3, {r0, r1, r2, r3} 5600: e284c054 add ip, r4, #84 ; 0x54 5604: e88c000f stm ip, {r0, r1, r2, r3} /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 5608: e3a03004 mov r3, #4 ; 0x4 560c: e5c4303c strb r3, [r4, #60] 5610: ea00001b b 5684 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 5614: e1a00005 mov r0, r5 5618: eb000d96 bl 8c78 <_Timespec_To_ticks> 561c: e5840064 str r0, [r4, #100] initial_period = _Timespec_To_ticks( &normalize.it_value ); 5620: e28d000c add r0, sp, #12 ; 0xc 5624: eb000d93 bl 8c78 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 5628: e58d4000 str r4, [sp] return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); initial_period = _Timespec_To_ticks( &normalize.it_value ); 562c: e1a01000 mov r1, r0 activated = _POSIX_Timer_Insert_helper( 5630: e5942008 ldr r2, [r4, #8] 5634: e2840010 add r0, r4, #16 ; 0x10 5638: e59f3074 ldr r3, [pc, #116] ; 56b4 563c: eb0017d0 bl b584 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 5640: e2505000 subs r5, r0, #0 ; 0x0 5644: 1a000002 bne 5654 _Thread_Enable_dispatch(); 5648: eb0009d1 bl 7d94 <_Thread_Enable_dispatch> <== NOT EXECUTED 564c: e1a00005 mov r0, r5 <== NOT EXECUTED 5650: ea000012 b 56a0 <== NOT EXECUTED /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 5654: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 5658: 12843054 addne r3, r4, #84 ; 0x54 565c: 1893000f ldmne r3, {r0, r1, r2, r3} 5660: 1886000f stmne r6, {r0, r1, r2, r3} ptimer->timer_data = normalize; 5664: e28d3004 add r3, sp, #4 ; 0x4 5668: e893000f ldm r3, {r0, r1, r2, r3} 566c: e284c054 add ip, r4, #84 ; 0x54 5670: e88c000f stm ip, {r0, r1, r2, r3} /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 5674: e3a03003 mov r3, #3 ; 0x3 5678: e5c4303c strb r3, [r4, #60] _TOD_Get( &ptimer->time ); 567c: e284006c add r0, r4, #108 ; 0x6c 5680: eb0005a9 bl 6d2c <_TOD_Get> _Thread_Enable_dispatch(); 5684: eb0009c2 bl 7d94 <_Thread_Enable_dispatch> 5688: e3a00000 mov r0, #0 ; 0x0 568c: ea000003 b 56a0 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 5690: eb001ee1 bl d21c <__errno> 5694: e3a03016 mov r3, #22 ; 0x16 5698: e5803000 str r3, [r0] 569c: e3e00000 mvn r0, #0 ; 0x0 } 56a0: e28dd018 add sp, sp, #24 ; 0x18 56a4: e8bd80f0 pop {r4, r5, r6, r7, pc} 56a8: 3b9ac9ff .word 0x3b9ac9ff 56ac: 0001a9f4 .word 0x0001a9f4 56b0: 0001ac40 .word 0x0001ac40 56b4: 000056b8 .word 0x000056b8 00003fc4 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 3fc4: e92d4070 push {r4, r5, r6, lr} /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 3fc8: e59f40dc ldr r4, [pc, #220] ; 40ac 3fcc: e594201c ldr r2, [r4, #28] 3fd0: e3520000 cmp r2, #0 ; 0x0 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 3fd4: e24dd008 sub sp, sp, #8 ; 0x8 3fd8: e1a06000 mov r6, r0 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 3fdc: 1a000006 bne 3ffc Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 3fe0: e59f30c8 ldr r3, [pc, #200] ; 40b0 the_watchdog->id = id; the_watchdog->user_data = user_data; 3fe4: e5842024 str r2, [r4, #36] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 3fe8: e584301c str r3, [r4, #28] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3fec: e5842008 str r2, [r4, #8] the_watchdog->routine = routine; the_watchdog->id = id; 3ff0: e5842020 str r2, [r4, #32] the_watchdog->user_data = user_data; 3ff4: e1a05002 mov r5, r2 3ff8: ea000013 b 404c _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 3ffc: e1a00004 mov r0, r4 <== NOT EXECUTED 4000: eb000ed7 bl 7b64 <_Watchdog_Remove> <== NOT EXECUTED 4004: e2400002 sub r0, r0, #2 ; 0x2 <== NOT EXECUTED 4008: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED 400c: 83a05000 movhi r5, #0 ; 0x0 <== NOT EXECUTED 4010: 8a00000d bhi 404c <== NOT EXECUTED * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 4014: e594300c ldr r3, [r4, #12] <== NOT EXECUTED 4018: e2840014 add r0, r4, #20 ; 0x14 <== NOT EXECUTED 401c: e8900005 ldm r0, {r0, r2} <== NOT EXECUTED 4020: e0800003 add r0, r0, r3 <== NOT EXECUTED /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 4024: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 4028: e1a0100d mov r1, sp <== NOT EXECUTED 402c: eb000d6d bl 75e8 <_Timespec_From_ticks> <== NOT EXECUTED remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4030: e59d2000 ldr r2, [sp] <== NOT EXECUTED 4034: e59f3078 ldr r3, [pc, #120] ; 40b4 <== NOT EXECUTED remaining += tp.tv_nsec / 1000; 4038: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 403c: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4040: e0040392 mul r4, r2, r3 <== NOT EXECUTED remaining += tp.tv_nsec / 1000; 4044: eb00303b bl 10138 <__aeabi_idiv> <== NOT EXECUTED 4048: e0805004 add r5, r0, r4 <== NOT EXECUTED /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 404c: e3560000 cmp r6, #0 ; 0x0 4050: 0a000012 beq 40a0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4054: e59f1058 ldr r1, [pc, #88] ; 40b4 4058: e1a00006 mov r0, r6 405c: eb002ff1 bl 10028 <__aeabi_uidiv> tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4060: e59f104c ldr r1, [pc, #76] ; 40b4 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4064: e58d0000 str r0, [sp] tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4068: e1a00006 mov r0, r6 406c: eb003081 bl 10278 <__umodsi3> 4070: e3a03ffa mov r3, #1000 ; 0x3e8 4074: e0030390 mul r3, r0, r3 ticks = _Timespec_To_ticks( &tp ); 4078: e1a0000d mov r0, sp */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 407c: e58d3004 str r3, [sp, #4] ticks = _Timespec_To_ticks( &tp ); 4080: eb000d7b bl 7674 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 4084: e1a0000d mov r0, sp 4088: eb000d79 bl 7674 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 408c: e59f1018 ldr r1, [pc, #24] ; 40ac 4090: e581000c str r0, [r1, #12] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4094: e59f001c ldr r0, [pc, #28] ; 40b8 if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 4098: e1a0400d mov r4, sp 409c: eb000e54 bl 79f4 <_Watchdog_Insert> _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 40a0: e1a00005 mov r0, r5 40a4: e28dd008 add sp, sp, #8 ; 0x8 40a8: e8bd8070 pop {r4, r5, r6, pc} 40ac: 0001374c .word 0x0001374c 40b0: 000040bc .word 0x000040bc 40b4: 000f4240 .word 0x000f4240 40b8: 00013924 .word 0x00013924