RTEMS 4.10.2Annotated Report
Tue Dec 13 19:52:42 2011
00000448 <_Barrier_Manager_initialization>:
#include <rtems/score/object.h>
#include <rtems/rtems/barrier.h>
void _Barrier_Manager_initialization(void)
{
}
448: e12fff1e bx lr
0000044c <_Dual_ported_memory_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/dpmem.h>
void _Dual_ported_memory_Manager_initialization(void)
{
}
44c: e12fff1e bx lr
00000450 <_Event_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Event_Manager_initialization(void)
{
}
450: e12fff1e bx lr
0000046c <_Extension_Manager_initialization>:
#include <rtems/extension.h>
#include <rtems/score/interr.h>
void _Extension_Manager_initialization(void)
{
}
46c: e12fff1e bx lr
00000454 <_Message_queue_Manager_initialization>:
#include <rtems/score/wkspace.h>
#include <rtems/score/interr.h>
void _Message_queue_Manager_initialization(void)
{
}
454: e12fff1e bx lr
000061b4 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
61b4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr}
61b8: e1a04001 mov r4, r1
61bc: e1a06000 mov r6, r0
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
61c0: e1a0100d mov r1, sp
61c4: e1a00004 mov r0, r4
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
61c8: e1a08002 mov r8, r2
61cc: e20370ff and r7, r3, #255 ; 0xff
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
61d0: eb00006f bl 6394 <_POSIX_Mutex_Get>
61d4: e3500000 cmp r0, #0
61d8: 0a000032 beq 62a8 <_POSIX_Condition_variables_Wait_support+0xf4>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
61dc: e59f30d0 ldr r3, [pc, #208] ; 62b4 <_POSIX_Condition_variables_Wait_support+0x100>
61e0: e5932000 ldr r2, [r3]
61e4: e2422001 sub r2, r2, #1
61e8: e5832000 str r2, [r3]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
61ec: e1a0100d mov r1, sp
61f0: e1a00006 mov r0, r6
61f4: ebffff7c bl 5fec <_POSIX_Condition_variables_Get>
switch ( location ) {
61f8: e59d3000 ldr r3, [sp]
61fc: e3530000 cmp r3, #0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
6200: e1a0a000 mov sl, r0
switch ( location ) {
6204: 1a000027 bne 62a8 <_POSIX_Condition_variables_Wait_support+0xf4>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
6208: e5903014 ldr r3, [r0, #20]
620c: e3530000 cmp r3, #0
6210: 0a000004 beq 6228 <_POSIX_Condition_variables_Wait_support+0x74>
6214: e5942000 ldr r2, [r4]
6218: e1530002 cmp r3, r2
621c: 0a000001 beq 6228 <_POSIX_Condition_variables_Wait_support+0x74>
_Thread_Enable_dispatch();
6220: eb000bff bl 9224 <_Thread_Enable_dispatch>
6224: ea00001f b 62a8 <_POSIX_Condition_variables_Wait_support+0xf4>
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
6228: e1a00004 mov r0, r4
622c: eb0000de bl 65ac <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
6230: e3570000 cmp r7, #0
6234: 1a000015 bne 6290 <_POSIX_Condition_variables_Wait_support+0xdc>
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
6238: e59f5078 ldr r5, [pc, #120] ; 62b8 <_POSIX_Condition_variables_Wait_support+0x104>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
623c: e5942000 ldr r2, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
6240: e5953000 ldr r3, [r5]
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
6244: e58a2014 str r2, [sl, #20]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
6248: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
624c: e5961000 ldr r1, [r6]
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
6250: e28a2018 add r2, sl, #24
_Thread_Executing->Wait.id = *cond;
6254: e5831020 str r1, [r3, #32]
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
6258: e3a01001 mov r1, #1
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;
625c: e5832044 str r2, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
6260: e1a00002 mov r0, r2
6264: e58a1048 str r1, [sl, #72] ; 0x48
6268: e59f204c ldr r2, [pc, #76] ; 62bc <_POSIX_Condition_variables_Wait_support+0x108>
626c: e1a01008 mov r1, r8
6270: eb000d24 bl 9708 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
6274: eb000bea bl 9224 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
6278: e5953000 ldr r3, [r5]
627c: e5935034 ldr r5, [r3, #52] ; 0x34
if ( status && status != ETIMEDOUT )
6280: e3550074 cmp r5, #116 ; 0x74
6284: 13550000 cmpne r5, #0
6288: 0a000002 beq 6298 <_POSIX_Condition_variables_Wait_support+0xe4>
628c: ea000006 b 62ac <_POSIX_Condition_variables_Wait_support+0xf8><== NOT EXECUTED
return status;
} else {
_Thread_Enable_dispatch();
6290: eb000be3 bl 9224 <_Thread_Enable_dispatch>
6294: e3a05074 mov r5, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
6298: e1a00004 mov r0, r4
629c: eb0000a3 bl 6530 <pthread_mutex_lock>
if ( mutex_status )
62a0: e3500000 cmp r0, #0
62a4: 0a000000 beq 62ac <_POSIX_Condition_variables_Wait_support+0xf8>
62a8: e3a05016 mov r5, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
62ac: e1a00005 mov r0, r5
62b0: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
0000d924 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
d924: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
d928: e5906008 ldr r6, [r0, #8]
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
d92c: e1a08c26 lsr r8, r6, #24
d930: e2088007 and r8, r8, #7
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
d934: e1a06806 lsl r6, r6, #16
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
d938: e59f7074 ldr r7, [pc, #116] ; d9b4 <_POSIX_Keys_Run_destructors+0x90>
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
d93c: e1a06726 lsr r6, r6, #14
d940: e2888005 add r8, r8, #5
if ( value != NULL ) {
key->Values [ thread_api ][ thread_index ] = NULL;
d944: e3a05000 mov r5, #0
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
d948: e3a04001 mov r4, #1
d94c: e1d7a1b0 ldrh sl, [r7, #16]
d950: e1a01004 mov r1, r4
done = true;
for ( index = 1 ; index <= max ; ++index ) {
d954: ea000011 b d9a0 <_POSIX_Keys_Run_destructors+0x7c>
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
d958: e597301c ldr r3, [r7, #28]
d95c: e7932104 ldr r2, [r3, r4, lsl #2]
if ( key != NULL && key->destructor != NULL ) {
d960: e3520000 cmp r2, #0
d964: 0a00000a beq d994 <_POSIX_Keys_Run_destructors+0x70>
d968: e5923010 ldr r3, [r2, #16]
d96c: e3530000 cmp r3, #0
d970: 0a000007 beq d994 <_POSIX_Keys_Run_destructors+0x70>
void *value = key->Values [ thread_api ][ thread_index ];
d974: e7922108 ldr r2, [r2, r8, lsl #2]
d978: e7920006 ldr r0, [r2, r6]
if ( value != NULL ) {
d97c: e3500000 cmp r0, #0
d980: 0a000003 beq d994 <_POSIX_Keys_Run_destructors+0x70>
key->Values [ thread_api ][ thread_index ] = NULL;
d984: e7825006 str r5, [r2, r6] <== NOT EXECUTED
(*key->destructor)( value );
d988: e1a0e00f mov lr, pc <== NOT EXECUTED
d98c: e12fff13 bx r3 <== NOT EXECUTED
d990: e1a01005 mov r1, r5 <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
d994: e2844001 add r4, r4, #1
d998: e1a04804 lsl r4, r4, #16
d99c: e1a04824 lsr r4, r4, #16
d9a0: e154000a cmp r4, sl
d9a4: 9affffeb bls d958 <_POSIX_Keys_Run_destructors+0x34>
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
d9a8: e3510000 cmp r1, #0
d9ac: 0affffe5 beq d948 <_POSIX_Keys_Run_destructors+0x24>
done = false;
}
}
}
}
}
d9b0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
0000ad7c <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
ad7c: e92d40f0 push {r4, r5, r6, r7, lr}
api = deleted->API_Extensions[ THREAD_API_POSIX ];
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
ad80: e1a00001 mov r0, r1
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
ad84: e1a04001 mov r4, r1
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
ad88: e5915108 ldr r5, [r1, #264] ; 0x108
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
ad8c: eb000acc bl d8c4 <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
ad90: e1a00004 mov r0, r4
ad94: eb000ae2 bl d924 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
ad98: e2857040 add r7, r5, #64 ; 0x40
_POSIX_Keys_Run_destructors( deleted );
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
ad9c: e5946028 ldr r6, [r4, #40] ; 0x28
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
ada0: ea000001 b adac <_POSIX_Threads_Delete_extension+0x30>
*(void **)the_thread->Wait.return_argument = value_ptr;
ada4: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
ada8: e5836000 str r6, [r3] <== NOT EXECUTED
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
adac: e1a00007 mov r0, r7
adb0: ebfff1bc bl 74a8 <_Thread_queue_Dequeue>
adb4: e3500000 cmp r0, #0
adb8: 1afffff9 bne ada4 <_POSIX_Threads_Delete_extension+0x28>
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
adbc: e5953080 ldr r3, [r5, #128] ; 0x80
adc0: e3530004 cmp r3, #4
(void) _Watchdog_Remove( &api->Sporadic_timer );
adc4: 028500a4 addeq r0, r5, #164 ; 0xa4
adc8: 0bfff53f bleq 82cc <_Watchdog_Remove>
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
adcc: e3a03000 mov r3, #0
(void) _Workspace_Free( api );
add0: e1a00005 mov r0, r5
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
add4: e5843108 str r3, [r4, #264] ; 0x108
(void) _Workspace_Free( api );
}
add8: e8bd40f0 pop {r4, r5, r6, r7, lr}
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
(void) _Workspace_Free( api );
addc: eafff59a b 844c <_Workspace_Free>
00000458 <_Partition_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Partition_Manager_initialization(void)
{
}
458: e12fff1e bx lr
00000468 <_Rate_monotonic_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/ratemon.h>
void _Rate_monotonic_Manager_initialization(void)
{
}
468: e12fff1e bx lr
0000045c <_Region_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Region_Manager_initialization(void)
{
}
45c: e12fff1e bx lr
000076b0 <_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
)
{
76b0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
76b4: e5913014 ldr r3, [r1, #20]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
76b8: e281503c add r5, r1, #60 ; 0x3c
76bc: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
76c0: e3a05000 mov r5, #0
the_chain->last = _Chain_Head(the_chain);
76c4: e281c038 add ip, r1, #56 ; 0x38
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 ) )
76c8: e3130020 tst r3, #32
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
76cc: e1a04323 lsr r4, r3, #6
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
76d0: e581503c str r5, [r1, #60] ; 0x3c
76d4: e285500c add r5, r5, #12
the_chain->last = _Chain_Head(the_chain);
76d8: e581c040 str ip, [r1, #64] ; 0x40
block_state = the_thread_queue->state;
76dc: e5907038 ldr r7, [r0, #56] ; 0x38
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
76e0: e02c0495 mla ip, r5, r4, r0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
76e4: 159f8154 ldrne r8, [pc, #340] ; 7840 <_Thread_queue_Enqueue_priority+0x190>
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 ) )
76e8: 1a000023 bne 777c <_Thread_queue_Enqueue_priority+0xcc>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
76ec: e28c8004 add r8, ip, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
76f0: e10f5000 mrs r5, CPSR
76f4: e3854080 orr r4, r5, #128 ; 0x80
76f8: e129f004 msr CPSR_fc, r4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
76fc: e3e06000 mvn r6, #0
7700: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
7704: ea00000b b 7738 <_Thread_queue_Enqueue_priority+0x88>
search_priority = search_thread->current_priority;
7708: e5946014 ldr r6, [r4, #20]
if ( priority <= search_priority )
770c: e1530006 cmp r3, r6
7710: 9a00000a bls 7740 <_Thread_queue_Enqueue_priority+0x90>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7714: e10fa000 mrs sl, CPSR
7718: e129f005 msr CPSR_fc, r5
771c: e129f00a msr CPSR_fc, sl
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
7720: e594a010 ldr sl, [r4, #16]
7724: e117000a tst r7, sl
7728: 1a000001 bne 7734 <_Thread_queue_Enqueue_priority+0x84>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
772c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
7730: eaffffee b 76f0 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
7734: e5944000 ldr r4, [r4]
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
7738: e1540008 cmp r4, r8
773c: 1afffff1 bne 7708 <_Thread_queue_Enqueue_priority+0x58>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
7740: e590c030 ldr ip, [r0, #48] ; 0x30
7744: e35c0001 cmp ip, #1
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 ) ) {
7748: e1a0c005 mov ip, r5
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
774c: 1a000038 bne 7834 <_Thread_queue_Enqueue_priority+0x184>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
7750: e1530006 cmp r3, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7754: e3a03000 mov r3, #0
7758: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
775c: 0a00002a beq 780c <_Thread_queue_Enqueue_priority+0x15c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
7760: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7764: e5814000 str r4, [r1]
the_node->previous = previous_node;
7768: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
776c: e5810044 str r0, [r1, #68] ; 0x44
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;
7770: e5831000 str r1, [r3]
search_node->previous = the_node;
7774: e5841004 str r1, [r4, #4]
7778: ea000021 b 7804 <_Thread_queue_Enqueue_priority+0x154>
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
777c: e5d86000 ldrb r6, [r8]
7780: e2866001 add r6, r6, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
7784: e10f5000 mrs r5, CPSR
7788: e3854080 orr r4, r5, #128 ; 0x80
778c: e129f004 msr CPSR_fc, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
7790: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7794: ea00000b b 77c8 <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
7798: e5946014 ldr r6, [r4, #20]
if ( priority >= search_priority )
779c: e1530006 cmp r3, r6
77a0: 2a00000a bcs 77d0 <_Thread_queue_Enqueue_priority+0x120>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
77a4: e10fa000 mrs sl, CPSR
77a8: e129f005 msr CPSR_fc, r5
77ac: e129f00a msr CPSR_fc, sl
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
77b0: e594a010 ldr sl, [r4, #16]
77b4: e117000a tst r7, sl
77b8: 1a000001 bne 77c4 <_Thread_queue_Enqueue_priority+0x114>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
77bc: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
77c0: eaffffed b 777c <_Thread_queue_Enqueue_priority+0xcc> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
77c4: e5944004 ldr r4, [r4, #4]
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
77c8: e154000c cmp r4, ip
77cc: 1afffff1 bne 7798 <_Thread_queue_Enqueue_priority+0xe8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
77d0: e590c030 ldr ip, [r0, #48] ; 0x30
77d4: e35c0001 cmp ip, #1
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 ) ) {
77d8: e1a0c005 mov ip, r5
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
77dc: 1a000014 bne 7834 <_Thread_queue_Enqueue_priority+0x184>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
77e0: e1530006 cmp r3, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
77e4: e3a03000 mov r3, #0
77e8: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
77ec: 0a000006 beq 780c <_Thread_queue_Enqueue_priority+0x15c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
77f0: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
77f4: e8810018 stm r1, {r3, r4}
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
77f8: e5810044 str r0, [r1, #68] ; 0x44
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;
77fc: e5841000 str r1, [r4]
next_node->previous = the_node;
7800: e5831004 str r1, [r3, #4]
7804: e129f005 msr CPSR_fc, r5
7808: ea000007 b 782c <_Thread_queue_Enqueue_priority+0x17c>
780c: e284403c add r4, r4, #60 ; 0x3c
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
7810: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7814: e5814000 str r4, [r1]
the_node->previous = previous_node;
7818: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
781c: e5810044 str r0, [r1, #68] ; 0x44
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;
7820: e5831000 str r1, [r3]
search_node->previous = the_node;
7824: e5841004 str r1, [r4, #4]
7828: e129f00c msr CPSR_fc, ip
782c: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
7830: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
7834: e582c000 str ip, [r2]
return the_thread_queue->sync_state;
7838: e5900030 ldr r0, [r0, #48] ; 0x30
}
783c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00000464 <_Timer_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/timer.h>
void _Timer_Manager_initialization(void)
{
}
464: e12fff1e bx lr
00015138 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
15138: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
1513c: e24dd020 sub sp, sp, #32
15140: e28d3014 add r3, sp, #20
15144: e28d5008 add r5, sp, #8
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
15148: e3a09000 mov r9, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1514c: e283a004 add sl, r3, #4
15150: e2858004 add r8, r5, #4
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
15154: e58d301c str r3, [sp, #28]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
15158: e2802008 add r2, r0, #8
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
1515c: e2803040 add r3, r0, #64 ; 0x40
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
15160: e58da014 str sl, [sp, #20]
the_chain->permanent_null = NULL;
15164: e58d9018 str r9, [sp, #24]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
15168: e58d8008 str r8, [sp, #8]
the_chain->permanent_null = NULL;
1516c: e58d900c str r9, [sp, #12]
the_chain->last = _Chain_Head(the_chain);
15170: e58d5010 str r5, [sp, #16]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
15174: e58d2004 str r2, [sp, #4]
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
15178: e58d3000 str r3, [sp]
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
1517c: e1a04000 mov r4, r0
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
15180: e280b030 add fp, r0, #48 ; 0x30
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
15184: e2807068 add r7, r0, #104 ; 0x68
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
15188: e28d2014 add r2, sp, #20
1518c: e5842078 str r2, [r4, #120] ; 0x78
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
15190: e59f2168 ldr r2, [pc, #360] ; 15300 <_Timer_server_Body+0x1c8>
15194: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
15198: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1519c: e1a02005 mov r2, r5
151a0: e0611003 rsb r1, r1, r3
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
151a4: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
151a8: e1a0000b mov r0, fp
151ac: eb001060 bl 19334 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
151b0: e59f314c ldr r3, [pc, #332] ; 15304 <_Timer_server_Body+0x1cc>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
151b4: e5942074 ldr r2, [r4, #116] ; 0x74
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
151b8: e5936000 ldr r6, [r3]
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
151bc: e1560002 cmp r6, r2
151c0: 9a000004 bls 151d8 <_Timer_server_Body+0xa0>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
151c4: e0621006 rsb r1, r2, r6
151c8: e1a00007 mov r0, r7
151cc: e1a02005 mov r2, r5
151d0: eb001057 bl 19334 <_Watchdog_Adjust_to_chain>
151d4: ea000003 b 151e8 <_Timer_server_Body+0xb0>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
151d8: 30662002 rsbcc r2, r6, r2
151dc: 31a00007 movcc r0, r7
151e0: 33a01001 movcc r1, #1
151e4: 3b00102a blcc 19294 <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
151e8: e5846074 str r6, [r4, #116] ; 0x74
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
151ec: e5940078 ldr r0, [r4, #120] ; 0x78
151f0: eb000234 bl 15ac8 <_Chain_Get>
if ( timer == NULL ) {
151f4: e2501000 subs r1, r0, #0
151f8: 0a00000a beq 15228 <_Timer_server_Body+0xf0>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
151fc: e5913038 ldr r3, [r1, #56] ; 0x38
15200: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
15204: 02811010 addeq r1, r1, #16
15208: 01a0000b moveq r0, fp
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
1520c: 0a000003 beq 15220 <_Timer_server_Body+0xe8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
15210: e3530003 cmp r3, #3
15214: 1afffff4 bne 151ec <_Timer_server_Body+0xb4>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
15218: e2811010 add r1, r1, #16
1521c: e1a00007 mov r0, r7
15220: eb001070 bl 193e8 <_Watchdog_Insert>
15224: eafffff0 b 151ec <_Timer_server_Body+0xb4>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
15228: e10f3000 mrs r3, CPSR
1522c: e3832080 orr r2, r3, #128 ; 0x80
15230: e129f002 msr CPSR_fc, r2
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
15234: e59d2014 ldr r2, [sp, #20]
15238: e152000a cmp r2, sl
1523c: 1a000005 bne 15258 <_Timer_server_Body+0x120>
ts->insert_chain = NULL;
15240: e5841078 str r1, [r4, #120] ; 0x78
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
15244: e129f003 msr CPSR_fc, r3
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
15248: e59d3008 ldr r3, [sp, #8]
1524c: e1530008 cmp r3, r8
15250: 1a000002 bne 15260 <_Timer_server_Body+0x128>
15254: ea000015 b 152b0 <_Timer_server_Body+0x178>
15258: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
1525c: eaffffcb b 15190 <_Timer_server_Body+0x58> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
15260: e10f2000 mrs r2, CPSR
15264: e3823080 orr r3, r2, #128 ; 0x80
15268: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
1526c: e59d3008 ldr r3, [sp, #8]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
15270: e1530008 cmp r3, r8
15274: 0a00000b beq 152a8 <_Timer_server_Body+0x170>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
15278: e5931000 ldr r1, [r3]
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
1527c: e3530000 cmp r3, #0
the_chain->first = new_first;
15280: e58d1008 str r1, [sp, #8]
new_first->previous = _Chain_Head(the_chain);
15284: e5815004 str r5, [r1, #4]
15288: 0a000006 beq 152a8 <_Timer_server_Body+0x170>
watchdog->state = WATCHDOG_INACTIVE;
1528c: e5839008 str r9, [r3, #8]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
15290: e129f002 msr CPSR_fc, r2
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
15294: e2830020 add r0, r3, #32
15298: e8900003 ldm r0, {r0, r1}
1529c: e1a0e00f mov lr, pc
152a0: e593f01c ldr pc, [r3, #28]
}
152a4: eaffffed b 15260 <_Timer_server_Body+0x128>
152a8: e129f002 msr CPSR_fc, r2
152ac: eaffffb5 b 15188 <_Timer_server_Body+0x50>
} else {
ts->active = false;
152b0: e5c4907c strb r9, [r4, #124] ; 0x7c
152b4: e59f304c ldr r3, [pc, #76] ; 15308 <_Timer_server_Body+0x1d0>
152b8: e5932000 ldr r2, [r3]
152bc: e2822001 add r2, r2, #1
152c0: e5832000 str r2, [r3]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
152c4: e3a01008 mov r1, #8
152c8: e5940000 ldr r0, [r4]
152cc: eb000d95 bl 18928 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
152d0: e1a00004 mov r0, r4
152d4: ebffff6b bl 15088 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
152d8: e1a00004 mov r0, r4
152dc: ebffff7f bl 150e0 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
152e0: eb000af7 bl 17ec4 <_Thread_Enable_dispatch>
ts->active = true;
152e4: e3a03001 mov r3, #1
152e8: e5c4307c strb r3, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
152ec: e59d0004 ldr r0, [sp, #4]
152f0: eb001094 bl 19548 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
152f4: e59d0000 ldr r0, [sp]
152f8: eb001092 bl 19548 <_Watchdog_Remove>
152fc: eaffffa1 b 15188 <_Timer_server_Body+0x50>
0000d9b8 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
d9b8: e92d47f7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, lr}
d9bc: e1a05000 mov r5, r0
d9c0: e1a04001 mov r4, r1
d9c4: e1a06002 mov r6, r2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
d9c8: ebfff279 bl a3b4 <getpid>
d9cc: e1550000 cmp r5, r0
d9d0: 0a000002 beq d9e0 <killinfo+0x28>
rtems_set_errno_and_return_minus_one( ESRCH );
d9d4: eb000342 bl e6e4 <__errno> <== NOT EXECUTED
d9d8: e3a03003 mov r3, #3 <== NOT EXECUTED
d9dc: ea000003 b d9f0 <killinfo+0x38> <== NOT EXECUTED
/*
* Validate the signal passed.
*/
if ( !sig )
d9e0: e3540000 cmp r4, #0
d9e4: 1a000004 bne d9fc <killinfo+0x44>
rtems_set_errno_and_return_minus_one( EINVAL );
d9e8: eb00033d bl e6e4 <__errno> <== NOT EXECUTED
d9ec: e3a03016 mov r3, #22 <== NOT EXECUTED
d9f0: e5803000 str r3, [r0]
d9f4: e3e00000 mvn r0, #0
d9f8: ea000081 b dc04 <killinfo+0x24c>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
d9fc: e2443001 sub r3, r4, #1
if ( !is_valid_signo(sig) )
da00: e353001f cmp r3, #31
da04: 8afffff7 bhi d9e8 <killinfo+0x30>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
da08: e59f11f8 ldr r1, [pc, #504] ; dc08 <killinfo+0x250>
da0c: e3a0000c mov r0, #12
da10: e0221490 mla r2, r0, r4, r1
da14: e5922008 ldr r2, [r2, #8]
da18: e3520001 cmp r2, #1
da1c: 0a000077 beq dc00 <killinfo+0x248>
/*
* 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 ) )
da20: e3540008 cmp r4, #8
da24: 13540004 cmpne r4, #4
da28: 0a000001 beq da34 <killinfo+0x7c>
da2c: e354000b cmp r4, #11
da30: 1a000003 bne da44 <killinfo+0x8c>
return pthread_kill( pthread_self(), sig );
da34: eb0001bf bl e138 <pthread_self>
da38: e1a01004 mov r1, r4
da3c: eb000187 bl e060 <pthread_kill>
da40: ea00006f b dc04 <killinfo+0x24c>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
da44: e3a05001 mov r5, #1
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
da48: e88d0030 stm sp, {r4, r5}
if ( !value ) {
da4c: e3560000 cmp r6, #0
da50: e1a05315 lsl r5, r5, r3
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
da54: 15963000 ldrne r3, [r6]
da58: 158d3008 strne r3, [sp, #8]
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
da5c: e59f31a8 ldr r3, [pc, #424] ; dc0c <killinfo+0x254>
da60: e5932000 ldr r2, [r3]
da64: e2822001 add r2, r2, #1
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
da68: 058d6008 streq r6, [sp, #8]
da6c: e5832000 str r2, [r3]
/*
* 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;
da70: e59f3198 ldr r3, [pc, #408] ; dc10 <killinfo+0x258>
da74: e5930000 ldr r0, [r3]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
da78: e5903108 ldr r3, [r0, #264] ; 0x108
da7c: e59330cc ldr r3, [r3, #204] ; 0xcc
da80: e1d53003 bics r3, r5, r3
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
da84: 059f2188 ldreq r2, [pc, #392] ; dc14 <killinfo+0x25c>
da88: 04923004 ldreq r3, [r2], #4
* 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;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
da8c: 0a000009 beq dab8 <killinfo+0x100>
da90: ea00003a b db80 <killinfo+0x1c8>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
da94: e5931030 ldr r1, [r3, #48] ; 0x30
da98: e1150001 tst r5, r1
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
da9c: e1a00003 mov r0, r3
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
daa0: e5931108 ldr r1, [r3, #264] ; 0x108
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
daa4: 1a000035 bne db80 <killinfo+0x1c8>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
daa8: e59110cc ldr r1, [r1, #204] ; 0xcc
daac: e1d51001 bics r1, r5, r1
dab0: 1a000032 bne db80 <killinfo+0x1c8>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
dab4: e5933000 ldr r3, [r3]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
dab8: e1530002 cmp r3, r2
dabc: 1afffff4 bne da94 <killinfo+0xdc>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
dac0: e59f3150 ldr r3, [pc, #336] ; dc18 <killinfo+0x260>
dac4: e5d31000 ldrb r1, [r3]
dac8: e59f314c ldr r3, [pc, #332] ; dc1c <killinfo+0x264>
dacc: e2811001 add r1, r1, #1
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
dad0: e283800c add r8, r3, #12
dad4: e3a00000 mov r0, #0
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
dad8: e5932008 ldr r2, [r3, #8]
dadc: e3520000 cmp r2, #0
dae0: 0a000021 beq db6c <killinfo+0x1b4>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
dae4: e5922004 ldr r2, [r2, #4]
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
dae8: e3a0c001 mov ip, #1
daec: e592901c ldr r9, [r2, #28]
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
daf0: e1d2a1b0 ldrh sl, [r2, #16]
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
daf4: ea00001a b db64 <killinfo+0x1ac>
the_thread = (Thread_Control *) object_table[ index ];
daf8: e799210c ldr r2, [r9, ip, lsl #2]
if ( !the_thread )
dafc: e3520000 cmp r2, #0
db00: 0a000012 beq db50 <killinfo+0x198>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
db04: e592e014 ldr lr, [r2, #20]
db08: e15e0001 cmp lr, r1
db0c: 8a00000f bhi db50 <killinfo+0x198>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
db10: e5926108 ldr r6, [r2, #264] ; 0x108
db14: e59660cc ldr r6, [r6, #204] ; 0xcc
db18: e1d56006 bics r6, r5, r6
db1c: 0a00000b beq db50 <killinfo+0x198>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
db20: e15e0001 cmp lr, r1
db24: 3a00000b bcc db58 <killinfo+0x1a0>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
db28: e5907010 ldr r7, [r0, #16]
db2c: e3570000 cmp r7, #0
db30: 0a000006 beq db50 <killinfo+0x198>
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
db34: e5926010 ldr r6, [r2, #16]
db38: e3560000 cmp r6, #0
db3c: 0a000005 beq db58 <killinfo+0x1a0>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
db40: e3170201 tst r7, #268435456 ; 0x10000000
db44: 1a000001 bne db50 <killinfo+0x198>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
db48: e3160201 tst r6, #268435456 ; 0x10000000
db4c: 1a000001 bne db58 <killinfo+0x1a0>
db50: e1a0e001 mov lr, r1
db54: ea000000 b db5c <killinfo+0x1a4>
db58: e1a00002 mov r0, r2
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
db5c: e28cc001 add ip, ip, #1
db60: e1a0100e mov r1, lr
db64: e15c000a cmp ip, sl
db68: 9affffe2 bls daf8 <killinfo+0x140>
db6c: e2833004 add r3, r3, #4
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
db70: e1530008 cmp r3, r8
db74: 1affffd7 bne dad8 <killinfo+0x120>
}
}
}
}
if ( interested ) {
db78: e3500000 cmp r0, #0
db7c: 0a000006 beq db9c <killinfo+0x1e4>
* thread needs to do the post context switch extension so it can
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
db80: e3a03001 mov r3, #1
db84: e5c03074 strb r3, [r0, #116] ; 0x74
/*
* 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 ) ) {
db88: e1a01004 mov r1, r4
db8c: e1a0200d mov r2, sp
db90: eb0000a7 bl de34 <_POSIX_signals_Unblock_thread>
db94: e3500000 cmp r0, #0
db98: 1a000017 bne dbfc <killinfo+0x244>
/*
* 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 );
db9c: e1a00005 mov r0, r5
dba0: eb000092 bl ddf0 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
dba4: e3a0300c mov r3, #12
dba8: e0050493 mul r5, r3, r4
dbac: e59f3054 ldr r3, [pc, #84] ; dc08 <killinfo+0x250>
dbb0: e7933005 ldr r3, [r3, r5]
dbb4: e3530002 cmp r3, #2
dbb8: 1a00000f bne dbfc <killinfo+0x244>
psiginfo = (POSIX_signals_Siginfo_node *)
dbbc: e59f005c ldr r0, [pc, #92] ; dc20 <killinfo+0x268>
dbc0: ebffdfc7 bl 5ae4 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
dbc4: e250c000 subs ip, r0, #0
dbc8: 1a000003 bne dbdc <killinfo+0x224>
_Thread_Enable_dispatch();
dbcc: ebffe556 bl 712c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
dbd0: eb0002c3 bl e6e4 <__errno>
dbd4: e3a0300b mov r3, #11
dbd8: eaffff84 b d9f0 <killinfo+0x38>
}
psiginfo->Info = *siginfo;
dbdc: e1a0300d mov r3, sp
dbe0: e8930007 ldm r3, {r0, r1, r2}
dbe4: e28c3008 add r3, ip, #8
dbe8: e8830007 stm r3, {r0, r1, r2}
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
dbec: e59f0030 ldr r0, [pc, #48] ; dc24 <killinfo+0x26c>
dbf0: e1a0100c mov r1, ip
dbf4: e0800005 add r0, r0, r5
dbf8: ebffdfa5 bl 5a94 <_Chain_Append>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
dbfc: ebffe54a bl 712c <_Thread_Enable_dispatch>
dc00: e3a00000 mov r0, #0
return 0;
}
dc04: e8bd87fe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc}
0000e060 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
e060: e92d41f1 push {r0, r4, r5, r6, r7, r8, lr}
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
e064: e2517000 subs r7, r1, #0
e068: 0a000002 beq e078 <pthread_kill+0x18>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
e06c: e2478001 sub r8, r7, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
e070: e358001f cmp r8, #31
e074: 9a000002 bls e084 <pthread_kill+0x24>
rtems_set_errno_and_return_minus_one( EINVAL );
e078: eb000199 bl e6e4 <__errno>
e07c: e3a03016 mov r3, #22
e080: ea000025 b e11c <pthread_kill+0xbc>
the_thread = _Thread_Get( thread, &location );
e084: e1a0100d mov r1, sp
e088: ebffe430 bl 7150 <_Thread_Get>
switch ( location ) {
e08c: e59d6000 ldr r6, [sp]
e090: e3560000 cmp r6, #0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
e094: e1a05000 mov r5, r0
switch ( location ) {
e098: 1a00001d bne e114 <pthread_kill+0xb4>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
e09c: e59f2084 ldr r2, [pc, #132] ; e128 <pthread_kill+0xc8>
e0a0: e3a0100c mov r1, #12
e0a4: e0232791 mla r3, r1, r7, r2
e0a8: e5933008 ldr r3, [r3, #8]
e0ac: e3530001 cmp r3, #1
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
e0b0: e5903108 ldr r3, [r0, #264] ; 0x108
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
e0b4: 1a000002 bne e0c4 <pthread_kill+0x64>
_Thread_Enable_dispatch();
e0b8: ebffe41b bl 712c <_Thread_Enable_dispatch> <== NOT EXECUTED
e0bc: e1a00006 mov r0, r6 <== NOT EXECUTED
return 0;
e0c0: ea000017 b e124 <pthread_kill+0xc4> <== NOT EXECUTED
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
e0c4: e59320d0 ldr r2, [r3, #208] ; 0xd0
e0c8: e3a04001 mov r4, #1
e0cc: e1828814 orr r8, r2, r4, lsl r8
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
e0d0: e1a01007 mov r1, r7
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
e0d4: e58380d0 str r8, [r3, #208] ; 0xd0
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
e0d8: e1a02006 mov r2, r6
e0dc: ebffff54 bl de34 <_POSIX_signals_Unblock_thread>
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
e0e0: e59f3044 ldr r3, [pc, #68] ; e12c <pthread_kill+0xcc>
e0e4: e5933000 ldr r3, [r3]
e0e8: e3530000 cmp r3, #0
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
the_thread->do_post_task_switch_extension = true;
e0ec: e5c54074 strb r4, [r5, #116] ; 0x74
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
e0f0: 0a000004 beq e108 <pthread_kill+0xa8>
e0f4: e59f3034 ldr r3, [pc, #52] ; e130 <pthread_kill+0xd0>
e0f8: e5933000 ldr r3, [r3]
e0fc: e1550003 cmp r5, r3
_ISR_Signals_to_thread_executing = true;
e100: 059f302c ldreq r3, [pc, #44] ; e134 <pthread_kill+0xd4>
e104: 05c34000 strbeq r4, [r3]
}
_Thread_Enable_dispatch();
e108: ebffe407 bl 712c <_Thread_Enable_dispatch>
e10c: e3a00000 mov r0, #0
return 0;
e110: ea000003 b e124 <pthread_kill+0xc4>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
e114: eb000172 bl e6e4 <__errno> <== NOT EXECUTED
e118: e3a03003 mov r3, #3 <== NOT EXECUTED
e11c: e5803000 str r3, [r0]
e120: e3e00000 mvn r0, #0
}
e124: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc}