0000716c <_CORE_RWLock_Release>: CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ISR_Level level; Thread_Control *executing = _Thread_Executing; 716c: e59f30e4 ldr r3, [pc, #228] ; 7258 <_CORE_RWLock_Release+0xec> */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 7170: e92d4010 push {r4, lr} ISR_Level level; Thread_Control *executing = _Thread_Executing; 7174: e5931000 ldr r1, [r3] */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 7178: 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 ); 717c: e10f2000 mrs r2, CPSR 7180: e38230c0 orr r3, r2, #192 ; 0xc0 7184: e129f003 msr CPSR_fc, r3 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 7188: e5903044 ldr r3, [r0, #68] 718c: e3530000 cmp r3, #0 ; 0x0 7190: 0a00002b beq 7244 <_CORE_RWLock_Release+0xd8> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 7194: e3530001 cmp r3, #1 ; 0x1 7198: 0a000021 beq 7224 <_CORE_RWLock_Release+0xb8> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 719c: e3a03000 mov r3, #0 ; 0x0 71a0: 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; 71a4: e5843044 str r3, [r4, #68] _ISR_Enable( level ); 71a8: e129f002 msr CPSR_fc, r2 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 71ac: e1a00004 mov r0, r4 71b0: eb0005b9 bl 889c <_Thread_queue_Dequeue> if ( next ) { 71b4: e3500000 cmp r0, #0 ; 0x0 71b8: 0a000017 beq 721c <_CORE_RWLock_Release+0xb0> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 71bc: e5903030 ldr r3, [r0, #48] 71c0: e3530001 cmp r3, #1 ; 0x1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 71c4: 02833001 addeq r3, r3, #1 ; 0x1 71c8: 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 ) { 71cc: 0a000012 beq 721c <_CORE_RWLock_Release+0xb0> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 71d0: e5943048 ldr r3, [r4, #72] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 71d4: e3a02001 mov r2, #1 ; 0x1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 71d8: e2833001 add r3, r3, #1 ; 0x1 71dc: e5843048 str r3, [r4, #72] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 71e0: e5842044 str r2, [r4, #68] 71e4: ea000006 b 7204 <_CORE_RWLock_Release+0x98> /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 71e8: e5933030 ldr r3, [r3, #48] 71ec: e3530001 cmp r3, #1 ; 0x1 71f0: 0a000009 beq 721c <_CORE_RWLock_Release+0xb0> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 71f4: e5943048 ldr r3, [r4, #72] 71f8: e2833001 add r3, r3, #1 ; 0x1 71fc: e5843048 str r3, [r4, #72] _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 7200: eb0006bb bl 8cf4 <_Thread_queue_Extract> /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 7204: e1a00004 mov r0, r4 7208: eb000706 bl 8e28 <_Thread_queue_First> if ( !next || 720c: 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 ); 7210: e1a01003 mov r1, r3 7214: 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 || 7218: 1afffff2 bne 71e8 <_CORE_RWLock_Release+0x7c> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 721c: e3a00000 mov r0, #0 ; 0x0 7220: e8bd8010 pop {r4, pc} _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; 7224: e5903048 ldr r3, [r0, #72] 7228: e2433001 sub r3, r3, #1 ; 0x1 if ( the_rwlock->number_of_readers != 0 ) { 722c: 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; 7230: e5803048 str r3, [r0, #72] if ( the_rwlock->number_of_readers != 0 ) { 7234: 0affffd8 beq 719c <_CORE_RWLock_Release+0x30> /* must be unlocked again */ _ISR_Enable( level ); 7238: e129f002 msr CPSR_fc, r2 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 723c: e3a00000 mov r0, #0 ; 0x0 7240: e8bd8010 pop {r4, pc} * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 7244: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 7248: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 724c: e5813034 str r3, [r1, #52] <== NOT EXECUTED } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 7250: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 7254: e8bd8010 pop {r4, pc} <== NOT EXECUTED 7258: 00019644 .word 0x00019644 000136cc <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 136cc: e590304c ldr r3, [r0, #76] 136d0: e1530002 cmp r3, r2 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 136d4: e92d41f0 push {r4, r5, r6, r7, r8, lr} 136d8: e1a07000 mov r7, r0 136dc: e1a06002 mov r6, r2 136e0: e1a08001 mov r8, r1 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 136e4: 33a00001 movcc r0, #1 ; 0x1 136e8: 38bd81f0 popcc {r4, r5, r6, r7, r8, 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 ) { 136ec: e5973048 ldr r3, [r7, #72] 136f0: e3530000 cmp 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))) { 136f4: 01a05003 moveq r5, 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 ) { 136f8: 0a000009 beq 13724 <_CORE_message_queue_Broadcast+0x58> *count = 0; 136fc: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED 13700: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 13704: e5823000 str r3, [r2] <== NOT EXECUTED 13708: e1a00003 mov r0, r3 <== NOT EXECUTED 1370c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 13710: e594002c ldr r0, [r4, #44] 13714: eb0020f1 bl 1bae0 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 13718: e5943028 ldr r3, [r4, #40] 1371c: e5836000 str r6, [r3] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 13720: e2855001 add r5, r5, #1 ; 0x1 * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 13724: e1a00007 mov r0, r7 13728: eb00099d bl 15da4 <_Thread_queue_Dequeue> 1372c: e2504000 subs r4, r0, #0 ; 0x0 13730: e1a01008 mov r1, r8 13734: e1a02006 mov r2, r6 13738: 1afffff4 bne 13710 <_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; 1373c: e59d301c ldr r3, [sp, #28] 13740: e1a00004 mov r0, r4 13744: e5835000 str r5, [r3] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 13748: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00012740 <_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 ) { 12740: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 12744: e590c04c ldr ip, [r0, #76] 12748: e15c0002 cmp ip, r2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 1274c: e1a04000 mov r4, r0 12750: e1a07002 mov r7, r2 12754: e1a0a001 mov sl, r1 12758: e1a09003 mov r9, r3 1275c: e5dd8028 ldrb r8, [sp, #40] ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 12760: 33a00001 movcc r0, #1 ; 0x1 12764: 38bd87f0 popcc {r4, r5, r6, r7, r8, r9, sl, pc} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 12768: e5945048 ldr r5, [r4, #72] 1276c: e3550000 cmp r5, #0 ; 0x0 12770: 0a00001d beq 127ec <_CORE_message_queue_Submit+0xac> /* * 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 < 12774: e5943044 ldr r3, [r4, #68] 12778: e1530005 cmp r3, r5 1277c: 8a00002a bhi 1282c <_CORE_message_queue_Submit+0xec> * 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 ) { 12780: e3580000 cmp r8, #0 ; 0x0 12784: 03a00002 moveq r0, #2 ; 0x2 12788: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, 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() ) { 1278c: e59f30dc ldr r3, [pc, #220] ; 12870 <_CORE_message_queue_Submit+0x130> 12790: e5932000 ldr r2, [r3] 12794: e3520000 cmp r2, #0 ; 0x0 12798: 1a000021 bne 12824 <_CORE_message_queue_Submit+0xe4> * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 1279c: e59f30d0 ldr r3, [pc, #208] ; 12874 <_CORE_message_queue_Submit+0x134> 127a0: e5932000 ldr r2, [r3] _ISR_Disable( level ); 127a4: e10f1000 mrs r1, CPSR 127a8: e38130c0 orr r3, r1, #192 ; 0xc0 127ac: e129f003 msr CPSR_fc, r3 _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; 127b0: e59d3024 ldr r3, [sp, #36] 127b4: e5823024 str r3, [r2, #36] 127b8: e3a03001 mov r3, #1 ; 0x1 127bc: e5843030 str r3, [r4, #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; executing->Wait.id = id; 127c0: e5829020 str r9, [r2, #32] executing->Wait.return_argument_second.immutable_object = buffer; 127c4: e582a02c str sl, [r2, #44] executing->Wait.option = (uint32_t) size; 127c8: e5827030 str r7, [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; 127cc: e5824044 str r4, [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 ); 127d0: e129f001 msr CPSR_fc, r1 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 127d4: e59f209c ldr r2, [pc, #156] ; 12878 <_CORE_message_queue_Submit+0x138> 127d8: e1a00004 mov r0, r4 127dc: e59d102c ldr r1, [sp, #44] 127e0: ebffe906 bl cc00 <_Thread_queue_Enqueue_with_handler> 127e4: e3a00007 mov r0, #7 ; 0x7 127e8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 127ec: ebffe8a1 bl ca78 <_Thread_queue_Dequeue> if ( the_thread ) { 127f0: e2506000 subs r6, r0, #0 ; 0x0 127f4: 05945048 ldreq r5, [r4, #72] 127f8: 0affffdd beq 12774 <_CORE_message_queue_Submit+0x34> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 127fc: e1a0100a mov r1, sl 12800: e596002c ldr r0, [r6, #44] 12804: e1a02007 mov r2, r7 12808: eb001412 bl 17858 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1280c: e5963028 ldr r3, [r6, #40] 12810: e5837000 str r7, [r3] the_thread->Wait.count = submit_type; 12814: e59d3024 ldr r3, [sp, #36] 12818: e1a00005 mov r0, r5 1281c: e5863024 str r3, [r6, #36] 12820: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 12824: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED } 12828: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 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 *) 1282c: e2840068 add r0, r4, #104 ; 0x68 12830: ebffe1f1 bl affc <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 12834: e2505000 subs r5, r0, #0 ; 0x0 12838: 0afffff9 beq 12824 <_CORE_message_queue_Submit+0xe4> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1283c: e1a0100a mov r1, sl 12840: e1a02007 mov r2, r7 12844: e2850010 add r0, r5, #16 ; 0x10 12848: eb001402 bl 17858 buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; the_message->priority = submit_type; 1284c: e59d3024 ldr r3, [sp, #36] 12850: e5853008 str r3, [r5, #8] _CORE_message_queue_Insert_message( 12854: e1a00004 mov r0, r4 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 12858: e585700c str r7, [r5, #12] the_message->priority = submit_type; _CORE_message_queue_Insert_message( 1285c: e1a01005 mov r1, r5 12860: e59d2024 ldr r2, [sp, #36] 12864: eb000c31 bl 15930 <_CORE_message_queue_Insert_message> 12868: e3a00000 mov r0, #0 ; 0x0 1286c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 12870: 000272e0 .word 0x000272e0 12874: 00027304 .word 0x00027304 12878: 0000d034 .word 0x0000d034 000052e4 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 52e4: e92d40f0 push {r4, r5, r6, r7, lr} 52e8: e1a05000 mov r5, r0 52ec: e1a04002 mov r4, r2 52f0: e1a07001 mov r7, r1 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 52f4: e891000f ldm r1, {r0, r1, r2, r3} the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; 52f8: e3a06000 mov r6, #0 ; 0x0 if ( initial_lock == CORE_MUTEX_LOCKED ) { 52fc: e3540000 cmp r4, #0 ; 0x0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 5300: e285c040 add ip, r5, #64 ; 0x40 5304: e88c000f stm ip, {r0, r1, r2, r3} the_mutex->lock = initial_lock; 5308: e5854050 str r4, [r5, #80] the_mutex->blocked_count = 0; 530c: e5856058 str r6, [r5, #88] _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; 5310: 15856060 strne r6, [r5, #96] #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; 5314: 15856054 strne r6, [r5, #84] the_mutex->holder = NULL; 5318: 1585605c strne r6, [r5, #92] the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 531c: 1a00000b bne 5350 <_CORE_mutex_Initialize+0x6c> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 5320: e59f2070 ldr r2, [pc, #112] ; 5398 <_CORE_mutex_Initialize+0xb4> the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 5324: e3a03001 mov r3, #1 ; 0x1 the_mutex->holder = _Thread_Executing; 5328: e5921000 ldr r1, [r2] the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 532c: e5853054 str r3, [r5, #84] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 5330: e5952048 ldr r2, [r5, #72] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 5334: e5913008 ldr r3, [r1, #8] if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 5338: e3520002 cmp r2, #2 ; 0x2 the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 533c: e5853060 str r3, [r5, #96] the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 5340: e585105c str r1, [r5, #92] the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 5344: 0a00000a beq 5374 <_CORE_mutex_Initialize+0x90> 5348: e3520003 cmp r2, #3 ; 0x3 534c: 0a000008 beq 5374 <_CORE_mutex_Initialize+0x90> the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 5350: e5971008 ldr r1, [r7, #8] 5354: e1a00005 mov r0, r5 5358: e2511000 subs r1, r1, #0 ; 0x0 535c: 13a01001 movne r1, #1 ; 0x1 5360: e3a02b01 mov r2, #1024 ; 0x400 5364: e3a03005 mov r3, #5 ; 0x5 5368: eb000768 bl 7110 <_Thread_queue_Initialize> 536c: e3a00000 mov r0, #0 ; 0x0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 5370: e8bd80f0 pop {r4, r5, r6, r7, pc} the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 5374: e595304c ldr r3, [r5, #76] 5378: e5912014 ldr r2, [r1, #20] 537c: e1520003 cmp r2, r3 _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 5380: 2591301c ldrcs r3, [r1, #28] 5384: 22833001 addcs r3, r3, #1 ; 0x1 the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 5388: 33a00006 movcc r0, #6 ; 0x6 _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 538c: 2581301c strcs r3, [r1, #28] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 5390: 2affffee bcs 5350 <_CORE_mutex_Initialize+0x6c> 5394: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 5398: 00016fc4 .word 0x00016fc4 0000a6dc <_CORE_mutex_Seize_interrupt_trylock>: Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; a6dc: e59f313c ldr r3, [pc, #316] ; a820 <_CORE_mutex_Seize_interrupt_trylock+0x144> a6e0: e593c000 ldr ip, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; a6e4: e3a02000 mov r2, #0 ; 0x0 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { a6e8: e92d4010 push {r4, lr} CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; a6ec: e5914000 ldr r4, [r1] /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; a6f0: e58c2034 str r2, [ip, #52] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { a6f4: e5903050 ldr r3, [r0, #80] a6f8: e1530002 cmp r3, r2 a6fc: 0a00000d beq a738 <_CORE_mutex_Seize_interrupt_trylock+0x5c> the_mutex->lock = CORE_MUTEX_LOCKED; a700: e5802050 str r2, [r0, #80] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; a704: e5901048 ldr r1, [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; a708: e59c2008 ldr r2, [ip, #8] the_mutex->nest_count = 1; a70c: e3a03001 mov r3, #1 ; 0x1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || a710: e3510002 cmp r1, #2 ; 0x2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; a714: e5802060 str r2, [r0, #96] the_mutex->nest_count = 1; a718: 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; a71c: 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 ) || a720: 0a000009 beq a74c <_CORE_mutex_Seize_interrupt_trylock+0x70> a724: e3510003 cmp r1, #3 ; 0x3 a728: 0a000007 beq a74c <_CORE_mutex_Seize_interrupt_trylock+0x70> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); a72c: e129f004 msr CPSR_fc, r4 a730: e3a00000 mov r0, #0 ; 0x0 a734: e8bd8010 pop {r4, pc} /* * 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 ) ) { a738: e590305c ldr r3, [r0, #92] a73c: e15c0003 cmp ip, r3 a740: 0a000017 beq a7a4 <_CORE_mutex_Seize_interrupt_trylock+0xc8> the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( level ); a744: e3a00001 mov r0, #1 ; 0x1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } a748: e8bd8010 pop {r4, pc} _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; a74c: e59c301c ldr r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { a750: e3510003 cmp r1, #3 ; 0x3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; a754: e2833001 add r3, r3, #1 ; 0x1 a758: e58c301c str r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { a75c: 1afffff2 bne a72c <_CORE_mutex_Seize_interrupt_trylock+0x50> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; a760: e590204c ldr r2, [r0, #76] current = executing->current_priority; a764: e59c3014 ldr r3, [ip, #20] if ( current == ceiling ) { a768: e1520003 cmp r2, r3 a76c: 0a00001c beq a7e4 <_CORE_mutex_Seize_interrupt_trylock+0x108> _ISR_Enable( level ); return 0; } if ( current > ceiling ) { a770: 3a00001e bcc a7f0 <_CORE_mutex_Seize_interrupt_trylock+0x114> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; a774: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ a778: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; a77c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; a780: e58c3034 str r3, [ip, #52] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ a784: e5802054 str r2, [r0, #84] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; a788: e5801050 str r1, [r0, #80] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ a78c: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED a790: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED a794: e58c301c str r3, [ip, #28] <== NOT EXECUTED _ISR_Enable( level ); a798: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED a79c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED a7a0: e8bd8010 pop {r4, pc} <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { a7a4: e5903040 ldr r3, [r0, #64] a7a8: e3530000 cmp r3, #0 ; 0x0 a7ac: 0a000006 beq a7cc <_CORE_mutex_Seize_interrupt_trylock+0xf0> a7b0: e3530001 cmp r3, #1 ; 0x1 a7b4: 1affffe2 bne a744 <_CORE_mutex_Seize_interrupt_trylock+0x68> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; a7b8: e3a03002 mov r3, #2 ; 0x2 a7bc: e58c3034 str r3, [ip, #52] _ISR_Enable( level ); a7c0: e129f004 msr CPSR_fc, r4 a7c4: e3a00000 mov r0, #0 ; 0x0 a7c8: e8bd8010 pop {r4, pc} * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; a7cc: e5903054 ldr r3, [r0, #84] a7d0: e2833001 add r3, r3, #1 ; 0x1 a7d4: e5803054 str r3, [r0, #84] _ISR_Enable( level ); a7d8: e129f004 msr CPSR_fc, r4 a7dc: e3a00000 mov r0, #0 ; 0x0 a7e0: e8bd8010 pop {r4, pc} Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); a7e4: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED a7e8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED a7ec: e8bd8010 pop {r4, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a7f0: e59f202c ldr r2, [pc, #44] ; a824 <_CORE_mutex_Seize_interrupt_trylock+0x148> a7f4: e5923000 ldr r3, [r2] a7f8: e2833001 add r3, r3, #1 ; 0x1 a7fc: e5823000 str r3, [r2] return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( level ); a800: e129f004 msr CPSR_fc, r4 _Thread_Change_priority( a804: e3a02000 mov r2, #0 ; 0x0 a808: e590104c ldr r1, [r0, #76] a80c: e590005c ldr r0, [r0, #92] a810: ebffeeb8 bl 62f8 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); a814: ebfff029 bl 68c0 <_Thread_Enable_dispatch> a818: e3a00000 mov r0, #0 ; 0x0 a81c: e8bd8010 pop {r4, pc} a820: 00016fc4 .word 0x00016fc4 a824: 00016f0c .word 0x00016f0c 000054d4 <_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 ) { 54d4: e5d03044 ldrb r3, [r0, #68] 54d8: 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 ) { 54dc: e92d4010 push {r4, lr} 54e0: 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; 54e4: 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 ) { 54e8: 0a000004 beq 5500 <_CORE_mutex_Surrender+0x2c> if ( !_Thread_Is_executing( holder ) ) 54ec: e59f3138 ldr r3, [pc, #312] ; 562c <_CORE_mutex_Surrender+0x158> 54f0: e5932000 ldr r2, [r3] 54f4: e1500002 cmp r0, r2 54f8: 13a00003 movne r0, #3 ; 0x3 54fc: 18bd8010 popne {r4, pc} return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 5500: e5943054 ldr r3, [r4, #84] 5504: e3530000 cmp r3, #0 ; 0x0 5508: 0a000020 beq 5590 <_CORE_mutex_Surrender+0xbc> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 550c: e2433001 sub r3, r3, #1 ; 0x1 if ( the_mutex->nest_count != 0 ) { 5510: 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--; 5514: e5843054 str r3, [r4, #84] if ( the_mutex->nest_count != 0 ) { 5518: 1a00001e bne 5598 <_CORE_mutex_Surrender+0xc4> 551c: e5942048 ldr r2, [r4, #72] /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 5520: e3520002 cmp r2, #2 ; 0x2 5524: 0a00002c beq 55dc <_CORE_mutex_Surrender+0x108> 5528: e3520003 cmp r2, #3 ; 0x3 552c: 0a00002a beq 55dc <_CORE_mutex_Surrender+0x108> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 5530: 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 ) || 5534: 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; 5538: e5843060 str r3, [r4, #96] } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 553c: 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 ) || 5540: 0a00001b beq 55b4 <_CORE_mutex_Surrender+0xe0> 5544: e3520003 cmp r2, #3 ; 0x3 5548: 0a000019 beq 55b4 <_CORE_mutex_Surrender+0xe0> /* * 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 ) ) ) { 554c: e1a00004 mov r0, r4 5550: eb0005c0 bl 6c58 <_Thread_queue_Dequeue> 5554: e2501000 subs r1, r0, #0 ; 0x0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 5558: 03a03001 moveq r3, #1 ; 0x1 555c: 05843050 streq r3, [r4, #80] 5560: 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 ) ) ) { 5564: 08bd8010 popeq {r4, pc} the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 5568: e594c048 ldr ip, [r4, #72] } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 556c: e5912008 ldr r2, [r1, #8] the_mutex->nest_count = 1; 5570: e3a03001 mov r3, #1 ; 0x1 switch ( the_mutex->Attributes.discipline ) { 5574: e35c0002 cmp ip, #2 ; 0x2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 5578: e5842060 str r2, [r4, #96] the_mutex->nest_count = 1; 557c: e5843054 str r3, [r4, #84] } else #endif { the_mutex->holder = the_thread; 5580: e584105c str r1, [r4, #92] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 5584: 0a000023 beq 5618 <_CORE_mutex_Surrender+0x144> 5588: e35c0003 cmp ip, #3 ; 0x3 558c: 0a000016 beq 55ec <_CORE_mutex_Surrender+0x118> } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 5590: e3a00000 mov r0, #0 ; 0x0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 5594: e8bd8010 pop {r4, pc} return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 5598: e5943040 ldr r3, [r4, #64] 559c: e3530000 cmp r3, #0 ; 0x0 55a0: 0afffffa beq 5590 <_CORE_mutex_Surrender+0xbc> 55a4: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 55a8: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 55ac: 1affffda bne 551c <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 55b0: e8bd8010 pop {r4, pc} <== NOT EXECUTED _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 && 55b4: e590301c ldr r3, [r0, #28] 55b8: e3530000 cmp r3, #0 ; 0x0 55bc: 1affffe2 bne 554c <_CORE_mutex_Surrender+0x78> 55c0: e5901018 ldr r1, [r0, #24] 55c4: e5903014 ldr r3, [r0, #20] 55c8: e1510003 cmp r1, r3 55cc: 0affffde beq 554c <_CORE_mutex_Surrender+0x78> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 55d0: e3a02001 mov r2, #1 ; 0x1 55d4: eb000347 bl 62f8 <_Thread_Change_priority> 55d8: eaffffdb b 554c <_CORE_mutex_Surrender+0x78> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 55dc: e590301c ldr r3, [r0, #28] 55e0: e2433001 sub r3, r3, #1 ; 0x1 55e4: e580301c str r3, [r0, #28] 55e8: eaffffd0 b 5530 <_CORE_mutex_Surrender+0x5c> 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++; 55ec: e591301c ldr r3, [r1, #28] <== NOT EXECUTED 55f0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 55f4: e581301c str r3, [r1, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 55f8: e5912014 ldr r2, [r1, #20] <== NOT EXECUTED 55fc: e594104c ldr r1, [r4, #76] <== NOT EXECUTED 5600: e1510002 cmp r1, r2 <== NOT EXECUTED 5604: 2affffe1 bcs 5590 <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 5608: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 560c: eb000339 bl 62f8 <_Thread_Change_priority> <== NOT EXECUTED 5610: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 5614: e8bd8010 pop {r4, pc} <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 5618: e591301c ldr r3, [r1, #28] 561c: e2833001 add r3, r3, #1 ; 0x1 5620: e581301c str r3, [r1, #28] 5624: e3a00000 mov r0, #0 ; 0x0 5628: e8bd8010 pop {r4, pc} 562c: 00016fc4 .word 0x00016fc4 00005f2c <_CORE_spinlock_Release>: CORE_spinlock_Control *the_spinlock ) { ISR_Level level; _ISR_Disable( level ); 5f2c: e10fc000 mrs ip, CPSR 5f30: e38c30c0 orr r3, ip, #192 ; 0xc0 5f34: e129f003 msr CPSR_fc, r3 /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 5f38: e5903004 ldr r3, [r0, #4] 5f3c: e3530000 cmp r3, #0 ; 0x0 5f40: 1a000002 bne 5f50 <_CORE_spinlock_Release+0x24> _ISR_Enable( level ); 5f44: e129f00c msr CPSR_fc, ip 5f48: e3a00006 mov r0, #6 ; 0x6 5f4c: e12fff1e bx lr } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 5f50: e59f3040 ldr r3, [pc, #64] ; 5f98 <_CORE_spinlock_Release+0x6c> 5f54: e5932000 ldr r2, [r3] 5f58: e590300c ldr r3, [r0, #12] 5f5c: e5921008 ldr r1, [r2, #8] 5f60: e1530001 cmp r3, r1 5f64: 0a000002 beq 5f74 <_CORE_spinlock_Release+0x48> _ISR_Enable( level ); 5f68: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 5f6c: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 5f70: e12fff1e bx lr <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 5f74: e5903008 ldr r3, [r0, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 5f78: e3a02000 mov r2, #0 ; 0x0 } /* * Let it be unlocked. */ the_spinlock->users -= 1; 5f7c: e2433001 sub r3, r3, #1 ; 0x1 5f80: e5803008 str r3, [r0, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 5f84: e5802004 str r2, [r0, #4] the_spinlock->holder = 0; 5f88: e580200c str r2, [r0, #12] _ISR_Enable( level ); 5f8c: e129f00c msr CPSR_fc, ip 5f90: e3a00000 mov r0, #0 ; 0x0 return CORE_SPINLOCK_SUCCESSFUL; } 5f94: e12fff1e bx lr 5f98: 00011e44 .word 0x00011e44 00005f9c <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 5f9c: e92d41f0 push {r4, r5, r6, r7, r8, lr} ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 5fa0: e59f8104 ldr r8, [pc, #260] ; 60ac <_CORE_spinlock_Wait+0x110> 5fa4: e5983000 ldr r3, [r8] CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 5fa8: e1a06002 mov r6, r2 5fac: e1a04000 mov r4, r0 5fb0: e201c0ff and ip, r1, #255 ; 0xff ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 5fb4: e0827003 add r7, r2, r3 _ISR_Disable( level ); 5fb8: e10f0000 mrs r0, CPSR 5fbc: e38030c0 orr r3, r0, #192 ; 0xc0 5fc0: e129f003 msr CPSR_fc, r3 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 5fc4: e5943004 ldr r3, [r4, #4] 5fc8: e3530001 cmp r3, #1 ; 0x1 5fcc: 0a000027 beq 6070 <_CORE_spinlock_Wait+0xd4> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 5fd0: e5943008 ldr r3, [r4, #8] 5fd4: e2833001 add r3, r3, #1 ; 0x1 5fd8: e5843008 str r3, [r4, #8] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 5fdc: e5942004 ldr r2, [r4, #4] 5fe0: e3520000 cmp r2, #0 ; 0x0 5fe4: 0a000012 beq 6034 <_CORE_spinlock_Wait+0x98> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 5fe8: e35c0000 cmp ip, #0 ; 0x0 5fec: 159f50bc ldrne r5, [pc, #188] ; 60b0 <_CORE_spinlock_Wait+0x114> 5ff0: 0a000018 beq 6058 <_CORE_spinlock_Wait+0xbc> } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 5ff4: e3560000 cmp r6, #0 ; 0x0 5ff8: 0a000002 beq 6008 <_CORE_spinlock_Wait+0x6c> 5ffc: e5983000 ldr r3, [r8] <== NOT EXECUTED 6000: e1570003 cmp r7, r3 <== NOT EXECUTED 6004: 9a000022 bls 6094 <_CORE_spinlock_Wait+0xf8> <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 6008: e129f000 msr CPSR_fc, r0 /* An ISR could occur here */ _Thread_Enable_dispatch(); 600c: eb000489 bl 7238 <_Thread_Enable_dispatch> 6010: e5953000 ldr r3, [r5] 6014: e2833001 add r3, r3, #1 ; 0x1 6018: e5853000 str r3, [r5] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 601c: e10f0000 mrs r0, CPSR 6020: e38030c0 orr r3, r0, #192 ; 0xc0 6024: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 6028: e5943004 ldr r3, [r4, #4] 602c: e3530000 cmp r3, #0 ; 0x0 6030: 1affffef bne 5ff4 <_CORE_spinlock_Wait+0x58> the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 6034: e59f2078 ldr r2, [pc, #120] ; 60b4 <_CORE_spinlock_Wait+0x118> return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED; 6038: e3a03001 mov r3, #1 ; 0x1 603c: e5843004 str r3, [r4, #4] the_spinlock->holder = _Thread_Executing->Object.id; 6040: e5923000 ldr r3, [r2] 6044: e5931008 ldr r1, [r3, #8] 6048: e584100c str r1, [r4, #12] _ISR_Enable( level ); 604c: e129f000 msr CPSR_fc, r0 6050: e3a00000 mov r0, #0 ; 0x0 6054: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 6058: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 605c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 6060: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 6064: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED 6068: e3a00005 mov r0, #5 ; 0x5 <== NOT EXECUTED 606c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 6070: e59f303c ldr r3, [pc, #60] ; 60b4 <_CORE_spinlock_Wait+0x118> 6074: e5932000 ldr r2, [r3] 6078: e594300c ldr r3, [r4, #12] 607c: e5921008 ldr r1, [r2, #8] 6080: e1530001 cmp r3, r1 6084: 1affffd1 bne 5fd0 <_CORE_spinlock_Wait+0x34> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 6088: e129f000 msr CPSR_fc, r0 608c: e3a00001 mov r0, #1 ; 0x1 6090: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { the_spinlock->users -= 1; 6094: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 6098: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 609c: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 60a0: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED 60a4: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 60a8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 60ac: 00011ee4 .word 0x00011ee4 60b0: 00011d8c .word 0x00011d8c 60b4: 00011e44 .word 0x00011e44 00021c8c <_Chain_Insert>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 21c8c: e10f2000 mrs r2, CPSR <== NOT EXECUTED 21c90: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 21c94: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 21c98: e5903000 ldr r3, [r0] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 21c9c: e5810004 str r0, [r1, #4] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 21ca0: e5801000 str r1, [r0] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 21ca4: 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; 21ca8: e5813000 str r3, [r1] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 21cac: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } 21cb0: e12fff1e bx lr <== NOT EXECUTED 0000a5bc <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { a5bc: e59f3010 ldr r3, [pc, #16] ; a5d4 <_Debug_Is_enabled+0x18> <== NOT EXECUTED a5c0: e5932000 ldr r2, [r3] <== NOT EXECUTED a5c4: e1100002 tst r0, r2 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } a5c8: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED a5cc: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED a5d0: e12fff1e bx lr <== NOT EXECUTED a5d4: 00016fc8 .word 0x00016fc8 000041bc <_Event_Seize>: rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 41bc: e59fc108 ldr ip, [pc, #264] ; 42cc <_Event_Seize+0x110> rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 41c0: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 41c4: e59c5000 ldr r5, [ip] executing->Wait.return_code = RTEMS_SUCCESSFUL; 41c8: e3a04000 mov r4, #0 ; 0x0 41cc: e5854034 str r4, [r5, #52] rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 41d0: e1a08002 mov r8, r2 41d4: e1a07003 mov r7, r3 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 41d8: e5954104 ldr r4, [r5, #260] _ISR_Disable( level ); 41dc: e10f6000 mrs r6, CPSR 41e0: e38630c0 orr r3, r6, #192 ; 0xc0 41e4: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 41e8: e5942000 ldr r2, [r4] seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 41ec: e010c002 ands ip, r0, r2 41f0: 0a000003 beq 4204 <_Event_Seize+0x48> 41f4: e150000c cmp r0, ip 41f8: 0a00001f beq 427c <_Event_Seize+0xc0> 41fc: e3110002 tst r1, #2 ; 0x2 4200: 1a00001d bne 427c <_Event_Seize+0xc0> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 4204: e3110001 tst r1, #1 ; 0x1 4208: 1a000016 bne 4268 <_Event_Seize+0xac> executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 420c: e59f40bc ldr r4, [pc, #188] ; 42d0 <_Event_Seize+0x114> 4210: e3a03001 mov r3, #1 ; 0x1 4214: e5843000 str r3, [r4] executing->Wait.option = (uint32_t) option_set; 4218: e5851030 str r1, [r5, #48] executing->Wait.count = (uint32_t) event_in; 421c: e5850024 str r0, [r5, #36] executing->Wait.return_argument = event_out; 4220: e5857028 str r7, [r5, #40] _ISR_Enable( level ); 4224: e129f006 msr CPSR_fc, r6 if ( ticks ) { 4228: e3580000 cmp r8, #0 ; 0x0 422c: 1a00001a bne 429c <_Event_Seize+0xe0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 4230: e1a00005 mov r0, r5 4234: e3a01c01 mov r1, #256 ; 0x100 4238: eb000c24 bl 72d0 <_Thread_Set_state> _ISR_Disable( level ); 423c: e10f2000 mrs r2, CPSR 4240: e38230c0 orr r3, r2, #192 ; 0xc0 4244: e129f003 msr CPSR_fc, r3 sync_state = _Event_Sync_state; 4248: e5940000 ldr r0, [r4] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 424c: e3a03000 mov r3, #0 ; 0x0 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4250: e3500001 cmp r0, #1 ; 0x1 _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4254: e5843000 str r3, [r4] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4258: 0a00000d beq 4294 <_Event_Seize+0xd8> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 425c: e1a01005 mov r1, r5 <== NOT EXECUTED } 4260: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 4264: ea00080f b 62a8 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 4268: e129f006 msr CPSR_fc, r6 executing->Wait.return_code = RTEMS_UNSATISFIED; 426c: e3a0300d mov r3, #13 ; 0xd 4270: e5853034 str r3, [r5, #52] *event_out = seized_events; 4274: e587c000 str ip, [r7] 4278: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 427c: e1e0300c mvn r3, ip 4280: e0033002 and r3, r3, r2 4284: e5843000 str r3, [r4] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 4288: e129f006 msr CPSR_fc, r6 *event_out = seized_events; 428c: e587c000 str ip, [r7] 4290: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 4294: e129f002 msr CPSR_fc, r2 4298: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} executing->Wait.return_argument = event_out; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 429c: e5953008 ldr r3, [r5, #8] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 42a0: e59f202c ldr r2, [pc, #44] ; 42d4 <_Event_Seize+0x118> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 42a4: e3a01000 mov r1, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 42a8: e585106c str r1, [r5, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 42ac: e5851050 str r1, [r5, #80] the_watchdog->routine = routine; 42b0: e5852064 str r2, [r5, #100] the_watchdog->id = id; 42b4: e5853068 str r3, [r5, #104] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 42b8: e5858054 str r8, [r5, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 42bc: e59f0014 ldr r0, [pc, #20] ; 42d8 <_Event_Seize+0x11c> 42c0: e2851048 add r1, r5, #72 ; 0x48 42c4: eb000e03 bl 7ad8 <_Watchdog_Insert> 42c8: eaffffd8 b 4230 <_Event_Seize+0x74> 42cc: 00016fc4 .word 0x00016fc4 42d0: 000177b0 .word 0x000177b0 42d4: 0000448c .word 0x0000448c 42d8: 00016fe4 .word 0x00016fe4 00004334 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 4334: e92d41f0 push {r4, r5, r6, r7, r8, lr} 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 ]; 4338: e590c104 ldr ip, [r0, #260] */ void _Event_Surrender( Thread_Control *the_thread ) { 433c: e1a04000 mov r4, r0 rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; 4340: e5907030 ldr r7, [r0, #48] _ISR_Disable( level ); 4344: e10f6000 mrs r6, CPSR 4348: e38630c0 orr r3, r6, #192 ; 0xc0 434c: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 4350: e59c0000 ldr r0, [ip] event_condition = (rtems_event_set) the_thread->Wait.count; 4354: e5941024 ldr r1, [r4, #36] seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 4358: e0115000 ands r5, r1, r0 435c: 0a000024 beq 43f4 <_Event_Surrender+0xc0> /* * 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() && 4360: e59f3118 ldr r3, [pc, #280] ; 4480 <_Event_Surrender+0x14c> 4364: e5932000 ldr r2, [r3] 4368: e3520000 cmp r2, #0 ; 0x0 436c: 0a000003 beq 4380 <_Event_Surrender+0x4c> 4370: e59f310c ldr r3, [pc, #268] ; 4484 <_Event_Surrender+0x150> 4374: e5932000 ldr r2, [r3] 4378: e1540002 cmp r4, r2 437c: 0a000029 beq 4428 <_Event_Surrender+0xf4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 4380: e5943010 ldr r3, [r4, #16] 4384: e3130c01 tst r3, #256 ; 0x100 4388: 0a000017 beq 43ec <_Event_Surrender+0xb8> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 438c: e1510005 cmp r1, r5 4390: 0a000001 beq 439c <_Event_Surrender+0x68> 4394: e3170002 tst r7, #2 ; 0x2 4398: 0a000013 beq 43ec <_Event_Surrender+0xb8> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 439c: e1e03005 mvn r3, r5 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 43a0: e5941028 ldr r1, [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 ); 43a4: e0033000 and r3, r3, r0 the_thread->Wait.count = 0; 43a8: e3a02000 mov r2, #0 ; 0x0 /* * 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 ); 43ac: e58c3000 str r3, [ip] the_thread->Wait.count = 0; 43b0: e5842024 str r2, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 43b4: e5815000 str r5, [r1] _ISR_Flash( level ); 43b8: e10f3000 mrs r3, CPSR 43bc: e129f006 msr CPSR_fc, r6 43c0: e129f003 msr CPSR_fc, r3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 43c4: e5943050 ldr r3, [r4, #80] 43c8: e3530002 cmp r3, #2 ; 0x2 43cc: 0a00000a beq 43fc <_Event_Surrender+0xc8> _ISR_Enable( level ); 43d0: e129f006 msr CPSR_fc, r6 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 43d4: e3a01201 mov r1, #268435456 ; 0x10000000 43d8: e2811bff add r1, r1, #261120 ; 0x3fc00 43dc: e1a00004 mov r0, r4 43e0: e2811ffe add r1, r1, #1016 ; 0x3f8 } return; } } _ISR_Enable( level ); } 43e4: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} 43e8: ea00082d b 64a4 <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 43ec: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 43f0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 43f4: e129f006 msr CPSR_fc, r6 43f8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 43fc: e3a03003 mov r3, #3 ; 0x3 4400: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4404: e129f006 msr CPSR_fc, r6 (void) _Watchdog_Remove( &the_thread->Timer ); 4408: e2840048 add r0, r4, #72 ; 0x48 440c: eb000e20 bl 7c94 <_Watchdog_Remove> 4410: e3a01201 mov r1, #268435456 ; 0x10000000 4414: e2811bff add r1, r1, #261120 ; 0x3fc00 4418: e1a00004 mov r0, r4 441c: e2811ffe add r1, r1, #1016 ; 0x3f8 } return; } } _ISR_Enable( level ); } 4420: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} 4424: ea00081e b 64a4 <_Thread_Clear_state> /* * 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() && 4428: e59f8058 ldr r8, [pc, #88] ; 4488 <_Event_Surrender+0x154> <== NOT EXECUTED 442c: e5983000 ldr r3, [r8] <== NOT EXECUTED 4430: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 4434: 0a000002 beq 4444 <_Event_Surrender+0x110> <== NOT EXECUTED 4438: e5983000 ldr r3, [r8] <== NOT EXECUTED 443c: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 4440: 1affffce bne 4380 <_Event_Surrender+0x4c> <== NOT EXECUTED _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 4444: e1510005 cmp r1, r5 <== NOT EXECUTED 4448: 0a000001 beq 4454 <_Event_Surrender+0x120> <== NOT EXECUTED 444c: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED 4450: 0a000008 beq 4478 <_Event_Surrender+0x144> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 4454: e1e03005 mvn r3, r5 <== NOT EXECUTED 4458: e0033000 and r3, r3, r0 <== NOT EXECUTED the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 445c: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED if ( _ISR_Is_in_progress() && _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 ); 4460: e58c3000 str r3, [ip] <== NOT EXECUTED the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 4464: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 4468: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 446c: e5843024 str r3, [r4, #36] <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 4470: e5882000 str r2, [r8] <== NOT EXECUTED ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4474: e5815000 str r5, [r1] <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); 4478: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 447c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 4480: 00016fa0 .word 0x00016fa0 4484: 00016fc4 .word 0x00016fc4 4488: b0 .byte 0xb0 4489: 77 .byte 0x77 448a: 0001 .short 0x0001 0000448c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 448c: e52de004 push {lr} ; (str lr, [sp, #-4]!) 4490: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 4494: e1a0100d mov r1, sp 4498: eb000911 bl 68e4 <_Thread_Get> switch ( location ) { 449c: e59d1000 ldr r1, [sp] 44a0: e3510000 cmp r1, #0 ; 0x0 44a4: 1a000015 bne 4500 <_Event_Timeout+0x74> * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 44a8: e10fc000 mrs ip, CPSR 44ac: e38c30c0 orr r3, ip, #192 ; 0xc0 44b0: e129f003 msr CPSR_fc, r3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 44b4: e5903024 ldr r3, [r0, #36] 44b8: e3530000 cmp r3, #0 ; 0x0 44bc: 0a000011 beq 4508 <_Event_Timeout+0x7c> _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 44c0: e59f3070 ldr r3, [pc, #112] ; 4538 <_Event_Timeout+0xac> 44c4: e5932000 ldr r2, [r3] 44c8: e1500002 cmp r0, r2 _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 44cc: e5801024 str r1, [r0, #36] if ( _Thread_Is_executing( the_thread ) ) { 44d0: 0a000012 beq 4520 <_Event_Timeout+0x94> (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 44d4: e3a03006 mov r3, #6 ; 0x6 44d8: e5803034 str r3, [r0, #52] _ISR_Enable( level ); 44dc: e129f00c msr CPSR_fc, ip 44e0: e3a01201 mov r1, #268435456 ; 0x10000000 44e4: e2811bff add r1, r1, #261120 ; 0x3fc00 44e8: e2811ffe add r1, r1, #1016 ; 0x3f8 44ec: eb0007ec bl 64a4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 44f0: e59f2044 ldr r2, [pc, #68] ; 453c <_Event_Timeout+0xb0> 44f4: e5923000 ldr r3, [r2] 44f8: e2433001 sub r3, r3, #1 ; 0x1 44fc: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 4500: e28dd004 add sp, sp, #4 ; 0x4 4504: e8bd8000 pop {pc} 4508: e59f202c ldr r2, [pc, #44] ; 453c <_Event_Timeout+0xb0> <== NOT EXECUTED 450c: e5923000 ldr r3, [r2] <== NOT EXECUTED 4510: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 4514: e5823000 str r3, [r2] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4518: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 451c: eafffff7 b 4500 <_Event_Timeout+0x74> <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { Thread_blocking_operation_States sync = _Event_Sync_state; 4520: e59f2018 ldr r2, [pc, #24] ; 4540 <_Event_Timeout+0xb4> <== NOT EXECUTED 4524: e5923000 ldr r3, [r2] <== NOT EXECUTED if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 4528: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 452c: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED 4530: 95823000 strls r3, [r2] <== NOT EXECUTED 4534: eaffffe6 b 44d4 <_Event_Timeout+0x48> <== NOT EXECUTED 4538: 00016fc4 .word 0x00016fc4 453c: 00016f0c .word 0x00016f0c 4540: 000177b0 .word 0x000177b0 00008630 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 8630: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} uint32_t search_count; Heap_Block *the_block; void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; 8634: e5909010 ldr r9, [r0, #16] void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 8638: e1a07000 mov r7, r0 863c: e1a03001 mov r3, r1 8640: e24dd010 sub sp, sp, #16 ; 0x10 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 8644: e1a00001 mov r0, r1 void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 8648: e2433004 sub r3, r3, #4 ; 0x4 void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 864c: e1a0b002 mov fp, r2 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 8650: e1a01009 mov r1, r9 8654: e5972014 ldr r2, [r7, #20] void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 8658: e58d3004 str r3, [sp, #4] uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 865c: eb000163 bl 8bf0 <_Heap_Calc_block_size> if(the_size == 0) 8660: e3500000 cmp r0, #0 ; 0x0 8664: e58d0008 str r0, [sp, #8] 8668: 0a000064 beq 8800 <_Heap_Allocate_aligned+0x1d0> */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 866c: e5975008 ldr r5, [r7, #8] return NULL; if(alignment == 0) 8670: e35b0000 cmp fp, #0 ; 0x0 8674: 03a0b004 moveq fp, #4 ; 0x4 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 8678: e1570005 cmp r7, r5 867c: 0a00005f beq 8800 <_Heap_Allocate_aligned+0x1d0> 8680: e3a0a000 mov sl, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 8684: e5953004 ldr r3, [r5, #4] uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 8688: e59d1008 ldr r1, [sp, #8] 868c: e3c36001 bic r6, r3, #1 ; 0x1 8690: e1510006 cmp r1, r6 8694: 8a000023 bhi 8728 <_Heap_Allocate_aligned+0xf8> return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; aligned_user_addr = block_end - end_to_user_offs; 8698: e59d3004 ldr r3, [sp, #4] /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 869c: e0852006 add r2, r5, r6 aligned_user_addr = block_end - end_to_user_offs; 86a0: e0634002 rsb r4, r3, r2 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 86a4: e1a0100b mov r1, fp 86a8: e1a00004 mov r0, r4 /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 86ac: e58d200c str r2, [sp, #12] 86b0: eb003e7c bl 180a8 <__umodsi3> 86b4: e0608004 rsb r8, r0, r4 if(block_size >= the_size) { /* the_block is large enough. */ _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 86b8: e1a00008 mov r0, r8 86bc: e1a01009 mov r1, r9 86c0: eb003e78 bl 180a8 <__umodsi3> 86c4: e2854008 add r4, r5, #8 ; 0x8 86c8: e0602008 rsb r2, r0, r8 only at 'page_size' aligned addresses */ user_addr = aligned_user_addr; _Heap_Align_down_uptr(&user_addr, page_size); /* Make sure 'user_addr' calculated didn't run out of 'the_block'. */ if(user_addr >= user_area) { 86cc: e1540002 cmp r4, r2 86d0: 8a000014 bhi 8728 <_Heap_Allocate_aligned+0xf8> /* The block seems to be acceptable. Check if the remainder of 'the_block' is less than 'min_block_size' so that 'the_block' won't actually be split at the address we assume. */ if(user_addr - user_area < the_heap->min_block_size) { 86d4: e597c014 ldr ip, [r7, #20] 86d8: e0643002 rsb r3, r4, r2 86dc: e153000c cmp r3, ip 86e0: 2a00001c bcs 8758 <_Heap_Allocate_aligned+0x128> 'aligned_user_addr' to be outside of [0,page_size) range. If we do, we will need to store this distance somewhere to be able to resurrect the block address from the user pointer. (Having the distance within [0,page_size) range allows resurrection by aligning user pointer down to the nearest 'page_size' boundary.) */ if(aligned_user_addr - user_addr >= page_size) { 86e4: e0643008 rsb r3, r4, r8 86e8: e1590003 cmp r9, r3 86ec: 81a02004 movhi r2, r4 86f0: 8a000018 bhi 8758 <_Heap_Allocate_aligned+0x128> uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 86f4: e1a00004 mov r0, r4 86f8: e1a0100b mov r1, fp 86fc: e58dc000 str ip, [sp] 8700: eb003e68 bl 180a8 <__umodsi3> *value = r ? v - r + a : v; 8704: e3500000 cmp r0, #0 ; 0x0 8708: 1084300b addne r3, r4, fp 870c: 10600003 rsbne r0, r0, r3 8710: 01a03000 moveq r3, r0 8714: 10643000 rsbne r3, r4, r0 8718: 01a00004 moveq r0, r4 /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 871c: e1590003 cmp r9, r3 8720: e59dc000 ldr ip, [sp] 8724: 8a000009 bhi 8750 <_Heap_Allocate_aligned+0x120> /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 8728: e5955008 ldr r5, [r5, #8] alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 872c: e1570005 cmp r7, r5 the_block = the_block->next, ++search_count) 8730: e28aa001 add sl, sl, #1 ; 0x1 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 8734: 1affffd2 bne 8684 <_Heap_Allocate_aligned+0x54> 8738: e3a00000 mov r0, #0 ; 0x0 } } } } if(stats->max_search < search_count) 873c: e5973044 ldr r3, [r7, #68] 8740: e153000a cmp r3, sl stats->max_search = search_count; 8744: 3587a044 strcc sl, [r7, #68] return user_ptr; } 8748: e28dd010 add sp, sp, #16 ; 0x10 874c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 8750: e1a02004 mov r2, r4 8754: e1a08000 mov r8, r0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 8758: e3580000 cmp r8, #0 ; 0x0 875c: 0afffff1 beq 8728 <_Heap_Allocate_aligned+0xf8> /* The block is indeed acceptable: calculate the size of the block to be allocated and perform allocation. */ uint32_t const alloc_size = block_end - user_addr + HEAP_BLOCK_USER_OFFSET; 8760: e59d100c ldr r1, [sp, #12] 8764: e2813008 add r3, r1, #8 ; 0x8 8768: e0624003 rsb r4, r2, r3 Heap_Block *the_block, uint32_t alloc_size) { Heap_Statistics *const stats = &the_heap->stats; uint32_t const block_size = _Heap_Block_size(the_block); uint32_t const the_rest = block_size - alloc_size; 876c: e0642006 rsb r2, r4, r6 _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 8770: e152000c cmp r2, ip /* Split the block so that lower part is still free, and upper part becomes used. */ the_block->size = the_rest | HEAP_PREV_USED; 8774: 23823001 orrcs r3, r2, #1 ; 0x1 8778: 25853004 strcs r3, [r5, #4] the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 877c: 27a52002 strcs r2, [r5, r2]! the_block->size = alloc_size; 8780: 25854004 strcs r4, [r5, #4] _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 8784: 2a000007 bcs 87a8 <_Heap_Allocate_aligned+0x178> /* Don't split the block as remainder is either zero or too small to be used as a separate free block. Change 'alloc_size' to the size of the block and remove the block from the list of free blocks. */ _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; 8788: e5973038 ldr r3, [r7, #56] Heap_Block *the_block ) { Heap_Block *block = the_block; Heap_Block *next = block->next; 878c: e2851008 add r1, r5, #8 ; 0x8 8790: e8910006 ldm r1, {r1, r2} 8794: e2433001 sub r3, r3, #1 ; 0x1 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 8798: e581200c str r2, [r1, #12] 879c: e5873038 str r3, [r7, #56] { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 87a0: e5821008 str r1, [r2, #8] 87a4: e1a04006 mov r4, r6 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 87a8: e0852004 add r2, r5, r4 } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 87ac: e5923004 ldr r3, [r2, #4] 87b0: e3833001 orr r3, r3, #1 ; 0x1 87b4: e5823004 str r3, [r2, #4] /* Update statistics */ stats->free_size -= alloc_size; 87b8: e2871030 add r1, r7, #48 ; 0x30 87bc: e891000a ldm r1, {r1, r3} 87c0: e0641001 rsb r1, r4, r1 if(stats->min_free_size > stats->free_size) 87c4: e1510003 cmp r1, r3 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 87c8: e597304c ldr r3, [r7, #76] _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 87cc: e5972040 ldr r2, [r7, #64] stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; 87d0: e5871030 str r1, [r7, #48] if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; 87d4: 35871034 strcc r1, [r7, #52] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; stats->allocs += 1; 87d8: e5971048 ldr r1, [r7, #72] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 87dc: e2833001 add r3, r3, #1 ; 0x1 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 87e0: e2822001 add r2, r2, #1 ; 0x1 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 87e4: e083300a add r3, r3, sl stats->allocs += 1; 87e8: e2811001 add r1, r1, #1 ; 0x1 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 87ec: e5872040 str r2, [r7, #64] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 87f0: e587304c str r3, [r7, #76] stats->allocs += 1; 87f4: e5871048 str r1, [r7, #72] check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 87f8: e1a00008 mov r0, r8 87fc: eaffffce b 873c <_Heap_Allocate_aligned+0x10c> } } } if(stats->max_search < search_count) stats->max_search = search_count; 8800: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 8804: eaffffcf b 8748 <_Heap_Allocate_aligned+0x118> <== NOT EXECUTED 0002bf4c <_Heap_Get_information>: Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2bf4c: e92d0070 push {r4, r5, r6} Heap_Block *the_block = the_heap->start; 2bf50: e2802020 add r2, r0, #32 ; 0x20 2bf54: e8920044 ldm r2, {r2, r6} 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; 2bf58: e3a03000 mov r3, #0 ; 0x0 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 2bf5c: e1520006 cmp r2, r6 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2bf60: 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; 2bf64: e5813010 str r3, [r1, #16] 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; 2bf68: e5813000 str r3, [r1] the_info->Free.total = 0; 2bf6c: e5813008 str r3, [r1, #8] the_info->Free.largest = 0; 2bf70: e5813004 str r3, [r1, #4] the_info->Used.number = 0; 2bf74: e581300c str r3, [r1, #12] the_info->Used.total = 0; 2bf78: e5813014 str r3, [r1, #20] the_info->Used.largest = 0; while ( the_block != end ) { 2bf7c: 0a000020 beq 2c004 <_Heap_Get_information+0xb8> 2bf80: e5925004 ldr r5, [r2, #4] 2bf84: ea00000b b 2bfb8 <_Heap_Get_information+0x6c> 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++; 2bf88: e59c300c ldr r3, [ip, #12] the_info->Used.total += the_size; 2bf8c: e59c1014 ldr r1, [ip, #20] if ( the_info->Used.largest < the_size ) 2bf90: e59c2010 ldr r2, [ip, #16] while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 2bf94: e2833001 add r3, r3, #1 ; 0x1 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 2bf98: e1520000 cmp r2, r0 uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; the_info->Used.total += the_size; 2bf9c: e0811000 add r1, r1, r0 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 2bfa0: e58c300c str r3, [ip, #12] the_info->Used.total += the_size; 2bfa4: e58c1014 str r1, [ip, #20] if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; 2bfa8: 358c0010 strcc r0, [ip, #16] the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 2bfac: e1560004 cmp r6, r4 } else { the_info->Free.number++; the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) 2bfb0: 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 ) { 2bfb4: 0a000012 beq 2c004 <_Heap_Get_information+0xb8> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 2bfb8: e3c50001 bic r0, r5, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 2bfbc: e0824000 add r4, r2, r0 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 2bfc0: e5945004 ldr r5, [r4, #4] 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) ) { 2bfc4: e3150001 tst r5, #1 ; 0x1 2bfc8: 1affffee bne 2bf88 <_Heap_Get_information+0x3c> 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++; 2bfcc: e59c3000 ldr r3, [ip] the_info->Free.total += the_size; 2bfd0: e59c1008 ldr r1, [ip, #8] if ( the_info->Free.largest < the_size ) 2bfd4: e59c2004 ldr r2, [ip, #4] the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 2bfd8: e2833001 add r3, r3, #1 ; 0x1 the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 2bfdc: e1520000 cmp r2, r0 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; the_info->Free.total += the_size; 2bfe0: e0811000 add r1, r1, r0 if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; 2bfe4: 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++; 2bfe8: e58c3000 str r3, [ip] the_info->Free.total += the_size; 2bfec: e58c1008 str r1, [ip, #8] if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) 2bff0: e5943000 ldr r3, [r4] 2bff4: e1530000 cmp r3, r0 2bff8: 0affffeb beq 2bfac <_Heap_Get_information+0x60> 2bffc: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 2c000: ea000003 b 2c014 <_Heap_Get_information+0xc8> <== NOT EXECUTED } /* 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; 2c004: e59c3014 ldr r3, [ip, #20] 2c008: e2833008 add r3, r3, #8 ; 0x8 2c00c: e58c3014 str r3, [ip, #20] 2c010: e3a00000 mov r0, #0 ; 0x0 return HEAP_GET_INFORMATION_SUCCESSFUL; } 2c014: e8bd0070 pop {r4, r5, r6} 2c018: e12fff1e bx lr 00014b70 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 14b70: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 14b74: e24dd00c sub sp, sp, #12 ; 0xc 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; *avail_mem_size = 0; 14b78: e59dc030 ldr ip, [sp, #48] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 14b7c: e1a05000 mov r5, r0 14b80: 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; 14b84: e3a03000 mov r3, #0 ; 0x0 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; 14b88: e5900014 ldr r0, [r0, #20] uint32_t const page_size = the_heap->page_size; 14b8c: e595b010 ldr fp, [r5, #16] *old_mem_size = 0; 14b90: e5893000 str r3, [r9] *avail_mem_size = 0; 14b94: e58c3000 str r3, [ip] 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; 14b98: e58d0004 str r0, [sp, #4] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 14b9c: e1a04001 mov r4, r1 /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 14ba0: e1a00001 mov r0, r1 14ba4: e5951010 ldr r1, [r5, #16] 14ba8: e1a08002 mov r8, r2 14bac: ebfff862 bl 12d3c <__umodsi3> 14bb0: e2442008 sub r2, 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 ); 14bb4: e595c020 ldr ip, [r5, #32] 14bb8: e5951024 ldr r1, [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); 14bbc: e0606002 rsb r6, r0, r2 *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)) 14bc0: e156000c cmp r6, ip 14bc4: 33a03000 movcc r3, #0 ; 0x0 14bc8: 23a03001 movcs r3, #1 ; 0x1 14bcc: e1560001 cmp r6, r1 14bd0: 83a03000 movhi r3, #0 ; 0x0 14bd4: e3530000 cmp r3, #0 ; 0x0 14bd8: 0a00002d beq 14c94 <_Heap_Resize_block+0x124> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 14bdc: e5962004 ldr r2, [r6, #4] */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 14be0: e3c2a001 bic sl, r2, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 14be4: e086700a add r7, r6, sl 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) || 14be8: e15c0007 cmp ip, r7 14bec: 83a03000 movhi r3, #0 ; 0x0 14bf0: 93a03001 movls r3, #1 ; 0x1 14bf4: e1510007 cmp r1, r7 14bf8: 33a03000 movcc r3, #0 ; 0x0 14bfc: e3530000 cmp r3, #0 ; 0x0 14c00: 0a000023 beq 14c94 <_Heap_Resize_block+0x124> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 14c04: e5973004 ldr r3, [r7, #4] 14c08: e3130001 tst r3, #1 ; 0x1 14c0c: 0a000020 beq 14c94 <_Heap_Resize_block+0x124> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 14c10: e3c33001 bic r3, 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) || 14c14: e1510007 cmp r1, r7 14c18: e58d3000 str r3, [sp] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 14c1c: e0873003 add r3, r7, r3 14c20: 15933004 ldrne r3, [r3, #4] 14c24: 12033001 andne r3, r3, #1 ; 0x1 14c28: 03a00001 moveq r0, #1 ; 0x1 14c2c: 158d3008 strne r3, [sp, #8] _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) 14c30: e0643007 rsb r3, r4, r7 !_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) || 14c34: 058d0008 streq r0, [sp, #8] _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) 14c38: e2830004 add r0, r3, #4 ; 0x4 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 14c3c: e1500008 cmp r0, r8 /* 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; 14c40: e5890000 str r0, [r9] _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; 14c44: e2029001 and r9, r2, #1 ; 0x1 old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 14c48: 2a000014 bcs 14ca0 <_Heap_Resize_block+0x130> /* 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 */ 14c4c: e59d1008 ldr r1, [sp, #8] 14c50: e3510000 cmp r1, #0 ; 0x0 14c54: 1a00000c bne 14c8c <_Heap_Resize_block+0x11c> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 14c58: e0604008 rsb r4, r0, r8 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 14c5c: e1a00004 mov r0, r4 14c60: e1a0100b mov r1, fp 14c64: ebfff834 bl 12d3c <__umodsi3> *value = r ? v - r + a : v; 14c68: e3500000 cmp r0, #0 ; 0x0 14c6c: 1084300b addne r3, r4, fp 14c70: e59d2004 ldr r2, [sp, #4] 14c74: 10604003 rsbne r4, r0, r3 _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) 14c78: e59d3000 ldr r3, [sp] 14c7c: e1540002 cmp r4, r2 14c80: 21a02004 movcs r2, r4 14c84: e1530002 cmp r3, r2 14c88: 2a000049 bcs 14db4 <_Heap_Resize_block+0x244> } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 14c8c: e3a00001 mov r0, #1 ; 0x1 14c90: ea000000 b 14c98 <_Heap_Resize_block+0x128> 14c94: e3a00002 mov r0, #2 ; 0x2 } 14c98: e28dd00c add sp, sp, #12 ; 0xc 14c9c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 14ca0: e0684000 rsb r4, r8, r0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 14ca4: e1a00004 mov r0, r4 14ca8: e1a0100b mov r1, fp 14cac: ebfff822 bl 12d3c <__umodsi3> _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 14cb0: e0544000 subs r4, r4, r0 14cb4: 0a000020 beq 14d3c <_Heap_Resize_block+0x1cc> 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; if (new_block_size < min_block_size) { 14cb8: e59dc004 ldr ip, [sp, #4] /* 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; 14cbc: e064000a rsb r0, r4, sl if (new_block_size < min_block_size) { 14cc0: e15c0000 cmp ip, r0 14cc4: 9a000021 bls 14d50 <_Heap_Resize_block+0x1e0> uint32_t delta = min_block_size - new_block_size; 14cc8: e060300c rsb r3, r0, ip _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 14ccc: e0544003 subs r4, r4, r3 ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 14cd0: 10800003 addne r0, r0, r3 if (new_block_size < min_block_size) { uint32_t delta = min_block_size - new_block_size; _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 14cd4: 1a00001d bne 14d50 <_Heap_Resize_block+0x1e0> ++stats->resizes; 14cd8: e5953054 ldr r3, [r5, #84] 14cdc: e2833001 add r3, r3, #1 ; 0x1 14ce0: e5853054 str r3, [r5, #84] 14ce4: e1a00004 mov r0, r4 14ce8: eaffffea b 14c98 <_Heap_Resize_block+0x128> 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; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { 14cec: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 14cf0: e15c0004 cmp ip, r4 <== NOT EXECUTED 14cf4: 8a000010 bhi 14d3c <_Heap_Resize_block+0x1cc> <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 14cf8: e0861000 add r1, r6, r0 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 14cfc: 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; 14d00: 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; 14d04: e5863004 str r3, [r6, #4] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 14d08: e5812004 str r2, [r1, #4] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 14d0c: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 14d10: 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 */ 14d14: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 14d18: 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 */ 14d1c: e5853040 str r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 14d20: e5852050 str r2, [r5, #80] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 14d24: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED 14d28: e1a00005 mov r0, r5 <== NOT EXECUTED 14d2c: ebffd70a bl a95c <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 14d30: e59d0030 ldr r0, [sp, #48] <== NOT EXECUTED 14d34: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED 14d38: e5803000 str r3, [r0] <== NOT EXECUTED } } } ++stats->resizes; 14d3c: e5953054 ldr r3, [r5, #84] 14d40: e2833001 add r3, r3, #1 ; 0x1 14d44: e5853054 str r3, [r5, #84] 14d48: e3a00000 mov r0, #0 ; 0x0 14d4c: eaffffd1 b 14c98 <_Heap_Resize_block+0x128> _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) { 14d50: e59d1008 ldr r1, [sp, #8] 14d54: e3510000 cmp r1, #0 ; 0x0 14d58: 1affffe3 bne 14cec <_Heap_Resize_block+0x17c> /* 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; 14d5c: e59d3000 ldr r3, [sp] _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; next_next_block->prev_size = new_next_block_size; 14d60: e59dc000 ldr ip, [sp] if (!next_is_used) { /* 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; 14d64: e0842003 add r2, r4, r3 14d68: e0861000 add r1, r6, r0 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 14d6c: e1803009 orr r3, r0, r9 new_next_block->size = new_next_block_size | HEAP_PREV_USED; 14d70: e3820001 orr r0, r2, #1 ; 0x1 next_next_block->prev_size = new_next_block_size; 14d74: e787200c str r2, [r7, ip] 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; 14d78: e5863004 str r3, [r6, #4] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 14d7c: 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; 14d80: e5953030 ldr r3, [r5, #48] 14d84: e0833004 add r3, r3, r4 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 14d88: e597000c ldr r0, [r7, #12] Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 14d8c: e597c008 ldr ip, [r7, #8] 14d90: e5853030 str r3, [r5, #48] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 14d94: e59d3030 ldr r3, [sp, #48] 14d98: e2422004 sub r2, r2, #4 ; 0x4 Heap_Block *prev = block->prev; block = new_block; block->next = next; 14d9c: e581c008 str ip, [r1, #8] block->prev = prev; 14da0: e581000c str r0, [r1, #12] 14da4: e5832000 str r2, [r3] next->prev = prev->next = block; 14da8: e5801008 str r1, [r0, #8] 14dac: e58c100c str r1, [ip, #12] 14db0: eaffffe1 b 14d3c <_Heap_Resize_block+0x1cc> _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) return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 14db4: e1a01007 mov r1, r7 14db8: e1a00005 mov r0, r5 14dbc: ebffc2ea bl 596c <_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; 14dc0: e080000a add r0, r0, sl 14dc4: e1800009 orr r0, r0, r9 14dc8: e5860004 str r0, [r6, #4] --stats->used_blocks; 14dcc: e5953040 ldr r3, [r5, #64] 14dd0: e2433001 sub r3, r3, #1 ; 0x1 14dd4: e5853040 str r3, [r5, #64] 14dd8: eaffffd7 b 14d3c <_Heap_Resize_block+0x1cc> 0000e244 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { e244: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; e248: e5903024 ldr r3, [r0, #36] Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; e24c: e5906020 ldr r6, [r0, #32] bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { e250: e24dd004 sub sp, sp, #4 ; 0x4 Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; e254: e58d3000 str r3, [sp] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { e258: e5963004 ldr r3, [r6, #4] /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) e25c: e251b000 subs fp, r1, #0 ; 0x0 source = the_heap->stats.instance; e260: b590b028 ldrlt fp, [r0, #40] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { e264: e3130001 tst r3, #1 ; 0x1 bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { e268: e1a05000 mov r5, r0 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { e26c: 13a08000 movne r8, #0 ; 0x0 e270: 0a000086 beq e490 <_Heap_Walk+0x24c> printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); error = 1; } if (the_block->prev_size != the_heap->page_size) { e274: e5962000 ldr r2, [r6] e278: e5953010 ldr r3, [r5, #16] e27c: e1520003 cmp r2, r3 e280: 0a000003 beq e294 <_Heap_Walk+0x50> printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); e284: e59f0238 ldr r0, [pc, #568] ; e4c4 <_Heap_Walk+0x280> <== NOT EXECUTED e288: e1a0100b mov r1, fp <== NOT EXECUTED e28c: ebffd9fb bl 4a80 <== NOT EXECUTED e290: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED error = 1; } while ( the_block != end ) { e294: e59d3000 ldr r3, [sp] e298: e1560003 cmp r6, r3 e29c: 0a000080 beq e4a4 <_Heap_Walk+0x260> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); e2a0: e5960004 ldr r0, [r6, #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)) { e2a4: e5951020 ldr r1, [r5, #32] e2a8: e3c07001 bic r7, r0, #1 ; 0x1 e2ac: e5952024 ldr r2, [r5, #36] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); e2b0: e0864007 add r4, r6, r7 e2b4: e1540001 cmp r4, r1 e2b8: 33a03000 movcc r3, #0 ; 0x0 e2bc: 23a03001 movcs r3, #1 ; 0x1 e2c0: e1540002 cmp r4, r2 e2c4: 83a03000 movhi r3, #0 ; 0x0 e2c8: e3530000 cmp r3, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); e2cc: 1200a001 andne sl, r0, #1 ; 0x1 e2d0: 11a09004 movne r9, r4 e2d4: 0a000075 beq e4b0 <_Heap_Walk+0x26c> printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { e2d8: e5943004 ldr r3, [r4, #4] e2dc: e3130001 tst r3, #1 ; 0x1 e2e0: 1a00003f bne e3e4 <_Heap_Walk+0x1a0> if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { e2e4: e5943000 ldr r3, [r4] e2e8: e1530007 cmp r3, r7 e2ec: 0a000003 beq e300 <_Heap_Walk+0xbc> if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); e2f0: e59f01d0 ldr r0, [pc, #464] ; e4c8 <_Heap_Walk+0x284> <== NOT EXECUTED e2f4: e1a0100b mov r1, fp <== NOT EXECUTED e2f8: ebffd9e0 bl 4a80 <== NOT EXECUTED e2fc: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (!prev_used) { e300: e35a0000 cmp sl, #0 ; 0x0 e304: 1a000005 bne e320 <_Heap_Walk+0xdc> if (do_dump || error) printk("\n"); e308: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED e30c: 1a00005c bne e484 <_Heap_Walk+0x240> <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); e310: e59f01b4 ldr r0, [pc, #436] ; e4cc <_Heap_Walk+0x288> <== NOT EXECUTED e314: e1a0100b mov r1, fp <== NOT EXECUTED e318: ebffd9d8 bl 4a80 <== NOT EXECUTED e31c: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; e320: e5953008 ldr r3, [r5, #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) e324: e1530006 cmp r3, r6 e328: 11550003 cmpne r5, r3 e32c: 0a000003 beq e340 <_Heap_Walk+0xfc> block = block->next; e330: 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) e334: e1530006 cmp r3, r6 e338: 11550003 cmpne r5, r3 e33c: 1afffffb bne e330 <_Heap_Walk+0xec> block = block->next; if(block != the_block) { e340: e1530006 cmp r3, r6 e344: 0a000026 beq e3e4 <_Heap_Walk+0x1a0> if (do_dump || error) printk("\n"); e348: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED e34c: 1a000049 bne e478 <_Heap_Walk+0x234> <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); e350: e59f0178 ldr r0, [pc, #376] ; e4d0 <_Heap_Walk+0x28c> <== NOT EXECUTED e354: e1a0100b mov r1, fp <== NOT EXECUTED e358: ebffd9c8 bl 4a80 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); e35c: e59f0170 ldr r0, [pc, #368] ; e4d4 <_Heap_Walk+0x290> <== NOT EXECUTED e360: ebffd9c6 bl 4a80 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { e364: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED e368: e1530007 cmp r3, r7 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); e36c: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { e370: 8a000020 bhi e3f8 <_Heap_Walk+0x1b4> <== NOT EXECUTED printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { e374: e1a00007 mov r0, r7 e378: e5951010 ldr r1, [r5, #16] e37c: eb002749 bl 180a8 <__umodsi3> e380: e3500000 cmp r0, #0 ; 0x0 e384: 1a000031 bne e450 <_Heap_Walk+0x20c> printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) e388: e3580000 cmp r8, #0 ; 0x0 e38c: 1a000032 bne e45c <_Heap_Walk+0x218> 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 ) { e390: e59d3000 ldr r3, [sp] e394: e1530004 cmp r3, r4 e398: 0a000041 beq e4a4 <_Heap_Walk+0x260> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); e39c: e5940004 ldr r0, [r4, #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)) { e3a0: e5951020 ldr r1, [r5, #32] e3a4: e3c07001 bic r7, r0, #1 ; 0x1 e3a8: e5952024 ldr r2, [r5, #36] e3ac: e0844007 add r4, r4, r7 e3b0: e1540001 cmp r4, r1 e3b4: 33a03000 movcc r3, #0 ; 0x0 e3b8: 23a03001 movcs r3, #1 ; 0x1 e3bc: e1540002 cmp r4, r2 e3c0: 83a03000 movhi r3, #0 ; 0x0 e3c4: e3530000 cmp r3, #0 ; 0x0 e3c8: 0a000037 beq e4ac <_Heap_Walk+0x268> printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { e3cc: e5943004 ldr r3, [r4, #4] e3d0: e3130001 tst r3, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); e3d4: e1a06009 mov r6, r9 e3d8: e200a001 and sl, r0, #1 ; 0x1 e3dc: e1a09004 mov r9, r4 e3e0: 0affffbf beq e2e4 <_Heap_Walk+0xa0> error = 1; } } } if (do_dump || error) printk("\n"); e3e4: e3580000 cmp r8, #0 ; 0x0 e3e8: 1affffdb bne e35c <_Heap_Walk+0x118> if (the_size < the_heap->min_block_size) { e3ec: e5953014 ldr r3, [r5, #20] e3f0: e1530007 cmp r3, r7 e3f4: 9affffde bls e374 <_Heap_Walk+0x130> printk("PASS: %d !block size is too small\n", source); e3f8: e59f00d8 ldr r0, [pc, #216] ; e4d8 <_Heap_Walk+0x294> <== NOT EXECUTED e3fc: e1a0100b mov r1, fp <== NOT EXECUTED e400: ebffd99e bl 4a80 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", e404: e59d3000 ldr r3, [sp] <== NOT EXECUTED e408: e59f00cc ldr r0, [pc, #204] ; e4dc <_Heap_Walk+0x298> <== NOT EXECUTED e40c: e1a0100b mov r1, fp <== NOT EXECUTED e410: e1a02006 mov r2, r6 <== NOT EXECUTED e414: ebffd999 bl 4a80 <== NOT EXECUTED e418: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); e41c: e5963004 ldr r3, [r6, #4] source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { e420: e5950010 ldr r0, [r5, #16] e424: e3c32001 bic r2, r3, #1 ; 0x1 e428: e1500002 cmp r0, r2 e42c: 01a00008 moveq r0, r8 e430: 0a000004 beq e448 <_Heap_Walk+0x204> printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, e434: e1a03000 mov r3, r0 <== NOT EXECUTED e438: e1a0100b mov r1, fp <== NOT EXECUTED e43c: e59f009c ldr r0, [pc, #156] ; e4e0 <_Heap_Walk+0x29c> <== NOT EXECUTED e440: ebffd98e bl 4a80 <== NOT EXECUTED e444: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } e448: e28dd004 add sp, sp, #4 ; 0x4 e44c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { printk("PASS: %d !block size is misaligned\n", source); e450: e59f008c ldr r0, [pc, #140] ; e4e4 <_Heap_Walk+0x2a0> <== NOT EXECUTED e454: e1a0100b mov r1, fp <== NOT EXECUTED e458: ebffd988 bl 4a80 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", e45c: e59d3000 ldr r3, [sp] <== NOT EXECUTED e460: e59f0074 ldr r0, [pc, #116] ; e4dc <_Heap_Walk+0x298> <== NOT EXECUTED e464: e1a0100b mov r1, fp <== NOT EXECUTED e468: e1a02006 mov r2, r6 <== NOT EXECUTED e46c: ebffd983 bl 4a80 <== NOT EXECUTED e470: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED e474: eaffffe8 b e41c <_Heap_Walk+0x1d8> <== NOT EXECUTED { /* 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; if(block != the_block) { if (do_dump || error) printk("\n"); e478: e59f0054 ldr r0, [pc, #84] ; e4d4 <_Heap_Walk+0x290> <== NOT EXECUTED e47c: ebffd97f bl 4a80 <== NOT EXECUTED e480: eaffffb2 b e350 <_Heap_Walk+0x10c> <== NOT EXECUTED if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); e484: e59f0048 ldr r0, [pc, #72] ; e4d4 <_Heap_Walk+0x290> <== NOT EXECUTED e488: ebffd97c bl 4a80 <== NOT EXECUTED e48c: eaffff9f b e310 <_Heap_Walk+0xcc> <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); e490: e59f0050 ldr r0, [pc, #80] ; e4e8 <_Heap_Walk+0x2a4> <== NOT EXECUTED e494: e1a0100b mov r1, fp <== NOT EXECUTED e498: ebffd978 bl 4a80 <== NOT EXECUTED e49c: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED e4a0: eaffff73 b e274 <_Heap_Walk+0x30> <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, e4a4: e59d6000 ldr r6, [sp] e4a8: eaffffdb b e41c <_Heap_Walk+0x1d8> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); e4ac: e1a06009 mov r6, r9 <== NOT EXECUTED printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); e4b0: e1a02004 mov r2, r4 <== NOT EXECUTED e4b4: e59f0030 ldr r0, [pc, #48] ; e4ec <_Heap_Walk+0x2a8> <== NOT EXECUTED e4b8: e1a0100b mov r1, fp <== NOT EXECUTED e4bc: ebffd96f bl 4a80 <== NOT EXECUTED e4c0: eaffffe5 b e45c <_Heap_Walk+0x218> <== NOT EXECUTED e4c4: 0001befc .word 0x0001befc e4c8: 0001bf54 .word 0x0001bf54 e4cc: 0001bf80 .word 0x0001bf80 e4d0: 0001bfac .word 0x0001bfac e4d4: 0001b510 .word 0x0001b510 e4d8: 0001bfd8 .word 0x0001bfd8 e4dc: 0001c020 .word 0x0001c020 e4e0: 0001c05c .word 0x0001c05c e4e4: 0001bffc .word 0x0001bffc e4e8: 0001bec4 .word 0x0001bec4 e4ec: 0001bf30 .word 0x0001bf30 0000ab4c <_Objects_API_maximum_class>: int _Objects_API_maximum_class( uint32_t api ) { switch (api) { ab4c: e2400001 sub r0, r0, #1 ; 0x1 ab50: e3500003 cmp r0, #3 ; 0x3 ab54: 979ff100 ldrls pc, [pc, r0, lsl #2] ab58: ea000003 b ab6c <_Objects_API_maximum_class+0x20> ab5c: 0000ab8c .word 0x0000ab8c <== NOT EXECUTED ab60: 0000ab84 .word 0x0000ab84 <== NOT EXECUTED ab64: 0000ab7c .word 0x0000ab7c <== NOT EXECUTED ab68: 0000ab74 .word 0x0000ab74 <== NOT EXECUTED case OBJECTS_CLASSIC_API: return OBJECTS_RTEMS_CLASSES_LAST; case OBJECTS_POSIX_API: return OBJECTS_POSIX_CLASSES_LAST; case OBJECTS_ITRON_API: return OBJECTS_ITRON_CLASSES_LAST; ab6c: e3e00000 mvn r0, #0 ; 0x0 case OBJECTS_NO_API: default: break; } return -1; } ab70: 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; ab74: e3a00008 mov r0, #8 ; 0x8 ab78: e12fff1e bx lr int _Objects_API_maximum_class( uint32_t api ) { switch (api) { ab7c: e3a0000c mov r0, #12 ; 0xc ab80: e12fff1e bx lr ab84: e3a0000a mov r0, #10 ; 0xa ab88: e12fff1e bx lr ab8c: e3a00002 mov r0, #2 ; 0x2 ab90: e12fff1e bx lr 00005b50 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 5b50: 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; 5b54: e1d0a0b8 ldrh sl, [r0, #8] minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 5b58: e1d091b0 ldrh r9, [r0, #16] 5b5c: e159000a cmp r9, sl */ void _Objects_Extend_information( Objects_Information *information ) { 5b60: e24dd014 sub sp, sp, #20 ; 0x14 5b64: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 5b68: 2a000071 bcs 5d34 <_Objects_Extend_information+0x1e4> 5b6c: e3a07000 mov r7, #0 ; 0x0 5b70: e5904014 ldr r4, [r0, #20] 5b74: e1a0800a mov r8, sl 5b78: e1a06007 mov r6, r7 5b7c: e3a0b001 mov fp, #1 ; 0x1 5b80: e3a00003 mov r0, #3 ; 0x3 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5b84: e5d53012 ldrb r3, [r5, #18] * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 5b88: e0849009 add r9, r4, r9 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5b8c: e3530000 cmp r3, #0 ; 0x0 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 5b90: e58d9004 str r9, [sp, #4] /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5b94: 1a000080 bne 5d9c <_Objects_Extend_information+0x24c> if ( !object_blocks ) return; } else { object_blocks = (void**) 5b98: e59d3004 ldr r3, [sp, #4] 5b9c: e080000a add r0, r0, sl 5ba0: e0800003 add r0, r0, r3 5ba4: e1a00100 lsl r0, r0, #2 5ba8: eb000893 bl 7dfc <_Workspace_Allocate_or_fatal_error> * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5bac: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5bb0: e1a0210b lsl r2, fp, #2 if ( !object_blocks ) return; } else { object_blocks = (void**) 5bb4: e1a0c000 mov ip, r0 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5bb8: e08c9002 add r9, ip, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5bbc: e153000a cmp r3, sl 5bc0: e0894002 add r4, r9, r2 5bc4: 8a000080 bhi 5dcc <_Objects_Extend_information+0x27c> else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5bc8: e35a0000 cmp sl, #0 ; 0x0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 5bcc: 13a03000 movne r3, #0 ; 0x0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 5bd0: 11a02003 movne r2, r3 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5bd4: 0a000003 beq 5be8 <_Objects_Extend_information+0x98> local_table[ index ] = NULL; 5bd8: e7842103 str r2, [r4, r3, lsl #2] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5bdc: e2833001 add r3, r3, #1 ; 0x1 5be0: e153000a cmp r3, sl 5be4: 3afffffb bcc 5bd8 <_Objects_Extend_information+0x88> 5be8: e1a07107 lsl r7, r7, #2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5bec: e3a00000 mov r0, #0 ; 0x0 inactive_per_block[block_count] = 0; 5bf0: e7890007 str r0, [r9, r7] for ( index=index_base ; index < ( information->allocation_size + index_base ); 5bf4: e5953014 ldr r3, [r5, #20] 5bf8: e0881003 add r1, r8, r3 5bfc: e1580001 cmp r8, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5c00: e78c0007 str r0, [ip, r7] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5c04: 2a000006 bcs 5c24 <_Objects_Extend_information+0xd4> 5c08: e1a03108 lsl r3, r8, #2 5c0c: e0842003 add r2, r4, r3 5c10: e1a03008 mov r3, r8 index++ ) { 5c14: e2833001 add r3, r3, #1 ; 0x1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5c18: e1530001 cmp r3, r1 index++ ) { local_table[ index ] = NULL; 5c1c: e4820004 str r0, [r2], #4 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5c20: 3afffffb bcc 5c14 <_Objects_Extend_information+0xc4> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 5c24: e10f0000 mrs r0, CPSR 5c28: e38030c0 orr r3, r0, #192 ; 0xc0 5c2c: 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( 5c30: 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; 5c34: e59de004 ldr lr, [sp, #4] information->maximum_id = _Objects_Build_id( 5c38: e1d510b4 ldrh r1, [r5, #4] 5c3c: 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; 5c40: e1a0280e lsl r2, lr, #16 information->maximum_id = _Objects_Build_id( 5c44: 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; 5c48: e1a02822 lsr r2, r2, #16 information->maximum_id = _Objects_Build_id( 5c4c: e1833d81 orr r3, r3, r1, lsl #27 5c50: e1833002 orr r3, r3, r2 5c54: 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; 5c58: e5859030 str r9, [r5, #48] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 5c5c: e5953034 ldr r3, [r5, #52] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 5c60: e585401c str r4, [r5, #28] information->maximum = maximum; 5c64: e1c521b0 strh r2, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 5c68: e585c034 str ip, [r5, #52] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 5c6c: e129f000 msr CPSR_fc, r0 if ( old_tables ) 5c70: e3530000 cmp r3, #0 ; 0x0 _Workspace_Free( old_tables ); 5c74: 11a00003 movne r0, r3 5c78: 1b000857 blne 7ddc <_Workspace_Free> 5c7c: e5954014 ldr r4, [r5, #20] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 5c80: e5d53012 ldrb r3, [r5, #18] 5c84: e3530000 cmp r3, #0 ; 0x0 5c88: 0a000061 beq 5e14 <_Objects_Extend_information+0x2c4> information->object_blocks[ block ] = 5c8c: e5953018 ldr r3, [r5, #24] 5c90: e0000493 mul r0, r3, r4 5c94: e5954034 ldr r4, [r5, #52] 5c98: eb000853 bl 7dec <_Workspace_Allocate> _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5c9c: e5953034 ldr r3, [r5, #52] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 5ca0: e7840106 str r0, [r4, r6, lsl #2] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5ca4: e7931106 ldr r1, [r3, r6, lsl #2] 5ca8: e3510000 cmp r1, #0 ; 0x0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 5cac: e1a0a106 lsl sl, r6, #2 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5cb0: 0a00001d beq 5d2c <_Objects_Extend_information+0x1dc> /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 5cb4: e28d7008 add r7, sp, #8 ; 0x8 5cb8: e1a00007 mov r0, r7 5cbc: e2852014 add r2, r5, #20 ; 0x14 5cc0: e892000c ldm r2, {r2, r3} 5cc4: eb00126d bl a680 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5cc8: e1a04008 mov r4, r8 5ccc: e2856020 add r6, r5, #32 ; 0x20 5cd0: ea000008 b 5cf8 <_Objects_Extend_information+0x1a8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 5cd4: e5953000 ldr r3, [r5] 5cd8: e1d520b4 ldrh r2, [r5, #4] 5cdc: e1a03c03 lsl r3, r3, #24 5ce0: e3833801 orr r3, r3, #65536 ; 0x10000 5ce4: e1833d82 orr r3, r3, r2, lsl #27 5ce8: e1833004 orr r3, r3, r4 5cec: e58c3008 str r3, [ip, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5cf0: ebfffd6f bl 52b4 <_Chain_Append> index++; 5cf4: e2844001 add r4, r4, #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 ) { 5cf8: e1a00007 mov r0, r7 5cfc: eb001252 bl a64c <_Chain_Get> 5d00: e250c000 subs ip, r0, #0 ; 0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5d04: e1a0100c mov r1, ip 5d08: e1a00006 mov r0, r6 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 5d0c: 1afffff0 bne 5cd4 <_Objects_Extend_information+0x184> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 5d10: e5953014 ldr r3, [r5, #20] 5d14: e5952030 ldr r2, [r5, #48] 5d18: e782300a str r3, [r2, sl] information->inactive += information->allocation_size; 5d1c: e1d512bc ldrh r1, [r5, #44] 5d20: e5953014 ldr r3, [r5, #20] 5d24: e0833001 add r3, r3, r1 5d28: e1c532bc strh r3, [r5, #44] } 5d2c: e28dd014 add sp, sp, #20 ; 0x14 5d30: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 5d34: e5904014 ldr r4, [r0, #20] 5d38: e1a00009 mov r0, r9 5d3c: e1a01004 mov r1, r4 5d40: eb0033b9 bl 12c2c <__aeabi_uidiv> for ( ; block < block_count; block++ ) { 5d44: e2507000 subs r7, r0, #0 ; 0x0 5d48: 0a00003a beq 5e38 <_Objects_Extend_information+0x2e8> if ( information->object_blocks[ block ] == NULL ) 5d4c: e5952034 ldr r2, [r5, #52] 5d50: e5923000 ldr r3, [r2] 5d54: e3530000 cmp r3, #0 ; 0x0 5d58: 11a0800a movne r8, sl 5d5c: 13a06000 movne r6, #0 ; 0x0 5d60: 1a000003 bne 5d74 <_Objects_Extend_information+0x224> 5d64: ea000033 b 5e38 <_Objects_Extend_information+0x2e8> <== NOT EXECUTED 5d68: e7923106 ldr r3, [r2, r6, lsl #2] 5d6c: e3530000 cmp r3, #0 ; 0x0 5d70: 0a000003 beq 5d84 <_Objects_Extend_information+0x234> if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 5d74: e2866001 add r6, r6, #1 ; 0x1 5d78: e1570006 cmp r7, r6 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 5d7c: e0888004 add r8, r8, r4 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 5d80: 8afffff8 bhi 5d68 <_Objects_Extend_information+0x218> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 5d84: e1580009 cmp r8, r9 5d88: 3affffbc bcc 5c80 <_Objects_Extend_information+0x130> 5d8c: e287b001 add fp, r7, #1 ; 0x1 5d90: e1a0308b lsl r3, fp, #1 5d94: e083000b add r0, r3, fp 5d98: eaffff79 b 5b84 <_Objects_Extend_information+0x34> /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 5d9c: e080000a add r0, r0, sl 5da0: e0800009 add r0, r0, r9 5da4: e1a00100 lsl r0, r0, #2 5da8: eb00080f bl 7dec <_Workspace_Allocate> block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 5dac: e250c000 subs ip, r0, #0 ; 0x0 5db0: 0affffdd beq 5d2c <_Objects_Extend_information+0x1dc> * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5db4: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5db8: e1a0210b lsl r2, fp, #2 5dbc: e08c9002 add r9, ip, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5dc0: e153000a cmp r3, sl 5dc4: e0894002 add r4, r9, r2 5dc8: 9affff7e bls 5bc8 <_Objects_Extend_information+0x78> /* * 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, 5dcc: e1a07107 lsl r7, r7, #2 5dd0: e1a0000c mov r0, ip 5dd4: e5951034 ldr r1, [r5, #52] 5dd8: e1a02007 mov r2, r7 5ddc: e58dc000 str ip, [sp] 5de0: eb001a30 bl c6a8 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 5de4: e5951030 ldr r1, [r5, #48] 5de8: e1a02007 mov r2, r7 5dec: e1a00009 mov r0, r9 5df0: eb001a2c bl c6a8 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 5df4: e1d521b0 ldrh r2, [r5, #16] 5df8: e08a2002 add r2, sl, r2 5dfc: e1a02102 lsl r2, r2, #2 5e00: e1a00004 mov r0, r4 5e04: e595101c ldr r1, [r5, #28] 5e08: eb001a26 bl c6a8 5e0c: e59dc000 ldr ip, [sp] 5e10: eaffff75 b 5bec <_Objects_Extend_information+0x9c> if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 5e14: e5953018 ldr r3, [r5, #24] 5e18: e0000493 mul r0, r3, r4 5e1c: e5954034 ldr r4, [r5, #52] 5e20: eb0007f5 bl 7dfc <_Workspace_Allocate_or_fatal_error> 5e24: e5953034 ldr r3, [r5, #52] 5e28: e7840106 str r0, [r4, r6, lsl #2] 5e2c: e1a0a106 lsl sl, r6, #2 5e30: e7931106 ldr r1, [r3, r6, lsl #2] 5e34: eaffff9e b 5cb4 <_Objects_Extend_information+0x164> if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 5e38: e1a0800a mov r8, sl <== NOT EXECUTED 5e3c: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 5e40: eaffffcf b 5d84 <_Objects_Extend_information+0x234> <== NOT EXECUTED 00015d88 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 15d88: e1a0c001 mov ip, r1 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 15d8c: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 15d90: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 15d94: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 15d98: 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; 15d9c: 05904008 ldreq r4, [r0, #8] <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 15da0: e1a05000 mov r5, r0 <== NOT EXECUTED 15da4: e1a06002 mov r6, r2 <== NOT EXECUTED 15da8: e1a07003 mov r7, r3 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 15dac: 11a0400c movne r4, ip <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 15db0: e1a03804 lsl r3, r4, #16 <== NOT EXECUTED 15db4: e1d5c1b0 ldrh ip, [r5, #16] <== NOT EXECUTED 15db8: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 15dbc: e15c0003 cmp ip, r3 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 15dc0: e1a01004 mov r1, r4 <== NOT EXECUTED 15dc4: e1a00005 mov r0, r5 <== NOT EXECUTED 15dc8: e1a02006 mov r2, r6 <== NOT EXECUTED next_id++; 15dcc: 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) 15dd0: 3a000005 bcc 15dec <_Objects_Get_next+0x64> <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 15dd4: ebffd7c8 bl bcfc <_Objects_Get> <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 15dd8: e5963000 ldr r3, [r6] <== NOT EXECUTED 15ddc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 15de0: 1afffff2 bne 15db0 <_Objects_Get_next+0x28> <== NOT EXECUTED *next_id_p = next_id; 15de4: e5874000 str r4, [r7] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 15de8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 15dec: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 15df0: e3e02000 mvn r2, #0 ; 0x0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 15df4: e5863000 str r3, [r6] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 15df8: e5872000 str r2, [r7] <== NOT EXECUTED 15dfc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 15e00: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 0000511c <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 511c: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 5120: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 5124: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 5128: 0a00000b beq 515c <_POSIX_Condition_variables_Get+0x40> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 512c: e5951000 ldr r1, [r5] 5130: e3710001 cmn r1, #1 ; 0x1 5134: 0a000003 beq 5148 <_POSIX_Condition_variables_Get+0x2c> /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 5138: e59f002c ldr r0, [pc, #44] ; 516c <_POSIX_Condition_variables_Get+0x50> 513c: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 5140: e8bd4030 pop {r4, r5, lr} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 5144: ea000b92 b 7f94 <_Objects_Get> if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 5148: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 514c: eb000007 bl 5170 <== NOT EXECUTED if ( status ) { 5150: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 5154: 05951000 ldreq r1, [r5] <== NOT EXECUTED 5158: 0afffff6 beq 5138 <_POSIX_Condition_variables_Get+0x1c> <== NOT EXECUTED *location = OBJECTS_ERROR; 515c: e3a03001 mov r3, #1 ; 0x1 5160: e5843000 str r3, [r4] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 5164: e3a00000 mov r0, #0 ; 0x0 5168: e8bd8030 pop {r4, r5, pc} 516c: 000157c4 .word 0x000157c4 00005304 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 5304: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 5308: e1a06001 mov r6, r1 530c: e24dd004 sub sp, sp, #4 ; 0x4 5310: 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 ) ) { 5314: e1a0100d mov r1, sp 5318: e1a00006 mov r0, r6 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 531c: e1a0a002 mov sl, r2 5320: 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 ) ) { 5324: eb000071 bl 54f0 <_POSIX_Mutex_Get> 5328: e3500000 cmp r0, #0 ; 0x0 532c: 0a00001d beq 53a8 <_POSIX_Condition_variables_Wait_support+0xa4> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 5330: e59f30d8 ldr r3, [pc, #216] ; 5410 <_POSIX_Condition_variables_Wait_support+0x10c> 5334: e5932000 ldr r2, [r3] 5338: e2422001 sub r2, r2, #1 ; 0x1 533c: e5832000 str r2, [r3] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 5340: e1a0100d mov r1, sp 5344: e1a00007 mov r0, r7 5348: ebffff73 bl 511c <_POSIX_Condition_variables_Get> switch ( location ) { 534c: e59d3000 ldr r3, [sp] 5350: e3530000 cmp r3, #0 ; 0x0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 5354: e1a05000 mov r5, r0 switch ( location ) { 5358: 1a000012 bne 53a8 <_POSIX_Condition_variables_Wait_support+0xa4> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 535c: e5902014 ldr r2, [r0, #20] 5360: e3520000 cmp r2, #0 ; 0x0 5364: 0a000005 beq 5380 <_POSIX_Condition_variables_Wait_support+0x7c> 5368: e5963000 ldr r3, [r6] 536c: e1520003 cmp r2, r3 5370: 0a000002 beq 5380 <_POSIX_Condition_variables_Wait_support+0x7c> _Thread_Enable_dispatch(); 5374: eb000d27 bl 8818 <_Thread_Enable_dispatch> <== NOT EXECUTED 5378: e3a04016 mov r4, #22 ; 0x16 <== NOT EXECUTED 537c: ea00000a b 53ac <_POSIX_Condition_variables_Wait_support+0xa8> <== NOT EXECUTED return EINVAL; } (void) pthread_mutex_unlock( mutex ); 5380: e1a00006 mov r0, r6 5384: eb0000e9 bl 5730 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 5388: e3580000 cmp r8, #0 ; 0x0 538c: 0a000009 beq 53b8 <_POSIX_Condition_variables_Wait_support+0xb4> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 5390: eb000d20 bl 8818 <_Thread_Enable_dispatch> 5394: e3a04074 mov r4, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 5398: e1a00006 mov r0, r6 539c: eb0000c2 bl 56ac if ( mutex_status ) 53a0: e3500000 cmp r0, #0 ; 0x0 53a4: 0a000000 beq 53ac <_POSIX_Condition_variables_Wait_support+0xa8> 53a8: e3a04016 mov r4, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 53ac: e1a00004 mov r0, r4 53b0: e28dd004 add sp, sp, #4 ; 0x4 53b4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 53b8: e5963000 ldr r3, [r6] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 53bc: e59f4050 ldr r4, [pc, #80] ; 5414 <_POSIX_Condition_variables_Wait_support+0x110> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 53c0: e5853014 str r3, [r5, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 53c4: e5942000 ldr r2, [r4] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 53c8: e5971000 ldr r1, [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; 53cc: e285c018 add ip, r5, #24 ; 0x18 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; 53d0: e3a03001 mov r3, #1 ; 0x1 _Thread_Executing->Wait.id = *cond; 53d4: e5821020 str r1, [r2, #32] 53d8: 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; 53dc: 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; 53e0: 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 ); 53e4: e1a0000c mov r0, ip 53e8: e1a0100a mov r1, sl 53ec: e59f2024 ldr r2, [pc, #36] ; 5418 <_POSIX_Condition_variables_Wait_support+0x114> 53f0: eb000e50 bl 8d38 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 53f4: eb000d07 bl 8818 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 53f8: e5943000 ldr r3, [r4] 53fc: e5934034 ldr r4, [r3, #52] if ( status && status != ETIMEDOUT ) 5400: e3540000 cmp r4, #0 ; 0x0 5404: 13540074 cmpne r4, #116 ; 0x74 5408: 0affffe2 beq 5398 <_POSIX_Condition_variables_Wait_support+0x94> 540c: eaffffe6 b 53ac <_POSIX_Condition_variables_Wait_support+0xa8> <== NOT EXECUTED 5410: 000153ac .word 0x000153ac 5414: 00015464 .word 0x00015464 5418: 000091dc .word 0x000091dc 00010bcc <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 10bcc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 10bd0: e1a08001 mov r8, r1 10bd4: 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 ); 10bd8: e3a010ff mov r1, #255 ; 0xff const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 10bdc: e1a04002 mov r4, r2 10be0: e1a0b003 mov fp, r3 10be4: 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 ); 10be8: eb001262 bl 15578 if ( n > NAME_MAX ) 10bec: 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 ); 10bf0: e1a05000 mov r5, r0 if ( n > NAME_MAX ) 10bf4: 83a0005b movhi r0, #91 ; 0x5b 10bf8: 8a000031 bhi 10cc4 <_POSIX_Message_queue_Create_support+0xf8> 10bfc: e59f2148 ldr r2, [pc, #328] ; 10d4c <_POSIX_Message_queue_Create_support+0x180> 10c00: e5923000 ldr r3, [r2] 10c04: e2833001 add r3, r3, #1 ; 0x1 10c08: 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 ) { 10c0c: e3540000 cmp r4, #0 ; 0x0 10c10: 03a0a010 moveq sl, #16 ; 0x10 10c14: 03a0700a moveq r7, #10 ; 0xa 10c18: 0a000009 beq 10c44 <_POSIX_Message_queue_Create_support+0x78> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 10c1c: e5943004 ldr r3, [r4, #4] 10c20: e3530000 cmp r3, #0 ; 0x0 10c24: da000033 ble 10cf8 <_POSIX_Message_queue_Create_support+0x12c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 10c28: e5943008 ldr r3, [r4, #8] 10c2c: e3530000 cmp r3, #0 ; 0x0 10c30: da000030 ble 10cf8 <_POSIX_Message_queue_Create_support+0x12c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } attr = *attr_ptr; 10c34: e894000f ldm r4, {r0, r1, r2, r3} 10c38: e88d000f stm sp, {r0, r1, r2, r3} 10c3c: e1a0a002 mov sl, r2 10c40: e1a07001 mov r7, r1 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 10c44: e59f6104 ldr r6, [pc, #260] ; 10d50 <_POSIX_Message_queue_Create_support+0x184> 10c48: e1a00006 mov r0, r6 10c4c: ebffef8c bl ca84 <_Objects_Allocate> } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 10c50: e2504000 subs r4, r0, #0 ; 0x0 10c54: 0a000036 beq 10d34 <_POSIX_Message_queue_Create_support+0x168> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; 10c58: 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); 10c5c: e1a00005 mov r0, r5 if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 10c60: e5848010 str r8, [r4, #16] the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 10c64: 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; 10c68: e5c43014 strb r3, [r4, #20] the_mq->open_count = 1; 10c6c: 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); 10c70: ebfff8b0 bl ef38 <_Workspace_Allocate> if (!name) { 10c74: e2505000 subs r5, r0, #0 ; 0x0 10c78: 0a000024 beq 10d10 <_POSIX_Message_queue_Create_support+0x144> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); 10c7c: 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; 10c80: e3a08000 mov r8, #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 ); 10c84: eb000fc2 bl 14b94 * 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; 10c88: e584805c str r8, [r4, #92] if ( ! _CORE_message_queue_Initialize( 10c8c: e1a02007 mov r2, r7 10c90: e1a0300a mov r3, sl 10c94: e284001c add r0, r4, #28 ; 0x1c 10c98: e284105c add r1, r4, #92 ; 0x5c 10c9c: eb00037a bl 11a8c <_CORE_message_queue_Initialize> 10ca0: e1500008 cmp r0, r8 10ca4: 0a000008 beq 10ccc <_POSIX_Message_queue_Create_support+0x100> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ca8: e596201c ldr r2, [r6, #28] 10cac: e1d430b8 ldrh r3, [r4, #8] 10cb0: 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; 10cb4: e584500c str r5, [r4, #12] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 10cb8: e58b4000 str r4, [fp] _Thread_Enable_dispatch(); 10cbc: ebfff30b bl d8f0 <_Thread_Enable_dispatch> 10cc0: e1a00008 mov r0, r8 return 0; } 10cc4: e28dd010 add sp, sp, #16 ; 0x10 10cc8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 10ccc: e1a01004 mov r1, r4 <== NOT EXECUTED 10cd0: e1a00006 mov r0, r6 <== NOT EXECUTED 10cd4: ebfff057 bl ce38 <_Objects_Free> <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 10cd8: e1a00005 mov r0, r5 <== NOT EXECUTED 10cdc: ebfff891 bl ef28 <_Workspace_Free> <== NOT EXECUTED _Thread_Enable_dispatch(); 10ce0: ebfff302 bl d8f0 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 10ce4: eb000a72 bl 136b4 <__errno> <== NOT EXECUTED 10ce8: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 10cec: e5803000 str r3, [r0] <== NOT EXECUTED 10cf0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 10cf4: eafffff2 b 10cc4 <_POSIX_Message_queue_Create_support+0xf8> <== NOT EXECUTED _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 10cf8: ebfff2fc bl d8f0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 10cfc: eb000a6c bl 136b4 <__errno> 10d00: e3a03016 mov r3, #22 ; 0x16 10d04: e5803000 str r3, [r0] 10d08: e3e00000 mvn r0, #0 ; 0x0 10d0c: eaffffec b 10cc4 <_POSIX_Message_queue_Create_support+0xf8> 10d10: e1a00006 mov r0, r6 <== NOT EXECUTED 10d14: e1a01004 mov r1, r4 <== NOT EXECUTED 10d18: ebfff046 bl ce38 <_Objects_Free> <== NOT EXECUTED */ name = _Workspace_Allocate(n); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 10d1c: ebfff2f3 bl d8f0 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 10d20: eb000a63 bl 136b4 <__errno> <== NOT EXECUTED 10d24: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 10d28: e5803000 str r3, [r0] <== NOT EXECUTED 10d2c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 10d30: eaffffe3 b 10cc4 <_POSIX_Message_queue_Create_support+0xf8> <== NOT EXECUTED attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 10d34: ebfff2ed bl d8f0 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 10d38: eb000a5d bl 136b4 <__errno> <== NOT EXECUTED 10d3c: e3a03017 mov r3, #23 ; 0x17 <== NOT EXECUTED 10d40: e5803000 str r3, [r0] <== NOT EXECUTED 10d44: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 10d48: eaffffdd b 10cc4 <_POSIX_Message_queue_Create_support+0xf8> <== NOT EXECUTED 10d4c: 000223ec .word 0x000223ec 10d50: 00022700 .word 0x00022700 00005dcc <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 5dcc: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5dd0: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 5dd4: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5dd8: 0a00000b beq 5e0c <_POSIX_Mutex_Get+0x40> 5ddc: e5951000 ldr r1, [r5] 5de0: e3710001 cmn r1, #1 ; 0x1 5de4: 0a000003 beq 5df8 <_POSIX_Mutex_Get+0x2c> return (POSIX_Mutex_Control *) 5de8: e59f002c ldr r0, [pc, #44] ; 5e1c <_POSIX_Mutex_Get+0x50> 5dec: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 5df0: e8bd4030 pop {r4, r5, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 5df4: ea000b71 b 8bc0 <_Objects_Get> Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5df8: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 5dfc: eb000019 bl 5e68 <== NOT EXECUTED 5e00: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 5e04: 05951000 ldreq r1, [r5] <== NOT EXECUTED 5e08: 0afffff6 beq 5de8 <_POSIX_Mutex_Get+0x1c> <== NOT EXECUTED 5e0c: e3a03001 mov r3, #1 ; 0x1 5e10: e5843000 str r3, [r4] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 5e14: e3a00000 mov r0, #0 ; 0x0 5e18: e8bd8030 pop {r4, r5, pc} 5e1c: 000175a0 .word 0x000175a0 00005d70 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 5d70: e92d4070 push {r4, r5, r6, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5d74: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 5d78: e1a04001 mov r4, r1 5d7c: e1a06002 mov r6, r2 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5d80: 0a00000c beq 5db8 <_POSIX_Mutex_Get_interrupt_disable+0x48> 5d84: e5951000 ldr r1, [r5] 5d88: e3710001 cmn r1, #1 ; 0x1 5d8c: 0a000004 beq 5da4 <_POSIX_Mutex_Get_interrupt_disable+0x34> return (POSIX_Mutex_Control *) 5d90: e59f0030 ldr r0, [pc, #48] ; 5dc8 <_POSIX_Mutex_Get_interrupt_disable+0x58> 5d94: e1a02004 mov r2, r4 5d98: e1a03006 mov r3, r6 _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 5d9c: e8bd4070 pop {r4, r5, r6, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 5da0: ea000b6a b 8b50 <_Objects_Get_isr_disable> ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5da4: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 5da8: eb00002e bl 5e68 <== NOT EXECUTED 5dac: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 5db0: 05951000 ldreq r1, [r5] <== NOT EXECUTED 5db4: 0afffff5 beq 5d90 <_POSIX_Mutex_Get_interrupt_disable+0x20> <== NOT EXECUTED 5db8: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 5dbc: e5843000 str r3, [r4] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 5dc0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 5dc4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 5dc8: 000175a0 .word 0x000175a0 0000d50c <_POSIX_Semaphore_Create_support>: d50c: e59fc0f8 ldr ip, [pc, #248] ; d60c <_POSIX_Semaphore_Create_support+0x100> const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { d510: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} d514: e59ce000 ldr lr, [ip] d518: e28ee001 add lr, lr, #1 ; 0x1 d51c: e58ce000 str lr, [ip] d520: e1a07002 mov r7, r2 d524: e1a0a003 mov sl, r3 d528: e1a06000 mov r6, r0 char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { d52c: e3510000 cmp r1, #0 ; 0x0 d530: 1a000023 bne d5c4 <_POSIX_Semaphore_Create_support+0xb8> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); } if ( name ) { d534: e3500000 cmp r0, #0 ; 0x0 d538: 0a000002 beq d548 <_POSIX_Semaphore_Create_support+0x3c> if( strlen(name) > PATH_MAX ) { d53c: eb000f8e bl 1137c d540: e35000ff cmp r0, #255 ; 0xff d544: 8a000024 bhi d5dc <_POSIX_Semaphore_Create_support+0xd0> * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) d548: e59f80c0 ldr r8, [pc, #192] ; d610 <_POSIX_Semaphore_Create_support+0x104> d54c: e1a00008 mov r0, r8 d550: ebffeda7 bl 8bf4 <_Objects_Allocate> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { d554: e2505000 subs r5, r0, #0 ; 0x0 d558: 0a000025 beq d5f4 <_POSIX_Semaphore_Create_support+0xe8> rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; if ( name ) { d55c: e3560000 cmp r6, #0 ; 0x0 if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; d560: e3a03000 mov r3, #0 ; 0x0 d564: e5853010 str r3, [r5, #16] if ( name ) { the_semaphore->named = TRUE; d568: 12833001 addne r3, r3, #1 ; 0x1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; d56c: 15c53015 strbne r3, [r5, #21] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; d570: 15c53014 strbne r3, [r5, #20] the_semaphore->open_count = 1; d574: 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; d578: e3a04000 mov r4, #0 ; 0x0 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; d57c: e3e03000 mvn r3, #0 ; 0x0 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); d580: 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; d584: 05c56014 strbeq r6, [r5, #20] the_semaphore->open_count = 0; d588: 05856018 streq r6, [r5, #24] the_semaphore->linked = FALSE; d58c: 05c56015 strbeq r6, [r5, #21] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; d590: e585305c str r3, [r5, #92] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); d594: e1a02007 mov r2, r7 d598: 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; d59c: 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 ); d5a0: ebffec7c bl 8798 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; d5a4: e598201c ldr r2, [r8, #28] d5a8: e1d530b8 ldrh r3, [r5, #8] d5ac: e7825103 str r5, [r2, r3, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; d5b0: e585600c str r6, [r5, #12] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; d5b4: e58a5000 str r5, [sl] _Thread_Enable_dispatch(); d5b8: ebfff0f5 bl 9994 <_Thread_Enable_dispatch> d5bc: e1a00004 mov r0, r4 return 0; } d5c0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { _Thread_Enable_dispatch(); d5c4: ebfff0f2 bl 9994 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); d5c8: eb000894 bl f820 <__errno> d5cc: e3a03058 mov r3, #88 ; 0x58 d5d0: e5803000 str r3, [r0] d5d4: e3e00000 mvn r0, #0 ; 0x0 d5d8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } if ( name ) { if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); d5dc: ebfff0ec bl 9994 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); d5e0: eb00088e bl f820 <__errno> <== NOT EXECUTED d5e4: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED d5e8: e5803000 str r3, [r0] <== NOT EXECUTED d5ec: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED d5f0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); d5f4: ebfff0e6 bl 9994 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); d5f8: eb000888 bl f820 <__errno> d5fc: e3a0301c mov r3, #28 ; 0x1c d600: e5803000 str r3, [r0] d604: e3e00000 mvn r0, #0 ; 0x0 d608: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} d60c: 0001d38c .word 0x0001d38c d610: 0001d620 .word 0x0001d620 0000b604 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { b604: 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 ]; b608: e5906108 ldr r6, [r0, #264] handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { b60c: e59620d8 ldr r2, [r6, #216] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; b610: e28650dc add r5, r6, #220 ; 0xdc thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; b614: e3a03001 mov r3, #1 ; 0x1 while ( !_Chain_Is_empty( handler_stack ) ) { b618: e1520005 cmp r2, r5 thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; b61c: e58630cc str r3, [r6, #204] while ( !_Chain_Is_empty( handler_stack ) ) { b620: 08bd8070 popeq {r4, r5, r6, pc} _ISR_Disable( level ); b624: e10f1000 mrs r1, CPSR <== NOT EXECUTED b628: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED b62c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) b630: e5954004 ldr r4, [r5, #4] <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; b634: e894000c ldm r4, {r2, r3} <== NOT EXECUTED previous = the_node->previous; next->previous = previous; previous->next = next; b638: e5832000 str r2, [r3] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; b63c: e5823004 str r3, [r2, #4] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); b640: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED (*handler->routine)( handler->arg ); b644: e594000c ldr r0, [r4, #12] <== NOT EXECUTED b648: e1a0e00f mov lr, pc <== NOT EXECUTED b64c: e594f008 ldr pc, [r4, #8] <== NOT EXECUTED _Workspace_Free( handler ); b650: e1a00004 mov r0, r4 <== NOT EXECUTED b654: ebfff1e0 bl 7ddc <_Workspace_Free> <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { b658: e59630d8 ldr r3, [r6, #216] <== NOT EXECUTED b65c: e1530005 cmp r3, r5 <== NOT EXECUTED b660: 1affffef bne b624 <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED b664: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 0000c150 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { c150: e92d41f0 push {r4, r5, r6, r7, r8, lr} c154: e1a08001 mov r8, r1 c158: e1a07002 mov r7, r2 c15c: e1a05003 mov r5, r3 c160: e1a04000 mov r4, r0 ISR_Level level; (void) _Watchdog_Remove( timer ); c164: ebfff643 bl 9a78 <_Watchdog_Remove> _ISR_Disable( level ); c168: e10f6000 mrs r6, CPSR c16c: e38630c0 orr r3, r6, #192 ; 0xc0 c170: 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 ) { c174: e5943008 ldr r3, [r4, #8] c178: e3530000 cmp r3, #0 ; 0x0 c17c: 0a000002 beq c18c <_POSIX_Timer_Insert_helper+0x3c> _ISR_Enable( level ); c180: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED c184: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED c188: 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; c18c: e5843008 str r3, [r4, #8] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; c190: e59d3018 ldr r3, [sp, #24] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; c194: e584501c str r5, [r4, #28] the_watchdog->id = id; c198: e5847020 str r7, [r4, #32] the_watchdog->user_data = user_data; c19c: e5843024 str r3, [r4, #36] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; c1a0: e584800c str r8, [r4, #12] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); c1a4: e1a01004 mov r1, r4 c1a8: e59f000c ldr r0, [pc, #12] ; c1bc <_POSIX_Timer_Insert_helper+0x6c> c1ac: ebfff5c2 bl 98bc <_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 ); c1b0: e129f006 msr CPSR_fc, r6 c1b4: e3a00001 mov r0, #1 ; 0x1 return true; } c1b8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} c1bc: 0001ba24 .word 0x0001ba24 00005c9c <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 5c9c: e92d4010 push {r4, lr} bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 5ca0: e5913068 ldr r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 5ca4: e5912054 ldr r2, [r1, #84] bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 5ca8: e2833001 add r3, r3, #1 ; 0x1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 5cac: 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) { 5cb0: e24dd004 sub sp, sp, #4 ; 0x4 5cb4: e1a04001 mov r4, r1 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 5cb8: e5813068 str r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 5cbc: 1a000004 bne 5cd4 <_POSIX_Timer_TSR+0x38> 5cc0: e5913058 ldr r3, [r1, #88] <== NOT EXECUTED 5cc4: 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; 5cc8: 03a03004 moveq r3, #4 ; 0x4 <== NOT EXECUTED 5ccc: 05c1303c strbeq r3, [r1, #60] <== 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 ) || 5cd0: 0a00000d beq 5d0c <_POSIX_Timer_TSR+0x70> <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 5cd4: e5941064 ldr r1, [r4, #100] 5cd8: e5942008 ldr r2, [r4, #8] 5cdc: e2840010 add r0, r4, #16 ; 0x10 5ce0: e59f303c ldr r3, [pc, #60] ; 5d24 <_POSIX_Timer_TSR+0x88> 5ce4: e58d4000 str r4, [sp] 5ce8: eb001918 bl c150 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 5cec: e3500000 cmp r0, #0 ; 0x0 5cf0: 1a000001 bne 5cfc <_POSIX_Timer_TSR+0x60> /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; } 5cf4: e28dd004 add sp, sp, #4 ; 0x4 5cf8: e8bd8010 pop {r4, pc} ); if ( !activated ) return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 5cfc: e284006c add r0, r4, #108 ; 0x6c 5d00: eb0005bd bl 73fc <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 5d04: e3a03003 mov r3, #3 ; 0x3 5d08: 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 ) ) { 5d0c: e5940038 ldr r0, [r4, #56] 5d10: e5941044 ldr r1, [r4, #68] 5d14: eb001830 bl bddc } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 5d18: e3a03000 mov r3, #0 ; 0x0 5d1c: e5843068 str r3, [r4, #104] 5d20: eafffff3 b 5cf4 <_POSIX_Timer_TSR+0x58> 5d24: 00005c9c .word 0x00005c9c 0000528c <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 528c: e1a02000 mov r2, r0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 5290: e3a01001 mov r1, #1 ; 0x1 #include int _POSIX_signals_Get_highest( sigset_t set ) { 5294: e3a0001b mov r0, #27 ; 0x1b int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 5298: e2403001 sub r3, r0, #1 ; 0x1 529c: e0123311 ands r3, r2, r1, lsl r3 52a0: 112fff1e bxne lr sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 52a4: e2800001 add r0, r0, #1 ; 0x1 52a8: e3500020 cmp r0, #32 ; 0x20 52ac: 1afffff9 bne 5298 <_POSIX_signals_Get_highest+0xc> 52b0: e240001f sub r0, r0, #31 ; 0x1f } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) 52b4: e1a01000 mov r1, r0 52b8: e2403001 sub r3, r0, #1 ; 0x1 52bc: e0123311 ands r3, r2, r1, lsl r3 52c0: 112fff1e bxne lr return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 52c4: e2800001 add r0, r0, #1 ; 0x1 52c8: e350001b cmp r0, #27 ; 0x1b 52cc: 1afffff9 bne 52b8 <_POSIX_signals_Get_highest+0x2c> 52d0: e1a00003 mov r0, r3 <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 52d4: e12fff1e bx lr <== NOT EXECUTED 00009bf8 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 9bf8: e92d4070 push {r4, r5, r6, lr} POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 9bfc: e5905108 ldr r5, [r0, #264] if ( !api ) 9c00: e3550000 cmp r5, #0 ; 0x0 9c04: 08bd8070 popeq {r4, r5, r6, pc} 9c08: e59f60b0 ldr r6, [pc, #176] ; 9cc0 <_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 ); 9c0c: e10f0000 mrs r0, CPSR 9c10: e38030c0 orr r3, r0, #192 ; 0xc0 9c14: e129f003 msr CPSR_fc, r3 if ( !(~api->signals_blocked & 9c18: e5963000 ldr r3, [r6] 9c1c: e28510c4 add r1, r5, #196 ; 0xc4 9c20: e8910006 ldm r1, {r1, r2} 9c24: e1833002 orr r3, r3, r2 9c28: e1d31001 bics r1, r3, r1 9c2c: 0a000021 beq 9cb8 <_POSIX_signals_Post_switch_extension+0xc0> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 9c30: e129f000 msr CPSR_fc, r0 9c34: e3a0401b mov r4, #27 ; 0x1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 9c38: e1a01004 mov r1, r4 9c3c: e3a02000 mov r2, #0 ; 0x0 9c40: e1a00005 mov r0, r5 9c44: eb0006b5 bl b720 <_POSIX_signals_Check_signal> 9c48: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9c4c: e1a01004 mov r1, r4 9c50: e3a02001 mov r2, #1 ; 0x1 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 9c54: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9c58: e1a00005 mov r0, r5 } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 9c5c: 1affffea bne 9c0c <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9c60: eb0006ae bl b720 <_POSIX_signals_Check_signal> 9c64: e3500000 cmp r0, #0 ; 0x0 9c68: 1affffe7 bne 9c0c <_POSIX_signals_Post_switch_extension+0x14> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 9c6c: e3540020 cmp r4, #32 ; 0x20 9c70: 1afffff0 bne 9c38 <_POSIX_signals_Post_switch_extension+0x40> 9c74: e244401f sub r4, r4, #31 ; 0x1f /* 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 ) ) 9c78: e1a01004 mov r1, r4 9c7c: e3a02000 mov r2, #0 ; 0x0 9c80: e1a00005 mov r0, r5 9c84: eb0006a5 bl b720 <_POSIX_signals_Check_signal> 9c88: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9c8c: e1a01004 mov r1, r4 9c90: e3a02001 mov r2, #1 ; 0x1 } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 9c94: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9c98: 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 ) ) 9c9c: 1affffda bne 9c0c <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9ca0: eb00069e bl b720 <_POSIX_signals_Check_signal> 9ca4: e3500000 cmp r0, #0 ; 0x0 9ca8: 1affffd7 bne 9c0c <_POSIX_signals_Post_switch_extension+0x14> } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 9cac: e354001b cmp r4, #27 ; 0x1b 9cb0: 1afffff0 bne 9c78 <_POSIX_signals_Post_switch_extension+0x80> 9cb4: eaffffd4 b 9c0c <_POSIX_signals_Post_switch_extension+0x14> <== NOT EXECUTED while (1) { restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 9cb8: e129f000 msr CPSR_fc, r0 9cbc: e8bd8070 pop {r4, r5, r6, pc} 9cc0: 0001762c .word 0x0001762c 000223ec <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 223ec: e92d4070 push {r4, r5, r6, lr} Heap_Get_information_status status; if ( !the_heap ) 223f0: e2506000 subs r6, r0, #0 ; 0x0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 223f4: e1a04001 mov r4, r1 Heap_Get_information_status status; if ( !the_heap ) 223f8: 0a00000d beq 22434 <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) 223fc: e3510000 cmp r1, #0 ; 0x0 22400: 0a00000b beq 22434 <_Protected_heap_Get_information+0x48> return false; _RTEMS_Lock_allocator(); 22404: e59f5030 ldr r5, [pc, #48] ; 2243c <_Protected_heap_Get_information+0x50> 22408: e5950000 ldr r0, [r5] 2240c: ebff9923 bl 88a0 <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 22410: e1a01004 mov r1, r4 22414: e1a00006 mov r0, r6 22418: eb0026cb bl 2bf4c <_Heap_Get_information> 2241c: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 22420: e5950000 ldr r0, [r5] 22424: ebff9939 bl 8910 <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 22428: e2740001 rsbs r0, r4, #1 ; 0x1 2242c: 33a00000 movcc r0, #0 ; 0x0 22430: e8bd8070 pop {r4, r5, r6, pc} 22434: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; return false; } 22438: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 2243c: 0005a7bc .word 0x0005a7bc 000056b0 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 56b0: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 56b4: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get( struct timespec *time ) { 56b8: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 56bc: e58d3004 str r3, [sp, #4] */ void _TOD_Get( struct timespec *time ) { 56c0: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 56c4: e58d3000 str r3, [sp] offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); 56c8: e10f6000 mrs r6, CPSR 56cc: e38630c0 orr r3, r6, #192 ; 0xc0 56d0: e129f003 msr CPSR_fc, r3 *time = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 56d4: e59f3038 ldr r3, [pc, #56] ; 5714 <_TOD_Get+0x64> offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 56d8: e59f2038 ldr r2, [pc, #56] ; 5718 <_TOD_Get+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 56dc: e5931000 ldr r1, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 56e0: e8920018 ldm r2, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 56e4: e3510000 cmp r1, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 56e8: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 56ec: 0a000002 beq 56fc <_TOD_Get+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 56f0: e1a0e00f mov lr, pc <== NOT EXECUTED 56f4: e12fff11 bx r1 <== NOT EXECUTED 56f8: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 56fc: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( time, &offset ); 5700: e1a00005 mov r0, r5 5704: e1a0100d mov r1, sp 5708: eb000813 bl 775c <_Timespec_Add_to> } 570c: e28dd008 add sp, sp, #8 ; 0x8 5710: e8bd8070 pop {r4, r5, r6, pc} 5714: 000170b8 .word 0x000170b8 5718: 00016f94 .word 0x00016f94 0000a828 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( struct timespec *uptime ) { a828: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; a82c: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get_uptime( struct timespec *uptime ) { a830: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; a834: e58d3004 str r3, [sp, #4] */ void _TOD_Get_uptime( struct timespec *uptime ) { a838: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; a83c: e58d3000 str r3, [sp] offset.tv_nsec = 0; _ISR_Disable( level ); a840: e10f6000 mrs r6, CPSR a844: e38630c0 orr r3, r6, #192 ; 0xc0 a848: e129f003 msr CPSR_fc, r3 *uptime = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) a84c: e59f3038 ldr r3, [pc, #56] ; a88c <_TOD_Get_uptime+0x64> offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; a850: e59f2038 ldr r2, [pc, #56] ; a890 <_TOD_Get_uptime+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) a854: e5931000 ldr r1, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; a858: e8920018 ldm r2, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) a85c: e3510000 cmp r1, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; a860: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) a864: 0a000002 beq a874 <_TOD_Get_uptime+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); a868: e1a0e00f mov lr, pc <== NOT EXECUTED a86c: e12fff11 bx r1 <== NOT EXECUTED a870: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); a874: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( uptime, &offset ); a878: e1a00005 mov r0, r5 a87c: e1a0100d mov r1, sp a880: ebfff3b5 bl 775c <_Timespec_Add_to> } a884: e28dd008 add sp, sp, #8 ; 0x8 a888: e8bd8070 pop {r4, r5, r6, pc} a88c: 000170b8 .word 0x000170b8 a890: 00016f84 .word 0x00016f84 0000bcf4 <_Thread_Handler>: #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; bcf4: e59f3110 ldr r3, [pc, #272] ; be0c <_Thread_Handler+0x118> * * Output parameters: NONE */ void _Thread_Handler( void ) { bcf8: e92d4030 push {r4, r5, lr} #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; bcfc: 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; bd00: e59520b8 ldr r2, [r5, #184] _ISR_Set_level(level); bd04: e3a03000 mov r3, #0 ; 0x0 bd08: e10f3000 mrs r3, CPSR bd0c: e3c330c0 bic r3, r3, #192 ; 0xc0 bd10: e1833002 orr r3, r3, r2 bd14: e121f003 msr CPSR_c, r3 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; bd18: e59f20f0 ldr r2, [pc, #240] ; be10 <_Thread_Handler+0x11c> doneConstructors = 1; bd1c: e3a03001 mov r3, #1 ; 0x1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; bd20: 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 ); bd24: 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; bd28: 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 ); bd2c: ebffeee5 bl 78c8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); bd30: ebffeae2 bl 68c0 <_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) */ bd34: e3540000 cmp r4, #0 ; 0x0 bd38: 0a000031 beq be04 <_Thread_Handler+0x110> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { bd3c: e59530a0 ldr r3, [r5, #160] bd40: e3530003 cmp r3, #3 ; 0x3 bd44: 979ff103 ldrls pc, [pc, r3, lsl #2] bd48: ea000008 b bd70 <_Thread_Handler+0x7c> <== NOT EXECUTED bd4c: 0000bddc .word 0x0000bddc <== NOT EXECUTED bd50: 0000bdb4 .word 0x0000bdb4 <== NOT EXECUTED bd54: 0000bd88 .word 0x0000bd88 <== NOT EXECUTED bd58: 0000bd5c .word 0x0000bd5c <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = bd5c: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED bd60: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED bd64: e1a0e00f mov lr, pc <== NOT EXECUTED bd68: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED bd6c: e5850028 str r0, [r5, #40] <== NOT EXECUTED * 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 ); bd70: e1a00005 mov r0, r5 <== NOT EXECUTED bd74: ebffeee3 bl 7908 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( bd78: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED bd7c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED bd80: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED bd84: ebffe727 bl 5a28 <_Internal_error_Occurred> <== NOT EXECUTED (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = bd88: e28500a4 add r0, r5, #164 ; 0xa4 <== NOT EXECUTED bd8c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED bd90: e1a0e00f mov lr, pc <== NOT EXECUTED bd94: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED bd98: e5850028 str r0, [r5, #40] <== NOT EXECUTED * 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 ); bd9c: e1a00005 mov r0, r5 <== NOT EXECUTED bda0: ebffeed8 bl 7908 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( bda4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED bda8: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED bdac: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED bdb0: ebffe71c bl 5a28 <_Internal_error_Occurred> <== NOT EXECUTED (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = bdb4: e59500a4 ldr r0, [r5, #164] bdb8: e1a0e00f mov lr, pc bdbc: e595f09c ldr pc, [r5, #156] bdc0: 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 ); bdc4: e1a00005 mov r0, r5 bdc8: ebffeece bl 7908 <_User_extensions_Thread_exitted> _Internal_error_Occurred( bdcc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED bdd0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED bdd4: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED bdd8: ebffe712 bl 5a28 <_Internal_error_Occurred> <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = bddc: e59500a8 ldr r0, [r5, #168] bde0: e1a0e00f mov lr, pc bde4: e595f09c ldr pc, [r5, #156] bde8: 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 ); bdec: e1a00005 mov r0, r5 bdf0: ebffeec4 bl 7908 <_User_extensions_Thread_exitted> _Internal_error_Occurred( bdf4: e3a00000 mov r0, #0 ; 0x0 bdf8: e3a01001 mov r1, #1 ; 0x1 bdfc: e3a02006 mov r2, #6 ; 0x6 be00: ebffe708 bl 5a28 <_Internal_error_Occurred> * 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) */ { _init (); be04: ebffd0c5 bl 120 <_init> be08: eaffffcb b bd3c <_Thread_Handler+0x48> be0c: 00016fc4 .word 0x00016fc4 be10: 00016d50 .word 0x00016d50 0000698c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 698c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 6990: 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 ) { 6994: e1a04003 mov r4, r3 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; 6998: 13a03000 movne r3, #0 ; 0x0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 699c: e5dda02c ldrb sl, [sp, #44] 69a0: e1a09000 mov r9, r0 69a4: e1a05001 mov r5, r1 69a8: e59d8028 ldr r8, [sp, #40] 69ac: e59db030 ldr fp, [sp, #48] 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; 69b0: 15c130c0 strbne r3, [r1, #192] 69b4: 11a0c004 movne ip, r4 69b8: 11a02006 movne r2, r6 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 69bc: 0a000034 beq 6a94 <_Thread_Initialize+0x108> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 69c0: e59f416c ldr r4, [pc, #364] ; 6b34 <_Thread_Initialize+0x1a8> 69c4: e5940000 ldr r0, [r4] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 69c8: e3a06000 mov r6, #0 ; 0x0 69cc: e3500000 cmp r0, #0 ; 0x0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 69d0: e58520c8 str r2, [r5, #200] the_stack->size = size; 69d4: e585c0c4 str ip, [r5, #196] 69d8: e5856050 str r6, [r5, #80] the_watchdog->routine = routine; 69dc: e5856064 str r6, [r5, #100] the_watchdog->id = id; 69e0: e5856068 str r6, [r5, #104] the_watchdog->user_data = user_data; 69e4: e585606c str r6, [r5, #108] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 69e8: e5856100 str r6, [r5, #256] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 69ec: 05850110 streq r0, [r5, #272] 69f0: 01a07000 moveq r7, r0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 69f4: 1a000033 bne 6ac8 <_Thread_Initialize+0x13c> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 69f8: e59d3034 ldr r3, [sp, #52] switch ( budget_algorithm ) { 69fc: e35b0002 cmp fp, #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; 6a00: 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; 6a04: 059f312c ldreq r3, [pc, #300] ; 6b38 <_Thread_Initialize+0x1ac> 6a08: 05932000 ldreq r2, [r3] 6a0c: 05852078 streq r2, [r5, #120] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 6a10: e59d3038 ldr r3, [sp, #56] the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 6a14: e3a04000 mov r4, #0 ; 0x0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 6a18: e3a06001 mov r6, #1 ; 0x1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 6a1c: 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 ); 6a20: e1a01008 mov r1, r8 6a24: e1a00005 mov r0, r5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 6a28: e5c5a0ac strb sl, [r5, #172] the_thread->Start.budget_algorithm = budget_algorithm; 6a2c: e585b0b0 str fp, [r5, #176] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 6a30: e5856010 str r6, [r5, #16] the_thread->Wait.queue = NULL; 6a34: e5854044 str r4, [r5, #68] the_thread->resource_count = 0; 6a38: e585401c str r4, [r5, #28] the_thread->suspend_count = 0; 6a3c: e5854070 str r4, [r5, #112] the_thread->real_priority = priority; 6a40: e5858018 str r8, [r5, #24] the_thread->Start.initial_priority = priority; 6a44: e58580bc str r8, [r5, #188] _Thread_Set_priority( the_thread, priority ); 6a48: eb000200 bl 7250 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 6a4c: e1d530b8 ldrh r3, [r5, #8] 6a50: 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; 6a54: e5854088 str r4, [r5, #136] 6a58: e7825103 str r5, [r2, r3, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 6a5c: e59d303c ldr r3, [sp, #60] * 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 ); 6a60: e1a00005 mov r0, r5 6a64: 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; 6a68: 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 ); 6a6c: eb0003cb bl 79a0 <_User_extensions_Thread_create> if ( !extension_status ) { 6a70: e1500004 cmp r0, r4 6a74: 1a000011 bne 6ac0 <_Thread_Initialize+0x134> if ( extensions_area ) 6a78: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 6a7c: 11a00007 movne r0, r7 <== NOT EXECUTED 6a80: 1b0004d5 blne 7ddc <_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 ); 6a84: e1a00005 mov r0, r5 <== NOT EXECUTED 6a88: eb0002ad bl 7544 <_Thread_Stack_Free> <== NOT EXECUTED 6a8c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return FALSE; } return TRUE; } 6a90: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 6a94: e1a00001 mov r0, r1 6a98: e1a01004 mov r1, r4 6a9c: eb000288 bl 74c4 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 6aa0: e1540000 cmp r4, r0 6aa4: 93a03000 movls r3, #0 ; 0x0 6aa8: 83a03001 movhi r3, #1 ; 0x1 6aac: e3500000 cmp r0, #0 ; 0x0 6ab0: 03833001 orreq r3, r3, #1 ; 0x1 6ab4: e3530000 cmp r3, #0 ; 0x0 6ab8: e1a0c000 mov ip, r0 6abc: 0a000014 beq 6b14 <_Thread_Initialize+0x188> * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( !extension_status ) { 6ac0: e1a00006 mov r0, r6 6ac4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 6ac8: e2800001 add r0, r0, #1 ; 0x1 6acc: e1a00100 lsl r0, r0, #2 6ad0: eb0004c5 bl 7dec <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 6ad4: e2507000 subs r7, r0, #0 ; 0x0 6ad8: 0a000011 beq 6b24 <_Thread_Initialize+0x198> * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6adc: e5943000 ldr r3, [r4] 6ae0: e3730001 cmn r3, #1 ; 0x1 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 6ae4: e5857110 str r7, [r5, #272] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6ae8: 0affffc2 beq 69f8 <_Thread_Initialize+0x6c> 6aec: e1a02006 mov r2, r6 6af0: e1a01007 mov r1, r7 the_thread->extensions[i] = NULL; 6af4: e1a00006 mov r0, r6 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6af8: e5943000 ldr r3, [r4] the_thread->extensions[i] = NULL; 6afc: e7810102 str r0, [r1, r2, lsl #2] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6b00: e2833001 add r3, r3, #1 ; 0x1 6b04: e2822001 add r2, r2, #1 ; 0x1 6b08: e1530002 cmp r3, r2 6b0c: 8afffff9 bhi 6af8 <_Thread_Initialize+0x16c> 6b10: eaffffb8 b 69f8 <_Thread_Initialize+0x6c> if ( !actual_stack_size || actual_stack_size < stack_size ) return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 6b14: e3a03001 mov r3, #1 ; 0x1 6b18: e5c530c0 strb 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; 6b1c: e59520cc ldr r2, [r5, #204] 6b20: eaffffa6 b 69c0 <_Thread_Initialize+0x34> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 6b24: e1a00005 mov r0, r5 <== NOT EXECUTED 6b28: eb000285 bl 7544 <_Thread_Stack_Free> <== NOT EXECUTED 6b2c: e1a00007 mov r0, r7 <== NOT EXECUTED 6b30: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 6b34: 00016fa4 .word 0x00016fa4 6b38: 00016ec4 .word 0x00016ec4 00007f4c <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 7f4c: e5903010 ldr r3, [r0, #16] 7f50: e3130001 tst r3, #1 ; 0x1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 7f54: e92d4070 push {r4, r5, r6, lr} 7f58: e1a04000 mov r4, r0 7f5c: e1a05001 mov r5, r1 7f60: e1a06002 mov r6, r2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 7f64: 13a00000 movne r0, #0 ; 0x0 7f68: 18bd8070 popne {r4, r5, r6, pc} _Thread_Set_transient( the_thread ); 7f6c: eb000089 bl 8198 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 7f70: e1a02006 mov r2, r6 7f74: e1a01005 mov r1, r5 7f78: e1a00004 mov r0, r4 7f7c: eb000fa6 bl be1c <_Thread_Reset> _Thread_Load_environment( the_thread ); 7f80: e1a00004 mov r0, r4 7f84: eb000eba bl ba74 <_Thread_Load_environment> _Thread_Ready( the_thread ); 7f88: e1a00004 mov r0, r4 7f8c: eb000f5d bl bd08 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 7f90: e1a00004 mov r0, r4 7f94: eb000208 bl 87bc <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 7f98: e59f301c ldr r3, [pc, #28] ; 7fbc <_Thread_Restart+0x70> 7f9c: e5932000 ldr r2, [r3] 7fa0: e1540002 cmp r4, r2 7fa4: 13a00001 movne r0, #1 ; 0x1 7fa8: 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 ); 7fac: e28400d0 add r0, r4, #208 ; 0xd0 7fb0: eb00032e bl 8c70 <_CPU_Context_restore> 7fb4: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return TRUE; } return FALSE; } 7fb8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 7fbc: 0001aa64 .word 0x0001aa64 00008d50 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 8d50: e92d0030 push {r4, r5} 8d54: e20110ff and r1, r1, #255 ; 0xff 8d58: e1a04000 mov r4, r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 8d5c: e10f5000 mrs r5, CPSR 8d60: e38530c0 orr r3, r5, #192 ; 0xc0 8d64: e129f003 msr CPSR_fc, r3 if ( force == TRUE ) 8d68: e3510000 cmp r1, #0 ; 0x0 the_thread->suspend_count = 0; 8d6c: 13a03000 movne r3, #0 ; 0x0 8d70: 15803070 strne r3, [r0, #112] ISR_Level level; States_Control current_state; _ISR_Disable( level ); if ( force == TRUE ) 8d74: 1a000006 bne 8d94 <_Thread_Resume+0x44> the_thread->suspend_count = 0; else the_thread->suspend_count--; 8d78: e5903070 ldr r3, [r0, #112] <== NOT EXECUTED 8d7c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 8d80: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 8d84: e5803070 str r3, [r0, #112] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 8d88: 0a000001 beq 8d94 <_Thread_Resume+0x44> <== NOT EXECUTED _ISR_Enable( level ); 8d8c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 8d90: ea000003 b 8da4 <_Thread_Resume+0x54> <== NOT EXECUTED return; } current_state = the_thread->current_state; 8d94: e5943010 ldr r3, [r4, #16] if ( current_state & STATES_SUSPENDED ) { 8d98: e3130002 tst r3, #2 ; 0x2 8d9c: 1a000002 bne 8dac <_Thread_Resume+0x5c> _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 8da0: e129f005 msr CPSR_fc, r5 } 8da4: e8bd0030 pop {r4, r5} 8da8: e12fff1e bx lr 8dac: e3c33002 bic r3, r3, #2 ; 0x2 current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 8db0: e3530000 cmp r3, #0 ; 0x0 return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 8db4: e5843010 str r3, [r4, #16] the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 8db8: 1afffff8 bne 8da0 <_Thread_Resume+0x50> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8dbc: e5940090 ldr r0, [r4, #144] 8dc0: e1d429b6 ldrh r2, [r4, #150] 8dc4: e1d030b0 ldrh r3, [r0] _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 8dc8: e594108c ldr r1, [r4, #140] 8dcc: e1833002 orr r3, r3, r2 8dd0: e1c030b0 strh r3, [r0] _Priority_Major_bit_map |= the_priority_map->ready_major; 8dd4: e59fc07c ldr ip, [pc, #124] ; 8e58 <_Thread_Resume+0x108> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8dd8: e2813004 add r3, r1, #4 ; 0x4 8ddc: e5843000 str r3, [r4] 8de0: e1dc20b0 ldrh r2, [ip] 8de4: e1d439b4 ldrh r3, [r4, #148] old_last_node = the_chain->last; 8de8: e5910008 ldr r0, [r1, #8] 8dec: e1822003 orr r2, r2, r3 the_chain->last = the_node; 8df0: e5814008 str r4, [r1, #8] 8df4: e1cc20b0 strh r2, [ip] old_last_node->next = the_node; the_node->previous = old_last_node; 8df8: 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; 8dfc: e5804000 str r4, [r0] _ISR_Flash( level ); 8e00: e10f3000 mrs r3, CPSR 8e04: e129f005 msr CPSR_fc, r5 8e08: e129f003 msr CPSR_fc, r3 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 8e0c: e59fc048 ldr ip, [pc, #72] ; 8e5c <_Thread_Resume+0x10c> 8e10: e59c3000 ldr r3, [ip] 8e14: e5940014 ldr r0, [r4, #20] 8e18: e5932014 ldr r2, [r3, #20] 8e1c: e1500002 cmp r0, r2 8e20: 2affffde bcs 8da0 <_Thread_Resume+0x50> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 8e24: e59f3034 ldr r3, [pc, #52] ; 8e60 <_Thread_Resume+0x110> 8e28: e5932000 ldr r2, [r3] 8e2c: e5d21076 ldrb r1, [r2, #118] 8e30: e3510000 cmp r1, #0 ; 0x0 _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 8e34: e58c4000 str r4, [ip] if ( _Thread_Executing->is_preemptible || 8e38: 0a000003 beq 8e4c <_Thread_Resume+0xfc> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 8e3c: e59f3020 ldr r3, [pc, #32] ; 8e64 <_Thread_Resume+0x114> 8e40: e3a02001 mov r2, #1 ; 0x1 8e44: e5c32000 strb r2, [r3] 8e48: eaffffd4 b 8da0 <_Thread_Resume+0x50> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 8e4c: e3500000 cmp r0, #0 ; 0x0 8e50: 1affffd2 bne 8da0 <_Thread_Resume+0x50> 8e54: eafffff8 b 8e3c <_Thread_Resume+0xec> <== NOT EXECUTED 8e58: 00023858 .word 0x00023858 8e5c: 00023830 .word 0x00023830 8e60: 00023864 .word 0x00023864 8e64: 00023874 .word 0x00023874 000074c4 <_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 ) { 74c4: e59f3070 ldr r3, [pc, #112] ; 753c <_Thread_Stack_Allocate+0x78> 74c8: e5932000 ldr r2, [r3] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 74cc: e59f306c ldr r3, [pc, #108] ; 7540 <_Thread_Stack_Allocate+0x7c> * 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 ) { 74d0: e592c020 ldr ip, [r2, #32] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 74d4: e5932000 ldr r2, [r3] 74d8: e92d4030 push {r4, r5, lr} 74dc: e1510002 cmp r1, r2 74e0: 21a04001 movcs r4, r1 74e4: 31a04002 movcc r4, r2 * 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 ) { 74e8: e35c0000 cmp ip, #0 ; 0x0 size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 74ec: e1a05000 mov r5, r0 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 74f0: 0a000008 beq 7518 <_Thread_Stack_Allocate+0x54> stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 74f4: e1a00004 mov r0, r4 <== NOT EXECUTED 74f8: e1a0e00f mov lr, pc <== NOT EXECUTED 74fc: e12fff1c bx ip <== NOT EXECUTED 7500: e1a03000 mov r3, r0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 7504: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 7508: 11a00004 movne r0, r4 <== NOT EXECUTED 750c: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 7510: e58530cc str r3, [r5, #204] <== NOT EXECUTED return the_stack_size; } 7514: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 7518: 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 ); 751c: e1a00004 mov r0, r4 7520: eb000231 bl 7dec <_Workspace_Allocate> 7524: e1a03000 mov r3, r0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 7528: e3530000 cmp r3, #0 ; 0x0 752c: 11a00004 movne r0, r4 7530: 03a00000 moveq r0, #0 ; 0x0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 7534: e58530cc str r3, [r5, #204] return the_stack_size; } 7538: e8bd8030 pop {r4, r5, pc} 753c: 00016f9c .word 0x00016f9c 7540: 0001513c .word 0x0001513c 00007544 <_Thread_Stack_Free>: { /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 7544: e5d030c0 ldrb r3, [r0, #192] 7548: e3530000 cmp r3, #0 ; 0x0 */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 754c: 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 ) 7550: 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 ) 7554: e59f3028 ldr r3, [pc, #40] ; 7584 <_Thread_Stack_Free+0x40> 7558: e5932000 ldr r2, [r3] 755c: e5923024 ldr r3, [r2, #36] 7560: e3530000 cmp r3, #0 ; 0x0 7564: 0a000003 beq 7578 <_Thread_Stack_Free+0x34> (*_Configuration_Table->stack_free_hook)( 7568: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 756c: e1a0e00f mov lr, pc <== NOT EXECUTED 7570: e12fff13 bx r3 <== NOT EXECUTED 7574: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 7578: e59000c8 ldr r0, [r0, #200] } 757c: 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 ); 7580: ea000215 b 7ddc <_Workspace_Free> 7584: 00016f9c .word 0x00016f9c 000062a8 <_Thread_blocking_operation_Cancel>: /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 62a8: e5913050 ldr r3, [r1, #80] <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 62ac: e92d4010 push {r4, lr} <== NOT EXECUTED /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 62b0: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 62b4: e1a04001 mov r4, r1 <== NOT EXECUTED #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 62b8: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 62bc: e5841044 str r1, [r4, #68] <== NOT EXECUTED /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 62c0: 0a000006 beq 62e0 <_Thread_blocking_operation_Cancel+0x38> <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 62c4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 62c8: e3a01201 mov r1, #268435456 ; 0x10000000 <== NOT EXECUTED 62cc: e2811bff add r1, r1, #261120 ; 0x3fc00 <== NOT EXECUTED 62d0: e1a00004 mov r0, r4 <== NOT EXECUTED 62d4: e2811ffe add r1, r1, #1016 ; 0x3f8 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 62d8: e8bd4010 pop {r4, lr} <== NOT EXECUTED 62dc: ea000070 b 64a4 <_Thread_Clear_state> <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 62e0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 62e4: e5843050 str r3, [r4, #80] <== NOT EXECUTED * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 62e8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 62ec: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 62f0: eb000667 bl 7c94 <_Watchdog_Remove> <== NOT EXECUTED 62f4: eafffff3 b 62c8 <_Thread_blocking_operation_Cancel+0x20> <== NOT EXECUTED 00006e8c <_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 ) { 6e8c: e92d07f0 push {r4, r5, r6, r7, r8, r9, sl} */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 6e90: e281303c add r3, r1, #60 ; 0x3c Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 6e94: e5914014 ldr r4, [r1, #20] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 6e98: e1a07001 mov r7, r1 6e9c: e1a08000 mov r8, r0 6ea0: e5813038 str r3, [r1, #56] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 6ea4: e2810038 add r0, r1, #56 ; 0x38 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 6ea8: e3a01000 mov r1, #0 ; 0x0 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 ) ) 6eac: e3140020 tst r4, #32 ; 0x20 6eb0: e587103c str r1, [r7, #60] RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 6eb4: e1a01324 lsr r1, r4, #6 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 6eb8: e1a0a002 mov sl, r2 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 6ebc: 11a02201 lslne r2, r1, #4 6ec0: 10423101 subne r3, r2, r1, lsl #2 6ec4: 10882003 addne r2, r8, r3 the_chain->last = _Chain_Head(the_chain); 6ec8: e5870040 str r0, [r7, #64] _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; 6ecc: e5986038 ldr r6, [r8, #56] 6ed0: 159f91d4 ldrne r9, [pc, #468] ; 70ac <_Thread_queue_Enqueue_priority+0x220> restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 6ed4: 12820008 addne r0, r2, #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 ) ) 6ed8: 1a000028 bne 6f80 <_Thread_queue_Enqueue_priority+0xf4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 6edc: e1a03081 lsl r3, r1, #1 6ee0: e0833001 add r3, r3, r1 6ee4: e2833001 add r3, r3, #1 ; 0x1 6ee8: e1a02201 lsl r2, r1, #4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 6eec: e0422101 sub r2, r2, r1, lsl #2 6ef0: e1a03103 lsl r3, r3, #2 6ef4: e0880003 add r0, r8, r3 6ef8: e0882002 add r2, r8, r2 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 6efc: e10f5000 mrs r5, CPSR 6f00: e38530c0 orr r3, r5, #192 ; 0xc0 6f04: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->first; 6f08: e5921000 ldr r1, [r2] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 6f0c: e1510000 cmp r1, r0 6f10: 1a00000f bne 6f54 <_Thread_queue_Enqueue_priority+0xc8> 6f14: ea000061 b 70a0 <_Thread_queue_Enqueue_priority+0x214> search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 6f18: e5911000 ldr r1, [r1] if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 6f1c: e1510000 cmp r1, r0 6f20: 0a00000e beq 6f60 <_Thread_queue_Enqueue_priority+0xd4> break; search_priority = search_thread->current_priority; 6f24: e591c014 ldr ip, [r1, #20] if ( priority <= search_priority ) 6f28: e154000c cmp r4, ip 6f2c: 9a00000b bls 6f60 <_Thread_queue_Enqueue_priority+0xd4> break; #endif _ISR_Flash( level ); 6f30: e10f3000 mrs r3, CPSR 6f34: e129f005 msr CPSR_fc, r5 6f38: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 6f3c: e5913010 ldr r3, [r1, #16] 6f40: e1160003 tst r6, r3 6f44: 0a000049 beq 7070 <_Thread_queue_Enqueue_priority+0x1e4> _ISR_Enable( level ); goto restart_forward_search; } search_thread = 6f48: 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 ) ) { 6f4c: e1510000 cmp r1, r0 6f50: 0a000002 beq 6f60 <_Thread_queue_Enqueue_priority+0xd4> search_priority = search_thread->current_priority; 6f54: e591c014 ldr ip, [r1, #20] if ( priority <= search_priority ) 6f58: e154000c cmp r4, ip 6f5c: 8affffed bhi 6f18 <_Thread_queue_Enqueue_priority+0x8c> 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 ) ) { 6f60: e1a06005 mov r6, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6f64: e5980030 ldr r0, [r8, #48] 6f68: e3500001 cmp r0, #1 ; 0x1 6f6c: 0a000034 beq 7044 <_Thread_queue_Enqueue_priority+0x1b8> * 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; 6f70: e58a6000 str r6, [sl] <== NOT EXECUTED return the_thread_queue->sync_state; } 6f74: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl} 6f78: e12fff1e bx lr if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 6f7c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 6f80: e5d93000 ldrb r3, [r9] 6f84: e283c001 add ip, r3, #1 ; 0x1 _ISR_Disable( level ); 6f88: e10f5000 mrs r5, CPSR 6f8c: e38530c0 orr r3, r5, #192 ; 0xc0 6f90: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->last; 6f94: e5901000 ldr r1, [r0] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 6f98: e1520001 cmp r2, r1 6f9c: 0a000018 beq 7004 <_Thread_queue_Enqueue_priority+0x178> search_priority = search_thread->current_priority; 6fa0: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 6fa4: e154000c cmp r4, ip 6fa8: 2a000015 bcs 7004 <_Thread_queue_Enqueue_priority+0x178> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 6fac: e5911004 ldr r1, [r1, #4] if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 6fb0: e1520001 cmp r2, r1 6fb4: 1a00000f bne 6ff8 <_Thread_queue_Enqueue_priority+0x16c> 6fb8: ea000011 b 7004 <_Thread_queue_Enqueue_priority+0x178> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 6fbc: e10f3000 mrs r3, CPSR 6fc0: e129f005 msr CPSR_fc, r5 6fc4: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 6fc8: e5913010 ldr r3, [r1, #16] 6fcc: e1160003 tst r6, r3 6fd0: 0affffe9 beq 6f7c <_Thread_queue_Enqueue_priority+0xf0> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 6fd4: 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 ) ) { 6fd8: e1510002 cmp r1, r2 6fdc: 0a000008 beq 7004 <_Thread_queue_Enqueue_priority+0x178> search_priority = search_thread->current_priority; 6fe0: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 6fe4: e154000c cmp r4, ip 6fe8: 2a000005 bcs 7004 <_Thread_queue_Enqueue_priority+0x178> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 6fec: e5911004 ldr r1, [r1, #4] <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 6ff0: e1510002 cmp r1, r2 <== NOT EXECUTED 6ff4: 0a000002 beq 7004 <_Thread_queue_Enqueue_priority+0x178> <== NOT EXECUTED break; search_priority = search_thread->current_priority; 6ff8: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 6ffc: e154000c cmp r4, ip 7000: 3affffed bcc 6fbc <_Thread_queue_Enqueue_priority+0x130> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7004: e5980030 ldr r0, [r8, #48] 7008: e3500001 cmp r0, #1 ; 0x1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 700c: e1a06005 mov r6, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7010: 1affffd6 bne 6f70 <_Thread_queue_Enqueue_priority+0xe4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7014: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 7018: e154000c cmp r4, ip if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 701c: e5883030 str r3, [r8, #48] if ( priority == search_priority ) 7020: 0a000014 beq 7078 <_Thread_queue_Enqueue_priority+0x1ec> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 7024: e5913000 ldr r3, [r1] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 7028: e5871004 str r1, [r7, #4] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 702c: e5873000 str r3, [r7] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7030: e5878044 str r8, [r7, #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; 7034: e5817000 str r7, [r1] next_node->previous = the_node; 7038: e5837004 str r7, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 703c: e129f005 msr CPSR_fc, r5 7040: eaffffcb b 6f74 <_Thread_queue_Enqueue_priority+0xe8> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7044: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 7048: e154000c cmp r4, ip if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 704c: e5883030 str r3, [r8, #48] if ( priority == search_priority ) 7050: 0a000008 beq 7078 <_Thread_queue_Enqueue_priority+0x1ec> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 7054: e5913004 ldr r3, [r1, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7058: e887000a stm r7, {r1, r3} the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 705c: e5878044 str r8, [r7, #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; 7060: e5837000 str r7, [r3] search_node->previous = the_node; 7064: e5817004 str r7, [r1, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 7068: e129f005 msr CPSR_fc, r5 706c: eaffffc0 b 6f74 <_Thread_queue_Enqueue_priority+0xe8> if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 7070: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 7074: eaffffa0 b 6efc <_Thread_queue_Enqueue_priority+0x70> <== NOT EXECUTED 7078: e281303c add r3, r1, #60 ; 0x3c _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 707c: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7080: e5873000 str r3, [r7] the_node->previous = previous_node; 7084: e5872004 str r2, [r7, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7088: e5878044 str r8, [r7, #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; 708c: e5827000 str r7, [r2] search_node->previous = the_node; 7090: e5837004 str r7, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 7094: e129f006 msr CPSR_fc, r6 7098: e3a00001 mov r0, #1 ; 0x1 709c: eaffffb4 b 6f74 <_Thread_queue_Enqueue_priority+0xe8> 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 ) ) { 70a0: e1a06005 mov r6, r5 70a4: e3e0c000 mvn ip, #0 ; 0x0 70a8: eaffffad b 6f64 <_Thread_queue_Enqueue_priority+0xd8> 70ac: 00015140 .word 0x00015140 0000be14 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { be14: e92d4010 push {r4, lr} be18: e1a04001 mov r4, r1 ISR_Level level; _ISR_Disable( level ); be1c: e10f0000 mrs r0, CPSR be20: e38030c0 orr r3, r0, #192 ; 0xc0 be24: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { be28: e5913010 ldr r3, [r1, #16] be2c: e3c334ff bic r3, r3, #-16777216 ; 0xff000000 be30: e3c3373f bic r3, r3, #16515072 ; 0xfc0000 be34: e3c33c41 bic r3, r3, #16640 ; 0x4100 be38: e3c3301f bic r3, r3, #31 ; 0x1f be3c: e3530000 cmp r3, #0 ; 0x0 be40: 0a00000f beq be84 <_Thread_queue_Extract_fifo+0x70> _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { be44: e5913050 ldr r3, [r1, #80] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; be48: e5942004 ldr r2, [r4, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; be4c: e5911000 ldr r1, [r1] be50: e3530002 cmp r3, #2 ; 0x2 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; be54: e3a03000 mov r3, #0 ; 0x0 previous = the_node->previous; next->previous = previous; previous->next = next; be58: e5821000 str r1, [r2] be5c: e5843044 str r3, [r4, #68] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; be60: e5812004 str r2, [r1, #4] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { be64: 0a000008 beq be8c <_Thread_queue_Extract_fifo+0x78> _ISR_Enable( level ); be68: e129f000 msr CPSR_fc, r0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); be6c: e3a01201 mov r1, #268435456 ; 0x10000000 be70: e2811bff add r1, r1, #261120 ; 0x3fc00 be74: e1a00004 mov r0, r4 be78: e2811ffe add r1, r1, #1016 ; 0x3f8 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } be7c: e8bd4010 pop {r4, lr} be80: eaffe987 b 64a4 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); be84: 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 } be88: e8bd8010 pop {r4, pc} <== NOT EXECUTED be8c: e3a03003 mov r3, #3 ; 0x3 be90: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); be94: e129f000 msr CPSR_fc, r0 (void) _Watchdog_Remove( &the_thread->Timer ); be98: e2840048 add r0, r4, #72 ; 0x48 be9c: ebffef7c bl 7c94 <_Watchdog_Remove> bea0: eafffff1 b be6c <_Thread_queue_Extract_fifo+0x58> 0000ad70 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { ad70: e92d4070 push {r4, r5, r6, lr} ad74: e1a04001 mov r4, r1 ad78: 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 ); ad7c: e10fc000 mrs ip, CPSR ad80: e38c30c0 orr r3, ip, #192 ; 0xc0 ad84: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ad88: e5913010 ldr r3, [r1, #16] ad8c: e3c334ff bic r3, r3, #-16777216 ; 0xff000000 ad90: e3c3373f bic r3, r3, #16515072 ; 0xfc0000 ad94: e3c33c41 bic r3, r3, #16640 ; 0x4100 ad98: e3c3301f bic r3, r3, #31 ; 0x1f ad9c: e3530000 cmp r3, #0 ; 0x0 ada0: 0a000023 beq ae34 <_Thread_queue_Extract_priority_helper+0xc4> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ada4: e5911038 ldr r1, [r1, #56] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { ada8: e284303c add r3, r4, #60 ; 0x3c adac: e1510003 cmp r1, r3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; adb0: 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; adb4: 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; adb8: 05832000 streq r2, [r3] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { adbc: 0a00000e beq adfc <_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; adc0: e5945040 ldr r5, [r4, #64] new_second_node = new_first_node->next; adc4: e5910000 ldr r0, [r1] previous_node->next = new_first_node; next_node->previous = new_first_node; adc8: 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; adcc: e5831000 str r1, [r3] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; add0: e881000c stm r1, {r2, r3} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { add4: e5942038 ldr r2, [r4, #56] add8: e5943040 ldr r3, [r4, #64] addc: e1520003 cmp r2, r3 ade0: 0a000005 beq adfc <_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 ); ade4: 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 = ade8: e2813038 add r3, r1, #56 ; 0x38 adec: e5803004 str r3, [r0, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; adf0: e5810038 str r0, [r1, #56] new_first_thread->Wait.Block2n.last = last_node; adf4: e5815040 str r5, [r1, #64] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); adf8: e5852000 str r2, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { adfc: e3560000 cmp r6, #0 ; 0x0 ae00: 1a000009 bne ae2c <_Thread_queue_Extract_priority_helper+0xbc> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ae04: e5943050 ldr r3, [r4, #80] ae08: e3530002 cmp r3, #2 ; 0x2 ae0c: 0a00000a beq ae3c <_Thread_queue_Extract_priority_helper+0xcc> _ISR_Enable( level ); ae10: e129f00c msr CPSR_fc, ip ae14: e3a01201 mov r1, #268435456 ; 0x10000000 ae18: e2811bff add r1, r1, #261120 ; 0x3fc00 ae1c: e1a00004 mov r0, r4 ae20: e2811ffe add r1, r1, #1016 ; 0x3f8 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } ae24: e8bd4070 pop {r4, r5, r6, lr} ae28: eaffed9d b 64a4 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); ae2c: e129f00c msr CPSR_fc, ip ae30: e8bd8070 pop {r4, r5, r6, pc} Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); ae34: e129f00c msr CPSR_fc, ip <== NOT EXECUTED ae38: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED ae3c: e3a03003 mov r3, #3 ; 0x3 ae40: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); ae44: e129f00c msr CPSR_fc, ip (void) _Watchdog_Remove( &the_thread->Timer ); ae48: e2840048 add r0, r4, #72 ; 0x48 ae4c: ebfff390 bl 7c94 <_Watchdog_Remove> ae50: eaffffef b ae14 <_Thread_queue_Extract_priority_helper+0xa4> 0000ae54 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { ae54: e1a01000 mov r1, r0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; ae58: e5900044 ldr r0, [r0, #68] * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && ae5c: e590c030 ldr ip, [r0, #48] ae60: e35c0000 cmp ip, #0 ; 0x0 ae64: 0a000003 beq ae78 <_Thread_queue_Process_timeout+0x24> ae68: e59f302c ldr r3, [pc, #44] ; ae9c <_Thread_queue_Process_timeout+0x48> <== NOT EXECUTED ae6c: e5932000 ldr r2, [r3] <== NOT EXECUTED ae70: e1510002 cmp r1, r2 <== NOT EXECUTED ae74: 0a000002 beq ae84 <_Thread_queue_Process_timeout+0x30> <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ae78: e590303c ldr r3, [r0, #60] ae7c: e5813034 str r3, [r1, #52] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); ae80: eaffffb4 b ad58 <_Thread_queue_Extract> * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { ae84: e35c0003 cmp ip, #3 ; 0x3 <== NOT EXECUTED the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ae88: 1590303c ldrne r3, [r0, #60] <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ae8c: 13a02002 movne r2, #2 ; 0x2 <== NOT EXECUTED */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ae90: 15813034 strne r3, [r1, #52] <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ae94: 15802030 strne r2, [r0, #48] <== NOT EXECUTED ae98: e12fff1e bx lr <== NOT EXECUTED ae9c: 00016fc4 .word 0x00016fc4 00012bfc <_Timer_Server_body>: * @param[in] ignored is the the task argument that is ignored */ Thread _Timer_Server_body( uint32_t ignored ) { 12bfc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 12c00: e59f01cc ldr r0, [pc, #460] ; 12dd4 <_Timer_Server_body+0x1d8> 12c04: e59f81cc ldr r8, [pc, #460] ; 12dd8 <_Timer_Server_body+0x1dc> 12c08: e5902000 ldr r2, [r0] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 12c0c: e59f01c8 ldr r0, [pc, #456] ; 12ddc <_Timer_Server_body+0x1e0> 12c10: e5983000 ldr r3, [r8] * @param[in] ignored is the the task argument that is ignored */ Thread _Timer_Server_body( uint32_t ignored ) { 12c14: e24dd00c sub sp, sp, #12 ; 0xc /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 12c18: e59f91c0 ldr r9, [pc, #448] ; 12de0 <_Timer_Server_body+0x1e4> _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 12c1c: e59fb1c0 ldr fp, [pc, #448] ; 12de4 <_Timer_Server_body+0x1e8> 12c20: e5901000 ldr r1, [r0] 12c24: e2833001 add r3, r3, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 12c28: e28d5004 add r5, sp, #4 ; 0x4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 12c2c: e3a04000 mov r4, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 12c30: e1a0600d mov r6, sp /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 12c34: e5892000 str r2, [r9] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 12c38: e58b1000 str r1, [fp] 12c3c: e5883000 str r3, [r8] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12c40: e58d5000 str r5, [sp] the_chain->permanent_null = NULL; 12c44: e98d2010 stmib sp, {r4, sp} /* * Insert the timers that were inserted before we got to run. * This should be done with dispatching disabled. */ _Thread_Disable_dispatch(); _Timer_Server_process_insertions(); 12c48: ebffffce bl 12b88 <_Timer_Server_process_insertions> _Thread_Enable_dispatch(); 12c4c: eb000b6e bl 15a0c <_Thread_Enable_dispatch> 12c50: e59fa190 ldr sl, [pc, #400] ; 12de8 <_Timer_Server_body+0x1ec> if ( watch == NULL ) { _ISR_Enable( level ); break; } watch->state = WATCHDOG_INACTIVE; 12c54: e1a07004 mov r7, r4 12c58: e5983000 ldr r3, [r8] 12c5c: e2833001 add r3, r3, #1 ; 0x1 12c60: e5883000 str r3, [r8] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 12c64: e3a01008 mov r1, #8 ; 0x8 12c68: e59a0000 ldr r0, [sl] 12c6c: eb000e4d bl 165a8 <_Thread_Set_state> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 12c70: e59f2174 ldr r2, [pc, #372] ; 12dec <_Timer_Server_body+0x1f0> _Timer_Server_reset_ticks_timer(); 12c74: e59f0174 ldr r0, [pc, #372] ; 12df0 <_Timer_Server_body+0x1f4> 12c78: e5923000 ldr r3, [r2] 12c7c: e1530000 cmp r3, r0 12c80: 0a000006 beq 12ca0 <_Timer_Server_body+0xa4> 12c84: e59f215c ldr r2, [pc, #348] ; 12de8 <_Timer_Server_body+0x1ec> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12c88: e5933010 ldr r3, [r3, #16] 12c8c: e5921000 ldr r1, [r2] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12c90: e59f015c ldr r0, [pc, #348] ; 12df4 <_Timer_Server_body+0x1f8> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12c94: e5813054 str r3, [r1, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12c98: e2811048 add r1, r1, #72 ; 0x48 12c9c: eb001125 bl 17138 <_Watchdog_Insert> 12ca0: e59f0150 ldr r0, [pc, #336] ; 12df8 <_Timer_Server_body+0x1fc> _Timer_Server_reset_seconds_timer(); 12ca4: e59f2150 ldr r2, [pc, #336] ; 12dfc <_Timer_Server_body+0x200> 12ca8: e5903000 ldr r3, [r0] 12cac: e1530002 cmp r3, r2 12cb0: 0a000004 beq 12cc8 <_Timer_Server_body+0xcc> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12cb4: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 12cb8: e59f1140 ldr r1, [pc, #320] ; 12e00 <_Timer_Server_body+0x204> <== NOT EXECUTED 12cbc: e59f0140 ldr r0, [pc, #320] ; 12e04 <_Timer_Server_body+0x208> <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12cc0: e581300c str r3, [r1, #12] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 12cc4: eb00111b bl 17138 <_Watchdog_Insert> <== NOT EXECUTED _Thread_Enable_dispatch(); 12cc8: eb000b4f bl 15a0c <_Thread_Enable_dispatch> 12ccc: e5983000 ldr r3, [r8] 12cd0: e2833001 add r3, r3, #1 ; 0x1 12cd4: e5883000 str r3, [r8] /* * At this point, at least one of the timers this task relies * upon has fired. Stop them both while we process any outstanding * timers. Before we block, we will restart them. */ _Timer_Server_stop_ticks_timer(); 12cd8: e59a0000 ldr r0, [sl] 12cdc: e2800048 add r0, r0, #72 ; 0x48 12ce0: eb001183 bl 172f4 <_Watchdog_Remove> _Timer_Server_stop_seconds_timer(); 12ce4: e59f0114 ldr r0, [pc, #276] ; 12e00 <_Timer_Server_body+0x204> 12ce8: eb001181 bl 172f4 <_Watchdog_Remove> ) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 12cec: e59f30e0 ldr r3, [pc, #224] ; 12dd4 <_Timer_Server_body+0x1d8> if ( snapshot >= _Timer_Server_ticks_last_time ) 12cf0: e5991000 ldr r1, [r9] ) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 12cf4: e593c000 ldr ip, [r3] if ( snapshot >= _Timer_Server_ticks_last_time ) 12cf8: e15c0001 cmp ip, r1 ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 12cfc: 31e03001 mvncc r3, r1 Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; 12d00: 2061100c rsbcs r1, r1, ip else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 12d04: 3083100c addcc r1, r3, ip _Timer_Server_ticks_last_time = snapshot; _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 12d08: e59f00dc ldr r0, [pc, #220] ; 12dec <_Timer_Server_body+0x1f0> 12d0c: e1a0200d mov r2, sp if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; _Timer_Server_ticks_last_time = snapshot; 12d10: e589c000 str ip, [r9] _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 12d14: eb0010d9 bl 17080 <_Watchdog_Adjust_to_chain> /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the _Timer_Seconds_chain to indicate this. */ snapshot = _TOD_Seconds_since_epoch; 12d18: e59f00bc ldr r0, [pc, #188] ; 12ddc <_Timer_Server_body+0x1e0> if ( snapshot > _Timer_Server_seconds_last_time ) { 12d1c: e59b2000 ldr r2, [fp] /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the _Timer_Seconds_chain to indicate this. */ snapshot = _TOD_Seconds_since_epoch; 12d20: e5904000 ldr r4, [r0] if ( snapshot > _Timer_Server_seconds_last_time ) { 12d24: e1540002 cmp r4, r2 12d28: 8a00001f bhi 12dac <_Timer_Server_body+0x1b0> * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); } else if ( snapshot < _Timer_Server_seconds_last_time ) { 12d2c: 3a000023 bcc 12dc0 <_Timer_Server_body+0x1c4> * TOD has been set backwards. */ ticks = _Timer_Server_seconds_last_time - snapshot; _Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks ); } _Timer_Server_seconds_last_time = snapshot; 12d30: e58b4000 str r4, [fp] _Timer_Server_process_seconds_chain( &to_fire ); /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12d34: ebffff93 bl 12b88 <_Timer_Server_process_insertions> /* * Enable dispatching to process the set that are ready "to fire." */ _Thread_Enable_dispatch(); 12d38: eb000b33 bl 15a0c <_Thread_Enable_dispatch> */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 12d3c: e10f1000 mrs r1, CPSR 12d40: e38130c0 orr r3, r1, #192 ; 0xc0 12d44: e129f003 msr CPSR_fc, r3 12d48: e59d2000 ldr r2, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 12d4c: e1550002 cmp r5, r2 12d50: 0a000013 beq 12da4 <_Timer_Server_body+0x1a8> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 12d54: e5923000 ldr r3, [r2] the_chain->first = new_first; 12d58: e58d3000 str r3, [sp] new_first->previous = _Chain_Head(the_chain); 12d5c: e5836004 str r6, [r3, #4] 12d60: ea000002 b 12d70 <_Timer_Server_body+0x174> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 12d64: e5933000 ldr r3, [r3] <== NOT EXECUTED the_chain->first = new_first; 12d68: e58d3000 str r3, [sp] <== NOT EXECUTED new_first->previous = _Chain_Head(the_chain); 12d6c: e5836004 str r6, [r3, #4] <== NOT EXECUTED if ( watch == NULL ) { _ISR_Enable( level ); break; } watch->state = WATCHDOG_INACTIVE; 12d70: e5827008 str r7, [r2, #8] _ISR_Enable( level ); 12d74: e129f001 msr CPSR_fc, r1 (*watch->routine)( watch->id, watch->user_data ); 12d78: e2820020 add r0, r2, #32 ; 0x20 12d7c: e8900003 ldm r0, {r0, r1} 12d80: e1a0e00f mov lr, pc 12d84: e592f01c ldr pc, [r2, #28] */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 12d88: e10f1000 mrs r1, CPSR 12d8c: e38130c0 orr r3, r1, #192 ; 0xc0 12d90: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 12d94: e59d3000 ldr r3, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 12d98: e1550003 cmp r5, r3 watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire ); 12d9c: e1a02003 mov r2, r3 12da0: 1affffef bne 12d64 <_Timer_Server_body+0x168> if ( watch == NULL ) { _ISR_Enable( level ); 12da4: e129f001 msr CPSR_fc, r1 12da8: eaffffaa b 12c58 <_Timer_Server_body+0x5c> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); 12dac: e0621004 rsb r1, r2, r4 12db0: e59f0040 ldr r0, [pc, #64] ; 12df8 <_Timer_Server_body+0x1fc> 12db4: e1a0200d mov r2, sp 12db8: eb0010b0 bl 17080 <_Watchdog_Adjust_to_chain> 12dbc: eaffffdb b 12d30 <_Timer_Server_body+0x134> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ ticks = _Timer_Server_seconds_last_time - snapshot; _Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks ); 12dc0: e0642002 rsb r2, r4, r2 <== NOT EXECUTED 12dc4: e59f002c ldr r0, [pc, #44] ; 12df8 <_Timer_Server_body+0x1fc> <== NOT EXECUTED 12dc8: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 12dcc: eb00107c bl 16fc4 <_Watchdog_Adjust> <== NOT EXECUTED 12dd0: eaffffd6 b 12d30 <_Timer_Server_body+0x134> <== NOT EXECUTED 12dd4: 00032924 .word 0x00032924 12dd8: 000327cc .word 0x000327cc 12ddc: 00032854 .word 0x00032854 12de0: 00032724 .word 0x00032724 12de4: 00032720 .word 0x00032720 12de8: 00033100 .word 0x00033100 12dec: 00032714 .word 0x00032714 12df0: 00032718 .word 0x00032718 12df4: 000328a4 .word 0x000328a4 12df8: 00032728 .word 0x00032728 12dfc: 0003272c .word 0x0003272c 12e00: 00032740 .word 0x00032740 12e04: 00032898 .word 0x00032898 00012b88 <_Timer_Server_process_insertions>: * onto one of the Timer Server chains. * * @note It is only to be called from the Timer Server task. */ static void _Timer_Server_process_insertions(void) { 12b88: e52de004 push {lr} ; (str lr, [sp, #-4]!) Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 12b8c: e59f005c ldr r0, [pc, #92] ; 12bf0 <_Timer_Server_process_insertions+0x68> 12b90: eb0002a9 bl 1363c <_Chain_Get> if ( the_timer == NULL ) 12b94: e3500000 cmp r0, #0 ; 0x0 12b98: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 12b9c: e5903038 ldr r3, [r0, #56] 12ba0: e3530001 cmp r3, #1 ; 0x1 12ba4: 0a00000c beq 12bdc <_Timer_Server_process_insertions+0x54> _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 12ba8: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED 12bac: 0a000005 beq 12bc8 <_Timer_Server_process_insertions+0x40> <== NOT EXECUTED } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12bb0: ebfffff4 bl 12b88 <_Timer_Server_process_insertions> <== NOT EXECUTED static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 12bb4: e59f0034 ldr r0, [pc, #52] ; 12bf0 <_Timer_Server_process_insertions+0x68> 12bb8: eb00029f bl 1363c <_Chain_Get> if ( the_timer == NULL ) 12bbc: e3500000 cmp r0, #0 ; 0x0 12bc0: 1afffff5 bne 12b9c <_Timer_Server_process_insertions+0x14> 12bc4: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 12bc8: e2801010 add r1, r0, #16 ; 0x10 <== NOT EXECUTED 12bcc: e59f0020 ldr r0, [pc, #32] ; 12bf4 <_Timer_Server_process_insertions+0x6c> <== NOT EXECUTED 12bd0: eb001158 bl 17138 <_Watchdog_Insert> <== NOT EXECUTED } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12bd4: ebffffeb bl 12b88 <_Timer_Server_process_insertions> <== NOT EXECUTED 12bd8: eafffff5 b 12bb4 <_Timer_Server_process_insertions+0x2c> <== NOT EXECUTED the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 12bdc: e2801010 add r1, r0, #16 ; 0x10 12be0: e59f0010 ldr r0, [pc, #16] ; 12bf8 <_Timer_Server_process_insertions+0x70> 12be4: eb001153 bl 17138 <_Watchdog_Insert> } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12be8: ebffffe6 bl 12b88 <_Timer_Server_process_insertions> 12bec: eafffff0 b 12bb4 <_Timer_Server_process_insertions+0x2c> 12bf0: 00032734 .word 0x00032734 12bf4: 00032728 .word 0x00032728 12bf8: 00032714 .word 0x00032714 00022938 <_Timespec_Divide_by_integer>: void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 22938: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; t *= TOD_NANOSECONDS_PER_SECOND; 2293c: e3a0c5ee mov ip, #998244352 ; 0x3b800000 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 22940: e5907000 ldr r7, [r0] <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 22944: e28cc96b add ip, ip, #1753088 ; 0x1ac000 <== NOT EXECUTED 22948: e28ccc0a add ip, ip, #2560 ; 0xa00 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 2294c: e1a08fc7 asr r8, r7, #31 <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 22950: e086579c umull r5, r6, ip, r7 <== NOT EXECUTED 22954: e026689c mla r6, ip, r8, r6 <== NOT EXECUTED t += time->tv_nsec; 22958: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED 2295c: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 22960: e0950003 adds r0, r5, r3 <== NOT EXECUTED 22964: e1a07001 mov r7, r1 <== NOT EXECUTED 22968: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 2296c: e1a0a002 mov sl, r2 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 22970: e0a61004 adc r1, r6, r4 <== NOT EXECUTED 22974: e1a02007 mov r2, r7 <== NOT EXECUTED 22978: e1a03008 mov r3, r8 <== NOT EXECUTED 2297c: eb006e8c bl 3e3b4 <__udivdi3> <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 22980: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED 22984: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED 22988: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED 2298c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 22990: e1a04000 mov r4, r0 <== NOT EXECUTED 22994: e1a05001 mov r5, r1 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 22998: eb006e85 bl 3e3b4 <__udivdi3> <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 2299c: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED 229a0: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 229a4: e58a0000 str r0, [sl] <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 229a8: e1a01005 mov r1, r5 <== NOT EXECUTED 229ac: e1a00004 mov r0, r4 <== NOT EXECUTED 229b0: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED 229b4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 229b8: eb006fc5 bl 3e8d4 <__umoddi3> <== NOT EXECUTED 229bc: e58a0004 str r0, [sl, #4] <== NOT EXECUTED } 229c0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 0000d740 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { d740: e92d4010 push {r4, lr} d744: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); d748: eb00136f bl 1250c <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) d74c: e5943024 ldr r3, [r4, #36] d750: e3530000 cmp r3, #0 ; 0x0 d754: 08bd8010 popeq {r4, pc} _Chain_Extract( &the_extension->Switch.Node ); d758: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED } d75c: 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 ); d760: ea001369 b 1250c <_Chain_Extract> <== NOT EXECUTED 00009944 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 9944: e92d41f0 push {r4, r5, r6, r7, r8, lr} 9948: e1a07000 mov r7, r0 994c: e1a04002 mov r4, r2 ISR_Level level; _ISR_Disable( level ); 9950: e10fc000 mrs ip, CPSR 9954: e38c30c0 orr r3, ip, #192 ; 0xc0 9958: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 995c: e1a06000 mov r6, r0 9960: e4960004 ldr r0, [r6], #4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 9964: e1500006 cmp r0, r6 9968: 0a000019 beq 99d4 <_Watchdog_Adjust+0x90> switch ( direction ) { 996c: e3510000 cmp r1, #0 ; 0x0 9970: 1a000019 bne 99dc <_Watchdog_Adjust+0x98> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 9974: e3520000 cmp r2, #0 ; 0x0 9978: 0a000015 beq 99d4 <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { 997c: e5905010 ldr r5, [r0, #16] 9980: e1520005 cmp r2, r5 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 9984: e1a01000 mov r1, r0 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 9988: 23a08001 movcs r8, #1 ; 0x1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 998c: 2a000005 bcs 99a8 <_Watchdog_Adjust+0x64> 9990: ea000017 b 99f4 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 9994: e0544005 subs r4, r4, r5 9998: 0a00000d beq 99d4 <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { 999c: e5915010 ldr r5, [r1, #16] 99a0: e1550004 cmp r5, r4 99a4: 8a000012 bhi 99f4 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 99a8: e5818010 str r8, [r1, #16] _ISR_Enable( level ); 99ac: e129f00c msr CPSR_fc, ip _Watchdog_Tickle( header ); 99b0: e1a00007 mov r0, r7 99b4: eb0000ab bl 9c68 <_Watchdog_Tickle> _ISR_Disable( level ); 99b8: e10fc000 mrs ip, CPSR 99bc: e38c30c0 orr r3, ip, #192 ; 0xc0 99c0: e129f003 msr CPSR_fc, r3 99c4: e5973000 ldr r3, [r7] if ( _Chain_Is_empty( header ) ) 99c8: e1560003 cmp r6, r3 99cc: e1a01003 mov r1, r3 99d0: 1affffef bne 9994 <_Watchdog_Adjust+0x50> } break; } } _ISR_Enable( level ); 99d4: e129f00c msr CPSR_fc, ip } 99d8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 99dc: e3510001 cmp r1, #1 ; 0x1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 99e0: 05903010 ldreq r3, [r0, #16] 99e4: 00833002 addeq r3, r3, r2 99e8: 05803010 streq r3, [r0, #16] } break; } } _ISR_Enable( level ); 99ec: e129f00c msr CPSR_fc, ip } 99f0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 99f4: e0643005 rsb r3, r4, r5 99f8: e5813010 str r3, [r1, #16] 99fc: eafffff4 b 99d4 <_Watchdog_Adjust+0x90> 00007ad8 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 7ad8: e59f3144 ldr r3, [pc, #324] ; 7c24 <_Watchdog_Insert+0x14c> void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 7adc: e92d01f0 push {r4, r5, r6, r7, r8} 7ae0: e1a04001 mov r4, r1 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 7ae4: e5935000 ldr r5, [r3] _ISR_Disable( level ); 7ae8: e10f6000 mrs r6, CPSR 7aec: e38630c0 orr r3, r6, #192 ; 0xc0 7af0: 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 ) { 7af4: e5913008 ldr r3, [r1, #8] 7af8: e3530000 cmp r3, #0 ; 0x0 7afc: 1a000041 bne 7c08 <_Watchdog_Insert+0x130> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 7b00: e59f8120 ldr r8, [pc, #288] ; 7c28 <_Watchdog_Insert+0x150> 7b04: e5983000 ldr r3, [r8] if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 7b08: e3a02001 mov r2, #1 ; 0x1 _Watchdog_Sync_count++; 7b0c: e2833001 add r3, r3, #1 ; 0x1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 7b10: e5812008 str r2, [r1, #8] _Watchdog_Sync_count++; 7b14: e5883000 str r3, [r8] 7b18: e59f710c ldr r7, [pc, #268] ; 7c2c <_Watchdog_Insert+0x154> restart: delta_interval = the_watchdog->initial; 7b1c: e594c00c ldr ip, [r4, #12] */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7b20: e35c0000 cmp ip, #0 ; 0x0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 7b24: e5902000 ldr r2, [r0] ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7b28: 0a000023 beq 7bbc <_Watchdog_Insert+0xe4> 7b2c: e5923000 ldr r3, [r2] 7b30: e3530000 cmp r3, #0 ; 0x0 7b34: 0a000020 beq 7bbc <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { 7b38: e5921010 ldr r1, [r2, #16] 7b3c: e15c0001 cmp ip, r1 7b40: 3a000032 bcc 7c10 <_Watchdog_Insert+0x138> * 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 ); 7b44: e10f3000 mrs r3, CPSR 7b48: e129f006 msr CPSR_fc, r6 7b4c: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7b50: e5943008 ldr r3, [r4, #8] 7b54: e3530001 cmp r3, #1 ; 0x1 7b58: 1a000023 bne 7bec <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7b5c: e5973000 ldr r3, [r7] 7b60: e1550003 cmp r5, r3 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 7b64: 2061c00c rsbcs ip, r1, ip if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7b68: 2a000010 bcs 7bb0 <_Watchdog_Insert+0xd8> 7b6c: ea00002a b 7c1c <_Watchdog_Insert+0x144> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7b70: e5923000 ldr r3, [r2] 7b74: e3530000 cmp r3, #0 ; 0x0 7b78: 0a00000f beq 7bbc <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { 7b7c: e5921010 ldr r1, [r2, #16] 7b80: e151000c cmp r1, ip 7b84: 8a000021 bhi 7c10 <_Watchdog_Insert+0x138> * 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 ); 7b88: e10f3000 mrs r3, CPSR 7b8c: e129f006 msr CPSR_fc, r6 7b90: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7b94: e5943008 ldr r3, [r4, #8] 7b98: e3530001 cmp r3, #1 ; 0x1 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 7b9c: e061c00c rsb ip, r1, ip * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7ba0: 1a000011 bne 7bec <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7ba4: e5973000 ldr r3, [r7] 7ba8: e1550003 cmp r5, r3 7bac: 3a00001a bcc 7c1c <_Watchdog_Insert+0x144> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7bb0: e35c0000 cmp ip, #0 ; 0x0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 7bb4: e5922000 ldr r2, [r2] 7bb8: 1affffec bne 7b70 <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 7bbc: e5921004 ldr r1, [r2, #4] the_watchdog->start_time = _Watchdog_Ticks_since_boot; 7bc0: e59f3068 ldr r3, [pc, #104] ; 7c30 <_Watchdog_Insert+0x158> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 7bc4: e5910000 ldr r0, [r1] 7bc8: e5932000 ldr r2, [r3] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 7bcc: e3a03002 mov r3, #2 ; 0x2 after_node->next = the_node; 7bd0: e5814000 str r4, [r1] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 7bd4: e5841004 str r1, [r4, #4] 7bd8: e5842014 str r2, [r4, #20] 7bdc: e5843008 str r3, [r4, #8] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 7be0: e584c010 str ip, [r4, #16] before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 7be4: e5804004 str r4, [r0, #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; 7be8: e5840000 str r0, [r4] _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; 7bec: e5875000 str r5, [r7] _Watchdog_Sync_count--; 7bf0: e5983000 ldr r3, [r8] 7bf4: e2433001 sub r3, r3, #1 ; 0x1 7bf8: e5883000 str r3, [r8] _ISR_Enable( level ); 7bfc: e129f006 msr CPSR_fc, r6 } 7c00: e8bd01f0 pop {r4, r5, r6, r7, r8} 7c04: e12fff1e bx lr * 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 ) { _ISR_Enable( level ); 7c08: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 7c0c: eafffffb b 7c00 <_Watchdog_Insert+0x128> <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 7c10: e06c3001 rsb r3, ip, r1 7c14: e5823010 str r3, [r2, #16] 7c18: eaffffe7 b 7bbc <_Watchdog_Insert+0xe4> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 7c1c: e5875000 str r5, [r7] 7c20: eaffffbd b 7b1c <_Watchdog_Insert+0x44> 7c24: 00016fa0 .word 0x00016fa0 7c28: 00017060 .word 0x00017060 7c2c: 00016fc0 .word 0x00016fc0 7c30: 00017064 .word 0x00017064 00007e24 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 7e24: e92d4030 push {r4, r5, lr} uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 7e28: e2504000 subs r4, r0, #0 ; 0x0 */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 7e2c: e1a05001 mov r5, r1 uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 7e30: 0a000010 beq 7e78 <_Workspace_Handler_initialization+0x54> 7e34: e214c003 ands ip, r4, #3 ; 0x3 7e38: 1a00000e bne 7e78 <_Workspace_Handler_initialization+0x54> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 7e3c: e59f3054 ldr r3, [pc, #84] ; 7e98 <_Workspace_Handler_initialization+0x74> 7e40: e5932000 ldr r2, [r3] 7e44: e5d21028 ldrb r1, [r2, #40] 7e48: e3510000 cmp r1, #0 ; 0x0 7e4c: 1a00000d bne 7e88 <_Workspace_Handler_initialization+0x64> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 7e50: e1a01004 mov r1, r4 7e54: e1a02005 mov r2, r5 7e58: e59f003c ldr r0, [pc, #60] ; 7e9c <_Workspace_Handler_initialization+0x78> 7e5c: e3a03004 mov r3, #4 ; 0x4 7e60: ebfff665 bl 57fc <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 7e64: e3500000 cmp r0, #0 ; 0x0 7e68: 18bd8030 popne {r4, r5, pc} _Internal_error_Occurred( 7e6c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 7e70: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 7e74: ebfff6eb bl 5a28 <_Internal_error_Occurred> <== NOT EXECUTED ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 7e78: e3a00000 mov r0, #0 ; 0x0 7e7c: e3a01001 mov r1, #1 ; 0x1 7e80: e3a02002 mov r2, #2 ; 0x2 7e84: ebfff6e7 bl 5a28 <_Internal_error_Occurred> TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) memset( starting_address, 0, size ); 7e88: e1a0100c mov r1, ip <== NOT EXECUTED 7e8c: e1a02005 mov r2, r5 <== NOT EXECUTED 7e90: eb001243 bl c7a4 <== NOT EXECUTED 7e94: eaffffed b 7e50 <_Workspace_Handler_initialization+0x2c> <== NOT EXECUTED 7e98: 00016f9c .word 0x00016f9c 7e9c: 00016f2c .word 0x00016f2c 00021038 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 21038: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 2103c: e24dd00c sub sp, sp, #12 ; 0xc 21040: e1a04000 mov r4, r0 21044: e1a05001 mov r5, r1 21048: e1a06002 mov r6, r2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 2104c: ebffff2c bl 20d04 21050: e1500004 cmp r0, r4 21054: 1a0000a5 bne 212f0 /* * Validate the signal passed. */ if ( !sig ) 21058: e3550000 cmp r5, #0 ; 0x0 2105c: 0a0000a8 beq 21304 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 21060: e2450001 sub r0, r5, #1 ; 0x1 21064: e350001f cmp r0, #31 ; 0x1f 21068: 8a0000a5 bhi 21304 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 2106c: e59f22b8 ldr r2, [pc, #696] ; 2132c 21070: e1a0b105 lsl fp, r5, #2 21074: e1a09205 lsl r9, r5, #4 21078: e06b3009 rsb r3, fp, r9 2107c: e0823003 add r3, r2, r3 21080: e5932008 ldr r2, [r3, #8] 21084: e3520001 cmp r2, #1 ; 0x1 21088: 0a00003c beq 21180 * 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 ) ) 2108c: e3550004 cmp r5, #4 ; 0x4 21090: 13550008 cmpne r5, #8 ; 0x8 21094: 0a00003b beq 21188 21098: e355000b cmp r5, #11 ; 0xb 2109c: 0a000039 beq 21188 return pthread_kill( pthread_self(), sig ); mask = signo_to_mask( sig ); 210a0: e3a03001 mov r3, #1 ; 0x1 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 210a4: e58d3004 str r3, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 210a8: e58d5000 str r5, [sp] siginfo->si_code = SI_USER; if ( !value ) { 210ac: e3560000 cmp r6, #0 ; 0x0 */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); mask = signo_to_mask( sig ); 210b0: e1a04013 lsl r4, r3, r0 210b4: e59f2274 ldr r2, [pc, #628] ; 21330 siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 210b8: 15963000 ldrne r3, [r6] 210bc: 158d3008 strne r3, [sp, #8] 210c0: e5923000 ldr r3, [r2] 210c4: e2833001 add r3, r3, #1 ; 0x1 siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 210c8: 058d6008 streq r6, [sp, #8] 210cc: 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; 210d0: e59f325c ldr r3, [pc, #604] ; 21334 210d4: e5930000 ldr r0, [r3] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 210d8: e5902108 ldr r2, [r0, #264] 210dc: e59230c4 ldr r3, [r2, #196] 210e0: e1d43003 bics r3, r4, r3 210e4: 1a000016 bne 21144 goto process_it; 210e8: e59fc248 ldr ip, [pc, #584] ; 21338 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 210ec: e28ce030 add lr, ip, #48 ; 0x30 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 210f0: e1a0100c mov r1, ip 210f4: e4912004 ldr r2, [r1], #4 !_Chain_Is_tail( the_chain, the_node ) ; 210f8: e1520001 cmp r2, r1 210fc: 0a000036 beq 211dc 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)) { 21100: e5923030 ldr r3, [r2, #48] 21104: e1140003 tst r4, 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; 21108: e1a00002 mov r0, r2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2110c: e5923108 ldr r3, [r2, #264] if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 21110: 0a000008 beq 21138 21114: ea00000a b 21144 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 ) { 21118: 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 ) ; 2111c: e1520001 cmp r2, r1 <== NOT EXECUTED 21120: 0a00002d beq 211dc <== NOT EXECUTED 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)) { 21124: e5923030 ldr r3, [r2, #48] <== NOT EXECUTED 21128: e1140003 tst r4, r3 <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 2112c: e1a00002 mov r0, r2 <== NOT EXECUTED api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 21130: e5923108 ldr r3, [r2, #264] <== NOT EXECUTED if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 21134: 1a000002 bne 21144 <== NOT EXECUTED 21138: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED 2113c: e1d43003 bics r3, r4, r3 <== NOT EXECUTED 21140: 0afffff4 beq 21118 <== NOT EXECUTED * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 21144: e3a03001 mov r3, #1 ; 0x1 21148: 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 ) ) { 2114c: e1a01005 mov r1, r5 21150: e1a0200d mov r2, sp 21154: eb000090 bl 2139c <_POSIX_signals_Unblock_thread> 21158: e3500000 cmp r0, #0 ; 0x0 2115c: 1a00001b bne 211d0 /* * 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 ); 21160: e1a00004 mov r0, r4 21164: eb000079 bl 21350 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 21168: e59f21bc ldr r2, [pc, #444] ; 2132c 2116c: e06b5009 rsb r5, fp, r9 21170: e7923005 ldr r3, [r2, r5] 21174: e3530002 cmp r3, #2 ; 0x2 21178: 0a000007 beq 2119c psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); 2117c: ebffad41 bl c688 <_Thread_Enable_dispatch> 21180: e3a00000 mov r0, #0 ; 0x0 21184: ea000002 b 21194 * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 21188: eb00010f bl 215cc 2118c: e1a01005 mov r1, r5 21190: eb0000cf bl 214d4 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 21194: e28dd00c add sp, sp, #12 ; 0xc 21198: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 2119c: e59f0198 ldr r0, [pc, #408] ; 2133c 211a0: ebffa795 bl affc <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 211a4: e250e000 subs lr, r0, #0 ; 0x0 211a8: 0a00005a beq 21318 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 211ac: e89d0007 ldm sp, {r0, r1, r2} 211b0: e28ec008 add ip, lr, #8 ; 0x8 211b4: e88c0007 stm ip, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 211b8: e59f0180 ldr r0, [pc, #384] ; 21340 211bc: e1a0100e mov r1, lr 211c0: e0800005 add r0, r0, r5 211c4: ebffa781 bl afd0 <_Chain_Append> } _Thread_Enable_dispatch(); 211c8: ebffad2e bl c688 <_Thread_Enable_dispatch> 211cc: eaffffeb b 21180 * 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 ) ) { _Thread_Enable_dispatch(); 211d0: ebffad2c bl c688 <_Thread_Enable_dispatch> 211d4: e3a00000 mov r0, #0 ; 0x0 211d8: eaffffed b 21194 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 211dc: e28cc00c add ip, ip, #12 ; 0xc */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 211e0: e15c000e cmp ip, lr 211e4: 1affffc1 bne 210f0 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 211e8: e59f3154 ldr r3, [pc, #340] ; 21344 211ec: e5d32000 ldrb r2, [r3] 211f0: e59f7150 ldr r7, [pc, #336] ; 21348 211f4: e2822001 add r2, r2, #1 ; 0x1 211f8: e3a0a000 mov sl, #0 ; 0x0 the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 211fc: e5973008 ldr r3, [r7, #8] 21200: e3530000 cmp r3, #0 ; 0x0 21204: 0a00002d beq 212c0 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 21208: 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 ) 2120c: e3530000 cmp r3, #0 ; 0x0 21210: 0a00002a beq 212c0 continue; maximum = the_info->maximum; 21214: e1d361b0 ldrh r6, [r3, #16] object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 21218: e3560000 cmp r6, #0 ; 0x0 */ if ( !the_info ) continue; maximum = the_info->maximum; object_table = the_info->local_table; 2121c: e593001c ldr r0, [r3, #28] for ( index = 1 ; index <= maximum ; index++ ) { 21220: 0a000026 beq 212c0 21224: e3a0c001 mov ip, #1 ; 0x1 the_thread = (Thread_Control *) object_table[ index ]; 21228: e790110c ldr r1, [r0, ip, lsl #2] if ( !the_thread ) 2122c: e3510000 cmp r1, #0 ; 0x0 21230: 0a000018 beq 21298 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 21234: e591e014 ldr lr, [r1, #20] 21238: e15e0002 cmp lr, r2 2123c: 8a000015 bhi 21298 /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 21240: e5913108 ldr r3, [r1, #264] if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 21244: e3530000 cmp r3, #0 ; 0x0 21248: 0a000012 beq 21298 2124c: e59330c4 ldr r3, [r3, #196] 21250: e1d43003 bics r3, r4, r3 21254: 0a00000f beq 21298 * 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 ) { 21258: e15e0002 cmp lr, r2 2125c: 3a000005 bcc 21278 * 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 ) ) 21260: e59a3010 ldr r3, [sl, #16] <== NOT EXECUTED 21264: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 21268: 0a00000a beq 21298 <== 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 ) ) { 2126c: e5918010 ldr r8, [r1, #16] <== NOT EXECUTED 21270: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 21274: 1a000017 bne 212d8 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 21278: e28cc001 add ip, ip, #1 ; 0x1 2127c: e156000c cmp r6, ip * 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 ) { 21280: e1a0a001 mov sl, r1 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 21284: 3a000007 bcc 212a8 the_thread = (Thread_Control *) object_table[ index ]; 21288: e790110c ldr r1, [r0, ip, lsl #2] if ( !the_thread ) 2128c: e3510000 cmp r1, #0 ; 0x0 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 21290: e1a0200e mov r2, lr the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) 21294: 1affffe6 bne 21234 * 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 ) { 21298: e1a0e002 mov lr, r2 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2129c: e28cc001 add ip, ip, #1 ; 0x1 212a0: e156000c cmp r6, ip 212a4: 2afffff7 bcs 21288 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 212a8: e59f309c ldr r3, [pc, #156] ; 2134c continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 212ac: e2877004 add r7, r7, #4 ; 0x4 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 212b0: e1570003 cmp r7, r3 212b4: 0a000003 beq 212c8 212b8: e1a0200e mov r2, lr 212bc: eaffffce b 211fc continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 212c0: e1a0e002 mov lr, r2 212c4: eafffff7 b 212a8 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 212c8: e35a0000 cmp sl, #0 ; 0x0 212cc: 0affffa3 beq 21160 212d0: e1a0000a mov r0, sl 212d4: eaffff9a b 21144 * 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 ) 212d8: e3130201 tst r3, #268435456 ; 0x10000000 <== NOT EXECUTED 212dc: 1affffed bne 21298 <== 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 ) { 212e0: e3180201 tst r8, #268435456 ; 0x10000000 <== NOT EXECUTED 212e4: 1affffe3 bne 21278 <== NOT EXECUTED 212e8: e1a0e002 mov lr, r2 <== NOT EXECUTED 212ec: eaffffea b 2129c <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 212f0: ebffd349 bl 1601c <__errno> 212f4: e3a03003 mov r3, #3 ; 0x3 212f8: e5803000 str r3, [r0] 212fc: e3e00000 mvn r0, #0 ; 0x0 21300: eaffffa3 b 21194 if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 21304: ebffd344 bl 1601c <__errno> 21308: e3a03016 mov r3, #22 ; 0x16 2130c: e5803000 str r3, [r0] 21310: e3e00000 mvn r0, #0 ; 0x0 21314: eaffff9e b 21194 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); 21318: ebffd33f bl 1601c <__errno> <== NOT EXECUTED 2131c: e3a0300b mov r3, #11 ; 0xb <== NOT EXECUTED 21320: e5803000 str r3, [r0] <== NOT EXECUTED 21324: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 21328: eaffff99 b 21194 <== NOT EXECUTED 2132c: 0002780c .word 0x0002780c 21330: 0002724c .word 0x0002724c 21334: 00027304 .word 0x00027304 21338: 00027998 .word 0x00027998 2133c: 0002798c .word 0x0002798c 21340: 000279dc .word 0x000279dc 21344: 00021710 .word 0x00021710 21348: 00027208 .word 0x00027208 2134c: 00027214 .word 0x00027214 000116a8 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 116a8: e92d4070 push {r4, r5, r6, lr} 116ac: e1a06001 mov r6, r1 116b0: e1a04000 mov r4, r0 Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 116b4: eb000732 bl 13384 <_Timespec_Is_valid> 116b8: e3500000 cmp r0, #0 ; 0x0 116bc: 0a000038 beq 117a4 * 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 ) 116c0: e5943000 ldr r3, [r4] 116c4: e3530000 cmp r3, #0 ; 0x0 116c8: ba000035 blt 117a4 116cc: e5943004 ldr r3, [r4, #4] 116d0: e3530000 cmp r3, #0 ; 0x0 116d4: ba000032 blt 117a4 rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 116d8: e1a00004 mov r0, r4 116dc: eb000739 bl 133c8 <_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 ) { 116e0: e2505000 subs r5, r0, #0 ; 0x0 116e4: 0a000022 beq 11774 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 116e8: e59f20dc ldr r2, [pc, #220] ; 117cc 116ec: e5923000 ldr r3, [r2] 116f0: e2833001 add r3, r3, #1 ; 0x1 116f4: e5823000 str r3, [r2] /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 116f8: e59f40d0 ldr r4, [pc, #208] ; 117d0 116fc: e3a01281 mov r1, #268435464 ; 0x10000008 11700: e5940000 ldr r0, [r4] 11704: ebffee79 bl d0f0 <_Thread_Set_state> _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 11708: e5943000 ldr r3, [r4] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 1170c: e59f20c0 ldr r2, [pc, #192] ; 117d4 11710: e5931008 ldr r1, [r3, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11714: e3a00000 mov r0, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; 11718: e5831068 str r1, [r3, #104] the_watchdog->user_data = user_data; 1171c: e583006c str r0, [r3, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11720: e5830050 str r0, [r3, #80] the_watchdog->routine = routine; 11724: e5832064 str r2, [r3, #100] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11728: e2831048 add r1, r3, #72 ; 0x48 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1172c: e5835054 str r5, [r3, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11730: e59f00a0 ldr r0, [pc, #160] ; 117d8 11734: ebfff08e bl d974 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 11738: ebffebd2 bl c688 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 1173c: e3560000 cmp r6, #0 ; 0x0 11740: 0a000009 beq 1176c ticks -= 11744: e5943000 ldr r3, [r4] 11748: e283205c add r2, r3, #92 ; 0x5c 1174c: e8920014 ldm r2, {r2, r4} 11750: e0424004 sub r4, r2, r4 11754: e0844005 add r4, r4, r5 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 11758: e1a01006 mov r1, r6 1175c: e1a00004 mov r0, r4 11760: eb0006f3 bl 13334 <_Timespec_From_ticks> /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 11764: e3540000 cmp r4, #0 ; 0x0 11768: 1a000012 bne 117b8 rtems_set_errno_and_return_minus_one( EINTR ); 1176c: e3a00000 mov r0, #0 ; 0x0 } return 0; } 11770: e8bd8070 pop {r4, r5, r6, pc} 11774: e59f2050 ldr r2, [pc, #80] ; 117cc 11778: e5923000 ldr r3, [r2] 1177c: e2833001 add r3, r3, #1 ; 0x1 11780: e5823000 str r3, [r2] * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); 11784: ebffef52 bl d4d4 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 11788: ebffebbe bl c688 <_Thread_Enable_dispatch> if ( rmtp ) { 1178c: e3560000 cmp r6, #0 ; 0x0 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 11790: 15865004 strne r5, [r6, #4] if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 11794: 15865000 strne r5, [r6] rmtp->tv_nsec = 0; 11798: 11a00005 movne r0, r5 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { 1179c: 18bd8070 popne {r4, r5, r6, pc} 117a0: eafffff1 b 1176c <== NOT EXECUTED * * 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 ) rtems_set_errno_and_return_minus_one( EINVAL ); 117a4: eb00121c bl 1601c <__errno> 117a8: e3a03016 mov r3, #22 ; 0x16 117ac: e5803000 str r3, [r0] 117b0: e3e00000 mvn r0, #0 ; 0x0 117b4: e8bd8070 pop {r4, r5, r6, pc} /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 117b8: eb001217 bl 1601c <__errno> 117bc: e3a03004 mov r3, #4 ; 0x4 117c0: e5803000 str r3, [r0] 117c4: e3e00000 mvn r0, #0 ; 0x0 117c8: e8bd8070 pop {r4, r5, r6, pc} 117cc: 0002724c .word 0x0002724c 117d0: 00027304 .word 0x00027304 117d4: 0000c4f0 .word 0x0000c4f0 117d8: 00027324 .word 0x00027324 00005294 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 5294: e92d4030 push {r4, r5, lr} 5298: e24dd004 sub sp, sp, #4 ; 0x4 529c: e1a04000 mov r4, r0 52a0: 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) ) { 52a4: e1a00002 mov r0, r2 52a8: e1a0100d mov r1, sp 52ac: eb000130 bl 5774 <_POSIX_Absolute_timeout_to_ticks> 52b0: e3500003 cmp r0, #3 ; 0x3 52b4: 979ff100 ldrls pc, [pc, r0, lsl #2] 52b8: ea000004 b 52d0 <== NOT EXECUTED 52bc: 000052f0 .word 0x000052f0 <== NOT EXECUTED 52c0: 000052e8 .word 0x000052e8 <== NOT EXECUTED 52c4: 000052e8 .word 0x000052e8 <== NOT EXECUTED 52c8: 000052cc .word 0x000052cc <== NOT EXECUTED 52cc: e3a03000 mov r3, #0 ; 0x0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: already_timedout = FALSE; break; } return _POSIX_Condition_variables_Wait_support( 52d0: e1a00004 mov r0, r4 52d4: e1a01005 mov r1, r5 52d8: e59d2000 ldr r2, [sp] 52dc: eb000008 bl 5304 <_POSIX_Condition_variables_Wait_support> cond, mutex, ticks, already_timedout ); } 52e0: e28dd004 add sp, sp, #4 ; 0x4 52e4: e8bd8030 pop {r4, r5, pc} * 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) ) { 52e8: e3a03001 mov r3, #1 ; 0x1 52ec: eafffff7 b 52d0 52f0: e3a00016 mov r0, #22 ; 0x16 52f4: eafffff9 b 52e0 000054e8 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 54e8: 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 ) 54ec: e2529000 subs r9, r2, #0 ; 0x0 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 54f0: e24dd03c sub sp, sp, #60 ; 0x3c 54f4: e58d001c str r0, [sp, #28] 54f8: e1a0a003 mov sl, r3 POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 54fc: 03a0000e moveq r0, #14 ; 0xe 5500: 0a000014 beq 5558 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 5504: e59f32d0 ldr r3, [pc, #720] ; 57dc 5508: e3510000 cmp r1, #0 ; 0x0 550c: 11a06001 movne r6, r1 5510: 01a06003 moveq r6, r3 if ( !the_attr->is_initialized ) 5514: e5962000 ldr r2, [r6] 5518: e3520000 cmp r2, #0 ; 0x0 551c: 0a00000c beq 5554 * 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) ) 5520: e5963004 ldr r3, [r6, #4] 5524: e3530000 cmp r3, #0 ; 0x0 5528: 0a000004 beq 5540 552c: e59f32ac ldr r3, [pc, #684] ; 57e0 5530: e5962008 ldr r2, [r6, #8] 5534: e5931000 ldr r1, [r3] 5538: e1520001 cmp r2, r1 553c: 3a000004 bcc 5554 * 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 ) { 5540: e5963010 ldr r3, [r6, #16] 5544: e3530001 cmp r3, #1 ; 0x1 5548: 0a00001b beq 55bc 554c: e3530002 cmp r3, #2 ; 0x2 5550: 0a000002 beq 5560 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 5554: e3a00016 mov r0, #22 ; 0x16 } 5558: e28dd03c add sp, sp, #60 ; 0x3c 555c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; 5560: e286c018 add ip, r6, #24 ; 0x18 5564: e8bc000f ldm ip!, {r0, r1, r2, r3} 5568: e28d7024 add r7, sp, #36 ; 0x24 556c: e1a04007 mov r4, r7 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 5570: e5968014 ldr r8, [r6, #20] schedparam = the_attr->schedparam; 5574: e8a4000f stmia r4!, {r0, r1, r2, r3} 5578: e89c0003 ldm ip, {r0, r1} 557c: 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 ) 5580: e596300c ldr r3, [r6, #12] 5584: e3530000 cmp r3, #0 ; 0x0 5588: 13a00086 movne r0, #134 ; 0x86 558c: 1afffff1 bne 5558 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 5590: e59db024 ldr fp, [sp, #36] 5594: e24b3001 sub r3, fp, #1 ; 0x1 5598: e35300fd cmp r3, #253 ; 0xfd 559c: 8affffec bhi 5554 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 55a0: e3580003 cmp r8, #3 ; 0x3 55a4: 979ff108 ldrls pc, [pc, r8, lsl #2] 55a8: eaffffe9 b 5554 55ac: 000056d8 .word 0x000056d8 <== NOT EXECUTED 55b0: 000056cc .word 0x000056cc <== NOT EXECUTED 55b4: 000056bc .word 0x000056bc <== NOT EXECUTED 55b8: 000055ec .word 0x000055ec <== NOT EXECUTED * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 55bc: e59f3220 ldr r3, [pc, #544] ; 57e4 55c0: e5932000 ldr r2, [r3] 55c4: e5925108 ldr r5, [r2, #264] schedpolicy = api->schedpolicy; schedparam = api->schedparam; 55c8: e285c080 add ip, r5, #128 ; 0x80 55cc: e8bc000f ldm ip!, {r0, r1, r2, r3} 55d0: e28d7024 add r7, sp, #36 ; 0x24 55d4: e1a04007 mov r4, r7 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 55d8: e595807c ldr r8, [r5, #124] schedparam = api->schedparam; 55dc: e8a4000f stmia r4!, {r0, r1, r2, r3} 55e0: e89c0003 ldm ip, {r0, r1} 55e4: e8840003 stm r4, {r0, r1} 55e8: eaffffe4 b 5580 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 ) < 55ec: e28d002c add r0, sp, #44 ; 0x2c 55f0: eb0010d9 bl 995c <_Timespec_To_ticks> 55f4: e1a04000 mov r4, r0 55f8: e28d0034 add r0, sp, #52 ; 0x34 55fc: eb0010d6 bl 995c <_Timespec_To_ticks> 5600: e1540000 cmp r4, r0 5604: 3affffd2 bcc 5554 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 5608: e59d3028 ldr r3, [sp, #40] 560c: e2433001 sub r3, r3, #1 ; 0x1 5610: e35300fd cmp r3, #253 ; 0xfd 5614: 8affffce bhi 5554 5618: e59fc1c8 ldr ip, [pc, #456] ; 57e8 561c: e58dc020 str ip, [sp, #32] 5620: e3a04003 mov r4, #3 ; 0x3 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 5624: e59f21c0 ldr r2, [pc, #448] ; 57ec 5628: e5920000 ldr r0, [r2] 562c: eb0006f1 bl 71f8 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 5630: e59f01b8 ldr r0, [pc, #440] ; 57f0 5634: eb00094a bl 7b64 <_Objects_Allocate> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 5638: e2505000 subs r5, r0, #0 ; 0x0 563c: 0a000052 beq 578c /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 5640: e59f2198 ldr r2, [pc, #408] ; 57e0 5644: e26bc0ff rsb ip, fp, #255 ; 0xff 5648: e5923000 ldr r3, [r2] 564c: e5961008 ldr r1, [r6, #8] 5650: e5962004 ldr r2, [r6, #4] 5654: e58dc004 str ip, [sp, #4] 5658: e59dc020 ldr ip, [sp, #32] 565c: e1a03083 lsl r3, r3, #1 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ 5660: e3a0b000 mov fp, #0 ; 0x0 status = _Thread_Initialize( 5664: e1530001 cmp r3, r1 5668: 31a03001 movcc r3, r1 566c: e58dc010 str ip, [sp, #16] 5670: e59f0178 ldr r0, [pc, #376] ; 57f0 5674: e3a0c001 mov ip, #1 ; 0x1 5678: e1a01005 mov r1, r5 567c: e58d400c str r4, [sp, #12] 5680: e58db000 str fp, [sp] 5684: e58dc008 str ip, [sp, #8] 5688: e58db014 str fp, [sp, #20] 568c: e58db018 str fp, [sp, #24] 5690: eb000ce4 bl 8a28 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 5694: e150000b cmp r0, fp 5698: 1a000012 bne 56e8 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 569c: e1a01005 mov r1, r5 56a0: e59f0148 ldr r0, [pc, #328] ; 57f0 56a4: eb000a1b bl 7f18 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 56a8: e59f213c ldr r2, [pc, #316] ; 57ec 56ac: e5920000 ldr r0, [r2] 56b0: eb0006ec bl 7268 <_API_Mutex_Unlock> 56b4: e3a0000b mov r0, #11 ; 0xb 56b8: eaffffa6 b 5558 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 56bc: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 56c0: e3a04002 mov r4, #2 ; 0x2 <== NOT EXECUTED 56c4: e58d3020 str r3, [sp, #32] <== NOT EXECUTED 56c8: eaffffd5 b 5624 <== NOT EXECUTED 56cc: e3a04000 mov r4, #0 ; 0x0 56d0: e58d4020 str r4, [sp, #32] 56d4: eaffffd2 b 5624 56d8: e3a02000 mov r2, #0 ; 0x0 56dc: e3a04001 mov r4, #1 ; 0x1 56e0: e58d2020 str r2, [sp, #32] 56e4: eaffffce b 5624 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 56e8: e5954108 ldr r4, [r5, #264] api->Attributes = *the_attr; 56ec: e1a0c006 mov ip, r6 56f0: e8bc000f ldm ip!, {r0, r1, r2, r3} 56f4: e1a0e004 mov lr, r4 56f8: e8ae000f stmia lr!, {r0, r1, r2, r3} 56fc: e8bc000f ldm ip!, {r0, r1, r2, r3} 5700: e8ae000f stmia lr!, {r0, r1, r2, r3} 5704: e8bc000f ldm ip!, {r0, r1, r2, r3} 5708: e8ae000f stmia lr!, {r0, r1, r2, r3} 570c: e89c0003 ldm ip, {r0, r1} 5710: e88e0003 stm lr, {r0, r1} api->detachstate = the_attr->detachstate; 5714: e5963034 ldr r3, [r6, #52] api->schedpolicy = schedpolicy; 5718: e584807c str r8, [r4, #124] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 571c: e5843038 str r3, [r4, #56] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 5720: e1a0e007 mov lr, r7 5724: e8be000f ldm lr!, {r0, r1, r2, r3} 5728: e284c080 add ip, r4, #128 ; 0x80 572c: e8ac000f stmia ip!, {r0, r1, r2, r3} 5730: e89e0003 ldm lr, {r0, r1} * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 5734: e3a03001 mov r3, #1 ; 0x1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 5738: e88c0003 stm ip, {r0, r1} * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 573c: e5c53075 strb r3, [r5, #117] /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 5740: e3a01001 mov r1, #1 ; 0x1 5744: e1a02009 mov r2, r9 5748: e1a0300a mov r3, sl 574c: e1a00005 mov r0, r5 5750: e58db000 str fp, [sp] 5754: eb000fc6 bl 9674 <_Thread_Start> start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 5758: e3580003 cmp r8, #3 ; 0x3 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 575c: e1a06000 mov r6, r0 start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 5760: 0a000016 beq 57c0 * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 5764: e3560000 cmp r6, #0 ; 0x0 5768: 1a00000c bne 57a0 576c: e1a01005 mov r1, r5 <== NOT EXECUTED 5770: e59f0078 ldr r0, [pc, #120] ; 57f0 <== NOT EXECUTED 5774: eb0009e7 bl 7f18 <_Objects_Free> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 5778: e59fc06c ldr ip, [pc, #108] ; 57ec <== NOT EXECUTED 577c: e59c0000 ldr r0, [ip] <== NOT EXECUTED 5780: eb0006b8 bl 7268 <_API_Mutex_Unlock> <== NOT EXECUTED 5784: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED 5788: eaffff72 b 5558 <== NOT EXECUTED */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 578c: e59f3058 ldr r3, [pc, #88] ; 57ec 5790: e5930000 ldr r0, [r3] 5794: eb0006b3 bl 7268 <_API_Mutex_Unlock> 5798: e3a0000b mov r0, #11 ; 0xb 579c: eaffff6d b 5558 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 57a0: e5953008 ldr r3, [r5, #8] 57a4: e59d201c ldr r2, [sp, #28] 57a8: e5823000 str r3, [r2] _RTEMS_Unlock_allocator(); 57ac: e59f3038 ldr r3, [pc, #56] ; 57ec 57b0: e5930000 ldr r0, [r3] 57b4: eb0006ab bl 7268 <_API_Mutex_Unlock> 57b8: e3a00000 mov r0, #0 ; 0x0 57bc: eaffff65 b 5558 arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 57c0: e2840088 add r0, r4, #136 ; 0x88 57c4: eb001064 bl 995c <_Timespec_To_ticks> 57c8: e284109c add r1, r4, #156 ; 0x9c Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 57cc: e58400a8 str r0, [r4, #168] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 57d0: e59f001c ldr r0, [pc, #28] ; 57f4 57d4: eb001163 bl 9d68 <_Watchdog_Insert> 57d8: eaffffe1 b 5764 57dc: 00019718 .word 0x00019718 57e0: 00018c3c .word 0x00018c3c 57e4: 0001b424 .word 0x0001b424 57e8: 00005b6c .word 0x00005b6c 57ec: 0001b41c .word 0x0001b41c 57f0: 0001b580 .word 0x0001b580 57f4: 0001b444 .word 0x0001b444 00004574 : 4574: e59f2104 ldr r2, [pc, #260] ; 4680 4578: e5923000 ldr r3, [r2] 457c: e2833001 add r3, r3, #1 ; 0x1 int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 4580: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 4584: e5823000 str r3, [r2] 4588: e1a09000 mov r9, r0 458c: e1a04001 mov r4, r1 * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 4590: e59fa0ec ldr sl, [pc, #236] ; 4684 4594: e1a0000a mov r0, sl 4598: eb00093a bl 6a88 <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 459c: e2507000 subs r7, r0, #0 ; 0x0 45a0: 0a000024 beq 4638 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 45a4: e5874014 str r4, [r7, #20] 45a8: e59f80d8 ldr r8, [pc, #216] ; 4688 45ac: e1a06007 mov r6, r7 45b0: e3a05001 mov r5, #1 ; 0x1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 45b4: e7983105 ldr r3, [r8, r5, lsl #2] 45b8: e3530000 cmp r3, #0 ; 0x0 45bc: 0a00001b beq 4630 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 45c0: e5933004 ldr r3, [r3, #4] 45c4: e1d341b0 ldrh r4, [r3, #16] 45c8: e2844001 add r4, r4, #1 ; 0x1 45cc: e1a04104 lsl r4, r4, #2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 45d0: e1a00004 mov r0, r4 45d4: eb001236 bl 8eb4 <_Workspace_Allocate> if ( !table ) { 45d8: e2503000 subs r3, r0, #0 ; 0x0 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 45dc: e1a02004 mov r2, r4 45e0: 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 ) { 45e4: 0a000016 beq 4644 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 45e8: e586301c str r3, [r6, #28] memset( table, '\0', bytes_to_allocate ); 45ec: eb00243b bl d6e0 * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 45f0: 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; 45f4: e3550005 cmp r5, #5 ; 0x5 the_api++ ) { 45f8: e2866004 add r6, r6, #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; 45fc: 1affffec bne 45b4 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4600: e5970008 ldr r0, [r7, #8] 4604: e59a101c ldr r1, [sl, #28] 4608: e1a02800 lsl r2, r0, #16 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 460c: e3a04000 mov r4, #0 ; 0x0 } } the_key->is_active = TRUE; 4610: e3a03001 mov r3, #1 ; 0x1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4614: e7817722 str r7, [r1, r2, lsr #14] 4618: e5c73010 strb r3, [r7, #16] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 461c: e587400c str r4, [r7, #12] _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 4620: e5890000 str r0, [r9] _Thread_Enable_dispatch(); 4624: eb000c7f bl 7828 <_Thread_Enable_dispatch> 4628: e1a00004 mov r0, r4 return 0; } 462c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 4630: e586301c str r3, [r6, #28] 4634: eaffffed b 45f0 _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 4638: eb000c7a bl 7828 <_Thread_Enable_dispatch> 463c: e3a0000b mov r0, #11 ; 0xb 4640: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 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; 4644: e2554001 subs r4, r5, #1 ; 0x1 4648: 0a000006 beq 4668 464c: e2853006 add r3, r5, #6 ; 0x6 <== NOT EXECUTED 4650: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 4654: e0875003 add r5, r7, r3 <== NOT EXECUTED the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 4658: e5350004 ldr r0, [r5, #-4]! <== NOT EXECUTED 465c: eb001210 bl 8ea4 <_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; 4660: e2544001 subs r4, r4, #1 ; 0x1 <== NOT EXECUTED 4664: 1afffffb bne 4658 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 4668: e59f0014 ldr r0, [pc, #20] ; 4684 466c: e1a01007 mov r1, r7 4670: eb0009f1 bl 6e3c <_Objects_Free> the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 4674: eb000c6b bl 7828 <_Thread_Enable_dispatch> 4678: e3a0000c mov r0, #12 ; 0xc 467c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 4680: 0001478c .word 0x0001478c 4684: 00014b64 .word 0x00014b64 4688: 00014748 .word 0x00014748 00005cf8 : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 5cf8: e92d4030 push {r4, r5, lr} 5cfc: e24dd004 sub sp, sp, #4 ; 0x4 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5d00: e1a0100d mov r1, sp 5d04: eb000030 bl 5dcc <_POSIX_Mutex_Get> switch ( location ) { 5d08: e59d5000 ldr r5, [sp] 5d0c: e3550000 cmp r5, #0 ; 0x0 ) { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5d10: e1a04000 mov r4, r0 switch ( location ) { 5d14: 13a00016 movne r0, #22 ; 0x16 5d18: 1a000004 bne 5d30 /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 5d1c: e5943064 ldr r3, [r4, #100] 5d20: e3530000 cmp r3, #0 ; 0x0 5d24: 1a000003 bne 5d38 _Thread_Enable_dispatch(); 5d28: eb000dc5 bl 9444 <_Thread_Enable_dispatch> <== NOT EXECUTED 5d2c: e3a00010 mov r0, #16 ; 0x10 <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 5d30: e28dd004 add sp, sp, #4 ; 0x4 5d34: e8bd8030 pop {r4, r5, pc} if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 5d38: e59f002c ldr r0, [pc, #44] ; 5d6c 5d3c: e1a01004 mov r1, r4 5d40: eb000a7d bl 873c <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 5d44: e3a02016 mov r2, #22 ; 0x16 5d48: e2840014 add r0, r4, #20 ; 0x14 5d4c: e1a01005 mov r1, r5 5d50: eb000846 bl 7e70 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 5d54: e59f0010 ldr r0, [pc, #16] ; 5d6c 5d58: e1a01004 mov r1, r4 5d5c: eb000b3d bl 8a58 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 5d60: eb000db7 bl 9444 <_Thread_Enable_dispatch> 5d64: e1a00005 mov r0, r5 5d68: eafffff0 b 5d30 5d6c: 000175a0 .word 0x000175a0 00005e20 : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 5e20: e92d4030 push {r4, r5, lr} <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 5e24: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 5e28: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 5e2c: 0a000004 beq 5e44 <== NOT EXECUTED return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5e30: e1a0100d mov r1, sp <== NOT EXECUTED 5e34: ebffffe4 bl 5dcc <_POSIX_Mutex_Get> <== NOT EXECUTED switch ( location ) { 5e38: e59d4000 ldr r4, [sp] <== NOT EXECUTED 5e3c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 5e40: 0a000002 beq 5e50 <== NOT EXECUTED case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; 5e44: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 5e48: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 5e4c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 5e50: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED 5e54: e26330ff rsb r3, r3, #255 ; 0xff <== NOT EXECUTED 5e58: e5853000 str r3, [r5] <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 5e5c: eb000d78 bl 9444 <_Thread_Enable_dispatch> <== NOT EXECUTED 5e60: e1a00004 mov r0, r4 <== NOT EXECUTED 5e64: eafffff7 b 5e48 <== NOT EXECUTED 00005e68 : #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 5e68: e59f3148 ldr r3, [pc, #328] ; 5fb8 5e6c: e3510000 cmp r1, #0 ; 0x0 int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 5e70: e92d41f0 push {r4, r5, r6, r7, r8, lr} #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 5e74: 11a04001 movne r4, r1 5e78: 01a04003 moveq r4, r3 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 5e7c: e2507000 subs r7, r0, #0 ; 0x0 5e80: 0a000011 beq 5ecc break; } } #endif if ( !the_attr->is_initialized ) 5e84: e5943000 ldr r3, [r4] 5e88: e3530000 cmp r3, #0 ; 0x0 5e8c: 0a00000e beq 5ecc /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 5e90: e5943004 ldr r3, [r4, #4] 5e94: e3530000 cmp r3, #0 ; 0x0 5e98: 1a000041 bne 5fa4 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 5e9c: e594300c ldr r3, [r4, #12] 5ea0: e3530001 cmp r3, #1 ; 0x1 5ea4: 0a00002f beq 5f68 5ea8: e3530002 cmp r3, #2 ; 0x2 5eac: 0a000033 beq 5f80 5eb0: e3530000 cmp r3, #0 ; 0x0 5eb4: 01a06003 moveq r6, r3 5eb8: 1a000003 bne 5ecc break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 5ebc: e5943008 ldr r3, [r4, #8] 5ec0: e2433001 sub r3, r3, #1 ; 0x1 5ec4: e35300fd cmp r3, #253 ; 0xfd 5ec8: 9a000001 bls 5ed4 _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; 5ecc: e3a00016 mov r0, #22 ; 0x16 } 5ed0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 5ed4: e59f20e0 ldr r2, [pc, #224] ; 5fbc 5ed8: e5923000 ldr r3, [r2] 5edc: e2833001 add r3, r3, #1 ; 0x1 5ee0: e5823000 str r3, [r2] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 5ee4: e59f80d4 ldr r8, [pc, #212] ; 5fc0 5ee8: e1a00008 mov r0, r8 5eec: eb0009ec bl 86a4 <_Objects_Allocate> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 5ef0: e2505000 subs r5, r0, #0 ; 0x0 5ef4: 0a000027 beq 5f98 _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 5ef8: e5943004 ldr r3, [r4, #4] 5efc: e5853010 str r3, [r5, #16] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 5f00: e5942010 ldr r2, [r4, #16] 5f04: e3520000 cmp r2, #0 ; 0x0 the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 5f08: 13a03000 movne r3, #0 ; 0x0 else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 5f0c: 03a03001 moveq r3, #1 ; 0x1 the_mutex->process_shared = the_attr->process_shared; the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 5f10: 15853054 strne r3, [r5, #84] else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 5f14: 05853054 streq r3, [r5, #84] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 5f18: e5943008 ldr r3, [r4, #8] if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 5f1c: e3a01001 mov r1, #1 ; 0x1 the_mutex_attr->priority_ceiling = 5f20: e26330ff rsb r3, r3, #255 ; 0xff /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 5f24: e1a02001 mov r2, r1 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 5f28: e5853060 str r3, [r5, #96] if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 5f2c: e5c51058 strb r1, [r5, #88] the_mutex_attr->priority_ceiling = _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 5f30: e585605c str r6, [r5, #92] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 5f34: e2851054 add r1, r5, #84 ; 0x54 5f38: e2850014 add r0, r5, #20 ; 0x14 5f3c: eb0007cc bl 7e74 <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5f40: e5951008 ldr r1, [r5, #8] 5f44: e598201c ldr r2, [r8, #28] 5f48: e1a03801 lsl r3, r1, #16 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 5f4c: e3a04000 mov r4, #0 ; 0x0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5f50: e7825723 str r5, [r2, r3, lsr #14] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 5f54: e585400c str r4, [r5, #12] CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 5f58: e5871000 str r1, [r7] _Thread_Enable_dispatch(); 5f5c: eb000d38 bl 9444 <_Thread_Enable_dispatch> 5f60: e1a00004 mov r0, r4 5f64: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 5f68: e5943008 ldr r3, [r4, #8] 5f6c: e2433001 sub r3, r3, #1 ; 0x1 5f70: e35300fd cmp r3, #253 ; 0xfd /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 5f74: e3a06002 mov r6, #2 ; 0x2 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 5f78: 8affffd3 bhi 5ecc 5f7c: eaffffd4 b 5ed4 5f80: e5943008 ldr r3, [r4, #8] 5f84: e2433001 sub r3, r3, #1 ; 0x1 5f88: e35300fd cmp r3, #253 ; 0xfd /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 5f8c: e3a06003 mov r6, #3 ; 0x3 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 5f90: 8affffcd bhi 5ecc 5f94: eaffffce b 5ed4 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 5f98: eb000d29 bl 9444 <_Thread_Enable_dispatch> <== NOT EXECUTED 5f9c: e3a0000b mov r0, #11 ; 0xb <== NOT EXECUTED 5fa0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 5fa4: e59f0018 ldr r0, [pc, #24] ; 5fc4 <== NOT EXECUTED 5fa8: e3a01068 mov r1, #104 ; 0x68 <== NOT EXECUTED 5fac: e59f2014 ldr r2, [pc, #20] ; 5fc8 <== NOT EXECUTED 5fb0: e59f3014 ldr r3, [pc, #20] ; 5fcc <== NOT EXECUTED 5fb4: ebfff391 bl 2e00 <__assert_func> <== NOT EXECUTED 5fb8: 00014ec0 .word 0x00014ec0 5fbc: 0001724c .word 0x0001724c 5fc0: 000175a0 .word 0x000175a0 5fc4: 000169fc .word 0x000169fc 5fc8: 00014ed4 .word 0x00014ed4 5fcc: 00016a44 .word 0x00016a44 00006044 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 6044: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 6048: e2527000 subs r7, r2, #0 ; 0x0 <== NOT EXECUTED int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 604c: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 6050: e1a06001 mov r6, r1 <== NOT EXECUTED 6054: e1a05000 mov r5, r0 <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 6058: 0a000002 beq 6068 <== NOT EXECUTED return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 605c: e2413001 sub r3, r1, #1 ; 0x1 <== NOT EXECUTED 6060: e35300fd cmp r3, #253 ; 0xfd <== NOT EXECUTED 6064: 9a000003 bls 6078 <== NOT EXECUTED &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); return 0; 6068: e3a04016 mov r4, #22 ; 0x16 <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 606c: e1a00004 mov r0, r4 <== NOT EXECUTED 6070: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 6074: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 6078: ebffffd4 bl 5fd0 <== NOT EXECUTED if ( status ) 607c: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 6080: 1afffff9 bne 606c <== NOT EXECUTED return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 6084: e1a00005 mov r0, r5 <== NOT EXECUTED 6088: e1a0100d mov r1, sp <== NOT EXECUTED 608c: ebffff4e bl 5dcc <_POSIX_Mutex_Get> <== NOT EXECUTED switch ( location ) { 6090: e59d3000 ldr r3, [sp] <== NOT EXECUTED 6094: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 6098: 1afffff2 bne 6068 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 609c: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 60a0: e26620ff rsb r2, r6, #255 ; 0xff <== NOT EXECUTED the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 60a4: e26330ff rsb r3, r3, #255 ; 0xff <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 60a8: e5901008 ldr r1, [r0, #8] <== NOT EXECUTED the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 60ac: e5873000 str r3, [r7] <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 60b0: e5802060 str r2, [r0, #96] <== NOT EXECUTED _CORE_mutex_Surrender( 60b4: e1a02004 mov r2, r4 <== NOT EXECUTED 60b8: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED 60bc: eb0007e8 bl 8064 <_CORE_mutex_Surrender> <== NOT EXECUTED &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 60c0: eb000cdf bl 9444 <_Thread_Enable_dispatch> <== NOT EXECUTED 60c4: eaffffe8 b 606c <== NOT EXECUTED 000060c8 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 60c8: e92d4010 push {r4, lr} <== NOT EXECUTED 60cc: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 60d0: e1a04000 mov r4, r0 <== NOT EXECUTED * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 60d4: e1a00001 mov r0, r1 <== NOT EXECUTED 60d8: e1a0100d mov r1, sp <== NOT EXECUTED 60dc: eb000026 bl 617c <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED switch ( status ) { 60e0: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED 60e4: 9a000001 bls 60f0 <== NOT EXECUTED 60e8: e3500003 cmp r0, #3 ; 0x3 <== NOT EXECUTED 60ec: 0a000005 beq 6108 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 60f0: e1a00004 mov r0, r4 <== NOT EXECUTED 60f4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 60f8: e59d2000 ldr r2, [sp] <== NOT EXECUTED 60fc: ebffffb6 bl 5fdc <_POSIX_Mutex_Lock_support> <== NOT EXECUTED break; } } return lock_status; } 6100: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 6104: e8bd8010 pop {r4, pc} <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 6108: e1a00004 mov r0, r4 <== NOT EXECUTED 610c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 6110: e59d2000 ldr r2, [sp] <== NOT EXECUTED 6114: ebffffb0 bl 5fdc <_POSIX_Mutex_Lock_support> <== NOT EXECUTED 6118: eafffff8 b 6100 <== NOT EXECUTED 00004d70 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 4d70: e92d40f0 push {r4, r5, r6, r7, lr} const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 4d74: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 4d78: e24dd00c sub sp, sp, #12 ; 0xc const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 4d7c: 0a000007 beq 4da0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 4d80: e3510000 cmp r1, #0 ; 0x0 4d84: 0a000020 beq 4e0c } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 4d88: e5913000 ldr r3, [r1] 4d8c: e3530000 cmp r3, #0 ; 0x0 4d90: 0a000002 beq 4da0 return EINVAL; switch ( the_attr->process_shared ) { 4d94: e5915004 ldr r5, [r1, #4] 4d98: e3550000 cmp r5, #0 ; 0x0 4d9c: 0a000002 beq 4dac ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; 4da0: e3a00016 mov r0, #22 ; 0x16 } 4da4: e28dd00c add sp, sp, #12 ; 0xc 4da8: e8bd80f0 pop {r4, r5, r6, r7, pc} rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4dac: e59f206c ldr r2, [pc, #108] ; 4e20 4db0: e5923000 ldr r3, [r2] 4db4: e2833001 add r3, r3, #1 ; 0x1 4db8: 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 *) 4dbc: e59f7060 ldr r7, [pc, #96] ; 4e24 4dc0: e1a00007 mov r0, r7 4dc4: eb000a66 bl 7764 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 4dc8: e2504000 subs r4, r0, #0 ; 0x0 4dcc: 0a00000b beq 4e00 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 4dd0: e2840010 add r0, r4, #16 ; 0x10 4dd4: e28d1008 add r1, sp, #8 ; 0x8 4dd8: eb00087d bl 6fd4 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4ddc: e5941008 ldr r1, [r4, #8] 4de0: e597201c ldr r2, [r7, #28] 4de4: e1a03801 lsl r3, r1, #16 4de8: e7824723 str r4, [r2, r3, lsr #14] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 4dec: e584500c str r5, [r4, #12] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 4df0: e5861000 str r1, [r6] _Thread_Enable_dispatch(); 4df4: eb000dc2 bl 8504 <_Thread_Enable_dispatch> 4df8: e1a00005 mov r0, r5 4dfc: eaffffe8 b 4da4 _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 4e00: eb000dbf bl 8504 <_Thread_Enable_dispatch> 4e04: e3a0000b mov r0, #11 ; 0xb 4e08: eaffffe5 b 4da4 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 4e0c: e1a0000d mov r0, sp <== NOT EXECUTED 4e10: eb000294 bl 5868 <== NOT EXECUTED 4e14: e1a0400d mov r4, sp <== NOT EXECUTED 4e18: e1a0100d mov r1, sp <== NOT EXECUTED 4e1c: eaffffd9 b 4d88 <== NOT EXECUTED 4e20: 0001958c .word 0x0001958c 4e24: 00019760 .word 0x00019760 00004e98 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4e98: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4e9c: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4ea0: e24dd00c sub sp, sp, #12 ; 0xc 4ea4: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4ea8: 0a00000c beq 4ee0 * 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 ); 4eac: e28d1004 add r1, sp, #4 ; 0x4 4eb0: eb001b38 bl bb98 <_POSIX_Absolute_timeout_to_ticks> switch (status) { 4eb4: 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 ); 4eb8: e1a05000 mov r5, r0 switch (status) { 4ebc: 93a04000 movls r4, #0 ; 0x0 4ec0: 8a000009 bhi 4eec 4ec4: e59f00a8 ldr r0, [pc, #168] ; 4f74 4ec8: e5961000 ldr r1, [r6] 4ecc: e28d2008 add r2, sp, #8 ; 0x8 4ed0: eb000b6a bl 7c80 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4ed4: e59dc008 ldr ip, [sp, #8] 4ed8: e35c0000 cmp ip, #0 ; 0x0 4edc: 0a00000c beq 4f14 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 4ee0: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 4ee4: e28dd00c add sp, sp, #12 ; 0xc 4ee8: e8bd8070 pop {r4, r5, r6, pc} * 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 ); switch (status) { 4eec: e3500003 cmp r0, #3 ; 0x3 4ef0: e5961000 ldr r1, [r6] 4ef4: e59f0078 ldr r0, [pc, #120] ; 4f74 4ef8: e28d2008 add r2, sp, #8 ; 0x8 4efc: e3a04000 mov r4, #0 ; 0x0 4f00: 03a04001 moveq r4, #1 ; 0x1 4f04: eb000b5d bl 7c80 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4f08: e59dc008 ldr ip, [sp, #8] 4f0c: e35c0000 cmp ip, #0 ; 0x0 4f10: 1afffff2 bne 4ee0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 4f14: e5961000 ldr r1, [r6] 4f18: e2800010 add r0, r0, #16 ; 0x10 4f1c: e59d3004 ldr r3, [sp, #4] 4f20: e1a02004 mov r2, r4 4f24: e58dc000 str ip, [sp] 4f28: eb000831 bl 6ff4 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 4f2c: eb000d74 bl 8504 <_Thread_Enable_dispatch> if ( !do_wait && 4f30: e3540000 cmp r4, #0 ; 0x0 4f34: 159f103c ldrne r1, [pc, #60] ; 4f78 4f38: 1a000009 bne 4f64 4f3c: e59f1034 ldr r1, [pc, #52] ; 4f78 <== NOT EXECUTED 4f40: e5913000 ldr r3, [r1] <== NOT EXECUTED 4f44: e5932034 ldr r2, [r3, #52] <== NOT EXECUTED 4f48: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED 4f4c: 1a000004 bne 4f64 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4f50: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 4f54: 0affffe1 beq 4ee0 <== NOT EXECUTED 4f58: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 4f5c: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 4f60: 9affffdf bls 4ee4 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 4f64: e5913000 ldr r3, [r1] 4f68: e5930034 ldr r0, [r3, #52] 4f6c: eb00003b bl 5060 <_POSIX_RWLock_Translate_core_RWLock_return_code> 4f70: eaffffdb b 4ee4 4f74: 00019760 .word 0x00019760 4f78: 00019644 .word 0x00019644 00004f7c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4f7c: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4f80: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4f84: e24dd00c sub sp, sp, #12 ; 0xc 4f88: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4f8c: 0a00000c beq 4fc4 * 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 ); 4f90: e28d1004 add r1, sp, #4 ; 0x4 4f94: eb001aff bl bb98 <_POSIX_Absolute_timeout_to_ticks> switch (status) { 4f98: 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 ); 4f9c: e1a05000 mov r5, r0 switch (status) { 4fa0: 93a04000 movls r4, #0 ; 0x0 4fa4: 8a000009 bhi 4fd0 4fa8: e59f00a8 ldr r0, [pc, #168] ; 5058 4fac: e5961000 ldr r1, [r6] 4fb0: e28d2008 add r2, sp, #8 ; 0x8 4fb4: eb000b31 bl 7c80 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4fb8: e59dc008 ldr ip, [sp, #8] 4fbc: e35c0000 cmp ip, #0 ; 0x0 4fc0: 0a00000c beq 4ff8 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 4fc4: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 4fc8: e28dd00c add sp, sp, #12 ; 0xc 4fcc: e8bd8070 pop {r4, r5, r6, pc} * 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 ); switch (status) { 4fd0: e3500003 cmp r0, #3 ; 0x3 4fd4: e5961000 ldr r1, [r6] 4fd8: e59f0078 ldr r0, [pc, #120] ; 5058 4fdc: e28d2008 add r2, sp, #8 ; 0x8 4fe0: e3a04000 mov r4, #0 ; 0x0 4fe4: 03a04001 moveq r4, #1 ; 0x1 4fe8: eb000b24 bl 7c80 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4fec: e59dc008 ldr ip, [sp, #8] 4ff0: e35c0000 cmp ip, #0 ; 0x0 4ff4: 1afffff2 bne 4fc4 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 4ff8: e5961000 ldr r1, [r6] 4ffc: e2800010 add r0, r0, #16 ; 0x10 5000: e59d3004 ldr r3, [sp, #4] 5004: e1a02004 mov r2, r4 5008: e58dc000 str ip, [sp] 500c: eb00082f bl 70d0 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 5010: eb000d3b bl 8504 <_Thread_Enable_dispatch> if ( !do_wait && 5014: e3540000 cmp r4, #0 ; 0x0 5018: 159f103c ldrne r1, [pc, #60] ; 505c 501c: 1a000009 bne 5048 5020: e59f1034 ldr r1, [pc, #52] ; 505c <== NOT EXECUTED 5024: e5913000 ldr r3, [r1] <== NOT EXECUTED 5028: e5932034 ldr r2, [r3, #52] <== NOT EXECUTED 502c: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED 5030: 1a000004 bne 5048 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 5034: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 5038: 0affffe1 beq 4fc4 <== NOT EXECUTED 503c: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 5040: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 5044: 9affffdf bls 4fc8 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 5048: e5913000 ldr r3, [r1] 504c: e5930034 ldr r0, [r3, #52] 5050: eb000002 bl 5060 <_POSIX_RWLock_Translate_core_RWLock_return_code> 5054: eaffffdb b 4fc8 5058: 00019760 .word 0x00019760 505c: 00019644 .word 0x00019644 0000478c : * 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() ) 478c: e59f309c ldr r3, [pc, #156] ; 4830 4790: e5932000 ldr r2, [r3] 4794: e3520000 cmp r2, #0 ; 0x0 int pthread_setcancelstate( int state, int *oldstate ) { 4798: e92d4030 push {r4, r5, lr} 479c: e1a04000 mov r4, r0 47a0: e1a00001 mov r0, 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() ) 47a4: 13a00047 movne r0, #71 ; 0x47 47a8: 18bd8030 popne {r4, r5, pc} return EPROTO; if ( !oldstate ) 47ac: e3500000 cmp r0, #0 ; 0x0 47b0: 0a000001 beq 47bc return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 47b4: e3540001 cmp r4, #1 ; 0x1 47b8: 9a000001 bls 47c4 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 47bc: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 47c0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47c4: e59f1068 ldr r1, [pc, #104] ; 4834 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 47c8: e59f5068 ldr r5, [pc, #104] ; 4838 47cc: e5913000 ldr r3, [r1] 47d0: e5952000 ldr r2, [r5] 47d4: e2833001 add r3, r3, #1 ; 0x1 47d8: e5813000 str r3, [r1] 47dc: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 47e0: e59230cc ldr r3, [r2, #204] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 47e4: e3540000 cmp r4, #0 ; 0x0 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 47e8: e5803000 str r3, [r0] thread_support->cancelability_state = state; 47ec: e58240cc str r4, [r2, #204] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 47f0: 1a000002 bne 4800 47f4: e59230d0 ldr r3, [r2, #208] 47f8: e3530001 cmp r3, #1 ; 0x1 47fc: 0a000002 beq 480c thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4800: eb000a9c bl 7278 <_Thread_Enable_dispatch> 4804: e3a00000 mov r0, #0 ; 0x0 4808: e8bd8030 pop {r4, r5, pc} _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 480c: e59230d4 ldr r3, [r2, #212] <== NOT EXECUTED 4810: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 4814: 0afffff9 beq 4800 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4818: eb000a96 bl 7278 <_Thread_Enable_dispatch> <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 481c: e5950000 ldr r0, [r5] <== NOT EXECUTED 4820: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 4824: ebfffed1 bl 4370 <_POSIX_Thread_Exit> <== NOT EXECUTED 4828: e1a00004 mov r0, r4 <== NOT EXECUTED 482c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 4830: 00014520 .word 0x00014520 4834: 0001448c .word 0x0001448c 4838: 00014544 .word 0x00014544 0000483c : * 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() ) 483c: e59f3098 ldr r3, [pc, #152] ; 48dc 4840: e5932000 ldr r2, [r3] 4844: e3520000 cmp r2, #0 ; 0x0 int pthread_setcanceltype( int type, int *oldtype ) { 4848: e92d4030 push {r4, r5, lr} 484c: 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() ) 4850: 13a00047 movne r0, #71 ; 0x47 4854: 18bd8030 popne {r4, r5, pc} return EPROTO; if ( !oldtype ) 4858: e3510000 cmp r1, #0 ; 0x0 485c: 0a000001 beq 4868 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 4860: e3500001 cmp r0, #1 ; 0x1 4864: 9a000001 bls 4870 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4868: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 486c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 4870: e59f1068 ldr r1, [pc, #104] ; 48e0 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4874: e59f5068 ldr r5, [pc, #104] ; 48e4 4878: e5913000 ldr r3, [r1] 487c: e5952000 ldr r2, [r5] 4880: e2833001 add r3, r3, #1 ; 0x1 4884: e5813000 str r3, [r1] 4888: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 488c: e59230d0 ldr r3, [r2, #208] 4890: e58c3000 str r3, [ip] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4894: e59240cc ldr r4, [r2, #204] 4898: e3540000 cmp r4, #0 ; 0x0 thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; 489c: e58200d0 str r0, [r2, #208] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 48a0: 1a000001 bne 48ac 48a4: e3500001 cmp r0, #1 ; 0x1 48a8: 0a000002 beq 48b8 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 48ac: eb000a71 bl 7278 <_Thread_Enable_dispatch> 48b0: e3a00000 mov r0, #0 ; 0x0 48b4: e8bd8030 pop {r4, r5, pc} _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 48b8: e59230d4 ldr r3, [r2, #212] 48bc: e3530000 cmp r3, #0 ; 0x0 48c0: 0afffff9 beq 48ac thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 48c4: eb000a6b bl 7278 <_Thread_Enable_dispatch> <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 48c8: e5950000 ldr r0, [r5] <== NOT EXECUTED 48cc: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 48d0: ebfffea6 bl 4370 <_POSIX_Thread_Exit> <== NOT EXECUTED 48d4: e1a00004 mov r0, r4 <== NOT EXECUTED 48d8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 48dc: 00014520 .word 0x00014520 48e0: 0001448c .word 0x0001448c 48e4: 00014544 .word 0x00014544 000069c0 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 69c0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Check all the parameters */ if ( !param ) 69c4: e2525000 subs r5, r2, #0 ; 0x0 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 69c8: e24dd004 sub sp, sp, #4 ; 0x4 69cc: e1a06000 mov r6, r0 69d0: e1a07001 mov r7, r1 /* * Check all the parameters */ if ( !param ) 69d4: 0a000015 beq 6a30 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 69d8: e5953000 ldr r3, [r5] 69dc: e2433001 sub r3, r3, #1 ; 0x1 69e0: e35300fd cmp r3, #253 ; 0xfd 69e4: 8a000011 bhi 6a30 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 69e8: e3510003 cmp r1, #3 ; 0x3 69ec: 979ff101 ldrls pc, [pc, r1, lsl #2] 69f0: ea00000e b 6a30 69f4: 00006a3c .word 0x00006a3c <== NOT EXECUTED 69f8: 00006adc .word 0x00006adc <== NOT EXECUTED 69fc: 00006ae8 .word 0x00006ae8 <== NOT EXECUTED 6a00: 00006a04 .word 0x00006a04 <== NOT EXECUTED 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 ) < 6a04: e2850008 add r0, r5, #8 ; 0x8 6a08: eb000e86 bl a428 <_Timespec_To_ticks> 6a0c: e1a04000 mov r4, r0 6a10: e2850010 add r0, r5, #16 ; 0x10 6a14: eb000e83 bl a428 <_Timespec_To_ticks> 6a18: e1540000 cmp r4, r0 6a1c: 3a000003 bcc 6a30 _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 6a20: e5953004 ldr r3, [r5, #4] 6a24: e2433001 sub r3, r3, #1 ; 0x1 6a28: e35300fd cmp r3, #253 ; 0xfd 6a2c: 9a00003a bls 6b1c _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 6a30: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return ESRCH; } 6a34: e28dd004 add sp, sp, #4 ; 0x4 6a38: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 6a3c: e3a08001 mov r8, #1 ; 0x1 6a40: e3a0a000 mov sl, #0 ; 0x0 6a44: e1a01006 mov r1, r6 6a48: e59f00e4 ldr r0, [pc, #228] ; 6b34 6a4c: e1a0200d mov r2, sp 6a50: eb00085a bl 8bc0 <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 6a54: e59d3000 ldr r3, [sp] 6a58: e3530000 cmp r3, #0 ; 0x0 6a5c: e1a06000 mov r6, r0 6a60: 13a00003 movne r0, #3 ; 0x3 6a64: 1afffff2 bne 6a34 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 6a68: e5964108 ldr r4, [r6, #264] if ( api->schedpolicy == SCHED_SPORADIC ) 6a6c: e594307c ldr r3, [r4, #124] 6a70: e3530003 cmp r3, #3 ; 0x3 6a74: 0a00002b beq 6b28 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 6a78: e584707c str r7, [r4, #124] api->schedparam = *param; 6a7c: e1a0e005 mov lr, r5 6a80: e8be000f ldm lr!, {r0, r1, r2, r3} 6a84: e284c080 add ip, r4, #128 ; 0x80 6a88: e8ac000f stmia ip!, {r0, r1, r2, r3} 6a8c: e89e0003 ldm lr, {r0, r1} the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 6a90: e3570000 cmp r7, #0 ; 0x0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 6a94: e88c0003 stm ip, {r0, r1} the_thread->budget_algorithm = budget_algorithm; 6a98: e586807c str r8, [r6, #124] the_thread->budget_callout = budget_callout; 6a9c: e586a080 str sl, [r6, #128] switch ( api->schedpolicy ) { 6aa0: ba00000a blt 6ad0 6aa4: e3570002 cmp r7, #2 ; 0x2 6aa8: ca000011 bgt 6af4 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 6aac: e59f3084 ldr r3, [pc, #132] ; 6b38 6ab0: e5941080 ldr r1, [r4, #128] 6ab4: e5932000 ldr r2, [r3] 6ab8: e26110ff rsb r1, r1, #255 ; 0xff 6abc: e5862078 str r2, [r6, #120] the_thread->real_priority = 6ac0: e5861018 str r1, [r6, #24] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 6ac4: e1a00006 mov r0, r6 6ac8: e3a02001 mov r2, #1 ; 0x1 6acc: eb0008ea bl 8e7c <_Thread_Change_priority> _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 6ad0: eb000a5b bl 9444 <_Thread_Enable_dispatch> 6ad4: e3a00000 mov r0, #0 ; 0x0 6ad8: eaffffd5 b 6a34 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 6adc: e3a08000 mov r8, #0 ; 0x0 6ae0: e1a0a008 mov sl, r8 6ae4: eaffffd6 b 6a44 6ae8: e3a08002 mov r8, #2 ; 0x2 6aec: e3a0a000 mov sl, #0 ; 0x0 6af0: eaffffd3 b 6a44 api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 6af4: e3570003 cmp r7, #3 ; 0x3 6af8: 1afffff4 bne 6ad0 TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 6afc: e5943080 ldr r3, [r4, #128] _Watchdog_Remove( &api->Sporadic_timer ); 6b00: e284009c add r0, r4, #156 ; 0x9c TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 6b04: e5843098 str r3, [r4, #152] _Watchdog_Remove( &api->Sporadic_timer ); 6b08: eb000fb8 bl a9f0 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 6b0c: e1a01006 mov r1, r6 6b10: e3a00000 mov r0, #0 ; 0x0 6b14: ebffff86 bl 6934 <_POSIX_Threads_Sporadic_budget_TSR> 6b18: eaffffec b 6ad0 if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 6b1c: e59fa018 ldr sl, [pc, #24] ; 6b3c 6b20: e3a08003 mov r8, #3 ; 0x3 6b24: eaffffc6 b 6a44 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 6b28: e284009c add r0, r4, #156 ; 0x9c 6b2c: eb000faf bl a9f0 <_Watchdog_Remove> 6b30: eaffffd0 b 6a78 6b34: 00017460 .word 0x00017460 6b38: 00017204 .word 0x00017204 6b3c: 000068fc .word 0x000068fc 00003ee4 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 3ee4: e92d4010 push {r4, lr} if ( !time_buffer ) 3ee8: e2514000 subs r4, r1, #0 ; 0x0 3eec: 03a00009 moveq r0, #9 ; 0x9 3ef0: 08bd8010 popeq {r4, pc} return RTEMS_INVALID_ADDRESS; switch ( option ) { 3ef4: e3500004 cmp r0, #4 ; 0x4 3ef8: 979ff100 ldrls pc, [pc, r0, lsl #2] 3efc: ea000004 b 3f14 3f00: 00003f1c .word 0x00003f1c <== NOT EXECUTED 3f04: 00003f28 .word 0x00003f28 <== NOT EXECUTED 3f08: 00003f34 .word 0x00003f34 <== NOT EXECUTED 3f0c: 00003f44 .word 0x00003f44 <== NOT EXECUTED 3f10: 00003f54 .word 0x00003f54 <== NOT EXECUTED 3f14: e3a0000a mov r0, #10 ; 0xa 3f18: e8bd8010 pop {r4, pc} case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 3f1c: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3f20: 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 ); 3f24: ea000027 b 3fc8 case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 3f28: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3f2c: 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); 3f30: ea00000a b 3f60 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 3f34: eb00001f bl 3fb8 3f38: e5840000 str r0, [r4] 3f3c: e3a00000 mov r0, #0 ; 0x0 3f40: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 3f44: eb000013 bl 3f98 3f48: e5840000 str r0, [r4] 3f4c: e3a00000 mov r0, #0 ; 0x0 3f50: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 3f54: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3f58: 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 ); 3f5c: ea00004c b 4094 000062bc : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 62bc: e251c000 subs ip, r1, #0 ; 0x0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 62c0: e92d00f0 push {r4, r5, r6, r7} 62c4: e1a06000 mov r6, r0 62c8: e1a07002 mov r7, r2 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 62cc: 0a00003e beq 63cc return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 62d0: e3520000 cmp r2, #0 ; 0x0 62d4: 0a00003c beq 63cc return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 62d8: e59c3000 ldr r3, [ip] 62dc: e3530000 cmp r3, #0 ; 0x0 62e0: 0a000036 beq 63c0 return RTEMS_INVALID_ADDRESS; *registered_major = 0; 62e4: e3a03000 mov r3, #0 ; 0x0 62e8: e5873000 str r3, [r7] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 62ec: e59f20e0 ldr r2, [pc, #224] ; 63d4 62f0: e5922000 ldr r2, [r2] 62f4: e1520006 cmp r2, r6 62f8: 93a0000a movls r0, #10 ; 0xa 62fc: 9a00002b bls 63b0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 6300: e3560000 cmp r6, #0 ; 0x0 6304: 1a00001d bne 6380 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 6308: e2526001 subs r6, r2, #1 ; 0x1 630c: 0a000029 beq 63b8 6310: e1a03282 lsl r3, r2, #5 6314: e0433182 sub r3, r3, r2, lsl #3 6318: e59f20b8 ldr r2, [pc, #184] ; 63d8 631c: e5921000 ldr r1, [r2] 6320: e2433018 sub r3, r3, #24 ; 0x18 6324: e0811003 add r1, r1, r3 6328: ea000002 b 6338 632c: e2566001 subs r6, r6, #1 ; 0x1 6330: e2411018 sub r1, r1, #24 ; 0x18 6334: 0a00001f beq 63b8 if ( !_IO_Driver_address_table[major].initialization_entry && 6338: e5913000 ldr r3, [r1] 633c: e3530000 cmp r3, #0 ; 0x0 * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 6340: e1a05001 mov r5, r1 if ( !_IO_Driver_address_table[major].initialization_entry && 6344: 1afffff8 bne 632c 6348: e5913004 ldr r3, [r1, #4] 634c: e3530000 cmp r3, #0 ; 0x0 6350: 1afffff5 bne 632c if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 6354: e8bc000f ldm ip!, {r0, r1, r2, r3} 6358: e1a04005 mov r4, r5 635c: e8a4000f stmia r4!, {r0, r1, r2, r3} 6360: e89c0003 ldm ip, {r0, r1} 6364: e8840003 stm r4, {r0, r1} *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 6368: e3a01000 mov r1, #0 ; 0x0 636c: e1a00006 mov r0, r6 6370: e1a02001 mov r2, r1 _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; *registered_major = major; 6374: e5876000 str r6, [r7] return rtems_io_initialize( major, 0, NULL ); } 6378: e8bd00f0 pop {r4, r5, r6, r7} _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 637c: eaffff58 b 60e4 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 6380: e59f2050 ldr r2, [pc, #80] ; 63d8 6384: e1a03286 lsl r3, r6, #5 6388: e5921000 ldr r1, [r2] 638c: e0433186 sub r3, r3, r6, lsl #3 6390: e7912003 ldr r2, [r1, r3] 6394: e3520000 cmp r2, #0 ; 0x0 6398: e0815003 add r5, r1, r3 639c: 1a000002 bne 63ac 63a0: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 63a4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 63a8: 0affffe9 beq 6354 <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 63ac: e3a0000c mov r0, #12 ; 0xc } 63b0: e8bd00f0 pop {r4, r5, r6, r7} 63b4: e12fff1e bx lr _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 63b8: e3a00005 mov r0, #5 ; 0x5 63bc: eafffffb b 63b0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 63c0: e59c3004 ldr r3, [ip, #4] 63c4: e3530000 cmp r3, #0 ; 0x0 63c8: 1affffc5 bne 62e4 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 63cc: e3a00009 mov r0, #9 ; 0x9 63d0: eafffff6 b 63b0 63d4: 0001b500 .word 0x0001b500 63d8: 0001b504 .word 0x0001b504 0002b994 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 2b994: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 2b998: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 2b99c: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 2b9a0: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED 2b9a4: 0a000007 beq 2b9c8 <== NOT EXECUTED 2b9a8: e1a01000 mov r1, r0 <== NOT EXECUTED 2b9ac: e1a0200d mov r2, sp <== NOT EXECUTED 2b9b0: e59f004c ldr r0, [pc, #76] ; 2ba04 <== NOT EXECUTED 2b9b4: ebff7791 bl 9800 <_Objects_Get> <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 2b9b8: e59d6000 ldr r6, [sp] <== NOT EXECUTED 2b9bc: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 2b9c0: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 2b9c4: 0a000001 beq 2b9d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2b9c8: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 2b9cc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *statistics = the_period->Statistics; 2b9d0: e280c054 add ip, r0, #84 ; 0x54 <== NOT EXECUTED 2b9d4: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 2b9d8: e1a04005 mov r4, r5 <== NOT EXECUTED 2b9dc: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED 2b9e0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 2b9e4: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED 2b9e8: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 2b9ec: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED 2b9f0: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED 2b9f4: e8840003 stm r4, {r0, r1} <== NOT EXECUTED _Thread_Enable_dispatch(); 2b9f8: ebff79de bl a178 <_Thread_Enable_dispatch> <== NOT EXECUTED 2b9fc: e1a00006 mov r0, r6 <== NOT EXECUTED 2ba00: eafffff0 b 2b9c8 <== NOT EXECUTED 2ba04: 0005b25c .word 0x0005b25c 0002ba08 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 2ba08: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 2ba0c: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 2ba10: e24dd00c sub sp, sp, #12 ; 0xc Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 2ba14: 03a00009 moveq r0, #9 ; 0x9 2ba18: 0a000016 beq 2ba78 2ba1c: e1a01000 mov r1, r0 2ba20: e28d2008 add r2, sp, #8 ; 0x8 2ba24: e59f0084 ldr r0, [pc, #132] ; 2bab0 2ba28: ebff7774 bl 9800 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 2ba2c: e59d3008 ldr r3, [sp, #8] 2ba30: e3530000 cmp r3, #0 ; 0x0 2ba34: e1a06000 mov r6, r0 2ba38: 13a00004 movne r0, #4 ; 0x4 2ba3c: 1a00000d bne 2ba78 case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 2ba40: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED 2ba44: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2ba48: 01a02003 moveq r2, r3 <== NOT EXECUTED 2ba4c: 15932008 ldrne r2, [r3, #8] <== NOT EXECUTED status->state = the_period->state; 2ba50: e5963038 ldr r3, [r6, #56] <== NOT EXECUTED if ( status->state == RATE_MONOTONIC_INACTIVE ) { 2ba54: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 2ba58: e885000c stm r5, {r2, r3} <== NOT EXECUTED status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { 2ba5c: 1a000007 bne 2ba80 <== NOT EXECUTED #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; status->executed_since_last_period.tv_nsec = 0; 2ba60: e5853014 str r3, [r5, #20] <== NOT EXECUTED status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS status->since_last_period.tv_sec = 0; 2ba64: e5853008 str r3, [r5, #8] <== NOT EXECUTED status->since_last_period.tv_nsec = 0; 2ba68: e585300c str r3, [r5, #12] <== NOT EXECUTED #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; 2ba6c: e5853010 str r3, [r5, #16] <== NOT EXECUTED the_period->owner->cpu_time_used - the_period->owner_executed_at_period; #endif } _Thread_Enable_dispatch(); 2ba70: ebff79c0 bl a178 <_Thread_Enable_dispatch> <== NOT EXECUTED 2ba74: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2ba78: e28dd00c add sp, sp, #12 ; 0xc 2ba7c: e8bd8070 pop {r4, r5, r6, pc} * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 2ba80: e1a0000d mov r0, sp <== NOT EXECUTED 2ba84: ebffd8f4 bl 21e5c <_TOD_Get_uptime> <== NOT EXECUTED #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 2ba88: e2860044 add r0, r6, #68 ; 0x44 <== NOT EXECUTED 2ba8c: e1a0100d mov r1, sp <== NOT EXECUTED 2ba90: e2852008 add r2, r5, #8 ; 0x8 <== NOT EXECUTED 2ba94: ebff7d79 bl b080 <_Timespec_Subtract> <== NOT EXECUTED status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 2ba98: e1a0100d mov r1, sp <== NOT EXECUTED 2ba9c: e2852010 add r2, r5, #16 ; 0x10 <== NOT EXECUTED 2baa0: e59f000c ldr r0, [pc, #12] ; 2bab4 <== NOT EXECUTED * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 2baa4: e1a0400d mov r4, sp <== NOT EXECUTED status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 2baa8: ebff7d74 bl b080 <_Timespec_Subtract> <== NOT EXECUTED 2baac: eaffffef b 2ba70 <== NOT EXECUTED 2bab0: 0005b25c .word 0x0005b25c 2bab4: 0005a7cc .word 0x0005a7cc 0002131c : } } void rtems_rate_monotonic_report_statistics( void ) { rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 2131c: e59f1004 ldr r1, [pc, #4] ; 21328 <== NOT EXECUTED 21320: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 21324: eaffff71 b 210f0 <== NOT EXECUTED 21328: 00005590 .word 0x00005590 000210f0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 210f0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 210f4: e2516000 subs r6, r1, #0 ; 0x0 <== NOT EXECUTED */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 210f8: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED 210fc: e1a07000 mov r7, r0 <== NOT EXECUTED rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 21100: 0a000042 beq 21210 <== NOT EXECUTED return; (*print)( context, "Period information by period\n" ); 21104: e59f11e4 ldr r1, [pc, #484] ; 212f0 <== NOT EXECUTED 21108: e1a0e00f mov lr, pc <== NOT EXECUTED 2110c: e12fff16 bx r6 <== NOT EXECUTED #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 21110: e59f11dc ldr r1, [pc, #476] ; 212f4 <== NOT EXECUTED 21114: e1a00007 mov r0, r7 <== NOT EXECUTED 21118: e1a0e00f mov lr, pc <== NOT EXECUTED 2111c: e12fff16 bx r6 <== NOT EXECUTED #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 21120: e59f11d0 ldr r1, [pc, #464] ; 212f8 <== NOT EXECUTED 21124: e1a00007 mov r0, r7 <== NOT EXECUTED 21128: e1a0e00f mov lr, pc <== NOT EXECUTED 2112c: e12fff16 bx r6 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 21130: e59f81c4 ldr r8, [pc, #452] ; 212fc <== NOT EXECUTED Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 21134: e59f11c4 ldr r1, [pc, #452] ; 21300 <== NOT EXECUTED 21138: e1a00007 mov r0, r7 <== NOT EXECUTED 2113c: e1a0e00f mov lr, pc <== NOT EXECUTED 21140: e12fff16 bx r6 <== NOT EXECUTED #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 21144: e1a00007 mov r0, r7 <== NOT EXECUTED 21148: e59f11b4 ldr r1, [pc, #436] ; 21304 <== NOT EXECUTED 2114c: e1a0e00f mov lr, pc <== NOT EXECUTED 21150: e12fff16 bx r6 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 21154: e5985008 ldr r5, [r8, #8] <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; 21158: e598300c ldr r3, [r8, #12] <== NOT EXECUTED 2115c: e1550003 cmp r5, r3 <== NOT EXECUTED 21160: 8a00002a bhi 21210 <== NOT EXECUTED _Timespec_Divide_by_integer( &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 21164: e59fa19c ldr sl, [pc, #412] ; 21308 <== NOT EXECUTED 21168: e28d9010 add r9, sp, #16 ; 0x10 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2116c: e28db060 add fp, sp, #96 ; 0x60 <== NOT EXECUTED 21170: ea000003 b 21184 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 21174: e598300c ldr r3, [r8, #12] <== NOT EXECUTED id++ ) { 21178: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 2117c: e1530005 cmp r3, r5 <== NOT EXECUTED 21180: 3a000022 bcc 21210 <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 21184: e1a00005 mov r0, r5 <== NOT EXECUTED 21188: e1a01009 mov r1, r9 <== NOT EXECUTED 2118c: eb002a00 bl 2b994 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) 21190: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 21194: 1afffff6 bne 21174 <== NOT EXECUTED continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 21198: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED 2119c: e1a00005 mov r0, r5 <== NOT EXECUTED 211a0: eb002a18 bl 2ba08 <== NOT EXECUTED continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 211a4: e59d0048 ldr r0, [sp, #72] <== NOT EXECUTED 211a8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif name[ 0 ] = '\0'; 211ac: e5cd406b strb r4, [sp, #107] <== NOT EXECUTED if ( the_status.owner ) { 211b0: 1a00004a bne 212e0 <== NOT EXECUTED /* * Print part of report line that is not dependent on granularity */ (*print)( context, 211b4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 211b8: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 211bc: e58d3000 str r3, [sp] <== NOT EXECUTED 211c0: e58d2004 str r2, [sp, #4] <== NOT EXECUTED 211c4: e28d306b add r3, sp, #107 ; 0x6b <== NOT EXECUTED 211c8: e1a02005 mov r2, r5 <== NOT EXECUTED 211cc: e59f1138 ldr r1, [pc, #312] ; 2130c <== NOT EXECUTED 211d0: e1a00007 mov r0, r7 <== NOT EXECUTED 211d4: e1a0e00f mov lr, pc <== NOT EXECUTED 211d8: e12fff16 bx r6 <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 211dc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 211e0: e2531000 subs r1, r3, #0 ; 0x0 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 211e4: e28d0028 add r0, sp, #40 ; 0x28 <== NOT EXECUTED 211e8: e1a0200b mov r2, fp <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 211ec: 1a000009 bne 21218 <== NOT EXECUTED (*print)( context, "\n" ); 211f0: e1a00007 mov r0, r7 <== NOT EXECUTED 211f4: e59f1114 ldr r1, [pc, #276] ; 21310 <== NOT EXECUTED 211f8: e1a0e00f mov lr, pc <== NOT EXECUTED 211fc: e12fff16 bx r6 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 21200: e598300c ldr r3, [r8, #12] <== NOT EXECUTED id++ ) { 21204: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 21208: e1530005 cmp r3, r5 <== NOT EXECUTED 2120c: 2affffdc bcs 21184 <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 21210: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED 21214: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 21218: eb0005c6 bl 22938 <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 2121c: e59d1024 ldr r1, [sp, #36] <== NOT EXECUTED 21220: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED 21224: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 21228: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED 2122c: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED 21230: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED 21234: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED 21238: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED 2123c: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED 21240: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED 21244: e58d2000 str r2, [sp] <== NOT EXECUTED 21248: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED 2124c: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED 21250: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED 21254: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED 21258: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED 2125c: e58d000c str r0, [sp, #12] <== NOT EXECUTED 21260: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED 21264: e59f10a8 ldr r1, [pc, #168] ; 21314 <== NOT EXECUTED 21268: e1a00007 mov r0, r7 <== NOT EXECUTED 2126c: e1a0e00f mov lr, pc <== NOT EXECUTED 21270: e12fff16 bx r6 <== NOT EXECUTED * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 21274: e28d0040 add r0, sp, #64 ; 0x40 <== NOT EXECUTED 21278: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 2127c: e1a0200b mov r2, fp <== NOT EXECUTED 21280: eb0005ac bl 22938 <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 21284: e59d103c ldr r1, [sp, #60] <== NOT EXECUTED 21288: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED 2128c: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 21290: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED 21294: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED 21298: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED 2129c: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED 212a0: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED 212a4: e59d2038 ldr r2, [sp, #56] <== NOT EXECUTED 212a8: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED 212ac: e58d2000 str r2, [sp] <== NOT EXECUTED 212b0: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED 212b4: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED 212b8: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED 212bc: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED 212c0: e58d000c str r0, [sp, #12] <== NOT EXECUTED 212c4: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED 212c8: e59d2030 ldr r2, [sp, #48] <== NOT EXECUTED 212cc: e1a00007 mov r0, r7 <== NOT EXECUTED 212d0: e59f1040 ldr r1, [pc, #64] ; 21318 <== NOT EXECUTED 212d4: e1a0e00f mov lr, pc <== NOT EXECUTED 212d8: e12fff16 bx r6 <== NOT EXECUTED 212dc: eaffffa4 b 21174 <== NOT EXECUTED #endif name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 212e0: e28d206b add r2, sp, #107 ; 0x6b <== NOT EXECUTED 212e4: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED 212e8: ebff9a4d bl 7c24 <== NOT EXECUTED 212ec: eaffffb0 b 211b4 <== NOT EXECUTED 212f0: 0004543c .word 0x0004543c 212f4: 0004545c .word 0x0004545c 212f8: 00045480 .word 0x00045480 212fc: 0005b25c .word 0x0005b25c 21300: 000454a4 .word 0x000454a4 21304: 000454f0 .word 0x000454f0 21308: 10624dd3 .word 0x10624dd3 2130c: 0004553c .word 0x0004553c 21310: 000469c4 .word 0x000469c4 21314: 00045554 .word 0x00045554 21318: 00045574 .word 0x00045574 0002132c : 2132c: e59f3040 ldr r3, [pc, #64] ; 21374 <== NOT EXECUTED 21330: e5932000 ldr r2, [r3] <== NOT EXECUTED 21334: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 21338: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2133c: e5832000 str r2, [r3] <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 21340: e59f5030 ldr r5, [pc, #48] ; 21378 <== NOT EXECUTED 21344: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; 21348: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 2134c: e1540003 cmp r4, r3 <== NOT EXECUTED 21350: 8a000005 bhi 2136c <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 21354: e1a00004 mov r0, r4 <== NOT EXECUTED 21358: eb000007 bl 2137c <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 2135c: e595300c ldr r3, [r5, #12] <== NOT EXECUTED id++ ) { 21360: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 21364: e1530004 cmp r3, r4 <== NOT EXECUTED 21368: 2afffff9 bcs 21354 <== NOT EXECUTED /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 2136c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 21370: eaffa380 b a178 <_Thread_Enable_dispatch> <== NOT EXECUTED 21374: 0005a70c .word 0x0005a70c 21378: 0005b25c .word 0x0005b25c 0002137c : */ rtems_status_code rtems_rate_monotonic_reset_statistics( Objects_Id id ) { 2137c: e92d4010 push {r4, lr} <== NOT EXECUTED 21380: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 21384: e1a01000 mov r1, r0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 21388: e1a0200d mov r2, sp <== NOT EXECUTED 2138c: e59f005c ldr r0, [pc, #92] ; 213f0 <== NOT EXECUTED 21390: ebffa11a bl 9800 <_Objects_Get> <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 21394: e59d4000 ldr r4, [sp] <== NOT EXECUTED 21398: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 2139c: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 213a0: 1a000010 bne 213e8 <== NOT EXECUTED case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 213a4: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED 213a8: e5803078 str r3, [r0, #120] <== NOT EXECUTED 213ac: e5804054 str r4, [r0, #84] <== NOT EXECUTED 213b0: e5804058 str r4, [r0, #88] <== NOT EXECUTED 213b4: e5804064 str r4, [r0, #100] <== NOT EXECUTED 213b8: e5804068 str r4, [r0, #104] <== NOT EXECUTED 213bc: e580406c str r4, [r0, #108] <== NOT EXECUTED 213c0: e5804070 str r4, [r0, #112] <== NOT EXECUTED 213c4: e580407c str r4, [r0, #124] <== NOT EXECUTED 213c8: e5804080 str r4, [r0, #128] <== NOT EXECUTED 213cc: e5804084 str r4, [r0, #132] <== NOT EXECUTED 213d0: e5804088 str r4, [r0, #136] <== NOT EXECUTED 213d4: e580305c str r3, [r0, #92] <== NOT EXECUTED 213d8: e5803060 str r3, [r0, #96] <== NOT EXECUTED 213dc: e5803074 str r3, [r0, #116] <== NOT EXECUTED _Thread_Enable_dispatch(); 213e0: ebffa364 bl a178 <_Thread_Enable_dispatch> <== NOT EXECUTED 213e4: e1a00004 mov r0, r4 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 213e8: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 213ec: e8bd8010 pop {r4, pc} <== NOT EXECUTED 213f0: 0005b25c .word 0x0005b25c 000110a4 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 110a4: e92d41f0 push {r4, r5, r6, r7, r8, lr} Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 110a8: e2517000 subs r7, r1, #0 ; 0x0 rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 110ac: e1a04000 mov r4, r0 110b0: e24dd008 sub sp, sp, #8 ; 0x8 110b4: 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 ) 110b8: 03a04009 moveq r4, #9 ; 0x9 110bc: 0a000020 beq 11144 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 110c0: e59f80a0 ldr r8, [pc, #160] ; 11168 110c4: e5980000 ldr r0, [r8] 110c8: eb000928 bl 13570 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 110cc: e1a01004 mov r1, r4 110d0: e59f0094 ldr r0, [pc, #148] ; 1116c 110d4: e1a0200d mov r2, sp 110d8: eb000ff5 bl 150b4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 110dc: e59d4000 ldr r4, [sp] 110e0: e3540000 cmp r4, #0 ; 0x0 110e4: e1a05000 mov r5, r0 110e8: 1a000018 bne 11150 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 110ec: e1a01007 mov r1, r7 110f0: e1a02006 mov r2, r6 110f4: e2800068 add r0, r0, #104 ; 0x68 110f8: e28d3004 add r3, sp, #4 ; 0x4 110fc: eb000c3a bl 141ec <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { 11100: e3500001 cmp r0, #1 ; 0x1 11104: 03a04009 moveq r4, #9 ; 0x9 11108: 0a00000b beq 1113c 1110c: 2a000007 bcs 11130 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 11110: e59d1004 ldr r1, [sp, #4] 11114: e5952054 ldr r2, [r5, #84] the_region->maximum_segment_size += amount_extended; 11118: e595305c ldr r3, [r5, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 1111c: e0822001 add r2, r2, r1 the_region->maximum_segment_size += amount_extended; 11120: e0833001 add r3, r3, r1 11124: e585305c str r3, [r5, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 11128: e5852054 str r2, [r5, #84] 1112c: ea000002 b 1113c starting_address, length, &amount_extended ); switch ( heap_status ) { 11130: e3500002 cmp r0, #2 ; 0x2 11134: 0a000009 beq 11160 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 11138: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1113c: e5980000 ldr r0, [r8] 11140: eb000926 bl 135e0 <_API_Mutex_Unlock> return return_status; } 11144: e1a00004 mov r0, r4 11148: e28dd008 add sp, sp, #8 ; 0x8 1114c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 11150: e3540001 cmp r4, #1 ; 0x1 11154: 03a04004 moveq r4, #4 ; 0x4 11158: 1afffff6 bne 11138 1115c: eafffff6 b 1113c switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 11160: e3a04018 mov r4, #24 ; 0x18 11164: eafffff4 b 1113c 11168: 0003287c .word 0x0003287c 1116c: 00032654 .word 0x00032654 0001148c : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 1148c: 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 ) 11490: e253a000 subs sl, r3, #0 ; 0x0 Objects_Id id, void *segment, size_t size, size_t *old_size ) { 11494: e24dd010 sub sp, sp, #16 ; 0x10 11498: e1a04000 mov r4, r0 1149c: e1a05001 mov r5, r1 114a0: e1a06002 mov r6, r2 uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 114a4: 0a000028 beq 1154c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 114a8: e59f70b4 ldr r7, [pc, #180] ; 11564 114ac: e5970000 ldr r0, [r7] 114b0: eb00082e bl 13570 <_API_Mutex_Lock> 114b4: e1a01004 mov r1, r4 114b8: e59f00a8 ldr r0, [pc, #168] ; 11568 114bc: e28d2008 add r2, sp, #8 ; 0x8 114c0: eb000efb bl 150b4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 114c4: e59d3008 ldr r3, [sp, #8] 114c8: e3530000 cmp r3, #0 ; 0x0 114cc: e1a08000 mov r8, r0 114d0: 0a000007 beq 114f4 114d4: e3530001 cmp r3, #1 ; 0x1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114d8: e5970000 ldr r0, [r7] return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 114dc: 03a04004 moveq r4, #4 ; 0x4 114e0: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114e4: eb00083d bl 135e0 <_API_Mutex_Unlock> return return_status; } 114e8: e1a00004 mov r0, r4 114ec: e28dd010 add sp, sp, #16 ; 0x10 114f0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 114f4: e1a01005 mov r1, r5 114f8: e28d3004 add r3, sp, #4 ; 0x4 114fc: e28dc00c add ip, sp, #12 ; 0xc 11500: e1a02006 mov r2, r6 11504: e2800068 add r0, r0, #104 ; 0x68 11508: e58dc000 str ip, [sp] 1150c: eb000cc1 bl 14818 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11510: e59d3004 ldr r3, [sp, #4] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 11514: e2505000 subs r5, r0, #0 ; 0x0 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11518: e58a3000 str r3, [sl] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 1151c: 1a000005 bne 11538 11520: e59d400c ldr r4, [sp, #12] <== NOT EXECUTED 11524: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 11528: 1a000009 bne 11554 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1152c: e5970000 ldr r0, [r7] <== NOT EXECUTED 11530: eb00082a bl 135e0 <_API_Mutex_Unlock> <== NOT EXECUTED 11534: eaffffeb b 114e8 <== NOT EXECUTED 11538: e5970000 ldr r0, [r7] 1153c: eb000827 bl 135e0 <_API_Mutex_Unlock> return 11540: e3550001 cmp r5, #1 ; 0x1 11544: 03a0400d moveq r4, #13 ; 0xd 11548: 0affffe6 beq 114e8 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 1154c: e3a04009 mov r4, #9 ; 0x9 11550: eaffffe4 b 114e8 *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ 11554: e1a00008 mov r0, r8 <== NOT EXECUTED 11558: eb0020fe bl 19958 <_Region_Process_queue> <== NOT EXECUTED 1155c: e1a04005 mov r4, r5 <== NOT EXECUTED 11560: eaffffe0 b 114e8 <== NOT EXECUTED 11564: 0003287c .word 0x0003287c 11568: 00032654 .word 0x00032654 00004544 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 4544: 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 ) ) 4548: e250a000 subs sl, r0, #0 ; 0x0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 454c: e24dd018 sub sp, sp, #24 ; 0x18 4550: e1a06001 mov r6, r1 4554: e1a04002 mov r4, r2 4558: e1a08003 mov r8, r3 register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 455c: 02800003 addeq r0, r0, #3 ; 0x3 4560: 0a000037 beq 4644 return RTEMS_INVALID_NAME; if ( !id ) 4564: e59d3038 ldr r3, [sp, #56] 4568: e3530000 cmp r3, #0 ; 0x0 456c: 03a00009 moveq r0, #9 ; 0x9 4570: 0a000033 beq 4644 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 4574: e21230c0 ands r3, r2, #192 ; 0xc0 4578: 02025030 andeq r5, r2, #48 ; 0x30 457c: 1a000032 bne 464c if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 4580: e3550000 cmp r5, #0 ; 0x0 4584: 0a000002 beq 4594 4588: e3560001 cmp r6, #1 ; 0x1 458c: 83a0000a movhi r0, #10 ; 0xa 4590: 8a00002b bhi 4644 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4594: e59f218c ldr r2, [pc, #396] ; 4728 4598: e5923000 ldr r3, [r2] 459c: e2833001 add r3, r3, #1 ; 0x1 45a0: 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 ); 45a4: e59f9180 ldr r9, [pc, #384] ; 472c 45a8: e1a00009 mov r0, r9 45ac: eb000537 bl 5a90 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 45b0: e2507000 subs r7, r0, #0 ; 0x0 45b4: 0a000048 beq 46dc * 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 ) ) { 45b8: e3550000 cmp r5, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 45bc: e5874010 str r4, [r7, #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 ) ) { 45c0: 0a00002e beq 4680 CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 45c4: e3140040 tst r4, #64 ; 0x40 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45c8: 13a03002 movne r3, #2 ; 0x2 45cc: 158d3008 strne r3, [sp, #8] */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 45d0: 1a000007 bne 45f4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 45d4: e3140080 tst r4, #128 ; 0x80 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 45d8: 13a03003 movne r3, #3 ; 0x3 45dc: 158d3008 strne r3, [sp, #8] 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 ) ) 45e0: 1a000003 bne 45f4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 45e4: e2143004 ands r3, r4, #4 ; 0x4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 45e8: 13a03001 movne r3, #1 ; 0x1 45ec: 158d3008 strne r3, [sp, #8] else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 45f0: 058d3008 streq r3, [sp, #8] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 45f4: e3550010 cmp r5, #16 ; 0x10 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; 45f8: 13a03002 movne r3, #2 ; 0x2 the_mutex_attributes.only_owner_release = FALSE; 45fc: 13a02000 movne r2, #0 ; 0x0 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; 4600: 158d3000 strne r3, [sp] the_mutex_attributes.only_owner_release = FALSE; 4604: 15cd2004 strbne r2, [sp, #4] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 4608: 0a000036 beq 46e8 the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 460c: e3560001 cmp r6, #1 ; 0x1 4610: 13a02000 movne r2, #0 ; 0x0 4614: 03a02001 moveq r2, #1 ; 0x1 4618: e2870014 add r0, r7, #20 ; 0x14 461c: 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; 4620: e58d800c str r8, [sp, #12] mutex_status = _CORE_mutex_Initialize( 4624: eb00032e bl 52e4 <_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 ) { 4628: e3500006 cmp r0, #6 ; 0x6 462c: 1a000020 bne 46b4 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 4630: e59f00f4 ldr r0, [pc, #244] ; 472c <== NOT EXECUTED 4634: e1a01007 mov r1, r7 <== NOT EXECUTED 4638: eb000601 bl 5e44 <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 463c: eb00089f bl 68c0 <_Thread_Enable_dispatch> <== NOT EXECUTED 4640: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4644: e28dd018 add sp, sp, #24 ; 0x18 4648: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 464c: e2025030 and r5, r2, #48 ; 0x30 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 4650: e3550010 cmp r5, #16 ; 0x10 4654: 0a000003 beq 4668 4658: e3550020 cmp r5, #32 ; 0x20 465c: 0a000001 beq 4668 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4660: e3a0000b mov r0, #11 ; 0xb 4664: eafffff6 b 4644 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 4668: e3140004 tst r4, #4 ; 0x4 466c: 0afffffb beq 4660 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 4670: e35300c0 cmp r3, #192 ; 0xc0 4674: 1affffc1 bne 4580 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4678: e3a0000b mov r0, #11 ; 0xb 467c: eafffff0 b 4644 _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 4680: e3140004 tst r4, #4 ; 0x4 the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 4684: 13a03001 movne r3, #1 ; 0x1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 4688: 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; 468c: 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( 4690: e1a02006 mov r2, r6 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4694: 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( 4698: e2870014 add r0, r7, #20 ; 0x14 469c: 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; 46a0: 058d5014 streq r5, [sp, #20] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 46a4: 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; 46a8: e58dc00c str ip, [sp, #12] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 46ac: e58dc000 str ip, [sp] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 46b0: eb0003df bl 5634 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46b4: e5971008 ldr r1, [r7, #8] 46b8: e599201c ldr r2, [r9, #28] 46bc: e1a03801 lsl r3, r1, #16 46c0: e7827723 str r7, [r2, r3, lsr #14] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 46c4: e59d3038 ldr r3, [sp, #56] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 46c8: e587a00c str sl, [r7, #12] 46cc: e5831000 str r1, [r3] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 46d0: eb00087a bl 68c0 <_Thread_Enable_dispatch> 46d4: e3a00000 mov r0, #0 ; 0x0 46d8: eaffffd9 b 4644 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 46dc: eb000877 bl 68c0 <_Thread_Enable_dispatch> 46e0: e3a00005 mov r0, #5 ; 0x5 46e4: eaffffd6 b 4644 if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 46e8: 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; 46ec: e3a03000 mov r3, #0 ; 0x0 46f0: e58d3000 str r3, [sp] switch ( the_mutex_attributes.discipline ) { 46f4: e3520003 cmp r2, #3 ; 0x3 46f8: 979ff102 ldrls pc, [pc, r2, lsl #2] 46fc: eaffffc2 b 460c <== NOT EXECUTED 4700: 0000471c .word 0x0000471c <== NOT EXECUTED 4704: 0000471c .word 0x0000471c <== NOT EXECUTED 4708: 00004710 .word 0x00004710 <== NOT EXECUTED 470c: 00004710 .word 0x00004710 <== 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; 4710: e3a03001 mov r3, #1 ; 0x1 4714: e5cd3004 strb r3, [sp, #4] 4718: eaffffbb b 460c the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 471c: e3a03000 mov r3, #0 ; 0x0 4720: e5cd3004 strb r3, [sp, #4] 4724: eaffffb8 b 460c 4728: 00016f0c .word 0x00016f0c 472c: 00016e2c .word 0x00016e2c 00021488 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 21488: e52de004 push {lr} ; (str lr, [sp, #-4]!) 2148c: e24dd004 sub sp, sp, #4 ; 0x4 21490: e1a01000 mov r1, r0 21494: e1a0200d mov r2, sp 21498: e59f004c ldr r0, [pc, #76] ; 214ec 2149c: ebffa0d7 bl 9800 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 214a0: e59d1000 ldr r1, [sp] 214a4: e3510000 cmp r1, #0 ; 0x0 214a8: 13a00004 movne r0, #4 ; 0x4 214ac: 1a000008 bne 214d4 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 214b0: e5903010 ldr r3, [r0, #16] 214b4: e2133030 ands r3, r3, #48 ; 0x30 214b8: 1a000007 bne 214dc &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 214bc: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED 214c0: e1a01003 mov r1, r3 <== NOT EXECUTED 214c4: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 214c8: ebff9e08 bl 8cf0 <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 214cc: ebffa329 bl a178 <_Thread_Enable_dispatch> 214d0: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 214d4: e28dd004 add sp, sp, #4 ; 0x4 214d8: e8bd8000 pop {pc} the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 214dc: e2800014 add r0, r0, #20 ; 0x14 214e0: e3a02001 mov r2, #1 ; 0x1 214e4: ebff9d2d bl 89a0 <_CORE_mutex_Flush> 214e8: eafffff7 b 214cc 214ec: 0005a640 .word 0x0005a640 0001488c : */ void rtems_shutdown_executive( uint32_t result ) { 1488c: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 14890: e59f2028 ldr r2, [pc, #40] ; 148c0 14894: e5923000 ldr r3, [r2] 14898: e3530004 cmp r3, #4 ; 0x4 */ void rtems_shutdown_executive( uint32_t result ) { 1489c: e24dd030 sub sp, sp, #48 ; 0x30 if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 148a0: 0a000004 beq 148b8 148a4: e3a03004 mov 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 ); 148a8: e1a0000d mov r0, sp 148ac: e59f1010 ldr r1, [pc, #16] ; 148c4 148b0: e5823000 str r3, [r2] 148b4: ebffcd79 bl 7ea0 <_CPU_Context_switch> _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 148b8: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED 148bc: e8bd8000 pop {pc} <== NOT EXECUTED 148c0: 000170b4 .word 0x000170b4 148c4: 00016edc .word 0x00016edc 00005990 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 5990: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 5994: e2518000 subs r8, r1, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 5998: e1a06000 mov r6, r0 599c: e24dd004 sub sp, sp, #4 ; 0x4 59a0: e1a05002 mov r5, r2 59a4: e1a07003 mov r7, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 59a8: 03a0000a moveq r0, #10 ; 0xa 59ac: 0a000020 beq 5a34 return RTEMS_INVALID_NUMBER; if ( !routine ) 59b0: e3520000 cmp r2, #0 ; 0x0 59b4: 03a00009 moveq r0, #9 ; 0x9 59b8: 0a00001d beq 5a34 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 59bc: e59f0088 ldr r0, [pc, #136] ; 5a4c 59c0: e1a01006 mov r1, r6 59c4: e1a0200d mov r2, sp 59c8: eb0004f4 bl 6da0 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59cc: e59d3000 ldr r3, [sp] 59d0: e3530000 cmp r3, #0 ; 0x0 59d4: e1a04000 mov r4, r0 59d8: 13a00004 movne r0, #4 ; 0x4 59dc: 1a000014 bne 5a34 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 59e0: e284a010 add sl, r4, #16 ; 0x10 59e4: e1a0000a mov r0, sl 59e8: eb000c31 bl 8ab4 <_Watchdog_Remove> _ISR_Disable( level ); 59ec: e10f2000 mrs r2, CPSR 59f0: e38230c0 orr r3, r2, #192 ; 0xc0 59f4: 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 ) { 59f8: e5943018 ldr r3, [r4, #24] 59fc: e3530000 cmp r3, #0 ; 0x0 5a00: 1a00000d bne 5a3c Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5a04: e5843018 str r3, [r4, #24] the_watchdog->routine = routine; 5a08: e584502c str r5, [r4, #44] the_watchdog->id = id; 5a0c: e5846030 str r6, [r4, #48] the_watchdog->user_data = user_data; 5a10: e5847034 str r7, [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; 5a14: e5843038 str r3, [r4, #56] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 5a18: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 5a1c: e59f002c ldr r0, [pc, #44] ; 5a50 5a20: e1a0100a mov r1, sl Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 5a24: e584801c str r8, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 5a28: eb000bb2 bl 88f8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 5a2c: eb0006fc bl 7624 <_Thread_Enable_dispatch> 5a30: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5a34: e28dd004 add sp, sp, #4 ; 0x4 5a38: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * 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 ) { _ISR_Enable( level ); 5a3c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED _Thread_Enable_dispatch(); 5a40: eb0006f7 bl 7624 <_Thread_Enable_dispatch> <== NOT EXECUTED 5a44: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 5a48: eafffff9 b 5a34 <== NOT EXECUTED 5a4c: 000158c4 .word 0x000158c4 5a50: 00015444 .word 0x00015444 000129a4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 129a4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 129a8: e3500000 cmp r0, #0 ; 0x0 129ac: e24dd010 sub sp, sp, #16 ; 0x10 129b0: e1a07001 mov r7, r1 129b4: e1a06002 mov r6, r2 129b8: 1a000002 bne 129c8 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 129bc: e3a00013 mov r0, #19 ; 0x13 } return status; } 129c0: e28dd010 add sp, sp, #16 ; 0x10 129c4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 129c8: e59f3144 ldr r3, [pc, #324] ; 12b14 129cc: e5d32000 ldrb r2, [r3] 129d0: e1500002 cmp r0, r2 129d4: 8a00004a bhi 12b04 129d8: e1a08000 mov r8, r0 <== NOT EXECUTED 129dc: e59f3134 ldr r3, [pc, #308] ; 12b18 129e0: e5932000 ldr r2, [r3] 129e4: e2822001 add r2, r2, #1 ; 0x1 129e8: e5832000 str r2, [r3] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 129ec: e59fa128 ldr sl, [pc, #296] ; 12b1c 129f0: e5da5000 ldrb r5, [sl] initialized = true; 129f4: e3a03001 mov r3, #1 ; 0x1 129f8: e5ca3000 strb r3, [sl] _Thread_Enable_dispatch(); 129fc: eb000c02 bl 15a0c <_Thread_Enable_dispatch> if ( tmpInitialized ) 12a00: e3550000 cmp r5, #0 ; 0x0 12a04: 13a0000e movne r0, #14 ; 0xe 12a08: 1affffec bne 129c0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12a0c: e59f410c ldr r4, [pc, #268] ; 12b20 12a10: e284c004 add ip, r4, #4 ; 0x4 12a14: e584c000 str ip, [r4] * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 12a18: e386e902 orr lr, r6, #32768 ; 0x8000 12a1c: e28dc00c add ip, sp, #12 ; 0xc the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 12a20: e5844008 str r4, [r4, #8] 12a24: e1a01008 mov r1, r8 12a28: e58de000 str lr, [sp] 12a2c: e58dc004 str ip, [sp, #4] 12a30: e1a02007 mov r2, r7 12a34: e59f00e8 ldr r0, [pc, #232] ; 12b24 12a38: e3a03c01 mov r3, #256 ; 0x100 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 12a3c: e5845004 str r5, [r4, #4] 12a40: ebfffc60 bl 11bc8 /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 12a44: e3500000 cmp r0, #0 ; 0x0 initialized = false; 12a48: 15ca5000 strbne r5, [sl] /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 12a4c: 1affffdb bne 129c0 * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 12a50: e59d200c ldr r2, [sp, #12] RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 12a54: e59fc0cc ldr ip, [pc, #204] ; 12b28 12a58: e1a03802 lsl r3, r2, #16 12a5c: e58d2008 str r2, [sp, #8] 12a60: e1dc21b0 ldrh r2, [ip, #16] 12a64: e1a01823 lsr r1, r3, #16 12a68: e1520001 cmp r2, r1 12a6c: 259c301c ldrcs r3, [ip, #28] 12a70: 27939101 ldrcs r9, [r3, r1, lsl #2] the_watchdog->routine = routine; 12a74: e59f30b0 ldr r3, [pc, #176] ; 12b2c 12a78: 31a09000 movcc r9, r0 12a7c: e5893064 str r3, [r9, #100] /* * Initialize the pointer to the timer reset method so applications * that do not use the Timer Server do not have to pull it in. */ _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; 12a80: e59fe0a8 ldr lr, [pc, #168] ; 12b30 12a84: e59f30a8 ldr r3, [pc, #168] ; 12b34 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12a88: e59f40a8 ldr r4, [pc, #168] ; 12b38 the_watchdog->id = id; 12a8c: e59f50a8 ldr r5, [pc, #168] ; 12b3c 12a90: e59d2008 ldr r2, [sp, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12a94: e59f60a4 ldr r6, [pc, #164] ; 12b40 12a98: e583e000 str lr, [r3] * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 12a9c: e59fc0a0 ldr ip, [pc, #160] ; 12b44 the_watchdog->routine = routine; 12aa0: e59f3084 ldr r3, [pc, #132] ; 12b2c the_chain->permanent_null = NULL; 12aa4: e3a0b000 mov fp, #0 ; 0x0 _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; /* * Start the timer server */ status = rtems_task_start( 12aa8: e1a00002 mov r0, r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12aac: e2847004 add r7, r4, #4 ; 0x4 12ab0: e2858004 add r8, r5, #4 ; 0x4 the_watchdog->id = id; 12ab4: e5892068 str r2, [r9, #104] the_watchdog->user_data = user_data; 12ab8: e589b06c str fp, [r9, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12abc: e589b050 str fp, [r9, #80] 12ac0: e59f1080 ldr r1, [pc, #128] ; 12b48 12ac4: e1a0200b mov r2, fp * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 12ac8: e58c9000 str r9, [ip] 12acc: e5847000 str r7, [r4] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 12ad0: e5844008 str r4, [r4, #8] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12ad4: e5858000 str r8, [r5] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 12ad8: e5855008 str r5, [r5, #8] the_watchdog->routine = routine; 12adc: e586301c str r3, [r6, #28] the_watchdog->id = id; the_watchdog->user_data = user_data; 12ae0: e586b024 str fp, [r6, #36] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 12ae4: e584b004 str fp, [r4, #4] 12ae8: e585b004 str fp, [r5, #4] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12aec: e586b008 str fp, [r6, #8] the_watchdog->routine = routine; the_watchdog->id = id; 12af0: e5860020 str r0, [r6, #32] _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; /* * Start the timer server */ status = rtems_task_start( 12af4: ebfffd8e bl 12134 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 12af8: e3500000 cmp r0, #0 ; 0x0 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 12afc: 15cab000 strbne fp, [sl] 12b00: eaffffae b 129c0 * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 12b04: e3700001 cmn r0, #1 ; 0x1 12b08: 03a08000 moveq r8, #0 ; 0x0 12b0c: 0affffb2 beq 129dc 12b10: eaffffa9 b 129bc 12b14: 000260d0 .word 0x000260d0 12b18: 000327cc .word 0x000327cc 12b1c: 0002e26c .word 0x0002e26c 12b20: 00032734 .word 0x00032734 12b24: 54494d45 .word 0x54494d45 12b28: 000326d4 .word 0x000326d4 12b2c: 00015874 .word 0x00015874 12b30: 00012b4c .word 0x00012b4c 12b34: 000330fc .word 0x000330fc 12b38: 00032714 .word 0x00032714 12b3c: 00032728 .word 0x00032728 12b40: 00032740 .word 0x00032740 12b44: 00033100 .word 0x00033100 12b48: 00012bfc .word 0x00012bfc 000126ec : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 126ec: e92d4030 push {r4, r5, lr} 126f0: e24dd004 sub sp, sp, #4 ; 0x4 126f4: e1a01000 mov r1, r0 126f8: e1a0200d mov r2, sp 126fc: e59f00a8 ldr r0, [pc, #168] ; 127ac 12700: eb000a7c bl 150f8 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 12704: e59d3000 ldr r3, [sp] 12708: e3530000 cmp r3, #0 ; 0x0 1270c: e1a04000 mov r4, r0 12710: 13a00004 movne r0, #4 ; 0x4 12714: 1a00000a bne 12744 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 12718: e5943038 ldr r3, [r4, #56] 1271c: e3530004 cmp r3, #4 ; 0x4 12720: 979ff103 ldrls pc, [pc, r3, lsl #2] 12724: ea000011 b 12770 <== NOT EXECUTED 12728: 00012788 .word 0x00012788 <== NOT EXECUTED 1272c: 0001274c .word 0x0001274c <== NOT EXECUTED 12730: 0001277c .word 0x0001277c <== NOT EXECUTED 12734: 0001277c .word 0x0001277c <== NOT EXECUTED 12738: 0001277c .word 0x0001277c <== NOT EXECUTED _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { _Thread_Enable_dispatch(); 1273c: eb000cb2 bl 15a0c <_Thread_Enable_dispatch> <== NOT EXECUTED 12740: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12744: e28dd004 add sp, sp, #4 ; 0x4 12748: e8bd8030 pop {r4, r5, pc} case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 1274c: e59f505c ldr r5, [pc, #92] ; 127b0 <== NOT EXECUTED 12750: e5953000 ldr r3, [r5] <== NOT EXECUTED 12754: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 12758: 0afffff7 beq 1273c <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 1275c: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED 12760: eb0012e3 bl 172f4 <_Watchdog_Remove> <== NOT EXECUTED (*_Timer_Server_schedule_operation)( the_timer ); 12764: e1a00004 mov r0, r4 <== NOT EXECUTED 12768: e1a0e00f mov lr, pc <== NOT EXECUTED 1276c: e595f000 ldr pc, [r5] <== NOT EXECUTED case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 12770: eb000ca5 bl 15a0c <_Thread_Enable_dispatch> <== NOT EXECUTED 12774: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 12778: eafffff1 b 12744 <== NOT EXECUTED (*_Timer_Server_schedule_operation)( the_timer ); break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 1277c: eb000ca2 bl 15a0c <_Thread_Enable_dispatch> 12780: e3a0000b mov r0, #11 ; 0xb 12784: eaffffee b 12744 switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 12788: e2844010 add r4, r4, #16 ; 0x10 1278c: e1a00004 mov r0, r4 12790: eb0012d7 bl 172f4 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 12794: e59f0018 ldr r0, [pc, #24] ; 127b4 12798: e1a01004 mov r1, r4 1279c: eb001265 bl 17138 <_Watchdog_Insert> case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 127a0: eb000c99 bl 15a0c <_Thread_Enable_dispatch> 127a4: e3a00000 mov r0, #0 ; 0x0 127a8: eaffffe5 b 12744 127ac: 000330bc .word 0x000330bc 127b0: 000330fc .word 0x000330fc 127b4: 000328a4 .word 0x000328a4 000127b8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 127b8: e92d41f0 push {r4, r5, r6, r7, r8, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 127bc: e59fc0d0 ldr ip, [pc, #208] ; 12894 127c0: e59c4000 ldr r4, [ip] 127c4: e3540000 cmp r4, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 127c8: e1a07000 mov r7, r0 127cc: e24dd004 sub sp, sp, #4 ; 0x4 127d0: e1a06001 mov r6, r1 127d4: e1a05002 mov r5, r2 127d8: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 127dc: 03a0000e moveq r0, #14 ; 0xe 127e0: 0a000005 beq 127fc return RTEMS_INCORRECT_STATE; if ( !routine ) 127e4: e3520000 cmp r2, #0 ; 0x0 127e8: 03a00009 moveq r0, #9 ; 0x9 127ec: 0a000002 beq 127fc return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 127f0: e3510000 cmp r1, #0 ; 0x0 127f4: 03a0000a moveq r0, #10 ; 0xa 127f8: 1a000001 bne 12804 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 127fc: e28dd004 add sp, sp, #4 ; 0x4 12800: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 12804: e59f008c ldr r0, [pc, #140] ; 12898 12808: e1a01007 mov r1, r7 1280c: e1a0200d mov r2, sp 12810: eb000a38 bl 150f8 <_Objects_Get> if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 12814: e59d3000 ldr r3, [sp] 12818: e3530000 cmp r3, #0 ; 0x0 1281c: e1a04000 mov r4, r0 12820: 13a00004 movne r0, #4 ; 0x4 12824: 1afffff4 bne 127fc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 12828: e2840010 add r0, r4, #16 ; 0x10 1282c: eb0012b0 bl 172f4 <_Watchdog_Remove> _ISR_Disable( level ); 12830: e10f1000 mrs r1, CPSR 12834: e38130c0 orr r3, r1, #192 ; 0xc0 12838: 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 ) { 1283c: e5942018 ldr r2, [r4, #24] 12840: e3520000 cmp r2, #0 ; 0x0 12844: 1a00000e bne 12884 /* * 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; 12848: e3a03001 mov r3, #1 ; 0x1 1284c: e5843038 str r3, [r4, #56] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12850: e5842018 str r2, [r4, #24] the_watchdog->routine = routine; 12854: e584502c str r5, [r4, #44] the_watchdog->id = id; 12858: e5847030 str r7, [r4, #48] the_watchdog->user_data = user_data; 1285c: e5848034 str r8, [r4, #52] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 12860: e584601c str r6, [r4, #28] _ISR_Enable( level ); 12864: 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 ); 12868: e59f302c ldr r3, [pc, #44] ; 1289c 1286c: e1a00004 mov r0, r4 12870: e1a0e00f mov lr, pc 12874: e593f000 ldr pc, [r3] _Thread_Enable_dispatch(); 12878: eb000c63 bl 15a0c <_Thread_Enable_dispatch> 1287c: e3a00000 mov r0, #0 ; 0x0 12880: eaffffdd b 127fc * 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 ) { _ISR_Enable( level ); 12884: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_Enable_dispatch(); 12888: eb000c5f bl 15a0c <_Thread_Enable_dispatch> <== NOT EXECUTED 1288c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 12890: eaffffd9 b 127fc <== NOT EXECUTED 12894: 00033100 .word 0x00033100 12898: 000330bc .word 0x000330bc 1289c: 000330fc .word 0x000330fc 000128a0 : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 128a0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 128a4: e59fc0e4 ldr ip, [pc, #228] ; 12990 128a8: e59c4000 ldr r4, [ip] 128ac: e3540000 cmp r4, #0 ; 0x0 Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 128b0: e1a06000 mov r6, r0 128b4: e24dd004 sub sp, sp, #4 ; 0x4 128b8: e1a04001 mov r4, r1 128bc: e1a05002 mov r5, r2 128c0: e1a0a003 mov sl, r3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 128c4: 03a0000e moveq r0, #14 ; 0xe 128c8: 0a00000c beq 12900 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 128cc: e59f30c0 ldr r3, [pc, #192] ; 12994 128d0: e5d32000 ldrb r2, [r3] 128d4: e3520000 cmp r2, #0 ; 0x0 128d8: 03a0000b moveq r0, #11 ; 0xb 128dc: 0a000007 beq 12900 return RTEMS_NOT_DEFINED; if ( !routine ) 128e0: e3550000 cmp r5, #0 ; 0x0 128e4: 03a00009 moveq r0, #9 ; 0x9 128e8: 0a000004 beq 12900 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 128ec: e1a00001 mov r0, r1 128f0: ebfff458 bl fa58 <_TOD_Validate> 128f4: e3500000 cmp r0, #0 ; 0x0 128f8: 1a000002 bne 12908 */ (*_Timer_Server_schedule_operation)( the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 128fc: e3a00014 mov r0, #20 ; 0x14 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12900: e28dd004 add sp, sp, #4 ; 0x4 12904: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 12908: e1a00004 mov r0, r4 1290c: ebfff417 bl f970 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch ) 12910: e59f9080 ldr r9, [pc, #128] ; 12998 12914: e5993000 ldr r3, [r9] 12918: e1500003 cmp r0, r3 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 1291c: e1a08000 mov r8, r0 if ( seconds <= _TOD_Seconds_since_epoch ) 12920: 9afffff5 bls 128fc 12924: e59f0070 ldr r0, [pc, #112] ; 1299c 12928: e1a01006 mov r1, r6 1292c: e1a0200d mov r2, sp 12930: eb0009f0 bl 150f8 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 12934: e59d7000 ldr r7, [sp] 12938: e3570000 cmp r7, #0 ; 0x0 1293c: e1a04000 mov r4, r0 12940: 13a00004 movne r0, #4 ; 0x4 12944: 1affffed bne 12900 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 12948: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED 1294c: eb001268 bl 172f4 <_Watchdog_Remove> <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 12950: e5846030 str r6, [r4, #48] <== NOT EXECUTED the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 12954: e5993000 ldr r3, [r9] <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 12958: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 1295c: e0633008 rsb r3, r3, r8 <== NOT EXECUTED /* * _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 ); 12960: e1a00004 mov r0, r4 <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 12964: e5842038 str r2, [r4, #56] <== NOT EXECUTED _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 12968: e584301c str r3, [r4, #28] <== NOT EXECUTED Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 1296c: e584502c str r5, [r4, #44] <== NOT EXECUTED /* * _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 ); 12970: e59f3028 ldr r3, [pc, #40] ; 129a0 <== NOT EXECUTED the_watchdog->id = id; the_watchdog->user_data = user_data; 12974: e584a034 str sl, [r4, #52] <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12978: e5847018 str r7, [r4, #24] <== NOT EXECUTED 1297c: e1a0e00f mov lr, pc <== NOT EXECUTED 12980: e593f000 ldr pc, [r3] <== NOT EXECUTED _Thread_Enable_dispatch(); 12984: eb000c20 bl 15a0c <_Thread_Enable_dispatch> <== NOT EXECUTED 12988: e1a00007 mov r0, r7 <== NOT EXECUTED 1298c: eaffffdb b 12900 <== NOT EXECUTED 12990: 00033100 .word 0x00033100 12994: 000327dc .word 0x000327dc 12998: 00032854 .word 0x00032854 1299c: 000330bc .word 0x000330bc 129a0: 000330fc .word 0x000330fc 0000563c : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 563c: e92d4010 push {r4, lr} void *ptr; /* * check the arguments */ if ( !pointer ) 5640: e2514000 subs r4, r1, #0 ; 0x0 5644: 0a000001 beq 5650 return false; if ( !bytes ) 5648: e3500000 cmp r0, #0 ; 0x0 564c: 1a000001 bne 5658 ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) return false; *pointer = ptr; return true; 5650: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 5654: e8bd8010 pop {r4, pc} <== NOT EXECUTED return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 5658: e1a01000 mov r1, r0 565c: e59f0014 ldr r0, [pc, #20] ; 5678 5660: eb000570 bl 6c28 <_Protected_heap_Allocate> if (!ptr) 5664: e3500000 cmp r0, #0 ; 0x0 return false; *pointer = ptr; 5668: 15840000 strne r0, [r4] 566c: 13a00001 movne r0, #1 ; 0x1 /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 5670: 18bd8010 popne {r4, pc} 5674: eafffff5 b 5650 <== NOT EXECUTED 5678: 0001bb6c .word 0x0001bb6c 0000562c : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 562c: e1a01000 mov r1, r0 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 5630: e59f0000 ldr r0, [pc, #0] ; 5638 <== NOT EXECUTED 5634: ea00058a b 6c64 <_Protected_heap_Free> <== NOT EXECUTED 5638: 0001bb6c .word 0x0001bb6c 00006ddc : */ int sem_destroy( sem_t *sem ) { 6ddc: e92d4010 push {r4, lr} 6de0: e24dd004 sub sp, sp, #4 ; 0x4 6de4: e5901000 ldr r1, [r0] 6de8: e1a0200d mov r2, sp 6dec: e59f0058 ldr r0, [pc, #88] ; 6e4c 6df0: eb0008c6 bl 9110 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 6df4: e59d3000 ldr r3, [sp] 6df8: e3530000 cmp r3, #0 ; 0x0 6dfc: 0a000005 beq 6e18 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 6e00: eb002286 bl f820 <__errno> 6e04: e3a03016 mov r3, #22 ; 0x16 6e08: e5803000 str r3, [r0] 6e0c: e3e00000 mvn r0, #0 ; 0x0 } 6e10: e28dd004 add sp, sp, #4 ; 0x4 6e14: e8bd8010 pop {r4, pc} case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 6e18: e5d04014 ldrb r4, [r0, #20] 6e1c: e3540000 cmp r4, #0 ; 0x0 6e20: 1a000003 bne 6e34 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 6e24: eb0019fa bl d614 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 6e28: eb000ad9 bl 9994 <_Thread_Enable_dispatch> 6e2c: e1a00004 mov r0, r4 6e30: eafffff6 b 6e10 /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { _Thread_Enable_dispatch(); 6e34: eb000ad6 bl 9994 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 6e38: eb002278 bl f820 <__errno> <== NOT EXECUTED 6e3c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 6e40: e5803000 str r3, [r0] <== NOT EXECUTED 6e44: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 6e48: eafffff0 b 6e10 <== NOT EXECUTED 6e4c: 0001d620 .word 0x0001d620 00006eac : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 6eac: e92d4010 push {r4, lr} int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 6eb0: e2504000 subs r4, r0, #0 ; 0x0 int sem_init( sem_t *sem, int pshared, unsigned int value ) { 6eb4: e24dd004 sub sp, sp, #4 ; 0x4 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 6eb8: 0a000008 beq 6ee0 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 6ebc: e1a0300d mov r3, sp 6ec0: e3a00000 mov r0, #0 ; 0x0 6ec4: eb001990 bl d50c <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 6ec8: e3700001 cmn r0, #1 ; 0x1 *sem = the_semaphore->Object.id; 6ecc: 159d3000 ldrne r3, [sp] 6ed0: 15932008 ldrne r2, [r3, #8] 6ed4: 15842000 strne r2, [r4] return status; } 6ed8: e28dd004 add sp, sp, #4 ; 0x4 6edc: e8bd8010 pop {r4, pc} { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 6ee0: eb00224e bl f820 <__errno> <== NOT EXECUTED 6ee4: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 6ee8: e5803000 str r3, [r0] <== NOT EXECUTED 6eec: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 6ef0: eafffff8 b 6ed8 <== NOT EXECUTED 00007050 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 7050: e92d4010 push {r4, lr} 7054: e24dd004 sub sp, sp, #4 ; 0x4 7058: e1a04000 mov r4, r0 * 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 ); 705c: e1a00001 mov r0, r1 7060: e1a0100d mov r1, sp 7064: eb0016c4 bl cb7c <_POSIX_Absolute_timeout_to_ticks> switch ( status ) { 7068: e3500002 cmp r0, #2 ; 0x2 706c: 9a000005 bls 7088 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 7070: e1a00004 mov r0, r4 7074: e3a01001 mov r1, #1 ; 0x1 7078: e59d2000 ldr r2, [sp] 707c: eb001999 bl d6e8 <_POSIX_Semaphore_Wait_support> break; } } return lock_status; } 7080: e28dd004 add sp, sp, #4 ; 0x4 7084: e8bd8010 pop {r4, pc} case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 7088: e1a00004 mov r0, r4 <== NOT EXECUTED 708c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 7090: e59d2000 ldr r2, [sp] <== NOT EXECUTED 7094: eb001993 bl d6e8 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 7098: eafffff8 b 7080 <== NOT EXECUTED 00006d5c : int sigwait( const sigset_t *set, int *sig ) { 6d5c: e92d4010 push {r4, lr} 6d60: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 6d64: e3a01000 mov r1, #0 ; 0x0 6d68: e1a02001 mov r2, r1 6d6c: ebffff8c bl 6ba4 if ( status != -1 ) { 6d70: e3700001 cmn r0, #1 ; 0x1 6d74: 0a000004 beq 6d8c if ( sig ) 6d78: e3540000 cmp r4, #0 ; 0x0 *sig = status; 6d7c: 15840000 strne r0, [r4] int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 6d80: 01a00004 moveq r0, r4 *sig = status; 6d84: 13a00000 movne r0, #0 ; 0x0 6d88: e8bd8010 pop {r4, pc} return 0; } return errno; 6d8c: eb0020ee bl f14c <__errno> <== NOT EXECUTED 6d90: e5900000 ldr r0, [r0] <== NOT EXECUTED } 6d94: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00005afc : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 5afc: e92d41f0 push {r4, r5, r6, r7, r8, lr} Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 5b00: e2524000 subs r4, r2, #0 ; 0x0 timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 5b04: e24dd018 sub sp, sp, #24 ; 0x18 5b08: e1a05000 mov r5, r0 5b0c: e1a0c001 mov ip, r1 5b10: e1a06003 mov r6, r3 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 5b14: 0a00003b beq 5c08 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 ) || 5b18: e3e02331 mvn r2, #-1006632960 ; 0xc4000000 5b1c: e2422865 sub r2, r2, #6619136 ; 0x650000 5b20: e594300c ldr r3, [r4, #12] 5b24: e2422c36 sub r2, r2, #13824 ; 0x3600 5b28: e1530002 cmp r3, r2 5b2c: 8a000035 bhi 5c08 5b30: e5943004 ldr r3, [r4, #4] 5b34: e1530002 cmp r3, r2 5b38: 8a000032 bhi 5c08 5b3c: e3530000 cmp r3, #0 ; 0x0 5b40: ba000030 blt 5c08 ( 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 ) { 5b44: e3510004 cmp r1, #4 ; 0x4 5b48: 13510000 cmpne r1, #0 ; 0x0 5b4c: 1a00002d bne 5c08 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 5b50: e894000f ldm r4, {r0, r1, r2, r3} 5b54: e28d7004 add r7, sp, #4 ; 0x4 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 5b58: e35c0004 cmp ip, #4 ; 0x4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 5b5c: e887000f stm r7, {r0, r1, r2, r3} /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 5b60: 0a00003c beq 5c58 5b64: e1a01005 mov r1, r5 5b68: e59f0120 ldr r0, [pc, #288] ; 5c90 5b6c: e28d2014 add r2, sp, #20 ; 0x14 5b70: eb000860 bl 7cf8 <_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 ) { 5b74: e59d3014 ldr r3, [sp, #20] 5b78: e3530000 cmp r3, #0 ; 0x0 5b7c: e1a05000 mov r5, r0 5b80: 1a000020 bne 5c08 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 ) { 5b84: e59d300c ldr r3, [sp, #12] 5b88: e3530000 cmp r3, #0 ; 0x0 5b8c: 1a000002 bne 5b9c 5b90: e59d3010 ldr r3, [sp, #16] 5b94: e3530000 cmp r3, #0 ; 0x0 5b98: 0a000020 beq 5c20 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 5b9c: e1a00004 mov r0, r4 5ba0: eb000e71 bl 956c <_Timespec_To_ticks> 5ba4: e5850064 str r0, [r5, #100] initial_period = _Timespec_To_ticks( &normalize.it_value ); 5ba8: e28d000c add r0, sp, #12 ; 0xc 5bac: eb000e6e bl 956c <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 5bb0: e5952008 ldr r2, [r5, #8] 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 ); 5bb4: e1a01000 mov r1, r0 activated = _POSIX_Timer_Insert_helper( 5bb8: e59f30d4 ldr r3, [pc, #212] ; 5c94 5bbc: e2850010 add r0, r5, #16 ; 0x10 5bc0: e58d5000 str r5, [sp] 5bc4: eb001961 bl c150 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 5bc8: e2504000 subs r4, r0, #0 ; 0x0 5bcc: 0a00002c beq 5c84 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 5bd0: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 5bd4: 1285c054 addne ip, r5, #84 ; 0x54 5bd8: 189c000f ldmne ip, {r0, r1, r2, r3} 5bdc: 1886000f stmne r6, {r0, r1, r2, r3} ptimer->timer_data = normalize; 5be0: e897000f ldm r7, {r0, r1, r2, r3} 5be4: 0285c054 addeq ip, r5, #84 ; 0x54 5be8: e88c000f stm ip, {r0, r1, r2, r3} /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 5bec: e3a03003 mov r3, #3 ; 0x3 _TOD_Get( &ptimer->time ); 5bf0: e285006c add r0, r5, #108 ; 0x6c if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 5bf4: e5c5303c strb r3, [r5, #60] _TOD_Get( &ptimer->time ); 5bf8: eb0005ff bl 73fc <_TOD_Get> _Thread_Enable_dispatch(); 5bfc: eb000a5e bl 857c <_Thread_Enable_dispatch> 5c00: e3a00000 mov r0, #0 ; 0x0 5c04: ea000003 b 5c18 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 5c08: eb0020f4 bl dfe0 <__errno> 5c0c: e3a03016 mov r3, #22 ; 0x16 5c10: e5803000 str r3, [r0] 5c14: e3e00000 mvn r0, #0 ; 0x0 } 5c18: e28dd018 add sp, sp, #24 ; 0x18 5c1c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 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 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 5c20: e2800010 add r0, r0, #16 ; 0x10 5c24: eb000f93 bl 9a78 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 5c28: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 5c2c: 1285c054 addne ip, r5, #84 ; 0x54 5c30: 189c000f ldmne ip, {r0, r1, r2, r3} 5c34: 1886000f stmne r6, {r0, r1, r2, r3} /* The new data are set */ ptimer->timer_data = normalize; 5c38: e897000f ldm r7, {r0, r1, r2, r3} 5c3c: 0285c054 addeq ip, r5, #84 ; 0x54 5c40: e88c000f stm ip, {r0, r1, r2, r3} /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 5c44: e3a03004 mov r3, #4 ; 0x4 5c48: e5c5303c strb r3, [r5, #60] /* Returns with success */ _Thread_Enable_dispatch(); 5c4c: eb000a4a bl 857c <_Thread_Enable_dispatch> 5c50: e3a00000 mov r0, #0 ; 0x0 5c54: eaffffef b 5c18 normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 5c58: e28d800c add r8, sp, #12 ; 0xc 5c5c: e59f0034 ldr r0, [pc, #52] ; 5c98 5c60: e1a01008 mov r1, r8 5c64: eb000e1a bl 94d4 <_Timespec_Greater_than> 5c68: e3500000 cmp r0, #0 ; 0x0 5c6c: 1affffe5 bne 5c08 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 5c70: e1a01008 mov r1, r8 5c74: e59f001c ldr r0, [pc, #28] ; 5c98 5c78: e1a02008 mov r2, r8 5c7c: eb000e21 bl 9508 <_Timespec_Subtract> 5c80: eaffffb7 b 5b64 ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 5c84: eb000a3c bl 857c <_Thread_Enable_dispatch> <== NOT EXECUTED 5c88: e1a00004 mov r0, r4 <== NOT EXECUTED 5c8c: eaffffe1 b 5c18 <== NOT EXECUTED 5c90: 0001bc20 .word 0x0001bc20 5c94: 00005c9c .word 0x00005c9c 5c98: 0001b9d4 .word 0x0001b9d4 00004454 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 4454: e92d4070 push {r4, r5, r6, lr} /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 4458: e59f6108 ldr r6, [pc, #264] ; 4568 445c: e596201c ldr r2, [r6, #28] 4460: e3520000 cmp r2, #0 ; 0x0 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 4464: e24dd008 sub sp, sp, #8 ; 0x8 4468: e1a04000 mov r4, r0 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 446c: 0a000036 beq 454c _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 4470: e1a00006 mov r0, r6 <== NOT EXECUTED 4474: eb000fd5 bl 83d0 <_Watchdog_Remove> <== NOT EXECUTED 4478: e2400002 sub r0, r0, #2 ; 0x2 <== NOT EXECUTED 447c: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED 4480: 83a05000 movhi r5, #0 ; 0x0 <== NOT EXECUTED 4484: 9a00001b bls 44f8 <== NOT EXECUTED /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 4488: e3540000 cmp r4, #0 ; 0x0 448c: 0a000016 beq 44ec Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4490: e59f30d4 ldr r3, [pc, #212] ; 456c 4494: e0812493 umull r2, r1, r3, r4 4498: e1a01921 lsr r1, r1, #18 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 449c: e1a02401 lsl r2, r1, #8 44a0: e0422181 sub r2, r2, r1, lsl #3 44a4: e1a03302 lsl r3, r2, #6 44a8: e0623003 rsb r3, r2, r3 44ac: e0833001 add r3, r3, r1 44b0: e0443303 sub r3, r4, r3, lsl #6 44b4: e1a02383 lsl r2, r3, #7 44b8: e0422103 sub r2, r2, r3, lsl #2 44bc: e0822003 add r2, r2, r3 44c0: e1a02182 lsl r2, r2, #3 ticks = _Timespec_To_ticks( &tp ); 44c4: e1a0000d mov r0, sp * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 44c8: e88d0006 stm sp, {r1, r2} tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 44cc: eb000e5c bl 7e44 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 44d0: e1a0000d mov r0, sp 44d4: eb000e5a bl 7e44 <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44d8: e59f1088 ldr r1, [pc, #136] ; 4568 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 44dc: e586000c str r0, [r6, #12] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44e0: e59f0088 ldr r0, [pc, #136] ; 4570 if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 44e4: e1a0400d mov r4, sp 44e8: eb000f49 bl 8214 <_Watchdog_Insert> _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 44ec: e1a00005 mov r0, r5 44f0: e28dd008 add sp, sp, #8 ; 0x8 44f4: e8bd8070 pop {r4, r5, r6, pc} * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 44f8: e596300c ldr r3, [r6, #12] <== NOT EXECUTED 44fc: e2860014 add r0, r6, #20 ; 0x14 <== NOT EXECUTED 4500: e8900005 ldm r0, {r0, r2} <== NOT EXECUTED 4504: e0800003 add r0, r0, r3 <== NOT EXECUTED /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 4508: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 450c: e1a0100d mov r1, sp <== NOT EXECUTED 4510: eb000e1e bl 7d90 <_Timespec_From_ticks> <== NOT EXECUTED remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; remaining += tp.tv_nsec / 1000; 4514: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 4518: e59f3054 ldr r3, [pc, #84] ; 4574 <== NOT EXECUTED 451c: e0cc2093 smull r2, ip, r3, r0 <== NOT EXECUTED ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4520: e59d1000 ldr r1, [sp] <== NOT EXECUTED 4524: e1a02401 lsl r2, r1, #8 <== NOT EXECUTED 4528: e0422181 sub r2, r2, r1, lsl #3 <== NOT EXECUTED 452c: e1a03302 lsl r3, r2, #6 <== NOT EXECUTED 4530: e0623003 rsb r3, r2, r3 <== NOT EXECUTED 4534: e0833001 add r3, r3, r1 <== NOT EXECUTED remaining += tp.tv_nsec / 1000; 4538: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED 453c: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4540: e1a03303 lsl r3, r3, #6 <== NOT EXECUTED remaining += tp.tv_nsec / 1000; 4544: e0805003 add r5, r0, r3 <== NOT EXECUTED 4548: eaffffce b 4488 <== NOT EXECUTED Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 454c: e59f3024 ldr r3, [pc, #36] ; 4578 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4550: e5862008 str r2, [r6, #8] the_watchdog->routine = routine; 4554: e586301c str r3, [r6, #28] the_watchdog->id = id; 4558: e5862020 str r2, [r6, #32] the_watchdog->user_data = user_data; 455c: e5862024 str r2, [r6, #36] 4560: e1a05002 mov r5, r2 4564: eaffffc7 b 4488 4568: 0001472c .word 0x0001472c 456c: 431bde83 .word 0x431bde83 4570: 00014904 .word 0x00014904 4574: 10624dd3 .word 0x10624dd3 4578: 0000457c .word 0x0000457c