30006930 <_CORE_RWLock_Release>: CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ISR_Level level; Thread_Control *executing = _Thread_Executing; 30006930: e59f30dc ldr r3, [pc, #220] ; 30006a14 <_CORE_RWLock_Release+0xe4> */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 30006934: e92d4010 push {r4, lr} ISR_Level level; Thread_Control *executing = _Thread_Executing; 30006938: e5931000 ldr r1, [r3] */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 3000693c: 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 ); 30006940: e10f2000 mrs r2, CPSR 30006944: e38230c0 orr r3, r2, #192 ; 0xc0 30006948: e129f003 msr CPSR_fc, r3 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 3000694c: e5903044 ldr r3, [r0, #68] 30006950: e3530000 cmp r3, #0 ; 0x0 30006954: 1a000003 bne 30006968 <_CORE_RWLock_Release+0x38> _ISR_Enable( level ); 30006958: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 3000695c: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 30006960: e5813034 str r3, [r1, #52] <== NOT EXECUTED 30006964: ea000028 b 30006a0c <_CORE_RWLock_Release+0xdc> <== NOT EXECUTED return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 30006968: e3530001 cmp r3, #1 ; 0x1 3000696c: 1a000006 bne 3000698c <_CORE_RWLock_Release+0x5c> the_rwlock->number_of_readers -= 1; 30006970: e5903048 ldr r3, [r0, #72] 30006974: e2433001 sub r3, r3, #1 ; 0x1 if ( the_rwlock->number_of_readers != 0 ) { 30006978: 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; 3000697c: e5803048 str r3, [r0, #72] if ( the_rwlock->number_of_readers != 0 ) { 30006980: 0a000001 beq 3000698c <_CORE_RWLock_Release+0x5c> /* must be unlocked again */ _ISR_Enable( level ); 30006984: e129f002 msr CPSR_fc, r2 30006988: ea00001f b 30006a0c <_CORE_RWLock_Release+0xdc> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 3000698c: e3a03000 mov r3, #0 ; 0x0 30006990: 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; 30006994: e5843044 str r3, [r4, #68] _ISR_Enable( level ); 30006998: e129f002 msr CPSR_fc, r2 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 3000699c: e1a00004 mov r0, r4 300069a0: eb00055f bl 30007f24 <_Thread_queue_Dequeue> if ( next ) { 300069a4: e3500000 cmp r0, #0 ; 0x0 300069a8: 0a000017 beq 30006a0c <_CORE_RWLock_Release+0xdc> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 300069ac: e5903030 ldr r3, [r0, #48] 300069b0: e3530001 cmp r3, #1 ; 0x1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 300069b4: 02833001 addeq r3, r3, #1 ; 0x1 300069b8: 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 ) { 300069bc: 0a000012 beq 30006a0c <_CORE_RWLock_Release+0xdc> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 300069c0: e5943048 ldr r3, [r4, #72] 300069c4: e2833001 add r3, r3, #1 ; 0x1 300069c8: e5843048 str r3, [r4, #72] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 300069cc: e3a03001 mov r3, #1 ; 0x1 300069d0: e5843044 str r3, [r4, #68] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 300069d4: e1a00004 mov r0, r4 300069d8: eb000697 bl 3000843c <_Thread_queue_First> if ( !next || 300069dc: 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 ); 300069e0: e1a01003 mov r1, r3 300069e4: 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 || 300069e8: 0a000007 beq 30006a0c <_CORE_RWLock_Release+0xdc> 300069ec: e5933030 ldr r3, [r3, #48] 300069f0: e3530001 cmp r3, #1 ; 0x1 300069f4: 0a000004 beq 30006a0c <_CORE_RWLock_Release+0xdc> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 300069f8: e5943048 ldr r3, [r4, #72] 300069fc: e2833001 add r3, r3, #1 ; 0x1 30006a00: e5843048 str r3, [r4, #72] _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 30006a04: eb000642 bl 30008314 <_Thread_queue_Extract> 30006a08: eafffff1 b 300069d4 <_CORE_RWLock_Release+0xa4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 30006a0c: e3a00000 mov r0, #0 ; 0x0 30006a10: e8bd8010 pop {r4, pc} 30006a14: 30018644 .word 0x30018644 30011b4c <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30011b4c: 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 ) { 30011b50: 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 ) { 30011b54: 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 ) { 30011b58: e1a07000 mov r7, r0 30011b5c: e1a06002 mov r6, r2 30011b60: e1a08001 mov r8, r1 30011b64: 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 ) { 30011b68: 83a00001 movhi r0, #1 ; 0x1 30011b6c: 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 ) { 30011b70: e5973048 ldr r3, [r7, #72] 30011b74: e3530000 cmp r3, #0 ; 0x0 *count = 0; 30011b78: 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))) { 30011b7c: 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; 30011b80: 158a3000 strne r3, [sl] 30011b84: 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 ) { 30011b88: 0a000005 beq 30011ba4 <_CORE_message_queue_Broadcast+0x58> 30011b8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30011b90: e594002c ldr r0, [r4, #44] 30011b94: eb001f1f bl 30019818 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30011b98: e5943028 ldr r3, [r4, #40] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 30011b9c: e2855001 add r5, r5, #1 ; 0x1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30011ba0: e5836000 str r6, [r3] * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 30011ba4: e1a00007 mov r0, r7 30011ba8: eb00092b bl 3001405c <_Thread_queue_Dequeue> 30011bac: e2504000 subs r4, r0, #0 ; 0x0 30011bb0: e1a01008 mov r1, r8 30011bb4: e1a02006 mov r2, r6 30011bb8: 1afffff4 bne 30011b90 <_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; 30011bbc: e58a5000 str r5, [sl] 30011bc0: e1a00004 mov r0, r4 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 30011bc4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 3001021c <_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 ) { 3001021c: 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 ) { 30010220: e590c04c ldr ip, [r0, #76] CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 30010224: e1a05000 mov r5, r0 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 30010228: 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 ) { 3001022c: e1a06002 mov r6, r2 30010230: e1a08001 mov r8, r1 30010234: e1a0b003 mov fp, r3 30010238: e59d9028 ldr r9, [sp, #40] 3001023c: 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 ) { 30010240: 83a00001 movhi r0, #1 ; 0x1 30010244: 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 ) { 30010248: e5957048 ldr r7, [r5, #72] 3001024c: e3570000 cmp r7, #0 ; 0x0 30010250: 1a00000b bne 30010284 <_CORE_message_queue_Submit+0x68> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 30010254: ebffea41 bl 3000ab60 <_Thread_queue_Dequeue> if ( the_thread ) { 30010258: e2504000 subs r4, r0, #0 ; 0x0 3001025c: 0a000008 beq 30010284 <_CORE_message_queue_Submit+0x68> 30010260: e1a01008 mov r1, r8 30010264: e594002c ldr r0, [r4, #44] 30010268: e1a02006 mov r2, r6 3001026c: eb0012c2 bl 30014d7c _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30010270: e5943028 ldr r3, [r4, #40] the_thread->Wait.count = submit_type; 30010274: e1a00007 mov r0, r7 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30010278: e5836000 str r6, [r3] the_thread->Wait.count = submit_type; 3001027c: e5849024 str r9, [r4, #36] 30010280: 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 < 30010284: e5952048 ldr r2, [r5, #72] 30010288: e5953044 ldr r3, [r5, #68] 3001028c: e1520003 cmp r2, r3 30010290: 2a00000f bcs 300102d4 <_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 *) 30010294: e2850068 add r0, r5, #104 ; 0x68 30010298: ebffe3e6 bl 30009238 <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 3001029c: e2504000 subs r4, r0, #0 ; 0x0 300102a0: 0a000025 beq 3001033c <_CORE_message_queue_Submit+0x120> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 300102a4: e1a01008 mov r1, r8 300102a8: e1a02006 mov r2, r6 300102ac: e2840010 add r0, r4, #16 ; 0x10 300102b0: eb0012b1 bl 30014d7c size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 300102b4: e1a00005 mov r0, r5 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 300102b8: e584600c str r6, [r4, #12] the_message->priority = submit_type; 300102bc: e5849008 str r9, [r4, #8] _CORE_message_queue_Insert_message( 300102c0: e1a01004 mov r1, r4 300102c4: e1a02009 mov r2, r9 300102c8: eb000b3b bl 30012fbc <_CORE_message_queue_Insert_message> 300102cc: e3a00000 mov r0, #0 ; 0x0 300102d0: 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 ) { 300102d4: e35a0000 cmp sl, #0 ; 0x0 300102d8: 03a00002 moveq r0, #2 ; 0x2 300102dc: 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() ) { 300102e0: e59f305c ldr r3, [pc, #92] ; 30010344 <_CORE_message_queue_Submit+0x128> 300102e4: e5933000 ldr r3, [r3] 300102e8: e3530000 cmp r3, #0 ; 0x0 300102ec: 1a000012 bne 3001033c <_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; 300102f0: e59f3050 ldr r3, [pc, #80] ; 30010348 <_CORE_message_queue_Submit+0x12c> 300102f4: e5932000 ldr r2, [r3] _ISR_Disable( level ); 300102f8: e10f1000 mrs r1, CPSR 300102fc: e38130c0 orr r3, r1, #192 ; 0xc0 30010300: e129f003 msr CPSR_fc, r3 30010304: e3a03001 mov r3, #1 ; 0x1 30010308: 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; 3001030c: 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; 30010310: e582b020 str fp, [r2, #32] executing->Wait.return_argument_second.immutable_object = buffer; 30010314: e582802c str r8, [r2, #44] executing->Wait.option = (uint32_t) size; 30010318: 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; 3001031c: 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 ); 30010320: e129f001 msr CPSR_fc, r1 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 30010324: e59f2020 ldr r2, [pc, #32] ; 3001034c <_CORE_message_queue_Submit+0x130> 30010328: e1a00005 mov r0, r5 3001032c: e59d1030 ldr r1, [sp, #48] 30010330: ebffea63 bl 3000acc4 <_Thread_queue_Enqueue_with_handler> 30010334: e3a00007 mov r0, #7 ; 0x7 30010338: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 3001033c: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED } 30010340: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 30010344: 30024480 .word 0x30024480 30010348: 300244a4 .word 0x300244a4 3001034c: 3000b098 .word 0x3000b098 30009c5c <_CORE_mutex_Seize_interrupt_trylock>: Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 30009c5c: e59f3130 ldr r3, [pc, #304] ; 30009d94 <_CORE_mutex_Seize_interrupt_trylock+0x138> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 30009c60: e3a02000 mov r2, #0 ; 0x0 Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 30009c64: e593c000 ldr ip, [r3] CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 30009c68: e5911000 ldr r1, [r1] /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 30009c6c: e58c2034 str r2, [ip, #52] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 30009c70: e5903050 ldr r3, [r0, #80] #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 30009c74: e52de004 push {lr} ; (str lr, [sp, #-4]!) 30009c78: e1530002 cmp r3, r2 30009c7c: 0a00002f beq 30009d40 <_CORE_mutex_Seize_interrupt_trylock+0xe4> the_mutex->lock = CORE_MUTEX_LOCKED; 30009c80: e5802050 str r2, [r0, #80] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 30009c84: e59c3008 ldr r3, [ip, #8] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 30009c88: 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; 30009c8c: e5803060 str r3, [r0, #96] the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30009c90: e3520002 cmp r2, #2 ; 0x2 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; the_mutex->nest_count = 1; 30009c94: e3a03001 mov r3, #1 ; 0x1 30009c98: 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; 30009c9c: 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 ) || 30009ca0: 0a000001 beq 30009cac <_CORE_mutex_Seize_interrupt_trylock+0x50> 30009ca4: e3520003 cmp r2, #3 ; 0x3 30009ca8: 1a000002 bne 30009cb8 <_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++; 30009cac: e59c301c ldr r3, [ip, #28] 30009cb0: e2833001 add r3, r3, #1 ; 0x1 30009cb4: e58c301c str r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 30009cb8: e5903048 ldr r3, [r0, #72] 30009cbc: e3530003 cmp r3, #3 ; 0x3 30009cc0: 0a000001 beq 30009ccc <_CORE_mutex_Seize_interrupt_trylock+0x70> _ISR_Enable( level ); 30009cc4: e129f001 msr CPSR_fc, r1 30009cc8: ea00002d b 30009d84 <_CORE_mutex_Seize_interrupt_trylock+0x128> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 30009ccc: e590204c ldr r2, [r0, #76] current = executing->current_priority; 30009cd0: e59c3014 ldr r3, [ip, #20] if ( current == ceiling ) { 30009cd4: e1530002 cmp r3, r2 30009cd8: 1a000001 bne 30009ce4 <_CORE_mutex_Seize_interrupt_trylock+0x88> _ISR_Enable( level ); 30009cdc: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30009ce0: ea000027 b 30009d84 <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 30009ce4: 9a00000a bls 30009d14 <_CORE_mutex_Seize_interrupt_trylock+0xb8> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30009ce8: e59f20a8 ldr r2, [pc, #168] ; 30009d98 <_CORE_mutex_Seize_interrupt_trylock+0x13c> 30009cec: e5923000 ldr r3, [r2] 30009cf0: e2833001 add r3, r3, #1 ; 0x1 30009cf4: e5823000 str r3, [r2] _Thread_Disable_dispatch(); _ISR_Enable( level ); 30009cf8: e129f001 msr CPSR_fc, r1 _Thread_Change_priority( 30009cfc: e3a02000 mov r2, #0 ; 0x0 30009d00: e590104c ldr r1, [r0, #76] 30009d04: e590005c ldr r0, [r0, #92] 30009d08: ebffefda bl 30005c78 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 30009d0c: ebfff141 bl 30006218 <_Thread_Enable_dispatch> 30009d10: ea00001b b 30009d84 <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 30009d14: e3a03006 mov r3, #6 ; 0x6 30009d18: e58c3034 str r3, [ip, #52] the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 30009d1c: e3a03000 mov r3, #0 ; 0x0 30009d20: e5803054 str r3, [r0, #84] _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 30009d24: e2833001 add r3, r3, #1 ; 0x1 30009d28: e5803050 str r3, [r0, #80] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 30009d2c: e59c301c ldr r3, [ip, #28] 30009d30: e2433001 sub r3, r3, #1 ; 0x1 30009d34: e58c301c str r3, [ip, #28] _ISR_Enable( level ); 30009d38: e129f001 msr CPSR_fc, r1 30009d3c: ea000010 b 30009d84 <_CORE_mutex_Seize_interrupt_trylock+0x128> /* * 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 ) ) { 30009d40: e590205c ldr r2, [r0, #92] 30009d44: e152000c cmp r2, ip 30009d48: 1a00000f bne 30009d8c <_CORE_mutex_Seize_interrupt_trylock+0x130> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 30009d4c: e5903040 ldr r3, [r0, #64] 30009d50: e3530000 cmp r3, #0 ; 0x0 30009d54: 0a000002 beq 30009d64 <_CORE_mutex_Seize_interrupt_trylock+0x108> 30009d58: e3530001 cmp r3, #1 ; 0x1 30009d5c: 1a00000a bne 30009d8c <_CORE_mutex_Seize_interrupt_trylock+0x130> 30009d60: ea000004 b 30009d78 <_CORE_mutex_Seize_interrupt_trylock+0x11c> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 30009d64: e5903054 ldr r3, [r0, #84] 30009d68: e2833001 add r3, r3, #1 ; 0x1 30009d6c: e5803054 str r3, [r0, #84] _ISR_Enable( level ); 30009d70: e129f001 msr CPSR_fc, r1 30009d74: ea000002 b 30009d84 <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 30009d78: e3a03002 mov r3, #2 ; 0x2 30009d7c: e5823034 str r3, [r2, #52] _ISR_Enable( level ); 30009d80: e129f001 msr CPSR_fc, r1 30009d84: e3a00000 mov r0, #0 ; 0x0 30009d88: e49df004 pop {pc} ; (ldr pc, [sp], #4) 30009d8c: e3a00001 mov r0, #1 ; 0x1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 30009d90: e49df004 pop {pc} ; (ldr pc, [sp], #4) 30009d94: 30016324 .word 0x30016324 30009d98: 3001626c .word 0x3001626c 30004f5c <_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 ) { 30004f5c: e5d03044 ldrb r3, [r0, #68] CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 30004f60: e92d4010 push {r4, lr} * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 30004f64: 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 ) { 30004f68: 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; 30004f6c: 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 ) { 30004f70: 0a000004 beq 30004f88 <_CORE_mutex_Surrender+0x2c> if ( !_Thread_Is_executing( holder ) ) 30004f74: e59f3130 ldr r3, [pc, #304] ; 300050ac <_CORE_mutex_Surrender+0x150> 30004f78: e5933000 ldr r3, [r3] 30004f7c: e1500003 cmp r0, r3 30004f80: 13a00003 movne r0, #3 ; 0x3 30004f84: 18bd8010 popne {r4, pc} return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 30004f88: e5943054 ldr r3, [r4, #84] 30004f8c: e3530000 cmp r3, #0 ; 0x0 30004f90: 0a000043 beq 300050a4 <_CORE_mutex_Surrender+0x148> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 30004f94: e2433001 sub r3, r3, #1 ; 0x1 if ( the_mutex->nest_count != 0 ) { 30004f98: 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--; 30004f9c: e5843054 str r3, [r4, #84] if ( the_mutex->nest_count != 0 ) { 30004fa0: 0a000005 beq 30004fbc <_CORE_mutex_Surrender+0x60> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 30004fa4: e5943040 ldr r3, [r4, #64] 30004fa8: e3530000 cmp r3, #0 ; 0x0 30004fac: 0a00003c beq 300050a4 <_CORE_mutex_Surrender+0x148> 30004fb0: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 30004fb4: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 30004fb8: 08bd8010 popeq {r4, pc} <== NOT EXECUTED 30004fbc: 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 ) || 30004fc0: e3530002 cmp r3, #2 ; 0x2 30004fc4: 0a000001 beq 30004fd0 <_CORE_mutex_Surrender+0x74> 30004fc8: e3530003 cmp r3, #3 ; 0x3 30004fcc: 1a000002 bne 30004fdc <_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--; 30004fd0: e590301c ldr r3, [r0, #28] 30004fd4: e2433001 sub r3, r3, #1 ; 0x1 30004fd8: e580301c str r3, [r0, #28] 30004fdc: e5942048 ldr r2, [r4, #72] } the_mutex->holder = NULL; 30004fe0: 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 ) || 30004fe4: 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; 30004fe8: e5843060 str r3, [r4, #96] } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 30004fec: 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 ) || 30004ff0: 0a000001 beq 30004ffc <_CORE_mutex_Surrender+0xa0> 30004ff4: e3520003 cmp r2, #3 ; 0x3 30004ff8: 1a000007 bne 3000501c <_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 && 30004ffc: e590301c ldr r3, [r0, #28] 30005000: e3530000 cmp r3, #0 ; 0x0 30005004: 1a000004 bne 3000501c <_CORE_mutex_Surrender+0xc0> 30005008: e5901018 ldr r1, [r0, #24] 3000500c: e5903014 ldr r3, [r0, #20] 30005010: e1510003 cmp r1, r3 holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 30005014: 13a02001 movne r2, #1 ; 0x1 30005018: 1b000316 blne 30005c78 <_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 ) ) ) { 3000501c: e1a00004 mov r0, r4 30005020: eb00055d bl 3000659c <_Thread_queue_Dequeue> 30005024: e2501000 subs r1, r0, #0 ; 0x0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 30005028: 03a03001 moveq r3, #1 ; 0x1 3000502c: 05843050 streq r3, [r4, #80] 30005030: 01a00001 moveq r0, r1 /* * 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 ) ) ) { 30005034: 08bd8010 popeq {r4, pc} } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 30005038: e5913008 ldr r3, [r1, #8] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 3000503c: e5942048 ldr r2, [r4, #72] } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 30005040: e5843060 str r3, [r4, #96] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 30005044: e3520002 cmp r2, #2 ; 0x2 #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 30005048: e3a03001 mov r3, #1 ; 0x1 3000504c: e5843054 str r3, [r4, #84] } else #endif { the_mutex->holder = the_thread; 30005050: e584105c str r1, [r4, #92] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 30005054: 0a000002 beq 30005064 <_CORE_mutex_Surrender+0x108> 30005058: e3520003 cmp r2, #3 ; 0x3 3000505c: 1a000010 bne 300050a4 <_CORE_mutex_Surrender+0x148> 30005060: ea000004 b 30005078 <_CORE_mutex_Surrender+0x11c> 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++; 30005064: e591301c ldr r3, [r1, #28] 30005068: e3a00000 mov r0, #0 ; 0x0 3000506c: e2833001 add r3, r3, #1 ; 0x1 30005070: e581301c str r3, [r1, #28] 30005074: e8bd8010 pop {r4, pc} 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++; 30005078: e591301c ldr r3, [r1, #28] if (the_mutex->Attributes.priority_ceiling < 3000507c: e5912014 ldr r2, [r1, #20] 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++; 30005080: e2833001 add r3, r3, #1 ; 0x1 30005084: e581301c str r3, [r1, #28] if (the_mutex->Attributes.priority_ceiling < 30005088: e594104c ldr r1, [r4, #76] 3000508c: e1510002 cmp r1, r2 30005090: 2a000003 bcs 300050a4 <_CORE_mutex_Surrender+0x148> the_thread->current_priority){ _Thread_Change_priority( 30005094: e3a02000 mov r2, #0 ; 0x0 30005098: eb0002f6 bl 30005c78 <_Thread_Change_priority> 3000509c: e3a00000 mov r0, #0 ; 0x0 300050a0: e8bd8010 pop {r4, pc} } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 300050a4: e3a00000 mov r0, #0 ; 0x0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 300050a8: e8bd8010 pop {r4, pc} 300050ac: 30016324 .word 0x30016324 3000588c <_CORE_spinlock_Release>: CORE_spinlock_Control *the_spinlock ) { ISR_Level level; _ISR_Disable( level ); 3000588c: e10f1000 mrs r1, CPSR 30005890: e38130c0 orr r3, r1, #192 ; 0xc0 30005894: e129f003 msr CPSR_fc, r3 /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 30005898: e5903004 ldr r3, [r0, #4] 3000589c: e3530000 cmp r3, #0 ; 0x0 300058a0: 1a000002 bne 300058b0 <_CORE_spinlock_Release+0x24> _ISR_Enable( level ); 300058a4: e129f001 msr CPSR_fc, r1 300058a8: e3a00006 mov r0, #6 ; 0x6 300058ac: e12fff1e bx lr } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 300058b0: e59f3040 ldr r3, [pc, #64] ; 300058f8 <_CORE_spinlock_Release+0x6c> 300058b4: e590200c ldr r2, [r0, #12] 300058b8: e5933000 ldr r3, [r3] 300058bc: e5933008 ldr r3, [r3, #8] 300058c0: e1520003 cmp r2, r3 300058c4: 0a000002 beq 300058d4 <_CORE_spinlock_Release+0x48> _ISR_Enable( level ); 300058c8: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 300058cc: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 300058d0: e12fff1e bx lr <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 300058d4: e5903008 ldr r3, [r0, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 300058d8: e3a02000 mov r2, #0 ; 0x0 } /* * Let it be unlocked. */ the_spinlock->users -= 1; 300058dc: e2433001 sub r3, r3, #1 ; 0x1 300058e0: e5803008 str r3, [r0, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 300058e4: e5802004 str r2, [r0, #4] the_spinlock->holder = 0; 300058e8: e580200c str r2, [r0, #12] _ISR_Enable( level ); 300058ec: e129f001 msr CPSR_fc, r1 300058f0: e3a00000 mov r0, #0 ; 0x0 return CORE_SPINLOCK_SUCCESSFUL; } 300058f4: e12fff1e bx lr 300058f8: 300118a4 .word 0x300118a4 300058fc <_CORE_spinlock_Wait>: bool wait, Watchdog_Interval timeout ) { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 300058fc: e59f3104 ldr r3, [pc, #260] ; 30005a08 <_CORE_spinlock_Wait+0x10c> CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 30005900: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 30005904: e5933000 ldr r3, [r3] CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 30005908: e1a05002 mov r5, r2 3000590c: e1a04000 mov r4, r0 30005910: e20180ff and r8, r1, #255 ; 0xff ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 30005914: e0827003 add r7, r2, r3 _ISR_Disable( level ); 30005918: e10f1000 mrs r1, CPSR 3000591c: e38130c0 orr r3, r1, #192 ; 0xc0 30005920: e129f003 msr CPSR_fc, r3 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 30005924: e5903004 ldr r3, [r0, #4] 30005928: e3530001 cmp r3, #1 ; 0x1 3000592c: 1a000008 bne 30005954 <_CORE_spinlock_Wait+0x58> 30005930: e59f30d4 ldr r3, [pc, #212] ; 30005a0c <_CORE_spinlock_Wait+0x110> 30005934: e590200c ldr r2, [r0, #12] 30005938: e5933000 ldr r3, [r3] 3000593c: e5933008 ldr r3, [r3, #8] 30005940: e1520003 cmp r2, r3 30005944: 1a000002 bne 30005954 <_CORE_spinlock_Wait+0x58> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 30005948: e129f001 msr CPSR_fc, r1 3000594c: e3a00001 mov r0, #1 ; 0x1 30005950: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 30005954: e5943008 ldr r3, [r4, #8] } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 30005958: e59fa0a8 ldr sl, [pc, #168] ; 30005a08 <_CORE_spinlock_Wait+0x10c> if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 3000595c: e2833001 add r3, r3, #1 ; 0x1 30005960: e59f60a8 ldr r6, [pc, #168] ; 30005a10 <_CORE_spinlock_Wait+0x114> 30005964: e5843008 str r3, [r4, #8] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 30005968: e5943004 ldr r3, [r4, #4] 3000596c: e3530000 cmp r3, #0 ; 0x0 30005970: 1a000008 bne 30005998 <_CORE_spinlock_Wait+0x9c> the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 30005974: e59f3090 ldr r3, [pc, #144] ; 30005a0c <_CORE_spinlock_Wait+0x110> 30005978: e5932000 ldr r2, [r3] return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED; 3000597c: e3a03001 mov r3, #1 ; 0x1 30005980: e5843004 str r3, [r4, #4] the_spinlock->holder = _Thread_Executing->Object.id; 30005984: e5923008 ldr r3, [r2, #8] 30005988: e584300c str r3, [r4, #12] _ISR_Enable( level ); 3000598c: e129f001 msr CPSR_fc, r1 30005990: e3a00000 mov r0, #0 ; 0x0 30005994: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 30005998: e3580000 cmp r8, #0 ; 0x0 3000599c: 1a000005 bne 300059b8 <_CORE_spinlock_Wait+0xbc> the_spinlock->users -= 1; 300059a0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 300059a4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 300059a8: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 300059ac: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 300059b0: e3a00005 mov r0, #5 ; 0x5 <== NOT EXECUTED 300059b4: 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) ) { 300059b8: e3550000 cmp r5, #0 ; 0x0 300059bc: 0a000008 beq 300059e4 <_CORE_spinlock_Wait+0xe8> 300059c0: e59a3000 ldr r3, [sl] <== NOT EXECUTED 300059c4: e1570003 cmp r7, r3 <== NOT EXECUTED 300059c8: 8a000005 bhi 300059e4 <_CORE_spinlock_Wait+0xe8> <== NOT EXECUTED the_spinlock->users -= 1; 300059cc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 300059d0: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 300059d4: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 300059d8: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 300059dc: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 300059e0: 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 ); 300059e4: e129f001 msr CPSR_fc, r1 /* An ISR could occur here */ _Thread_Enable_dispatch(); 300059e8: eb000424 bl 30006a80 <_Thread_Enable_dispatch> 300059ec: e5963000 ldr r3, [r6] 300059f0: e2833001 add r3, r3, #1 ; 0x1 300059f4: 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 ); 300059f8: e10f1000 mrs r1, CPSR 300059fc: e38130c0 orr r3, r1, #192 ; 0xc0 30005a00: e129f003 msr CPSR_fc, r3 30005a04: eaffffd7 b 30005968 <_CORE_spinlock_Wait+0x6c> 30005a08: 30011944 .word 0x30011944 30005a0c: 300118a4 .word 0x300118a4 30005a10: 300117ec .word 0x300117ec 3001efe4 <_Chain_Insert>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 3001efe4: e10f2000 mrs r2, CPSR <== NOT EXECUTED 3001efe8: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 3001efec: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 3001eff0: e5903000 ldr r3, [r0] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 3001eff4: e5810004 str r0, [r1, #4] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 3001eff8: e5801000 str r1, [r0] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 3001effc: 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; 3001f000: e5813000 str r3, [r1] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 3001f004: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } 3001f008: e12fff1e bx lr <== NOT EXECUTED 30009b58 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 30009b58: e59f3010 ldr r3, [pc, #16] ; 30009b70 <_Debug_Is_enabled+0x18> <== NOT EXECUTED 30009b5c: e5933000 ldr r3, [r3] <== NOT EXECUTED 30009b60: e1100003 tst r0, r3 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 30009b64: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED 30009b68: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 30009b6c: e12fff1e bx lr <== NOT EXECUTED 30009b70: 30016328 .word 0x30016328 30003e60 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 30003e60: e92d40f0 push {r4, r5, r6, r7, lr} 30003e64: 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 ]; 30003e68: e5906104 ldr r6, [r0, #260] option_set = (rtems_option) the_thread->Wait.option; 30003e6c: e5907030 ldr r7, [r0, #48] _ISR_Disable( level ); 30003e70: e10f5000 mrs r5, CPSR 30003e74: e38530c0 orr r3, r5, #192 ; 0xc0 30003e78: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 30003e7c: e596c000 ldr ip, [r6] event_condition = (rtems_event_set) the_thread->Wait.count; 30003e80: 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 ) ) { 30003e84: e012000c ands r0, r2, ip 30003e88: 1a000001 bne 30003e94 <_Event_Surrender+0x34> _ISR_Enable( level ); 30003e8c: e129f005 msr CPSR_fc, r5 30003e90: 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() && 30003e94: e59f30f0 ldr r3, [pc, #240] ; 30003f8c <_Event_Surrender+0x12c> 30003e98: e5933000 ldr r3, [r3] 30003e9c: e3530000 cmp r3, #0 ; 0x0 30003ea0: 0a000019 beq 30003f0c <_Event_Surrender+0xac> 30003ea4: e59f30e4 ldr r3, [pc, #228] ; 30003f90 <_Event_Surrender+0x130> 30003ea8: e5933000 ldr r3, [r3] 30003eac: e1540003 cmp r4, r3 30003eb0: 1a000015 bne 30003f0c <_Event_Surrender+0xac> 30003eb4: e59f10d8 ldr r1, [pc, #216] ; 30003f94 <_Event_Surrender+0x134> 30003eb8: e5913000 ldr r3, [r1] 30003ebc: e3530001 cmp r3, #1 ; 0x1 30003ec0: 0a000002 beq 30003ed0 <_Event_Surrender+0x70> 30003ec4: e5913000 ldr r3, [r1] 30003ec8: e3530002 cmp r3, #2 ; 0x2 30003ecc: 1a00000e bne 30003f0c <_Event_Surrender+0xac> _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) ) { 30003ed0: e1500002 cmp r0, r2 30003ed4: 0a000001 beq 30003ee0 <_Event_Surrender+0x80> 30003ed8: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED 30003edc: 0a000008 beq 30003f04 <_Event_Surrender+0xa4> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 30003ee0: e1cc3000 bic r3, ip, r0 30003ee4: e5863000 str r3, [r6] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 30003ee8: e59f30a4 ldr r3, [pc, #164] ; 30003f94 <_Event_Surrender+0x134> ((_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; 30003eec: e5941028 ldr r1, [r4, #40] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 30003ef0: e3a02003 mov r2, #3 ; 0x3 30003ef4: e5832000 str r2, [r3] _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; 30003ef8: e3a03000 mov r3, #0 ; 0x0 30003efc: e5843024 str r3, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30003f00: e5810000 str r0, [r1] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); 30003f04: e129f005 msr CPSR_fc, r5 30003f08: e8bd80f0 pop {r4, r5, r6, r7, pc} } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 30003f0c: e5943010 ldr r3, [r4, #16] 30003f10: e3130c01 tst r3, #256 ; 0x100 30003f14: 0a00001a beq 30003f84 <_Event_Surrender+0x124> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 30003f18: e1500002 cmp r0, r2 30003f1c: 0a000001 beq 30003f28 <_Event_Surrender+0xc8> 30003f20: e3170002 tst r7, #2 ; 0x2 30003f24: 0a000016 beq 30003f84 <_Event_Surrender+0x124> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 30003f28: e1cc3000 bic r3, ip, r0 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30003f2c: 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 ); 30003f30: e5863000 str r3, [r6] the_thread->Wait.count = 0; 30003f34: e3a03000 mov r3, #0 ; 0x0 30003f38: e5843024 str r3, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30003f3c: e5820000 str r0, [r2] _ISR_Flash( level ); 30003f40: e10f3000 mrs r3, CPSR 30003f44: e129f005 msr CPSR_fc, r5 30003f48: e129f003 msr CPSR_fc, r3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 30003f4c: e5943050 ldr r3, [r4, #80] 30003f50: e3530002 cmp r3, #2 ; 0x2 30003f54: 0a000001 beq 30003f60 <_Event_Surrender+0x100> _ISR_Enable( level ); 30003f58: e129f005 msr CPSR_fc, r5 30003f5c: ea000004 b 30003f74 <_Event_Surrender+0x114> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 30003f60: e3a03003 mov r3, #3 ; 0x3 30003f64: e5843050 str r3, [r4, #80] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 30003f68: e129f005 msr CPSR_fc, r5 (void) _Watchdog_Remove( &the_thread->Timer ); 30003f6c: e2840048 add r0, r4, #72 ; 0x48 30003f70: eb000d41 bl 3000747c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 30003f74: e59f101c ldr r1, [pc, #28] ; 30003f98 <_Event_Surrender+0x138> 30003f78: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } 30003f7c: e8bd40f0 pop {r4, r5, r6, r7, lr} 30003f80: ea0007a4 b 30005e18 <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 30003f84: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 30003f88: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30003f8c: 30016300 .word 0x30016300 30003f90: 30016324 .word 0x30016324 30003f94: 30016b10 .word 0x30016b10 30003f98: 1003fff8 .word 0x1003fff8 30003f9c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 30003f9c: e52de004 push {lr} ; (str lr, [sp, #-4]!) 30003fa0: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 30003fa4: e1a0100d mov r1, sp 30003fa8: eb0008a3 bl 3000623c <_Thread_Get> switch ( location ) { 30003fac: e59d2000 ldr r2, [sp] 30003fb0: e3520000 cmp r2, #0 ; 0x0 30003fb4: 1a00001e bne 30004034 <_Event_Timeout+0x98> * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 30003fb8: e10f1000 mrs r1, CPSR 30003fbc: e38130c0 orr r3, r1, #192 ; 0xc0 30003fc0: e129f003 msr CPSR_fc, r3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 30003fc4: e5903024 ldr r3, [r0, #36] 30003fc8: e3530000 cmp r3, #0 ; 0x0 30003fcc: 1a000005 bne 30003fe8 <_Event_Timeout+0x4c> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30003fd0: e59f2064 ldr r2, [pc, #100] ; 3000403c <_Event_Timeout+0xa0> <== NOT EXECUTED 30003fd4: e5923000 ldr r3, [r2] <== NOT EXECUTED 30003fd8: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30003fdc: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 30003fe0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30003fe4: ea000012 b 30004034 <_Event_Timeout+0x98> <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 30003fe8: e59f3050 ldr r3, [pc, #80] ; 30004040 <_Event_Timeout+0xa4> _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 30003fec: e5802024 str r2, [r0, #36] if ( _Thread_Is_executing( the_thread ) ) { 30003ff0: e5933000 ldr r3, [r3] 30003ff4: e1500003 cmp r0, r3 30003ff8: 1a000004 bne 30004010 <_Event_Timeout+0x74> Thread_blocking_operation_States sync = _Event_Sync_state; 30003ffc: e59f2040 ldr r2, [pc, #64] ; 30004044 <_Event_Timeout+0xa8> 30004000: e5923000 ldr r3, [r2] if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 30004004: e3530001 cmp r3, #1 ; 0x1 (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 30004008: 93a03002 movls r3, #2 ; 0x2 3000400c: 95823000 strls r3, [r2] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 30004010: e3a03006 mov r3, #6 ; 0x6 30004014: e5803034 str r3, [r0, #52] _ISR_Enable( level ); 30004018: e129f001 msr CPSR_fc, r1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3000401c: e59f1024 ldr r1, [pc, #36] ; 30004048 <_Event_Timeout+0xac> 30004020: eb00077c bl 30005e18 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30004024: e59f2010 ldr r2, [pc, #16] ; 3000403c <_Event_Timeout+0xa0> 30004028: e5923000 ldr r3, [r2] 3000402c: e2433001 sub r3, r3, #1 ; 0x1 30004030: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 30004034: e28dd004 add sp, sp, #4 ; 0x4 30004038: e8bd8000 pop {pc} 3000403c: 3001626c .word 0x3001626c 30004040: 30016324 .word 0x30016324 30004044: 30016b10 .word 0x30016b10 30004048: 1003fff8 .word 0x1003fff8 30009e08 <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 30009e08: e92d4070 push {r4, r5, r6, lr} 30009e0c: 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 = 30009e10: e5942014 ldr r2, [r4, #20] 30009e14: e1a00001 mov r0, r1 30009e18: e5941010 ldr r1, [r4, #16] 30009e1c: ebffed59 bl 30005388 <_Heap_Calc_block_size> _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 30009e20: e3500000 cmp r0, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 30009e24: 15945008 ldrne r5, [r4, #8] 30009e28: 13a06000 movne r6, #0 ; 0x0 30009e2c: 1a000012 bne 30009e7c <_Heap_Allocate+0x74> 30009e30: 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) { 30009e34: e5953004 ldr r3, [r5, #4] 30009e38: e1530000 cmp r3, r0 30009e3c: 3a00000c bcc 30009e74 <_Heap_Allocate+0x6c> (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 30009e40: e1a02000 mov r2, r0 30009e44: e1a01005 mov r1, r5 30009e48: e1a00004 mov r0, r4 30009e4c: ebffed5d bl 300053c8 <_Heap_Block_allocate> ptr = _Heap_User_area(the_block); stats->allocs += 1; stats->searches += search_count + 1; 30009e50: e594304c ldr r3, [r4, #76] 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; 30009e54: e5942048 ldr r2, [r4, #72] stats->searches += search_count + 1; 30009e58: 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; 30009e5c: e2822001 add r2, r2, #1 ; 0x1 stats->searches += search_count + 1; 30009e60: 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; 30009e64: e5842048 str r2, [r4, #72] stats->searches += search_count + 1; 30009e68: e584304c str r3, [r4, #76] 30009e6c: e2850008 add r0, r5, #8 ; 0x8 30009e70: ea000004 b 30009e88 <_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) 30009e74: e5955008 ldr r5, [r5, #8] 30009e78: 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; 30009e7c: e1550004 cmp r5, r4 30009e80: 1affffeb bne 30009e34 <_Heap_Allocate+0x2c> 30009e84: e3a00000 mov r0, #0 ; 0x0 _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 30009e88: e5943044 ldr r3, [r4, #68] 30009e8c: e1530006 cmp r3, r6 stats->max_search = search_count; 30009e90: 35846044 strcc r6, [r4, #68] return ptr; } 30009e94: e8bd8070 pop {r4, r5, r6, pc} 300286fc <_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; 300286fc: e3a03000 mov r3, #0 ; 0x0 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 30028700: e92d4030 push {r4, r5, lr} 30028704: 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; 30028708: 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; 3002870c: 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; 30028710: e5813000 str r3, [r1] the_info->Free.total = 0; 30028714: e5813008 str r3, [r1, #8] the_info->Free.largest = 0; 30028718: e5813004 str r3, [r1, #4] the_info->Used.number = 0; 3002871c: e581300c str r3, [r1, #12] the_info->Used.total = 0; 30028720: 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; 30028724: e5902020 ldr r2, [r0, #32] 30028728: ea00001d b 300287a4 <_Heap_Get_information+0xa8> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3002872c: e5923004 ldr r3, [r2, #4] 30028730: 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 ); 30028734: 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) ) { 30028738: e5943004 ldr r3, [r4, #4] 3002873c: e3130001 tst r3, #1 ; 0x1 30028740: 0a000009 beq 3002876c <_Heap_Get_information+0x70> the_info->Used.number++; 30028744: e59c300c ldr r3, [ip, #12] the_info->Used.total += the_size; 30028748: e59c2014 ldr r2, [ip, #20] if ( the_info->Used.largest < the_size ) 3002874c: e59c1010 ldr r1, [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++; 30028750: e2833001 add r3, r3, #1 ; 0x1 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 30028754: e1510000 cmp r1, 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; 30028758: e0822000 add r2, 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) ) { the_info->Used.number++; 3002875c: e58c300c str r3, [ip, #12] the_info->Used.total += the_size; 30028760: e58c2014 str r2, [ip, #20] if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; 30028764: 358c0010 strcc r0, [ip, #16] 30028768: ea00000c b 300287a0 <_Heap_Get_information+0xa4> } else { the_info->Free.number++; 3002876c: e59c3000 ldr r3, [ip] the_info->Free.total += the_size; 30028770: e99c0006 ldmib ip, {r1, r2} 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++; 30028774: e2833001 add r3, r3, #1 ; 0x1 the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 30028778: e1510000 cmp r1, 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; 3002877c: e0822000 add r2, r2, r0 if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; 30028780: 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++; 30028784: e58c3000 str r3, [ip] the_info->Free.total += the_size; 30028788: e58c2008 str r2, [ip, #8] if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) 3002878c: e5943000 ldr r3, [r4] 30028790: e1500003 cmp r0, r3 30028794: 0a000001 beq 300287a0 <_Heap_Get_information+0xa4> 30028798: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 3002879c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 300287a0: 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 ) { 300287a4: e1520005 cmp r2, r5 300287a8: 1affffdf bne 3002872c <_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; 300287ac: e59c3014 ldr r3, [ip, #20] 300287b0: e3a00000 mov r0, #0 ; 0x0 300287b4: e2833008 add r3, r3, #8 ; 0x8 300287b8: e58c3014 str r3, [ip, #20] return HEAP_GET_INFORMATION_SUCCESSFUL; } 300287bc: e8bd8030 pop {r4, r5, pc} 30013de8 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013de8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30013dec: e1a04001 mov r4, r1 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; 30013df0: e5901014 ldr r1, [r0, #20] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013df4: 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; 30013df8: e58d1004 str r1, [sp, #4] uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; *avail_mem_size = 0; 30013dfc: e59d1030 ldr r1, [sp, #48] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013e00: 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; 30013e04: 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; 30013e08: e590c010 ldr ip, [r0, #16] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013e0c: e1a05000 mov r5, r0 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; 30013e10: e5893000 str r3, [r9] *avail_mem_size = 0; 30013e14: e5813000 str r3, [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); 30013e18: e5951010 ldr r1, [r5, #16] 30013e1c: e1a00004 mov r0, r4 void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013e20: 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; 30013e24: e58dc008 str ip, [sp, #8] 30013e28: ebfff8b5 bl 30012104 <__umodsi3> 30013e2c: 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 ); 30013e30: e5951020 ldr r1, [r5, #32] 30013e34: e5952024 ldr r2, [r5, #36] /* 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); 30013e38: 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)) 30013e3c: e1570001 cmp r7, r1 30013e40: 33a03000 movcc r3, #0 ; 0x0 30013e44: 23a03001 movcs r3, #1 ; 0x1 30013e48: e1570002 cmp r7, r2 30013e4c: 83a03000 movhi r3, #0 ; 0x0 30013e50: e3530000 cmp r3, #0 ; 0x0 30013e54: 0a000073 beq 30014028 <_Heap_Resize_block+0x240> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 30013e58: e597c004 ldr ip, [r7, #4] */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30013e5c: 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 ); 30013e60: e0876003 add r6, r7, r3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30013e64: 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) || 30013e68: e1560001 cmp r6, r1 30013e6c: 33a03000 movcc r3, #0 ; 0x0 30013e70: 23a03001 movcs r3, #1 ; 0x1 30013e74: e1560002 cmp r6, r2 30013e78: 83a03000 movhi r3, #0 ; 0x0 30013e7c: e3530000 cmp r3, #0 ; 0x0 30013e80: 0a000068 beq 30014028 <_Heap_Resize_block+0x240> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 30013e84: e5963004 ldr r3, [r6, #4] 30013e88: e3130001 tst r3, #1 ; 0x1 30013e8c: 0a000065 beq 30014028 <_Heap_Resize_block+0x240> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30013e90: 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) || 30013e94: 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 ); 30013e98: e086300a add r3, r6, sl 30013e9c: 15933004 ldrne r3, [r3, #4] 30013ea0: 03a02001 moveq r2, #1 ; 0x1 30013ea4: 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) 30013ea8: e0643006 rsb r3, r4, r6 30013eac: e2830004 add r0, r3, #4 ; 0x4 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 30013eb0: 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; 30013eb4: 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) || 30013eb8: 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; 30013ebc: 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) { 30013ec0: 9a000019 bls 30013f2c <_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 */ 30013ec4: e35b0000 cmp fp, #0 ; 0x0 30013ec8: 1a000058 bne 30014030 <_Heap_Resize_block+0x248> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 30013ecc: e0604008 rsb r4, r0, r8 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 30013ed0: e1a00004 mov r0, r4 30013ed4: e59d1008 ldr r1, [sp, #8] 30013ed8: ebfff889 bl 30012104 <__umodsi3> *value = r ? v - r + a : v; 30013edc: e3500000 cmp r0, #0 ; 0x0 30013ee0: 159dc008 ldrne ip, [sp, #8] 30013ee4: e59d2004 ldr r2, [sp, #4] 30013ee8: 1084300c addne r3, r4, ip 30013eec: 10604003 rsbne r4, r0, r3 30013ef0: e1540002 cmp r4, r2 30013ef4: 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) 30013ef8: e152000a cmp r2, sl 30013efc: 8a00004b bhi 30014030 <_Heap_Resize_block+0x248> return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 30013f00: e1a01006 mov r1, r6 30013f04: e1a00005 mov r0, r5 30013f08: ebffc52e bl 300053c8 <_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; 30013f0c: e59d1000 ldr r1, [sp] 30013f10: e0800001 add r0, r0, r1 30013f14: e1800009 orr r0, r0, r9 30013f18: e5870004 str r0, [r7, #4] --stats->used_blocks; 30013f1c: e5953040 ldr r3, [r5, #64] 30013f20: e2433001 sub r3, r3, #1 ; 0x1 30013f24: e5853040 str r3, [r5, #64] 30013f28: ea000039 b 30014014 <_Heap_Resize_block+0x22c> } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 30013f2c: e0684000 rsb r4, r8, r0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 30013f30: e1a00004 mov r0, r4 30013f34: e59d1008 ldr r1, [sp, #8] 30013f38: ebfff871 bl 30012104 <__umodsi3> _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 30013f3c: e0544000 subs r4, r4, r0 30013f40: 0a000033 beq 30014014 <_Heap_Resize_block+0x22c> /* 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; 30013f44: e89d000c ldm sp, {r2, r3} 30013f48: e0640002 rsb r0, r4, r2 if (new_block_size < min_block_size) { 30013f4c: e1500003 cmp r0, r3 30013f50: 2a000005 bcs 30013f6c <_Heap_Resize_block+0x184> uint32_t delta = min_block_size - new_block_size; 30013f54: e0603003 rsb r3, r0, r3 _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 30013f58: e0544003 subs r4, r4, r3 ++stats->resizes; 30013f5c: 05953054 ldreq r3, [r5, #84] 30013f60: 01a00004 moveq r0, r4 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) { 30013f64: 0a00002c beq 3001401c <_Heap_Resize_block+0x234> ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 30013f68: e0800003 add r0, r0, r3 <== NOT EXECUTED _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) { 30013f6c: e35b0000 cmp fp, #0 ; 0x0 30013f70: 1a000013 bne 30013fc4 <_Heap_Resize_block+0x1dc> /* 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; 30013f74: 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 ); 30013f78: e0871000 add r1, r7, r0 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 30013f7c: e1803009 orr r3, r0, r9 new_next_block->size = new_next_block_size | HEAP_PREV_USED; 30013f80: 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; 30013f84: 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; 30013f88: 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; 30013f8c: 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; 30013f90: e5953030 ldr r3, [r5, #48] Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 30013f94: e596000c ldr r0, [r6, #12] 30013f98: e0833004 add r3, r3, r4 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 30013f9c: e596c008 ldr ip, [r6, #8] 30013fa0: e5853030 str r3, [r5, #48] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 30013fa4: e59d3030 ldr r3, [sp, #48] 30013fa8: e2422004 sub r2, r2, #4 ; 0x4 Heap_Block *prev = block->prev; block = new_block; block->next = next; 30013fac: e581c008 str ip, [r1, #8] block->prev = prev; 30013fb0: e581000c str r0, [r1, #12] 30013fb4: e5832000 str r2, [r3] next->prev = prev->next = block; 30013fb8: e5801008 str r1, [r0, #8] 30013fbc: e58c100c str r1, [ip, #12] 30013fc0: ea000013 b 30014014 <_Heap_Resize_block+0x22c> } else if (free_block_size >= min_block_size) { 30013fc4: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 30013fc8: e154000c cmp r4, ip <== NOT EXECUTED 30013fcc: 3a000010 bcc 30014014 <_Heap_Resize_block+0x22c> <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30013fd0: 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; 30013fd4: 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; 30013fd8: 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; 30013fdc: 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; 30013fe0: e5812004 str r2, [r1, #4] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 30013fe4: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 30013fe8: 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 */ 30013fec: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 30013ff0: 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 */ 30013ff4: e5853040 str r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ _Heap_Free(the_heap, _Heap_User_area(next_block)); 30013ff8: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED /* 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 */ --stats->frees; /* Don't count next call in stats */ 30013ffc: e5852050 str r2, [r5, #80] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 30014000: e1a00005 mov r0, r5 <== NOT EXECUTED 30014004: ebffd7a3 bl 30009e98 <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 30014008: e59d1030 ldr r1, [sp, #48] <== NOT EXECUTED 3001400c: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED 30014010: e5813000 str r3, [r1] <== NOT EXECUTED } } } ++stats->resizes; 30014014: e5953054 ldr r3, [r5, #84] 30014018: e3a00000 mov r0, #0 ; 0x0 3001401c: e2833001 add r3, r3, #1 ; 0x1 30014020: e5853054 str r3, [r5, #84] 30014024: ea000002 b 30014034 <_Heap_Resize_block+0x24c> return HEAP_RESIZE_SUCCESSFUL; 30014028: e3a00002 mov r0, #2 ; 0x2 3001402c: ea000000 b 30014034 <_Heap_Resize_block+0x24c> 30014030: e3a00001 mov r0, #1 ; 0x1 } 30014034: e28dd00c add sp, sp, #12 ; 0xc 30014038: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 3000d47c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 3000d47c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *the_block = the_heap->start; 3000d480: e5907020 ldr r7, [r0, #32] /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 3000d484: e2516000 subs r6, r1, #0 ; 0x0 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000d488: e5973004 ldr r3, [r7, #4] if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) source = the_heap->stats.instance; 3000d48c: b5906028 ldrlt r6, [r0, #40] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000d490: e3130001 tst r3, #1 ; 0x1 bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 3000d494: e1a05000 mov r5, r0 Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 3000d498: e590b024 ldr fp, [r0, #36] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000d49c: 13a04000 movne r4, #0 ; 0x0 3000d4a0: 1a000003 bne 3000d4b4 <_Heap_Walk+0x38> printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 3000d4a4: e59f01a0 ldr r0, [pc, #416] ; 3000d64c <_Heap_Walk+0x1d0> <== NOT EXECUTED 3000d4a8: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d4ac: ebffdc41 bl 300045b8 <== NOT EXECUTED 3000d4b0: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 3000d4b4: e5972000 ldr r2, [r7] 3000d4b8: e5953010 ldr r3, [r5, #16] 3000d4bc: e1520003 cmp r2, r3 3000d4c0: 0a00004c beq 3000d5f8 <_Heap_Walk+0x17c> printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 3000d4c4: e59f0184 ldr r0, [pc, #388] ; 3000d650 <_Heap_Walk+0x1d4> <== NOT EXECUTED 3000d4c8: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d4cc: ebffdc39 bl 300045b8 <== NOT EXECUTED 3000d4d0: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED 3000d4d4: ea000047 b 3000d5f8 <_Heap_Walk+0x17c> <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3000d4d8: 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)) { 3000d4dc: e5952020 ldr r2, [r5, #32] 3000d4e0: e3c9a001 bic sl, r9, #1 ; 0x1 3000d4e4: 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 ); 3000d4e8: e087800a add r8, r7, sl 3000d4ec: e1580002 cmp r8, r2 3000d4f0: 33a01000 movcc r1, #0 ; 0x0 3000d4f4: 23a01001 movcs r1, #1 ; 0x1 3000d4f8: e1580003 cmp r8, r3 3000d4fc: 83a01000 movhi r1, #0 ; 0x0 3000d500: e3510000 cmp r1, #0 ; 0x0 3000d504: 1a000004 bne 3000d51c <_Heap_Walk+0xa0> if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 3000d508: e1a02008 mov r2, r8 <== NOT EXECUTED 3000d50c: e59f0140 ldr r0, [pc, #320] ; 3000d654 <_Heap_Walk+0x1d8> <== NOT EXECUTED 3000d510: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d514: ebffdc27 bl 300045b8 <== NOT EXECUTED 3000d518: ea000039 b 3000d604 <_Heap_Walk+0x188> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 3000d51c: e5983004 ldr r3, [r8, #4] 3000d520: e3130001 tst r3, #1 ; 0x1 3000d524: 1a00001e bne 3000d5a4 <_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) { 3000d528: e5983000 ldr r3, [r8] 3000d52c: e15a0003 cmp sl, r3 3000d530: 0a000003 beq 3000d544 <_Heap_Walk+0xc8> if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 3000d534: e59f011c ldr r0, [pc, #284] ; 3000d658 <_Heap_Walk+0x1dc> <== NOT EXECUTED 3000d538: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d53c: ebffdc1d bl 300045b8 <== NOT EXECUTED 3000d540: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (!prev_used) { 3000d544: e3190001 tst r9, #1 ; 0x1 3000d548: 1a000006 bne 3000d568 <_Heap_Walk+0xec> if (do_dump || error) printk("\n"); 3000d54c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 3000d550: 159f0104 ldrne r0, [pc, #260] ; 3000d65c <_Heap_Walk+0x1e0> <== NOT EXECUTED 3000d554: 1bffdc17 blne 300045b8 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 3000d558: e59f0100 ldr r0, [pc, #256] ; 3000d660 <_Heap_Walk+0x1e4> <== NOT EXECUTED 3000d55c: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d560: ebffdc14 bl 300045b8 <== NOT EXECUTED 3000d564: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 3000d568: e5953008 ldr r3, [r5, #8] 3000d56c: ea000000 b 3000d574 <_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; 3000d570: 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) 3000d574: e1530007 cmp r3, r7 3000d578: 11530005 cmpne r3, r5 3000d57c: 1afffffb bne 3000d570 <_Heap_Walk+0xf4> block = block->next; if(block != the_block) { 3000d580: e1530007 cmp r3, r7 3000d584: 0a000006 beq 3000d5a4 <_Heap_Walk+0x128> if (do_dump || error) printk("\n"); 3000d588: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 3000d58c: 159f00c8 ldrne r0, [pc, #200] ; 3000d65c <_Heap_Walk+0x1e0> <== NOT EXECUTED 3000d590: 1bffdc08 blne 300045b8 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 3000d594: e59f00c8 ldr r0, [pc, #200] ; 3000d664 <_Heap_Walk+0x1e8> <== NOT EXECUTED 3000d598: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d59c: ebffdc05 bl 300045b8 <== NOT EXECUTED 3000d5a0: ea000001 b 3000d5ac <_Heap_Walk+0x130> <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 3000d5a4: e3540000 cmp r4, #0 ; 0x0 3000d5a8: 0a000002 beq 3000d5b8 <_Heap_Walk+0x13c> 3000d5ac: e59f00a8 ldr r0, [pc, #168] ; 3000d65c <_Heap_Walk+0x1e0> <== NOT EXECUTED 3000d5b0: ebffdc00 bl 300045b8 <== NOT EXECUTED 3000d5b4: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 3000d5b8: e5953014 ldr r3, [r5, #20] 3000d5bc: e15a0003 cmp sl, r3 printk("PASS: %d !block size is too small\n", source); 3000d5c0: 359f00a0 ldrcc r0, [pc, #160] ; 3000d668 <_Heap_Walk+0x1ec> 3000d5c4: 3a000005 bcc 3000d5e0 <_Heap_Walk+0x164> error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 3000d5c8: e1a0000a mov r0, sl 3000d5cc: e5951010 ldr r1, [r5, #16] 3000d5d0: eb0026c1 bl 300170dc <__umodsi3> 3000d5d4: e3500000 cmp r0, #0 ; 0x0 3000d5d8: 0a000003 beq 3000d5ec <_Heap_Walk+0x170> printk("PASS: %d !block size is misaligned\n", source); 3000d5dc: e59f0088 ldr r0, [pc, #136] ; 3000d66c <_Heap_Walk+0x1f0> <== NOT EXECUTED 3000d5e0: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d5e4: ebffdbf3 bl 300045b8 <== NOT EXECUTED 3000d5e8: ea000005 b 3000d604 <_Heap_Walk+0x188> <== NOT EXECUTED error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 3000d5ec: e3540000 cmp r4, #0 ; 0x0 3000d5f0: 1a000003 bne 3000d604 <_Heap_Walk+0x188> break; 3000d5f4: 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 ) { 3000d5f8: e157000b cmp r7, fp 3000d5fc: 1affffb5 bne 3000d4d8 <_Heap_Walk+0x5c> 3000d600: ea000005 b 3000d61c <_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", 3000d604: e1a0300b mov r3, fp <== NOT EXECUTED 3000d608: e59f0060 ldr r0, [pc, #96] ; 3000d670 <_Heap_Walk+0x1f4> <== NOT EXECUTED 3000d60c: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d610: e1a02007 mov r2, r7 <== NOT EXECUTED 3000d614: ebffdbe7 bl 300045b8 <== NOT EXECUTED 3000d618: 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); 3000d61c: e5973004 ldr r3, [r7, #4] source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 3000d620: e5950010 ldr r0, [r5, #16] 3000d624: e3c32001 bic r2, r3, #1 ; 0x1 3000d628: e1520000 cmp r2, r0 3000d62c: 0a000004 beq 3000d644 <_Heap_Walk+0x1c8> printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 3000d630: e1a03000 mov r3, r0 <== NOT EXECUTED 3000d634: e1a01006 mov r1, r6 <== NOT EXECUTED 3000d638: e59f0034 ldr r0, [pc, #52] ; 3000d674 <_Heap_Walk+0x1f8> <== NOT EXECUTED 3000d63c: ebffdbdd bl 300045b8 <== NOT EXECUTED 3000d640: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 3000d644: e1a00004 mov r0, r4 3000d648: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 3000d64c: 3001a1c4 .word 0x3001a1c4 3000d650: 3001a1fa .word 0x3001a1fa 3000d654: 3001a22c .word 0x3001a22c 3000d658: 3001a24f .word 0x3001a24f 3000d65c: 30019bd1 .word 0x30019bd1 3000d660: 3001a27a .word 0x3001a27a 3000d664: 3001a2a4 .word 0x3001a2a4 3000d668: 3001a2cd .word 0x3001a2cd 3000d66c: 3001a2f0 .word 0x3001a2f0 3000d670: 3001a314 .word 0x3001a314 3000d674: 3001a34f .word 0x3001a34f 3000a08c <_Objects_API_maximum_class>: int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 3000a08c: e2400001 sub r0, r0, #1 ; 0x1 3000a090: e3500003 cmp r0, #3 ; 0x3 3000a094: 979ff100 ldrls pc, [pc, r0, lsl #2] 3000a098: ea00000b b 3000a0cc <_Objects_API_maximum_class+0x40> 3000a09c: 3000a0b4 .word 0x3000a0b4 <== NOT EXECUTED 3000a0a0: 3000a0ac .word 0x3000a0ac <== NOT EXECUTED 3000a0a4: 3000a0bc .word 0x3000a0bc <== NOT EXECUTED 3000a0a8: 3000a0c4 .word 0x3000a0c4 <== NOT EXECUTED 3000a0ac: e3a0000a mov r0, #10 ; 0xa 3000a0b0: e12fff1e bx lr 3000a0b4: e3a00002 mov r0, #2 ; 0x2 3000a0b8: e12fff1e bx lr 3000a0bc: e3a0000c mov r0, #12 ; 0xc 3000a0c0: 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; 3000a0c4: e3a00008 mov r0, #8 ; 0x8 3000a0c8: e12fff1e bx lr case OBJECTS_ITRON_API: return OBJECTS_ITRON_CLASSES_LAST; 3000a0cc: e3e00000 mvn r0, #0 ; 0x0 case OBJECTS_NO_API: default: break; } return -1; } 3000a0d0: e12fff1e bx lr 30005580 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 30005580: 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; 30005584: e1d060b8 ldrh r6, [r0, #8] minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 30005588: e1d041b0 ldrh r4, [r0, #16] */ void _Objects_Extend_information( Objects_Information *information ) { 3000558c: e24dd014 sub sp, sp, #20 ; 0x14 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 30005590: e1540006 cmp r4, r6 30005594: 33a07000 movcc r7, #0 ; 0x0 */ void _Objects_Extend_information( Objects_Information *information ) { 30005598: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 3000559c: 31a0a006 movcc sl, r6 300055a0: 31a08007 movcc r8, r7 300055a4: 3a00000f bcc 300055e8 <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; 300055a8: e5909014 ldr r9, [r0, #20] 300055ac: e1a00004 mov r0, r4 300055b0: e1a01009 mov r1, r9 300055b4: eb00328e bl 30011ff4 <__aeabi_uidiv> 300055b8: e1a0a006 mov sl, r6 300055bc: e1a07000 mov r7, r0 300055c0: e3a08000 mov r8, #0 ; 0x0 300055c4: ea000005 b 300055e0 <_Objects_Extend_information+0x60> for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 300055c8: e5953034 ldr r3, [r5, #52] 300055cc: e7933108 ldr r3, [r3, r8, lsl #2] 300055d0: e3530000 cmp r3, #0 ; 0x0 300055d4: 0a000003 beq 300055e8 <_Objects_Extend_information+0x68> break; else index_base += information->allocation_size; 300055d8: 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++ ) { 300055dc: e2888001 add r8, r8, #1 ; 0x1 300055e0: e1580007 cmp r8, r7 300055e4: 3afffff7 bcc 300055c8 <_Objects_Extend_information+0x48> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 300055e8: e15a0004 cmp sl, r4 300055ec: 3a000056 bcc 3000574c <_Objects_Extend_information+0x1cc> /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 300055f0: e5d52012 ldrb r2, [r5, #18] * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 300055f4: e5953014 ldr r3, [r5, #20] /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 300055f8: e3520000 cmp r2, #0 ; 0x0 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 300055fc: e0843003 add r3, r4, r3 30005600: e58d3004 str r3, [sp, #4] /* * Up the block count and maximum */ block_count++; 30005604: e2874001 add r4, r7, #1 ; 0x1 30005608: e0832006 add r2, r3, r6 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 3000560c: 0a000007 beq 30005630 <_Objects_Extend_information+0xb0> object_blocks = (void**) 30005610: e3a03003 mov r3, #3 ; 0x3 30005614: e0202493 mla r0, r3, r4, r2 30005618: e1a00100 lsl r0, r0, #2 3000561c: eb0007e8 bl 300075c4 <_Workspace_Allocate> block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 30005620: e3500000 cmp r0, #0 ; 0x0 30005624: e58d0000 str r0, [sp] 30005628: 1a000005 bne 30005644 <_Objects_Extend_information+0xc4> 3000562c: ea000078 b 30005814 <_Objects_Extend_information+0x294> <== NOT EXECUTED return; } else { object_blocks = (void**) 30005630: e3a03003 mov r3, #3 ; 0x3 30005634: e0202493 mla r0, r3, r4, r2 30005638: e1a00100 lsl r0, r0, #2 3000563c: eb0007e4 bl 300075d4 <_Workspace_Allocate_or_fatal_error> 30005640: e58d0000 str r0, [sp] * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005644: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 30005648: e59d1000 ldr r1, [sp] 3000564c: e1a02104 lsl r2, r4, #2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005650: e1530006 cmp r3, r6 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 30005654: e081b002 add fp, r1, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005658: 93a03000 movls r3, #0 ; 0x0 3000565c: 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; 30005660: 91a02003 movls r2, r3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005664: 9a000011 bls 300056b0 <_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, 30005668: e1a04107 lsl r4, r7, #2 3000566c: e5951034 ldr r1, [r5, #52] 30005670: e1a02004 mov r2, r4 30005674: e59d0000 ldr r0, [sp] 30005678: eb0018fc bl 3000ba70 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 3000567c: e1a02004 mov r2, r4 30005680: e5951030 ldr r1, [r5, #48] 30005684: e1a0000b mov r0, fp 30005688: eb0018f8 bl 3000ba70 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 3000568c: e1d521b0 ldrh r2, [r5, #16] 30005690: e1a00009 mov r0, r9 30005694: e0862002 add r2, r6, r2 30005698: e1a02102 lsl r2, r2, #2 3000569c: e595101c ldr r1, [r5, #28] 300056a0: eb0018f2 bl 3000ba70 300056a4: ea000003 b 300056b8 <_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; 300056a8: 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++ ) { 300056ac: e2833001 add r3, r3, #1 ; 0x1 300056b0: e1530006 cmp r3, r6 300056b4: 3afffffb bcc 300056a8 <_Objects_Extend_information+0x128> /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 300056b8: e3a03000 mov r3, #0 ; 0x0 inactive_per_block[block_count] = 0; 300056bc: e78b3107 str r3, [fp, r7, lsl #2] for ( index=index_base ; index < ( information->allocation_size + index_base ); 300056c0: e5952014 ldr r2, [r5, #20] /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 300056c4: e59dc000 ldr ip, [sp] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 300056c8: e08a0002 add r0, sl, r2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 300056cc: e78c3107 str r3, [ip, r7, lsl #2] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 300056d0: e089110a add r1, r9, sl, lsl #2 300056d4: e1a0200a mov r2, sl 300056d8: ea000000 b 300056e0 <_Objects_Extend_information+0x160> index++ ) { local_table[ index ] = NULL; 300056dc: 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 ); 300056e0: e1520000 cmp r2, r0 index++ ) { 300056e4: e2811004 add r1, r1, #4 ; 0x4 300056e8: 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 ); 300056ec: 3afffffa bcc 300056dc <_Objects_Extend_information+0x15c> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 300056f0: e10f0000 mrs r0, CPSR 300056f4: e38030c0 orr r3, r0, #192 ; 0xc0 300056f8: 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( 300056fc: 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; 30005700: e59dc004 ldr ip, [sp, #4] information->maximum_id = _Objects_Build_id( 30005704: e1d510b4 ldrh r1, [r5, #4] 30005708: 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; 3000570c: e1a0280c lsl r2, ip, #16 information->maximum_id = _Objects_Build_id( 30005710: 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; 30005714: e1a02822 lsr r2, r2, #16 information->maximum_id = _Objects_Build_id( 30005718: e1833d81 orr r3, r3, r1, lsl #27 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 3000571c: 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( 30005720: e1833002 orr r3, r3, r2 30005724: 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; 30005728: e585b030 str fp, [r5, #48] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 3000572c: e5953034 ldr r3, [r5, #52] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 30005730: e585901c str r9, [r5, #28] information->maximum = maximum; 30005734: e1c521b0 strh r2, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 30005738: e5851034 str r1, [r5, #52] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 3000573c: e129f000 msr CPSR_fc, r0 if ( old_tables ) 30005740: e3530000 cmp r3, #0 ; 0x0 _Workspace_Free( old_tables ); 30005744: 11a00003 movne r0, r3 30005748: 1b000799 blne 300075b4 <_Workspace_Free> /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 3000574c: e5d53012 ldrb r3, [r5, #18] 30005750: e5952014 ldr r2, [r5, #20] 30005754: e3530000 cmp r3, #0 ; 0x0 30005758: e5954034 ldr r4, [r5, #52] 3000575c: e5953018 ldr r3, [r5, #24] 30005760: 0a000007 beq 30005784 <_Objects_Extend_information+0x204> information->object_blocks[ block ] = 30005764: e0000392 mul r0, r2, r3 30005768: eb000795 bl 300075c4 <_Workspace_Allocate> _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 3000576c: e5953034 ldr r3, [r5, #52] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 30005770: e7840108 str r0, [r4, r8, lsl #2] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 30005774: e7933108 ldr r3, [r3, r8, lsl #2] 30005778: e3530000 cmp r3, #0 ; 0x0 3000577c: 1a000003 bne 30005790 <_Objects_Extend_information+0x210> 30005780: ea000023 b 30005814 <_Objects_Extend_information+0x294> <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 30005784: e0000392 mul r0, r2, r3 30005788: eb000791 bl 300075d4 <_Workspace_Allocate_or_fatal_error> 3000578c: e7840108 str r0, [r4, r8, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 30005790: e5953034 ldr r3, [r5, #52] 30005794: e28d4008 add r4, sp, #8 ; 0x8 30005798: e7931108 ldr r1, [r3, r8, lsl #2] 3000579c: e1a00004 mov r0, r4 300057a0: e5952014 ldr r2, [r5, #20] 300057a4: e5953018 ldr r3, [r5, #24] 300057a8: eb00111b bl 30009c1c <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 300057ac: e1a0600a mov r6, sl /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 300057b0: e1a08108 lsl r8, r8, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 300057b4: e2857020 add r7, r5, #32 ; 0x20 300057b8: ea000008 b 300057e0 <_Objects_Extend_information+0x260> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 300057bc: e5953000 ldr r3, [r5] 300057c0: e1d520b4 ldrh r2, [r5, #4] 300057c4: e1a03c03 lsl r3, r3, #24 300057c8: e3833801 orr r3, r3, #65536 ; 0x10000 300057cc: e1833d82 orr r3, r3, r2, lsl #27 300057d0: e1833006 orr r3, r3, r6 300057d4: e58c3008 str r3, [ip, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 300057d8: ebfffd5b bl 30004d4c <_Chain_Append> index++; 300057dc: 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 ) { 300057e0: e1a00004 mov r0, r4 300057e4: eb0010ff bl 30009be8 <_Chain_Get> 300057e8: e250c000 subs ip, r0, #0 ; 0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 300057ec: e1a0100c mov r1, ip 300057f0: 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 ) { 300057f4: 1afffff0 bne 300057bc <_Objects_Extend_information+0x23c> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 300057f8: e5953014 ldr r3, [r5, #20] 300057fc: e5952030 ldr r2, [r5, #48] information->inactive += information->allocation_size; 30005800: e1d512bc ldrh r1, [r5, #44] _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30005804: e7823008 str r3, [r2, r8] information->inactive += information->allocation_size; 30005808: e5953014 ldr r3, [r5, #20] 3000580c: e0833001 add r3, r3, r1 30005810: e1c532bc strh r3, [r5, #44] } 30005814: e28dd014 add sp, sp, #20 ; 0x14 30005818: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 300133dc <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 300133dc: e1a0c001 mov ip, r1 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 300133e0: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 300133e4: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 300133e8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 300133ec: 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; 300133f0: 05904008 ldreq r4, [r0, #8] <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 300133f4: e1a05000 mov r5, r0 <== NOT EXECUTED 300133f8: e1a06002 mov r6, r2 <== NOT EXECUTED 300133fc: e1a07003 mov r7, r3 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 30013400: 11a0400c movne r4, ip <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 30013404: e1a03804 lsl r3, r4, #16 <== NOT EXECUTED 30013408: e1d5c1b0 ldrh ip, [r5, #16] <== NOT EXECUTED 3001340c: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 30013410: e153000c cmp r3, ip <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 30013414: e1a01004 mov r1, r4 <== NOT EXECUTED 30013418: e1a00005 mov r0, r5 <== NOT EXECUTED 3001341c: e1a02006 mov r2, r6 <== NOT EXECUTED next_id++; 30013420: 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) 30013424: 9a000005 bls 30013440 <_Objects_Get_next+0x64> <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 30013428: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 3001342c: e5863000 str r3, [r6] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 30013430: e3e03000 mvn r3, #0 ; 0x0 <== NOT EXECUTED 30013434: e5873000 str r3, [r7] <== NOT EXECUTED 30013438: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001343c: 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); 30013440: ebffda8b bl 30009e74 <_Objects_Get> <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 30013444: e5963000 ldr r3, [r6] <== NOT EXECUTED 30013448: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001344c: 1affffec bne 30013404 <_Objects_Get_next+0x28> <== NOT EXECUTED *next_id_p = next_id; 30013450: e5874000 str r4, [r7] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 30013454: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30006dd4 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 30006dd4: e92d4030 push {r4, r5, lr} Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 30006dd8: e2515000 subs r5, r1, #0 ; 0x0 Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 30006ddc: 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 ) 30006de0: 03a00001 moveq r0, #1 ; 0x1 30006de4: 0a00001b beq 30006e58 <_Objects_Id_to_name+0x84> return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 30006de8: e3500000 cmp r0, #0 ; 0x0 30006dec: 059f3080 ldreq r3, [pc, #128] ; 30006e74 <_Objects_Id_to_name+0xa0> 30006df0: 11a01000 movne r1, r0 30006df4: 05933000 ldreq r3, [r3] 30006df8: 05931008 ldreq r1, [r3, #8] */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 30006dfc: e1a03c21 lsr r3, r1, #24 30006e00: 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 ) 30006e04: e2403001 sub r3, r0, #1 ; 0x1 30006e08: e3530003 cmp r3, #3 ; 0x3 30006e0c: 8a000010 bhi 30006e54 <_Objects_Id_to_name+0x80> 30006e10: ea000012 b 30006e60 <_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 ]; 30006e14: e1a03da1 lsr r3, r1, #27 30006e18: e7900103 ldr r0, [r0, r3, lsl #2] if ( !information ) 30006e1c: e3500000 cmp r0, #0 ; 0x0 30006e20: 0a00000b beq 30006e54 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; if ( information->is_string ) 30006e24: e5d04038 ldrb r4, [r0, #56] 30006e28: e3540000 cmp r4, #0 ; 0x0 30006e2c: 1a000008 bne 30006e54 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 30006e30: e1a0200d mov r2, sp 30006e34: ebffffcb bl 30006d68 <_Objects_Get> if ( !the_object ) 30006e38: e3500000 cmp r0, #0 ; 0x0 30006e3c: 0a000004 beq 30006e54 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; *name = the_object->name; 30006e40: e590300c ldr r3, [r0, #12] 30006e44: e5853000 str r3, [r5] _Thread_Enable_dispatch(); 30006e48: eb000216 bl 300076a8 <_Thread_Enable_dispatch> 30006e4c: e1a00004 mov r0, r4 30006e50: ea000000 b 30006e58 <_Objects_Id_to_name+0x84> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 30006e54: e3a00003 mov r0, #3 ; 0x3 } 30006e58: e28dd004 add sp, sp, #4 ; 0x4 30006e5c: 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 ] ) 30006e60: e59f3010 ldr r3, [pc, #16] ; 30006e78 <_Objects_Id_to_name+0xa4> 30006e64: e7930100 ldr r0, [r3, r0, lsl #2] 30006e68: e3500000 cmp r0, #0 ; 0x0 30006e6c: 1affffe8 bne 30006e14 <_Objects_Id_to_name+0x40> 30006e70: eafffff7 b 30006e54 <_Objects_Id_to_name+0x80> <== NOT EXECUTED 30006e74: 3001a744 .word 0x3001a744 30006e78: 3001a648 .word 0x3001a648 30011130 <_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 ) { 30011130: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 30011134: 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 ) { 30011138: e1a06000 mov r6, r0 3001113c: e1a08001 mov r8, r1 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 30011140: 03a00002 moveq r0, #2 ; 0x2 30011144: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return OBJECTS_INVALID_ADDRESS; if ( !name ) 30011148: e3510000 cmp r1, #0 ; 0x0 3001114c: 0a000016 beq 300111ac <_Objects_Name_to_id_string+0x7c> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 30011150: e1d671b0 ldrh r7, [r6, #16] 30011154: e3570000 cmp r7, #0 ; 0x0 30011158: 13a05001 movne r5, #1 ; 0x1 3001115c: 1a00000f bne 300111a0 <_Objects_Name_to_id_string+0x70> 30011160: ea000011 b 300111ac <_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 ]; 30011164: e596301c ldr r3, [r6, #28] 30011168: e7934105 ldr r4, [r3, r5, lsl #2] return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 3001116c: e2855001 add r5, r5, #1 ; 0x1 the_object = information->local_table[ index ]; if ( !the_object ) 30011170: e3540000 cmp r4, #0 ; 0x0 30011174: 0a000009 beq 300111a0 <_Objects_Name_to_id_string+0x70> continue; if ( !the_object->name.name_p ) 30011178: e594300c ldr r3, [r4, #12] 3001117c: e2531000 subs r1, r3, #0 ; 0x0 30011180: 0a000006 beq 300111a0 <_Objects_Name_to_id_string+0x70> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 30011184: e1d623ba ldrh r2, [r6, #58] 30011188: eb000c19 bl 300141f4 3001118c: e3500000 cmp r0, #0 ; 0x0 30011190: 1a000002 bne 300111a0 <_Objects_Name_to_id_string+0x70> *id = the_object->id; 30011194: e5943008 ldr r3, [r4, #8] 30011198: e58a3000 str r3, [sl] 3001119c: 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++ ) { 300111a0: e1550007 cmp r5, r7 continue; if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 300111a4: e1a00008 mov r0, r8 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 300111a8: 9affffed bls 30011164 <_Objects_Name_to_id_string+0x34> 300111ac: e3a00001 mov r0, #1 ; 0x1 } } } return OBJECTS_INVALID_NAME; } 300111b0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30004a70 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 30004a70: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 30004a74: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 30004a78: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 30004a7c: 0a000006 beq 30004a9c <_POSIX_Condition_variables_Get+0x2c> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 30004a80: e5953000 ldr r3, [r5] 30004a84: e3730001 cmn r3, #1 ; 0x1 30004a88: 1a000007 bne 30004aac <_POSIX_Condition_variables_Get+0x3c> /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 30004a8c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30004a90: eb00000b bl 30004ac4 <== NOT EXECUTED if ( status ) { 30004a94: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30004a98: 0a000003 beq 30004aac <_POSIX_Condition_variables_Get+0x3c> <== NOT EXECUTED *location = OBJECTS_ERROR; 30004a9c: e3a03001 mov r3, #1 ; 0x1 30004aa0: e5843000 str r3, [r4] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 30004aa4: e3a00000 mov r0, #0 ; 0x0 30004aa8: e8bd8030 pop {r4, r5, pc} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 30004aac: e5951000 ldr r1, [r5] 30004ab0: e59f0008 ldr r0, [pc, #8] ; 30004ac0 <_POSIX_Condition_variables_Get+0x50> 30004ab4: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 30004ab8: e8bd4030 pop {r4, r5, lr} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 30004abc: ea000b08 b 300076e4 <_Objects_Get> 30004ac0: 30015084 .word 0x30015084 30004c58 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 30004c58: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30004c5c: e1a06001 mov r6, r1 30004c60: e24dd004 sub sp, sp, #4 ; 0x4 30004c64: 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 ) ) { 30004c68: e1a0100d mov r1, sp 30004c6c: e1a00006 mov r0, r6 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 30004c70: e1a0a002 mov sl, r2 30004c74: 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 ) ) { 30004c78: eb000070 bl 30004e40 <_POSIX_Mutex_Get> 30004c7c: e3500000 cmp r0, #0 ; 0x0 30004c80: 0a000032 beq 30004d50 <_POSIX_Condition_variables_Wait_support+0xf8> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30004c84: e59f30d4 ldr r3, [pc, #212] ; 30004d60 <_POSIX_Condition_variables_Wait_support+0x108> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 30004c88: e1a0100d mov r1, sp 30004c8c: e5932000 ldr r2, [r3] 30004c90: e1a00007 mov r0, r7 30004c94: e2422001 sub r2, r2, #1 ; 0x1 30004c98: e5832000 str r2, [r3] 30004c9c: ebffff73 bl 30004a70 <_POSIX_Condition_variables_Get> switch ( location ) { 30004ca0: e59d3000 ldr r3, [sp] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 30004ca4: e1a05000 mov r5, r0 switch ( location ) { 30004ca8: e3530000 cmp r3, #0 ; 0x0 30004cac: 1a000027 bne 30004d50 <_POSIX_Condition_variables_Wait_support+0xf8> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 30004cb0: e5902014 ldr r2, [r0, #20] 30004cb4: e3520000 cmp r2, #0 ; 0x0 30004cb8: 0a000004 beq 30004cd0 <_POSIX_Condition_variables_Wait_support+0x78> 30004cbc: e5963000 ldr r3, [r6] 30004cc0: e1520003 cmp r2, r3 30004cc4: 0a000001 beq 30004cd0 <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 30004cc8: eb000c89 bl 30007ef4 <_Thread_Enable_dispatch> <== NOT EXECUTED 30004ccc: ea00001f b 30004d50 <_POSIX_Condition_variables_Wait_support+0xf8> <== NOT EXECUTED return EINVAL; } (void) pthread_mutex_unlock( mutex ); 30004cd0: e1a00006 mov r0, r6 30004cd4: eb0000df bl 30005058 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 30004cd8: e3580000 cmp r8, #0 ; 0x0 30004cdc: 1a000015 bne 30004d38 <_POSIX_Condition_variables_Wait_support+0xe0> the_cond->Mutex = *mutex; 30004ce0: e5963000 ldr r3, [r6] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 30004ce4: e59f4078 ldr r4, [pc, #120] ; 30004d64 <_POSIX_Condition_variables_Wait_support+0x10c> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 30004ce8: e5853014 str r3, [r5, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 30004cec: e5942000 ldr r2, [r4] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 30004cf0: 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; 30004cf4: e285c018 add ip, r5, #24 ; 0x18 _Thread_Executing->Wait.id = *cond; 30004cf8: 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; 30004cfc: e3a03001 mov r3, #1 ; 0x1 30004d00: 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; 30004d04: 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; 30004d08: 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 ); 30004d0c: e1a0000c mov r0, ip 30004d10: e1a0100a mov r1, sl 30004d14: e59f204c ldr r2, [pc, #76] ; 30004d68 <_POSIX_Condition_variables_Wait_support+0x110> 30004d18: eb000daf bl 300083dc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 30004d1c: eb000c74 bl 30007ef4 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 30004d20: e5943000 ldr r3, [r4] 30004d24: e5934034 ldr r4, [r3, #52] if ( status && status != ETIMEDOUT ) 30004d28: e3540000 cmp r4, #0 ; 0x0 30004d2c: 13540074 cmpne r4, #116 ; 0x74 30004d30: 0a000002 beq 30004d40 <_POSIX_Condition_variables_Wait_support+0xe8> 30004d34: ea000006 b 30004d54 <_POSIX_Condition_variables_Wait_support+0xfc> <== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 30004d38: eb000c6d bl 30007ef4 <_Thread_Enable_dispatch> 30004d3c: e3a04074 mov r4, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 30004d40: e1a00006 mov r0, r6 30004d44: eb0000a2 bl 30004fd4 if ( mutex_status ) 30004d48: e3500000 cmp r0, #0 ; 0x0 30004d4c: 0a000000 beq 30004d54 <_POSIX_Condition_variables_Wait_support+0xfc> 30004d50: e3a04016 mov r4, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 30004d54: e1a00004 mov r0, r4 30004d58: e28dd004 add sp, sp, #4 ; 0x4 30004d5c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30004d60: 30014c6c .word 0x30014c6c 30004d64: 30014d24 .word 0x30014d24 30004d68: 30008820 .word 0x30008820 3000fd60 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 3000fd60: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000fd64: e1a0a001 mov sl, r1 3000fd68: 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 ); 3000fd6c: e3a010ff mov r1, #255 ; 0xff const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 3000fd70: e1a04002 mov r4, r2 3000fd74: e1a0b003 mov fp, r3 3000fd78: 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 ); 3000fd7c: eb0011b0 bl 30014444 if ( n > NAME_MAX ) 3000fd80: 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 ); 3000fd84: e1a06000 mov r6, r0 if ( n > NAME_MAX ) 3000fd88: 83a0005b movhi r0, #91 ; 0x5b 3000fd8c: 8a00004b bhi 3000fec0 <_POSIX_Message_queue_Create_support+0x160> 3000fd90: e59f2130 ldr r2, [pc, #304] ; 3000fec8 <_POSIX_Message_queue_Create_support+0x168> 3000fd94: e5923000 ldr r3, [r2] 3000fd98: e2833001 add r3, r3, #1 ; 0x1 3000fd9c: 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 ) { 3000fda0: e3540000 cmp r4, #0 ; 0x0 3000fda4: 03a08010 moveq r8, #16 ; 0x10 3000fda8: 03a0700a moveq r7, #10 ; 0xa 3000fdac: 0a00000d beq 3000fde8 <_POSIX_Message_queue_Create_support+0x88> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 3000fdb0: e5943004 ldr r3, [r4, #4] 3000fdb4: e3530000 cmp r3, #0 ; 0x0 3000fdb8: da000002 ble 3000fdc8 <_POSIX_Message_queue_Create_support+0x68> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 3000fdbc: e5943008 ldr r3, [r4, #8] 3000fdc0: e3530000 cmp r3, #0 ; 0x0 3000fdc4: ca000003 bgt 3000fdd8 <_POSIX_Message_queue_Create_support+0x78> _Thread_Enable_dispatch(); 3000fdc8: ebfff418 bl 3000ce30 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 3000fdcc: eb0009eb bl 30012580 <__errno> 3000fdd0: e3a03016 mov r3, #22 ; 0x16 3000fdd4: ea00002f b 3000fe98 <_POSIX_Message_queue_Create_support+0x138> } attr = *attr_ptr; 3000fdd8: e894000f ldm r4, {r0, r1, r2, r3} 3000fddc: e88d000f stm sp, {r0, r1, r2, r3} 3000fde0: e1a08002 mov r8, r2 3000fde4: e1a07001 mov r7, r1 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 3000fde8: e59f50dc ldr r5, [pc, #220] ; 3000fecc <_POSIX_Message_queue_Create_support+0x16c> 3000fdec: e1a00005 mov r0, r5 3000fdf0: ebfff0af bl 3000c0b4 <_Objects_Allocate> } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 3000fdf4: e2504000 subs r4, r0, #0 ; 0x0 3000fdf8: 1a000003 bne 3000fe0c <_POSIX_Message_queue_Create_support+0xac> _Thread_Enable_dispatch(); 3000fdfc: ebfff40b bl 3000ce30 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 3000fe00: eb0009de bl 30012580 <__errno> <== NOT EXECUTED 3000fe04: e3a03017 mov r3, #23 ; 0x17 <== NOT EXECUTED 3000fe08: ea000022 b 3000fe98 <_POSIX_Message_queue_Create_support+0x138> <== NOT EXECUTED } the_mq->process_shared = pshared; the_mq->named = TRUE; 3000fe0c: 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); 3000fe10: e1a00006 mov r0, r6 if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 3000fe14: e584a010 str sl, [r4, #16] the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 3000fe18: 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; 3000fe1c: e5c43014 strb r3, [r4, #20] the_mq->open_count = 1; 3000fe20: 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); 3000fe24: ebfff930 bl 3000e2ec <_Workspace_Allocate> if (!name) { 3000fe28: e2506000 subs r6, r0, #0 ; 0x0 3000fe2c: 1a000006 bne 3000fe4c <_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 ); 3000fe30: e1a00005 mov r0, r5 <== NOT EXECUTED 3000fe34: e1a01004 mov r1, r4 <== NOT EXECUTED 3000fe38: ebfff16c bl 3000c3f0 <_Objects_Free> <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 3000fe3c: ebfff3fb bl 3000ce30 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 3000fe40: eb0009ce bl 30012580 <__errno> <== NOT EXECUTED 3000fe44: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 3000fe48: ea000012 b 3000fe98 <_POSIX_Message_queue_Create_support+0x138> <== NOT EXECUTED } strcpy( name, name_arg ); 3000fe4c: 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; 3000fe50: 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 ); 3000fe54: eb000f01 bl 30013a60 * 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; 3000fe58: e584a05c str sl, [r4, #92] if ( ! _CORE_message_queue_Initialize( 3000fe5c: e1a02007 mov r2, r7 3000fe60: e1a03008 mov r3, r8 3000fe64: e284001c add r0, r4, #28 ; 0x1c 3000fe68: e284105c add r1, r4, #92 ; 0x5c 3000fe6c: eb00034a bl 30010b9c <_CORE_message_queue_Initialize> 3000fe70: e150000a cmp r0, sl 3000fe74: 1a00000a bne 3000fea4 <_POSIX_Message_queue_Create_support+0x144> 3000fe78: e1a01004 mov r1, r4 <== NOT EXECUTED 3000fe7c: e1a00005 mov r0, r5 <== NOT EXECUTED 3000fe80: ebfff15a bl 3000c3f0 <_Objects_Free> <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 3000fe84: e1a00006 mov r0, r6 <== NOT EXECUTED 3000fe88: ebfff913 bl 3000e2dc <_Workspace_Free> <== NOT EXECUTED _Thread_Enable_dispatch(); 3000fe8c: ebfff3e7 bl 3000ce30 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 3000fe90: eb0009ba bl 30012580 <__errno> <== NOT EXECUTED 3000fe94: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 3000fe98: e5803000 str r3, [r0] 3000fe9c: e3e00000 mvn r0, #0 ; 0x0 3000fea0: ea000006 b 3000fec0 <_POSIX_Message_queue_Create_support+0x160> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 3000fea4: e595201c ldr r2, [r5, #28] 3000fea8: e1d430b8 ldrh r3, [r4, #8] 3000feac: 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; 3000feb0: e584600c str r6, [r4, #12] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 3000feb4: e58b4000 str r4, [fp] _Thread_Enable_dispatch(); 3000feb8: ebfff3dc bl 3000ce30 <_Thread_Enable_dispatch> 3000febc: e1a0000a mov r0, sl return 0; } 3000fec0: e28dd010 add sp, sp, #16 ; 0x10 3000fec4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 3000fec8: 3002110c .word 0x3002110c 3000fecc: 30021420 .word 0x30021420 300057b0 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 300057b0: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 300057b4: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 300057b8: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 300057bc: 0a000006 beq 300057dc <_POSIX_Mutex_Get+0x2c> 300057c0: e5953000 ldr r3, [r5] 300057c4: e3730001 cmn r3, #1 ; 0x1 300057c8: 1a000007 bne 300057ec <_POSIX_Mutex_Get+0x3c> 300057cc: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 300057d0: eb00001d bl 3000584c <== NOT EXECUTED 300057d4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300057d8: 0a000003 beq 300057ec <_POSIX_Mutex_Get+0x3c> <== NOT EXECUTED 300057dc: e3a03001 mov r3, #1 ; 0x1 300057e0: e5843000 str r3, [r4] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 300057e4: e3a00000 mov r0, #0 ; 0x0 300057e8: e8bd8030 pop {r4, r5, pc} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 300057ec: e5951000 ldr r1, [r5] 300057f0: e59f0008 ldr r0, [pc, #8] ; 30005800 <_POSIX_Mutex_Get+0x50> 300057f4: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 300057f8: e8bd4030 pop {r4, r5, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 300057fc: ea000adf b 30008380 <_Objects_Get> 30005800: 30016da0 .word 0x30016da0 30005754 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 30005754: e92d4070 push {r4, r5, r6, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 30005758: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 3000575c: e1a04001 mov r4, r1 30005760: e1a06002 mov r6, r2 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 30005764: 0a000006 beq 30005784 <_POSIX_Mutex_Get_interrupt_disable+0x30> 30005768: e5953000 ldr r3, [r5] 3000576c: e3730001 cmn r3, #1 ; 0x1 30005770: 1a000007 bne 30005794 <_POSIX_Mutex_Get_interrupt_disable+0x40> 30005774: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30005778: eb000033 bl 3000584c <== NOT EXECUTED 3000577c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30005780: 0a000003 beq 30005794 <_POSIX_Mutex_Get_interrupt_disable+0x40> <== NOT EXECUTED 30005784: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 30005788: e5843000 str r3, [r4] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 3000578c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30005790: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 30005794: e5951000 ldr r1, [r5] 30005798: e59f000c ldr r0, [pc, #12] ; 300057ac <_POSIX_Mutex_Get_interrupt_disable+0x58> 3000579c: e1a02004 mov r2, r4 300057a0: e1a03006 mov r3, r6 _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 300057a4: e8bd4070 pop {r4, r5, r6, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 300057a8: ea000ada b 30008318 <_Objects_Get_isr_disable> 300057ac: 30016da0 .word 0x30016da0 3000c930 <_POSIX_Semaphore_Create_support>: 3000c930: e59fc0e8 ldr ip, [pc, #232] ; 3000ca20 <_POSIX_Semaphore_Create_support+0xf0> const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 3000c934: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3000c938: e59ce000 ldr lr, [ip] 3000c93c: e1a07002 mov r7, r2 3000c940: e28ee001 add lr, lr, #1 ; 0x1 3000c944: e58ce000 str lr, [ip] 3000c948: e1a08003 mov r8, r3 3000c94c: e1a06000 mov r6, r0 char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 3000c950: e3510000 cmp r1, #0 ; 0x0 3000c954: 0a000003 beq 3000c968 <_POSIX_Semaphore_Create_support+0x38> _Thread_Enable_dispatch(); 3000c958: ebfff214 bl 300091b0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); 3000c95c: eb000837 bl 3000ea40 <__errno> 3000c960: e3a03058 mov r3, #88 ; 0x58 3000c964: ea00000f b 3000c9a8 <_POSIX_Semaphore_Create_support+0x78> } if ( name ) { 3000c968: e3500000 cmp r0, #0 ; 0x0 3000c96c: 0a000006 beq 3000c98c <_POSIX_Semaphore_Create_support+0x5c> if( strlen(name) > PATH_MAX ) { 3000c970: eb000f09 bl 3001059c 3000c974: e35000ff cmp r0, #255 ; 0xff 3000c978: 9a000003 bls 3000c98c <_POSIX_Semaphore_Create_support+0x5c> _Thread_Enable_dispatch(); 3000c97c: ebfff20b bl 300091b0 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 3000c980: eb00082e bl 3000ea40 <__errno> <== NOT EXECUTED 3000c984: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000c988: ea000006 b 3000c9a8 <_POSIX_Semaphore_Create_support+0x78> <== NOT EXECUTED * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 3000c98c: e59f0090 ldr r0, [pc, #144] ; 3000ca24 <_POSIX_Semaphore_Create_support+0xf4> 3000c990: ebffeeda bl 30008500 <_Objects_Allocate> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 3000c994: e2505000 subs r5, r0, #0 ; 0x0 3000c998: 1a000005 bne 3000c9b4 <_POSIX_Semaphore_Create_support+0x84> _Thread_Enable_dispatch(); 3000c99c: ebfff203 bl 300091b0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 3000c9a0: eb000826 bl 3000ea40 <__errno> 3000c9a4: e3a0301c mov r3, #28 ; 0x1c 3000c9a8: e5803000 str r3, [r0] 3000c9ac: e3e00000 mvn r0, #0 ; 0x0 3000c9b0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} } the_semaphore->process_shared = pshared; if ( name ) { 3000c9b4: e3560000 cmp r6, #0 ; 0x0 if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 3000c9b8: e3a03000 mov r3, #0 ; 0x0 3000c9bc: e5853010 str r3, [r5, #16] if ( name ) { the_semaphore->named = TRUE; 3000c9c0: 12833001 addne r3, r3, #1 ; 0x1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; 3000c9c4: 15c53015 strbne r3, [r5, #21] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 3000c9c8: 15c53014 strbne r3, [r5, #20] the_semaphore->open_count = 1; 3000c9cc: 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; 3000c9d0: e3a04000 mov r4, #0 ; 0x0 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 3000c9d4: e3e03000 mvn r3, #0 ; 0x0 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 3000c9d8: 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; 3000c9dc: 05c56014 strbeq r6, [r5, #20] the_semaphore->open_count = 0; 3000c9e0: 05856018 streq r6, [r5, #24] the_semaphore->linked = FALSE; 3000c9e4: 05c56015 strbeq r6, [r5, #21] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 3000c9e8: e585305c str r3, [r5, #92] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 3000c9ec: e1a02007 mov r2, r7 3000c9f0: 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; 3000c9f4: 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 ); 3000c9f8: ebffedb5 bl 300080d4 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 3000c9fc: e59f3020 ldr r3, [pc, #32] ; 3000ca24 <_POSIX_Semaphore_Create_support+0xf4> 3000ca00: e1d520b8 ldrh r2, [r5, #8] 3000ca04: e593301c ldr r3, [r3, #28] 3000ca08: e7835102 str r5, [r3, r2, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; 3000ca0c: e585600c str r6, [r5, #12] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 3000ca10: e5885000 str r5, [r8] _Thread_Enable_dispatch(); 3000ca14: ebfff1e5 bl 300091b0 <_Thread_Enable_dispatch> 3000ca18: e1a00004 mov r0, r4 return 0; } 3000ca1c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 3000ca20: 3001c4cc .word 0x3001c4cc 3000ca24: 3001c760 .word 0x3001c760 300094fc <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 300094fc: e5903108 ldr r3, [r0, #264] the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 30009500: e590201c ldr r2, [r0, #28] RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 30009504: e5933084 ldr r3, [r3, #132] 30009508: e3520000 cmp r2, #0 ; 0x0 3000950c: e26310ff rsb r1, r3, #255 ; 0xff * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 30009510: e3e03000 mvn r3, #0 ; 0x0 30009514: e5803078 str r3, [r0, #120] new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; 30009518: e5801018 str r1, [r0, #24] if ( the_thread->resource_count == 0 || 3000951c: 0a000002 beq 3000952c <_POSIX_Threads_Sporadic_budget_callout+0x30> 30009520: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 30009524: e1530001 cmp r3, r1 <== NOT EXECUTED 30009528: 912fff1e bxls lr <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 3000952c: e3a02001 mov r2, #1 ; 0x1 30009530: eafff1d0 b 30005c78 <_Thread_Change_priority> 3000aaa0 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 3000aaa0: 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 ]; 3000aaa4: e5905108 ldr r5, [r0, #264] handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 3000aaa8: e3a03001 mov r3, #1 ; 0x1 3000aaac: e58530cc str r3, [r5, #204] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3000aab0: e28560dc add r6, r5, #220 ; 0xdc 3000aab4: ea00000c b 3000aaec <_POSIX_Threads_cancel_run+0x4c> while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 3000aab8: e10f1000 mrs r1, CPSR <== NOT EXECUTED 3000aabc: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 3000aac0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 3000aac4: e5964004 ldr r4, [r6, #4] <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 3000aac8: e894000c ldm r4, {r2, r3} <== NOT EXECUTED previous = the_node->previous; next->previous = previous; previous->next = next; 3000aacc: e5832000 str r2, [r3] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 3000aad0: e5823004 str r3, [r2, #4] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 3000aad4: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED (*handler->routine)( handler->arg ); 3000aad8: e594000c ldr r0, [r4, #12] <== NOT EXECUTED 3000aadc: e1a0e00f mov lr, pc <== NOT EXECUTED 3000aae0: e594f008 ldr pc, [r4, #8] <== NOT EXECUTED _Workspace_Free( handler ); 3000aae4: e1a00004 mov r0, r4 <== NOT EXECUTED 3000aae8: ebfff2b1 bl 300075b4 <_Workspace_Free> <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 3000aaec: e59530d8 ldr r3, [r5, #216] 3000aaf0: e1530006 cmp r3, r6 3000aaf4: 1affffef bne 3000aab8 <_POSIX_Threads_cancel_run+0x18> (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 3000aaf8: e8bd8070 pop {r4, r5, r6, pc} 3000b52c <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 3000b52c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3000b530: e1a08001 mov r8, r1 3000b534: e1a07002 mov r7, r2 3000b538: e1a05003 mov r5, r3 3000b53c: e1a04000 mov r4, r0 ISR_Level level; (void) _Watchdog_Remove( timer ); 3000b540: ebfff6da bl 300090b0 <_Watchdog_Remove> _ISR_Disable( level ); 3000b544: e10f6000 mrs r6, CPSR 3000b548: e38630c0 orr r3, r6, #192 ; 0xc0 3000b54c: 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 ) { 3000b550: e5943008 ldr r3, [r4, #8] 3000b554: e3530000 cmp r3, #0 ; 0x0 3000b558: 0a000002 beq 3000b568 <_POSIX_Timer_Insert_helper+0x3c> _ISR_Enable( level ); 3000b55c: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 3000b560: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000b564: 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; 3000b568: e5843008 str r3, [r4, #8] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 3000b56c: e59d3018 ldr r3, [sp, #24] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 3000b570: e584501c str r5, [r4, #28] the_watchdog->id = id; 3000b574: e5847020 str r7, [r4, #32] the_watchdog->user_data = user_data; 3000b578: e5843024 str r3, [r4, #36] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 3000b57c: e584800c str r8, [r4, #12] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 3000b580: e1a01004 mov r1, r4 3000b584: e59f000c ldr r0, [pc, #12] ; 3000b598 <_POSIX_Timer_Insert_helper+0x6c> 3000b588: ebfff66c bl 30008f40 <_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 ); 3000b58c: e129f006 msr CPSR_fc, r6 3000b590: e3a00001 mov r0, #1 ; 0x1 return true; } 3000b594: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 3000b598: 3001aaa4 .word 0x3001aaa4 3000564c <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 3000564c: e92d4010 push {r4, lr} bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 30005650: e5913068 ldr r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 30005654: e5912054 ldr r2, [r1, #84] bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 30005658: e2833001 add r3, r3, #1 ; 0x1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 3000565c: 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) { 30005660: e24dd004 sub sp, sp, #4 ; 0x4 30005664: e1a04001 mov r4, r1 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 30005668: e5813068 str r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 3000566c: 1a000003 bne 30005680 <_POSIX_Timer_TSR+0x34> 30005670: e5913058 ldr r3, [r1, #88] <== NOT EXECUTED 30005674: 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; 30005678: 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 ) || 3000567c: 0a00000a beq 300056ac <_POSIX_Timer_TSR+0x60> <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 30005680: e5941064 ldr r1, [r4, #100] 30005684: e5942008 ldr r2, [r4, #8] 30005688: e2840010 add r0, r4, #16 ; 0x10 3000568c: e59f3038 ldr r3, [pc, #56] ; 300056cc <_POSIX_Timer_TSR+0x80> 30005690: e58d4000 str r4, [sp] 30005694: eb0017a4 bl 3000b52c <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 30005698: e3500000 cmp r0, #0 ; 0x0 3000569c: 0a000008 beq 300056c4 <_POSIX_Timer_TSR+0x78> return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 300056a0: e284006c add r0, r4, #108 ; 0x6c 300056a4: eb000587 bl 30006cc8 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 300056a8: e3a03003 mov r3, #3 ; 0x3 } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 300056ac: 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 ) ) { 300056b0: e5940038 ldr r0, [r4, #56] 300056b4: e5941044 ldr r1, [r4, #68] 300056b8: eb0016c2 bl 3000b1c8 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 300056bc: e3a03000 mov r3, #0 ; 0x0 300056c0: e5843068 str r3, [r4, #104] } 300056c4: e28dd004 add sp, sp, #4 ; 0x4 300056c8: e8bd8010 pop {r4, pc} 300056cc: 3000564c .word 0x3000564c 30004c78 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 30004c78: e1a02000 mov r2, r0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 30004c7c: e3a01001 mov r1, #1 ; 0x1 #include int _POSIX_signals_Get_highest( sigset_t set ) { 30004c80: e3a0001b mov r0, #27 ; 0x1b int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 30004c84: e2403001 sub r3, r0, #1 ; 0x1 30004c88: e0123311 ands r3, r2, r1, lsl r3 30004c8c: 112fff1e bxne lr sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 30004c90: e2800001 add r0, r0, #1 ; 0x1 30004c94: e3500020 cmp r0, #32 ; 0x20 30004c98: 1afffff9 bne 30004c84 <_POSIX_signals_Get_highest+0xc> 30004c9c: 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 ) ) 30004ca0: e1a01000 mov r1, r0 30004ca4: e2403001 sub r3, r0, #1 ; 0x1 30004ca8: e0123311 ands r3, r2, r1, lsl r3 30004cac: 112fff1e bxne lr return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 30004cb0: e2800001 add r0, r0, #1 ; 0x1 30004cb4: e350001b cmp r0, #27 ; 0x1b 30004cb8: 1afffff9 bne 30004ca4 <_POSIX_signals_Get_highest+0x2c> 30004cbc: e1a00003 mov r0, r3 <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 30004cc0: e12fff1e bx lr <== NOT EXECUTED 300091b4 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 300091b4: e92d4070 push {r4, r5, r6, lr} POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 300091b8: e5905108 ldr r5, [r0, #264] if ( !api ) 300091bc: e3550000 cmp r5, #0 ; 0x0 300091c0: 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 & 300091c4: e59f60b0 ldr r6, [pc, #176] ; 3000927c <_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 ); 300091c8: e10f0000 mrs r0, CPSR 300091cc: e38030c0 orr r3, r0, #192 ; 0xc0 300091d0: e129f003 msr CPSR_fc, r3 if ( !(~api->signals_blocked & 300091d4: e5963000 ldr r3, [r6] 300091d8: e59520c8 ldr r2, [r5, #200] 300091dc: e59510c4 ldr r1, [r5, #196] 300091e0: e1833002 orr r3, r3, r2 300091e4: e1d31001 bics r1, r3, r1 300091e8: 1a000001 bne 300091f4 <_POSIX_signals_Post_switch_extension+0x40> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 300091ec: e129f000 msr CPSR_fc, r0 300091f0: e8bd8070 pop {r4, r5, r6, pc} break; } _ISR_Enable( level ); 300091f4: e129f000 msr CPSR_fc, r0 300091f8: e3a0401b mov r4, #27 ; 0x1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 300091fc: e1a01004 mov r1, r4 30009200: e3a02000 mov r2, #0 ; 0x0 30009204: e1a00005 mov r0, r5 30009208: eb000667 bl 3000abac <_POSIX_signals_Check_signal> 3000920c: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009210: e1a01004 mov r1, r4 30009214: e3a02001 mov r2, #1 ; 0x1 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 30009218: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 3000921c: e1a00005 mov r0, r5 } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 30009220: 1affffe8 bne 300091c8 <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009224: eb000660 bl 3000abac <_POSIX_signals_Check_signal> 30009228: e3500000 cmp r0, #0 ; 0x0 3000922c: 1affffe5 bne 300091c8 <_POSIX_signals_Post_switch_extension+0x14> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 30009230: e3540020 cmp r4, #32 ; 0x20 30009234: 1afffff0 bne 300091fc <_POSIX_signals_Post_switch_extension+0x48> 30009238: 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 ) ) 3000923c: e1a01004 mov r1, r4 30009240: e3a02000 mov r2, #0 ; 0x0 30009244: e1a00005 mov r0, r5 30009248: eb000657 bl 3000abac <_POSIX_signals_Check_signal> 3000924c: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009250: e1a01004 mov r1, r4 30009254: e3a02001 mov r2, #1 ; 0x1 } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 30009258: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 3000925c: 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 ) ) 30009260: 1affffd8 bne 300091c8 <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009264: eb000650 bl 3000abac <_POSIX_signals_Check_signal> 30009268: e3500000 cmp r0, #0 ; 0x0 3000926c: 1affffd5 bne 300091c8 <_POSIX_signals_Post_switch_extension+0x14> } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 30009270: e354001b cmp r4, #27 ; 0x1b 30009274: 1afffff0 bne 3000923c <_POSIX_signals_Post_switch_extension+0x88> 30009278: eaffffd2 b 300091c8 <_POSIX_signals_Post_switch_extension+0x14> <== NOT EXECUTED 3000927c: 3001698c .word 0x3001698c 3001f6d4 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 3001f6d4: e92d4070 push {r4, r5, r6, lr} Heap_Get_information_status status; if ( !the_heap ) 3001f6d8: e2506000 subs r6, r0, #0 ; 0x0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 3001f6dc: e1a04001 mov r4, r1 Heap_Get_information_status status; if ( !the_heap ) 3001f6e0: 0a00000d beq 3001f71c <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) 3001f6e4: e3510000 cmp r1, #0 ; 0x0 3001f6e8: 0a00000b beq 3001f71c <_Protected_heap_Get_information+0x48> return false; _RTEMS_Lock_allocator(); 3001f6ec: e59f5030 ldr r5, [pc, #48] ; 3001f724 <_Protected_heap_Get_information+0x50> 3001f6f0: e5950000 ldr r0, [r5] 3001f6f4: ebffa27e bl 300080f4 <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 3001f6f8: e1a01004 mov r1, r4 3001f6fc: e1a00006 mov r0, r6 3001f700: eb0023fd bl 300286fc <_Heap_Get_information> 3001f704: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 3001f708: e5950000 ldr r0, [r5] 3001f70c: ebffa294 bl 30008164 <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 3001f710: e2740001 rsbs r0, r4, #1 ; 0x1 3001f714: 33a00000 movcc r0, #0 ; 0x0 3001f718: e8bd8070 pop {r4, r5, r6, pc} 3001f71c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; return false; } 3001f720: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3001f724: 300566fc .word 0x300566fc 30004680 <_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; 30004680: e59f3094 ldr r3, [pc, #148] ; 3000471c <_RTEMS_tasks_Initialize_user_tasks_body+0x9c> * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 30004684: 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; 30004688: e5933000 ldr r3, [r3] * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 3000468c: e24dd00c sub sp, sp, #12 ; 0xc rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 30004690: e5933040 ldr r3, [r3, #64] /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 30004694: e593002c ldr r0, [r3, #44] maximum = api_configuration->number_of_initialization_tasks; 30004698: e5936028 ldr r6, [r3, #40] if ( !user_tasks || maximum == 0 ) 3000469c: e3560000 cmp r6, #0 ; 0x0 300046a0: 13500000 cmpne r0, #0 ; 0x0 300046a4: 13a03000 movne r3, #0 ; 0x0 300046a8: 03a03001 moveq r3, #1 ; 0x1 return; 300046ac: 11a04000 movne r4, r0 300046b0: 11a05003 movne r5, r3 for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 300046b4: 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 ) 300046b8: 1a000013 bne 3000470c <_RTEMS_tasks_Initialize_user_tasks_body+0x8c> 300046bc: ea000014 b 30004714 <_RTEMS_tasks_Initialize_user_tasks_body+0x94> <== NOT EXECUTED return; for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 300046c0: e594300c ldr r3, [r4, #12] 300046c4: e88d0088 stm sp, {r3, r7} 300046c8: e8940005 ldm r4, {r0, r2} 300046cc: e5941008 ldr r1, [r4, #8] 300046d0: e5943014 ldr r3, [r4, #20] 300046d4: ebffff63 bl 30004468 user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 300046d8: e2502000 subs r2, r0, #0 ; 0x0 300046dc: 1a000006 bne 300046fc <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 300046e0: e5942018 ldr r2, [r4, #24] 300046e4: e5941010 ldr r1, [r4, #16] 300046e8: e59d0008 ldr r0, [sp, #8] 300046ec: eb00000b bl 30004720 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 300046f0: 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( 300046f4: e284401c add r4, r4, #28 ; 0x1c id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 300046f8: 0a000002 beq 30004708 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 300046fc: e3a00001 mov r0, #1 ; 0x1 30004700: e1a01000 mov r1, r0 30004704: eb00035b bl 30005478 <_Internal_error_Occurred> maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 30004708: e2855001 add r5, r5, #1 ; 0x1 3000470c: e1550006 cmp r5, r6 30004710: 3affffea bcc 300046c0 <_RTEMS_tasks_Initialize_user_tasks_body+0x40> ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); } } 30004714: e28dd00c add sp, sp, #12 ; 0xc 30004718: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000471c: 300162fc .word 0x300162fc 30005804 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 30005804: e92d4010 push {r4, lr} 30005808: e24dd004 sub sp, sp, #4 ; 0x4 3000580c: e1a01000 mov r1, r0 30005810: e1a0200d mov r2, sp 30005814: e59f008c ldr r0, [pc, #140] ; 300058a8 <_Rate_monotonic_Timeout+0xa4> 30005818: eb000735 bl 300074f4 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 3000581c: e59d3000 ldr r3, [sp] 30005820: e1a04000 mov r4, r0 30005824: e3530000 cmp r3, #0 ; 0x0 30005828: 1a00001c bne 300058a0 <_Rate_monotonic_Timeout+0x9c> case OBJECTS_LOCAL: the_thread = the_period->owner; 3000582c: e5900050 ldr r0, [r0, #80] if ( _States_Is_waiting_for_period( the_thread->current_state ) && 30005830: e5903010 ldr r3, [r0, #16] 30005834: e3130901 tst r3, #16384 ; 0x4000 30005838: 0a000006 beq 30005858 <_Rate_monotonic_Timeout+0x54> 3000583c: e5902020 ldr r2, [r0, #32] 30005840: e5943008 ldr r3, [r4, #8] 30005844: e1520003 cmp r2, r3 30005848: 1a000002 bne 30005858 <_Rate_monotonic_Timeout+0x54> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3000584c: e59f1058 ldr r1, [pc, #88] ; 300058ac <_Rate_monotonic_Timeout+0xa8> 30005850: eb00084d bl 3000798c <_Thread_Clear_state> 30005854: ea000006 b 30005874 <_Rate_monotonic_Timeout+0x70> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 30005858: e5943038 ldr r3, [r4, #56] 3000585c: e3530001 cmp r3, #1 ; 0x1 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 30005860: 13a03004 movne r3, #4 ; 0x4 30005864: 15843038 strne r3, [r4, #56] _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 30005868: 1a000008 bne 30005890 <_Rate_monotonic_Timeout+0x8c> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 3000586c: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 30005870: e5843038 str r3, [r4, #56] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 30005874: e1a00004 mov r0, r4 30005878: ebfffe51 bl 300051c4 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 3000587c: e594304c ldr r3, [r4, #76] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005880: e2841010 add r1, r4, #16 ; 0x10 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005884: e584301c str r3, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005888: e59f0020 ldr r0, [pc, #32] ; 300058b0 <_Rate_monotonic_Timeout+0xac> 3000588c: eb000e21 bl 30009118 <_Watchdog_Insert> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30005890: e59f201c ldr r2, [pc, #28] ; 300058b4 <_Rate_monotonic_Timeout+0xb0> 30005894: e5923000 ldr r3, [r2] 30005898: e2433001 sub r3, r3, #1 ; 0x1 3000589c: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 300058a0: e28dd004 add sp, sp, #4 ; 0x4 300058a4: e8bd8010 pop {r4, pc} 300058a8: 3001ae10 .word 0x3001ae10 300058ac: 1003fff8 .word 0x1003fff8 300058b0: 3001b004 .word 0x3001b004 300058b4: 3001af2c .word 0x3001af2c 30005124 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 30005124: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 30005128: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get( struct timespec *time ) { 3000512c: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 30005130: e58d3004 str r3, [sp, #4] */ void _TOD_Get( struct timespec *time ) { 30005134: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 30005138: e58d3000 str r3, [sp] offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); 3000513c: e10f6000 mrs r6, CPSR 30005140: e38630c0 orr r3, r6, #192 ; 0xc0 30005144: e129f003 msr CPSR_fc, r3 *time = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 30005148: e59f3038 ldr r3, [pc, #56] ; 30005188 <_TOD_Get+0x64> 3000514c: 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; 30005150: e59f3034 ldr r3, [pc, #52] ; 3000518c <_TOD_Get+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 30005154: 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; 30005158: e8930018 ldm r3, {r3, r4} 3000515c: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 30005160: 0a000002 beq 30005170 <_TOD_Get+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 30005164: e1a0e00f mov lr, pc <== NOT EXECUTED 30005168: e12fff12 bx r2 <== NOT EXECUTED 3000516c: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 30005170: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( time, &offset ); 30005174: e1a00005 mov r0, r5 30005178: e1a0100d mov r1, sp 3000517c: eb000797 bl 30006fe0 <_Timespec_Add_to> } 30005180: e28dd008 add sp, sp, #8 ; 0x8 30005184: e8bd8070 pop {r4, r5, r6, pc} 30005188: 30016418 .word 0x30016418 3000518c: 300162f4 .word 0x300162f4 30009d9c <_TOD_Get_uptime>: */ void _TOD_Get_uptime( struct timespec *uptime ) { 30009d9c: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 30009da0: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get_uptime( struct timespec *uptime ) { 30009da4: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 30009da8: e58d3004 str r3, [sp, #4] */ void _TOD_Get_uptime( struct timespec *uptime ) { 30009dac: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 30009db0: e58d3000 str r3, [sp] offset.tv_nsec = 0; _ISR_Disable( level ); 30009db4: e10f6000 mrs r6, CPSR 30009db8: e38630c0 orr r3, r6, #192 ; 0xc0 30009dbc: e129f003 msr CPSR_fc, r3 *uptime = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 30009dc0: e59f3038 ldr r3, [pc, #56] ; 30009e00 <_TOD_Get_uptime+0x64> 30009dc4: e5932000 ldr r2, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 30009dc8: e59f3034 ldr r3, [pc, #52] ; 30009e04 <_TOD_Get_uptime+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 30009dcc: e3520000 cmp r2, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 30009dd0: e8930018 ldm r3, {r3, r4} 30009dd4: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 30009dd8: 0a000002 beq 30009de8 <_TOD_Get_uptime+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 30009ddc: e1a0e00f mov lr, pc <== NOT EXECUTED 30009de0: e12fff12 bx r2 <== NOT EXECUTED 30009de4: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 30009de8: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( uptime, &offset ); 30009dec: e1a00005 mov r0, r5 30009df0: e1a0100d mov r1, sp 30009df4: ebfff479 bl 30006fe0 <_Timespec_Add_to> } 30009df8: e28dd008 add sp, sp, #8 ; 0x8 30009dfc: e8bd8070 pop {r4, r5, r6, pc} 30009e00: 30016418 .word 0x30016418 30009e04: 300162e4 .word 0x300162e4 3000b14c <_Thread_Handler>: #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 3000b14c: e59f30b0 ldr r3, [pc, #176] ; 3000b204 <_Thread_Handler+0xb8> * * Output parameters: NONE */ void _Thread_Handler( void ) { 3000b150: e92d4030 push {r4, r5, lr} #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 3000b154: 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; 3000b158: e59530b8 ldr r3, [r5, #184] _ISR_Set_level(level); 3000b15c: e3a02000 mov r2, #0 ; 0x0 3000b160: e10f2000 mrs r2, CPSR 3000b164: e3c220c0 bic r2, r2, #192 ; 0xc0 3000b168: e1822003 orr r2, r2, r3 3000b16c: e121f002 msr CPSR_c, r2 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 3000b170: e59f2090 ldr r2, [pc, #144] ; 3000b208 <_Thread_Handler+0xbc> doneConstructors = 1; 3000b174: e3a03001 mov r3, #1 ; 0x1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 3000b178: 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 ); 3000b17c: 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; 3000b180: 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 ); 3000b184: ebffefe3 bl 30007118 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 3000b188: ebffec22 bl 30006218 <_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) */ 3000b18c: e3540000 cmp r4, #0 ; 0x0 { _init (); 3000b190: 0b002482 bleq 300143a0 <__start_set_sysctl_set> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 3000b194: e59530a0 ldr r3, [r5, #160] 3000b198: e3530003 cmp r3, #3 ; 0x3 3000b19c: 979ff103 ldrls pc, [pc, r3, lsl #2] 3000b1a0: ea000011 b 3000b1ec <_Thread_Handler+0xa0> <== NOT EXECUTED 3000b1a4: 3000b1b4 .word 0x3000b1b4 <== NOT EXECUTED 3000b1a8: 3000b1bc .word 0x3000b1bc <== NOT EXECUTED 3000b1ac: 3000b1cc .word 0x3000b1cc <== NOT EXECUTED 3000b1b0: 3000b1d8 .word 0x3000b1d8 <== NOT EXECUTED case THREAD_START_NUMERIC: executing->Wait.return_argument = 3000b1b4: e59500a8 ldr r0, [r5, #168] 3000b1b8: ea000000 b 3000b1c0 <_Thread_Handler+0x74> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 3000b1bc: e59500a4 ldr r0, [r5, #164] 3000b1c0: e1a0e00f mov lr, pc 3000b1c4: e595f09c ldr pc, [r5, #156] 3000b1c8: ea000006 b 3000b1e8 <_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 = 3000b1cc: e59500a4 ldr r0, [r5, #164] <== NOT EXECUTED 3000b1d0: e59510a8 ldr r1, [r5, #168] <== NOT EXECUTED 3000b1d4: ea000001 b 3000b1e0 <_Thread_Handler+0x94> <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 3000b1d8: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED 3000b1dc: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED 3000b1e0: e1a0e00f mov lr, pc <== NOT EXECUTED 3000b1e4: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED 3000b1e8: 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 ); 3000b1ec: e1a00005 mov r0, r5 3000b1f0: ebffefd7 bl 30007154 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 3000b1f4: e3a00000 mov r0, #0 ; 0x0 3000b1f8: e3a01001 mov r1, #1 ; 0x1 3000b1fc: e3a02006 mov r2, #6 ; 0x6 3000b200: ebffe89c bl 30005478 <_Internal_error_Occurred> 3000b204: 30016324 .word 0x30016324 3000b208: 300160b4 .word 0x300160b4 300062e0 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 300062e0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 300062e4: 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 ) { 300062e8: e1a09000 mov r9, r0 300062ec: e1a05001 mov r5, r1 300062f0: e1a04003 mov r4, r3 300062f4: e59d8024 ldr r8, [sp, #36] 300062f8: e59da02c ldr sl, [sp, #44] 300062fc: e5dd7028 ldrb r7, [sp, #40] /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 30006300: 1a00000e bne 30006340 <_Thread_Initialize+0x60> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 30006304: e1a00001 mov r0, r1 30006308: e1a01003 mov r1, r3 3000630c: eb000295 bl 30006d68 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 30006310: e1500004 cmp r0, r4 30006314: 23a03000 movcs r3, #0 ; 0x0 30006318: 33a03001 movcc r3, #1 ; 0x1 3000631c: e3500000 cmp r0, #0 ; 0x0 30006320: 03833001 orreq r3, r3, #1 ; 0x1 30006324: e3530000 cmp r3, #0 ; 0x0 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 30006328: 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 ) 3000632c: e1a01000 mov r1, r0 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 30006330: 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; 30006334: 0595c0cc ldreq ip, [r5, #204] if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 30006338: 0a000004 beq 30006350 <_Thread_Initialize+0x70> 3000633c: ea000017 b 300063a0 <_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; 30006340: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30006344: e5c130c0 strb r3, [r1, #192] <== NOT EXECUTED 30006348: e1a0c006 mov ip, r6 <== NOT EXECUTED 3000634c: e1a01004 mov r1, r4 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 30006350: e59f3128 ldr r3, [pc, #296] ; 30006480 <_Thread_Initialize+0x1a0> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30006354: e3a02000 mov r2, #0 ; 0x0 30006358: e5930000 ldr r0, [r3] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 3000635c: e585c0c8 str ip, [r5, #200] 30006360: e1500002 cmp r0, r2 the_stack->size = size; 30006364: e58510c4 str r1, [r5, #196] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 30006368: e5852100 str r2, [r5, #256] 3000636c: e5852050 str r2, [r5, #80] the_watchdog->routine = routine; 30006370: e5852064 str r2, [r5, #100] the_watchdog->id = id; 30006374: e5852068 str r2, [r5, #104] the_watchdog->user_data = user_data; 30006378: e585206c str r2, [r5, #108] (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return FALSE; 3000637c: 01a06000 moveq r6, r0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 30006380: 0a000008 beq 300063a8 <_Thread_Initialize+0xc8> extensions_area = _Workspace_Allocate( 30006384: e2800001 add r0, r0, #1 ; 0x1 30006388: e1a00100 lsl r0, r0, #2 3000638c: eb00048c bl 300075c4 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 30006390: e2506000 subs r6, r0, #0 ; 0x0 30006394: 1a000003 bne 300063a8 <_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 ); 30006398: e1a00005 mov r0, r5 <== NOT EXECUTED 3000639c: eb00028c bl 30006dd4 <_Thread_Stack_Free> <== NOT EXECUTED 300063a0: e1a00006 mov r0, r6 300063a4: 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 ) { 300063a8: e3560000 cmp r6, #0 ; 0x0 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 300063ac: 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 ) { 300063b0: 0a00000a beq 300063e0 <_Thread_Initialize+0x100> 300063b4: e3a02000 mov r2, #0 ; 0x0 uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 300063b8: e59f00c0 ldr r0, [pc, #192] ; 30006480 <_Thread_Initialize+0x1a0> the_thread->extensions[i] = NULL; 300063bc: e1a01002 mov r1, r2 300063c0: ea000002 b 300063d0 <_Thread_Initialize+0xf0> 300063c4: e5953110 ldr r3, [r5, #272] 300063c8: e7831102 str r1, [r3, r2, lsl #2] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 300063cc: e2822001 add r2, r2, #1 ; 0x1 300063d0: e5903000 ldr r3, [r0] 300063d4: e2833001 add r3, r3, #1 ; 0x1 300063d8: e1520003 cmp r2, r3 300063dc: 3afffff8 bcc 300063c4 <_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; 300063e0: e59d3030 ldr r3, [sp, #48] switch ( budget_algorithm ) { 300063e4: 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; 300063e8: 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; 300063ec: 059f3090 ldreq r3, [pc, #144] ; 30006484 <_Thread_Initialize+0x1a4> } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 300063f0: e3a04000 mov r4, #0 ; 0x0 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; 300063f4: 05933000 ldreq r3, [r3] /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 300063f8: e5c570ac strb r7, [r5, #172] 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; 300063fc: 05853078 streq r3, [r5, #120] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 30006400: e59d3034 ldr r3, [sp, #52] the_thread->current_state = STATES_DORMANT; 30006404: e3a07001 mov r7, #1 ; 0x1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 30006408: 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 ); 3000640c: e1a01008 mov r1, r8 30006410: e1a00005 mov r0, r5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 30006414: e585a0b0 str sl, [r5, #176] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 30006418: e5857010 str r7, [r5, #16] the_thread->Wait.queue = NULL; 3000641c: e5854044 str r4, [r5, #68] the_thread->resource_count = 0; 30006420: e585401c str r4, [r5, #28] the_thread->suspend_count = 0; 30006424: e5854070 str r4, [r5, #112] the_thread->real_priority = priority; 30006428: e5858018 str r8, [r5, #24] the_thread->Start.initial_priority = priority; 3000642c: e58580bc str r8, [r5, #188] _Thread_Set_priority( the_thread, priority ); 30006430: eb0001b6 bl 30006b10 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 30006434: e1d530b8 ldrh r3, [r5, #8] 30006438: 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; 3000643c: e5854088 str r4, [r5, #136] 30006440: e7825103 str r5, [r2, r3, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 30006444: 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 ); 30006448: e1a00005 mov r0, r5 3000644c: 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; 30006450: 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 ); 30006454: eb000362 bl 300071e4 <_User_extensions_Thread_create> if ( !extension_status ) { 30006458: e1500004 cmp r0, r4 3000645c: 11a00007 movne r0, r7 30006460: 18bd87f0 popne {r4, r5, r6, r7, r8, r9, sl, pc} if ( extensions_area ) 30006464: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 30006468: 11a00006 movne r0, r6 <== NOT EXECUTED 3000646c: 1b000450 blne 300075b4 <_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 ); 30006470: e1a00005 mov r0, r5 <== NOT EXECUTED 30006474: eb000256 bl 30006dd4 <_Thread_Stack_Free> <== NOT EXECUTED 30006478: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return FALSE; } return TRUE; } 3000647c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 30006480: 30016304 .word 0x30016304 30006484: 30016224 .word 0x30016224 30007748 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 30007748: e5903010 ldr r3, [r0, #16] bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 3000774c: e92d4070 push {r4, r5, r6, lr} if ( !_States_Is_dormant( the_thread->current_state ) ) { 30007750: e3130001 tst r3, #1 ; 0x1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 30007754: e1a04000 mov r4, r0 30007758: e1a06001 mov r6, r1 3000775c: e1a05002 mov r5, r2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 30007760: 13a00000 movne r0, #0 ; 0x0 30007764: 18bd8070 popne {r4, r5, r6, pc} _Thread_Set_transient( the_thread ); 30007768: eb000083 bl 3000797c <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 3000776c: e1a01006 mov r1, r6 30007770: e1a02005 mov r2, r5 30007774: e1a00004 mov r0, r4 30007778: eb000eb0 bl 3000b240 <_Thread_Reset> _Thread_Load_environment( the_thread ); 3000777c: e1a00004 mov r0, r4 30007780: eb000dd0 bl 3000aec8 <_Thread_Load_environment> _Thread_Ready( the_thread ); 30007784: e1a00004 mov r0, r4 30007788: eb000e69 bl 3000b134 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 3000778c: e1a00004 mov r0, r4 30007790: eb0001e7 bl 30007f34 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 30007794: e59f301c ldr r3, [pc, #28] ; 300077b8 <_Thread_Restart+0x70> 30007798: e5933000 ldr r3, [r3] 3000779c: e1540003 cmp r4, r3 300077a0: 13a00001 movne r0, #1 ; 0x1 300077a4: 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 ); 300077a8: e28400d0 add r0, r4, #208 ; 0xd0 300077ac: eb0002f0 bl 30008374 <_CPU_Context_restore> 300077b0: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return TRUE; } return FALSE; } 300077b4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 300077b8: 30019be4 .word 0x30019be4 3000847c <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 3000847c: e92d4030 push {r4, r5, lr} 30008480: e20110ff and r1, r1, #255 ; 0xff 30008484: e1a04000 mov r4, r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 30008488: e10f5000 mrs r5, CPSR 3000848c: e38530c0 orr r3, r5, #192 ; 0xc0 30008490: e129f003 msr CPSR_fc, r3 if ( force == TRUE ) 30008494: e3510000 cmp r1, #0 ; 0x0 the_thread->suspend_count = 0; else the_thread->suspend_count--; 30008498: 05903070 ldreq r3, [r0, #112] States_Control current_state; _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; 3000849c: 13a03000 movne r3, #0 ; 0x0 else the_thread->suspend_count--; 300084a0: 02433001 subeq r3, r3, #1 ; 0x1 300084a4: e5803070 str r3, [r0, #112] if ( the_thread->suspend_count > 0 ) { 300084a8: e5903070 ldr r3, [r0, #112] 300084ac: e3530000 cmp r3, #0 ; 0x0 300084b0: 0a000001 beq 300084bc <_Thread_Resume+0x40> _ISR_Enable( level ); 300084b4: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 300084b8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return; } current_state = the_thread->current_state; 300084bc: e5903010 ldr r3, [r0, #16] if ( current_state & STATES_SUSPENDED ) { 300084c0: e3130002 tst r3, #2 ; 0x2 300084c4: 0a000028 beq 3000856c <_Thread_Resume+0xf0> 300084c8: e3c33002 bic r3, r3, #2 ; 0x2 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 300084cc: e3530000 cmp r3, #0 ; 0x0 return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 300084d0: e5803010 str r3, [r0, #16] the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 300084d4: 1a000024 bne 3000856c <_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; 300084d8: e5900090 ldr r0, [r0, #144] 300084dc: e1d429b6 ldrh r2, [r4, #150] 300084e0: e1d030b0 ldrh r3, [r0] _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 300084e4: e594108c ldr r1, [r4, #140] 300084e8: e1833002 orr r3, r3, r2 _Priority_Major_bit_map |= the_priority_map->ready_major; 300084ec: e59fc080 ldr ip, [pc, #128] ; 30008574 <_Thread_Resume+0xf8> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 300084f0: e1c030b0 strh r3, [r0] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 300084f4: e2813004 add r3, r1, #4 ; 0x4 300084f8: e5843000 str r3, [r4] _Priority_Major_bit_map |= the_priority_map->ready_major; 300084fc: e1d429b4 ldrh r2, [r4, #148] 30008500: e1dc30b0 ldrh r3, [ip] old_last_node = the_chain->last; 30008504: e5910008 ldr r0, [r1, #8] 30008508: e1833002 orr r3, r3, r2 the_chain->last = the_node; 3000850c: e5814008 str r4, [r1, #8] 30008510: e1cc30b0 strh r3, [ip] old_last_node->next = the_node; the_node->previous = old_last_node; 30008514: 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; 30008518: e5804000 str r4, [r0] _ISR_Flash( level ); 3000851c: e10f3000 mrs r3, CPSR 30008520: e129f005 msr CPSR_fc, r5 30008524: e129f003 msr CPSR_fc, r3 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 30008528: e59f1048 ldr r1, [pc, #72] ; 30008578 <_Thread_Resume+0xfc> 3000852c: e5942014 ldr r2, [r4, #20] 30008530: e5913000 ldr r3, [r1] 30008534: e5933014 ldr r3, [r3, #20] 30008538: e1520003 cmp r2, r3 3000853c: 2a00000a bcs 3000856c <_Thread_Resume+0xf0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 30008540: e59f3034 ldr r3, [pc, #52] ; 3000857c <_Thread_Resume+0x100> _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; 30008544: e5814000 str r4, [r1] if ( _Thread_Executing->is_preemptible || 30008548: e5933000 ldr r3, [r3] 3000854c: e5d33076 ldrb r3, [r3, #118] 30008550: e3530000 cmp r3, #0 ; 0x0 30008554: 1a000001 bne 30008560 <_Thread_Resume+0xe4> 30008558: e3520000 cmp r2, #0 ; 0x0 3000855c: 1a000002 bne 3000856c <_Thread_Resume+0xf0> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 30008560: e59f3018 ldr r3, [pc, #24] ; 30008580 <_Thread_Resume+0x104> 30008564: e3a02001 mov r2, #1 ; 0x1 30008568: e5c32000 strb r2, [r3] } } } _ISR_Enable( level ); 3000856c: e129f005 msr CPSR_fc, r5 30008570: e8bd8030 pop {r4, r5, pc} 30008574: 300228f8 .word 0x300228f8 30008578: 300228d0 .word 0x300228d0 3000857c: 30022904 .word 0x30022904 30008580: 30022914 .word 0x30022914 30006d68 <_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 ) { 30006d68: e59f305c ldr r3, [pc, #92] ; 30006dcc <_Thread_Stack_Allocate+0x64> size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 30006d6c: e92d4030 push {r4, r5, lr} * 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 ) { 30006d70: e5932000 ldr r2, [r3] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 30006d74: e59f3054 ldr r3, [pc, #84] ; 30006dd0 <_Thread_Stack_Allocate+0x68> * 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 ) { 30006d78: e5922020 ldr r2, [r2, #32] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 30006d7c: e5933000 ldr r3, [r3] 30006d80: e1a05000 mov r5, r0 30006d84: e1510003 cmp r1, r3 30006d88: 21a04001 movcs r4, r1 30006d8c: 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 ) { 30006d90: e3520000 cmp r2, #0 ; 0x0 30006d94: 0a000003 beq 30006da8 <_Thread_Stack_Allocate+0x40> stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 30006d98: e1a00004 mov r0, r4 <== NOT EXECUTED 30006d9c: e1a0e00f mov lr, pc <== NOT EXECUTED 30006da0: e12fff12 bx r2 <== NOT EXECUTED 30006da4: ea000002 b 30006db4 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 30006da8: 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 ); 30006dac: e1a00004 mov r0, r4 30006db0: eb000203 bl 300075c4 <_Workspace_Allocate> 30006db4: e1a03000 mov r3, r0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 30006db8: e3500000 cmp r0, #0 ; 0x0 30006dbc: 11a00004 movne r0, r4 30006dc0: 03a00000 moveq r0, #0 ; 0x0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 30006dc4: e58530cc str r3, [r5, #204] return the_stack_size; } 30006dc8: e8bd8030 pop {r4, r5, pc} 30006dcc: 300162fc .word 0x300162fc 30006dd0: 30015420 .word 0x30015420 30006dd4 <_Thread_Stack_Free>: { /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 30006dd4: e5d030c0 ldrb r3, [r0, #192] */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 30006dd8: 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 ) 30006ddc: e3530000 cmp r3, #0 ; 0x0 30006de0: 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 ) 30006de4: e59f3028 ldr r3, [pc, #40] ; 30006e14 <_Thread_Stack_Free+0x40> 30006de8: e5933000 ldr r3, [r3] 30006dec: e5933024 ldr r3, [r3, #36] 30006df0: e3530000 cmp r3, #0 ; 0x0 30006df4: 0a000003 beq 30006e08 <_Thread_Stack_Free+0x34> (*_Configuration_Table->stack_free_hook)( 30006df8: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 30006dfc: e1a0e00f mov lr, pc <== NOT EXECUTED 30006e00: e12fff13 bx r3 <== NOT EXECUTED 30006e04: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 30006e08: e59000c8 ldr r0, [r0, #200] } 30006e0c: 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 ); 30006e10: ea0001e7 b 300075b4 <_Workspace_Free> 30006e14: 300162fc .word 0x300162fc 300067a8 <_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 ) { 300067a8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 300067ac: e1a0c001 mov ip, r1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 300067b0: e5915014 ldr r5, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 300067b4: e281303c add r3, r1, #60 ; 0x3c 300067b8: e58c3038 str r3, [ip, #56] the_chain->permanent_null = NULL; 300067bc: e3a03000 mov r3, #0 ; 0x0 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 300067c0: e1a04325 lsr r4, r5, #6 300067c4: e58c303c str r3, [ip, #60] header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 300067c8: e283300c add r3, r3, #12 ; 0xc 300067cc: e0260493 mla r6, r3, r4, r0 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 300067d0: e3150020 tst r5, #32 ; 0x20 the_chain->last = _Chain_Head(the_chain); 300067d4: e2811038 add r1, r1, #56 ; 0x38 300067d8: 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 ) { 300067dc: 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; 300067e0: e5908038 ldr r8, [r0, #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; 300067e4: 159fa19c ldrne sl, [pc, #412] ; 30006988 <_Thread_queue_Enqueue_priority+0x1e0> _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 300067e8: 12864008 addne r4, 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 ) ) 300067ec: 1a00002d bne 300068a8 <_Thread_queue_Enqueue_priority+0x100> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 300067f0: e3a03003 mov r3, #3 ; 0x3 300067f4: e0030394 mul r3, r4, r3 300067f8: e2833001 add r3, r3, #1 ; 0x1 300067fc: e0804103 add r4, r0, r3, lsl #2 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 30006800: 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 ); 30006804: e10f6000 mrs r6, CPSR 30006808: e38630c0 orr r3, r6, #192 ; 0xc0 3000680c: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->first; 30006810: e3e02000 mvn r2, #0 ; 0x0 30006814: e5971000 ldr r1, [r7] 30006818: ea000011 b 30006864 <_Thread_queue_Enqueue_priority+0xbc> while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 3000681c: e5912014 ldr r2, [r1, #20] if ( priority <= search_priority ) 30006820: e1550002 cmp r5, r2 30006824: 9a000010 bls 3000686c <_Thread_queue_Enqueue_priority+0xc4> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 30006828: e5911000 ldr r1, [r1] if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 3000682c: e1510004 cmp r1, r4 30006830: 0a00000d beq 3000686c <_Thread_queue_Enqueue_priority+0xc4> break; search_priority = search_thread->current_priority; 30006834: e5912014 ldr r2, [r1, #20] if ( priority <= search_priority ) 30006838: e1550002 cmp r5, r2 3000683c: 9a00000a bls 3000686c <_Thread_queue_Enqueue_priority+0xc4> break; #endif _ISR_Flash( level ); 30006840: e10f3000 mrs r3, CPSR 30006844: e129f006 msr CPSR_fc, r6 30006848: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 3000684c: e5913010 ldr r3, [r1, #16] 30006850: e1180003 tst r8, r3 30006854: 1a000001 bne 30006860 <_Thread_queue_Enqueue_priority+0xb8> _ISR_Enable( level ); 30006858: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 3000685c: eaffffe8 b 30006804 <_Thread_queue_Enqueue_priority+0x5c> <== NOT EXECUTED goto restart_forward_search; } search_thread = 30006860: 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 ) ) { 30006864: e1510004 cmp r1, r4 30006868: 1affffeb bne 3000681c <_Thread_queue_Enqueue_priority+0x74> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 3000686c: e5903030 ldr r3, [r0, #48] 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 ) ) { 30006870: e1a04006 mov r4, r6 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 30006874: e3530001 cmp r3, #1 ; 0x1 30006878: 1a00003f bne 3000697c <_Thread_queue_Enqueue_priority+0x1d4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 3000687c: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 30006880: 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; 30006884: e5803030 str r3, [r0, #48] if ( priority == search_priority ) 30006888: 0a000031 beq 30006954 <_Thread_queue_Enqueue_priority+0x1ac> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 3000688c: e5913004 ldr r3, [r1, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 30006890: 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; 30006894: e58c0044 str r0, [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; 30006898: e583c000 str ip, [r3] search_node->previous = the_node; 3000689c: e581c004 str ip, [r1, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 300068a0: e129f006 msr CPSR_fc, r6 300068a4: ea000032 b 30006974 <_Thread_queue_Enqueue_priority+0x1cc> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 300068a8: e5da3000 ldrb r3, [sl] 300068ac: e2832001 add r2, r3, #1 ; 0x1 _ISR_Disable( level ); 300068b0: e10f7000 mrs r7, CPSR 300068b4: e38730c0 orr r3, r7, #192 ; 0xc0 300068b8: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->last; 300068bc: e5941000 ldr r1, [r4] 300068c0: ea000011 b 3000690c <_Thread_queue_Enqueue_priority+0x164> while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 300068c4: e5912014 ldr r2, [r1, #20] if ( priority >= search_priority ) 300068c8: e1550002 cmp r5, r2 300068cc: 2a000010 bcs 30006914 <_Thread_queue_Enqueue_priority+0x16c> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 300068d0: e5911004 ldr r1, [r1, #4] if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 300068d4: e1510006 cmp r1, r6 300068d8: 0a00000d beq 30006914 <_Thread_queue_Enqueue_priority+0x16c> break; search_priority = search_thread->current_priority; 300068dc: e5912014 ldr r2, [r1, #20] if ( priority >= search_priority ) 300068e0: e1550002 cmp r5, r2 300068e4: 2a00000a bcs 30006914 <_Thread_queue_Enqueue_priority+0x16c> break; #endif _ISR_Flash( level ); 300068e8: e10f3000 mrs r3, CPSR 300068ec: e129f007 msr CPSR_fc, r7 300068f0: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 300068f4: e5913010 ldr r3, [r1, #16] 300068f8: e1180003 tst r8, r3 300068fc: 1a000001 bne 30006908 <_Thread_queue_Enqueue_priority+0x160> _ISR_Enable( level ); 30006900: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 30006904: eaffffe7 b 300068a8 <_Thread_queue_Enqueue_priority+0x100> <== NOT EXECUTED goto restart_reverse_search; } search_thread = (Thread_Control *) 30006908: 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 ) ) { 3000690c: e1510006 cmp r1, r6 30006910: 1affffeb bne 300068c4 <_Thread_queue_Enqueue_priority+0x11c> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 30006914: e5903030 ldr r3, [r0, #48] 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 ) ) { 30006918: e1a04007 mov r4, r7 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 3000691c: e3530001 cmp r3, #1 ; 0x1 30006920: 1a000015 bne 3000697c <_Thread_queue_Enqueue_priority+0x1d4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30006924: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 30006928: 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; 3000692c: e5803030 str r3, [r0, #48] if ( priority == search_priority ) 30006930: 0a000007 beq 30006954 <_Thread_queue_Enqueue_priority+0x1ac> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 30006934: e5913000 ldr r3, [r1] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 30006938: 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; 3000693c: 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; 30006940: e58c0044 str r0, [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; 30006944: e581c000 str ip, [r1] next_node->previous = the_node; 30006948: e583c004 str ip, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 3000694c: e129f007 msr CPSR_fc, r7 30006950: ea000007 b 30006974 <_Thread_queue_Enqueue_priority+0x1cc> 30006954: 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; 30006958: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 3000695c: e58c3000 str r3, [ip] the_node->previous = previous_node; 30006960: e58c2004 str r2, [ip, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006964: e58c0044 str r0, [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; 30006968: e582c000 str ip, [r2] search_node->previous = the_node; 3000696c: e583c004 str ip, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 30006970: e129f004 msr CPSR_fc, r4 30006974: e3a00001 mov r0, #1 ; 0x1 30006978: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; 3000697c: e5900030 ldr r0, [r0, #48] <== NOT EXECUTED * 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; 30006980: e5894000 str r4, [r9] <== NOT EXECUTED return the_thread_queue->sync_state; } 30006984: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 30006988: 30015424 .word 0x30015424 3000b20c <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 3000b20c: e92d4010 push {r4, lr} 3000b210: e1a04001 mov r4, r1 ISR_Level level; _ISR_Disable( level ); 3000b214: e10f0000 mrs r0, CPSR 3000b218: e38030c0 orr r3, r0, #192 ; 0xc0 3000b21c: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 3000b220: e59f3064 ldr r3, [pc, #100] ; 3000b28c <_Thread_queue_Extract_fifo+0x80> 3000b224: e5912010 ldr r2, [r1, #16] 3000b228: e0023003 and r3, r2, r3 3000b22c: e3530000 cmp r3, #0 ; 0x0 3000b230: 1a000001 bne 3000b23c <_Thread_queue_Extract_fifo+0x30> _ISR_Enable( level ); 3000b234: 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 } 3000b238: 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 ) ) { 3000b23c: e5913050 ldr r3, [r1, #80] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 3000b240: e5942004 ldr r2, [r4, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 3000b244: e5911000 ldr r1, [r1] 3000b248: e3530002 cmp r3, #2 ; 0x2 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 3000b24c: e3a03000 mov r3, #0 ; 0x0 previous = the_node->previous; next->previous = previous; previous->next = next; 3000b250: e5821000 str r1, [r2] 3000b254: e5843044 str r3, [r4, #68] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 3000b258: e5812004 str r2, [r1, #4] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000b25c: 0a000001 beq 3000b268 <_Thread_queue_Extract_fifo+0x5c> _ISR_Enable( level ); 3000b260: e129f000 msr CPSR_fc, r0 3000b264: ea000004 b 3000b27c <_Thread_queue_Extract_fifo+0x70> 3000b268: e3a03003 mov r3, #3 ; 0x3 3000b26c: e5843050 str r3, [r4, #80] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 3000b270: e129f000 msr CPSR_fc, r0 (void) _Watchdog_Remove( &the_thread->Timer ); 3000b274: e2840048 add r0, r4, #72 ; 0x48 3000b278: ebfff07f bl 3000747c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3000b27c: e59f100c ldr r1, [pc, #12] ; 3000b290 <_Thread_queue_Extract_fifo+0x84> 3000b280: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 3000b284: e8bd4010 pop {r4, lr} 3000b288: eaffeae2 b 30005e18 <_Thread_Clear_state> 3000b28c: 0003bee0 .word 0x0003bee0 3000b290: 1003fff8 .word 0x1003fff8 3000a28c <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 3000a28c: e92d4070 push {r4, r5, r6, lr} 3000a290: e1a04001 mov r4, r1 3000a294: 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 ); 3000a298: e10fc000 mrs ip, CPSR 3000a29c: e38c30c0 orr r3, ip, #192 ; 0xc0 3000a2a0: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 3000a2a4: e59f30b4 ldr r3, [pc, #180] ; 3000a360 <_Thread_queue_Extract_priority_helper+0xd4> 3000a2a8: e5912010 ldr r2, [r1, #16] 3000a2ac: e0023003 and r3, r2, r3 3000a2b0: e3530000 cmp r3, #0 ; 0x0 3000a2b4: 1a000001 bne 3000a2c0 <_Thread_queue_Extract_priority_helper+0x34> _ISR_Enable( level ); 3000a2b8: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 3000a2bc: 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)); 3000a2c0: e5911038 ldr r1, [r1, #56] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 3000a2c4: e284303c add r3, r4, #60 ; 0x3c 3000a2c8: e1510003 cmp r1, r3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 3000a2cc: 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; 3000a2d0: 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; 3000a2d4: 05832000 streq r2, [r3] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 3000a2d8: 0a00000e beq 3000a318 <_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; 3000a2dc: e5945040 ldr r5, [r4, #64] new_second_node = new_first_node->next; 3000a2e0: e5910000 ldr r0, [r1] previous_node->next = new_first_node; next_node->previous = new_first_node; 3000a2e4: 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; 3000a2e8: e5831000 str r1, [r3] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 3000a2ec: e881000c stm r1, {r2, r3} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 3000a2f0: e5942038 ldr r2, [r4, #56] 3000a2f4: e5943040 ldr r3, [r4, #64] 3000a2f8: e1520003 cmp r2, r3 3000a2fc: 0a000005 beq 3000a318 <_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 ); 3000a300: 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 = 3000a304: e2813038 add r3, r1, #56 ; 0x38 3000a308: e5803004 str r3, [r0, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 3000a30c: e5810038 str r0, [r1, #56] new_first_thread->Wait.Block2n.last = last_node; 3000a310: e5815040 str r5, [r1, #64] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 3000a314: e5852000 str r2, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 3000a318: e3560000 cmp r6, #0 ; 0x0 3000a31c: 0a000001 beq 3000a328 <_Thread_queue_Extract_priority_helper+0x9c> _ISR_Enable( level ); 3000a320: e129f00c msr CPSR_fc, ip 3000a324: e8bd8070 pop {r4, r5, r6, pc} return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000a328: e5943050 ldr r3, [r4, #80] 3000a32c: e3530002 cmp r3, #2 ; 0x2 3000a330: 0a000001 beq 3000a33c <_Thread_queue_Extract_priority_helper+0xb0> _ISR_Enable( level ); 3000a334: e129f00c msr CPSR_fc, ip 3000a338: ea000004 b 3000a350 <_Thread_queue_Extract_priority_helper+0xc4> 3000a33c: e3a03003 mov r3, #3 ; 0x3 3000a340: e5843050 str r3, [r4, #80] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 3000a344: e129f00c msr CPSR_fc, ip (void) _Watchdog_Remove( &the_thread->Timer ); 3000a348: e2840048 add r0, r4, #72 ; 0x48 3000a34c: ebfff44a bl 3000747c <_Watchdog_Remove> 3000a350: e59f100c ldr r1, [pc, #12] ; 3000a364 <_Thread_queue_Extract_priority_helper+0xd8> 3000a354: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 3000a358: e8bd4070 pop {r4, r5, r6, lr} 3000a35c: eaffeead b 30005e18 <_Thread_Clear_state> 3000a360: 0003bee0 .word 0x0003bee0 3000a364: 1003fff8 .word 0x1003fff8 3000b734 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 3000b734: e92d4010 push {r4, lr} 3000b738: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); 3000b73c: eb00122d bl 3000fff8 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 3000b740: e5943024 ldr r3, [r4, #36] 3000b744: e3530000 cmp r3, #0 ; 0x0 3000b748: 08bd8010 popeq {r4, pc} _Chain_Extract( &the_extension->Switch.Node ); 3000b74c: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED } 3000b750: 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 ); 3000b754: ea001227 b 3000fff8 <_Chain_Extract> <== NOT EXECUTED 3000730c <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 3000730c: e59f30fc ldr r3, [pc, #252] ; 30007410 <_Watchdog_Insert+0x104> void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 30007310: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30007314: e1a0c001 mov ip, r1 30007318: e1a06000 mov r6, r0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 3000731c: e5934000 ldr r4, [r3] _ISR_Disable( level ); 30007320: e10f5000 mrs r5, CPSR 30007324: e38530c0 orr r3, r5, #192 ; 0xc0 30007328: 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 ) { 3000732c: e5913008 ldr r3, [r1, #8] 30007330: e3530000 cmp r3, #0 ; 0x0 30007334: 0a000001 beq 30007340 <_Watchdog_Insert+0x34> _ISR_Enable( level ); 30007338: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 3000733c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 30007340: e59f30cc ldr r3, [pc, #204] ; 30007414 <_Watchdog_Insert+0x108> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 30007344: e59f70cc ldr r7, [pc, #204] ; 30007418 <_Watchdog_Insert+0x10c> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 30007348: e5932000 ldr r2, [r3] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 3000734c: e1a08007 mov r8, r7 _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 30007350: e2822001 add r2, r2, #1 ; 0x1 30007354: e5832000 str r2, [r3] if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 30007358: e3a03001 mov r3, #1 ; 0x1 3000735c: e5813008 str r3, [r1, #8] _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 30007360: 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 ; 30007364: e5961000 ldr r1, [r6] ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 30007368: e3500000 cmp r0, #0 ; 0x0 3000736c: 0a000014 beq 300073c4 <_Watchdog_Insert+0xb8> 30007370: e5913000 ldr r3, [r1] 30007374: e3530000 cmp r3, #0 ; 0x0 30007378: 0a000011 beq 300073c4 <_Watchdog_Insert+0xb8> break; if ( delta_interval < after->delta_interval ) { 3000737c: e5912010 ldr r2, [r1, #16] 30007380: e1500002 cmp r0, r2 after->delta_interval -= delta_interval; 30007384: 30603002 rsbcc r3, r0, r2 30007388: 35813010 strcc r3, [r1, #16] 3000738c: 3a00000c bcc 300073c4 <_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 ); 30007390: e10f3000 mrs r3, CPSR 30007394: e129f005 msr CPSR_fc, r5 30007398: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 3000739c: e59c3008 ldr r3, [ip, #8] if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 300073a0: e0620000 rsb r0, r2, r0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 300073a4: e3530001 cmp r3, #1 ; 0x1 300073a8: 1a000010 bne 300073f0 <_Watchdog_Insert+0xe4> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 300073ac: e5973000 ldr r3, [r7] 300073b0: e1530004 cmp r3, r4 _Watchdog_Sync_level = insert_isr_nest_level; 300073b4: 85884000 strhi r4, [r8] 300073b8: 8affffe8 bhi 30007360 <_Watchdog_Insert+0x54> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 300073bc: e5911000 ldr r1, [r1] 300073c0: eaffffe8 b 30007368 <_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; 300073c4: e59f3050 ldr r3, [pc, #80] ; 3000741c <_Watchdog_Insert+0x110> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 300073c8: e5912004 ldr r2, [r1, #4] the_watchdog->start_time = _Watchdog_Ticks_since_boot; 300073cc: e5933000 ldr r3, [r3] ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 300073d0: e5921000 ldr r1, [r2] 300073d4: e58c3014 str r3, [ip, #20] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 300073d8: e3a03002 mov r3, #2 ; 0x2 after_node->next = the_node; 300073dc: e582c000 str ip, [r2] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 300073e0: e98c000c stmib ip, {r2, r3} } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 300073e4: 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; 300073e8: 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; 300073ec: 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; 300073f0: e59f3020 ldr r3, [pc, #32] ; 30007418 <_Watchdog_Insert+0x10c> _Watchdog_Sync_count--; 300073f4: e59f2018 ldr r2, [pc, #24] ; 30007414 <_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; 300073f8: e5834000 str r4, [r3] _Watchdog_Sync_count--; 300073fc: e5923000 ldr r3, [r2] 30007400: e2433001 sub r3, r3, #1 ; 0x1 30007404: e5823000 str r3, [r2] _ISR_Enable( level ); 30007408: e129f005 msr CPSR_fc, r5 3000740c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30007410: 30016300 .word 0x30016300 30007414: 300163c0 .word 0x300163c0 30007418: 30016320 .word 0x30016320 3000741c: 300163c4 .word 0x300163c4 300075fc <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 300075fc: e92d4030 push {r4, r5, lr} uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 30007600: e2504000 subs r4, r0, #0 ; 0x0 */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 30007604: e1a05001 mov r5, r1 uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 30007608: 0a000001 beq 30007614 <_Workspace_Handler_initialization+0x18> 3000760c: e2141003 ands r1, r4, #3 ; 0x3 30007610: 0a000003 beq 30007624 <_Workspace_Handler_initialization+0x28> _Internal_error_Occurred( 30007614: e3a00000 mov r0, #0 ; 0x0 30007618: e3a01001 mov r1, #1 ; 0x1 3000761c: e3a02002 mov r2, #2 ; 0x2 30007620: ea00000e b 30007660 <_Workspace_Handler_initialization+0x64> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 30007624: e59f3038 ldr r3, [pc, #56] ; 30007664 <_Workspace_Handler_initialization+0x68> 30007628: e5933000 ldr r3, [r3] 3000762c: e5d33028 ldrb r3, [r3, #40] 30007630: e3530000 cmp r3, #0 ; 0x0 memset( starting_address, 0, size ); 30007634: 11a02005 movne r2, r5 30007638: 1b00114b blne 3000bb6c memory_available = _Heap_Initialize( 3000763c: e1a01004 mov r1, r4 30007640: e1a02005 mov r2, r5 30007644: e59f001c ldr r0, [pc, #28] ; 30007668 <_Workspace_Handler_initialization+0x6c> 30007648: e3a03004 mov r3, #4 ; 0x4 3000764c: ebfff703 bl 30005260 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 30007650: e3500000 cmp r0, #0 ; 0x0 30007654: 18bd8030 popne {r4, r5, pc} _Internal_error_Occurred( 30007658: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3000765c: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 30007660: ebfff784 bl 30005478 <_Internal_error_Occurred> 30007664: 300162fc .word 0x300162fc 30007668: 3001628c .word 0x3001628c 3001e4fc : int killinfo( pid_t pid, int sig, const union sigval *value ) { 3001e4fc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 3001e500: e24dd00c sub sp, sp, #12 ; 0xc 3001e504: e1a04000 mov r4, r0 3001e508: e1a06001 mov r6, r1 3001e50c: e1a05002 mov r5, r2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 3001e510: ebffff3f bl 3001e214 3001e514: e1540000 cmp r4, r0 3001e518: 0a000002 beq 3001e528 rtems_set_errno_and_return_minus_one( ESRCH ); 3001e51c: ebffd438 bl 30013604 <__errno> 3001e520: e3a03003 mov r3, #3 ; 0x3 3001e524: ea000003 b 3001e538 /* * Validate the signal passed. */ if ( !sig ) 3001e528: e3560000 cmp r6, #0 ; 0x0 3001e52c: 1a000004 bne 3001e544 rtems_set_errno_and_return_minus_one( EINVAL ); 3001e530: ebffd433 bl 30013604 <__errno> 3001e534: e3a03016 mov r3, #22 ; 0x16 3001e538: e5803000 str r3, [r0] 3001e53c: e3e00000 mvn r0, #0 ; 0x0 3001e540: ea000089 b 3001e76c if ( !is_valid_signo(sig) ) 3001e544: e2460001 sub r0, r6, #1 ; 0x1 3001e548: e350001f cmp r0, #31 ; 0x1f 3001e54c: 8afffff7 bhi 3001e530 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 3001e550: e59f321c ldr r3, [pc, #540] ; 3001e774 3001e554: e3a0200c mov r2, #12 ; 0xc 3001e558: e0233692 mla r3, r2, r6, r3 3001e55c: e5933008 ldr r3, [r3, #8] 3001e560: e3530001 cmp r3, #1 ; 0x1 3001e564: 0a00007f beq 3001e768 * 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 ) ) 3001e568: e3560004 cmp r6, #4 ; 0x4 3001e56c: 13560008 cmpne r6, #8 ; 0x8 3001e570: 0a000001 beq 3001e57c 3001e574: e356000b cmp r6, #11 ; 0xb 3001e578: 1a000003 bne 3001e58c return pthread_kill( pthread_self(), sig ); 3001e57c: eb000118 bl 3001e9e4 3001e580: e1a01006 mov r1, r6 3001e584: eb0000db bl 3001e8f8 3001e588: ea000077 b 3001e76c mask = signo_to_mask( sig ); 3001e58c: e3a03001 mov r3, #1 ; 0x1 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { 3001e590: e3550000 cmp r5, #0 ; 0x0 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 3001e594: e58d3004 str r3, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 3001e598: e58d6000 str r6, [sp] */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); mask = signo_to_mask( sig ); 3001e59c: e1a07013 lsl r7, r3, r0 3001e5a0: e59f21d0 ldr r2, [pc, #464] ; 3001e778 siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 3001e5a4: 15953000 ldrne r3, [r5] siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 3001e5a8: 058d5008 streq r5, [sp, #8] } else { siginfo->si_value = *value; 3001e5ac: 158d3008 strne r3, [sp, #8] 3001e5b0: e5923000 ldr r3, [r2] 3001e5b4: e2833001 add r3, r3, #1 ; 0x1 3001e5b8: 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; 3001e5bc: e59f31b8 ldr r3, [pc, #440] ; 3001e77c 3001e5c0: e5930000 ldr r0, [r3] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 3001e5c4: e5903108 ldr r3, [r0, #264] 3001e5c8: e59330c4 ldr r3, [r3, #196] 3001e5cc: e1d73003 bics r3, r7, r3 3001e5d0: 1a000046 bne 3001e6f0 goto process_it; 3001e5d4: e59f11a4 ldr r1, [pc, #420] ; 3001e780 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 3001e5d8: e2814030 add r4, r1, #48 ; 0x30 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 3001e5dc: e1a0c001 mov ip, r1 3001e5e0: e49c2004 ldr r2, [ip], #4 3001e5e4: ea000008 b 3001e60c 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)) { 3001e5e8: e5923030 ldr r3, [r2, #48] for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 3001e5ec: e592e108 ldr lr, [r2, #264] if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 3001e5f0: 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; 3001e5f4: e1a00002 mov r0, r2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 3001e5f8: 1a00003c bne 3001e6f0 3001e5fc: e59e30c4 ldr r3, [lr, #196] <== NOT EXECUTED 3001e600: e1d73003 bics r3, r7, r3 <== NOT EXECUTED 3001e604: 1a000039 bne 3001e6f0 <== 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 ) { 3001e608: 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 ) ; 3001e60c: e152000c cmp r2, ip 3001e610: 1afffff4 bne 3001e5e8 3001e614: 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 ; 3001e618: e1510004 cmp r1, r4 3001e61c: 1affffee bne 3001e5dc * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 3001e620: e59f315c ldr r3, [pc, #348] ; 3001e784 3001e624: e59f415c ldr r4, [pc, #348] ; 3001e788 3001e628: e5d33000 ldrb r3, [r3] 3001e62c: e3a00000 mov r0, #0 ; 0x0 3001e630: e2835001 add r5, r3, #1 ; 0x1 for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 3001e634: 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 ] ) 3001e638: e5943008 ldr r3, [r4, #8] 3001e63c: e3530000 cmp r3, #0 ; 0x0 3001e640: 0a000025 beq 3001e6dc continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 3001e644: 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 ) 3001e648: e3530000 cmp r3, #0 ; 0x0 continue; maximum = the_info->maximum; object_table = the_info->local_table; 3001e64c: 1593a01c ldrne sl, [r3, #28] * structure for a particular manager may not be installed. */ if ( !the_info ) continue; maximum = the_info->maximum; 3001e650: 11d381b0 ldrhne r8, [r3, #16] object_table = the_info->local_table; 3001e654: 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 ) 3001e658: 1a00001d bne 3001e6d4 3001e65c: ea00001e b 3001e6dc <== 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 ]; 3001e660: e79a210e ldr r2, [sl, lr, lsl #2] if ( !the_thread ) 3001e664: e3520000 cmp r2, #0 ; 0x0 3001e668: 0a000014 beq 3001e6c0 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 3001e66c: e592c014 ldr ip, [r2, #20] 3001e670: e15c0005 cmp ip, r5 3001e674: 8a000011 bhi 3001e6c0 /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 3001e678: e5923108 ldr r3, [r2, #264] if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 3001e67c: e3530000 cmp r3, #0 ; 0x0 3001e680: 0a00000e beq 3001e6c0 3001e684: e59330c4 ldr r3, [r3, #196] 3001e688: e1d73003 bics r3, r7, r3 3001e68c: 0a00000b beq 3001e6c0 * 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 ) { 3001e690: e15c0005 cmp ip, r5 3001e694: 3a00000b bcc 3001e6c8 * 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 ) ) 3001e698: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED 3001e69c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 3001e6a0: 0a000006 beq 3001e6c0 <== 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 ) ) { 3001e6a4: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 3001e6a8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001e6ac: 0a000005 beq 3001e6c8 <== 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 ) 3001e6b0: e3110201 tst r1, #268435456 ; 0x10000000 <== NOT EXECUTED 3001e6b4: 1a000001 bne 3001e6c0 <== 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 ) { 3001e6b8: e3130201 tst r3, #268435456 ; 0x10000000 <== NOT EXECUTED 3001e6bc: 1a000001 bne 3001e6c8 <== NOT EXECUTED 3001e6c0: e1a0c005 mov ip, r5 3001e6c4: ea000000 b 3001e6cc 3001e6c8: e1a00002 mov r0, r2 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 3001e6cc: e28ee001 add lr, lr, #1 ; 0x1 3001e6d0: e1a0500c mov r5, ip 3001e6d4: e15e0008 cmp lr, r8 3001e6d8: 9affffe0 bls 3001e660 3001e6dc: 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; 3001e6e0: e1540009 cmp r4, r9 3001e6e4: 1affffd3 bne 3001e638 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 3001e6e8: e3500000 cmp r0, #0 ; 0x0 3001e6ec: 0a000006 beq 3001e70c * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 3001e6f0: e3a03001 mov r3, #1 ; 0x1 3001e6f4: 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 ) ) { 3001e6f8: e1a01006 mov r1, r6 3001e6fc: e1a0200d mov r2, sp 3001e700: eb000035 bl 3001e7dc <_POSIX_signals_Unblock_thread> 3001e704: e3500000 cmp r0, #0 ; 0x0 3001e708: 1a000015 bne 3001e764 /* * 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 ); 3001e70c: e1a00007 mov r0, r7 3001e710: eb00001f bl 3001e794 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 3001e714: e3a0300c mov r3, #12 ; 0xc 3001e718: e0040693 mul r4, r3, r6 3001e71c: e59f3050 ldr r3, [pc, #80] ; 3001e774 3001e720: e7933004 ldr r3, [r3, r4] 3001e724: e3530002 cmp r3, #2 ; 0x2 3001e728: 1a00000d bne 3001e764 psiginfo = (POSIX_signals_Siginfo_node *) 3001e72c: e59f0058 ldr r0, [pc, #88] ; 3001e78c 3001e730: ebffaac0 bl 30009238 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 3001e734: e250c000 subs ip, r0, #0 ; 0x0 3001e738: 1a000002 bne 3001e748 rtems_set_errno_and_return_minus_one( EAGAIN ); 3001e73c: ebffd3b0 bl 30013604 <__errno> <== NOT EXECUTED 3001e740: e3a0300b mov r3, #11 ; 0xb <== NOT EXECUTED 3001e744: eaffff7b b 3001e538 <== NOT EXECUTED } psiginfo->Info = *siginfo; 3001e748: e28c3008 add r3, ip, #8 ; 0x8 3001e74c: e89d0007 ldm sp, {r0, r1, r2} 3001e750: e8830007 stm r3, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 3001e754: e59f0034 ldr r0, [pc, #52] ; 3001e790 3001e758: e1a0100c mov r1, ip 3001e75c: e0800004 add r0, r0, r4 3001e760: ebffaaa9 bl 3000920c <_Chain_Append> } _Thread_Enable_dispatch(); 3001e764: ebffb006 bl 3000a784 <_Thread_Enable_dispatch> 3001e768: e3a00000 mov r0, #0 ; 0x0 return 0; } 3001e76c: e28dd00c add sp, sp, #12 ; 0xc 3001e770: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 3001e774: 300249ac .word 0x300249ac 3001e778: 300243ec .word 0x300243ec 3001e77c: 300244a4 .word 0x300244a4 3001e780: 30024b38 .word 0x30024b38 3001e784: 30022460 .word 0x30022460 3001e788: 300243a8 .word 0x300243a8 3001e78c: 30024b2c .word 0x30024b2c 3001e790: 30024b7c .word 0x30024b7c 3000f1cc : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 3000f1cc: e92d4070 push {r4, r5, r6, lr} 3000f1d0: e1a06001 mov r6, r1 3000f1d4: e1a04000 mov r4, r0 Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 3000f1d8: eb0006fb bl 30010dcc <_Timespec_Is_valid> 3000f1dc: e3500000 cmp r0, #0 ; 0x0 3000f1e0: 0a000005 beq 3000f1fc * 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 ) 3000f1e4: e5943000 ldr r3, [r4] 3000f1e8: e3530000 cmp r3, #0 ; 0x0 3000f1ec: ba000002 blt 3000f1fc 3000f1f0: e5943004 ldr r3, [r4, #4] 3000f1f4: e3530000 cmp r3, #0 ; 0x0 3000f1f8: aa000002 bge 3000f208 rtems_set_errno_and_return_minus_one( EINVAL ); 3000f1fc: eb001100 bl 30013604 <__errno> 3000f200: e3a03016 mov r3, #22 ; 0x16 3000f204: ea000031 b 3000f2d0 ticks = _Timespec_To_ticks( rqtp ); 3000f208: e1a00004 mov r0, r4 3000f20c: eb0006fe bl 30010e0c <_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 ) { 3000f210: e2505000 subs r5, r0, #0 ; 0x0 3000f214: e59f20c8 ldr r2, [pc, #200] ; 3000f2e4 3000f218: 1a00000a bne 3000f248 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 3000f21c: e5923000 ldr r3, [r2] 3000f220: e2833001 add r3, r3, #1 ; 0x1 3000f224: e5823000 str r3, [r2] _Thread_Disable_dispatch(); _Thread_Yield_processor(); 3000f228: ebfff0b5 bl 3000b504 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 3000f22c: ebffed54 bl 3000a784 <_Thread_Enable_dispatch> if ( rmtp ) { 3000f230: e3560000 cmp r6, #0 ; 0x0 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 3000f234: 15865004 strne r5, [r6, #4] if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 3000f238: 15865000 strne r5, [r6] rmtp->tv_nsec = 0; 3000f23c: 11a00005 movne r0, r5 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { 3000f240: 18bd8070 popne {r4, r5, r6, pc} 3000f244: ea000024 b 3000f2dc <== NOT EXECUTED 3000f248: e5923000 ldr r3, [r2] 3000f24c: e2833001 add r3, r3, #1 ; 0x1 3000f250: e5823000 str r3, [r2] /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 3000f254: e59f408c ldr r4, [pc, #140] ; 3000f2e8 3000f258: e3a01281 mov r1, #268435464 ; 0x10000008 3000f25c: e5940000 ldr r0, [r4] 3000f260: ebffefb8 bl 3000b148 <_Thread_Set_state> _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 3000f264: e5943000 ldr r3, [r4] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 3000f268: e59f207c ldr r2, [pc, #124] ; 3000f2ec 3000f26c: e5931008 ldr r1, [r3, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3000f270: e3a00000 mov r0, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; 3000f274: e5831068 str r1, [r3, #104] the_watchdog->user_data = user_data; 3000f278: e583006c str r0, [r3, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3000f27c: e5830050 str r0, [r3, #80] the_watchdog->routine = routine; 3000f280: e5832064 str r2, [r3, #100] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 3000f284: e2831048 add r1, r3, #72 ; 0x48 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 3000f288: e5835054 str r5, [r3, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 3000f28c: e59f005c ldr r0, [pc, #92] ; 3000f2f0 3000f290: ebfff1ad bl 3000b94c <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 3000f294: ebffed3a bl 3000a784 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 3000f298: e3560000 cmp r6, #0 ; 0x0 3000f29c: 0a00000e beq 3000f2dc ticks -= 3000f2a0: e5943000 ldr r3, [r4] _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 3000f2a4: e1a01006 mov r1, r6 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 3000f2a8: e5932060 ldr r2, [r3, #96] 3000f2ac: e593405c ldr r4, [r3, #92] 3000f2b0: e0624004 rsb r4, r2, r4 3000f2b4: e0844005 add r4, r4, r5 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 3000f2b8: e1a00004 mov r0, r4 3000f2bc: eb0006b0 bl 30010d84 <_Timespec_From_ticks> /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 3000f2c0: e3540000 cmp r4, #0 ; 0x0 3000f2c4: 0a000004 beq 3000f2dc rtems_set_errno_and_return_minus_one( EINTR ); 3000f2c8: eb0010cd bl 30013604 <__errno> 3000f2cc: e3a03004 mov r3, #4 ; 0x4 3000f2d0: e5803000 str r3, [r0] 3000f2d4: e3e00000 mvn r0, #0 ; 0x0 3000f2d8: e8bd8070 pop {r4, r5, r6, pc} 3000f2dc: e3a00000 mov r0, #0 ; 0x0 } return 0; } 3000f2e0: e8bd8070 pop {r4, r5, r6, pc} 3000f2e4: 300243ec .word 0x300243ec 3000f2e8: 300244a4 .word 0x300244a4 3000f2ec: 3000a5f8 .word 0x3000a5f8 3000f2f0: 300244c4 .word 0x300244c4 30004be8 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 30004be8: e92d4030 push {r4, r5, lr} 30004bec: e24dd004 sub sp, sp, #4 ; 0x4 30004bf0: e1a04000 mov r4, r0 30004bf4: 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) ) { 30004bf8: e1a00002 mov r0, r2 30004bfc: e1a0100d mov r1, sp 30004c00: eb000125 bl 3000509c <_POSIX_Absolute_timeout_to_ticks> 30004c04: e3500003 cmp r0, #3 ; 0x3 30004c08: 979ff100 ldrls pc, [pc, r0, lsl #2] 30004c0c: ea000008 b 30004c34 <== NOT EXECUTED 30004c10: 30004c20 .word 0x30004c20 <== NOT EXECUTED 30004c14: 30004c28 .word 0x30004c28 <== NOT EXECUTED 30004c18: 30004c28 .word 0x30004c28 <== NOT EXECUTED 30004c1c: 30004c30 .word 0x30004c30 <== NOT EXECUTED 30004c20: e3a00016 mov r0, #22 ; 0x16 30004c24: ea000006 b 30004c44 30004c28: e3a03001 mov r3, #1 ; 0x1 30004c2c: ea000000 b 30004c34 30004c30: e3a03000 mov r3, #0 ; 0x0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: already_timedout = FALSE; break; } return _POSIX_Condition_variables_Wait_support( 30004c34: e1a00004 mov r0, r4 30004c38: e1a01005 mov r1, r5 30004c3c: e59d2000 ldr r2, [sp] 30004c40: eb000004 bl 30004c58 <_POSIX_Condition_variables_Wait_support> cond, mutex, ticks, already_timedout ); } 30004c44: e28dd004 add sp, sp, #4 ; 0x4 30004c48: e8bd8030 pop {r4, r5, pc} 30005004 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 30005004: 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 ) 30005008: e3520000 cmp r2, #0 ; 0x0 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 3000500c: e24dd040 sub sp, sp, #64 ; 0x40 30005010: e58d0024 str r0, [sp, #36] POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 30005014: e58d2020 str r2, [sp, #32] pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 30005018: e58d301c str r3, [sp, #28] POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 3000501c: 03a0000e moveq r0, #14 ; 0xe 30005020: 0a0000a0 beq 300052a8 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 30005024: e59f3284 ldr r3, [pc, #644] ; 300052b0 30005028: e3510000 cmp r1, #0 ; 0x0 3000502c: 11a06001 movne r6, r1 30005030: 01a06003 moveq r6, r3 if ( !the_attr->is_initialized ) 30005034: e5963000 ldr r3, [r6] 30005038: e3530000 cmp r3, #0 ; 0x0 3000503c: 0a000098 beq 300052a4 * 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) ) 30005040: e5963004 ldr r3, [r6, #4] 30005044: e3530000 cmp r3, #0 ; 0x0 30005048: 0a000004 beq 30005060 3000504c: e59f2260 ldr r2, [pc, #608] ; 300052b4 30005050: e5963008 ldr r3, [r6, #8] 30005054: e5922000 ldr r2, [r2] 30005058: e1530002 cmp r3, r2 3000505c: 3a000090 bcc 300052a4 * 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 ) { 30005060: e5963010 ldr r3, [r6, #16] 30005064: e3530001 cmp r3, #1 ; 0x1 30005068: 0a000002 beq 30005078 3000506c: e3530002 cmp r3, #2 ; 0x2 30005070: 1a00008b bne 300052a4 30005074: ea000006 b 30005094 case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 30005078: e59f3238 ldr r3, [pc, #568] ; 300052b8 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 3000507c: e28d4028 add r4, sp, #40 ; 0x28 * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 30005080: e5933000 ldr r3, [r3] 30005084: e5933108 ldr r3, [r3, #264] schedpolicy = api->schedpolicy; schedparam = api->schedparam; 30005088: e283c080 add ip, r3, #128 ; 0x80 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 3000508c: e593807c ldr r8, [r3, #124] 30005090: ea000002 b 300050a0 schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 30005094: e5968014 ldr r8, [r6, #20] schedparam = the_attr->schedparam; 30005098: e28d4028 add r4, sp, #40 ; 0x28 3000509c: e286c018 add ip, r6, #24 ; 0x18 300050a0: e8bc000f ldm ip!, {r0, r1, r2, r3} 300050a4: e8a4000f stmia r4!, {r0, r1, r2, r3} 300050a8: e89c0003 ldm ip, {r0, r1} 300050ac: e8840003 stm r4, {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 ) 300050b0: e596300c ldr r3, [r6, #12] 300050b4: e3530000 cmp r3, #0 ; 0x0 300050b8: 13a00086 movne r0, #134 ; 0x86 300050bc: 1a000079 bne 300052a8 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 300050c0: e59da028 ldr sl, [sp, #40] 300050c4: e24a3001 sub r3, sl, #1 ; 0x1 300050c8: e35300fd cmp r3, #253 ; 0xfd 300050cc: 8a000074 bhi 300052a4 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 300050d0: e3580003 cmp r8, #3 ; 0x3 300050d4: 979ff108 ldrls pc, [pc, r8, lsl #2] 300050d8: ea000071 b 300052a4 300050dc: 300050f8 .word 0x300050f8 <== NOT EXECUTED 300050e0: 300050ec .word 0x300050ec <== NOT EXECUTED 300050e4: 30005100 .word 0x30005100 <== NOT EXECUTED 300050e8: 3000510c .word 0x3000510c <== NOT EXECUTED 300050ec: e3a04000 mov r4, #0 ; 0x0 300050f0: e1a05004 mov r5, r4 300050f4: ea000012 b 30005144 300050f8: e3a04001 mov r4, #1 ; 0x1 300050fc: ea000000 b 30005104 30005100: e3a04002 mov r4, #2 ; 0x2 <== NOT EXECUTED 30005104: e3a05000 mov r5, #0 ; 0x0 30005108: ea00000d b 30005144 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 ) < 3000510c: e28d4028 add r4, sp, #40 ; 0x28 30005110: e2840008 add r0, r4, #8 ; 0x8 30005114: eb000feb bl 300090c8 <_Timespec_To_ticks> 30005118: e1a05000 mov r5, r0 3000511c: e2840010 add r0, r4, #16 ; 0x10 30005120: eb000fe8 bl 300090c8 <_Timespec_To_ticks> 30005124: e1550000 cmp r5, r0 30005128: 3a00005d bcc 300052a4 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 3000512c: e59d302c ldr r3, [sp, #44] 30005130: e2433001 sub r3, r3, #1 ; 0x1 30005134: e35300fd cmp r3, #253 ; 0xfd 30005138: 8a000059 bhi 300052a4 3000513c: e59f5178 ldr r5, [pc, #376] ; 300052bc 30005140: e3a04003 mov r4, #3 ; 0x3 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 30005144: e59f9174 ldr r9, [pc, #372] ; 300052c0 30005148: e5990000 ldr r0, [r9] 3000514c: eb000696 bl 30006bac <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 30005150: e59f016c ldr r0, [pc, #364] ; 300052c4 30005154: eb0008db bl 300074c8 <_Objects_Allocate> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 30005158: e2507000 subs r7, r0, #0 ; 0x0 3000515c: 0a000018 beq 300051c4 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 30005160: e59f314c ldr r3, [pc, #332] ; 300052b4 30005164: e3a0b001 mov fp, #1 ; 0x1 30005168: e5933000 ldr r3, [r3] 3000516c: e5961008 ldr r1, [r6, #8] 30005170: e1a03b13 lsl r3, r3, fp 30005174: e26a20ff rsb r2, sl, #255 ; 0xff /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ 30005178: e3a0a000 mov sl, #0 ; 0x0 status = _Thread_Initialize( 3000517c: e58d2004 str r2, [sp, #4] 30005180: e58d400c str r4, [sp, #12] 30005184: e58d5010 str r5, [sp, #16] 30005188: e58da000 str sl, [sp] 3000518c: e58db008 str fp, [sp, #8] 30005190: e58da014 str sl, [sp, #20] 30005194: e58da018 str sl, [sp, #24] 30005198: e1530001 cmp r3, r1 3000519c: 31a03001 movcc r3, r1 300051a0: e59f011c ldr r0, [pc, #284] ; 300052c4 300051a4: e1a01007 mov r1, r7 300051a8: e5962004 ldr r2, [r6, #4] 300051ac: eb000c39 bl 30008298 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 300051b0: e150000a cmp r0, sl 300051b4: 1a000006 bne 300051d4 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 300051b8: e1a01007 mov r1, r7 300051bc: e59f0100 ldr r0, [pc, #256] ; 300052c4 300051c0: eb00098f bl 30007804 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 300051c4: e5990000 ldr r0, [r9] 300051c8: eb000693 bl 30006c1c <_API_Mutex_Unlock> 300051cc: e3a0000b mov r0, #11 ; 0xb 300051d0: ea000034 b 300052a8 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 300051d4: e5974108 ldr r4, [r7, #264] api->Attributes = *the_attr; 300051d8: e1a0c006 mov ip, r6 300051dc: e1a0e004 mov lr, r4 300051e0: e8bc000f ldm ip!, {r0, r1, r2, r3} 300051e4: e8ae000f stmia lr!, {r0, r1, r2, r3} 300051e8: e8bc000f ldm ip!, {r0, r1, r2, r3} 300051ec: e8ae000f stmia lr!, {r0, r1, r2, r3} 300051f0: e8bc000f ldm ip!, {r0, r1, r2, r3} 300051f4: e8ae000f stmia lr!, {r0, r1, r2, r3} 300051f8: e89c0003 ldm ip, {r0, r1} 300051fc: e88e0003 stm lr, {r0, r1} api->detachstate = the_attr->detachstate; 30005200: e5963034 ldr r3, [r6, #52] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 30005204: e284e080 add lr, r4, #128 ; 0x80 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; 30005208: e584807c str r8, [r4, #124] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 3000520c: e5843038 str r3, [r4, #56] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 30005210: e28dc028 add ip, sp, #40 ; 0x28 30005214: e8bc000f ldm ip!, {r0, r1, r2, r3} 30005218: e8ae000f stmia lr!, {r0, r1, r2, r3} * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 3000521c: 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; 30005220: e89c0003 ldm ip, {r0, r1} /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 30005224: e59d2020 ldr r2, [sp, #32] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 30005228: e88e0003 stm lr, {r0, r1} /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 3000522c: e59d301c ldr r3, [sp, #28] 30005230: e1a0100b mov r1, fp 30005234: e1a00007 mov r0, r7 30005238: e58da000 str sl, [sp] 3000523c: eb000ef5 bl 30008e18 <_Thread_Start> start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 30005240: e3580003 cmp r8, #3 ; 0x3 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 30005244: e1a05000 mov r5, r0 start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 30005248: 1a000005 bne 30005264 _Watchdog_Insert_ticks( 3000524c: e2840088 add r0, r4, #136 ; 0x88 30005250: eb000f9c bl 300090c8 <_Timespec_To_ticks> 30005254: e284109c add r1, r4, #156 ; 0x9c Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005258: e58400a8 str r0, [r4, #168] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 3000525c: e59f0064 ldr r0, [pc, #100] ; 300052c8 30005260: eb001087 bl 30009484 <_Watchdog_Insert> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 30005264: e3550000 cmp r5, #0 ; 0x0 30005268: e59f4050 ldr r4, [pc, #80] ; 300052c0 3000526c: 1a000005 bne 30005288 30005270: e1a01007 mov r1, r7 <== NOT EXECUTED 30005274: e59f0048 ldr r0, [pc, #72] ; 300052c4 <== NOT EXECUTED 30005278: eb000961 bl 30007804 <_Objects_Free> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 3000527c: e5940000 ldr r0, [r4] <== NOT EXECUTED 30005280: eb000665 bl 30006c1c <_API_Mutex_Unlock> <== NOT EXECUTED 30005284: ea000006 b 300052a4 <== NOT EXECUTED /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 30005288: e5973008 ldr r3, [r7, #8] 3000528c: e59d2024 ldr r2, [sp, #36] _RTEMS_Unlock_allocator(); 30005290: e5940000 ldr r0, [r4] /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 30005294: e5823000 str r3, [r2] _RTEMS_Unlock_allocator(); 30005298: eb00065f bl 30006c1c <_API_Mutex_Unlock> 3000529c: e3a00000 mov r0, #0 ; 0x0 300052a0: ea000000 b 300052a8 return 0; 300052a4: e3a00016 mov r0, #22 ; 0x16 } 300052a8: e28dd040 add sp, sp, #64 ; 0x40 300052ac: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 300052b0: 30017d00 .word 0x30017d00 300052b4: 30019670 .word 0x30019670 300052b8: 3001a544 .word 0x3001a544 300052bc: 30005630 .word 0x30005630 300052c0: 3001a53c .word 0x3001a53c 300052c4: 3001a6a0 .word 0x3001a6a0 300052c8: 3001a564 .word 0x3001a564 30004078 : 30004078: e59f2100 ldr r2, [pc, #256] ; 30004180 int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 3000407c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30004080: e5923000 ldr r3, [r2] 30004084: e1a08000 mov r8, r0 30004088: e2833001 add r3, r3, #1 ; 0x1 3000408c: e1a04001 mov r4, r1 30004090: e5823000 str r3, [r2] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 30004094: e59f00e8 ldr r0, [pc, #232] ; 30004184 30004098: eb0008e2 bl 30006428 <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 3000409c: e2506000 subs r6, r0, #0 ; 0x0 300040a0: 1a000002 bne 300040b0 _Thread_Enable_dispatch(); 300040a4: eb000c0b bl 300070d8 <_Thread_Enable_dispatch> 300040a8: e3a0000b mov r0, #11 ; 0xb 300040ac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 300040b0: e59fa0d0 ldr sl, [pc, #208] ; 30004188 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 300040b4: e5864014 str r4, [r6, #20] 300040b8: e1a07006 mov r7, r6 300040bc: e3a05001 mov r5, #1 ; 0x1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 300040c0: e79a3105 ldr r3, [sl, r5, lsl #2] 300040c4: e3530000 cmp r3, #0 ; 0x0 300040c8: 0a00001a beq 30004138 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 300040cc: e5933004 ldr r3, [r3, #4] 300040d0: e1d341b0 ldrh r4, [r3, #16] 300040d4: e2844001 add r4, r4, #1 ; 0x1 300040d8: e1a04104 lsl r4, r4, #2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 300040dc: e1a00004 mov r0, r4 300040e0: eb001135 bl 300085bc <_Workspace_Allocate> if ( !table ) { 300040e4: e2503000 subs r3, r0, #0 ; 0x0 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 300040e8: e1a02004 mov r2, r4 300040ec: 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 ) { 300040f0: 1a00000d bne 3000412c 300040f4: e2853005 add r3, r5, #5 ; 0x5 300040f8: e0864103 add r4, r6, r3, lsl #2 300040fc: ea000001 b 30004108 for ( --the_api; the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 30004100: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 30004104: eb001128 bl 300085ac <_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; 30004108: e2555001 subs r5, r5, #1 ; 0x1 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 3000410c: 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; 30004110: 1afffffa bne 30004100 RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 30004114: e59f0068 ldr r0, [pc, #104] ; 30004184 30004118: e1a01006 mov r1, r6 3000411c: eb000990 bl 30006764 <_Objects_Free> the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 30004120: eb000bec bl 300070d8 <_Thread_Enable_dispatch> 30004124: e3a0000c mov r0, #12 ; 0xc 30004128: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return ENOMEM; } the_key->Values[ the_api ] = table; 3000412c: e587301c str r3, [r7, #28] memset( table, '\0', bytes_to_allocate ); 30004130: eb002226 bl 3000c9d0 30004134: ea000000 b 3000413c } else { the_key->Values[ the_api ] = NULL; 30004138: 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++ ) { 3000413c: 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; 30004140: e3550005 cmp r5, #5 ; 0x5 the_api++ ) { 30004144: 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; 30004148: 1affffdc bne 300040c0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 3000414c: e59f3030 ldr r3, [pc, #48] ; 30004184 30004150: e5961008 ldr r1, [r6, #8] 30004154: e593201c ldr r2, [r3, #28] 30004158: e1d630b8 ldrh r3, [r6, #8] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 3000415c: e3a04000 mov r4, #0 ; 0x0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 30004160: e7826103 str r6, [r2, r3, lsl #2] } } the_key->is_active = TRUE; 30004164: e3a03001 mov r3, #1 ; 0x1 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 30004168: e586400c str r4, [r6, #12] 3000416c: e5c63010 strb r3, [r6, #16] _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 30004170: e5881000 str r1, [r8] _Thread_Enable_dispatch(); 30004174: eb000bd7 bl 300070d8 <_Thread_Enable_dispatch> 30004178: e1a00004 mov r0, r4 return 0; } 3000417c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30004180: 3001416c .word 0x3001416c 30004184: 30014544 .word 0x30014544 30004188: 30014128 .word 0x30014128 300046b8 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 300046b8: e92d40f0 push {r4, r5, r6, r7, lr} const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 300046bc: e2507000 subs r7, r0, #0 ; 0x0 int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 300046c0: e24dd00c sub sp, sp, #12 ; 0xc const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 300046c4: 0a000023 beq 30004758 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 300046c8: e3510000 cmp r1, #0 ; 0x0 300046cc: 1a000003 bne 300046e0 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 300046d0: e1a0000d mov r0, sp <== NOT EXECUTED 300046d4: eb00028c bl 3000510c <== NOT EXECUTED 300046d8: e1a0400d mov r4, sp <== NOT EXECUTED 300046dc: e1a0100d mov r1, sp <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 300046e0: e5913000 ldr r3, [r1] 300046e4: e3530000 cmp r3, #0 ; 0x0 300046e8: 0a00001a beq 30004758 return EINVAL; switch ( the_attr->process_shared ) { 300046ec: e5915004 ldr r5, [r1, #4] 300046f0: e3550000 cmp r5, #0 ; 0x0 300046f4: 1a000017 bne 30004758 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 300046f8: e59f2064 ldr r2, [pc, #100] ; 30004764 300046fc: e5923000 ldr r3, [r2] 30004700: e2833001 add r3, r3, #1 ; 0x1 30004704: 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 *) 30004708: e59f6058 ldr r6, [pc, #88] ; 30004768 3000470c: e1a00006 mov r0, r6 30004710: eb0009f6 bl 30006ef0 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 30004714: e2504000 subs r4, r0, #0 ; 0x0 30004718: 1a000002 bne 30004728 _Thread_Enable_dispatch(); 3000471c: eb000d1f bl 30007ba0 <_Thread_Enable_dispatch> 30004720: e3a0000b mov r0, #11 ; 0xb 30004724: ea00000c b 3000475c return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 30004728: e2840010 add r0, r4, #16 ; 0x10 3000472c: e28d1008 add r1, sp, #8 ; 0x8 30004730: eb00081c bl 300067a8 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 30004734: e596301c ldr r3, [r6, #28] 30004738: e5941008 ldr r1, [r4, #8] 3000473c: e1d420b8 ldrh r2, [r4, #8] 30004740: 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; 30004744: e584500c str r5, [r4, #12] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 30004748: e5871000 str r1, [r7] _Thread_Enable_dispatch(); 3000474c: eb000d13 bl 30007ba0 <_Thread_Enable_dispatch> 30004750: e1a00005 mov r0, r5 30004754: ea000000 b 3000475c return 0; 30004758: e3a00016 mov r0, #22 ; 0x16 } 3000475c: e28dd00c add sp, sp, #12 ; 0xc 30004760: e8bd80f0 pop {r4, r5, r6, r7, pc} 30004764: 3001858c .word 0x3001858c 30004768: 30018760 .word 0x30018760 300047d8 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 300047d8: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 300047dc: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 300047e0: e24dd00c sub sp, sp, #12 ; 0xc 300047e4: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 300047e8: 0a000027 beq 3000488c * 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 ); 300047ec: e28d1004 add r1, sp, #4 ; 0x4 300047f0: eb00199f bl 3000ae74 <_POSIX_Absolute_timeout_to_ticks> switch (status) { 300047f4: 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 ); 300047f8: e1a05000 mov r5, r0 switch (status) { 300047fc: 93a04000 movls r4, #0 ; 0x0 30004800: 9a000002 bls 30004810 30004804: e3500003 cmp r0, #3 ; 0x3 30004808: 13a04000 movne r4, #0 ; 0x0 3000480c: 03a04001 moveq r4, #1 ; 0x1 30004810: e59f0080 ldr r0, [pc, #128] ; 30004898 30004814: e5961000 ldr r1, [r6] 30004818: e28d2008 add r2, sp, #8 ; 0x8 3000481c: eb000adb bl 30007390 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 30004820: e59d3008 ldr r3, [sp, #8] 30004824: e3530000 cmp r3, #0 ; 0x0 30004828: 1a000017 bne 3000488c case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 3000482c: e58d3000 str r3, [sp] 30004830: e2800010 add r0, r0, #16 ; 0x10 30004834: e5961000 ldr r1, [r6] 30004838: e1a02004 mov r2, r4 3000483c: e59d3004 ldr r3, [sp, #4] 30004840: eb0007e0 bl 300067c8 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 30004844: eb000cd5 bl 30007ba0 <_Thread_Enable_dispatch> if ( !do_wait && 30004848: e3540000 cmp r4, #0 ; 0x0 3000484c: 1a000009 bne 30004878 30004850: e59f3044 ldr r3, [pc, #68] ; 3000489c <== NOT EXECUTED 30004854: e5933000 ldr r3, [r3] <== NOT EXECUTED 30004858: e5933034 ldr r3, [r3, #52] <== NOT EXECUTED 3000485c: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 30004860: 1a000004 bne 30004878 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 30004864: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 30004868: 0a000007 beq 3000488c <== NOT EXECUTED 3000486c: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 30004870: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 30004874: 9a000005 bls 30004890 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30004878: e59f301c ldr r3, [pc, #28] ; 3000489c 3000487c: e5933000 ldr r3, [r3] 30004880: e5930034 ldr r0, [r3, #52] 30004884: eb000037 bl 30004968 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30004888: ea000000 b 30004890 3000488c: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 30004890: e28dd00c add sp, sp, #12 ; 0xc 30004894: e8bd8070 pop {r4, r5, r6, pc} 30004898: 30018760 .word 0x30018760 3000489c: 30018644 .word 0x30018644 300048a0 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 300048a0: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 300048a4: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 300048a8: e24dd00c sub sp, sp, #12 ; 0xc 300048ac: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 300048b0: 0a000027 beq 30004954 * 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 ); 300048b4: e28d1004 add r1, sp, #4 ; 0x4 300048b8: eb00196d bl 3000ae74 <_POSIX_Absolute_timeout_to_ticks> switch (status) { 300048bc: 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 ); 300048c0: e1a05000 mov r5, r0 switch (status) { 300048c4: 93a04000 movls r4, #0 ; 0x0 300048c8: 9a000002 bls 300048d8 300048cc: e3500003 cmp r0, #3 ; 0x3 300048d0: 13a04000 movne r4, #0 ; 0x0 300048d4: 03a04001 moveq r4, #1 ; 0x1 300048d8: e59f0080 ldr r0, [pc, #128] ; 30004960 300048dc: e5961000 ldr r1, [r6] 300048e0: e28d2008 add r2, sp, #8 ; 0x8 300048e4: eb000aa9 bl 30007390 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 300048e8: e59d3008 ldr r3, [sp, #8] 300048ec: e3530000 cmp r3, #0 ; 0x0 300048f0: 1a000017 bne 30004954 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 300048f4: e58d3000 str r3, [sp] 300048f8: e2800010 add r0, r0, #16 ; 0x10 300048fc: e5961000 ldr r1, [r6] 30004900: e1a02004 mov r2, r4 30004904: e59d3004 ldr r3, [sp, #4] 30004908: eb0007e3 bl 3000689c <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 3000490c: eb000ca3 bl 30007ba0 <_Thread_Enable_dispatch> if ( !do_wait && 30004910: e3540000 cmp r4, #0 ; 0x0 30004914: 1a000009 bne 30004940 30004918: e59f3044 ldr r3, [pc, #68] ; 30004964 <== NOT EXECUTED 3000491c: e5933000 ldr r3, [r3] <== NOT EXECUTED 30004920: e5933034 ldr r3, [r3, #52] <== NOT EXECUTED 30004924: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 30004928: 1a000004 bne 30004940 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 3000492c: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 30004930: 0a000007 beq 30004954 <== NOT EXECUTED 30004934: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 30004938: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 3000493c: 9a000005 bls 30004958 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30004940: e59f301c ldr r3, [pc, #28] ; 30004964 30004944: e5933000 ldr r3, [r3] 30004948: e5930034 ldr r0, [r3, #52] 3000494c: eb000005 bl 30004968 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30004950: ea000000 b 30004958 30004954: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 30004958: e28dd00c add sp, sp, #12 ; 0xc 3000495c: e8bd8070 pop {r4, r5, r6, pc} 30004960: 30018760 .word 0x30018760 30004964: 30018644 .word 0x30018644 3000428c : * 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() ) 3000428c: e59f30a4 ldr r3, [pc, #164] ; 30004338 int pthread_setcancelstate( int state, int *oldstate ) { 30004290: e92d4010 push {r4, lr} * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 30004294: e5933000 ldr r3, [r3] int pthread_setcancelstate( int state, int *oldstate ) { 30004298: 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() ) 3000429c: e3530000 cmp r3, #0 ; 0x0 300042a0: 13a00047 movne r0, #71 ; 0x47 300042a4: 18bd8010 popne {r4, pc} return EPROTO; if ( !oldstate ) 300042a8: e3510000 cmp r1, #0 ; 0x0 300042ac: 0a00001f beq 30004330 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 300042b0: e3500001 cmp r0, #1 ; 0x1 300042b4: 8a00001d bhi 30004330 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 300042b8: e59f107c ldr r1, [pc, #124] ; 3000433c return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 300042bc: e59f207c ldr r2, [pc, #124] ; 30004340 300042c0: e5913000 ldr r3, [r1] 300042c4: e5922000 ldr r2, [r2] 300042c8: e2833001 add r3, r3, #1 ; 0x1 300042cc: e5813000 str r3, [r1] 300042d0: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 300042d4: e59230cc ldr r3, [r2, #204] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 300042d8: e3500000 cmp r0, #0 ; 0x0 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 300042dc: e58c3000 str r3, [ip] thread_support->cancelability_state = state; 300042e0: e58200cc str r0, [r2, #204] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 300042e4: 1a000006 bne 30004304 300042e8: e59230d0 ldr r3, [r2, #208] 300042ec: e3530001 cmp r3, #1 ; 0x1 300042f0: 1a000003 bne 30004304 300042f4: e59230d4 ldr r3, [r2, #212] <== NOT EXECUTED 300042f8: e2534000 subs r4, r3, #0 ; 0x0 <== NOT EXECUTED 300042fc: 13a04001 movne r4, #1 ; 0x1 <== NOT EXECUTED 30004300: ea000000 b 30004308 <== NOT EXECUTED 30004304: e3a04000 mov r4, #0 ; 0x0 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 30004308: eb000a25 bl 30006ba4 <_Thread_Enable_dispatch> if ( cancel ) 3000430c: e3540000 cmp r4, #0 ; 0x0 30004310: 01a00004 moveq r0, r4 30004314: 08bd8010 popeq {r4, pc} _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 30004318: e59f3020 ldr r3, [pc, #32] ; 30004340 <== NOT EXECUTED 3000431c: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 30004320: e5930000 ldr r0, [r3] <== NOT EXECUTED 30004324: ebfffed4 bl 30003e7c <_POSIX_Thread_Exit> <== NOT EXECUTED 30004328: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000432c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30004330: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED return 0; } 30004334: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30004338: 300140a0 .word 0x300140a0 3000433c: 3001400c .word 0x3001400c 30004340: 300140c4 .word 0x300140c4 30004344 : * 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() ) 30004344: e59f30a4 ldr r3, [pc, #164] ; 300043f0 int pthread_setcanceltype( int type, int *oldtype ) { 30004348: e92d4010 push {r4, lr} * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 3000434c: e5933000 ldr r3, [r3] int pthread_setcanceltype( int type, int *oldtype ) { 30004350: 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() ) 30004354: e3530000 cmp r3, #0 ; 0x0 30004358: 13a00047 movne r0, #71 ; 0x47 3000435c: 18bd8010 popne {r4, pc} return EPROTO; if ( !oldtype ) 30004360: e3510000 cmp r1, #0 ; 0x0 30004364: 0a00001f beq 300043e8 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 30004368: e3500001 cmp r0, #1 ; 0x1 3000436c: 8a00001d bhi 300043e8 30004370: e59f107c ldr r1, [pc, #124] ; 300043f4 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 30004374: e59f207c ldr r2, [pc, #124] ; 300043f8 30004378: e5913000 ldr r3, [r1] 3000437c: e5922000 ldr r2, [r2] 30004380: e2833001 add r3, r3, #1 ; 0x1 30004384: e5813000 str r3, [r1] 30004388: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 3000438c: e59230d0 ldr r3, [r2, #208] 30004390: e58c3000 str r3, [ip] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 30004394: e59230cc ldr r3, [r2, #204] thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; 30004398: e58200d0 str r0, [r2, #208] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 3000439c: e3530000 cmp r3, #0 ; 0x0 300043a0: 1a000005 bne 300043bc 300043a4: e3500001 cmp r0, #1 ; 0x1 300043a8: 1a000003 bne 300043bc 300043ac: e59230d4 ldr r3, [r2, #212] 300043b0: e2534000 subs r4, r3, #0 ; 0x0 300043b4: 13a04001 movne r4, #1 ; 0x1 300043b8: ea000000 b 300043c0 300043bc: e3a04000 mov r4, #0 ; 0x0 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 300043c0: eb0009f7 bl 30006ba4 <_Thread_Enable_dispatch> if ( cancel ) 300043c4: e3540000 cmp r4, #0 ; 0x0 300043c8: 01a00004 moveq r0, r4 300043cc: 08bd8010 popeq {r4, pc} _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 300043d0: e59f3020 ldr r3, [pc, #32] ; 300043f8 <== NOT EXECUTED 300043d4: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 300043d8: e5930000 ldr r0, [r3] <== NOT EXECUTED 300043dc: ebfffea6 bl 30003e7c <_POSIX_Thread_Exit> <== NOT EXECUTED 300043e0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 300043e4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 300043e8: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED return 0; } 300043ec: e8bd8010 pop {r4, pc} <== NOT EXECUTED 300043f0: 300140a0 .word 0x300140a0 300043f4: 3001400c .word 0x3001400c 300043f8: 300140c4 .word 0x300140c4 3000630c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 3000630c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Check all the parameters */ if ( !param ) 30006310: e2526000 subs r6, r2, #0 ; 0x0 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 30006314: e24dd004 sub sp, sp, #4 ; 0x4 30006318: e1a05000 mov r5, r0 3000631c: e1a0a001 mov sl, r1 /* * Check all the parameters */ if ( !param ) 30006320: 0a000051 beq 3000646c return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 30006324: e5963000 ldr r3, [r6] 30006328: e2433001 sub r3, r3, #1 ; 0x1 3000632c: e35300fd cmp r3, #253 ; 0xfd 30006330: 8a00004d bhi 3000646c return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 30006334: e3510003 cmp r1, #3 ; 0x3 30006338: 979ff101 ldrls pc, [pc, r1, lsl #2] 3000633c: ea00004a b 3000646c 30006340: 3000635c .word 0x3000635c <== NOT EXECUTED 30006344: 30006350 .word 0x30006350 <== NOT EXECUTED 30006348: 30006364 .word 0x30006364 <== NOT EXECUTED 3000634c: 30006370 .word 0x30006370 <== NOT EXECUTED 30006350: e3a07000 mov r7, #0 ; 0x0 30006354: e1a08007 mov r8, r7 30006358: ea000011 b 300063a4 3000635c: e3a07001 mov r7, #1 ; 0x1 30006360: ea000000 b 30006368 30006364: e3a07002 mov r7, #2 ; 0x2 30006368: e3a08000 mov r8, #0 ; 0x0 3000636c: ea00000c b 300063a4 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 ) < 30006370: e2860008 add r0, r6, #8 ; 0x8 30006374: eb000dbe bl 30009a74 <_Timespec_To_ticks> 30006378: e1a04000 mov r4, r0 3000637c: e2860010 add r0, r6, #16 ; 0x10 30006380: eb000dbb bl 30009a74 <_Timespec_To_ticks> 30006384: e1540000 cmp r4, r0 30006388: 3a000037 bcc 3000646c _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 3000638c: e5963004 ldr r3, [r6, #4] 30006390: e2433001 sub r3, r3, #1 ; 0x1 30006394: e35300fd cmp r3, #253 ; 0xfd 30006398: 8a000033 bhi 3000646c 3000639c: e59f80d4 ldr r8, [pc, #212] ; 30006478 300063a0: e3a07003 mov r7, #3 ; 0x3 300063a4: e1a01005 mov r1, r5 300063a8: e59f00cc ldr r0, [pc, #204] ; 3000647c 300063ac: e1a0200d mov r2, sp 300063b0: eb0007f2 bl 30008380 <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 300063b4: e59d3000 ldr r3, [sp] 300063b8: e1a05000 mov r5, r0 300063bc: e3530000 cmp r3, #0 ; 0x0 300063c0: 13a00003 movne r0, #3 ; 0x3 300063c4: 1a000029 bne 30006470 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 300063c8: e5954108 ldr r4, [r5, #264] if ( api->schedpolicy == SCHED_SPORADIC ) 300063cc: e594307c ldr r3, [r4, #124] 300063d0: e3530003 cmp r3, #3 ; 0x3 (void) _Watchdog_Remove( &api->Sporadic_timer ); 300063d4: 0284009c addeq r0, r4, #156 ; 0x9c 300063d8: 0b000ef0 bleq 30009fa0 <_Watchdog_Remove> api->schedpolicy = policy; 300063dc: e584a07c str sl, [r4, #124] api->schedparam = *param; 300063e0: e284c080 add ip, r4, #128 ; 0x80 300063e4: e1a0e006 mov lr, r6 300063e8: e8be000f ldm lr!, {r0, r1, r2, r3} 300063ec: e8ac000f stmia ip!, {r0, r1, r2, r3} the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 300063f0: e35a0000 cmp sl, #0 ; 0x0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 300063f4: e89e0003 ldm lr, {r0, r1} the_thread->budget_algorithm = budget_algorithm; 300063f8: e585707c str r7, [r5, #124] the_thread->budget_callout = budget_callout; 300063fc: e5858080 str r8, [r5, #128] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 30006400: e88c0003 stm ip, {r0, r1} the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 30006404: ba000015 blt 30006460 30006408: e35a0002 cmp sl, #2 ; 0x2 3000640c: da000002 ble 3000641c 30006410: e35a0003 cmp sl, #3 ; 0x3 30006414: 1a000011 bne 30006460 30006418: ea000009 b 30006444 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000641c: e59f305c ldr r3, [pc, #92] ; 30006480 30006420: e5941080 ldr r1, [r4, #128] 30006424: e5933000 ldr r3, [r3] 30006428: e26110ff rsb r1, r1, #255 ; 0xff 3000642c: e5853078 str r3, [r5, #120] the_thread->real_priority = 30006430: e5851018 str r1, [r5, #24] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 30006434: e1a00005 mov r0, r5 30006438: e3a02001 mov r2, #1 ; 0x1 3000643c: eb00086b bl 300085f0 <_Thread_Change_priority> 30006440: ea000006 b 30006460 TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 30006444: e5943080 ldr r3, [r4, #128] _Watchdog_Remove( &api->Sporadic_timer ); 30006448: e284009c add r0, r4, #156 ; 0x9c TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 3000644c: e5843098 str r3, [r4, #152] _Watchdog_Remove( &api->Sporadic_timer ); 30006450: eb000ed2 bl 30009fa0 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 30006454: e1a01005 mov r1, r5 30006458: e3a00000 mov r0, #0 ; 0x0 3000645c: ebffff87 bl 30006280 <_POSIX_Threads_Sporadic_budget_TSR> break; } _Thread_Enable_dispatch(); 30006460: eb0009ca bl 30008b90 <_Thread_Enable_dispatch> 30006464: e3a00000 mov r0, #0 ; 0x0 30006468: ea000000 b 30006470 return 0; 3000646c: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return ESRCH; } 30006470: e28dd004 add sp, sp, #4 ; 0x4 30006474: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30006478: 30006248 .word 0x30006248 3000647c: 30016c60 .word 0x30016c60 30006480: 30016a04 .word 0x30016a04 30003a34 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 30003a34: e92d4010 push {r4, lr} if ( !time_buffer ) 30003a38: e2514000 subs r4, r1, #0 ; 0x0 30003a3c: 03a00009 moveq r0, #9 ; 0x9 30003a40: 08bd8010 popeq {r4, pc} return RTEMS_INVALID_ADDRESS; switch ( option ) { 30003a44: e3500004 cmp r0, #4 ; 0x4 30003a48: 979ff100 ldrls pc, [pc, r0, lsl #2] 30003a4c: ea000004 b 30003a64 30003a50: 30003a6c .word 0x30003a6c <== NOT EXECUTED 30003a54: 30003a78 .word 0x30003a78 <== NOT EXECUTED 30003a58: 30003a84 .word 0x30003a84 <== NOT EXECUTED 30003a5c: 30003a8c .word 0x30003a8c <== NOT EXECUTED 30003a60: 30003a9c .word 0x30003a9c <== NOT EXECUTED 30003a64: e3a0000a mov r0, #10 ; 0xa 30003a68: e8bd8010 pop {r4, pc} case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 30003a6c: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003a70: 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 ); 30003a74: ea000025 b 30003b10 case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 30003a78: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003a7c: 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); 30003a80: ea000008 b 30003aa8 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 30003a84: eb00001d bl 30003b00 30003a88: ea000000 b 30003a90 return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 30003a8c: eb000013 bl 30003ae0 30003a90: e5840000 str r0, [r4] 30003a94: e3a00000 mov r0, #0 ; 0x0 30003a98: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 30003a9c: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003aa0: 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 ); 30003aa4: ea00004b b 30003bd8 30006d04 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 30006d04: e92d41f0 push {r4, r5, r6, r7, r8, lr} uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 30006d08: e2507000 subs r7, r0, #0 ; 0x0 30006d0c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} return; 30006d10: e59f6054 ldr r6, [pc, #84] ; 30006d6c for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 30006d14: e2868010 add r8, r6, #16 ; 0x10 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 30006d18: e5963004 ldr r3, [r6, #4] 30006d1c: e3530000 cmp r3, #0 ; 0x0 30006d20: 0a00000d beq 30006d5c continue; information = _Objects_Information_table[ api_index ][ 1 ]; 30006d24: e5935004 ldr r5, [r3, #4] if ( information ) { 30006d28: e3550000 cmp r5, #0 ; 0x0 30006d2c: 13a04001 movne r4, #1 ; 0x1 30006d30: 1a000006 bne 30006d50 30006d34: ea000008 b 30006d5c <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 30006d38: e595301c ldr r3, [r5, #28] 30006d3c: e7933104 ldr r3, [r3, r4, lsl #2] 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++ ) { 30006d40: e2844001 add r4, r4, #1 ; 0x1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 30006d44: e2530000 subs r0, r3, #0 ; 0x0 continue; (*routine)(the_thread); 30006d48: 11a0e00f movne lr, pc 30006d4c: 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++ ) { 30006d50: e1d531b0 ldrh r3, [r5, #16] 30006d54: e1540003 cmp r4, r3 30006d58: 9afffff6 bls 30006d38 30006d5c: e2866004 add r6, r6, #4 ; 0x4 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 30006d60: e1560008 cmp r6, r8 30006d64: 1affffeb bne 30006d18 30006d68: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30006d6c: 30022808 .word 0x30022808 3000f630 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 3000f630: 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 ) 3000f634: e2517000 subs r7, r1, #0 ; 0x0 rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 3000f638: e1a04000 mov r4, r0 3000f63c: e24dd008 sub sp, sp, #8 ; 0x8 3000f640: 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 ) 3000f644: 03a04009 moveq r4, #9 ; 0x9 3000f648: 0a000029 beq 3000f6f4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 3000f64c: e59f30ac ldr r3, [pc, #172] ; 3000f700 3000f650: e5930000 ldr r0, [r3] 3000f654: eb0008ec bl 30011a0c <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 3000f658: e1a01004 mov r1, r4 3000f65c: e59f00a0 ldr r0, [pc, #160] ; 3000f704 3000f660: e1a0200d mov r2, sp 3000f664: eb000f64 bl 300133fc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 3000f668: e59d5000 ldr r5, [sp] 3000f66c: e1a04000 mov r4, r0 3000f670: e3550000 cmp r5, #0 ; 0x0 3000f674: 0a000003 beq 3000f688 3000f678: e3550001 cmp r5, #1 ; 0x1 3000f67c: 03a04004 moveq r4, #4 ; 0x4 3000f680: 1a000017 bne 3000f6e4 3000f684: ea000017 b 3000f6e8 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 3000f688: e1a01007 mov r1, r7 3000f68c: e1a02006 mov r2, r6 3000f690: e2800068 add r0, r0, #104 ; 0x68 3000f694: e28d3004 add r3, sp, #4 ; 0x4 3000f698: eb000bd6 bl 300125f8 <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { 3000f69c: e3500001 cmp r0, #1 ; 0x1 3000f6a0: 03a04009 moveq r4, #9 ; 0x9 3000f6a4: 0a00000f beq 3000f6e8 3000f6a8: 3a000002 bcc 3000f6b8 3000f6ac: e3500002 cmp r0, #2 ; 0x2 3000f6b0: 1a00000b bne 3000f6e4 3000f6b4: ea000008 b 3000f6dc case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 3000f6b8: e59d1004 ldr r1, [sp, #4] 3000f6bc: e5942054 ldr r2, [r4, #84] the_region->maximum_segment_size += amount_extended; 3000f6c0: e594305c ldr r3, [r4, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 3000f6c4: e0822001 add r2, r2, r1 the_region->maximum_segment_size += amount_extended; 3000f6c8: e0833001 add r3, r3, r1 3000f6cc: e584305c str r3, [r4, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 3000f6d0: e5842054 str r2, [r4, #84] the_region->maximum_segment_size += amount_extended; 3000f6d4: e1a04005 mov r4, r5 3000f6d8: ea000002 b 3000f6e8 return_status = RTEMS_SUCCESSFUL; break; 3000f6dc: e3a04018 mov r4, #24 ; 0x18 3000f6e0: ea000000 b 3000f6e8 3000f6e4: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 3000f6e8: e59f3010 ldr r3, [pc, #16] ; 3000f700 3000f6ec: e5930000 ldr r0, [r3] 3000f6f0: eb0008e1 bl 30011a7c <_API_Mutex_Unlock> return return_status; } 3000f6f4: e1a00004 mov r0, r4 3000f6f8: e28dd008 add sp, sp, #8 ; 0x8 3000f6fc: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000f700: 3003019c .word 0x3003019c 3000f704: 3002ff8c .word 0x3002ff8c 3000fa2c : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 3000fa2c: 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 ) 3000fa30: e253a000 subs sl, r3, #0 ; 0x0 Objects_Id id, void *segment, size_t size, size_t *old_size ) { 3000fa34: e24dd010 sub sp, sp, #16 ; 0x10 3000fa38: e1a04000 mov r4, r0 3000fa3c: e1a06001 mov r6, r1 3000fa40: 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 ) 3000fa44: 0a000029 beq 3000faf0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 3000fa48: e59f80b0 ldr r8, [pc, #176] ; 3000fb00 3000fa4c: e5980000 ldr r0, [r8] 3000fa50: eb0007ed bl 30011a0c <_API_Mutex_Lock> 3000fa54: e1a01004 mov r1, r4 3000fa58: e59f00a4 ldr r0, [pc, #164] ; 3000fb04 3000fa5c: e28d2008 add r2, sp, #8 ; 0x8 3000fa60: eb000e65 bl 300133fc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 3000fa64: e59d3008 ldr r3, [sp, #8] 3000fa68: e1a05000 mov r5, r0 3000fa6c: e3530000 cmp r3, #0 ; 0x0 3000fa70: 0a000005 beq 3000fa8c 3000fa74: e3530001 cmp r3, #1 ; 0x1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 3000fa78: e5980000 ldr r0, [r8] return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 3000fa7c: 03a04004 moveq r4, #4 ; 0x4 3000fa80: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 3000fa84: eb0007fc bl 30011a7c <_API_Mutex_Unlock> 3000fa88: ea000019 b 3000faf4 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 3000fa8c: e28d3004 add r3, sp, #4 ; 0x4 3000fa90: e28dc00c add ip, sp, #12 ; 0xc 3000fa94: e1a01006 mov r1, r6 3000fa98: e1a02007 mov r2, r7 3000fa9c: e2800068 add r0, r0, #104 ; 0x68 3000faa0: e58dc000 str ip, [sp] 3000faa4: eb000c51 bl 30012bf0 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 3000faa8: e59d3004 ldr r3, [sp, #4] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 3000faac: e2504000 subs r4, r0, #0 ; 0x0 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 3000fab0: e58a3000 str r3, [sl] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 3000fab4: 1a000005 bne 3000fad0 3000fab8: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 3000fabc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3000fac0: 0a000002 beq 3000fad0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ 3000fac4: e1a00005 mov r0, r5 <== NOT EXECUTED 3000fac8: eb001f52 bl 30017818 <_Region_Process_queue> <== NOT EXECUTED 3000facc: ea000008 b 3000faf4 <== NOT EXECUTED else _RTEMS_Unlock_allocator(); 3000fad0: e59f3028 ldr r3, [pc, #40] ; 3000fb00 3000fad4: e5930000 ldr r0, [r3] 3000fad8: eb0007e7 bl 30011a7c <_API_Mutex_Unlock> return 3000fadc: e3540000 cmp r4, #0 ; 0x0 3000fae0: 0a000003 beq 3000faf4 3000fae4: e3540001 cmp r4, #1 ; 0x1 3000fae8: 0284400c addeq r4, r4, #12 ; 0xc 3000faec: 0a000000 beq 3000faf4 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 3000faf0: e3a04009 mov r4, #9 ; 0x9 } 3000faf4: e1a00004 mov r0, r4 3000faf8: e28dd010 add sp, sp, #16 ; 0x10 3000fafc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 3000fb00: 3003019c .word 0x3003019c 3000fb04: 3002ff8c .word 0x3002ff8c 3000404c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 3000404c: 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 ) ) 30004050: e250a000 subs sl, r0, #0 ; 0x0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 30004054: e24dd018 sub sp, sp, #24 ; 0x18 30004058: e1a07001 mov r7, r1 3000405c: e1a04002 mov r4, r2 30004060: e1a08003 mov r8, r3 30004064: 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 ) ) 30004068: 02800003 addeq r0, r0, #3 ; 0x3 3000406c: 0a000062 beq 300041fc return RTEMS_INVALID_NAME; if ( !id ) 30004070: e3590000 cmp r9, #0 ; 0x0 30004074: 03a00009 moveq r0, #9 ; 0x9 30004078: 0a00005f beq 300041fc return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 3000407c: e21220c0 ands r2, r2, #192 ; 0xc0 30004080: 0a000008 beq 300040a8 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 30004084: e2043030 and r3, r4, #48 ; 0x30 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 30004088: e3530010 cmp r3, #16 ; 0x10 3000408c: 0a000001 beq 30004098 30004090: e3530020 cmp r3, #32 ; 0x20 30004094: 1a000057 bne 300041f8 30004098: e3140004 tst r4, #4 ; 0x4 3000409c: 0a000055 beq 300041f8 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 300040a0: e35200c0 cmp r2, #192 ; 0xc0 300040a4: 0a000053 beq 300041f8 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 300040a8: e2146030 ands r6, r4, #48 ; 0x30 300040ac: 0a000002 beq 300040bc 300040b0: e3570001 cmp r7, #1 ; 0x1 300040b4: 83a0000a movhi r0, #10 ; 0xa 300040b8: 8a00004f bhi 300041fc rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 300040bc: e59f2140 ldr r2, [pc, #320] ; 30004204 300040c0: e5923000 ldr r3, [r2] 300040c4: e2833001 add r3, r3, #1 ; 0x1 300040c8: 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 ); 300040cc: e59f0134 ldr r0, [pc, #308] ; 30004208 300040d0: eb000502 bl 300054e0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 300040d4: e2505000 subs r5, r0, #0 ; 0x0 300040d8: 1a000002 bne 300040e8 _Thread_Enable_dispatch(); 300040dc: eb00084d bl 30006218 <_Thread_Enable_dispatch> 300040e0: e3a00005 mov r0, #5 ; 0x5 300040e4: ea000044 b 300041fc * 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 ) ) { 300040e8: e3560000 cmp r6, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 300040ec: 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 ) ) { 300040f0: 0a000029 beq 3000419c CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 300040f4: e3140040 tst r4, #64 ; 0x40 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 300040f8: 13a03002 movne r3, #2 ; 0x2 */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 300040fc: 1a000004 bne 30004114 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 30004100: e3140080 tst r4, #128 ; 0x80 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 30004104: 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 ) ) 30004108: 1a000001 bne 30004114 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 3000410c: e2143004 ands r3, r4, #4 ; 0x4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 30004110: 13a03001 movne r3, #1 ; 0x1 else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 30004114: 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; 30004118: 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; 3000411c: 13a03002 movne r3, #2 ; 0x2 30004120: 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 ) ) { 30004124: 1a00000b bne 30004158 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 30004128: 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; 3000412c: e3a03000 mov r3, #0 ; 0x0 30004130: e58d3000 str r3, [sp] switch ( the_mutex_attributes.discipline ) { 30004134: e3520003 cmp r2, #3 ; 0x3 30004138: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000413c: ea000007 b 30004160 <== NOT EXECUTED 30004140: 30004158 .word 0x30004158 <== NOT EXECUTED 30004144: 30004158 .word 0x30004158 <== NOT EXECUTED 30004148: 30004150 .word 0x30004150 <== NOT EXECUTED 3000414c: 30004150 .word 0x30004150 <== 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; 30004150: e3a03001 mov r3, #1 ; 0x1 30004154: ea000000 b 3000415c break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 30004158: e3a03000 mov r3, #0 ; 0x0 3000415c: e5cd3004 strb r3, [sp, #4] } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 30004160: e3570001 cmp r7, #1 ; 0x1 30004164: 13a02000 movne r2, #0 ; 0x0 30004168: 03a02001 moveq r2, #1 ; 0x1 3000416c: e2850014 add r0, r5, #20 ; 0x14 30004170: 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; 30004174: e58d800c str r8, [sp, #12] mutex_status = _CORE_mutex_Initialize( 30004178: eb0002ff bl 30004d7c <_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 ) { 3000417c: e3500006 cmp r0, #6 ; 0x6 30004180: 1a000012 bne 300041d0 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 30004184: e59f007c ldr r0, [pc, #124] ; 30004208 <== NOT EXECUTED 30004188: e1a01005 mov r1, r5 <== NOT EXECUTED 3000418c: eb0005a2 bl 3000581c <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 30004190: eb000820 bl 30006218 <_Thread_Enable_dispatch> <== NOT EXECUTED 30004194: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED 30004198: ea000017 b 300041fc <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 3000419c: e3140004 tst r4, #4 ; 0x4 the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 300041a0: 13a03001 movne r3, #1 ; 0x1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 300041a4: 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; 300041a8: 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( 300041ac: e1a02007 mov r2, r7 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 300041b0: 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( 300041b4: e2850014 add r0, r5, #20 ; 0x14 300041b8: 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; 300041bc: 058d6014 streq r6, [sp, #20] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 300041c0: 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; 300041c4: e58dc00c str ip, [sp, #12] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 300041c8: e58dc000 str ip, [sp] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 300041cc: eb0003b8 bl 300050b4 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 300041d0: e59f3030 ldr r3, [pc, #48] ; 30004208 300041d4: e1d510b8 ldrh r1, [r5, #8] 300041d8: e593301c ldr r3, [r3, #28] 300041dc: e5952008 ldr r2, [r5, #8] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 300041e0: e585a00c str sl, [r5, #12] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 300041e4: e7835101 str r5, [r3, r1, lsl #2] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 300041e8: e5892000 str r2, [r9] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 300041ec: eb000809 bl 30006218 <_Thread_Enable_dispatch> 300041f0: e3a00000 mov r0, #0 ; 0x0 300041f4: ea000000 b 300041fc return RTEMS_SUCCESSFUL; 300041f8: e3a0000b mov r0, #11 ; 0xb } 300041fc: e28dd018 add sp, sp, #24 ; 0x18 30004200: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 30004204: 3001626c .word 0x3001626c 30004208: 30016188 .word 0x30016188 3001e838 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 3001e838: e52de004 push {lr} ; (str lr, [sp, #-4]!) 3001e83c: e24dd004 sub sp, sp, #4 ; 0x4 3001e840: e1a01000 mov r1, r0 3001e844: e1a0200d mov r2, sp 3001e848: e59f0048 ldr r0, [pc, #72] ; 3001e898 3001e84c: ebffa9c8 bl 30008f74 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 3001e850: e59d2000 ldr r2, [sp] 3001e854: e3520000 cmp r2, #0 ; 0x0 3001e858: 13a00004 movne r0, #4 ; 0x4 3001e85c: 1a00000b bne 3001e890 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 3001e860: e5903010 ldr r3, [r0, #16] 3001e864: e2800014 add r0, r0, #20 ; 0x14 3001e868: e2131030 ands r1, r3, #48 ; 0x30 3001e86c: 0a000003 beq 3001e880 _CORE_mutex_Flush( 3001e870: e1a01002 mov r1, r2 3001e874: e3a02001 mov r2, #1 ; 0x1 3001e878: ebffa65d bl 300081f4 <_CORE_mutex_Flush> 3001e87c: ea000001 b 3001e888 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 3001e880: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 3001e884: ebffa728 bl 3000852c <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 3001e888: ebffabfa bl 30009878 <_Thread_Enable_dispatch> 3001e88c: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3001e890: e28dd004 add sp, sp, #4 ; 0x4 3001e894: e8bd8000 pop {pc} 3001e898: 3005656c .word 0x3005656c 30013b2c : */ void rtems_shutdown_executive( uint32_t result ) { 30013b2c: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 30013b30: e59f2024 ldr r2, [pc, #36] ; 30013b5c */ void rtems_shutdown_executive( uint32_t result ) { 30013b34: e24dd030 sub sp, sp, #48 ; 0x30 if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 30013b38: e5923000 ldr r3, [r2] 30013b3c: e3530004 cmp r3, #4 ; 0x4 30013b40: 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 ); 30013b44: 11a0000d movne r0, sp 30013b48: 159f1010 ldrne r1, [pc, #16] ; 30013b60 30013b4c: 15823000 strne r3, [r2] 30013b50: 1bffcec5 blne 3000766c <_CPU_Context_switch> _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 30013b54: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED 30013b58: e8bd8000 pop {pc} <== NOT EXECUTED 30013b5c: 30016414 .word 0x30016414 30013b60: 3001623c .word 0x3001623c 3001ecec : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 3001ecec: e92d40f0 push {r4, r5, r6, r7, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 3001ecf0: e2516000 subs r6, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 3001ecf4: e24dd004 sub sp, sp, #4 ; 0x4 3001ecf8: e1a07002 mov r7, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 3001ecfc: 03a00009 moveq r0, #9 ; 0x9 3001ed00: 0a000022 beq 3001ed90 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 3001ed04: e1a0100d mov r1, sp 3001ed08: ebffaae3 bl 3000989c <_Thread_Get> switch (location) { 3001ed0c: e59d3000 ldr r3, [sp] rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 3001ed10: e1a05000 mov r5, r0 switch (location) { 3001ed14: e3530000 cmp r3, #0 ; 0x0 3001ed18: 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; 3001ed1c: 05954114 ldreq r4, [r5, #276] if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 3001ed20: 0a000008 beq 3001ed48 3001ed24: ea000019 b 3001ed90 <== 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) { 3001ed28: e5943004 ldr r3, [r4, #4] 3001ed2c: e1530006 cmp r3, r6 3001ed30: 1a000003 bne 3001ed44 tvp->dtor = dtor; 3001ed34: e5847010 str r7, [r4, #16] _Thread_Enable_dispatch(); 3001ed38: ebffaace bl 30009878 <_Thread_Enable_dispatch> 3001ed3c: e3a00000 mov r0, #0 ; 0x0 3001ed40: ea000012 b 3001ed90 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 3001ed44: 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) { 3001ed48: e3540000 cmp r4, #0 ; 0x0 3001ed4c: 1afffff5 bne 3001ed28 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 3001ed50: e3a00014 mov r0, #20 ; 0x14 3001ed54: ebffafb2 bl 3000ac24 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 3001ed58: e3500000 cmp r0, #0 ; 0x0 3001ed5c: 1a000002 bne 3001ed6c _Thread_Enable_dispatch(); 3001ed60: ebffaac4 bl 30009878 <_Thread_Enable_dispatch> 3001ed64: e3a0001a mov r0, #26 ; 0x1a 3001ed68: ea000008 b 3001ed90 } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 3001ed6c: 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; 3001ed70: 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; 3001ed74: 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; 3001ed78: e5803008 str r3, [r0, #8] new->ptr = ptr; 3001ed7c: e5806004 str r6, [r0, #4] new->dtor = dtor; 3001ed80: e5807010 str r7, [r0, #16] new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 3001ed84: e5802000 str r2, [r0] the_thread->task_variables = new; _Thread_Enable_dispatch(); 3001ed88: ebffaaba bl 30009878 <_Thread_Enable_dispatch> 3001ed8c: e1a00004 mov r0, r4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3001ed90: e28dd004 add sp, sp, #4 ; 0x4 3001ed94: e8bd80f0 pop {r4, r5, r6, r7, pc} 3001ed98 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 3001ed98: e92d4010 push {r4, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 3001ed9c: e2514000 subs r4, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 3001eda0: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 3001eda4: 0a000018 beq 3001ee0c return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 3001eda8: e1a0100d mov r1, sp 3001edac: ebffaaba bl 3000989c <_Thread_Get> switch (location) { 3001edb0: e59d3000 ldr r3, [sp] 3001edb4: e3530000 cmp r3, #0 ; 0x0 3001edb8: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 3001edbc: 01a02003 moveq r2, r3 3001edc0: 05901114 ldreq r1, [r0, #276] return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 3001edc4: 0a00000d beq 3001ee00 3001edc8: ea000010 b 3001ee10 <== NOT EXECUTED case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 3001edcc: e5913004 ldr r3, [r1, #4] 3001edd0: e1530004 cmp r3, r4 3001edd4: 1a000007 bne 3001edf8 3001edd8: e5913000 ldr r3, [r1] if (prev) 3001eddc: e3520000 cmp r2, #0 ; 0x0 prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 3001ede0: 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; 3001ede4: 15823000 strne r3, [r2] else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 3001ede8: eb000028 bl 3001ee90 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 3001edec: ebffaaa1 bl 30009878 <_Thread_Enable_dispatch> 3001edf0: e3a00000 mov r0, #0 ; 0x0 3001edf4: ea000005 b 3001ee10 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 3001edf8: e1a02001 mov r2, r1 3001edfc: e5911000 ldr r1, [r1] the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 3001ee00: e3510000 cmp r1, #0 ; 0x0 3001ee04: 1afffff0 bne 3001edcc return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 3001ee08: ebffaa9a bl 30009878 <_Thread_Enable_dispatch> 3001ee0c: e3a00009 mov r0, #9 ; 0x9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3001ee10: e28dd004 add sp, sp, #4 ; 0x4 3001ee14: e8bd8010 pop {r4, pc} 3001ee18 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 3001ee18: e92d4030 push {r4, r5, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 3001ee1c: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 3001ee20: e24dd004 sub sp, sp, #4 ; 0x4 3001ee24: e1a04002 mov r4, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 3001ee28: 0a000015 beq 3001ee84 return RTEMS_INVALID_ADDRESS; if ( !result ) 3001ee2c: e3520000 cmp r2, #0 ; 0x0 3001ee30: 0a000013 beq 3001ee84 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 3001ee34: e1a0100d mov r1, sp 3001ee38: ebffaa97 bl 3000989c <_Thread_Get> switch (location) { 3001ee3c: e59d3000 ldr r3, [sp] 3001ee40: e3530000 cmp r3, #0 ; 0x0 3001ee44: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 3001ee48: 05900114 ldreq r0, [r0, #276] if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 3001ee4c: 0a000009 beq 3001ee78 3001ee50: ea00000c b 3001ee88 <== NOT EXECUTED /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 3001ee54: e5903004 ldr r3, [r0, #4] 3001ee58: e1530005 cmp r3, r5 3001ee5c: 1a000004 bne 3001ee74 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 3001ee60: e590300c ldr r3, [r0, #12] 3001ee64: e5843000 str r3, [r4] _Thread_Enable_dispatch(); 3001ee68: ebffaa82 bl 30009878 <_Thread_Enable_dispatch> 3001ee6c: e3a00000 mov r0, #0 ; 0x0 3001ee70: ea000004 b 3001ee88 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 3001ee74: 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) { 3001ee78: e3500000 cmp r0, #0 ; 0x0 3001ee7c: 1afffff4 bne 3001ee54 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 3001ee80: ebffaa7c bl 30009878 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 3001ee84: e3a00009 mov r0, #9 ; 0x9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3001ee88: e28dd004 add sp, sp, #4 ; 0x4 3001ee8c: e8bd8030 pop {r4, r5, pc} 300053cc : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 300053cc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 300053d0: e251a000 subs sl, r1, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 300053d4: e1a07000 mov r7, r0 300053d8: e24dd004 sub sp, sp, #4 ; 0x4 300053dc: e1a06002 mov r6, r2 300053e0: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 300053e4: 03a0000a moveq r0, #10 ; 0xa 300053e8: 0a000022 beq 30005478 return RTEMS_INVALID_NUMBER; if ( !routine ) 300053ec: e3520000 cmp r2, #0 ; 0x0 300053f0: 03a00009 moveq r0, #9 ; 0x9 300053f4: 0a00001f beq 30005478 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 300053f8: e59f0080 ldr r0, [pc, #128] ; 30005480 300053fc: e1a01007 mov r1, r7 30005400: e1a0200d mov r2, sp 30005404: eb0004ab bl 300066b8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30005408: e59d3000 ldr r3, [sp] 3000540c: e1a04000 mov r4, r0 30005410: e3530000 cmp r3, #0 ; 0x0 30005414: 13a00004 movne r0, #4 ; 0x4 30005418: 1a000016 bne 30005478 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 3000541c: e2845010 add r5, r4, #16 ; 0x10 30005420: e1a00005 mov r0, r5 30005424: eb000b67 bl 300081c8 <_Watchdog_Remove> _ISR_Disable( level ); 30005428: e10f2000 mrs r2, CPSR 3000542c: e38230c0 orr r3, r2, #192 ; 0xc0 30005430: 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 ) { 30005434: e5943018 ldr r3, [r4, #24] 30005438: e3530000 cmp r3, #0 ; 0x0 3000543c: 0a000001 beq 30005448 _ISR_Enable( level ); 30005440: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 30005444: ea000009 b 30005470 <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30005448: e5843018 str r3, [r4, #24] the_watchdog->routine = routine; 3000544c: e584602c str r6, [r4, #44] the_watchdog->id = id; 30005450: e5847030 str r7, [r4, #48] the_watchdog->user_data = user_data; 30005454: 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; 30005458: e5843038 str r3, [r4, #56] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 3000545c: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005460: e59f001c ldr r0, [pc, #28] ; 30005484 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005464: e584a01c str sl, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005468: e1a01005 mov r1, r5 3000546c: eb000af9 bl 30008058 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 30005470: eb000694 bl 30006ec8 <_Thread_Enable_dispatch> 30005474: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30005478: e28dd004 add sp, sp, #4 ; 0x4 3000547c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30005480: 30015184 .word 0x30015184 30005484: 30014d04 .word 0x30014d04 30010c30 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 30010c30: e92d4030 push {r4, r5, lr} 30010c34: e24dd004 sub sp, sp, #4 ; 0x4 30010c38: e1a01000 mov r1, r0 30010c3c: e1a0200d mov r2, sp 30010c40: e59f00a4 ldr r0, [pc, #164] ; 30010cec 30010c44: eb0009fd bl 30013440 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30010c48: e59d3000 ldr r3, [sp] 30010c4c: e1a04000 mov r4, r0 30010c50: e3530000 cmp r3, #0 ; 0x0 30010c54: 13a00004 movne r0, #4 ; 0x4 30010c58: 1a000021 bne 30010ce4 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 30010c5c: e5943038 ldr r3, [r4, #56] 30010c60: e3530004 cmp r3, #4 ; 0x4 30010c64: 979ff103 ldrls pc, [pc, r3, lsl #2] 30010c68: ea00001b b 30010cdc <== NOT EXECUTED 30010c6c: 30010c80 .word 0x30010c80 <== NOT EXECUTED 30010c70: 30010c9c .word 0x30010c9c <== NOT EXECUTED 30010c74: 30010cd0 .word 0x30010cd0 <== NOT EXECUTED 30010c78: 30010cd0 .word 0x30010cd0 <== NOT EXECUTED 30010c7c: 30010cd0 .word 0x30010cd0 <== NOT EXECUTED case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 30010c80: e2844010 add r4, r4, #16 ; 0x10 30010c84: e1a00004 mov r0, r4 30010c88: eb0011e0 bl 30015410 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 30010c8c: e1a01004 mov r1, r4 30010c90: e59f0058 ldr r0, [pc, #88] ; 30010cf0 30010c94: eb001181 bl 300152a0 <_Watchdog_Insert> 30010c98: ea00000f b 30010cdc break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 30010c9c: e59f5050 ldr r5, [pc, #80] ; 30010cf4 30010ca0: e5953000 ldr r3, [r5] 30010ca4: e3530000 cmp r3, #0 ; 0x0 30010ca8: 1a000002 bne 30010cb8 _Thread_Enable_dispatch(); 30010cac: eb000c09 bl 30013cd8 <_Thread_Enable_dispatch> <== NOT EXECUTED 30010cb0: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED 30010cb4: ea00000a b 30010ce4 <== NOT EXECUTED return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 30010cb8: e2840010 add r0, r4, #16 ; 0x10 30010cbc: eb0011d3 bl 30015410 <_Watchdog_Remove> (*_Timer_Server_schedule_operation)( the_timer ); 30010cc0: e1a00004 mov r0, r4 30010cc4: e1a0e00f mov lr, pc 30010cc8: e595f000 ldr pc, [r5] 30010ccc: ea000002 b 30010cdc break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 30010cd0: eb000c00 bl 30013cd8 <_Thread_Enable_dispatch> 30010cd4: e3a0000b mov r0, #11 ; 0xb 30010cd8: ea000001 b 30010ce4 return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 30010cdc: eb000bfd bl 30013cd8 <_Thread_Enable_dispatch> 30010ce0: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30010ce4: e28dd004 add sp, sp, #4 ; 0x4 30010ce8: e8bd8030 pop {r4, r5, pc} 30010cec: 300309dc .word 0x300309dc 30010cf0: 300301c4 .word 0x300301c4 30010cf4: 30030a1c .word 0x30030a1c 30010cf8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30010cf8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30010cfc: e1a06000 mov r6, r0 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30010d00: e59f00c0 ldr r0, [pc, #192] ; 30010dc8 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30010d04: e24dd004 sub sp, sp, #4 ; 0x4 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30010d08: e5900000 ldr r0, [r0] Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30010d0c: e1a07001 mov r7, r1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30010d10: e3500000 cmp r0, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30010d14: e1a05002 mov r5, r2 30010d18: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30010d1c: 0280000e addeq r0, r0, #14 ; 0xe 30010d20: 0a000026 beq 30010dc0 return RTEMS_INCORRECT_STATE; if ( !routine ) 30010d24: e3520000 cmp r2, #0 ; 0x0 30010d28: 03a00009 moveq r0, #9 ; 0x9 30010d2c: 0a000023 beq 30010dc0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 30010d30: e3510000 cmp r1, #0 ; 0x0 30010d34: 03a0000a moveq r0, #10 ; 0xa 30010d38: 0a000020 beq 30010dc0 30010d3c: e59f0088 ldr r0, [pc, #136] ; 30010dcc 30010d40: e1a01006 mov r1, r6 30010d44: e1a0200d mov r2, sp 30010d48: eb0009bc bl 30013440 <_Objects_Get> return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30010d4c: e59d3000 ldr r3, [sp] 30010d50: e1a04000 mov r4, r0 30010d54: e3530000 cmp r3, #0 ; 0x0 30010d58: 13a00004 movne r0, #4 ; 0x4 30010d5c: 1a000017 bne 30010dc0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 30010d60: e2840010 add r0, r4, #16 ; 0x10 30010d64: eb0011a9 bl 30015410 <_Watchdog_Remove> _ISR_Disable( level ); 30010d68: e10f1000 mrs r1, CPSR 30010d6c: e38130c0 orr r3, r1, #192 ; 0xc0 30010d70: 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 ) { 30010d74: e5942018 ldr r2, [r4, #24] 30010d78: e3520000 cmp r2, #0 ; 0x0 30010d7c: 0a000001 beq 30010d88 _ISR_Enable( level ); 30010d80: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30010d84: ea00000b b 30010db8 <== 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; 30010d88: e3a03001 mov r3, #1 ; 0x1 30010d8c: e5843038 str r3, [r4, #56] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30010d90: e5842018 str r2, [r4, #24] the_watchdog->routine = routine; 30010d94: e584502c str r5, [r4, #44] the_watchdog->id = id; 30010d98: e5846030 str r6, [r4, #48] the_watchdog->user_data = user_data; 30010d9c: e5848034 str r8, [r4, #52] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 30010da0: e584701c str r7, [r4, #28] _ISR_Enable( level ); 30010da4: 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 ); 30010da8: e59f3020 ldr r3, [pc, #32] ; 30010dd0 30010dac: e1a00004 mov r0, r4 30010db0: e1a0e00f mov lr, pc 30010db4: e593f000 ldr pc, [r3] _Thread_Enable_dispatch(); 30010db8: eb000bc6 bl 30013cd8 <_Thread_Enable_dispatch> 30010dbc: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30010dc0: e28dd004 add sp, sp, #4 ; 0x4 30010dc4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30010dc8: 30030a20 .word 0x30030a20 30010dcc: 300309dc .word 0x300309dc 30010dd0: 30030a1c .word 0x30030a1c 300050ac : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 300050ac: e92d4010 push {r4, lr} void *ptr; /* * check the arguments */ if ( !pointer ) 300050b0: e2514000 subs r4, r1, #0 ; 0x0 300050b4: 0a000008 beq 300050dc return false; if ( !bytes ) 300050b8: e3500000 cmp r0, #0 ; 0x0 300050bc: 0a000006 beq 300050dc return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 300050c0: e1a01000 mov r1, r0 300050c4: e59f0018 ldr r0, [pc, #24] ; 300050e4 300050c8: eb00051e bl 30006548 <_Protected_heap_Allocate> if (!ptr) 300050cc: e3500000 cmp r0, #0 ; 0x0 return false; *pointer = ptr; 300050d0: 15840000 strne r0, [r4] 300050d4: 13a00001 movne r0, #1 ; 0x1 /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 300050d8: 18bd8010 popne {r4, pc} return false; *pointer = ptr; return true; 300050dc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 300050e0: e8bd8010 pop {r4, pc} <== NOT EXECUTED 300050e4: 3001ac0c .word 0x3001ac0c 3000509c : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 3000509c: e1a01000 mov r1, r0 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 300050a0: e59f0000 ldr r0, [pc, #0] ; 300050a8 <== NOT EXECUTED 300050a4: ea000536 b 30006584 <_Protected_heap_Free> <== NOT EXECUTED 300050a8: 3001ac0c .word 0x3001ac0c 30006818 : */ int sem_destroy( sem_t *sem ) { 30006818: e92d4010 push {r4, lr} 3000681c: e24dd004 sub sp, sp, #4 ; 0x4 30006820: e5901000 ldr r1, [r0] 30006824: e1a0200d mov r2, sp 30006828: e59f0048 ldr r0, [pc, #72] ; 30006878 3000682c: eb00085b bl 300089a0 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 30006830: e59d3000 ldr r3, [sp] 30006834: e3530000 cmp r3, #0 ; 0x0 30006838: 1a000008 bne 30006860 case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 3000683c: e5d04014 ldrb r4, [r0, #20] 30006840: e3540000 cmp r4, #0 ; 0x0 30006844: 0a000001 beq 30006850 _Thread_Enable_dispatch(); 30006848: eb000a58 bl 300091b0 <_Thread_Enable_dispatch> <== NOT EXECUTED 3000684c: ea000003 b 30006860 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 30006850: eb001874 bl 3000ca28 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 30006854: eb000a55 bl 300091b0 <_Thread_Enable_dispatch> 30006858: e1a00004 mov r0, r4 3000685c: ea000003 b 30006870 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 30006860: eb002076 bl 3000ea40 <__errno> 30006864: e3a03016 mov r3, #22 ; 0x16 30006868: e5803000 str r3, [r0] 3000686c: e3e00000 mvn r0, #0 ; 0x0 } 30006870: e28dd004 add sp, sp, #4 ; 0x4 30006874: e8bd8010 pop {r4, pc} 30006878: 3001c760 .word 0x3001c760 300068d4 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 300068d4: e92d4010 push {r4, lr} int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 300068d8: e2504000 subs r4, r0, #0 ; 0x0 int sem_init( sem_t *sem, int pshared, unsigned int value ) { 300068dc: e24dd004 sub sp, sp, #4 ; 0x4 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 300068e0: 1a000004 bne 300068f8 rtems_set_errno_and_return_minus_one( EINVAL ); 300068e4: eb002055 bl 3000ea40 <__errno> <== NOT EXECUTED 300068e8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 300068ec: e5803000 str r3, [r0] <== NOT EXECUTED 300068f0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300068f4: ea000006 b 30006914 <== NOT EXECUTED status = _POSIX_Semaphore_Create_support( 300068f8: e1a0300d mov r3, sp 300068fc: e3a00000 mov r0, #0 ; 0x0 30006900: eb00180a bl 3000c930 <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 30006904: e3700001 cmn r0, #1 ; 0x1 *sem = the_semaphore->Object.id; 30006908: 159d3000 ldrne r3, [sp] 3000690c: 15933008 ldrne r3, [r3, #8] 30006910: 15843000 strne r3, [r4] return status; } 30006914: e28dd004 add sp, sp, #4 ; 0x4 30006918: e8bd8010 pop {r4, pc} 300064b4 : int sigwait( const sigset_t *set, int *sig ) { 300064b4: e92d4010 push {r4, lr} 300064b8: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 300064bc: e3a01000 mov r1, #0 ; 0x0 300064c0: e1a02001 mov r2, r1 300064c4: ebffff8d bl 30006300 if ( status != -1 ) { 300064c8: e3700001 cmn r0, #1 ; 0x1 300064cc: 0a000004 beq 300064e4 if ( sig ) 300064d0: e3540000 cmp r4, #0 ; 0x0 *sig = status; 300064d4: 15840000 strne r0, [r4] int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 300064d8: 01a00004 moveq r0, r4 *sig = status; 300064dc: 13a00000 movne r0, #0 ; 0x0 300064e0: e8bd8010 pop {r4, pc} return 0; } return errno; 300064e4: eb001ed8 bl 3000e04c <__errno> <== NOT EXECUTED 300064e8: e5900000 ldr r0, [r0] <== NOT EXECUTED } 300064ec: e8bd8010 pop {r4, pc} <== NOT EXECUTED 300054b8 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 300054b8: e92d40f0 push {r4, r5, r6, r7, lr} Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 300054bc: e2525000 subs r5, r2, #0 ; 0x0 timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 300054c0: e24dd018 sub sp, sp, #24 ; 0x18 300054c4: e1a07000 mov r7, r0 300054c8: e1a06003 mov r6, r3 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 300054cc: 0a000054 beq 30005624 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 ) || 300054d0: e59f2164 ldr r2, [pc, #356] ; 3000563c 300054d4: e595300c ldr r3, [r5, #12] 300054d8: e1530002 cmp r3, r2 300054dc: 8a000050 bhi 30005624 300054e0: e5953004 ldr r3, [r5, #4] 300054e4: e1530002 cmp r3, r2 300054e8: 8a00004d bhi 30005624 300054ec: e3530000 cmp r3, #0 ; 0x0 300054f0: ba00004b blt 30005624 ( 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 ) { 300054f4: e3510004 cmp r1, #4 ; 0x4 300054f8: 13510000 cmpne r1, #0 ; 0x0 300054fc: 1a000048 bne 30005624 } normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 30005500: e3510004 cmp r1, #4 ; 0x4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 30005504: e28dc004 add ip, sp, #4 ; 0x4 30005508: e895000f ldm r5, {r0, r1, r2, r3} 3000550c: e88c000f stm ip, {r0, r1, r2, r3} /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 30005510: 1a000009 bne 3000553c /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 30005514: e28c4008 add r4, ip, #8 ; 0x8 30005518: e59f0120 ldr r0, [pc, #288] ; 30005640 3000551c: e1a01004 mov r1, r4 30005520: eb000da0 bl 30008ba8 <_Timespec_Greater_than> 30005524: e3500000 cmp r0, #0 ; 0x0 30005528: 1a00003d bne 30005624 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 3000552c: e1a01004 mov r1, r4 30005530: e59f0108 ldr r0, [pc, #264] ; 30005640 30005534: e1a02004 mov r2, r4 30005538: eb000da7 bl 30008bdc <_Timespec_Subtract> 3000553c: e1a01007 mov r1, r7 30005540: e59f00fc ldr r0, [pc, #252] ; 30005644 30005544: e28d2014 add r2, sp, #20 ; 0x14 30005548: eb0007f5 bl 30007524 <_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 ) { 3000554c: e59d3014 ldr r3, [sp, #20] 30005550: e1a04000 mov r4, r0 30005554: e3530000 cmp r3, #0 ; 0x0 30005558: 1a000031 bne 30005624 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 ) { 3000555c: e59d300c ldr r3, [sp, #12] 30005560: e3530000 cmp r3, #0 ; 0x0 30005564: 1a00000f bne 300055a8 30005568: e59d3010 ldr r3, [sp, #16] 3000556c: e3530000 cmp r3, #0 ; 0x0 30005570: 1a00000c bne 300055a8 /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 30005574: e2800010 add r0, r0, #16 ; 0x10 30005578: eb000ecc bl 300090b0 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 3000557c: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 30005580: 12843054 addne r3, r4, #84 ; 0x54 30005584: 1893000f ldmne r3, {r0, r1, r2, r3} 30005588: 1886000f stmne r6, {r0, r1, r2, r3} /* The new data are set */ ptimer->timer_data = normalize; 3000558c: e284c054 add ip, r4, #84 ; 0x54 30005590: e28d3004 add r3, sp, #4 ; 0x4 30005594: e893000f ldm r3, {r0, r1, r2, r3} 30005598: e88c000f stm ip, {r0, r1, r2, r3} /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 3000559c: e3a03004 mov r3, #4 ; 0x4 300055a0: e5c4303c strb r3, [r4, #60] 300055a4: ea00001b b 30005618 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 300055a8: e1a00005 mov r0, r5 300055ac: eb000d9b bl 30008c20 <_Timespec_To_ticks> 300055b0: e5840064 str r0, [r4, #100] initial_period = _Timespec_To_ticks( &normalize.it_value ); 300055b4: e28d000c add r0, sp, #12 ; 0xc 300055b8: eb000d98 bl 30008c20 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 300055bc: 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 ); 300055c0: e1a01000 mov r1, r0 activated = _POSIX_Timer_Insert_helper( 300055c4: e5942008 ldr r2, [r4, #8] 300055c8: e2840010 add r0, r4, #16 ; 0x10 300055cc: e59f3074 ldr r3, [pc, #116] ; 30005648 300055d0: eb0017d5 bl 3000b52c <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 300055d4: e2505000 subs r5, r0, #0 ; 0x0 300055d8: 1a000002 bne 300055e8 _Thread_Enable_dispatch(); 300055dc: eb0009d4 bl 30007d34 <_Thread_Enable_dispatch> <== NOT EXECUTED 300055e0: e1a00005 mov r0, r5 <== NOT EXECUTED 300055e4: ea000012 b 30005634 <== NOT EXECUTED /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 300055e8: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 300055ec: 12843054 addne r3, r4, #84 ; 0x54 300055f0: 1893000f ldmne r3, {r0, r1, r2, r3} 300055f4: 1886000f stmne r6, {r0, r1, r2, r3} ptimer->timer_data = normalize; 300055f8: e284c054 add ip, r4, #84 ; 0x54 300055fc: e28d3004 add r3, sp, #4 ; 0x4 30005600: e893000f ldm r3, {r0, r1, r2, r3} 30005604: e88c000f stm ip, {r0, r1, r2, r3} /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 30005608: e3a03003 mov r3, #3 ; 0x3 3000560c: e5c4303c strb r3, [r4, #60] _TOD_Get( &ptimer->time ); 30005610: e284006c add r0, r4, #108 ; 0x6c 30005614: eb0005ab bl 30006cc8 <_TOD_Get> _Thread_Enable_dispatch(); 30005618: eb0009c5 bl 30007d34 <_Thread_Enable_dispatch> 3000561c: e3a00000 mov r0, #0 ; 0x0 30005620: ea000003 b 30005634 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 30005624: eb001ee8 bl 3000d1cc <__errno> 30005628: e3a03016 mov r3, #22 ; 0x16 3000562c: e5803000 str r3, [r0] 30005630: e3e00000 mvn r0, #0 ; 0x0 } 30005634: e28dd018 add sp, sp, #24 ; 0x18 30005638: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000563c: 3b9ac9ff .word 0x3b9ac9ff 30005640: 3001aa54 .word 0x3001aa54 30005644: 3001aca0 .word 0x3001aca0 30005648: 3000564c .word 0x3000564c