RTEMS-6
Annotated Report
posix
Mon Mar 1 00:14:18 2021
0000000040025400 <_POSIX_Condition_variables_Wait_support>:
int _POSIX_Condition_variables_Wait_support(
pthread_cond_t *cond,
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
40025400: a9b97bfd stp x29, x30, [sp, #-112]!
40025404: 910003fd mov x29, sp
40025408: a90153f3 stp x19, x20, [sp, #16]
Thread_queue_Context queue_context;
int error;
Thread_Control *executing;
the_cond = _POSIX_Condition_variables_Get( cond );
POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags );
4002540c: b4000760 cbz x0, 400254f8 <_POSIX_Condition_variables_Wait_support+0xf8>
40025410: a9025bf5 stp x21, x22, [sp, #32]
40025414: aa0103f4 mov x20, x1
40025418: aa0203f5 mov x21, x2
4002541c: f9400016 ldr x22, [x0]
40025420: d2963fc2 mov x2, #0xb1fe // #45566
40025424: f2a31be2 movk x2, #0x18df, lsl #16
40025428: aa0003f3 mov x19, x0
4002542c: ca160001 eor x1, x0, x22
40025430: ca020021 eor x1, x1, x2
40025434: f27ff83f tst x1, #0xfffffffffffffffe
40025438: 54000581 b.ne 400254e8 <_POSIX_Condition_variables_Wait_support+0xe8> // b.any
_Thread_queue_Context_initialize( &queue_context );
if ( abstime != NULL ) {
4002543c: b4000795 cbz x21, 4002552c <_POSIX_Condition_variables_Wait_support+0x12c>
queue_context->enqueue_callout = enqueue_callout;
40025440: 90000000 adrp x0, 40025000 <pthread_condattr_destroy+0x10>
40025444: 910ec001 add x1, x0, #0x3b0
40025448: f24002df tst x22, #0x1
4002544c: 90000000 adrp x0, 40025000 <pthread_condattr_destroy+0x10>
40025450: 910c8000 add x0, x0, #0x320
40025454: 9a810000 csel x0, x0, x1, eq // eq = none
queue_context->Timeout.arg = arg;
40025458: a903d7e0 stp x0, x21, [sp, #56]
__asm__ volatile (
4002545c: d53b4221 mrs x1, daif
40025460: d50342df msr daifset, #0x2
}
executing = _POSIX_Condition_variables_Acquire( the_cond, &queue_context );
if (
the_cond->mutex != POSIX_CONDITION_VARIABLES_NO_MUTEX
40025464: f9401660 ldr x0, [x19, #40]
40025468: b90033e1 str w1, [sp, #48]
&& the_cond->mutex != mutex
4002546c: f100001f cmp x0, #0x0
40025470: fa541004 ccmp x0, x20, #0x4, ne // ne = any
40025474: 540004c1 b.ne 4002550c <_POSIX_Condition_variables_Wait_support+0x10c> // b.any
40025478: f00006e0 adrp x0, 40104000 <_Thread_Objects+0x150>
4002547c: f9433015 ldr x21, [x0, #1632]
queue_context->thread_state = thread_state;
40025480: 52800404 mov w4, #0x20 // #32
) {
_POSIX_Condition_variables_Release( the_cond, &queue_context );
return EINVAL;
}
the_cond->mutex = mutex;
40025484: f9001674 str x20, [x19, #40]
_Thread_queue_Context_set_thread_state(
&queue_context,
STATES_WAITING_FOR_CONDITION_VARIABLE
);
_Thread_queue_Enqueue(
40025488: 91004260 add x0, x19, #0x10
4002548c: aa1503e2 mov x2, x21
40025490: 9100c3e3 add x3, sp, #0x30
40025494: 900000a1 adrp x1, 40039000 <rtems_filesystem_table+0x18>
40025498: 911fa021 add x1, x1, #0x7e8
4002549c: b90037e4 str w4, [sp, #52]
400254a0: 94000ad0 bl 40027fe0 <_Thread_queue_Enqueue>
return _POSIX_Get_by_name_error_table[ error ];
}
RTEMS_INLINE_ROUTINE int _POSIX_Get_error( Status_Control status )
{
return STATUS_GET_POSIX( status );
400254a4: b9408ea0 ldr w0, [x21, #140]
400254a8: 7100001f cmp w0, #0x0
400254ac: 1103fc13 add w19, w0, #0xff
400254b0: 1a80b273 csel w19, w19, w0, lt // lt = tstop
400254b4: 13087e73 asr w19, w19, #8
* according to the POSIX standard. It means that pthread_cond_wait
* returns a success status, except for the fact that it was not
* woken up a pthread_cond_signal() or a pthread_cond_broadcast().
*/
if ( error == EINTR ) {
400254b8: 7100127f cmp w19, #0x4
400254bc: 54000400 b.eq 4002553c <_POSIX_Condition_variables_Wait_support+0x13c> // b.none<== NEVER TAKEN
/*
* When we get here the dispatch disable level is 0.
*/
if ( error != EPERM ) {
400254c0: 7100067f cmp w19, #0x1
400254c4: 54000400 b.eq 40025544 <_POSIX_Condition_variables_Wait_support+0x144> // b.none
int mutex_error;
mutex_error = pthread_mutex_lock( mutex );
400254c8: aa1403e0 mov x0, x20
400254cc: 94000091 bl 40025710 <pthread_mutex_lock>
if ( mutex_error != 0 ) {
400254d0: a9425bf5 ldp x21, x22, [sp, #32]
400254d4: 35000120 cbnz w0, 400254f8 <_POSIX_Condition_variables_Wait_support+0xf8>
error = EINVAL;
}
}
return error;
}
400254d8: 2a1303e0 mov w0, w19
400254dc: a94153f3 ldp x19, x20, [sp, #16]
400254e0: a8c77bfd ldp x29, x30, [sp], #112
400254e4: d65f03c0 ret
POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags );
400254e8: 97ffff72 bl 400252b0 <_POSIX_Condition_variables_Auto_initialization>
400254ec: 72001c1f tst w0, #0xff
400254f0: 54fffa61 b.ne 4002543c <_POSIX_Condition_variables_Wait_support+0x3c> // b.any
400254f4: a9425bf5 ldp x21, x22, [sp, #32]
error = EINVAL;
400254f8: 528002d3 mov w19, #0x16 // #22
}
400254fc: 2a1303e0 mov w0, w19
40025500: a94153f3 ldp x19, x20, [sp, #16]
40025504: a8c77bfd ldp x29, x30, [sp], #112
40025508: d65f03c0 ret
_ISR_lock_ISR_enable( lock_context );
4002550c: b94033e0 ldr w0, [sp, #48]
__asm__ volatile (
40025510: d51b4220 msr daif, x0
return EINVAL;
40025514: 528002d3 mov w19, #0x16 // #22
}
40025518: 2a1303e0 mov w0, w19
4002551c: a94153f3 ldp x19, x20, [sp, #16]
return EINVAL;
40025520: a9425bf5 ldp x21, x22, [sp, #32]
}
40025524: a8c77bfd ldp x29, x30, [sp], #112
40025528: d65f03c0 ret
queue_context->enqueue_callout = enqueue_callout;
4002552c: 90000000 adrp x0, 40025000 <pthread_condattr_destroy+0x10>
40025530: 910dc000 add x0, x0, #0x370
40025534: f9001fe0 str x0, [sp, #56]
}
40025538: 17ffffc9 b 4002545c <_POSIX_Condition_variables_Wait_support+0x5c>
error = 0;
4002553c: 52800013 mov w19, #0x0 // #0 <== NOT EXECUTED
40025540: 17ffffe2 b 400254c8 <_POSIX_Condition_variables_Wait_support+0xc8> <== NOT EXECUTED
}
40025544: 2a1303e0 mov w0, w19
40025548: a94153f3 ldp x19, x20, [sp, #16]
4002554c: a9425bf5 ldp x21, x22, [sp, #32]
40025550: a8c77bfd ldp x29, x30, [sp], #112
40025554: d65f03c0 ret
...
0000000040025400 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
const struct timespec *abstime,
Thread_queue_Enqueue_callout enqueue_callout
)
{
40025400: a9b77bfd stp x29, x30, [sp, #-144]!
40025404: 910003fd mov x29, sp
40025408: a90153f3 stp x19, x20, [sp, #16]
4002540c: aa0203f4 mov x20, x2
40025410: aa0303f3 mov x19, x3
return (POSIX_Message_queue_Control *) _Objects_Get(
40025414: f00006c2 adrp x2, 40100000 <_POSIX_Message_queue_Information>
40025418: 91000042 add x2, x2, #0x0
4002541c: a9025bf5 stp x21, x22, [sp, #32]
40025420: aa0403f5 mov x21, x4
40025424: aa0503f6 mov x22, x5
40025428: f9001bf7 str x23, [sp, #48]
4002542c: aa0103f7 mov x23, x1
40025430: 910143e1 add x1, sp, #0x50
40025434: 94000b63 bl 400281c0 <_Objects_Get>
Thread_Control *executing;
Status_Control status;
the_mq = _POSIX_Message_queue_Get( mqdes, &queue_context );
if ( the_mq == NULL ) {
40025438: b40007e0 cbz x0, 40025534 <_POSIX_Message_queue_Receive_support+0x134>
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( ( the_mq->oflag & O_ACCMODE ) == O_WRONLY ) {
4002543c: b940c006 ldr w6, [x0, #192]
40025440: 120004c1 and w1, w6, #0x3
40025444: 7100043f cmp w1, #0x1
40025448: 54000720 b.eq 4002552c <_POSIX_Message_queue_Receive_support+0x12c> // b.none
_ISR_lock_ISR_enable( &queue_context.Lock_context.Lock_context );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
4002544c: f9402401 ldr x1, [x0, #72]
40025450: eb14003f cmp x1, x20
40025454: 540004a8 b.hi 400254e8 <_POSIX_Message_queue_Receive_support+0xe8> // b.pmore
_CORE_message_queue_Acquire_critical(
&the_mq->Message_queue,
&queue_context
);
if ( the_mq->open_count == 0 ) {
40025458: b9409c01 ldr w1, [x0, #156]
length_out = -1;
4002545c: 92800014 mov x20, #0xffffffffffffffff // #-1
40025460: f90027f4 str x20, [sp, #72]
_CORE_message_queue_Acquire_critical(
40025464: 91008000 add x0, x0, #0x20
queue_context->Timeout.arg = arg;
40025468: a905d7f6 stp x22, x21, [sp, #88]
if ( the_mq->open_count == 0 ) {
4002546c: 340002e1 cbz w1, 400254c8 <_POSIX_Message_queue_Receive_support+0xc8>
40025470: d00006e1 adrp x1, 40103000 <_POSIX_Threads_Objects+0xaa8>
40025474: f9465036 ldr x22, [x1, #3232]
/*
* Now perform the actual message receive
*/
executing = _Thread_Executing;
status = _CORE_message_queue_Seize(
40025478: d27200c4 eor x4, x6, #0x4000
4002547c: 910143e5 add x5, sp, #0x50
40025480: aa1703e2 mov x2, x23
40025484: 530e3884 ubfx w4, w4, #14, #1
40025488: aa1603e1 mov x1, x22
4002548c: 910123e3 add x3, sp, #0x48
40025490: 94000798 bl 400272f0 <_CORE_message_queue_Seize>
40025494: 2a0003f5 mov w21, w0
&length_out,
( the_mq->oflag & O_NONBLOCK ) == 0,
&queue_context
);
if ( status != STATUS_SUCCESSFUL ) {
40025498: 35000380 cbnz w0, 40025508 <_POSIX_Message_queue_Receive_support+0x108>
rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) );
}
if ( msg_prio != NULL ) {
4002549c: b40000b3 cbz x19, 400254b0 <_POSIX_Message_queue_Receive_support+0xb0> <== NEVER TAKEN
return (unsigned int) ((priority >= 0) ? priority : -priority);
400254a0: b94072c0 ldr w0, [x22, #112]
400254a4: 7100001f cmp w0, #0x0
400254a8: 5a80a400 cneg w0, w0, lt // lt = tstop
*msg_prio = _POSIX_Message_queue_Priority_from_core(
400254ac: b9000260 str w0, [x19]
executing->Wait.count
);
}
return length_out;
400254b0: f94027e0 ldr x0, [sp, #72]
}
400254b4: a94153f3 ldp x19, x20, [sp, #16]
400254b8: a9425bf5 ldp x21, x22, [sp, #32]
400254bc: f9401bf7 ldr x23, [sp, #48]
400254c0: a8c97bfd ldp x29, x30, [sp], #144
400254c4: d65f03c0 ret
_ISR_lock_ISR_enable( &queue_context->Lock_context.Lock_context );
400254c8: b94053e0 ldr w0, [sp, #80]
400254cc: d51b4220 msr daif, x0
rtems_set_errno_and_return_minus_one( EBADF );
400254d0: 940034cb bl 400327fc <__errno>
400254d4: aa0003e1 mov x1, x0
400254d8: 52800122 mov w2, #0x9 // #9
400254dc: aa1403e0 mov x0, x20
400254e0: b9000022 str w2, [x1]
400254e4: 17fffff4 b 400254b4 <_POSIX_Message_queue_Receive_support+0xb4>
_ISR_lock_ISR_enable( &queue_context.Lock_context.Lock_context );
400254e8: b94053e0 ldr w0, [sp, #80]
400254ec: d51b4220 msr daif, x0
rtems_set_errno_and_return_minus_one( EMSGSIZE );
400254f0: 940034c3 bl 400327fc <__errno>
400254f4: aa0003e1 mov x1, x0
400254f8: 52800f42 mov w2, #0x7a // #122
400254fc: 92800000 mov x0, #0xffffffffffffffff // #-1
40025500: b9000022 str w2, [x1]
40025504: 17ffffec b 400254b4 <_POSIX_Message_queue_Receive_support+0xb4>
rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) );
40025508: 940034bd bl 400327fc <__errno>
4002550c: aa0003e2 mov x2, x0
return STATUS_GET_POSIX( status );
40025510: 710002bf cmp w21, #0x0
40025514: 1103fea1 add w1, w21, #0xff
40025518: 1a95b021 csel w1, w1, w21, lt // lt = tstop
4002551c: aa1403e0 mov x0, x20
40025520: 13087c21 asr w1, w1, #8
40025524: b9000041 str w1, [x2]
40025528: 17ffffe3 b 400254b4 <_POSIX_Message_queue_Receive_support+0xb4>
_ISR_lock_ISR_enable( &queue_context.Lock_context.Lock_context );
4002552c: b94053e0 ldr w0, [sp, #80]
40025530: d51b4220 msr daif, x0
rtems_set_errno_and_return_minus_one( EBADF );
40025534: 940034b2 bl 400327fc <__errno>
40025538: aa0003e1 mov x1, x0
4002553c: 52800122 mov w2, #0x9 // #9
40025540: 92800000 mov x0, #0xffffffffffffffff // #-1
40025544: b9000022 str w2, [x1]
40025548: 17ffffdb b 400254b4 <_POSIX_Message_queue_Receive_support+0xb4>
4002554c: 00000000 udf #0
0000000040025560 <_POSIX_Message_queue_Send_support>:
size_t msg_len,
unsigned int msg_prio,
const struct timespec *abstime,
Thread_queue_Enqueue_callout enqueue_callout
)
{
40025560: a9b87bfd stp x29, x30, [sp, #-128]!
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX ) {
40025564: 7100807f cmp w3, #0x20
{
40025568: 910003fd mov x29, sp
4002556c: a90153f3 stp x19, x20, [sp, #16]
if ( msg_prio > MQ_PRIO_MAX ) {
40025570: 54000708 b.hi 40025650 <_POSIX_Message_queue_Send_support+0xf0> // b.pmore
return (POSIX_Message_queue_Control *) _Objects_Get(
40025574: 2a0303f3 mov w19, w3
40025578: aa0403f4 mov x20, x4
4002557c: a9025bf5 stp x21, x22, [sp, #32]
40025580: aa0103f6 mov x22, x1
40025584: aa0503f5 mov x21, x5
40025588: 910103e1 add x1, sp, #0x40
4002558c: f9001bf7 str x23, [sp, #48]
40025590: aa0203f7 mov x23, x2
40025594: f00006c2 adrp x2, 40100000 <_POSIX_Message_queue_Information>
40025598: 91000042 add x2, x2, #0x0
4002559c: 94000b09 bl 400281c0 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
}
the_mq = _POSIX_Message_queue_Get( mqdes, &queue_context );
if ( the_mq == NULL ) {
400255a0: b40004a0 cbz x0, 40025634 <_POSIX_Message_queue_Send_support+0xd4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( ( the_mq->oflag & O_ACCMODE ) == O_RDONLY ) {
400255a4: b940c006 ldr w6, [x0, #192]
400255a8: f24004df tst x6, #0x3
400255ac: 54000400 b.eq 4002562c <_POSIX_Message_queue_Send_support+0xcc> // b.none
_CORE_message_queue_Acquire_critical(
&the_mq->Message_queue,
&queue_context
);
if ( the_mq->open_count == 0 ) {
400255b0: b9409c01 ldr w1, [x0, #156]
_CORE_message_queue_Acquire_critical(
400255b4: 91008000 add x0, x0, #0x20
queue_context->Timeout.arg = arg;
400255b8: a904d3f5 stp x21, x20, [sp, #72]
if ( the_mq->open_count == 0 ) {
400255bc: 34000381 cbz w1, 4002562c <_POSIX_Message_queue_Send_support+0xcc>
400255c0: d00006e1 adrp x1, 40103000 <_POSIX_Threads_Objects+0xaa8>
/*
* Now perform the actual message receive
*/
executing = _Thread_Executing;
status = _CORE_message_queue_Submit(
400255c4: d27200c5 eor x5, x6, #0x4000
400255c8: 4b1303e4 neg w4, w19
400255cc: 910103e6 add x6, sp, #0x40
400255d0: f9465021 ldr x1, [x1, #3232]
400255d4: 530e38a5 ubfx w5, w5, #14, #1
400255d8: aa1703e3 mov x3, x23
400255dc: aa1603e2 mov x2, x22
400255e0: 94000790 bl 40027420 <_CORE_message_queue_Submit>
400255e4: 2a0003f3 mov w19, w0
RTEMS_INLINE_ROUTINE int _POSIX_Zero_or_minus_one_plus_errno(
Status_Control status
)
{
if ( status == STATUS_SUCCESSFUL ) {
400255e8: 350000e0 cbnz w0, 40025604 <_POSIX_Message_queue_Send_support+0xa4>
400255ec: a9425bf5 ldp x21, x22, [sp, #32]
400255f0: f9401bf7 ldr x23, [sp, #48]
_POSIX_Message_queue_Priority_to_core( msg_prio ),
( the_mq->oflag & O_NONBLOCK ) == 0,
&queue_context
);
return _POSIX_Zero_or_minus_one_plus_errno( status );
}
400255f4: 2a1303e0 mov w0, w19
400255f8: a94153f3 ldp x19, x20, [sp, #16]
400255fc: a8c87bfd ldp x29, x30, [sp], #128
40025600: d65f03c0 ret
return 0;
}
rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) );
40025604: 9400347e bl 400327fc <__errno>
return STATUS_GET_POSIX( status );
40025608: 7100027f cmp w19, #0x0
4002560c: 1103fe61 add w1, w19, #0xff
40025610: 1a93b021 csel w1, w1, w19, lt // lt = tstop
rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) );
40025614: 12800013 mov w19, #0xffffffff // #-1
40025618: a9425bf5 ldp x21, x22, [sp, #32]
return STATUS_GET_POSIX( status );
4002561c: 13087c21 asr w1, w1, #8
rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) );
40025620: f9401bf7 ldr x23, [sp, #48]
40025624: b9000001 str w1, [x0]
40025628: 17fffff3 b 400255f4 <_POSIX_Message_queue_Send_support+0x94>
_ISR_lock_ISR_enable( &queue_context->Lock_context.Lock_context );
4002562c: b94043e0 ldr w0, [sp, #64]
40025630: d51b4220 msr daif, x0
rtems_set_errno_and_return_minus_one( EBADF );
40025634: 94003472 bl 400327fc <__errno>
40025638: 12800013 mov w19, #0xffffffff // #-1
4002563c: 52800121 mov w1, #0x9 // #9
40025640: a9425bf5 ldp x21, x22, [sp, #32]
40025644: f9401bf7 ldr x23, [sp, #48]
40025648: b9000001 str w1, [x0]
4002564c: 17ffffea b 400255f4 <_POSIX_Message_queue_Send_support+0x94>
rtems_set_errno_and_return_minus_one( EINVAL );
40025650: 9400346b bl 400327fc <__errno>
40025654: 12800013 mov w19, #0xffffffff // #-1
40025658: 528002c1 mov w1, #0x16 // #22
4002565c: b9000001 str w1, [x0]
40025660: 17ffffe5 b 400255f4 <_POSIX_Message_queue_Send_support+0x94>
...
00000000400272a0 <_POSIX_Mutex_Lock_support>:
Thread_queue_Context queue_context;
Thread_Control *executing;
Status_Control status;
the_mutex = _POSIX_Mutex_Get( mutex );
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
400272a0: b40011e0 cbz x0, 400274dc <_POSIX_Mutex_Lock_support+0x23c>
{
400272a4: a9b87bfd stp x29, x30, [sp, #-128]!
400272a8: 910003fd mov x29, sp
400272ac: a9025bf5 stp x21, x22, [sp, #32]
400272b0: aa0203f5 mov x21, x2
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
400272b4: d2827702 mov x2, #0x13b8 // #5048
400272b8: f2b2c382 movk x2, #0x961c, lsl #16
{
400272bc: a90153f3 stp x19, x20, [sp, #16]
400272c0: aa0103f4 mov x20, x1
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
400272c4: f9400016 ldr x22, [x0]
400272c8: aa0003f3 mov x19, x0
400272cc: ca160001 eor x1, x0, x22
400272d0: ca020021 eor x1, x1, x2
400272d4: f27df03f tst x1, #0xfffffffffffffff8
400272d8: 540008e1 b.ne 400273f4 <_POSIX_Mutex_Lock_support+0x154> // b.any
__asm__ volatile (
400272dc: f9001bf7 str x23, [sp, #48]
400272e0: d53b4220 mrs x0, daif
400272e4: d50342df msr daifset, #0x2
400272e8: b00006f7 adrp x23, 40104000 <_Thread_Heads+0x68>
400272ec: 911f02f7 add x23, x23, #0x7c0
_Thread_queue_Context_ISR_disable( queue_context, level );
400272f0: b90043e0 str w0, [sp, #64]
executing = _POSIX_Mutex_Acquire( the_mutex, &queue_context );
_Thread_queue_Context_set_enqueue_callout( &queue_context, enqueue_callout);
_Thread_queue_Context_set_timeout_argument( &queue_context, abstime );
switch ( _POSIX_Mutex_Get_protocol( flags ) ) {
400272f4: 720006c0 ands w0, w22, #0x3
queue_context->Timeout.arg = arg;
400272f8: a904d3f5 stp x21, x20, [sp, #72]
400272fc: f94012f5 ldr x21, [x23, #32]
40027300: 54000580 b.eq 400273b0 <_POSIX_Mutex_Lock_support+0x110> // b.none
40027304: 7100081f cmp w0, #0x2
40027308: 540001e0 b.eq 40027344 <_POSIX_Mutex_Lock_support+0xa4> // b.none
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Mutex_Get_owner(
const POSIX_Mutex_Control *the_mutex
)
{
return the_mutex->Recursive.Mutex.Queue.Queue.owner;
4002730c: f9400e60 ldr x0, [x19, #24]
{
Thread_Control *owner;
owner = _POSIX_Mutex_Get_owner( the_mutex );
if ( owner == NULL ) {
40027310: b4000a60 cbz x0, 4002745c <_POSIX_Mutex_Lock_support+0x1bc>
_Thread_Resource_count_increment( executing );
_POSIX_Mutex_Release( the_mutex, queue_context );
return STATUS_SUCCESSFUL;
}
if ( owner == executing ) {
40027314: eb0002bf cmp x21, x0
40027318: 54000540 b.eq 400273c0 <_POSIX_Mutex_Lock_support+0x120> // b.none
if ( (uintptr_t) abstime != POSIX_MUTEX_ABSTIME_TRY_LOCK ) {
4002731c: f100069f cmp x20, #0x1
40027320: 540008e0 b.eq 4002743c <_POSIX_Mutex_Lock_support+0x19c> // b.none
queue_context->deadlock_callout = deadlock_callout;
40027324: f0000004 adrp x4, 4002a000 <_Thread_Do_dispatch+0xf0>
40027328: 91130084 add x4, x4, #0x4c0
_Thread_queue_Enqueue(
4002732c: f00000c1 adrp x1, 40042000 <rtems_test_name+0x1a0>
40027330: 91004260 add x0, x19, #0x10
40027334: 910103e3 add x3, sp, #0x40
40027338: 911b8021 add x1, x1, #0x6e0
queue_context->thread_state = thread_state;
4002733c: 52800025 mov w5, #0x1 // #1
40027340: 1400000e b 40027378 <_POSIX_Mutex_Lock_support+0xd8>
return the_mutex->Recursive.Mutex.Queue.Queue.owner;
40027344: f9400e60 ldr x0, [x19, #24]
{
Thread_Control *owner;
owner = _POSIX_Mutex_Get_owner( the_mutex );
if ( owner == NULL ) {
40027348: b40009c0 cbz x0, 40027480 <_POSIX_Mutex_Lock_support+0x1e0>
executing,
queue_context
);
}
if ( owner == executing ) {
4002734c: eb0002bf cmp x21, x0
40027350: 54000380 b.eq 400273c0 <_POSIX_Mutex_Lock_support+0x120> // b.none <== NEVER TAKEN
if ( (uintptr_t) abstime != POSIX_MUTEX_ABSTIME_TRY_LOCK ) {
40027354: f100069f cmp x20, #0x1
40027358: 54000720 b.eq 4002743c <_POSIX_Mutex_Lock_support+0x19c> // b.none <== NEVER TAKEN
queue_context->deadlock_callout = deadlock_callout;
4002735c: f0000004 adrp x4, 4002a000 <_Thread_Do_dispatch+0xf0>
40027360: 91130084 add x4, x4, #0x4c0
_Thread_queue_Enqueue(
40027364: f00000c1 adrp x1, 40042000 <rtems_test_name+0x1a0>
40027368: 91004260 add x0, x19, #0x10
4002736c: 910103e3 add x3, sp, #0x40
40027370: 911ae021 add x1, x1, #0x6b8
queue_context->thread_state = thread_state;
40027374: 52800025 mov w5, #0x1 // #1
40027378: aa1503e2 mov x2, x21
4002737c: b90047e5 str w5, [sp, #68]
queue_context->deadlock_callout = deadlock_callout;
40027380: f9003fe4 str x4, [sp, #120]
40027384: 94000c57 bl 4002a4e0 <_Thread_queue_Enqueue>
return _POSIX_Get_by_name_error_table[ error ];
}
RTEMS_INLINE_ROUTINE int _POSIX_Get_error( Status_Control status )
{
return STATUS_GET_POSIX( status );
40027388: b9408ea1 ldr w1, [x21, #140]
);
break;
}
return _POSIX_Get_error( status );
}
4002738c: a94153f3 ldp x19, x20, [sp, #16]
40027390: 7100003f cmp w1, #0x0
40027394: 1103fc20 add w0, w1, #0xff
40027398: 1a81b000 csel w0, w0, w1, lt // lt = tstop
4002739c: a9425bf5 ldp x21, x22, [sp, #32]
400273a0: 13087c00 asr w0, w0, #8
return _Thread_Wait_get_status( executing );
400273a4: f9401bf7 ldr x23, [sp, #48]
}
400273a8: a8c87bfd ldp x29, x30, [sp], #128
400273ac: d65f03c0 ret
return the_mutex->Recursive.Mutex.Queue.Queue.owner;
400273b0: f9400e60 ldr x0, [x19, #24]
if ( owner == NULL ) {
400273b4: b4000540 cbz x0, 4002745c <_POSIX_Mutex_Lock_support+0x1bc>
if ( owner == executing ) {
400273b8: eb0002bf cmp x21, x0
400273bc: 540002c1 b.ne 40027414 <_POSIX_Mutex_Lock_support+0x174> // b.any
return ( flags & POSIX_MUTEX_RECURSIVE ) != 0;
400273c0: 528005a0 mov w0, #0x2d // #45
if ( _POSIX_Mutex_Is_recursive( flags ) ) {
400273c4: 361000b6 tbz w22, #2, 400273d8 <_POSIX_Mutex_Lock_support+0x138> <== ALWAYS TAKEN
++the_mutex->Recursive.nest_level;
400273c8: b9402a61 ldr w1, [x19, #40] <== NOT EXECUTED
return STATUS_SUCCESSFUL;
400273cc: 52800000 mov w0, #0x0 // #0 <== NOT EXECUTED
++the_mutex->Recursive.nest_level;
400273d0: 11000421 add w1, w1, #0x1 <== NOT EXECUTED
400273d4: b9002a61 str w1, [x19, #40] <== NOT EXECUTED
Thread_queue_Queue *queue,
ISR_lock_Context *lock_context
)
{
_Thread_queue_Queue_release_critical( queue, lock_context );
_ISR_lock_ISR_enable( lock_context );
400273d8: b94043e1 ldr w1, [sp, #64]
__asm__ volatile (
400273dc: d51b4221 msr daif, x1
return status;
400273e0: f9401bf7 ldr x23, [sp, #48]
400273e4: a94153f3 ldp x19, x20, [sp, #16]
400273e8: a9425bf5 ldp x21, x22, [sp, #32]
400273ec: a8c87bfd ldp x29, x30, [sp], #128
400273f0: d65f03c0 ret
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
400273f4: 9400009f bl 40027670 <_POSIX_Mutex_Auto_initialization>
400273f8: 72001c1f tst w0, #0xff
400273fc: 54fff701 b.ne 400272dc <_POSIX_Mutex_Lock_support+0x3c> // b.any
40027400: 528002c0 mov w0, #0x16 // #22
}
40027404: a94153f3 ldp x19, x20, [sp, #16]
40027408: a9425bf5 ldp x21, x22, [sp, #32]
4002740c: a8c87bfd ldp x29, x30, [sp], #128
40027410: d65f03c0 ret
if ( (uintptr_t) abstime != POSIX_MUTEX_ABSTIME_TRY_LOCK ) {
40027414: f100069f cmp x20, #0x1
40027418: 54000120 b.eq 4002743c <_POSIX_Mutex_Lock_support+0x19c> // b.none <== NEVER TAKEN
queue_context->deadlock_callout = deadlock_callout;
4002741c: f0000004 adrp x4, 4002a000 <_Thread_Do_dispatch+0xf0>
40027420: 91130084 add x4, x4, #0x4c0
_Thread_queue_Enqueue(
40027424: f00000c1 adrp x1, 40042000 <rtems_test_name+0x1a0>
40027428: 91004260 add x0, x19, #0x10
4002742c: 910103e3 add x3, sp, #0x40
40027430: 9119a021 add x1, x1, #0x668
queue_context->thread_state = thread_state;
40027434: 52800025 mov w5, #0x1 // #1
40027438: 17ffffd0 b 40027378 <_POSIX_Mutex_Lock_support+0xd8>
_ISR_lock_ISR_enable( lock_context );
4002743c: b94043e0 ldr w0, [sp, #64]
40027440: d51b4220 msr daif, x0
40027444: 52800200 mov w0, #0x10 // #16
}
40027448: a94153f3 ldp x19, x20, [sp, #16]
4002744c: a9425bf5 ldp x21, x22, [sp, #32]
40027450: f9401bf7 ldr x23, [sp, #48]
40027454: a8c87bfd ldp x29, x30, [sp], #128
40027458: d65f03c0 ret
the_mutex->Recursive.Mutex.Queue.Queue.owner = owner;
4002745c: f9000e75 str x21, [x19, #24]
40027460: b94043e0 ldr w0, [sp, #64]
40027464: d51b4220 msr daif, x0
return STATUS_SUCCESSFUL;
40027468: 52800000 mov w0, #0x0 // #0
4002746c: a94153f3 ldp x19, x20, [sp, #16]
40027470: a9425bf5 ldp x21, x22, [sp, #32]
40027474: f9401bf7 ldr x23, [sp, #48]
40027478: a8c87bfd ldp x29, x30, [sp], #128
4002747c: d65f03c0 ret
*/
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_priority(
const Priority_Aggregation *aggregation
)
{
return aggregation->Node.priority;
40027480: f94036a1 ldr x1, [x21, #104]
queue_context->Priority.update_count = 0;
40027484: f90033ff str xzr, [sp, #96]
if (
40027488: f9402a60 ldr x0, [x19, #80]
4002748c: f9401421 ldr x1, [x1, #40]
40027490: eb00003f cmp x1, x0
40027494: 54000283 b.cc 400274e4 <_POSIX_Mutex_Lock_support+0x244> // b.lo, b.ul, b.last
the_mutex->Recursive.Mutex.Queue.Queue.owner = owner;
40027498: f9000e75 str x21, [x19, #24]
_Thread_Priority_add(
4002749c: aa1503e0 mov x0, x21
400274a0: 9100c261 add x1, x19, #0x30
400274a4: 910103e2 add x2, sp, #0x40
400274a8: 940009e6 bl 40029c40 <_Thread_Priority_add>
const ISR_lock_Context *lock_context
)
{
uint32_t disable_level;
disable_level = cpu_self->thread_dispatch_disable_level;
400274ac: b9401ae0 ldr w0, [x23, #24]
_Profiling_Thread_dispatch_disable_critical(
cpu_self,
disable_level,
lock_context
);
cpu_self->thread_dispatch_disable_level = disable_level + 1;
400274b0: 11000400 add w0, w0, #0x1
400274b4: b9001ae0 str w0, [x23, #24]
_ISR_lock_ISR_enable( lock_context );
400274b8: b94043e0 ldr w0, [sp, #64]
400274bc: d51b4220 msr daif, x0
_Thread_Priority_update( queue_context );
400274c0: 910103e0 add x0, sp, #0x40
400274c4: 94000a4b bl 40029df0 <_Thread_Priority_update>
_Thread_Dispatch_enable( cpu_self );
400274c8: aa1703e0 mov x0, x23
400274cc: 94000af1 bl 4002a090 <_Thread_Dispatch_enable>
return STATUS_SUCCESSFUL;
400274d0: 52800000 mov w0, #0x0 // #0
400274d4: f9401bf7 ldr x23, [sp, #48]
400274d8: 17ffffc3 b 400273e4 <_POSIX_Mutex_Lock_support+0x144>
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
400274dc: 528002c0 mov w0, #0x16 // #22
}
400274e0: d65f03c0 ret
400274e4: b94043e0 ldr w0, [sp, #64]
400274e8: d51b4220 msr daif, x0
return STATUS_MUTEX_CEILING_VIOLATED;
400274ec: 528002c0 mov w0, #0x16 // #22
400274f0: f9401bf7 ldr x23, [sp, #48]
400274f4: 17ffffbc b 400273e4 <_POSIX_Mutex_Lock_support+0x144>
...
00000000400247b0 <_POSIX_Shm_Object_create_from_heap>:
int _POSIX_Shm_Object_create_from_heap(
POSIX_Shm_Object *shm_obj,
size_t size
)
{
400247b0: a9be7bfd stp x29, x30, [sp, #-32]! <== NOT EXECUTED
400247b4: 910003fd mov x29, sp <== NOT EXECUTED
400247b8: a90153f3 stp x19, x20, [sp, #16] <== NOT EXECUTED
400247bc: aa0003f3 mov x19, x0 <== NOT EXECUTED
400247c0: aa0103f4 mov x20, x1 <== NOT EXECUTED
void *p = calloc( 1, size ); /* get zero'd memory */
400247c4: d2800020 mov x0, #0x1 // #1 <== NOT EXECUTED
400247c8: 94000ea2 bl 40028250 <calloc> <== NOT EXECUTED
if ( p != NULL ) {
400247cc: b40000c0 cbz x0, 400247e4 <_POSIX_Shm_Object_create_from_heap+0x34> <== NOT EXECUTED
shm_obj->handle = p;
shm_obj->size = size;
400247d0: a9005260 stp x0, x20, [x19] <== NOT EXECUTED
} else {
errno = EIO;
}
return 0;
}
400247d4: 52800000 mov w0, #0x0 // #0 <== NOT EXECUTED
400247d8: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
400247dc: a8c27bfd ldp x29, x30, [sp], #32 <== NOT EXECUTED
400247e0: d65f03c0 ret <== NOT EXECUTED
errno = EIO;
400247e4: 94002c42 bl 4002f8ec <__errno> <== NOT EXECUTED
400247e8: 528000a1 mov w1, #0x5 // #5 <== NOT EXECUTED
400247ec: b9000001 str w1, [x0] <== NOT EXECUTED
400247f0: 17fffff9 b 400247d4 <_POSIX_Shm_Object_create_from_heap+0x24> <== NOT EXECUTED
...
00000000400259a0 <_POSIX_Shm_Object_create_from_workspace>:
int _POSIX_Shm_Object_create_from_workspace(
POSIX_Shm_Object *shm_obj,
size_t size
)
{
400259a0: a9be7bfd stp x29, x30, [sp, #-32]! <== NOT EXECUTED
400259a4: 910003fd mov x29, sp <== NOT EXECUTED
400259a8: a90153f3 stp x19, x20, [sp, #16] <== NOT EXECUTED
400259ac: aa0003f4 mov x20, x0 <== NOT EXECUTED
400259b0: aa0103f3 mov x19, x1 <== NOT EXECUTED
shm_obj->handle = _Workspace_Allocate( size );
400259b4: aa0103e0 mov x0, x1 <== NOT EXECUTED
400259b8: 94000c46 bl 40028ad0 <_Workspace_Allocate> <== NOT EXECUTED
400259bc: f9000280 str x0, [x20] <== NOT EXECUTED
if ( shm_obj->handle == NULL ) {
400259c0: b4000120 cbz x0, 400259e4 <_POSIX_Shm_Object_create_from_workspace+0x44><== NOT EXECUTED
return ENOMEM;
}
memset( shm_obj->handle, 0, size );
400259c4: aa1303e2 mov x2, x19 <== NOT EXECUTED
400259c8: 52800001 mov w1, #0x0 // #0 <== NOT EXECUTED
400259cc: 94002b55 bl 40030720 <memset> <== NOT EXECUTED
shm_obj->size = size;
400259d0: f9000693 str x19, [x20, #8] <== NOT EXECUTED
return 0;
400259d4: 52800000 mov w0, #0x0 // #0 <== NOT EXECUTED
}
400259d8: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
400259dc: a8c27bfd ldp x29, x30, [sp], #32 <== NOT EXECUTED
400259e0: d65f03c0 ret <== NOT EXECUTED
return ENOMEM;
400259e4: 52800180 mov w0, #0xc // #12 <== NOT EXECUTED
}
400259e8: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
400259ec: a8c27bfd ldp x29, x30, [sp], #32 <== NOT EXECUTED
400259f0: d65f03c0 ret <== NOT EXECUTED
...
0000000040024930 <_POSIX_Shm_Object_mmap_from_heap>:
POSIX_Shm_Object *shm_obj,
size_t len,
int prot,
off_t off
)
{
40024930: aa0003e2 mov x2, x0
if ( shm_obj == NULL || shm_obj->handle == NULL )
40024934: b4000120 cbz x0, 40024958 <_POSIX_Shm_Object_mmap_from_heap+0x28> <== NEVER TAKEN
40024938: f9400000 ldr x0, [x0]
4002493c: b40000c0 cbz x0, 40024954 <_POSIX_Shm_Object_mmap_from_heap+0x24> <== NEVER TAKEN
return 0;
/* This is already checked by mmap. Maybe make it a debug assert? */
if ( shm_obj->size < len + off ) {
40024940: f9400442 ldr x2, [x2, #8]
40024944: 8b010061 add x1, x3, x1
return NULL;
}
return (char*)shm_obj->handle + off;
40024948: 8b030000 add x0, x0, x3
4002494c: eb01005f cmp x2, x1
40024950: 9a9f2000 csel x0, x0, xzr, cs // cs = hs, nlast
}
40024954: d65f03c0 ret
return 0;
40024958: d2800000 mov x0, #0x0 // #0 <== NOT EXECUTED
}
4002495c: d65f03c0 ret <== NOT EXECUTED
0000000040025b40 <_POSIX_Shm_Object_mmap_from_workspace>:
POSIX_Shm_Object *shm_obj,
size_t len,
int prot,
off_t off
)
{
40025b40: aa0003e2 mov x2, x0
if ( shm_obj == NULL || shm_obj->handle == NULL )
40025b44: b4000120 cbz x0, 40025b68 <_POSIX_Shm_Object_mmap_from_workspace+0x28> <== NEVER TAKEN
40025b48: f9400000 ldr x0, [x0]
40025b4c: b40000c0 cbz x0, 40025b64 <_POSIX_Shm_Object_mmap_from_workspace+0x24> <== NEVER TAKEN
return 0;
/* This is already checked by mmap. Maybe make it a debug assert? */
if ( shm_obj->size < len + off ) {
40025b50: f9400442 ldr x2, [x2, #8]
40025b54: 8b010061 add x1, x3, x1
return NULL;
}
return (char*)shm_obj->handle + off;
40025b58: 8b030000 add x0, x0, x3
40025b5c: eb01005f cmp x2, x1
40025b60: 9a9f2000 csel x0, x0, xzr, cs // cs = hs, nlast
}
40025b64: d65f03c0 ret
return 0;
40025b68: d2800000 mov x0, #0x0 // #0 <== NOT EXECUTED
}
40025b6c: d65f03c0 ret <== NOT EXECUTED
00000000400248d0 <_POSIX_Shm_Object_read_from_heap>:
POSIX_Shm_Object *shm_obj,
void *buf,
size_t count
)
{
if ( shm_obj == NULL || shm_obj->handle == NULL )
400248d0: b4000280 cbz x0, 40024920 <_POSIX_Shm_Object_read_from_heap+0x50> <== NOT EXECUTED
400248d4: aa0003e3 mov x3, x0 <== NOT EXECUTED
400248d8: aa0103e4 mov x4, x1 <== NOT EXECUTED
return 0;
400248dc: 52800000 mov w0, #0x0 // #0 <== NOT EXECUTED
if ( shm_obj == NULL || shm_obj->handle == NULL )
400248e0: f9400061 ldr x1, [x3] <== NOT EXECUTED
400248e4: b40001c1 cbz x1, 4002491c <_POSIX_Shm_Object_read_from_heap+0x4c> <== NOT EXECUTED
{
400248e8: a9be7bfd stp x29, x30, [sp, #-32]! <== NOT EXECUTED
if ( shm_obj->size < count ) {
count = shm_obj->size;
}
memcpy( buf, shm_obj->handle, count );
400248ec: aa0403e0 mov x0, x4 <== NOT EXECUTED
{
400248f0: 910003fd mov x29, sp <== NOT EXECUTED
400248f4: f9000bf3 str x19, [sp, #16] <== NOT EXECUTED
400248f8: f9400473 ldr x19, [x3, #8] <== NOT EXECUTED
400248fc: eb02027f cmp x19, x2 <== NOT EXECUTED
40024900: 9a829273 csel x19, x19, x2, ls // ls = plast <== NOT EXECUTED
memcpy( buf, shm_obj->handle, count );
40024904: aa1303e2 mov x2, x19 <== NOT EXECUTED
40024908: 94002c59 bl 4002fa6c <memcpy> <== NOT EXECUTED
return count;
4002490c: 2a1303e0 mov w0, w19 <== NOT EXECUTED
}
40024910: f9400bf3 ldr x19, [sp, #16] <== NOT EXECUTED
40024914: a8c27bfd ldp x29, x30, [sp], #32 <== NOT EXECUTED
40024918: d65f03c0 ret <== NOT EXECUTED
4002491c: d65f03c0 ret <== NOT EXECUTED
return 0;
40024920: 52800000 mov w0, #0x0 // #0 <== NOT EXECUTED
40024924: d65f03c0 ret <== NOT EXECUTED
...
0000000040025ae0 <_POSIX_Shm_Object_read_from_workspace>:
POSIX_Shm_Object *shm_obj,
void *buf,
size_t count
)
{
if ( shm_obj == NULL || shm_obj->handle == NULL )
40025ae0: b4000280 cbz x0, 40025b30 <_POSIX_Shm_Object_read_from_workspace+0x50> <== NEVER TAKEN
40025ae4: aa0003e3 mov x3, x0
40025ae8: aa0103e4 mov x4, x1
return 0;
40025aec: 52800000 mov w0, #0x0 // #0
if ( shm_obj == NULL || shm_obj->handle == NULL )
40025af0: f9400061 ldr x1, [x3]
40025af4: b40001c1 cbz x1, 40025b2c <_POSIX_Shm_Object_read_from_workspace+0x4c> <== NEVER TAKEN
{
40025af8: a9be7bfd stp x29, x30, [sp, #-32]!
if ( shm_obj->size < count ) {
count = shm_obj->size;
}
memcpy( buf, shm_obj->handle, count );
40025afc: aa0403e0 mov x0, x4
{
40025b00: 910003fd mov x29, sp
40025b04: f9000bf3 str x19, [sp, #16]
40025b08: f9400473 ldr x19, [x3, #8]
40025b0c: eb02027f cmp x19, x2
40025b10: 9a829273 csel x19, x19, x2, ls // ls = plast
memcpy( buf, shm_obj->handle, count );
40025b14: aa1303e2 mov x2, x19
40025b18: 94002ae7 bl 400306b4 <memcpy>
return count;
40025b1c: 2a1303e0 mov w0, w19
}
40025b20: f9400bf3 ldr x19, [sp, #16]
40025b24: a8c27bfd ldp x29, x30, [sp], #32
40025b28: d65f03c0 ret
40025b2c: d65f03c0 ret <== NOT EXECUTED
return 0;
40025b30: 52800000 mov w0, #0x0 // #0 <== NOT EXECUTED
40025b34: d65f03c0 ret <== NOT EXECUTED
...
0000000040024840 <_POSIX_Shm_Object_resize_from_heap>:
int _POSIX_Shm_Object_resize_from_heap(
POSIX_Shm_Object *shm_obj,
size_t size
)
{
40024840: a9be7bfd stp x29, x30, [sp, #-32]!
40024844: 910003fd mov x29, sp
void *p;
int err = 0;
if ( size < shm_obj->size ) {
40024848: f9400402 ldr x2, [x0, #8]
{
4002484c: a90153f3 stp x19, x20, [sp, #16]
40024850: aa0003f3 mov x19, x0
40024854: aa0103f4 mov x20, x1
if ( size < shm_obj->size ) {
40024858: eb01005f cmp x2, x1
/* zero out if shrinking */
p = (void*)((uintptr_t)shm_obj->handle + (uintptr_t)size);
4002485c: f9400000 ldr x0, [x0]
if ( size < shm_obj->size ) {
40024860: 540001a8 b.hi 40024894 <_POSIX_Shm_Object_resize_from_heap+0x54> // b.pmore<== NEVER TAKEN
memset( p, 0, shm_obj->size - size );
}
p = realloc( shm_obj->handle, size );
40024864: aa1403e1 mov x1, x20
40024868: 94001126 bl 40028d00 <realloc>
if ( p != NULL ) {
4002486c: b4000280 cbz x0, 400248bc <_POSIX_Shm_Object_resize_from_heap+0x7c> <== NEVER TAKEN
shm_obj->handle = p;
if ( size > shm_obj->size ) {
40024870: f9400662 ldr x2, [x19, #8]
shm_obj->handle = p;
40024874: f9000260 str x0, [x19]
if ( size > shm_obj->size ) {
40024878: eb14005f cmp x2, x20
4002487c: 54000183 b.cc 400248ac <_POSIX_Shm_Object_resize_from_heap+0x6c> // b.lo, b.ul, b.last<== ALWAYS TAKEN
int err = 0;
40024880: 52800000 mov w0, #0x0 // #0
/* initialize added memory */
memset( p, 0, size - shm_obj->size );
}
shm_obj->size = size;
40024884: f9000674 str x20, [x19, #8]
} else {
err = EIO;
}
return err;
}
40024888: a94153f3 ldp x19, x20, [sp, #16]
4002488c: a8c27bfd ldp x29, x30, [sp], #32
40024890: d65f03c0 ret
memset( p, 0, shm_obj->size - size );
40024894: cb010042 sub x2, x2, x1 <== NOT EXECUTED
40024898: 8b010000 add x0, x0, x1 <== NOT EXECUTED
4002489c: 52800001 mov w1, #0x0 // #0 <== NOT EXECUTED
400248a0: 94002c8e bl 4002fad8 <memset> <== NOT EXECUTED
p = realloc( shm_obj->handle, size );
400248a4: f9400260 ldr x0, [x19] <== NOT EXECUTED
400248a8: 17ffffef b 40024864 <_POSIX_Shm_Object_resize_from_heap+0x24> <== NOT EXECUTED
memset( p, 0, size - shm_obj->size );
400248ac: cb020282 sub x2, x20, x2
400248b0: 52800001 mov w1, #0x0 // #0
400248b4: 94002c89 bl 4002fad8 <memset>
400248b8: 17fffff2 b 40024880 <_POSIX_Shm_Object_resize_from_heap+0x40>
err = EIO;
400248bc: 528000a0 mov w0, #0x5 // #5 <== NOT EXECUTED
return err;
400248c0: 17fffff2 b 40024888 <_POSIX_Shm_Object_resize_from_heap+0x48> <== NOT EXECUTED
...
0000000040025a40 <_POSIX_Shm_Object_resize_from_workspace>:
int _POSIX_Shm_Object_resize_from_workspace(
POSIX_Shm_Object *shm_obj,
size_t size
)
{
40025a40: a9be7bfd stp x29, x30, [sp, #-32]!
40025a44: 910003fd mov x29, sp
40025a48: a90153f3 stp x19, x20, [sp, #16]
40025a4c: aa0103f4 mov x20, x1
40025a50: aa0003f3 mov x19, x0
memset( shm_obj->handle, 0, shm_obj->size );
40025a54: f9400001 ldr x1, [x0]
int err;
if ( size == 0 ) {
40025a58: b4000294 cbz x20, 40025aa8 <_POSIX_Shm_Object_resize_from_workspace+0x68><== NEVER TAKEN
err = _POSIX_Shm_Object_delete_from_workspace( shm_obj );
} else if ( shm_obj->handle == NULL && shm_obj->size == 0 ) {
err = _POSIX_Shm_Object_create_from_workspace( shm_obj, size );
} else {
/* Refuse to resize a workspace object. */
err = EIO;
40025a5c: 528000a0 mov w0, #0x5 // #5
} else if ( shm_obj->handle == NULL && shm_obj->size == 0 ) {
40025a60: b4000081 cbz x1, 40025a70 <_POSIX_Shm_Object_resize_from_workspace+0x30><== ALWAYS TAKEN
}
return err;
}
40025a64: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40025a68: a8c27bfd ldp x29, x30, [sp], #32 <== NOT EXECUTED
40025a6c: d65f03c0 ret <== NOT EXECUTED
} else if ( shm_obj->handle == NULL && shm_obj->size == 0 ) {
40025a70: f9400661 ldr x1, [x19, #8]
40025a74: b5ffff81 cbnz x1, 40025a64 <_POSIX_Shm_Object_resize_from_workspace+0x24><== NEVER TAKEN
shm_obj->handle = _Workspace_Allocate( size );
40025a78: aa1403e0 mov x0, x20
40025a7c: 94000c15 bl 40028ad0 <_Workspace_Allocate>
40025a80: f9000260 str x0, [x19]
if ( shm_obj->handle == NULL ) {
40025a84: b4000280 cbz x0, 40025ad4 <_POSIX_Shm_Object_resize_from_workspace+0x94><== NEVER TAKEN
memset( shm_obj->handle, 0, size );
40025a88: aa1403e2 mov x2, x20
40025a8c: 52800001 mov w1, #0x0 // #0
40025a90: 94002b24 bl 40030720 <memset>
shm_obj->size = size;
40025a94: f9000674 str x20, [x19, #8]
return 0;
40025a98: 52800000 mov w0, #0x0 // #0
}
40025a9c: a94153f3 ldp x19, x20, [sp, #16]
40025aa0: a8c27bfd ldp x29, x30, [sp], #32
40025aa4: d65f03c0 ret
memset( shm_obj->handle, 0, shm_obj->size );
40025aa8: f9400662 ldr x2, [x19, #8] <== NOT EXECUTED
40025aac: aa0103e0 mov x0, x1 <== NOT EXECUTED
40025ab0: 52800001 mov w1, #0x0 // #0 <== NOT EXECUTED
40025ab4: 94002b1b bl 40030720 <memset> <== NOT EXECUTED
_Workspace_Free( shm_obj->handle );
40025ab8: f9400260 ldr x0, [x19] <== NOT EXECUTED
40025abc: 94000c0d bl 40028af0 <_Workspace_Free> <== NOT EXECUTED
shm_obj->size = 0;
40025ac0: a9007e7f stp xzr, xzr, [x19] <== NOT EXECUTED
err = _POSIX_Shm_Object_delete_from_workspace( shm_obj );
40025ac4: 52800000 mov w0, #0x0 // #0 <== NOT EXECUTED
}
40025ac8: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40025acc: a8c27bfd ldp x29, x30, [sp], #32 <== NOT EXECUTED
40025ad0: d65f03c0 ret <== NOT EXECUTED
return ENOMEM;
40025ad4: 52800180 mov w0, #0xc // #12 <== NOT EXECUTED
return err;
40025ad8: 17ffffe3 b 40025a64 <_POSIX_Shm_Object_resize_from_workspace+0x24> <== NOT EXECUTED
40025adc: 00000000 udf #0
0000000040026790 <_POSIX_Threads_Sporadic_budget_callout>:
{
40026790: a9ba7bfd stp x29, x30, [sp, #-96]!
40026794: 910003fd mov x29, sp
40026798: f90023ff str xzr, [sp, #64]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4002679c: f9412001 ldr x1, [x0, #576]
400267a0: d53b4222 mrs x2, daif
400267a4: d50342df msr daifset, #0x2
_ISR_lock_ISR_disable( &queue_context->Lock_context.Lock_context );
400267a8: b90023e2 str w2, [sp, #32]
return RB_COLOR( the_node, Node ) == -1;
400267ac: 9100e021 add x1, x1, #0x38
the_thread->cpu_time_budget = UINT32_MAX;
400267b0: 12800002 mov w2, #0xffffffff // #-1
400267b4: b900ec02 str w2, [x0, #236]
if ( !_Priority_Node_is_active( &api->Sporadic.Low_priority ) ) {
400267b8: b9401822 ldr w2, [x1, #24]
400267bc: 3100045f cmn w2, #0x1
400267c0: 540000e0 b.eq 400267dc <_POSIX_Threads_Sporadic_budget_callout+0x4c> // b.none<== ALWAYS TAKEN
_ISR_lock_ISR_enable( &queue_context->Lock_context.Lock_context );
400267c4: b94023e0 ldr w0, [sp, #32] <== NOT EXECUTED
__asm__ volatile (
400267c8: d51b4220 msr daif, x0 <== NOT EXECUTED
_Thread_Priority_update( &queue_context );
400267cc: 910083e0 add x0, sp, #0x20 <== NOT EXECUTED
400267d0: 94000728 bl 40028470 <_Thread_Priority_update> <== NOT EXECUTED
}
400267d4: a8c67bfd ldp x29, x30, [sp], #96 <== NOT EXECUTED
400267d8: d65f03c0 ret <== NOT EXECUTED
_Thread_Priority_add(
400267dc: 910083e2 add x2, sp, #0x20
400267e0: f9000bf3 str x19, [sp, #16]
400267e4: aa0003f3 mov x19, x0
400267e8: 940006da bl 40028350 <_Thread_Priority_add>
_Thread_Priority_remove(
400267ec: 91010261 add x1, x19, #0x40
400267f0: aa1303e0 mov x0, x19
400267f4: 910083e2 add x2, sp, #0x20
400267f8: 940006fa bl 400283e0 <_Thread_Priority_remove>
400267fc: f9400bf3 ldr x19, [sp, #16]
40026800: b94023e0 ldr w0, [sp, #32]
40026804: d51b4220 msr daif, x0
_Thread_Priority_update( &queue_context );
40026808: 910083e0 add x0, sp, #0x20
4002680c: 94000719 bl 40028470 <_Thread_Priority_update>
}
40026810: a8c67bfd ldp x29, x30, [sp], #96
40026814: d65f03c0 ret
...
000000004002b820 <_POSIX_Timer_TSR>:
/*
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR( Watchdog_Control *the_watchdog )
{
4002b820: a9bd7bfd stp x29, x30, [sp, #-48]!
4002b824: 910003fd mov x29, sp
4002b828: a90153f3 stp x19, x20, [sp, #16]
POSIX_Timer_Control *ptimer;
ISR_lock_Context lock_context;
Per_CPU_Control *cpu;
ptimer = RTEMS_CONTAINER_OF( the_watchdog, POSIX_Timer_Control, Timer );
4002b82c: d1008013 sub x19, x0, #0x20
__asm__ volatile (
4002b830: d53b4234 mrs x20, daif
4002b834: d50342df msr daifset, #0x2
_ISR_lock_ISR_disable( &lock_context );
cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context );
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
4002b838: b9409e60 ldr w0, [x19, #156]
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
4002b83c: f9403e61 ldr x1, [x19, #120]
ptimer->overrun = ptimer->overrun + 1;
4002b840: 11000400 add w0, w0, #0x1
4002b844: b9009e60 str w0, [x19, #156]
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
4002b848: b5000061 cbnz x1, 4002b854 <_POSIX_Timer_TSR+0x34>
4002b84c: f9404260 ldr x0, [x19, #128]
4002b850: b4000300 cbz x0, 4002b8b0 <_POSIX_Timer_TSR+0x90> <== NEVER TAKEN
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
_POSIX_Timer_Insert( ptimer, cpu, ptimer->ticks );
4002b854: f90013f5 str x21, [sp, #32]
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
4002b858: 52800060 mov w0, #0x3 // #3
4002b85c: 39015260 strb w0, [x19, #84]
_Timecounter_Nanotime( tod );
4002b860: 91028260 add x0, x19, #0xa0
_POSIX_Timer_Insert( ptimer, cpu, ptimer->ticks );
4002b864: b9409a75 ldr w21, [x19, #152]
4002b868: 97ffef62 bl 400275f0 <_Timecounter_Nanotime>
cpu->Watchdog.ticks + ticks
4002b86c: f0000760 adrp x0, 4011a000 <region_areas+0x1570>
_Watchdog_Insert(
4002b870: f9411c02 ldr x2, [x0, #568]
4002b874: 91008261 add x1, x19, #0x20
4002b878: f0000760 adrp x0, 4011a000 <region_areas+0x1570>
4002b87c: 91090000 add x0, x0, #0x240
4002b880: 8b354042 add x2, x2, w21, uxtw
4002b884: 97fffdc7 bl 4002afa0 <_Watchdog_Insert>
}
4002b888: f94013f5 ldr x21, [sp, #32]
__asm__ volatile (
4002b88c: 92407e94 and x20, x20, #0xffffffff
4002b890: d51b4234 msr daif, x20
/*
* 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 ) ) {
4002b894: b9405e61 ldr w1, [x19, #92]
4002b898: b9405260 ldr w0, [x19, #80]
4002b89c: 940008e1 bl 4002dc20 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
4002b8a0: b9009e7f str wzr, [x19, #156]
}
4002b8a4: a94153f3 ldp x19, x20, [sp, #16]
4002b8a8: a8c37bfd ldp x29, x30, [sp], #48
4002b8ac: d65f03c0 ret
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
4002b8b0: 52800080 mov w0, #0x4 // #4 <== NOT EXECUTED
4002b8b4: 39015260 strb w0, [x19, #84] <== NOT EXECUTED
4002b8b8: 17fffff5 b 4002b88c <_POSIX_Timer_TSR+0x6c> <== NOT EXECUTED
4002b8bc: 00000000 udf #0
00000000400a5b60 <_POSIX_signals_Clear_process_signals>:
_Assert( _ISR_Get_level() != 0 );
clear_signal = true;
mask = signo_to_mask( signo );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
400a5b60: 93407c02 sxtw x2, w0
400a5b64: d2800304 mov x4, #0x18 // #24
400a5b68: f0000343 adrp x3, 40110000 <__sf+0x58>
400a5b6c: 9125c063 add x3, x3, #0x970
400a5b70: 51000405 sub w5, w0, #0x1
400a5b74: 52800021 mov w1, #0x1 // #1
400a5b78: 9b047c42 mul x2, x2, x4
400a5b7c: 1ac52021 lsl w1, w1, w5
400a5b80: b8626862 ldr w2, [x3, x2]
400a5b84: 7100085f cmp w2, #0x2
400a5b88: 540000c0 b.eq 400a5ba0 <_POSIX_signals_Clear_process_signals+0x40> // b.none
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
400a5b8c: f0000340 adrp x0, 40110000 <__sf+0x58>
400a5b90: f9433402 ldr x2, [x0, #1640]
400a5b94: 8a210041 bic x1, x2, x1
400a5b98: f9033401 str x1, [x0, #1640]
}
}
400a5b9c: d65f03c0 ret
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
400a5ba0: 9b247c00 smull x0, w0, w4
return _Chain_Immutable_head( the_chain )->next;
400a5ba4: f0000342 adrp x2, 40110000 <__sf+0x58>
400a5ba8: 9119c042 add x2, x2, #0x670
return &the_chain->Tail.Node;
400a5bac: 91002003 add x3, x0, #0x8
400a5bb0: 8b020063 add x3, x3, x2
400a5bb4: f8626800 ldr x0, [x0, x2]
400a5bb8: eb03001f cmp x0, x3
400a5bbc: 54fffe80 b.eq 400a5b8c <_POSIX_signals_Clear_process_signals+0x2c> // b.none<== ALWAYS TAKEN
}
400a5bc0: d65f03c0 ret <== NOT EXECUTED
00000000400a51a0 <_POSIX_signals_Send>:
int _POSIX_signals_Send(
pid_t pid,
int sig,
const union sigval *value
)
{
400a51a0: a9bb7bfd stp x29, x30, [sp, #-80]!
400a51a4: 910003fd mov x29, sp
400a51a8: a90153f3 stp x19, x20, [sp, #16]
400a51ac: 2a0003f4 mov w20, w0
400a51b0: 2a0103f3 mov w19, w1
400a51b4: a9025bf5 stp x21, x22, [sp, #32]
400a51b8: aa0203f6 mov x22, x2
Per_CPU_Control *cpu_self;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
400a51bc: 97ffffc5 bl 400a50d0 <getpid>
400a51c0: 6b14001f cmp w0, w20
400a51c4: 540017a1 b.ne 400a54b8 <_POSIX_signals_Send+0x318> // b.any
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
400a51c8: 340016d3 cbz w19, 400a54a0 <_POSIX_signals_Send+0x300>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
400a51cc: 51000661 sub w1, w19, #0x1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
400a51d0: 71007c3f cmp w1, #0x1f
400a51d4: 54001668 b.hi 400a54a0 <_POSIX_signals_Send+0x300> // b.pmore
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 )
400a51d8: f0000355 adrp x21, 40110000 <__sf+0x58>
400a51dc: 9125c2b5 add x21, x21, #0x970
400a51e0: f9001bf7 str x23, [sp, #48]
400a51e4: 93407e77 sxtw x23, w19
400a51e8: d2800300 mov x0, #0x18 // #24
400a51ec: 9b0056e0 madd x0, x23, x0, x21
400a51f0: f9400800 ldr x0, [x0, #16]
400a51f4: f100041f cmp x0, #0x1
400a51f8: 54000cc0 b.eq 400a5390 <_POSIX_signals_Send+0x1f0> // b.none
/*
* 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 ) )
400a51fc: 51001260 sub w0, w19, #0x4
400a5200: 721d781f tst w0, #0xfffffffb
400a5204: 7a4b1a64 ccmp w19, #0xb, #0x4, ne // ne = any
400a5208: 540007c0 b.eq 400a5300 <_POSIX_signals_Send+0x160> // b.none
return 1u << (sig - 1);
400a520c: 52800034 mov w20, #0x1 // #1
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
400a5210: 290853f3 stp w19, w20, [sp, #64]
400a5214: 1ac12285 lsl w5, w20, w1
400a5218: 1ac12294 lsl w20, w20, w1
if ( !value ) {
400a521c: b4000b76 cbz x22, 400a5388 <_POSIX_signals_Send+0x1e8>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
400a5220: f94002c0 ldr x0, [x22]
400a5224: f90027e0 str x0, [sp, #72]
disable_level = cpu_self->thread_dispatch_disable_level;
400a5228: 90000316 adrp x22, 40105000 <_Thread_Objects+0x1f0>
400a522c: 911a02d6 add x22, x22, #0x680
400a5230: f94012c0 ldr x0, [x22, #32]
400a5234: b9401ac1 ldr w1, [x22, #24]
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Per_CPU_Get_executing( cpu_self );
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
400a5238: f9412002 ldr x2, [x0, #576]
cpu_self->thread_dispatch_disable_level = disable_level + 1;
400a523c: 11000421 add w1, w1, #0x1
400a5240: b9001ac1 str w1, [x22, #24]
400a5244: f9404441 ldr x1, [x2, #136]
400a5248: ea01029f tst x20, x1
400a524c: 540002a1 b.ne 400a52a0 <_POSIX_signals_Send+0x100> // b.any
* There is no requirement on the order of threads pending on a sigwait().
*/
/* XXX violation of visibility -- need to define thread queue support */
heads = _POSIX_signals_Wait_queue.Queue.heads;
400a5250: f00002c0 adrp x0, 40100000 <__dso_handle>
400a5254: f9467400 ldr x0, [x0, #3304]
if ( heads != NULL ) {
400a5258: b4000a80 cbz x0, 400a53a8 <_POSIX_signals_Send+0x208>
return _Chain_Immutable_head( the_chain )->next;
400a525c: aa0003e4 mov x4, x0
400a5260: f8408481 ldr x1, [x4], #8
Chain_Control *the_chain = &heads->Heads.Fifo;
for ( the_node = _Chain_First( the_chain );
400a5264: eb04003f cmp x1, x4
400a5268: 54000101 b.ne 400a5288 <_POSIX_signals_Send+0xe8> // b.any <== ALWAYS TAKEN
400a526c: 1400007f b 400a5468 <_POSIX_signals_Send+0x2c8> <== NOT EXECUTED
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (api->signals_unblocked & mask)
400a5270: f9404462 ldr x2, [x3, #136]
400a5274: ea02029f tst x20, x2
400a5278: 54000141 b.ne 400a52a0 <_POSIX_signals_Send+0x100> // b.any
the_node = the_node->next ) {
400a527c: f9400021 ldr x1, [x1]
for ( the_node = _Chain_First( the_chain );
400a5280: eb04003f cmp x1, x4
400a5284: 54000f20 b.eq 400a5468 <_POSIX_signals_Send+0x2c8> // b.none <== ALWAYS TAKEN
400a5288: f85f8020 ldur x0, [x1, #-8]
if (the_thread->Wait.option & mask)
400a528c: b9408802 ldr w2, [x0, #136]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
400a5290: f9412003 ldr x3, [x0, #576]
if (the_thread->Wait.option & mask)
400a5294: 6a0200bf tst w5, w2
400a5298: 54fffec0 b.eq 400a5270 <_POSIX_signals_Send+0xd0> // b.none
400a529c: d503201f nop
/*
* 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 ) ) {
400a52a0: 910103e2 add x2, sp, #0x40
400a52a4: 2a1303e1 mov w1, w19
400a52a8: 94000126 bl 400a5740 <_POSIX_signals_Unblock_thread>
400a52ac: 72001c1f tst w0, #0xff
400a52b0: 54000181 b.ne 400a52e0 <_POSIX_signals_Send+0x140> // b.any
/*
* 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 );
400a52b4: aa1403e0 mov x0, x20
400a52b8: 940000aa bl 400a5560 <_POSIX_signals_Set_process_signals>
__asm__ volatile (
400a52bc: d53b4220 mrs x0, daif
400a52c0: d50342df msr daifset, #0x2
_Thread_queue_Context_initialize( &queue_context );
_POSIX_signals_Acquire( &queue_context );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
400a52c4: d2800302 mov x2, #0x18 // #24
400a52c8: 9b027ef7 mul x23, x23, x2
400a52cc: b8776aa1 ldr w1, [x21, x23]
400a52d0: 7100083f cmp w1, #0x2
400a52d4: 54000240 b.eq 400a531c <_POSIX_signals_Send+0x17c> // b.none
400a52d8: 92407c00 and x0, x0, #0xffffffff
__asm__ volatile (
400a52dc: d51b4220 msr daif, x0
);
}
_POSIX_signals_Release( &queue_context );
DEBUG_STEP("\n");
_Thread_Dispatch_enable( cpu_self );
400a52e0: aa1603e0 mov x0, x22
400a52e4: 97fe0d0b bl 40028710 <_Thread_Dispatch_enable>
return 0;
400a52e8: f9401bf7 ldr x23, [sp, #48]
400a52ec: 52800000 mov w0, #0x0 // #0
}
400a52f0: a94153f3 ldp x19, x20, [sp, #16]
400a52f4: a9425bf5 ldp x21, x22, [sp, #32]
400a52f8: a8c57bfd ldp x29, x30, [sp], #80
400a52fc: d65f03c0 ret
return pthread_kill( pthread_self(), sig );
400a5300: 97fe0650 bl 40026c40 <pthread_self>
400a5304: 2a1303e1 mov w1, w19
}
400a5308: a94153f3 ldp x19, x20, [sp, #16]
400a530c: a9425bf5 ldp x21, x22, [sp, #32]
return pthread_kill( pthread_self(), sig );
400a5310: f9401bf7 ldr x23, [sp, #48]
}
400a5314: a8c57bfd ldp x29, x30, [sp], #80
return pthread_kill( pthread_self(), sig );
400a5318: 14000172 b 400a58e0 <pthread_kill>
return _Chain_Immutable_head( the_chain )->next;
400a531c: f0000344 adrp x4, 40110000 <__sf+0x58>
400a5320: 91194087 add x7, x4, #0x650
if ( !_Chain_Is_empty(the_chain))
400a5324: f0000343 adrp x3, 40110000 <__sf+0x58>
400a5328: 91196063 add x3, x3, #0x658
return _Chain_Immutable_head( the_chain )->next;
400a532c: f9432881 ldr x1, [x4, #1616]
return &the_chain->Tail.Node;
400a5330: 92407c00 and x0, x0, #0xffffffff
if ( !_Chain_Is_empty(the_chain))
400a5334: eb03003f cmp x1, x3
400a5338: 54000a00 b.eq 400a5478 <_POSIX_signals_Send+0x2d8> // b.none
new_first = old_first->next;
400a533c: aa0103e5 mov x5, x1
400a5340: 9b227e73 smull x19, w19, w2
_Chain_Append_unprotected(
400a5344: f0000343 adrp x3, 40110000 <__sf+0x58>
400a5348: 9119c063 add x3, x3, #0x670
400a534c: 8b030262 add x2, x19, x3
return &the_chain->Tail.Node;
400a5350: 91002273 add x19, x19, #0x8
new_first = old_first->next;
400a5354: f84104a6 ldr x6, [x5], #16
return &the_chain->Tail.Node;
400a5358: 8b030273 add x19, x19, x3
psiginfo->Info = *siginfo;
400a535c: a9440fe8 ldp x8, x3, [sp, #64]
head->next = new_first;
400a5360: f9032886 str x6, [x4, #1616]
new_first->previous = head;
400a5364: f90004c7 str x7, [x6, #8]
400a5368: f9000828 str x8, [x1, #16]
400a536c: f90004a3 str x3, [x5, #8]
old_last = tail->previous;
400a5370: f9400843 ldr x3, [x2, #16]
the_node->next = tail;
400a5374: f9000033 str x19, [x1]
tail->previous = the_node;
400a5378: f9000841 str x1, [x2, #16]
old_last->next = the_node;
400a537c: f9000061 str x1, [x3]
the_node->previous = old_last;
400a5380: f9000423 str x3, [x1, #8]
}
400a5384: 17ffffd6 b 400a52dc <_POSIX_signals_Send+0x13c>
siginfo->si_value.sival_int = 0;
400a5388: b9004bff str wzr, [sp, #72]
400a538c: 17ffffa7 b 400a5228 <_POSIX_signals_Send+0x88>
return 0;
400a5390: 52800000 mov w0, #0x0 // #0
}
400a5394: a94153f3 ldp x19, x20, [sp, #16]
400a5398: a9425bf5 ldp x21, x22, [sp, #32]
return 0;
400a539c: f9401bf7 ldr x23, [sp, #48]
}
400a53a0: a8c57bfd ldp x29, x30, [sp], #80
400a53a4: d65f03c0 ret
400a53a8: d2800048 mov x8, #0x2 // #2
400a53ac: 92800004 mov x4, #0xffffffffffffffff // #-1
400a53b0: d0000009 adrp x9, 400a7000 <status_code_text+0x100>
400a53b4: 91062129 add x9, x9, #0x188
the_info = _Objects_Information_table[ the_api ][ 1 ];
400a53b8: f8687921 ldr x1, [x9, x8, lsl #3]
400a53bc: f9400421 ldr x1, [x1, #8]
if ( !the_info )
400a53c0: b4000481 cbz x1, 400a5450 <_POSIX_signals_Send+0x2b0>
*/
RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_index(
Objects_Id id
)
{
return
400a53c4: 79400025 ldrh w5, [x1]
object_table = the_info->local_table;
400a53c8: f9400426 ldr x6, [x1, #8]
for ( index = 0 ; index < maximum ; ++index ) {
400a53cc: 34000425 cbz w5, 400a5450 <_POSIX_signals_Send+0x2b0>
400a53d0: d2800001 mov x1, #0x0 // #0
400a53d4: 1400000e b 400a540c <_POSIX_signals_Send+0x26c>
if ( interested && !_States_Is_ready( interested->current_state ) ) {
400a53d8: b4000140 cbz x0, 400a5400 <_POSIX_signals_Send+0x260> <== NEVER TAKEN
400a53dc: b9403807 ldr w7, [x0, #56]
400a53e0: 34000107 cbz w7, 400a5400 <_POSIX_signals_Send+0x260>
if ( _States_Is_ready( the_thread->current_state ) ) {
400a53e4: b940384a ldr w10, [x2, #56]
400a53e8: 340002aa cbz w10, 400a543c <_POSIX_signals_Send+0x29c>
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
400a53ec: 37e000a7 tbnz w7, #28, 400a5400 <_POSIX_signals_Send+0x260>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal (
States_Control the_states
)
{
return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL);
400a53f0: 7204014a ands w10, w10, #0x10000000
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
400a53f4: 9a830084 csel x4, x4, x3, eq // eq = none
400a53f8: 9a820000 csel x0, x0, x2, eq // eq = none
400a53fc: d503201f nop
for ( index = 0 ; index < maximum ; ++index ) {
400a5400: 91000421 add x1, x1, #0x1
400a5404: 6b0100bf cmp w5, w1
400a5408: 54000249 b.ls 400a5450 <_POSIX_signals_Send+0x2b0> // b.plast
the_thread = (Thread_Control *) object_table[ index ];
400a540c: f86178c2 ldr x2, [x6, x1, lsl #3]
if ( !the_thread )
400a5410: b4ffff82 cbz x2, 400a5400 <_POSIX_signals_Send+0x260>
return aggregation->Node.priority;
400a5414: f9403443 ldr x3, [x2, #104]
400a5418: f9401463 ldr x3, [x3, #40]
if ( _Thread_Get_priority( the_thread ) > interested_priority )
400a541c: eb04007f cmp x3, x4
400a5420: 54ffff08 b.hi 400a5400 <_POSIX_signals_Send+0x260> // b.pmore
if ( !_POSIX_signals_Is_interested( api, mask ) )
400a5424: f9412047 ldr x7, [x2, #576]
400a5428: f94044e7 ldr x7, [x7, #136]
400a542c: ea07029f tst x20, x7
400a5430: 54fffe80 b.eq 400a5400 <_POSIX_signals_Send+0x260> // b.none
if ( _Thread_Get_priority( the_thread ) < interested_priority ) {
400a5434: eb04007f cmp x3, x4
400a5438: 54fffd02 b.cs 400a53d8 <_POSIX_signals_Send+0x238> // b.hs, b.nlast
for ( index = 0 ; index < maximum ; ++index ) {
400a543c: 91000421 add x1, x1, #0x1
400a5440: aa0303e4 mov x4, x3
400a5444: aa0203e0 mov x0, x2
400a5448: 6b0100bf cmp w5, w1
400a544c: 54fffe08 b.hi 400a540c <_POSIX_signals_Send+0x26c> // b.pmore
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
400a5450: f1000d1f cmp x8, #0x3
400a5454: 54000061 b.ne 400a5460 <_POSIX_signals_Send+0x2c0> // b.any
if ( interested ) {
400a5458: b5fff240 cbnz x0, 400a52a0 <_POSIX_signals_Send+0x100>
400a545c: 17ffff96 b 400a52b4 <_POSIX_signals_Send+0x114>
400a5460: d2800068 mov x8, #0x3 // #3
400a5464: 17ffffd5 b 400a53b8 <_POSIX_signals_Send+0x218>
for ( the_node = _Chain_First( the_chain );
400a5468: d2800048 mov x8, #0x2 // #2
400a546c: 92800004 mov x4, #0xffffffffffffffff // #-1
400a5470: d2800000 mov x0, #0x0 // #0
400a5474: 17ffffcf b 400a53b0 <_POSIX_signals_Send+0x210>
400a5478: d51b4220 msr daif, x0
_Thread_Dispatch_enable( cpu_self );
400a547c: aa1603e0 mov x0, x22
400a5480: 97fe0ca4 bl 40028710 <_Thread_Dispatch_enable>
rtems_set_errno_and_return_minus_one( EAGAIN );
400a5484: 97ff7713 bl 400830d0 <__errno>
400a5488: aa0003e1 mov x1, x0
400a548c: 52800162 mov w2, #0xb // #11
400a5490: 12800000 mov w0, #0xffffffff // #-1
400a5494: f9401bf7 ldr x23, [sp, #48]
400a5498: b9000022 str w2, [x1]
400a549c: 17ffff95 b 400a52f0 <_POSIX_signals_Send+0x150>
rtems_set_errno_and_return_minus_one( EINVAL );
400a54a0: 97ff770c bl 400830d0 <__errno>
400a54a4: aa0003e1 mov x1, x0
400a54a8: 528002c2 mov w2, #0x16 // #22
400a54ac: 12800000 mov w0, #0xffffffff // #-1
400a54b0: b9000022 str w2, [x1]
400a54b4: 17ffff8f b 400a52f0 <_POSIX_signals_Send+0x150>
rtems_set_errno_and_return_minus_one( ESRCH );
400a54b8: 97ff7706 bl 400830d0 <__errno>
400a54bc: aa0003e1 mov x1, x0
400a54c0: 52800062 mov w2, #0x3 // #3
400a54c4: 12800000 mov w0, #0xffffffff // #-1
400a54c8: b9000022 str w2, [x1]
400a54cc: 17ffff89 b 400a52f0 <_POSIX_signals_Send+0x150>
00000000400a5740 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
400a5740: a9bd7bfd stp x29, x30, [sp, #-48]!
400a5744: 51000423 sub w3, w1, #0x1
400a5748: 52800024 mov w4, #0x1 // #1
400a574c: 910003fd mov x29, sp
400a5750: a90153f3 stp x19, x20, [sp, #16]
400a5754: 1ac32087 lsl w7, w4, w3
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
400a5758: b9403805 ldr w5, [x0, #56]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
400a575c: f9412014 ldr x20, [x0, #576]
{
400a5760: f90013f5 str x21, [sp, #32]
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
400a5764: 52808006 mov w6, #0x400 // #1024
400a5768: 72a20006 movk w6, #0x1000, lsl #16
{
400a576c: aa0003f3 mov x19, x0
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
400a5770: 6a2500df bics wzr, w6, w5
_Chain_Append_if_is_off_chain_unprotected(
400a5774: 91026295 add x21, x20, #0x98
400a5778: 1ac32083 lsl w3, w4, w3
400a577c: 540002e0 b.eq 400a57d8 <_POSIX_signals_Unblock_thread+0x98> // b.none
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( api->signals_unblocked & mask ) {
400a5780: f9404681 ldr x1, [x20, #136]
400a5784: ea01007f tst x3, x1
400a5788: 54000040 b.eq 400a5790 <_POSIX_signals_Unblock_thread+0x50> // b.none
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
400a578c: 37e008c5 tbnz w5, #28, 400a58a4 <_POSIX_signals_Unblock_thread+0x164>
__asm__ volatile (
400a5790: d53b4220 mrs x0, daif
400a5794: d50342df msr daifset, #0x2
cpu_self->dispatch_necessary = true;
400a5798: 90000301 adrp x1, 40105000 <_Thread_Objects+0x1f0>
400a579c: 911a0021 add x1, x1, #0x680
if ( _Chain_Is_node_off_chain( the_node ) ) {
400a57a0: f9404e83 ldr x3, [x20, #152]
action->handler = handler;
400a57a4: 90000002 adrp x2, 400a5000 <__trunctfdf2+0x2c0>
400a57a8: 91190042 add x2, x2, #0x640
400a57ac: f9000aa2 str x2, [x21, #16]
400a57b0: 52800022 mov w2, #0x1 // #1
400a57b4: 39007022 strb w2, [x1, #28]
400a57b8: b4000303 cbz x3, 400a5818 <_POSIX_signals_Unblock_thread+0xd8>
__asm__ volatile (
400a57bc: 92407c00 and x0, x0, #0xffffffff
400a57c0: d51b4220 msr daif, x0
the_thread->Wait.return_code = STATUS_INTERRUPTED;
_Thread_queue_Extract_with_proxy( the_thread );
}
}
return _POSIX_signals_Unblock_thread_done( the_thread, api, false );
400a57c4: 52800000 mov w0, #0x0 // #0
}
400a57c8: a94153f3 ldp x19, x20, [sp, #16]
400a57cc: f94013f5 ldr x21, [sp, #32]
400a57d0: a8c37bfd ldp x29, x30, [sp], #48
400a57d4: d65f03c0 ret
if ( (the_thread->Wait.option & mask) || (api->signals_unblocked & mask) ) {
400a57d8: b9408800 ldr w0, [x0, #136]
400a57dc: 6a0000ff tst w7, w0
400a57e0: 540002a1 b.ne 400a5834 <_POSIX_signals_Unblock_thread+0xf4> // b.any
400a57e4: f9404680 ldr x0, [x20, #136]
400a57e8: ea00007f tst x3, x0
400a57ec: 54000241 b.ne 400a5834 <_POSIX_signals_Unblock_thread+0xf4> // b.any
__asm__ volatile (
400a57f0: d53b4220 mrs x0, daif
400a57f4: d50342df msr daifset, #0x2
400a57f8: 90000301 adrp x1, 40105000 <_Thread_Objects+0x1f0>
400a57fc: 911a0021 add x1, x1, #0x680
400a5800: f9404e83 ldr x3, [x20, #152]
400a5804: 90000002 adrp x2, 400a5000 <__trunctfdf2+0x2c0>
400a5808: 91190042 add x2, x2, #0x640
400a580c: f9000aa2 str x2, [x21, #16]
400a5810: 39007024 strb w4, [x1, #28]
400a5814: b5fffd43 cbnz x3, 400a57bc <_POSIX_signals_Unblock_thread+0x7c> <== NEVER TAKEN
old_last = tail->previous;
400a5818: 9105a273 add x19, x19, #0x168
400a581c: f9400661 ldr x1, [x19, #8]
the_node->next = tail;
400a5820: f9004e93 str x19, [x20, #152]
tail->previous = the_node;
400a5824: f9000675 str x21, [x19, #8]
old_last->next = the_node;
400a5828: f9000035 str x21, [x1]
the_node->previous = old_last;
400a582c: f90006a1 str x1, [x21, #8]
}
400a5830: 17ffffe3 b 400a57bc <_POSIX_signals_Unblock_thread+0x7c>
the_thread->Wait.return_code = STATUS_INTERRUPTED;
400a5834: 528081a0 mov w0, #0x40d // #1037
400a5838: b9008e60 str w0, [x19, #140]
the_info = (siginfo_t *) the_thread->Wait.return_argument;
400a583c: f9403e60 ldr x0, [x19, #120]
if ( !info ) {
400a5840: b40003a2 cbz x2, 400a58b4 <_POSIX_signals_Unblock_thread+0x174>
*the_info = *info;
400a5844: f9400041 ldr x1, [x2]
400a5848: f9000001 str x1, [x0]
400a584c: f9400441 ldr x1, [x2, #8]
400a5850: f9000401 str x1, [x0, #8]
_Thread_queue_Extract_with_proxy( the_thread );
400a5854: aa1303e0 mov x0, x19
400a5858: 97fe1d16 bl 4002ccb0 <_Thread_queue_Extract_with_proxy>
400a585c: d53b4220 mrs x0, daif
400a5860: d50342df msr daifset, #0x2
400a5864: 90000301 adrp x1, 40105000 <_Thread_Objects+0x1f0>
400a5868: 911a0021 add x1, x1, #0x680
if ( _Chain_Is_node_off_chain( the_node ) ) {
400a586c: f9404e83 ldr x3, [x20, #152]
400a5870: 90000002 adrp x2, 400a5000 <__trunctfdf2+0x2c0>
400a5874: 91190042 add x2, x2, #0x640
400a5878: f9000aa2 str x2, [x21, #16]
400a587c: 52800022 mov w2, #0x1 // #1
400a5880: 39007022 strb w2, [x1, #28]
400a5884: b4000203 cbz x3, 400a58c4 <_POSIX_signals_Unblock_thread+0x184> <== ALWAYS TAKEN
__asm__ volatile (
400a5888: 92407c00 and x0, x0, #0xffffffff
400a588c: d51b4220 msr daif, x0
return _POSIX_signals_Unblock_thread_done( the_thread, api, true );
400a5890: 52800020 mov w0, #0x1 // #1
}
400a5894: a94153f3 ldp x19, x20, [sp, #16]
400a5898: f94013f5 ldr x21, [sp, #32]
400a589c: a8c37bfd ldp x29, x30, [sp], #48
400a58a0: d65f03c0 ret
the_thread->Wait.return_code = STATUS_INTERRUPTED;
400a58a4: 528081a1 mov w1, #0x40d // #1037
400a58a8: b9008c01 str w1, [x0, #140]
_Thread_queue_Extract_with_proxy( the_thread );
400a58ac: 97fe1d01 bl 4002ccb0 <_Thread_queue_Extract_with_proxy>
400a58b0: 17ffffb8 b 400a5790 <_POSIX_signals_Unblock_thread+0x50>
the_info->si_code = SI_USER;
400a58b4: 52800022 mov w2, #0x1 // #1
400a58b8: 29000801 stp w1, w2, [x0]
the_info->si_value.sival_int = 0;
400a58bc: b900081f str wzr, [x0, #8]
400a58c0: 17ffffe5 b 400a5854 <_POSIX_signals_Unblock_thread+0x114>
old_last = tail->previous;
400a58c4: 9105a273 add x19, x19, #0x168
400a58c8: f9400661 ldr x1, [x19, #8]
the_node->next = tail;
400a58cc: f9004e93 str x19, [x20, #152]
tail->previous = the_node;
400a58d0: f9000675 str x21, [x19, #8]
old_last->next = the_node;
400a58d4: f9000035 str x21, [x1]
the_node->previous = old_last;
400a58d8: f90006a1 str x1, [x21, #8]
}
400a58dc: 17ffffeb b 400a5888 <_POSIX_signals_Unblock_thread+0x148>
0000000040028320 <aio_cancel>:
#include <errno.h>
#include <stdlib.h>
#include <rtems/seterr.h>
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
40028320: a9bd7bfd stp x29, x30, [sp, #-48]!
40028324: 910003fd mov x29, sp
40028328: a90153f3 stp x19, x20, [sp, #16]
rtems_chain_control *idle_req_chain = &aio_request_queue.idle_req;
rtems_chain_control *work_req_chain = &aio_request_queue.work_req;
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
4002832c: f0000733 adrp x19, 4010f000 <_Thread_Objects+0x5f0>
40028330: 911e0273 add x19, x19, #0x780
{
40028334: aa0103f4 mov x20, x1
40028338: a9025bf5 stp x21, x22, [sp, #32]
4002833c: 2a0003f5 mov w21, w0
pthread_mutex_lock (&aio_request_queue.mutex);
40028340: aa1303e0 mov x0, x19
40028344: 94000917 bl 4002a7a0 <pthread_mutex_lock>
if (fcntl (fildes, F_GETFD) < 0) {
40028348: 2a1503e0 mov w0, w21
4002834c: 52800021 mov w1, #0x1 // #1
40028350: 9400036c bl 40029100 <fcntl>
40028354: 37f80d40 tbnz w0, #31, 400284fc <aio_cancel+0x1dc>
pthread_mutex_unlock(&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EBADF);
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
40028358: b40006b4 cbz x20, 4002842c <aio_cancel+0x10c>
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
4002835c: b9400296 ldr w22, [x20]
40028360: 6b1502df cmp w22, w21
40028364: 54000be1 b.ne 400284e0 <aio_cancel+0x1c0> // b.any
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (work_req_chain, fildes, 0);
40028368: 2a1603e1 mov w1, w22
4002836c: f0000720 adrp x0, 4010f000 <_Thread_Objects+0x5f0>
40028370: 91222000 add x0, x0, #0x888
40028374: 52800002 mov w2, #0x0 // #0
40028378: 9400018a bl 400289a0 <rtems_aio_search_fd>
4002837c: aa0003f5 mov x21, x0
if (r_chain == NULL) {
40028380: b50002e0 cbnz x0, 400283dc <aio_cancel+0xbc>
if (!rtems_chain_is_empty (idle_req_chain)) {
40028384: f9409261 ldr x1, [x19, #288]
40028388: f0000720 adrp x0, 4010f000 <_Thread_Objects+0x5f0>
4002838c: 9122a000 add x0, x0, #0x8a8
40028390: eb00003f cmp x1, x0
40028394: 54000440 b.eq 4002841c <aio_cancel+0xfc> // b.none <== NEVER TAKEN
r_chain = rtems_aio_search_fd (idle_req_chain, fildes, 0);
40028398: f0000720 adrp x0, 4010f000 <_Thread_Objects+0x5f0>
4002839c: 91228000 add x0, x0, #0x8a0
400283a0: 2a1603e1 mov w1, w22
400283a4: 52800002 mov w2, #0x0 // #0
400283a8: 9400017e bl 400289a0 <rtems_aio_search_fd>
if (r_chain == NULL) {
400283ac: b40009a0 cbz x0, 400284e0 <aio_cancel+0x1c0>
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
400283b0: aa1403e1 mov x1, x20
400283b4: 91004000 add x0, x0, #0x10
400283b8: 940001ee bl 40028b70 <rtems_aio_remove_req>
400283bc: 2a0003f4 mov w20, w0
pthread_mutex_unlock (&aio_request_queue.mutex);
400283c0: aa1303e0 mov x0, x19
400283c4: 940009b7 bl 4002aaa0 <pthread_mutex_unlock>
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
400283c8: 2a1403e0 mov w0, w20
400283cc: a94153f3 ldp x19, x20, [sp, #16]
400283d0: a9425bf5 ldp x21, x22, [sp, #32]
400283d4: a8c37bfd ldp x29, x30, [sp], #48
400283d8: d65f03c0 ret
pthread_mutex_lock (&r_chain->mutex);
400283dc: 9100c016 add x22, x0, #0x30
400283e0: aa1603e0 mov x0, x22
400283e4: 940008ef bl 4002a7a0 <pthread_mutex_lock>
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
400283e8: aa1403e1 mov x1, x20
400283ec: 910042a0 add x0, x21, #0x10
400283f0: 940001e0 bl 40028b70 <rtems_aio_remove_req>
400283f4: 2a0003f4 mov w20, w0
pthread_mutex_unlock (&r_chain->mutex);
400283f8: aa1603e0 mov x0, x22
400283fc: 940009a9 bl 4002aaa0 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
40028400: aa1303e0 mov x0, x19
40028404: 940009a7 bl 4002aaa0 <pthread_mutex_unlock>
}
40028408: 2a1403e0 mov w0, w20
4002840c: a94153f3 ldp x19, x20, [sp, #16]
40028410: a9425bf5 ldp x21, x22, [sp, #32]
40028414: a8c37bfd ldp x29, x30, [sp], #48
40028418: d65f03c0 ret
pthread_mutex_unlock(&aio_request_queue.mutex);
4002841c: aa1303e0 mov x0, x19
return AIO_ALLDONE;
40028420: 52800054 mov w20, #0x2 // #2
pthread_mutex_unlock(&aio_request_queue.mutex);
40028424: 9400099f bl 4002aaa0 <pthread_mutex_unlock>
return AIO_ALLDONE;
40028428: 17ffffe8 b 400283c8 <aio_cancel+0xa8>
r_chain = rtems_aio_search_fd (work_req_chain, fildes, 0);
4002842c: 2a1503e1 mov w1, w21
40028430: f0000720 adrp x0, 4010f000 <_Thread_Objects+0x5f0>
40028434: 91222000 add x0, x0, #0x888
40028438: 52800002 mov w2, #0x0 // #0
4002843c: 94000159 bl 400289a0 <rtems_aio_search_fd>
40028440: aa0003f6 mov x22, x0
if (r_chain == NULL) {
40028444: b5000340 cbnz x0, 400284ac <aio_cancel+0x18c>
if (!rtems_chain_is_empty (idle_req_chain)) {
40028448: f9409261 ldr x1, [x19, #288]
4002844c: f0000720 adrp x0, 4010f000 <_Thread_Objects+0x5f0>
40028450: 9122a000 add x0, x0, #0x8a8
40028454: eb00003f cmp x1, x0
40028458: 54fffe20 b.eq 4002841c <aio_cancel+0xfc> // b.none <== NEVER TAKEN
r_chain = rtems_aio_search_fd (idle_req_chain, fildes, 0);
4002845c: 2a1503e1 mov w1, w21
40028460: f0000720 adrp x0, 4010f000 <_Thread_Objects+0x5f0>
40028464: 91228000 add x0, x0, #0x8a0
40028468: 52800002 mov w2, #0x0 // #0
4002846c: 9400014d bl 400289a0 <rtems_aio_search_fd>
40028470: aa0003f5 mov x21, x0
if (r_chain == NULL) {
40028474: b4fffd40 cbz x0, 4002841c <aio_cancel+0xfc>
rtems_chain_extract (&r_chain->next_fd);
40028478: 94000cfa bl 4002b860 <rtems_chain_extract>
return AIO_CANCELED;
4002847c: 52800014 mov w20, #0x0 // #0
rtems_aio_remove_fd (r_chain);
40028480: aa1503e0 mov x0, x21
40028484: 9400019f bl 40028b00 <rtems_aio_remove_fd>
pthread_mutex_destroy (&r_chain->mutex);
40028488: 9100c2a0 add x0, x21, #0x30
4002848c: 94000859 bl 4002a5f0 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->cond);
40028490: 910242a0 add x0, x21, #0x90
40028494: 9400072f bl 4002a150 <pthread_cond_destroy>
free (r_chain);
40028498: aa1503e0 mov x0, x21
4002849c: 97ffe369 bl 40021240 <free>
pthread_mutex_unlock (&aio_request_queue.mutex);
400284a0: aa1303e0 mov x0, x19
400284a4: 9400097f bl 4002aaa0 <pthread_mutex_unlock>
return AIO_CANCELED;
400284a8: 17ffffc8 b 400283c8 <aio_cancel+0xa8>
pthread_mutex_lock (&r_chain->mutex);
400284ac: 9100c015 add x21, x0, #0x30
return AIO_CANCELED;
400284b0: 52800014 mov w20, #0x0 // #0
pthread_mutex_lock (&r_chain->mutex);
400284b4: aa1503e0 mov x0, x21
400284b8: 940008ba bl 4002a7a0 <pthread_mutex_lock>
rtems_chain_extract (&r_chain->next_fd);
400284bc: aa1603e0 mov x0, x22
400284c0: 94000ce8 bl 4002b860 <rtems_chain_extract>
rtems_aio_remove_fd (r_chain);
400284c4: aa1603e0 mov x0, x22
400284c8: 9400018e bl 40028b00 <rtems_aio_remove_fd>
pthread_mutex_unlock (&r_chain->mutex);
400284cc: aa1503e0 mov x0, x21
400284d0: 94000974 bl 4002aaa0 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
400284d4: aa1303e0 mov x0, x19
400284d8: 94000972 bl 4002aaa0 <pthread_mutex_unlock>
return AIO_CANCELED;
400284dc: 17ffffbb b 400283c8 <aio_cancel+0xa8>
pthread_mutex_unlock (&aio_request_queue.mutex);
400284e0: aa1303e0 mov x0, x19
400284e4: 9400096f bl 4002aaa0 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
400284e8: 940022fd bl 400310dc <__errno>
400284ec: 12800014 mov w20, #0xffffffff // #-1
400284f0: 528002c1 mov w1, #0x16 // #22
400284f4: b9000001 str w1, [x0]
400284f8: 17ffffb4 b 400283c8 <aio_cancel+0xa8>
pthread_mutex_unlock(&aio_request_queue.mutex);
400284fc: aa1303e0 mov x0, x19
40028500: 94000968 bl 4002aaa0 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
40028504: 940022f6 bl 400310dc <__errno>
40028508: 12800014 mov w20, #0xffffffff // #-1
4002850c: 52800121 mov w1, #0x9 // #9
40028510: b9000001 str w1, [x0]
40028514: 17ffffad b 400283c8 <aio_cancel+0xa8>
...
0000000040028530 <aio_fsync>:
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
40028530: a9be7bfd stp x29, x30, [sp, #-32]!
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
40028534: 7140081f cmp w0, #0x2, lsl #12
{
40028538: 910003fd mov x29, sp
4002853c: a90153f3 stp x19, x20, [sp, #16]
40028540: aa0103f3 mov x19, x1
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
40028544: 528002d4 mov w20, #0x16 // #22
if (op != O_SYNC)
40028548: 54000261 b.ne 40028594 <aio_fsync+0x64> // b.any
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
4002854c: b9400260 ldr w0, [x19]
40028550: 52800061 mov w1, #0x3 // #3
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
40028554: 52800134 mov w20, #0x9 // #9
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
40028558: 940002ea bl 40029100 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
4002855c: 12000400 and w0, w0, #0x3
40028560: 51000400 sub w0, w0, #0x1
40028564: 7100041f cmp w0, #0x1
40028568: 54000168 b.hi 40028594 <aio_fsync+0x64> // b.pmore
req = malloc (sizeof (rtems_aio_request));
4002856c: d2800500 mov x0, #0x28 // #40
40028570: 97ffe3f4 bl 40021540 <malloc>
if (req == NULL)
40028574: b40000e0 cbz x0, 40028590 <aio_fsync+0x60> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
40028578: 52800062 mov w2, #0x3 // #3
req->aiocbp = aiocbp;
4002857c: f9001013 str x19, [x0, #32]
req->aiocbp->aio_lio_opcode = LIO_SYNC;
40028580: b9004a62 str w2, [x19, #72]
return rtems_aio_enqueue (req);
}
40028584: a94153f3 ldp x19, x20, [sp, #16]
40028588: a8c27bfd ldp x29, x30, [sp], #32
return rtems_aio_enqueue (req);
4002858c: 1400019d b 40028c00 <rtems_aio_enqueue>
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
40028590: 52800174 mov w20, #0xb // #11 <== NOT EXECUTED
40028594: 92800000 mov x0, #0xffffffffffffffff // #-1
40028598: b9004e74 str w20, [x19, #76]
4002859c: f9002a60 str x0, [x19, #80]
400285a0: 940022cf bl 400310dc <__errno>
400285a4: b9000014 str w20, [x0]
}
400285a8: 12800000 mov w0, #0xffffffff // #-1
400285ac: a94153f3 ldp x19, x20, [sp, #16]
400285b0: a8c27bfd ldp x29, x30, [sp], #32
400285b4: d65f03c0 ret
...
0000000040028e30 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
40028e30: a9be7bfd stp x29, x30, [sp, #-32]!
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
40028e34: 52800061 mov w1, #0x3 // #3
{
40028e38: 910003fd mov x29, sp
40028e3c: a90153f3 stp x19, x20, [sp, #16]
40028e40: aa0003f3 mov x19, x0
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
40028e44: b9400000 ldr w0, [x0]
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
40028e48: 52800134 mov w20, #0x9 // #9
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
40028e4c: 940000ad bl 40029100 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
40028e50: 370001e0 tbnz w0, #0, 40028e8c <aio_read+0x5c>
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
40028e54: b9402260 ldr w0, [x19, #32]
40028e58: 35000180 cbnz w0, 40028e88 <aio_read+0x58>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
40028e5c: f9400660 ldr x0, [x19, #8]
40028e60: b7f80140 tbnz x0, #63, 40028e88 <aio_read+0x58>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
40028e64: d2800500 mov x0, #0x28 // #40
40028e68: 97ffe1b6 bl 40021540 <malloc>
if (req == NULL)
40028e6c: b4000220 cbz x0, 40028eb0 <aio_read+0x80> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
40028e70: 52800022 mov w2, #0x1 // #1
req->aiocbp = aiocbp;
40028e74: f9001013 str x19, [x0, #32]
req->aiocbp->aio_lio_opcode = LIO_READ;
40028e78: b9004a62 str w2, [x19, #72]
return rtems_aio_enqueue (req);
}
40028e7c: a94153f3 ldp x19, x20, [sp, #16]
40028e80: a8c27bfd ldp x29, x30, [sp], #32
return rtems_aio_enqueue (req);
40028e84: 17ffff5f b 40028c00 <rtems_aio_enqueue>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
40028e88: 528002d4 mov w20, #0x16 // #22
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
40028e8c: 92800000 mov x0, #0xffffffffffffffff // #-1
40028e90: b9004e74 str w20, [x19, #76]
40028e94: f9002a60 str x0, [x19, #80]
40028e98: 94002091 bl 400310dc <__errno>
40028e9c: b9000014 str w20, [x0]
}
40028ea0: 12800000 mov w0, #0xffffffff // #-1
40028ea4: a94153f3 ldp x19, x20, [sp, #16]
40028ea8: a8c27bfd ldp x29, x30, [sp], #32
40028eac: d65f03c0 ret
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
40028eb0: 52800174 mov w20, #0xb // #11 <== NOT EXECUTED
40028eb4: 17fffff6 b 40028e8c <aio_read+0x5c> <== NOT EXECUTED
...
0000000040028ed0 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
40028ed0: a9be7bfd stp x29, x30, [sp, #-32]!
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
40028ed4: 52800061 mov w1, #0x3 // #3
{
40028ed8: 910003fd mov x29, sp
40028edc: a90153f3 stp x19, x20, [sp, #16]
40028ee0: aa0003f3 mov x19, x0
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
40028ee4: b9400000 ldr w0, [x0]
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
40028ee8: 52800134 mov w20, #0x9 // #9
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
40028eec: 94000085 bl 40029100 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
40028ef0: 12000400 and w0, w0, #0x3
40028ef4: 51000400 sub w0, w0, #0x1
40028ef8: 7100041f cmp w0, #0x1
40028efc: 540001e8 b.hi 40028f38 <aio_write+0x68> // b.pmore
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
40028f00: b9402260 ldr w0, [x19, #32]
40028f04: 35000180 cbnz w0, 40028f34 <aio_write+0x64>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
40028f08: f9400660 ldr x0, [x19, #8]
40028f0c: b7f80140 tbnz x0, #63, 40028f34 <aio_write+0x64>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
40028f10: d2800500 mov x0, #0x28 // #40
40028f14: 97ffe18b bl 40021540 <malloc>
if (req == NULL)
40028f18: b4000220 cbz x0, 40028f5c <aio_write+0x8c> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
40028f1c: 52800042 mov w2, #0x2 // #2
req->aiocbp = aiocbp;
40028f20: f9001013 str x19, [x0, #32]
req->aiocbp->aio_lio_opcode = LIO_WRITE;
40028f24: b9004a62 str w2, [x19, #72]
return rtems_aio_enqueue (req);
}
40028f28: a94153f3 ldp x19, x20, [sp, #16]
40028f2c: a8c27bfd ldp x29, x30, [sp], #32
return rtems_aio_enqueue (req);
40028f30: 17ffff34 b 40028c00 <rtems_aio_enqueue>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
40028f34: 528002d4 mov w20, #0x16 // #22
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
40028f38: 92800000 mov x0, #0xffffffffffffffff // #-1
40028f3c: b9004e74 str w20, [x19, #76]
40028f40: f9002a60 str x0, [x19, #80]
40028f44: 94002066 bl 400310dc <__errno>
40028f48: b9000014 str w20, [x0]
}
40028f4c: 12800000 mov w0, #0xffffffff // #-1
40028f50: a94153f3 ldp x19, x20, [sp, #16]
40028f54: a8c27bfd ldp x29, x30, [sp], #32
40028f58: d65f03c0 ret
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
40028f5c: 52800174 mov w20, #0xb // #11 <== NOT EXECUTED
40028f60: 17fffff6 b 40028f38 <aio_write+0x68> <== NOT EXECUTED
...
00000000400366a0 <clock_nanosleep>:
clockid_t clock_id,
int flags,
const struct timespec *rqtp,
struct timespec *rmtp
)
{
400366a0: a9b77bfd stp x29, x30, [sp, #-144]!
struct timespec uptime;
const struct timespec *end;
Thread_Control *executing;
int eno;
if ( clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC ) {
400366a4: 7100041f cmp w0, #0x1
400366a8: 7a441804 ccmp w0, #0x4, #0x4, ne // ne = any
{
400366ac: 910003fd mov x29, sp
400366b0: a90153f3 stp x19, x20, [sp, #16]
return ENOTSUP;
400366b4: 528010d3 mov w19, #0x86 // #134
if ( clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC ) {
400366b8: 54000501 b.ne 40036758 <clock_nanosleep+0xb8> // b.any <== NEVER TAKEN
queue_context->thread_state = thread_state;
400366bc: aa0203f4 mov x20, x2
400366c0: 52802002 mov w2, #0x100 // #256
400366c4: 72a20002 movk w2, #0x1000, lsl #16
400366c8: a9025bf5 stp x21, x22, [sp, #32]
400366cc: aa0303f5 mov x21, x3
400366d0: b90057e2 str w2, [sp, #84]
_Thread_queue_Context_set_thread_state(
&queue_context,
STATES_WAITING_FOR_TIME | STATES_INTERRUPTIBLE_BY_SIGNAL
);
if ( ( flags & TIMER_ABSTIME ) != 0 ) {
400366d4: 121e0036 and w22, w1, #0x4
400366d8: 36100581 tbz w1, #2, 40036788 <clock_nanosleep+0xe8>
end = rqtp;
if ( clock_id == CLOCK_REALTIME ) {
400366dc: 7100041f cmp w0, #0x1
400366e0: 54000a20 b.eq 40036824 <clock_nanosleep+0x184> // b.none <== ALWAYS TAKEN
queue_context->enqueue_callout =
400366e4: f0ffff80 adrp x0, 40029000 <_Thread_queue_Priority_inherit_enqueue>
400366e8: 91090000 add x0, x0, #0x240
queue_context->Timeout.arg = abstime;
400366ec: a905d3e0 stp x0, x20, [sp, #88]
__asm__ volatile (
400366f0: d53b4220 mrs x0, daif
400366f4: d50342df msr daifset, #0x2
_ISR_lock_ISR_disable( &queue_context->Lock_context.Lock_context );
400366f8: b90053e0 str w0, [sp, #80]
400366fc: b0000680 adrp x0, 40107000 <rtems_libio_iops+0x440>
40036700: f9447013 ldr x19, [x0, #2272]
);
}
_Thread_queue_Acquire( &_Nanosleep_Pseudo_queue, &queue_context );
executing = _Thread_Executing;
_Thread_queue_Enqueue(
40036704: 910143e3 add x3, sp, #0x50
40036708: b0000001 adrp x1, 40037000 <_RTEMS_tasks_User_task_table+0x20>
4003670c: d0000640 adrp x0, 40100000 <_RTEMS_tasks_Information>
40036710: aa1303e2 mov x2, x19
40036714: 912f0021 add x1, x1, #0xbc0
40036718: 91264000 add x0, x0, #0x990
4003671c: 97ffc791 bl 40028560 <_Thread_queue_Enqueue>
return _POSIX_Get_by_name_error_table[ error ];
}
RTEMS_INLINE_ROUTINE int _POSIX_Get_error( Status_Control status )
{
return STATUS_GET_POSIX( status );
40036720: b9408e60 ldr w0, [x19, #140]
40036724: 7100001f cmp w0, #0x0
40036728: 1103fc13 add w19, w0, #0xff
4003672c: 1a80b273 csel w19, w19, w0, lt // lt = tstop
if ( eno == ETIMEDOUT ) {
eno = 0;
}
if ( rmtp != NULL && ( flags & TIMER_ABSTIME ) == 0 ) {
40036730: 710002df cmp w22, #0x0
40036734: 1a9f17e0 cset w0, eq // eq = none
40036738: f10002bf cmp x21, #0x0
4003673c: 1a9f07e1 cset w1, ne // ne = any
40036740: 13087e73 asr w19, w19, #8
40036744: 0a010000 and w0, w0, w1
if ( eno == ETIMEDOUT ) {
40036748: 7101d27f cmp w19, #0x74
4003674c: 540000e0 b.eq 40036768 <clock_nanosleep+0xc8> // b.none
if ( rmtp != NULL && ( flags & TIMER_ABSTIME ) == 0 ) {
40036750: 350004c0 cbnz w0, 400367e8 <clock_nanosleep+0x148>
40036754: a9425bf5 ldp x21, x22, [sp, #32]
_Timespec_Set_to_zero( rmtp );
}
}
return eno;
}
40036758: 2a1303e0 mov w0, w19
4003675c: a94153f3 ldp x19, x20, [sp, #16]
40036760: a8c97bfd ldp x29, x30, [sp], #144
40036764: d65f03c0 ret
eno = 0;
40036768: 52800013 mov w19, #0x0 // #0
if ( rmtp != NULL && ( flags & TIMER_ABSTIME ) == 0 ) {
4003676c: 34ffff40 cbz w0, 40036754 <clock_nanosleep+0xb4>
_Timespec_Set_to_zero( rmtp );
40036770: a9007ebf stp xzr, xzr, [x21]
}
40036774: 2a1303e0 mov w0, w19
40036778: a94153f3 ldp x19, x20, [sp, #16]
4003677c: a9425bf5 ldp x21, x22, [sp, #32]
40036780: a8c97bfd ldp x29, x30, [sp], #144
40036784: d65f03c0 ret
_Timecounter_Nanouptime( &uptime );
40036788: 9100c3e0 add x0, sp, #0x30
4003678c: 97ffc3b1 bl 40027650 <_Timecounter_Nanouptime>
&& (unsigned long) ts->tv_nsec < WATCHDOG_NANOSECONDS_PER_SECOND;
40036790: b4fffab4 cbz x20, 400366e4 <clock_nanosleep+0x44>
40036794: f9400680 ldr x0, [x20, #8]
40036798: d2993fe2 mov x2, #0xc9ff // #51711
4003679c: f2a77342 movk x2, #0x3b9a, lsl #16
400367a0: eb02001f cmp x0, x2
400367a4: 54000488 b.hi 40036834 <clock_nanosleep+0x194> // b.pmore
return _Watchdog_Is_valid_timespec( ts ) && ts->tv_sec >= 0;
400367a8: f9400281 ldr x1, [x20]
400367ac: b7f80441 tbnz x1, #63, 40036834 <clock_nanosleep+0x194>
now->tv_nsec += delta->tv_nsec;
400367b0: a94313e3 ldp x3, x4, [sp, #48]
400367b4: 8b040000 add x0, x0, x4
sec += (uint64_t) delta->tv_sec;
400367b8: 8b030021 add x1, x1, x3
if ( now->tv_nsec >= WATCHDOG_NANOSECONDS_PER_SECOND ) {
400367bc: eb02001f cmp x0, x2
400367c0: 540000ad b.le 400367d4 <clock_nanosleep+0x134>
now->tv_nsec -= WATCHDOG_NANOSECONDS_PER_SECOND;
400367c4: 92993fe2 mov x2, #0xffffffffffff3600 // #-51712
400367c8: f2b88ca2 movk x2, #0xc465, lsl #16
++sec;
400367cc: 91000421 add x1, x1, #0x1
now->tv_nsec -= WATCHDOG_NANOSECONDS_PER_SECOND;
400367d0: 8b020000 add x0, x0, x2
400367d4: f9001fe0 str x0, [sp, #56]
return now;
400367d8: 9100c3f4 add x20, sp, #0x30
if ( sec <= INT64_MAX ) {
400367dc: b7f80301 tbnz x1, #63, 4003683c <clock_nanosleep+0x19c>
now->tv_sec = sec;
400367e0: f9001be1 str x1, [sp, #48]
400367e4: 17ffffc0 b 400366e4 <clock_nanosleep+0x44>
if ( eno == EINTR ) {
400367e8: 7100127f cmp w19, #0x4
400367ec: 54fffc21 b.ne 40036770 <clock_nanosleep+0xd0> // b.any
_Timecounter_Nanouptime( &actual_end );
400367f0: 910103e0 add x0, sp, #0x40
400367f4: 97ffc397 bl 40027650 <_Timecounter_Nanouptime>
if ( _Timespec_Less_than( &actual_end, end ) ) {
400367f8: aa1403e1 mov x1, x20
400367fc: 910103e0 add x0, sp, #0x40
40036800: 94000028 bl 400368a0 <_Timespec_Less_than>
40036804: 72001c1f tst w0, #0xff
40036808: 54fffb40 b.eq 40036770 <clock_nanosleep+0xd0> // b.none
_Timespec_Subtract( &actual_end, end, rmtp );
4003680c: aa1503e2 mov x2, x21
40036810: aa1403e1 mov x1, x20
40036814: 910103e0 add x0, sp, #0x40
40036818: 94000032 bl 400368e0 <_Timespec_Subtract>
4003681c: a9425bf5 ldp x21, x22, [sp, #32]
40036820: 17ffffce b 40036758 <clock_nanosleep+0xb8>
queue_context->enqueue_callout = _Thread_queue_Add_timeout_realtime_timespec;
40036824: f0ffff80 adrp x0, 40029000 <_Thread_queue_Priority_inherit_enqueue>
40036828: 910a4000 add x0, x0, #0x290
queue_context->Timeout.arg = abstime;
4003682c: a905d3e0 stp x0, x20, [sp, #88]
}
40036830: 17ffffb0 b 400366f0 <clock_nanosleep+0x50>
return NULL;
40036834: d2800014 mov x20, #0x0 // #0
40036838: 17ffffab b 400366e4 <clock_nanosleep+0x44>
now->tv_sec = INT64_MAX;
4003683c: 92f00000 mov x0, #0x7fffffffffffffff // #9223372036854775807
40036840: f9001be0 str x0, [sp, #48]
40036844: 17ffffa8 b 400366e4 <clock_nanosleep+0x44>
...
0000000040024070 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
40024070: a9bd7bfd stp x29, x30, [sp, #-48]!
40024074: 910003fd mov x29, sp
40024078: f9000bf3 str x19, [sp, #16]
Status_Control status;
if ( !tp )
4002407c: b40000e1 cbz x1, 40024098 <clock_settime+0x28> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
40024080: 7100041f cmp w0, #0x1
40024084: 540002a0 b.eq 400240d8 <clock_settime+0x68> // b.none
if ( status != STATUS_SUCCESSFUL ) {
rtems_set_errno_and_return_minus_one( STATUS_GET_POSIX( status ) );
}
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
40024088: 7100081f cmp w0, #0x2
4002408c: 54000160 b.eq 400240b8 <clock_settime+0x48> // b.none
rtems_set_errno_and_return_minus_one( ENOSYS );
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) {
40024090: 71000c1f cmp w0, #0x3
40024094: 54000120 b.eq 400240b8 <clock_settime+0x48> // b.none
rtems_set_errno_and_return_minus_one( ENOSYS );
}
#endif
else {
rtems_set_errno_and_return_minus_one( EINVAL );
40024098: 94003021 bl 4003011c <__errno>
4002409c: 12800013 mov w19, #0xffffffff // #-1
400240a0: 528002c1 mov w1, #0x16 // #22
400240a4: b9000001 str w1, [x0]
}
return 0;
}
400240a8: 2a1303e0 mov w0, w19
400240ac: f9400bf3 ldr x19, [sp, #16]
400240b0: a8c37bfd ldp x29, x30, [sp], #48
400240b4: d65f03c0 ret
rtems_set_errno_and_return_minus_one( ENOSYS );
400240b8: 94003019 bl 4003011c <__errno>
400240bc: 12800013 mov w19, #0xffffffff // #-1
400240c0: 52800b01 mov w1, #0x58 // #88
400240c4: b9000001 str w1, [x0]
}
400240c8: 2a1303e0 mov w0, w19
400240cc: f9400bf3 ldr x19, [sp, #16]
400240d0: a8c37bfd ldp x29, x30, [sp], #48
400240d4: d65f03c0 ret
_TOD_Lock();
400240d8: aa0103f3 mov x19, x1
400240dc: 94000331 bl 40024da0 <_TOD_Lock>
__asm__ volatile (
400240e0: d53b4220 mrs x0, daif
400240e4: d50342df msr daifset, #0x2
_Timecounter_Acquire( lock_context );
400240e8: b9002be0 str w0, [sp, #40]
status = _TOD_Set( tp, &lock_context );
400240ec: 9100a3e1 add x1, sp, #0x28
400240f0: aa1303e0 mov x0, x19
400240f4: 94000333 bl 40024dc0 <_TOD_Set>
400240f8: 2a0003f3 mov w19, w0
_TOD_Unlock();
400240fc: 9400032d bl 40024db0 <_TOD_Unlock>
if ( status != STATUS_SUCCESSFUL ) {
40024100: 34fffd53 cbz w19, 400240a8 <clock_settime+0x38>
rtems_set_errno_and_return_minus_one( STATUS_GET_POSIX( status ) );
40024104: 94003006 bl 4003011c <__errno>
40024108: 7100027f cmp w19, #0x0
4002410c: 1103fe61 add w1, w19, #0xff
40024110: 1a93b021 csel w1, w1, w19, lt // lt = tstop
40024114: 12800013 mov w19, #0xffffffff // #-1
40024118: 13087c21 asr w1, w1, #8
4002411c: b9000001 str w1, [x0]
40024120: 17ffffe2 b 400240a8 <clock_settime+0x38>
...
0000000040024ce0 <mmap>:
CHAIN_DEFINE_EMPTY( mmap_mappings );
void *mmap(
void *addr, size_t len, int prot, int flags, int fildes, off_t off
)
{
40024ce0: a9b17bfd stp x29, x30, [sp, #-240]!
40024ce4: 910003fd mov x29, sp
40024ce8: a90153f3 stp x19, x20, [sp, #16]
40024cec: 2a0203f4 mov w20, w2
40024cf0: 2a0303f3 mov w19, w3
40024cf4: a9025bf5 stp x21, x22, [sp, #32]
40024cf8: aa0003f6 mov x22, x0
40024cfc: aa0103f5 mov x21, x1
40024d00: a90363f7 stp x23, x24, [sp, #48]
40024d04: 2a0403f7 mov w23, w4
40024d08: aa0503f8 mov x24, x5
map_anonymous = (flags & MAP_ANON) == MAP_ANON;
map_shared = (flags & MAP_SHARED) == MAP_SHARED;
map_private = (flags & MAP_PRIVATE) == MAP_PRIVATE;
/* Clear errno. */
errno = 0;
40024d0c: 94002cf8 bl 400300ec <__errno>
40024d10: b900001f str wzr, [x0]
iop = NULL;
if ( len == 0 ) {
40024d14: b40014b5 cbz x21, 40024fa8 <mmap+0x2c8> <== NEVER TAKEN
/*
* We can provide read, write and execute because the memory in RTEMS does
* not normally have protections but we cannot hide access to memory.
*/
if ( prot == PROT_NONE ) {
40024d18: 34001354 cbz w20, 40024f80 <mmap+0x2a0> <== NEVER TAKEN
/*
* We can not normally provide restriction of write access. Reject any
* attempt to map without write permission, since we are not able to
* prevent a write from succeeding.
*/
if ( PROT_WRITE != (prot & PROT_WRITE) ) {
40024d1c: 36081334 tbz w20, #1, 40024f80 <mmap+0x2a0>
40024d20: a9046bf9 stp x25, x26, [sp, #64]
map_private = (flags & MAP_PRIVATE) == MAP_PRIVATE;
40024d24: 121f0261 and w1, w19, #0x2
map_fixed = (flags & MAP_FIXED) == MAP_FIXED;
40024d28: 121c027a and w26, w19, #0x10
40024d2c: a90573fb stp x27, x28, [sp, #80]
/*
* Anonymous mappings must have file descriptor set to -1 and the offset
* set to 0. Shared mappings are not supported with Anonymous mappings at
* this time
*/
if ( map_anonymous && (fildes != -1 || off != 0 || map_shared) ) {
40024d30: 12140279 and w25, w19, #0x1000
map_shared = (flags & MAP_SHARED) == MAP_SHARED;
40024d34: 1200027b and w27, w19, #0x1
if ( map_anonymous && (fildes != -1 || off != 0 || map_shared) ) {
40024d38: 37600773 tbnz w19, #12, 40024e24 <mmap+0x144>
flags |= MAP_PRIVATE;
map_private = true;
}
/* Check for supported flags */
if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_ANON)) != 0) {
40024d3c: 12820260 mov w0, #0xffffefec // #-4116
40024d40: 6a00027f tst w19, w0
40024d44: 54001061 b.ne 40024f50 <mmap+0x270> // b.any <== NEVER TAKEN
errno = EINVAL;
return MAP_FAILED;
}
/* Either MAP_SHARED or MAP_PRIVATE must be defined, but not both */
if ( map_shared ) {
40024d48: 35000b1b cbnz w27, 40024ea8 <mmap+0x1c8>
if ( map_private ) {
errno = EINVAL;
return MAP_FAILED;
}
} else if ( !map_private ) {
40024d4c: 34001021 cbz w1, 40024f50 <mmap+0x270>
errno = EINVAL;
return MAP_FAILED;
}
/* Check for illegal addresses. Watch out for address wrap. */
if ( map_fixed ) {
40024d50: 52800020 mov w0, #0x1 // #1
40024d54: b9006fe0 str w0, [sp, #108]
40024d58: 340000ba cbz w26, 40024d6c <mmap+0x8c>
if ((uintptr_t)addr & PAGE_MASK) {
40024d5c: f2402edf tst x22, #0xfff
40024d60: 54000f81 b.ne 40024f50 <mmap+0x270> // b.any
errno = EINVAL;
return MAP_FAILED;
}
if ( addr == NULL ) {
40024d64: b4000f76 cbz x22, 40024f50 <mmap+0x270>
errno = EINVAL;
return MAP_FAILED;
}
if (addr + len < addr) {
40024d68: b7f80f55 tbnz x21, #63, 40024f50 <mmap+0x270> <== NEVER TAKEN
errno = EINVAL;
return MAP_FAILED;
}
}
if ( !map_anonymous ) {
40024d6c: 34000a59 cbz w25, 40024eb4 <mmap+0x1d4>
return MAP_FAILED;
}
}
/* Create the mapping */
mapping = malloc( sizeof( mmap_mapping ));
40024d70: d2800021 mov x1, #0x1 // #1
40024d74: d2800600 mov x0, #0x30 // #48
40024d78: 94001076 bl 40028f50 <calloc>
40024d7c: aa0003fc mov x28, x0
if ( !mapping ) {
40024d80: b4000840 cbz x0, 40024e88 <mmap+0x1a8> <== NEVER TAKEN
errno = ENOMEM;
return MAP_FAILED;
}
memset( mapping, 0, sizeof( mmap_mapping ));
mapping->len = len;
40024d84: f9000f95 str x21, [x28, #24]
mapping->flags = flags;
40024d88: b9002393 str w19, [x28, #32]
is_shared_shm = false;
} else {
is_shared_shm = true;
}
} else {
is_shared_shm = false;
40024d8c: 52800013 mov w19, #0x0 // #0
iop = NULL;
40024d90: f9003bff str xzr, [sp, #112]
}
if ( map_fixed ) {
40024d94: 340019ba cbz w26, 400250c8 <mmap+0x3e8>
mapping->addr = addr;
40024d98: f9000b96 str x22, [x28, #16]
extern rtems_chain_control mmap_mappings;
static inline void mmap_mappings_lock_obtain( void )
{
rtems_libio_lock();
40024d9c: 97fff25d bl 40021710 <rtems_libio_lock>
return _Chain_Immutable_head( the_chain )->next;
40024da0: 900006e0 adrp x0, 40100000 <_IO_Driver_address_table>
40024da4: 910de013 add x19, x0, #0x378
40024da8: f941bc01 ldr x1, [x0, #888]
mmap_mappings_lock_obtain();
if ( map_fixed ) {
rtems_chain_node* node = rtems_chain_first (&mmap_mappings);
while ( !rtems_chain_is_tail( &mmap_mappings, node )) {
40024dac: 91002260 add x0, x19, #0x8
40024db0: eb00003f cmp x1, x0
40024db4: 54000160 b.eq 40024de0 <mmap+0x100> // b.none
* point in time if there is an overlap in the mappings we return an
* error. POSIX allows us to also return successfully by unmapping
* the overlapping prior mappings.
*/
current_mapping = (mmap_mapping*) node;
if ( ( addr >= current_mapping->addr ) &&
40024db8: f9400822 ldr x2, [x1, #16]
40024dbc: eb16005f cmp x2, x22
40024dc0: 540000a8 b.hi 40024dd4 <mmap+0xf4> // b.pmore
( addr < ( current_mapping->addr + current_mapping->len )) ) {
40024dc4: f9400c25 ldr x5, [x1, #24]
40024dc8: 8b050042 add x2, x2, x5
if ( ( addr >= current_mapping->addr ) &&
40024dcc: eb0202df cmp x22, x2
40024dd0: 54001943 b.cc 400250f8 <mmap+0x418> // b.lo, b.ul, b.last <== NEVER TAKEN
return the_node->next;
40024dd4: f9400021 ldr x1, [x1]
while ( !rtems_chain_is_tail( &mmap_mappings, node )) {
40024dd8: eb00003f cmp x1, x0
40024ddc: 54fffee1 b.ne 40024db8 <mmap+0xd8> // b.any
node = rtems_chain_next( node );
}
}
/* Populate the data */
if ( map_private ) {
40024de0: b9406fe0 ldr w0, [sp, #108]
40024de4: 340014c0 cbz w0, 4002507c <mmap+0x39c> <== NEVER TAKEN
if ( !map_anonymous ) {
40024de8: 34001bf9 cbz w25, 40025164 <mmap+0x484>
}
free( mapping );
errno = ENXIO;
return MAP_FAILED;
}
} else if ( !map_fixed ) {
40024dec: 900006f3 adrp x19, 40100000 <_IO_Driver_address_table>
40024df0: 910de273 add x19, x19, #0x378
40024df4: 34001e7a cbz w26, 400251c0 <mmap+0x4e0>
old_last = tail->previous;
40024df8: f9400a60 ldr x0, [x19, #16]
the_node->next = tail;
40024dfc: 91002261 add x1, x19, #0x8
40024e00: f9000381 str x1, [x28]
tail->previous = the_node;
40024e04: f9000a7c str x28, [x19, #16]
old_last->next = the_node;
40024e08: f900001c str x28, [x0]
the_node->previous = old_last;
40024e0c: f9000780 str x0, [x28, #8]
}
static inline void mmap_mappings_lock_release( void )
{
rtems_libio_unlock();
40024e10: 97fff244 bl 40021720 <rtems_libio_unlock>
rtems_chain_append_unprotected( &mmap_mappings, &mapping->node );
mmap_mappings_lock_release( );
return mapping->addr;
40024e14: f9400b80 ldr x0, [x28, #16]
40024e18: a9446bf9 ldp x25, x26, [sp, #64]
40024e1c: a94573fb ldp x27, x28, [sp, #80]
40024e20: 14000053 b 40024f6c <mmap+0x28c>
if ( map_anonymous && (fildes != -1 || off != 0 || map_shared) ) {
40024e24: f100031f cmp x24, #0x0
40024e28: 3a410ae0 ccmn w23, #0x1, #0x0, eq // eq = none
40024e2c: 1a9f07e0 cset w0, ne // ne = any
40024e30: 2a1b0000 orr w0, w0, w27
40024e34: 350008e0 cbnz w0, 40024f50 <mmap+0x270>
if ( map_anonymous && !map_private && !map_shared ) {
40024e38: 12820260 mov w0, #0xffffefec // #-4116
40024e3c: 0a000260 and w0, w19, w0
40024e40: 35001d61 cbnz w1, 400251ec <mmap+0x50c>
flags |= MAP_PRIVATE;
40024e44: 321f0273 orr w19, w19, #0x2
if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_ANON)) != 0) {
40024e48: 35000840 cbnz w0, 40024f50 <mmap+0x270>
if ( map_fixed ) {
40024e4c: 3500113a cbnz w26, 40025070 <mmap+0x390> <== NEVER TAKEN
mapping = malloc( sizeof( mmap_mapping ));
40024e50: d2800021 mov x1, #0x1 // #1
40024e54: d2800600 mov x0, #0x30 // #48
40024e58: 9400103e bl 40028f50 <calloc>
40024e5c: aa0003fc mov x28, x0
if ( !mapping ) {
40024e60: b4000140 cbz x0, 40024e88 <mmap+0x1a8> <== NEVER TAKEN
mapping->len = len;
40024e64: f9000f95 str x21, [x28, #24]
mapping->flags = flags;
40024e68: b9002393 str w19, [x28, #32]
err = posix_memalign( &mapping->addr, PAGE_SIZE, len );
40024e6c: aa1503e2 mov x2, x21
40024e70: 91004380 add x0, x28, #0x10
40024e74: d2820001 mov x1, #0x1000 // #4096
40024e78: 940011fa bl 40029660 <posix_memalign>
40024e7c: 340018e0 cbz w0, 40025198 <mmap+0x4b8> <== ALWAYS TAKEN
free( mapping );
40024e80: aa1c03e0 mov x0, x28 <== NOT EXECUTED
40024e84: 9400105b bl 40028ff0 <free> <== NOT EXECUTED
errno = ENOMEM;
40024e88: 94002c99 bl 400300ec <__errno> <== NOT EXECUTED
40024e8c: aa0003e1 mov x1, x0 <== NOT EXECUTED
40024e90: 52800182 mov w2, #0xc // #12 <== NOT EXECUTED
return MAP_FAILED;
40024e94: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
40024e98: a9446bf9 ldp x25, x26, [sp, #64] <== NOT EXECUTED
40024e9c: a94573fb ldp x27, x28, [sp, #80] <== NOT EXECUTED
errno = ENOMEM;
40024ea0: b9000022 str w2, [x1] <== NOT EXECUTED
return MAP_FAILED;
40024ea4: 14000032 b 40024f6c <mmap+0x28c> <== NOT EXECUTED
if ( map_private ) {
40024ea8: 35000541 cbnz w1, 40024f50 <mmap+0x270>
if ( map_fixed ) {
40024eac: b9006fff str wzr, [sp, #108]
40024eb0: 35fff57a cbnz w26, 40024d5c <mmap+0x7c> <== NEVER TAKEN
if ( fstat( fildes, &sb ) < 0 ) {
40024eb4: 910223e1 add x1, sp, #0x88
40024eb8: 2a1703e0 mov w0, w23
40024ebc: 940010a5 bl 40029150 <fstat>
40024ec0: 37f81420 tbnz w0, #31, 40025144 <mmap+0x464> <== NEVER TAKEN
return &rtems_libio_iops[ fd ];
40024ec4: f00006e0 adrp x0, 40103000 <_Thread_Objects+0x488>
40024ec8: 9107a000 add x0, x0, #0x1e8
40024ecc: 52800a03 mov w3, #0x50 // #80
if ( S_ISDIR( sb.st_mode ) || S_ISLNK( sb.st_mode )) {
40024ed0: b9409be2 ldr w2, [sp, #152]
40024ed4: 52940001 mov w1, #0xa000 // #40960
40024ed8: 9b2302e0 smaddl x0, w23, w3, x0
40024edc: 12140c42 and w2, w2, #0xf000
40024ee0: f9003be0 str x0, [sp, #112]
40024ee4: 7140105f cmp w2, #0x4, lsl #12
40024ee8: 7a411044 ccmp w2, w1, #0x4, ne // ne = any
40024eec: 540011c0 b.eq 40025124 <mmap+0x444> // b.none <== NEVER TAKEN
if ( S_ISREG( sb.st_mode )
40024ef0: 7140205f cmp w2, #0x8, lsl #12
40024ef4: 540006e1 b.ne 40024fd0 <mmap+0x2f0> // b.any <== ALWAYS TAKEN
&& (( off >= sb.st_size ) || (( off + len ) >= sb.st_size ))) {
40024ef8: f9405be0 ldr x0, [sp, #176] <== NOT EXECUTED
40024efc: eb18001f cmp x0, x24 <== NOT EXECUTED
40024f00: 5400150d b.le 400251a0 <mmap+0x4c0> <== NOT EXECUTED
40024f04: 8b150301 add x1, x24, x21 <== NOT EXECUTED
40024f08: eb00003f cmp x1, x0 <== NOT EXECUTED
40024f0c: 540014a2 b.cs 400251a0 <mmap+0x4c0> // b.hs, b.nlast <== NOT EXECUTED
if ( lseek( fildes, off, SEEK_SET ) < 0 ) {
40024f10: aa1803e1 mov x1, x24 <== NOT EXECUTED
40024f14: 2a1703e0 mov w0, w23 <== NOT EXECUTED
40024f18: 52800002 mov w2, #0x0 // #0 <== NOT EXECUTED
40024f1c: 94001119 bl 40029380 <lseek> <== NOT EXECUTED
40024f20: aa0003e1 mov x1, x0 <== NOT EXECUTED
return MAP_FAILED;
40024f24: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
if ( lseek( fildes, off, SEEK_SET ) < 0 ) {
40024f28: b7f81561 tbnz x1, #63, 400251d4 <mmap+0x4f4> <== NOT EXECUTED
if ( S_ISCHR( sb.st_mode ) && map_private ) {
40024f2c: b9409be2 ldr w2, [sp, #152] <== NOT EXECUTED
40024f30: 12140c42 and w2, w2, #0xf000 <== NOT EXECUTED
40024f34: b9406fe0 ldr w0, [sp, #108]
40024f38: 7140085f cmp w2, #0x2, lsl #12
40024f3c: 1a9f17e5 cset w5, eq // eq = none
40024f40: 7100001f cmp w0, #0x0
40024f44: 7a4018a4 ccmp w5, #0x0, #0x4, ne // ne = any
40024f48: 54000580 b.eq 40024ff8 <mmap+0x318> // b.none
40024f4c: d503201f nop
errno = EINVAL;
40024f50: 94002c67 bl 400300ec <__errno>
40024f54: aa0003e1 mov x1, x0
40024f58: 528002c2 mov w2, #0x16 // #22
return MAP_FAILED;
40024f5c: 92800000 mov x0, #0xffffffffffffffff // #-1
40024f60: a9446bf9 ldp x25, x26, [sp, #64]
40024f64: a94573fb ldp x27, x28, [sp, #80]
errno = EINVAL;
40024f68: b9000022 str w2, [x1]
}
40024f6c: a94153f3 ldp x19, x20, [sp, #16]
40024f70: a9425bf5 ldp x21, x22, [sp, #32]
40024f74: a94363f7 ldp x23, x24, [sp, #48]
40024f78: a8cf7bfd ldp x29, x30, [sp], #240
40024f7c: d65f03c0 ret
errno = ENOTSUP;
40024f80: 94002c5b bl 400300ec <__errno>
40024f84: aa0003e1 mov x1, x0
40024f88: 528010c2 mov w2, #0x86 // #134
return MAP_FAILED;
40024f8c: 92800000 mov x0, #0xffffffffffffffff // #-1
}
40024f90: a94153f3 ldp x19, x20, [sp, #16]
errno = ENOTSUP;
40024f94: b9000022 str w2, [x1]
}
40024f98: a9425bf5 ldp x21, x22, [sp, #32]
40024f9c: a94363f7 ldp x23, x24, [sp, #48]
40024fa0: a8cf7bfd ldp x29, x30, [sp], #240
40024fa4: d65f03c0 ret
errno = EINVAL;
40024fa8: 94002c51 bl 400300ec <__errno> <== NOT EXECUTED
40024fac: aa0003e1 mov x1, x0 <== NOT EXECUTED
40024fb0: 528002c2 mov w2, #0x16 // #22 <== NOT EXECUTED
return MAP_FAILED;
40024fb4: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
}
40024fb8: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
errno = EINVAL;
40024fbc: b9000022 str w2, [x1] <== NOT EXECUTED
}
40024fc0: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
40024fc4: a94363f7 ldp x23, x24, [sp, #48] <== NOT EXECUTED
40024fc8: a8cf7bfd ldp x29, x30, [sp], #240 <== NOT EXECUTED
40024fcc: d65f03c0 ret <== NOT EXECUTED
if ( !S_ISCHR( sb.st_mode ) && sb.st_size < off + len ) {
40024fd0: 7140085f cmp w2, #0x2, lsl #12
40024fd4: 54fffb00 b.eq 40024f34 <mmap+0x254> // b.none
40024fd8: f9405be0 ldr x0, [sp, #176]
&& (( off >= sb.st_size ) || (( off + len ) >= sb.st_size ))) {
40024fdc: 8b150301 add x1, x24, x21
if ( !S_ISCHR( sb.st_mode ) && sb.st_size < off + len ) {
40024fe0: eb00003f cmp x1, x0
40024fe4: 54000908 b.hi 40025104 <mmap+0x424> // b.pmore <== NEVER TAKEN
if ( S_ISREG( sb.st_mode ) || S_ISBLK( sb.st_mode ) ) {
40024fe8: 51401840 sub w0, w2, #0x6, lsl #12
if ( S_ISCHR( sb.st_mode ) && map_private ) {
40024fec: 52800005 mov w5, #0x0 // #0
if ( S_ISREG( sb.st_mode ) || S_ISBLK( sb.st_mode ) ) {
40024ff0: 12127800 and w0, w0, #0xffffdfff
40024ff4: 34fff8e0 cbz w0, 40024f10 <mmap+0x230> <== NEVER TAKEN
mapping = malloc( sizeof( mmap_mapping ));
40024ff8: d2800021 mov x1, #0x1 // #1
40024ffc: d2800600 mov x0, #0x30 // #48
40025000: 290f17e2 stp w2, w5, [sp, #120]
40025004: 94000fd3 bl 40028f50 <calloc>
if ( !mapping ) {
40025008: 294f17e2 ldp w2, w5, [sp, #120]
mapping = malloc( sizeof( mmap_mapping ));
4002500c: aa0003fc mov x28, x0
if ( !mapping ) {
40025010: b4fff3c0 cbz x0, 40024e88 <mmap+0x1a8> <== NEVER TAKEN
S_ISCHR( sb.st_mode ) || S_ISFIFO( sb.st_mode ) ||
40025014: 7140185f cmp w2, #0x6, lsl #12
if ( S_ISREG( sb.st_mode ) || S_ISBLK( sb.st_mode ) ||
40025018: 12117846 and w6, w2, #0xffffbfff
S_ISCHR( sb.st_mode ) || S_ISFIFO( sb.st_mode ) ||
4002501c: 52820001 mov w1, #0x1000 // #4096
40025020: 7a411044 ccmp w2, w1, #0x4, ne // ne = any
40025024: 1a9f17e1 cset w1, eq // eq = none
40025028: 714020df cmp w6, #0x8, lsl #12
4002502c: 7a4018a0 ccmp w5, #0x0, #0x0, ne // ne = any
mapping->len = len;
40025030: f9000f95 str x21, [x28, #24]
S_ISCHR( sb.st_mode ) || S_ISFIFO( sb.st_mode ) ||
40025034: 1a9f07e2 cset w2, ne // ne = any
mapping->flags = flags;
40025038: b9002393 str w19, [x28, #32]
S_ISCHR( sb.st_mode ) || S_ISFIFO( sb.st_mode ) ||
4002503c: 2a020033 orr w19, w1, w2
40025040: 52000273 eor w19, w19, #0x1
if ( map_fixed ) {
40025044: 3400043a cbz w26, 400250c8 <mmap+0x3e8> <== ALWAYS TAKEN
if ( map_fixed && is_shared_shm ) {
40025048: 34ffea93 cbz w19, 40024d98 <mmap+0xb8> <== NOT EXECUTED
free( mapping );
4002504c: 94000fe9 bl 40028ff0 <free> <== NOT EXECUTED
errno = ENOTSUP;
40025050: 94002c27 bl 400300ec <__errno> <== NOT EXECUTED
40025054: aa0003e1 mov x1, x0 <== NOT EXECUTED
40025058: 528010c2 mov w2, #0x86 // #134 <== NOT EXECUTED
return MAP_FAILED;
4002505c: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
40025060: a9446bf9 ldp x25, x26, [sp, #64] <== NOT EXECUTED
40025064: a94573fb ldp x27, x28, [sp, #80] <== NOT EXECUTED
errno = ENOTSUP;
40025068: b9000022 str w2, [x1] <== NOT EXECUTED
return MAP_FAILED;
4002506c: 17ffffc0 b 40024f6c <mmap+0x28c> <== NOT EXECUTED
map_private = true;
40025070: 52800020 mov w0, #0x1 // #1 <== NOT EXECUTED
40025074: b9006fe0 str w0, [sp, #108] <== NOT EXECUTED
40025078: 17ffff39 b 40024d5c <mmap+0x7c> <== NOT EXECUTED
} else if ( map_shared ) {
4002507c: 34ffebfb cbz w27, 40024df8 <mmap+0x118> <== NOT EXECUTED
err = (*iop->pathinfo.handlers->mmap_h)(
40025080: f9403be0 ldr x0, [sp, #112]
40025084: f00006d3 adrp x19, 40100000 <_IO_Driver_address_table>
40025088: 910de273 add x19, x19, #0x378
4002508c: aa1803e4 mov x4, x24
40025090: 2a1403e3 mov w3, w20
40025094: aa1503e2 mov x2, x21
40025098: f9401805 ldr x5, [x0, #48]
4002509c: 91004381 add x1, x28, #0x10
400250a0: f9403ca5 ldr x5, [x5, #120]
400250a4: d63f00a0 blr x5
if ( err != 0 ) {
400250a8: 34ffea80 cbz w0, 40024df8 <mmap+0x118>
400250ac: 97fff19d bl 40021720 <rtems_libio_unlock>
free( mapping );
400250b0: aa1c03e0 mov x0, x28
400250b4: 94000fcf bl 40028ff0 <free>
return MAP_FAILED;
400250b8: 92800000 mov x0, #0xffffffffffffffff // #-1
400250bc: a9446bf9 ldp x25, x26, [sp, #64]
400250c0: a94573fb ldp x27, x28, [sp, #80]
400250c4: 17ffffaa b 40024f6c <mmap+0x28c>
} else if ( map_private ) {
400250c8: b9406fe0 ldr w0, [sp, #108]
400250cc: 35ffed00 cbnz w0, 40024e6c <mmap+0x18c>
rtems_libio_lock();
400250d0: 97fff190 bl 40021710 <rtems_libio_lock>
} else if ( map_shared ) {
400250d4: 340000db cbz w27, 400250ec <mmap+0x40c> <== NEVER TAKEN
if ( is_shared_shm ) {
400250d8: 34fffd53 cbz w19, 40025080 <mmap+0x3a0>
mapping->shm = iop_to_shm( iop );
400250dc: f9403be0 ldr x0, [sp, #112]
400250e0: f9402400 ldr x0, [x0, #72]
400250e4: f9001780 str x0, [x28, #40]
400250e8: 17ffffe6 b 40025080 <mmap+0x3a0>
400250ec: f00006d3 adrp x19, 40100000 <_IO_Driver_address_table> <== NOT EXECUTED
400250f0: 910de273 add x19, x19, #0x378 <== NOT EXECUTED
400250f4: 17ffff41 b 40024df8 <mmap+0x118> <== NOT EXECUTED
free( mapping );
400250f8: aa1c03e0 mov x0, x28 <== NOT EXECUTED
400250fc: 94000fbd bl 40028ff0 <free> <== NOT EXECUTED
rtems_libio_unlock();
40025100: 97fff188 bl 40021720 <rtems_libio_unlock> <== NOT EXECUTED
errno = ENXIO;
40025104: 94002bfa bl 400300ec <__errno> <== NOT EXECUTED
40025108: aa0003e1 mov x1, x0 <== NOT EXECUTED
4002510c: 528000c2 mov w2, #0x6 // #6 <== NOT EXECUTED
return MAP_FAILED;
40025110: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
40025114: a9446bf9 ldp x25, x26, [sp, #64] <== NOT EXECUTED
40025118: a94573fb ldp x27, x28, [sp, #80] <== NOT EXECUTED
errno = ENXIO;
4002511c: b9000022 str w2, [x1] <== NOT EXECUTED
return MAP_FAILED;
40025120: 17ffff93 b 40024f6c <mmap+0x28c> <== NOT EXECUTED
errno = ENODEV;
40025124: 94002bf2 bl 400300ec <__errno> <== NOT EXECUTED
40025128: aa0003e1 mov x1, x0 <== NOT EXECUTED
4002512c: 52800262 mov w2, #0x13 // #19 <== NOT EXECUTED
return MAP_FAILED;
40025130: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
40025134: a9446bf9 ldp x25, x26, [sp, #64] <== NOT EXECUTED
40025138: a94573fb ldp x27, x28, [sp, #80] <== NOT EXECUTED
errno = ENODEV;
4002513c: b9000022 str w2, [x1] <== NOT EXECUTED
return MAP_FAILED;
40025140: 17ffff8b b 40024f6c <mmap+0x28c> <== NOT EXECUTED
errno = EBADF;
40025144: 94002bea bl 400300ec <__errno> <== NOT EXECUTED
40025148: aa0003e1 mov x1, x0 <== NOT EXECUTED
4002514c: 52800122 mov w2, #0x9 // #9 <== NOT EXECUTED
return MAP_FAILED;
40025150: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
40025154: a9446bf9 ldp x25, x26, [sp, #64] <== NOT EXECUTED
40025158: a94573fb ldp x27, x28, [sp, #80] <== NOT EXECUTED
errno = EBADF;
4002515c: b9000022 str w2, [x1] <== NOT EXECUTED
return MAP_FAILED;
40025160: 17ffff83 b 40024f6c <mmap+0x28c> <== NOT EXECUTED
r = read( fildes, mapping->addr, len );
40025164: f9400b81 ldr x1, [x28, #16]
40025168: 2a1703e0 mov w0, w23
4002516c: aa1503e2 mov x2, x21
40025170: f00006d3 adrp x19, 40100000 <_IO_Driver_address_table>
40025174: 910de273 add x19, x19, #0x378
40025178: 94001172 bl 40029740 <read>
if ( r != len ) {
4002517c: eb0002bf cmp x21, x0
40025180: 54ffe3c0 b.eq 40024df8 <mmap+0x118> // b.none <== ALWAYS TAKEN
40025184: 97fff167 bl 40021720 <rtems_libio_unlock> <== NOT EXECUTED
if ( !map_fixed ) {
40025188: 340002da cbz w26, 400251e0 <mmap+0x500> <== NOT EXECUTED
free( mapping );
4002518c: aa1c03e0 mov x0, x28 <== NOT EXECUTED
40025190: 94000f98 bl 40028ff0 <free> <== NOT EXECUTED
40025194: 17ffffdc b 40025104 <mmap+0x424> <== NOT EXECUTED
rtems_libio_lock();
40025198: 97fff15e bl 40021710 <rtems_libio_lock>
if ( map_private ) {
4002519c: 17ffff13 b 40024de8 <mmap+0x108>
errno = EOVERFLOW;
400251a0: 94002bd3 bl 400300ec <__errno> <== NOT EXECUTED
400251a4: aa0003e1 mov x1, x0 <== NOT EXECUTED
400251a8: 52801162 mov w2, #0x8b // #139 <== NOT EXECUTED
return MAP_FAILED;
400251ac: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
400251b0: a9446bf9 ldp x25, x26, [sp, #64] <== NOT EXECUTED
400251b4: a94573fb ldp x27, x28, [sp, #80] <== NOT EXECUTED
errno = EOVERFLOW;
400251b8: b9000022 str w2, [x1] <== NOT EXECUTED
return MAP_FAILED;
400251bc: 17ffff6c b 40024f6c <mmap+0x28c> <== NOT EXECUTED
memset( mapping->addr, 0, len );
400251c0: f9400b80 ldr x0, [x28, #16]
400251c4: aa1503e2 mov x2, x21
400251c8: 52800001 mov w1, #0x0 // #0
400251cc: 94002d55 bl 40030720 <memset>
400251d0: 17ffff0a b 40024df8 <mmap+0x118>
400251d4: a9446bf9 ldp x25, x26, [sp, #64] <== NOT EXECUTED
400251d8: a94573fb ldp x27, x28, [sp, #80] <== NOT EXECUTED
400251dc: 17ffff64 b 40024f6c <mmap+0x28c> <== NOT EXECUTED
free( mapping->addr );
400251e0: f9400b80 ldr x0, [x28, #16] <== NOT EXECUTED
400251e4: 94000f83 bl 40028ff0 <free> <== NOT EXECUTED
400251e8: 17ffffe9 b 4002518c <mmap+0x4ac> <== NOT EXECUTED
if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_ANON)) != 0) {
400251ec: 34ffdb20 cbz w0, 40024d50 <mmap+0x70> <== ALWAYS TAKEN
400251f0: 17ffff58 b 40024f50 <mmap+0x270> <== NOT EXECUTED
...
00000000400250d0 <mq_close>:
*/
int mq_close(
mqd_t mqdes
)
{
400250d0: a9ba7bfd stp x29, x30, [sp, #-96]!
400250d4: 910003fd mov x29, sp
400250d8: f9000bf3 str x19, [sp, #16]
400250dc: 2a0003f3 mov w19, w0
*
* @see _Objects_Allocator_unlock() and _Objects_Allocate().
*/
RTEMS_INLINE_ROUTINE void _Objects_Allocator_lock( void )
{
_RTEMS_Lock_allocator();
400250e0: 940007f4 bl 400270b0 <_RTEMS_Lock_allocator>
Objects_Id id,
Thread_queue_Context *queue_context
)
{
_Thread_queue_Context_initialize( queue_context );
return (POSIX_Message_queue_Control *) _Objects_Get(
400250e4: f00006c2 adrp x2, 40100000 <_POSIX_Message_queue_Information>
400250e8: 91000042 add x2, x2, #0x0
400250ec: 2a1303e0 mov w0, w19
400250f0: 910083e1 add x1, sp, #0x20
400250f4: 94000c33 bl 400281c0 <_Objects_Get>
Thread_queue_Context queue_context;
_Objects_Allocator_lock();
the_mq = _POSIX_Message_queue_Get( mqdes, &queue_context );
if ( the_mq == NULL ) {
400250f8: b40001c0 cbz x0, 40025130 <mq_close+0x60> <== NEVER TAKEN
_CORE_message_queue_Acquire_critical(
&the_mq->Message_queue,
&queue_context
);
if ( the_mq->open_count == 0 ) {
400250fc: b9409c03 ldr w3, [x0, #156]
40025100: 34000143 cbz w3, 40025128 <mq_close+0x58>
_CORE_message_queue_Release( &the_mq->Message_queue, &queue_context );
_Objects_Allocator_unlock();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq->open_count -= 1;
40025104: 51000463 sub w3, w3, #0x1
_POSIX_Message_queue_Delete( the_mq, &queue_context );
40025108: 910083e1 add x1, sp, #0x20
the_mq->open_count -= 1;
4002510c: b9009c03 str w3, [x0, #156]
_POSIX_Message_queue_Delete( the_mq, &queue_context );
40025110: 94000010 bl 40025150 <_POSIX_Message_queue_Delete>
* previous thread life protection state and thus may not return if the
* executing thread was restarted or deleted in the mean-time.
*/
RTEMS_INLINE_ROUTINE void _Objects_Allocator_unlock( void )
{
_RTEMS_Unlock_allocator();
40025114: 940007eb bl 400270c0 <_RTEMS_Unlock_allocator>
_Objects_Allocator_unlock();
return 0;
40025118: 52800000 mov w0, #0x0 // #0
}
4002511c: f9400bf3 ldr x19, [sp, #16]
40025120: a8c67bfd ldp x29, x30, [sp], #96
40025124: d65f03c0 ret
Thread_queue_Context *queue_context
)
{
(void) the_thread_queue;
_Assert( _Thread_queue_Is_lock_owner( the_thread_queue ) );
_ISR_lock_ISR_enable( &queue_context->Lock_context.Lock_context );
40025128: b94023e0 ldr w0, [sp, #32]
4002512c: d51b4220 msr daif, x0
40025130: 940007e4 bl 400270c0 <_RTEMS_Unlock_allocator>
rtems_set_errno_and_return_minus_one( EBADF );
40025134: 940035b2 bl 400327fc <__errno>
40025138: aa0003e1 mov x1, x0
4002513c: 52800122 mov w2, #0x9 // #9
40025140: 12800000 mov w0, #0xffffffff // #-1
40025144: b9000022 str w2, [x1]
40025148: 17fffff5 b 4002511c <mq_close+0x4c>
4002514c: 00000000 udf #0
0000000040028eb0 <mq_getattr>:
int mq_getattr(
mqd_t mqdes,
struct mq_attr *mqstat
)
{
40028eb0: a9ba7bfd stp x29, x30, [sp, #-96]!
40028eb4: 910003fd mov x29, sp
POSIX_Message_queue_Control *the_mq;
Thread_queue_Context queue_context;
if ( mqstat == NULL ) {
40028eb8: b40003c1 cbz x1, 40028f30 <mq_getattr+0x80>
40028ebc: 900006c2 adrp x2, 40100000 <Predefined_Msgs>
40028ec0: 9108a042 add x2, x2, #0x228
40028ec4: f9000bf3 str x19, [sp, #16]
40028ec8: aa0103f3 mov x19, x1
40028ecc: 910083e1 add x1, sp, #0x20
40028ed0: 94000814 bl 4002af20 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
}
the_mq = _POSIX_Message_queue_Get( mqdes, &queue_context );
if ( the_mq == NULL ) {
40028ed4: b4000200 cbz x0, 40028f14 <mq_getattr+0x64> <== NEVER TAKEN
_CORE_message_queue_Acquire_critical(
&the_mq->Message_queue,
&queue_context
);
if ( the_mq->open_count == 0 ) {
40028ed8: b9409c01 ldr w1, [x0, #156]
40028edc: 34000181 cbz w1, 40028f0c <mq_getattr+0x5c>
}
/*
* Return the old values.
*/
mqstat->mq_flags = the_mq->oflag;
40028ee0: b980c003 ldrsw x3, [x0, #192]
mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages;
mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
40028ee4: 29480402 ldp w2, w1, [x0, #64]
mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
40028ee8: f9402400 ldr x0, [x0, #72]
mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages;
40028eec: a9000a63 stp x3, x2, [x19]
mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
40028ef0: a9010660 stp x0, x1, [x19, #16]
40028ef4: b94023e0 ldr w0, [sp, #32]
40028ef8: d51b4220 msr daif, x0
_CORE_message_queue_Release( &the_mq->Message_queue, &queue_context );
return 0;
40028efc: f9400bf3 ldr x19, [sp, #16]
40028f00: 52800000 mov w0, #0x0 // #0
}
40028f04: a8c67bfd ldp x29, x30, [sp], #96
40028f08: d65f03c0 ret
40028f0c: b94023e0 ldr w0, [sp, #32]
40028f10: d51b4220 msr daif, x0
rtems_set_errno_and_return_minus_one( EBADF );
40028f14: 94003446 bl 4003602c <__errno>
40028f18: aa0003e1 mov x1, x0
40028f1c: 52800122 mov w2, #0x9 // #9
40028f20: 12800000 mov w0, #0xffffffff // #-1
40028f24: f9400bf3 ldr x19, [sp, #16]
40028f28: b9000022 str w2, [x1]
40028f2c: 17fffff6 b 40028f04 <mq_getattr+0x54>
rtems_set_errno_and_return_minus_one( EINVAL );
40028f30: 9400343f bl 4003602c <__errno>
40028f34: aa0003e1 mov x1, x0
40028f38: 528002c2 mov w2, #0x16 // #22
40028f3c: 12800000 mov w0, #0xffffffff // #-1
40028f40: b9000022 str w2, [x1]
40028f44: 17fffff0 b 40028f04 <mq_getattr+0x54>
...
000000004002e850 <mq_notify>:
int mq_notify(
mqd_t mqdes,
const struct sigevent *notification
)
{
4002e850: a9ba7bfd stp x29, x30, [sp, #-96]!
return (POSIX_Message_queue_Control *) _Objects_Get(
4002e854: d0000682 adrp x2, 40100000 <Predefined_Msgs>
4002e858: 9108a042 add x2, x2, #0x228
4002e85c: 910003fd mov x29, sp
4002e860: f9000bf3 str x19, [sp, #16]
4002e864: aa0103f3 mov x19, x1
4002e868: 910083e1 add x1, sp, #0x20
4002e86c: 97fff1ad bl 4002af20 <_Objects_Get>
POSIX_Message_queue_Control *the_mq;
Thread_queue_Context queue_context;
the_mq = _POSIX_Message_queue_Get( mqdes, &queue_context );
if ( the_mq == NULL ) {
4002e870: b40004a0 cbz x0, 4002e904 <mq_notify+0xb4> <== NEVER TAKEN
_CORE_message_queue_Acquire_critical(
&the_mq->Message_queue,
&queue_context
);
if ( the_mq->open_count == 0 ) {
4002e874: b9409c01 ldr w1, [x0, #156]
4002e878: 34000421 cbz w1, 4002e8fc <mq_notify+0xac>
_CORE_message_queue_Release( &the_mq->Message_queue, &queue_context );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( notification != NULL ) {
4002e87c: b40002d3 cbz x19, 4002e8d4 <mq_notify+0x84>
if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) {
4002e880: f9403c01 ldr x1, [x0, #120]
return (the_message_queue->notify_handler != NULL);
4002e884: 91008002 add x2, x0, #0x20
4002e888: b50002a1 cbnz x1, 4002e8dc <mq_notify+0x8c>
_CORE_message_queue_Release( &the_mq->Message_queue, &queue_context );
rtems_set_errno_and_return_minus_one( EBUSY );
}
the_mq->notification = *notification;
4002e88c: f9400263 ldr x3, [x19]
4002e890: 91028001 add x1, x0, #0xa0
4002e894: f9005003 str x3, [x0, #160]
the_message_queue->notify_handler = the_handler;
4002e898: 90000000 adrp x0, 4002e000 <_User_extensions_Iterate+0x90>
4002e89c: 91208000 add x0, x0, #0x820
4002e8a0: f9400663 ldr x3, [x19, #8]
4002e8a4: f9000423 str x3, [x1, #8]
4002e8a8: f9400a63 ldr x3, [x19, #16]
4002e8ac: f9000823 str x3, [x1, #16]
4002e8b0: f9400e63 ldr x3, [x19, #24]
4002e8b4: f9000c23 str x3, [x1, #24]
4002e8b8: f9002c40 str x0, [x2, #88]
4002e8bc: b94023e0 ldr w0, [sp, #32]
4002e8c0: d51b4220 msr daif, x0
} else {
_CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL );
}
_CORE_message_queue_Release( &the_mq->Message_queue, &queue_context );
return 0;
4002e8c4: 52800000 mov w0, #0x0 // #0
}
4002e8c8: f9400bf3 ldr x19, [sp, #16]
4002e8cc: a8c67bfd ldp x29, x30, [sp], #96
4002e8d0: d65f03c0 ret
4002e8d4: f9003c1f str xzr, [x0, #120]
}
4002e8d8: 17fffff9 b 4002e8bc <mq_notify+0x6c>
4002e8dc: b94023e0 ldr w0, [sp, #32]
4002e8e0: d51b4220 msr daif, x0
rtems_set_errno_and_return_minus_one( EBUSY );
4002e8e4: 94001dd2 bl 4003602c <__errno>
4002e8e8: aa0003e1 mov x1, x0
4002e8ec: 52800202 mov w2, #0x10 // #16
4002e8f0: 12800000 mov w0, #0xffffffff // #-1
4002e8f4: b9000022 str w2, [x1]
4002e8f8: 17fffff4 b 4002e8c8 <mq_notify+0x78>
4002e8fc: b94023e0 ldr w0, [sp, #32]
4002e900: d51b4220 msr daif, x0
rtems_set_errno_and_return_minus_one( EBADF );
4002e904: 94001dca bl 4003602c <__errno>
4002e908: aa0003e1 mov x1, x0
4002e90c: 52800122 mov w2, #0x9 // #9
4002e910: 12800000 mov w0, #0xffffffff // #-1
4002e914: b9000022 str w2, [x1]
4002e918: 17ffffec b 4002e8c8 <mq_notify+0x78>
4002e91c: 00000000 udf #0
0000000040029410 <mq_setattr>:
int mq_setattr(
mqd_t mqdes,
const struct mq_attr *__restrict mqstat,
struct mq_attr *__restrict omqstat
)
{
40029410: a9ba7bfd stp x29, x30, [sp, #-96]!
40029414: 910003fd mov x29, sp
POSIX_Message_queue_Control *the_mq;
Thread_queue_Context queue_context;
if ( mqstat == NULL ) {
40029418: b4000441 cbz x1, 400294a0 <mq_setattr+0x90>
4002941c: a90153f3 stp x19, x20, [sp, #16]
40029420: aa0103f4 mov x20, x1
40029424: aa0203f3 mov x19, x2
40029428: 910083e1 add x1, sp, #0x20
4002942c: f00006a2 adrp x2, 40100000 <Predefined_Msgs>
40029430: 9108a042 add x2, x2, #0x228
40029434: 940006bb bl 4002af20 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
}
the_mq = _POSIX_Message_queue_Get( mqdes, &queue_context );
if ( the_mq == NULL ) {
40029438: b4000260 cbz x0, 40029484 <mq_setattr+0x74> <== NEVER TAKEN
_CORE_message_queue_Acquire_critical(
&the_mq->Message_queue,
&queue_context
);
if ( the_mq->open_count == 0 ) {
4002943c: b9409c01 ldr w1, [x0, #156]
40029440: 340001e1 cbz w1, 4002947c <mq_setattr+0x6c>
/*
* Return the old values.
*/
if ( omqstat != NULL ) {
40029444: b40000d3 cbz x19, 4002945c <mq_setattr+0x4c>
omqstat->mq_flags = the_mq->oflag;
omqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
omqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages;
omqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
40029448: 29480403 ldp w3, w1, [x0, #64]
omqstat->mq_flags = the_mq->oflag;
4002944c: b980c004 ldrsw x4, [x0, #192]
omqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
40029450: f9402402 ldr x2, [x0, #72]
omqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages;
40029454: a9000e64 stp x4, x3, [x19]
omqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
40029458: a9010662 stp x2, x1, [x19, #16]
}
the_mq->oflag = mqstat->mq_flags;
4002945c: f9400281 ldr x1, [x20]
40029460: b900c001 str w1, [x0, #192]
40029464: b94023e0 ldr w0, [sp, #32]
40029468: d51b4220 msr daif, x0
_CORE_message_queue_Release( &the_mq->Message_queue, &queue_context );
return 0;
4002946c: a94153f3 ldp x19, x20, [sp, #16]
40029470: 52800000 mov w0, #0x0 // #0
}
40029474: a8c67bfd ldp x29, x30, [sp], #96
40029478: d65f03c0 ret
4002947c: b94023e0 ldr w0, [sp, #32]
40029480: d51b4220 msr daif, x0
rtems_set_errno_and_return_minus_one( EBADF );
40029484: 940032ea bl 4003602c <__errno>
40029488: aa0003e1 mov x1, x0
4002948c: 52800122 mov w2, #0x9 // #9
40029490: 12800000 mov w0, #0xffffffff // #-1
40029494: a94153f3 ldp x19, x20, [sp, #16]
40029498: b9000022 str w2, [x1]
4002949c: 17fffff6 b 40029474 <mq_setattr+0x64>
rtems_set_errno_and_return_minus_one( EINVAL );
400294a0: 940032e3 bl 4003602c <__errno>
400294a4: aa0003e1 mov x1, x0
400294a8: 528002c2 mov w2, #0x16 // #22
400294ac: 12800000 mov w0, #0xffffffff // #-1
400294b0: b9000022 str w2, [x1]
400294b4: 17fffff0 b 40029474 <mq_setattr+0x64>
...
0000000040025200 <munmap>:
#include <rtems/posix/mmanimpl.h>
#include <rtems/posix/shmimpl.h>
int munmap(void *addr, size_t len)
{
40025200: a9bc7bfd stp x29, x30, [sp, #-64]!
40025204: 910003fd mov x29, sp
40025208: a90153f3 stp x19, x20, [sp, #16]
4002520c: aa0003f4 mov x20, x0
40025210: aa0103f3 mov x19, x1
rtems_chain_node *node;
/*
* Clear errno.
*/
errno = 0;
40025214: 94002bb6 bl 400300ec <__errno>
40025218: b900001f str wzr, [x0]
/*
* Length cannot be 0.
*/
if ( len == 0 ) {
4002521c: b4000873 cbz x19, 40025328 <munmap+0x128> <== NEVER TAKEN
40025220: f100027f cmp x19, #0x0
errno = EINVAL;
return -1;
}
/* Check for illegal addresses. Watch out for address wrap. */
if (addr + len < addr) {
40025224: 5400082b b.lt 40025328 <munmap+0x128> // b.tstop <== NEVER TAKEN
40025228: 97fff13a bl 40021710 <rtems_libio_lock>
return _Chain_Immutable_head( the_chain )->next;
4002522c: f00006c0 adrp x0, 40100000 <_IO_Driver_address_table>
40025230: f941bc13 ldr x19, [x0, #888]
}
mmap_mappings_lock_obtain();
node = rtems_chain_first (&mmap_mappings);
while ( !rtems_chain_is_tail( &mmap_mappings, node )) {
40025234: f00006c0 adrp x0, 40100000 <_IO_Driver_address_table>
40025238: 910e0000 add x0, x0, #0x380
4002523c: eb00027f cmp x19, x0
40025240: 54000180 b.eq 40025270 <munmap+0x70> // b.none <== NEVER TAKEN
40025244: d503201f nop
mapping = (mmap_mapping*) node;
if ( ( addr >= mapping->addr ) &&
40025248: f9400a61 ldr x1, [x19, #16]
4002524c: eb14003f cmp x1, x20
40025250: 540000a8 b.hi 40025264 <munmap+0x64> // b.pmore
( addr < ( mapping->addr + mapping->len )) ) {
40025254: f9400e62 ldr x2, [x19, #24]
40025258: 8b020021 add x1, x1, x2
if ( ( addr >= mapping->addr ) &&
4002525c: eb01029f cmp x20, x1
40025260: 54000123 b.cc 40025284 <munmap+0x84> // b.lo, b.ul, b.last
return the_node->next;
40025264: f9400273 ldr x19, [x19]
while ( !rtems_chain_is_tail( &mmap_mappings, node )) {
40025268: eb00027f cmp x19, x0
4002526c: 54fffee1 b.ne 40025248 <munmap+0x48> // b.any <== ALWAYS TAKEN
rtems_libio_unlock();
40025270: 97fff12c bl 40021720 <rtems_libio_unlock>
}
node = rtems_chain_next( node );
}
mmap_mappings_lock_release( );
return 0;
40025274: 52800000 mov w0, #0x0 // #0
}
40025278: a94153f3 ldp x19, x20, [sp, #16]
4002527c: a8c47bfd ldp x29, x30, [sp], #64
40025280: d65f03c0 ret
previous = the_node->previous;
40025284: a9400261 ldp x1, x0, [x19]
if ( mapping->shm != NULL ) {
40025288: f9401674 ldr x20, [x19, #40]
next->previous = previous;
4002528c: f9000420 str x0, [x1, #8]
previous->next = next;
40025290: f9000001 str x1, [x0]
40025294: b40002d4 cbz x20, 400252ec <munmap+0xec>
*
* @see _Objects_Allocator_unlock() and _Objects_Allocate().
*/
RTEMS_INLINE_ROUTINE void _Objects_Allocator_lock( void )
{
_RTEMS_Lock_allocator();
40025298: f90013f5 str x21, [sp, #32]
4002529c: 940002a9 bl 40025d40 <_RTEMS_Lock_allocator>
int err;
err = 0;
_Objects_Allocator_lock();
--shm->reference_count;
400252a0: b9403a80 ldr w0, [x20, #56]
400252a4: 51000400 sub w0, w0, #0x1
400252a8: b9003a80 str w0, [x20, #56]
if ( shm->reference_count == 0 ) {
400252ac: 350000a0 cbnz w0, 400252c0 <munmap+0xc0> <== ALWAYS TAKEN
if ( (*shm->shm_object.ops->object_delete)( &shm->shm_object ) != 0 ) {
400252b0: f9402a81 ldr x1, [x20, #80] <== NOT EXECUTED
400252b4: 91010280 add x0, x20, #0x40 <== NOT EXECUTED
400252b8: f9400821 ldr x1, [x1, #16] <== NOT EXECUTED
400252bc: d63f0020 blr x1 <== NOT EXECUTED
err = EIO;
}
}
/* check if the object has been unlinked yet. */
obj = _Objects_Get( shm->Object.id, &lock_ctx, &_POSIX_Shm_Information );
400252c0: b9401280 ldr w0, [x20, #16]
400252c4: f00006d5 adrp x21, 40100000 <_IO_Driver_address_table>
400252c8: 910182b5 add x21, x21, #0x60
400252cc: 9100e3e1 add x1, sp, #0x38
400252d0: aa1503e2 mov x2, x21
400252d4: 94000477 bl 400264b0 <_Objects_Get>
if ( obj == NULL ) {
400252d8: b40001e0 cbz x0, 40025314 <munmap+0x114> <== NEVER TAKEN
/* if it was unlinked, then it can be freed. */
_POSIX_Shm_Free( shm );
} else {
/* it will be freed when it is unlinked. */
_ISR_lock_ISR_enable( &lock_ctx );
400252dc: b9403be0 ldr w0, [sp, #56]
400252e0: d51b4220 msr daif, x0
* previous thread life protection state and thus may not return if the
* executing thread was restarted or deleted in the mean-time.
*/
RTEMS_INLINE_ROUTINE void _Objects_Allocator_unlock( void )
{
_RTEMS_Unlock_allocator();
400252e4: 9400029b bl 40025d50 <_RTEMS_Unlock_allocator>
400252e8: f94013f5 ldr x21, [sp, #32]
if (( mapping->flags & MAP_SHARED ) != MAP_SHARED ) {
400252ec: 52800220 mov w0, #0x11 // #17
400252f0: b9402261 ldr w1, [x19, #32]
400252f4: 6a00003f tst w1, w0
400252f8: 54000080 b.eq 40025308 <munmap+0x108> // b.none
free( mapping );
400252fc: aa1303e0 mov x0, x19
40025300: 94000f3c bl 40028ff0 <free>
break;
40025304: 17ffffdb b 40025270 <munmap+0x70>
free( mapping->addr );
40025308: f9400a60 ldr x0, [x19, #16]
4002530c: 94000f39 bl 40028ff0 <free>
40025310: 17fffffb b 400252fc <munmap+0xfc>
Objects_Control *the_object
)
{
_Assert( _Objects_Allocator_is_owner() );
_Assert( information->deallocate != NULL );
( *information->deallocate )( information, the_object );
40025314: f9400ea2 ldr x2, [x21, #24] <== NOT EXECUTED
40025318: aa1403e1 mov x1, x20 <== NOT EXECUTED
4002531c: aa1503e0 mov x0, x21 <== NOT EXECUTED
40025320: d63f0040 blr x2 <== NOT EXECUTED
}
40025324: 17fffff0 b 400252e4 <munmap+0xe4> <== NOT EXECUTED
errno = EINVAL;
40025328: 94002b71 bl 400300ec <__errno> <== NOT EXECUTED
4002532c: aa0003e1 mov x1, x0 <== NOT EXECUTED
40025330: 528002c2 mov w2, #0x16 // #22 <== NOT EXECUTED
return -1;
40025334: 12800000 mov w0, #0xffffffff // #-1 <== NOT EXECUTED
errno = EINVAL;
40025338: b9000022 str w2, [x1] <== NOT EXECUTED
return -1;
4002533c: 17ffffcf b 40025278 <munmap+0x78> <== NOT EXECUTED
00000000400243f0 <pthread_attr_getaffinity_np>:
int pthread_attr_getaffinity_np(
const pthread_attr_t *attr,
size_t cpusetsize,
cpu_set_t *cpuset
)
{
400243f0: aa0003e3 mov x3, x0
if ( attr == NULL || !attr->is_initialized ) {
400243f4: b40001c0 cbz x0, 4002442c <pthread_attr_getaffinity_np+0x3c> <== NEVER TAKEN
return EINVAL;
}
if ( cpuset == NULL || cpusetsize != attr->affinitysetsize ) {
400243f8: b9400064 ldr w4, [x3]
return EINVAL;
400243fc: 528002c0 mov w0, #0x16 // #22
if ( cpuset == NULL || cpusetsize != attr->affinitysetsize ) {
40024400: 7100009f cmp w4, #0x0
40024404: fa401844 ccmp x2, #0x0, #0x4, ne // ne = any
40024408: 54000100 b.eq 40024428 <pthread_attr_getaffinity_np+0x38> // b.none<== NEVER TAKEN
4002440c: f9403064 ldr x4, [x3, #96]
40024410: eb01009f cmp x4, x1
40024414: 540000a1 b.ne 40024428 <pthread_attr_getaffinity_np+0x38> // b.any <== NEVER TAKEN
return CPU_ISSET_S(cpu, sizeof(*set), set);
}
static __inline void CPU_COPY(const cpu_set_t *src, cpu_set_t *dest)
{
BIT_COPY(_cpu_set_bits(setsize), src, dest);
40024418: f9403461 ldr x1, [x3, #104]
return EINVAL;
}
CPU_COPY( attr->affinityset, cpuset );
return 0;
4002441c: 52800000 mov w0, #0x0 // #0
40024420: f9400021 ldr x1, [x1]
40024424: f9000041 str x1, [x2]
}
40024428: d65f03c0 ret
return EINVAL;
4002442c: 528002c0 mov w0, #0x16 // #22 <== NOT EXECUTED
}
40024430: d65f03c0 ret <== NOT EXECUTED
...
0000000040024640 <pthread_attr_setaffinity_np>:
int pthread_attr_setaffinity_np(
pthread_attr_t *attr,
size_t cpusetsize,
const cpu_set_t *cpuset
)
{
40024640: aa0003e3 mov x3, x0
if ( attr == NULL || !attr->is_initialized ) {
40024644: b40001c0 cbz x0, 4002467c <pthread_attr_setaffinity_np+0x3c> <== NEVER TAKEN
return EINVAL;
}
if ( cpuset == NULL || cpusetsize != attr->affinitysetsize ) {
40024648: b9400064 ldr w4, [x3]
return EINVAL;
4002464c: 528002c0 mov w0, #0x16 // #22
if ( cpuset == NULL || cpusetsize != attr->affinitysetsize ) {
40024650: 7100009f cmp w4, #0x0
40024654: fa401844 ccmp x2, #0x0, #0x4, ne // ne = any
40024658: 54000100 b.eq 40024678 <pthread_attr_setaffinity_np+0x38> // b.none<== NEVER TAKEN
4002465c: f9403064 ldr x4, [x3, #96]
40024660: eb01009f cmp x4, x1
40024664: 540000a1 b.ne 40024678 <pthread_attr_setaffinity_np+0x38> // b.any <== NEVER TAKEN
40024668: f9403461 ldr x1, [x3, #104]
return EINVAL;
}
CPU_COPY( cpuset, attr->affinityset );
return 0;
4002466c: 52800000 mov w0, #0x0 // #0
40024670: f9400042 ldr x2, [x2]
40024674: f9000022 str x2, [x1]
}
40024678: d65f03c0 ret
return EINVAL;
4002467c: 528002c0 mov w0, #0x16 // #22 <== NOT EXECUTED
}
40024680: d65f03c0 ret <== NOT EXECUTED
...
00000000400261b0 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
400261b0: aa0003e2 mov x2, x0
if ( !attr || !attr->is_initialized )
400261b4: b40001e0 cbz x0, 400261f0 <pthread_attr_setschedpolicy+0x40>
400261b8: b9400043 ldr w3, [x2]
return EINVAL;
400261bc: 528002c0 mov w0, #0x16 // #22
if ( !attr || !attr->is_initialized )
400261c0: 34000103 cbz w3, 400261e0 <pthread_attr_setschedpolicy+0x30>
switch ( policy ) {
400261c4: 7100083f cmp w1, #0x2
400261c8: 540000ed b.le 400261e4 <pthread_attr_setschedpolicy+0x34>
400261cc: 7100103f cmp w1, #0x4
400261d0: 528010c0 mov w0, #0x86 // #134
400261d4: 54000061 b.ne 400261e0 <pthread_attr_setschedpolicy+0x30> // b.any <== NEVER TAKEN
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
400261d8: 52800000 mov w0, #0x0 // #0
attr->schedpolicy = policy;
400261dc: b9001c41 str w1, [x2, #28]
default:
return ENOTSUP;
}
}
400261e0: d65f03c0 ret
switch ( policy ) {
400261e4: 528010c0 mov w0, #0x86 // #134
400261e8: 36ffff81 tbz w1, #31, 400261d8 <pthread_attr_setschedpolicy+0x28>
}
400261ec: d65f03c0 ret
return EINVAL;
400261f0: 528002c0 mov w0, #0x16 // #22
}
400261f4: d65f03c0 ret
...
0000000040024d00 <pthread_cancel>:
/*
* 18.2.1 Canceling Execution of a Thread, P1003.1c/Draft 10, p. 181
*/
int pthread_cancel( pthread_t thread )
{
40024d00: a9bd7bfd stp x29, x30, [sp, #-48]!
40024d04: 910003fd mov x29, sp
40024d08: f9000bf3 str x19, [sp, #16]
40024d0c: 2a0003f3 mov w19, w0
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() ) {
40024d10: 94000470 bl 40025ed0 <_ISR_Is_in_progress>
40024d14: 72001c1f tst w0, #0xff
40024d18: 540002e1 b.ne 40024d74 <pthread_cancel+0x74> // b.any
return EPROTO;
}
the_thread = _Thread_Get( thread, &lock_context );
40024d1c: 2a1303e0 mov w0, w19
40024d20: 9100a3e1 add x1, sp, #0x28
40024d24: 94000a97 bl 40027780 <_Thread_Get>
if ( the_thread == NULL ) {
40024d28: b4000340 cbz x0, 40024d90 <pthread_cancel+0x90>
const ISR_lock_Context *lock_context
)
{
uint32_t disable_level;
disable_level = cpu_self->thread_dispatch_disable_level;
40024d2c: f00006f3 adrp x19, 40103000 <_POSIX_Threads_Objects+0xb38>
40024d30: 912c0273 add x19, x19, #0xb00
40024d34: b9401a61 ldr w1, [x19, #24]
_Profiling_Thread_dispatch_disable_critical(
cpu_self,
disable_level,
lock_context
);
cpu_self->thread_dispatch_disable_level = disable_level + 1;
40024d38: 11000421 add w1, w1, #0x1
40024d3c: b9001a61 str w1, [x19, #24]
return ESRCH;
}
cpu_self = _Thread_Dispatch_disable_critical( &lock_context );
_ISR_lock_ISR_enable( &lock_context );
40024d40: b9402be1 ldr w1, [sp, #40]
40024d44: d51b4221 msr daif, x1
40024d48: f9401261 ldr x1, [x19, #32]
executing = _Per_CPU_Get_executing( cpu_self );
if ( the_thread == executing ) {
_Thread_Exit( executing, THREAD_LIFE_TERMINATING, PTHREAD_CANCELED );
40024d4c: 92800002 mov x2, #0xffffffffffffffff // #-1
if ( the_thread == executing ) {
40024d50: eb01001f cmp x0, x1
40024d54: 54000180 b.eq 40024d84 <pthread_cancel+0x84> // b.none <== NEVER TAKEN
} else {
_Thread_Cancel( the_thread, executing, PTHREAD_CANCELED );
40024d58: 94001026 bl 40028df0 <_Thread_Cancel>
}
_Thread_Dispatch_enable( cpu_self );
40024d5c: aa1303e0 mov x0, x19
40024d60: 94000a68 bl 40027700 <_Thread_Dispatch_enable>
return 0;
40024d64: 52800000 mov w0, #0x0 // #0
}
40024d68: f9400bf3 ldr x19, [sp, #16]
40024d6c: a8c37bfd ldp x29, x30, [sp], #48
40024d70: d65f03c0 ret
return EPROTO;
40024d74: 528008e0 mov w0, #0x47 // #71
}
40024d78: f9400bf3 ldr x19, [sp, #16]
40024d7c: a8c37bfd ldp x29, x30, [sp], #48
40024d80: d65f03c0 ret
_Thread_Exit( executing, THREAD_LIFE_TERMINATING, PTHREAD_CANCELED );
40024d84: 52800081 mov w1, #0x4 // #4 <== NOT EXECUTED
40024d88: 9400108e bl 40028fc0 <_Thread_Exit> <== NOT EXECUTED
40024d8c: 17fffff4 b 40024d5c <pthread_cancel+0x5c> <== NOT EXECUTED
return ESRCH;
40024d90: 52800060 mov w0, #0x3 // #3
40024d94: 17fffff5 b 40024d68 <pthread_cancel+0x68>
...
0000000040024ff0 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
40024ff0: aa0003e1 mov x1, x0
if ( attr == NULL || !attr->is_initialized )
40024ff4: b40000e0 cbz x0, 40025010 <pthread_condattr_destroy+0x20>
40024ff8: b9400022 ldr w2, [x1]
return EINVAL;
40024ffc: 528002c0 mov w0, #0x16 // #22
if ( attr == NULL || !attr->is_initialized )
40025000: 34000062 cbz w2, 4002500c <pthread_condattr_destroy+0x1c> <== NEVER TAKEN
attr->is_initialized = false;
return 0;
40025004: 52800000 mov w0, #0x0 // #0
attr->is_initialized = false;
40025008: b900003f str wzr, [x1]
}
4002500c: d65f03c0 ret
return EINVAL;
40025010: 528002c0 mov w0, #0x16 // #22
}
40025014: d65f03c0 ret
...
0000000040024110 <pthread_condattr_getclock>:
{
if ( attr == NULL ) {
return EINVAL;
}
if ( clock == NULL ) {
40024110: f100001f cmp x0, #0x0
40024114: fa401824 ccmp x1, #0x0, #0x4, ne // ne = any
40024118: 540000a0 b.eq 4002412c <pthread_condattr_getclock+0x1c> // b.none <== ALWAYS TAKEN
return EINVAL;
}
*clock = attr->clock;
4002411c: f9400402 ldr x2, [x0, #8] <== NOT EXECUTED
return 0;
40024120: 52800000 mov w0, #0x0 // #0 <== NOT EXECUTED
*clock = attr->clock;
40024124: b9000022 str w2, [x1] <== NOT EXECUTED
}
40024128: d65f03c0 ret <== NOT EXECUTED
return EINVAL;
4002412c: 528002c0 mov w0, #0x16 // #22
}
40024130: d65f03c0 ret
...
0000000040026420 <pthread_create>:
{
40026420: a9b27bfd stp x29, x30, [sp, #-224]!
Thread_Entry_information entry = {
40026424: d0000004 adrp x4, 40028000 <_Scheduler_priority_Yield+0xa0>
40026428: 911dc084 add x4, x4, #0x770
{
4002642c: 910003fd mov x29, sp
int schedpolicy = SCHED_RR;
40026430: 52800045 mov w5, #0x2 // #2
{
40026434: a90153f3 stp x19, x20, [sp, #16]
int schedpolicy = SCHED_RR;
40026438: b9004fe5 str w5, [sp, #76]
Thread_Entry_information entry = {
4002643c: a9050be4 stp x4, x2, [sp, #80]
40026440: f90033e3 str x3, [sp, #96]
if ( !start_routine )
40026444: b4000d22 cbz x2, 400265e8 <pthread_create+0x1c8>
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
40026448: aa0103f3 mov x19, x1
4002644c: f100003f cmp x1, #0x0
40026450: b0000401 adrp x1, 400a7000 <status_code_text+0x100>
40026454: 91044021 add x1, x1, #0x110
40026458: 9a930033 csel x19, x1, x19, eq // eq = none
if ( !the_attr->is_initialized )
4002645c: a9025bf5 stp x21, x22, [sp, #32]
40026460: aa0003f5 mov x21, x0
40026464: b9400260 ldr w0, [x19]
40026468: 34000940 cbz w0, 40026590 <pthread_create+0x170>
if ( the_attr->stackaddr != NULL ) {
4002646c: f9400660 ldr x0, [x19, #8]
memset( &config, 0, sizeof( config ) );
40026470: f9006fff str xzr, [sp, #216]
config.is_fp = true;
40026474: 52802021 mov w1, #0x101 // #257
memset( &config, 0, sizeof( config ) );
40026478: a909ffff stp xzr, xzr, [sp, #152]
if ( !_Stack_Is_enough( the_attr->stacksize, config.is_fp ) ) {
4002647c: b9801274 ldrsw x20, [x19, #16]
memset( &config, 0, sizeof( config ) );
40026480: a90affff stp xzr, xzr, [sp, #168]
40026484: a90bffff stp xzr, xzr, [sp, #184]
40026488: a90cffff stp xzr, xzr, [sp, #200]
config.is_fp = true;
4002648c: 7901bbe1 strh w1, [sp, #220]
if ( the_attr->stackaddr != NULL ) {
40026490: b40008c0 cbz x0, 400265a8 <pthread_create+0x188>
bool is_fp
)
{
size_t minimum;
minimum = _TLS_Get_allocation_size();
40026494: 94000f6b bl 4002a240 <_TLS_Get_allocation_size>
return rtems_minimum_stack_size;
40026498: d00006c1 adrp x1, 40100000 <__dso_handle>
minimum += _Stack_Minimum();
4002649c: b9415821 ldr w1, [x1, #344]
400264a0: 8b000021 add x1, x1, x0
if ( !_Stack_Is_enough( the_attr->stacksize, config.is_fp ) ) {
400264a4: eb01029f cmp x20, x1
400264a8: 54000743 b.cc 40026590 <pthread_create+0x170> // b.lo, b.ul, b.last
config.stack_size = the_attr->stacksize;
400264ac: b9801260 ldrsw x0, [x19, #16]
config.stack_area = the_attr->stackaddr;
400264b0: f9400661 ldr x1, [x19, #8]
config.stack_size = the_attr->stacksize;
400264b4: a90a03e1 stp x1, x0, [sp, #160]
switch ( the_attr->inheritsched ) {
400264b8: b9401a60 ldr w0, [x19, #24]
400264bc: 7100041f cmp w0, #0x1
400264c0: 540008a0 b.eq 400265d4 <pthread_create+0x1b4> // b.none <== ALWAYS TAKEN
400264c4: 7100081f cmp w0, #0x2
400264c8: 54000641 b.ne 40026590 <pthread_create+0x170> // b.any
schedpolicy = the_attr->schedpolicy;
400264cc: b9401e62 ldr w2, [x19, #28]
schedparam = the_attr->schedparam;
400264d0: f9401261 ldr x1, [x19, #32]
schedpolicy = the_attr->schedpolicy;
400264d4: b9004fe2 str w2, [sp, #76]
schedparam = the_attr->schedparam;
400264d8: f90037e1 str x1, [sp, #104]
400264dc: a9428662 ldp x2, x1, [x19, #40]
400264e0: a90707e2 stp x2, x1, [sp, #112]
400264e4: a9438662 ldp x2, x1, [x19, #56]
400264e8: a90807e2 stp x2, x1, [sp, #128]
400264ec: f9402660 ldr x0, [x19, #72]
400264f0: f9004be0 str x0, [sp, #144]
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
400264f4: b9401660 ldr w0, [x19, #20]
return ENOTSUP;
400264f8: 528010d4 mov w20, #0x86 // #134
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
400264fc: 35000100 cbnz w0, 4002651c <pthread_create+0xfc>
error = _POSIX_Thread_Translate_sched_param(
40026500: b9404fe0 ldr w0, [sp, #76]
40026504: 910323e3 add x3, sp, #0xc8
40026508: 910303e2 add x2, sp, #0xc0
4002650c: 9101a3e1 add x1, sp, #0x68
40026510: 940014dc bl 4002b880 <_POSIX_Thread_Translate_sched_param>
40026514: 2a0003f4 mov w20, w0
if ( error != 0 ) {
40026518: 340000c0 cbz w0, 40026530 <pthread_create+0x110>
}
4002651c: 2a1403e0 mov w0, w20
40026520: a94153f3 ldp x19, x20, [sp, #16]
40026524: a9425bf5 ldp x21, x22, [sp, #32]
40026528: a8ce7bfd ldp x29, x30, [sp], #224
4002652c: d65f03c0 ret
normal_prio = schedparam.sched_priority;
40026530: b9406bf6 ldr w22, [sp, #104]
config.priority = _POSIX_Priority_To_core(
40026534: 91011fe2 add x2, sp, #0x47
config.scheduler = _Thread_Scheduler_get_home( executing );
40026538: f00003e0 adrp x0, 400a5000 <__trunctfdf2+0x2c0>
4002653c: 913b0000 add x0, x0, #0xec0
config.priority = _POSIX_Priority_To_core(
40026540: 2a1603e1 mov w1, w22
config.scheduler = _Thread_Scheduler_get_home( executing );
40026544: f9004fe0 str x0, [sp, #152]
config.priority = _POSIX_Priority_To_core(
40026548: 94001176 bl 4002ab20 <_POSIX_Priority_To_core>
4002654c: f9005fe0 str x0, [sp, #184]
if ( !valid ) {
40026550: 39411fe1 ldrb w1, [sp, #71]
40026554: 340001e1 cbz w1, 40026590 <pthread_create+0x170> <== NEVER TAKEN
if ( schedpolicy == SCHED_SPORADIC ) {
40026558: b9404fe1 ldr w1, [sp, #76]
core_low_prio = _POSIX_Priority_To_core( config.scheduler, low_prio, &valid );
4002655c: 91011fe2 add x2, sp, #0x47
40026560: f9404fe0 ldr x0, [sp, #152]
low_prio = schedparam.sched_ss_low_priority;
40026564: 7100103f cmp w1, #0x4
40026568: b9406fe1 ldr w1, [sp, #108]
core_low_prio = _POSIX_Priority_To_core( config.scheduler, low_prio, &valid );
4002656c: a90363f7 stp x23, x24, [sp, #48]
40026570: 1a960021 csel w1, w1, w22, eq // eq = none
40026574: 9400116b bl 4002ab20 <_POSIX_Priority_To_core>
40026578: aa0003f8 mov x24, x0
if ( !valid ) {
4002657c: 39411fe1 ldrb w1, [sp, #71]
40026580: 34000061 cbz w1, 4002658c <pthread_create+0x16c>
if ( the_attr->affinityset == NULL ) {
40026584: f9403660 ldr x0, [x19, #104]
40026588: b50003a0 cbnz x0, 400265fc <pthread_create+0x1dc> <== ALWAYS TAKEN
4002658c: a94363f7 ldp x23, x24, [sp, #48]
switch ( the_attr->inheritsched ) {
40026590: 528002d4 mov w20, #0x16 // #22
40026594: a9425bf5 ldp x21, x22, [sp, #32]
}
40026598: 2a1403e0 mov w0, w20
4002659c: a94153f3 ldp x19, x20, [sp, #16]
400265a0: a8ce7bfd ldp x29, x30, [sp], #224
400265a4: d65f03c0 ret
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
400265a8: f00003e0 adrp x0, 400a5000 <__trunctfdf2+0x2c0>
400265ac: f9474400 ldr x0, [x0, #3720]
400265b0: eb14001f cmp x0, x20
400265b4: 9a942014 csel x20, x0, x20, cs // cs = hs, nlast
config.stack_size = _POSIX_Threads_Ensure_minimum_stack(
400265b8: f90057f4 str x20, [sp, #168]
}
#else
(void) is_fp;
#endif
stack_size += _TLS_Get_allocation_size();
400265bc: 94000f21 bl 4002a240 <_TLS_Get_allocation_size>
400265c0: 8b140014 add x20, x0, x20
switch ( the_attr->inheritsched ) {
400265c4: b9401a60 ldr w0, [x19, #24]
config.stack_size = _Stack_Extend_size( config.stack_size, config.is_fp );
400265c8: f90057f4 str x20, [sp, #168]
switch ( the_attr->inheritsched ) {
400265cc: 7100041f cmp w0, #0x1
400265d0: 54fff7a1 b.ne 400264c4 <pthread_create+0xa4> // b.any
error = pthread_getschedparam(
400265d4: 9400019b bl 40026c40 <pthread_self>
400265d8: 9101a3e2 add x2, sp, #0x68
400265dc: 910133e1 add x1, sp, #0x4c
400265e0: 9400011c bl 40026a50 <pthread_getschedparam>
break;
400265e4: 17ffffc4 b 400264f4 <pthread_create+0xd4>
return EFAULT;
400265e8: 528001d4 mov w20, #0xe // #14
}
400265ec: 2a1403e0 mov w0, w20
400265f0: a94153f3 ldp x19, x20, [sp, #16]
400265f4: a8ce7bfd ldp x29, x30, [sp], #224
400265f8: d65f03c0 ret
_Assert(
_Objects_Allocator_is_owner()
|| !_System_state_Is_up( _System_state_Get() )
);
return ( *information->allocate )( information );
400265fc: d00006d7 adrp x23, 40100000 <__dso_handle>
40026600: 910022f7 add x23, x23, #0x8
_RTEMS_Lock_allocator();
40026604: 9400024f bl 40026f40 <_RTEMS_Lock_allocator>
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate(void)
{
_Objects_Allocator_lock();
_Thread_Kill_zombies();
40026608: 94000d7a bl 40029bf0 <_Thread_Kill_zombies>
return ( *information->allocate )( information );
4002660c: f9400ae1 ldr x1, [x23, #16]
40026610: aa1703e0 mov x0, x23
40026614: d63f0020 blr x1
40026618: aa0003f6 mov x22, x0
if ( !the_thread ) {
4002661c: b4000ae0 cbz x0, 40026778 <pthread_create+0x358>
if ( config.stack_area == NULL ) {
40026620: f94053e0 ldr x0, [sp, #160]
40026624: b4000720 cbz x0, 40026708 <pthread_create+0x2e8>
config.stack_free = _Stack_Free_nothing;
40026628: d0000000 adrp x0, 40028000 <_Scheduler_priority_Yield+0xa0>
4002662c: 91020000 add x0, x0, #0x80
40026630: f9005be0 str x0, [sp, #176]
status = _Thread_Initialize(
40026634: 910263e2 add x2, sp, #0x98
40026638: aa1603e1 mov x1, x22
4002663c: aa1703e0 mov x0, x23
40026640: 94000894 bl 40028890 <_Thread_Initialize>
if ( !status ) {
40026644: 72001c1f tst w0, #0xff
40026648: 540006e0 b.eq 40026724 <pthread_create+0x304> // b.none <== NEVER TAKEN
if ( the_attr->detachstate == PTHREAD_CREATE_DETACHED ) {
4002664c: b9405e60 ldr w0, [x19, #92]
the_thread->Life.state |= THREAD_LIFE_DETACHED;
40026650: b9426ac1 ldr w1, [x22, #616]
40026654: 7100001f cmp w0, #0x0
40026658: 321c0020 orr w0, w1, #0x10
4002665c: 1a810001 csel w1, w0, w1, eq // eq = none
the_thread->Life.state |= THREAD_LIFE_CHANGE_DEFERRED;
40026660: 321d0021 orr w1, w1, #0x8
40026664: b9026ac1 str w1, [x22, #616]
__asm__ volatile (
40026668: d53b4220 mrs x0, daif
4002666c: d50342df msr daifset, #0x2
_ISR_lock_ISR_disable( &lock_context );
40026670: b9004be0 str w0, [sp, #72]
status = _Scheduler_Set_affinity(
40026674: a9460a61 ldp x1, x2, [x19, #96]
40026678: aa1603e0 mov x0, x22
4002667c: 9400066d bl 40028030 <_Scheduler_Set_affinity>
40026680: 12001c00 and w0, w0, #0xff
_ISR_lock_ISR_enable( &lock_context );
40026684: b9404be1 ldr w1, [sp, #72]
__asm__ volatile (
40026688: d51b4221 msr daif, x1
if ( !status ) {
4002668c: 340005e0 cbz w0, 40026748 <pthread_create+0x328> <== NEVER TAKEN
( the_attr->inheritsched == PTHREAD_INHERIT_SCHED );
40026690: b9401a60 ldr w0, [x19, #24]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
40026694: f94122c1 ldr x1, [x22, #576]
( the_attr->inheritsched == PTHREAD_INHERIT_SCHED );
40026698: 7100041f cmp w0, #0x1
4002669c: 1a9f17e0 cset w0, eq // eq = none
400266a0: 3903aec0 strb w0, [x22, #235]
api->Sporadic.sched_ss_repl_period =
400266a4: a9428a60 ldp x0, x2, [x19, #40]
400266a8: a9058038 stp x24, x0, [x1, #88]
api->Sporadic.sched_ss_init_budget =
400266ac: f9401e60 ldr x0, [x19, #56]
api->Sporadic.sched_ss_repl_period =
400266b0: f9003422 str x2, [x1, #104]
api->Sporadic.sched_ss_init_budget =
400266b4: f9402262 ldr x2, [x19, #64]
400266b8: f9003820 str x0, [x1, #112]
api->Sporadic.sched_ss_max_repl =
400266bc: b9404a60 ldr w0, [x19, #72]
api->Sporadic.sched_ss_init_budget =
400266c0: f9003c22 str x2, [x1, #120]
api->Sporadic.sched_ss_max_repl =
400266c4: b9008020 str w0, [x1, #128]
if ( schedpolicy == SCHED_SPORADIC ) {
400266c8: b9404fe0 ldr w0, [sp, #76]
400266cc: 7100101f cmp w0, #0x4
400266d0: 540004e0 b.eq 4002676c <pthread_create+0x34c> // b.none
__asm__ volatile (
400266d4: d53b4220 mrs x0, daif
400266d8: d50342df msr daifset, #0x2
_ISR_lock_ISR_disable( &lock_context );
400266dc: b9004be0 str w0, [sp, #72]
status = _Thread_Start( the_thread, &entry, &lock_context );
400266e0: 910123e2 add x2, sp, #0x48
400266e4: 910143e1 add x1, sp, #0x50
400266e8: aa1603e0 mov x0, x22
400266ec: 94000e21 bl 40029f70 <_Thread_Start>
*thread = the_thread->Object.id;
400266f0: b94012c0 ldr w0, [x22, #16]
400266f4: b90002a0 str w0, [x21]
_RTEMS_Unlock_allocator();
400266f8: 94000216 bl 40026f50 <_RTEMS_Unlock_allocator>
return 0;
400266fc: a9425bf5 ldp x21, x22, [sp, #32]
40026700: a94363f7 ldp x23, x24, [sp, #48]
40026704: 17ffffa5 b 40026598 <pthread_create+0x178>
config.stack_area = _Stack_Allocate( config.stack_size );
40026708: f94057e0 ldr x0, [sp, #168]
config.stack_free = _Stack_Free;
4002670c: f0000001 adrp x1, 40029000 <_Thread_queue_Priority_priority_actions+0x90>
40026710: 913d8021 add x1, x1, #0xf60
40026714: f9005be1 str x1, [sp, #176]
config.stack_area = _Stack_Allocate( config.stack_size );
40026718: 94000e0e bl 40029f50 <_Stack_Allocate>
4002671c: f90053e0 str x0, [sp, #160]
if ( status ) {
40026720: b5fff8a0 cbnz x0, 40026634 <pthread_create+0x214>
Objects_Control *the_object
)
{
_Assert( _Objects_Allocator_is_owner() );
_Assert( information->deallocate != NULL );
( *information->deallocate )( information, the_object );
40026724: f9400ee2 ldr x2, [x23, #24]
40026728: aa1603e1 mov x1, x22
4002672c: aa1703e0 mov x0, x23
return EAGAIN;
40026730: 52800174 mov w20, #0xb // #11
40026734: d63f0040 blr x2
_RTEMS_Unlock_allocator();
40026738: 94000206 bl 40026f50 <_RTEMS_Unlock_allocator>
4002673c: a9425bf5 ldp x21, x22, [sp, #32]
40026740: a94363f7 ldp x23, x24, [sp, #48]
40026744: 17ffff95 b 40026598 <pthread_create+0x178>
( *information->deallocate )( information, the_object );
40026748: f9400ee2 ldr x2, [x23, #24] <== NOT EXECUTED
4002674c: aa1603e1 mov x1, x22 <== NOT EXECUTED
40026750: aa1703e0 mov x0, x23 <== NOT EXECUTED
return EINVAL;
40026754: 528002d4 mov w20, #0x16 // #22 <== NOT EXECUTED
40026758: d63f0040 blr x2 <== NOT EXECUTED
_RTEMS_Unlock_allocator();
4002675c: 940001fd bl 40026f50 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
return EINVAL;
40026760: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
40026764: a94363f7 ldp x23, x24, [sp, #48] <== NOT EXECUTED
40026768: 17ffff8c b 40026598 <pthread_create+0x178> <== NOT EXECUTED
_POSIX_Threads_Sporadic_timer( &api->Sporadic.Timer );
4002676c: 91002020 add x0, x1, #0x8
40026770: 97fffee0 bl 400262f0 <_POSIX_Threads_Sporadic_timer>
40026774: 17ffffd8 b 400266d4 <pthread_create+0x2b4>
_RTEMS_Unlock_allocator();
40026778: 940001f6 bl 40026f50 <_RTEMS_Unlock_allocator>
return EAGAIN;
4002677c: 52800174 mov w20, #0xb // #11
40026780: a9425bf5 ldp x21, x22, [sp, #32]
40026784: a94363f7 ldp x23, x24, [sp, #48]
40026788: 17ffff84 b 40026598 <pthread_create+0x178>
4002678c: 00000000 udf #0
0000000040026860 <pthread_getattr_np>:
Thread_CPU_budget_algorithms budget_algorithm;
const Scheduler_Control *scheduler;
Priority_Control priority;
bool ok;
if ( attr == NULL ) {
40026860: b40009e1 cbz x1, 4002699c <pthread_getattr_np+0x13c>
{
40026864: a9bb7bfd stp x29, x30, [sp, #-80]!
return EINVAL;
}
attr = memset( attr, 0, sizeof( *attr ) );
40026868: d2800f02 mov x2, #0x78 // #120
{
4002686c: 910003fd mov x29, sp
40026870: a90153f3 stp x19, x20, [sp, #16]
40026874: 2a0003f4 mov w20, w0
40026878: aa0103e0 mov x0, x1
attr = memset( attr, 0, sizeof( *attr ) );
4002687c: 52800001 mov w1, #0x0 // #0
40026880: 94017e92 bl 400862c8 <memset>
the_thread = _Thread_Get( thread, &lock_context );
40026884: 910123e1 add x1, sp, #0x48
attr = memset( attr, 0, sizeof( *attr ) );
40026888: aa0003f3 mov x19, x0
the_thread = _Thread_Get( thread, &lock_context );
4002688c: 2a1403e0 mov w0, w20
40026890: 940007c4 bl 400287a0 <_Thread_Get>
40026894: aa0003f4 mov x20, x0
if ( the_thread == NULL ) {
40026898: b4000860 cbz x0, 400269a4 <pthread_getattr_np+0x144>
_Thread_State_acquire_critical( the_thread, &lock_context );
attr->stackaddr = the_thread->Start.Initial_stack.area;
attr->stacksize = the_thread->Start.Initial_stack.size;
if ( the_thread->was_created_with_inherited_scheduler ) {
4002689c: 3943ac00 ldrb w0, [x0, #235]
400268a0: a9025bf5 stp x21, x22, [sp, #32]
{
#if defined(RTEMS_POSIX_API)
const POSIX_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
param->sched_ss_low_priority = _POSIX_Priority_From_core(
400268a4: f00003f6 adrp x22, 400a5000 <__trunctfdf2+0x2c0>
400268a8: 913b02d6 add x22, x22, #0xec0
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
400268ac: f9412295 ldr x21, [x20, #576]
attr->inheritsched = PTHREAD_INHERIT_SCHED;
} else {
attr->inheritsched = PTHREAD_EXPLICIT_SCHED;
400268b0: 7100001f cmp w0, #0x0
attr->stackaddr = the_thread->Start.Initial_stack.area;
400268b4: a9548283 ldp x3, x0, [x20, #328]
attr->inheritsched = PTHREAD_EXPLICIT_SCHED;
400268b8: 1a9f17e2 cset w2, eq // eq = none
param->sched_ss_low_priority = _POSIX_Priority_From_core(
400268bc: f9402ea1 ldr x1, [x21, #88]
400268c0: 11000442 add w2, w2, #0x1
400268c4: f9001bf7 str x23, [sp, #48]
attr->stackaddr = the_thread->Start.Initial_stack.area;
400268c8: f9000660 str x0, [x19, #8]
400268cc: aa1603e0 mov x0, x22
attr->stacksize = the_thread->Start.Initial_stack.size;
400268d0: b9001263 str w3, [x19, #16]
if ( the_thread->was_created_with_inherited_scheduler ) {
400268d4: b9001a62 str w2, [x19, #24]
400268d8: 9400109e bl 4002ab50 <_POSIX_Priority_From_core>
scheduler,
&attr->schedparam
);
priority = the_thread->Real_priority.priority;
if ( _Thread_Is_joinable( the_thread ) ) {
400268dc: b9426a83 ldr w3, [x20, #616]
attr->detachstate = PTHREAD_CREATE_JOINABLE;
} else {
attr->detachstate = PTHREAD_CREATE_DETACHED;
}
attr->affinityset = &attr->affinitysetpreallocated;
400268e0: 9101c262 add x2, x19, #0x70
priority = the_thread->Real_priority.priority;
400268e4: f9403297 ldr x23, [x20, #96]
if ( _Thread_Is_joinable( the_thread ) ) {
400268e8: d27c0063 eor x3, x3, #0x10
scheduler,
api->Sporadic.Low_priority.priority
);
param->sched_ss_repl_period = api->Sporadic.sched_ss_repl_period;
400268ec: f94032a1 ldr x1, [x21, #96]
param->sched_ss_low_priority = _POSIX_Priority_From_core(
400268f0: b9002660 str w0, [x19, #36]
param->sched_ss_repl_period = api->Sporadic.sched_ss_repl_period;
400268f4: f94036a0 ldr x0, [x21, #104]
400268f8: f9001661 str x1, [x19, #40]
param->sched_ss_init_budget = api->Sporadic.sched_ss_init_budget;
400268fc: f9403aa1 ldr x1, [x21, #112]
param->sched_ss_repl_period = api->Sporadic.sched_ss_repl_period;
40026900: f9001a60 str x0, [x19, #48]
param->sched_ss_init_budget = api->Sporadic.sched_ss_init_budget;
40026904: f9403ea0 ldr x0, [x21, #120]
40026908: d3441063 ubfx x3, x3, #4, #1
4002690c: a9038261 stp x1, x0, [x19, #56]
attr->affinitysetsize = sizeof( attr->affinitysetpreallocated );
40026910: d2800101 mov x1, #0x8 // #8
param->sched_ss_max_repl = api->Sporadic.sched_ss_max_repl;
40026914: b94082a0 ldr w0, [x21, #128]
40026918: b9004a60 str w0, [x19, #72]
ok = _Scheduler_Get_affinity(
4002691c: aa1403e0 mov x0, x20
40026920: b9005e63 str w3, [x19, #92]
attr->affinityset = &attr->affinitysetpreallocated;
40026924: a9060a61 stp x1, x2, [x19, #96]
ok = _Scheduler_Get_affinity(
40026928: 9400040a bl 40027950 <_Scheduler_Get_affinity>
the_thread,
attr->affinitysetsize,
attr->affinityset
);
budget_algorithm = the_thread->budget_algorithm;
4002692c: b940f294 ldr w20, [x20, #240]
ok = _Scheduler_Get_affinity(
40026930: 12001c15 and w21, w0, #0xff
_ISR_lock_ISR_enable( lock_context );
40026934: b9404be0 ldr w0, [sp, #72]
40026938: d51b4220 msr daif, x0
_Thread_State_release( the_thread, &lock_context );
attr->is_initialized = true;
4002693c: 52800022 mov w2, #0x1 // #1
40026940: b9000262 str w2, [x19]
attr->contentionscope = PTHREAD_SCOPE_PROCESS;
40026944: b900167f str wzr, [x19, #20]
attr->cputime_clock_allowed = 1;
attr->schedparam.sched_priority = _POSIX_Priority_From_core(
40026948: aa1703e1 mov x1, x23
attr->cputime_clock_allowed = 1;
4002694c: b9005a62 str w2, [x19, #88]
attr->schedparam.sched_priority = _POSIX_Priority_From_core(
40026950: aa1603e0 mov x0, x22
40026954: 9400107f bl 4002ab50 <_POSIX_Priority_From_core>
40026958: b9002260 str w0, [x19, #32]
scheduler,
priority
);
attr->schedpolicy =
_POSIX_Thread_Translate_to_sched_policy( budget_algorithm );
4002695c: 2a1403e0 mov w0, w20
40026960: 940013c0 bl 4002b860 <_POSIX_Thread_Translate_to_sched_policy>
attr->schedpolicy =
40026964: b9001e60 str w0, [x19, #28]
return ok ? 0 : EINVAL;
40026968: 52800000 mov w0, #0x0 // #0
4002696c: 340000d5 cbz w21, 40026984 <pthread_getattr_np+0x124> <== NEVER TAKEN
40026970: a9425bf5 ldp x21, x22, [sp, #32]
40026974: f9401bf7 ldr x23, [sp, #48]
}
40026978: a94153f3 ldp x19, x20, [sp, #16]
4002697c: a8c57bfd ldp x29, x30, [sp], #80
40026980: d65f03c0 ret
return ok ? 0 : EINVAL;
40026984: 528002c0 mov w0, #0x16 // #22 <== NOT EXECUTED
}
40026988: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
4002698c: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
40026990: f9401bf7 ldr x23, [sp, #48] <== NOT EXECUTED
40026994: a8c57bfd ldp x29, x30, [sp], #80 <== NOT EXECUTED
40026998: d65f03c0 ret <== NOT EXECUTED
return ok ? 0 : EINVAL;
4002699c: 528002c0 mov w0, #0x16 // #22
}
400269a0: d65f03c0 ret
return ESRCH;
400269a4: 52800060 mov w0, #0x3 // #3
400269a8: 17fffff4 b 40026978 <pthread_getattr_np+0x118>
400269ac: 00000000 udf #0
0000000040024990 <pthread_getspecific>:
*/
void *pthread_getspecific(
pthread_key_t key
)
{
40024990: 2a0003e4 mov w4, w0
40024994: f00006e1 adrp x1, 40103000 <_Thread_Objects+0x420>
40024998: f941f021 ldr x1, [x1, #992]
__asm__ volatile (
4002499c: d53b4225 mrs x5, daif
400249a0: d50342df msr daifset, #0x2
RBTree_Node *parent;
link = _RBTree_Root_const_reference( the_rbtree );
parent = NULL;
while ( *link != NULL ) {
400249a4: f9412420 ldr x0, [x1, #584]
400249a8: b50000a0 cbnz x0, 400249bc <pthread_getspecific+0x2c>
400249ac: 1400000a b 400249d4 <pthread_getspecific+0x44>
return &RB_LEFT( the_node, Node );
400249b0: 9a802020 csel x0, x1, x0, cs // cs = hs, nlast
while ( *link != NULL ) {
400249b4: f9400000 ldr x0, [x0]
400249b8: b40000e0 cbz x0, 400249d4 <pthread_getspecific+0x44> <== NEVER TAKEN
const POSIX_Keys_Key_value_pair *the_right;
the_left = left;
the_right = POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( right );
return *the_left == the_right->key;
400249bc: b9402003 ldr w3, [x0, #32]
the_right = POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( right );
400249c0: d1004002 sub x2, x0, #0x10
return &RB_LEFT( the_node, Node );
400249c4: 91002001 add x1, x0, #0x8
parent = *link;
if ( ( *equal )( key, parent ) ) {
400249c8: 6b03009f cmp w4, w3
400249cc: 54ffff21 b.ne 400249b0 <pthread_getspecific+0x20> // b.any
_POSIX_Keys_Key_value_acquire( executing, &lock_context );
key_value_pair = _POSIX_Keys_Key_value_find( key, executing );
if ( key_value_pair != NULL ) {
value = key_value_pair->value;
400249d0: f9402040 ldr x0, [x2, #64]
__asm__ volatile (
400249d4: 92407ca5 and x5, x5, #0xffffffff
400249d8: d51b4225 msr daif, x5
}
_POSIX_Keys_Key_value_release( executing, &lock_context );
return value;
}
400249dc: d65f03c0 ret
00000000400248b0 <pthread_key_delete>:
* 17.1.3 Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167
*/
int pthread_key_delete(
pthread_key_t key
)
{
400248b0: a9bb7bfd stp x29, x30, [sp, #-80]!
400248b4: 910003fd mov x29, sp
400248b8: a90153f3 stp x19, x20, [sp, #16]
400248bc: 2a0003f3 mov w19, w0
400248c0: f90023f9 str x25, [sp, #64]
_RTEMS_Lock_allocator();
400248c4: 94000397 bl 40025720 <_RTEMS_Lock_allocator>
_Objects_Get_no_protection( (Objects_Id) key, &_POSIX_Keys_Information );
400248c8: 900006f9 adrp x25, 40100000 <_POSIX_Keys_Information>
400248cc: 91000339 add x25, x25, #0x0
400248d0: 2a1303e0 mov w0, w19
400248d4: aa1903e1 mov x1, x25
the_key = _POSIX_Keys_Get( key );
if ( the_key != NULL ) {
_POSIX_Keys_Destroy( the_key );
eno = 0;
} else {
eno = EINVAL;
400248d8: 528002d3 mov w19, #0x16 // #22
400248dc: 94000789 bl 40026700 <_Objects_Get_no_protection>
if ( the_key != NULL ) {
400248e0: b40004c0 cbz x0, 40024978 <pthread_key_delete+0xc8>
400248e4: a9025bf5 stp x21, x22, [sp, #32]
400248e8: aa0003f5 mov x21, x0
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
400248ec: aa0003e1 mov x1, x0
400248f0: aa1903e0 mov x0, x25
400248f4: a90363f7 stp x23, x24, [sp, #48]
400248f8: 9400075e bl 40026670 <_Objects_Close>
return _Chain_Immutable_head( the_chain )->next;
400248fc: f94016b3 ldr x19, [x21, #40]
return &the_chain->Tail.Node;
40024900: 9100c2b7 add x23, x21, #0x30
while ( !_Chain_Is_empty( &the_key->Key_value_pairs ) ) {
40024904: eb1302ff cmp x23, x19
40024908: 540002a0 b.eq 4002495c <pthread_key_delete+0xac> // b.none
4002490c: f00006f6 adrp x22, 40103000 <_Thread_Objects+0x420>
40024910: 910da2d6 add x22, x22, #0x368
40024914: 9100a2b8 add x24, x21, #0x28
the_thread = key_value_pair->thread;
40024918: f9401e60 ldr x0, [x19, #56]
__asm__ volatile (
4002491c: d53b4234 mrs x20, daif
40024920: d50342df msr daifset, #0x2
_RBTree_Extract(
40024924: 91092000 add x0, x0, #0x248
40024928: 91004261 add x1, x19, #0x10
4002492c: 940007e5 bl 400268c0 <_RBTree_Extract>
__asm__ volatile (
40024930: 92407e94 and x20, x20, #0xffffffff
40024934: d51b4234 msr daif, x20
previous = the_node->previous;
40024938: a9400a63 ldp x3, x2, [x19]
next->previous = previous;
4002493c: f9000462 str x2, [x3, #8]
_Freechain_Put( &_POSIX_Keys_Keypool, key_value_pair );
40024940: aa1303e1 mov x1, x19
40024944: aa1603e0 mov x0, x22
previous->next = next;
40024948: f9000043 str x3, [x2]
4002494c: 940003f1 bl 40025910 <_Freechain_Put>
return _Chain_Immutable_head( the_chain )->next;
40024950: f9400313 ldr x19, [x24]
while ( !_Chain_Is_empty( &the_key->Key_value_pairs ) ) {
40024954: eb1302ff cmp x23, x19
40024958: 54fffe01 b.ne 40024918 <pthread_key_delete+0x68> // b.any <== NEVER TAKEN
Objects_Control *the_object
)
{
_Assert( _Objects_Allocator_is_owner() );
_Assert( information->deallocate != NULL );
( *information->deallocate )( information, the_object );
4002495c: f9400f22 ldr x2, [x25, #24]
40024960: aa1503e1 mov x1, x21
40024964: aa1903e0 mov x0, x25
eno = 0;
40024968: 52800013 mov w19, #0x0 // #0
4002496c: d63f0040 blr x2
}
40024970: a9425bf5 ldp x21, x22, [sp, #32]
40024974: a94363f7 ldp x23, x24, [sp, #48]
_RTEMS_Unlock_allocator();
40024978: 9400036e bl 40025730 <_RTEMS_Unlock_allocator>
}
_Objects_Allocator_unlock();
return eno;
}
4002497c: 2a1303e0 mov w0, w19
40024980: a94153f3 ldp x19, x20, [sp, #16]
40024984: f94023f9 ldr x25, [sp, #64]
40024988: a8c57bfd ldp x29, x30, [sp], #80
4002498c: d65f03c0 ret
00000000400270b0 <pthread_mutex_getprioceiling>:
if ( prioceiling == NULL ) {
return EINVAL;
}
the_mutex = _POSIX_Mutex_Get( RTEMS_DECONST( pthread_mutex_t *, mutex ) );
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
400270b0: f100003f cmp x1, #0x0
400270b4: fa401804 ccmp x0, #0x0, #0x4, ne // ne = any
400270b8: 54000520 b.eq 4002715c <pthread_mutex_getprioceiling+0xac> // b.none
{
400270bc: a9bd7bfd stp x29, x30, [sp, #-48]!
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
400270c0: d2827702 mov x2, #0x13b8 // #5048
400270c4: f2b2c382 movk x2, #0x961c, lsl #16
{
400270c8: 910003fd mov x29, sp
400270cc: a9025bf5 stp x21, x22, [sp, #32]
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
400270d0: f9400015 ldr x21, [x0]
{
400270d4: a90153f3 stp x19, x20, [sp, #16]
400270d8: aa0103f4 mov x20, x1
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
400270dc: ca150001 eor x1, x0, x21
400270e0: aa0003f3 mov x19, x0
400270e4: ca020021 eor x1, x1, x2
400270e8: f27df03f tst x1, #0xfffffffffffffff8
400270ec: 540001c1 b.ne 40027124 <pthread_mutex_getprioceiling+0x74> // b.any
__asm__ volatile (
400270f0: d53b4236 mrs x22, daif
400270f4: d50342df msr daifset, #0x2
RTEMS_INLINE_ROUTINE POSIX_Mutex_Protocol _POSIX_Mutex_Get_protocol(
unsigned long flags
)
{
return flags & POSIX_MUTEX_PROTOCOL_MASK;
400270f8: 120006b5 and w21, w21, #0x3
_POSIX_Mutex_Acquire( the_mutex, &queue_context );
if ( _POSIX_Mutex_Get_protocol( flags ) == POSIX_MUTEX_PRIORITY_CEILING ) {
400270fc: 71000abf cmp w21, #0x2
40027100: 54000220 b.eq 40027144 <pthread_mutex_getprioceiling+0x94> // b.none
*prioceiling = _POSIX_Priority_From_core(
_POSIX_Mutex_Get_scheduler( the_mutex ),
_POSIX_Mutex_Get_priority( the_mutex )
);
} else {
*prioceiling = 0;
40027104: b900029f str wzr, [x20]
__asm__ volatile (
40027108: 92407ed6 and x22, x22, #0xffffffff
4002710c: d51b4236 msr daif, x22
}
_POSIX_Mutex_Release( the_mutex, &queue_context );
return 0;
40027110: 52800000 mov w0, #0x0 // #0
}
40027114: a94153f3 ldp x19, x20, [sp, #16]
40027118: a9425bf5 ldp x21, x22, [sp, #32]
4002711c: a8c37bfd ldp x29, x30, [sp], #48
40027120: d65f03c0 ret
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
40027124: 94000153 bl 40027670 <_POSIX_Mutex_Auto_initialization>
40027128: 72001c1f tst w0, #0xff
4002712c: 54fffe21 b.ne 400270f0 <pthread_mutex_getprioceiling+0x40> // b.any<== ALWAYS TAKEN
40027130: 528002c0 mov w0, #0x16 // #22 <== NOT EXECUTED
}
40027134: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40027138: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
4002713c: a8c37bfd ldp x29, x30, [sp], #48 <== NOT EXECUTED
40027140: d65f03c0 ret <== NOT EXECUTED
*prioceiling = _POSIX_Priority_From_core(
40027144: f9402a61 ldr x1, [x19, #80]
40027148: d00000c0 adrp x0, 40041000 <bsp_section_rodata_begin+0x768>
4002714c: 91306000 add x0, x0, #0xc18
40027150: 940001f0 bl 40027910 <_POSIX_Priority_From_core>
40027154: b9000280 str w0, [x20]
40027158: 17ffffec b 40027108 <pthread_mutex_getprioceiling+0x58>
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
4002715c: 528002c0 mov w0, #0x16 // #22
}
40027160: d65f03c0 ret
...
0000000040027170 <pthread_mutex_init>:
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
40027170: a9bd7bfd stp x29, x30, [sp, #-48]!
40027174: 910003fd mov x29, sp
40027178: a90153f3 stp x19, x20, [sp, #16]
4002717c: aa0003f4 mov x20, x0
POSIX_Mutex_Protocol protocol;
unsigned long flags;
Priority_Control priority;
const Scheduler_Control *scheduler;
if ( attr ) the_attr = attr;
40027180: b40001c1 cbz x1, 400271b8 <pthread_mutex_init+0x48>
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
40027184: b4000740 cbz x0, 4002726c <pthread_mutex_init+0xfc>
* value in an uninitialized variable to make this fail.
*
* Thus, we do not look at *mutex.
*/
if ( !the_attr->is_initialized )
40027188: b9400022 ldr w2, [x1]
return EINVAL;
4002718c: 528002c0 mov w0, #0x16 // #22
if ( !the_attr->is_initialized )
40027190: 340000e2 cbz w2, 400271ac <pthread_mutex_init+0x3c>
return EINVAL;
if ( !_POSIX_Is_valid_pshared( the_attr->process_shared ) ) {
40027194: b9400422 ldr w2, [x1, #4]
40027198: 7100045f cmp w2, #0x1
4002719c: 54000088 b.hi 400271ac <pthread_mutex_init+0x3c> // b.pmore
400271a0: b9400c22 ldr w2, [x1, #12]
}
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
400271a4: 7100085f cmp w2, #0x2
400271a8: 54000269 b.ls 400271f4 <pthread_mutex_init+0x84> // b.plast
);
the_mutex->Recursive.nest_level = 0;
_Priority_Node_initialize( &the_mutex->Priority_ceiling, priority );
the_mutex->scheduler = scheduler;
return 0;
}
400271ac: a94153f3 ldp x19, x20, [sp, #16]
400271b0: a8c37bfd ldp x29, x30, [sp], #48
400271b4: d65f03c0 ret
if ( !mutex )
400271b8: b40005a0 cbz x0, 4002726c <pthread_mutex_init+0xfc>
flags = (uintptr_t) the_mutex ^ POSIX_MUTEX_MAGIC;
400271bc: d2827702 mov x2, #0x13b8 // #5048
400271c0: f2b2c382 movk x2, #0x961c, lsl #16
400271c4: ca020002 eor x2, x0, x2
priority = 0;
400271c8: d2800003 mov x3, #0x0 // #0
flags &= ~POSIX_MUTEX_FLAGS_MASK;
400271cc: 927df042 and x2, x2, #0xfffffffffffffff8
the_mutex->flags = flags;
400271d0: f9000002 str x2, [x0]
{
#if defined(RTEMS_SMP)
_SMP_ticket_lock_Initialize( &queue->Lock );
#endif
queue->heads = NULL;
queue->owner = NULL;
400271d4: a9017e9f stp xzr, xzr, [x20, #16]
return 0;
400271d8: 52800000 mov w0, #0x0 // #0
queue->name = name;
400271dc: f900129f str xzr, [x20, #32]
the_mutex->Recursive.nest_level = 0;
400271e0: b9002a9f str wzr, [x20, #40]
the_mutex->scheduler = scheduler;
400271e4: a9050683 stp x3, x1, [x20, #80]
}
400271e8: a94153f3 ldp x19, x20, [sp, #16]
400271ec: a8c37bfd ldp x29, x30, [sp], #48
400271f0: d65f03c0 ret
switch ( the_attr->type ) {
400271f4: b9401023 ldr w3, [x1, #16]
400271f8: 71000c7f cmp w3, #0x3
400271fc: 54fffd88 b.hi 400271ac <pthread_mutex_init+0x3c> // b.pmore
flags = (uintptr_t) the_mutex ^ POSIX_MUTEX_MAGIC;
40027200: d2827700 mov x0, #0x13b8 // #5048
40027204: f2b2c380 movk x0, #0x961c, lsl #16
40027208: ca000280 eor x0, x20, x0
if ( the_attr->type == PTHREAD_MUTEX_RECURSIVE ) {
4002720c: 7100047f cmp w3, #0x1
flags &= ~POSIX_MUTEX_FLAGS_MASK;
40027210: 927df004 and x4, x0, #0xfffffffffffffff8
flags |= protocol;
40027214: 2a0203e0 mov w0, w2
40027218: aa040000 orr x0, x0, x4
if ( the_attr->type == PTHREAD_MUTEX_RECURSIVE ) {
4002721c: 54000041 b.ne 40027224 <pthread_mutex_init+0xb4> // b.any <== ALWAYS TAKEN
flags |= POSIX_MUTEX_RECURSIVE;
40027220: b27e0000 orr x0, x0, #0x4 <== NOT EXECUTED
the_mutex->flags = flags;
40027224: f9000280 str x0, [x20]
if ( protocol == POSIX_MUTEX_PRIORITY_CEILING ) {
40027228: 7100085f cmp w2, #0x2
4002722c: 54000281 b.ne 4002727c <pthread_mutex_init+0x10c> // b.any
prio_ceiling = the_attr->prio_ceiling;
40027230: b9400821 ldr w1, [x1, #8]
if ( prio_ceiling == INT_MAX ) {
40027234: 12b00000 mov w0, #0x7fffffff // #2147483647
40027238: d00000d3 adrp x19, 40041000 <bsp_section_rodata_begin+0x768>
4002723c: 91306273 add x19, x19, #0xc18
40027240: 6b00003f cmp w1, w0
40027244: 54000061 b.ne 40027250 <pthread_mutex_init+0xe0> // b.any
RTEMS_INLINE_ROUTINE int _POSIX_Priority_Get_maximum(
const Scheduler_Control *scheduler
)
{
_Assert( (int) scheduler->maximum_priority > 1 );
return (int) scheduler->maximum_priority - 1;
40027248: f9403e61 ldr x1, [x19, #120]
4002724c: 51000421 sub w1, w1, #0x1
priority = _POSIX_Priority_To_core( scheduler, prio_ceiling, &valid );
40027250: 9100bfe2 add x2, sp, #0x2f
40027254: aa1303e0 mov x0, x19
40027258: 940001a2 bl 400278e0 <_POSIX_Priority_To_core>
4002725c: aa0003e3 mov x3, x0
if ( !valid ) {
40027260: 3940bfe2 ldrb w2, [sp, #47]
scheduler = _Thread_Scheduler_get_home( _Thread_Get_executing() );
40027264: aa1303e1 mov x1, x19
if ( !valid ) {
40027268: 35fffb62 cbnz w2, 400271d4 <pthread_mutex_init+0x64>
return EINVAL;
4002726c: 528002c0 mov w0, #0x16 // #22
}
40027270: a94153f3 ldp x19, x20, [sp, #16]
40027274: a8c37bfd ldp x29, x30, [sp], #48
40027278: d65f03c0 ret
scheduler = NULL;
4002727c: d2800001 mov x1, #0x0 // #0
priority = 0;
40027280: d2800003 mov x3, #0x0 // #0
40027284: 17ffffd4 b 400271d4 <pthread_mutex_init+0x64>
...
0000000040027500 <pthread_mutex_setprioceiling>:
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
40027500: a9b77bfd stp x29, x30, [sp, #-144]!
40027504: 910003fd mov x29, sp
40027508: a90153f3 stp x19, x20, [sp, #16]
POSIX_Mutex_Control *the_mutex;
int error;
int unlock_error;
if ( old_ceiling == NULL ) {
4002750c: b40002a2 cbz x2, 40027560 <pthread_mutex_setprioceiling+0x60>
/*
* Must acquire the mutex before we can change it's ceiling.
* POSIX says block until we acquire it.
*/
error = pthread_mutex_lock( mutex );
40027510: aa0203f4 mov x20, x2
40027514: a9025bf5 stp x21, x22, [sp, #32]
40027518: 2a0103f6 mov w22, w1
4002751c: aa0003f5 mov x21, x0
40027520: 97ffff5c bl 40027290 <pthread_mutex_lock>
40027524: 2a0003f3 mov w19, w0
if ( error != 0 ) {
40027528: 350001a0 cbnz w0, 4002755c <pthread_mutex_setprioceiling+0x5c>
return flags & POSIX_MUTEX_PROTOCOL_MASK;
4002752c: f94002a0 ldr x0, [x21]
40027530: 12000400 and w0, w0, #0x3
return EINVAL;
}
the_mutex = _POSIX_Mutex_Get( mutex );
if (
40027534: 7100081f cmp w0, #0x2
40027538: 540001e0 b.eq 40027574 <pthread_mutex_setprioceiling+0x74> // b.none
error = 0;
} else {
error = EINVAL;
}
} else {
*old_ceiling = 0;
4002753c: b900029f str wzr, [x20]
error = 0;
}
unlock_error = pthread_mutex_unlock( mutex );
40027540: aa1503e0 mov x0, x21
40027544: 9400006f bl 40027700 <pthread_mutex_unlock>
_Assert( unlock_error == 0 );
(void) unlock_error;
return error;
}
40027548: 2a1303e0 mov w0, w19
4002754c: a94153f3 ldp x19, x20, [sp, #16]
unlock_error = pthread_mutex_unlock( mutex );
40027550: a9425bf5 ldp x21, x22, [sp, #32]
}
40027554: a8c97bfd ldp x29, x30, [sp], #144
40027558: d65f03c0 ret
4002755c: a9425bf5 ldp x21, x22, [sp, #32]
return EINVAL;
40027560: 528002d3 mov w19, #0x16 // #22
}
40027564: 2a1303e0 mov w0, w19
40027568: a94153f3 ldp x19, x20, [sp, #16]
4002756c: a8c97bfd ldp x29, x30, [sp], #144
40027570: d65f03c0 ret
*old_ceiling = _POSIX_Priority_From_core( scheduler, old_priority );
40027574: f9402aa1 ldr x1, [x21, #80]
40027578: f9001bf7 str x23, [sp, #48]
4002757c: d00000d7 adrp x23, 40041000 <bsp_section_rodata_begin+0x768>
40027580: 913062f7 add x23, x23, #0xc18
40027584: aa1703e0 mov x0, x23
40027588: 940000e2 bl 40027910 <_POSIX_Priority_From_core>
4002758c: b9000280 str w0, [x20]
new_priority = _POSIX_Priority_To_core( scheduler, prioceiling, &valid );
40027590: 2a1603e1 mov w1, w22
40027594: 91013fe2 add x2, sp, #0x4f
40027598: aa1703e0 mov x0, x23
4002759c: 940000d1 bl 400278e0 <_POSIX_Priority_To_core>
if ( valid ) {
400275a0: 39413fe1 ldrb w1, [sp, #79]
new_priority = _POSIX_Priority_To_core( scheduler, prioceiling, &valid );
400275a4: aa0003e4 mov x4, x0
if ( valid ) {
400275a8: 35000081 cbnz w1, 400275b8 <pthread_mutex_setprioceiling+0xb8>
error = EINVAL;
400275ac: 528002d3 mov w19, #0x16 // #22
400275b0: f9401bf7 ldr x23, [sp, #48]
400275b4: 17ffffe3 b 40027540 <pthread_mutex_setprioceiling+0x40>
return the_mutex->Recursive.Mutex.Queue.Queue.owner;
400275b8: f9400ea0 ldr x0, [x21, #24]
queue_context->Priority.update_count = 0;
400275bc: f9003bff str xzr, [sp, #112]
if ( owner != NULL ) {
400275c0: b40002e0 cbz x0, 4002761c <pthread_mutex_setprioceiling+0x11c> <== NEVER TAKEN
__asm__ volatile (
400275c4: d53b4221 mrs x1, daif
400275c8: d50342df msr daifset, #0x2
RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire(
Thread_Control *the_thread,
Thread_queue_Context *queue_context
)
{
_ISR_lock_ISR_disable( &queue_context->Lock_context.Lock_context );
400275cc: b90053e1 str w1, [sp, #80]
node->priority = priority;
400275d0: f9002aa4 str x4, [x21, #80]
_Thread_Priority_changed(
400275d4: 910143f6 add x22, sp, #0x50
400275d8: 9100c2a1 add x1, x21, #0x30
400275dc: aa1603e3 mov x3, x22
400275e0: 52800002 mov w2, #0x0 // #0
400275e4: 940009df bl 40029d60 <_Thread_Priority_changed>
Thread_Control *the_thread,
Thread_queue_Context *queue_context
)
{
_Thread_Wait_release_critical( the_thread, queue_context );
_ISR_lock_ISR_enable( &queue_context->Lock_context.Lock_context );
400275e8: b94053e0 ldr w0, [sp, #80]
__asm__ volatile (
400275ec: d51b4220 msr daif, x0
disable_level = cpu_self->thread_dispatch_disable_level;
400275f0: b00006f4 adrp x20, 40104000 <_Thread_Heads+0x68>
400275f4: 911f0294 add x20, x20, #0x7c0
_Thread_Priority_update( &queue_context );
400275f8: aa1603e0 mov x0, x22
400275fc: b9401a81 ldr w1, [x20, #24]
cpu_self->thread_dispatch_disable_level = disable_level + 1;
40027600: 11000421 add w1, w1, #0x1
40027604: b9001a81 str w1, [x20, #24]
40027608: 940009fa bl 40029df0 <_Thread_Priority_update>
_Thread_Dispatch_enable( cpu_self );
4002760c: aa1403e0 mov x0, x20
40027610: 94000aa0 bl 4002a090 <_Thread_Dispatch_enable>
error = 0;
40027614: f9401bf7 ldr x23, [sp, #48]
40027618: 17ffffca b 40027540 <pthread_mutex_setprioceiling+0x40>
the_mutex->Priority_ceiling.priority = priority_ceiling;
4002761c: 910143f6 add x22, sp, #0x50 <== NOT EXECUTED
40027620: f9002aa4 str x4, [x21, #80] <== NOT EXECUTED
40027624: 17fffff3 b 400275f0 <pthread_mutex_setprioceiling+0xf0> <== NOT EXECUTED
...
0000000040027700 <pthread_mutex_unlock>:
Thread_queue_Context queue_context;
Thread_Control *executing;
Status_Control status;
the_mutex = _POSIX_Mutex_Get( mutex );
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
40027700: b4000ea0 cbz x0, 400278d4 <pthread_mutex_unlock+0x1d4>
{
40027704: a9b87bfd stp x29, x30, [sp, #-128]!
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
40027708: d2827702 mov x2, #0x13b8 // #5048
4002770c: f2b2c382 movk x2, #0x961c, lsl #16
{
40027710: 910003fd mov x29, sp
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
40027714: f9400006 ldr x6, [x0]
{
40027718: a90153f3 stp x19, x20, [sp, #16]
4002771c: aa0003f3 mov x19, x0
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
40027720: ca060001 eor x1, x0, x6
40027724: ca020021 eor x1, x1, x2
40027728: f27df03f tst x1, #0xfffffffffffffff8
4002772c: 54000961 b.ne 40027858 <pthread_mutex_unlock+0x158> // b.any
__asm__ volatile (
40027730: d53b4220 mrs x0, daif
40027734: d50342df msr daifset, #0x2
40027738: b00006f4 adrp x20, 40104000 <_Thread_Heads+0x68>
4002773c: 911f0294 add x20, x20, #0x7c0
_Thread_queue_Context_ISR_disable( queue_context, level );
40027740: b90043e0 str w0, [sp, #64]
executing = _POSIX_Mutex_Acquire( the_mutex, &queue_context );
switch ( _POSIX_Mutex_Get_protocol( flags ) ) {
40027744: 720004c6 ands w6, w6, #0x3
40027748: f9401282 ldr x2, [x20, #32]
4002774c: 54000740 b.eq 40027834 <pthread_mutex_unlock+0x134> // b.none
40027750: 710008df cmp w6, #0x2
40027754: 54000200 b.eq 40027794 <pthread_mutex_unlock+0x94> // b.none
if ( !_POSIX_Mutex_Is_owner( the_mutex, executing ) ) {
40027758: f9400e60 ldr x0, [x19, #24]
4002775c: eb00005f cmp x2, x0
40027760: 54000701 b.ne 40027840 <pthread_mutex_unlock+0x140> // b.any
nest_level = the_mutex->Recursive.nest_level;
40027764: b9402a60 ldr w0, [x19, #40]
if ( nest_level > 0 ) {
40027768: 350009e0 cbnz w0, 400278a4 <pthread_mutex_unlock+0x1a4> <== NEVER TAKEN
heads = the_mutex->Recursive.Mutex.Queue.Queue.heads;
4002776c: f9400a61 ldr x1, [x19, #16]
the_mutex->Recursive.Mutex.Queue.Queue.owner = owner;
40027770: f9000e7f str xzr, [x19, #24]
if ( heads == NULL ) {
40027774: b40009c1 cbz x1, 400278ac <pthread_mutex_unlock+0x1ac>
_Thread_queue_Surrender(
40027778: 91004260 add x0, x19, #0x10
4002777c: 910103e3 add x3, sp, #0x40
40027780: f00000c4 adrp x4, 40042000 <rtems_test_name+0x1a0>
40027784: 911b8084 add x4, x4, #0x6e0
40027788: 94000c2a bl 4002a830 <_Thread_queue_Surrender>
return STATUS_SUCCESSFUL;
4002778c: 52800000 mov w0, #0x0 // #0
&queue_context
);
break;
}
return _POSIX_Get_error( status );
40027790: 1400002f b 4002784c <pthread_mutex_unlock+0x14c>
unsigned int nest_level;
ISR_lock_Context lock_context;
Per_CPU_Control *cpu_self;
Thread_queue_Heads *heads;
if ( !_POSIX_Mutex_Is_owner( the_mutex, executing ) ) {
40027794: f9400e60 ldr x0, [x19, #24]
40027798: eb00005f cmp x2, x0
4002779c: 54000521 b.ne 40027840 <pthread_mutex_unlock+0x140> // b.any <== NEVER TAKEN
_POSIX_Mutex_Release( the_mutex, queue_context );
return STATUS_NOT_OWNER;
}
nest_level = the_mutex->Recursive.nest_level;
400277a0: b9402a60 ldr w0, [x19, #40]
if ( nest_level > 0 ) {
400277a4: 35000800 cbnz w0, 400278a4 <pthread_mutex_unlock+0x1a4> <== NEVER TAKEN
400277a8: f9001bf7 str x23, [sp, #48]
_Thread_Resource_count_decrement( executing );
_Thread_queue_Context_clear_priority_updates( queue_context );
_Thread_Wait_acquire_default_critical( executing, &lock_context );
_Thread_Priority_remove(
400277ac: 9100c277 add x23, x19, #0x30
400277b0: aa0203e0 mov x0, x2
400277b4: aa1703e1 mov x1, x23
400277b8: 910103e2 add x2, sp, #0x40
400277bc: f90033ff str xzr, [sp, #96]
400277c0: 94000944 bl 40029cd0 <_Thread_Priority_remove>
disable_level = cpu_self->thread_dispatch_disable_level;
400277c4: b9401a82 ldr w2, [x20, #24]
);
_Thread_Wait_release_default_critical( executing, &lock_context );
cpu_self = _Thread_queue_Dispatch_disable( queue_context );
heads = the_mutex->Recursive.Mutex.Queue.Queue.heads;
400277c8: f9400a60 ldr x0, [x19, #16]
cpu_self->thread_dispatch_disable_level = disable_level + 1;
400277cc: 11000442 add w2, w2, #0x1
400277d0: b9001a82 str w2, [x20, #24]
if ( heads != NULL ) {
400277d4: b4000780 cbz x0, 400278c4 <pthread_mutex_unlock+0x1c4>
const Thread_queue_Operations *operations;
Thread_Control *new_owner;
operations = POSIX_MUTEX_PRIORITY_CEILING_TQ_OPERATIONS;
new_owner = ( *operations->first )( heads );
400277d8: a9025bf5 stp x21, x22, [sp, #32]
400277dc: f00000d5 adrp x21, 40042000 <rtems_test_name+0x1a0>
400277e0: 911ae2b5 add x21, x21, #0x6b8
400277e4: f94012a1 ldr x1, [x21, #32]
400277e8: d63f0020 blr x1
the_mutex->Recursive.Mutex.Queue.Queue.owner = owner;
400277ec: f9000e60 str x0, [x19, #24]
new_owner = ( *operations->first )( heads );
400277f0: aa0003f6 mov x22, x0
_POSIX_Mutex_Set_owner( the_mutex, new_owner );
_Thread_Resource_count_increment( new_owner );
_Thread_Priority_add(
400277f4: aa1703e1 mov x1, x23
400277f8: 910103e2 add x2, sp, #0x40
400277fc: 94000911 bl 40029c40 <_Thread_Priority_add>
new_owner,
&the_mutex->Priority_ceiling,
queue_context
);
_Thread_queue_Extract_critical(
40027800: aa1603e2 mov x2, x22
40027804: aa1503e1 mov x1, x21
40027808: 910103e3 add x3, sp, #0x40
4002780c: 91004260 add x0, x19, #0x10
40027810: 94000ba8 bl 4002a6b0 <_Thread_queue_Extract_critical>
40027814: a9425bf5 ldp x21, x22, [sp, #32]
} else {
_POSIX_Mutex_Set_owner( the_mutex, NULL );
_POSIX_Mutex_Release( the_mutex, queue_context );
}
_Thread_Priority_update( queue_context );
40027818: 910103e0 add x0, sp, #0x40
4002781c: 94000975 bl 40029df0 <_Thread_Priority_update>
_Thread_Dispatch_enable( cpu_self );
40027820: aa1403e0 mov x0, x20
40027824: 94000a1b bl 4002a090 <_Thread_Dispatch_enable>
return STATUS_SUCCESSFUL;
40027828: 52800000 mov w0, #0x0 // #0
4002782c: f9401bf7 ldr x23, [sp, #48]
40027830: 14000007 b 4002784c <pthread_mutex_unlock+0x14c>
if ( !_POSIX_Mutex_Is_owner( the_mutex, executing ) ) {
40027834: f9400e60 ldr x0, [x19, #24]
40027838: eb00005f cmp x2, x0
4002783c: 540001c0 b.eq 40027874 <pthread_mutex_unlock+0x174> // b.none
_ISR_lock_ISR_enable( lock_context );
40027840: b94043e0 ldr w0, [sp, #64]
__asm__ volatile (
40027844: d51b4220 msr daif, x0
return STATUS_NOT_OWNER;
40027848: 52800020 mov w0, #0x1 // #1
}
4002784c: a94153f3 ldp x19, x20, [sp, #16]
40027850: a8c87bfd ldp x29, x30, [sp], #128
40027854: d65f03c0 ret
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
40027858: 97ffff86 bl 40027670 <_POSIX_Mutex_Auto_initialization>
4002785c: 72001c1f tst w0, #0xff
40027860: 54fff681 b.ne 40027730 <pthread_mutex_unlock+0x30> // b.any
40027864: 528002c0 mov w0, #0x16 // #22
}
40027868: a94153f3 ldp x19, x20, [sp, #16]
4002786c: a8c87bfd ldp x29, x30, [sp], #128
40027870: d65f03c0 ret
nest_level = the_mutex->Recursive.nest_level;
40027874: b9402a60 ldr w0, [x19, #40]
if ( nest_level > 0 ) {
40027878: 35000160 cbnz w0, 400278a4 <pthread_mutex_unlock+0x1a4> <== NEVER TAKEN
heads = the_mutex->Recursive.Mutex.Queue.Queue.heads;
4002787c: f9400a61 ldr x1, [x19, #16]
the_mutex->Recursive.Mutex.Queue.Queue.owner = owner;
40027880: f9000e7f str xzr, [x19, #24]
if ( heads == NULL ) {
40027884: b4000141 cbz x1, 400278ac <pthread_mutex_unlock+0x1ac>
_Thread_queue_Surrender(
40027888: 91004260 add x0, x19, #0x10
4002788c: 910103e3 add x3, sp, #0x40
40027890: f00000c4 adrp x4, 40042000 <rtems_test_name+0x1a0>
40027894: 9119a084 add x4, x4, #0x668
40027898: 94000be6 bl 4002a830 <_Thread_queue_Surrender>
return STATUS_SUCCESSFUL;
4002789c: 52800000 mov w0, #0x0 // #0
400278a0: 17ffffeb b 4002784c <pthread_mutex_unlock+0x14c>
the_mutex->Recursive.nest_level = nest_level - 1;
400278a4: 51000400 sub w0, w0, #0x1 <== NOT EXECUTED
400278a8: b9002a60 str w0, [x19, #40] <== NOT EXECUTED
400278ac: b94043e0 ldr w0, [sp, #64]
400278b0: d51b4220 msr daif, x0
return STATUS_SUCCESSFUL;
400278b4: 52800000 mov w0, #0x0 // #0
400278b8: a94153f3 ldp x19, x20, [sp, #16]
400278bc: a8c87bfd ldp x29, x30, [sp], #128
400278c0: d65f03c0 ret
the_mutex->Recursive.Mutex.Queue.Queue.owner = owner;
400278c4: f9000e7f str xzr, [x19, #24]
400278c8: b94043e0 ldr w0, [sp, #64]
400278cc: d51b4220 msr daif, x0
}
400278d0: 17ffffd2 b 40027818 <pthread_mutex_unlock+0x118>
POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
400278d4: 528002c0 mov w0, #0x16 // #22
}
400278d8: d65f03c0 ret
400278dc: 00000000 udf #0
0000000040026ff0 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
40026ff0: aa0003e2 mov x2, x0
if ( !attr || !attr->is_initialized )
40026ff4: b4000120 cbz x0, 40027018 <pthread_mutexattr_setpshared+0x28>
40026ff8: b9400043 ldr w3, [x2]
return EINVAL;
40026ffc: 528002c0 mov w0, #0x16 // #22
if ( !attr || !attr->is_initialized )
40027000: 340000a3 cbz w3, 40027014 <pthread_mutexattr_setpshared+0x24>
switch ( pshared ) {
40027004: 7100043f cmp w1, #0x1
40027008: 54000068 b.hi 40027014 <pthread_mutexattr_setpshared+0x24> // b.pmore<== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
4002700c: 52800000 mov w0, #0x0 // #0
attr->process_shared = pshared;
40027010: b9000441 str w1, [x2, #4]
default:
return EINVAL;
}
}
40027014: d65f03c0 ret
return EINVAL;
40027018: 528002c0 mov w0, #0x16 // #22
}
4002701c: d65f03c0 ret
0000000040023e20 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
40023e20: aa0003e2 mov x2, x0
if ( !attr || !attr->is_initialized )
40023e24: b4000120 cbz x0, 40023e48 <pthread_mutexattr_settype+0x28>
40023e28: b9400043 ldr w3, [x2]
return EINVAL;
40023e2c: 528002c0 mov w0, #0x16 // #22
if ( !attr || !attr->is_initialized )
40023e30: 340000a3 cbz w3, 40023e44 <pthread_mutexattr_settype+0x24> <== NEVER TAKEN
switch ( type ) {
40023e34: 71000c3f cmp w1, #0x3
40023e38: 54000068 b.hi 40023e44 <pthread_mutexattr_settype+0x24> // b.pmore
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
return 0;
40023e3c: 52800000 mov w0, #0x0 // #0
attr->type = type;
40023e40: b9001041 str w1, [x2, #16]
default:
return EINVAL;
}
}
40023e44: d65f03c0 ret
return EINVAL;
40023e48: 528002c0 mov w0, #0x16 // #22
}
40023e4c: d65f03c0 ret
0000000040026070 <pthread_rwlock_init>:
{
POSIX_RWLock_Control *the_rwlock;
the_rwlock = _POSIX_RWLock_Get( rwlock );
if ( the_rwlock == NULL ) {
40026070: b40002a0 cbz x0, 400260c4 <pthread_rwlock_init+0x54>
return EINVAL;
}
if ( attr != NULL ) {
40026074: aa0003e2 mov x2, x0
40026078: b40000e1 cbz x1, 40026094 <pthread_rwlock_init+0x24>
if ( !attr->is_initialized ) {
4002607c: b9400023 ldr w3, [x1]
return EINVAL;
40026080: 528002c0 mov w0, #0x16 // #22
if ( !attr->is_initialized ) {
40026084: 340001e3 cbz w3, 400260c0 <pthread_rwlock_init+0x50> <== NEVER TAKEN
return EINVAL;
}
if ( !_POSIX_Is_valid_pshared( attr->process_shared ) ) {
40026088: b9400421 ldr w1, [x1, #4]
4002608c: 7100043f cmp w1, #0x1
40026090: 54000188 b.hi 400260c0 <pthread_rwlock_init+0x50> // b.pmore
{
40026094: a9bf7bfd stp x29, x30, [sp, #-16]!
return EINVAL;
}
}
the_rwlock->flags = (uintptr_t) the_rwlock ^ POSIX_RWLOCK_MAGIC;
40026098: aa0203e0 mov x0, x2
4002609c: d29b57a1 mov x1, #0xdabd // #55997
400260a0: f2b2c421 movk x1, #0x9621, lsl #16
{
400260a4: 910003fd mov x29, sp
the_rwlock->flags = (uintptr_t) the_rwlock ^ POSIX_RWLOCK_MAGIC;
400260a8: ca010042 eor x2, x2, x1
400260ac: f8008402 str x2, [x0], #8
_CORE_RWLock_Initialize( &the_rwlock->RWLock );
400260b0: 94000558 bl 40027610 <_CORE_RWLock_Initialize>
return 0;
400260b4: 52800000 mov w0, #0x0 // #0
}
400260b8: a8c17bfd ldp x29, x30, [sp], #16
400260bc: d65f03c0 ret
400260c0: d65f03c0 ret
return EINVAL;
400260c4: 528002c0 mov w0, #0x16 // #22
400260c8: d65f03c0 ret
400260cc: 00000000 udf #0
0000000040026b80 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
40026b80: aa0003e2 mov x2, x0
if ( !attr )
40026b84: b4000120 cbz x0, 40026ba8 <pthread_rwlockattr_setpshared+0x28>
return EINVAL;
if ( !attr->is_initialized )
40026b88: b9400043 ldr w3, [x2]
return EINVAL;
40026b8c: 528002c0 mov w0, #0x16 // #22
if ( !attr->is_initialized )
40026b90: 340000a3 cbz w3, 40026ba4 <pthread_rwlockattr_setpshared+0x24>
return EINVAL;
switch ( pshared ) {
40026b94: 7100043f cmp w1, #0x1
40026b98: 54000068 b.hi 40026ba4 <pthread_rwlockattr_setpshared+0x24> // b.pmore<== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
40026b9c: 52800000 mov w0, #0x0 // #0
attr->process_shared = pshared;
40026ba0: b9000441 str w1, [x2, #4]
default:
return EINVAL;
}
}
40026ba4: d65f03c0 ret
return EINVAL;
40026ba8: 528002c0 mov w0, #0x16 // #22
}
40026bac: d65f03c0 ret
0000000040025950 <pthread_setcancelstate>:
int pthread_setcancelstate(
int state,
int *oldstate
)
{
40025950: a9be7bfd stp x29, x30, [sp, #-32]!
40025954: 910003fd mov x29, sp
40025958: a90153f3 stp x19, x20, [sp, #16]
4002595c: 2a0003f3 mov w19, w0
40025960: aa0103f4 mov x20, x1
Thread_Life_state new_life_protection;
Thread_Life_state previous_life_state;
if ( _ISR_Is_in_progress() ) {
40025964: 9400015b bl 40025ed0 <_ISR_Is_in_progress>
40025968: 72001c1f tst w0, #0xff
4002596c: 54000281 b.ne 400259bc <pthread_setcancelstate+0x6c> // b.any
return EPROTO;
}
if ( state == PTHREAD_CANCEL_DISABLE ) {
40025970: 7100067f cmp w19, #0x1
40025974: 540002c0 b.eq 400259cc <pthread_setcancelstate+0x7c> // b.none <== NEVER TAKEN
new_life_protection = THREAD_LIFE_PROTECTED;
} else if ( state == PTHREAD_CANCEL_ENABLE ) {
new_life_protection = 0;
} else {
return EINVAL;
40025978: 528002c0 mov w0, #0x16 // #22
} else if ( state == PTHREAD_CANCEL_ENABLE ) {
4002597c: 35000133 cbnz w19, 400259a0 <pthread_setcancelstate+0x50>
new_life_protection = 0;
40025980: 52800000 mov w0, #0x0 // #0
}
previous_life_state = _Thread_Set_life_protection( new_life_protection );
40025984: 94000de7 bl 40029120 <_Thread_Set_life_protection>
40025988: 2a0003e1 mov w1, w0
} else {
*oldstate = PTHREAD_CANCEL_ENABLE;
}
}
return 0;
4002598c: 52800000 mov w0, #0x0 // #0
if ( oldstate != NULL ) {
40025990: b4000094 cbz x20, 400259a0 <pthread_setcancelstate+0x50>
if ( ( previous_life_state & THREAD_LIFE_PROTECTED ) != 0 ) {
40025994: 360000c1 tbz w1, #0, 400259ac <pthread_setcancelstate+0x5c> <== ALWAYS TAKEN
*oldstate = PTHREAD_CANCEL_DISABLE;
40025998: 52800021 mov w1, #0x1 // #1 <== NOT EXECUTED
4002599c: b9000281 str w1, [x20] <== NOT EXECUTED
}
400259a0: a94153f3 ldp x19, x20, [sp, #16]
400259a4: a8c27bfd ldp x29, x30, [sp], #32
400259a8: d65f03c0 ret
*oldstate = PTHREAD_CANCEL_ENABLE;
400259ac: b900029f str wzr, [x20]
}
400259b0: a94153f3 ldp x19, x20, [sp, #16]
400259b4: a8c27bfd ldp x29, x30, [sp], #32
400259b8: d65f03c0 ret
return EPROTO;
400259bc: 528008e0 mov w0, #0x47 // #71
}
400259c0: a94153f3 ldp x19, x20, [sp, #16]
400259c4: a8c27bfd ldp x29, x30, [sp], #32
400259c8: d65f03c0 ret
new_life_protection = THREAD_LIFE_PROTECTED;
400259cc: 2a1303e0 mov w0, w19 <== NOT EXECUTED
400259d0: 17ffffed b 40025984 <pthread_setcancelstate+0x34> <== NOT EXECUTED
...
00000000400259e0 <pthread_setcanceltype>:
int pthread_setcanceltype(
int type,
int *oldtype
)
{
400259e0: a9be7bfd stp x29, x30, [sp, #-32]!
400259e4: 910003fd mov x29, sp
400259e8: a90153f3 stp x19, x20, [sp, #16]
400259ec: 2a0003f3 mov w19, w0
400259f0: aa0103f4 mov x20, x1
Thread_Life_state set_life_state;
Thread_Life_state previous_life_state;
if ( _ISR_Is_in_progress() ) {
400259f4: 94000137 bl 40025ed0 <_ISR_Is_in_progress>
400259f8: 72001c1f tst w0, #0xff
400259fc: 54000321 b.ne 40025a60 <pthread_setcanceltype+0x80> // b.any
return EPROTO;
}
if ( type == PTHREAD_CANCEL_DEFERRED ) {
40025a00: 34000213 cbz w19, 40025a40 <pthread_setcanceltype+0x60>
set_life_state = THREAD_LIFE_CHANGE_DEFERRED;
} else if ( type == PTHREAD_CANCEL_ASYNCHRONOUS ) {
40025a04: 7100067f cmp w19, #0x1
set_life_state = 0;
40025a08: 52800001 mov w1, #0x0 // #0
} else {
return EINVAL;
40025a0c: 528002c0 mov w0, #0x16 // #22
} else if ( type == PTHREAD_CANCEL_ASYNCHRONOUS ) {
40025a10: 54000121 b.ne 40025a34 <pthread_setcanceltype+0x54> // b.any
}
previous_life_state = _Thread_Change_life(
40025a14: 52800002 mov w2, #0x0 // #0
40025a18: 52800100 mov w0, #0x8 // #8
40025a1c: 94000d8d bl 40029050 <_Thread_Change_life>
40025a20: 2a0003e1 mov w1, w0
} else {
*oldtype = PTHREAD_CANCEL_ASYNCHRONOUS;
}
}
return 0;
40025a24: 52800000 mov w0, #0x0 // #0
if ( oldtype != NULL ) {
40025a28: b4000074 cbz x20, 40025a34 <pthread_setcanceltype+0x54>
if ( ( previous_life_state & THREAD_LIFE_CHANGE_DEFERRED ) != 0 ) {
40025a2c: 36180221 tbz w1, #3, 40025a70 <pthread_setcanceltype+0x90> <== NEVER TAKEN
*oldtype = PTHREAD_CANCEL_DEFERRED;
40025a30: b900029f str wzr, [x20]
}
40025a34: a94153f3 ldp x19, x20, [sp, #16]
40025a38: a8c27bfd ldp x29, x30, [sp], #32
40025a3c: d65f03c0 ret
set_life_state = THREAD_LIFE_CHANGE_DEFERRED;
40025a40: 52800101 mov w1, #0x8 // #8
previous_life_state = _Thread_Change_life(
40025a44: 52800002 mov w2, #0x0 // #0
40025a48: 52800100 mov w0, #0x8 // #8
40025a4c: 94000d81 bl 40029050 <_Thread_Change_life>
40025a50: 2a0003e1 mov w1, w0
return 0;
40025a54: 52800000 mov w0, #0x0 // #0
if ( oldtype != NULL ) {
40025a58: b5fffeb4 cbnz x20, 40025a2c <pthread_setcanceltype+0x4c>
40025a5c: 17fffff6 b 40025a34 <pthread_setcanceltype+0x54>
return EPROTO;
40025a60: 528008e0 mov w0, #0x47 // #71
}
40025a64: a94153f3 ldp x19, x20, [sp, #16]
40025a68: a8c27bfd ldp x29, x30, [sp], #32
40025a6c: d65f03c0 ret
*oldtype = PTHREAD_CANCEL_ASYNCHRONOUS;
40025a70: 52800021 mov w1, #0x1 // #1 <== NOT EXECUTED
40025a74: b9000281 str w1, [x20] <== NOT EXECUTED
}
40025a78: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40025a7c: a8c27bfd ldp x29, x30, [sp], #32 <== NOT EXECUTED
40025a80: d65f03c0 ret <== NOT EXECUTED
...
00000000400281f0 <pthread_setschedparam>:
const struct sched_param *param
#else
struct sched_param *param
#endif
)
{
400281f0: a9b47bfd stp x29, x30, [sp, #-192]!
400281f4: 910003fd mov x29, sp
400281f8: a90573fb stp x27, x28, [sp, #80]
Thread_Control *the_thread;
Per_CPU_Control *cpu_self;
Thread_queue_Context queue_context;
int error;
if ( param == NULL ) {
400281fc: b4000e62 cbz x2, 400283c8 <pthread_setschedparam+0x1d8>
return EINVAL;
}
error = _POSIX_Thread_Translate_sched_param(
40028200: a90153f3 stp x19, x20, [sp, #16]
40028204: aa0203f3 mov x19, x2
40028208: 2a0003f4 mov w20, w0
4002820c: a9025bf5 stp x21, x22, [sp, #32]
40028210: 2a0103f5 mov w21, w1
40028214: 9101e3e3 add x3, sp, #0x78
40028218: 9101d3e2 add x2, sp, #0x74
4002821c: aa1303e1 mov x1, x19
40028220: 2a1503e0 mov w0, w21
40028224: 940013ff bl 4002d220 <_POSIX_Thread_Translate_sched_param>
40028228: 2a0003fb mov w27, w0
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( error != 0 ) {
4002822c: 340000e0 cbz w0, 40028248 <pthread_setschedparam+0x58>
40028230: a94153f3 ldp x19, x20, [sp, #16]
40028234: a9425bf5 ldp x21, x22, [sp, #32]
cpu_self = _Thread_queue_Dispatch_disable( &queue_context );
_Thread_Wait_release( the_thread, &queue_context );
_Thread_Priority_update( &queue_context );
_Thread_Dispatch_enable( cpu_self );
return error;
}
40028238: 2a1b03e0 mov w0, w27
4002823c: a94573fb ldp x27, x28, [sp, #80]
40028240: a8cc7bfd ldp x29, x30, [sp], #192
40028244: d65f03c0 ret
the_thread = _Thread_Get( thread, &queue_context.Lock_context.Lock_context );
40028248: 2a1403e0 mov w0, w20
4002824c: 910203e1 add x1, sp, #0x80
queue_context->Priority.update_count = 0;
40028250: f90053ff str xzr, [sp, #160]
40028254: 940007af bl 4002a110 <_Thread_Get>
40028258: aa0003f4 mov x20, x0
if ( the_thread == NULL ) {
4002825c: b4000c00 cbz x0, 400283dc <pthread_setschedparam+0x1ec>
error = _POSIX_Set_sched_param(
40028260: a90363f7 stp x23, x24, [sp, #48]
core_normal_prio = _POSIX_Priority_To_core( scheduler, normal_prio, &valid );
40028264: b00000d7 adrp x23, 40041000 <bsp_section_rodata_begin+0x768>
40028268: 913062f7 add x23, x23, #0xc18
normal_prio = param->sched_priority;
4002826c: b9400278 ldr w24, [x19]
core_normal_prio = _POSIX_Priority_To_core( scheduler, normal_prio, &valid );
40028270: aa1703e0 mov x0, x23
40028274: 9101cfe2 add x2, sp, #0x73
40028278: a9046bf9 stp x25, x26, [sp, #64]
4002827c: 2a1803e1 mov w1, w24
error = _POSIX_Set_sched_param(
40028280: b94077fa ldr w26, [sp, #116]
40028284: f9403ff9 ldr x25, [sp, #120]
core_normal_prio = _POSIX_Priority_To_core( scheduler, normal_prio, &valid );
40028288: 97fffd96 bl 400278e0 <_POSIX_Priority_To_core>
if ( !valid ) {
4002828c: 3941cfe1 ldrb w1, [sp, #115]
core_normal_prio = _POSIX_Priority_To_core( scheduler, normal_prio, &valid );
40028290: aa0003f6 mov x22, x0
if ( !valid ) {
40028294: 340008e1 cbz w1, 400283b0 <pthread_setschedparam+0x1c0> <== NEVER TAKEN
if ( policy == SCHED_SPORADIC ) {
40028298: 710012bf cmp w21, #0x4
4002829c: 54000920 b.eq 400283c0 <pthread_setschedparam+0x1d0> // b.none
core_low_prio = _POSIX_Priority_To_core( scheduler, low_prio, &valid );
400282a0: 2a1803e1 mov w1, w24
400282a4: 9101cfe2 add x2, sp, #0x73
400282a8: aa1703e0 mov x0, x23
400282ac: 97fffd8d bl 400278e0 <_POSIX_Priority_To_core>
if ( !valid ) {
400282b0: 3941cfe1 ldrb w1, [sp, #115]
core_low_prio = _POSIX_Priority_To_core( scheduler, low_prio, &valid );
400282b4: f90037e0 str x0, [sp, #104]
if ( !valid ) {
400282b8: 340007c1 cbz w1, 400283b0 <pthread_setschedparam+0x1c0>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
400282bc: f9412297 ldr x23, [x20, #576]
_Watchdog_Remove(
400282c0: 900006e0 adrp x0, 40104000 <_Thread_Heads+0x68>
400282c4: 91200000 add x0, x0, #0x800
_Watchdog_Per_CPU_remove_ticks( &api->Sporadic.Timer );
400282c8: 910022fc add x28, x23, #0x8
400282cc: 9100e2f8 add x24, x23, #0x38
400282d0: aa1c03e1 mov x1, x28
400282d4: 94000f67 bl 4002c070 <_Watchdog_Remove>
400282d8: 91010281 add x1, x20, #0x40
if ( _Priority_Node_is_active( &api->Sporadic.Low_priority ) ) {
400282dc: b9401b00 ldr w0, [x24, #24]
400282e0: f9001036 str x22, [x1, #32]
400282e4: 3100041f cmn w0, #0x1
400282e8: 54000820 b.eq 400283ec <pthread_setschedparam+0x1fc> // b.none
_Thread_Priority_add(
400282ec: 910203e2 add x2, sp, #0x80
400282f0: aa1403e0 mov x0, x20
400282f4: 94000653 bl 40029c40 <_Thread_Priority_add>
_Thread_Priority_remove(
400282f8: aa1403e0 mov x0, x20
400282fc: 910203e2 add x2, sp, #0x80
40028300: aa1803e1 mov x1, x24
40028304: 94000673 bl 40029cd0 <_Thread_Priority_remove>
RB_COLOR( the_node, Node ) = -1;
40028308: 12800000 mov w0, #0xffffffff // #-1
4002830c: b9001b00 str w0, [x24, #24]
the_thread->budget_algorithm = budget_algorithm;
40028310: b900f29a str w26, [x20, #240]
api->Sporadic.sched_ss_init_budget = param->sched_ss_init_budget;
40028314: 9101c2e0 add x0, x23, #0x70
the_thread->budget_callout = budget_callout;
40028318: f9007e99 str x25, [x20, #248]
api->Sporadic.sched_ss_repl_period = param->sched_ss_repl_period;
4002831c: 910182f6 add x22, x23, #0x60
40028320: f94037e1 ldr x1, [sp, #104]
40028324: f9001301 str x1, [x24, #32]
40028328: f9400661 ldr x1, [x19, #8]
4002832c: f90032e1 str x1, [x23, #96]
40028330: f9400a61 ldr x1, [x19, #16]
40028334: f90036e1 str x1, [x23, #104]
api->Sporadic.sched_ss_init_budget = param->sched_ss_init_budget;
40028338: f9400e61 ldr x1, [x19, #24]
4002833c: f9003ae1 str x1, [x23, #112]
40028340: f9401261 ldr x1, [x19, #32]
40028344: f9000401 str x1, [x0, #8]
api->Sporadic.sched_ss_max_repl = param->sched_ss_max_repl;
40028348: b9402a61 ldr w1, [x19, #40]
if ( policy == SCHED_SPORADIC ) {
4002834c: 710012bf cmp w21, #0x4
api->Sporadic.sched_ss_max_repl = param->sched_ss_max_repl;
40028350: b90082e1 str w1, [x23, #128]
if ( policy == SCHED_SPORADIC ) {
40028354: 54000560 b.eq 40028400 <pthread_setschedparam+0x210> // b.none
the_thread->cpu_time_budget =
40028358: d00000c0 adrp x0, 40042000 <rtems_test_name+0x1a0>
4002835c: b9470800 ldr w0, [x0, #1800]
40028360: 900006f3 adrp x19, 40104000 <_Thread_Heads+0x68>
40028364: 911f0273 add x19, x19, #0x7c0
40028368: b900ee80 str w0, [x20, #236]
disable_level = cpu_self->thread_dispatch_disable_level;
4002836c: b9401a60 ldr w0, [x19, #24]
cpu_self->thread_dispatch_disable_level = disable_level + 1;
40028370: 11000400 add w0, w0, #0x1
40028374: b9001a60 str w0, [x19, #24]
_ISR_lock_ISR_enable( &queue_context->Lock_context.Lock_context );
40028378: b94083e0 ldr w0, [sp, #128]
4002837c: d51b4220 msr daif, x0
_Thread_Priority_update( &queue_context );
40028380: 910203e0 add x0, sp, #0x80
40028384: 9400069b bl 40029df0 <_Thread_Priority_update>
_Thread_Dispatch_enable( cpu_self );
40028388: aa1303e0 mov x0, x19
4002838c: 94000741 bl 4002a090 <_Thread_Dispatch_enable>
}
40028390: 2a1b03e0 mov w0, w27
return error;
40028394: a94153f3 ldp x19, x20, [sp, #16]
40028398: a9425bf5 ldp x21, x22, [sp, #32]
4002839c: a94363f7 ldp x23, x24, [sp, #48]
400283a0: a9446bf9 ldp x25, x26, [sp, #64]
}
400283a4: a94573fb ldp x27, x28, [sp, #80]
400283a8: a8cc7bfd ldp x29, x30, [sp], #192
400283ac: d65f03c0 ret
400283b0: 900006f3 adrp x19, 40104000 <_Thread_Heads+0x68>
400283b4: 911f0273 add x19, x19, #0x7c0
return EINVAL;
400283b8: 528002db mov w27, #0x16 // #22
400283bc: 17ffffec b 4002836c <pthread_setschedparam+0x17c>
low_prio = param->sched_ss_low_priority;
400283c0: b9400678 ldr w24, [x19, #4]
400283c4: 17ffffb7 b 400282a0 <pthread_setschedparam+0xb0>
return EINVAL;
400283c8: 528002db mov w27, #0x16 // #22
}
400283cc: 2a1b03e0 mov w0, w27
400283d0: a94573fb ldp x27, x28, [sp, #80]
400283d4: a8cc7bfd ldp x29, x30, [sp], #192
400283d8: d65f03c0 ret
return ESRCH;
400283dc: 5280007b mov w27, #0x3 // #3
400283e0: a94153f3 ldp x19, x20, [sp, #16]
400283e4: a9425bf5 ldp x21, x22, [sp, #32]
400283e8: 17ffff94 b 40028238 <pthread_setschedparam+0x48>
_Thread_Priority_changed(
400283ec: 910203e3 add x3, sp, #0x80
400283f0: aa1403e0 mov x0, x20
400283f4: 52800002 mov w2, #0x0 // #0
400283f8: 9400065a bl 40029d60 <_Thread_Priority_changed>
400283fc: 17ffffc5 b 40028310 <pthread_setschedparam+0x120>
_Timespec_To_ticks( &api->Sporadic.sched_ss_init_budget );
40028400: 94000dd0 bl 4002bb40 <_Timespec_To_ticks>
expire = ticks + cpu->Watchdog.ticks;
40028404: 900006f3 adrp x19, 40104000 <_Thread_Heads+0x68>
40028408: 911f0273 add x19, x19, #0x7c0
the_thread->cpu_time_budget =
4002840c: b900ee80 str w0, [x20, #236]
_Watchdog_Per_CPU_insert_ticks(
40028410: aa1603e0 mov x0, x22
40028414: 94000dcb bl 4002bb40 <_Timespec_To_ticks>
40028418: 2a0003e3 mov w3, w0
4002841c: f9401e62 ldr x2, [x19, #56]
_Watchdog_Insert(header, the_watchdog, expire);
40028420: aa1c03e1 mov x1, x28
40028424: 900006e0 adrp x0, 40104000 <_Thread_Heads+0x68>
40028428: 91200000 add x0, x0, #0x800
4002842c: 8b234042 add x2, x2, w3, uxtw
40028430: 94000ef0 bl 4002bff0 <_Watchdog_Insert>
}
40028434: 17ffffce b 4002836c <pthread_setschedparam+0x17c>
...
00000000400249e0 <pthread_setspecific>:
int pthread_setspecific(
pthread_key_t key,
const void *value
)
{
400249e0: a9bc7bfd stp x29, x30, [sp, #-64]!
400249e4: 910003fd mov x29, sp
400249e8: a90153f3 stp x19, x20, [sp, #16]
400249ec: 2a0003f3 mov w19, w0
400249f0: a9025bf5 stp x21, x22, [sp, #32]
400249f4: f00006e0 adrp x0, 40103000 <_Thread_Objects+0x420>
400249f8: f941f016 ldr x22, [x0, #992]
Thread_Control *executing;
int eno;
executing = _Thread_Get_executing();
if ( value != NULL ) {
400249fc: b40009a1 cbz x1, 40024b30 <pthread_setspecific+0x150>
__asm__ volatile (
40024a00: aa0103f4 mov x20, x1
40024a04: d53b4220 mrs x0, daif
40024a08: d50342df msr daifset, #0x2
while ( *link != NULL ) {
40024a0c: f94126c2 ldr x2, [x22, #584]
40024a10: b50000a2 cbnz x2, 40024a24 <pthread_setspecific+0x44>
40024a14: 14000012 b 40024a5c <pthread_setspecific+0x7c>
return &RB_LEFT( the_node, Node );
40024a18: 9a822062 csel x2, x3, x2, cs // cs = hs, nlast
while ( *link != NULL ) {
40024a1c: f9400042 ldr x2, [x2]
40024a20: b40001e2 cbz x2, 40024a5c <pthread_setspecific+0x7c>
return *the_left == the_right->key;
40024a24: b9402045 ldr w5, [x2, #32]
the_right = POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( right );
40024a28: d1004044 sub x4, x2, #0x10
return &RB_LEFT( the_node, Node );
40024a2c: 91002043 add x3, x2, #0x8
if ( ( *equal )( key, parent ) ) {
40024a30: 6b05027f cmp w19, w5
40024a34: 54ffff21 b.ne 40024a18 <pthread_setspecific+0x38> // b.any
key_value_pair->value = RTEMS_DECONST( void *, value );
40024a38: f9002094 str x20, [x4, #64]
__asm__ volatile (
40024a3c: 92407c00 and x0, x0, #0xffffffff
40024a40: d51b4220 msr daif, x0
_POSIX_Keys_Key_value_acquire( executing, &lock_context );
key_value_pair = _POSIX_Keys_Key_value_find( key, executing );
if ( key_value_pair != NULL ) {
eno = _POSIX_Keys_Set_value( key_value_pair, value );
40024a44: 52800015 mov w21, #0x0 // #0
} else {
eno = _POSIX_Keys_Delete_value( key, executing );
}
return eno;
}
40024a48: 2a1503e0 mov w0, w21
40024a4c: a94153f3 ldp x19, x20, [sp, #16]
40024a50: a9425bf5 ldp x21, x22, [sp, #32]
40024a54: a8c47bfd ldp x29, x30, [sp], #64
40024a58: d65f03c0 ret
_ISR_lock_Release_and_ISR_enable( &the_thread->Keys.Lock, lock_context );
40024a5c: f9001bf7 str x23, [sp, #48]
40024a60: 92407c00 and x0, x0, #0xffffffff
40024a64: d51b4220 msr daif, x0
_RTEMS_Lock_allocator();
40024a68: 9400032e bl 40025720 <_RTEMS_Lock_allocator>
eno = EINVAL;
40024a6c: 528002d5 mov w21, #0x16 // #22
_Objects_Get_no_protection( (Objects_Id) key, &_POSIX_Keys_Information );
40024a70: 2a1303e0 mov w0, w19
40024a74: 900006e1 adrp x1, 40100000 <_POSIX_Keys_Information>
40024a78: 91000021 add x1, x1, #0x0
40024a7c: 94000721 bl 40026700 <_Objects_Get_no_protection>
40024a80: aa0003f7 mov x23, x0
if ( the_key != NULL ) {
40024a84: b4000480 cbz x0, 40024b14 <pthread_setspecific+0x134>
key_value_pair = _POSIX_Keys_Key_value_allocate();
40024a88: 97ffff7e bl 40024880 <_POSIX_Keys_Key_value_allocate>
eno = ENOMEM;
40024a8c: 52800195 mov w21, #0xc // #12
key_value_pair = _POSIX_Keys_Key_value_allocate();
40024a90: aa0003e5 mov x5, x0
if ( key_value_pair != NULL ) {
40024a94: b4000400 cbz x0, 40024b14 <pthread_setspecific+0x134> <== NEVER TAKEN
_RBTree_Initialize_node( &key_value_pair->Lookup_node );
40024a98: aa0003e1 mov x1, x0
old_last = tail->previous;
40024a9c: 9100c2f7 add x23, x23, #0x30
40024aa0: f94006e2 ldr x2, [x23, #8]
key_value_pair->key = key;
40024aa4: b90030b3 str w19, [x5, #48]
key_value_pair->value = RTEMS_DECONST( void *, value );
40024aa8: a903d0b6 stp x22, x20, [x5, #56]
return &RB_ROOT( the_rbtree );
40024aac: 910922c0 add x0, x22, #0x248
the_node->next = tail;
40024ab0: f8010437 str x23, [x1], #16
tail->previous = the_node;
40024ab4: f90006e5 str x5, [x23, #8]
old_last->next = the_node;
40024ab8: f9000045 str x5, [x2]
the_node->previous = old_last;
40024abc: f90004a2 str x2, [x5, #8]
__asm__ volatile (
40024ac0: d53b4234 mrs x20, daif
40024ac4: d50342df msr daifset, #0x2
while ( *link != NULL ) {
40024ac8: f94126c3 ldr x3, [x22, #584]
40024acc: b5000063 cbnz x3, 40024ad8 <pthread_setspecific+0xf8>
40024ad0: 14000043 b 40024bdc <pthread_setspecific+0x1fc>
40024ad4: aa0403e3 mov x3, x4
if ( ( *less )( key, parent ) ) {
40024ad8: b9402064 ldr w4, [x3, #32]
return &RB_LEFT( the_node, Node );
40024adc: 91002062 add x2, x3, #0x8
40024ae0: 6b04027f cmp w19, w4
40024ae4: 9a832042 csel x2, x2, x3, cs // cs = hs, nlast
while ( *link != NULL ) {
40024ae8: f9400044 ldr x4, [x2]
40024aec: b5ffff44 cbnz x4, 40024ad4 <pthread_setspecific+0xf4>
RB_SET( child, parent, Node );
40024af0: a9008c3f stp xzr, x3, [x1, #8]
40024af4: 52800024 mov w4, #0x1 // #1
40024af8: f90008bf str xzr, [x5, #16]
40024afc: b9001824 str w4, [x1, #24]
*link = child;
40024b00: f9000041 str x1, [x2]
_RBTree_Insert_color( the_rbtree, the_node );
40024b04: 94000883 bl 40026d10 <_RBTree_Insert_color>
__asm__ volatile (
40024b08: 92407e94 and x20, x20, #0xffffffff
40024b0c: d51b4234 msr daif, x20
eno = 0;
40024b10: 52800015 mov w21, #0x0 // #0
_RTEMS_Unlock_allocator();
40024b14: 94000307 bl 40025730 <_RTEMS_Unlock_allocator>
}
40024b18: 2a1503e0 mov w0, w21
40024b1c: a94153f3 ldp x19, x20, [sp, #16]
40024b20: a9425bf5 ldp x21, x22, [sp, #32]
40024b24: f9401bf7 ldr x23, [sp, #48]
40024b28: a8c47bfd ldp x29, x30, [sp], #64
40024b2c: d65f03c0 ret
_RTEMS_Lock_allocator();
40024b30: 940002fc bl 40025720 <_RTEMS_Lock_allocator>
eno = EINVAL;
40024b34: 528002d5 mov w21, #0x16 // #22
40024b38: 900006e1 adrp x1, 40100000 <_POSIX_Keys_Information>
40024b3c: 91000021 add x1, x1, #0x0
40024b40: 2a1303e0 mov w0, w19
40024b44: 940006ef bl 40026700 <_Objects_Get_no_protection>
if ( the_key != NULL ) {
40024b48: b4000120 cbz x0, 40024b6c <pthread_setspecific+0x18c>
__asm__ volatile (
40024b4c: d53b4235 mrs x21, daif
40024b50: d50342df msr daifset, #0x2
while ( *link != NULL ) {
40024b54: f94126c1 ldr x1, [x22, #584]
40024b58: b50001c1 cbnz x1, 40024b90 <pthread_setspecific+0x1b0>
40024b5c: d503201f nop
__asm__ volatile (
40024b60: 92407eb5 and x21, x21, #0xffffffff
40024b64: d51b4235 msr daif, x21
eno = 0;
40024b68: 52800015 mov w21, #0x0 // #0
_RTEMS_Unlock_allocator();
40024b6c: 940002f1 bl 40025730 <_RTEMS_Unlock_allocator>
}
40024b70: 2a1503e0 mov w0, w21
40024b74: a94153f3 ldp x19, x20, [sp, #16]
40024b78: a9425bf5 ldp x21, x22, [sp, #32]
40024b7c: a8c47bfd ldp x29, x30, [sp], #64
40024b80: d65f03c0 ret
return &RB_LEFT( the_node, Node );
40024b84: 9a812001 csel x1, x0, x1, cs // cs = hs, nlast <== NOT EXECUTED
while ( *link != NULL ) {
40024b88: f9400021 ldr x1, [x1] <== NOT EXECUTED
40024b8c: b4fffea1 cbz x1, 40024b60 <pthread_setspecific+0x180> <== NOT EXECUTED
return *the_left == the_right->key;
40024b90: b9402022 ldr w2, [x1, #32]
the_right = POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( right );
40024b94: d1004034 sub x20, x1, #0x10
return &RB_LEFT( the_node, Node );
40024b98: 91002020 add x0, x1, #0x8
if ( ( *equal )( key, parent ) ) {
40024b9c: 6b02027f cmp w19, w2
40024ba0: 54ffff21 b.ne 40024b84 <pthread_setspecific+0x1a4> // b.any <== NEVER TAKEN
_RBTree_Extract(
40024ba4: 910922c0 add x0, x22, #0x248
40024ba8: 94000746 bl 400268c0 <_RBTree_Extract>
40024bac: 92407eb5 and x21, x21, #0xffffffff
40024bb0: d51b4235 msr daif, x21
previous = the_node->previous;
40024bb4: a9400a83 ldp x3, x2, [x20]
_Freechain_Put( &_POSIX_Keys_Keypool, key_value_pair );
40024bb8: aa1403e1 mov x1, x20
40024bbc: f00006e0 adrp x0, 40103000 <_Thread_Objects+0x420>
40024bc0: 910da000 add x0, x0, #0x368
next->previous = previous;
40024bc4: f9000462 str x2, [x3, #8]
eno = 0;
40024bc8: 52800015 mov w21, #0x0 // #0
previous->next = next;
40024bcc: f9000043 str x3, [x2]
40024bd0: 94000350 bl 40025910 <_Freechain_Put>
40024bd4: 940002d7 bl 40025730 <_RTEMS_Unlock_allocator>
return eno;
40024bd8: 17ffffe6 b 40024b70 <pthread_setspecific+0x190>
link = _RBTree_Root_reference( the_rbtree );
40024bdc: aa0003e2 mov x2, x0
40024be0: 17ffffc4 b 40024af0 <pthread_setspecific+0x110>
...
0000000040025a90 <pthread_testcancel>:
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
40025a90: a9bf7bfd stp x29, x30, [sp, #-16]!
40025a94: 910003fd mov x29, sp
if ( _ISR_Is_in_progress() ) {
40025a98: 9400010e bl 40025ed0 <_ISR_Is_in_progress>
40025a9c: 72001c1f tst w0, #0xff
40025aa0: 54000060 b.eq 40025aac <pthread_testcancel+0x1c> // b.none <== ALWAYS TAKEN
return;
}
_Thread_Change_life( 0, 0, THREAD_LIFE_CHANGE_DEFERRED );
}
40025aa4: a8c17bfd ldp x29, x30, [sp], #16 <== NOT EXECUTED
40025aa8: d65f03c0 ret <== NOT EXECUTED
40025aac: a8c17bfd ldp x29, x30, [sp], #16
_Thread_Change_life( 0, 0, THREAD_LIFE_CHANGE_DEFERRED );
40025ab0: 52800102 mov w2, #0x8 // #8
40025ab4: 52800001 mov w1, #0x0 // #0
40025ab8: 52800000 mov w0, #0x0 // #0
40025abc: 14000d65 b 40029050 <_Thread_Change_life>
0000000040028c00 <rtems_aio_enqueue>:
{
40028c00: a9b87bfd stp x29, x30, [sp, #-128]!
40028c04: 910003fd mov x29, sp
40028c08: a90153f3 stp x19, x20, [sp, #16]
result = pthread_mutex_lock (&aio_request_queue.mutex);
40028c0c: f0000734 adrp x20, 4010f000 <_Thread_Objects+0x5f0>
40028c10: 911e0294 add x20, x20, #0x780
{
40028c14: a9025bf5 stp x21, x22, [sp, #32]
40028c18: aa0003f5 mov x21, x0
result = pthread_mutex_lock (&aio_request_queue.mutex);
40028c1c: aa1403e0 mov x0, x20
40028c20: 940006e0 bl 4002a7a0 <pthread_mutex_lock>
40028c24: 2a0003f6 mov w22, w0
if (result != 0) {
40028c28: 350006e0 cbnz w0, 40028d04 <rtems_aio_enqueue+0x104> <== NEVER TAKEN
pthread_getschedparam (pthread_self(), &policy, ¶m);
40028c2c: 94000a39 bl 4002b510 <pthread_self>
40028c30: 910143e2 add x2, sp, #0x50
40028c34: 910133e1 add x1, sp, #0x4c
40028c38: 940009fe bl 4002b430 <pthread_getschedparam>
req->caller_thread = pthread_self ();
40028c3c: 94000a35 bl 4002b510 <pthread_self>
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
40028c40: f94012a1 ldr x1, [x21, #32]
req->aiocbp->error_code = EINPROGRESS;
40028c44: 52800ee3 mov w3, #0x77 // #119
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
40028c48: 29498be4 ldp w4, w2, [sp, #76]
40028c4c: b9402025 ldr w5, [x1, #32]
req->caller_thread = pthread_self ();
40028c50: b9001aa0 str w0, [x21, #24]
if ((aio_request_queue.idle_threads == 0) &&
40028c54: b9414280 ldr w0, [x20, #320]
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
40028c58: 4b050042 sub w2, w2, w5
40028c5c: 29020aa4 stp w4, w2, [x21, #16]
req->aiocbp->error_code = EINPROGRESS;
40028c60: b9004c23 str w3, [x1, #76]
req->aiocbp->return_value = 0;
40028c64: f900283f str xzr, [x1, #80]
if ((aio_request_queue.idle_threads == 0) &&
40028c68: 350004a0 cbnz w0, 40028cfc <rtems_aio_enqueue+0xfc> <== NEVER TAKEN
40028c6c: b9413e80 ldr w0, [x20, #316]
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
40028c70: b9400021 ldr w1, [x1]
if ((aio_request_queue.idle_threads == 0) &&
40028c74: 7100101f cmp w0, #0x4
40028c78: 540007ed b.le 40028d74 <rtems_aio_enqueue+0x174>
return _Chain_Immutable_head( the_chain )->next;
40028c7c: f9408693 ldr x19, [x20, #264]
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
40028c80: b9402a62 ldr w2, [x19, #40]
40028c84: 6b02003f cmp w1, w2
40028c88: 540004cd b.le 40028d20 <rtems_aio_enqueue+0x120>
40028c8c: 91044283 add x3, x20, #0x110
40028c90: 14000005 b 40028ca4 <rtems_aio_enqueue+0xa4>
return the_node->next;
40028c94: f9400273 ldr x19, [x19]
40028c98: b9402a62 ldr w2, [x19, #40]
40028c9c: 6b01005f cmp w2, w1
40028ca0: 5400040a b.ge 40028d20 <rtems_aio_enqueue+0x120> // b.tcont
40028ca4: eb03027f cmp x19, x3
40028ca8: 54ffff61 b.ne 40028c94 <rtems_aio_enqueue+0x94> // b.any <== ALWAYS TAKEN
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
40028cac: 91048280 add x0, x20, #0x120
40028cb0: 52800022 mov w2, #0x1 // #1
40028cb4: 97ffff3b bl 400289a0 <rtems_aio_search_fd>
40028cb8: aa0003f3 mov x19, x0
if (r_chain->new_fd == 1) {
40028cbc: b9402c00 ldr w0, [x0, #44]
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
40028cc0: aa1503e1 mov x1, x21
if (r_chain->new_fd == 1) {
40028cc4: 7100041f cmp w0, #0x1
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
40028cc8: 91004260 add x0, x19, #0x10
if (r_chain->new_fd == 1) {
40028ccc: 54000660 b.eq 40028d98 <rtems_aio_enqueue+0x198> // b.none
rtems_aio_insert_prio (&r_chain->perfd, req);
40028cd0: 97fffe3c bl 400285c0 <rtems_aio_insert_prio>
if (aio_request_queue.idle_threads > 0)
40028cd4: b9414280 ldr w0, [x20, #320]
40028cd8: 7100001f cmp w0, #0x0
40028cdc: 5400046c b.gt 40028d68 <rtems_aio_enqueue+0x168> <== NEVER TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
40028ce0: aa1403e0 mov x0, x20
40028ce4: 9400076f bl 4002aaa0 <pthread_mutex_unlock>
}
40028ce8: 2a1603e0 mov w0, w22
40028cec: a94153f3 ldp x19, x20, [sp, #16]
40028cf0: a9425bf5 ldp x21, x22, [sp, #32]
40028cf4: a8c87bfd ldp x29, x30, [sp], #128
40028cf8: d65f03c0 ret
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
40028cfc: b9400021 ldr w1, [x1] <== NOT EXECUTED
40028d00: 17ffffdf b 40028c7c <rtems_aio_enqueue+0x7c> <== NOT EXECUTED
free (req);
40028d04: aa1503e0 mov x0, x21 <== NOT EXECUTED
40028d08: 97ffe14e bl 40021240 <free> <== NOT EXECUTED
}
40028d0c: 2a1603e0 mov w0, w22 <== NOT EXECUTED
40028d10: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40028d14: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
40028d18: a8c87bfd ldp x29, x30, [sp], #128 <== NOT EXECUTED
40028d1c: d65f03c0 ret <== NOT EXECUTED
if (r_chain->fildes == fildes)
40028d20: f9001bf7 str x23, [sp, #48]
40028d24: 6b02003f cmp w1, w2
40028d28: 540001c1 b.ne 40028d60 <rtems_aio_enqueue+0x160> // b.any
r_chain->new_fd = 0;
40028d2c: b9002e7f str wzr, [x19, #44]
pthread_mutex_lock (&r_chain->mutex);
40028d30: 9100c277 add x23, x19, #0x30
40028d34: aa1703e0 mov x0, x23
40028d38: 9400069a bl 4002a7a0 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
40028d3c: aa1503e1 mov x1, x21
40028d40: 91004260 add x0, x19, #0x10
40028d44: 97fffe1f bl 400285c0 <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
40028d48: 91024260 add x0, x19, #0x90
40028d4c: 94000545 bl 4002a260 <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
40028d50: aa1703e0 mov x0, x23
40028d54: 94000753 bl 4002aaa0 <pthread_mutex_unlock>
40028d58: f9401bf7 ldr x23, [sp, #48]
40028d5c: 17ffffe1 b 40028ce0 <rtems_aio_enqueue+0xe0>
40028d60: f9401bf7 ldr x23, [sp, #48]
40028d64: 17ffffd2 b 40028cac <rtems_aio_enqueue+0xac>
pthread_cond_signal (&aio_request_queue.new_req);
40028d68: 91018280 add x0, x20, #0x60 <== NOT EXECUTED
40028d6c: 9400053d bl 4002a260 <pthread_cond_signal> <== NOT EXECUTED
40028d70: 17ffffdc b 40028ce0 <rtems_aio_enqueue+0xe0> <== NOT EXECUTED
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
40028d74: 91042280 add x0, x20, #0x108
40028d78: 52800022 mov w2, #0x1 // #1
40028d7c: 97ffff09 bl 400289a0 <rtems_aio_search_fd>
40028d80: aa0003f3 mov x19, x0
if (r_chain->new_fd == 1) {
40028d84: b9402c00 ldr w0, [x0, #44]
40028d88: 7100041f cmp w0, #0x1
40028d8c: 54000180 b.eq 40028dbc <rtems_aio_enqueue+0x1bc> // b.none
40028d90: f9001bf7 str x23, [sp, #48]
40028d94: 17ffffe7 b 40028d30 <rtems_aio_enqueue+0x130>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
40028d98: 94000ac6 bl 4002b8b0 <rtems_chain_prepend>
r_chain->new_fd = 0;
40028d9c: b9002e7f str wzr, [x19, #44]
pthread_mutex_init (&r_chain->mutex, NULL);
40028da0: 9100c260 add x0, x19, #0x30
40028da4: d2800001 mov x1, #0x0 // #0
40028da8: 94000636 bl 4002a680 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
40028dac: 91024260 add x0, x19, #0x90
40028db0: d2800001 mov x1, #0x0 // #0
40028db4: 9400050f bl 4002a1f0 <pthread_cond_init>
40028db8: 17ffffc7 b 40028cd4 <rtems_aio_enqueue+0xd4>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
40028dbc: aa1503e1 mov x1, x21
40028dc0: 91004260 add x0, x19, #0x10
40028dc4: 94000abb bl 4002b8b0 <rtems_chain_prepend>
r_chain->new_fd = 0;
40028dc8: b9002e7f str wzr, [x19, #44]
pthread_mutex_init (&r_chain->mutex, NULL);
40028dcc: d2800001 mov x1, #0x0 // #0
40028dd0: 9100c260 add x0, x19, #0x30
40028dd4: 9400062b bl 4002a680 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
40028dd8: d2800001 mov x1, #0x0 // #0
40028ddc: 91024260 add x0, x19, #0x90
40028de0: 94000504 bl 4002a1f0 <pthread_cond_init>
result = pthread_create (&thid, &aio_request_queue.attr,
40028de4: 91024281 add x1, x20, #0x90
40028de8: aa1303e3 mov x3, x19
40028dec: 910123e0 add x0, sp, #0x48
40028df0: 90000002 adrp x2, 40028000 <_Watchdog_Do_tickle+0x70>
40028df4: 91188042 add x2, x2, #0x620
40028df8: 9400087e bl 4002aff0 <pthread_create>
40028dfc: 2a0003e1 mov w1, w0
if (result != 0) {
40028e00: 350000a0 cbnz w0, 40028e14 <rtems_aio_enqueue+0x214> <== NEVER TAKEN
++aio_request_queue.active_threads;
40028e04: b9413e80 ldr w0, [x20, #316]
40028e08: 11000400 add w0, w0, #0x1
40028e0c: b9013e80 str w0, [x20, #316]
40028e10: 17ffffb4 b 40028ce0 <rtems_aio_enqueue+0xe0>
pthread_mutex_unlock (&aio_request_queue.mutex);
40028e14: aa1403e0 mov x0, x20 <== NOT EXECUTED
return result;
40028e18: 2a0103f6 mov w22, w1 <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
40028e1c: 94000721 bl 4002aaa0 <pthread_mutex_unlock> <== NOT EXECUTED
return result;
40028e20: 17ffffb2 b 40028ce8 <rtems_aio_enqueue+0xe8> <== NOT EXECUTED
...
00000000400288a0 <rtems_aio_init>:
{
400288a0: a9bd7bfd stp x29, x30, [sp, #-48]!
400288a4: 910003fd mov x29, sp
400288a8: a90153f3 stp x19, x20, [sp, #16]
result = pthread_attr_init (&aio_request_queue.attr);
400288ac: f0000733 adrp x19, 4010f000 <_Thread_Objects+0x5f0>
400288b0: 911e0273 add x19, x19, #0x780
{
400288b4: f90013f5 str x21, [sp, #32]
result = pthread_attr_init (&aio_request_queue.attr);
400288b8: 91024275 add x21, x19, #0x90
400288bc: aa1503e0 mov x0, x21
400288c0: 94000914 bl 4002ad10 <pthread_attr_init>
if (result != 0)
400288c4: 2a0003f4 mov w20, w0
400288c8: 340000c0 cbz w0, 400288e0 <rtems_aio_init+0x40> <== ALWAYS TAKEN
}
400288cc: 2a1403e0 mov w0, w20 <== NOT EXECUTED
400288d0: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
400288d4: f94013f5 ldr x21, [sp, #32] <== NOT EXECUTED
400288d8: a8c37bfd ldp x29, x30, [sp], #48 <== NOT EXECUTED
400288dc: d65f03c0 ret <== NOT EXECUTED
pthread_attr_setdetachstate (&aio_request_queue.attr,
400288e0: aa1503e0 mov x0, x21
400288e4: 52800001 mov w1, #0x0 // #0
400288e8: 9400091e bl 4002ad60 <pthread_attr_setdetachstate>
if (result != 0)
400288ec: 35000320 cbnz w0, 40028950 <rtems_aio_init+0xb0> <== NEVER TAKEN
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
400288f0: aa1303e0 mov x0, x19
400288f4: d2800001 mov x1, #0x0 // #0
400288f8: 94000762 bl 4002a680 <pthread_mutex_init>
if (result != 0)
400288fc: 35000360 cbnz w0, 40028968 <rtems_aio_init+0xc8> <== NEVER TAKEN
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
40028900: 91018260 add x0, x19, #0x60
40028904: d2800001 mov x1, #0x0 // #0
40028908: 9400063a bl 4002a1f0 <pthread_cond_init>
4002890c: 2a0003f4 mov w20, w0
if (result != 0) {
40028910: 350003a0 cbnz w0, 40028984 <rtems_aio_init+0xe4> <== NEVER TAKEN
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
40028914: d2960160 mov x0, #0xb00b // #45067
head->next = tail;
40028918: 91044264 add x4, x19, #0x110
tail->previous = head;
4002891c: 91042263 add x3, x19, #0x108
head->next = tail;
40028920: 9104a262 add x2, x19, #0x128
tail->previous = head;
40028924: 91048261 add x1, x19, #0x120
head->previous = NULL;
40028928: a910fe64 stp x4, xzr, [x19, #264]
head->next = tail;
4002892c: a9118a63 stp x3, x2, [x19, #280]
tail->previous = head;
40028930: a912867f stp xzr, x1, [x19, #296]
40028934: f9009e60 str x0, [x19, #312]
}
40028938: 2a1403e0 mov w0, w20
aio_request_queue.idle_threads = 0;
4002893c: b901427f str wzr, [x19, #320]
}
40028940: a94153f3 ldp x19, x20, [sp, #16]
40028944: f94013f5 ldr x21, [sp, #32]
40028948: a8c37bfd ldp x29, x30, [sp], #48
4002894c: d65f03c0 ret
pthread_attr_destroy (&aio_request_queue.attr);
40028950: aa1503e0 mov x0, x21 <== NOT EXECUTED
40028954: 940008e3 bl 4002ace0 <pthread_attr_destroy> <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
40028958: aa1303e0 mov x0, x19 <== NOT EXECUTED
4002895c: d2800001 mov x1, #0x0 // #0 <== NOT EXECUTED
40028960: 94000748 bl 4002a680 <pthread_mutex_init> <== NOT EXECUTED
if (result != 0)
40028964: 34fffce0 cbz w0, 40028900 <rtems_aio_init+0x60> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
40028968: 91024260 add x0, x19, #0x90 <== NOT EXECUTED
4002896c: 940008dd bl 4002ace0 <pthread_attr_destroy> <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
40028970: 91018260 add x0, x19, #0x60 <== NOT EXECUTED
40028974: d2800001 mov x1, #0x0 // #0 <== NOT EXECUTED
40028978: 9400061e bl 4002a1f0 <pthread_cond_init> <== NOT EXECUTED
4002897c: 2a0003f4 mov w20, w0 <== NOT EXECUTED
if (result != 0) {
40028980: 34fffca0 cbz w0, 40028914 <rtems_aio_init+0x74> <== NOT EXECUTED
pthread_mutex_destroy (&aio_request_queue.mutex);
40028984: aa1303e0 mov x0, x19 <== NOT EXECUTED
40028988: 9400071a bl 4002a5f0 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
4002898c: 91024260 add x0, x19, #0x90 <== NOT EXECUTED
40028990: 940008d4 bl 4002ace0 <pthread_attr_destroy> <== NOT EXECUTED
40028994: 17ffffe0 b 40028914 <rtems_aio_init+0x74> <== NOT EXECUTED
...
0000000040028b00 <rtems_aio_remove_fd>:
{
40028b00: a9bc7bfd stp x29, x30, [sp, #-64]!
40028b04: 910003fd mov x29, sp
40028b08: a90153f3 stp x19, x20, [sp, #16]
return _Chain_Immutable_head( the_chain )->next;
40028b0c: f9400813 ldr x19, [x0, #16]
40028b10: a9025bf5 stp x21, x22, [sp, #32]
return &the_chain->Tail.Node;
40028b14: 91006015 add x21, x0, #0x18
while (!rtems_chain_is_tail (chain, node))
40028b18: eb15027f cmp x19, x21
40028b1c: 54000220 b.eq 40028b60 <rtems_aio_remove_fd+0x60> // b.none <== NEVER TAKEN
req->aiocbp->return_value = -1;
40028b20: 92800016 mov x22, #0xffffffffffffffff // #-1
40028b24: f9001bf7 str x23, [sp, #48]
req->aiocbp->error_code = ECANCELED;
40028b28: 52801197 mov w23, #0x8c // #140
40028b2c: d503201f nop
return the_node->next;
40028b30: aa1303f4 mov x20, x19
rtems_chain_extract (&req->next_prio);
40028b34: aa1303e0 mov x0, x19
40028b38: f9400273 ldr x19, [x19]
40028b3c: 94000b49 bl 4002b860 <rtems_chain_extract>
req->aiocbp->error_code = ECANCELED;
40028b40: f9401281 ldr x1, [x20, #32]
free (req);
40028b44: aa1403e0 mov x0, x20
req->aiocbp->error_code = ECANCELED;
40028b48: b9004c37 str w23, [x1, #76]
req->aiocbp->return_value = -1;
40028b4c: f9002836 str x22, [x1, #80]
free (req);
40028b50: 97ffe1bc bl 40021240 <free>
while (!rtems_chain_is_tail (chain, node))
40028b54: eb15027f cmp x19, x21
40028b58: 54fffec1 b.ne 40028b30 <rtems_aio_remove_fd+0x30> // b.any
40028b5c: f9401bf7 ldr x23, [sp, #48]
}
40028b60: a94153f3 ldp x19, x20, [sp, #16]
40028b64: a9425bf5 ldp x21, x22, [sp, #32]
40028b68: a8c47bfd ldp x29, x30, [sp], #64
40028b6c: d65f03c0 ret
0000000040028b70 <rtems_aio_remove_req>:
{
40028b70: a9be7bfd stp x29, x30, [sp, #-32]!
40028b74: 910003fd mov x29, sp
40028b78: f9000bf3 str x19, [sp, #16]
return _Chain_Immutable_head( the_chain )->next;
40028b7c: f8408413 ldr x19, [x0], #8
if (rtems_chain_is_empty (chain))
40028b80: eb13001f cmp x0, x19
40028b84: 54000340 b.eq 40028bec <rtems_aio_remove_req+0x7c> // b.none
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
40028b88: f9401262 ldr x2, [x19, #32]
40028b8c: eb01005f cmp x2, x1
40028b90: 54000100 b.eq 40028bb0 <rtems_aio_remove_req+0x40> // b.none <== ALWAYS TAKEN
return the_node->next;
40028b94: f9400273 ldr x19, [x19] <== NOT EXECUTED
40028b98: eb00027f cmp x19, x0 <== NOT EXECUTED
40028b9c: 54ffff61 b.ne 40028b88 <rtems_aio_remove_req+0x18> // b.any <== NOT EXECUTED
return AIO_NOTCANCELED;
40028ba0: 52800020 mov w0, #0x1 // #1 <== NOT EXECUTED
}
40028ba4: f9400bf3 ldr x19, [sp, #16] <== NOT EXECUTED
40028ba8: a8c27bfd ldp x29, x30, [sp], #32 <== NOT EXECUTED
40028bac: d65f03c0 ret <== NOT EXECUTED
if (rtems_chain_is_tail (chain, node))
40028bb0: eb13001f cmp x0, x19
40028bb4: 54ffff60 b.eq 40028ba0 <rtems_aio_remove_req+0x30> // b.none <== NEVER TAKEN
rtems_chain_extract (node);
40028bb8: aa1303e0 mov x0, x19
40028bbc: 94000b29 bl 4002b860 <rtems_chain_extract>
current->aiocbp->error_code = ECANCELED;
40028bc0: f9401261 ldr x1, [x19, #32]
40028bc4: 52801183 mov w3, #0x8c // #140
current->aiocbp->return_value = -1;
40028bc8: 92800002 mov x2, #0xffffffffffffffff // #-1
free (current);
40028bcc: aa1303e0 mov x0, x19
current->aiocbp->error_code = ECANCELED;
40028bd0: b9004c23 str w3, [x1, #76]
current->aiocbp->return_value = -1;
40028bd4: f9002822 str x2, [x1, #80]
free (current);
40028bd8: 97ffe19a bl 40021240 <free>
return AIO_CANCELED;
40028bdc: 52800000 mov w0, #0x0 // #0
}
40028be0: f9400bf3 ldr x19, [sp, #16]
40028be4: a8c27bfd ldp x29, x30, [sp], #32
40028be8: d65f03c0 ret
return AIO_ALLDONE;
40028bec: 52800040 mov w0, #0x2 // #2
}
40028bf0: f9400bf3 ldr x19, [sp, #16]
40028bf4: a8c27bfd ldp x29, x30, [sp], #32
40028bf8: d65f03c0 ret
40028bfc: 00000000 udf #0
00000000400289a0 <rtems_aio_search_fd>:
{
400289a0: a9bc7bfd stp x29, x30, [sp, #-64]!
400289a4: 910003fd mov x29, sp
400289a8: f9001bf7 str x23, [sp, #48]
return _Chain_Immutable_head( the_chain )->next;
400289ac: f9400017 ldr x23, [x0]
400289b0: a90153f3 stp x19, x20, [sp, #16]
400289b4: 2a0103f4 mov w20, w1
400289b8: a9025bf5 stp x21, x22, [sp, #32]
400289bc: aa0003f6 mov x22, x0
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
400289c0: b9402ae3 ldr w3, [x23, #40]
400289c4: 6b03003f cmp w1, w3
400289c8: 5400076d b.le 40028ab4 <rtems_aio_search_fd+0x114>
return &the_chain->Tail.Node;
400289cc: 91002015 add x21, x0, #0x8
400289d0: eb1502ff cmp x23, x21
400289d4: 54000740 b.eq 40028abc <rtems_aio_search_fd+0x11c> // b.none
400289d8: aa1703f3 mov x19, x23
400289dc: 14000003 b 400289e8 <rtems_aio_search_fd+0x48>
400289e0: eb15027f cmp x19, x21
400289e4: 540001c0 b.eq 40028a1c <rtems_aio_search_fd+0x7c> // b.none
return the_node->next;
400289e8: f9400273 ldr x19, [x19]
400289ec: b9402a63 ldr w3, [x19, #40]
400289f0: 6b14007f cmp w3, w20
400289f4: 54ffff6b b.lt 400289e0 <rtems_aio_search_fd+0x40> // b.tstop
if (r_chain->fildes == fildes)
400289f8: 6b03029f cmp w20, w3
400289fc: 54000381 b.ne 40028a6c <rtems_aio_search_fd+0xcc> // b.any
r_chain->new_fd = 0;
40028a00: b9002e7f str wzr, [x19, #44]
}
40028a04: aa1303e0 mov x0, x19
40028a08: a94153f3 ldp x19, x20, [sp, #16]
40028a0c: a9425bf5 ldp x21, x22, [sp, #32]
40028a10: f9401bf7 ldr x23, [sp, #48]
40028a14: a8c47bfd ldp x29, x30, [sp], #64
40028a18: d65f03c0 ret
r_chain = NULL;
40028a1c: d2800013 mov x19, #0x0 // #0
if (create == 0)
40028a20: 34ffff22 cbz w2, 40028a04 <rtems_aio_search_fd+0x64>
r_chain = malloc (sizeof (rtems_aio_request_chain));
40028a24: d2801800 mov x0, #0xc0 // #192
40028a28: 97ffe2c6 bl 40021540 <malloc>
40028a2c: aa0003f3 mov x19, x0
head->next = tail;
40028a30: 91004002 add x2, x0, #0x10
rtems_chain_initialize_node (&r_chain->next_fd);
40028a34: aa1303e1 mov x1, x19
return &the_chain->Tail.Node;
40028a38: 91006000 add x0, x0, #0x18
head->previous = NULL;
40028a3c: a9017e60 stp x0, xzr, [x19, #16]
tail->previous = head;
40028a40: f9001262 str x2, [x19, #32]
rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd);
40028a44: f94006a0 ldr x0, [x21, #8]
40028a48: 94000b8e bl 4002b880 <rtems_chain_insert>
r_chain->new_fd = 1;
40028a4c: 52800020 mov w0, #0x1 // #1
40028a50: 29050274 stp w20, w0, [x19, #40]
}
40028a54: aa1303e0 mov x0, x19
40028a58: a94153f3 ldp x19, x20, [sp, #16]
40028a5c: a9425bf5 ldp x21, x22, [sp, #32]
40028a60: f9401bf7 ldr x23, [sp, #48]
40028a64: a8c47bfd ldp x29, x30, [sp], #64
40028a68: d65f03c0 ret
if (create == 0)
40028a6c: 34000202 cbz w2, 40028aac <rtems_aio_search_fd+0x10c>
r_chain = malloc (sizeof (rtems_aio_request_chain));
40028a70: d2801800 mov x0, #0xc0 // #192
40028a74: 97ffe2b3 bl 40021540 <malloc>
head->next = tail;
40028a78: 91004004 add x4, x0, #0x10
return &the_chain->Tail.Node;
40028a7c: 91006003 add x3, x0, #0x18
head->previous = NULL;
40028a80: a9017c03 stp x3, xzr, [x0, #16]
return &the_chain->Tail.Node;
40028a84: 910022c1 add x1, x22, #0x8
if (rtems_chain_is_empty (chain))
40028a88: eb0102ff cmp x23, x1
tail->previous = head;
40028a8c: f9001004 str x4, [x0, #32]
r_chain = malloc (sizeof (rtems_aio_request_chain));
40028a90: aa0003e2 mov x2, x0
rtems_chain_initialize_node (&r_chain->next_fd);
40028a94: aa0003e1 mov x1, x0
if (rtems_chain_is_empty (chain))
40028a98: 54000281 b.ne 40028ae8 <rtems_aio_search_fd+0x148> // b.any
rtems_chain_prepend (chain, &r_chain->next_fd);
40028a9c: aa1603e0 mov x0, x22
40028aa0: aa0203f3 mov x19, x2
40028aa4: 94000b83 bl 4002b8b0 <rtems_chain_prepend>
40028aa8: 17ffffe9 b 40028a4c <rtems_aio_search_fd+0xac>
r_chain = NULL;
40028aac: d2800013 mov x19, #0x0 // #0
40028ab0: 17ffffd5 b 40028a04 <rtems_aio_search_fd+0x64>
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
40028ab4: aa1703f3 mov x19, x23
40028ab8: 17ffffd0 b 400289f8 <rtems_aio_search_fd+0x58>
r_chain = NULL;
40028abc: d2800013 mov x19, #0x0 // #0
if (create == 0)
40028ac0: 34fffa22 cbz w2, 40028a04 <rtems_aio_search_fd+0x64> <== NEVER TAKEN
r_chain = malloc (sizeof (rtems_aio_request_chain));
40028ac4: d2801800 mov x0, #0xc0 // #192
40028ac8: 97ffe29e bl 40021540 <malloc>
40028acc: aa0003e2 mov x2, x0
head->next = tail;
40028ad0: 91004003 add x3, x0, #0x10
rtems_chain_initialize_node (&r_chain->next_fd);
40028ad4: aa0203e1 mov x1, x2
return &the_chain->Tail.Node;
40028ad8: 91006000 add x0, x0, #0x18
head->previous = NULL;
40028adc: a9017c40 stp x0, xzr, [x2, #16]
tail->previous = head;
40028ae0: f9001043 str x3, [x2, #32]
return &the_chain->Tail.Node;
40028ae4: 17ffffee b 40028a9c <rtems_aio_search_fd+0xfc>
40028ae8: aa1303f5 mov x21, x19
40028aec: aa0003f3 mov x19, x0
40028af0: 17ffffd5 b 40028a44 <rtems_aio_search_fd+0xa4>
...
0000000040024870 <sched_get_priority_max>:
int policy
)
{
const Scheduler_Control *scheduler;
switch ( policy ) {
40024870: 7100081f cmp w0, #0x2
40024874: 540000ed b.le 40024890 <sched_get_priority_max+0x20>
40024878: 7100101f cmp w0, #0x4
4002487c: 540000c1 b.ne 40024894 <sched_get_priority_max+0x24> // b.any <== NEVER TAKEN
RTEMS_INLINE_ROUTINE int _POSIX_Priority_Get_maximum(
const Scheduler_Control *scheduler
)
{
_Assert( (int) scheduler->maximum_priority > 1 );
return (int) scheduler->maximum_priority - 1;
40024880: d0000080 adrp x0, 40036000 <_Heap_Resize_block>
40024884: f9437800 ldr x0, [x0, #1776]
40024888: 51000400 sub w0, w0, #0x1
rtems_set_errno_and_return_minus_one( EINVAL );
}
scheduler = _Thread_Scheduler_get_home( _Thread_Get_executing() );
return _POSIX_Priority_Get_maximum( scheduler );
}
4002488c: d65f03c0 ret
switch ( policy ) {
40024890: 36ffff80 tbz w0, #31, 40024880 <sched_get_priority_max+0x10>
{
40024894: a9bf7bfd stp x29, x30, [sp, #-16]!
40024898: 910003fd mov x29, sp
rtems_set_errno_and_return_minus_one( EINVAL );
4002489c: 94002814 bl 4002e8ec <__errno>
400248a0: aa0003e1 mov x1, x0
400248a4: 528002c2 mov w2, #0x16 // #22
400248a8: 12800000 mov w0, #0xffffffff // #-1
400248ac: b9000022 str w2, [x1]
}
400248b0: a8c17bfd ldp x29, x30, [sp], #16
400248b4: d65f03c0 ret
...
00000000400248c0 <sched_get_priority_min>:
* 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
*/
int sched_get_priority_min(
int policy
)
{
400248c0: 2a0003e1 mov w1, w0
switch ( policy ) {
400248c4: 7100081f cmp w0, #0x2
400248c8: 5400018c b.gt 400248f8 <sched_get_priority_min+0x38> <== NEVER TAKEN
400248cc: 52800020 mov w0, #0x1 // #1
400248d0: 36f801c1 tbz w1, #31, 40024908 <sched_get_priority_min+0x48>
{
400248d4: a9bf7bfd stp x29, x30, [sp, #-16]!
400248d8: 910003fd mov x29, sp
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
400248dc: 94002804 bl 4002e8ec <__errno>
400248e0: aa0003e1 mov x1, x0
400248e4: 528002c2 mov w2, #0x16 // #22
400248e8: 12800000 mov w0, #0xffffffff // #-1
400248ec: b9000022 str w2, [x1]
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
400248f0: a8c17bfd ldp x29, x30, [sp], #16
400248f4: d65f03c0 ret
switch ( policy ) {
400248f8: 7100101f cmp w0, #0x4 <== NOT EXECUTED
400248fc: 52800020 mov w0, #0x1 // #1 <== NOT EXECUTED
40024900: 54fffea1 b.ne 400248d4 <sched_get_priority_min+0x14> // b.any <== NOT EXECUTED
}
40024904: d65f03c0 ret <== NOT EXECUTED
40024908: d65f03c0 ret
4002490c: 00000000 udf #0
0000000040024910 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
40024910: a9bd7bfd stp x29, x30, [sp, #-48]!
40024914: 910003fd mov x29, sp
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
40024918: 35000100 cbnz w0, 40024938 <sched_rr_get_interval+0x28> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
4002491c: b4000201 cbz x1, 4002495c <sched_rr_get_interval+0x4c>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks(
40024920: f0000080 adrp x0, 40037000 <_Thread_queue_Operations_priority_inherit+0x8>
40024924: b9402000 ldr w0, [x0, #32]
40024928: 94000b8a bl 40027750 <_Timespec_From_ticks>
rtems_configuration_get_ticks_per_timeslice(),
interval
);
return 0;
4002492c: 52800000 mov w0, #0x0 // #0
}
40024930: a8c37bfd ldp x29, x30, [sp], #48
40024934: d65f03c0 ret
40024938: f9000bf4 str x20, [sp, #16]
4002493c: 2a0003f4 mov w20, w0
40024940: f90017e1 str x1, [sp, #40]
if ( pid && pid != getpid() )
40024944: 97fff1a7 bl 40020fe0 <getpid>
40024948: 6b14001f cmp w0, w20
4002494c: f94017e1 ldr x1, [sp, #40]
40024950: 54000121 b.ne 40024974 <sched_rr_get_interval+0x64> // b.any
40024954: f9400bf4 ldr x20, [sp, #16]
40024958: 17fffff1 b 4002491c <sched_rr_get_interval+0xc>
rtems_set_errno_and_return_minus_one( EINVAL );
4002495c: 940027e4 bl 4002e8ec <__errno>
40024960: aa0003e1 mov x1, x0
40024964: 528002c2 mov w2, #0x16 // #22
40024968: 12800000 mov w0, #0xffffffff // #-1
4002496c: b9000022 str w2, [x1]
40024970: 17fffff0 b 40024930 <sched_rr_get_interval+0x20>
rtems_set_errno_and_return_minus_one( ESRCH );
40024974: 940027de bl 4002e8ec <__errno>
40024978: aa0003e1 mov x1, x0
4002497c: 52800062 mov w2, #0x3 // #3
40024980: 12800000 mov w0, #0xffffffff // #-1
40024984: f9400bf4 ldr x20, [sp, #16]
40024988: b9000022 str w2, [x1]
4002498c: 17ffffe9 b 40024930 <sched_rr_get_interval+0x20>
0000000040028ab0 <sem_close>:
#endif
#include <rtems/posix/semaphoreimpl.h>
int sem_close( sem_t *sem )
{
40028ab0: a9be7bfd stp x29, x30, [sp, #-32]!
40028ab4: 910003fd mov x29, sp
POSIX_Semaphore_Control *the_semaphore;
uint32_t open_count;
POSIX_SEMAPHORE_VALIDATE_OBJECT( sem );
40028ab8: b40004a0 cbz x0, 40028b4c <sem_close+0x9c>
40028abc: a90153f3 stp x19, x20, [sp, #16]
40028ac0: aa0003f3 mov x19, x0
40028ac4: d28ffce0 mov x0, #0x7fe7 // #32743
40028ac8: f2aba6c0 movk x0, #0x5d36, lsl #16
40028acc: ca000260 eor x0, x19, x0
40028ad0: f9400261 ldr x1, [x19]
40028ad4: eb01001f cmp x0, x1
40028ad8: 54000381 b.ne 40028b48 <sem_close+0x98> // b.any
if ( !_POSIX_Semaphore_Is_named( sem ) ) {
40028adc: f9401260 ldr x0, [x19, #32]
40028ae0: b4000440 cbz x0, 40028b68 <sem_close+0xb8> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get(
sem_t *sem
)
{
return RTEMS_CONTAINER_OF( sem, POSIX_Semaphore_Control, Semaphore );
40028ae4: d1008274 sub x20, x19, #0x20
_RTEMS_Lock_allocator();
40028ae8: 9400021a bl 40029350 <_RTEMS_Lock_allocator>
the_semaphore = _POSIX_Semaphore_Get( sem );
_Objects_Allocator_lock();
open_count = the_semaphore->open_count;
40028aec: b9405681 ldr w1, [x20, #84]
if ( open_count == 0 ) {
40028af0: 340003a1 cbz w1, 40028b64 <sem_close+0xb4> <== NEVER TAKEN
_Objects_Allocator_unlock();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( open_count == 1 && _POSIX_Semaphore_Is_busy( sem ) ) {
40028af4: 7100043f cmp w1, #0x1
40028af8: 54000061 b.ne 40028b04 <sem_close+0x54> // b.any
40028afc: f9400a60 ldr x0, [x19, #16]
40028b00: b5000140 cbnz x0, 40028b28 <sem_close+0x78>
_Objects_Allocator_unlock();
rtems_set_errno_and_return_minus_one( EBUSY );
}
the_semaphore->open_count = open_count - 1;
_POSIX_Semaphore_Delete( the_semaphore );
40028b04: aa1403e0 mov x0, x20
the_semaphore->open_count = open_count - 1;
40028b08: 51000421 sub w1, w1, #0x1
40028b0c: b9005681 str w1, [x20, #84]
_POSIX_Semaphore_Delete( the_semaphore );
40028b10: 9400150c bl 4002df40 <_POSIX_Semaphore_Delete>
_RTEMS_Unlock_allocator();
40028b14: 94000213 bl 40029360 <_RTEMS_Unlock_allocator>
_Objects_Allocator_unlock();
return 0;
40028b18: a94153f3 ldp x19, x20, [sp, #16]
40028b1c: 52800000 mov w0, #0x0 // #0
}
40028b20: a8c27bfd ldp x29, x30, [sp], #32
40028b24: d65f03c0 ret
40028b28: 9400020e bl 40029360 <_RTEMS_Unlock_allocator>
rtems_set_errno_and_return_minus_one( EBUSY );
40028b2c: 94002b70 bl 400338ec <__errno>
40028b30: aa0003e1 mov x1, x0
40028b34: 52800202 mov w2, #0x10 // #16
40028b38: 12800000 mov w0, #0xffffffff // #-1
40028b3c: a94153f3 ldp x19, x20, [sp, #16]
40028b40: b9000022 str w2, [x1]
40028b44: 17fffff7 b 40028b20 <sem_close+0x70>
40028b48: a94153f3 ldp x19, x20, [sp, #16]
POSIX_SEMAPHORE_VALIDATE_OBJECT( sem );
40028b4c: 94002b68 bl 400338ec <__errno>
40028b50: aa0003e1 mov x1, x0
40028b54: 528002c2 mov w2, #0x16 // #22
40028b58: 12800000 mov w0, #0xffffffff // #-1
40028b5c: b9000022 str w2, [x1]
40028b60: 17fffff0 b 40028b20 <sem_close+0x70>
40028b64: 940001ff bl 40029360 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
40028b68: 94002b61 bl 400338ec <__errno> <== NOT EXECUTED
40028b6c: aa0003e1 mov x1, x0 <== NOT EXECUTED
40028b70: 528002c2 mov w2, #0x16 // #22 <== NOT EXECUTED
40028b74: 12800000 mov w0, #0xffffffff // #-1 <== NOT EXECUTED
40028b78: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40028b7c: b9000022 str w2, [x1] <== NOT EXECUTED
40028b80: 17ffffe8 b 40028b20 <sem_close+0x70> <== NOT EXECUTED
...
0000000040025af0 <sem_open>:
{
40025af0: a9b87bfd stp x29, x30, [sp, #-128]!
40025af4: 910003fd mov x29, sp
40025af8: a90153f3 stp x19, x20, [sp, #16]
40025afc: 2a0103f4 mov w20, w1
40025b00: a9025bf5 stp x21, x22, [sp, #32]
40025b04: aa0003f5 mov x21, x0
40025b08: a9070fe2 stp x2, x3, [sp, #112]
if ( oflag & O_CREAT ) {
40025b0c: 37480314 tbnz w20, #9, 40025b6c <sem_open+0x7c>
_RTEMS_Lock_allocator();
40025b10: 940003b8 bl 400269f0 <_RTEMS_Lock_allocator>
const char *name,
size_t *name_length_p,
Objects_Get_by_name_error *error
)
{
return (POSIX_Semaphore_Control *) _Objects_Get_by_name(
40025b14: aa1503e1 mov x1, x21
40025b18: 910113e3 add x3, sp, #0x44
40025b1c: 910123e2 add x2, sp, #0x48
40025b20: f00006c0 adrp x0, 40100000 <_Barrier_Information>
40025b24: 9106e000 add x0, x0, #0x1b8
40025b28: 94000822 bl 40027bb0 <_Objects_Get_by_name>
40025b2c: aa0003f3 mov x19, x0
if ( the_semaphore == NULL ) {
40025b30: b4000ae0 cbz x0, 40025c8c <sem_open+0x19c>
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
40025b34: 52814001 mov w1, #0xa00 // #2560
40025b38: 0a010294 and w20, w20, w1
40025b3c: 6b01029f cmp w20, w1
40025b40: 54000900 b.eq 40025c60 <sem_open+0x170> // b.none <== NEVER TAKEN
the_semaphore->open_count += 1;
40025b44: b9405660 ldr w0, [x19, #84]
return &the_semaphore->Semaphore;
40025b48: 91008273 add x19, x19, #0x20
the_semaphore->open_count += 1;
40025b4c: 11000400 add w0, w0, #0x1
40025b50: b9003660 str w0, [x19, #52]
_RTEMS_Unlock_allocator();
40025b54: 940003ab bl 40026a00 <_RTEMS_Unlock_allocator>
}
40025b58: aa1303e0 mov x0, x19
40025b5c: a94153f3 ldp x19, x20, [sp, #16]
40025b60: a9425bf5 ldp x21, x22, [sp, #32]
40025b64: a8c87bfd ldp x29, x30, [sp], #128
40025b68: d65f03c0 ret
va_start(arg, oflag);
40025b6c: 9101c3e1 add x1, sp, #0x70
40025b70: 910203e2 add x2, sp, #0x80
mode = va_arg( arg, mode_t );
40025b74: 128000e0 mov w0, #0xfffffff8 // #-8
40025b78: f00006d6 adrp x22, 40100000 <_Barrier_Information>
40025b7c: 9106e2d6 add x22, x22, #0x1b8
40025b80: f9001bf7 str x23, [sp, #48]
value = va_arg( arg, unsigned int );
40025b84: b9407bf7 ldr w23, [sp, #120]
va_start(arg, oflag);
40025b88: a9050be2 stp x2, x2, [sp, #80]
40025b8c: f90033e1 str x1, [sp, #96]
40025b90: 290d7fe0 stp w0, wzr, [sp, #104]
_RTEMS_Lock_allocator();
40025b94: 94000397 bl 400269f0 <_RTEMS_Lock_allocator>
40025b98: aa1603e0 mov x0, x22
40025b9c: 910113e3 add x3, sp, #0x44
40025ba0: 910123e2 add x2, sp, #0x48
40025ba4: aa1503e1 mov x1, x21
40025ba8: 94000802 bl 40027bb0 <_Objects_Get_by_name>
40025bac: aa0003f3 mov x19, x0
if ( the_semaphore == NULL ) {
40025bb0: b50004e0 cbnz x0, 40025c4c <sem_open+0x15c>
if ( !( error == OBJECTS_GET_BY_NAME_NO_OBJECT && (oflag & O_CREAT) ) ) {
40025bb4: b94047e0 ldr w0, [sp, #68]
40025bb8: 7100081f cmp w0, #0x2
40025bbc: 54000661 b.ne 40025c88 <sem_open+0x198> // b.any
sem = _POSIX_Semaphore_Create_support(
40025bc0: f94027e1 ldr x1, [sp, #72]
if ( value > SEM_VALUE_MAX ) {
40025bc4: 37f807f7 tbnz w23, #31, 40025cc0 <sem_open+0x1d0>
name = _Workspace_String_duplicate( name_arg, name_len );
40025bc8: aa1503e0 mov x0, x21
40025bcc: 94001601 bl 4002b3d0 <_Workspace_String_duplicate>
40025bd0: aa0003f4 mov x20, x0
if ( name == NULL ) {
40025bd4: b40007e0 cbz x0, 40025cd0 <sem_open+0x1e0> <== NEVER TAKEN
return ( *information->allocate )( information );
40025bd8: f9400ac1 ldr x1, [x22, #16]
40025bdc: aa1603e0 mov x0, x22
40025be0: d63f0020 blr x1
if ( the_semaphore == NULL ) {
40025be4: b40007e0 cbz x0, 40025ce0 <sem_open+0x1f0> <== NEVER TAKEN
const char *_name, unsigned int _count)
{
struct _Semaphore_Control _init =
_SEMAPHORE_NAMED_INITIALIZER(_name, _count);
*_semaphore = _init;
40025be8: aa0003e1 mov x1, x0
_POSIX_Semaphore_Initialize( &the_semaphore->Semaphore, name, value );
40025bec: 91008013 add x19, x0, #0x20
the_semaphore->open_count = 1;
40025bf0: 52800023 mov w3, #0x1 // #1
sem->_flags = (uintptr_t) sem ^ POSIX_SEMAPHORE_MAGIC;
40025bf4: d28ffce2 mov x2, #0x7fe7 // #32743
40025bf8: f2aba6c2 movk x2, #0x5d36, lsl #16
40025bfc: ca020262 eor x2, x19, x2
40025c00: f9001002 str x2, [x0, #32]
the_semaphore->linked = true;
40025c04: 39014003 strb w3, [x0, #80]
the_semaphore->open_count = 1;
40025c08: b9005403 str w3, [x0, #84]
40025c0c: f8028c3f str xzr, [x1, #40]!
information->local_table[ index - OBJECTS_INDEX_MINIMUM ] = the_object;
40025c10: f94006c3 ldr x3, [x22, #8]
40025c14: 79402002 ldrh w2, [x0, #16]
40025c18: a900fc3f stp xzr, xzr, [x1, #8]
40025c1c: 51000442 sub w2, w2, #0x1
40025c20: f9000c34 str x20, [x1, #24]
40025c24: b9002037 str w23, [x1, #32]
the_object->name.name_p = name;
40025c28: f9000c14 str x20, [x0, #24]
information->local_table[ index - OBJECTS_INDEX_MINIMUM ] = the_object;
40025c2c: f8227860 str x0, [x3, x2, lsl #3]
_RTEMS_Unlock_allocator();
40025c30: 94000374 bl 40026a00 <_RTEMS_Unlock_allocator>
}
40025c34: aa1303e0 mov x0, x19
40025c38: a94153f3 ldp x19, x20, [sp, #16]
40025c3c: a9425bf5 ldp x21, x22, [sp, #32]
return sem;
40025c40: f9401bf7 ldr x23, [sp, #48]
}
40025c44: a8c87bfd ldp x29, x30, [sp], #128
40025c48: d65f03c0 ret
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
40025c4c: 52814001 mov w1, #0xa00 // #2560
40025c50: 0a010294 and w20, w20, w1
40025c54: 6b01029f cmp w20, w1
40025c58: f9401bf7 ldr x23, [sp, #48]
40025c5c: 54fff741 b.ne 40025b44 <sem_open+0x54> // b.any <== NEVER TAKEN
40025c60: 94000368 bl 40026a00 <_RTEMS_Unlock_allocator>
rtems_set_errno_and_return_value( EEXIST, SEM_FAILED );
40025c64: d2800013 mov x19, #0x0 // #0
40025c68: 940030d1 bl 40031fac <__errno>
40025c6c: 52800221 mov w1, #0x11 // #17
40025c70: b9000001 str w1, [x0]
}
40025c74: aa1303e0 mov x0, x19
40025c78: a94153f3 ldp x19, x20, [sp, #16]
40025c7c: a9425bf5 ldp x21, x22, [sp, #32]
40025c80: a8c87bfd ldp x29, x30, [sp], #128
40025c84: d65f03c0 ret
40025c88: f9401bf7 ldr x23, [sp, #48]
40025c8c: 9400035d bl 40026a00 <_RTEMS_Unlock_allocator>
rtems_set_errno_and_return_value(
40025c90: b94047f4 ldr w20, [sp, #68]
40025c94: 940030c6 bl 40031fac <__errno>
40025c98: b00000a1 adrp x1, 4003a000 <bsp_section_rodata_begin+0x3c8>
40025c9c: 91376021 add x1, x1, #0xdd8
40025ca0: d2800013 mov x19, #0x0 // #0
}
40025ca4: a9425bf5 ldp x21, x22, [sp, #32]
rtems_set_errno_and_return_value(
40025ca8: b8745821 ldr w1, [x1, w20, uxtw #2]
40025cac: b9000001 str w1, [x0]
}
40025cb0: aa1303e0 mov x0, x19
40025cb4: a94153f3 ldp x19, x20, [sp, #16]
40025cb8: a8c87bfd ldp x29, x30, [sp], #128
40025cbc: d65f03c0 ret
rtems_set_errno_and_return_value( EINVAL, SEM_FAILED );
40025cc0: 940030bb bl 40031fac <__errno>
40025cc4: 528002c1 mov w1, #0x16 // #22
40025cc8: b9000001 str w1, [x0]
40025ccc: 17ffffd9 b 40025c30 <sem_open+0x140>
rtems_set_errno_and_return_value( ENOMEM, SEM_FAILED );
40025cd0: 940030b7 bl 40031fac <__errno> <== NOT EXECUTED
40025cd4: 52800181 mov w1, #0xc // #12 <== NOT EXECUTED
40025cd8: b9000001 str w1, [x0] <== NOT EXECUTED
40025cdc: 17ffffd5 b 40025c30 <sem_open+0x140> <== NOT EXECUTED
_Workspace_Free( name );
40025ce0: aa1403e0 mov x0, x20 <== NOT EXECUTED
40025ce4: 940015b7 bl 4002b3c0 <_Workspace_Free> <== NOT EXECUTED
rtems_set_errno_and_return_value( ENOSPC, SEM_FAILED );
40025ce8: 940030b1 bl 40031fac <__errno> <== NOT EXECUTED
40025cec: 52800381 mov w1, #0x1c // #28 <== NOT EXECUTED
40025cf0: b9000001 str w1, [x0] <== NOT EXECUTED
40025cf4: 17ffffcf b 40025c30 <sem_open+0x140> <== NOT EXECUTED
...
0000000040026d60 <sem_timedwait>:
int sem_timedwait(
sem_t *__restrict _sem,
const struct timespec *__restrict abstime
)
{
40026d60: a9ba7bfd stp x29, x30, [sp, #-96]!
40026d64: 910003fd mov x29, sp
40026d68: f9000bf3 str x19, [sp, #16]
Thread_queue_Context queue_context;
ISR_Level level;
Thread_Control *executing;
unsigned int count;
POSIX_SEMAPHORE_VALIDATE_OBJECT( _sem );
40026d6c: b40005a0 cbz x0, 40026e20 <sem_timedwait+0xc0>
40026d70: aa0103e5 mov x5, x1
40026d74: d28ffce2 mov x2, #0x7fe7 // #32743
40026d78: f2aba6c2 movk x2, #0x5d36, lsl #16
40026d7c: ca020002 eor x2, x0, x2
40026d80: f9400001 ldr x1, [x0]
40026d84: eb01005f cmp x2, x1
40026d88: 540004c1 b.ne 40026e20 <sem_timedwait+0xc0> // b.any
__asm__ volatile (
40026d8c: d53b4224 mrs x4, daif
40026d90: d50342df msr daifset, #0x2
sem = _Sem_Get( &_sem->_Semaphore );
_Thread_queue_Context_initialize( &queue_context );
_Thread_queue_Context_ISR_disable( &queue_context, level );
executing = _Sem_Queue_acquire_critical( sem, &queue_context );
count = sem->count;
40026d94: b9402802 ldr w2, [x0, #40]
40026d98: 91002000 add x0, x0, #0x8
if ( RTEMS_PREDICT_TRUE( count > 0 ) ) {
40026d9c: 34000142 cbz w2, 40026dc4 <sem_timedwait+0x64>
sem->count = count - 1;
40026da0: 51000442 sub w2, w2, #0x1
40026da4: b9002002 str w2, [x0, #32]
__asm__ volatile (
40026da8: 92407c84 and x4, x4, #0xffffffff
40026dac: d51b4224 msr daif, x4
_Sem_Queue_release( sem, level, &queue_context );
return 0;
40026db0: 52800013 mov w19, #0x0 // #0
&queue_context
);
status = _Thread_Wait_get_status( executing );
return _POSIX_Zero_or_minus_one_plus_errno( status );
}
}
40026db4: 2a1303e0 mov w0, w19
40026db8: f9400bf3 ldr x19, [sp, #16]
40026dbc: a8c67bfd ldp x29, x30, [sp], #96
40026dc0: d65f03c0 ret
40026dc4: b00006e1 adrp x1, 40103000 <_POSIX_Threads_Objects+0xaa8>
40026dc8: f9465033 ldr x19, [x1, #3232]
queue_context->enqueue_callout = _Thread_queue_Add_timeout_realtime_timespec;
40026dcc: 90000026 adrp x6, 4002a000 <_Thread_queue_Priority_inherit_extract+0x70>
40026dd0: 911bc0c6 add x6, x6, #0x6f0
queue_context->thread_state = thread_state;
40026dd4: 52800047 mov w7, #0x2 // #2
_Thread_queue_Enqueue(
40026dd8: aa1303e2 mov x2, x19
40026ddc: 91002000 add x0, x0, #0x8
40026de0: 910083e3 add x3, sp, #0x20
40026de4: b00000a1 adrp x1, 4003b000 <rtems_filesystem_null_handlers+0x38>
40026de8: 9111c021 add x1, x1, #0x470
40026dec: 29041fe4 stp w4, w7, [sp, #32]
queue_context->Timeout.arg = abstime;
40026df0: a90297e6 stp x6, x5, [sp, #40]
40026df4: 94000a57 bl 40029750 <_Thread_queue_Enqueue>
*/
RTEMS_INLINE_ROUTINE Status_Control _Thread_Wait_get_status(
const Thread_Control *the_thread
)
{
return (Status_Control) the_thread->Wait.return_code;
40026df8: b9408e73 ldr w19, [x19, #140]
if ( status == STATUS_SUCCESSFUL ) {
40026dfc: 34fffdd3 cbz w19, 40026db4 <sem_timedwait+0x54> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) );
40026e00: 94002e7f bl 400327fc <__errno>
return STATUS_GET_POSIX( status );
40026e04: 7100027f cmp w19, #0x0
40026e08: 1103fe61 add w1, w19, #0xff
40026e0c: 1a93b021 csel w1, w1, w19, lt // lt = tstop
rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) );
40026e10: 12800013 mov w19, #0xffffffff // #-1
return STATUS_GET_POSIX( status );
40026e14: 13087c21 asr w1, w1, #8
rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) );
40026e18: b9000001 str w1, [x0]
40026e1c: 17ffffe6 b 40026db4 <sem_timedwait+0x54>
POSIX_SEMAPHORE_VALIDATE_OBJECT( _sem );
40026e20: 94002e77 bl 400327fc <__errno>
40026e24: 12800013 mov w19, #0xffffffff // #-1
40026e28: 528002c1 mov w1, #0x16 // #22
40026e2c: b9000001 str w1, [x0]
40026e30: 17ffffe1 b 40026db4 <sem_timedwait+0x54>
...
0000000040025680 <shm_open>:
{
40025680: a9b97bfd stp x29, x30, [sp, #-112]!
40025684: 910003fd mov x29, sp
40025688: a9025bf5 stp x21, x22, [sp, #32]
if ( ( oflag & O_ACCMODE ) != O_RDONLY && ( oflag & O_ACCMODE ) != O_RDWR ) {
4002568c: 12000435 and w21, w1, #0x3
40025690: 71000abf cmp w21, #0x2
{
40025694: a90153f3 stp x19, x20, [sp, #16]
40025698: 2a0103f4 mov w20, w1
4002569c: a90363f7 stp x23, x24, [sp, #48]
400256a0: aa0003f8 mov x24, x0
if ( ( oflag & O_ACCMODE ) != O_RDONLY && ( oflag & O_ACCMODE ) != O_RDWR ) {
400256a4: 1a9f07e0 cset w0, ne // ne = any
400256a8: 37001434 tbnz w20, #0, 4002592c <shm_open+0x2ac> <== NEVER TAKEN
if ( ( oflag & ~( O_RDONLY | O_RDWR | O_CREAT | O_EXCL | O_TRUNC ) ) != 0 ) {
400256ac: 1281c041 mov w1, #0xfffff1fd // #-3587
400256b0: 6a01029f tst w20, w1
400256b4: 540013c1 b.ne 4002592c <shm_open+0x2ac> // b.any <== NEVER TAKEN
if ( ( oflag & O_TRUNC ) != 0 && ( oflag & O_ACCMODE ) != O_RDWR ) {
400256b8: a9046bf9 stp x25, x26, [sp, #64]
400256bc: 7216029a ands w26, w20, #0x400
400256c0: 7a401804 ccmp w0, #0x0, #0x4, ne // ne = any
400256c4: 54001401 b.ne 40025944 <shm_open+0x2c4> // b.any <== NEVER TAKEN
iop = rtems_libio_allocate();
400256c8: 2a0203f9 mov w25, w2
400256cc: 97ffefc5 bl 400215e0 <rtems_libio_allocate>
400256d0: aa0003f3 mov x19, x0
if ( iop == NULL ) {
400256d4: b4001460 cbz x0, 40025960 <shm_open+0x2e0> <== NEVER TAKEN
_RTEMS_Lock_allocator();
400256d8: 9400019a bl 40025d40 <_RTEMS_Lock_allocator>
return (POSIX_Shm_Control *) _Objects_Get_by_name(
400256dc: f00006d6 adrp x22, 40100000 <_IO_Driver_address_table>
400256e0: 910182d6 add x22, x22, #0x60
400256e4: 910153e3 add x3, sp, #0x54
400256e8: aa1603e0 mov x0, x22
400256ec: 910163e2 add x2, sp, #0x58
400256f0: aa1803e1 mov x1, x24
400256f4: 940003a7 bl 40026590 <_Objects_Get_by_name>
400256f8: aa0003f7 mov x23, x0
if ( shm == NULL ) {
400256fc: b4000400 cbz x0, 4002577c <shm_open+0xfc> <== ALWAYS TAKEN
if ( ( oflag & ( O_EXCL | O_CREAT ) ) == ( O_EXCL | O_CREAT ) ) {
40025700: 52814001 mov w1, #0xa00 // #2560 <== NOT EXECUTED
40025704: 0a010294 and w20, w20, w1 <== NOT EXECUTED
40025708: 6b01029f cmp w20, w1 <== NOT EXECUTED
4002570c: 540001e1 b.ne 40025748 <shm_open+0xc8> // b.any <== NOT EXECUTED
err = EEXIST;
40025710: 52800234 mov w20, #0x11 // #17 <== NOT EXECUTED
_RTEMS_Unlock_allocator();
40025714: 9400018f bl 40025d50 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
rtems_libio_free( iop );
40025718: aa1303e0 mov x0, x19 <== NOT EXECUTED
4002571c: 97ffefc9 bl 40021640 <rtems_libio_free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( err );
40025720: 94002a73 bl 400300ec <__errno> <== NOT EXECUTED
40025724: aa0003e1 mov x1, x0 <== NOT EXECUTED
40025728: 12800000 mov w0, #0xffffffff // #-1 <== NOT EXECUTED
4002572c: a9446bf9 ldp x25, x26, [sp, #64] <== NOT EXECUTED
40025730: b9000034 str w20, [x1] <== NOT EXECUTED
}
40025734: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40025738: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
4002573c: a94363f7 ldp x23, x24, [sp, #48] <== NOT EXECUTED
40025740: a8c77bfd ldp x29, x30, [sp], #112 <== NOT EXECUTED
40025744: d65f03c0 ret <== NOT EXECUTED
return rtems_filesystem_check_access( flags, shm->mode, shm->uid, shm->gid );
40025748: 7940b002 ldrh w2, [x0, #88] <== NOT EXECUTED
flags = RTEMS_FS_PERMS_WRITE;
4002574c: 710002bf cmp w21, #0x0 <== NOT EXECUTED
return rtems_filesystem_check_access( flags, shm->mode, shm->uid, shm->gid );
40025750: 7940b403 ldrh w3, [x0, #90] <== NOT EXECUTED
flags = RTEMS_FS_PERMS_WRITE;
40025754: 52800084 mov w4, #0x4 // #4 <== NOT EXECUTED
return rtems_filesystem_check_access( flags, shm->mode, shm->uid, shm->gid );
40025758: b9405ee1 ldr w1, [x23, #92] <== NOT EXECUTED
flags = RTEMS_FS_PERMS_WRITE;
4002575c: 52800040 mov w0, #0x2 // #2 <== NOT EXECUTED
return rtems_filesystem_check_access( flags, shm->mode, shm->uid, shm->gid );
40025760: 1a800080 csel w0, w4, w0, eq // eq = none <== NOT EXECUTED
40025764: 9400104b bl 40029890 <rtems_filesystem_check_access> <== NOT EXECUTED
} else if ( !shm_access_ok( shm, oflag ) ) {
40025768: 72001c1f tst w0, #0xff <== NOT EXECUTED
4002576c: 54000bc1 b.ne 400258e4 <shm_open+0x264> // b.any <== NOT EXECUTED
err = EACCES;
40025770: 528001b4 mov w20, #0xd // #13 <== NOT EXECUTED
40025774: 94000177 bl 40025d50 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
if ( err != 0 ) {
40025778: 17ffffe8 b 40025718 <shm_open+0x98> <== NOT EXECUTED
switch ( obj_err ) {
4002577c: b94057e0 ldr w0, [sp, #84]
40025780: 34000ca0 cbz w0, 40025914 <shm_open+0x294> <== NEVER TAKEN
40025784: 7100041f cmp w0, #0x1
40025788: 54000c00 b.eq 40025908 <shm_open+0x288> // b.none <== NEVER TAKEN
if ( name_arg[0] != '/' ) {
4002578c: 39400300 ldrb w0, [x24]
40025790: 7100bc1f cmp w0, #0x2f
40025794: 54000c01 b.ne 40025914 <shm_open+0x294> // b.any <== NEVER TAKEN
if ( ( oflag & O_CREAT ) != O_CREAT ) {
40025798: 36480c54 tbz w20, #9, 40025920 <shm_open+0x2a0> <== NEVER TAKEN
name = _Workspace_String_duplicate( name_arg, name_len );
4002579c: f9402fe1 ldr x1, [sp, #88]
400257a0: aa1803e0 mov x0, x24
400257a4: 94000cd7 bl 40028b00 <_Workspace_String_duplicate>
400257a8: aa0003f8 mov x24, x0
if ( name == NULL ) {
400257ac: b4000e80 cbz x0, 4002597c <shm_open+0x2fc> <== NEVER TAKEN
return ( *information->allocate )( information );
400257b0: f9400ac1 ldr x1, [x22, #16]
400257b4: aa1603e0 mov x0, x22
400257b8: d63f0020 blr x1
400257bc: aa0003f7 mov x23, x0
if ( shm == NULL ) {
400257c0: b4000e40 cbz x0, 40025988 <shm_open+0x308> <== NEVER TAKEN
gettimeofday( &tv, 0 );
400257c4: d2800001 mov x1, #0x0 // #0
400257c8: 910183e0 add x0, sp, #0x60
400257cc: 94000ec1 bl 400292d0 <gettimeofday>
shm->shm_object.size = 0;
400257d0: a9047eff stp xzr, xzr, [x23, #64]
shm->shm_object.ops = &_POSIX_Shm_Object_operations;
400257d4: 900000c0 adrp x0, 4003d000 <bsp_section_rodata_begin+0x88>
400257d8: 913fa000 add x0, x0, #0xfe8
shm->reference_count = 1;
400257dc: 52800021 mov w1, #0x1 // #1
400257e0: b9003ae1 str w1, [x23, #56]
shm->shm_object.ops = &_POSIX_Shm_Object_operations;
400257e4: f9002ae0 str x0, [x23, #80]
shm->mode = mode & ~rtems_filesystem_umask;
400257e8: 97fff572 bl 40022db0 <rtems_current_user_env_get>
400257ec: b9401002 ldr w2, [x0, #16]
400257f0: 0a220322 bic w2, w25, w2
shm->oflag = oflag;
400257f4: 290bd2e2 stp w2, w20, [x23, #92]
shm->uid = geteuid();
400257f8: 94000eae bl 400292b0 <geteuid>
400257fc: 7900b2e0 strh w0, [x23, #88]
shm->gid = getegid();
40025800: 94000ea4 bl 40029290 <getegid>
the_object->name.name_p = name;
40025804: f9000ef8 str x24, [x23, #24]
information->local_table[ index - OBJECTS_INDEX_MINIMUM ] = the_object;
40025808: 794022e1 ldrh w1, [x23, #16]
4002580c: f94006c3 ldr x3, [x22, #8]
40025810: 51000421 sub w1, w1, #0x1
shm->atime = (time_t) tv.tv_sec;
40025814: f94033e2 ldr x2, [sp, #96]
shm->gid = getegid();
40025818: 7900b6e0 strh w0, [x23, #90]
shm->mtime = (time_t) tv.tv_sec;
4002581c: a9068ae2 stp x2, x2, [x23, #104]
shm->ctime = (time_t) tv.tv_sec;
40025820: f9003ee2 str x2, [x23, #120]
40025824: f8217877 str x23, [x3, x1, lsl #3]
_RTEMS_Unlock_allocator();
40025828: 9400014a bl 40025d50 <_RTEMS_Unlock_allocator>
if ( oflag & O_TRUNC ) {
4002582c: 3500067a cbnz w26, 400258f8 <shm_open+0x278> <== NEVER TAKEN
fd = rtems_libio_iop_to_descriptor( iop );
40025830: d00006e1 adrp x1, 40103000 <_Thread_Objects+0x488>
40025834: 9107a021 add x1, x1, #0x1e8
40025838: cb010261 sub x1, x19, x1
4002583c: b202e7e0 mov x0, #0xcccccccccccccccc // #-3689348814741910324
40025840: f29999a0 movk x0, #0xcccd
iop->pathinfo.handlers = &shm_handlers;
40025844: 900000c4 adrp x4, 4003d000 <bsp_section_rodata_begin+0x88>
40025848: 913da084 add x4, x4, #0xf68
fd = rtems_libio_iop_to_descriptor( iop );
4002584c: 9344fc21 asr x1, x1, #4
iop->pathinfo.mt_entry = &rtems_filesystem_null_mt_entry;
40025850: f00006c3 adrp x3, 40100000 <_IO_Driver_address_table>
40025854: 910a8063 add x3, x3, #0x2a0
rtems_filesystem_location_add_to_mt_entry( &iop->pathinfo );
40025858: 91004262 add x2, x19, #0x10
iop->pathinfo.node_access = shm;
4002585c: f9001277 str x23, [x19, #32]
fd = rtems_libio_iop_to_descriptor( iop );
40025860: 9b007c21 mul x1, x1, x0
iop->pathinfo.mt_entry = &rtems_filesystem_null_mt_entry;
40025864: a9030e64 stp x4, x3, [x19, #48]
fd = rtems_libio_iop_to_descriptor( iop );
40025868: 2a0103e0 mov w0, w1
iop->data0 = fd;
4002586c: b9004261 str w1, [x19, #64]
iop->data1 = shm;
40025870: f9002677 str x23, [x19, #72]
__asm__ volatile (
40025874: d53b4223 mrs x3, daif
40025878: d50342df msr daifset, #0x2
&loc->mt_entry->location_chain,
4002587c: f9401441 ldr x1, [x2, #40]
old_last = tail->previous;
40025880: 9100c021 add x1, x1, #0x30
40025884: f9400424 ldr x4, [x1, #8]
the_node->next = tail;
40025888: f9000a61 str x1, [x19, #16]
tail->previous = the_node;
4002588c: f9000422 str x2, [x1, #8]
old_last->next = the_node;
40025890: f9000082 str x2, [x4]
the_node->previous = old_last;
40025894: f9000444 str x4, [x2, #8]
__asm__ volatile (
40025898: 92407c61 and x1, x3, #0xffffffff
4002589c: d51b4221 msr daif, x1
flags |= LIBIO_FLAGS_READ_WRITE;
400258a0: 710002bf cmp w21, #0x0
400258a4: 52812042 mov w2, #0x902 // #2306
400258a8: 528120c3 mov w3, #0x906 // #2310
400258ac: 1a830043 csel w3, w2, w3, eq // eq = none
__asm__ volatile (
400258b0: d53b4221 mrs x1, daif
400258b4: d50342df msr daifset, #0x2
*obj = val | arg;
400258b8: b9400262 ldr w2, [x19]
400258bc: 2a030042 orr w2, w2, w3
400258c0: b9000262 str w2, [x19]
__asm__ volatile (
400258c4: 92407c21 and x1, x1, #0xffffffff
400258c8: d51b4221 msr daif, x1
}
400258cc: a94153f3 ldp x19, x20, [sp, #16]
400258d0: a9425bf5 ldp x21, x22, [sp, #32]
400258d4: a94363f7 ldp x23, x24, [sp, #48]
400258d8: a9446bf9 ldp x25, x26, [sp, #64]
400258dc: a8c77bfd ldp x29, x30, [sp], #112
400258e0: d65f03c0 ret
++shm->reference_count;
400258e4: b9403ae0 ldr w0, [x23, #56] <== NOT EXECUTED
400258e8: 11000400 add w0, w0, #0x1 <== NOT EXECUTED
400258ec: b9003ae0 str w0, [x23, #56] <== NOT EXECUTED
400258f0: 94000118 bl 40025d50 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
if ( oflag & O_TRUNC ) {
400258f4: 34fff9fa cbz w26, 40025830 <shm_open+0x1b0> <== NOT EXECUTED
err = shm_ftruncate( iop, 0 );
400258f8: aa1303e0 mov x0, x19 <== NOT EXECUTED
400258fc: d2800001 mov x1, #0x0 // #0 <== NOT EXECUTED
40025900: 97fffef8 bl 400254e0 <shm_ftruncate> <== NOT EXECUTED
40025904: 17ffffcb b 40025830 <shm_open+0x1b0> <== NOT EXECUTED
err = ENAMETOOLONG;
40025908: 52800b74 mov w20, #0x5b // #91 <== NOT EXECUTED
4002590c: 94000111 bl 40025d50 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
if ( err != 0 ) {
40025910: 17ffff82 b 40025718 <shm_open+0x98> <== NOT EXECUTED
*error = EINVAL;
40025914: 528002d4 mov w20, #0x16 // #22 <== NOT EXECUTED
40025918: 9400010e bl 40025d50 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
if ( err != 0 ) {
4002591c: 17ffff7f b 40025718 <shm_open+0x98> <== NOT EXECUTED
*error = ENOENT;
40025920: 52800054 mov w20, #0x2 // #2 <== NOT EXECUTED
40025924: 9400010b bl 40025d50 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
if ( err != 0 ) {
40025928: 17ffff7c b 40025718 <shm_open+0x98> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EACCES );
4002592c: 940029f0 bl 400300ec <__errno> <== NOT EXECUTED
40025930: aa0003e1 mov x1, x0 <== NOT EXECUTED
40025934: 528001a2 mov w2, #0xd // #13 <== NOT EXECUTED
return -1;
40025938: 12800000 mov w0, #0xffffffff // #-1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EACCES );
4002593c: b9000022 str w2, [x1] <== NOT EXECUTED
40025940: 17ffff7d b 40025734 <shm_open+0xb4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EACCES );
40025944: 940029ea bl 400300ec <__errno> <== NOT EXECUTED
40025948: aa0003e1 mov x1, x0 <== NOT EXECUTED
4002594c: 528001a2 mov w2, #0xd // #13 <== NOT EXECUTED
return -1;
40025950: 12800000 mov w0, #0xffffffff // #-1 <== NOT EXECUTED
40025954: a9446bf9 ldp x25, x26, [sp, #64] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EACCES );
40025958: b9000022 str w2, [x1] <== NOT EXECUTED
4002595c: 17ffff76 b 40025734 <shm_open+0xb4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EMFILE );
40025960: 940029e3 bl 400300ec <__errno> <== NOT EXECUTED
40025964: aa0003e1 mov x1, x0 <== NOT EXECUTED
40025968: 52800302 mov w2, #0x18 // #24 <== NOT EXECUTED
4002596c: 12800000 mov w0, #0xffffffff // #-1 <== NOT EXECUTED
40025970: a9446bf9 ldp x25, x26, [sp, #64] <== NOT EXECUTED
40025974: b9000022 str w2, [x1] <== NOT EXECUTED
40025978: 17ffff6f b 40025734 <shm_open+0xb4> <== NOT EXECUTED
*error = ENOSPC;
4002597c: 52800394 mov w20, #0x1c // #28 <== NOT EXECUTED
40025980: 940000f4 bl 40025d50 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
if ( err != 0 ) {
40025984: 17ffff65 b 40025718 <shm_open+0x98> <== NOT EXECUTED
_Workspace_Free( name );
40025988: aa1803e0 mov x0, x24 <== NOT EXECUTED
*error = ENFILE;
4002598c: 528002f4 mov w20, #0x17 // #23 <== NOT EXECUTED
_Workspace_Free( name );
40025990: 94000c58 bl 40028af0 <_Workspace_Free> <== NOT EXECUTED
40025994: 940000ef bl 40025d50 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
if ( err != 0 ) {
40025998: 17ffff60 b 40025718 <shm_open+0x98> <== NOT EXECUTED
4002599c: 00000000 udf #0
0000000040027bc0 <shm_unlink>:
#include <rtems/seterr.h>
#include <rtems/posix/shmimpl.h>
int shm_unlink( const char *name )
{
40027bc0: a9bc7bfd stp x29, x30, [sp, #-64]!
40027bc4: 910003fd mov x29, sp
40027bc8: a90153f3 stp x19, x20, [sp, #16]
40027bcc: aa0003f3 mov x19, x0
40027bd0: b00006d4 adrp x20, 40100000 <_Barrier_Information>
40027bd4: 9109a294 add x20, x20, #0x268
40027bd8: f90013f5 str x21, [sp, #32]
_RTEMS_Lock_allocator();
40027bdc: 94000929 bl 4002a080 <_RTEMS_Lock_allocator>
40027be0: aa1303e1 mov x1, x19
40027be4: aa1403e0 mov x0, x20
40027be8: 9100f3e3 add x3, sp, #0x3c
40027bec: d2800002 mov x2, #0x0 // #0
40027bf0: 94000ff8 bl 4002bbd0 <_Objects_Get_by_name>
POSIX_Shm_Control *shm;
_Objects_Allocator_lock();
shm = _POSIX_Shm_Get_by_name( name, 0, &obj_err );
if ( shm ) {
40027bf4: b4000300 cbz x0, 40027c54 <shm_unlink+0x94> <== NEVER TAKEN
_Objects_Namespace_remove_string(
40027bf8: aa0003f3 mov x19, x0
40027bfc: aa0003e1 mov x1, x0
40027c00: aa1403e0 mov x0, x20
40027c04: 94000fef bl 4002bbc0 <_Objects_Namespace_remove_string>
&_POSIX_Shm_Information,
&shm->Object
);
if ( shm->reference_count == 0 ) {
40027c08: b9403a75 ldr w21, [x19, #56]
40027c0c: 35000175 cbnz w21, 40027c38 <shm_unlink+0x78> <== NEVER TAKEN
( *information->deallocate )( information, the_object );
40027c10: f9400e82 ldr x2, [x20, #24]
40027c14: aa1303e1 mov x1, x19
40027c18: aa1403e0 mov x0, x20
40027c1c: d63f0040 blr x2
_RTEMS_Unlock_allocator();
40027c20: 9400091c bl 4002a090 <_RTEMS_Unlock_allocator>
_Objects_Allocator_unlock();
if ( err != 0 )
rtems_set_errno_and_return_minus_one( err );
return 0;
}
40027c24: 2a1503e0 mov w0, w21
40027c28: a94153f3 ldp x19, x20, [sp, #16]
40027c2c: f94013f5 ldr x21, [sp, #32]
40027c30: a8c47bfd ldp x29, x30, [sp], #64
40027c34: d65f03c0 ret
40027c38: 94000916 bl 4002a090 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
return 0;
40027c3c: 52800015 mov w21, #0x0 // #0 <== NOT EXECUTED
}
40027c40: 2a1503e0 mov w0, w21 <== NOT EXECUTED
40027c44: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40027c48: f94013f5 ldr x21, [sp, #32] <== NOT EXECUTED
40027c4c: a8c47bfd ldp x29, x30, [sp], #64 <== NOT EXECUTED
40027c50: d65f03c0 ret <== NOT EXECUTED
switch ( obj_err ) {
40027c54: b9403fe0 ldr w0, [sp, #60] <== NOT EXECUTED
40027c58: 7100041f cmp w0, #0x1 <== NOT EXECUTED
40027c5c: 540000e0 b.eq 40027c78 <shm_unlink+0xb8> // b.none <== NOT EXECUTED
err = ENOENT;
40027c60: 52800053 mov w19, #0x2 // #2 <== NOT EXECUTED
40027c64: 9400090b bl 4002a090 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( err );
40027c68: 940034cd bl 40034f9c <__errno> <== NOT EXECUTED
40027c6c: 12800015 mov w21, #0xffffffff // #-1 <== NOT EXECUTED
40027c70: b9000013 str w19, [x0] <== NOT EXECUTED
40027c74: 17ffffec b 40027c24 <shm_unlink+0x64> <== NOT EXECUTED
err = ENAMETOOLONG;
40027c78: 52800b73 mov w19, #0x5b // #91 <== NOT EXECUTED
40027c7c: 94000905 bl 4002a090 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
if ( err != 0 )
40027c80: 17fffffa b 40027c68 <shm_unlink+0xa8> <== NOT EXECUTED
...
000000004002f0a0 <sigaction>:
int sigaction(
int sig,
const struct sigaction *__restrict act,
struct sigaction *__restrict oact
)
{
4002f0a0: a9bd7bfd stp x29, x30, [sp, #-48]!
4002f0a4: 910003fd mov x29, sp
4002f0a8: a90153f3 stp x19, x20, [sp, #16]
4002f0ac: 93407c13 sxtw x19, w0
Thread_queue_Context queue_context;
if ( !sig )
4002f0b0: 34000773 cbz w19, 4002f19c <sigaction+0xfc>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
4002f0b4: 51000660 sub w0, w19, #0x1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
4002f0b8: 71007c1f cmp w0, #0x1f
4002f0bc: 54000708 b.hi 4002f19c <sigaction+0xfc> // b.pmore
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
4002f0c0: 7100267f cmp w19, #0x9
4002f0c4: 540006c0 b.eq 4002f19c <sigaction+0xfc> // b.none
__asm__ volatile (
4002f0c8: aa0103f4 mov x20, x1
4002f0cc: f90013f5 str x21, [sp, #32]
4002f0d0: d53b4235 mrs x21, daif
4002f0d4: d50342df msr daifset, #0x2
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_queue_Context_initialize( &queue_context );
_POSIX_signals_Acquire( &queue_context );
if ( oact )
4002f0d8: b40001a2 cbz x2, 4002f10c <sigaction+0x6c>
*oact = _POSIX_signals_Vectors[ sig ];
4002f0dc: 93407e60 sxtw x0, w19
4002f0e0: d2800303 mov x3, #0x18 // #24
4002f0e4: 900006a1 adrp x1, 40103000 <_Thread_Objects+0x548>
4002f0e8: 913a8021 add x1, x1, #0xea0
4002f0ec: 9b037c00 mul x0, x0, x3
4002f0f0: 8b000023 add x3, x1, x0
4002f0f4: f8606820 ldr x0, [x1, x0]
4002f0f8: f9000040 str x0, [x2]
4002f0fc: f9400460 ldr x0, [x3, #8]
4002f100: f9000440 str x0, [x2, #8]
4002f104: f9400860 ldr x0, [x3, #16]
4002f108: f9000840 str x0, [x2, #16]
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
4002f10c: b40001d4 cbz x20, 4002f144 <sigaction+0xa4> <== NEVER TAKEN
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
if ( act->sa_handler == SIG_DFL ) {
4002f110: f9400a80 ldr x0, [x20, #16]
4002f114: b4000260 cbz x0, 4002f160 <sigaction+0xc0>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
4002f118: 2a1303e0 mov w0, w19
4002f11c: 94000365 bl 4002feb0 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
4002f120: d2800301 mov x1, #0x18 // #24
4002f124: 900006a0 adrp x0, 40103000 <_Thread_Objects+0x548>
4002f128: 913a8000 add x0, x0, #0xea0
4002f12c: 9b017e73 mul x19, x19, x1
4002f130: a9400e84 ldp x4, x3, [x20]
4002f134: 8b130001 add x1, x0, x19
4002f138: f9400a82 ldr x2, [x20, #16]
4002f13c: f8336804 str x4, [x0, x19]
4002f140: a9008823 stp x3, x2, [x1, #8]
__asm__ volatile (
4002f144: 92407eb5 and x21, x21, #0xffffffff
4002f148: d51b4235 msr daif, x21
}
}
_POSIX_signals_Release( &queue_context );
return 0;
4002f14c: f94013f5 ldr x21, [sp, #32]
4002f150: 52800000 mov w0, #0x0 // #0
}
4002f154: a94153f3 ldp x19, x20, [sp, #16]
4002f158: a8c37bfd ldp x29, x30, [sp], #48
4002f15c: d65f03c0 ret
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
4002f160: d2800302 mov x2, #0x18 // #24
4002f164: 90000061 adrp x1, 4003b000 <rtems_filesystem_null_handlers+0x68>
4002f168: 9129e021 add x1, x1, #0xa78
4002f16c: 900006a0 adrp x0, 40103000 <_Thread_Objects+0x548>
4002f170: 913a8000 add x0, x0, #0xea0
4002f174: 9b027e73 mul x19, x19, x2
4002f178: 8b130023 add x3, x1, x19
4002f17c: 8b130002 add x2, x0, x19
4002f180: f8736821 ldr x1, [x1, x19]
4002f184: f8336801 str x1, [x0, x19]
4002f188: f9400460 ldr x0, [x3, #8]
4002f18c: f9000440 str x0, [x2, #8]
4002f190: f9400860 ldr x0, [x3, #16]
4002f194: f9000840 str x0, [x2, #16]
4002f198: 17ffffeb b 4002f144 <sigaction+0xa4>
rtems_set_errno_and_return_minus_one( EINVAL );
4002f19c: 94000bbc bl 4003208c <__errno>
4002f1a0: aa0003e1 mov x1, x0
4002f1a4: 528002c2 mov w2, #0x16 // #22
4002f1a8: 12800000 mov w0, #0xffffffff // #-1
4002f1ac: b9000022 str w2, [x1]
4002f1b0: 17ffffe9 b 4002f154 <sigaction+0xb4>
...
0000000040029390 <sigtimedwait>:
int sigtimedwait(
const sigset_t *__restrict set,
siginfo_t *__restrict info,
const struct timespec *__restrict timeout
)
{
40029390: a9b77bfd stp x29, x30, [sp, #-144]!
40029394: 910003fd mov x29, sp
40029398: a90153f3 stp x19, x20, [sp, #16]
int error;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
4002939c: b4001620 cbz x0, 40029660 <sigtimedwait+0x2d0>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
if ( timeout != NULL ) {
400293a0: a9025bf5 stp x21, x22, [sp, #32]
400293a4: aa0103f4 mov x20, x1
400293a8: aa0003f5 mov x21, x0
400293ac: aa0203f3 mov x19, x2
400293b0: b4000aa2 cbz x2, 40029504 <sigtimedwait+0x174>
const struct timespec *end;
_Timecounter_Nanouptime( &uptime );
400293b4: 910103e0 add x0, sp, #0x40
400293b8: 97ffefce bl 400252f0 <_Timecounter_Nanouptime>
&& (unsigned long) ts->tv_nsec < WATCHDOG_NANOSECONDS_PER_SECOND;
400293bc: f9400660 ldr x0, [x19, #8]
400293c0: d2993fe2 mov x2, #0xc9ff // #51711
400293c4: f2a77342 movk x2, #0x3b9a, lsl #16
400293c8: eb02001f cmp x0, x2
400293cc: 540007c9 b.ls 400294c4 <sigtimedwait+0x134> // b.plast
return NULL;
400293d0: d2800000 mov x0, #0x0 // #0
queue_context->enqueue_callout =
400293d4: d0ffffe1 adrp x1, 40027000 <_Thread_queue_FIFO_extract+0x10>
400293d8: 911d8021 add x1, x1, #0x760
queue_context->Timeout.arg = abstime;
400293dc: a90583e1 stp x1, x0, [sp, #88]
400293e0: f00006c0 adrp x0, 40104000 <_Per_CPU_Information>
400293e4: f9401013 ldr x19, [x0, #32]
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
400293e8: f100029f cmp x20, #0x0
400293ec: 9100c3e0 add x0, sp, #0x30
400293f0: 9a940014 csel x20, x0, x20, eq // eq = none
executing = _Thread_Get_executing();
api = executing->API_Extensions[ THREAD_API_POSIX ];
400293f4: f9412276 ldr x22, [x19, #576]
__asm__ volatile (
400293f8: d53b4220 mrs x0, daif
400293fc: d50342df msr daifset, #0x2
_ISR_lock_ISR_disable( &queue_context->Lock_context.Lock_context );
40029400: b90053e0 str w0, [sp, #80]
*/
/* API signals pending? */
_POSIX_signals_Acquire( &queue_context );
if ( *set & api->signals_pending ) {
40029404: f94002a0 ldr x0, [x21]
40029408: f9404ac2 ldr x2, [x22, #144]
4002940c: ea02001f tst x0, x2
40029410: 54000ca1 b.ne 400295a4 <sigtimedwait+0x214> // b.any
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
40029414: f00006c1 adrp x1, 40104000 <_Per_CPU_Information>
40029418: f9405421 ldr x1, [x1, #168]
4002941c: ea01001f tst x0, x1
40029420: 540007a1 b.ne 40029514 <sigtimedwait+0x184> // b.any
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
40029424: 12800001 mov w1, #0xffffffff // #-1
40029428: b9000281 str w1, [x20]
queue_context->thread_state = thread_state;
4002942c: 52808004 mov w4, #0x400 // #1024
40029430: 72a20004 movk w4, #0x1000, lsl #16
executing->Wait.option = *set;
executing->Wait.return_argument = the_info;
40029434: f9003e74 str x20, [x19, #120]
_Thread_queue_Context_set_thread_state(
&queue_context,
STATES_WAITING_FOR_SIGNAL | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_queue_Enqueue(
40029438: 910143e3 add x3, sp, #0x50
executing->Wait.option = *set;
4002943c: b9008a60 str w0, [x19, #136]
_Thread_queue_Enqueue(
40029440: aa1303e2 mov x2, x19
40029444: f00000a1 adrp x1, 40040000 <__libc_fini_array+0x70>
40029448: 9131c021 add x1, x1, #0xc70
4002944c: f00006a0 adrp x0, 40100000 <_POSIX_Threads_Information>
40029450: 91120000 add x0, x0, #0x480
40029454: b90057e4 str w4, [sp, #84]
40029458: 97fff58a bl 40026a80 <_Thread_queue_Enqueue>
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals(
4002945c: b9400281 ldr w1, [x20]
40029460: aa1603e0 mov x0, x22
40029464: aa1403e2 mov x2, x20
40029468: 52800025 mov w5, #0x1 // #1
4002946c: 52800004 mov w4, #0x0 // #0
40029470: 52800003 mov w3, #0x0 // #0
40029474: 940009e7 bl 4002bc10 <_POSIX_signals_Clear_signals>
return _POSIX_Get_by_name_error_table[ error ];
}
RTEMS_INLINE_ROUTINE int _POSIX_Get_error( Status_Control status )
{
return STATUS_GET_POSIX( status );
40029478: b9408e60 ldr w0, [x19, #140]
4002947c: 7100001f cmp w0, #0x0
40029480: 1103fc16 add w22, w0, #0xff
40029484: 1a80b2d6 csel w22, w22, w0, lt // lt = tstop
40029488: 13087ed6 asr w22, w22, #8
* was not in our set.
*/
error = _POSIX_Get_error_after_wait( executing );
if (
4002948c: 710012df cmp w22, #0x4
40029490: 54000d81 b.ne 40029640 <sigtimedwait+0x2b0> // b.any
error != EINTR
|| ( *set & signo_to_mask( the_info->si_signo ) ) == 0
40029494: b9400293 ldr w19, [x20]
return 1u << (sig - 1);
40029498: 52800020 mov w0, #0x1 // #1
4002949c: f94002a1 ldr x1, [x21]
400294a0: 51000662 sub w2, w19, #0x1
400294a4: 1ac22000 lsl w0, w0, w2
400294a8: ea01001f tst x0, x1
400294ac: 54000d00 b.eq 4002964c <sigtimedwait+0x2bc> // b.none
400294b0: a9425bf5 ldp x21, x22, [sp, #32]
rtems_set_errno_and_return_minus_one( error );
}
return the_info->si_signo;
}
400294b4: 2a1303e0 mov w0, w19
400294b8: a94153f3 ldp x19, x20, [sp, #16]
400294bc: a8c97bfd ldp x29, x30, [sp], #144
400294c0: d65f03c0 ret
return _Watchdog_Is_valid_timespec( ts ) && ts->tv_sec >= 0;
400294c4: f9400261 ldr x1, [x19]
400294c8: b7fff841 tbnz x1, #63, 400293d0 <sigtimedwait+0x40> <== NEVER TAKEN
now->tv_nsec += delta->tv_nsec;
400294cc: a94413e3 ldp x3, x4, [sp, #64]
400294d0: 8b040000 add x0, x0, x4
sec += (uint64_t) delta->tv_sec;
400294d4: 8b030021 add x1, x1, x3
if ( now->tv_nsec >= WATCHDOG_NANOSECONDS_PER_SECOND ) {
400294d8: eb02001f cmp x0, x2
400294dc: 540000ad b.le 400294f0 <sigtimedwait+0x160> <== ALWAYS TAKEN
now->tv_nsec -= WATCHDOG_NANOSECONDS_PER_SECOND;
400294e0: 92993fe2 mov x2, #0xffffffffffff3600 // #-51712 <== NOT EXECUTED
400294e4: f2b88ca2 movk x2, #0xc465, lsl #16 <== NOT EXECUTED
++sec;
400294e8: 91000421 add x1, x1, #0x1 <== NOT EXECUTED
now->tv_nsec -= WATCHDOG_NANOSECONDS_PER_SECOND;
400294ec: 8b020000 add x0, x0, x2 <== NOT EXECUTED
400294f0: f90027e0 str x0, [sp, #72]
return now;
400294f4: 910103e0 add x0, sp, #0x40
if ( sec <= INT64_MAX ) {
400294f8: b7f809e1 tbnz x1, #63, 40029634 <sigtimedwait+0x2a4> <== NEVER TAKEN
now->tv_sec = INT64_MAX;
400294fc: f90023e1 str x1, [sp, #64]
40029500: 17ffffb5 b 400293d4 <sigtimedwait+0x44>
queue_context->enqueue_callout = _Thread_queue_Enqueue_do_nothing_extra;
40029504: b0ffffe0 adrp x0, 40026000 <_Scheduler_Set_affinity+0x30>
40029508: 91298000 add x0, x0, #0xa60
4002950c: f9002fe0 str x0, [sp, #88]
}
40029510: 17ffffb4 b 400293e0 <sigtimedwait+0x50>
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
40029514: 52800373 mov w19, #0x1b // #27
40029518: 52800022 mov w2, #0x1 // #1
4002951c: 51000660 sub w0, w19, #0x1
40029520: 1ac02040 lsl w0, w2, w0
if ( set & signo_to_mask( signo ) ) {
40029524: ea01001f tst x0, x1
40029528: 540001c1 b.ne 40029560 <sigtimedwait+0x1d0> // b.any <== NEVER TAKEN
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4002952c: 11000673 add w19, w19, #0x1
40029530: 7100827f cmp w19, #0x20
40029534: 54ffff41 b.ne 4002951c <sigtimedwait+0x18c> // b.any
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
40029538: 52800033 mov w19, #0x1 // #1
4002953c: 2a1303e2 mov w2, w19
40029540: 14000004 b 40029550 <sigtimedwait+0x1c0>
40029544: 11000673 add w19, w19, #0x1
40029548: 71006e7f cmp w19, #0x1b
4002954c: 540000a0 b.eq 40029560 <sigtimedwait+0x1d0> // b.none <== NEVER TAKEN
40029550: 51000660 sub w0, w19, #0x1
40029554: 1ac02040 lsl w0, w2, w0
if ( set & signo_to_mask( signo ) ) {
40029558: ea01001f tst x0, x1
4002955c: 54ffff40 b.eq 40029544 <sigtimedwait+0x1b4> // b.none
_POSIX_signals_Clear_signals( api, signo, the_info, true, false, false );
40029560: aa1603e0 mov x0, x22
40029564: aa1403e2 mov x2, x20
40029568: 2a1303e1 mov w1, w19
4002956c: 52800005 mov w5, #0x0 // #0
40029570: 52800004 mov w4, #0x0 // #0
40029574: 52800023 mov w3, #0x1 // #1
40029578: 940009a6 bl 4002bc10 <_POSIX_signals_Clear_signals>
Thread_queue_Context *queue_context
)
{
(void) the_thread_queue;
_Assert( _Thread_queue_Is_lock_owner( the_thread_queue ) );
_ISR_lock_ISR_enable( &queue_context->Lock_context.Lock_context );
4002957c: b94053e0 ldr w0, [sp, #80]
__asm__ volatile (
40029580: d51b4220 msr daif, x0
the_info->si_code = SI_USER;
40029584: 52800020 mov w0, #0x1 // #1
return signo;
40029588: a9425bf5 ldp x21, x22, [sp, #32]
the_info->si_code = SI_USER;
4002958c: 29000293 stp w19, w0, [x20]
the_info->si_value.sival_int = 0;
40029590: b9000a9f str wzr, [x20, #8]
}
40029594: 2a1303e0 mov w0, w19
40029598: a94153f3 ldp x19, x20, [sp, #16]
4002959c: a8c97bfd ldp x29, x30, [sp], #144
400295a0: d65f03c0 ret
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
400295a4: 52800361 mov w1, #0x1b // #27
400295a8: 52800023 mov w3, #0x1 // #1
400295ac: 51000420 sub w0, w1, #0x1
400295b0: 1ac02060 lsl w0, w3, w0
if ( set & signo_to_mask( signo ) ) {
400295b4: ea02001f tst x0, x2
400295b8: 540001c1 b.ne 400295f0 <sigtimedwait+0x260> // b.any <== NEVER TAKEN
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
400295bc: 11000421 add w1, w1, #0x1
400295c0: 7100803f cmp w1, #0x20
400295c4: 54ffff41 b.ne 400295ac <sigtimedwait+0x21c> // b.any
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
400295c8: 52800021 mov w1, #0x1 // #1
400295cc: 2a0103e3 mov w3, w1
400295d0: 14000004 b 400295e0 <sigtimedwait+0x250>
400295d4: 11000421 add w1, w1, #0x1
400295d8: 71006c3f cmp w1, #0x1b
400295dc: 540000a0 b.eq 400295f0 <sigtimedwait+0x260> // b.none <== NEVER TAKEN
400295e0: 51000420 sub w0, w1, #0x1
400295e4: 1ac02060 lsl w0, w3, w0
if ( set & signo_to_mask( signo ) ) {
400295e8: ea02001f tst x0, x2
400295ec: 54ffff40 b.eq 400295d4 <sigtimedwait+0x244> // b.none
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
400295f0: b9000281 str w1, [x20]
_POSIX_signals_Clear_signals(
400295f4: aa1603e0 mov x0, x22
400295f8: aa1403e2 mov x2, x20
400295fc: 52800005 mov w5, #0x0 // #0
40029600: 52800004 mov w4, #0x0 // #0
40029604: 52800003 mov w3, #0x0 // #0
40029608: 94000982 bl 4002bc10 <_POSIX_signals_Clear_signals>
4002960c: b94053e0 ldr w0, [sp, #80]
40029610: d51b4220 msr daif, x0
the_info->si_code = SI_USER;
40029614: 52800020 mov w0, #0x1 // #1
return the_info->si_signo;
40029618: b9400293 ldr w19, [x20]
4002961c: a9425bf5 ldp x21, x22, [sp, #32]
the_info->si_value.sival_int = 0;
40029620: 2900fe80 stp w0, wzr, [x20, #4]
}
40029624: 2a1303e0 mov w0, w19
40029628: a94153f3 ldp x19, x20, [sp, #16]
4002962c: a8c97bfd ldp x29, x30, [sp], #144
40029630: d65f03c0 ret
40029634: 92f00001 mov x1, #0x7fffffffffffffff // #9223372036854775807 <== NOT EXECUTED
40029638: f90023e1 str x1, [sp, #64] <== NOT EXECUTED
4002963c: 17ffff66 b 400293d4 <sigtimedwait+0x44> <== NOT EXECUTED
error = EAGAIN;
40029640: 7101d2df cmp w22, #0x74
40029644: 52800160 mov w0, #0xb // #11
40029648: 1a8012d6 csel w22, w22, w0, ne // ne = any
rtems_set_errno_and_return_minus_one( error );
4002964c: 94001ab4 bl 4003011c <__errno>
40029650: 12800013 mov w19, #0xffffffff // #-1
40029654: b9000016 str w22, [x0]
40029658: a9425bf5 ldp x21, x22, [sp, #32]
4002965c: 17ffff96 b 400294b4 <sigtimedwait+0x124>
rtems_set_errno_and_return_minus_one( EINVAL );
40029660: 94001aaf bl 4003011c <__errno>
40029664: 12800013 mov w19, #0xffffffff // #-1
40029668: 528002c1 mov w1, #0x16 // #22
4002966c: b9000001 str w1, [x0]
40029670: 17ffff91 b 400294b4 <sigtimedwait+0x124>
...
000000004002ab70 <sigwait>:
int sigwait(
const sigset_t *__restrict set,
int *__restrict sig
)
{
4002ab70: a9be7bfd stp x29, x30, [sp, #-32]!
int status;
status = sigtimedwait( set, NULL, NULL );
4002ab74: d2800002 mov x2, #0x0 // #0
{
4002ab78: 910003fd mov x29, sp
4002ab7c: f9000bf3 str x19, [sp, #16]
4002ab80: aa0103f3 mov x19, x1
status = sigtimedwait( set, NULL, NULL );
4002ab84: d2800001 mov x1, #0x0 // #0
4002ab88: 97ffff3e bl 4002a880 <sigtimedwait>
if ( status != -1 ) {
4002ab8c: 3100041f cmn w0, #0x1
4002ab90: 54000100 b.eq 4002abb0 <sigwait+0x40> // b.none
if ( sig )
4002ab94: 2a0003e2 mov w2, w0
*sig = status;
return 0;
4002ab98: 52800000 mov w0, #0x0 // #0
if ( sig )
4002ab9c: b4000053 cbz x19, 4002aba4 <sigwait+0x34> <== NEVER TAKEN
*sig = status;
4002aba0: b9000262 str w2, [x19]
}
return errno;
}
4002aba4: f9400bf3 ldr x19, [sp, #16]
4002aba8: a8c27bfd ldp x29, x30, [sp], #32
4002abac: d65f03c0 ret
return errno;
4002abb0: 94001b4f bl 400318ec <__errno>
4002abb4: b9400000 ldr w0, [x0]
}
4002abb8: f9400bf3 ldr x19, [sp, #16]
4002abbc: a8c27bfd ldp x29, x30, [sp], #32
4002abc0: d65f03c0 ret
...
0000000040023da0 <sysconf>:
*/
long sysconf(
int name
)
{
40023da0: 2a0003e1 mov w1, w0
switch ( name ) {
40023da4: 7100281f cmp w0, #0xa
40023da8: 5400014c b.gt 40023dd0 <sysconf+0x30>
40023dac: 7100201f cmp w0, #0x8
case _SC_PAGESIZE:
return PAGE_SIZE;
case _SC_SYMLOOP_MAX:
return RTEMS_FILESYSTEM_SYMLOOP_MAX;
case _SC_NPROCESSORS_CONF:
return (long) rtems_configuration_get_maximum_processors();
40023db0: d2800020 mov x0, #0x1 // #1
switch ( name ) {
40023db4: 540000cc b.gt 40023dcc <sysconf+0x2c>
40023db8: 7100103f cmp w1, #0x4
40023dbc: 540003c0 b.eq 40023e34 <sysconf+0x94> // b.none
40023dc0: 7100203f cmp w1, #0x8
40023dc4: d2820000 mov x0, #0x1000 // #4096
40023dc8: 54000141 b.ne 40023df0 <sysconf+0x50> // b.any
return 0;
#endif
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
}
40023dcc: d65f03c0 ret
switch ( name ) {
40023dd0: 71013c1f cmp w0, #0x4f
return RTEMS_FILESYSTEM_SYMLOOP_MAX;
40023dd4: d2800400 mov x0, #0x20 // #32
switch ( name ) {
40023dd8: 54ffffa0 b.eq 40023dcc <sysconf+0x2c> // b.none <== NEVER TAKEN
40023ddc: 7102303f cmp w1, #0x8c
40023de0: 54000121 b.ne 40023e04 <sysconf+0x64> // b.any <== ALWAYS TAKEN
return (long) _POSIX_26_VERSION;
40023de4: d281cf00 mov x0, #0xe78 // #3704 <== NOT EXECUTED
40023de8: f2a00060 movk x0, #0x3, lsl #16 <== NOT EXECUTED
40023dec: d65f03c0 ret <== NOT EXECUTED
switch ( name ) {
40023df0: 7100083f cmp w1, #0x2
40023df4: 540000e1 b.ne 40023e10 <sysconf+0x70> // b.any
return (long) rtems_clock_get_ticks_per_second();
40023df8: f0000080 adrp x0, 40036000 <__ascii_wctomb+0x58>
40023dfc: b94d5000 ldr w0, [x0, #3408]
40023e00: d65f03c0 ret
switch ( name ) {
40023e04: 7100cc3f cmp w1, #0x33
return 1024;
40023e08: d2808000 mov x0, #0x400 // #1024
switch ( name ) {
40023e0c: 54fffe00 b.eq 40023dcc <sysconf+0x2c> // b.none
{
40023e10: a9bf7bfd stp x29, x30, [sp, #-16]!
40023e14: 910003fd mov x29, sp
rtems_set_errno_and_return_minus_one( EINVAL );
40023e18: 94002ab5 bl 4002e8ec <__errno>
40023e1c: aa0003e1 mov x1, x0
40023e20: 528002c2 mov w2, #0x16 // #22
40023e24: 92800000 mov x0, #0xffffffffffffffff // #-1
40023e28: b9000022 str w2, [x1]
}
40023e2c: a8c17bfd ldp x29, x30, [sp], #16
40023e30: d65f03c0 ret
return rtems_libio_number_iops;
40023e34: f0000080 adrp x0, 40036000 <__ascii_wctomb+0x58>
40023e38: b94db000 ldr w0, [x0, #3504]
40023e3c: d65f03c0 ret
000000004002b690 <timer_create>:
{
4002b690: a9bd7bfd stp x29, x30, [sp, #-48]!
if ( clock_id != CLOCK_REALTIME )
4002b694: 7100041f cmp w0, #0x1
{
4002b698: 910003fd mov x29, sp
if ( clock_id != CLOCK_REALTIME )
4002b69c: 54000a21 b.ne 4002b7e0 <timer_create+0x150> // b.any
if ( !timerid )
4002b6a0: a90153f3 stp x19, x20, [sp, #16]
4002b6a4: aa0203f4 mov x20, x2
4002b6a8: b4000a82 cbz x2, 4002b7f8 <timer_create+0x168>
if (evp != NULL) {
4002b6ac: f90013f5 str x21, [sp, #32]
4002b6b0: aa0103f3 mov x19, x1
4002b6b4: b40005a1 cbz x1, 4002b768 <timer_create+0xd8>
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
4002b6b8: b9400020 ldr w0, [x1]
4002b6bc: 51000400 sub w0, w0, #0x1
4002b6c0: 7100041f cmp w0, #0x1
4002b6c4: 540007e8 b.hi 4002b7c0 <timer_create+0x130> // b.pmore <== NEVER TAKEN
if ( !evp->sigev_signo )
4002b6c8: b9400420 ldr w0, [x1, #4]
4002b6cc: 340007a0 cbz w0, 4002b7c0 <timer_create+0x130> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
4002b6d0: 51000400 sub w0, w0, #0x1
if ( !is_valid_signo(evp->sigev_signo) )
4002b6d4: 71007c1f cmp w0, #0x1f
4002b6d8: 54000748 b.hi 4002b7c0 <timer_create+0x130> // b.pmore <== NEVER TAKEN
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void )
{
return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
4002b6dc: b00006b5 adrp x21, 40100000 <_Barrier_Information>
4002b6e0: 910a02b5 add x21, x21, #0x280
4002b6e4: aa1503e0 mov x0, x21
4002b6e8: 97fff082 bl 400278f0 <_Objects_Allocate>
if ( !ptimer ) {
4002b6ec: b4000560 cbz x0, 4002b798 <timer_create+0x108> <== NEVER TAKEN
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
4002b6f0: 52800041 mov w1, #0x2 // #2
4002b6f4: 39015001 strb w1, [x0, #84]
4002b6f8: f0000761 adrp x1, 4011a000 <region_areas+0x1570>
ptimer->thread_id = _Thread_Get_executing()->Object.id;
4002b6fc: f9411023 ldr x3, [x1, #544]
ptimer->inf.sigev_value = evp->sigev_value;
4002b700: a9400662 ldp x2, x1, [x19]
ptimer->thread_id = _Thread_Get_executing()->Object.id;
4002b704: b9401063 ldr w3, [x3, #16]
4002b708: b9005003 str w3, [x0, #80]
ptimer->inf.sigev_value = evp->sigev_value;
4002b70c: a9058402 stp x2, x1, [x0, #88]
_Objects_Get_index( the_object->id ),
4002b710: b9401001 ldr w1, [x0, #16]
information->local_table[ index - OBJECTS_INDEX_MINIMUM ] = the_object;
4002b714: f94006a5 ldr x5, [x21, #8]
4002b718: 12003c22 and w2, w1, #0xffff
4002b71c: 51000442 sub w2, w2, #0x1
*timerid = ptimer->Object.id;
4002b720: 2a0103e1 mov w1, w1
RB_COLOR( &the_watchdog->Node.RBTree, Node ) = state;
4002b724: 52800046 mov w6, #0x2 // #2
the_watchdog->routine = routine;
4002b728: 90000003 adrp x3, 4002b000 <_Watchdog_Insert+0x60>
4002b72c: 91208063 add x3, x3, #0x820
the_object->name.name_u32 = name;
4002b730: b900181f str wzr, [x0, #24]
RB_COLOR( &the_watchdog->Node.RBTree, Node ) = state;
4002b734: b9003806 str w6, [x0, #56]
the_watchdog->routine = routine;
4002b738: f9002003 str x3, [x0, #64]
ptimer->timer_data.it_interval.tv_nsec = 0;
4002b73c: a907fc1f stp xzr, xzr, [x0, #120]
ptimer->timer_data.it_value.tv_nsec = 0;
4002b740: a908fc1f stp xzr, xzr, [x0, #136]
ptimer->overrun = 0;
4002b744: b9009c1f str wzr, [x0, #156]
information->local_table[ index - OBJECTS_INDEX_MINIMUM ] = the_object;
4002b748: f82278a0 str x0, [x5, x2, lsl #3]
*timerid = ptimer->Object.id;
4002b74c: f9000281 str x1, [x20]
_RTEMS_Unlock_allocator();
4002b750: 97ffecac bl 40026a00 <_RTEMS_Unlock_allocator>
return 0;
4002b754: a94153f3 ldp x19, x20, [sp, #16]
4002b758: 52800000 mov w0, #0x0 // #0
4002b75c: f94013f5 ldr x21, [sp, #32]
}
4002b760: a8c37bfd ldp x29, x30, [sp], #48
4002b764: d65f03c0 ret
4002b768: b00006b5 adrp x21, 40100000 <_Barrier_Information>
4002b76c: 910a02b5 add x21, x21, #0x280
4002b770: aa1503e0 mov x0, x21
4002b774: 97fff05f bl 400278f0 <_Objects_Allocate>
if ( !ptimer ) {
4002b778: b4000100 cbz x0, 4002b798 <timer_create+0x108>
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
4002b77c: 52800041 mov w1, #0x2 // #2
4002b780: 39015001 strb w1, [x0, #84]
4002b784: f0000761 adrp x1, 4011a000 <region_areas+0x1570>
ptimer->thread_id = _Thread_Get_executing()->Object.id;
4002b788: f9411021 ldr x1, [x1, #544]
4002b78c: b9401021 ldr w1, [x1, #16]
4002b790: b9005001 str w1, [x0, #80]
if ( evp != NULL ) {
4002b794: 17ffffdf b 4002b710 <timer_create+0x80>
4002b798: 97ffec9a bl 40026a00 <_RTEMS_Unlock_allocator>
rtems_set_errno_and_return_minus_one( EAGAIN );
4002b79c: 94001a04 bl 40031fac <__errno>
4002b7a0: aa0003e1 mov x1, x0
4002b7a4: 52800162 mov w2, #0xb // #11
4002b7a8: 12800000 mov w0, #0xffffffff // #-1
4002b7ac: a94153f3 ldp x19, x20, [sp, #16]
4002b7b0: f94013f5 ldr x21, [sp, #32]
4002b7b4: b9000022 str w2, [x1]
}
4002b7b8: a8c37bfd ldp x29, x30, [sp], #48
4002b7bc: d65f03c0 ret
rtems_set_errno_and_return_minus_one( EINVAL );
4002b7c0: 940019fb bl 40031fac <__errno> <== NOT EXECUTED
4002b7c4: aa0003e1 mov x1, x0 <== NOT EXECUTED
4002b7c8: 528002c2 mov w2, #0x16 // #22 <== NOT EXECUTED
4002b7cc: 12800000 mov w0, #0xffffffff // #-1 <== NOT EXECUTED
4002b7d0: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
4002b7d4: f94013f5 ldr x21, [sp, #32] <== NOT EXECUTED
4002b7d8: b9000022 str w2, [x1] <== NOT EXECUTED
4002b7dc: 17ffffe1 b 4002b760 <timer_create+0xd0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
4002b7e0: 940019f3 bl 40031fac <__errno>
4002b7e4: aa0003e1 mov x1, x0
4002b7e8: 528002c2 mov w2, #0x16 // #22
4002b7ec: 12800000 mov w0, #0xffffffff // #-1
4002b7f0: b9000022 str w2, [x1]
4002b7f4: 17ffffdb b 4002b760 <timer_create+0xd0>
rtems_set_errno_and_return_minus_one( EINVAL );
4002b7f8: 940019ed bl 40031fac <__errno>
4002b7fc: aa0003e1 mov x1, x0
4002b800: 528002c2 mov w2, #0x16 // #22
4002b804: 12800000 mov w0, #0xffffffff // #-1
4002b808: a94153f3 ldp x19, x20, [sp, #16]
4002b80c: b9000022 str w2, [x1]
4002b810: 17ffffd4 b 4002b760 <timer_create+0xd0>
...
0000000040025c00 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *__restrict value,
struct itimerspec *__restrict ovalue
)
{
40025c00: a9b97bfd stp x29, x30, [sp, #-112]!
40025c04: 910003fd mov x29, sp
40025c08: a90363f7 stp x23, x24, [sp, #48]
POSIX_Timer_Control *ptimer;
ISR_lock_Context lock_context;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
40025c0c: b4000f82 cbz x2, 40025dfc <timer_settime+0x1fc> <== NEVER TAKEN
/*
* First, it verifies if the structure "value" is correct
* if the number of nanoseconds is not correct return EINVAL
*/
if ( !_Timespec_Is_valid( &(value->it_value) ) ) {
40025c10: a90153f3 stp x19, x20, [sp, #16]
40025c14: 2a0103f4 mov w20, w1
40025c18: aa0203f3 mov x19, x2
40025c1c: a9025bf5 stp x21, x22, [sp, #32]
40025c20: aa0003f6 mov x22, x0
40025c24: aa0303f5 mov x21, x3
40025c28: 91004040 add x0, x2, #0x10
40025c2c: 94000e39 bl 40029510 <_Timespec_Is_valid>
40025c30: 72001c1f tst w0, #0xff
40025c34: 54000d60 b.eq 40025de0 <timer_settime+0x1e0> // b.none
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
40025c38: aa1303e0 mov x0, x19
40025c3c: 94000e35 bl 40029510 <_Timespec_Is_valid>
40025c40: 72001c1f tst w0, #0xff
40025c44: 54000ce0 b.eq 40025de0 <timer_settime+0x1e0> // b.none <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
40025c48: 721d7a97 ands w23, w20, #0xfffffffb
40025c4c: 54000ca1 b.ne 40025de0 <timer_settime+0x1e0> // b.any
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
40025c50: f9400260 ldr x0, [x19]
40025c54: f9002be0 str x0, [sp, #80]
40025c58: f9400660 ldr x0, [x19, #8]
40025c5c: f9002fe0 str x0, [sp, #88]
40025c60: f9400a60 ldr x0, [x19, #16]
40025c64: f90033e0 str x0, [sp, #96]
40025c68: f9400e60 ldr x0, [x19, #24]
40025c6c: f90037e0 str x0, [sp, #104]
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
40025c70: 7100129f cmp w20, #0x4
40025c74: 540009e0 b.eq 40025db0 <timer_settime+0x1b0> // b.none
return (POSIX_Timer_Control *) _Objects_Get(
40025c78: 910103e1 add x1, sp, #0x40
40025c7c: 2a1603e0 mov w0, w22
40025c80: f00006c2 adrp x2, 40100000 <T_case_instance_PSXSetTimerInterrupt>
40025c84: 91008042 add x2, x2, #0x20
40025c88: 94000622 bl 40027510 <_Objects_Get>
40025c8c: aa0003f4 mov x20, x0
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &lock_context );
if ( ptimer != NULL ) {
40025c90: b4000a80 cbz x0, 40025de0 <timer_settime+0x1e0>
Per_CPU_Control *cpu;
cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context );
/* Stop the timer */
_Watchdog_Remove(
40025c94: 91008016 add x22, x0, #0x20
40025c98: d00006f8 adrp x24, 40103000 <_Thread_Objects+0x418>
40025c9c: 910f0300 add x0, x24, #0x3c0
40025ca0: aa1603e1 mov x1, x22
40025ca4: 94000e87 bl 400296c0 <_Watchdog_Remove>
&cpu->Watchdog.Header[ PER_CPU_WATCHDOG_TICKS ],
&ptimer->Timer
);
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
40025ca8: a94607e0 ldp x0, x1, [sp, #96]
40025cac: aa010000 orr x0, x0, x1
40025cb0: b50002c0 cbnz x0, 40025d08 <timer_settime+0x108>
/* The old data of the timer are returned */
if ( ovalue )
40025cb4: 9101e280 add x0, x20, #0x78
40025cb8: b4000135 cbz x21, 40025cdc <timer_settime+0xdc>
*ovalue = ptimer->timer_data;
40025cbc: f9403e81 ldr x1, [x20, #120]
40025cc0: f90002a1 str x1, [x21]
40025cc4: f9400401 ldr x1, [x0, #8]
40025cc8: f90006a1 str x1, [x21, #8]
40025ccc: f9400801 ldr x1, [x0, #16]
40025cd0: f9000aa1 str x1, [x21, #16]
40025cd4: f9400c01 ldr x1, [x0, #24]
40025cd8: f9000ea1 str x1, [x21, #24]
/* The new data are set */
ptimer->timer_data = normalize;
40025cdc: f9402be1 ldr x1, [sp, #80]
40025ce0: f9003e81 str x1, [x20, #120]
40025ce4: f9402fe1 ldr x1, [sp, #88]
40025ce8: f9000401 str x1, [x0, #8]
40025cec: f94033e1 ldr x1, [sp, #96]
40025cf0: f9000801 str x1, [x0, #16]
40025cf4: f94037e1 ldr x1, [sp, #104]
40025cf8: f9000c01 str x1, [x0, #24]
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
40025cfc: 52800080 mov w0, #0x4 // #4
40025d00: 39015280 strb w0, [x20, #84]
_ISR_lock_ISR_enable( lock_context );
40025d04: 14000023 b 40025d90 <timer_settime+0x190>
_POSIX_Timer_Release( cpu, &lock_context );
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
40025d08: aa1303e0 mov x0, x19
40025d0c: 94000e31 bl 400295d0 <_Timespec_To_ticks>
40025d10: b9009a80 str w0, [x20, #152]
initial_period = _Timespec_To_ticks( &normalize.it_value );
40025d14: 910183e0 add x0, sp, #0x60
40025d18: 94000e2e bl 400295d0 <_Timespec_To_ticks>
40025d1c: 2a0003f3 mov w19, w0
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
40025d20: 52800061 mov w1, #0x3 // #3
40025d24: 39015281 strb w1, [x20, #84]
40025d28: 91028280 add x0, x20, #0xa0
40025d2c: 97fff951 bl 40024270 <_Timecounter_Nanotime>
cpu->Watchdog.ticks + ticks
40025d30: d00006e0 adrp x0, 40103000 <_Thread_Objects+0x418>
_Watchdog_Insert(
40025d34: f941dc02 ldr x2, [x0, #952]
40025d38: aa1603e1 mov x1, x22
40025d3c: 910f0300 add x0, x24, #0x3c0
40025d40: 8b334042 add x2, x2, w19, uxtw
40025d44: 97fffdeb bl 400254f0 <_Watchdog_Insert>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
40025d48: 9101e280 add x0, x20, #0x78
40025d4c: b4000135 cbz x21, 40025d70 <timer_settime+0x170>
*ovalue = ptimer->timer_data;
40025d50: f9403e81 ldr x1, [x20, #120]
40025d54: f90002a1 str x1, [x21]
40025d58: f9400401 ldr x1, [x0, #8]
40025d5c: f90006a1 str x1, [x21, #8]
40025d60: f9400801 ldr x1, [x0, #16]
40025d64: f9000aa1 str x1, [x21, #16]
40025d68: f9400c01 ldr x1, [x0, #24]
40025d6c: f9000ea1 str x1, [x21, #24]
ptimer->timer_data = normalize;
40025d70: f9402be1 ldr x1, [sp, #80]
40025d74: f9003e81 str x1, [x20, #120]
40025d78: f9402fe1 ldr x1, [sp, #88]
40025d7c: f9000401 str x1, [x0, #8]
40025d80: f94033e1 ldr x1, [sp, #96]
40025d84: f9000801 str x1, [x0, #16]
40025d88: f94037e1 ldr x1, [sp, #104]
40025d8c: f9000c01 str x1, [x0, #24]
40025d90: b94043e0 ldr w0, [sp, #64]
40025d94: d51b4220 msr daif, x0
_POSIX_Timer_Release( cpu, &lock_context );
return 0;
40025d98: a94153f3 ldp x19, x20, [sp, #16]
40025d9c: a9425bf5 ldp x21, x22, [sp, #32]
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
40025da0: 2a1703e0 mov w0, w23
40025da4: a94363f7 ldp x23, x24, [sp, #48]
40025da8: a8c77bfd ldp x29, x30, [sp], #112
40025dac: d65f03c0 ret
40025db0: 910103e0 add x0, sp, #0x40
40025db4: 97fff92f bl 40024270 <_Timecounter_Nanotime>
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
40025db8: 910183e0 add x0, sp, #0x60
40025dbc: 910103e1 add x1, sp, #0x40
40025dc0: 94000de4 bl 40029550 <_Timespec_Less_than>
40025dc4: 72001c1f tst w0, #0xff
40025dc8: 540000c1 b.ne 40025de0 <timer_settime+0x1e0> // b.any
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
40025dcc: 910183e2 add x2, sp, #0x60
40025dd0: 910103e0 add x0, sp, #0x40
40025dd4: aa0203e1 mov x1, x2
40025dd8: 94000dee bl 40029590 <_Timespec_Subtract>
40025ddc: 17ffffa7 b 40025c78 <timer_settime+0x78>
rtems_set_errno_and_return_minus_one( EINVAL );
40025de0: 940034af bl 4003309c <__errno>
40025de4: 12800017 mov w23, #0xffffffff // #-1
40025de8: 528002c1 mov w1, #0x16 // #22
40025dec: a94153f3 ldp x19, x20, [sp, #16]
40025df0: a9425bf5 ldp x21, x22, [sp, #32]
40025df4: b9000001 str w1, [x0]
40025df8: 17ffffea b 40025da0 <timer_settime+0x1a0>
rtems_set_errno_and_return_minus_one( EINVAL );
40025dfc: 940034a8 bl 4003309c <__errno> <== NOT EXECUTED
40025e00: 12800017 mov w23, #0xffffffff // #-1 <== NOT EXECUTED
40025e04: 528002c1 mov w1, #0x16 // #22 <== NOT EXECUTED
40025e08: b9000001 str w1, [x0] <== NOT EXECUTED
40025e0c: 17ffffe5 b 40025da0 <timer_settime+0x1a0> <== NOT EXECUTED
0000000040020920 <wait.part.0>:
static void wait(void)
40020920: a9bf7bfd stp x29, x30, [sp, #-16]!
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
40020924: b00000c3 adrp x3, 40039000 <__trunctfdf2+0x250>
40020928: b00000c1 adrp x1, 40039000 <__trunctfdf2+0x250>
4002092c: 91152063 add x3, x3, #0x548
40020930: 91158021 add x1, x1, #0x560
40020934: 52800b82 mov w2, #0x5c // #92
static void wait(void)
40020938: 910003fd mov x29, sp
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
4002093c: b00000c0 adrp x0, 40039000 <__trunctfdf2+0x250>
40020940: 91164000 add x0, x0, #0x590
40020944: 940003d7 bl 400218a0 <__wrap_printf>
40020948: 52800000 mov w0, #0x0 // #0 <== NOT EXECUTED
4002094c: 940003cd bl 40021880 <rtems_test_exit> <== NOT EXECUTED