=============================================================================== 400132e0 <_POSIX_Condition_variables_Default_attributes>: 400132e0: 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 ................ ... =============================================================================== 400072e8 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 400072e8: 9d e3 bf 78 save %sp, -136, %sp unsigned long flags; const Thread_queue_Operations *operations; Thread_queue_Heads *heads; the_cond = _POSIX_Condition_variables_Get( cond ); POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags ); 400072ec: 80 a6 20 00 cmp %i0, 0 400072f0: 02 80 00 28 be 40007390 <_POSIX_Condition_variables_Signal_support+0xa8> 400072f4: 05 06 37 ec sethi %hi(0x18dfb000), %g2 400072f8: c2 06 00 00 ld [ %i0 ], %g1 400072fc: 82 1e 00 01 xor %i0, %g1, %g1 40007300: 84 10 a1 fe or %g2, 0x1fe, %g2 40007304: 82 18 40 02 xor %g1, %g2, %g1 40007308: 80 88 7f fe btst -2, %g1 4000730c: 12 80 00 1c bne 4000737c <_POSIX_Condition_variables_Signal_support+0x94> 40007310: 3b 10 00 4c sethi %hi(0x40013000), %i5 if ( heads != NULL ) { Thread_Control *the_thread; the_thread = ( *operations->first )( heads ); _Thread_queue_Extract_critical( 40007314: b8 06 20 0c add %i0, 0xc, %i4 <== NOT EXECUTED the_thread = ( *operations->first )( heads ); 40007318: ba 17 63 84 or %i5, 0x384, %i5 <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000731c: 91 d0 20 09 ta 9 <== NOT EXECUTED ) { #if defined( RTEMS_SMP ) context->Lock_context.isr_level = level; #else context->isr_level = level; 40007320: c2 27 bf dc st %g1, [ %fp + -36 ] heads = the_cond->Queue.Queue.heads; 40007324: c2 06 20 0c ld [ %i0 + 0xc ], %g1 if ( heads != NULL ) { 40007328: 90 90 60 00 orcc %g1, 0, %o0 4000732c: 22 80 00 0f be,a 40007368 <_POSIX_Condition_variables_Signal_support+0x80> 40007330: c0 26 20 18 clr [ %i0 + 0x18 ] the_thread = ( *operations->first )( heads ); 40007334: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 40007338: 9f c0 40 00 call %g1 4000733c: 01 00 00 00 nop _Thread_queue_Extract_critical( 40007340: 96 07 bf dc add %fp, -36, %o3 40007344: 94 10 00 08 mov %o0, %o2 40007348: 92 10 00 1d mov %i5, %o1 4000734c: 40 00 16 65 call 4000cce0 <_Thread_queue_Extract_critical> 40007350: 90 10 00 1c mov %i4, %o0 ); } else { the_cond->mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; _POSIX_Condition_variables_Release( the_cond, &queue_context ); } } while ( is_broadcast && heads != NULL ); 40007354: 80 a6 60 00 cmp %i1, 0 40007358: 12 bf ff f1 bne 4000731c <_POSIX_Condition_variables_Signal_support+0x34> 4000735c: 01 00 00 00 nop return 0; } 40007360: 81 c7 e0 08 ret 40007364: 91 e8 20 00 restore %g0, 0, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40007368: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000736c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007370: 01 00 00 00 nop 40007374: 81 c7 e0 08 ret 40007378: 91 e8 20 00 restore %g0, 0, %o0 POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags ); 4000737c: 40 00 00 0f call 400073b8 <_POSIX_Condition_variables_Auto_initialization> 40007380: 90 10 00 18 mov %i0, %o0 40007384: 80 a2 20 00 cmp %o0, 0 40007388: 12 bf ff e3 bne 40007314 <_POSIX_Condition_variables_Signal_support+0x2c> 4000738c: 3b 10 00 4c sethi %hi(0x40013000), %i5 40007390: 81 c7 e0 08 ret 40007394: 91 e8 20 16 restore %g0, 0x16, %o0 =============================================================================== 400074a0 <_POSIX_Condition_variables_Wait_support>: int _POSIX_Condition_variables_Wait_support( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 400074a0: 9d e3 bf 78 save %sp, -136, %sp 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 ); 400074a4: 80 a6 20 00 cmp %i0, 0 400074a8: 02 80 00 44 be 400075b8 <_POSIX_Condition_variables_Wait_support+0x118> 400074ac: 05 06 37 ec sethi %hi(0x18dfb000), %g2 400074b0: fa 06 00 00 ld [ %i0 ], %i5 400074b4: 82 1e 00 1d xor %i0, %i5, %g1 400074b8: 84 10 a1 fe or %g2, 0x1fe, %g2 400074bc: 82 18 40 02 xor %g1, %g2, %g1 400074c0: 80 88 7f fe btst -2, %g1 400074c4: 12 80 00 38 bne 400075a4 <_POSIX_Condition_variables_Wait_support+0x104> 400074c8: 80 a6 a0 00 cmp %i2, 0 _Thread_queue_Context_initialize( &queue_context ); if ( abstime != NULL ) { 400074cc: 02 80 00 3d be 400075c0 <_POSIX_Condition_variables_Wait_support+0x120> 400074d0: 80 8f 60 01 btst 1, %i5 RTEMS_INLINE_ROUTINE clockid_t _POSIX_Condition_variables_Get_clock( unsigned long flags ) { if ( ( flags & POSIX_CONDITION_VARIABLES_CLOCK_MONOTONIC ) != 0 ) { 400074d4: 12 80 00 13 bne 40007520 <_POSIX_Condition_variables_Wait_support+0x80> <== NEVER TAKEN 400074d8: f4 27 bf e8 st %i2, [ %fp + -24 ] <== NOT EXECUTED queue_context->enqueue_callout = enqueue_callout; 400074dc: 03 10 00 1d sethi %hi(0x40007400), %g1 <== NOT EXECUTED 400074e0: 82 10 60 60 or %g1, 0x60, %g1 ! 40007460 <_POSIX_Condition_variables_Enqueue_with_timeout_realtime> <== NOT EXECUTED 400074e4: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400074e8: 91 d0 20 09 ta 9 <== NOT EXECUTED 400074ec: c2 27 bf dc st %g1, [ %fp + -36 ] } executing = _POSIX_Condition_variables_Acquire( the_cond, &queue_context ); if ( the_cond->mutex != POSIX_CONDITION_VARIABLES_NO_MUTEX 400074f0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 && the_cond->mutex != mutex 400074f4: 80 a0 40 19 cmp %g1, %i1 400074f8: 02 80 00 13 be 40007544 <_POSIX_Condition_variables_Wait_support+0xa4> 400074fc: 84 10 00 06 mov %g6, %g2 40007500: 80 a0 60 00 cmp %g1, 0 40007504: 22 80 00 11 be,a 40007548 <_POSIX_Condition_variables_Wait_support+0xa8> 40007508: fa 00 a0 20 ld [ %g2 + 0x20 ], %i5 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000750c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40007510: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007514: 01 00 00 00 nop ) { _POSIX_Condition_variables_Release( the_cond, &queue_context ); return EINVAL; 40007518: 81 c7 e0 08 ret 4000751c: 91 e8 20 16 restore %g0, 0x16, %o0 40007520: 03 10 00 1d sethi %hi(0x40007400), %g1 <== NOT EXECUTED 40007524: 82 10 60 80 or %g1, 0x80, %g1 ! 40007480 <_POSIX_Condition_variables_Enqueue_with_timeout_monotonic> <== NOT EXECUTED 40007528: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000752c: 91 d0 20 09 ta 9 <== NOT EXECUTED 40007530: c2 27 bf dc st %g1, [ %fp + -36 ] <== NOT EXECUTED the_cond->mutex != POSIX_CONDITION_VARIABLES_NO_MUTEX 40007534: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED && the_cond->mutex != mutex 40007538: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4000753c: 12 bf ff f1 bne 40007500 <_POSIX_Condition_variables_Wait_support+0x60> <== NOT EXECUTED 40007540: 84 10 00 06 mov %g6, %g2 <== NOT EXECUTED ISR_Level level; Thread_Control *executing; _Thread_queue_Context_ISR_disable( queue_context, level ); _Thread_queue_Context_set_ISR_level( queue_context, level ); executing = _Thread_Executing; 40007544: fa 00 a0 20 ld [ %g2 + 0x20 ], %i5 } the_cond->mutex = mutex; 40007548: f2 26 20 18 st %i1, [ %i0 + 0x18 ] queue_context->thread_state = thread_state; 4000754c: 82 10 20 20 mov 0x20, %g1 _Thread_queue_Context_set_thread_state( &queue_context, STATES_WAITING_FOR_CONDITION_VARIABLE ); _Thread_queue_Enqueue( 40007550: 90 06 20 0c add %i0, 0xc, %o0 40007554: 96 07 bf dc add %fp, -36, %o3 40007558: c2 27 bf e0 st %g1, [ %fp + -32 ] 4000755c: 94 10 00 1d mov %i5, %o2 40007560: 13 10 00 4c sethi %hi(0x40013000), %o1 40007564: 40 00 15 69 call 4000cb08 <_Thread_queue_Enqueue> 40007568: 92 12 63 84 or %o1, 0x384, %o1 ! 40013384 <_Thread_queue_Operations_FIFO> return _POSIX_Get_by_name_error_table[ error ]; } RTEMS_INLINE_ROUTINE int _POSIX_Get_error( Status_Control status ) { return STATUS_GET_POSIX( status ); 4000756c: f0 07 60 4c ld [ %i5 + 0x4c ], %i0 40007570: b1 3e 20 08 sra %i0, 8, %i0 * 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 ) { 40007574: 80 a6 20 04 cmp %i0, 4 40007578: 02 80 00 18 be 400075d8 <_POSIX_Condition_variables_Wait_support+0x138> <== NEVER TAKEN 4000757c: 80 a6 20 01 cmp %i0, 1 /* * When we get here the dispatch disable level is 0. */ if ( error != EPERM ) { 40007580: 02 80 00 14 be 400075d0 <_POSIX_Condition_variables_Wait_support+0x130> 40007584: 01 00 00 00 nop int mutex_error; mutex_error = pthread_mutex_lock( mutex ); 40007588: 40 00 01 13 call 400079d4 4000758c: 90 10 00 19 mov %i1, %o0 if ( mutex_error != 0 ) { 40007590: 80 a2 20 00 cmp %o0, 0 40007594: 12 80 00 09 bne 400075b8 <_POSIX_Condition_variables_Wait_support+0x118> 40007598: 01 00 00 00 nop error = EINVAL; } } return error; } 4000759c: 81 c7 e0 08 ret 400075a0: 81 e8 00 00 restore POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags ); 400075a4: 7f ff ff 85 call 400073b8 <_POSIX_Condition_variables_Auto_initialization> 400075a8: 90 10 00 18 mov %i0, %o0 400075ac: 80 a2 20 00 cmp %o0, 0 400075b0: 12 bf ff c7 bne 400074cc <_POSIX_Condition_variables_Wait_support+0x2c> 400075b4: 80 a6 a0 00 cmp %i2, 0 } 400075b8: 81 c7 e0 08 ret 400075bc: 91 e8 20 16 restore %g0, 0x16, %o0 queue_context->enqueue_callout = enqueue_callout; 400075c0: 03 10 00 1d sethi %hi(0x40007400), %g1 400075c4: 82 10 60 54 or %g1, 0x54, %g1 ! 40007454 <_POSIX_Condition_variables_Enqueue_no_timeout> 400075c8: 10 bf ff c8 b 400074e8 <_POSIX_Condition_variables_Wait_support+0x48> 400075cc: c2 27 bf e4 st %g1, [ %fp + -28 ] 400075d0: 81 c7 e0 08 ret 400075d4: 81 e8 00 00 restore error = 0; 400075d8: 10 bf ff ec b 40007588 <_POSIX_Condition_variables_Wait_support+0xe8> <== NOT EXECUTED 400075dc: b0 10 20 00 clr %i0 <== NOT EXECUTED =============================================================================== 400148ac <_POSIX_Get_by_name_error_table>: 400148ac: 00 00 00 16 00 00 00 5b 00 00 00 02 .......[.... =============================================================================== 40007560 <_POSIX_Message_queue_Delete>: void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq, Thread_queue_Context *queue_context ) { 40007560: 9d e3 bf a0 save %sp, -96, %sp if ( !the_mq->linked && the_mq->open_count == 0 ) { 40007564: c2 0e 20 4c ldub [ %i0 + 0x4c ], %g1 40007568: 80 a0 60 00 cmp %g1, 0 4000756c: 12 80 00 06 bne 40007584 <_POSIX_Message_queue_Delete+0x24> 40007570: 01 00 00 00 nop 40007574: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 40007578: 80 a0 60 00 cmp %g1, 0 4000757c: 02 80 00 07 be 40007598 <_POSIX_Message_queue_Delete+0x38> 40007580: 92 10 00 19 mov %i1, %o1 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40007584: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40007588: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000758c: 01 00 00 00 nop _CORE_message_queue_Close( &the_mq->Message_queue, queue_context ); _POSIX_Message_queue_Free( the_mq ); } else { _CORE_message_queue_Release( &the_mq->Message_queue, queue_context ); } } 40007590: 81 c7 e0 08 ret 40007594: 81 e8 00 00 restore _CORE_message_queue_Close( &the_mq->Message_queue, queue_context ); 40007598: 90 06 20 10 add %i0, 0x10, %o0 4000759c: 40 00 07 e9 call 40009540 <_CORE_message_queue_Close> 400075a0: b2 10 00 18 mov %i0, %i1 _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 400075a4: 31 10 00 60 sethi %hi(0x40018000), %i0 400075a8: 40 00 12 1c call 4000be18 <_Objects_Free> 400075ac: 91 ee 20 48 restore %i0, 0x48, %o0 =============================================================================== 400077ec <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime, Thread_queue_Enqueue_callout enqueue_callout ) { 400077ec: 9d e3 bf 70 save %sp, -144, %sp return (POSIX_Message_queue_Control *) _Objects_Get( 400077f0: 15 10 00 60 sethi %hi(0x40018000), %o2 400077f4: 92 07 bf dc add %fp, -36, %o1 400077f8: 94 12 a0 48 or %o2, 0x48, %o2 400077fc: 40 00 11 b3 call 4000bec8 <_Objects_Get> 40007800: 90 10 00 18 mov %i0, %o0 Thread_Control *executing; Status_Control status; the_mq = _POSIX_Message_queue_Get( mqdes, &queue_context ); if ( the_mq == NULL ) { 40007804: 80 a2 20 00 cmp %o0, 0 40007808: 02 80 00 2c be 400078b8 <_POSIX_Message_queue_Receive_support+0xcc> <== NEVER TAKEN 4000780c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); } if ( ( the_mq->oflag & O_ACCMODE ) == O_WRONLY ) { 40007810: d8 02 20 68 ld [ %o0 + 0x68 ], %o4 40007814: 82 0b 20 03 and %o4, 3, %g1 40007818: 80 a0 60 01 cmp %g1, 1 4000781c: 02 80 00 24 be 400078ac <_POSIX_Message_queue_Receive_support+0xc0> 40007820: 01 00 00 00 nop _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 ) { 40007824: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 40007828: 80 a0 40 1a cmp %g1, %i2 4000782c: 18 80 00 29 bgu 400078d0 <_POSIX_Message_queue_Receive_support+0xe4> 40007830: 82 10 3f ff mov -1, %g1 40007834: fa 27 bf e4 st %i5, [ %fp + -28 ] /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 40007838: c2 27 bf d8 st %g1, [ %fp + -40 ] queue_context->Timeout.arg = arg; 4000783c: f8 27 bf e8 st %i4, [ %fp + -24 ] _CORE_message_queue_Acquire_critical( &the_mq->Message_queue, &queue_context ); if ( the_mq->open_count == 0 ) { 40007840: c2 02 20 50 ld [ %o0 + 0x50 ], %g1 40007844: 80 a0 60 00 cmp %g1, 0 40007848: 02 80 00 19 be 400078ac <_POSIX_Message_queue_Receive_support+0xc0> 4000784c: 84 02 20 10 add %o0, 0x10, %g2 } /* * Now perform the actual message receive */ executing = _Thread_Executing; 40007850: fa 01 a0 20 ld [ %g6 + 0x20 ], %i5 status = _CORE_message_queue_Seize( 40007854: 99 33 20 0e srl %o4, 0xe, %o4 40007858: 9a 07 bf dc add %fp, -36, %o5 4000785c: 98 1b 20 01 xor %o4, 1, %o4 40007860: 96 07 bf d8 add %fp, -40, %o3 40007864: 98 0b 20 01 and %o4, 1, %o4 40007868: 94 10 00 19 mov %i1, %o2 4000786c: 92 10 00 1d mov %i5, %o1 40007870: 40 00 07 6e call 40009628 <_CORE_message_queue_Seize> 40007874: 90 10 00 02 mov %g2, %o0 &length_out, ( the_mq->oflag & O_NONBLOCK ) == 0, &queue_context ); if ( status != STATUS_SUCCESSFUL ) { 40007878: 80 92 00 09 orcc %o0, %o1, %g0 4000787c: 12 80 00 1e bne 400078f4 <_POSIX_Message_queue_Receive_support+0x108> 40007880: 80 a6 e0 00 cmp %i3, 0 rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) ); } if ( msg_prio != NULL ) { 40007884: 22 80 00 08 be,a 400078a4 <_POSIX_Message_queue_Receive_support+0xb8> <== NEVER TAKEN 40007888: f0 07 bf d8 ld [ %fp + -40 ], %i0 <== NOT EXECUTED return (unsigned int) ((priority >= 0) ? priority : -priority); 4000788c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 40007890: 85 38 60 1f sra %g1, 0x1f, %g2 40007894: 82 18 80 01 xor %g2, %g1, %g1 40007898: 82 20 40 02 sub %g1, %g2, %g1 *msg_prio = _POSIX_Message_queue_Priority_from_core( 4000789c: c2 26 c0 00 st %g1, [ %i3 ] executing->Wait.count ); } return length_out; 400078a0: f0 07 bf d8 ld [ %fp + -40 ], %i0 } 400078a4: 81 c7 e0 08 ret 400078a8: 81 e8 00 00 restore register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 400078ac: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400078b0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400078b4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); 400078b8: 40 00 2a b2 call 40012380 <__errno> 400078bc: b0 10 3f ff mov -1, %i0 ! ffffffff 400078c0: 82 10 20 09 mov 9, %g1 400078c4: c2 22 00 00 st %g1, [ %o0 ] 400078c8: 81 c7 e0 08 ret 400078cc: 81 e8 00 00 restore register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 400078d0: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400078d4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400078d8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMSGSIZE ); 400078dc: 40 00 2a a9 call 40012380 <__errno> 400078e0: b0 10 3f ff mov -1, %i0 ! ffffffff 400078e4: 82 10 20 7a mov 0x7a, %g1 400078e8: c2 22 00 00 st %g1, [ %o0 ] 400078ec: 81 c7 e0 08 ret 400078f0: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) ); 400078f4: 40 00 2a a3 call 40012380 <__errno> 400078f8: d2 27 bf d4 st %o1, [ %fp + -44 ] return STATUS_GET_POSIX( status ); 400078fc: d2 07 bf d4 ld [ %fp + -44 ], %o1 40007900: 93 3a 60 08 sra %o1, 8, %o1 40007904: d2 22 00 00 st %o1, [ %o0 ] 40007908: 81 c7 e0 08 ret 4000790c: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 40007928 <_POSIX_Message_queue_Send_support>: size_t msg_len, unsigned int msg_prio, const struct timespec *abstime, Thread_queue_Enqueue_callout enqueue_callout ) { 40007928: 9d e3 bf 68 save %sp, -152, %sp /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) { 4000792c: 80 a6 e0 20 cmp %i3, 0x20 40007930: 18 80 00 34 bgu 40007a00 <_POSIX_Message_queue_Send_support+0xd8> <== NEVER TAKEN 40007934: 92 07 bf dc add %fp, -36, %o1 return (POSIX_Message_queue_Control *) _Objects_Get( 40007938: 15 10 00 60 sethi %hi(0x40018000), %o2 4000793c: 90 10 00 18 mov %i0, %o0 40007940: 40 00 11 62 call 4000bec8 <_Objects_Get> 40007944: 94 12 a0 48 or %o2, 0x48, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); } the_mq = _POSIX_Message_queue_Get( mqdes, &queue_context ); if ( the_mq == NULL ) { 40007948: 80 a2 20 00 cmp %o0, 0 4000794c: 02 80 00 27 be 400079e8 <_POSIX_Message_queue_Send_support+0xc0> <== NEVER TAKEN 40007950: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); } if ( ( the_mq->oflag & O_ACCMODE ) == O_RDONLY ) { 40007954: da 02 20 68 ld [ %o0 + 0x68 ], %o5 40007958: 80 8b 60 03 btst 3, %o5 4000795c: 02 80 00 20 be 400079dc <_POSIX_Message_queue_Send_support+0xb4> 40007960: 01 00 00 00 nop queue_context->enqueue_callout = enqueue_callout; 40007964: fa 27 bf e4 st %i5, [ %fp + -28 ] queue_context->Timeout.arg = arg; 40007968: f8 27 bf e8 st %i4, [ %fp + -24 ] _CORE_message_queue_Acquire_critical( &the_mq->Message_queue, &queue_context ); if ( the_mq->open_count == 0 ) { 4000796c: c2 02 20 50 ld [ %o0 + 0x50 ], %g1 40007970: 80 a0 60 00 cmp %g1, 0 40007974: 02 80 00 1a be 400079dc <_POSIX_Message_queue_Send_support+0xb4> 40007978: 84 02 20 10 add %o0, 0x10, %g2 /* * Now perform the actual message receive */ executing = _Thread_Executing; status = _CORE_message_queue_Submit( 4000797c: 82 07 bf dc add %fp, -36, %g1 40007980: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40007984: 9b 33 60 0e srl %o5, 0xe, %o5 40007988: d2 01 a0 20 ld [ %g6 + 0x20 ], %o1 4000798c: 9a 1b 60 01 xor %o5, 1, %o5 40007990: 98 20 00 1b neg %i3, %o4 40007994: 9a 0b 60 01 and %o5, 1, %o5 40007998: 96 10 00 1a mov %i2, %o3 4000799c: 94 10 00 19 mov %i1, %o2 400079a0: 90 10 00 02 mov %g2, %o0 400079a4: 40 00 07 6d call 40009758 <_CORE_message_queue_Submit> 400079a8: b0 10 20 00 clr %i0 RTEMS_INLINE_ROUTINE int _POSIX_Zero_or_minus_one_plus_errno( Status_Control status ) { if ( status == STATUS_SUCCESSFUL ) { 400079ac: 80 92 00 09 orcc %o0, %o1, %g0 400079b0: 12 80 00 04 bne 400079c0 <_POSIX_Message_queue_Send_support+0x98> 400079b4: 01 00 00 00 nop _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 ); } 400079b8: 81 c7 e0 08 ret 400079bc: 81 e8 00 00 restore return 0; } rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) ); 400079c0: 40 00 2a 70 call 40012380 <__errno> 400079c4: d2 27 bf d4 st %o1, [ %fp + -44 ] return STATUS_GET_POSIX( status ); 400079c8: d2 07 bf d4 ld [ %fp + -44 ], %o1 400079cc: 93 3a 60 08 sra %o1, 8, %o1 rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) ); 400079d0: d2 22 00 00 st %o1, [ %o0 ] 400079d4: 81 c7 e0 08 ret 400079d8: 91 e8 3f ff restore %g0, -1, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 400079dc: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400079e0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400079e4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); 400079e8: 40 00 2a 66 call 40012380 <__errno> 400079ec: b0 10 3f ff mov -1, %i0 ! ffffffff 400079f0: 82 10 20 09 mov 9, %g1 400079f4: c2 22 00 00 st %g1, [ %o0 ] 400079f8: 81 c7 e0 08 ret 400079fc: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); 40007a00: 40 00 2a 60 call 40012380 <__errno> 40007a04: b0 10 3f ff mov -1, %i0 40007a08: 82 10 20 16 mov 0x16, %g1 40007a0c: c2 22 00 00 st %g1, [ %o0 ] 40007a10: 81 c7 e0 08 ret 40007a14: 81 e8 00 00 restore =============================================================================== 4001bcd0 <_POSIX_Mutex_Default_attributes>: 4001bcd0: 00 00 00 01 00 00 00 00 7f ff ff ff 00 00 00 00 ................ 4001bce0: 00 00 00 03 00 00 00 00 ........ =============================================================================== 40009a10 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, const struct timespec *abstime, Thread_queue_Enqueue_callout enqueue_callout ) { 40009a10: 9d e3 bf 70 save %sp, -144, %sp Thread_queue_Context queue_context; Thread_Control *executing; Status_Control status; the_mutex = _POSIX_Mutex_Get( mutex ); POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags ); 40009a14: 80 a6 20 00 cmp %i0, 0 40009a18: 02 80 00 3f be 40009b14 <_POSIX_Mutex_Lock_support+0x104> 40009a1c: 05 25 87 04 sethi %hi(0x961c1000), %g2 40009a20: fa 06 00 00 ld [ %i0 ], %i5 40009a24: 82 1e 00 1d xor %i0, %i5, %g1 40009a28: 84 10 a3 b8 or %g2, 0x3b8, %g2 40009a2c: 82 18 40 02 xor %g1, %g2, %g1 40009a30: 80 88 7f f8 btst -8, %g1 40009a34: 12 80 00 33 bne 40009b00 <_POSIX_Mutex_Lock_support+0xf0> 40009a38: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40009a3c: 91 d0 20 09 ta 9 <== NOT EXECUTED ) { #if defined( RTEMS_SMP ) context->Lock_context.isr_level = level; #else context->isr_level = level; 40009a40: c2 27 bf dc st %g1, [ %fp + -36 ] 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 ) ) { 40009a44: 82 8f 60 03 andcc %i5, 3, %g1 queue_context->enqueue_callout = enqueue_callout; 40009a48: f4 27 bf e4 st %i2, [ %fp + -28 ] queue_context->Timeout.arg = arg; 40009a4c: f2 27 bf e8 st %i1, [ %fp + -24 ] 40009a50: 02 80 00 34 be 40009b20 <_POSIX_Mutex_Lock_support+0x110> 40009a54: d0 01 a0 20 ld [ %g6 + 0x20 ], %o0 40009a58: 80 a0 60 02 cmp %g1, 2 40009a5c: 12 80 00 10 bne 40009a9c <_POSIX_Mutex_Lock_support+0x8c> 40009a60: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 { Thread_Control *owner; owner = _POSIX_Mutex_Get_owner( the_mutex ); if ( owner == NULL ) { 40009a64: 80 a0 60 00 cmp %g1, 0 40009a68: 02 80 00 43 be 40009b74 <_POSIX_Mutex_Lock_support+0x164> 40009a6c: 80 a2 00 01 cmp %o0, %g1 executing, queue_context ); } if ( owner == executing ) { 40009a70: 02 80 00 18 be 40009ad0 <_POSIX_Mutex_Lock_support+0xc0> <== NEVER TAKEN 40009a74: 94 10 00 08 mov %o0, %o2 status = _POSIX_Mutex_Lock_nested( the_mutex, flags ); _POSIX_Mutex_Release( the_mutex, queue_context ); return status; } return _POSIX_Mutex_Seize_slow( 40009a78: 98 07 bf dc add %fp, -36, %o4 40009a7c: 96 10 00 19 mov %i1, %o3 40009a80: 90 10 00 18 mov %i0, %o0 40009a84: 13 10 00 6f sethi %hi(0x4001bc00), %o1 40009a88: 7f ff ff ca call 400099b0 <_POSIX_Mutex_Seize_slow> 40009a8c: 92 12 61 68 or %o1, 0x168, %o1 ! 4001bd68 <_Thread_queue_Operations_priority> 40009a90: 93 3a 60 08 sra %o1, 8, %o1 ); break; } return _POSIX_Get_error( status ); } 40009a94: 81 c7 e0 08 ret 40009a98: 91 e8 00 09 restore %g0, %o1, %o0 if ( owner == NULL ) { 40009a9c: 80 a0 60 00 cmp %g1, 0 40009aa0: 02 80 00 2e be 40009b58 <_POSIX_Mutex_Lock_support+0x148> 40009aa4: 80 a2 00 01 cmp %o0, %g1 if ( owner == executing ) { 40009aa8: 02 80 00 0a be 40009ad0 <_POSIX_Mutex_Lock_support+0xc0> 40009aac: 94 10 00 08 mov %o0, %o2 return _POSIX_Mutex_Seize_slow( 40009ab0: 98 07 bf dc add %fp, -36, %o4 40009ab4: 96 10 00 19 mov %i1, %o3 40009ab8: 90 10 00 18 mov %i0, %o0 40009abc: 13 10 00 6f sethi %hi(0x4001bc00), %o1 40009ac0: 7f ff ff bc call 400099b0 <_POSIX_Mutex_Seize_slow> 40009ac4: 92 12 61 54 or %o1, 0x154, %o1 ! 4001bd54 <_Thread_queue_Operations_priority_inherit> return _POSIX_Get_error( status ); 40009ac8: 10 80 00 0c b 40009af8 <_POSIX_Mutex_Lock_support+0xe8> 40009acc: 93 3a 60 08 sra %o1, 8, %o1 if ( _POSIX_Mutex_Is_recursive( flags ) ) { 40009ad0: 80 8f 60 04 btst 4, %i5 40009ad4: 02 80 00 06 be 40009aec <_POSIX_Mutex_Lock_support+0xdc> <== ALWAYS TAKEN 40009ad8: 92 10 20 2d mov 0x2d, %o1 ++the_mutex->Recursive.nest_level; 40009adc: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 40009ae0: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009ae4: c2 26 20 18 st %g1, [ %i0 + 0x18 ] <== NOT EXECUTED 40009ae8: 92 10 20 00 clr %o1 <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40009aec: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40009af0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40009af4: 01 00 00 00 nop } 40009af8: 81 c7 e0 08 ret 40009afc: 91 e8 00 09 restore %g0, %o1, %o0 POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags ); 40009b00: 40 00 00 b6 call 40009dd8 <_POSIX_Mutex_Auto_initialization> 40009b04: 90 10 00 18 mov %i0, %o0 40009b08: 80 a2 20 00 cmp %o0, 0 40009b0c: 12 bf ff cc bne 40009a3c <_POSIX_Mutex_Lock_support+0x2c> 40009b10: 01 00 00 00 nop 40009b14: 92 10 20 16 mov 0x16, %o1 ! 16 <_TLS_Alignment+0x15> } 40009b18: 81 c7 e0 08 ret 40009b1c: 91 e8 00 09 restore %g0, %o1, %o0 40009b20: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ( owner == NULL ) { 40009b24: 80 a0 60 00 cmp %g1, 0 40009b28: 02 80 00 0c be 40009b58 <_POSIX_Mutex_Lock_support+0x148> 40009b2c: 80 a2 00 01 cmp %o0, %g1 if ( owner == executing ) { 40009b30: 02 bf ff e8 be 40009ad0 <_POSIX_Mutex_Lock_support+0xc0> <== NEVER TAKEN 40009b34: 94 10 00 08 mov %o0, %o2 return _POSIX_Mutex_Seize_slow( 40009b38: 98 07 bf dc add %fp, -36, %o4 40009b3c: 96 10 00 19 mov %i1, %o3 40009b40: 90 10 00 18 mov %i0, %o0 40009b44: 13 10 00 6f sethi %hi(0x4001bc00), %o1 40009b48: 7f ff ff 9a call 400099b0 <_POSIX_Mutex_Seize_slow> 40009b4c: 92 12 61 7c or %o1, 0x17c, %o1 ! 4001bd7c <_Thread_queue_Operations_FIFO> 40009b50: 10 bf ff ea b 40009af8 <_POSIX_Mutex_Lock_support+0xe8> 40009b54: 93 3a 60 08 sra %o1, 8, %o1 the_mutex->Recursive.Mutex.Queue.Queue.owner = owner; 40009b58: d0 26 20 10 st %o0, [ %i0 + 0x10 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40009b5c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40009b60: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40009b64: 01 00 00 00 nop 40009b68: 92 10 20 00 clr %o1 ! 0 40009b6c: 81 c7 e0 08 ret 40009b70: 91 e8 00 09 restore %g0, %o1, %o0 if ( 40009b74: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 queue_context->Priority.update_count = 0; 40009b78: c0 27 bf f0 clr [ %fp + -16 ] 40009b7c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 40009b80: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40009b84: 80 a0 c0 02 cmp %g3, %g2 40009b88: 18 80 00 09 bgu 40009bac <_POSIX_Mutex_Lock_support+0x19c> <== NEVER TAKEN 40009b8c: 01 00 00 00 nop 40009b90: 32 80 00 0c bne,a 40009bc0 <_POSIX_Mutex_Lock_support+0x1b0> <== NEVER TAKEN 40009b94: d0 26 20 10 st %o0, [ %i0 + 0x10 ] <== NOT EXECUTED 40009b98: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 40009b9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009ba0: 80 a0 80 01 cmp %g2, %g1 40009ba4: 28 80 00 07 bleu,a 40009bc0 <_POSIX_Mutex_Lock_support+0x1b0> 40009ba8: d0 26 20 10 st %o0, [ %i0 + 0x10 ] register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40009bac: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40009bb0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40009bb4: 01 00 00 00 nop 40009bb8: 10 bf ff d8 b 40009b18 <_POSIX_Mutex_Lock_support+0x108> 40009bbc: 92 10 20 16 mov 0x16, %o1 ! 16 <_TLS_Alignment+0x15> _Thread_Priority_add( 40009bc0: 92 06 20 20 add %i0, 0x20, %o1 40009bc4: 40 00 13 83 call 4000e9d0 <_Thread_Priority_add> 40009bc8: 94 07 bf dc add %fp, -36, %o2 const ISR_lock_Context *lock_context ) { uint32_t disable_level; disable_level = cpu_self->thread_dispatch_disable_level; 40009bcc: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 <== NOT EXECUTED _Profiling_Thread_dispatch_disable_critical( cpu_self, disable_level, lock_context ); cpu_self->thread_dispatch_disable_level = disable_level + 1; 40009bd0: 82 00 60 01 inc %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_critical( const ISR_lock_Context *lock_context ) { return _Thread_Dispatch_disable_with_CPU( _Per_CPU_Get(), lock_context ); 40009bd4: ba 10 00 06 mov %g6, %i5 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = disable_level + 1; 40009bd8: c2 21 a0 18 st %g1, [ %g6 + 0x18 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40009bdc: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40009be0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40009be4: 01 00 00 00 nop _Thread_Priority_update( queue_context ); 40009be8: 40 00 13 8b call 4000ea14 <_Thread_Priority_update> 40009bec: 90 07 bf dc add %fp, -36, %o0 * * @param[in] cpu_self The current processor. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_enable( Per_CPU_Control *cpu_self ) { uint32_t disable_level = cpu_self->thread_dispatch_disable_level; 40009bf0: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 if ( disable_level == 1 ) { 40009bf4: 80 a0 60 01 cmp %g1, 1 40009bf8: 02 80 00 05 be 40009c0c <_POSIX_Mutex_Lock_support+0x1fc> <== ALWAYS TAKEN 40009bfc: 82 00 7f ff add %g1, -1, %g1 } _ISR_Local_enable( level ); } else { _Assert( disable_level > 0 ); cpu_self->thread_dispatch_disable_level = disable_level - 1; 40009c00: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009c04: c2 27 60 18 st %g1, [ %i5 + 0x18 ] <== NOT EXECUTED 40009c08: 30 bf ff bc b,a 40009af8 <_POSIX_Mutex_Lock_support+0xe8> <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40009c0c: 91 d0 20 09 ta 9 <== NOT EXECUTED if ( 40009c10: c4 0f 60 1c ldub [ %i5 + 0x1c ], %g2 40009c14: 80 a0 a0 00 cmp %g2, 0 40009c18: 32 80 00 07 bne,a 40009c34 <_POSIX_Mutex_Lock_support+0x224> <== NEVER TAKEN 40009c1c: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = 0; 40009c20: c0 27 60 18 clr [ %i5 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40009c24: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40009c28: 01 00 00 00 nop 40009c2c: 10 bf ff b3 b 40009af8 <_POSIX_Mutex_Lock_support+0xe8> 40009c30: 92 10 20 00 clr %o1 ! 0 _Thread_Do_dispatch( cpu_self, level ); 40009c34: c2 27 bf d4 st %g1, [ %fp + -44 ] <== NOT EXECUTED 40009c38: 40 00 13 fe call 4000ec30 <_Thread_Do_dispatch> <== NOT EXECUTED 40009c3c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 40009c40: 10 bf ff f9 b 40009c24 <_POSIX_Mutex_Lock_support+0x214> <== NOT EXECUTED 40009c44: c2 07 bf d4 ld [ %fp + -44 ], %g1 <== NOT EXECUTED =============================================================================== 400099b0 <_POSIX_Mutex_Seize_slow>: const Thread_queue_Operations *operations, Thread_Control *executing, const struct timespec *abstime, Thread_queue_Context *queue_context ) { 400099b0: 9d e3 bf a0 save %sp, -96, %sp if ( (uintptr_t) abstime != POSIX_MUTEX_ABSTIME_TRY_LOCK ) { 400099b4: 80 a6 e0 01 cmp %i3, 1 400099b8: 02 80 00 0f be 400099f4 <_POSIX_Mutex_Seize_slow+0x44> 400099bc: 82 10 20 01 mov 1, %g1 queue_context->thread_state = thread_state; 400099c0: c2 27 20 04 st %g1, [ %i4 + 4 ] queue_context->deadlock_callout = deadlock_callout; 400099c4: 03 10 00 3c sethi %hi(0x4000f000), %g1 400099c8: 82 10 63 64 or %g1, 0x364, %g1 ! 4000f364 <_Thread_queue_Deadlock_status> 400099cc: c2 27 20 20 st %g1, [ %i4 + 0x20 ] ); _Thread_queue_Context_set_deadlock_callout( queue_context, _Thread_queue_Deadlock_status ); _Thread_queue_Enqueue( 400099d0: 92 10 00 19 mov %i1, %o1 400099d4: 90 06 20 0c add %i0, 0xc, %o0 400099d8: 96 10 00 1c mov %i4, %o3 400099dc: 94 10 00 1a mov %i2, %o2 400099e0: 40 00 16 69 call 4000f384 <_Thread_queue_Enqueue> 400099e4: b0 10 20 00 clr %i0 RTEMS_INLINE_ROUTINE Status_Control _Thread_Wait_get_status( const Thread_Control *the_thread ) { return (Status_Control) the_thread->Wait.return_code; 400099e8: f2 06 a0 4c ld [ %i2 + 0x4c ], %i1 return _Thread_Wait_get_status( executing ); } else { _POSIX_Mutex_Release( the_mutex, queue_context ); return STATUS_UNAVAILABLE; } } 400099ec: 81 c7 e0 08 ret 400099f0: 81 e8 00 00 restore register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 400099f4: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400099f8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400099fc: 01 00 00 00 nop 40009a00: 33 00 00 04 sethi %hi(0x1000), %i1 40009a04: b2 16 60 0d or %i1, 0xd, %i1 ! 100d <_Configuration_Interrupt_stack_size+0xd> 40009a08: 81 c7 e0 08 ret 40009a0c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 4000e138 <_POSIX_Priority_To_core>: Priority_Control _POSIX_Priority_To_core( const Scheduler_Control *scheduler, int posix_priority, bool *valid ) { 4000e138: 9d e3 bf a0 save %sp, -96, %sp Priority_Control core_posix_priority; Priority_Control core_priority; core_posix_priority = (Priority_Control) posix_priority; core_priority = scheduler->maximum_priority - core_posix_priority; 4000e13c: f8 1e 20 40 ldd [ %i0 + 0x40 ], %i4 core_posix_priority = (Priority_Control) posix_priority; 4000e140: 83 3e 60 1f sra %i1, 0x1f, %g1 4000e144: 86 10 00 19 mov %i1, %g3 4000e148: 84 10 00 01 mov %g1, %g2 *valid = ( posix_priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY && core_posix_priority < scheduler->maximum_priority ); 4000e14c: 80 a7 00 01 cmp %i4, %g1 4000e150: 18 80 00 05 bgu 4000e164 <_POSIX_Priority_To_core+0x2c> <== NEVER TAKEN 4000e154: 88 10 20 01 mov 1, %g4 4000e158: 02 80 00 11 be 4000e19c <_POSIX_Priority_To_core+0x64> 4000e15c: 80 a7 40 19 cmp %i5, %i1 4000e160: 88 10 20 00 clr %g4 4000e164: 82 20 40 19 sub %g1, %i1, %g1 4000e168: 83 30 60 1f srl %g1, 0x1f, %g1 4000e16c: 82 08 40 04 and %g1, %g4, %g1 *valid = ( posix_priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY 4000e170: c2 2e 80 00 stb %g1, [ %i2 ] core_priority = scheduler->maximum_priority - core_posix_priority; 4000e174: b6 a7 40 03 subcc %i5, %g3, %i3 return ( *scheduler->Operations.map_priority )( scheduler, priority ); 4000e178: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 4000e17c: b4 67 00 02 subx %i4, %g2, %i2 4000e180: 94 10 00 1b mov %i3, %o2 4000e184: 92 10 00 1a mov %i2, %o1 4000e188: 9f c0 40 00 call %g1 4000e18c: 90 10 00 18 mov %i0, %o0 return _Scheduler_Map_priority( scheduler, core_priority ); } 4000e190: b0 10 00 08 mov %o0, %i0 4000e194: 81 c7 e0 08 ret 4000e198: 93 e8 00 09 restore %g0, %o1, %o1 && core_posix_priority < scheduler->maximum_priority ); 4000e19c: 38 bf ff f3 bgu,a 4000e168 <_POSIX_Priority_To_core+0x30> 4000e1a0: 82 20 40 19 sub %g1, %i1, %g1 4000e1a4: 10 bf ff f0 b 4000e164 <_POSIX_Priority_To_core+0x2c> 4000e1a8: 88 10 20 00 clr %g4 =============================================================================== 40006dfc <_POSIX_Shm_Object_create_from_heap>: int _POSIX_Shm_Object_create_from_heap( POSIX_Shm_Object *shm_obj, size_t size ) { 40006dfc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED void *p = calloc( 1, size ); /* get zero'd memory */ 40006e00: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 40006e04: 7f ff f5 96 call 4000445c <== NOT EXECUTED 40006e08: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if ( p != NULL ) { 40006e0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006e10: 02 80 00 06 be 40006e28 <_POSIX_Shm_Object_create_from_heap+0x2c> <== NOT EXECUTED 40006e14: 01 00 00 00 nop <== NOT EXECUTED shm_obj->handle = p; 40006e18: d0 26 00 00 st %o0, [ %i0 ] <== NOT EXECUTED shm_obj->size = size; 40006e1c: f2 26 20 04 st %i1, [ %i0 + 4 ] <== NOT EXECUTED } else { errno = EIO; } return 0; } 40006e20: 81 c7 e0 08 ret <== NOT EXECUTED 40006e24: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED errno = EIO; 40006e28: 40 00 24 2c call 4000fed8 <__errno> <== NOT EXECUTED 40006e2c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40006e30: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40006e34: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40006e38: 81 c7 e0 08 ret <== NOT EXECUTED 40006e3c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40007e00 <_POSIX_Shm_Object_create_from_workspace>: int _POSIX_Shm_Object_create_from_workspace( POSIX_Shm_Object *shm_obj, size_t size ) { 40007e00: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED shm_obj->handle = _Workspace_Allocate_or_fatal_error( size ); 40007e04: 40 00 16 92 call 4000d84c <_Workspace_Allocate_or_fatal_error> <== NOT EXECUTED 40007e08: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007e0c: d0 26 00 00 st %o0, [ %i0 ] <== NOT EXECUTED { 40007e10: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED memset( shm_obj->handle, 0, size ); 40007e14: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40007e18: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007e1c: 40 00 23 3c call 40010b0c <== NOT EXECUTED 40007e20: b0 10 20 00 clr %i0 <== NOT EXECUTED shm_obj->size = size; 40007e24: f2 27 60 04 st %i1, [ %i5 + 4 ] <== NOT EXECUTED return 0; } 40007e28: 81 c7 e0 08 ret <== NOT EXECUTED 40007e2c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40006f44 <_POSIX_Shm_Object_mmap_from_heap>: size_t len, int prot, off_t off ) { if ( shm_obj == NULL || shm_obj->handle == NULL ) 40006f44: 80 a2 20 00 cmp %o0, 0 40006f48: 02 80 00 11 be 40006f8c <_POSIX_Shm_Object_mmap_from_heap+0x48> <== NEVER TAKEN 40006f4c: 86 10 00 0c mov %o4, %g3 40006f50: c2 02 00 00 ld [ %o0 ], %g1 40006f54: 80 a0 60 00 cmp %g1, 0 40006f58: 02 80 00 09 be 40006f7c <_POSIX_Shm_Object_mmap_from_heap+0x38> <== NEVER TAKEN 40006f5c: 9a 83 00 09 addcc %o4, %o1, %o5 return 0; /* This is already checked by mmap. Maybe make it a debug assert? */ if ( shm_obj->size < len + off ) { 40006f60: 98 42 e0 00 addx %o3, 0, %o4 40006f64: 80 a3 20 00 cmp %o4, 0 40006f68: 14 80 00 09 bg 40006f8c <_POSIX_Shm_Object_mmap_from_heap+0x48> <== NEVER TAKEN 40006f6c: c8 02 20 04 ld [ %o0 + 4 ], %g4 40006f70: 02 80 00 05 be 40006f84 <_POSIX_Shm_Object_mmap_from_heap+0x40> <== ALWAYS TAKEN 40006f74: 80 a3 40 04 cmp %o5, %g4 return NULL; } return (char*)shm_obj->handle + off; 40006f78: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED } 40006f7c: 81 c3 e0 08 retl 40006f80: 90 10 00 01 mov %g1, %o0 if ( shm_obj->size < len + off ) { 40006f84: 08 bf ff fe bleu 40006f7c <_POSIX_Shm_Object_mmap_from_heap+0x38> <== ALWAYS TAKEN 40006f88: 82 00 40 03 add %g1, %g3, %g1 return 0; 40006f8c: 82 10 20 00 clr %g1 <== NOT EXECUTED } 40006f90: 81 c3 e0 08 retl <== NOT EXECUTED 40006f94: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED =============================================================================== 40007f08 <_POSIX_Shm_Object_mmap_from_workspace>: size_t len, int prot, off_t off ) { if ( shm_obj == NULL || shm_obj->handle == NULL ) 40007f08: 80 a2 20 00 cmp %o0, 0 40007f0c: 02 80 00 11 be 40007f50 <_POSIX_Shm_Object_mmap_from_workspace+0x48> <== NEVER TAKEN 40007f10: 86 10 00 0c mov %o4, %g3 40007f14: c2 02 00 00 ld [ %o0 ], %g1 40007f18: 80 a0 60 00 cmp %g1, 0 40007f1c: 02 80 00 09 be 40007f40 <_POSIX_Shm_Object_mmap_from_workspace+0x38> <== NEVER TAKEN 40007f20: 9a 83 00 09 addcc %o4, %o1, %o5 return 0; /* This is already checked by mmap. Maybe make it a debug assert? */ if ( shm_obj->size < len + off ) { 40007f24: 98 42 e0 00 addx %o3, 0, %o4 40007f28: 80 a3 20 00 cmp %o4, 0 40007f2c: 14 80 00 09 bg 40007f50 <_POSIX_Shm_Object_mmap_from_workspace+0x48> <== NEVER TAKEN 40007f30: c8 02 20 04 ld [ %o0 + 4 ], %g4 40007f34: 02 80 00 05 be 40007f48 <_POSIX_Shm_Object_mmap_from_workspace+0x40> <== ALWAYS TAKEN 40007f38: 80 a3 40 04 cmp %o5, %g4 return NULL; } return (char*)shm_obj->handle + off; 40007f3c: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED } 40007f40: 81 c3 e0 08 retl 40007f44: 90 10 00 01 mov %g1, %o0 if ( shm_obj->size < len + off ) { 40007f48: 08 bf ff fe bleu 40007f40 <_POSIX_Shm_Object_mmap_from_workspace+0x38> <== ALWAYS TAKEN 40007f4c: 82 00 40 03 add %g1, %g3, %g1 return 0; 40007f50: 82 10 20 00 clr %g1 <== NOT EXECUTED } 40007f54: 81 c3 e0 08 retl <== NOT EXECUTED 40007f58: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED =============================================================================== 40006efc <_POSIX_Shm_Object_read_from_heap>: int _POSIX_Shm_Object_read_from_heap( POSIX_Shm_Object *shm_obj, void *buf, size_t count ) { 40006efc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if ( shm_obj == NULL || shm_obj->handle == NULL ) 40006f00: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40006f04: 02 80 00 0e be 40006f3c <_POSIX_Shm_Object_read_from_heap+0x40> <== NOT EXECUTED 40006f08: 94 10 20 00 clr %o2 <== NOT EXECUTED 40006f0c: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 40006f10: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 40006f14: 02 80 00 0a be 40006f3c <_POSIX_Shm_Object_read_from_heap+0x40> <== NOT EXECUTED 40006f18: 01 00 00 00 nop <== NOT EXECUTED 40006f1c: f0 06 20 04 ld [ %i0 + 4 ], %i0 <== NOT EXECUTED 40006f20: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 40006f24: 38 80 00 02 bgu,a 40006f2c <_POSIX_Shm_Object_read_from_heap+0x30> <== NOT EXECUTED 40006f28: b0 10 00 1a mov %i2, %i0 <== NOT EXECUTED if ( shm_obj->size < count ) { count = shm_obj->size; } memcpy( buf, shm_obj->handle, count ); 40006f2c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40006f30: 40 00 24 18 call 4000ff90 <== NOT EXECUTED 40006f34: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED return count; 40006f38: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED } 40006f3c: 81 c7 e0 08 ret <== NOT EXECUTED 40006f40: 91 e8 00 0a restore %g0, %o2, %o0 <== NOT EXECUTED =============================================================================== 40007ec0 <_POSIX_Shm_Object_read_from_workspace>: int _POSIX_Shm_Object_read_from_workspace( POSIX_Shm_Object *shm_obj, void *buf, size_t count ) { 40007ec0: 9d e3 bf a0 save %sp, -96, %sp if ( shm_obj == NULL || shm_obj->handle == NULL ) 40007ec4: 80 a6 20 00 cmp %i0, 0 40007ec8: 02 80 00 0e be 40007f00 <_POSIX_Shm_Object_read_from_workspace+0x40> <== NEVER TAKEN 40007ecc: 94 10 20 00 clr %o2 40007ed0: d2 06 00 00 ld [ %i0 ], %o1 40007ed4: 80 a2 60 00 cmp %o1, 0 40007ed8: 02 80 00 0a be 40007f00 <_POSIX_Shm_Object_read_from_workspace+0x40> <== NEVER TAKEN 40007edc: 01 00 00 00 nop 40007ee0: f0 06 20 04 ld [ %i0 + 4 ], %i0 40007ee4: 80 a6 00 1a cmp %i0, %i2 40007ee8: 38 80 00 02 bgu,a 40007ef0 <_POSIX_Shm_Object_read_from_workspace+0x30> <== NEVER TAKEN 40007eec: b0 10 00 1a mov %i2, %i0 <== NOT EXECUTED if ( shm_obj->size < count ) { count = shm_obj->size; } memcpy( buf, shm_obj->handle, count ); 40007ef0: 94 10 00 18 mov %i0, %o2 40007ef4: 40 00 22 ca call 40010a1c 40007ef8: 90 10 00 19 mov %i1, %o0 return count; 40007efc: 94 10 00 18 mov %i0, %o2 } 40007f00: 81 c7 e0 08 ret 40007f04: 91 e8 00 0a restore %g0, %o2, %o0 =============================================================================== 40006e70 <_POSIX_Shm_Object_resize_from_heap>: int _POSIX_Shm_Object_resize_from_heap( POSIX_Shm_Object *shm_obj, size_t size ) { 40006e70: 9d e3 bf a0 save %sp, -96, %sp void *p; int err = 0; if ( size < shm_obj->size ) { 40006e74: d4 06 20 04 ld [ %i0 + 4 ], %o2 40006e78: 80 a2 80 19 cmp %o2, %i1 40006e7c: 18 80 00 0f bgu 40006eb8 <_POSIX_Shm_Object_resize_from_heap+0x48> <== NEVER TAKEN 40006e80: d0 06 00 00 ld [ %i0 ], %o0 /* zero out if shrinking */ p = (void*)((uintptr_t)shm_obj->handle + (uintptr_t)size); memset( p, 0, shm_obj->size - size ); } p = realloc( shm_obj->handle, size ); 40006e84: 40 00 1c ce call 4000e1bc 40006e88: 92 10 00 19 mov %i1, %o1 if ( p != NULL ) { 40006e8c: 82 92 20 00 orcc %o0, 0, %g1 40006e90: 02 80 00 14 be 40006ee0 <_POSIX_Shm_Object_resize_from_heap+0x70> <== NEVER TAKEN 40006e94: 01 00 00 00 nop shm_obj->handle = p; 40006e98: c2 26 00 00 st %g1, [ %i0 ] if ( size > shm_obj->size ) { 40006e9c: d4 06 20 04 ld [ %i0 + 4 ], %o2 40006ea0: 80 a2 80 19 cmp %o2, %i1 40006ea4: 2a 80 00 11 bcs,a 40006ee8 <_POSIX_Shm_Object_resize_from_heap+0x78> <== ALWAYS TAKEN 40006ea8: 94 26 40 0a sub %i1, %o2, %o2 /* initialize added memory */ memset( p, 0, size - shm_obj->size ); } shm_obj->size = size; 40006eac: f2 26 20 04 st %i1, [ %i0 + 4 ] <== NOT EXECUTED 40006eb0: 81 c7 e0 08 ret <== NOT EXECUTED 40006eb4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED memset( p, 0, shm_obj->size - size ); 40006eb8: 94 22 80 19 sub %o2, %i1, %o2 <== NOT EXECUTED 40006ebc: 92 10 20 00 clr %o1 <== NOT EXECUTED 40006ec0: 40 00 24 70 call 40010080 <== NOT EXECUTED 40006ec4: 90 02 00 19 add %o0, %i1, %o0 <== NOT EXECUTED 40006ec8: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED p = realloc( shm_obj->handle, size ); 40006ecc: 40 00 1c bc call 4000e1bc <== NOT EXECUTED 40006ed0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if ( p != NULL ) { 40006ed4: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40006ed8: 32 bf ff f1 bne,a 40006e9c <_POSIX_Shm_Object_resize_from_heap+0x2c> <== NOT EXECUTED 40006edc: c2 26 00 00 st %g1, [ %i0 ] <== NOT EXECUTED } else { err = EIO; } return err; } 40006ee0: 81 c7 e0 08 ret <== NOT EXECUTED 40006ee4: 91 e8 20 05 restore %g0, 5, %o0 <== NOT EXECUTED memset( p, 0, size - shm_obj->size ); 40006ee8: 40 00 24 66 call 40010080 40006eec: 92 10 20 00 clr %o1 shm_obj->size = size; 40006ef0: f2 26 20 04 st %i1, [ %i0 + 4 ] 40006ef4: 81 c7 e0 08 ret 40006ef8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40007e60 <_POSIX_Shm_Object_resize_from_workspace>: int _POSIX_Shm_Object_resize_from_workspace( POSIX_Shm_Object *shm_obj, size_t size ) { 40007e60: 9d e3 bf a0 save %sp, -96, %sp int err; if ( size == 0 ) { 40007e64: 80 a6 60 00 cmp %i1, 0 40007e68: 02 80 00 14 be 40007eb8 <_POSIX_Shm_Object_resize_from_workspace+0x58> <== NEVER TAKEN 40007e6c: ba 10 00 18 mov %i0, %i5 err = _POSIX_Shm_Object_delete_from_workspace( shm_obj ); } else if ( shm_obj->handle == NULL && shm_obj->size == 0 ) { 40007e70: c2 06 00 00 ld [ %i0 ], %g1 40007e74: 80 a0 60 00 cmp %g1, 0 40007e78: 12 80 00 0e bne 40007eb0 <_POSIX_Shm_Object_resize_from_workspace+0x50> <== NEVER TAKEN 40007e7c: b0 10 20 05 mov 5, %i0 40007e80: c2 07 60 04 ld [ %i5 + 4 ], %g1 40007e84: 80 a0 60 00 cmp %g1, 0 40007e88: 12 80 00 0a bne 40007eb0 <_POSIX_Shm_Object_resize_from_workspace+0x50> <== NEVER TAKEN 40007e8c: 01 00 00 00 nop shm_obj->handle = _Workspace_Allocate_or_fatal_error( size ); 40007e90: 40 00 16 6f call 4000d84c <_Workspace_Allocate_or_fatal_error> 40007e94: 90 10 00 19 mov %i1, %o0 40007e98: d0 27 40 00 st %o0, [ %i5 ] memset( shm_obj->handle, 0, size ); 40007e9c: 94 10 00 19 mov %i1, %o2 40007ea0: 92 10 20 00 clr %o1 40007ea4: 40 00 23 1a call 40010b0c 40007ea8: b0 10 20 00 clr %i0 shm_obj->size = size; 40007eac: f2 27 60 04 st %i1, [ %i5 + 4 ] } else { /* Refuse to resize a workspace object. */ err = EIO; } return err; } 40007eb0: 81 c7 e0 08 ret 40007eb4: 81 e8 00 00 restore err = _POSIX_Shm_Object_delete_from_workspace( shm_obj ); 40007eb8: 7f ff ff de call 40007e30 <_POSIX_Shm_Object_delete_from_workspace> <== NOT EXECUTED 40007ebc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40017c60 <_POSIX_Threads_Default_attributes>: 40017c60: 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 ................ 40017c70: 00 00 00 01 00 00 00 01 00 00 00 02 00 00 00 00 ................ ... 40017cac: 00 00 00 01 00 00 00 01 00 00 00 04 40 01 7c bc ............@.|. 40017cbc: ff ff ff ff .... =============================================================================== 40006b64 <_POSIX_Threads_Initialize_user_threads_body>: #include #include #include void _POSIX_Threads_Initialize_user_threads_body(void) { 40006b64: 9d e3 bf 38 save %sp, -200, %sp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 40006b68: 03 10 00 65 sethi %hi(0x40019400), %g1 40006b6c: 82 10 60 44 or %g1, 0x44, %g1 ! 40019444 40006b70: fa 00 60 1c ld [ %g1 + 0x1c ], %i5 maximum = Configuration_POSIX_API.number_of_initialization_threads; if ( !user_threads ) 40006b74: 80 a7 60 00 cmp %i5, 0 40006b78: 02 80 00 1f be 40006bf4 <_POSIX_Threads_Initialize_user_threads_body+0x90> <== NEVER TAKEN 40006b7c: 01 00 00 00 nop maximum = Configuration_POSIX_API.number_of_initialization_threads; 40006b80: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 40006b84: 80 a6 a0 00 cmp %i2, 0 40006b88: 02 80 00 1b be 40006bf4 <_POSIX_Threads_Initialize_user_threads_body+0x90> <== NEVER TAKEN 40006b8c: b8 10 20 00 clr %i4 ); if ( eno != 0 ) { _Internal_error( INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED ); } if ( _Thread_Global_constructor == 0 ) { 40006b90: 37 10 00 6c sethi %hi(0x4001b000), %i3 eno = pthread_attr_init( &attr ); 40006b94: 40 00 1d d2 call 4000e2dc 40006b98: 90 07 bf a0 add %fp, -96, %o0 eno = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 40006b9c: 92 10 20 02 mov 2, %o1 40006ba0: 40 00 1d de call 4000e318 40006ba4: 90 07 bf a0 add %fp, -96, %o0 eno = pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 40006ba8: d2 07 60 04 ld [ %i5 + 4 ], %o1 40006bac: 40 00 1d ea call 4000e354 40006bb0: 90 07 bf a0 add %fp, -96, %o0 eno = pthread_create( 40006bb4: d4 07 40 00 ld [ %i5 ], %o2 40006bb8: 96 10 20 00 clr %o3 40006bbc: 92 07 bf a0 add %fp, -96, %o1 40006bc0: 7f ff fe d3 call 4000670c 40006bc4: 90 07 bf 9c add %fp, -100, %o0 if ( eno != 0 ) { 40006bc8: 80 a2 20 00 cmp %o0, 0 40006bcc: 12 80 00 0c bne 40006bfc <_POSIX_Threads_Initialize_user_threads_body+0x98> 40006bd0: c2 06 e2 50 ld [ %i3 + 0x250 ], %g1 if ( _Thread_Global_constructor == 0 ) { 40006bd4: 80 a0 60 00 cmp %g1, 0 40006bd8: 12 80 00 04 bne 40006be8 <_POSIX_Threads_Initialize_user_threads_body+0x84> 40006bdc: b8 07 20 01 inc %i4 _Thread_Global_constructor = thread_id; 40006be0: c2 07 bf 9c ld [ %fp + -100 ], %g1 40006be4: c2 26 e2 50 st %g1, [ %i3 + 0x250 ] for ( index=0 ; index < maximum ; index++ ) { 40006be8: 80 a6 80 1c cmp %i2, %i4 40006bec: 12 bf ff ea bne 40006b94 <_POSIX_Threads_Initialize_user_threads_body+0x30> <== NEVER TAKEN 40006bf0: ba 07 60 08 add %i5, 8, %i5 } } } 40006bf4: 81 c7 e0 08 ret 40006bf8: 81 e8 00 00 restore _Internal_error( INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED ); 40006bfc: 40 00 03 69 call 400079a0 <_Internal_error> 40006c00: 90 10 20 21 mov 0x21, %o0 40006c04: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 40006d80 <_POSIX_Threads_Sporadic_budget_callout>: { 40006d80: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED 40006d84: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40006d88: d2 06 21 5c ld [ %i0 + 0x15c ], %o1 <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006d8c: 91 d0 20 09 ta 9 <== NOT EXECUTED 40006d90: c2 27 bf dc st %g1, [ %fp + -36 ] the_thread->cpu_time_budget = UINT32_MAX; 40006d94: 82 10 3f ff mov -1, %g1 40006d98: c2 26 20 8c st %g1, [ %i0 + 0x8c ] if ( !_Priority_Node_is_active( &api->Sporadic.Low_priority ) ) { 40006d9c: c2 02 60 34 ld [ %o1 + 0x34 ], %g1 40006da0: 80 a0 7f ff cmp %g1, -1 40006da4: 02 80 00 09 be 40006dc8 <_POSIX_Threads_Sporadic_budget_callout+0x48> <== ALWAYS TAKEN 40006da8: 90 10 00 18 mov %i0, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40006dac: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006db0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006db4: 01 00 00 00 nop <== NOT EXECUTED _Thread_Priority_update( &queue_context ); 40006db8: 40 00 0e eb call 4000a964 <_Thread_Priority_update> <== NOT EXECUTED 40006dbc: 90 07 bf dc add %fp, -36, %o0 <== NOT EXECUTED } 40006dc0: 81 c7 e0 08 ret <== NOT EXECUTED 40006dc4: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Priority_add( 40006dc8: 94 07 bf dc add %fp, -36, %o2 40006dcc: 40 00 0e dc call 4000a93c <_Thread_Priority_add> 40006dd0: 92 02 60 28 add %o1, 0x28, %o1 _Thread_Priority_remove( 40006dd4: 94 07 bf dc add %fp, -36, %o2 40006dd8: 92 06 20 20 add %i0, 0x20, %o1 40006ddc: 40 00 0e dd call 4000a950 <_Thread_Priority_remove> 40006de0: 90 10 00 18 mov %i0, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40006de4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006de8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006dec: 01 00 00 00 nop _Thread_Priority_update( &queue_context ); 40006df0: 40 00 0e dd call 4000a964 <_Thread_Priority_update> 40006df4: 90 07 bf dc add %fp, -36, %o0 } 40006df8: 81 c7 e0 08 ret 40006dfc: 81 e8 00 00 restore =============================================================================== 40006ccc <_POSIX_Threads_Sporadic_timer>: { 40006ccc: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Context_clear_priority_updates( Thread_queue_Context *queue_context ) { queue_context->Priority.update_count = 0; 40006cd0: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED api = RTEMS_CONTAINER_OF( watchdog, POSIX_API_Control, Sporadic.Timer ); 40006cd4: ba 06 3f f8 add %i0, -8, %i5 <== NOT EXECUTED the_thread = api->Sporadic.thread; 40006cd8: f8 06 3f f8 ld [ %i0 + -8 ], %i4 <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006cdc: 91 d0 20 09 ta 9 <== NOT EXECUTED 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 ); 40006ce0: c2 27 bf dc st %g1, [ %fp + -36 ] if ( _Priority_Node_is_active( &api->Sporadic.Low_priority ) ) { 40006ce4: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 40006ce8: 80 a0 7f ff cmp %g1, -1 40006cec: 02 80 00 0b be 40006d18 <_POSIX_Threads_Sporadic_timer+0x4c> 40006cf0: 92 07 20 20 add %i4, 0x20, %o1 _Thread_Priority_add( 40006cf4: 90 10 00 1c mov %i4, %o0 40006cf8: 40 00 0f 11 call 4000a93c <_Thread_Priority_add> 40006cfc: 94 07 bf dc add %fp, -36, %o2 _Thread_Priority_remove( 40006d00: 94 07 bf dc add %fp, -36, %o2 40006d04: 92 06 20 20 add %i0, 0x20, %o1 40006d08: 40 00 0f 12 call 4000a950 <_Thread_Priority_remove> 40006d0c: 90 10 00 1c mov %i4, %o0 40006d10: 82 10 3f ff mov -1, %g1 40006d14: c2 27 60 34 st %g1, [ %i5 + 0x34 ] _Watchdog_Per_CPU_remove_ticks( &api->Sporadic.Timer ); 40006d18: b6 07 60 08 add %i5, 8, %i3 40006d1c: 11 10 00 6c sethi %hi(0x4001b000), %o0 40006d20: 92 10 00 1b mov %i3, %o1 40006d24: 40 00 17 27 call 4000c9c0 <_Watchdog_Remove> 40006d28: 90 12 22 38 or %o0, 0x238, %o0 _Timespec_To_ticks( &api->Sporadic.sched_ss_init_budget ); 40006d2c: 40 00 15 f5 call 4000c500 <_Timespec_To_ticks> 40006d30: 90 07 60 50 add %i5, 0x50, %o0 the_thread->cpu_time_budget = 40006d34: d0 27 20 8c st %o0, [ %i4 + 0x8c ] _Watchdog_Per_CPU_insert_ticks( 40006d38: b8 10 00 06 mov %g6, %i4 40006d3c: 40 00 15 f1 call 4000c500 <_Timespec_To_ticks> 40006d40: 90 07 60 40 add %i5, 0x40, %o0 expire = ticks + cpu->Watchdog.ticks; 40006d44: d4 1f 20 30 ldd [ %i4 + 0x30 ], %o2 _Watchdog_Insert(header, the_watchdog, expire); 40006d48: 86 82 c0 08 addcc %o3, %o0, %g3 40006d4c: 84 42 a0 00 addx %o2, 0, %g2 40006d50: 96 10 00 03 mov %g3, %o3 40006d54: 94 10 00 02 mov %g2, %o2 40006d58: 92 10 00 1b mov %i3, %o1 40006d5c: 40 00 16 f1 call 4000c920 <_Watchdog_Insert> 40006d60: 90 07 20 38 add %i4, 0x38, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40006d64: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006d68: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006d6c: 01 00 00 00 nop _Thread_Priority_update( &queue_context ); 40006d70: 40 00 0e fd call 4000a964 <_Thread_Priority_update> 40006d74: 90 07 bf dc add %fp, -36, %o0 } 40006d78: 81 c7 e0 08 ret 40006d7c: 81 e8 00 00 restore =============================================================================== 40007c88 <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Watchdog_Control *the_watchdog ) { 40007c88: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED POSIX_Timer_Control *ptimer; ISR_lock_Context lock_context; Per_CPU_Control *cpu; ptimer = RTEMS_CONTAINER_OF( the_watchdog, POSIX_Timer_Control, Timer ); 40007c8c: b0 06 3f f0 add %i0, -16, %i0 <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40007c90: 91 d0 20 09 ta 9 <== NOT EXECUTED _ISR_lock_ISR_disable( &lock_context ); cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context ); /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 40007c94: c4 06 20 74 ld [ %i0 + 0x74 ], %g2 40007c98: 84 00 a0 01 inc %g2 40007c9c: c4 26 20 74 st %g2, [ %i0 + 0x74 ] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 40007ca0: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 40007ca4: c4 06 20 54 ld [ %i0 + 0x54 ], %g2 40007ca8: 80 90 c0 02 orcc %g3, %g2, %g0 40007cac: 12 80 00 10 bne 40007cec <_POSIX_Timer_TSR+0x64> 40007cb0: 84 10 20 03 mov 3, %g2 40007cb4: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 40007cb8: 80 a0 a0 00 cmp %g2, 0 40007cbc: 12 80 00 0b bne 40007ce8 <_POSIX_Timer_TSR+0x60> <== ALWAYS TAKEN 40007cc0: 84 10 20 04 mov 4, %g2 ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { _POSIX_Timer_Insert( ptimer, cpu, ptimer->ticks ); } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 40007cc4: c4 2e 20 34 stb %g2, [ %i0 + 0x34 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40007cc8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007ccc: 01 00 00 00 nop <== NOT EXECUTED /* * 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 ) ) { 40007cd0: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED 40007cd4: 40 00 22 1c call 40010544 <== NOT EXECUTED 40007cd8: d0 06 20 30 ld [ %i0 + 0x30 ], %o0 <== NOT EXECUTED } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 40007cdc: c0 26 20 74 clr [ %i0 + 0x74 ] <== NOT EXECUTED } 40007ce0: 81 c7 e0 08 ret <== NOT EXECUTED 40007ce4: 81 e8 00 00 restore <== NOT EXECUTED ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 40007ce8: 84 10 20 03 mov 3, %g2 40007cec: c4 2e 20 34 stb %g2, [ %i0 + 0x34 ] _Timecounter_Nanotime( tod ); 40007cf0: 90 06 20 78 add %i0, 0x78, %o0 40007cf4: c2 27 bf fc st %g1, [ %fp + -4 ] 40007cf8: 40 00 0a c6 call 4000a810 <_Timecounter_Nanotime> 40007cfc: fa 06 20 70 ld [ %i0 + 0x70 ], %i5 cpu->Watchdog.ticks + ticks 40007d00: 11 10 00 68 sethi %hi(0x4001a000), %o0 40007d04: 90 12 20 80 or %o0, 0x80, %o0 ! 4001a080 <_Per_CPU_Information> _Watchdog_Insert( 40007d08: d4 1a 20 30 ldd [ %o0 + 0x30 ], %o2 40007d0c: 86 82 c0 1d addcc %o3, %i5, %g3 40007d10: 84 42 a0 00 addx %o2, 0, %g2 40007d14: 96 10 00 03 mov %g3, %o3 40007d18: 94 10 00 02 mov %g2, %o2 40007d1c: 92 06 20 10 add %i0, 0x10, %o1 40007d20: 40 00 1b 71 call 4000eae4 <_Watchdog_Insert> 40007d24: 90 02 20 38 add %o0, 0x38, %o0 40007d28: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 40007d2c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007d30: 01 00 00 00 nop if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 40007d34: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 40007d38: 40 00 22 03 call 40010544 40007d3c: d0 06 20 30 ld [ %i0 + 0x30 ], %o0 ptimer->overrun = 0; 40007d40: c0 26 20 74 clr [ %i0 + 0x74 ] } 40007d44: 81 c7 e0 08 ret 40007d48: 81 e8 00 00 restore =============================================================================== 4000ece0 <_POSIX_signals_Abnormal_termination_handler>: sigset_t _POSIX_signals_Pending; void _POSIX_signals_Abnormal_termination_handler( int signo RTEMS_UNUSED ) { 4000ece0: 9d e3 bf a0 save %sp, -96, %sp exit( 1 ); 4000ece4: 40 00 05 2e call 4001019c 4000ece8: 90 10 20 01 mov 1, %o0 4000ecec: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4000ec78 <_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 ) { 4000ec78: 83 2a 20 01 sll %o0, 1, %g1 4000ec7c: 05 10 00 74 sethi %hi(0x4001d000), %g2 4000ec80: 82 00 40 08 add %g1, %o0, %g1 4000ec84: 84 10 a3 88 or %g2, 0x388, %g2 4000ec88: 83 28 60 02 sll %g1, 2, %g1 4000ec8c: c4 00 80 01 ld [ %g2 + %g1 ], %g2 4000ec90: 90 02 3f ff add %o0, -1, %o0 4000ec94: 80 a0 a0 02 cmp %g2, 2 4000ec98: 84 10 20 01 mov 1, %g2 4000ec9c: 02 80 00 07 be 4000ecb8 <_POSIX_signals_Clear_process_signals+0x40> 4000eca0: 91 28 80 08 sll %g2, %o0, %o0 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4000eca4: 03 10 00 75 sethi %hi(0x4001d400), %g1 4000eca8: c4 00 61 14 ld [ %g1 + 0x114 ], %g2 ! 4001d514 <_POSIX_signals_Pending> 4000ecac: 90 28 80 08 andn %g2, %o0, %o0 } } 4000ecb0: 81 c3 e0 08 retl 4000ecb4: d0 20 61 14 st %o0, [ %g1 + 0x114 ] return _Chain_Immutable_head( the_chain )->next; 4000ecb8: 05 10 00 75 sethi %hi(0x4001d400), %g2 4000ecbc: 84 10 a1 18 or %g2, 0x118, %g2 ! 4001d518 <_POSIX_signals_Siginfo> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4000ecc0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 return &the_chain->Tail.Node; 4000ecc4: 82 00 60 04 add %g1, 4, %g1 4000ecc8: 82 00 40 02 add %g1, %g2, %g1 4000eccc: 80 a0 c0 01 cmp %g3, %g1 4000ecd0: 02 bf ff f6 be 4000eca8 <_POSIX_signals_Clear_process_signals+0x30> <== ALWAYS TAKEN 4000ecd4: 03 10 00 75 sethi %hi(0x4001d400), %g1 } 4000ecd8: 81 c3 e0 08 retl <== NOT EXECUTED 4000ecdc: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4000ffd0 <_POSIX_signals_Clear_signals>: siginfo_t *info, bool is_global, bool check_blocked, bool do_signals_acquire_release ) { 4000ffd0: 9d e3 bf 98 save %sp, -104, %sp 4000ffd4: 84 10 20 01 mov 1, %g2 4000ffd8: 86 06 7f ff add %i1, -1, %g3 */ if ( check_blocked ) signals_unblocked = api->signals_unblocked; else signals_unblocked = SIGNAL_ALL_MASK; 4000ffdc: 88 10 3f ff mov -1, %g4 if ( check_blocked ) 4000ffe0: 80 a7 20 00 cmp %i4, 0 4000ffe4: 02 80 00 03 be 4000fff0 <_POSIX_signals_Clear_signals+0x20> 4000ffe8: 85 28 80 03 sll %g2, %g3, %g2 signals_unblocked = api->signals_unblocked; 4000ffec: c8 06 20 68 ld [ %i0 + 0x68 ], %g4 /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ if ( do_signals_acquire_release ) { 4000fff0: 80 a7 60 00 cmp %i5, 0 4000fff4: 02 80 00 04 be 40010004 <_POSIX_signals_Clear_signals+0x34> 4000fff8: 80 a6 e0 00 cmp %i3, 0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000fffc: 91 d0 20 09 ta 9 <== NOT EXECUTED _Thread_queue_Context_initialize( &queue_context ); _POSIX_signals_Acquire( &queue_context ); } if ( is_global ) { 40010000: 80 a6 e0 00 cmp %i3, 0 40010004: 22 80 00 10 be,a 40010044 <_POSIX_signals_Clear_signals+0x74> 40010008: f8 06 20 6c ld [ %i0 + 0x6c ], %i4 if ( mask & (_POSIX_signals_Pending & signals_unblocked) ) { 4001000c: 07 10 00 75 sethi %hi(0x4001d400), %g3 40010010: c6 00 e1 14 ld [ %g3 + 0x114 ], %g3 ! 4001d514 <_POSIX_signals_Pending> 40010014: 84 08 80 03 and %g2, %g3, %g2 40010018: 80 88 80 04 btst %g2, %g4 4001001c: 12 80 00 12 bne 40010064 <_POSIX_signals_Clear_signals+0x94> 40010020: 86 10 20 00 clr %g3 api->signals_pending &= ~mask; do_callout = true; } } if ( do_signals_acquire_release ) { 40010024: 80 a7 60 00 cmp %i5, 0 40010028: 22 80 00 05 be,a 4001003c <_POSIX_signals_Clear_signals+0x6c> 4001002c: b0 08 e0 01 and %g3, 1, %i0 __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40010030: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40010034: 01 00 00 00 nop _POSIX_signals_Release( &queue_context ); } return do_callout; } 40010038: b0 08 e0 01 and %g3, 1, %i0 4001003c: 81 c7 e0 08 ret 40010040: 81 e8 00 00 restore if ( mask & (api->signals_pending & signals_unblocked) ) { 40010044: b6 0f 00 02 and %i4, %g2, %i3 40010048: 80 8e c0 04 btst %i3, %g4 4001004c: 02 bf ff f6 be 40010024 <_POSIX_signals_Clear_signals+0x54> 40010050: 86 10 20 00 clr %g3 api->signals_pending &= ~mask; 40010054: 84 2f 00 02 andn %i4, %g2, %g2 do_callout = true; 40010058: 86 10 20 01 mov 1, %g3 api->signals_pending &= ~mask; 4001005c: 10 bf ff f2 b 40010024 <_POSIX_signals_Clear_signals+0x54> 40010060: c4 26 20 6c st %g2, [ %i0 + 0x6c ] if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 40010064: 85 2e 60 01 sll %i1, 1, %g2 40010068: 07 10 00 74 sethi %hi(0x4001d000), %g3 4001006c: 84 00 80 19 add %g2, %i1, %g2 40010070: 86 10 e3 88 or %g3, 0x388, %g3 40010074: 85 28 a0 02 sll %g2, 2, %g2 40010078: c6 00 c0 02 ld [ %g3 + %g2 ], %g3 4001007c: 80 a0 e0 02 cmp %g3, 2 40010080: 22 80 00 08 be,a 400100a0 <_POSIX_signals_Clear_signals+0xd0> 40010084: c2 27 bf fc st %g1, [ %fp + -4 ] 40010088: c2 27 bf fc st %g1, [ %fp + -4 ] _POSIX_signals_Clear_process_signals( signo ); 4001008c: 7f ff fa fb call 4000ec78 <_POSIX_signals_Clear_process_signals> 40010090: 90 10 00 19 mov %i1, %o0 do_callout = true; 40010094: 86 10 20 01 mov 1, %g3 40010098: 10 bf ff e3 b 40010024 <_POSIX_signals_Clear_signals+0x54> 4001009c: c2 07 bf fc ld [ %fp + -4 ], %g1 _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); 400100a0: 07 10 00 75 sethi %hi(0x4001d400), %g3 400100a4: 86 10 e1 18 or %g3, 0x118, %g3 ! 4001d518 <_POSIX_signals_Siginfo> return _Chain_Immutable_head( the_chain )->next; 400100a8: f8 00 80 03 ld [ %g2 + %g3 ], %i4 return &the_chain->Tail.Node; 400100ac: 88 00 a0 04 add %g2, 4, %g4 400100b0: 88 01 00 03 add %g4, %g3, %g4 if ( !_Chain_Is_empty(the_chain)) 400100b4: 80 a7 00 04 cmp %i4, %g4 400100b8: 02 80 00 17 be 40010114 <_POSIX_signals_Clear_signals+0x144> 400100bc: b6 00 80 03 add %g2, %g3, %i3 new_first = old_first->next; 400100c0: c8 07 00 00 ld [ %i4 ], %g4 head->next = new_first; 400100c4: c8 20 80 03 st %g4, [ %g2 + %g3 ] _POSIX_signals_Clear_process_signals( signo ); 400100c8: 90 10 00 19 mov %i1, %o0 400100cc: 7f ff fa eb call 4000ec78 <_POSIX_signals_Clear_process_signals> 400100d0: f6 21 20 04 st %i3, [ %g4 + 4 ] *info = psiginfo->Info; 400100d4: c4 07 20 08 ld [ %i4 + 8 ], %g2 400100d8: c4 26 80 00 st %g2, [ %i2 ] 400100dc: c4 07 20 0c ld [ %i4 + 0xc ], %g2 400100e0: c4 26 a0 04 st %g2, [ %i2 + 4 ] old_last = tail->previous; 400100e4: 05 10 00 75 sethi %hi(0x4001d400), %g2 400100e8: c6 07 20 10 ld [ %i4 + 0x10 ], %g3 400100ec: c6 26 a0 08 st %g3, [ %i2 + 8 ] 400100f0: 84 10 a1 08 or %g2, 0x108, %g2 400100f4: c6 00 a0 08 ld [ %g2 + 8 ], %g3 the_node->next = tail; 400100f8: 88 00 a0 04 add %g2, 4, %g4 400100fc: c8 27 00 00 st %g4, [ %i4 ] tail->previous = the_node; 40010100: f8 20 a0 08 st %i4, [ %g2 + 8 ] old_last->next = the_node; 40010104: f8 20 c0 00 st %i4, [ %g3 ] the_node->previous = old_last; 40010108: c6 27 20 04 st %g3, [ %i4 + 4 ] 4001010c: 10 bf ff df b 40010088 <_POSIX_signals_Clear_signals+0xb8> 40010110: c2 07 bf fc ld [ %fp + -4 ], %g1 _POSIX_signals_Clear_process_signals( signo ); 40010114: 7f ff fa d9 call 4000ec78 <_POSIX_signals_Clear_process_signals> 40010118: 90 10 00 19 mov %i1, %o0 4001011c: 10 bf ff db b 40010088 <_POSIX_signals_Clear_signals+0xb8> 40010120: c2 07 bf fc ld [ %fp + -4 ], %g1 =============================================================================== 40019aa0 <_POSIX_signals_Default_vectors>: 40019aa0: 00 00 00 00 ff ff ff ff 00 00 00 01 00 00 00 00 ................ 40019ab0: ff ff ff ff 40 00 ec e0 00 00 00 00 ff ff ff ff ....@........... 40019ac0: 40 00 ec e0 00 00 00 00 ff ff ff ff 40 00 ec e0 @...........@... 40019ad0: 00 00 00 00 ff ff ff ff 40 00 ec e0 00 00 00 00 ........@....... 40019ae0: ff ff ff ff 40 00 ec e0 00 00 00 00 ff ff ff ff ....@........... 40019af0: 40 00 ec e0 00 00 00 00 ff ff ff ff 40 00 ec e0 @...........@... 40019b00: 00 00 00 00 ff ff ff ff 40 00 ec e0 00 00 00 00 ........@....... 40019b10: ff ff ff ff 40 00 ec e0 00 00 00 00 ff ff ff ff ....@........... 40019b20: 40 00 ec e0 00 00 00 00 ff ff ff ff 40 00 ec e0 @...........@... 40019b30: 00 00 00 00 ff ff ff ff 40 00 ec e0 00 00 00 00 ........@....... 40019b40: ff ff ff ff 40 00 ec e0 00 00 00 00 ff ff ff ff ....@........... 40019b50: 40 00 ec e0 00 00 00 00 ff ff ff ff 40 00 ec e0 @...........@... 40019b60: 00 00 00 00 ff ff ff ff 40 00 ec e0 00 00 00 00 ........@....... 40019b70: ff ff ff ff 40 00 ec e0 00 00 00 00 ff ff ff ff ....@........... 40019b80: 40 00 ec e0 00 00 00 00 ff ff ff ff 40 00 ec e0 @...........@... 40019b90: 00 00 00 00 ff ff ff ff 40 00 ec e0 00 00 00 00 ........@....... 40019ba0: ff ff ff ff 40 00 ec e0 00 00 00 00 ff ff ff ff ....@........... 40019bb0: 40 00 ec e0 00 00 00 00 ff ff ff ff 40 00 ec e0 @...........@... 40019bc0: 00 00 00 00 ff ff ff ff 40 00 ec e0 00 00 00 00 ........@....... 40019bd0: ff ff ff ff 40 00 ec e0 00 00 00 00 ff ff ff ff ....@........... 40019be0: 40 00 ec e0 00 00 00 00 ff ff ff ff 40 00 ec e0 @...........@... 40019bf0: 00 00 00 00 ff ff ff ff 40 00 ec e0 00 00 00 00 ........@....... 40019c00: ff ff ff ff 40 00 ec e0 00 00 00 00 ff ff ff ff ....@........... 40019c10: 40 00 ec e0 00 00 00 00 ff ff ff ff 40 00 ec e0 @...........@... =============================================================================== 4000ee98 <_POSIX_signals_Send>: int _POSIX_signals_Send( pid_t pid, int sig, const union sigval *value ) { 4000ee98: 9d e3 bf 88 save %sp, -120, %sp Per_CPU_Control *cpu_self; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 4000ee9c: 7f ff d7 16 call 40004af4 4000eea0: 01 00 00 00 nop 4000eea4: 80 a2 00 18 cmp %o0, %i0 4000eea8: 12 80 00 e7 bne 4000f244 <_POSIX_signals_Send+0x3ac> 4000eeac: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 4000eeb0: 02 80 00 df be 4000f22c <_POSIX_signals_Send+0x394> 4000eeb4: b8 06 7f ff add %i1, -1, %i4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4000eeb8: 80 a7 20 1f cmp %i4, 0x1f 4000eebc: 18 80 00 dc bgu 4000f22c <_POSIX_signals_Send+0x394> 4000eec0: bb 2e 60 01 sll %i1, 1, %i5 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 ) 4000eec4: 37 10 00 76 sethi %hi(0x4001d800), %i3 4000eec8: ba 07 40 19 add %i5, %i1, %i5 4000eecc: b6 16 e2 88 or %i3, 0x288, %i3 4000eed0: 83 2f 60 02 sll %i5, 2, %g1 4000eed4: 82 06 c0 01 add %i3, %g1, %g1 4000eed8: c2 00 60 08 ld [ %g1 + 8 ], %g1 4000eedc: 80 a0 60 01 cmp %g1, 1 4000eee0: 02 80 00 56 be 4000f038 <_POSIX_signals_Send+0x1a0> 4000eee4: b0 10 20 00 clr %i0 /* * 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 ) ) 4000eee8: 82 06 7f fc add %i1, -4, %g1 4000eeec: 80 88 7f fb btst -5, %g1 4000eef0: 02 80 00 46 be 4000f008 <_POSIX_signals_Send+0x170> 4000eef4: 80 a6 60 0b cmp %i1, 0xb 4000eef8: 02 80 00 44 be 4000f008 <_POSIX_signals_Send+0x170> 4000eefc: 82 10 20 01 mov 1, %g1 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 4000ef00: f2 27 bf f4 st %i1, [ %fp + -12 ] 4000ef04: b9 28 40 1c sll %g1, %i4, %i4 siginfo->si_code = SI_USER; if ( !value ) { 4000ef08: 80 a6 a0 00 cmp %i2, 0 4000ef0c: 02 80 00 99 be 4000f170 <_POSIX_signals_Send+0x2d8> 4000ef10: c2 27 bf f8 st %g1, [ %fp + -8 ] siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 4000ef14: c2 06 80 00 ld [ %i2 ], %g1 4000ef18: c2 27 bf fc st %g1, [ %fp + -4 ] return _Thread_Dispatch_disable_with_CPU( _Per_CPU_Get(), lock_context ); 4000ef1c: b4 10 00 06 mov %g6, %i2 disable_level = cpu_self->thread_dispatch_disable_level; 4000ef20: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 return cpu->executing; 4000ef24: d0 01 a0 20 ld [ %g6 + 0x20 ], %o0 cpu_self->thread_dispatch_disable_level = disable_level + 1; 4000ef28: 82 00 60 01 inc %g1 * 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 ) ) { 4000ef2c: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 4000ef30: c2 21 a0 18 st %g1, [ %g6 + 0x18 ] 4000ef34: c2 00 a0 68 ld [ %g2 + 0x68 ], %g1 4000ef38: 80 8f 00 01 btst %i4, %g1 4000ef3c: 12 80 00 1a bne 4000efa4 <_POSIX_signals_Send+0x10c> 4000ef40: 03 10 00 6f sethi %hi(0x4001bc00), %g1 * 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; 4000ef44: c4 00 61 a4 ld [ %g1 + 0x1a4 ], %g2 ! 4001bda4 <_POSIX_signals_Wait_queue> if ( heads != NULL ) { 4000ef48: 80 a0 a0 00 cmp %g2, 0 4000ef4c: 02 80 00 3d be 4000f040 <_POSIX_signals_Send+0x1a8> 4000ef50: 17 10 00 67 sethi %hi(0x40019c00), %o3 4000ef54: c2 00 80 00 ld [ %g2 ], %g1 return &the_chain->Tail.Node; 4000ef58: 84 00 a0 04 add %g2, 4, %g2 Chain_Control *the_chain = &heads->Heads.Fifo; for ( the_node = _Chain_First( the_chain ); 4000ef5c: 80 a0 40 02 cmp %g1, %g2 4000ef60: 32 80 00 0d bne,a 4000ef94 <_POSIX_signals_Send+0xfc> <== ALWAYS TAKEN 4000ef64: d0 00 7f f8 ld [ %g1 + -8 ], %o0 4000ef68: 10 80 00 37 b 4000f044 <_POSIX_signals_Send+0x1ac> <== NOT EXECUTED 4000ef6c: 9e 10 3f ff mov -1, %o7 <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (api->signals_unblocked & mask) 4000ef70: c6 01 20 68 ld [ %g4 + 0x68 ], %g3 4000ef74: 80 8f 00 03 btst %i4, %g3 4000ef78: 12 80 00 0c bne 4000efa8 <_POSIX_signals_Send+0x110> 4000ef7c: 94 07 bf f4 add %fp, -12, %o2 the_node = the_node->next ) { 4000ef80: c2 00 40 00 ld [ %g1 ], %g1 for ( the_node = _Chain_First( the_chain ); 4000ef84: 80 a0 40 02 cmp %g1, %g2 4000ef88: 02 80 00 2e be 4000f040 <_POSIX_signals_Send+0x1a8> <== ALWAYS TAKEN 4000ef8c: 17 10 00 67 sethi %hi(0x40019c00), %o3 4000ef90: d0 00 7f f8 ld [ %g1 + -8 ], %o0 <== NOT EXECUTED if (the_thread->Wait.option & mask) 4000ef94: c6 02 20 48 ld [ %o0 + 0x48 ], %g3 4000ef98: 80 8f 00 03 btst %i4, %g3 4000ef9c: 02 bf ff f5 be 4000ef70 <_POSIX_signals_Send+0xd8> 4000efa0: c8 02 21 5c ld [ %o0 + 0x15c ], %g4 /* * 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 ) ) { 4000efa4: 94 07 bf f4 add %fp, -12, %o2 4000efa8: 40 00 01 cf call 4000f6e4 <_POSIX_signals_Unblock_thread> 4000efac: 92 10 00 19 mov %i1, %o1 4000efb0: 80 a2 20 00 cmp %o0, 0 4000efb4: 12 80 00 1b bne 4000f020 <_POSIX_signals_Send+0x188> 4000efb8: 01 00 00 00 nop /* * 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 ); 4000efbc: 40 00 01 5f call 4000f538 <_POSIX_signals_Set_process_signals> 4000efc0: 90 10 00 1c mov %i4, %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000efc4: 91 d0 20 09 ta 9 <== NOT EXECUTED return psr; 4000efc8: 86 10 00 01 mov %g1, %g3 _Thread_queue_Context_initialize( &queue_context ); _POSIX_signals_Acquire( &queue_context ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4000efcc: bb 2f 60 02 sll %i5, 2, %i5 4000efd0: c4 06 c0 1d ld [ %i3 + %i5 ], %g2 4000efd4: 80 a0 a0 02 cmp %g2, 2 4000efd8: 02 80 00 6c be 4000f188 <_POSIX_signals_Send+0x2f0> 4000efdc: 09 10 00 77 sethi %hi(0x4001dc00), %g4 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000efe0: 82 10 00 03 mov %g3, %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000efe4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000efe8: 01 00 00 00 nop uint32_t disable_level = cpu_self->thread_dispatch_disable_level; 4000efec: c2 06 a0 18 ld [ %i2 + 0x18 ], %g1 if ( disable_level == 1 ) { 4000eff0: 80 a0 60 01 cmp %g1, 1 4000eff4: 02 80 00 7f be 4000f1f0 <_POSIX_signals_Send+0x358> 4000eff8: 82 00 7f ff add %g1, -1, %g1 cpu_self->thread_dispatch_disable_level = disable_level - 1; 4000effc: c2 26 a0 18 st %g1, [ %i2 + 0x18 ] _POSIX_signals_Release( &queue_context ); DEBUG_STEP("\n"); _Thread_Dispatch_enable( cpu_self ); return 0; } 4000f000: 81 c7 e0 08 ret 4000f004: 91 e8 20 00 restore %g0, 0, %o0 return pthread_kill( pthread_self(), sig ); 4000f008: 7f ff e0 5e call 40007180 4000f00c: 01 00 00 00 nop 4000f010: 7f ff df 9c call 40006e80 4000f014: 92 10 00 19 mov %i1, %o1 4000f018: 81 c7 e0 08 ret 4000f01c: 91 e8 00 08 restore %g0, %o0, %o0 uint32_t disable_level = cpu_self->thread_dispatch_disable_level; 4000f020: c2 06 a0 18 ld [ %i2 + 0x18 ], %g1 if ( disable_level == 1 ) { 4000f024: 80 a0 60 01 cmp %g1, 1 4000f028: 02 80 00 72 be 4000f1f0 <_POSIX_signals_Send+0x358> <== ALWAYS TAKEN 4000f02c: 82 00 7f ff add %g1, -1, %g1 return 0; 4000f030: b0 10 20 00 clr %i0 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = disable_level - 1; 4000f034: c2 26 a0 18 st %g1, [ %i2 + 0x18 ] <== NOT EXECUTED 4000f038: 81 c7 e0 08 ret 4000f03c: 81 e8 00 00 restore for ( the_node = _Chain_First( the_chain ); 4000f040: 9e 10 3f ff mov -1, %o7 4000f044: 94 10 3f ff mov -1, %o2 4000f048: 90 10 20 00 clr %o0 4000f04c: 98 10 20 02 mov 2, %o4 */ RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal ( States_Control the_states ) { return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL); 4000f050: 13 04 00 00 sethi %hi(0x10000000), %o1 4000f054: 96 12 e2 90 or %o3, 0x290, %o3 if ( !_Objects_Information_table[ the_api ] ) 4000f058: 83 2b 20 02 sll %o4, 2, %g1 4000f05c: c2 02 c0 01 ld [ %o3 + %g1 ], %g1 4000f060: 80 a0 60 00 cmp %g1, 0 4000f064: 02 80 00 39 be 4000f148 <_POSIX_signals_Send+0x2b0> <== NEVER TAKEN 4000f068: 80 a3 20 03 cmp %o4, 3 the_info = _Objects_Information_table[ the_api ][ 1 ]; 4000f06c: c2 00 60 04 ld [ %g1 + 4 ], %g1 if ( !the_info ) 4000f070: 80 a0 60 00 cmp %g1, 0 4000f074: 02 80 00 35 be 4000f148 <_POSIX_signals_Send+0x2b0> <== NEVER TAKEN 4000f078: 80 a3 20 03 cmp %o4, 3 maximum = the_info->maximum; 4000f07c: f0 10 60 10 lduh [ %g1 + 0x10 ], %i0 for ( index = 1 ; index <= maximum ; index++ ) { 4000f080: 80 a6 20 00 cmp %i0, 0 4000f084: 02 80 00 30 be 4000f144 <_POSIX_signals_Send+0x2ac> 4000f088: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000f08c: 82 00 60 04 add %g1, 4, %g1 4000f090: b1 2e 20 02 sll %i0, 2, %i0 4000f094: b0 06 00 01 add %i0, %g1, %i0 the_thread = (Thread_Control *) object_table[ index ]; 4000f098: c4 00 40 00 ld [ %g1 ], %g2 if ( !the_thread ) 4000f09c: 80 a0 a0 00 cmp %g2, 0 4000f0a0: 22 80 00 26 be,a 4000f138 <_POSIX_signals_Send+0x2a0> 4000f0a4: 82 00 60 04 add %g1, 4, %g1 4000f0a8: c6 00 a0 38 ld [ %g2 + 0x38 ], %g3 4000f0ac: c8 00 e0 18 ld [ %g3 + 0x18 ], %g4 if ( _Thread_Get_priority( the_thread ) > interested_priority ) 4000f0b0: 80 a1 00 0f cmp %g4, %o7 4000f0b4: 18 80 00 20 bgu 4000f134 <_POSIX_signals_Send+0x29c> <== NEVER TAKEN 4000f0b8: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3 4000f0bc: 02 80 00 29 be 4000f160 <_POSIX_signals_Send+0x2c8> 4000f0c0: 80 a0 c0 0a cmp %g3, %o2 if ( !_POSIX_signals_Is_interested( api, mask ) ) 4000f0c4: da 00 a1 5c ld [ %g2 + 0x15c ], %o5 4000f0c8: da 03 60 68 ld [ %o5 + 0x68 ], %o5 4000f0cc: 80 8f 00 0d btst %i4, %o5 4000f0d0: 02 80 00 19 be 4000f134 <_POSIX_signals_Send+0x29c> 4000f0d4: 80 a3 c0 04 cmp %o7, %g4 if ( _Thread_Get_priority( the_thread ) < interested_priority ) { 4000f0d8: 38 80 00 15 bgu,a 4000f12c <_POSIX_signals_Send+0x294> 4000f0dc: 9e 10 00 04 mov %g4, %o7 4000f0e0: 02 80 00 26 be 4000f178 <_POSIX_signals_Send+0x2e0> <== ALWAYS TAKEN 4000f0e4: 80 a2 80 03 cmp %o2, %g3 if ( interested && !_States_Is_ready( interested->current_state ) ) { 4000f0e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000f0ec: 22 80 00 13 be,a 4000f138 <_POSIX_signals_Send+0x2a0> <== NEVER TAKEN 4000f0f0: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED 4000f0f4: da 02 20 1c ld [ %o0 + 0x1c ], %o5 4000f0f8: 80 a3 60 00 cmp %o5, 0 4000f0fc: 22 80 00 0f be,a 4000f138 <_POSIX_signals_Send+0x2a0> 4000f100: 82 00 60 04 add %g1, 4, %g1 if ( _States_Is_ready( the_thread->current_state ) ) { 4000f104: e0 00 a0 1c ld [ %g2 + 0x1c ], %l0 4000f108: 80 a4 20 00 cmp %l0, 0 4000f10c: 02 80 00 07 be 4000f128 <_POSIX_signals_Send+0x290> 4000f110: 80 8b 40 09 btst %o5, %o1 if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 4000f114: 32 80 00 09 bne,a 4000f138 <_POSIX_signals_Send+0x2a0> 4000f118: 82 00 60 04 add %g1, 4, %g1 if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 4000f11c: 80 8c 00 09 btst %l0, %o1 4000f120: 22 80 00 06 be,a 4000f138 <_POSIX_signals_Send+0x2a0> 4000f124: 82 00 60 04 add %g1, 4, %g1 4000f128: 9e 10 00 04 mov %g4, %o7 4000f12c: 94 10 00 03 mov %g3, %o2 4000f130: 90 10 00 02 mov %g2, %o0 4000f134: 82 00 60 04 add %g1, 4, %g1 for ( index = 1 ; index <= maximum ; index++ ) { 4000f138: 80 a6 00 01 cmp %i0, %g1 4000f13c: 32 bf ff d8 bne,a 4000f09c <_POSIX_signals_Send+0x204> 4000f140: c4 00 40 00 ld [ %g1 ], %g2 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 4000f144: 80 a3 20 03 cmp %o4, 3 4000f148: 12 bf ff c4 bne 4000f058 <_POSIX_signals_Send+0x1c0> 4000f14c: 98 10 20 03 mov 3, %o4 if ( interested ) { 4000f150: 80 a2 20 00 cmp %o0, 0 4000f154: 12 bf ff 95 bne 4000efa8 <_POSIX_signals_Send+0x110> 4000f158: 94 07 bf f4 add %fp, -12, %o2 4000f15c: 30 bf ff 98 b,a 4000efbc <_POSIX_signals_Send+0x124> if ( _Thread_Get_priority( the_thread ) > interested_priority ) 4000f160: 28 bf ff da bleu,a 4000f0c8 <_POSIX_signals_Send+0x230> 4000f164: da 00 a1 5c ld [ %g2 + 0x15c ], %o5 4000f168: 10 bf ff f4 b 4000f138 <_POSIX_signals_Send+0x2a0> 4000f16c: 82 00 60 04 add %g1, 4, %g1 4000f170: 10 bf ff 6b b 4000ef1c <_POSIX_signals_Send+0x84> 4000f174: c0 27 bf fc clr [ %fp + -4 ] if ( _Thread_Get_priority( the_thread ) < interested_priority ) { 4000f178: 08 bf ff dd bleu 4000f0ec <_POSIX_signals_Send+0x254> 4000f17c: 80 a2 20 00 cmp %o0, 0 4000f180: 10 bf ff eb b 4000f12c <_POSIX_signals_Send+0x294> 4000f184: 9e 10 00 04 mov %g4, %o7 return _Chain_Immutable_head( the_chain )->next; 4000f188: c4 01 20 08 ld [ %g4 + 8 ], %g2 4000f18c: b8 11 20 08 or %g4, 8, %i4 if ( !_Chain_Is_empty(the_chain)) 4000f190: b6 07 20 04 add %i4, 4, %i3 4000f194: 80 a0 80 1b cmp %g2, %i3 4000f198: 02 80 00 31 be 4000f25c <_POSIX_signals_Send+0x3c4> 4000f19c: 01 00 00 00 nop new_first = old_first->next; 4000f1a0: c2 00 80 00 ld [ %g2 ], %g1 new_first->previous = head; 4000f1a4: f8 20 60 04 st %i4, [ %g1 + 4 ] psiginfo->Info = *siginfo; 4000f1a8: f6 07 bf fc ld [ %fp + -4 ], %i3 4000f1ac: f2 07 bf f8 ld [ %fp + -8 ], %i1 head->next = new_first; 4000f1b0: c2 21 20 08 st %g1, [ %g4 + 8 ] _Chain_Append_unprotected( 4000f1b4: 03 10 00 77 sethi %hi(0x4001dc00), %g1 psiginfo->Info = *siginfo; 4000f1b8: c8 07 bf f4 ld [ %fp + -12 ], %g4 4000f1bc: c8 20 a0 08 st %g4, [ %g2 + 8 ] _Chain_Append_unprotected( 4000f1c0: 82 10 60 18 or %g1, 0x18, %g1 psiginfo->Info = *siginfo; 4000f1c4: f2 20 a0 0c st %i1, [ %g2 + 0xc ] _Chain_Append_unprotected( 4000f1c8: b8 07 40 01 add %i5, %g1, %i4 return &the_chain->Tail.Node; 4000f1cc: ba 07 60 04 add %i5, 4, %i5 old_last = tail->previous; 4000f1d0: c8 07 20 08 ld [ %i4 + 8 ], %g4 return &the_chain->Tail.Node; 4000f1d4: ba 07 40 01 add %i5, %g1, %i5 psiginfo->Info = *siginfo; 4000f1d8: f6 20 a0 10 st %i3, [ %g2 + 0x10 ] the_node->next = tail; 4000f1dc: fa 20 80 00 st %i5, [ %g2 ] tail->previous = the_node; 4000f1e0: c4 27 20 08 st %g2, [ %i4 + 8 ] old_last->next = the_node; 4000f1e4: c4 21 00 00 st %g2, [ %g4 ] the_node->previous = old_last; 4000f1e8: 10 bf ff 7e b 4000efe0 <_POSIX_signals_Send+0x148> 4000f1ec: c8 20 a0 04 st %g4, [ %g2 + 4 ] __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000f1f0: 91 d0 20 09 ta 9 <== NOT EXECUTED if ( 4000f1f4: c4 0e a0 1c ldub [ %i2 + 0x1c ], %g2 4000f1f8: 80 a0 a0 00 cmp %g2, 0 4000f1fc: 12 80 00 07 bne 4000f218 <_POSIX_signals_Send+0x380> 4000f200: 92 10 00 01 mov %g1, %o1 cpu_self->thread_dispatch_disable_level = 0; 4000f204: c0 26 a0 18 clr [ %i2 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000f208: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000f20c: 01 00 00 00 nop return 0; 4000f210: 81 c7 e0 08 ret 4000f214: 91 e8 20 00 restore %g0, 0, %o0 _Thread_Do_dispatch( cpu_self, level ); 4000f218: c2 27 bf ec st %g1, [ %fp + -20 ] 4000f21c: 7f ff f0 c8 call 4000b53c <_Thread_Do_dispatch> 4000f220: 90 10 00 1a mov %i2, %o0 4000f224: 10 bf ff f9 b 4000f208 <_POSIX_signals_Send+0x370> 4000f228: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 4000f22c: 40 00 05 68 call 400107cc <__errno> 4000f230: b0 10 3f ff mov -1, %i0 4000f234: 82 10 20 16 mov 0x16, %g1 4000f238: c2 22 00 00 st %g1, [ %o0 ] 4000f23c: 81 c7 e0 08 ret 4000f240: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( ESRCH ); 4000f244: 40 00 05 62 call 400107cc <__errno> 4000f248: b0 10 3f ff mov -1, %i0 4000f24c: 82 10 20 03 mov 3, %g1 4000f250: c2 22 00 00 st %g1, [ %o0 ] 4000f254: 81 c7 e0 08 ret 4000f258: 81 e8 00 00 restore 4000f25c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000f260: 01 00 00 00 nop uint32_t disable_level = cpu_self->thread_dispatch_disable_level; 4000f264: c2 06 a0 18 ld [ %i2 + 0x18 ], %g1 if ( disable_level == 1 ) { 4000f268: 80 a0 60 01 cmp %g1, 1 4000f26c: 02 80 00 09 be 4000f290 <_POSIX_signals_Send+0x3f8> <== ALWAYS TAKEN 4000f270: 82 00 7f ff add %g1, -1, %g1 cpu_self->thread_dispatch_disable_level = disable_level - 1; 4000f274: c2 26 a0 18 st %g1, [ %i2 + 0x18 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EAGAIN ); 4000f278: 40 00 05 55 call 400107cc <__errno> 4000f27c: b0 10 3f ff mov -1, %i0 4000f280: 82 10 20 0b mov 0xb, %g1 4000f284: c2 22 00 00 st %g1, [ %o0 ] 4000f288: 81 c7 e0 08 ret 4000f28c: 81 e8 00 00 restore __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000f290: 91 d0 20 09 ta 9 <== NOT EXECUTED if ( 4000f294: c4 0e a0 1c ldub [ %i2 + 0x1c ], %g2 4000f298: 80 a0 a0 00 cmp %g2, 0 4000f29c: 12 80 00 06 bne 4000f2b4 <_POSIX_signals_Send+0x41c> <== ALWAYS TAKEN 4000f2a0: 92 10 00 01 mov %g1, %o1 cpu_self->thread_dispatch_disable_level = 0; 4000f2a4: c0 26 a0 18 clr [ %i2 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000f2a8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000f2ac: 01 00 00 00 nop 4000f2b0: 30 bf ff f2 b,a 4000f278 <_POSIX_signals_Send+0x3e0> _Thread_Do_dispatch( cpu_self, level ); 4000f2b4: c2 27 bf ec st %g1, [ %fp + -20 ] 4000f2b8: 7f ff f0 a1 call 4000b53c <_Thread_Do_dispatch> 4000f2bc: 90 10 00 1a mov %i2, %o0 4000f2c0: 10 bf ff fa b 4000f2a8 <_POSIX_signals_Send+0x410> 4000f2c4: c2 07 bf ec ld [ %fp + -20 ], %g1 =============================================================================== 4000f538 <_POSIX_signals_Set_process_signals>: __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000f538: 91 d0 20 09 ta 9 <== NOT EXECUTED { Thread_queue_Context queue_context; _Thread_queue_Context_initialize( &queue_context ); _POSIX_signals_Acquire( &queue_context ); _POSIX_signals_Pending |= mask; 4000f53c: 07 10 00 77 sethi %hi(0x4001dc00), %g3 <== NOT EXECUTED 4000f540: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 ! 4001dc14 <_POSIX_signals_Pending> <== NOT EXECUTED 4000f544: 90 10 80 08 or %g2, %o0, %o0 <== NOT EXECUTED 4000f548: d0 20 e0 14 st %o0, [ %g3 + 0x14 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000f54c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000f550: 01 00 00 00 nop _POSIX_signals_Release( &queue_context ); } 4000f554: 81 c3 e0 08 retl 4000f558: 01 00 00 00 nop =============================================================================== 4000ef1c <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4000ef1c: 9d e3 bf a0 save %sp, -96, %sp POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000ef20: fa 06 21 5c ld [ %i0 + 0x15c ], %i5 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4000ef24: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 4000ef28: 05 04 00 01 sethi %hi(0x10000400), %g2 4000ef2c: 88 10 20 01 mov 1, %g4 4000ef30: 82 06 7f ff add %i1, -1, %g1 4000ef34: b8 08 c0 02 and %g3, %g2, %i4 4000ef38: 83 29 00 01 sll %g4, %g1, %g1 4000ef3c: 80 a7 00 02 cmp %i4, %g2 4000ef40: 02 80 00 19 be 4000efa4 <_POSIX_signals_Unblock_thread+0x88> 4000ef44: b6 07 60 70 add %i5, 0x70, %i3 } /* * Thread is not waiting due to a sigwait. */ if ( api->signals_unblocked & mask ) { 4000ef48: c4 07 60 68 ld [ %i5 + 0x68 ], %g2 4000ef4c: 80 88 40 02 btst %g1, %g2 4000ef50: 02 80 00 05 be 4000ef64 <_POSIX_signals_Unblock_thread+0x48> 4000ef54: 03 04 00 00 sethi %hi(0x10000000), %g1 * 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 ) ) { 4000ef58: 80 88 c0 01 btst %g3, %g1 4000ef5c: 12 80 00 4b bne 4000f088 <_POSIX_signals_Unblock_thread+0x16c> 4000ef60: 82 10 24 0d mov 0x40d, %g1 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000ef64: 91 d0 20 09 ta 9 <== NOT EXECUTED action->handler = handler; 4000ef68: 05 10 00 3b sethi %hi(0x4000ec00), %g2 4000ef6c: 84 10 a2 30 or %g2, 0x230, %g2 ! 4000ee30 <_POSIX_signals_Action_handler> 4000ef70: c4 27 60 78 st %g2, [ %i5 + 0x78 ] cpu_self->dispatch_necessary = true; 4000ef74: 86 10 20 01 mov 1, %g3 4000ef78: c6 29 a0 1c stb %g3, [ %g6 + 0x1c ] if ( _Chain_Is_node_off_chain( the_node ) ) { 4000ef7c: c4 07 60 70 ld [ %i5 + 0x70 ], %g2 4000ef80: 80 a0 a0 00 cmp %g2, 0 4000ef84: 22 80 00 1a be,a 4000efec <_POSIX_signals_Unblock_thread+0xd0> 4000ef88: c4 06 20 e8 ld [ %i0 + 0xe8 ], %g2 __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000ef8c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000ef90: 01 00 00 00 nop the_thread->Wait.return_code = STATUS_INTERRUPTED; _Thread_queue_Extract_with_proxy( the_thread ); } } return _POSIX_signals_Unblock_thread_done( the_thread, api, false ); 4000ef94: b0 10 20 00 clr %i0 ! 0 } 4000ef98: b0 0e 20 01 and %i0, 1, %i0 4000ef9c: 81 c7 e0 08 ret 4000efa0: 81 e8 00 00 restore if ( (the_thread->Wait.option & mask) || (api->signals_unblocked & mask) ) { 4000efa4: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 4000efa8: 80 88 40 02 btst %g1, %g2 4000efac: 32 80 00 16 bne,a 4000f004 <_POSIX_signals_Unblock_thread+0xe8> 4000efb0: 82 10 24 0d mov 0x40d, %g1 4000efb4: c4 07 60 68 ld [ %i5 + 0x68 ], %g2 4000efb8: 80 88 40 02 btst %g1, %g2 4000efbc: 12 80 00 12 bne 4000f004 <_POSIX_signals_Unblock_thread+0xe8> 4000efc0: 82 10 24 0d mov 0x40d, %g1 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000efc4: 91 d0 20 09 ta 9 <== NOT EXECUTED 4000efc8: 05 10 00 3b sethi %hi(0x4000ec00), %g2 4000efcc: 84 10 a2 30 or %g2, 0x230, %g2 ! 4000ee30 <_POSIX_signals_Action_handler> 4000efd0: c4 27 60 78 st %g2, [ %i5 + 0x78 ] 4000efd4: c8 29 a0 1c stb %g4, [ %g6 + 0x1c ] 4000efd8: c4 07 60 70 ld [ %i5 + 0x70 ], %g2 4000efdc: 80 a0 a0 00 cmp %g2, 0 4000efe0: 12 bf ff eb bne 4000ef8c <_POSIX_signals_Unblock_thread+0x70> <== NEVER TAKEN 4000efe4: 01 00 00 00 nop old_last = tail->previous; 4000efe8: c4 06 20 e8 ld [ %i0 + 0xe8 ], %g2 return &the_chain->Tail.Node; 4000efec: 86 06 20 e4 add %i0, 0xe4, %g3 the_node->next = tail; 4000eff0: c6 27 60 70 st %g3, [ %i5 + 0x70 ] tail->previous = the_node; 4000eff4: f6 26 20 e8 st %i3, [ %i0 + 0xe8 ] old_last->next = the_node; 4000eff8: f6 20 80 00 st %i3, [ %g2 ] the_node->previous = old_last; 4000effc: 10 bf ff e4 b 4000ef8c <_POSIX_signals_Unblock_thread+0x70> 4000f000: c4 27 60 74 st %g2, [ %i5 + 0x74 ] the_thread->Wait.return_code = STATUS_INTERRUPTED; 4000f004: c2 26 20 4c st %g1, [ %i0 + 0x4c ] if ( !info ) { 4000f008: 80 a6 a0 00 cmp %i2, 0 4000f00c: 02 80 00 2e be 4000f0c4 <_POSIX_signals_Unblock_thread+0x1a8> 4000f010: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 *the_info = *info; 4000f014: c4 06 80 00 ld [ %i2 ], %g2 4000f018: c4 20 40 00 st %g2, [ %g1 ] 4000f01c: c4 06 a0 04 ld [ %i2 + 4 ], %g2 4000f020: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000f024: c4 06 a0 08 ld [ %i2 + 8 ], %g2 4000f028: c4 20 60 08 st %g2, [ %g1 + 8 ] _Thread_queue_Extract_with_proxy( the_thread ); 4000f02c: 40 00 02 f9 call 4000fc10 <_Thread_queue_Extract_with_proxy> 4000f030: 90 10 00 18 mov %i0, %o0 4000f034: 91 d0 20 09 ta 9 <== NOT EXECUTED 4000f038: 05 10 00 3b sethi %hi(0x4000ec00), %g2 4000f03c: 84 10 a2 30 or %g2, 0x230, %g2 ! 4000ee30 <_POSIX_signals_Action_handler> 4000f040: c4 27 60 78 st %g2, [ %i5 + 0x78 ] 4000f044: 86 10 20 01 mov 1, %g3 4000f048: c6 29 a0 1c stb %g3, [ %g6 + 0x1c ] if ( _Chain_Is_node_off_chain( the_node ) ) { 4000f04c: c4 07 60 70 ld [ %i5 + 0x70 ], %g2 4000f050: 80 a0 a0 00 cmp %g2, 0 4000f054: 12 80 00 07 bne 4000f070 <_POSIX_signals_Unblock_thread+0x154> <== NEVER TAKEN 4000f058: 86 06 20 e4 add %i0, 0xe4, %g3 <== NOT EXECUTED old_last = tail->previous; 4000f05c: c4 06 20 e8 ld [ %i0 + 0xe8 ], %g2 <== NOT EXECUTED the_node->next = tail; 4000f060: c6 27 60 70 st %g3, [ %i5 + 0x70 ] <== NOT EXECUTED tail->previous = the_node; 4000f064: f6 26 20 e8 st %i3, [ %i0 + 0xe8 ] <== NOT EXECUTED old_last->next = the_node; 4000f068: f6 20 80 00 st %i3, [ %g2 ] <== NOT EXECUTED the_node->previous = old_last; 4000f06c: c4 27 60 74 st %g2, [ %i5 + 0x74 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000f070: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000f074: 01 00 00 00 nop return _POSIX_signals_Unblock_thread_done( the_thread, api, true ); 4000f078: b0 10 20 01 mov 1, %i0 ! 1 <_TLS_Alignment> } 4000f07c: b0 0e 20 01 and %i0, 1, %i0 4000f080: 81 c7 e0 08 ret 4000f084: 81 e8 00 00 restore the_thread->Wait.return_code = STATUS_INTERRUPTED; 4000f088: c2 26 20 4c st %g1, [ %i0 + 0x4c ] _Thread_queue_Extract_with_proxy( the_thread ); 4000f08c: 40 00 02 e1 call 4000fc10 <_Thread_queue_Extract_with_proxy> 4000f090: 90 10 00 18 mov %i0, %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000f094: 91 d0 20 09 ta 9 <== NOT EXECUTED 4000f098: 05 10 00 3b sethi %hi(0x4000ec00), %g2 4000f09c: 84 10 a2 30 or %g2, 0x230, %g2 ! 4000ee30 <_POSIX_signals_Action_handler> 4000f0a0: c4 27 60 78 st %g2, [ %i5 + 0x78 ] 4000f0a4: 86 10 20 01 mov 1, %g3 4000f0a8: c6 29 a0 1c stb %g3, [ %g6 + 0x1c ] if ( _Chain_Is_node_off_chain( the_node ) ) { 4000f0ac: c4 07 60 70 ld [ %i5 + 0x70 ], %g2 4000f0b0: 80 a0 a0 00 cmp %g2, 0 4000f0b4: 12 bf ff b6 bne 4000ef8c <_POSIX_signals_Unblock_thread+0x70> <== NEVER TAKEN 4000f0b8: 01 00 00 00 nop old_last = tail->previous; 4000f0bc: 10 bf ff cc b 4000efec <_POSIX_signals_Unblock_thread+0xd0> 4000f0c0: c4 06 20 e8 ld [ %i0 + 0xe8 ], %g2 the_info->si_code = SI_USER; 4000f0c4: 84 10 20 01 mov 1, %g2 the_info->si_signo = signo; 4000f0c8: f2 20 40 00 st %i1, [ %g1 ] the_info->si_code = SI_USER; 4000f0cc: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000f0d0: 10 bf ff d7 b 4000f02c <_POSIX_signals_Unblock_thread+0x110> 4000f0d4: c0 20 60 08 clr [ %g1 + 8 ] =============================================================================== 40006600 <_pthread_cleanup_pop>: { 40006600: 9d e3 bf a0 save %sp, -96, %sp if ( execute != 0 ) { 40006604: 80 a6 60 00 cmp %i1, 0 40006608: 02 80 00 05 be 4000661c <_pthread_cleanup_pop+0x1c> 4000660c: 01 00 00 00 nop ( *context->_routine )( context->_arg ); 40006610: c2 06 00 00 ld [ %i0 ], %g1 40006614: 9f c0 40 00 call %g1 40006618: d0 06 20 04 ld [ %i0 + 4 ], %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000661c: 91 d0 20 09 ta 9 <== NOT EXECUTED executing->last_cleanup_context = context->_previous; 40006620: c4 01 a0 20 ld [ %g6 + 0x20 ], %g2 <== NOT EXECUTED 40006624: c6 06 20 0c ld [ %i0 + 0xc ], %g3 <== NOT EXECUTED 40006628: c6 20 a1 84 st %g3, [ %g2 + 0x184 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000662c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006630: 01 00 00 00 nop } 40006634: 81 c7 e0 08 ret 40006638: 81 e8 00 00 restore =============================================================================== 400072f0 <_pthread_cleanup_push>: context->_canceltype = -1; 400072f0: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED context->_routine = routine; 400072f4: d2 22 00 00 st %o1, [ %o0 ] <== NOT EXECUTED context->_arg = arg; 400072f8: d4 22 20 04 st %o2, [ %o0 + 4 ] <== NOT EXECUTED context->_canceltype = -1; 400072fc: c2 22 20 08 st %g1, [ %o0 + 8 ] <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40007300: 91 d0 20 09 ta 9 <== NOT EXECUTED executing = _Thread_Executing; 40007304: c4 01 a0 20 ld [ %g6 + 0x20 ], %g2 <== NOT EXECUTED context->_previous = executing->last_cleanup_context; 40007308: c6 00 a1 84 ld [ %g2 + 0x184 ], %g3 <== NOT EXECUTED 4000730c: c6 22 20 0c st %g3, [ %o0 + 0xc ] <== NOT EXECUTED executing->last_cleanup_context = context; 40007310: d0 20 a1 84 st %o0, [ %g2 + 0x184 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40007314: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007318: 01 00 00 00 nop } 4000731c: 81 c3 e0 08 retl 40007320: 01 00 00 00 nop =============================================================================== 400066e4 : #include #include #include int aio_cancel(int fildes, struct aiocb *aiocbp) { 400066e4: 9d e3 bf a0 save %sp, -96, %sp 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); 400066e8: 3b 10 00 59 sethi %hi(0x40016400), %i5 400066ec: 40 00 05 10 call 40007b2c 400066f0: 90 17 60 68 or %i5, 0x68, %o0 ! 40016468 if (fcntl (fildes, F_GETFD) < 0) { 400066f4: 92 10 20 01 mov 1, %o1 400066f8: 40 00 25 b4 call 4000fdc8 400066fc: 90 10 00 18 mov %i0, %o0 40006700: 80 a2 20 00 cmp %o0, 0 40006704: 06 80 00 6b bl 400068b0 40006708: 80 a6 60 00 cmp %i1, 0 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) { 4000670c: 02 80 00 2d be 400067c0 40006710: 94 10 20 00 clr %o2 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { 40006714: f8 06 40 00 ld [ %i1 ], %i4 40006718: 80 a7 00 18 cmp %i4, %i0 4000671c: 12 80 00 5d bne 40006890 40006720: 90 17 60 68 or %i5, 0x68, %o0 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); 40006724: 94 10 20 00 clr %o2 40006728: 92 10 00 1c mov %i4, %o1 4000672c: 11 10 00 59 sethi %hi(0x40016400), %o0 40006730: 40 00 01 96 call 40006d88 40006734: 90 12 21 28 or %o0, 0x128, %o0 ! 40016528 if (r_chain == NULL) { 40006738: b6 92 20 00 orcc %o0, 0, %i3 4000673c: 22 80 00 0f be,a 40006778 40006740: b6 17 60 68 or %i5, 0x68, %i3 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 40006744: b8 06 e0 20 add %i3, 0x20, %i4 40006748: 40 00 04 f9 call 40007b2c 4000674c: 90 10 00 1c mov %i4, %o0 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 40006750: 92 10 00 19 mov %i1, %o1 40006754: 40 00 01 e2 call 40006edc 40006758: 90 06 e0 08 add %i3, 8, %o0 4000675c: b0 10 00 08 mov %o0, %i0 pthread_mutex_unlock (&r_chain->mutex); 40006760: 40 00 05 c6 call 40007e78 40006764: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 40006768: 40 00 05 c4 call 40007e78 4000676c: 90 17 60 68 or %i5, 0x68, %o0 return result; } return AIO_ALLDONE; } 40006770: 81 c7 e0 08 ret 40006774: 81 e8 00 00 restore if (!rtems_chain_is_empty (idle_req_chain)) { 40006778: c4 06 e0 cc ld [ %i3 + 0xcc ], %g2 4000677c: 82 06 e0 d0 add %i3, 0xd0, %g1 40006780: 80 a0 80 01 cmp %g2, %g1 40006784: 02 80 00 3d be 40006878 <== NEVER TAKEN 40006788: 94 10 20 00 clr %o2 r_chain = rtems_aio_search_fd (idle_req_chain, fildes, 0); 4000678c: 92 10 00 1c mov %i4, %o1 40006790: 40 00 01 7e call 40006d88 40006794: 90 06 e0 cc add %i3, 0xcc, %o0 if (r_chain == NULL) { 40006798: 80 a2 20 00 cmp %o0, 0 4000679c: 02 80 00 3c be 4000688c 400067a0: 92 10 00 19 mov %i1, %o1 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 400067a4: 40 00 01 ce call 40006edc 400067a8: 90 02 20 08 add %o0, 8, %o0 400067ac: b0 10 00 08 mov %o0, %i0 pthread_mutex_unlock (&aio_request_queue.mutex); 400067b0: 40 00 05 b2 call 40007e78 400067b4: 90 10 00 1b mov %i3, %o0 return result; 400067b8: 81 c7 e0 08 ret 400067bc: 81 e8 00 00 restore r_chain = rtems_aio_search_fd (work_req_chain, fildes, 0); 400067c0: 92 10 00 18 mov %i0, %o1 400067c4: 11 10 00 59 sethi %hi(0x40016400), %o0 400067c8: 40 00 01 70 call 40006d88 400067cc: 90 12 21 28 or %o0, 0x128, %o0 ! 40016528 if (r_chain == NULL) { 400067d0: b8 92 20 00 orcc %o0, 0, %i4 400067d4: 12 80 00 1c bne 40006844 400067d8: b6 07 20 20 add %i4, 0x20, %i3 return _Chain_Immutable_head( the_chain )->next; 400067dc: b8 17 60 68 or %i5, 0x68, %i4 if (!rtems_chain_is_empty (idle_req_chain)) { 400067e0: c4 07 20 cc ld [ %i4 + 0xcc ], %g2 400067e4: 82 07 20 d0 add %i4, 0xd0, %g1 400067e8: 80 a0 80 01 cmp %g2, %g1 400067ec: 02 80 00 23 be 40006878 <== NEVER TAKEN 400067f0: 94 10 20 00 clr %o2 r_chain = rtems_aio_search_fd (idle_req_chain, fildes, 0); 400067f4: 92 10 00 18 mov %i0, %o1 400067f8: 40 00 01 64 call 40006d88 400067fc: 90 07 20 cc add %i4, 0xcc, %o0 if (r_chain == NULL) { 40006800: b6 92 20 00 orcc %o0, 0, %i3 40006804: 22 80 00 1e be,a 4000687c 40006808: b0 10 20 02 mov 2, %i0 rtems_chain_extract (&r_chain->next_fd); 4000680c: 40 00 08 d9 call 40008b70 40006810: b0 10 20 00 clr %i0 rtems_aio_remove_fd (r_chain); 40006814: 40 00 01 9d call 40006e88 40006818: 90 10 00 1b mov %i3, %o0 pthread_mutex_destroy (&r_chain->mutex); 4000681c: 40 00 04 4e call 40007954 40006820: 90 06 e0 20 add %i3, 0x20, %o0 pthread_cond_destroy (&r_chain->cond); 40006824: 40 00 02 be call 4000731c 40006828: 90 06 e0 60 add %i3, 0x60, %o0 free (r_chain); 4000682c: 7f ff f8 7a call 40004a14 40006830: 90 10 00 1b mov %i3, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 40006834: 40 00 05 91 call 40007e78 40006838: 90 10 00 1c mov %i4, %o0 return AIO_CANCELED; 4000683c: 81 c7 e0 08 ret 40006840: 81 e8 00 00 restore pthread_mutex_lock (&r_chain->mutex); 40006844: 40 00 04 ba call 40007b2c 40006848: 90 10 00 1b mov %i3, %o0 rtems_chain_extract (&r_chain->next_fd); 4000684c: 40 00 08 c9 call 40008b70 40006850: 90 10 00 1c mov %i4, %o0 rtems_aio_remove_fd (r_chain); 40006854: 40 00 01 8d call 40006e88 40006858: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&r_chain->mutex); 4000685c: 40 00 05 87 call 40007e78 40006860: 90 10 00 1b mov %i3, %o0 return AIO_CANCELED; 40006864: b0 10 20 00 clr %i0 pthread_mutex_unlock (&aio_request_queue.mutex); 40006868: 40 00 05 84 call 40007e78 4000686c: 90 17 60 68 or %i5, 0x68, %o0 return AIO_CANCELED; 40006870: 81 c7 e0 08 ret 40006874: 81 e8 00 00 restore return AIO_ALLDONE; 40006878: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED pthread_mutex_unlock(&aio_request_queue.mutex); 4000687c: 40 00 05 7f call 40007e78 40006880: 90 17 60 68 or %i5, 0x68, %o0 return AIO_ALLDONE; 40006884: 81 c7 e0 08 ret 40006888: 81 e8 00 00 restore pthread_mutex_unlock (&aio_request_queue.mutex); 4000688c: 90 10 00 1b mov %i3, %o0 40006890: 40 00 05 7a call 40007e78 40006894: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one (EINVAL); 40006898: 40 00 2a 93 call 400112e4 <__errno> 4000689c: 01 00 00 00 nop 400068a0: 82 10 20 16 mov 0x16, %g1 ! 16 <_TLS_Alignment+0x15> 400068a4: c2 22 00 00 st %g1, [ %o0 ] 400068a8: 81 c7 e0 08 ret 400068ac: 81 e8 00 00 restore pthread_mutex_unlock(&aio_request_queue.mutex); 400068b0: 40 00 05 72 call 40007e78 400068b4: 90 17 60 68 or %i5, 0x68, %o0 rtems_set_errno_and_return_minus_one (EBADF); 400068b8: 40 00 2a 8b call 400112e4 <__errno> 400068bc: b0 10 3f ff mov -1, %i0 400068c0: 82 10 20 09 mov 9, %g1 400068c4: c2 22 00 00 st %g1, [ %o0 ] 400068c8: 81 c7 e0 08 ret 400068cc: 81 e8 00 00 restore =============================================================================== 400068d8 : int aio_fsync( int op, struct aiocb *aiocbp ) { 400068d8: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; if (op != O_SYNC) 400068dc: 03 00 00 08 sethi %hi(0x2000), %g1 400068e0: 80 a6 00 01 cmp %i0, %g1 400068e4: 12 80 00 14 bne 40006934 400068e8: ba 10 20 16 mov 0x16, %i5 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 400068ec: d0 06 40 00 ld [ %i1 ], %o0 400068f0: 40 00 25 36 call 4000fdc8 400068f4: 92 10 20 03 mov 3, %o1 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 400068f8: 90 0a 20 03 and %o0, 3, %o0 400068fc: 90 02 3f ff add %o0, -1, %o0 40006900: 80 a2 20 01 cmp %o0, 1 40006904: 18 80 00 0c bgu 40006934 40006908: ba 10 20 09 mov 9, %i5 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 4000690c: 7f ff f9 96 call 40004f64 40006910: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 40006914: 80 a2 20 00 cmp %o0, 0 40006918: 02 80 00 06 be 40006930 <== NEVER TAKEN 4000691c: 82 10 20 03 mov 3, %g1 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 40006920: f2 22 20 14 st %i1, [ %o0 + 0x14 ] req->aiocbp->aio_lio_opcode = LIO_SYNC; 40006924: c2 26 60 30 st %g1, [ %i1 + 0x30 ] return rtems_aio_enqueue (req); 40006928: 40 00 01 8d call 40006f5c 4000692c: 91 e8 00 08 restore %g0, %o0, %o0 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 40006930: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED 40006934: 82 10 3f ff mov -1, %g1 40006938: fa 26 60 34 st %i5, [ %i1 + 0x34 ] } 4000693c: b0 10 3f ff mov -1, %i0 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 40006940: 40 00 2a 69 call 400112e4 <__errno> 40006944: c2 26 60 38 st %g1, [ %i1 + 0x38 ] 40006948: fa 22 00 00 st %i5, [ %o0 ] } 4000694c: 81 c7 e0 08 ret 40006950: 81 e8 00 00 restore =============================================================================== 40007160 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 40007160: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 40007164: d0 06 00 00 ld [ %i0 ], %o0 40007168: 92 10 20 03 mov 3, %o1 4000716c: 40 00 23 17 call 4000fdc8 40007170: ba 10 00 18 mov %i0, %i5 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 40007174: 80 8a 20 01 btst 1, %o0 40007178: 12 80 00 14 bne 400071c8 4000717c: b8 10 20 09 mov 9, %i4 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 40007180: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40007184: 80 a0 60 00 cmp %g1, 0 40007188: 12 80 00 10 bne 400071c8 4000718c: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 40007190: c2 06 20 08 ld [ %i0 + 8 ], %g1 40007194: 80 a0 60 00 cmp %g1, 0 40007198: 06 80 00 0d bl 400071cc 4000719c: 82 10 3f ff mov -1, %g1 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 400071a0: 7f ff f7 71 call 40004f64 400071a4: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 400071a8: 80 a2 20 00 cmp %o0, 0 400071ac: 02 80 00 06 be 400071c4 <== NEVER TAKEN 400071b0: 82 10 20 01 mov 1, %g1 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 400071b4: fa 22 20 14 st %i5, [ %o0 + 0x14 ] req->aiocbp->aio_lio_opcode = LIO_READ; 400071b8: c2 26 20 30 st %g1, [ %i0 + 0x30 ] return rtems_aio_enqueue (req); 400071bc: 7f ff ff 68 call 40006f5c 400071c0: 91 e8 00 08 restore %g0, %o0, %o0 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 400071c4: b8 10 20 0b mov 0xb, %i4 <== NOT EXECUTED 400071c8: 82 10 3f ff mov -1, %g1 400071cc: f8 27 60 34 st %i4, [ %i5 + 0x34 ] } 400071d0: b0 10 3f ff mov -1, %i0 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 400071d4: 40 00 28 44 call 400112e4 <__errno> 400071d8: c2 27 60 38 st %g1, [ %i5 + 0x38 ] 400071dc: f8 22 00 00 st %i4, [ %o0 ] } 400071e0: 81 c7 e0 08 ret 400071e4: 81 e8 00 00 restore =============================================================================== 400071f0 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 400071f0: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 400071f4: d0 06 00 00 ld [ %i0 ], %o0 400071f8: 40 00 22 f4 call 4000fdc8 400071fc: 92 10 20 03 mov 3, %o1 { 40007200: ba 10 00 18 mov %i0, %i5 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 40007204: 90 0a 20 03 and %o0, 3, %o0 40007208: 90 02 3f ff add %o0, -1, %o0 4000720c: 80 a2 20 01 cmp %o0, 1 40007210: 18 80 00 14 bgu 40007260 40007214: b8 10 20 09 mov 9, %i4 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 40007218: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000721c: 80 a0 60 00 cmp %g1, 0 40007220: 12 80 00 10 bne 40007260 40007224: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 40007228: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000722c: 80 a0 60 00 cmp %g1, 0 40007230: 06 80 00 0d bl 40007264 40007234: 82 10 3f ff mov -1, %g1 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 40007238: 7f ff f7 4b call 40004f64 4000723c: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 40007240: 80 a2 20 00 cmp %o0, 0 40007244: 02 80 00 06 be 4000725c <== NEVER TAKEN 40007248: 82 10 20 02 mov 2, %g1 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 4000724c: fa 22 20 14 st %i5, [ %o0 + 0x14 ] req->aiocbp->aio_lio_opcode = LIO_WRITE; 40007250: c2 26 20 30 st %g1, [ %i0 + 0x30 ] return rtems_aio_enqueue (req); 40007254: 7f ff ff 42 call 40006f5c 40007258: 91 e8 00 08 restore %g0, %o0, %o0 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 4000725c: b8 10 20 0b mov 0xb, %i4 <== NOT EXECUTED 40007260: 82 10 3f ff mov -1, %g1 40007264: f8 27 60 34 st %i4, [ %i5 + 0x34 ] } 40007268: b0 10 3f ff mov -1, %i0 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 4000726c: 40 00 28 1e call 400112e4 <__errno> 40007270: c2 27 60 38 st %g1, [ %i5 + 0x38 ] 40007274: f8 22 00 00 st %i4, [ %o0 ] } 40007278: 81 c7 e0 08 ret 4000727c: 81 e8 00 00 restore =============================================================================== 400074f4 : ); unsigned int alarm( unsigned int seconds ) { 400074f4: 9d e3 bf a0 save %sp, -96, %sp uint64_t now; uint32_t ticks_per_second; uint32_t ticks; the_watchdog = &_POSIX_signals_Alarm_watchdog; ticks_per_second = TOD_TICKS_PER_SECOND; 400074f8: 40 00 05 d3 call 40008c44 400074fc: 01 00 00 00 nop 40007500: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED ticks = seconds * ticks_per_second; 40007504: b0 5a 00 18 smul %o0, %i0, %i0 <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40007508: 91 d0 20 09 ta 9 <== NOT EXECUTED return psr; 4000750c: b2 10 00 01 mov %g1, %i1 &lock_context ); cpu = _Watchdog_Get_CPU( the_watchdog ); _Watchdog_Per_CPU_acquire_critical( cpu, &lock_context2 ); now = cpu->Watchdog.ticks; 40007510: 03 10 00 79 sethi %hi(0x4001e400), %g1 ) { uint64_t expire; uint64_t remaining; expire = the_watchdog->expire; 40007514: 37 10 00 71 sethi %hi(0x4001c400), %i3 40007518: e0 18 61 f0 ldd [ %g1 + 0x1f0 ], %l0 4000751c: 84 16 e3 f8 or %i3, 0x3f8, %g2 40007520: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 if ( now < expire ) { 40007524: 80 a0 40 10 cmp %g1, %l0 40007528: 18 80 00 1e bgu 400075a0 <== NEVER TAKEN 4000752c: f8 00 a0 1c ld [ %g2 + 0x1c ], %i4 40007530: 02 80 00 1a be 40007598 <== ALWAYS TAKEN 40007534: 80 a7 00 11 cmp %i4, %l1 40007538: b8 10 20 00 clr %i4 <== NOT EXECUTED remaining = expire - now; } else { remaining = 0; } _Watchdog_Remove( header, the_watchdog ); 4000753c: 92 16 e3 f8 or %i3, 0x3f8, %o1 40007540: 35 10 00 79 sethi %hi(0x4001e400), %i2 40007544: 40 00 1c fc call 4000e934 <_Watchdog_Remove> 40007548: 90 16 a1 f8 or %i2, 0x1f8, %o0 ! 4001e5f8 <_Per_CPU_Information+0x38> &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_TICKS ], the_watchdog, now ); if ( ticks != 0 ) { 4000754c: 80 a6 20 00 cmp %i0, 0 40007550: 02 80 00 06 be 40007568 40007554: 96 84 40 18 addcc %l1, %i0, %o3 _Watchdog_Insert( 40007558: 92 16 e3 f8 or %i3, 0x3f8, %o1 4000755c: 94 44 20 00 addx %l0, 0, %o2 40007560: 40 00 1c cd call 4000e894 <_Watchdog_Insert> 40007564: 90 16 a1 f8 or %i2, 0x1f8, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40007568: 82 10 00 19 mov %i1, %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000756c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007570: 01 00 00 00 nop _ISR_lock_Release_and_ISR_enable( &_POSIX_signals_Alarm_lock, &lock_context ); return ( remaining + ticks_per_second - 1 ) / ticks_per_second; 40007574: b0 07 7f ff add %i5, -1, %i0 40007578: b0 06 00 1c add %i0, %i4, %i0 } 4000757c: 81 80 20 00 wr %g0, %y 40007580: 01 00 00 00 nop 40007584: 01 00 00 00 nop 40007588: 01 00 00 00 nop 4000758c: b0 76 00 1d udiv %i0, %i5, %i0 40007590: 81 c7 e0 08 ret 40007594: 81 e8 00 00 restore if ( now < expire ) { 40007598: 28 bf ff e9 bleu,a 4000753c 4000759c: b8 10 20 00 clr %i4 400075a0: 10 bf ff e7 b 4000753c 400075a4: b8 27 00 11 sub %i4, %l1, %i4 =============================================================================== 40008444 : if ( clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC ) { 40008444: 80 a2 20 01 cmp %o0, 1 40008448: 02 80 00 04 be 40008458 <== ALWAYS TAKEN 4000844c: 80 a2 20 04 cmp %o0, 4 40008450: 12 80 00 05 bne 40008464 <== NOT EXECUTED 40008454: 01 00 00 00 nop <== NOT EXECUTED 40008458: 82 13 c0 00 mov %o7, %g1 4000845c: 7f ff ff 7c call 4000824c 40008460: 9e 10 40 00 mov %g1, %o7 } } return eno; } 40008464: 81 c3 e0 08 retl <== NOT EXECUTED 40008468: 90 10 20 86 mov 0x86, %o0 <== NOT EXECUTED =============================================================================== 400064a8 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 400064a8: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 400064ac: 80 a6 60 00 cmp %i1, 0 400064b0: 02 80 00 2b be 4000655c <== NEVER TAKEN 400064b4: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 400064b8: 02 80 00 12 be 40006500 400064bc: 80 a6 20 02 cmp %i0, 2 _TOD_Acquire( &lock_context ); _TOD_Set( tp, &lock_context ); _TOD_Unlock(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 400064c0: 02 80 00 0a be 400064e8 400064c4: 80 a6 20 03 cmp %i0, 3 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 400064c8: 02 80 00 08 be 400064e8 400064cc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 400064d0: 40 00 27 2e call 40010188 <__errno> 400064d4: b0 10 3f ff mov -1, %i0 ! ffffffff 400064d8: 82 10 20 16 mov 0x16, %g1 400064dc: c2 22 00 00 st %g1, [ %o0 ] return 0; } 400064e0: 81 c7 e0 08 ret 400064e4: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( ENOSYS ); 400064e8: 40 00 27 28 call 40010188 <__errno> 400064ec: b0 10 3f ff mov -1, %i0 400064f0: 82 10 20 58 mov 0x58, %g1 400064f4: c2 22 00 00 st %g1, [ %o0 ] 400064f8: 81 c7 e0 08 ret 400064fc: 81 e8 00 00 restore if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 40006500: c2 06 40 00 ld [ %i1 ], %g1 40006504: 80 a0 60 00 cmp %g1, 0 40006508: 04 80 00 0e ble 40006540 <== ALWAYS TAKEN 4000650c: 01 00 00 00 nop _TOD_Lock(); 40006510: 40 00 04 51 call 40007654 <_TOD_Lock> 40006514: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006518: 91 d0 20 09 ta 9 <== NOT EXECUTED _Timecounter_Acquire( lock_context ); 4000651c: c2 27 bf fc st %g1, [ %fp + -4 ] _TOD_Set( tp, &lock_context ); 40006520: 92 07 bf fc add %fp, -4, %o1 40006524: 90 10 00 19 mov %i1, %o0 40006528: 40 00 04 55 call 4000767c <_TOD_Set> 4000652c: b0 10 20 00 clr %i0 _TOD_Unlock(); 40006530: 40 00 04 4e call 40007668 <_TOD_Unlock> 40006534: 01 00 00 00 nop return 0; 40006538: 81 c7 e0 08 ret 4000653c: 81 e8 00 00 restore if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 40006540: 12 80 00 07 bne 4000655c <== NEVER TAKEN 40006544: 03 08 76 b9 sethi %hi(0x21dae400), %g1 40006548: c4 06 60 04 ld [ %i1 + 4 ], %g2 4000654c: 82 10 60 ff or %g1, 0xff, %g1 40006550: 80 a0 80 01 cmp %g2, %g1 40006554: 18 bf ff ef bgu 40006510 40006558: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); 4000655c: 40 00 27 0b call 40010188 <__errno> 40006560: b0 10 3f ff mov -1, %i0 ! ffffffff 40006564: 82 10 20 16 mov 0x16, %g1 40006568: c2 22 00 00 st %g1, [ %o0 ] 4000656c: 81 c7 e0 08 ret 40006570: 81 e8 00 00 restore =============================================================================== 4000709c : CHAIN_DEFINE_EMPTY( mmap_mappings ); void *mmap( void *addr, size_t len, int prot, int flags, int fildes, off_t off ) { 4000709c: 9d e3 bf 38 save %sp, -200, %sp 400070a0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 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; 400070a4: 40 00 24 ed call 40010458 <__errno> 400070a8: e0 1f a0 58 ldd [ %fp + 0x58 ], %l0 iop = NULL; if ( len == 0 ) { 400070ac: 80 a6 60 00 cmp %i1, 0 400070b0: 02 80 00 84 be 400072c0 <== NEVER TAKEN 400070b4: c0 22 00 00 clr [ %o0 ] /* * 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 ) { 400070b8: 80 a6 a0 00 cmp %i2, 0 400070bc: 02 80 00 71 be 40007280 <== NEVER TAKEN 400070c0: 80 8e a0 02 btst 2, %i2 /* * 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) ) { 400070c4: 02 80 00 6f be 40007280 400070c8: 03 00 00 04 sethi %hi(0x1000), %g1 map_shared = (flags & MAP_SHARED) == MAP_SHARED; 400070cc: a4 0e e0 01 and %i3, 1, %l2 /* * 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) ) { 400070d0: ba 8e c0 01 andcc %i3, %g1, %i5 400070d4: 02 80 00 72 be 4000729c 400070d8: 86 0e e0 02 and %i3, 2, %g3 400070dc: 82 38 00 1c xnor %g0, %i4, %g1 400070e0: 80 a0 00 01 cmp %g0, %g1 400070e4: 84 14 00 11 or %l0, %l1, %g2 400070e8: 82 40 20 00 addx %g0, 0, %g1 400070ec: 80 a0 00 02 cmp %g0, %g2 400070f0: 84 40 20 00 addx %g0, 0, %g2 400070f4: 82 10 40 02 or %g1, %g2, %g1 400070f8: 82 10 40 12 or %g1, %l2, %g1 400070fc: 80 a0 60 00 cmp %g1, 0 40007100: 12 80 00 70 bne 400072c0 40007104: ac 10 00 01 mov %g1, %l6 40007108: 03 3f ff fb sethi %hi(0xffffec00), %g1 /* * If MAP_ANON is declared without MAP_PRIVATE or MAP_SHARED, * force MAP_PRIVATE */ if ( map_anonymous && !map_private && !map_shared ) { 4000710c: 80 a0 e0 00 cmp %g3, 0 40007110: 82 10 63 ec or %g1, 0x3ec, %g1 40007114: 12 80 01 06 bne 4000752c 40007118: 82 0e c0 01 and %i3, %g1, %g1 flags |= MAP_PRIVATE; map_private = true; } /* Check for supported flags */ if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_ANON)) != 0) { 4000711c: 80 a0 60 00 cmp %g1, 0 40007120: 12 80 00 68 bne 400072c0 40007124: a8 8e e0 10 andcc %i3, 0x10, %l4 errno = EINVAL; return MAP_FAILED; } /* Check for illegal addresses. Watch out for address wrap. */ if ( map_fixed ) { 40007128: 02 80 00 80 be 40007328 <== ALWAYS TAKEN 4000712c: ae 16 e0 02 or %i3, 2, %l7 40007130: b6 10 00 17 mov %l7, %i3 <== NOT EXECUTED 40007134: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if ((uintptr_t)addr & PAGE_MASK) { 40007138: 80 8e 2f ff btst 0xfff, %i0 <== NOT EXECUTED 4000713c: 12 80 00 61 bne 400072c0 40007140: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; return MAP_FAILED; } if ( addr == NULL ) { 40007144: 02 80 00 5f be 400072c0 40007148: 80 a6 60 00 cmp %i1, 0 errno = EINVAL; return MAP_FAILED; } if (addr + len < addr) { 4000714c: 06 80 00 5d bl 400072c0 <== NEVER TAKEN 40007150: 80 a7 60 00 cmp %i5, 0 errno = EINVAL; return MAP_FAILED; } } if ( !map_anonymous ) { 40007154: 12 80 00 69 bne 400072f8 40007158: 92 07 bf a0 add %fp, -96, %o1 * Get a stat of the file to get the dev + inode number and to make sure the * fd is ok. The normal libio calls cannot be used because we need to return * MAP_FAILED on error and they return -1 directly without coming back to * here. */ if ( fstat( fildes, &sb ) < 0 ) { 4000715c: 40 00 1c cc call 4000e48c 40007160: 90 10 00 1c mov %i4, %o0 40007164: 80 a2 20 00 cmp %o0, 0 40007168: 06 80 00 c9 bl 4000748c <== NEVER TAKEN 4000716c: 2d 00 00 3c sethi %hi(0xf000), %l6 /* fstat ensures we have a good file descriptor. Hold on to iop. */ iop = rtems_libio_iop( fildes ); /* Check the type of file we have and make sure it is supported. */ if ( S_ISDIR( sb.st_mode ) || S_ISLNK( sb.st_mode )) { 40007170: c2 07 bf ac ld [ %fp + -84 ], %g1 40007174: 05 00 00 10 sethi %hi(0x4000), %g2 40007178: ac 08 40 16 and %g1, %l6, %l6 4000717c: 80 a5 80 02 cmp %l6, %g2 40007180: 02 80 00 9c be 400073f0 <== NEVER TAKEN 40007184: 05 00 00 28 sethi %hi(0xa000), %g2 40007188: 80 a5 80 02 cmp %l6, %g2 4000718c: 02 80 00 99 be 400073f0 <== NEVER TAKEN 40007190: 05 00 00 20 sethi %hi(0x8000), %g2 errno = ENODEV; return MAP_FAILED; } /* Check to see if the mapping is valid for a regular file. */ if ( S_ISREG( sb.st_mode ) 40007194: 80 a5 80 02 cmp %l6, %g2 40007198: 02 80 00 9c be 40007408 <== NEVER TAKEN 4000719c: 05 00 00 08 sethi %hi(0x2000), %g2 errno = EOVERFLOW; return MAP_FAILED; } /* Check to see if the mapping is valid for other file/object types. */ if ( !S_ISCHR( sb.st_mode ) && sb.st_size < off + len ) { 400071a0: 80 a5 80 02 cmp %l6, %g2 400071a4: 02 80 00 ad be 40007458 400071a8: 9a 84 40 19 addcc %l1, %i1, %o5 400071ac: c8 07 bf c0 ld [ %fp + -64 ], %g4 400071b0: 98 44 20 00 addx %l0, 0, %o4 400071b4: 80 a1 00 0c cmp %g4, %o4 400071b8: 06 80 00 d7 bl 40007514 <== NEVER TAKEN 400071bc: 01 00 00 00 nop 400071c0: 02 80 00 f5 be 40007594 <== ALWAYS TAKEN 400071c4: c4 07 bf c4 ld [ %fp + -60 ], %g2 errno = ENXIO; return MAP_FAILED; } /* Do not seek on character devices, pipes, sockets, or memory objects. */ if ( S_ISREG( sb.st_mode ) || S_ISBLK( sb.st_mode ) ) { 400071c8: 05 3f ff e8 sethi %hi(0xffffa000), %g2 <== NOT EXECUTED 400071cc: 07 3f ff f4 sethi %hi(0xffffd000), %g3 400071d0: 84 05 80 02 add %l6, %g2, %g2 400071d4: 80 88 80 03 btst %g2, %g3 400071d8: 02 80 00 95 be 4000742c <== NEVER TAKEN 400071dc: 2f 00 00 2c sethi %hi(0xb000), %l7 return MAP_FAILED; } } /* cdevs do not provide private mappings of any kind. */ if ( S_ISCHR( sb.st_mode ) && map_private ) { 400071e0: ae 08 40 17 and %g1, %l7, %l7 400071e4: 03 00 00 08 sethi %hi(0x2000), %g1 400071e8: 82 1d c0 01 xor %l7, %g1, %g1 400071ec: 80 a0 00 01 cmp %g0, %g1 400071f0: 84 60 3f ff subx %g0, -1, %g2 400071f4: 86 10 00 02 mov %g2, %g3 400071f8: c6 27 bf 9c st %g3, [ %fp + -100 ] return MAP_FAILED; } } /* Create the mapping */ mapping = malloc( sizeof( mmap_mapping )); 400071fc: 92 10 20 01 mov 1, %o1 40007200: 7f ff f7 37 call 40004edc 40007204: 90 10 20 18 mov 0x18, %o0 if ( !mapping ) { 40007208: aa 92 20 00 orcc %o0, 0, %l5 4000720c: 02 80 00 41 be 40007310 <== NEVER TAKEN 40007210: c6 07 bf 9c ld [ %fp + -100 ], %g3 * HACK: We should have a better generic way to distinguish between * shm objects and other mmap'd files. We need to know at munmap time * if the mapping is to a shared memory object in order to refcnt shms. * We could do this by providing mmap in the file operations if needed. */ if ( S_ISREG( sb.st_mode ) || S_ISBLK( sb.st_mode ) || 40007214: 03 00 00 20 sethi %hi(0x8000), %g1 mapping->flags = flags; 40007218: f6 25 60 10 st %i3, [ %l5 + 0x10 ] if ( S_ISREG( sb.st_mode ) || S_ISBLK( sb.st_mode ) || 4000721c: 82 1d c0 01 xor %l7, %g1, %g1 mapping->len = len; 40007220: f2 25 60 0c st %i1, [ %l5 + 0xc ] if ( S_ISREG( sb.st_mode ) || S_ISBLK( sb.st_mode ) || 40007224: 80 a0 00 01 cmp %g0, %g1 S_ISCHR( sb.st_mode ) || S_ISFIFO( sb.st_mode ) || 40007228: 03 00 00 04 sethi %hi(0x1000), %g1 if ( S_ISREG( sb.st_mode ) || S_ISBLK( sb.st_mode ) || 4000722c: 84 60 3f ff subx %g0, -1, %g2 S_ISCHR( sb.st_mode ) || S_ISFIFO( sb.st_mode ) || 40007230: ac 1d 80 01 xor %l6, %g1, %l6 40007234: 80 a0 00 16 cmp %g0, %l6 40007238: 84 10 80 03 or %g2, %g3, %g2 4000723c: 82 60 3f ff subx %g0, -1, %g1 return &rtems_libio_iops[ fd ]; 40007240: b7 2f 20 01 sll %i4, 1, %i3 40007244: 07 10 00 77 sethi %hi(0x4001dc00), %g3 40007248: b6 06 c0 1c add %i3, %i4, %i3 4000724c: 86 10 e3 10 or %g3, 0x310, %g3 40007250: b7 2e e0 04 sll %i3, 4, %i3 40007254: 82 10 40 02 or %g1, %g2, %g1 40007258: b6 06 c0 03 add %i3, %g3, %i3 4000725c: 82 18 60 01 xor %g1, 1, %g1 } } else { is_shared_shm = false; } if ( map_fixed ) { 40007260: 80 a5 20 00 cmp %l4, 0 40007264: 02 80 00 3b be 40007350 <== ALWAYS TAKEN 40007268: ac 10 00 01 mov %g1, %l6 return MAP_FAILED; } } /* MAP_FIXED is not supported for shared memory objects with MAP_SHARED. */ if ( map_fixed && is_shared_shm ) { 4000726c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40007270: 22 80 00 cf be,a 400075ac <== NOT EXECUTED 40007274: f0 25 60 08 st %i0, [ %l5 + 8 ] <== NOT EXECUTED free( mapping ); 40007278: 7f ff f7 9e call 400050f0 <== NOT EXECUTED 4000727c: 01 00 00 00 nop <== NOT EXECUTED errno = ENOTSUP; 40007280: 40 00 24 76 call 40010458 <__errno> 40007284: 01 00 00 00 nop return MAP_FAILED; 40007288: 82 10 3f ff mov -1, %g1 ! ffffffff errno = ENOTSUP; 4000728c: 84 10 20 86 mov 0x86, %g2 40007290: c4 22 00 00 st %g2, [ %o0 ] rtems_chain_append_unprotected( &mmap_mappings, &mapping->node ); mmap_mappings_lock_release( ); return mapping->addr; } 40007294: 81 c7 e0 08 ret 40007298: 91 e8 00 01 restore %g0, %g1, %o0 if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_ANON)) != 0) { 4000729c: 03 3f ff fb sethi %hi(0xffffec00), %g1 400072a0: 82 10 63 ec or %g1, 0x3ec, %g1 ! ffffefec 400072a4: 80 8e c0 01 btst %i3, %g1 400072a8: 12 80 00 06 bne 400072c0 <== NEVER TAKEN 400072ac: 80 a4 a0 00 cmp %l2, 0 if ( map_shared ) { 400072b0: 12 80 00 0b bne 400072dc 400072b4: 80 a0 e0 00 cmp %g3, 0 } else if ( !map_private ) { 400072b8: 12 80 00 0b bne 400072e4 400072bc: a6 10 20 01 mov 1, %l3 errno = EINVAL; 400072c0: 40 00 24 66 call 40010458 <__errno> 400072c4: 01 00 00 00 nop 400072c8: 84 10 20 16 mov 0x16, %g2 ! 16 <_TLS_Alignment+0x15> 400072cc: c4 22 00 00 st %g2, [ %o0 ] return MAP_FAILED; 400072d0: 82 10 3f ff mov -1, %g1 } 400072d4: 81 c7 e0 08 ret 400072d8: 91 e8 00 01 restore %g0, %g1, %o0 if ( map_private ) { 400072dc: 12 bf ff f9 bne 400072c0 400072e0: a6 10 20 00 clr %l3 if ( map_fixed ) { 400072e4: a8 8e e0 10 andcc %i3, 0x10, %l4 400072e8: 22 bf ff 9b be,a 40007154 400072ec: 80 a7 60 00 cmp %i5, 0 if ((uintptr_t)addr & PAGE_MASK) { 400072f0: 10 bf ff 93 b 4000713c 400072f4: 80 8e 2f ff btst 0xfff, %i0 mapping = malloc( sizeof( mmap_mapping )); 400072f8: 92 10 20 01 mov 1, %o1 400072fc: 7f ff f6 f8 call 40004edc 40007300: 90 10 20 18 mov 0x18, %o0 if ( !mapping ) { 40007304: aa 92 20 00 orcc %o0, 0, %l5 40007308: 32 80 00 34 bne,a 400073d8 <== ALWAYS TAKEN 4000730c: f2 25 60 0c st %i1, [ %l5 + 0xc ] errno = ENOMEM; 40007310: 40 00 24 52 call 40010458 <__errno> <== NOT EXECUTED 40007314: 01 00 00 00 nop <== NOT EXECUTED 40007318: 84 10 20 0c mov 0xc, %g2 ! c <_TLS_Alignment+0xb> <== NOT EXECUTED return MAP_FAILED; 4000731c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 40007320: 10 bf ff ed b 400072d4 <== NOT EXECUTED 40007324: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED mapping = malloc( sizeof( mmap_mapping )); 40007328: 92 10 20 01 mov 1, %o1 4000732c: 7f ff f6 ec call 40004edc 40007330: 90 10 20 18 mov 0x18, %o0 if ( !mapping ) { 40007334: aa 92 20 00 orcc %o0, 0, %l5 40007338: 02 bf ff f6 be 40007310 <== NEVER TAKEN 4000733c: 01 00 00 00 nop mapping->len = len; 40007340: f2 25 60 0c st %i1, [ %l5 + 0xc ] mapping->flags = flags; 40007344: a6 10 20 01 mov 1, %l3 40007348: ee 25 60 10 st %l7, [ %l5 + 0x10 ] iop = NULL; 4000734c: b6 10 20 00 clr %i3 } else if ( map_private ) { 40007350: 80 8c e0 ff btst 0xff, %l3 40007354: 12 80 00 54 bne 400074a4 40007358: 94 10 00 19 mov %i1, %o2 extern rtems_chain_control mmap_mappings; static inline void mmap_mappings_lock_obtain( void ) { rtems_libio_lock(); 4000735c: 7f ff f8 1c call 400053cc 40007360: 01 00 00 00 nop } else if ( map_shared ) { 40007364: 80 a4 a0 00 cmp %l2, 0 40007368: 02 80 00 12 be 400073b0 <== NEVER TAKEN 4000736c: 07 10 00 72 sethi %hi(0x4001c800), %g3 if ( is_shared_shm ) { 40007370: 80 8d a0 ff btst 0xff, %l6 40007374: 02 80 00 04 be 40007384 40007378: 98 10 00 10 mov %l0, %o4 mapping->shm = iop_to_shm( iop ); 4000737c: c2 06 e0 28 ld [ %i3 + 0x28 ], %g1 40007380: c2 25 60 14 st %g1, [ %l5 + 0x14 ] err = (*iop->pathinfo.handlers->mmap_h)( 40007384: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 40007388: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 4000738c: 9a 10 00 11 mov %l1, %o5 40007390: 96 10 00 1a mov %i2, %o3 40007394: 94 10 00 19 mov %i1, %o2 40007398: 92 05 60 08 add %l5, 8, %o1 4000739c: 9f c0 40 00 call %g1 400073a0: 90 10 00 1b mov %i3, %o0 if ( err != 0 ) { 400073a4: 80 a2 20 00 cmp %o0, 0 400073a8: 12 80 00 a8 bne 40007648 400073ac: 07 10 00 72 sethi %hi(0x4001c800), %g3 400073b0: 86 10 e2 e0 or %g3, 0x2e0, %g3 ! 4001cae0 400073b4: 88 00 ff fc add %g3, -4, %g4 old_last = tail->previous; 400073b8: c2 01 20 08 ld [ %g4 + 8 ], %g1 the_node->next = tail; 400073bc: c6 25 40 00 st %g3, [ %l5 ] tail->previous = the_node; 400073c0: ea 21 20 08 st %l5, [ %g4 + 8 ] old_last->next = the_node; 400073c4: ea 20 40 00 st %l5, [ %g1 ] } static inline void mmap_mappings_lock_release( void ) { rtems_libio_unlock(); 400073c8: 7f ff f8 06 call 400053e0 400073cc: c2 25 60 04 st %g1, [ %l5 + 4 ] return mapping->addr; 400073d0: 10 bf ff c1 b 400072d4 400073d4: c2 05 60 08 ld [ %l5 + 8 ], %g1 if ( map_fixed ) { 400073d8: 80 a5 20 00 cmp %l4, 0 400073dc: 12 80 00 72 bne 400075a4 400073e0: f6 25 60 10 st %i3, [ %l5 + 0x10 ] iop = NULL; 400073e4: b6 10 20 00 clr %i3 is_shared_shm = false; 400073e8: 10 bf ff da b 40007350 400073ec: ac 10 20 00 clr %l6 errno = ENODEV; 400073f0: 40 00 24 1a call 40010458 <__errno> <== NOT EXECUTED 400073f4: 01 00 00 00 nop <== NOT EXECUTED 400073f8: 84 10 20 13 mov 0x13, %g2 ! 13 <_TLS_Alignment+0x12> <== NOT EXECUTED return MAP_FAILED; 400073fc: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 40007400: 10 bf ff b5 b 400072d4 <== NOT EXECUTED 40007404: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED && (( off >= sb.st_size ) || (( off + len ) >= sb.st_size ))) { 40007408: c2 07 bf c0 ld [ %fp + -64 ], %g1 <== NOT EXECUTED 4000740c: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 40007410: 04 80 00 55 ble 40007564 <== NOT EXECUTED 40007414: c8 07 bf c4 ld [ %fp + -60 ], %g4 <== NOT EXECUTED 40007418: 86 84 40 19 addcc %l1, %i1, %g3 <== NOT EXECUTED 4000741c: 84 44 20 00 addx %l0, 0, %g2 <== NOT EXECUTED 40007420: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40007424: 04 80 00 46 ble 4000753c <== NOT EXECUTED 40007428: 01 00 00 00 nop <== NOT EXECUTED if ( lseek( fildes, off, SEEK_SET ) < 0 ) { 4000742c: 96 10 20 00 clr %o3 ! 0 <== NOT EXECUTED 40007430: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40007434: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40007438: 40 00 1c 5c call 4000e5a8 <== NOT EXECUTED 4000743c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 40007440: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007444: 06 bf ff a4 bl 400072d4 <== NOT EXECUTED 40007448: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 4000744c: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 40007450: 2d 00 00 3c sethi %hi(0xf000), %l6 <== NOT EXECUTED 40007454: ac 08 40 16 and %g1, %l6, %l6 <== NOT EXECUTED if ( S_ISCHR( sb.st_mode ) && map_private ) { 40007458: 09 00 00 08 sethi %hi(0x2000), %g4 4000745c: 2f 00 00 2c sethi %hi(0xb000), %l7 40007460: ae 08 40 17 and %g1, %l7, %l7 40007464: 82 1d c0 04 xor %l7, %g4, %g1 40007468: 80 a0 00 01 cmp %g0, %g1 4000746c: 84 60 3f ff subx %g0, -1, %g2 40007470: 80 a5 80 04 cmp %l6, %g4 40007474: 12 bf ff 61 bne 400071f8 <== NEVER TAKEN 40007478: 86 10 00 02 mov %g2, %g3 4000747c: 80 8c e0 ff btst 0xff, %l3 40007480: 22 bf ff 5f be,a 400071fc 40007484: c6 27 bf 9c st %g3, [ %fp + -100 ] 40007488: 30 bf ff 8e b,a 400072c0 errno = EBADF; 4000748c: 40 00 23 f3 call 40010458 <__errno> <== NOT EXECUTED 40007490: 01 00 00 00 nop <== NOT EXECUTED 40007494: 84 10 20 09 mov 9, %g2 ! 9 <_TLS_Alignment+0x8> <== NOT EXECUTED return MAP_FAILED; 40007498: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 4000749c: 10 bf ff 8e b 400072d4 <== NOT EXECUTED 400074a0: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED posix_memalign( &mapping->addr, PAGE_SIZE, len ); 400074a4: 13 00 00 04 sethi %hi(0x1000), %o1 400074a8: 40 00 1c bf call 4000e7a4 400074ac: 90 05 60 08 add %l5, 8, %o0 400074b0: c2 05 60 08 ld [ %l5 + 8 ], %g1 if ( !mapping->addr ) { 400074b4: 80 a0 60 00 cmp %g1, 0 400074b8: 02 80 00 6a be 40007660 <== NEVER TAKEN 400074bc: 01 00 00 00 nop rtems_libio_lock(); 400074c0: 7f ff f7 c3 call 400053cc 400074c4: 01 00 00 00 nop if ( !map_anonymous ) { 400074c8: 80 a7 60 00 cmp %i5, 0 400074cc: 32 80 00 2b bne,a 40007578 400074d0: d0 05 60 08 ld [ %l5 + 8 ], %o0 r = read( fildes, mapping->addr, len ); 400074d4: d2 05 60 08 ld [ %l5 + 8 ], %o1 400074d8: 94 10 00 19 mov %i1, %o2 400074dc: 40 00 1c e7 call 4000e878 400074e0: 90 10 00 1c mov %i4, %o0 if ( r != len ) { 400074e4: 80 a2 00 19 cmp %o0, %i1 400074e8: 02 bf ff b2 be 400073b0 <== ALWAYS TAKEN 400074ec: 07 10 00 72 sethi %hi(0x4001c800), %g3 rtems_libio_unlock(); 400074f0: 7f ff f7 bc call 400053e0 <== NOT EXECUTED 400074f4: 01 00 00 00 nop <== NOT EXECUTED if ( !map_fixed ) { 400074f8: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED 400074fc: 12 80 00 04 bne 4000750c <== NOT EXECUTED 40007500: 01 00 00 00 nop <== NOT EXECUTED free( mapping->addr ); 40007504: 7f ff f6 fb call 400050f0 <== NOT EXECUTED 40007508: d0 05 60 08 ld [ %l5 + 8 ], %o0 <== NOT EXECUTED free( mapping ); 4000750c: 7f ff f6 f9 call 400050f0 <== NOT EXECUTED 40007510: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED errno = ENXIO; 40007514: 40 00 23 d1 call 40010458 <__errno> <== NOT EXECUTED 40007518: 01 00 00 00 nop <== NOT EXECUTED 4000751c: 84 10 20 06 mov 6, %g2 ! 6 <_TLS_Alignment+0x5> <== NOT EXECUTED return MAP_FAILED; 40007520: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 40007524: 10 bf ff 6c b 400072d4 <== NOT EXECUTED 40007528: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_ANON)) != 0) { 4000752c: 80 a0 60 00 cmp %g1, 0 40007530: 02 bf ff 62 be 400072b8 <== ALWAYS TAKEN 40007534: 80 a0 e0 00 cmp %g3, 0 40007538: 30 bf ff 62 b,a 400072c0 <== NOT EXECUTED && (( off >= sb.st_size ) || (( off + len ) >= sb.st_size ))) { 4000753c: 12 80 00 04 bne 4000754c <== NOT EXECUTED 40007540: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 40007544: 18 bf ff bb bgu 40007430 <== NOT EXECUTED 40007548: 96 10 20 00 clr %o3 <== NOT EXECUTED errno = EOVERFLOW; 4000754c: 40 00 23 c3 call 40010458 <__errno> <== NOT EXECUTED 40007550: 01 00 00 00 nop <== NOT EXECUTED 40007554: 84 10 20 8b mov 0x8b, %g2 ! 8b <_TLS_Alignment+0x8a> <== NOT EXECUTED return MAP_FAILED; 40007558: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 4000755c: 10 bf ff 5e b 400072d4 <== NOT EXECUTED 40007560: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED && (( off >= sb.st_size ) || (( off + len ) >= sb.st_size ))) { 40007564: 12 bf ff fa bne 4000754c <== NOT EXECUTED 40007568: 80 a1 00 11 cmp %g4, %l1 <== NOT EXECUTED 4000756c: 18 bf ff ac bgu 4000741c <== NOT EXECUTED 40007570: 86 84 40 19 addcc %l1, %i1, %g3 <== NOT EXECUTED 40007574: 30 bf ff f6 b,a 4000754c <== NOT EXECUTED memset( mapping->addr, 0, len ); 40007578: 94 10 00 19 mov %i1, %o2 4000757c: 40 00 25 64 call 40010b0c 40007580: 92 10 20 00 clr %o1 40007584: 07 10 00 72 sethi %hi(0x4001c800), %g3 40007588: 86 10 e2 e0 or %g3, 0x2e0, %g3 ! 4001cae0 4000758c: 10 bf ff 8b b 400073b8 40007590: 88 00 ff fc add %g3, -4, %g4 if ( !S_ISCHR( sb.st_mode ) && sb.st_size < off + len ) { 40007594: 80 a0 80 0d cmp %g2, %o5 40007598: 1a bf ff 0d bcc 400071cc <== ALWAYS TAKEN 4000759c: 05 3f ff e8 sethi %hi(0xffffa000), %g2 400075a0: 30 bf ff dd b,a 40007514 <== NOT EXECUTED mapping->addr = addr; 400075a4: f0 25 60 08 st %i0, [ %l5 + 8 ] iop = NULL; 400075a8: b6 10 20 00 clr %i3 rtems_libio_lock(); 400075ac: 7f ff f7 88 call 400053cc 400075b0: 01 00 00 00 nop return _Chain_Immutable_head( the_chain )->next; 400075b4: 09 10 00 72 sethi %hi(0x4001c800), %g4 400075b8: c2 01 22 dc ld [ %g4 + 0x2dc ], %g1 ! 4001cadc 400075bc: 88 11 22 dc or %g4, 0x2dc, %g4 while ( !rtems_chain_is_tail( &mmap_mappings, node )) { 400075c0: 86 01 20 04 add %g4, 4, %g3 400075c4: 80 a0 40 03 cmp %g1, %g3 400075c8: 02 80 00 10 be 40007608 400075cc: 80 8c e0 ff btst 0xff, %l3 if ( ( addr >= current_mapping->addr ) && 400075d0: c4 00 60 08 ld [ %g1 + 8 ], %g2 400075d4: 80 a0 80 18 cmp %g2, %i0 400075d8: 38 80 00 08 bgu,a 400075f8 400075dc: c2 00 40 00 ld [ %g1 ], %g1 ( addr < ( current_mapping->addr + current_mapping->len )) ) { 400075e0: de 00 60 0c ld [ %g1 + 0xc ], %o7 400075e4: 84 00 80 0f add %g2, %o7, %g2 if ( ( addr >= current_mapping->addr ) && 400075e8: 80 a6 00 02 cmp %i0, %g2 400075ec: 0a 80 00 0d bcs 40007620 <== NEVER TAKEN 400075f0: 01 00 00 00 nop 400075f4: c2 00 40 00 ld [ %g1 ], %g1 while ( !rtems_chain_is_tail( &mmap_mappings, node )) { 400075f8: 80 a0 40 03 cmp %g1, %g3 400075fc: 32 bf ff f6 bne,a 400075d4 40007600: c4 00 60 08 ld [ %g1 + 8 ], %g2 if ( map_private ) { 40007604: 80 8c e0 ff btst 0xff, %l3 40007608: 02 80 00 19 be 4000766c <== NEVER TAKEN 4000760c: 80 a7 60 00 cmp %i5, 0 if ( !map_anonymous ) { 40007610: 32 bf ff 6b bne,a 400073bc <== ALWAYS TAKEN 40007614: c2 01 20 08 ld [ %g4 + 8 ], %g1 40007618: 10 bf ff af b 400074d4 <== NOT EXECUTED 4000761c: ba 10 00 14 mov %l4, %i5 <== NOT EXECUTED free( mapping ); 40007620: 7f ff f6 b4 call 400050f0 <== NOT EXECUTED 40007624: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED rtems_libio_unlock(); 40007628: 7f ff f7 6e call 400053e0 <== NOT EXECUTED 4000762c: 01 00 00 00 nop <== NOT EXECUTED errno = ENXIO; 40007630: 40 00 23 8a call 40010458 <__errno> <== NOT EXECUTED 40007634: 01 00 00 00 nop <== NOT EXECUTED 40007638: 84 10 20 06 mov 6, %g2 ! 6 <_TLS_Alignment+0x5> <== NOT EXECUTED return MAP_FAILED; 4000763c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 40007640: 10 bf ff 25 b 400072d4 <== NOT EXECUTED 40007644: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED 40007648: 7f ff f7 66 call 400053e0 4000764c: 01 00 00 00 nop free( mapping ); 40007650: 7f ff f6 a8 call 400050f0 40007654: 90 10 00 15 mov %l5, %o0 return MAP_FAILED; 40007658: 10 bf ff 1f b 400072d4 4000765c: 82 10 3f ff mov -1, %g1 free( mapping ); 40007660: 7f ff f6 a4 call 400050f0 <== NOT EXECUTED 40007664: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40007668: 30 bf ff 2a b,a 40007310 <== NOT EXECUTED } else if ( map_shared ) { 4000766c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40007670: 12 bf ff 45 bne 40007384 <== NOT EXECUTED 40007674: 98 10 00 10 mov %l0, %o4 <== NOT EXECUTED old_last = tail->previous; 40007678: 10 bf ff 51 b 400073bc <== NOT EXECUTED 4000767c: c2 01 20 08 ld [ %g4 + 8 ], %g1 <== NOT EXECUTED =============================================================================== 400074d8 : */ int mq_close( mqd_t mqdes ) { 400074d8: 9d e3 bf 78 save %sp, -136, %sp _RTEMS_Lock_allocator(); 400074dc: 40 00 07 e0 call 4000945c <_RTEMS_Lock_allocator> 400074e0: 01 00 00 00 nop Objects_Id id, Thread_queue_Context *queue_context ) { _Thread_queue_Context_initialize( queue_context ); return (POSIX_Message_queue_Control *) _Objects_Get( 400074e4: 92 07 bf dc add %fp, -36, %o1 400074e8: 15 10 00 60 sethi %hi(0x40018000), %o2 400074ec: 90 10 00 18 mov %i0, %o0 400074f0: 40 00 12 76 call 4000bec8 <_Objects_Get> 400074f4: 94 12 a0 48 or %o2, 0x48, %o2 Thread_queue_Context queue_context; _Objects_Allocator_lock(); the_mq = _POSIX_Message_queue_Get( mqdes, &queue_context ); if ( the_mq == NULL ) { 400074f8: 84 92 20 00 orcc %o0, 0, %g2 400074fc: 02 80 00 11 be 40007540 <== NEVER TAKEN 40007500: 01 00 00 00 nop _CORE_message_queue_Acquire_critical( &the_mq->Message_queue, &queue_context ); if ( the_mq->open_count == 0 ) { 40007504: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 40007508: 80 a0 60 00 cmp %g1, 0 4000750c: 02 80 00 0a be 40007534 40007510: 82 00 7f ff add %g1, -1, %g1 _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; 40007514: c2 20 a0 50 st %g1, [ %g2 + 0x50 ] _POSIX_Message_queue_Delete( the_mq, &queue_context ); 40007518: 92 07 bf dc add %fp, -36, %o1 4000751c: 40 00 00 11 call 40007560 <_POSIX_Message_queue_Delete> 40007520: b0 10 20 00 clr %i0 _RTEMS_Unlock_allocator(); 40007524: 40 00 07 d3 call 40009470 <_RTEMS_Unlock_allocator> 40007528: 01 00 00 00 nop _Objects_Allocator_unlock(); return 0; } 4000752c: 81 c7 e0 08 ret 40007530: 81 e8 00 00 restore register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40007534: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40007538: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000753c: 01 00 00 00 nop 40007540: 40 00 07 cc call 40009470 <_RTEMS_Unlock_allocator> 40007544: b0 10 3f ff mov -1, %i0 ! ffffffff rtems_set_errno_and_return_minus_one( EBADF ); 40007548: 40 00 2b 8e call 40012380 <__errno> 4000754c: 01 00 00 00 nop 40007550: 82 10 20 09 mov 9, %g1 ! 9 <_TLS_Alignment+0x8> 40007554: c2 22 00 00 st %g1, [ %o0 ] 40007558: 81 c7 e0 08 ret 4000755c: 81 e8 00 00 restore =============================================================================== 4000b388 : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 4000b388: 9d e3 bf 78 save %sp, -136, %sp POSIX_Message_queue_Control *the_mq; Thread_queue_Context queue_context; if ( mqstat == NULL ) { 4000b38c: 80 a6 60 00 cmp %i1, 0 4000b390: 02 80 00 23 be 4000b41c 4000b394: 92 07 bf dc add %fp, -36, %o1 return (POSIX_Message_queue_Control *) _Objects_Get( 4000b398: 15 10 00 ab sethi %hi(0x4002ac00), %o2 4000b39c: 90 10 00 18 mov %i0, %o0 4000b3a0: 40 00 10 4b call 4000f4cc <_Objects_Get> 4000b3a4: 94 12 a0 20 or %o2, 0x20, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); } the_mq = _POSIX_Message_queue_Get( mqdes, &queue_context ); if ( the_mq == NULL ) { 4000b3a8: 80 a2 20 00 cmp %o0, 0 4000b3ac: 02 80 00 16 be 4000b404 <== NEVER TAKEN 4000b3b0: 01 00 00 00 nop _CORE_message_queue_Acquire_critical( &the_mq->Message_queue, &queue_context ); if ( the_mq->open_count == 0 ) { 4000b3b4: c2 02 20 50 ld [ %o0 + 0x50 ], %g1 4000b3b8: 80 a0 60 00 cmp %g1, 0 4000b3bc: 02 80 00 0f be 4000b3f8 4000b3c0: 01 00 00 00 nop } /* * Return the old values. */ mqstat->mq_flags = the_mq->oflag; 4000b3c4: c8 02 20 68 ld [ %o0 + 0x68 ], %g4 <== NOT EXECUTED mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 4000b3c8: c6 02 20 28 ld [ %o0 + 0x28 ], %g3 <== NOT EXECUTED mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 4000b3cc: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 <== NOT EXECUTED mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 4000b3d0: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED 4000b3d4: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED mqstat->mq_flags = the_mq->oflag; 4000b3d8: c8 26 40 00 st %g4, [ %i1 ] <== NOT EXECUTED mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 4000b3dc: c6 26 60 08 st %g3, [ %i1 + 8 ] <== NOT EXECUTED mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 4000b3e0: c4 26 60 04 st %g2, [ %i1 + 4 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000b3e4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000b3e8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000b3ec: 01 00 00 00 nop _CORE_message_queue_Release( &the_mq->Message_queue, &queue_context ); return 0; } 4000b3f0: 81 c7 e0 08 ret 4000b3f4: 91 e8 20 00 restore %g0, 0, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000b3f8: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000b3fc: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000b400: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); 4000b404: 40 00 2b 90 call 40016244 <__errno> 4000b408: b0 10 3f ff mov -1, %i0 ! ffffffff 4000b40c: 82 10 20 09 mov 9, %g1 4000b410: c2 22 00 00 st %g1, [ %o0 ] 4000b414: 81 c7 e0 08 ret 4000b418: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); 4000b41c: 40 00 2b 8a call 40016244 <__errno> 4000b420: b0 10 3f ff mov -1, %i0 4000b424: 82 10 20 16 mov 0x16, %g1 4000b428: c2 22 00 00 st %g1, [ %o0 ] 4000b42c: 81 c7 e0 08 ret 4000b430: 81 e8 00 00 restore =============================================================================== 4000b45c : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 4000b45c: 9d e3 bf 78 save %sp, -136, %sp 4000b460: 15 10 00 ab sethi %hi(0x4002ac00), %o2 4000b464: 92 07 bf dc add %fp, -36, %o1 4000b468: 94 12 a0 20 or %o2, 0x20, %o2 4000b46c: 40 00 10 18 call 4000f4cc <_Objects_Get> 4000b470: 90 10 00 18 mov %i0, %o0 POSIX_Message_queue_Control *the_mq; Thread_queue_Context queue_context; the_mq = _POSIX_Message_queue_Get( mqdes, &queue_context ); if ( the_mq == NULL ) { 4000b474: 80 a2 20 00 cmp %o0, 0 4000b478: 02 80 00 2f be 4000b534 <== NEVER TAKEN 4000b47c: 01 00 00 00 nop _CORE_message_queue_Acquire_critical( &the_mq->Message_queue, &queue_context ); if ( the_mq->open_count == 0 ) { 4000b480: c2 02 20 50 ld [ %o0 + 0x50 ], %g1 4000b484: 80 a0 60 00 cmp %g1, 0 4000b488: 02 80 00 28 be 4000b528 4000b48c: 80 a6 60 00 cmp %i1, 0 _CORE_message_queue_Release( &the_mq->Message_queue, &queue_context ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( notification != NULL ) { 4000b490: 22 80 00 18 be,a 4000b4f0 4000b494: c0 22 20 3c clr [ %o0 + 0x3c ] if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 4000b498: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000b49c: 80 a0 60 00 cmp %g1, 0 4000b4a0: 12 80 00 19 bne 4000b504 4000b4a4: 01 00 00 00 nop _CORE_message_queue_Release( &the_mq->Message_queue, &queue_context ); rtems_set_errno_and_return_minus_one( EBUSY ); } the_mq->notification = *notification; 4000b4a8: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED 4000b4ac: c2 22 20 54 st %g1, [ %o0 + 0x54 ] <== NOT EXECUTED 4000b4b0: c2 06 60 04 ld [ %i1 + 4 ], %g1 <== NOT EXECUTED 4000b4b4: c2 22 20 58 st %g1, [ %o0 + 0x58 ] <== NOT EXECUTED 4000b4b8: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED 4000b4bc: c2 22 20 5c st %g1, [ %o0 + 0x5c ] <== NOT EXECUTED 4000b4c0: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED 4000b4c4: c2 22 20 60 st %g1, [ %o0 + 0x60 ] <== NOT EXECUTED 4000b4c8: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED 4000b4cc: c2 22 20 64 st %g1, [ %o0 + 0x64 ] <== NOT EXECUTED 4000b4d0: 03 10 00 2d sethi %hi(0x4000b400), %g1 <== NOT EXECUTED 4000b4d4: 82 10 60 34 or %g1, 0x34, %g1 ! 4000b434 <_POSIX_Message_queue_Notify_handler> <== NOT EXECUTED 4000b4d8: c2 22 20 3c st %g1, [ %o0 + 0x3c ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000b4dc: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000b4e0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000b4e4: 01 00 00 00 nop _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL ); } _CORE_message_queue_Release( &the_mq->Message_queue, &queue_context ); return 0; } 4000b4e8: 81 c7 e0 08 ret 4000b4ec: 91 e8 20 00 restore %g0, 0, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000b4f0: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000b4f4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000b4f8: 01 00 00 00 nop 4000b4fc: 81 c7 e0 08 ret 4000b500: 91 e8 20 00 restore %g0, 0, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000b504: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000b508: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000b50c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBUSY ); 4000b510: 40 00 2b 4d call 40016244 <__errno> 4000b514: b0 10 3f ff mov -1, %i0 ! ffffffff 4000b518: 82 10 20 10 mov 0x10, %g1 4000b51c: c2 22 00 00 st %g1, [ %o0 ] 4000b520: 81 c7 e0 08 ret 4000b524: 81 e8 00 00 restore register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000b528: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000b52c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000b530: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); 4000b534: 40 00 2b 44 call 40016244 <__errno> 4000b538: b0 10 3f ff mov -1, %i0 ! ffffffff 4000b53c: 82 10 20 09 mov 9, %g1 4000b540: c2 22 00 00 st %g1, [ %o0 ] 4000b544: 81 c7 e0 08 ret 4000b548: 81 e8 00 00 restore =============================================================================== 4000b9b4 : int mq_setattr( mqd_t mqdes, const struct mq_attr *__restrict mqstat, struct mq_attr *__restrict omqstat ) { 4000b9b4: 9d e3 bf 78 save %sp, -136, %sp POSIX_Message_queue_Control *the_mq; Thread_queue_Context queue_context; if ( mqstat == NULL ) { 4000b9b8: 80 a6 60 00 cmp %i1, 0 4000b9bc: 02 80 00 27 be 4000ba58 4000b9c0: 92 07 bf dc add %fp, -36, %o1 4000b9c4: 15 10 00 ab sethi %hi(0x4002ac00), %o2 4000b9c8: 90 10 00 18 mov %i0, %o0 4000b9cc: 40 00 0e c0 call 4000f4cc <_Objects_Get> 4000b9d0: 94 12 a0 20 or %o2, 0x20, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); } the_mq = _POSIX_Message_queue_Get( mqdes, &queue_context ); if ( the_mq == NULL ) { 4000b9d4: 80 a2 20 00 cmp %o0, 0 4000b9d8: 02 80 00 1a be 4000ba40 <== NEVER TAKEN 4000b9dc: 01 00 00 00 nop _CORE_message_queue_Acquire_critical( &the_mq->Message_queue, &queue_context ); if ( the_mq->open_count == 0 ) { 4000b9e0: c2 02 20 50 ld [ %o0 + 0x50 ], %g1 4000b9e4: 80 a0 60 00 cmp %g1, 0 4000b9e8: 02 80 00 13 be 4000ba34 4000b9ec: 80 a6 a0 00 cmp %i2, 0 /* * Return the old values. */ if ( omqstat != NULL ) { 4000b9f0: 22 80 00 0b be,a 4000ba1c 4000b9f4: c2 06 40 00 ld [ %i1 ], %g1 omqstat->mq_flags = the_mq->oflag; 4000b9f8: c8 02 20 68 ld [ %o0 + 0x68 ], %g4 <== NOT EXECUTED omqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 4000b9fc: c6 02 20 28 ld [ %o0 + 0x28 ], %g3 <== NOT EXECUTED omqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 4000ba00: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 <== NOT EXECUTED omqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 4000ba04: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED omqstat->mq_flags = the_mq->oflag; 4000ba08: c8 26 80 00 st %g4, [ %i2 ] <== NOT EXECUTED omqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 4000ba0c: c6 26 a0 08 st %g3, [ %i2 + 8 ] <== NOT EXECUTED omqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 4000ba10: c4 26 a0 04 st %g2, [ %i2 + 4 ] <== NOT EXECUTED omqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 4000ba14: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== NOT EXECUTED } the_mq->oflag = mqstat->mq_flags; 4000ba18: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED 4000ba1c: c2 22 20 68 st %g1, [ %o0 + 0x68 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000ba20: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000ba24: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000ba28: 01 00 00 00 nop _CORE_message_queue_Release( &the_mq->Message_queue, &queue_context ); return 0; } 4000ba2c: 81 c7 e0 08 ret 4000ba30: 91 e8 20 00 restore %g0, 0, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000ba34: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000ba38: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000ba3c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); 4000ba40: 40 00 2a 01 call 40016244 <__errno> 4000ba44: b0 10 3f ff mov -1, %i0 ! ffffffff 4000ba48: 82 10 20 09 mov 9, %g1 4000ba4c: c2 22 00 00 st %g1, [ %o0 ] 4000ba50: 81 c7 e0 08 ret 4000ba54: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); 4000ba58: 40 00 29 fb call 40016244 <__errno> 4000ba5c: b0 10 3f ff mov -1, %i0 4000ba60: 82 10 20 16 mov 0x16, %g1 4000ba64: c2 22 00 00 st %g1, [ %o0 ] 4000ba68: 81 c7 e0 08 ret 4000ba6c: 81 e8 00 00 restore =============================================================================== 40007a40 : */ int mq_unlink( const char *name ) { 40007a40: 9d e3 bf 78 save %sp, -136, %sp _RTEMS_Lock_allocator(); 40007a44: 40 00 06 86 call 4000945c <_RTEMS_Lock_allocator> 40007a48: 39 10 00 60 sethi %hi(0x40018000), %i4 return (POSIX_Message_queue_Control *) _Objects_Get_by_name( 40007a4c: 96 07 bf d8 add %fp, -40, %o3 40007a50: 94 10 20 00 clr %o2 40007a54: 92 10 00 18 mov %i0, %o1 40007a58: 40 00 11 81 call 4000c05c <_Objects_Get_by_name> 40007a5c: 90 17 20 48 or %i4, 0x48, %o0 Thread_queue_Context queue_context; _Objects_Allocator_lock(); the_mq = _POSIX_Message_queue_Get_by_name( name, NULL, &error ); if ( the_mq == NULL ) { 40007a60: ba 92 20 00 orcc %o0, 0, %i5 40007a64: 02 80 00 0f be 40007aa0 40007a68: 92 10 00 1d mov %i5, %o1 _Objects_Namespace_remove( 40007a6c: 40 00 11 72 call 4000c034 <_Objects_Namespace_remove> 40007a70: 90 17 20 48 or %i4, 0x48, %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40007a74: 91 d0 20 09 ta 9 <== NOT EXECUTED Thread_queue_Control *the_thread_queue, Thread_queue_Context *queue_context ) { (void) the_thread_queue; _ISR_lock_ISR_disable( &queue_context->Lock_context.Lock_context ); 40007a78: c2 27 bf dc st %g1, [ %fp + -36 ] _POSIX_Message_queue_Namespace_remove( the_mq ); _CORE_message_queue_Acquire( &the_mq->Message_queue, &queue_context ); the_mq->linked = false; 40007a7c: c0 2f 60 4c clrb [ %i5 + 0x4c ] _POSIX_Message_queue_Delete( the_mq, &queue_context ); 40007a80: 92 07 bf dc add %fp, -36, %o1 40007a84: 90 10 00 1d mov %i5, %o0 40007a88: 7f ff fe b6 call 40007560 <_POSIX_Message_queue_Delete> 40007a8c: b0 10 20 00 clr %i0 _RTEMS_Unlock_allocator(); 40007a90: 40 00 06 78 call 40009470 <_RTEMS_Unlock_allocator> 40007a94: 01 00 00 00 nop _Objects_Allocator_unlock(); return 0; } 40007a98: 81 c7 e0 08 ret 40007a9c: 81 e8 00 00 restore 40007aa0: 40 00 06 74 call 40009470 <_RTEMS_Unlock_allocator> 40007aa4: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( _POSIX_Get_by_name_error( error ) ); 40007aa8: 40 00 2a 36 call 40012380 <__errno> 40007aac: fa 07 bf d8 ld [ %fp + -40 ], %i5 return _POSIX_Get_by_name_error_table[ error ]; 40007ab0: bb 2f 60 02 sll %i5, 2, %i5 40007ab4: 03 10 00 52 sethi %hi(0x40014800), %g1 40007ab8: 82 10 60 ac or %g1, 0xac, %g1 ! 400148ac <_POSIX_Get_by_name_error_table> 40007abc: c2 00 40 1d ld [ %g1 + %i5 ], %g1 40007ac0: c2 22 00 00 st %g1, [ %o0 ] 40007ac4: 81 c7 e0 08 ret 40007ac8: 81 e8 00 00 restore =============================================================================== 40007680 : #include #include int munmap(void *addr, size_t len) { 40007680: 9d e3 bf 98 save %sp, -104, %sp rtems_chain_node *node; /* * Clear errno. */ errno = 0; 40007684: 40 00 23 75 call 40010458 <__errno> 40007688: 01 00 00 00 nop /* * Length cannot be 0. */ if ( len == 0 ) { 4000768c: 80 a6 60 00 cmp %i1, 0 40007690: 02 80 00 52 be 400077d8 <== NEVER TAKEN 40007694: c0 22 00 00 clr [ %o0 ] errno = EINVAL; return -1; } /* Check for illegal addresses. Watch out for address wrap. */ if (addr + len < addr) { 40007698: 06 80 00 50 bl 400077d8 <== NEVER TAKEN 4000769c: 01 00 00 00 nop rtems_libio_lock(); 400076a0: 7f ff f7 4b call 400053cc 400076a4: 01 00 00 00 nop return _Chain_Immutable_head( the_chain )->next; 400076a8: 05 10 00 72 sethi %hi(0x4001c800), %g2 400076ac: fa 00 a2 dc ld [ %g2 + 0x2dc ], %i5 ! 4001cadc 400076b0: 84 10 a2 dc or %g2, 0x2dc, %g2 } mmap_mappings_lock_obtain(); node = rtems_chain_first (&mmap_mappings); while ( !rtems_chain_is_tail( &mmap_mappings, node )) { 400076b4: 84 00 a0 04 add %g2, 4, %g2 400076b8: 80 a7 40 02 cmp %i5, %g2 400076bc: 02 80 00 0f be 400076f8 <== NEVER TAKEN 400076c0: 01 00 00 00 nop mapping = (mmap_mapping*) node; if ( ( addr >= mapping->addr ) && 400076c4: c2 07 60 08 ld [ %i5 + 8 ], %g1 400076c8: 80 a0 40 18 cmp %g1, %i0 400076cc: 38 80 00 08 bgu,a 400076ec 400076d0: fa 07 40 00 ld [ %i5 ], %i5 ( addr < ( mapping->addr + mapping->len )) ) { 400076d4: c6 07 60 0c ld [ %i5 + 0xc ], %g3 400076d8: 82 00 40 03 add %g1, %g3, %g1 if ( ( addr >= mapping->addr ) && 400076dc: 80 a6 00 01 cmp %i0, %g1 400076e0: 2a 80 00 0a bcs,a 40007708 400076e4: c4 07 40 00 ld [ %i5 ], %g2 400076e8: fa 07 40 00 ld [ %i5 ], %i5 while ( !rtems_chain_is_tail( &mmap_mappings, node )) { 400076ec: 80 a7 40 02 cmp %i5, %g2 400076f0: 32 bf ff f6 bne,a 400076c8 <== ALWAYS TAKEN 400076f4: c2 07 60 08 ld [ %i5 + 8 ], %g1 rtems_libio_unlock(); 400076f8: 7f ff f7 3a call 400053e0 <== NOT EXECUTED 400076fc: b0 10 20 00 clr %i0 <== NOT EXECUTED node = rtems_chain_next( node ); } mmap_mappings_lock_release( ); return 0; } 40007700: 81 c7 e0 08 ret <== NOT EXECUTED 40007704: 81 e8 00 00 restore <== NOT EXECUTED previous = the_node->previous; 40007708: c2 07 60 04 ld [ %i5 + 4 ], %g1 next->previous = previous; 4000770c: c2 20 a0 04 st %g1, [ %g2 + 4 ] previous->next = next; 40007710: c4 20 40 00 st %g2, [ %g1 ] if ( mapping->shm != NULL ) { 40007714: f8 07 60 14 ld [ %i5 + 0x14 ], %i4 40007718: 80 a7 20 00 cmp %i4, 0 4000771c: 22 80 00 1b be,a 40007788 40007720: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 _RTEMS_Lock_allocator(); 40007724: 40 00 02 97 call 40008180 <_RTEMS_Lock_allocator> 40007728: 01 00 00 00 nop int err; err = 0; _Objects_Allocator_lock(); --shm->reference_count; 4000772c: c2 07 20 1c ld [ %i4 + 0x1c ], %g1 40007730: 82 00 7f ff add %g1, -1, %g1 if ( shm->reference_count == 0 ) { 40007734: 80 a0 60 00 cmp %g1, 0 40007738: 12 80 00 06 bne 40007750 <== ALWAYS TAKEN 4000773c: c2 27 20 1c st %g1, [ %i4 + 0x1c ] if ( (*shm->shm_object.ops->object_delete)( &shm->shm_object ) != 0 ) { 40007740: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED 40007744: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 40007748: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000774c: 90 07 20 20 add %i4, 0x20, %o0 <== NOT EXECUTED err = EIO; } } /* check if the object has been unlinked yet. */ obj = _Objects_Get( shm->Object.id, &lock_ctx, &_POSIX_Shm_Information ); 40007750: d0 07 20 08 ld [ %i4 + 8 ], %o0 40007754: 37 10 00 7d sethi %hi(0x4001f400), %i3 40007758: 92 07 bf fc add %fp, -4, %o1 4000775c: 40 00 0a fb call 4000a348 <_Objects_Get> 40007760: 94 16 e0 34 or %i3, 0x34, %o2 if ( obj == NULL ) { 40007764: 80 a2 20 00 cmp %o0, 0 40007768: 02 80 00 16 be 400077c0 <== NEVER TAKEN 4000776c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40007770: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40007774: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007778: 01 00 00 00 nop _RTEMS_Unlock_allocator(); 4000777c: 40 00 02 86 call 40008194 <_RTEMS_Unlock_allocator> 40007780: 01 00 00 00 nop if (( mapping->flags & MAP_SHARED ) != MAP_SHARED ) { 40007784: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 40007788: 80 88 60 11 btst 0x11, %g1 4000778c: 02 80 00 09 be 400077b0 40007790: 01 00 00 00 nop free( mapping ); 40007794: 90 10 00 1d mov %i5, %o0 40007798: 7f ff f6 56 call 400050f0 4000779c: b0 10 20 00 clr %i0 400077a0: 7f ff f7 10 call 400053e0 400077a4: 01 00 00 00 nop } 400077a8: 81 c7 e0 08 ret 400077ac: 81 e8 00 00 restore free( mapping->addr ); 400077b0: 7f ff f6 50 call 400050f0 400077b4: d0 07 60 08 ld [ %i5 + 8 ], %o0 free( mapping ); 400077b8: 10 bf ff f8 b 40007798 400077bc: 90 10 00 1d mov %i5, %o0 _Objects_Free( &_POSIX_Shm_Information, &the_shm->Object ); 400077c0: 40 00 0a b6 call 4000a298 <_Objects_Free> <== NOT EXECUTED 400077c4: 90 16 e0 34 or %i3, 0x34, %o0 <== NOT EXECUTED 400077c8: 40 00 02 73 call 40008194 <_RTEMS_Unlock_allocator> <== NOT EXECUTED 400077cc: 01 00 00 00 nop <== NOT EXECUTED if (( mapping->flags & MAP_SHARED ) != MAP_SHARED ) { 400077d0: 10 bf ff ee b 40007788 <== NOT EXECUTED 400077d4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED errno = EINVAL; 400077d8: 40 00 23 20 call 40010458 <__errno> <== NOT EXECUTED 400077dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400077e0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400077e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 400077e8: 81 c7 e0 08 ret <== NOT EXECUTED 400077ec: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40006a10 : const pthread_attr_t *attr, size_t cpusetsize, cpu_set_t *cpuset ) { if ( attr == NULL || !attr->is_initialized ) { 40006a10: 82 92 20 00 orcc %o0, 0, %g1 40006a14: 22 80 00 12 be,a 40006a5c <== NEVER TAKEN 40006a18: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40006a1c: c4 00 40 00 ld [ %g1 ], %g2 return EINVAL; } if ( cpuset == NULL || cpusetsize != attr->affinitysetsize ) { 40006a20: 80 a0 a0 00 cmp %g2, 0 40006a24: 02 80 00 0d be 40006a58 <== NEVER TAKEN 40006a28: 80 a2 a0 00 cmp %o2, 0 40006a2c: 02 80 00 0c be 40006a5c <== NEVER TAKEN 40006a30: 90 10 20 16 mov 0x16, %o0 40006a34: c4 00 60 54 ld [ %g1 + 0x54 ], %g2 40006a38: 80 a0 80 09 cmp %g2, %o1 40006a3c: 12 80 00 08 bne 40006a5c <== NEVER TAKEN 40006a40: 01 00 00 00 nop 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); 40006a44: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 40006a48: c2 00 40 00 ld [ %g1 ], %g1 40006a4c: c2 22 80 00 st %g1, [ %o2 ] return EINVAL; } CPU_COPY( attr->affinityset, cpuset ); return 0; 40006a50: 81 c3 e0 08 retl 40006a54: 90 10 20 00 clr %o0 return EINVAL; 40006a58: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } 40006a5c: 81 c3 e0 08 retl <== NOT EXECUTED 40006a60: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 400066fc : pthread_attr_t *attr, size_t cpusetsize, const cpu_set_t *cpuset ) { if ( attr == NULL || !attr->is_initialized ) { 400066fc: 82 92 20 00 orcc %o0, 0, %g1 40006700: 22 80 00 12 be,a 40006748 <== NEVER TAKEN 40006704: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40006708: c4 00 40 00 ld [ %g1 ], %g2 return EINVAL; } if ( cpuset == NULL || cpusetsize != attr->affinitysetsize ) { 4000670c: 80 a0 a0 00 cmp %g2, 0 40006710: 02 80 00 0d be 40006744 <== NEVER TAKEN 40006714: 80 a2 a0 00 cmp %o2, 0 40006718: 02 80 00 0c be 40006748 <== NEVER TAKEN 4000671c: 90 10 20 16 mov 0x16, %o0 40006720: c4 00 60 54 ld [ %g1 + 0x54 ], %g2 40006724: 80 a0 80 09 cmp %g2, %o1 40006728: 12 80 00 08 bne 40006748 <== NEVER TAKEN 4000672c: 01 00 00 00 nop 40006730: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 40006734: c4 02 80 00 ld [ %o2 ], %g2 40006738: c4 20 40 00 st %g2, [ %g1 ] return EINVAL; } CPU_COPY( cpuset, attr->affinityset ); return 0; 4000673c: 81 c3 e0 08 retl 40006740: 90 10 20 00 clr %o0 return EINVAL; 40006744: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } 40006748: 81 c3 e0 08 retl <== NOT EXECUTED 4000674c: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4000aaf4 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) 4000aaf4: 82 92 20 00 orcc %o0, 0, %g1 4000aaf8: 02 80 00 10 be 4000ab38 4000aafc: 90 10 20 16 mov 0x16, %o0 4000ab00: c4 00 40 00 ld [ %g1 ], %g2 4000ab04: 80 a0 a0 00 cmp %g2, 0 4000ab08: 02 80 00 0c be 4000ab38 4000ab0c: 80 a2 60 04 cmp %o1, 4 case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; 4000ab10: 18 80 00 0a bgu 4000ab38 4000ab14: 90 10 20 86 mov 0x86, %o0 4000ab18: 84 10 20 01 mov 1, %g2 4000ab1c: 85 28 80 09 sll %g2, %o1, %g2 4000ab20: 80 88 a0 17 btst 0x17, %g2 4000ab24: 02 80 00 05 be 4000ab38 <== NEVER TAKEN 4000ab28: 01 00 00 00 nop attr->schedpolicy = policy; 4000ab2c: d2 20 60 14 st %o1, [ %g1 + 0x14 ] return 0; 4000ab30: 81 c3 e0 08 retl 4000ab34: 90 10 20 00 clr %o0 } } 4000ab38: 81 c3 e0 08 retl 4000ab3c: 01 00 00 00 nop =============================================================================== 40006a74 : int pthread_barrier_destroy( pthread_barrier_t *_barrier ) { POSIX_Barrier_Control *barrier; Thread_queue_Context queue_context; POSIX_BARRIER_VALIDATE_OBJECT( _barrier ); 40006a74: 84 92 20 00 orcc %o0, 0, %g2 40006a78: 02 80 00 12 be 40006ac0 40006a7c: 03 07 3c 0d sethi %hi(0x1cf03400), %g1 40006a80: c6 00 80 00 ld [ %g2 ], %g3 40006a84: 82 10 63 73 or %g1, 0x373, %g1 40006a88: 82 18 80 01 xor %g2, %g1, %g1 40006a8c: 80 a0 40 03 cmp %g1, %g3 40006a90: 12 80 00 0d bne 40006ac4 40006a94: 90 10 20 16 mov 0x16, %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006a98: 91 d0 20 09 ta 9 <== NOT EXECUTED barrier = _POSIX_Barrier_Get( _barrier ); _POSIX_Barrier_Queue_acquire( barrier, &queue_context ); if ( barrier->waiting_threads != 0 ) { 40006a9c: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 40006aa0: 80 a0 e0 00 cmp %g3, 0 40006aa4: 12 80 00 0a bne 40006acc 40006aa8: 01 00 00 00 nop _POSIX_Barrier_Queue_release( barrier, &queue_context ); return EBUSY; } barrier->flags = 0; 40006aac: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006ab0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006ab4: 01 00 00 00 nop _POSIX_Barrier_Queue_release( barrier, &queue_context ); return 0; 40006ab8: 81 c3 e0 08 retl 40006abc: 90 10 20 00 clr %o0 ! 0 POSIX_BARRIER_VALIDATE_OBJECT( _barrier ); 40006ac0: 90 10 20 16 mov 0x16, %o0 } 40006ac4: 81 c3 e0 08 retl 40006ac8: 01 00 00 00 nop 40006acc: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006ad0: 01 00 00 00 nop return EBUSY; 40006ad4: 81 c3 e0 08 retl 40006ad8: 90 10 20 10 mov 0x10, %o0 ! 10 <_TLS_Alignment+0xf> =============================================================================== 40006b50 : #include #include int pthread_barrier_wait( pthread_barrier_t *_barrier ) { 40006b50: 9d e3 bf 78 save %sp, -136, %sp POSIX_Barrier_Control *barrier; Thread_queue_Context queue_context; Thread_Control *executing; unsigned int waiting_threads; POSIX_BARRIER_VALIDATE_OBJECT( _barrier ); 40006b54: 84 96 20 00 orcc %i0, 0, %g2 40006b58: 02 80 00 1e be 40006bd0 40006b5c: 03 07 3c 0d sethi %hi(0x1cf03400), %g1 40006b60: c6 00 80 00 ld [ %g2 ], %g3 40006b64: 82 10 63 73 or %g1, 0x373, %g1 40006b68: 82 18 80 01 xor %g2, %g1, %g1 40006b6c: 80 a0 40 03 cmp %g1, %g3 40006b70: 12 80 00 16 bne 40006bc8 40006b74: b0 10 20 16 mov 0x16, %i0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006b78: 91 d0 20 09 ta 9 <== NOT EXECUTED ) { #if defined( RTEMS_SMP ) context->Lock_context.isr_level = level; #else context->isr_level = level; 40006b7c: c2 27 bf dc st %g1, [ %fp + -36 ] 40006b80: 90 00 a0 0c add %g2, 0xc, %o0 barrier = _POSIX_Barrier_Get( _barrier ); executing = _POSIX_Barrier_Queue_acquire( barrier, &queue_context ); waiting_threads = barrier->waiting_threads; 40006b84: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 ++waiting_threads; if ( waiting_threads == barrier->count ) { 40006b88: c6 00 a0 18 ld [ %g2 + 0x18 ], %g3 ++waiting_threads; 40006b8c: 82 00 60 01 inc %g1 if ( waiting_threads == barrier->count ) { 40006b90: 80 a0 c0 01 cmp %g3, %g1 40006b94: 02 80 00 11 be 40006bd8 40006b98: d4 01 a0 20 ld [ %g6 + 0x20 ], %o2 _Thread_queue_Flush_default_filter, &queue_context ); return PTHREAD_BARRIER_SERIAL_THREAD; } else { barrier->waiting_threads = waiting_threads; 40006b9c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] queue_context->thread_state = thread_state; 40006ba0: 82 10 28 00 mov 0x800, %g1 40006ba4: c2 27 bf e0 st %g1, [ %fp + -32 ] queue_context->enqueue_callout = _Thread_queue_Enqueue_do_nothing_extra; 40006ba8: 03 10 00 2d sethi %hi(0x4000b400), %g1 40006bac: 82 10 61 a8 or %g1, 0x1a8, %g1 ! 4000b5a8 <_Thread_queue_Enqueue_do_nothing_extra> _Thread_queue_Context_set_thread_state( &queue_context, STATES_WAITING_FOR_BARRIER ); _Thread_queue_Context_set_enqueue_do_nothing_extra( &queue_context ); _Thread_queue_Enqueue( 40006bb0: 96 07 bf dc add %fp, -36, %o3 40006bb4: c2 27 bf e4 st %g1, [ %fp + -28 ] 40006bb8: 13 10 00 47 sethi %hi(0x40011c00), %o1 &barrier->Queue.Queue, POSIX_BARRIER_TQ_OPERATIONS, executing, &queue_context ); return 0; 40006bbc: b0 10 20 00 clr %i0 _Thread_queue_Enqueue( 40006bc0: 40 00 12 80 call 4000b5c0 <_Thread_queue_Enqueue> 40006bc4: 92 12 63 0c or %o1, 0x30c, %o1 return 0; 40006bc8: 81 c7 e0 08 ret 40006bcc: 81 e8 00 00 restore } } 40006bd0: 81 c7 e0 08 ret 40006bd4: 91 e8 20 16 restore %g0, 0x16, %o0 barrier->waiting_threads = 0; 40006bd8: c0 20 a0 1c clr [ %g2 + 0x1c ] _Thread_queue_Flush_critical( 40006bdc: 96 07 bf dc add %fp, -36, %o3 40006be0: 15 10 00 2e sethi %hi(0x4000b800), %o2 40006be4: 13 10 00 47 sethi %hi(0x40011c00), %o1 40006be8: 94 12 a1 5c or %o2, 0x15c, %o2 40006bec: 92 12 63 0c or %o1, 0x30c, %o1 40006bf0: 40 00 13 5d call 4000b964 <_Thread_queue_Flush_critical> 40006bf4: b0 10 3f ff mov -1, %i0 return PTHREAD_BARRIER_SERIAL_THREAD; 40006bf8: 81 c7 e0 08 ret 40006bfc: 81 e8 00 00 restore =============================================================================== 4000719c : /* * 18.2.1 Canceling Execution of a Thread, P1003.1c/Draft 10, p. 181 */ int pthread_cancel( pthread_t thread ) { 4000719c: 9d e3 bf 90 save %sp, -112, %sp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) { 400071a0: 40 00 09 d9 call 40009904 <_ISR_Is_in_progress> 400071a4: 01 00 00 00 nop 400071a8: 80 a2 20 00 cmp %o0, 0 400071ac: 12 80 00 1b bne 40007218 400071b0: 82 10 20 47 mov 0x47, %g1 return EPROTO; } the_thread = _Thread_Get( thread, &lock_context ); 400071b4: 92 07 bf fc add %fp, -4, %o1 400071b8: 40 00 14 23 call 4000c244 <_Thread_Get> 400071bc: 90 10 00 18 mov %i0, %o0 if ( the_thread == NULL ) { 400071c0: 84 92 20 00 orcc %o0, 0, %g2 400071c4: 02 80 00 15 be 40007218 400071c8: 82 10 20 03 mov 3, %g1 const ISR_lock_Context *lock_context ) { uint32_t disable_level; disable_level = cpu_self->thread_dispatch_disable_level; 400071cc: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 <== NOT EXECUTED _Profiling_Thread_dispatch_disable_critical( cpu_self, disable_level, lock_context ); cpu_self->thread_dispatch_disable_level = disable_level + 1; 400071d0: 82 00 60 01 inc %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_critical( const ISR_lock_Context *lock_context ) { return _Thread_Dispatch_disable_with_CPU( _Per_CPU_Get(), lock_context ); 400071d4: ba 10 00 06 mov %g6, %i5 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = disable_level + 1; 400071d8: c2 21 a0 18 st %g1, [ %g6 + 0x18 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 400071dc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400071e0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400071e4: 01 00 00 00 nop static inline struct _Thread_Control *_Per_CPU_Get_executing( const Per_CPU_Control *cpu ) { return cpu->executing; 400071e8: d2 01 a0 20 ld [ %g6 + 0x20 ], %o1 cpu_self = _Thread_Dispatch_disable_critical( &lock_context ); _ISR_lock_ISR_enable( &lock_context ); executing = _Per_CPU_Get_executing( cpu_self ); if ( the_thread == executing ) { 400071ec: 80 a0 80 09 cmp %g2, %o1 400071f0: 02 80 00 17 be 4000724c <== NEVER TAKEN 400071f4: 94 10 3f ff mov -1, %o2 _Thread_Exit( executing, THREAD_LIFE_TERMINATING, PTHREAD_CANCELED ); } else { _Thread_Cancel( the_thread, executing, PTHREAD_CANCELED ); 400071f8: 40 00 1a 4c call 4000db28 <_Thread_Cancel> 400071fc: 01 00 00 00 nop * * @param[in] cpu_self The current processor. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_enable( Per_CPU_Control *cpu_self ) { uint32_t disable_level = cpu_self->thread_dispatch_disable_level; 40007200: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 if ( disable_level == 1 ) { 40007204: 80 a0 60 01 cmp %g1, 1 40007208: 02 80 00 06 be 40007220 <== ALWAYS TAKEN 4000720c: 84 00 7f ff add %g1, -1, %g2 } _ISR_Local_enable( level ); } else { _Assert( disable_level > 0 ); cpu_self->thread_dispatch_disable_level = disable_level - 1; 40007210: c4 27 60 18 st %g2, [ %i5 + 0x18 ] <== NOT EXECUTED } _Thread_Dispatch_enable( cpu_self ); return 0; 40007214: 82 10 20 00 clr %g1 <== NOT EXECUTED } 40007218: 81 c7 e0 08 ret 4000721c: 91 e8 00 01 restore %g0, %g1, %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40007220: 91 d0 20 09 ta 9 <== NOT EXECUTED if ( 40007224: c4 0f 60 1c ldub [ %i5 + 0x1c ], %g2 40007228: 80 a0 a0 00 cmp %g2, 0 4000722c: 32 80 00 0b bne,a 40007258 40007230: 92 10 00 01 mov %g1, %o1 cpu_self->thread_dispatch_disable_level = 0; 40007234: c0 27 60 18 clr [ %i5 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40007238: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000723c: 01 00 00 00 nop return 0; 40007240: 82 10 20 00 clr %g1 ! 0 } 40007244: 81 c7 e0 08 ret 40007248: 91 e8 00 01 restore %g0, %g1, %o0 _Thread_Exit( executing, THREAD_LIFE_TERMINATING, PTHREAD_CANCELED ); 4000724c: 40 00 1a a0 call 4000dccc <_Thread_Exit> <== NOT EXECUTED 40007250: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED 40007254: 30 bf ff eb b,a 40007200 <== NOT EXECUTED _Thread_Do_dispatch( cpu_self, level ); 40007258: c2 27 bf f4 st %g1, [ %fp + -12 ] 4000725c: 40 00 13 9a call 4000c0c4 <_Thread_Do_dispatch> 40007260: 90 10 00 1d mov %i5, %o0 40007264: 10 bf ff f5 b 40007238 40007268: c2 07 bf f4 ld [ %fp + -12 ], %g1 =============================================================================== 400071b4 : /** * 11.4.2 Initializing and Destroying a Condition Variable, * P1003.1c/Draft 10, p. 87 */ int pthread_cond_destroy( pthread_cond_t *cond ) { 400071b4: 9d e3 bf a0 save %sp, -96, %sp POSIX_Condition_variables_Control *the_cond; unsigned long flags; Thread_queue_Context queue_context; the_cond = _POSIX_Condition_variables_Get( cond ); POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags ); 400071b8: 80 a6 20 00 cmp %i0, 0 400071bc: 02 80 00 1e be 40007234 400071c0: 05 06 37 ec sethi %hi(0x18dfb000), %g2 400071c4: c2 06 00 00 ld [ %i0 ], %g1 400071c8: 82 1e 00 01 xor %i0, %g1, %g1 400071cc: 84 10 a1 fe or %g2, 0x1fe, %g2 400071d0: 82 18 40 02 xor %g1, %g2, %g1 400071d4: 80 88 7f fe btst -2, %g1 400071d8: 12 80 00 12 bne 40007220 400071dc: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400071e0: 91 d0 20 09 ta 9 <== NOT EXECUTED _Thread_queue_Context_initialize( &queue_context ); _POSIX_Condition_variables_Acquire( the_cond, &queue_context ); if ( !_Thread_queue_Is_empty( &the_cond->Queue.Queue ) ) { 400071e4: c4 06 20 0c ld [ %i0 + 0xc ], %g2 400071e8: 80 a0 a0 00 cmp %g2, 0 400071ec: 02 80 00 06 be 40007204 400071f0: 01 00 00 00 nop __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400071f4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400071f8: 01 00 00 00 nop _POSIX_Condition_variables_Release( the_cond, &queue_context ); return EBUSY; 400071fc: 81 c7 e0 08 ret 40007200: 91 e8 20 10 restore %g0, 0x10, %o0 40007204: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007208: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Destroy( POSIX_Condition_variables_Control *the_cond ) { the_cond->flags = ~the_cond->flags; 4000720c: c2 06 00 00 ld [ %i0 ], %g1 40007210: 82 38 00 01 xnor %g0, %g1, %g1 40007214: c2 26 00 00 st %g1, [ %i0 ] } _POSIX_Condition_variables_Release( the_cond, &queue_context ); _POSIX_Condition_variables_Destroy( the_cond ); return 0; } 40007218: 81 c7 e0 08 ret 4000721c: 91 e8 20 00 restore %g0, 0, %o0 POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags ); 40007220: 40 00 00 66 call 400073b8 <_POSIX_Condition_variables_Auto_initialization> 40007224: 90 10 00 18 mov %i0, %o0 40007228: 80 a2 20 00 cmp %o0, 0 4000722c: 12 bf ff ed bne 400071e0 40007230: 01 00 00 00 nop 40007234: 81 c7 e0 08 ret 40007238: 91 e8 20 16 restore %g0, 0x16, %o0 =============================================================================== 4000723c : { POSIX_Condition_variables_Control *the_cond; the_cond = _POSIX_Condition_variables_Get( cond ); if ( the_cond == NULL ) { 4000723c: 82 92 20 00 orcc %o0, 0, %g1 40007240: 02 80 00 1a be 400072a8 40007244: 80 a2 60 00 cmp %o1, 0 return EINVAL; } if ( attr == NULL ) { 40007248: 22 80 00 1b be,a 400072b4 4000724c: 13 10 00 4c sethi %hi(0x40013000), %o1 attr = &_POSIX_Condition_variables_Default_attributes; } if ( !attr->is_initialized ) { 40007250: c4 02 40 00 ld [ %o1 ], %g2 40007254: 80 a0 a0 00 cmp %g2, 0 40007258: 02 80 00 15 be 400072ac 4000725c: 90 10 20 16 mov 0x16, %o0 return EINVAL; } if ( !_POSIX_Is_valid_pshared( attr->process_shared ) ) { 40007260: c4 02 60 10 ld [ %o1 + 0x10 ], %g2 40007264: 80 a0 a0 01 cmp %g2, 1 40007268: 18 80 00 11 bgu 400072ac 4000726c: 05 06 37 ec sethi %hi(0x18dfb000), %g2 40007270: c6 02 60 08 ld [ %o1 + 8 ], %g3 40007274: c8 02 60 0c ld [ %o1 + 0xc ], %g4 ) { #if defined(RTEMS_SMP) _SMP_ticket_lock_Initialize( &queue->Lock ); #endif queue->heads = NULL; 40007278: c0 20 60 0c clr [ %g1 + 0xc ] queue->owner = NULL; 4000727c: c0 20 60 10 clr [ %g1 + 0x10 ] flags = (uintptr_t) the_cond ^ POSIX_CONDITION_VARIABLES_MAGIC; 40007280: 84 10 a1 fe or %g2, 0x1fe, %g2 queue->name = name; 40007284: c0 20 60 14 clr [ %g1 + 0x14 ] 40007288: 84 18 40 02 xor %g1, %g2, %g2 the_cond->mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 4000728c: c0 20 60 18 clr [ %g1 + 0x18 ] if ( the_attr->clock == CLOCK_MONOTONIC ) { 40007290: 80 a0 e0 00 cmp %g3, 0 40007294: 02 80 00 0a be 400072bc <== ALWAYS TAKEN 40007298: 84 08 bf fe and %g2, -2, %g2 the_cond->flags = flags; 4000729c: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED return EINVAL; } _POSIX_Condition_variables_Initialize( the_cond, attr ); return 0; 400072a0: 81 c3 e0 08 retl 400072a4: 90 10 20 00 clr %o0 return EINVAL; 400072a8: 90 10 20 16 mov 0x16, %o0 } 400072ac: 81 c3 e0 08 retl 400072b0: 01 00 00 00 nop attr = &_POSIX_Condition_variables_Default_attributes; 400072b4: 10 bf ff e7 b 40007250 400072b8: 92 12 62 e0 or %o1, 0x2e0, %o1 if ( the_attr->clock == CLOCK_MONOTONIC ) { 400072bc: 80 a1 20 04 cmp %g4, 4 400072c0: 32 bf ff f8 bne,a 400072a0 <== ALWAYS TAKEN 400072c4: c4 20 40 00 st %g2, [ %g1 ] flags |= POSIX_CONDITION_VARIABLES_CLOCK_MONOTONIC; 400072c8: 84 10 a0 01 or %g2, 1, %g2 <== NOT EXECUTED return 0; 400072cc: 90 10 20 00 clr %o0 <== NOT EXECUTED 400072d0: 81 c3 e0 08 retl <== NOT EXECUTED 400072d4: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED =============================================================================== 400070e8 : int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( attr == NULL || !attr->is_initialized ) 400070e8: 82 92 20 00 orcc %o0, 0, %g1 400070ec: 02 80 00 09 be 40007110 400070f0: 90 10 20 16 mov 0x16, %o0 400070f4: c4 00 40 00 ld [ %g1 ], %g2 400070f8: 80 a0 a0 00 cmp %g2, 0 400070fc: 02 80 00 05 be 40007110 <== NEVER TAKEN 40007100: 01 00 00 00 nop return EINVAL; attr->is_initialized = false; 40007104: c0 20 40 00 clr [ %g1 ] return 0; 40007108: 81 c3 e0 08 retl 4000710c: 90 10 20 00 clr %o0 } 40007110: 81 c3 e0 08 retl 40007114: 01 00 00 00 nop =============================================================================== 40005f20 : { if ( attr == NULL ) { return EINVAL; } if ( clock == NULL ) { 40005f20: 80 a2 20 00 cmp %o0, 0 40005f24: 02 80 00 08 be 40005f44 40005f28: 80 a2 60 00 cmp %o1, 0 40005f2c: 02 80 00 06 be 40005f44 <== ALWAYS TAKEN 40005f30: 01 00 00 00 nop return EINVAL; } *clock = attr->clock; 40005f34: c2 02 20 0c ld [ %o0 + 0xc ], %g1 <== NOT EXECUTED 40005f38: c2 22 40 00 st %g1, [ %o1 ] <== NOT EXECUTED return 0; 40005f3c: 81 c3 e0 08 retl <== NOT EXECUTED 40005f40: 90 10 20 00 clr %o0 <== NOT EXECUTED } 40005f44: 81 c3 e0 08 retl 40005f48: 90 10 20 16 mov 0x16, %o0 =============================================================================== 4000670c : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 4000670c: 9d e3 bf 20 save %sp, -224, %sp Thread_Entry_information entry = { 40006710: 03 10 00 2b sethi %hi(0x4000ac00), %g1 40006714: 82 10 60 38 or %g1, 0x38, %g1 ! 4000ac38 <_Thread_Entry_adaptor_pointer> 40006718: f4 27 bf c8 st %i2, [ %fp + -56 ] size_t stacksize; Objects_Name name; int error; ISR_lock_Context lock_context; if ( !start_routine ) 4000671c: 80 a6 a0 00 cmp %i2, 0 Thread_Entry_information entry = { 40006720: c2 27 bf c4 st %g1, [ %fp + -60 ] int schedpolicy = SCHED_RR; 40006724: 82 10 20 02 mov 2, %g1 Thread_Entry_information entry = { 40006728: f6 27 bf cc st %i3, [ %fp + -52 ] if ( !start_routine ) 4000672c: 02 80 00 b0 be 400069ec 40006730: c2 27 bf bc st %g1, [ %fp + -68 ] return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 40006734: 80 a6 60 00 cmp %i1, 0 40006738: 22 80 00 a5 be,a 400069cc 4000673c: 33 10 00 5f sethi %hi(0x40017c00), %i1 if ( !the_attr->is_initialized ) 40006740: c2 06 40 00 ld [ %i1 ], %g1 40006744: 80 a0 60 00 cmp %g1, 0 40006748: 02 80 00 9e be 400069c0 4000674c: 03 10 00 65 sethi %hi(0x40019400), %g1 * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr != NULL ) { 40006750: c4 06 60 04 ld [ %i1 + 4 ], %g2 40006754: e6 06 60 08 ld [ %i1 + 8 ], %l3 40006758: 80 a0 a0 00 cmp %g2, 0 4000675c: 02 80 00 9e be 400069d4 40006760: c2 00 60 40 ld [ %g1 + 0x40 ], %g1 if ( !_Stack_Is_enough(the_attr->stacksize) ) { 40006764: 80 a0 40 13 cmp %g1, %l3 40006768: 18 80 00 97 bgu 400069c4 4000676c: a0 10 20 16 mov 0x16, %l0 * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { 40006770: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 40006774: 80 a0 60 01 cmp %g1, 1 40006778: 02 80 00 a1 be 400069fc 4000677c: e4 01 a0 20 ld [ %g6 + 0x20 ], %l2 40006780: 80 a0 60 02 cmp %g1, 2 40006784: 12 80 00 90 bne 400069c4 40006788: a0 10 20 16 mov 0x16, %l0 ); _Assert( error == 0 ); break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 4000678c: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 schedparam = the_attr->schedparam; 40006790: d4 1e 60 18 ldd [ %i1 + 0x18 ], %o2 40006794: f4 1e 60 20 ldd [ %i1 + 0x20 ], %i2 40006798: f8 1e 60 28 ldd [ %i1 + 0x28 ], %i4 4000679c: c4 1e 60 30 ldd [ %i1 + 0x30 ], %g2 400067a0: d0 1e 60 38 ldd [ %i1 + 0x38 ], %o0 400067a4: e0 1e 60 40 ldd [ %i1 + 0x40 ], %l0 schedpolicy = the_attr->schedpolicy; 400067a8: c2 27 bf bc st %g1, [ %fp + -68 ] schedparam = the_attr->schedparam; 400067ac: d4 3f bf d0 std %o2, [ %fp + -48 ] 400067b0: f4 3f bf d8 std %i2, [ %fp + -40 ] 400067b4: f8 3f bf e0 std %i4, [ %fp + -32 ] 400067b8: c4 3f bf e8 std %g2, [ %fp + -24 ] 400067bc: d0 3f bf f0 std %o0, [ %fp + -16 ] 400067c0: e0 3f bf f8 std %l0, [ %fp + -8 ] /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) return ENOTSUP; 400067c4: a0 10 20 86 mov 0x86, %l0 if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 400067c8: c2 06 60 0c ld [ %i1 + 0xc ], %g1 400067cc: 80 a0 60 00 cmp %g1, 0 400067d0: 12 80 00 7d bne 400069c4 400067d4: d0 07 bf bc ld [ %fp + -68 ], %o0 error = _POSIX_Thread_Translate_sched_param( 400067d8: 96 07 bf b8 add %fp, -72, %o3 400067dc: 94 07 bf b4 add %fp, -76, %o2 400067e0: 40 00 1e 87 call 4000e1fc <_POSIX_Thread_Translate_sched_param> 400067e4: 92 07 bf d0 add %fp, -48, %o1 schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( error != 0 ) { 400067e8: a0 92 20 00 orcc %o0, 0, %l0 400067ec: 32 80 00 82 bne,a 400069f4 400067f0: b0 10 00 10 mov %l0, %i0 return error; } normal_prio = schedparam.sched_priority; 400067f4: f6 07 bf d0 ld [ %fp + -48 ], %i3 scheduler = _Thread_Scheduler_get_home( executing ); core_normal_prio = _POSIX_Priority_To_core( scheduler, normal_prio, &valid ); 400067f8: 92 10 00 1b mov %i3, %o1 400067fc: 94 07 bf b3 add %fp, -77, %o2 40006800: 29 10 00 5c sethi %hi(0x40017000), %l4 40006804: 40 00 1e 4d call 4000e138 <_POSIX_Priority_To_core> 40006808: 90 15 22 f0 or %l4, 0x2f0, %o0 ! 400172f0 <_Scheduler_Table> if ( !valid ) { 4000680c: c2 0f bf b3 ldub [ %fp + -77 ], %g1 core_normal_prio = _POSIX_Priority_To_core( scheduler, normal_prio, &valid ); 40006810: b8 10 00 08 mov %o0, %i4 if ( !valid ) { 40006814: 80 a0 60 00 cmp %g1, 0 40006818: 02 80 00 6a be 400069c0 <== NEVER TAKEN 4000681c: ba 10 00 09 mov %o1, %i5 return EINVAL; } if ( schedpolicy == SCHED_SPORADIC ) { 40006820: c2 07 bf bc ld [ %fp + -68 ], %g1 40006824: 80 a0 60 04 cmp %g1, 4 40006828: 22 80 00 02 be,a 40006830 4000682c: f6 07 bf d4 ld [ %fp + -44 ], %i3 low_prio = schedparam.sched_ss_low_priority; } else { low_prio = normal_prio; } core_low_prio = _POSIX_Priority_To_core( scheduler, low_prio, &valid ); 40006830: 92 10 00 1b mov %i3, %o1 40006834: 94 07 bf b3 add %fp, -77, %o2 40006838: 40 00 1e 40 call 4000e138 <_POSIX_Priority_To_core> 4000683c: 90 15 22 f0 or %l4, 0x2f0, %o0 if ( !valid ) { 40006840: c2 0f bf b3 ldub [ %fp + -77 ], %g1 core_low_prio = _POSIX_Priority_To_core( scheduler, low_prio, &valid ); 40006844: b4 10 00 08 mov %o0, %i2 if ( !valid ) { 40006848: 80 a0 60 00 cmp %g1, 0 4000684c: 02 80 00 5d be 400069c0 40006850: b6 10 00 09 mov %o1, %i3 return EINVAL; } if ( the_attr->affinityset == NULL ) { 40006854: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 40006858: 80 a0 60 00 cmp %g1, 0 4000685c: 22 80 00 5a be,a 400069c4 <== NEVER TAKEN 40006860: a0 10 20 16 mov 0x16, %l0 <== NOT EXECUTED _RTEMS_Lock_allocator(); 40006864: 40 00 02 3d call 40007158 <_RTEMS_Lock_allocator> 40006868: 2b 10 00 6b sethi %hi(0x4001ac00), %l5 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate(void) { _Objects_Allocator_lock(); _Thread_Kill_zombies(); 4000686c: 40 00 15 fd call 4000c060 <_Thread_Kill_zombies> 40006870: 01 00 00 00 nop return (Thread_Control *) 40006874: 40 00 09 7f call 40008e70 <_Objects_Allocate_unprotected> 40006878: 90 15 61 70 or %l5, 0x170, %o0 * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 4000687c: a2 92 20 00 orcc %o0, 0, %l1 40006880: 02 80 00 66 be 40006a18 40006884: 82 07 bf ac add %fp, -84, %g1 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 40006888: c2 23 a0 74 st %g1, [ %sp + 0x74 ] 4000688c: 9a 10 20 01 mov 1, %o5 40006890: c2 07 bf b8 ld [ %fp + -72 ], %g1 40006894: f8 3f bf a0 std %i4, [ %fp + -96 ] 40006898: 98 10 00 13 mov %l3, %o4 4000689c: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 400068a0: 94 15 22 f0 or %l4, 0x2f0, %o2 400068a4: c2 07 bf b4 ld [ %fp + -76 ], %g1 400068a8: c2 23 a0 68 st %g1, [ %sp + 0x68 ] 400068ac: 82 10 20 01 mov 1, %g1 400068b0: c2 23 a0 64 st %g1, [ %sp + 0x64 ] 400068b4: 92 10 00 11 mov %l1, %o1 400068b8: c2 07 bf a0 ld [ %fp + -96 ], %g1 400068bc: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400068c0: 90 15 61 70 or %l5, 0x170, %o0 400068c4: c2 07 bf a4 ld [ %fp + -92 ], %g1 400068c8: c0 27 bf ac clr [ %fp + -84 ] 400068cc: c0 23 a0 70 clr [ %sp + 0x70 ] 400068d0: c2 23 a0 60 st %g1, [ %sp + 0x60 ] 400068d4: 40 00 11 1d call 4000ad48 <_Thread_Initialize> 400068d8: d6 06 60 04 ld [ %i1 + 4 ], %o3 budget_algorithm, budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 400068dc: 80 a2 20 00 cmp %o0, 0 400068e0: 02 80 00 52 be 40006a28 400068e4: 92 10 00 11 mov %l1, %o1 _POSIX_Threads_Free( the_thread ); _Objects_Allocator_unlock(); return EAGAIN; } if ( the_attr->detachstate == PTHREAD_CREATE_DETACHED ) { 400068e8: c4 06 60 50 ld [ %i1 + 0x50 ], %g2 400068ec: 80 a0 a0 00 cmp %g2, 0 400068f0: 12 80 00 03 bne 400068fc 400068f4: c2 04 61 70 ld [ %l1 + 0x170 ], %g1 the_thread->Life.state |= THREAD_LIFE_DETACHED; 400068f8: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED } the_thread->Life.state |= THREAD_LIFE_CHANGE_DEFERRED; 400068fc: 82 10 60 08 or %g1, 8, %g1 <== NOT EXECUTED 40006900: c2 24 61 70 st %g1, [ %l1 + 0x170 ] <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006904: 91 d0 20 09 ta 9 <== NOT EXECUTED _ISR_lock_ISR_disable( &lock_context ); 40006908: c2 27 bf c0 st %g1, [ %fp + -64 ] status = _Scheduler_Set_affinity( 4000690c: d4 06 60 58 ld [ %i1 + 0x58 ], %o2 40006910: d2 06 60 54 ld [ %i1 + 0x54 ], %o1 40006914: 40 00 0f 2a call 4000a5bc <_Scheduler_Set_affinity> 40006918: 90 10 00 11 mov %l1, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000691c: c2 07 bf c0 ld [ %fp + -64 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006920: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006924: 01 00 00 00 nop the_thread, the_attr->affinitysetsize, the_attr->affinityset ); _ISR_lock_ISR_enable( &lock_context ); if ( !status ) { 40006928: 80 a2 20 00 cmp %o0, 0 4000692c: 02 80 00 45 be 40006a40 <== NEVER TAKEN 40006930: 92 10 00 11 mov %l1, %o1 * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; executing_api = executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_unblocked = executing_api->signals_unblocked; 40006934: c2 04 a1 5c ld [ %l2 + 0x15c ], %g1 40006938: c4 00 60 68 ld [ %g1 + 0x68 ], %g2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000693c: d0 04 61 5c ld [ %l1 + 0x15c ], %o0 the_thread->was_created_with_inherited_scheduler = ( the_attr->inheritsched == PTHREAD_INHERIT_SCHED ); 40006940: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 40006944: 82 18 60 01 xor %g1, 1, %g1 api->signals_unblocked = executing_api->signals_unblocked; 40006948: c4 22 20 68 st %g2, [ %o0 + 0x68 ] ( the_attr->inheritsched == PTHREAD_INHERIT_SCHED ); 4000694c: 80 a0 00 01 cmp %g0, %g1 40006950: 82 60 3f ff subx %g0, -1, %g1 40006954: c2 2c 60 8b stb %g1, [ %l1 + 0x8b ] RTEMS_INLINE_ROUTINE void _Priority_Node_set_priority( Priority_Node *node, Priority_Control priority ) { node->priority = priority; 40006958: f4 3a 20 38 std %i2, [ %o0 + 0x38 ] _Priority_Node_set_priority( &api->Sporadic.Low_priority, core_low_prio ); api->Sporadic.sched_ss_repl_period = the_attr->schedparam.sched_ss_repl_period; api->Sporadic.sched_ss_init_budget = the_attr->schedparam.sched_ss_init_budget; api->Sporadic.sched_ss_max_repl = 4000695c: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 api->Sporadic.sched_ss_repl_period = 40006960: f4 1e 60 20 ldd [ %i1 + 0x20 ], %i2 40006964: f8 1e 60 28 ldd [ %i1 + 0x28 ], %i4 api->Sporadic.sched_ss_init_budget = 40006968: c4 1e 60 30 ldd [ %i1 + 0x30 ], %g2 4000696c: d8 1e 60 38 ldd [ %i1 + 0x38 ], %o4 40006970: d8 3a 20 58 std %o4, [ %o0 + 0x58 ] api->Sporadic.sched_ss_max_repl = 40006974: c2 22 20 60 st %g1, [ %o0 + 0x60 ] api->Sporadic.sched_ss_repl_period = 40006978: f4 3a 20 40 std %i2, [ %o0 + 0x40 ] 4000697c: f8 3a 20 48 std %i4, [ %o0 + 0x48 ] api->Sporadic.sched_ss_init_budget = 40006980: c4 3a 20 50 std %g2, [ %o0 + 0x50 ] the_attr->schedparam.sched_ss_max_repl; if ( schedpolicy == SCHED_SPORADIC ) { 40006984: c2 07 bf bc ld [ %fp + -68 ], %g1 40006988: 80 a0 60 04 cmp %g1, 4 4000698c: 02 80 00 33 be 40006a58 40006990: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006994: 91 d0 20 09 ta 9 <== NOT EXECUTED } /* * POSIX threads are allocated and started in one operation. */ _ISR_lock_ISR_disable( &lock_context ); 40006998: c2 27 bf c0 st %g1, [ %fp + -64 ] status = _Thread_Start( the_thread, &entry, &lock_context ); 4000699c: 94 07 bf c0 add %fp, -64, %o2 400069a0: 92 07 bf c4 add %fp, -60, %o1 400069a4: 40 00 16 7b call 4000c390 <_Thread_Start> 400069a8: 90 10 00 11 mov %l1, %o0 #endif /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 400069ac: c2 04 60 08 ld [ %l1 + 8 ], %g1 _RTEMS_Unlock_allocator(); 400069b0: 40 00 01 ef call 4000716c <_RTEMS_Unlock_allocator> 400069b4: c2 26 00 00 st %g1, [ %i0 ] _Objects_Allocator_unlock(); return 0; 400069b8: 81 c7 e0 08 ret 400069bc: 91 e8 00 10 restore %g0, %l0, %o0 return EINVAL; 400069c0: a0 10 20 16 mov 0x16, %l0 } 400069c4: 81 c7 e0 08 ret 400069c8: 91 e8 00 10 restore %g0, %l0, %o0 the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 400069cc: 10 bf ff 5d b 40006740 400069d0: b2 16 60 60 or %i1, 0x60, %i1 if ( size >= PTHREAD_MINIMUM_STACK_SIZE ) 400069d4: 83 28 60 01 sll %g1, 1, %g1 400069d8: 80 a4 c0 01 cmp %l3, %g1 400069dc: 2a bf ff 65 bcs,a 40006770 400069e0: a6 10 00 01 mov %g1, %l3 switch ( the_attr->inheritsched ) { 400069e4: 10 bf ff 64 b 40006774 400069e8: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 return EFAULT; 400069ec: a0 10 20 0e mov 0xe, %l0 } 400069f0: b0 10 00 10 mov %l0, %i0 400069f4: 81 c7 e0 08 ret 400069f8: 81 e8 00 00 restore error = pthread_getschedparam( 400069fc: 40 00 01 01 call 40006e00 40006a00: a0 10 20 86 mov 0x86, %l0 40006a04: 94 07 bf d0 add %fp, -48, %o2 40006a08: 40 00 00 27 call 40006aa4 40006a0c: 92 07 bf bc add %fp, -68, %o1 break; 40006a10: 10 bf ff 6f b 400067cc 40006a14: c2 06 60 0c ld [ %i1 + 0xc ], %g1 40006a18: 40 00 01 d5 call 4000716c <_RTEMS_Unlock_allocator> 40006a1c: a0 10 20 0b mov 0xb, %l0 return EAGAIN; 40006a20: 81 c7 e0 08 ret 40006a24: 91 e8 00 10 restore %g0, %l0, %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information.Objects, &the_pthread->Object ); 40006a28: 90 15 61 70 or %l5, 0x170, %o0 40006a2c: 40 00 0a 11 call 40009270 <_Objects_Free> 40006a30: a0 10 20 0b mov 0xb, %l0 40006a34: 40 00 01 ce call 4000716c <_RTEMS_Unlock_allocator> 40006a38: b0 10 00 10 mov %l0, %i0 return EAGAIN; 40006a3c: 30 bf ff ee b,a 400069f4 40006a40: 90 15 61 70 or %l5, 0x170, %o0 <== NOT EXECUTED 40006a44: 40 00 0a 0b call 40009270 <_Objects_Free> <== NOT EXECUTED 40006a48: a0 10 20 16 mov 0x16, %l0 <== NOT EXECUTED _RTEMS_Unlock_allocator(); 40006a4c: 40 00 01 c8 call 4000716c <_RTEMS_Unlock_allocator> <== NOT EXECUTED 40006a50: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED return EINVAL; 40006a54: 30 bf ff e8 b,a 400069f4 <== NOT EXECUTED _POSIX_Threads_Sporadic_timer( &api->Sporadic.Timer ); 40006a58: 40 00 00 9d call 40006ccc <_POSIX_Threads_Sporadic_timer> 40006a5c: 90 02 20 08 add %o0, 8, %o0 40006a60: 30 bf ff cd b,a 40006994 =============================================================================== 40006a30 : /** * 16.1.4 Detaching a Thread, P1003.1c/Draft 10, p. 149 */ int pthread_detach( pthread_t thread ) { 40006a30: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; ISR_lock_Context lock_context; Per_CPU_Control *cpu_self; the_thread = _Thread_Get( thread, &lock_context ); 40006a34: 90 10 00 18 mov %i0, %o0 40006a38: 92 07 bf fc add %fp, -4, %o1 40006a3c: 40 00 11 7d call 4000b030 <_Thread_Get> 40006a40: b0 10 20 03 mov 3, %i0 if ( the_thread == NULL ) { 40006a44: 80 a2 20 00 cmp %o0, 0 40006a48: 02 80 00 14 be 40006a98 40006a4c: 01 00 00 00 nop return ESRCH; } _Thread_State_acquire_critical( the_thread, &lock_context ); the_thread->Life.state |= THREAD_LIFE_DETACHED; 40006a50: c4 02 21 70 ld [ %o0 + 0x170 ], %g2 40006a54: 84 10 a0 10 or %g2, 0x10, %g2 40006a58: c4 22 21 70 st %g2, [ %o0 + 0x170 ] _Thread_Clear_state_locked( the_thread, STATES_WAITING_FOR_JOIN_AT_EXIT ); 40006a5c: 40 00 10 af call 4000ad18 <_Thread_Clear_state_locked> 40006a60: 13 00 00 08 sethi %hi(0x2000), %o1 const ISR_lock_Context *lock_context ) { uint32_t disable_level; disable_level = cpu_self->thread_dispatch_disable_level; 40006a64: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 <== NOT EXECUTED _Profiling_Thread_dispatch_disable_critical( cpu_self, disable_level, lock_context ); cpu_self->thread_dispatch_disable_level = disable_level + 1; 40006a68: 82 00 60 01 inc %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_critical( const ISR_lock_Context *lock_context ) { return _Thread_Dispatch_disable_with_CPU( _Per_CPU_Get(), lock_context ); 40006a6c: 90 10 00 06 mov %g6, %o0 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = disable_level + 1; 40006a70: c2 21 a0 18 st %g1, [ %g6 + 0x18 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40006a74: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006a78: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006a7c: 01 00 00 00 nop * * @param[in] cpu_self The current processor. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_enable( Per_CPU_Control *cpu_self ) { uint32_t disable_level = cpu_self->thread_dispatch_disable_level; 40006a80: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 if ( disable_level == 1 ) { 40006a84: 80 a0 60 01 cmp %g1, 1 40006a88: 02 80 00 06 be 40006aa0 <== ALWAYS TAKEN 40006a8c: 82 00 7f ff add %g1, -1, %g1 } _ISR_Local_enable( level ); } else { _Assert( disable_level > 0 ); cpu_self->thread_dispatch_disable_level = disable_level - 1; 40006a90: c2 21 a0 18 st %g1, [ %g6 + 0x18 ] <== NOT EXECUTED cpu_self = _Thread_Dispatch_disable_critical( &lock_context ); _Thread_State_release( the_thread, &lock_context ); _Thread_Dispatch_enable( cpu_self ); return 0; 40006a94: b0 10 20 00 clr %i0 <== NOT EXECUTED } 40006a98: 81 c7 e0 08 ret 40006a9c: 81 e8 00 00 restore __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006aa0: 91 d0 20 09 ta 9 <== NOT EXECUTED if ( 40006aa4: c4 09 a0 1c ldub [ %g6 + 0x1c ], %g2 40006aa8: 80 a0 a0 00 cmp %g2, 0 40006aac: 12 80 00 07 bne 40006ac8 40006ab0: 92 10 00 01 mov %g1, %o1 cpu_self->thread_dispatch_disable_level = 0; 40006ab4: c0 21 a0 18 clr [ %g6 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006ab8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006abc: 01 00 00 00 nop return 0; 40006ac0: 81 c7 e0 08 ret 40006ac4: 91 e8 20 00 restore %g0, 0, %o0 _Thread_Do_dispatch( cpu_self, level ); 40006ac8: 40 00 10 fa call 4000aeb0 <_Thread_Do_dispatch> 40006acc: c2 27 bf f4 st %g1, [ %fp + -12 ] 40006ad0: 10 bf ff fa b 40006ab8 40006ad4: c2 07 bf f4 ld [ %fp + -12 ], %g1 =============================================================================== 40006a74 : #include #include void pthread_exit( void *value_ptr ) { 40006a74: 9d e3 bf a0 save %sp, -96, %sp const ISR_lock_Context *lock_context ) { uint32_t disable_level; disable_level = cpu_self->thread_dispatch_disable_level; 40006a78: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 _Profiling_Thread_dispatch_disable_critical( cpu_self, disable_level, lock_context ); cpu_self->thread_dispatch_disable_level = disable_level + 1; 40006a7c: 82 00 60 01 inc %g1 40006a80: c2 21 a0 18 st %g1, [ %g6 + 0x18 ] */ RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_critical( const ISR_lock_Context *lock_context ) { return _Thread_Dispatch_disable_with_CPU( _Per_CPU_Get(), lock_context ); 40006a84: ba 10 00 06 mov %g6, %i5 Per_CPU_Control *cpu_self; cpu_self = _Thread_Dispatch_disable(); executing = _Per_CPU_Get_executing( cpu_self ); _Thread_Exit( executing, THREAD_LIFE_TERMINATING, value_ptr ); 40006a88: d0 01 a0 20 ld [ %g6 + 0x20 ], %o0 40006a8c: 94 10 00 18 mov %i0, %o2 40006a90: 40 00 15 bc call 4000c180 <_Thread_Exit> 40006a94: 92 10 20 04 mov 4, %o1 _Thread_Dispatch_direct( cpu_self ); 40006a98: 40 00 10 57 call 4000abf4 <_Thread_Dispatch_direct> 40006a9c: 90 10 00 1d mov %i5, %o0 40006aa0: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 40006d28 : int pthread_getattr_np( pthread_t thread, pthread_attr_t *attr ) { 40006d28: 9d e3 bf 98 save %sp, -104, %sp ISR_lock_Context lock_context; Thread_CPU_budget_algorithms budget_algorithm; const Scheduler_Control *scheduler; bool ok; if ( attr == NULL ) { 40006d2c: 80 a6 60 00 cmp %i1, 0 40006d30: 02 80 00 4c be 40006e60 40006d34: 94 10 20 60 mov 0x60, %o2 return EINVAL; } attr = memset( attr, 0, sizeof( *attr ) ); 40006d38: 92 10 20 00 clr %o1 40006d3c: 40 00 26 ff call 40010938 40006d40: 90 10 00 19 mov %i1, %o0 the_thread = _Thread_Get( thread, &lock_context ); 40006d44: 92 07 bf fc add %fp, -4, %o1 attr = memset( attr, 0, sizeof( *attr ) ); 40006d48: a0 10 00 08 mov %o0, %l0 the_thread = _Thread_Get( thread, &lock_context ); 40006d4c: 40 00 12 e6 call 4000b8e4 <_Thread_Get> 40006d50: 90 10 00 18 mov %i0, %o0 if ( the_thread == NULL ) { 40006d54: a2 92 20 00 orcc %o0, 0, %l1 40006d58: 02 80 00 44 be 40006e68 40006d5c: 01 00 00 00 nop } _Thread_State_acquire_critical( the_thread, &lock_context ); attr->stackaddr = the_thread->Start.Initial_stack.area; attr->stacksize = the_thread->Start.Initial_stack.size; 40006d60: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 attr->stackaddr = the_thread->Start.Initial_stack.area; 40006d64: c4 04 60 d0 ld [ %l1 + 0xd0 ], %g2 40006d68: c4 24 20 04 st %g2, [ %l0 + 4 ] attr->stacksize = the_thread->Start.Initial_stack.size; 40006d6c: c2 24 20 08 st %g1, [ %l0 + 8 ] if ( the_thread->was_created_with_inherited_scheduler ) { 40006d70: c2 0c 60 8b ldub [ %l1 + 0x8b ], %g1 40006d74: 80 a0 60 00 cmp %g1, 0 40006d78: 12 80 00 38 bne 40006e58 <== NEVER TAKEN 40006d7c: 82 10 20 01 mov 1, %g1 attr->inheritsched = PTHREAD_INHERIT_SCHED; } else { attr->inheritsched = PTHREAD_EXPLICIT_SCHED; 40006d80: 82 10 20 02 mov 2, %g1 40006d84: c2 24 20 10 st %g1, [ %l0 + 0x10 ] } scheduler = _Thread_Scheduler_get_home( the_thread ); attr->schedparam.sched_priority = _POSIX_Priority_From_core( 40006d88: 3b 10 00 48 sethi %hi(0x40012000), %i5 40006d8c: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 40006d90: d2 00 60 18 ld [ %g1 + 0x18 ], %o1 40006d94: d4 00 60 1c ld [ %g1 + 0x1c ], %o2 40006d98: 40 00 22 a5 call 4000f82c <_POSIX_Priority_From_core> 40006d9c: 90 17 63 b8 or %i5, 0x3b8, %o0 40006da0: e4 04 61 5c ld [ %l1 + 0x15c ], %l2 40006da4: d0 24 20 18 st %o0, [ %l0 + 0x18 ] ) { const POSIX_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; param->sched_ss_low_priority = _POSIX_Priority_From_core( 40006da8: 90 17 63 b8 or %i5, 0x3b8, %o0 40006dac: d2 04 a0 38 ld [ %l2 + 0x38 ], %o1 40006db0: 40 00 22 9f call 4000f82c <_POSIX_Priority_From_core> 40006db4: d4 04 a0 3c ld [ %l2 + 0x3c ], %o2 scheduler, api->Sporadic.Low_priority.priority ); param->sched_ss_repl_period = api->Sporadic.sched_ss_repl_period; param->sched_ss_init_budget = api->Sporadic.sched_ss_init_budget; param->sched_ss_max_repl = api->Sporadic.sched_ss_max_repl; 40006db8: c2 04 a0 60 ld [ %l2 + 0x60 ], %g1 param->sched_ss_repl_period = api->Sporadic.sched_ss_repl_period; 40006dbc: f0 1c a0 40 ldd [ %l2 + 0x40 ], %i0 40006dc0: f4 1c a0 48 ldd [ %l2 + 0x48 ], %i2 param->sched_ss_init_budget = api->Sporadic.sched_ss_init_budget; 40006dc4: f8 1c a0 50 ldd [ %l2 + 0x50 ], %i4 40006dc8: c4 1c a0 58 ldd [ %l2 + 0x58 ], %g2 40006dcc: c4 3c 20 38 std %g2, [ %l0 + 0x38 ] param->sched_ss_max_repl = api->Sporadic.sched_ss_max_repl; 40006dd0: c2 24 20 40 st %g1, [ %l0 + 0x40 ] param->sched_ss_low_priority = _POSIX_Priority_From_core( 40006dd4: d0 24 20 1c st %o0, [ %l0 + 0x1c ] param->sched_ss_repl_period = api->Sporadic.sched_ss_repl_period; 40006dd8: f0 3c 20 20 std %i0, [ %l0 + 0x20 ] 40006ddc: f4 3c 20 28 std %i2, [ %l0 + 0x28 ] param->sched_ss_init_budget = api->Sporadic.sched_ss_init_budget; 40006de0: f8 3c 20 30 std %i4, [ %l0 + 0x30 ] RTEMS_INLINE_ROUTINE bool _Thread_Is_joinable( const Thread_Control *the_thread ) { _Assert( _Thread_State_is_owner( the_thread ) ); return ( the_thread->Life.state & THREAD_LIFE_DETACHED ) == 0; 40006de4: c2 04 61 70 ld [ %l1 + 0x170 ], %g1 the_thread, scheduler, &attr->schedparam ); if ( _Thread_Is_joinable( the_thread ) ) { 40006de8: 80 88 60 10 btst 0x10, %g1 40006dec: 32 80 00 04 bne,a 40006dfc 40006df0: c0 24 20 50 clr [ %l0 + 0x50 ] attr->detachstate = PTHREAD_CREATE_JOINABLE; 40006df4: 82 10 20 01 mov 1, %g1 40006df8: c2 24 20 50 st %g1, [ %l0 + 0x50 ] } else { attr->detachstate = PTHREAD_CREATE_DETACHED; } attr->affinityset = &attr->affinitysetpreallocated; 40006dfc: 94 04 20 5c add %l0, 0x5c, %o2 attr->affinitysetsize = sizeof( attr->affinitysetpreallocated ); 40006e00: 82 10 20 04 mov 4, %g1 attr->affinityset = &attr->affinitysetpreallocated; 40006e04: d4 24 20 58 st %o2, [ %l0 + 0x58 ] ok = _Scheduler_Get_affinity( 40006e08: 92 10 20 04 mov 4, %o1 attr->affinitysetsize = sizeof( attr->affinitysetpreallocated ); 40006e0c: c2 24 20 54 st %g1, [ %l0 + 0x54 ] ok = _Scheduler_Get_affinity( 40006e10: 40 00 0f 2e call 4000aac8 <_Scheduler_Get_affinity> 40006e14: 90 10 00 11 mov %l1, %o0 40006e18: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED the_thread, attr->affinitysetsize, attr->affinityset ); budget_algorithm = the_thread->budget_algorithm; 40006e1c: d0 04 60 90 ld [ %l1 + 0x90 ], %o0 <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40006e20: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006e24: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006e28: 01 00 00 00 nop _Thread_State_release( the_thread, &lock_context ); attr->is_initialized = true; 40006e2c: 82 10 20 01 mov 1, %g1 ! 1 <_TLS_Alignment> attr->contentionscope = PTHREAD_SCOPE_PROCESS; 40006e30: c0 24 20 0c clr [ %l0 + 0xc ] attr->cputime_clock_allowed = 1; attr->schedpolicy = _POSIX_Thread_Translate_to_sched_policy( budget_algorithm ); return ok ? 0 : EINVAL; 40006e34: b0 10 20 00 clr %i0 attr->is_initialized = true; 40006e38: c2 24 00 00 st %g1, [ %l0 ] _POSIX_Thread_Translate_to_sched_policy( budget_algorithm ); 40006e3c: 40 00 22 86 call 4000f854 <_POSIX_Thread_Translate_to_sched_policy> 40006e40: c2 24 20 4c st %g1, [ %l0 + 0x4c ] return ok ? 0 : EINVAL; 40006e44: 80 a7 60 00 cmp %i5, 0 40006e48: 02 80 00 06 be 40006e60 <== NEVER TAKEN 40006e4c: d0 24 20 14 st %o0, [ %l0 + 0x14 ] } 40006e50: 81 c7 e0 08 ret 40006e54: 81 e8 00 00 restore 40006e58: 10 bf ff cc b 40006d88 <== NOT EXECUTED 40006e5c: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED return ok ? 0 : EINVAL; 40006e60: 81 c7 e0 08 ret 40006e64: 91 e8 20 16 restore %g0, 0x16, %o0 } 40006e68: 81 c7 e0 08 ret 40006e6c: 91 e8 20 03 restore %g0, 3, %o0 =============================================================================== 400064a0 : #include #include int pthread_getname_np( pthread_t thread, char *name, size_t len ) { 400064a0: 9d e3 bf 98 save %sp, -104, %sp _RTEMS_Lock_allocator(); 400064a4: 40 00 01 03 call 400068b0 <_RTEMS_Lock_allocator> 400064a8: 01 00 00 00 nop Thread_Control *the_thread; ISR_lock_Context lock_context; size_t actual_len; _Objects_Allocator_lock(); the_thread = _Thread_Get( thread, &lock_context ); 400064ac: 92 07 bf fc add %fp, -4, %o1 400064b0: 40 00 0d cc call 40009be0 <_Thread_Get> 400064b4: 90 10 00 18 mov %i0, %o0 if ( the_thread == NULL ) { 400064b8: 80 a2 20 00 cmp %o0, 0 400064bc: 02 80 00 0f be 400064f8 400064c0: 01 00 00 00 nop register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 400064c4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400064c8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400064cc: 01 00 00 00 nop strlcpy(name, "", len); return ESRCH; } _ISR_lock_ISR_enable( &lock_context ); actual_len = _Thread_Get_name( the_thread, name, len ); 400064d0: 94 10 00 1a mov %i2, %o2 400064d4: 40 00 0e e7 call 4000a070 <_Thread_Get_name> 400064d8: 92 10 00 19 mov %i1, %o1 _RTEMS_Unlock_allocator(); 400064dc: 40 00 00 fa call 400068c4 <_RTEMS_Unlock_allocator> 400064e0: ba 10 00 08 mov %o0, %i5 if ( actual_len >= len ) { return ERANGE; } return 0; 400064e4: 80 a7 40 1a cmp %i5, %i2 400064e8: b0 40 3f ff addx %g0, -1, %i0 400064ec: b0 0e 20 22 and %i0, 0x22, %i0 } 400064f0: 81 c7 e0 08 ret 400064f4: 81 e8 00 00 restore 400064f8: 40 00 00 f3 call 400068c4 <_RTEMS_Unlock_allocator> 400064fc: b0 10 20 03 mov 3, %i0 strlcpy(name, "", len); 40006500: 94 10 00 1a mov %i2, %o2 40006504: 90 10 00 19 mov %i1, %o0 40006508: 13 10 00 3f sethi %hi(0x4000fc00), %o1 4000650c: 40 00 21 02 call 4000e914 40006510: 92 12 60 28 or %o1, 0x28, %o1 ! 4000fc28 return ESRCH; 40006514: 81 c7 e0 08 ret 40006518: 81 e8 00 00 restore =============================================================================== 40006aa4 : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 40006aa4: 9d e3 bf 78 save %sp, -136, %sp Thread_queue_Context queue_context; Thread_CPU_budget_algorithms budget_algorithm; const Scheduler_Control *scheduler; Priority_Control priority; if ( policy == NULL || param == NULL ) { 40006aa8: 80 a6 60 00 cmp %i1, 0 40006aac: 02 80 00 2b be 40006b58 40006ab0: 80 a6 a0 00 cmp %i2, 0 40006ab4: 02 80 00 29 be 40006b58 40006ab8: 90 10 00 18 mov %i0, %o0 return EINVAL; } _Thread_queue_Context_initialize( &queue_context ); the_thread = _Thread_Get( thread, &queue_context.Lock_context.Lock_context ); 40006abc: 92 07 bf dc add %fp, -36, %o1 40006ac0: 40 00 10 65 call 4000ac54 <_Thread_Get> 40006ac4: b0 10 20 03 mov 3, %i0 if ( the_thread == NULL ) { 40006ac8: 80 a2 20 00 cmp %o0, 0 40006acc: 02 80 00 21 be 40006b50 40006ad0: a2 10 00 08 mov %o0, %l1 40006ad4: f6 02 21 5c ld [ %o0 + 0x15c ], %i3 ) { const POSIX_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; param->sched_ss_low_priority = _POSIX_Priority_From_core( 40006ad8: d4 06 e0 3c ld [ %i3 + 0x3c ], %o2 40006adc: d2 06 e0 38 ld [ %i3 + 0x38 ], %o1 40006ae0: 25 10 00 5c sethi %hi(0x40017000), %l2 40006ae4: 40 00 1d b2 call 4000e1ac <_POSIX_Priority_From_core> 40006ae8: 90 14 a2 f0 or %l2, 0x2f0, %o0 ! 400172f0 <_Scheduler_Table> scheduler, api->Sporadic.Low_priority.priority ); param->sched_ss_repl_period = api->Sporadic.sched_ss_repl_period; param->sched_ss_init_budget = api->Sporadic.sched_ss_init_budget; 40006aec: c4 1e e0 58 ldd [ %i3 + 0x58 ], %g2 40006af0: f8 1e e0 50 ldd [ %i3 + 0x50 ], %i4 param->sched_ss_repl_period = api->Sporadic.sched_ss_repl_period; 40006af4: d8 1e e0 40 ldd [ %i3 + 0x40 ], %o4 40006af8: d4 1e e0 48 ldd [ %i3 + 0x48 ], %o2 <== NOT EXECUTED param->sched_ss_max_repl = api->Sporadic.sched_ss_max_repl; 40006afc: c2 06 e0 60 ld [ %i3 + 0x60 ], %g1 <== NOT EXECUTED 40006b00: c2 26 a0 28 st %g1, [ %i2 + 0x28 ] <== NOT EXECUTED param->sched_ss_init_budget = api->Sporadic.sched_ss_init_budget; 40006b04: f8 3e a0 18 std %i4, [ %i2 + 0x18 ] <== NOT EXECUTED 40006b08: c4 3e a0 20 std %g2, [ %i2 + 0x20 ] <== NOT EXECUTED param->sched_ss_repl_period = api->Sporadic.sched_ss_repl_period; 40006b0c: d8 3e a0 08 std %o4, [ %i2 + 8 ] <== NOT EXECUTED 40006b10: d4 3e a0 10 std %o2, [ %i2 + 0x10 ] <== NOT EXECUTED param->sched_ss_low_priority = _POSIX_Priority_From_core( 40006b14: d0 26 a0 04 st %o0, [ %i2 + 4 ] <== NOT EXECUTED _Thread_Wait_acquire_critical( the_thread, &queue_context ); scheduler = _Thread_Scheduler_get_home( the_thread ); _POSIX_Threads_Get_sched_param_sporadic( the_thread, scheduler, param ); priority = the_thread->Real_priority.priority; 40006b18: c4 1c 60 30 ldd [ %l1 + 0x30 ], %g2 <== NOT EXECUTED budget_algorithm = the_thread->budget_algorithm; 40006b1c: fa 04 60 90 ld [ %l1 + 0x90 ], %i5 <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40006b20: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006b24: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006b28: 01 00 00 00 nop _Thread_Wait_release( the_thread, &queue_context ); param->sched_priority = _POSIX_Priority_From_core( scheduler, priority ); 40006b2c: 92 10 00 02 mov %g2, %o1 40006b30: 94 10 00 03 mov %g3, %o2 40006b34: 40 00 1d 9e call 4000e1ac <_POSIX_Priority_From_core> 40006b38: 90 14 a2 f0 or %l2, 0x2f0, %o0 40006b3c: d0 26 80 00 st %o0, [ %i2 ] *policy = _POSIX_Thread_Translate_to_sched_policy( budget_algorithm ); return 0; 40006b40: b0 10 20 00 clr %i0 *policy = _POSIX_Thread_Translate_to_sched_policy( budget_algorithm ); 40006b44: 40 00 1d a4 call 4000e1d4 <_POSIX_Thread_Translate_to_sched_policy> 40006b48: 90 10 00 1d mov %i5, %o0 40006b4c: d0 26 40 00 st %o0, [ %i1 ] return 0; 40006b50: 81 c7 e0 08 ret 40006b54: 81 e8 00 00 restore return EINVAL; 40006b58: b0 10 20 16 mov 0x16, %i0 } 40006b5c: 81 c7 e0 08 ret 40006b60: 81 e8 00 00 restore =============================================================================== 40006560 : ISR_Level level; _ISR_Local_disable( level ); #endif executing = _Thread_Executing; 40006560: c6 01 a0 20 ld [ %g6 + 0x20 ], %g3 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006564: 91 d0 20 09 ta 9 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE RBTree_Node * const *_RBTree_Root_const_reference( const RBTree_Control *the_rbtree ) { return &RB_ROOT( the_rbtree ); 40006568: 86 00 e1 60 add %g3, 0x160, %g3 RBTree_Node *parent; link = _RBTree_Root_const_reference( the_rbtree ); parent = NULL; while ( *link != NULL ) { 4000656c: c4 00 c0 00 ld [ %g3 ], %g2 40006570: 80 a0 a0 00 cmp %g2, 0 40006574: 02 80 00 0d be 400065a8 40006578: 86 00 bf f8 add %g2, -8, %g3 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; 4000657c: c8 00 e0 18 ld [ %g3 + 0x18 ], %g4 parent = *link; if ( ( *equal )( key, parent ) ) { 40006580: 80 a2 00 04 cmp %o0, %g4 40006584: 22 80 00 0e be,a 400065bc 40006588: d0 00 e0 20 ld [ %g3 + 0x20 ], %o0 return ( *map )( parent ); } else if ( ( *less )( key, parent ) ) { 4000658c: 1a bf ff f8 bcc 4000656c 40006590: 86 00 a0 04 add %g2, 4, %g3 return &RB_LEFT( the_node, Node ); 40006594: 86 10 00 02 mov %g2, %g3 while ( *link != NULL ) { 40006598: c4 00 c0 00 ld [ %g3 ], %g2 4000659c: 80 a0 a0 00 cmp %g2, 0 400065a0: 12 bf ff f7 bne 4000657c <== NEVER TAKEN 400065a4: 86 00 bf f8 add %g2, -8, %g3 <== NOT EXECUTED key_value_pair = _POSIX_Keys_Key_value_find( key, executing ); if ( key_value_pair != NULL ) { value = key_value_pair->value; } else { value = NULL; 400065a8: 90 10 20 00 clr %o0 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400065ac: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400065b0: 01 00 00 00 nop } _POSIX_Keys_Key_value_release( executing, &lock_context ); return value; } 400065b4: 81 c3 e0 08 retl 400065b8: 01 00 00 00 nop 400065bc: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400065c0: 01 00 00 00 nop 400065c4: 81 c3 e0 08 retl 400065c8: 01 00 00 00 nop =============================================================================== 4000a644 : return 0; } int pthread_join( pthread_t thread, void **value_ptr ) { 4000a644: 9d e3 bf 78 save %sp, -136, %sp 4000a648: 37 10 00 3c sethi %hi(0x4000f000), %i3 RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_join_at_exit( States_Control the_states ) { return ( the_states & STATES_WAITING_FOR_JOIN_AT_EXIT ) != 0; 4000a64c: 21 00 00 08 sethi %hi(0x2000), %l0 4000a650: b6 16 e3 5c or %i3, 0x35c, %i3 _Thread_Join( 4000a654: 35 04 00 10 sethi %hi(0x10004000), %i2 the_thread = _Thread_Get( thread, &queue_context.Lock_context.Lock_context ); 4000a658: 92 07 bf dc add %fp, -36, %o1 queue_context->enqueue_callout = _Thread_queue_Enqueue_do_nothing_extra; 4000a65c: f6 27 bf e4 st %i3, [ %fp + -28 ] 4000a660: 40 00 11 d4 call 4000edb0 <_Thread_Get> 4000a664: 90 10 00 18 mov %i0, %o0 if ( the_thread == NULL ) { 4000a668: 80 a2 20 00 cmp %o0, 0 4000a66c: 02 80 00 2e be 4000a724 4000a670: b8 10 00 06 mov %g6, %i4 return cpu->executing; 4000a674: fa 01 a0 20 ld [ %g6 + 0x20 ], %i5 if ( executing == the_thread ) { 4000a678: 80 a2 00 1d cmp %o0, %i5 4000a67c: 02 80 00 2c be 4000a72c 4000a680: 01 00 00 00 nop return ( the_thread->Life.state & THREAD_LIFE_DETACHED ) == 0; 4000a684: c4 02 21 70 ld [ %o0 + 0x170 ], %g2 if ( !_Thread_Is_joinable( the_thread ) ) { 4000a688: 80 88 a0 10 btst 0x10, %g2 4000a68c: 12 80 00 21 bne 4000a710 4000a690: 96 07 bf dc add %fp, -36, %o3 4000a694: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 _Thread_Join( 4000a698: 94 10 00 1d mov %i5, %o2 if ( _States_Is_waiting_for_join_at_exit( the_thread->current_state ) ) { 4000a69c: 80 88 80 10 btst %g2, %l0 4000a6a0: 02 80 00 13 be 4000a6ec 4000a6a4: 92 10 00 1a mov %i2, %o1 value = the_thread->Life.exit_value; 4000a6a8: fa 02 21 78 ld [ %o0 + 0x178 ], %i5 _Thread_Clear_state_locked( the_thread, STATES_WAITING_FOR_JOIN_AT_EXIT ); 4000a6ac: 40 00 10 fb call 4000ea98 <_Thread_Clear_state_locked> 4000a6b0: 13 00 00 08 sethi %hi(0x2000), %o1 disable_level = cpu_self->thread_dispatch_disable_level; 4000a6b4: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = disable_level + 1; 4000a6b8: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000a6bc: c2 27 20 18 st %g1, [ %i4 + 0x18 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000a6c0: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000a6c4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000a6c8: 01 00 00 00 nop _Thread_Dispatch_direct( cpu_self ); 4000a6cc: 40 00 11 a1 call 4000ed50 <_Thread_Dispatch_direct> 4000a6d0: 90 10 00 1c mov %i4, %o0 if ( value_ptr != NULL ) { 4000a6d4: 80 a6 60 00 cmp %i1, 0 4000a6d8: 02 80 00 03 be 4000a6e4 4000a6dc: b0 10 20 00 clr %i0 *value_ptr = value; 4000a6e0: fa 26 40 00 st %i5, [ %i1 ] do { error = _POSIX_Threads_Join( thread, value_ptr ); } while ( error == EINTR ); return error; } 4000a6e4: 81 c7 e0 08 ret 4000a6e8: 81 e8 00 00 restore _Thread_Join( 4000a6ec: 40 00 17 ad call 400105a0 <_Thread_Join> 4000a6f0: 01 00 00 00 nop return _POSIX_Get_by_name_error_table[ error ]; } RTEMS_INLINE_ROUTINE int _POSIX_Get_error( Status_Control status ) { return STATUS_GET_POSIX( status ); 4000a6f4: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 4000a6f8: 83 38 60 08 sra %g1, 8, %g1 if ( _POSIX_Get_error_after_wait( executing ) != 0 ) { 4000a6fc: 80 a0 60 00 cmp %g1, 0 4000a700: 12 bf ff d7 bne 4000a65c 4000a704: 92 07 bf dc add %fp, -36, %o1 value = executing->Wait.return_argument; 4000a708: 10 bf ff f3 b 4000a6d4 4000a70c: fa 07 60 40 ld [ %i5 + 0x40 ], %i5 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000a710: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000a714: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000a718: 01 00 00 00 nop return EINVAL; 4000a71c: 81 c7 e0 08 ret 4000a720: 91 e8 20 16 restore %g0, 0x16, %o0 return ESRCH; 4000a724: 81 c7 e0 08 ret 4000a728: 91 e8 20 03 restore %g0, 3, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000a72c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000a730: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000a734: 01 00 00 00 nop return EDEADLK; 4000a738: 81 c7 e0 08 ret 4000a73c: 91 e8 20 2d restore %g0, 0x2d, %o0 =============================================================================== 4000653c : * 17.1.3 Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 */ int pthread_key_delete( pthread_key_t key ) { 4000653c: 9d e3 bf 98 save %sp, -104, %sp _RTEMS_Lock_allocator(); 40006540: 40 00 03 74 call 40007310 <_RTEMS_Lock_allocator> 40006544: 33 10 00 68 sethi %hi(0x4001a000), %i1 _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); } RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get( pthread_key_t key ) { return (POSIX_Keys_Control *) 40006548: 90 10 00 18 mov %i0, %o0 the_key = _POSIX_Keys_Get( key ); if ( the_key != NULL ) { _POSIX_Keys_Destroy( the_key ); eno = 0; } else { eno = EINVAL; 4000654c: b0 10 20 16 mov 0x16, %i0 40006550: 40 00 0c a7 call 400097ec <_Objects_Get_no_protection> 40006554: 92 16 63 58 or %i1, 0x358, %o1 if ( the_key != NULL ) { 40006558: 80 a2 20 00 cmp %o0, 0 4000655c: 02 80 00 24 be 400065ec 40006560: b8 10 00 08 mov %o0, %i4 _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 40006564: 92 10 00 08 mov %o0, %o1 40006568: 40 00 0b a9 call 4000940c <_Objects_Close> 4000656c: 90 16 63 58 or %i1, 0x358, %o0 return _Chain_Immutable_head( the_chain )->next; 40006570: fa 07 20 14 ld [ %i4 + 0x14 ], %i5 return &the_chain->Tail.Node; 40006574: b4 07 20 18 add %i4, 0x18, %i2 while ( !_Chain_Is_empty( &the_key->Key_value_pairs ) ) { 40006578: 80 a6 80 1d cmp %i2, %i5 4000657c: 02 80 00 19 be 400065e0 40006580: 92 10 00 1c mov %i4, %o1 40006584: 37 10 00 68 sethi %hi(0x4001a000), %i3 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_free( POSIX_Keys_Key_value_pair *key_value_pair ) { _Chain_Extract_unprotected( &key_value_pair->Key_node ); _Freechain_Put( &_POSIX_Keys_Keypool, key_value_pair ); 40006588: b6 16 e3 94 or %i3, 0x394, %i3 ! 4001a394 <_POSIX_Keys_Keypool> <== NOT EXECUTED the_thread = key_value_pair->thread; 4000658c: d0 07 60 1c ld [ %i5 + 0x1c ], %o0 <== NOT EXECUTED 40006590: 91 d0 20 09 ta 9 <== NOT EXECUTED return psr; 40006594: c2 27 bf fc st %g1, [ %fp + -4 ] _RBTree_Extract( 40006598: 92 07 60 08 add %i5, 8, %o1 4000659c: 40 00 0d 5c call 40009b0c <_RBTree_Extract> 400065a0: 90 02 21 60 add %o0, 0x160, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 400065a4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400065a8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400065ac: 01 00 00 00 nop next = the_node->next; 400065b0: c4 07 40 00 ld [ %i5 ], %g2 previous = the_node->previous; 400065b4: c2 07 60 04 ld [ %i5 + 4 ], %g1 next->previous = previous; 400065b8: c2 20 a0 04 st %g1, [ %g2 + 4 ] 400065bc: 92 10 00 1d mov %i5, %o1 previous->next = next; 400065c0: c4 20 40 00 st %g2, [ %g1 ] 400065c4: 40 00 03 e9 call 40007568 <_Freechain_Put> 400065c8: 90 10 00 1b mov %i3, %o0 return _Chain_Immutable_head( the_chain )->next; 400065cc: fa 07 20 14 ld [ %i4 + 0x14 ], %i5 while ( !_Chain_Is_empty( &the_key->Key_value_pairs ) ) { 400065d0: 80 a7 40 1a cmp %i5, %i2 400065d4: 32 bf ff ef bne,a 40006590 <== NEVER TAKEN 400065d8: d0 07 60 1c ld [ %i5 + 0x1c ], %o0 <== NOT EXECUTED _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 400065dc: 92 10 00 1c mov %i4, %o1 400065e0: 90 16 63 58 or %i1, 0x358, %o0 400065e4: 40 00 0c 56 call 4000973c <_Objects_Free> 400065e8: b0 10 20 00 clr %i0 _RTEMS_Unlock_allocator(); 400065ec: 40 00 03 4e call 40007324 <_RTEMS_Unlock_allocator> 400065f0: 01 00 00 00 nop } _Objects_Allocator_unlock(); return eno; } 400065f4: 81 c7 e0 08 ret 400065f8: 81 e8 00 00 restore =============================================================================== 40006e44 : #include #include #include int pthread_kill( pthread_t thread, int sig ) { 40006e44: 9d e3 bf 90 save %sp, -112, %sp static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 40006e48: ba 06 7f ff add %i1, -1, %i5 Thread_Control *the_thread; ISR_lock_Context lock_context; POSIX_API_Control *api; Per_CPU_Control *cpu_self; if ( !is_valid_signo( sig ) ) { 40006e4c: 80 a7 60 1f cmp %i5, 0x1f 40006e50: 18 80 00 28 bgu 40006ef0 40006e54: 82 10 20 16 mov 0x16, %g1 return EINVAL; } the_thread = _Thread_Get( thread, &lock_context ); 40006e58: 92 07 bf fc add %fp, -4, %o1 40006e5c: 40 00 11 61 call 4000b3e0 <_Thread_Get> 40006e60: 90 10 00 18 mov %i0, %o0 if ( the_thread == NULL ) { 40006e64: 86 92 20 00 orcc %o0, 0, %g3 40006e68: 02 80 00 22 be 40006ef0 40006e6c: 82 10 20 03 mov 3, %g1 return ESRCH; } api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 40006e70: 83 2e 60 01 sll %i1, 1, %g1 40006e74: 82 00 40 19 add %g1, %i1, %g1 40006e78: 85 28 60 02 sll %g1, 2, %g2 40006e7c: 03 10 00 74 sethi %hi(0x4001d000), %g1 40006e80: 82 10 63 88 or %g1, 0x388, %g1 ! 4001d388 <_POSIX_signals_Vectors> 40006e84: 82 00 40 02 add %g1, %g2, %g1 40006e88: c2 00 60 08 ld [ %g1 + 8 ], %g1 40006e8c: 80 a0 60 01 cmp %g1, 1 40006e90: 02 80 00 24 be 40006f20 40006e94: 01 00 00 00 nop api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40006e98: c8 00 e1 5c ld [ %g3 + 0x15c ], %g4 <== NOT EXECUTED return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 40006e9c: c4 01 20 6c ld [ %g4 + 0x6c ], %g2 <== NOT EXECUTED const ISR_lock_Context *lock_context ) { uint32_t disable_level; disable_level = cpu_self->thread_dispatch_disable_level; 40006ea0: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 <== NOT EXECUTED return 1u << (sig - 1); 40006ea4: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED 40006ea8: bb 28 c0 1d sll %g3, %i5, %i5 <== NOT EXECUTED 40006eac: ba 10 80 1d or %g2, %i5, %i5 <== NOT EXECUTED 40006eb0: fa 21 20 6c st %i5, [ %g4 + 0x6c ] <== NOT EXECUTED _Profiling_Thread_dispatch_disable_critical( cpu_self, disable_level, lock_context ); cpu_self->thread_dispatch_disable_level = disable_level + 1; 40006eb4: 82 00 60 01 inc %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_critical( const ISR_lock_Context *lock_context ) { return _Thread_Dispatch_disable_with_CPU( _Per_CPU_Get(), lock_context ); 40006eb8: b8 10 00 06 mov %g6, %i4 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = disable_level + 1; 40006ebc: c2 21 a0 18 st %g1, [ %g6 + 0x18 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40006ec0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006ec4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006ec8: 01 00 00 00 nop cpu_self = _Thread_Dispatch_disable_critical( &lock_context ); _ISR_lock_ISR_enable( &lock_context ); (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 40006ecc: 94 10 20 00 clr %o2 ! 0 40006ed0: 40 00 20 13 call 4000ef1c <_POSIX_signals_Unblock_thread> 40006ed4: 92 10 00 19 mov %i1, %o1 * * @param[in] cpu_self The current processor. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_enable( Per_CPU_Control *cpu_self ) { uint32_t disable_level = cpu_self->thread_dispatch_disable_level; 40006ed8: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 if ( disable_level == 1 ) { 40006edc: 80 a0 60 01 cmp %g1, 1 40006ee0: 02 80 00 06 be 40006ef8 40006ee4: 84 00 7f ff add %g1, -1, %g2 } _ISR_Local_enable( level ); } else { _Assert( disable_level > 0 ); cpu_self->thread_dispatch_disable_level = disable_level - 1; 40006ee8: c4 27 20 18 st %g2, [ %i4 + 0x18 ] _Thread_Dispatch_enable( cpu_self ); return 0; 40006eec: 82 10 20 00 clr %g1 } 40006ef0: 81 c7 e0 08 ret 40006ef4: 91 e8 00 01 restore %g0, %g1, %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006ef8: 91 d0 20 09 ta 9 <== NOT EXECUTED if ( 40006efc: c4 0f 20 1c ldub [ %i4 + 0x1c ], %g2 40006f00: 80 a0 a0 00 cmp %g2, 0 40006f04: 12 80 00 0d bne 40006f38 <== ALWAYS TAKEN 40006f08: 92 10 00 01 mov %g1, %o1 cpu_self->thread_dispatch_disable_level = 0; 40006f0c: c0 27 20 18 clr [ %i4 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006f10: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006f14: 01 00 00 00 nop return 0; 40006f18: 10 bf ff f6 b 40006ef0 40006f1c: 82 10 20 00 clr %g1 ! 0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40006f20: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006f24: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006f28: 01 00 00 00 nop return 0; 40006f2c: 82 10 20 00 clr %g1 ! 0 } 40006f30: 81 c7 e0 08 ret 40006f34: 91 e8 00 01 restore %g0, %g1, %o0 _Thread_Do_dispatch( cpu_self, level ); 40006f38: c2 27 bf f4 st %g1, [ %fp + -12 ] 40006f3c: 40 00 10 ba call 4000b224 <_Thread_Do_dispatch> 40006f40: 90 10 00 1c mov %i4, %o0 40006f44: 10 bf ff f3 b 40006f10 40006f48: c2 07 bf f4 ld [ %fp + -12 ], %g1 =============================================================================== 4000971c : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 4000971c: 9d e3 bf a0 save %sp, -96, %sp unsigned long flags; Thread_queue_Context queue_context; int eno; the_mutex = _POSIX_Mutex_Get( mutex ); POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags ); 40009720: 80 a6 20 00 cmp %i0, 0 40009724: 02 80 00 18 be 40009784 40009728: 05 25 87 04 sethi %hi(0x961c1000), %g2 4000972c: c2 06 00 00 ld [ %i0 ], %g1 40009730: 82 1e 00 01 xor %i0, %g1, %g1 40009734: 84 10 a3 b8 or %g2, 0x3b8, %g2 40009738: 82 18 40 02 xor %g1, %g2, %g1 4000973c: 80 88 7f f8 btst -8, %g1 40009740: 12 80 00 0c bne 40009770 40009744: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40009748: 91 d0 20 09 ta 9 <== NOT EXECUTED _POSIX_Mutex_Acquire( the_mutex, &queue_context ); if ( _POSIX_Mutex_Get_owner( the_mutex ) == NULL ) { 4000974c: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 40009750: 80 a0 a0 00 cmp %g2, 0 40009754: 22 80 00 0e be,a 4000978c 40009758: c4 06 00 00 ld [ %i0 ], %g2 the_mutex->flags = ~the_mutex->flags; eno = 0; } else { eno = EBUSY; 4000975c: b0 10 20 10 mov 0x10, %i0 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40009760: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40009764: 01 00 00 00 nop } _POSIX_Mutex_Release( the_mutex, &queue_context ); return eno; } 40009768: 81 c7 e0 08 ret 4000976c: 81 e8 00 00 restore POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags ); 40009770: 40 00 01 9a call 40009dd8 <_POSIX_Mutex_Auto_initialization> 40009774: 90 10 00 18 mov %i0, %o0 40009778: 80 a2 20 00 cmp %o0, 0 4000977c: 12 bf ff f3 bne 40009748 40009780: 01 00 00 00 nop 40009784: 81 c7 e0 08 ret 40009788: 91 e8 20 16 restore %g0, 0x16, %o0 the_mutex->flags = ~the_mutex->flags; 4000978c: 84 38 00 02 xnor %g0, %g2, %g2 <== NOT EXECUTED 40009790: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED eno = 0; 40009794: b0 10 20 00 clr %i0 <== NOT EXECUTED 40009798: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000979c: 01 00 00 00 nop } 400097a0: 81 c7 e0 08 ret 400097a4: 81 e8 00 00 restore =============================================================================== 400097a8 : #else pthread_mutex_t *mutex, #endif int *prioceiling ) { 400097a8: 9d e3 bf 98 save %sp, -104, %sp if ( prioceiling == NULL ) { return EINVAL; } the_mutex = _POSIX_Mutex_Get( RTEMS_DECONST( pthread_mutex_t *, mutex ) ); POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags ); 400097ac: 80 a6 60 00 cmp %i1, 0 400097b0: 02 80 00 1a be 40009818 400097b4: 80 a6 20 00 cmp %i0, 0 400097b8: 02 80 00 18 be 40009818 400097bc: 05 25 87 04 sethi %hi(0x961c1000), %g2 400097c0: fa 06 00 00 ld [ %i0 ], %i5 400097c4: 82 1e 00 1d xor %i0, %i5, %g1 400097c8: 84 10 a3 b8 or %g2, 0x3b8, %g2 400097cc: 82 18 40 02 xor %g1, %g2, %g1 400097d0: 80 88 7f f8 btst -8, %g1 400097d4: 12 80 00 0c bne 40009804 400097d8: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400097dc: 91 d0 20 09 ta 9 <== NOT EXECUTED RTEMS_INLINE_ROUTINE POSIX_Mutex_Protocol _POSIX_Mutex_Get_protocol( unsigned long flags ) { return flags & POSIX_MUTEX_PROTOCOL_MASK; 400097e0: ba 0f 60 03 and %i5, 3, %i5 _POSIX_Mutex_Acquire( the_mutex, &queue_context ); if ( _POSIX_Mutex_Get_protocol( flags ) == POSIX_MUTEX_PRIORITY_CEILING ) { 400097e4: 80 a7 60 02 cmp %i5, 2 400097e8: 22 80 00 0e be,a 40009820 400097ec: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 *prioceiling = _POSIX_Priority_From_core( _POSIX_Mutex_Get_scheduler( the_mutex ), _POSIX_Mutex_Get_priority( the_mutex ) ); } else { *prioceiling = 0; 400097f0: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400097f4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400097f8: 01 00 00 00 nop } _POSIX_Mutex_Release( the_mutex, &queue_context ); return 0; } 400097fc: 81 c7 e0 08 ret 40009800: 91 e8 20 00 restore %g0, 0, %o0 POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags ); 40009804: 40 00 01 75 call 40009dd8 <_POSIX_Mutex_Auto_initialization> 40009808: 90 10 00 18 mov %i0, %o0 4000980c: 80 a2 20 00 cmp %o0, 0 40009810: 12 bf ff f3 bne 400097dc <== ALWAYS TAKEN 40009814: 01 00 00 00 nop 40009818: 81 c7 e0 08 ret 4000981c: 91 e8 20 16 restore %g0, 0x16, %o0 *prioceiling = _POSIX_Priority_From_core( 40009820: d4 06 20 34 ld [ %i0 + 0x34 ], %o2 40009824: c2 27 bf fc st %g1, [ %fp + -4 ] 40009828: 11 10 00 6d sethi %hi(0x4001b400), %o0 4000982c: 40 00 02 41 call 4000a130 <_POSIX_Priority_From_core> 40009830: 90 12 21 08 or %o0, 0x108, %o0 ! 4001b508 <_Scheduler_Table> 40009834: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 40009838: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED 4000983c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40009840: 01 00 00 00 nop } 40009844: 81 c7 e0 08 ret 40009848: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 4000984c : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 4000984c: 9d e3 bf 98 save %sp, -104, %sp POSIX_Mutex_Protocol protocol; unsigned long flags; Priority_Control priority; const Scheduler_Control *scheduler; if ( attr ) the_attr = attr; 40009850: 80 a6 60 00 cmp %i1, 0 40009854: 02 80 00 0f be 40009890 40009858: ba 10 00 18 mov %i0, %i5 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 4000985c: 80 a6 20 00 cmp %i0, 0 40009860: 02 80 00 44 be 40009970 40009864: 01 00 00 00 nop * value in an uninitialized variable to make this fail. * * Thus, we do not look at *mutex. */ if ( !the_attr->is_initialized ) 40009868: c2 06 40 00 ld [ %i1 ], %g1 4000986c: 80 a0 60 00 cmp %g1, 0 40009870: 02 80 00 06 be 40009888 40009874: b0 10 20 16 mov 0x16, %i0 return EINVAL; if ( !_POSIX_Is_valid_pshared( the_attr->process_shared ) ) { 40009878: c2 06 60 04 ld [ %i1 + 4 ], %g1 4000987c: 80 a0 60 01 cmp %g1, 1 40009880: 28 80 00 16 bleu,a 400098d8 40009884: c2 06 60 0c ld [ %i1 + 0xc ], %g1 ); the_mutex->Recursive.nest_level = 0; _Priority_Node_initialize( &the_mutex->Priority_ceiling, priority ); the_mutex->scheduler = scheduler; return 0; } 40009888: 81 c7 e0 08 ret 4000988c: 81 e8 00 00 restore if ( !mutex ) 40009890: 80 a6 20 00 cmp %i0, 0 40009894: 02 80 00 37 be 40009970 40009898: 03 25 87 04 sethi %hi(0x961c1000), %g1 flags = (uintptr_t) the_mutex ^ POSIX_MUTEX_MAGIC; 4000989c: 82 10 63 b8 or %g1, 0x3b8, %g1 ! 961c13b8 400098a0: 82 1e 00 01 xor %i0, %g1, %g1 flags &= ~POSIX_MUTEX_FLAGS_MASK; 400098a4: 82 08 7f f8 and %g1, -8, %g1 the_mutex->flags = flags; 400098a8: c2 26 00 00 st %g1, [ %i0 ] scheduler = NULL; 400098ac: 84 10 20 00 clr %g2 priority = 0; 400098b0: 90 10 20 00 clr %o0 400098b4: 92 10 20 00 clr %o1 ) { #if defined(RTEMS_SMP) _SMP_ticket_lock_Initialize( &queue->Lock ); #endif queue->heads = NULL; 400098b8: c0 27 60 0c clr [ %i5 + 0xc ] queue->owner = NULL; 400098bc: c0 27 60 10 clr [ %i5 + 0x10 ] queue->name = name; 400098c0: c0 27 60 14 clr [ %i5 + 0x14 ] the_mutex->Recursive.nest_level = 0; 400098c4: c0 27 60 18 clr [ %i5 + 0x18 ] RTEMS_INLINE_ROUTINE void _Priority_Node_initialize( Priority_Node *node, Priority_Control priority ) { node->priority = priority; 400098c8: d0 3f 60 30 std %o0, [ %i5 + 0x30 ] the_mutex->scheduler = scheduler; 400098cc: c4 27 60 38 st %g2, [ %i5 + 0x38 ] return 0; 400098d0: 81 c7 e0 08 ret 400098d4: 91 e8 20 00 restore %g0, 0, %o0 switch ( the_attr->protocol ) { 400098d8: 80 a0 60 01 cmp %g1, 1 400098dc: 02 80 00 27 be 40009978 400098e0: 80 a0 60 02 cmp %g1, 2 400098e4: 02 80 00 27 be 40009980 400098e8: 80 a0 60 00 cmp %g1, 0 400098ec: 12 bf ff e7 bne 40009888 400098f0: 84 10 20 00 clr %g2 switch ( the_attr->type ) { 400098f4: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 400098f8: 80 a0 60 03 cmp %g1, 3 400098fc: 18 bf ff e3 bgu 40009888 40009900: b0 10 20 16 mov 0x16, %i0 if ( the_attr->type == PTHREAD_MUTEX_RECURSIVE ) { 40009904: 80 a0 60 01 cmp %g1, 1 flags = (uintptr_t) the_mutex ^ POSIX_MUTEX_MAGIC; 40009908: 03 25 87 04 sethi %hi(0x961c1000), %g1 4000990c: 82 10 63 b8 or %g1, 0x3b8, %g1 ! 961c13b8 40009910: 82 1f 40 01 xor %i5, %g1, %g1 flags &= ~POSIX_MUTEX_FLAGS_MASK; 40009914: 82 08 7f f8 and %g1, -8, %g1 if ( the_attr->type == PTHREAD_MUTEX_RECURSIVE ) { 40009918: 12 80 00 03 bne 40009924 <== ALWAYS TAKEN 4000991c: 82 10 80 01 or %g2, %g1, %g1 flags |= POSIX_MUTEX_RECURSIVE; 40009920: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED if ( protocol == POSIX_MUTEX_PRIORITY_CEILING ) { 40009924: 80 a0 a0 02 cmp %g2, 2 40009928: 12 80 00 18 bne 40009988 4000992c: c2 27 40 00 st %g1, [ %i5 ] prio_ceiling = the_attr->prio_ceiling; 40009930: d2 06 60 08 ld [ %i1 + 8 ], %o1 if ( prio_ceiling == INT_MAX ) { 40009934: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 40009938: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000993c: 80 a2 40 01 cmp %o1, %g1 40009940: 12 80 00 05 bne 40009954 40009944: 39 10 00 6d sethi %hi(0x4001b400), %i4 RTEMS_INLINE_ROUTINE int _POSIX_Priority_Get_maximum( const Scheduler_Control *scheduler ) { _Assert( (int) scheduler->maximum_priority > 1 ); return (int) scheduler->maximum_priority - 1; 40009948: 82 17 21 08 or %i4, 0x108, %g1 ! 4001b508 <_Scheduler_Table> 4000994c: d2 00 60 44 ld [ %g1 + 0x44 ], %o1 40009950: 92 02 7f ff add %o1, -1, %o1 priority = _POSIX_Priority_To_core( scheduler, prio_ceiling, &valid ); 40009954: 94 07 bf ff add %fp, -1, %o2 40009958: 40 00 01 d9 call 4000a0bc <_POSIX_Priority_To_core> 4000995c: 90 17 21 08 or %i4, 0x108, %o0 if ( !valid ) { 40009960: c2 0f bf ff ldub [ %fp + -1 ], %g1 40009964: 80 a0 60 00 cmp %g1, 0 40009968: 12 bf ff d4 bne 400098b8 4000996c: 84 17 21 08 or %i4, 0x108, %g2 return EINVAL; 40009970: 81 c7 e0 08 ret 40009974: 91 e8 20 16 restore %g0, 0x16, %o0 protocol = POSIX_MUTEX_PRIORITY_INHERIT; 40009978: 10 bf ff df b 400098f4 4000997c: 84 10 20 01 mov 1, %g2 break; 40009980: 10 bf ff dd b 400098f4 40009984: 84 10 20 02 mov 2, %g2 scheduler = NULL; 40009988: 84 10 20 00 clr %g2 priority = 0; 4000998c: 90 10 20 00 clr %o0 40009990: 10 bf ff ca b 400098b8 40009994: 92 10 20 00 clr %o1 =============================================================================== 40009c48 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 40009c48: 9d e3 bf 70 save %sp, -144, %sp POSIX_Mutex_Control *the_mutex; int error; int unlock_error; if ( old_ceiling == NULL ) { 40009c4c: 80 a6 a0 00 cmp %i2, 0 40009c50: 02 80 00 12 be 40009c98 40009c54: ba 10 20 16 mov 0x16, %i5 /* * Must acquire the mutex before we can change it's ceiling. * POSIX says block until we acquire it. */ error = pthread_mutex_lock( mutex ); 40009c58: 7f ff ff 50 call 40009998 40009c5c: 90 10 00 18 mov %i0, %o0 if ( error != 0 ) { 40009c60: ba 92 20 00 orcc %o0, 0, %i5 40009c64: 32 80 00 0d bne,a 40009c98 40009c68: ba 10 20 16 mov 0x16, %i5 return flags & POSIX_MUTEX_PROTOCOL_MASK; 40009c6c: c2 06 00 00 ld [ %i0 ], %g1 40009c70: 82 08 60 03 and %g1, 3, %g1 return EINVAL; } the_mutex = _POSIX_Mutex_Get( mutex ); if ( 40009c74: 80 a0 60 02 cmp %g1, 2 40009c78: 22 80 00 0a be,a 40009ca0 <== ALWAYS TAKEN 40009c7c: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 error = 0; } else { error = EINVAL; } } else { *old_ceiling = 0; 40009c80: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED error = 0; } unlock_error = pthread_mutex_unlock( mutex ); 40009c84: 90 10 00 18 mov %i0, %o0 40009c88: 40 00 00 7b call 40009e74 40009c8c: b0 10 00 1d mov %i5, %i0 _Assert( unlock_error == 0 ); (void) unlock_error; return error; } 40009c90: 81 c7 e0 08 ret 40009c94: 81 e8 00 00 restore 40009c98: 81 c7 e0 08 ret 40009c9c: 91 e8 00 1d restore %g0, %i5, %o0 *old_ceiling = _POSIX_Priority_From_core( scheduler, old_priority ); 40009ca0: d4 06 20 34 ld [ %i0 + 0x34 ], %o2 40009ca4: 39 10 00 6d sethi %hi(0x4001b400), %i4 40009ca8: 40 00 01 22 call 4000a130 <_POSIX_Priority_From_core> 40009cac: 90 17 21 08 or %i4, 0x108, %o0 ! 4001b508 <_Scheduler_Table> 40009cb0: d0 26 80 00 st %o0, [ %i2 ] new_priority = _POSIX_Priority_To_core( scheduler, prioceiling, &valid ); 40009cb4: 94 07 bf db add %fp, -37, %o2 40009cb8: 92 10 00 19 mov %i1, %o1 40009cbc: 40 00 01 00 call 4000a0bc <_POSIX_Priority_To_core> 40009cc0: 90 17 21 08 or %i4, 0x108, %o0 if ( valid ) { 40009cc4: c2 0f bf db ldub [ %fp + -37 ], %g1 40009cc8: 80 a0 60 00 cmp %g1, 0 40009ccc: 32 80 00 04 bne,a 40009cdc 40009cd0: c0 27 bf f0 clr [ %fp + -16 ] error = EINVAL; 40009cd4: 10 bf ff ec b 40009c84 40009cd8: ba 10 20 16 mov 0x16, %i5 40009cdc: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 if ( owner != NULL ) { 40009ce0: 80 a0 a0 00 cmp %g2, 0 40009ce4: 22 80 00 1b be,a 40009d50 <== NEVER TAKEN 40009ce8: d0 3e 20 30 std %o0, [ %i0 + 0x30 ] <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40009cec: 91 d0 20 09 ta 9 <== NOT EXECUTED _ISR_lock_ISR_disable( &queue_context->Lock_context.Lock_context ); 40009cf0: c2 27 bf dc st %g1, [ %fp + -36 ] RTEMS_INLINE_ROUTINE void _Priority_Node_set_priority( Priority_Node *node, Priority_Control priority ) { node->priority = priority; 40009cf4: d0 3e 20 30 std %o0, [ %i0 + 0x30 ] _Thread_Priority_changed( 40009cf8: b6 07 bf dc add %fp, -36, %i3 40009cfc: 94 10 20 00 clr %o2 40009d00: 96 10 00 1b mov %i3, %o3 40009d04: 92 06 20 20 add %i0, 0x20, %o1 40009d08: 40 00 13 3c call 4000e9f8 <_Thread_Priority_changed> 40009d0c: 90 10 00 02 mov %g2, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40009d10: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40009d14: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40009d18: 01 00 00 00 nop disable_level = cpu_self->thread_dispatch_disable_level; 40009d1c: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 cpu_self->thread_dispatch_disable_level = disable_level + 1; 40009d20: 82 00 60 01 inc %g1 40009d24: c2 21 a0 18 st %g1, [ %g6 + 0x18 ] return _Thread_Dispatch_disable_with_CPU( _Per_CPU_Get(), lock_context ); 40009d28: b8 10 00 06 mov %g6, %i4 _Thread_Priority_update( &queue_context ); 40009d2c: 40 00 13 3a call 4000ea14 <_Thread_Priority_update> 40009d30: 90 10 00 1b mov %i3, %o0 uint32_t disable_level = cpu_self->thread_dispatch_disable_level; 40009d34: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 if ( disable_level == 1 ) { 40009d38: 80 a0 60 01 cmp %g1, 1 40009d3c: 02 80 00 07 be 40009d58 <== ALWAYS TAKEN 40009d40: 82 00 7f ff add %g1, -1, %g1 cpu_self->thread_dispatch_disable_level = disable_level - 1; 40009d44: c2 27 20 18 st %g1, [ %i4 + 0x18 ] <== NOT EXECUTED unlock_error = pthread_mutex_unlock( mutex ); 40009d48: 10 bf ff d0 b 40009c88 <== NOT EXECUTED 40009d4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009d50: 10 bf ff f3 b 40009d1c <== NOT EXECUTED 40009d54: b6 07 bf dc add %fp, -36, %i3 <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40009d58: 91 d0 20 09 ta 9 <== NOT EXECUTED if ( 40009d5c: c4 0f 20 1c ldub [ %i4 + 0x1c ], %g2 40009d60: 80 a0 a0 00 cmp %g2, 0 40009d64: 12 80 00 07 bne 40009d80 <== NEVER TAKEN 40009d68: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = 0; 40009d6c: c0 27 20 18 clr [ %i4 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40009d70: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40009d74: 01 00 00 00 nop 40009d78: 10 bf ff c4 b 40009c88 40009d7c: 90 10 00 18 mov %i0, %o0 _Thread_Do_dispatch( cpu_self, level ); 40009d80: c2 27 bf d4 st %g1, [ %fp + -44 ] <== NOT EXECUTED 40009d84: 40 00 13 ab call 4000ec30 <_Thread_Do_dispatch> <== NOT EXECUTED 40009d88: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 40009d8c: 10 bf ff f9 b 40009d70 <== NOT EXECUTED 40009d90: c2 07 bf d4 ld [ %fp + -44 ], %g1 <== NOT EXECUTED =============================================================================== 40009e74 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 40009e74: 9d e3 bf 70 save %sp, -144, %sp Thread_queue_Context queue_context; Thread_Control *executing; Status_Control status; the_mutex = _POSIX_Mutex_Get( mutex ); POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags ); 40009e78: 80 a6 20 00 cmp %i0, 0 40009e7c: 02 80 00 32 be 40009f44 40009e80: 05 25 87 04 sethi %hi(0x961c1000), %g2 40009e84: fa 06 00 00 ld [ %i0 ], %i5 40009e88: 82 1e 00 1d xor %i0, %i5, %g1 40009e8c: 84 10 a3 b8 or %g2, 0x3b8, %g2 40009e90: 82 18 40 02 xor %g1, %g2, %g1 40009e94: 80 88 7f f8 btst -8, %g1 40009e98: 12 80 00 26 bne 40009f30 40009e9c: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40009ea0: 91 d0 20 09 ta 9 <== NOT EXECUTED 40009ea4: c2 27 bf dc st %g1, [ %fp + -36 ] executing = _POSIX_Mutex_Acquire( the_mutex, &queue_context ); switch ( _POSIX_Mutex_Get_protocol( flags ) ) { 40009ea8: ba 8f 60 03 andcc %i5, 3, %i5 40009eac: 02 80 00 28 be 40009f4c 40009eb0: d0 01 a0 20 ld [ %g6 + 0x20 ], %o0 40009eb4: 80 a7 60 02 cmp %i5, 2 40009eb8: 12 80 00 0a bne 40009ee0 40009ebc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 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 ) ) { 40009ec0: 80 a2 00 01 cmp %o0, %g1 40009ec4: 22 80 00 37 be,a 40009fa0 <== ALWAYS TAKEN 40009ec8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40009ecc: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40009ed0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40009ed4: 01 00 00 00 nop 40009ed8: 81 c7 e0 08 ret 40009edc: 91 e8 20 01 restore %g0, 1, %o0 if ( !_POSIX_Mutex_Is_owner( the_mutex, executing ) ) { 40009ee0: 80 a2 00 01 cmp %o0, %g1 40009ee4: 12 bf ff fa bne 40009ecc 40009ee8: 01 00 00 00 nop nest_level = the_mutex->Recursive.nest_level; 40009eec: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 if ( nest_level > 0 ) { 40009ef0: 80 a0 60 00 cmp %g1, 0 40009ef4: 12 80 00 2e bne 40009fac <== NEVER TAKEN 40009ef8: 82 00 7f ff add %g1, -1, %g1 the_mutex->Recursive.Mutex.Queue.Queue.owner = owner; 40009efc: c0 26 20 10 clr [ %i0 + 0x10 ] heads = the_mutex->Recursive.Mutex.Queue.Queue.heads; 40009f00: d2 06 20 0c ld [ %i0 + 0xc ], %o1 if ( heads == NULL ) { 40009f04: 80 a2 60 00 cmp %o1, 0 40009f08: 02 80 00 2f be 40009fc4 40009f0c: 94 10 00 08 mov %o0, %o2 _Thread_queue_Surrender( 40009f10: 96 07 bf dc add %fp, -36, %o3 40009f14: 90 06 20 0c add %i0, 0xc, %o0 40009f18: 19 10 00 6f sethi %hi(0x4001bc00), %o4 40009f1c: b0 10 20 00 clr %i0 40009f20: 40 00 15 d0 call 4000f660 <_Thread_queue_Surrender> 40009f24: 98 13 21 54 or %o4, 0x154, %o4 ); break; } return _POSIX_Get_error( status ); } 40009f28: 81 c7 e0 08 ret 40009f2c: 81 e8 00 00 restore POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags ); 40009f30: 7f ff ff aa call 40009dd8 <_POSIX_Mutex_Auto_initialization> 40009f34: 90 10 00 18 mov %i0, %o0 40009f38: 80 a2 20 00 cmp %o0, 0 40009f3c: 12 bf ff d9 bne 40009ea0 40009f40: 01 00 00 00 nop 40009f44: 81 c7 e0 08 ret 40009f48: 91 e8 20 16 restore %g0, 0x16, %o0 if ( !_POSIX_Mutex_Is_owner( the_mutex, executing ) ) { 40009f4c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40009f50: 80 a2 00 01 cmp %o0, %g1 40009f54: 12 bf ff de bne 40009ecc 40009f58: 01 00 00 00 nop nest_level = the_mutex->Recursive.nest_level; 40009f5c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 if ( nest_level > 0 ) { 40009f60: 80 a0 60 00 cmp %g1, 0 40009f64: 12 80 00 12 bne 40009fac <== NEVER TAKEN 40009f68: 82 00 7f ff add %g1, -1, %g1 the_mutex->Recursive.Mutex.Queue.Queue.owner = owner; 40009f6c: c0 26 20 10 clr [ %i0 + 0x10 ] heads = the_mutex->Recursive.Mutex.Queue.Queue.heads; 40009f70: d2 06 20 0c ld [ %i0 + 0xc ], %o1 if ( heads == NULL ) { 40009f74: 80 a2 60 00 cmp %o1, 0 40009f78: 02 80 00 13 be 40009fc4 <== ALWAYS TAKEN 40009f7c: 94 10 00 08 mov %o0, %o2 _Thread_queue_Surrender( 40009f80: 96 07 bf dc add %fp, -36, %o3 <== NOT EXECUTED 40009f84: 90 06 20 0c add %i0, 0xc, %o0 <== NOT EXECUTED 40009f88: 19 10 00 6f sethi %hi(0x4001bc00), %o4 <== NOT EXECUTED 40009f8c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40009f90: 40 00 15 b4 call 4000f660 <_Thread_queue_Surrender> <== NOT EXECUTED 40009f94: 98 13 21 7c or %o4, 0x17c, %o4 <== NOT EXECUTED 40009f98: 81 c7 e0 08 ret <== NOT EXECUTED 40009f9c: 81 e8 00 00 restore <== NOT EXECUTED return STATUS_NOT_OWNER; } nest_level = the_mutex->Recursive.nest_level; if ( nest_level > 0 ) { 40009fa0: 80 a0 60 00 cmp %g1, 0 40009fa4: 02 80 00 0d be 40009fd8 <== ALWAYS TAKEN 40009fa8: 82 00 7f ff add %g1, -1, %g1 the_mutex->Recursive.nest_level = nest_level - 1; 40009fac: c2 26 20 18 st %g1, [ %i0 + 0x18 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40009fb0: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40009fb4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40009fb8: 01 00 00 00 nop <== NOT EXECUTED 40009fbc: 81 c7 e0 08 ret <== NOT EXECUTED 40009fc0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40009fc4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40009fc8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40009fcc: 01 00 00 00 nop 40009fd0: 81 c7 e0 08 ret 40009fd4: 91 e8 20 00 restore %g0, 0, %o0 40009fd8: c0 27 bf f0 clr [ %fp + -16 ] _Thread_Resource_count_decrement( executing ); _Thread_queue_Context_clear_priority_updates( queue_context ); _Thread_Wait_acquire_default_critical( executing, &lock_context ); _Thread_Priority_remove( 40009fdc: b6 06 20 20 add %i0, 0x20, %i3 40009fe0: 94 07 bf dc add %fp, -36, %o2 40009fe4: 40 00 12 80 call 4000e9e4 <_Thread_Priority_remove> 40009fe8: 92 10 00 1b mov %i3, %o1 disable_level = cpu_self->thread_dispatch_disable_level; 40009fec: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 cpu_self->thread_dispatch_disable_level = disable_level + 1; 40009ff0: 82 00 60 01 inc %g1 40009ff4: c2 21 a0 18 st %g1, [ %g6 + 0x18 ] ); _Thread_Wait_release_default_critical( executing, &lock_context ); cpu_self = _Thread_queue_Dispatch_disable( queue_context ); heads = the_mutex->Recursive.Mutex.Queue.Queue.heads; 40009ff8: d0 06 20 0c ld [ %i0 + 0xc ], %o0 if ( heads != NULL ) { 40009ffc: 80 a2 20 00 cmp %o0, 0 4000a000: 02 80 00 2a be 4000a0a8 4000a004: ba 10 00 06 mov %g6, %i5 const Thread_queue_Operations *operations; Thread_Control *new_owner; operations = POSIX_MUTEX_PRIORITY_CEILING_TQ_OPERATIONS; new_owner = ( *operations->first )( heads ); 4000a008: 39 10 00 6f sethi %hi(0x4001bc00), %i4 4000a00c: b8 17 21 68 or %i4, 0x168, %i4 ! 4001bd68 <_Thread_queue_Operations_priority> 4000a010: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 4000a014: 9f c0 40 00 call %g1 4000a018: 01 00 00 00 nop the_mutex->Recursive.Mutex.Queue.Queue.owner = owner; 4000a01c: d0 26 20 10 st %o0, [ %i0 + 0x10 ] new_owner = ( *operations->first )( heads ); 4000a020: b4 10 00 08 mov %o0, %i2 _POSIX_Mutex_Set_owner( the_mutex, new_owner ); _Thread_Resource_count_increment( new_owner ); _Thread_Priority_add( 4000a024: 94 07 bf dc add %fp, -36, %o2 4000a028: 40 00 12 6a call 4000e9d0 <_Thread_Priority_add> 4000a02c: 92 10 00 1b mov %i3, %o1 new_owner, &the_mutex->Priority_ceiling, queue_context ); _Thread_queue_Extract_critical( 4000a030: 96 07 bf dc add %fp, -36, %o3 4000a034: 94 10 00 1a mov %i2, %o2 4000a038: 92 10 00 1c mov %i4, %o1 4000a03c: 40 00 15 48 call 4000f55c <_Thread_queue_Extract_critical> 4000a040: 90 06 20 0c add %i0, 0xc, %o0 } else { _POSIX_Mutex_Set_owner( the_mutex, NULL ); _POSIX_Mutex_Release( the_mutex, queue_context ); } _Thread_Priority_update( queue_context ); 4000a044: 40 00 12 74 call 4000ea14 <_Thread_Priority_update> 4000a048: 90 07 bf dc add %fp, -36, %o0 uint32_t disable_level = cpu_self->thread_dispatch_disable_level; 4000a04c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 if ( disable_level == 1 ) { 4000a050: 80 a0 60 01 cmp %g1, 1 4000a054: 02 80 00 06 be 4000a06c <== ALWAYS TAKEN 4000a058: 82 00 7f ff add %g1, -1, %g1 cpu_self->thread_dispatch_disable_level = disable_level - 1; 4000a05c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000a060: c2 27 60 18 st %g1, [ %i5 + 0x18 ] <== NOT EXECUTED 4000a064: 81 c7 e0 08 ret <== NOT EXECUTED 4000a068: 81 e8 00 00 restore <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000a06c: 91 d0 20 09 ta 9 <== NOT EXECUTED if ( 4000a070: c4 0f 60 1c ldub [ %i5 + 0x1c ], %g2 4000a074: 80 a0 a0 00 cmp %g2, 0 4000a078: 12 80 00 07 bne 4000a094 4000a07c: 92 10 00 01 mov %g1, %o1 cpu_self->thread_dispatch_disable_level = 0; 4000a080: c0 27 60 18 clr [ %i5 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000a084: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000a088: 01 00 00 00 nop 4000a08c: 81 c7 e0 08 ret 4000a090: 91 e8 20 00 restore %g0, 0, %o0 _Thread_Do_dispatch( cpu_self, level ); 4000a094: c2 27 bf d4 st %g1, [ %fp + -44 ] 4000a098: 40 00 12 e6 call 4000ec30 <_Thread_Do_dispatch> 4000a09c: 90 10 00 1d mov %i5, %o0 4000a0a0: 10 bf ff f9 b 4000a084 4000a0a4: c2 07 bf d4 ld [ %fp + -44 ], %g1 the_mutex->Recursive.Mutex.Queue.Queue.owner = owner; 4000a0a8: c0 26 20 10 clr [ %i0 + 0x10 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000a0ac: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000a0b0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000a0b4: 01 00 00 00 nop 4000a0b8: 30 bf ff e3 b,a 4000a044 =============================================================================== 40005e28 : int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { if ( attr == NULL || !attr->is_initialized || type == NULL ) 40005e28: 80 a2 20 00 cmp %o0, 0 40005e2c: 02 80 00 0c be 40005e5c 40005e30: 01 00 00 00 nop 40005e34: c2 02 00 00 ld [ %o0 ], %g1 40005e38: 80 a0 60 00 cmp %g1, 0 40005e3c: 02 80 00 08 be 40005e5c 40005e40: 80 a2 60 00 cmp %o1, 0 40005e44: 02 80 00 06 be 40005e5c <== NEVER TAKEN 40005e48: 01 00 00 00 nop return EINVAL; *type = attr->type; 40005e4c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40005e50: c2 22 40 00 st %g1, [ %o1 ] return 0; 40005e54: 81 c3 e0 08 retl 40005e58: 90 10 20 00 clr %o0 } 40005e5c: 81 c3 e0 08 retl 40005e60: 90 10 20 16 mov 0x16, %o0 =============================================================================== 400096e4 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 400096e4: 82 92 20 00 orcc %o0, 0, %g1 400096e8: 02 80 00 0b be 40009714 400096ec: 90 10 20 16 mov 0x16, %o0 400096f0: c4 00 40 00 ld [ %g1 ], %g2 400096f4: 80 a0 a0 00 cmp %g2, 0 400096f8: 02 80 00 07 be 40009714 400096fc: 80 a2 60 01 cmp %o1, 1 return EINVAL; switch ( pshared ) { 40009700: 18 80 00 05 bgu 40009714 <== NEVER TAKEN 40009704: 01 00 00 00 nop case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 40009708: d2 20 60 04 st %o1, [ %g1 + 4 ] return 0; 4000970c: 81 c3 e0 08 retl 40009710: 90 10 20 00 clr %o0 default: return EINVAL; } } 40009714: 81 c3 e0 08 retl 40009718: 01 00 00 00 nop =============================================================================== 40005eb4 : int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { if ( !attr || !attr->is_initialized ) 40005eb4: 82 92 20 00 orcc %o0, 0, %g1 40005eb8: 02 80 00 0b be 40005ee4 40005ebc: 90 10 20 16 mov 0x16, %o0 40005ec0: c4 00 40 00 ld [ %g1 ], %g2 40005ec4: 80 a0 a0 00 cmp %g2, 0 40005ec8: 02 80 00 07 be 40005ee4 <== NEVER TAKEN 40005ecc: 80 a2 60 03 cmp %o1, 3 return EINVAL; switch ( type ) { 40005ed0: 18 80 00 05 bgu 40005ee4 40005ed4: 01 00 00 00 nop case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 40005ed8: d2 20 60 10 st %o1, [ %g1 + 0x10 ] return 0; 40005edc: 81 c3 e0 08 retl 40005ee0: 90 10 20 00 clr %o0 default: return EINVAL; } } 40005ee4: 81 c3 e0 08 retl 40005ee8: 01 00 00 00 nop =============================================================================== 4000846c : #include int pthread_rwlock_destroy( pthread_rwlock_t *_rwlock ) { 4000846c: 9d e3 bf a0 save %sp, -96, %sp POSIX_RWLock_Control *the_rwlock; Thread_queue_Context queue_context; the_rwlock = _POSIX_RWLock_Get( _rwlock ); POSIX_RWLOCK_VALIDATE_OBJECT( the_rwlock ); 40008470: 80 a6 20 00 cmp %i0, 0 40008474: 02 80 00 16 be 400084cc 40008478: 03 25 88 76 sethi %hi(0x9621d800), %g1 4000847c: c4 06 00 00 ld [ %i0 ], %g2 40008480: 82 10 62 bd or %g1, 0x2bd, %g1 40008484: 82 1e 00 01 xor %i0, %g1, %g1 40008488: 80 a0 40 02 cmp %g1, %g2 4000848c: 12 80 00 0b bne 400084b8 40008490: 01 00 00 00 nop 40008494: 91 d0 20 09 ta 9 <== NOT EXECUTED /* * If there is at least one thread waiting, then do not delete it. */ if ( !_Thread_queue_Is_empty( &the_rwlock->RWLock.Queue.Queue ) ) { 40008498: c4 06 20 0c ld [ %i0 + 0xc ], %g2 4000849c: 80 a0 a0 00 cmp %g2, 0 400084a0: 22 80 00 0d be,a 400084d4 400084a4: c4 06 00 00 ld [ %i0 ], %g2 __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400084a8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400084ac: 01 00 00 00 nop _CORE_RWLock_Release( &the_rwlock->RWLock, &queue_context ); return EBUSY; 400084b0: 81 c7 e0 08 ret 400084b4: 91 e8 20 10 restore %g0, 0x10, %o0 POSIX_RWLOCK_VALIDATE_OBJECT( the_rwlock ); 400084b8: 40 00 00 5c call 40008628 <_POSIX_RWLock_Auto_initialization> 400084bc: 90 10 00 18 mov %i0, %o0 400084c0: 80 a2 20 00 cmp %o0, 0 400084c4: 12 bf ff f4 bne 40008494 400084c8: 01 00 00 00 nop 400084cc: 81 c7 e0 08 ret 400084d0: 91 e8 20 16 restore %g0, 0x16, %o0 /* * POSIX doesn't require behavior when it is locked. */ the_rwlock->flags = ~the_rwlock->flags; 400084d4: 84 38 00 02 xnor %g0, %g2, %g2 <== NOT EXECUTED 400084d8: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED 400084dc: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400084e0: 01 00 00 00 nop _CORE_RWLock_Release( &the_rwlock->RWLock, &queue_context ); return 0; } 400084e4: 81 c7 e0 08 ret 400084e8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 400084ec : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 400084ec: 9d e3 bf a0 save %sp, -96, %sp POSIX_RWLock_Control *the_rwlock; the_rwlock = _POSIX_RWLock_Get( rwlock ); if ( the_rwlock == NULL ) { 400084f0: 90 96 20 00 orcc %i0, 0, %o0 400084f4: 02 80 00 14 be 40008544 400084f8: 80 a6 60 00 cmp %i1, 0 return EINVAL; } if ( attr != NULL ) { 400084fc: 02 80 00 0a be 40008524 40008500: 03 25 88 76 sethi %hi(0x9621d800), %g1 if ( !attr->is_initialized ) { 40008504: c2 06 40 00 ld [ %i1 ], %g1 40008508: 80 a0 60 00 cmp %g1, 0 4000850c: 02 80 00 0c be 4000853c <== NEVER TAKEN 40008510: b0 10 20 16 mov 0x16, %i0 return EINVAL; } if ( !_POSIX_Is_valid_pshared( attr->process_shared ) ) { 40008514: c2 06 60 04 ld [ %i1 + 4 ], %g1 40008518: 80 a0 60 01 cmp %g1, 1 4000851c: 18 80 00 08 bgu 4000853c 40008520: 03 25 88 76 sethi %hi(0x9621d800), %g1 return EINVAL; } } the_rwlock->flags = (uintptr_t) the_rwlock ^ POSIX_RWLOCK_MAGIC; 40008524: 82 10 62 bd or %g1, 0x2bd, %g1 ! 9621dabd 40008528: 82 1a 00 01 xor %o0, %g1, %g1 4000852c: c2 22 00 00 st %g1, [ %o0 ] _CORE_RWLock_Initialize( &the_rwlock->RWLock ); return 0; 40008530: b0 10 20 00 clr %i0 _CORE_RWLock_Initialize( &the_rwlock->RWLock ); 40008534: 40 00 04 ef call 400098f0 <_CORE_RWLock_Initialize> 40008538: 90 02 20 04 add %o0, 4, %o0 return 0; 4000853c: 81 c7 e0 08 ret 40008540: 81 e8 00 00 restore return EINVAL; 40008544: b0 10 20 16 mov 0x16, %i0 } 40008548: 81 c7 e0 08 ret 4000854c: 81 e8 00 00 restore =============================================================================== 40008fe8 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 40008fe8: 82 92 20 00 orcc %o0, 0, %g1 40008fec: 02 80 00 0b be 40009018 40008ff0: 90 10 20 16 mov 0x16, %o0 return EINVAL; if ( !attr->is_initialized ) 40008ff4: c4 00 40 00 ld [ %g1 ], %g2 40008ff8: 80 a0 a0 00 cmp %g2, 0 40008ffc: 02 80 00 07 be 40009018 40009000: 80 a2 60 01 cmp %o1, 1 return EINVAL; switch ( pshared ) { 40009004: 18 80 00 05 bgu 40009018 <== NEVER TAKEN 40009008: 01 00 00 00 nop case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 4000900c: d2 20 60 04 st %o1, [ %g1 + 4 ] return 0; 40009010: 81 c3 e0 08 retl 40009014: 90 10 20 00 clr %o0 default: return EINVAL; } } 40009018: 81 c3 e0 08 retl 4000901c: 01 00 00 00 nop =============================================================================== 40007f90 : int pthread_setcancelstate( int state, int *oldstate ) { 40007f90: 9d e3 bf a0 save %sp, -96, %sp Thread_Life_state new_life_protection; Thread_Life_state previous_life_state; if ( _ISR_Is_in_progress() ) { 40007f94: 40 00 06 5c call 40009904 <_ISR_Is_in_progress> 40007f98: 01 00 00 00 nop 40007f9c: 80 a2 20 00 cmp %o0, 0 40007fa0: 12 80 00 10 bne 40007fe0 40007fa4: 82 10 20 47 mov 0x47, %g1 return EPROTO; } if ( state == PTHREAD_CANCEL_DISABLE ) { 40007fa8: 80 a6 20 01 cmp %i0, 1 40007fac: 02 80 00 12 be 40007ff4 <== NEVER TAKEN 40007fb0: 80 a6 20 00 cmp %i0, 0 new_life_protection = THREAD_LIFE_PROTECTED; } else if ( state == PTHREAD_CANCEL_ENABLE ) { 40007fb4: 12 80 00 0b bne 40007fe0 40007fb8: 82 10 20 16 mov 0x16, %g1 new_life_protection = 0; } else { return EINVAL; } previous_life_state = _Thread_Set_life_protection( new_life_protection ); 40007fbc: 40 00 17 80 call 4000ddbc <_Thread_Set_life_protection> 40007fc0: 01 00 00 00 nop if ( oldstate != NULL ) { 40007fc4: 80 a6 60 00 cmp %i1, 0 40007fc8: 02 80 00 06 be 40007fe0 40007fcc: 82 10 20 00 clr %g1 if ( ( previous_life_state & THREAD_LIFE_PROTECTED ) != 0 ) { 40007fd0: 80 8a 20 01 btst 1, %o0 40007fd4: 12 80 00 05 bne 40007fe8 <== NEVER TAKEN 40007fd8: 84 10 20 01 mov 1, %g2 *oldstate = PTHREAD_CANCEL_DISABLE; } else { *oldstate = PTHREAD_CANCEL_ENABLE; 40007fdc: c0 26 40 00 clr [ %i1 ] } } return 0; } 40007fe0: 81 c7 e0 08 ret 40007fe4: 91 e8 00 01 restore %g0, %g1, %o0 *oldstate = PTHREAD_CANCEL_DISABLE; 40007fe8: c4 26 40 00 st %g2, [ %i1 ] <== NOT EXECUTED } 40007fec: 81 c7 e0 08 ret <== NOT EXECUTED 40007ff0: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED previous_life_state = _Thread_Set_life_protection( new_life_protection ); 40007ff4: 40 00 17 72 call 4000ddbc <_Thread_Set_life_protection> <== NOT EXECUTED 40007ff8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED if ( oldstate != NULL ) { 40007ffc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40008000: 12 bf ff f4 bne 40007fd0 <== NOT EXECUTED 40008004: 82 10 20 00 clr %g1 <== NOT EXECUTED 40008008: 30 bf ff f6 b,a 40007fe0 <== NOT EXECUTED =============================================================================== 4000800c : int pthread_setcanceltype( int type, int *oldtype ) { 4000800c: 9d e3 bf a0 save %sp, -96, %sp Thread_Life_state set_life_state; Thread_Life_state previous_life_state; if ( _ISR_Is_in_progress() ) { 40008010: 40 00 06 3d call 40009904 <_ISR_Is_in_progress> 40008014: 01 00 00 00 nop 40008018: 80 a2 20 00 cmp %o0, 0 4000801c: 12 80 00 12 bne 40008064 40008020: 82 10 20 47 mov 0x47, %g1 return EPROTO; } if ( type == PTHREAD_CANCEL_DEFERRED ) { 40008024: 80 a6 20 00 cmp %i0, 0 40008028: 02 80 00 11 be 4000806c 4000802c: 82 10 20 16 mov 0x16, %g1 set_life_state = THREAD_LIFE_CHANGE_DEFERRED; } else if ( type == PTHREAD_CANCEL_ASYNCHRONOUS ) { 40008030: 80 a6 20 01 cmp %i0, 1 40008034: 12 80 00 0c bne 40008064 40008038: 92 10 20 00 clr %o1 set_life_state = 0; } else { return EINVAL; } previous_life_state = _Thread_Change_life( 4000803c: 94 10 20 00 clr %o2 40008040: 40 00 17 33 call 4000dd0c <_Thread_Change_life> 40008044: 90 10 20 08 mov 8, %o0 THREAD_LIFE_CHANGE_DEFERRED, set_life_state, 0 ); if ( oldtype != NULL ) { 40008048: 80 a6 60 00 cmp %i1, 0 4000804c: 02 80 00 06 be 40008064 40008050: 82 10 20 00 clr %g1 if ( ( previous_life_state & THREAD_LIFE_CHANGE_DEFERRED ) != 0 ) { 40008054: 80 8a 20 08 btst 8, %o0 40008058: 12 80 00 07 bne 40008074 <== ALWAYS TAKEN 4000805c: 84 10 20 01 mov 1, %g2 *oldtype = PTHREAD_CANCEL_DEFERRED; } else { *oldtype = PTHREAD_CANCEL_ASYNCHRONOUS; 40008060: c4 26 40 00 st %g2, [ %i1 ] <== NOT EXECUTED } } return 0; } 40008064: 81 c7 e0 08 ret 40008068: 91 e8 00 01 restore %g0, %g1, %o0 set_life_state = THREAD_LIFE_CHANGE_DEFERRED; 4000806c: 10 bf ff f4 b 4000803c 40008070: 92 10 20 08 mov 8, %o1 *oldtype = PTHREAD_CANCEL_DEFERRED; 40008074: c0 26 40 00 clr [ %i1 ] } 40008078: 81 c7 e0 08 ret 4000807c: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 40006528 : #include #include int pthread_setname_np( pthread_t thread, const char *name ) { 40006528: 9d e3 bf 98 save %sp, -104, %sp _RTEMS_Lock_allocator(); 4000652c: 40 00 00 e1 call 400068b0 <_RTEMS_Lock_allocator> 40006530: 01 00 00 00 nop Thread_Control *the_thread; ISR_lock_Context lock_context; Status_Control status; _Objects_Allocator_lock(); the_thread = _Thread_Get( thread, &lock_context ); 40006534: 92 07 bf fc add %fp, -4, %o1 40006538: 40 00 0d aa call 40009be0 <_Thread_Get> 4000653c: 90 10 00 18 mov %i0, %o0 if ( the_thread == NULL ) { 40006540: 80 a2 20 00 cmp %o0, 0 40006544: 02 80 00 0c be 40006574 40006548: 01 00 00 00 nop register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000654c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006550: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006554: 01 00 00 00 nop _Objects_Allocator_unlock(); return ESRCH; } _ISR_lock_ISR_enable( &lock_context ); status = _Thread_Set_name( the_thread, name ); 40006558: 40 00 0e b6 call 4000a030 <_Thread_Set_name> 4000655c: 92 10 00 19 mov %i1, %o1 _RTEMS_Unlock_allocator(); 40006560: 40 00 00 d9 call 400068c4 <_RTEMS_Unlock_allocator> 40006564: b0 10 00 09 mov %o1, %i0 return _POSIX_Get_by_name_error_table[ error ]; } RTEMS_INLINE_ROUTINE int _POSIX_Get_error( Status_Control status ) { return STATUS_GET_POSIX( status ); 40006568: b1 3e 20 08 sra %i0, 8, %i0 _Objects_Allocator_unlock(); return _POSIX_Get_error( status ); } 4000656c: 81 c7 e0 08 ret 40006570: 81 e8 00 00 restore 40006574: 40 00 00 d4 call 400068c4 <_RTEMS_Unlock_allocator> 40006578: b0 10 20 03 mov 3, %i0 return ESRCH; 4000657c: 81 c7 e0 08 ret 40006580: 81 e8 00 00 restore =============================================================================== 4000a944 : const struct sched_param *param #else struct sched_param *param #endif ) { 4000a944: 9d e3 bf 68 save %sp, -152, %sp Thread_Control *the_thread; Per_CPU_Control *cpu_self; Thread_queue_Context queue_context; int error; if ( param == NULL ) { 4000a948: 80 a6 a0 00 cmp %i2, 0 4000a94c: 02 80 00 0a be 4000a974 4000a950: b6 10 20 16 mov 0x16, %i3 return EINVAL; } error = _POSIX_Thread_Translate_sched_param( 4000a954: 96 07 bf d8 add %fp, -40, %o3 4000a958: 94 07 bf d4 add %fp, -44, %o2 4000a95c: 92 10 00 1a mov %i2, %o1 4000a960: 40 00 1f 38 call 40012640 <_POSIX_Thread_Translate_sched_param> 4000a964: 90 10 00 19 mov %i1, %o0 policy, param, &budget_algorithm, &budget_callout ); if ( error != 0 ) { 4000a968: b6 92 20 00 orcc %o0, 0, %i3 4000a96c: 02 80 00 04 be 4000a97c 4000a970: 90 10 00 18 mov %i0, %o0 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; } 4000a974: 81 c7 e0 08 ret 4000a978: 91 e8 00 1b restore %g0, %i3, %o0 4000a97c: c0 27 bf f0 clr [ %fp + -16 ] the_thread = _Thread_Get( thread, &queue_context.Lock_context.Lock_context ); 4000a980: 40 00 11 0c call 4000edb0 <_Thread_Get> 4000a984: 92 07 bf dc add %fp, -36, %o1 if ( the_thread == NULL ) { 4000a988: b0 92 20 00 orcc %o0, 0, %i0 4000a98c: 02 80 00 41 be 4000aa90 4000a990: ea 07 bf d4 ld [ %fp + -44 ], %l5 normal_prio = param->sched_priority; 4000a994: e0 06 80 00 ld [ %i2 ], %l0 error = _POSIX_Set_sched_param( 4000a998: e8 07 bf d8 ld [ %fp + -40 ], %l4 core_normal_prio = _POSIX_Priority_To_core( scheduler, normal_prio, &valid ); 4000a99c: 92 10 00 10 mov %l0, %o1 4000a9a0: 94 07 bf d3 add %fp, -45, %o2 4000a9a4: 23 10 00 6d sethi %hi(0x4001b400), %l1 4000a9a8: 7f ff fd c5 call 4000a0bc <_POSIX_Priority_To_core> 4000a9ac: 90 14 61 08 or %l1, 0x108, %o0 ! 4001b508 <_Scheduler_Table> if ( !valid ) { 4000a9b0: c2 0f bf d3 ldub [ %fp + -45 ], %g1 core_normal_prio = _POSIX_Priority_To_core( scheduler, normal_prio, &valid ); 4000a9b4: b8 10 00 08 mov %o0, %i4 if ( !valid ) { 4000a9b8: 80 a0 60 00 cmp %g1, 0 4000a9bc: 02 80 00 37 be 4000aa98 <== NEVER TAKEN 4000a9c0: ba 10 00 09 mov %o1, %i5 if ( policy == SCHED_SPORADIC ) { 4000a9c4: 80 a6 60 04 cmp %i1, 4 4000a9c8: 22 80 00 02 be,a 4000a9d0 4000a9cc: e0 06 a0 04 ld [ %i2 + 4 ], %l0 core_low_prio = _POSIX_Priority_To_core( scheduler, low_prio, &valid ); 4000a9d0: 94 07 bf d3 add %fp, -45, %o2 4000a9d4: 92 10 00 10 mov %l0, %o1 4000a9d8: 7f ff fd b9 call 4000a0bc <_POSIX_Priority_To_core> 4000a9dc: 90 14 61 08 or %l1, 0x108, %o0 if ( !valid ) { 4000a9e0: c2 0f bf d3 ldub [ %fp + -45 ], %g1 core_low_prio = _POSIX_Priority_To_core( scheduler, low_prio, &valid ); 4000a9e4: a4 10 00 08 mov %o0, %l2 if ( !valid ) { 4000a9e8: 80 a0 60 00 cmp %g1, 0 4000a9ec: 02 80 00 2b be 4000aa98 4000a9f0: a6 10 00 09 mov %o1, %l3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000a9f4: e2 06 21 5c ld [ %i0 + 0x15c ], %l1 _Watchdog_Per_CPU_remove_ticks( &api->Sporadic.Timer ); 4000a9f8: a0 04 60 08 add %l1, 8, %l0 _Watchdog_Remove( 4000a9fc: 11 10 00 7d sethi %hi(0x4001f400), %o0 4000aa00: 92 10 00 10 mov %l0, %o1 4000aa04: 40 00 19 22 call 40010e8c <_Watchdog_Remove> 4000aa08: 90 12 22 b8 or %o0, 0x2b8, %o0 4000aa0c: f8 3e 20 30 std %i4, [ %i0 + 0x30 ] if ( _Priority_Node_is_active( &api->Sporadic.Low_priority ) ) { 4000aa10: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 4000aa14: 80 a0 7f ff cmp %g1, -1 4000aa18: 02 80 00 3b be 4000ab04 4000aa1c: 92 06 20 20 add %i0, 0x20, %o1 _Thread_Priority_add( 4000aa20: 90 10 00 18 mov %i0, %o0 4000aa24: 40 00 0f eb call 4000e9d0 <_Thread_Priority_add> 4000aa28: 94 07 bf dc add %fp, -36, %o2 _Thread_Priority_remove( 4000aa2c: 94 07 bf dc add %fp, -36, %o2 4000aa30: 92 04 60 28 add %l1, 0x28, %o1 4000aa34: 40 00 0f ec call 4000e9e4 <_Thread_Priority_remove> 4000aa38: 90 10 00 18 mov %i0, %o0 4000aa3c: 82 10 3f ff mov -1, %g1 4000aa40: c2 24 60 34 st %g1, [ %l1 + 0x34 ] if ( policy == SCHED_SPORADIC ) { 4000aa44: 80 a6 60 04 cmp %i1, 4 the_thread->budget_algorithm = budget_algorithm; 4000aa48: ea 26 20 90 st %l5, [ %i0 + 0x90 ] the_thread->budget_callout = budget_callout; 4000aa4c: e8 26 20 94 st %l4, [ %i0 + 0x94 ] 4000aa50: e4 3c 60 38 std %l2, [ %l1 + 0x38 ] api->Sporadic.sched_ss_max_repl = param->sched_ss_max_repl; 4000aa54: c2 06 a0 28 ld [ %i2 + 0x28 ], %g1 api->Sporadic.sched_ss_repl_period = param->sched_ss_repl_period; 4000aa58: d4 1e a0 08 ldd [ %i2 + 8 ], %o2 4000aa5c: d8 1e a0 10 ldd [ %i2 + 0x10 ], %o4 api->Sporadic.sched_ss_init_budget = param->sched_ss_init_budget; 4000aa60: f8 1e a0 18 ldd [ %i2 + 0x18 ], %i4 4000aa64: c4 1e a0 20 ldd [ %i2 + 0x20 ], %g2 4000aa68: c4 3c 60 58 std %g2, [ %l1 + 0x58 ] api->Sporadic.sched_ss_repl_period = param->sched_ss_repl_period; 4000aa6c: d4 3c 60 40 std %o2, [ %l1 + 0x40 ] 4000aa70: d8 3c 60 48 std %o4, [ %l1 + 0x48 ] api->Sporadic.sched_ss_init_budget = param->sched_ss_init_budget; 4000aa74: f8 3c 60 50 std %i4, [ %l1 + 0x50 ] if ( policy == SCHED_SPORADIC ) { 4000aa78: 02 80 00 2e be 4000ab30 4000aa7c: c2 24 60 60 st %g1, [ %l1 + 0x60 ] rtems_configuration_get_ticks_per_timeslice(); 4000aa80: 03 10 00 6d sethi %hi(0x4001b400), %g1 the_thread->cpu_time_budget = 4000aa84: c2 00 60 38 ld [ %g1 + 0x38 ], %g1 ! 4001b438 4000aa88: 10 80 00 05 b 4000aa9c 4000aa8c: c2 26 20 8c st %g1, [ %i0 + 0x8c ] return ESRCH; 4000aa90: 10 bf ff b9 b 4000a974 4000aa94: b6 10 20 03 mov 3, %i3 return EINVAL; 4000aa98: b6 10 20 16 mov 0x16, %i3 <== NOT EXECUTED disable_level = cpu_self->thread_dispatch_disable_level; 4000aa9c: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = disable_level + 1; 4000aaa0: 82 00 60 01 inc %g1 <== NOT EXECUTED return _Thread_Dispatch_disable_with_CPU( _Per_CPU_Get(), lock_context ); 4000aaa4: ba 10 00 06 mov %g6, %i5 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = disable_level + 1; 4000aaa8: c2 21 a0 18 st %g1, [ %g6 + 0x18 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000aaac: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000aab0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000aab4: 01 00 00 00 nop _Thread_Priority_update( &queue_context ); 4000aab8: 40 00 0f d7 call 4000ea14 <_Thread_Priority_update> 4000aabc: 90 07 bf dc add %fp, -36, %o0 uint32_t disable_level = cpu_self->thread_dispatch_disable_level; 4000aac0: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 if ( disable_level == 1 ) { 4000aac4: 80 a0 60 01 cmp %g1, 1 4000aac8: 02 80 00 06 be 4000aae0 <== ALWAYS TAKEN 4000aacc: 82 00 7f ff add %g1, -1, %g1 } 4000aad0: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = disable_level - 1; 4000aad4: c2 27 60 18 st %g1, [ %i5 + 0x18 ] <== NOT EXECUTED 4000aad8: 81 c7 e0 08 ret <== NOT EXECUTED 4000aadc: 81 e8 00 00 restore <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000aae0: 91 d0 20 09 ta 9 <== NOT EXECUTED if ( 4000aae4: c4 0f 60 1c ldub [ %i5 + 0x1c ], %g2 4000aae8: 80 a0 a0 00 cmp %g2, 0 4000aaec: 12 80 00 0c bne 4000ab1c 4000aaf0: 92 10 00 01 mov %g1, %o1 cpu_self->thread_dispatch_disable_level = 0; 4000aaf4: c0 27 60 18 clr [ %i5 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000aaf8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000aafc: 01 00 00 00 nop 4000ab00: 30 bf ff 9d b,a 4000a974 _Thread_Priority_changed( 4000ab04: 96 07 bf dc add %fp, -36, %o3 4000ab08: 94 10 20 00 clr %o2 4000ab0c: 40 00 0f bb call 4000e9f8 <_Thread_Priority_changed> 4000ab10: 90 10 00 18 mov %i0, %o0 if ( policy == SCHED_SPORADIC ) { 4000ab14: 10 bf ff cd b 4000aa48 4000ab18: 80 a6 60 04 cmp %i1, 4 _Thread_Do_dispatch( cpu_self, level ); 4000ab1c: c2 27 bf cc st %g1, [ %fp + -52 ] 4000ab20: 40 00 10 44 call 4000ec30 <_Thread_Do_dispatch> 4000ab24: 90 10 00 1d mov %i5, %o0 4000ab28: 10 bf ff f4 b 4000aaf8 4000ab2c: c2 07 bf cc ld [ %fp + -52 ], %g1 _Timespec_To_ticks( &api->Sporadic.sched_ss_init_budget ); 4000ab30: 40 00 17 a7 call 400109cc <_Timespec_To_ticks> 4000ab34: 90 04 60 50 add %l1, 0x50, %o0 the_thread->cpu_time_budget = 4000ab38: d0 26 20 8c st %o0, [ %i0 + 0x8c ] _Watchdog_Per_CPU_insert_ticks( 4000ab3c: ba 10 00 06 mov %g6, %i5 4000ab40: 40 00 17 a3 call 400109cc <_Timespec_To_ticks> 4000ab44: 90 04 60 40 add %l1, 0x40, %o0 expire = ticks + cpu->Watchdog.ticks; 4000ab48: d4 1f 60 30 ldd [ %i5 + 0x30 ], %o2 _Watchdog_Insert(header, the_watchdog, expire); 4000ab4c: 86 82 c0 08 addcc %o3, %o0, %g3 4000ab50: 84 42 a0 00 addx %o2, 0, %g2 4000ab54: 96 10 00 03 mov %g3, %o3 4000ab58: 94 10 00 02 mov %g2, %o2 4000ab5c: 92 10 00 10 mov %l0, %o1 4000ab60: 40 00 18 a3 call 40010dec <_Watchdog_Insert> 4000ab64: 90 07 60 38 add %i5, 0x38, %o0 4000ab68: 30 bf ff cd b,a 4000aa9c =============================================================================== 4000ab6c : #include #include #include int pthread_setschedprio( pthread_t thread, int prio ) { 4000ab6c: 9d e3 bf 70 save %sp, -144, %sp Priority_Control new_priority; bool valid; _Thread_queue_Context_initialize( &queue_context ); _Thread_queue_Context_clear_priority_updates( &queue_context ); the_thread = _Thread_Get( thread, &queue_context.Lock_context.Lock_context ); 4000ab70: 90 10 00 18 mov %i0, %o0 4000ab74: c0 27 bf f0 clr [ %fp + -16 ] 4000ab78: 92 07 bf dc add %fp, -36, %o1 4000ab7c: 40 00 10 8d call 4000edb0 <_Thread_Get> 4000ab80: b0 10 20 03 mov 3, %i0 if ( the_thread == NULL ) { 4000ab84: 80 a2 20 00 cmp %o0, 0 4000ab88: 02 80 00 1f be 4000ac04 4000ab8c: ba 10 00 08 mov %o0, %i5 _Thread_Wait_acquire_critical( the_thread, &queue_context ); scheduler = _Thread_Scheduler_get_home( the_thread ); new_priority = _POSIX_Priority_To_core( scheduler, prio, &valid ); 4000ab90: 94 07 bf db add %fp, -37, %o2 4000ab94: 92 10 00 19 mov %i1, %o1 4000ab98: 11 10 00 6d sethi %hi(0x4001b400), %o0 4000ab9c: 7f ff fd 48 call 4000a0bc <_POSIX_Priority_To_core> 4000aba0: 90 12 21 08 or %o0, 0x108, %o0 ! 4001b508 <_Scheduler_Table> if ( !valid ) { 4000aba4: c2 0f bf db ldub [ %fp + -37 ], %g1 4000aba8: 80 a0 60 00 cmp %g1, 0 4000abac: 02 80 00 18 be 4000ac0c 4000abb0: 96 07 bf dc add %fp, -36, %o3 4000abb4: d0 3f 60 30 std %o0, [ %i5 + 0x30 ] _Thread_Priority_changed( 4000abb8: 92 07 60 20 add %i5, 0x20, %o1 4000abbc: 90 10 00 1d mov %i5, %o0 4000abc0: 40 00 0f 8e call 4000e9f8 <_Thread_Priority_changed> 4000abc4: 94 10 20 01 mov 1, %o2 disable_level = cpu_self->thread_dispatch_disable_level; 4000abc8: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = disable_level + 1; 4000abcc: 82 00 60 01 inc %g1 <== NOT EXECUTED return _Thread_Dispatch_disable_with_CPU( _Per_CPU_Get(), lock_context ); 4000abd0: ba 10 00 06 mov %g6, %i5 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = disable_level + 1; 4000abd4: c2 21 a0 18 st %g1, [ %g6 + 0x18 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000abd8: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000abdc: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000abe0: 01 00 00 00 nop ); cpu_self = _Thread_queue_Dispatch_disable( &queue_context ); _Thread_Wait_release( the_thread, &queue_context ); _Thread_Priority_update( &queue_context ); 4000abe4: 40 00 0f 8c call 4000ea14 <_Thread_Priority_update> 4000abe8: 90 07 bf dc add %fp, -36, %o0 uint32_t disable_level = cpu_self->thread_dispatch_disable_level; 4000abec: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 if ( disable_level == 1 ) { 4000abf0: 80 a0 60 01 cmp %g1, 1 4000abf4: 02 80 00 0b be 4000ac20 <== ALWAYS TAKEN 4000abf8: 82 00 7f ff add %g1, -1, %g1 cpu_self->thread_dispatch_disable_level = disable_level - 1; 4000abfc: c2 27 60 18 st %g1, [ %i5 + 0x18 ] <== NOT EXECUTED _Thread_Dispatch_enable( cpu_self ); return 0; 4000ac00: b0 10 20 00 clr %i0 <== NOT EXECUTED } 4000ac04: 81 c7 e0 08 ret 4000ac08: 81 e8 00 00 restore register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 4000ac0c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000ac10: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000ac14: 01 00 00 00 nop return EINVAL; 4000ac18: 81 c7 e0 08 ret 4000ac1c: 91 e8 20 16 restore %g0, 0x16, %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000ac20: 91 d0 20 09 ta 9 <== NOT EXECUTED if ( 4000ac24: c4 0f 60 1c ldub [ %i5 + 0x1c ], %g2 4000ac28: 80 a0 a0 00 cmp %g2, 0 4000ac2c: 12 80 00 07 bne 4000ac48 <== NEVER TAKEN 4000ac30: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED cpu_self->thread_dispatch_disable_level = 0; 4000ac34: c0 27 60 18 clr [ %i5 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000ac38: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000ac3c: 01 00 00 00 nop return 0; 4000ac40: 81 c7 e0 08 ret 4000ac44: 91 e8 20 00 restore %g0, 0, %o0 _Thread_Do_dispatch( cpu_self, level ); 4000ac48: c2 27 bf d4 st %g1, [ %fp + -44 ] <== NOT EXECUTED 4000ac4c: 40 00 0f f9 call 4000ec30 <_Thread_Do_dispatch> <== NOT EXECUTED 4000ac50: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 4000ac54: 10 bf ff f9 b 4000ac38 <== NOT EXECUTED 4000ac58: c2 07 bf d4 ld [ %fp + -44 ], %g1 <== NOT EXECUTED =============================================================================== 400067e8 : int pthread_setspecific( pthread_key_t key, const void *value ) { 400067e8: 9d e3 bf 98 save %sp, -104, %sp 400067ec: ba 10 00 18 mov %i0, %i5 Thread_Control *executing; int eno; executing = _Thread_Get_executing(); if ( value != NULL ) { 400067f0: 80 a6 60 00 cmp %i1, 0 400067f4: 02 80 00 52 be 4000693c 400067f8: f8 01 a0 20 ld [ %g6 + 0x20 ], %i4 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400067fc: 91 d0 20 09 ta 9 <== NOT EXECUTED return &RB_ROOT( the_rbtree ); 40006800: b6 07 21 60 add %i4, 0x160, %i3 link = _RBTree_Root_const_reference( the_rbtree ); 40006804: 86 10 00 1b mov %i3, %g3 while ( *link != NULL ) { 40006808: c4 00 c0 00 ld [ %g3 ], %g2 4000680c: 80 a0 a0 00 cmp %g2, 0 40006810: 02 80 00 0d be 40006844 40006814: 86 00 bf f8 add %g2, -8, %g3 return *the_left == the_right->key; 40006818: c8 00 e0 18 ld [ %g3 + 0x18 ], %g4 if ( ( *equal )( key, parent ) ) { 4000681c: 80 a7 40 04 cmp %i5, %g4 40006820: 22 80 00 31 be,a 400068e4 40006824: f2 20 e0 20 st %i1, [ %g3 + 0x20 ] } else if ( ( *less )( key, parent ) ) { 40006828: 1a bf ff f8 bcc 40006808 <== ALWAYS TAKEN 4000682c: 86 00 a0 04 add %g2, 4, %g3 return &RB_LEFT( the_node, Node ); 40006830: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED while ( *link != NULL ) { 40006834: c4 00 c0 00 ld [ %g3 ], %g2 <== NOT EXECUTED 40006838: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000683c: 12 bf ff f7 bne 40006818 <== NOT EXECUTED 40006840: 86 00 bf f8 add %g2, -8, %g3 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006844: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006848: 01 00 00 00 nop _RTEMS_Lock_allocator(); 4000684c: 40 00 02 b1 call 40007310 <_RTEMS_Lock_allocator> 40006850: b0 10 20 16 mov 0x16, %i0 ! 16 <_TLS_Alignment+0x15> return (POSIX_Keys_Control *) 40006854: 90 10 00 1d mov %i5, %o0 40006858: 13 10 00 68 sethi %hi(0x4001a000), %o1 4000685c: 40 00 0b e4 call 400097ec <_Objects_Get_no_protection> 40006860: 92 12 63 58 or %o1, 0x358, %o1 ! 4001a358 <_POSIX_Keys_Information> if ( the_key != NULL ) { 40006864: b4 92 20 00 orcc %o0, 0, %i2 40006868: 02 80 00 31 be 4000692c 4000686c: 01 00 00 00 nop key_value_pair = _POSIX_Keys_Key_value_allocate(); 40006870: 7f ff ff ce call 400067a8 <_POSIX_Keys_Key_value_allocate> 40006874: b0 10 20 0c mov 0xc, %i0 ! c <_TLS_Alignment+0xb> if ( key_value_pair != NULL ) { 40006878: 80 a2 20 00 cmp %o0, 0 4000687c: 02 80 00 2c be 4000692c <== NEVER TAKEN 40006880: 88 10 00 08 mov %o0, %g4 old_last = tail->previous; 40006884: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1 return &the_chain->Tail.Node; 40006888: 84 06 a0 18 add %i2, 0x18, %g2 key_value_pair->key = key; 4000688c: fa 22 20 18 st %i5, [ %o0 + 0x18 ] _RBTree_Initialize_node( &key_value_pair->Lookup_node ); 40006890: b0 02 20 08 add %o0, 8, %i0 key_value_pair->thread = executing; 40006894: f8 22 20 1c st %i4, [ %o0 + 0x1c ] <== NOT EXECUTED key_value_pair->value = RTEMS_DECONST( void *, value ); 40006898: f2 22 20 20 st %i1, [ %o0 + 0x20 ] <== NOT EXECUTED the_node->next = tail; 4000689c: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED tail->previous = the_node; 400068a0: d0 26 a0 1c st %o0, [ %i2 + 0x1c ] <== NOT EXECUTED old_last->next = the_node; 400068a4: d0 20 40 00 st %o0, [ %g1 ] <== NOT EXECUTED the_node->previous = old_last; 400068a8: c2 22 20 04 st %g1, [ %o0 + 4 ] <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400068ac: 91 d0 20 09 ta 9 <== NOT EXECUTED parent = NULL; 400068b0: b8 10 20 00 clr %i4 link = _RBTree_Root_reference( the_rbtree ); 400068b4: 86 10 00 1b mov %i3, %g3 while ( *link != NULL ) { 400068b8: c4 00 c0 00 ld [ %g3 ], %g2 400068bc: 80 a0 a0 00 cmp %g2, 0 400068c0: 22 80 00 41 be,a 400069c4 400068c4: f8 21 20 10 st %i4, [ %g4 + 0x10 ] if ( ( *less )( key, parent ) ) { 400068c8: f8 00 a0 10 ld [ %g2 + 0x10 ], %i4 400068cc: 80 a7 40 1c cmp %i5, %i4 400068d0: 1a 80 00 03 bcc 400068dc <== ALWAYS TAKEN 400068d4: 86 00 a0 04 add %g2, 4, %g3 return &RB_LEFT( the_node, Node ); 400068d8: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED link = _RBTree_Root_const_reference( the_rbtree ); 400068dc: 10 bf ff f7 b 400068b8 400068e0: b8 10 00 02 mov %g2, %i4 __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400068e4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400068e8: 01 00 00 00 nop } else { eno = _POSIX_Keys_Delete_value( key, executing ); } return eno; } 400068ec: 81 c7 e0 08 ret 400068f0: 91 e8 20 00 restore %g0, 0, %o0 _RBTree_Extract( 400068f4: 40 00 0c 86 call 40009b0c <_RBTree_Extract> 400068f8: c2 27 bf fc st %g1, [ %fp + -4 ] register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 400068fc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006900: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006904: 01 00 00 00 nop next = the_node->next; 40006908: c4 07 00 00 ld [ %i4 ], %g2 previous = the_node->previous; 4000690c: c2 07 20 04 ld [ %i4 + 4 ], %g1 next->previous = previous; 40006910: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Freechain_Put( &_POSIX_Keys_Keypool, key_value_pair ); 40006914: 11 10 00 68 sethi %hi(0x4001a000), %o0 previous->next = next; 40006918: c4 20 40 00 st %g2, [ %g1 ] 4000691c: 92 10 00 1c mov %i4, %o1 eno = 0; 40006920: b0 10 20 00 clr %i0 40006924: 40 00 03 11 call 40007568 <_Freechain_Put> 40006928: 90 12 23 94 or %o0, 0x394, %o0 _RTEMS_Unlock_allocator(); 4000692c: 40 00 02 7e call 40007324 <_RTEMS_Unlock_allocator> 40006930: 01 00 00 00 nop return eno; 40006934: 81 c7 e0 08 ret 40006938: 81 e8 00 00 restore _RTEMS_Lock_allocator(); 4000693c: 40 00 02 75 call 40007310 <_RTEMS_Lock_allocator> 40006940: 01 00 00 00 nop return (POSIX_Keys_Control *) 40006944: 90 10 00 18 mov %i0, %o0 40006948: 13 10 00 68 sethi %hi(0x4001a000), %o1 eno = EINVAL; 4000694c: b0 10 20 16 mov 0x16, %i0 40006950: 40 00 0b a7 call 400097ec <_Objects_Get_no_protection> 40006954: 92 12 63 58 or %o1, 0x358, %o1 if ( the_key != NULL ) { 40006958: 80 a2 20 00 cmp %o0, 0 4000695c: 02 bf ff f4 be 4000692c <== NEVER TAKEN 40006960: 01 00 00 00 nop <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006964: 91 d0 20 09 ta 9 <== NOT EXECUTED RTEMS_INLINE_ROUTINE POSIX_Keys_Key_value_pair *_POSIX_Keys_Key_value_find( pthread_key_t key, const Thread_Control *the_thread ) { return _RBTree_Find_inline( 40006968: 90 07 21 60 add %i4, 0x160, %o0 4000696c: 84 10 00 08 mov %o0, %g2 while ( *link != NULL ) { 40006970: d2 00 80 00 ld [ %g2 ], %o1 40006974: 80 a2 60 00 cmp %o1, 0 40006978: 02 80 00 0d be 400069ac 4000697c: b8 02 7f f8 add %o1, -8, %i4 return *the_left == the_right->key; 40006980: c4 07 20 18 ld [ %i4 + 0x18 ], %g2 if ( ( *equal )( key, parent ) ) { 40006984: 80 a7 40 02 cmp %i5, %g2 40006988: 02 bf ff db be 400068f4 <== ALWAYS TAKEN 4000698c: 01 00 00 00 nop } else if ( ( *less )( key, parent ) ) { 40006990: 1a bf ff f8 bcc 40006970 <== NOT EXECUTED 40006994: 84 02 60 04 add %o1, 4, %g2 <== NOT EXECUTED return &RB_LEFT( the_node, Node ); 40006998: 84 10 00 09 mov %o1, %g2 <== NOT EXECUTED while ( *link != NULL ) { 4000699c: d2 00 80 00 ld [ %g2 ], %o1 <== NOT EXECUTED 400069a0: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 400069a4: 12 bf ff f7 bne 40006980 <== NOT EXECUTED 400069a8: b8 02 7f f8 add %o1, -8, %i4 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400069ac: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400069b0: 01 00 00 00 nop _RTEMS_Unlock_allocator(); 400069b4: 40 00 02 5c call 40007324 <_RTEMS_Unlock_allocator> 400069b8: b0 10 20 00 clr %i0 ! 0 return eno; 400069bc: 81 c7 e0 08 ret 400069c0: 81 e8 00 00 restore RB_SET( child, parent, Node ); 400069c4: 84 10 20 01 mov 1, %g2 400069c8: c0 21 20 0c clr [ %g4 + 0xc ] _RBTree_Insert_color( the_rbtree, the_node ); 400069cc: 92 10 00 18 mov %i0, %o1 RB_SET( child, parent, Node ); 400069d0: c0 21 20 08 clr [ %g4 + 8 ] _RBTree_Insert_color( the_rbtree, the_node ); 400069d4: 90 10 00 1b mov %i3, %o0 RB_SET( child, parent, Node ); 400069d8: c4 21 20 14 st %g2, [ %g4 + 0x14 ] *link = child; 400069dc: f0 20 c0 00 st %i0, [ %g3 ] _RBTree_Insert_color( the_rbtree, the_node ); 400069e0: 40 00 0d ad call 4000a094 <_RBTree_Insert_color> 400069e4: c2 27 bf fc st %g1, [ %fp + -4 ] register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 400069e8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400069ec: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400069f0: 01 00 00 00 nop eno = 0; 400069f4: 10 bf ff ce b 4000692c 400069f8: b0 10 20 00 clr %i0 ! 0 =============================================================================== 40006518 : sizeof( POSIX_Spinlock_Control ) == sizeof( pthread_spinlock_t ), POSIX_SPINLOCK_T_SIZE ); int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 40006518: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000651c: 91 d0 20 09 ta 9 <== NOT EXECUTED &cpu_self->Lock_stats_context ); #endif the_spinlock->interrupt_state = level; return 0; } 40006520: 90 10 20 00 clr %o0 40006524: 81 c3 e0 08 retl 40006528: c2 20 a0 08 st %g1, [ %g2 + 8 ] =============================================================================== 4000652c : { POSIX_Spinlock_Control *the_spinlock; ISR_Level level; the_spinlock = _POSIX_Spinlock_Get( lock ); level = the_spinlock->interrupt_state; 4000652c: c2 02 20 08 ld [ %o0 + 8 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006530: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006534: 01 00 00 00 nop &_Per_CPU_Get()->Lock_stats_context ); #endif _ISR_Local_enable( level ); return 0; } 40006538: 81 c3 e0 08 retl 4000653c: 90 10 20 00 clr %o0 ! 0 =============================================================================== 40008080 : /* * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 40008080: 9d e3 bf a0 save %sp, -96, %sp if ( _ISR_Is_in_progress() ) { 40008084: 40 00 06 20 call 40009904 <_ISR_Is_in_progress> 40008088: 01 00 00 00 nop 4000808c: 80 a2 20 00 cmp %o0, 0 40008090: 02 80 00 04 be 400080a0 <== ALWAYS TAKEN 40008094: b4 10 20 08 mov 8, %i2 return; } _Thread_Change_life( 0, 0, THREAD_LIFE_CHANGE_DEFERRED ); } 40008098: 81 c7 e0 08 ret <== NOT EXECUTED 4000809c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Change_life( 0, 0, THREAD_LIFE_CHANGE_DEFERRED ); 400080a0: b2 10 20 00 clr %i1 400080a4: 40 00 17 1a call 4000dd0c <_Thread_Change_life> 400080a8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40006f5c : { 40006f5c: 9d e3 bf 68 save %sp, -152, %sp result = pthread_mutex_lock (&aio_request_queue.mutex); 40006f60: 3b 10 00 59 sethi %hi(0x40016400), %i5 40006f64: 40 00 02 f2 call 40007b2c 40006f68: 90 17 60 68 or %i5, 0x68, %o0 ! 40016468 if (result != 0) { 40006f6c: b8 92 20 00 orcc %o0, 0, %i4 40006f70: 12 80 00 30 bne 40007030 <== NEVER TAKEN 40006f74: 90 10 00 18 mov %i0, %o0 pthread_getschedparam (pthread_self(), &policy, ¶m); 40006f78: 40 00 06 4f call 400088b4 40006f7c: b6 17 60 68 or %i5, 0x68, %i3 40006f80: 94 07 bf d0 add %fp, -48, %o2 40006f84: 40 00 05 75 call 40008558 40006f88: 92 07 bf cc add %fp, -52, %o1 req->caller_thread = pthread_self (); 40006f8c: 40 00 06 4a call 400088b4 40006f90: 01 00 00 00 nop req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 40006f94: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006f98: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 40006f9c: c4 07 bf d0 ld [ %fp + -48 ], %g2 40006fa0: 84 20 80 03 sub %g2, %g3, %g2 req->policy = policy; 40006fa4: c6 07 bf cc ld [ %fp + -52 ], %g3 req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 40006fa8: c4 26 20 0c st %g2, [ %i0 + 0xc ] req->aiocbp->error_code = EINPROGRESS; 40006fac: 84 10 20 77 mov 0x77, %g2 req->caller_thread = pthread_self (); 40006fb0: d0 26 20 10 st %o0, [ %i0 + 0x10 ] req->policy = policy; 40006fb4: c6 26 20 08 st %g3, [ %i0 + 8 ] req->aiocbp->error_code = EINPROGRESS; 40006fb8: c4 20 60 34 st %g2, [ %g1 + 0x34 ] req->aiocbp->return_value = 0; 40006fbc: c0 20 60 38 clr [ %g1 + 0x38 ] if ((aio_request_queue.idle_threads == 0) && 40006fc0: c4 06 e0 e0 ld [ %i3 + 0xe0 ], %g2 40006fc4: 80 a0 a0 00 cmp %g2, 0 40006fc8: 12 80 00 1e bne 40007040 <== NEVER TAKEN 40006fcc: d2 00 40 00 ld [ %g1 ], %o1 40006fd0: c4 06 e0 dc ld [ %i3 + 0xdc ], %g2 40006fd4: 80 a0 a0 04 cmp %g2, 4 40006fd8: 04 80 00 36 ble 400070b0 40006fdc: 94 10 20 00 clr %o2 r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 40006fe0: 11 10 00 59 sethi %hi(0x40016400), %o0 40006fe4: 7f ff ff 69 call 40006d88 40006fe8: 90 12 21 28 or %o0, 0x128, %o0 ! 40016528 if (r_chain != NULL) 40006fec: b4 92 20 00 orcc %o0, 0, %i2 40006ff0: 22 80 00 1c be,a 40007060 40006ff4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 pthread_mutex_lock (&r_chain->mutex); 40006ff8: b6 06 a0 20 add %i2, 0x20, %i3 40006ffc: 40 00 02 cc call 40007b2c 40007000: 90 10 00 1b mov %i3, %o0 rtems_aio_insert_prio (&r_chain->perfd, req); 40007004: 92 10 00 18 mov %i0, %o1 40007008: 7f ff fe 53 call 40006954 4000700c: 90 06 a0 08 add %i2, 8, %o0 pthread_cond_signal (&r_chain->cond); 40007010: 40 00 01 0c call 40007440 40007014: 90 06 a0 60 add %i2, 0x60, %o0 pthread_mutex_unlock (&r_chain->mutex); 40007018: 40 00 03 98 call 40007e78 4000701c: 90 10 00 1b mov %i3, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 40007020: 40 00 03 96 call 40007e78 40007024: 90 17 60 68 or %i5, 0x68, %o0 } 40007028: 81 c7 e0 08 ret 4000702c: 91 e8 00 1c restore %g0, %i4, %o0 free (req); 40007030: 7f ff f6 79 call 40004a14 <== NOT EXECUTED 40007034: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED } 40007038: 81 c7 e0 08 ret <== NOT EXECUTED 4000703c: 81 e8 00 00 restore <== NOT EXECUTED r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 40007040: 94 10 20 00 clr %o2 <== NOT EXECUTED 40007044: 11 10 00 59 sethi %hi(0x40016400), %o0 <== NOT EXECUTED 40007048: 7f ff ff 50 call 40006d88 <== NOT EXECUTED 4000704c: 90 12 21 28 or %o0, 0x128, %o0 ! 40016528 <== NOT EXECUTED if (r_chain != NULL) 40007050: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED 40007054: 32 bf ff ea bne,a 40006ffc <== NOT EXECUTED 40007058: b6 06 a0 20 add %i2, 0x20, %i3 <== NOT EXECUTED r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 4000705c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED 40007060: d2 00 40 00 ld [ %g1 ], %o1 40007064: 94 10 20 01 mov 1, %o2 40007068: 11 10 00 59 sethi %hi(0x40016400), %o0 4000706c: 7f ff ff 47 call 40006d88 40007070: 90 12 21 34 or %o0, 0x134, %o0 ! 40016534 if (r_chain->new_fd == 1) { 40007074: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 40007078: b4 10 00 08 mov %o0, %i2 rtems_chain_prepend (&r_chain->perfd, &req->next_prio); 4000707c: 92 10 00 18 mov %i0, %o1 if (r_chain->new_fd == 1) { 40007080: 80 a0 60 01 cmp %g1, 1 40007084: 02 80 00 29 be 40007128 40007088: 90 02 20 08 add %o0, 8, %o0 rtems_aio_insert_prio (&r_chain->perfd, req); 4000708c: 7f ff fe 32 call 40006954 40007090: 01 00 00 00 nop if (aio_request_queue.idle_threads > 0) 40007094: c2 06 e0 e0 ld [ %i3 + 0xe0 ], %g1 40007098: 80 a0 60 00 cmp %g1, 0 4000709c: 04 bf ff e1 ble 40007020 <== ALWAYS TAKEN 400070a0: 01 00 00 00 nop pthread_cond_signal (&aio_request_queue.new_req); 400070a4: 40 00 00 e7 call 40007440 <== NOT EXECUTED 400070a8: 90 06 e0 40 add %i3, 0x40, %o0 <== NOT EXECUTED 400070ac: 30 bf ff dd b,a 40007020 <== NOT EXECUTED r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 400070b0: 94 10 20 01 mov 1, %o2 400070b4: 7f ff ff 35 call 40006d88 400070b8: 90 06 e0 c0 add %i3, 0xc0, %o0 if (r_chain->new_fd == 1) { 400070bc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 400070c0: 80 a0 60 01 cmp %g1, 1 400070c4: 12 bf ff cd bne 40006ff8 400070c8: b4 10 00 08 mov %o0, %i2 rtems_chain_prepend (&r_chain->perfd, &req->next_prio); 400070cc: 92 10 00 18 mov %i0, %o1 400070d0: 40 00 06 bb call 40008bbc 400070d4: 90 02 20 08 add %o0, 8, %o0 r_chain->new_fd = 0; 400070d8: c0 26 a0 18 clr [ %i2 + 0x18 ] pthread_mutex_init (&r_chain->mutex, NULL); 400070dc: 92 10 20 00 clr %o1 400070e0: 40 00 02 40 call 400079e0 400070e4: 90 06 a0 20 add %i2, 0x20, %o0 pthread_cond_init (&r_chain->cond, NULL); 400070e8: 92 10 20 00 clr %o1 400070ec: 40 00 00 ae call 400073a4 400070f0: 90 06 a0 60 add %i2, 0x60, %o0 result = pthread_create (&thid, &aio_request_queue.attr, 400070f4: 96 10 00 1a mov %i2, %o3 400070f8: 92 06 e0 60 add %i3, 0x60, %o1 400070fc: 15 10 00 1a sethi %hi(0x40006800), %o2 40007100: 90 07 bf c8 add %fp, -56, %o0 40007104: 40 00 04 3f call 40008200 40007108: 94 12 a1 d8 or %o2, 0x1d8, %o2 if (result != 0) { 4000710c: 82 92 20 00 orcc %o0, 0, %g1 40007110: 12 80 00 11 bne 40007154 <== NEVER TAKEN 40007114: 90 10 00 1b mov %i3, %o0 ++aio_request_queue.active_threads; 40007118: c2 06 e0 dc ld [ %i3 + 0xdc ], %g1 4000711c: 82 00 60 01 inc %g1 40007120: 10 bf ff c0 b 40007020 40007124: c2 26 e0 dc st %g1, [ %i3 + 0xdc ] rtems_chain_prepend (&r_chain->perfd, &req->next_prio); 40007128: 40 00 06 a5 call 40008bbc 4000712c: 01 00 00 00 nop r_chain->new_fd = 0; 40007130: c0 26 a0 18 clr [ %i2 + 0x18 ] pthread_mutex_init (&r_chain->mutex, NULL); 40007134: 92 10 20 00 clr %o1 40007138: 40 00 02 2a call 400079e0 4000713c: 90 06 a0 20 add %i2, 0x20, %o0 pthread_cond_init (&r_chain->cond, NULL); 40007140: 92 10 20 00 clr %o1 40007144: 40 00 00 98 call 400073a4 40007148: 90 06 a0 60 add %i2, 0x60, %o0 4000714c: 10 bf ff d3 b 40007098 40007150: c2 06 e0 e0 ld [ %i3 + 0xe0 ], %g1 pthread_mutex_unlock (&aio_request_queue.mutex); 40007154: 40 00 03 49 call 40007e78 <== NOT EXECUTED 40007158: b8 10 00 01 mov %g1, %i4 <== NOT EXECUTED return result; 4000715c: 30 bf ff b3 b,a 40007028 <== NOT EXECUTED =============================================================================== 40006c80 : { 40006c80: 9d e3 bf a0 save %sp, -96, %sp result = pthread_attr_init (&aio_request_queue.attr); 40006c84: 39 10 00 59 sethi %hi(0x40016400), %i4 40006c88: 40 00 05 41 call 4000818c 40006c8c: 90 17 20 c8 or %i4, 0xc8, %o0 ! 400164c8 if (result != 0) 40006c90: b0 92 20 00 orcc %o0, 0, %i0 40006c94: 12 80 00 23 bne 40006d20 <== NEVER TAKEN 40006c98: 92 10 20 00 clr %o1 result = 40006c9c: 40 00 05 4b call 400081c8 40006ca0: 90 17 20 c8 or %i4, 0xc8, %o0 if (result != 0) 40006ca4: 80 a2 20 00 cmp %o0, 0 40006ca8: 12 80 00 20 bne 40006d28 <== NEVER TAKEN 40006cac: 92 10 20 00 clr %o1 result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 40006cb0: 3b 10 00 59 sethi %hi(0x40016400), %i5 40006cb4: 40 00 03 4b call 400079e0 40006cb8: 90 17 60 68 or %i5, 0x68, %o0 ! 40016468 if (result != 0) 40006cbc: 80 a2 20 00 cmp %o0, 0 40006cc0: 12 80 00 23 bne 40006d4c <== NEVER TAKEN 40006cc4: 92 10 20 00 clr %o1 result = pthread_cond_init (&aio_request_queue.new_req, NULL); 40006cc8: 11 10 00 59 sethi %hi(0x40016400), %o0 40006ccc: 40 00 01 b6 call 400073a4 40006cd0: 90 12 20 a8 or %o0, 0xa8, %o0 ! 400164a8 if (result != 0) { 40006cd4: b0 92 20 00 orcc %o0, 0, %i0 40006cd8: 12 80 00 26 bne 40006d70 <== NEVER TAKEN 40006cdc: 01 00 00 00 nop head->next = tail; 40006ce0: 82 17 60 68 or %i5, 0x68, %g1 tail->previous = head; 40006ce4: 84 00 60 cc add %g1, 0xcc, %g2 head->next = tail; 40006ce8: ba 00 60 c4 add %g1, 0xc4, %i5 tail->previous = head; 40006cec: 88 00 60 c0 add %g1, 0xc0, %g4 head->next = tail; 40006cf0: 86 00 60 d0 add %g1, 0xd0, %g3 tail->previous = head; 40006cf4: c4 20 60 d4 st %g2, [ %g1 + 0xd4 ] aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 40006cf8: 05 00 00 2c sethi %hi(0xb000), %g2 head->next = tail; 40006cfc: fa 20 60 c0 st %i5, [ %g1 + 0xc0 ] 40006d00: 84 10 a0 0b or %g2, 0xb, %g2 head->previous = NULL; 40006d04: c0 20 60 c4 clr [ %g1 + 0xc4 ] tail->previous = head; 40006d08: c8 20 60 c8 st %g4, [ %g1 + 0xc8 ] head->next = tail; 40006d0c: c6 20 60 cc st %g3, [ %g1 + 0xcc ] head->previous = NULL; 40006d10: c0 20 60 d0 clr [ %g1 + 0xd0 ] aio_request_queue.active_threads = 0; 40006d14: c0 20 60 dc clr [ %g1 + 0xdc ] aio_request_queue.idle_threads = 0; 40006d18: c0 20 60 e0 clr [ %g1 + 0xe0 ] aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 40006d1c: c4 20 60 d8 st %g2, [ %g1 + 0xd8 ] } 40006d20: 81 c7 e0 08 ret 40006d24: 81 e8 00 00 restore pthread_attr_destroy (&aio_request_queue.attr); 40006d28: 40 00 05 0d call 4000815c <== NOT EXECUTED 40006d2c: 90 17 20 c8 or %i4, 0xc8, %o0 <== NOT EXECUTED result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 40006d30: 92 10 20 00 clr %o1 <== NOT EXECUTED 40006d34: 3b 10 00 59 sethi %hi(0x40016400), %i5 <== NOT EXECUTED 40006d38: 40 00 03 2a call 400079e0 <== NOT EXECUTED 40006d3c: 90 17 60 68 or %i5, 0x68, %o0 ! 40016468 <== NOT EXECUTED if (result != 0) 40006d40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006d44: 02 bf ff e1 be 40006cc8 <== NOT EXECUTED 40006d48: 92 10 20 00 clr %o1 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 40006d4c: 40 00 05 04 call 4000815c <== NOT EXECUTED 40006d50: 90 17 20 c8 or %i4, 0xc8, %o0 <== NOT EXECUTED result = pthread_cond_init (&aio_request_queue.new_req, NULL); 40006d54: 92 10 20 00 clr %o1 <== NOT EXECUTED 40006d58: 11 10 00 59 sethi %hi(0x40016400), %o0 <== NOT EXECUTED 40006d5c: 40 00 01 92 call 400073a4 <== NOT EXECUTED 40006d60: 90 12 20 a8 or %o0, 0xa8, %o0 ! 400164a8 <== NOT EXECUTED if (result != 0) { 40006d64: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40006d68: 22 bf ff df be,a 40006ce4 <== NOT EXECUTED 40006d6c: 82 17 60 68 or %i5, 0x68, %g1 <== NOT EXECUTED pthread_mutex_destroy (&aio_request_queue.mutex); 40006d70: 40 00 02 f9 call 40007954 <== NOT EXECUTED 40006d74: 90 17 60 68 or %i5, 0x68, %o0 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 40006d78: 40 00 04 f9 call 4000815c <== NOT EXECUTED 40006d7c: 90 17 20 c8 or %i4, 0xc8, %o0 <== NOT EXECUTED head->next = tail; 40006d80: 10 bf ff d9 b 40006ce4 <== NOT EXECUTED 40006d84: 82 17 60 68 or %i5, 0x68, %g1 <== NOT EXECUTED =============================================================================== 40006e88 : { 40006e88: 9d e3 bf a0 save %sp, -96, %sp return _Chain_Immutable_head( the_chain )->next; 40006e8c: fa 06 20 08 ld [ %i0 + 8 ], %i5 return &the_chain->Tail.Node; 40006e90: b0 06 20 0c add %i0, 0xc, %i0 while (!rtems_chain_is_tail (chain, node)) 40006e94: 80 a7 40 18 cmp %i5, %i0 40006e98: 02 80 00 0f be 40006ed4 <== NEVER TAKEN 40006e9c: b4 10 20 8c mov 0x8c, %i2 req->aiocbp->return_value = -1; 40006ea0: b6 10 3f ff mov -1, %i3 rtems_chain_extract (&req->next_prio); 40006ea4: 90 10 00 1d mov %i5, %o0 40006ea8: 40 00 07 32 call 40008b70 40006eac: f8 07 40 00 ld [ %i5 ], %i4 req->aiocbp->error_code = ECANCELED; 40006eb0: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 40006eb4: f4 20 60 34 st %i2, [ %g1 + 0x34 ] free (req); 40006eb8: 90 10 00 1d mov %i5, %o0 req->aiocbp->return_value = -1; 40006ebc: f6 20 60 38 st %i3, [ %g1 + 0x38 ] free (req); 40006ec0: 7f ff f6 d5 call 40004a14 40006ec4: ba 10 00 1c mov %i4, %i5 while (!rtems_chain_is_tail (chain, node)) 40006ec8: 80 a7 00 18 cmp %i4, %i0 40006ecc: 12 bf ff f7 bne 40006ea8 40006ed0: 90 10 00 1d mov %i5, %o0 } 40006ed4: 81 c7 e0 08 ret 40006ed8: 81 e8 00 00 restore =============================================================================== 40006edc : { 40006edc: 9d e3 bf a0 save %sp, -96, %sp return _Chain_Immutable_head( the_chain )->next; 40006ee0: fa 06 00 00 ld [ %i0 ], %i5 return &the_chain->Tail.Node; 40006ee4: 84 06 20 04 add %i0, 4, %g2 if (rtems_chain_is_empty (chain)) 40006ee8: 80 a0 80 1d cmp %g2, %i5 40006eec: 02 80 00 1a be 40006f54 40006ef0: 01 00 00 00 nop while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 40006ef4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 40006ef8: 80 a0 40 19 cmp %g1, %i1 40006efc: 02 80 00 08 be 40006f1c <== ALWAYS TAKEN 40006f00: 80 a0 80 1d cmp %g2, %i5 40006f04: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED 40006f08: 80 a7 40 02 cmp %i5, %g2 <== NOT EXECUTED 40006f0c: 32 bf ff fb bne,a 40006ef8 <== NOT EXECUTED 40006f10: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED } 40006f14: 81 c7 e0 08 ret <== NOT EXECUTED 40006f18: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED if (rtems_chain_is_tail (chain, node)) 40006f1c: 02 80 00 0c be 40006f4c <== NEVER TAKEN 40006f20: b0 10 20 01 mov 1, %i0 rtems_chain_extract (node); 40006f24: 40 00 07 13 call 40008b70 40006f28: 90 10 00 1d mov %i5, %o0 current->aiocbp->error_code = ECANCELED; 40006f2c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 40006f30: 84 10 20 8c mov 0x8c, %g2 40006f34: c4 20 60 34 st %g2, [ %g1 + 0x34 ] current->aiocbp->return_value = -1; 40006f38: 84 10 3f ff mov -1, %g2 40006f3c: c4 20 60 38 st %g2, [ %g1 + 0x38 ] free (current); 40006f40: 90 10 00 1d mov %i5, %o0 40006f44: 7f ff f6 b4 call 40004a14 40006f48: b0 10 20 00 clr %i0 return AIO_CANCELED; 40006f4c: 81 c7 e0 08 ret 40006f50: 81 e8 00 00 restore return AIO_ALLDONE; 40006f54: 81 c7 e0 08 ret 40006f58: 91 e8 20 02 restore %g0, 2, %o0 =============================================================================== 40006d88 : { 40006d88: 9d e3 bf a0 save %sp, -96, %sp return _Chain_Immutable_head( the_chain )->next; 40006d8c: f6 06 00 00 ld [ %i0 ], %i3 while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) { 40006d90: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1 40006d94: 80 a6 40 01 cmp %i1, %g1 40006d98: 04 80 00 10 ble 40006dd8 40006d9c: ba 10 00 1b mov %i3, %i5 return &the_chain->Tail.Node; 40006da0: b8 06 20 04 add %i0, 4, %i4 40006da4: 80 a6 c0 1c cmp %i3, %i4 40006da8: 02 80 00 27 be 40006e44 40006dac: 80 a6 a0 00 cmp %i2, 0 40006db0: 10 80 00 05 b 40006dc4 40006db4: fa 07 40 00 ld [ %i5 ], %i5 40006db8: 02 80 00 0e be 40006df0 40006dbc: 80 a6 a0 00 cmp %i2, 0 40006dc0: fa 07 40 00 ld [ %i5 ], %i5 40006dc4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 40006dc8: 80 a0 40 19 cmp %g1, %i1 40006dcc: 06 bf ff fb bl 40006db8 40006dd0: 80 a7 40 1c cmp %i5, %i4 if (r_chain->fildes == fildes) 40006dd4: 80 a6 40 01 cmp %i1, %g1 40006dd8: 32 80 00 05 bne,a 40006dec 40006ddc: b8 10 00 1d mov %i5, %i4 r_chain->new_fd = 0; 40006de0: c0 27 60 18 clr [ %i5 + 0x18 ] } 40006de4: 81 c7 e0 08 ret 40006de8: 91 e8 00 1d restore %g0, %i5, %o0 if (create == 0) 40006dec: 80 a6 a0 00 cmp %i2, 0 40006df0: 02 80 00 24 be 40006e80 40006df4: ba 10 20 00 clr %i5 r_chain = malloc (sizeof (rtems_aio_request_chain)); 40006df8: 7f ff f8 5b call 40004f64 40006dfc: 90 10 20 80 mov 0x80, %o0 return &the_chain->Tail.Node; 40006e00: 82 02 20 08 add %o0, 8, %g1 40006e04: 86 02 20 0c add %o0, 0xc, %g3 head->previous = NULL; 40006e08: c0 22 20 0c clr [ %o0 + 0xc ] return &the_chain->Tail.Node; 40006e0c: 84 06 20 04 add %i0, 4, %g2 head->next = tail; 40006e10: c6 22 20 08 st %g3, [ %o0 + 8 ] 40006e14: ba 10 00 08 mov %o0, %i5 if (rtems_chain_is_empty (chain)) 40006e18: 80 a6 c0 02 cmp %i3, %g2 40006e1c: 02 80 00 14 be 40006e6c 40006e20: c2 22 20 10 st %g1, [ %o0 + 0x10 ] rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd); 40006e24: d0 07 20 04 ld [ %i4 + 4 ], %o0 40006e28: 40 00 07 5b call 40008b94 40006e2c: 92 10 00 1d mov %i5, %o1 r_chain->new_fd = 1; 40006e30: 82 10 20 01 mov 1, %g1 r_chain->fildes = fildes; 40006e34: f2 27 60 14 st %i1, [ %i5 + 0x14 ] r_chain->new_fd = 1; 40006e38: c2 27 60 18 st %g1, [ %i5 + 0x18 ] } 40006e3c: 81 c7 e0 08 ret 40006e40: 91 e8 00 1d restore %g0, %i5, %o0 if (create == 0) 40006e44: 22 80 00 0f be,a 40006e80 <== NEVER TAKEN 40006e48: ba 10 20 00 clr %i5 <== NOT EXECUTED r_chain = malloc (sizeof (rtems_aio_request_chain)); 40006e4c: 7f ff f8 46 call 40004f64 40006e50: 90 10 20 80 mov 0x80, %o0 return &the_chain->Tail.Node; 40006e54: 82 02 20 08 add %o0, 8, %g1 40006e58: 84 02 20 0c add %o0, 0xc, %g2 head->previous = NULL; 40006e5c: c0 22 20 0c clr [ %o0 + 0xc ] 40006e60: ba 10 00 08 mov %o0, %i5 head->next = tail; 40006e64: c4 22 20 08 st %g2, [ %o0 + 8 ] tail->previous = head; 40006e68: c2 22 20 10 st %g1, [ %o0 + 0x10 ] rtems_chain_prepend (chain, &r_chain->next_fd); 40006e6c: 92 10 00 1d mov %i5, %o1 40006e70: 40 00 07 53 call 40008bbc 40006e74: 90 10 00 18 mov %i0, %o0 40006e78: 10 bf ff ef b 40006e34 40006e7c: 82 10 20 01 mov 1, %g1 } 40006e80: 81 c7 e0 08 ret 40006e84: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 40006e0c : #include int sched_get_priority_max( int policy ) { 40006e0c: 9d e3 bf a0 save %sp, -96, %sp 40006e10: 80 a6 20 04 cmp %i0, 4 40006e14: 18 80 00 09 bgu 40006e38 40006e18: 82 10 20 01 mov 1, %g1 40006e1c: b1 28 40 18 sll %g1, %i0, %i0 40006e20: 80 8e 20 17 btst 0x17, %i0 RTEMS_INLINE_ROUTINE int _POSIX_Priority_Get_maximum( const Scheduler_Control *scheduler ) { _Assert( (int) scheduler->maximum_priority > 1 ); return (int) scheduler->maximum_priority - 1; 40006e24: 02 80 00 05 be 40006e38 <== NEVER TAKEN 40006e28: 03 10 00 5c sethi %hi(0x40017000), %g1 40006e2c: f0 00 63 34 ld [ %g1 + 0x334 ], %i0 ! 40017334 <_Scheduler_Table+0x44> rtems_set_errno_and_return_minus_one( EINVAL ); } scheduler = _Thread_Scheduler_get_home( _Thread_Get_executing() ); return _POSIX_Priority_Get_maximum( scheduler ); } 40006e30: 81 c7 e0 08 ret 40006e34: 91 ee 3f ff restore %i0, -1, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40006e38: 40 00 20 4c call 4000ef68 <__errno> 40006e3c: b0 10 3f ff mov -1, %i0 40006e40: 82 10 20 16 mov 0x16, %g1 40006e44: c2 22 00 00 st %g1, [ %o0 ] 40006e48: 81 c7 e0 08 ret 40006e4c: 81 e8 00 00 restore =============================================================================== 40006e50 : * 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258 */ int sched_get_priority_min( int policy ) { 40006e50: 9d e3 bf a0 save %sp, -96, %sp 40006e54: 80 a6 20 04 cmp %i0, 4 40006e58: 18 80 00 08 bgu 40006e78 40006e5c: 82 10 20 01 mov 1, %g1 40006e60: 83 28 40 18 sll %g1, %i0, %g1 40006e64: 80 88 60 17 btst 0x17, %g1 default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; 40006e68: 02 80 00 04 be 40006e78 <== NEVER TAKEN 40006e6c: 84 10 20 01 mov 1, %g2 } 40006e70: 81 c7 e0 08 ret 40006e74: 91 e8 00 02 restore %g0, %g2, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40006e78: 40 00 20 3c call 4000ef68 <__errno> 40006e7c: 01 00 00 00 nop 40006e80: 82 10 20 16 mov 0x16, %g1 ! 16 <_TLS_Alignment+0x15> 40006e84: 84 10 3f ff mov -1, %g2 40006e88: 10 bf ff fa b 40006e70 40006e8c: c2 22 00 00 st %g1, [ %o0 ] =============================================================================== 40006e90 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 40006e90: 9d e3 bf a0 save %sp, -96, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 40006e94: 80 a6 20 00 cmp %i0, 0 40006e98: 12 80 00 0a bne 40006ec0 <== ALWAYS TAKEN 40006e9c: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 40006ea0: 02 80 00 13 be 40006eec 40006ea4: 03 10 00 5c sethi %hi(0x40017000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( 40006ea8: d0 00 62 20 ld [ %g1 + 0x220 ], %o0 ! 40017220 40006eac: 92 10 00 19 mov %i1, %o1 40006eb0: 40 00 15 83 call 4000c4bc <_Timespec_From_ticks> 40006eb4: b0 10 20 00 clr %i0 rtems_configuration_get_ticks_per_timeslice(), interval ); return 0; } 40006eb8: 81 c7 e0 08 ret 40006ebc: 81 e8 00 00 restore if ( pid && pid != getpid() ) 40006ec0: 7f ff f6 9f call 4000493c 40006ec4: 01 00 00 00 nop 40006ec8: 80 a2 00 18 cmp %o0, %i0 40006ecc: 02 bf ff f5 be 40006ea0 40006ed0: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 40006ed4: 40 00 20 25 call 4000ef68 <__errno> 40006ed8: b0 10 3f ff mov -1, %i0 40006edc: 82 10 20 03 mov 3, %g1 40006ee0: c2 22 00 00 st %g1, [ %o0 ] 40006ee4: 81 c7 e0 08 ret 40006ee8: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); 40006eec: 40 00 20 1f call 4000ef68 <__errno> 40006ef0: b0 10 3f ff mov -1, %i0 40006ef4: 82 10 20 16 mov 0x16, %g1 40006ef8: c2 22 00 00 st %g1, [ %o0 ] 40006efc: 81 c7 e0 08 ret 40006f00: 81 e8 00 00 restore =============================================================================== 4000b4e0 : #endif #include int sem_close( sem_t *sem ) { 4000b4e0: 9d e3 bf a0 save %sp, -96, %sp POSIX_Semaphore_Control *the_semaphore; uint32_t open_count; POSIX_SEMAPHORE_VALIDATE_OBJECT( sem ); 4000b4e4: 80 a6 20 00 cmp %i0, 0 4000b4e8: 02 80 00 22 be 4000b570 4000b4ec: 03 17 4d 9f sethi %hi(0x5d367c00), %g1 4000b4f0: c4 06 00 00 ld [ %i0 ], %g2 4000b4f4: 82 10 63 e7 or %g1, 0x3e7, %g1 4000b4f8: 82 1e 00 01 xor %i0, %g1, %g1 4000b4fc: 80 a0 40 02 cmp %g1, %g2 4000b500: 12 80 00 1c bne 4000b570 4000b504: 01 00 00 00 nop if ( !_POSIX_Semaphore_Is_named( sem ) ) { 4000b508: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000b50c: 80 a0 60 00 cmp %g1, 0 4000b510: 02 80 00 18 be 4000b570 <== NEVER TAKEN 4000b514: 01 00 00 00 nop _RTEMS_Lock_allocator(); 4000b518: 40 00 02 2f call 4000bdd4 <_RTEMS_Lock_allocator> 4000b51c: 01 00 00 00 nop RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get( sem_t *sem ) { return RTEMS_CONTAINER_OF( sem, POSIX_Semaphore_Control, Semaphore ); 4000b520: 90 06 3f f0 add %i0, -16, %o0 the_semaphore = _POSIX_Semaphore_Get( sem ); _Objects_Allocator_lock(); open_count = the_semaphore->open_count; 4000b524: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 if ( open_count == 0 ) { 4000b528: 80 a0 60 00 cmp %g1, 0 4000b52c: 02 80 00 0f be 4000b568 <== NEVER TAKEN 4000b530: 80 a0 60 01 cmp %g1, 1 _Objects_Allocator_unlock(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( open_count == 1 && _POSIX_Semaphore_Is_busy( sem ) ) { 4000b534: 12 80 00 06 bne 4000b54c 4000b538: 82 00 7f ff add %g1, -1, %g1 4000b53c: c4 06 20 0c ld [ %i0 + 0xc ], %g2 4000b540: 80 a0 a0 00 cmp %g2, 0 4000b544: 12 80 00 11 bne 4000b588 4000b548: 01 00 00 00 nop _Objects_Allocator_unlock(); rtems_set_errno_and_return_minus_one( EBUSY ); } the_semaphore->open_count = open_count - 1; 4000b54c: c2 22 20 30 st %g1, [ %o0 + 0x30 ] _POSIX_Semaphore_Delete( the_semaphore ); 4000b550: 40 00 1f e1 call 400134d4 <_POSIX_Semaphore_Delete> 4000b554: b0 10 20 00 clr %i0 _RTEMS_Unlock_allocator(); 4000b558: 40 00 02 24 call 4000bde8 <_RTEMS_Unlock_allocator> 4000b55c: 01 00 00 00 nop _Objects_Allocator_unlock(); return 0; } 4000b560: 81 c7 e0 08 ret 4000b564: 81 e8 00 00 restore 4000b568: 40 00 02 20 call 4000bde8 <_RTEMS_Unlock_allocator> <== NOT EXECUTED 4000b56c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 4000b570: 40 00 22 bd call 40014064 <__errno> 4000b574: b0 10 3f ff mov -1, %i0 ! ffffffff 4000b578: 82 10 20 16 mov 0x16, %g1 4000b57c: c2 22 00 00 st %g1, [ %o0 ] 4000b580: 81 c7 e0 08 ret 4000b584: 81 e8 00 00 restore 4000b588: 40 00 02 18 call 4000bde8 <_RTEMS_Unlock_allocator> 4000b58c: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EBUSY ); 4000b590: 40 00 22 b5 call 40014064 <__errno> 4000b594: 01 00 00 00 nop 4000b598: 82 10 20 10 mov 0x10, %g1 ! 10 <_TLS_Alignment+0xf> 4000b59c: c2 22 00 00 st %g1, [ %o0 ] 4000b5a0: 81 c7 e0 08 ret 4000b5a4: 81 e8 00 00 restore =============================================================================== 4000b62c : int sem_getvalue( sem_t *__restrict _sem, int *__restrict sval ) { 4000b62c: 9d e3 bf a0 save %sp, -96, %sp Sem_Control *sem; ISR_Level level; Thread_queue_Context queue_context; POSIX_SEMAPHORE_VALIDATE_OBJECT( _sem ); 4000b630: 80 a6 20 00 cmp %i0, 0 4000b634: 02 80 00 0f be 4000b670 4000b638: 03 17 4d 9f sethi %hi(0x5d367c00), %g1 4000b63c: c4 06 00 00 ld [ %i0 ], %g2 4000b640: 82 10 63 e7 or %g1, 0x3e7, %g1 4000b644: 82 1e 00 01 xor %i0, %g1, %g1 4000b648: 80 a0 40 02 cmp %g1, %g2 4000b64c: 12 80 00 09 bne 4000b670 4000b650: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000b654: 91 d0 20 09 ta 9 <== NOT EXECUTED sem = _Sem_Get( &_sem->_Semaphore ); _Thread_queue_Context_initialize( &queue_context ); _Thread_queue_Context_ISR_disable( &queue_context, level ); _Sem_Queue_acquire_critical( sem, &queue_context ); *sval = (int) sem->count; 4000b658: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 <== NOT EXECUTED 4000b65c: c4 26 40 00 st %g2, [ %i1 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000b660: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000b664: 01 00 00 00 nop _Sem_Queue_release( sem, level, &queue_context ); return 0; } 4000b668: 81 c7 e0 08 ret 4000b66c: 91 e8 20 00 restore %g0, 0, %o0 POSIX_SEMAPHORE_VALIDATE_OBJECT( _sem ); 4000b670: 40 00 22 7d call 40014064 <__errno> 4000b674: b0 10 3f ff mov -1, %i0 4000b678: 82 10 20 16 mov 0x16, %g1 4000b67c: c2 22 00 00 st %g1, [ %o0 ] 4000b680: 81 c7 e0 08 ret 4000b684: 81 e8 00 00 restore =============================================================================== 40007970 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 40007970: 9d e3 bf 90 save %sp, -112, %sp size_t name_len; Objects_Get_by_name_error error; sem_t *sem; if ( oflag & O_CREAT ) { va_start(arg, oflag); 40007974: f4 27 a0 4c st %i2, [ %fp + 0x4c ] if ( oflag & O_CREAT ) { 40007978: 80 8e 62 00 btst 0x200, %i1 va_start(arg, oflag); 4000797c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40007980: f8 27 a0 54 st %i4, [ %fp + 0x54 ] if ( oflag & O_CREAT ) { 40007984: 12 80 00 18 bne 400079e4 40007988: fa 27 a0 58 st %i5, [ %fp + 0x58 ] _RTEMS_Lock_allocator(); 4000798c: 40 00 04 b8 call 40008c6c <_RTEMS_Lock_allocator> 40007990: 01 00 00 00 nop const char *name, size_t *name_length_p, Objects_Get_by_name_error *error ) { return (POSIX_Semaphore_Control *) _Objects_Get_by_name( 40007994: 96 07 bf fc add %fp, -4, %o3 40007998: 94 07 bf f8 add %fp, -8, %o2 4000799c: 92 10 00 18 mov %i0, %o1 400079a0: 11 10 00 68 sethi %hi(0x4001a000), %o0 400079a4: 40 00 0e 65 call 4000b338 <_Objects_Get_by_name> 400079a8: 90 12 22 00 or %o0, 0x200, %o0 ! 4001a200 <_POSIX_Semaphore_Information> * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( the_semaphore == NULL ) { 400079ac: 80 a2 20 00 cmp %o0, 0 400079b0: 02 80 00 3f be 40007aac 400079b4: 01 00 00 00 nop /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 400079b8: b2 0e 6a 00 and %i1, 0xa00, %i1 400079bc: 80 a6 6a 00 cmp %i1, 0xa00 400079c0: 02 80 00 46 be 40007ad8 400079c4: 01 00 00 00 nop _Objects_Allocator_unlock(); rtems_set_errno_and_return_value( EEXIST, SEM_FAILED ); } the_semaphore->open_count += 1; 400079c8: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 400079cc: 82 00 60 01 inc %g1 400079d0: c2 22 20 30 st %g1, [ %o0 + 0x30 ] _RTEMS_Unlock_allocator(); 400079d4: 40 00 04 ab call 40008c80 <_RTEMS_Unlock_allocator> 400079d8: b0 02 20 10 add %o0, 0x10, %i0 _Objects_Allocator_unlock(); return &the_semaphore->Semaphore; 400079dc: 81 c7 e0 08 ret 400079e0: 81 e8 00 00 restore va_start(arg, oflag); 400079e4: 82 07 a0 4c add %fp, 0x4c, %g1 _RTEMS_Lock_allocator(); 400079e8: 40 00 04 a1 call 40008c6c <_RTEMS_Lock_allocator> 400079ec: c2 27 bf f4 st %g1, [ %fp + -12 ] 400079f0: 3b 10 00 68 sethi %hi(0x4001a000), %i5 400079f4: 96 07 bf fc add %fp, -4, %o3 400079f8: 94 07 bf f8 add %fp, -8, %o2 400079fc: 92 10 00 18 mov %i0, %o1 40007a00: 40 00 0e 4e call 4000b338 <_Objects_Get_by_name> 40007a04: 90 17 62 00 or %i5, 0x200, %o0 if ( the_semaphore == NULL ) { 40007a08: 80 a2 20 00 cmp %o0, 0 40007a0c: 12 bf ff eb bne 400079b8 40007a10: c2 07 bf fc ld [ %fp + -4 ], %g1 if ( !( error == OBJECTS_GET_BY_NAME_NO_OBJECT && (oflag & O_CREAT) ) ) { 40007a14: 80 a0 60 02 cmp %g1, 2 40007a18: 12 80 00 25 bne 40007aac 40007a1c: 80 a6 e0 00 cmp %i3, 0 if ( value > SEM_VALUE_MAX ) { 40007a20: 06 80 00 36 bl 40007af8 40007a24: d2 07 bf f8 ld [ %fp + -8 ], %o1 name = _Workspace_String_duplicate( name_arg, name_len ); 40007a28: 40 00 1d 77 call 4000f004 <_Workspace_String_duplicate> 40007a2c: 90 10 00 18 mov %i0, %o0 if ( name == NULL ) { 40007a30: b8 92 20 00 orcc %o0, 0, %i4 40007a34: 02 80 00 36 be 40007b0c <== NEVER TAKEN 40007a38: 01 00 00 00 nop return (POSIX_Semaphore_Control *) 40007a3c: 40 00 0c 71 call 4000ac00 <_Objects_Allocate_unprotected> 40007a40: 90 17 62 00 or %i5, 0x200, %o0 if ( the_semaphore == NULL ) { 40007a44: 80 a2 20 00 cmp %o0, 0 40007a48: 02 80 00 36 be 40007b20 <== NEVER TAKEN 40007a4c: 82 10 20 01 mov 1, %g1 information->local_table[ index ] = the_object; 40007a50: c4 12 20 0a lduh [ %o0 + 0xa ], %g2 the_semaphore->open_count = 1; 40007a54: c2 22 20 30 st %g1, [ %o0 + 0x30 ] _POSIX_Semaphore_Initialize( &the_semaphore->Semaphore, name, value ); 40007a58: b0 02 20 10 add %o0, 0x10, %i0 the_semaphore->linked = true; 40007a5c: c2 2a 20 2c stb %g1, [ %o0 + 0x2c ] sem->_flags = (uintptr_t) sem ^ POSIX_SEMAPHORE_MAGIC; 40007a60: 03 17 4d 9f sethi %hi(0x5d367c00), %g1 40007a64: 82 10 63 e7 or %g1, 0x3e7, %g1 ! 5d367fe7 40007a68: 82 1e 00 01 xor %i0, %g1, %g1 const char *_name, unsigned int _count) { struct _Semaphore_Control _init = _SEMAPHORE_NAMED_INITIALIZER(_name, _count); *_semaphore = _init; 40007a6c: c0 22 20 14 clr [ %o0 + 0x14 ] 40007a70: ba 17 62 00 or %i5, 0x200, %i5 40007a74: c2 22 20 10 st %g1, [ %o0 + 0x10 ] 40007a78: 83 28 a0 02 sll %g2, 2, %g1 40007a7c: c0 22 20 18 clr [ %o0 + 0x18 ] 40007a80: c0 22 20 1c clr [ %o0 + 0x1c ] 40007a84: c0 22 20 20 clr [ %o0 + 0x20 ] 40007a88: f8 22 20 24 st %i4, [ %o0 + 0x24 ] 40007a8c: f6 22 20 28 st %i3, [ %o0 + 0x28 ] the_object->name.name_p = name; 40007a90: f8 22 20 0c st %i4, [ %o0 + 0xc ] information->local_table[ index ] = the_object; 40007a94: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 40007a98: d0 20 80 01 st %o0, [ %g2 + %g1 ] _RTEMS_Unlock_allocator(); 40007a9c: 40 00 04 79 call 40008c80 <_RTEMS_Unlock_allocator> 40007aa0: 01 00 00 00 nop value ); _Objects_Allocator_unlock(); return sem; } 40007aa4: 81 c7 e0 08 ret 40007aa8: 81 e8 00 00 restore 40007aac: 40 00 04 75 call 40008c80 <_RTEMS_Unlock_allocator> 40007ab0: b0 10 20 00 clr %i0 rtems_set_errno_and_return_value( 40007ab4: 40 00 27 83 call 400118c0 <__errno> 40007ab8: fa 07 bf fc ld [ %fp + -4 ], %i5 40007abc: bb 2f 60 02 sll %i5, 2, %i5 40007ac0: 03 10 00 4f sethi %hi(0x40013c00), %g1 40007ac4: 82 10 61 d0 or %g1, 0x1d0, %g1 ! 40013dd0 <_POSIX_Get_by_name_error_table> 40007ac8: c2 00 40 1d ld [ %g1 + %i5 ], %g1 40007acc: c2 22 00 00 st %g1, [ %o0 ] 40007ad0: 81 c7 e0 08 ret 40007ad4: 81 e8 00 00 restore 40007ad8: 40 00 04 6a call 40008c80 <_RTEMS_Unlock_allocator> 40007adc: b0 10 20 00 clr %i0 rtems_set_errno_and_return_value( EEXIST, SEM_FAILED ); 40007ae0: 40 00 27 78 call 400118c0 <__errno> 40007ae4: 01 00 00 00 nop 40007ae8: 82 10 20 11 mov 0x11, %g1 ! 11 <_TLS_Alignment+0x10> 40007aec: c2 22 00 00 st %g1, [ %o0 ] 40007af0: 81 c7 e0 08 ret 40007af4: 81 e8 00 00 restore rtems_set_errno_and_return_value( EINVAL, SEM_FAILED ); 40007af8: 40 00 27 72 call 400118c0 <__errno> 40007afc: b0 10 20 00 clr %i0 40007b00: 82 10 20 16 mov 0x16, %g1 40007b04: 10 bf ff e6 b 40007a9c 40007b08: c2 22 00 00 st %g1, [ %o0 ] rtems_set_errno_and_return_value( ENOMEM, SEM_FAILED ); 40007b0c: 40 00 27 6d call 400118c0 <__errno> <== NOT EXECUTED 40007b10: b0 10 20 00 clr %i0 <== NOT EXECUTED 40007b14: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40007b18: 10 bf ff e1 b 40007a9c <== NOT EXECUTED 40007b1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED _Workspace_Free( name ); 40007b20: 40 00 1d 24 call 4000efb0 <_Workspace_Free> <== NOT EXECUTED 40007b24: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED rtems_set_errno_and_return_value( ENOSPC, SEM_FAILED ); 40007b28: 40 00 27 66 call 400118c0 <__errno> <== NOT EXECUTED 40007b2c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40007b30: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40007b34: 10 bf ff da b 40007a9c <== NOT EXECUTED 40007b38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED =============================================================================== 40007e60 : #include #include int sem_post( sem_t *_sem ) { 40007e60: 9d e3 bf 78 save %sp, -136, %sp ISR_Level level; Thread_queue_Context queue_context; Thread_queue_Heads *heads; unsigned int count; POSIX_SEMAPHORE_VALIDATE_OBJECT( _sem ); 40007e64: 80 a6 20 00 cmp %i0, 0 40007e68: 02 80 00 27 be 40007f04 40007e6c: 03 17 4d 9f sethi %hi(0x5d367c00), %g1 40007e70: c4 06 00 00 ld [ %i0 ], %g2 40007e74: 82 10 63 e7 or %g1, 0x3e7, %g1 40007e78: 82 1e 00 01 xor %i0, %g1, %g1 40007e7c: 80 a0 40 02 cmp %g1, %g2 40007e80: 12 80 00 21 bne 40007f04 40007e84: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40007e88: 91 d0 20 09 ta 9 <== NOT EXECUTED return psr; 40007e8c: 88 10 00 01 mov %g1, %g4 sem = _Sem_Get( &_sem->_Semaphore ); _Thread_queue_Context_initialize( &queue_context ); _Thread_queue_Context_ISR_disable( &queue_context, level ); _Sem_Queue_acquire_critical( sem, &queue_context ); heads = sem->Queue.Queue.heads; 40007e90: d0 06 20 0c ld [ %i0 + 0xc ], %o0 count = sem->count; if ( __predict_true( heads == NULL && count < SEM_VALUE_MAX ) ) { 40007e94: 80 a2 20 00 cmp %o0, 0 40007e98: 12 80 00 0d bne 40007ecc 40007e9c: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 40007ea0: 07 1f ff ff sethi %hi(0x7ffffc00), %g3 40007ea4: 86 10 e3 fe or %g3, 0x3fe, %g3 ! 7ffffffe 40007ea8: 80 a0 c0 02 cmp %g3, %g2 40007eac: 0a 80 00 07 bcs 40007ec8 40007eb0: 84 00 a0 01 inc %g2 sem->count = count + 1; 40007eb4: c4 26 20 18 st %g2, [ %i0 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40007eb8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007ebc: 01 00 00 00 nop _Sem_Queue_release( sem, level, &queue_context ); return 0; 40007ec0: 81 c7 e0 08 ret 40007ec4: 91 e8 20 00 restore %g0, 0, %o0 } if ( __predict_true( heads != NULL ) ) { 40007ec8: 80 a2 20 00 cmp %o0, 0 40007ecc: 02 80 00 14 be 40007f1c 40007ed0: 3b 10 00 55 sethi %hi(0x40015400), %i5 const Thread_queue_Operations *operations; Thread_Control *first; _Thread_queue_Context_set_ISR_level( &queue_context, level ); operations = SEMAPHORE_TQ_OPERATIONS; first = ( *operations->first )( heads ); 40007ed4: ba 17 62 e8 or %i5, 0x2e8, %i5 ! 400156e8 <_Thread_queue_Operations_priority> 40007ed8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 40007edc: 9f c0 40 00 call %g1 40007ee0: c8 27 bf dc st %g4, [ %fp + -36 ] _Thread_queue_Extract_critical( 40007ee4: 96 07 bf dc add %fp, -36, %o3 40007ee8: 94 10 00 08 mov %o0, %o2 40007eec: 92 10 00 1d mov %i5, %o1 40007ef0: 90 06 20 0c add %i0, 0xc, %o0 40007ef4: 40 00 12 bb call 4000c9e0 <_Thread_queue_Extract_critical> 40007ef8: b0 10 20 00 clr %i0 &sem->Queue.Queue, operations, first, &queue_context ); return 0; 40007efc: 81 c7 e0 08 ret 40007f00: 81 e8 00 00 restore POSIX_SEMAPHORE_VALIDATE_OBJECT( _sem ); 40007f04: 40 00 22 cd call 40010a38 <__errno> 40007f08: b0 10 3f ff mov -1, %i0 40007f0c: 82 10 20 16 mov 0x16, %g1 40007f10: c2 22 00 00 st %g1, [ %o0 ] 40007f14: 81 c7 e0 08 ret 40007f18: 81 e8 00 00 restore register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40007f1c: 82 10 00 04 mov %g4, %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40007f20: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007f24: 01 00 00 00 nop } _Sem_Queue_release( sem, level, &queue_context ); rtems_set_errno_and_return_minus_one( EOVERFLOW ); 40007f28: 40 00 22 c4 call 40010a38 <__errno> 40007f2c: b0 10 3f ff mov -1, %i0 ! ffffffff 40007f30: 82 10 20 8b mov 0x8b, %g1 40007f34: c2 22 00 00 st %g1, [ %o0 ] } 40007f38: 81 c7 e0 08 ret 40007f3c: 81 e8 00 00 restore =============================================================================== 40009080 : int sem_timedwait( sem_t *__restrict _sem, const struct timespec *__restrict abstime ) { 40009080: 9d e3 bf 78 save %sp, -136, %sp Thread_queue_Context queue_context; ISR_Level level; Thread_Control *executing; unsigned int count; POSIX_SEMAPHORE_VALIDATE_OBJECT( _sem ); 40009084: 80 a6 20 00 cmp %i0, 0 40009088: 02 80 00 2a be 40009130 4000908c: 03 17 4d 9f sethi %hi(0x5d367c00), %g1 40009090: c4 06 00 00 ld [ %i0 ], %g2 40009094: 82 10 63 e7 or %g1, 0x3e7, %g1 40009098: 82 1e 00 01 xor %i0, %g1, %g1 4000909c: 80 a0 40 02 cmp %g1, %g2 400090a0: 12 80 00 24 bne 40009130 400090a4: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400090a8: 91 d0 20 09 ta 9 <== NOT EXECUTED return psr; 400090ac: 86 10 00 01 mov %g1, %g3 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; 400090b0: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 if ( __predict_true( count > 0 ) ) { 400090b4: 80 a0 a0 00 cmp %g2, 0 400090b8: 02 80 00 07 be 400090d4 400090bc: 84 00 bf ff add %g2, -1, %g2 sem->count = count - 1; 400090c0: c4 26 20 18 st %g2, [ %i0 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400090c4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400090c8: 01 00 00 00 nop _Sem_Queue_release( sem, level, &queue_context ); return 0; 400090cc: 81 c7 e0 08 ret 400090d0: 91 e8 20 00 restore %g0, 0, %o0 queue_context->thread_state = thread_state; 400090d4: 82 10 20 02 mov 2, %g1 Thread_queue_Context *queue_context ) { Thread_Control *executing; executing = _Thread_Executing; 400090d8: fa 01 a0 20 ld [ %g6 + 0x20 ], %i5 400090dc: c2 27 bf e0 st %g1, [ %fp + -32 ] queue_context->enqueue_callout = _Thread_queue_Add_timeout_realtime_timespec; 400090e0: 03 10 00 3c sethi %hi(0x4000f000), %g1 400090e4: 82 10 60 14 or %g1, 0x14, %g1 ! 4000f014 <_Thread_queue_Add_timeout_realtime_timespec> _Thread_queue_Context_set_enqueue_timeout_realtime_timespec( &queue_context, abstime ); _Thread_queue_Context_set_ISR_level( &queue_context, level ); _Thread_queue_Enqueue( 400090e8: 94 10 00 1d mov %i5, %o2 400090ec: 90 06 20 0c add %i0, 0xc, %o0 queue_context->Timeout.arg = abstime; 400090f0: f2 27 bf e8 st %i1, [ %fp + -24 ] 400090f4: 96 07 bf dc add %fp, -36, %o3 400090f8: c6 27 bf dc st %g3, [ %fp + -36 ] 400090fc: 13 10 00 52 sethi %hi(0x40014800), %o1 queue_context->enqueue_callout = _Thread_queue_Add_timeout_realtime_timespec; 40009100: c2 27 bf e4 st %g1, [ %fp + -28 ] 40009104: 40 00 13 b9 call 4000dfe8 <_Thread_queue_Enqueue> 40009108: 92 12 61 40 or %o1, 0x140, %o1 4000910c: fa 07 60 4c ld [ %i5 + 0x4c ], %i5 if ( status == STATUS_SUCCESSFUL ) { 40009110: 80 a7 60 00 cmp %i5, 0 40009114: 02 80 00 0b be 40009140 <== NEVER TAKEN 40009118: b0 10 20 00 clr %i0 rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) ); 4000911c: 40 00 24 99 call 40012380 <__errno> 40009120: bb 3f 60 08 sra %i5, 8, %i5 40009124: fa 22 00 00 st %i5, [ %o0 ] &queue_context ); status = _Thread_Wait_get_status( executing ); return _POSIX_Zero_or_minus_one_plus_errno( status ); } } 40009128: 81 c7 e0 08 ret 4000912c: 91 e8 3f ff restore %g0, -1, %o0 POSIX_SEMAPHORE_VALIDATE_OBJECT( _sem ); 40009130: 40 00 24 94 call 40012380 <__errno> 40009134: b0 10 3f ff mov -1, %i0 40009138: 82 10 20 16 mov 0x16, %g1 4000913c: c2 22 00 00 st %g1, [ %o0 ] 40009140: 81 c7 e0 08 ret 40009144: 81 e8 00 00 restore =============================================================================== 4000ba58 : #endif #include int sem_trywait( sem_t *_sem ) { 4000ba58: 9d e3 bf a0 save %sp, -96, %sp Sem_Control *sem; Thread_queue_Context queue_context; ISR_Level level; unsigned int count; POSIX_SEMAPHORE_VALIDATE_OBJECT( _sem ); 4000ba5c: 80 a6 20 00 cmp %i0, 0 4000ba60: 02 80 00 1a be 4000bac8 4000ba64: 03 17 4d 9f sethi %hi(0x5d367c00), %g1 4000ba68: c4 06 00 00 ld [ %i0 ], %g2 4000ba6c: 82 10 63 e7 or %g1, 0x3e7, %g1 4000ba70: 82 1e 00 01 xor %i0, %g1, %g1 4000ba74: 80 a0 40 02 cmp %g1, %g2 4000ba78: 12 80 00 14 bne 4000bac8 4000ba7c: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000ba80: 91 d0 20 09 ta 9 <== NOT EXECUTED sem = _Sem_Get( &_sem->_Semaphore ); _Thread_queue_Context_initialize( &queue_context ); _Thread_queue_Context_ISR_disable( &queue_context, level ); _Sem_Queue_acquire_critical( sem, &queue_context ); count = sem->count; 4000ba84: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 if ( __predict_true( count > 0 ) ) { 4000ba88: 80 a0 a0 00 cmp %g2, 0 4000ba8c: 02 80 00 07 be 4000baa8 4000ba90: 84 00 bf ff add %g2, -1, %g2 sem->count = count - 1; 4000ba94: c4 26 20 18 st %g2, [ %i0 + 0x18 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000ba98: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000ba9c: 01 00 00 00 nop _Sem_Queue_release( sem, level, &queue_context ); return 0; 4000baa0: 81 c7 e0 08 ret 4000baa4: 91 e8 20 00 restore %g0, 0, %o0 4000baa8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000baac: 01 00 00 00 nop } else { _Sem_Queue_release( sem, level, &queue_context ); rtems_set_errno_and_return_minus_one( EAGAIN ); 4000bab0: 40 00 21 6d call 40014064 <__errno> 4000bab4: b0 10 3f ff mov -1, %i0 ! ffffffff 4000bab8: 82 10 20 0b mov 0xb, %g1 4000babc: c2 22 00 00 st %g1, [ %o0 ] } } 4000bac0: 81 c7 e0 08 ret 4000bac4: 81 e8 00 00 restore POSIX_SEMAPHORE_VALIDATE_OBJECT( _sem ); 4000bac8: 40 00 21 67 call 40014064 <__errno> 4000bacc: b0 10 3f ff mov -1, %i0 4000bad0: 82 10 20 16 mov 0x16, %g1 4000bad4: c2 22 00 00 st %g1, [ %o0 ] 4000bad8: 81 c7 e0 08 ret 4000badc: 81 e8 00 00 restore =============================================================================== 40007b08 : } return 0; } int shm_open( const char *name, int oflag, mode_t mode ) { 40007b08: 9d e3 bf 88 save %sp, -120, %sp if ( ( oflag & O_ACCMODE ) != O_RDONLY && ( oflag & O_ACCMODE ) != O_RDWR ) { 40007b0c: 82 0e 60 03 and %i1, 3, %g1 40007b10: 82 18 60 02 xor %g1, 2, %g1 40007b14: 80 a0 00 01 cmp %g0, %g1 40007b18: 82 40 20 00 addx %g0, 0, %g1 40007b1c: 80 8e 60 01 btst 1, %i1 40007b20: 12 80 00 9d bne 40007d94 <== NEVER TAKEN 40007b24: 80 8e 71 fd btst -3587, %i1 if ( ( oflag & ~( O_RDONLY | O_RDWR | O_CREAT | O_EXCL | O_TRUNC ) ) != 0 ) { 40007b28: 12 80 00 9b bne 40007d94 <== NEVER TAKEN 40007b2c: a0 8e 64 00 andcc %i1, 0x400, %l0 if ( ( oflag & O_TRUNC ) != 0 && ( oflag & O_ACCMODE ) != O_RDWR ) { 40007b30: 02 80 00 04 be 40007b40 <== ALWAYS TAKEN 40007b34: 80 a0 60 00 cmp %g1, 0 40007b38: 12 80 00 97 bne 40007d94 <== NOT EXECUTED 40007b3c: 01 00 00 00 nop <== NOT EXECUTED if ( shm_check_oflag( oflag ) != 0 ) { return -1; } iop = rtems_libio_allocate(); 40007b40: 7f ff f6 3a call 40005428 40007b44: 01 00 00 00 nop if ( iop == NULL ) { 40007b48: ba 92 20 00 orcc %o0, 0, %i5 40007b4c: 02 80 00 9c be 40007dbc <== NEVER TAKEN 40007b50: 01 00 00 00 nop _RTEMS_Lock_allocator(); 40007b54: 40 00 01 8b call 40008180 <_RTEMS_Lock_allocator> 40007b58: 37 10 00 7d sethi %hi(0x4001f400), %i3 return (POSIX_Shm_Control *) _Objects_Get_by_name( 40007b5c: 96 07 bf ec add %fp, -20, %o3 40007b60: 94 07 bf e8 add %fp, -24, %o2 40007b64: 92 10 00 18 mov %i0, %o1 40007b68: 40 00 0a 53 call 4000a4b4 <_Objects_Get_by_name> 40007b6c: 90 16 e0 34 or %i3, 0x34, %o0 } _Objects_Allocator_lock(); shm = _POSIX_Shm_Get_by_name( name, &len, &obj_err ); if ( shm == NULL ) { 40007b70: b8 92 20 00 orcc %o0, 0, %i4 40007b74: 02 80 00 20 be 40007bf4 <== ALWAYS TAKEN 40007b78: c2 07 bf ec ld [ %fp + -20 ], %g1 default: shm = shm_allocate(name, len, oflag, mode, &err); break; } } else { /* shm exists */ if ( ( oflag & ( O_EXCL | O_CREAT ) ) == ( O_EXCL | O_CREAT ) ) { 40007b7c: b2 0e 6a 00 and %i1, 0xa00, %i1 <== NOT EXECUTED 40007b80: 80 a6 6a 00 cmp %i1, 0xa00 <== NOT EXECUTED 40007b84: 32 80 00 0c bne,a 40007bb4 <== NOT EXECUTED 40007b88: d6 17 20 2e lduh [ %i4 + 0x2e ], %o3 <== NOT EXECUTED _RTEMS_Unlock_allocator(); 40007b8c: 40 00 01 82 call 40008194 <_RTEMS_Unlock_allocator> <== NOT EXECUTED 40007b90: b8 10 20 11 mov 0x11, %i4 <== NOT EXECUTED ++shm->reference_count; } } _Objects_Allocator_unlock(); if ( err != 0 ) { rtems_libio_free( iop ); 40007b94: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 40007b98: 7f ff f6 39 call 4000547c <== NOT EXECUTED 40007b9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( err ); 40007ba0: 40 00 22 2e call 40010458 <__errno> <== NOT EXECUTED 40007ba4: 01 00 00 00 nop <== NOT EXECUTED 40007ba8: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED 40007bac: 81 c7 e0 08 ret <== NOT EXECUTED 40007bb0: 81 e8 00 00 restore <== NOT EXECUTED return rtems_filesystem_check_access( flags, shm->mode, shm->uid, shm->gid ); 40007bb4: d4 17 20 2c lduh [ %i4 + 0x2c ], %o2 <== NOT EXECUTED 40007bb8: d2 07 20 30 ld [ %i4 + 0x30 ], %o1 <== NOT EXECUTED 40007bbc: 7f ff f8 f3 call 40005f88 <== NOT EXECUTED 40007bc0: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED } else if ( !shm_access_ok( shm, oflag ) ) { 40007bc4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007bc8: 32 80 00 5f bne,a 40007d44 <== NOT EXECUTED 40007bcc: c2 07 20 1c ld [ %i4 + 0x1c ], %g1 <== NOT EXECUTED 40007bd0: 40 00 01 71 call 40008194 <_RTEMS_Unlock_allocator> <== NOT EXECUTED 40007bd4: b8 10 20 0d mov 0xd, %i4 <== NOT EXECUTED rtems_libio_free( iop ); 40007bd8: 7f ff f6 29 call 4000547c <== NOT EXECUTED 40007bdc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( err ); 40007be0: 40 00 22 1e call 40010458 <__errno> <== NOT EXECUTED 40007be4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007be8: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED 40007bec: 81 c7 e0 08 ret <== NOT EXECUTED 40007bf0: 81 e8 00 00 restore <== NOT EXECUTED switch ( obj_err ) { 40007bf4: 80 a0 60 00 cmp %g1, 0 40007bf8: 02 80 00 5f be 40007d74 <== NEVER TAKEN 40007bfc: 80 a0 60 01 cmp %g1, 1 40007c00: 02 80 00 61 be 40007d84 <== NEVER TAKEN 40007c04: 01 00 00 00 nop if ( name_arg[0] != '/' ) { 40007c08: c2 4e 00 00 ldsb [ %i0 ], %g1 40007c0c: 80 a0 60 2f cmp %g1, 0x2f 40007c10: 12 80 00 59 bne 40007d74 <== NEVER TAKEN 40007c14: 80 8e 62 00 btst 0x200, %i1 if ( ( oflag & O_CREAT ) != O_CREAT ) { 40007c18: 02 80 00 65 be 40007dac <== NEVER TAKEN 40007c1c: d2 07 bf e8 ld [ %fp + -24 ], %o1 name = _Workspace_String_duplicate( name_arg, name_len ); 40007c20: 40 00 17 1a call 4000d888 <_Workspace_String_duplicate> 40007c24: 90 10 00 18 mov %i0, %o0 if ( name == NULL ) { 40007c28: b0 92 20 00 orcc %o0, 0, %i0 40007c2c: 02 80 00 6a be 40007dd4 <== NEVER TAKEN 40007c30: 01 00 00 00 nop return (POSIX_Shm_Control *) 40007c34: 40 00 08 99 call 40009e98 <_Objects_Allocate_unprotected> 40007c38: 90 16 e0 34 or %i3, 0x34, %o0 if ( shm == NULL ) { 40007c3c: b8 92 20 00 orcc %o0, 0, %i4 40007c40: 02 80 00 69 be 40007de4 <== NEVER TAKEN 40007c44: 92 10 20 00 clr %o1 gettimeofday( &tv, 0 ); 40007c48: 7f ff f5 9b call 400052b4 40007c4c: 90 07 bf f0 add %fp, -16, %o0 shm->reference_count = 1; 40007c50: 82 10 20 01 mov 1, %g1 shm->shm_object.handle = NULL; 40007c54: c0 27 20 20 clr [ %i4 + 0x20 ] information->local_table[ index ] = the_object; 40007c58: b6 16 e0 34 or %i3, 0x34, %i3 shm->reference_count = 1; 40007c5c: c2 27 20 1c st %g1, [ %i4 + 0x1c ] shm->shm_object.ops = &_POSIX_Shm_Object_operations; 40007c60: 03 10 00 6a sethi %hi(0x4001a800), %g1 shm->shm_object.size = 0; 40007c64: c0 27 20 24 clr [ %i4 + 0x24 ] shm->shm_object.ops = &_POSIX_Shm_Object_operations; 40007c68: 82 10 60 4c or %g1, 0x4c, %g1 shm->mode = mode & ~rtems_filesystem_umask; 40007c6c: 7f ff f8 a4 call 40005efc 40007c70: c2 27 20 28 st %g1, [ %i4 + 0x28 ] 40007c74: c2 02 20 08 ld [ %o0 + 8 ], %g1 40007c78: b4 2e 80 01 andn %i2, %g1, %i2 shm->oflag = oflag; 40007c7c: f2 27 20 34 st %i1, [ %i4 + 0x34 ] shm->uid = geteuid(); 40007c80: 7f ff f5 85 call 40005294 40007c84: f4 27 20 30 st %i2, [ %i4 + 0x30 ] shm->gid = getegid(); 40007c88: 7f ff f5 7d call 4000527c 40007c8c: d0 37 20 2c sth %o0, [ %i4 + 0x2c ] shm->atime = (time_t) tv.tv_sec; 40007c90: c4 1f bf f0 ldd [ %fp + -16 ], %g2 40007c94: c2 17 20 0a lduh [ %i4 + 0xa ], %g1 40007c98: c4 3f 20 38 std %g2, [ %i4 + 0x38 ] 40007c9c: 83 28 60 02 sll %g1, 2, %g1 shm->mtime = (time_t) tv.tv_sec; 40007ca0: c4 3f 20 40 std %g2, [ %i4 + 0x40 ] shm->ctime = (time_t) tv.tv_sec; 40007ca4: c4 3f 20 48 std %g2, [ %i4 + 0x48 ] shm->gid = getegid(); 40007ca8: d0 37 20 2e sth %o0, [ %i4 + 0x2e ] the_object->name.name_p = name; 40007cac: f0 27 20 0c st %i0, [ %i4 + 0xc ] information->local_table[ index ] = the_object; 40007cb0: c4 06 e0 1c ld [ %i3 + 0x1c ], %g2 _RTEMS_Unlock_allocator(); 40007cb4: 40 00 01 38 call 40008194 <_RTEMS_Unlock_allocator> 40007cb8: f8 20 80 01 st %i4, [ %g2 + %g1 ] } if ( oflag & O_TRUNC ) { 40007cbc: 80 a4 20 00 cmp %l0, 0 40007cc0: 12 80 00 28 bne 40007d60 <== NEVER TAKEN 40007cc4: 92 10 20 00 clr %o1 <== NOT EXECUTED err = shm_ftruncate( iop, 0 ); (void) err; /* ignore truncate error */ } fd = rtems_libio_iop_to_descriptor( iop ); 40007cc8: 03 2a aa aa sethi %hi(0xaaaaa800), %g1 <== NOT EXECUTED 40007ccc: 82 10 62 ab or %g1, 0x2ab, %g1 ! aaaaaaab <== NOT EXECUTED 40007cd0: 31 10 00 77 sethi %hi(0x4001dc00), %i0 <== NOT EXECUTED 40007cd4: b0 16 23 10 or %i0, 0x310, %i0 ! 4001df10 <== NOT EXECUTED 40007cd8: b0 27 40 18 sub %i5, %i0, %i0 <== NOT EXECUTED 40007cdc: b1 3e 20 04 sra %i0, 4, %i0 <== NOT EXECUTED 40007ce0: b0 5e 00 01 smul %i0, %g1, %i0 <== NOT EXECUTED iop->data0 = fd; iop->data1 = shm; iop->pathinfo.node_access = shm; iop->pathinfo.handlers = &shm_handlers; 40007ce4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 40007ce8: 82 10 62 a8 or %g1, 0x2a8, %g1 ! 4001aea8 <== NOT EXECUTED iop->data0 = fd; 40007cec: f0 27 60 24 st %i0, [ %i5 + 0x24 ] <== NOT EXECUTED iop->pathinfo.handlers = &shm_handlers; 40007cf0: c2 27 60 1c st %g1, [ %i5 + 0x1c ] <== NOT EXECUTED iop->pathinfo.mt_entry = &rtems_filesystem_null_mt_entry; 40007cf4: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED iop->data1 = shm; 40007cf8: f8 27 60 28 st %i4, [ %i5 + 0x28 ] <== NOT EXECUTED iop->pathinfo.mt_entry = &rtems_filesystem_null_mt_entry; 40007cfc: 82 10 62 64 or %g1, 0x264, %g1 <== NOT EXECUTED iop->pathinfo.node_access = shm; 40007d00: f8 27 60 14 st %i4, [ %i5 + 0x14 ] <== NOT EXECUTED iop->pathinfo.mt_entry = &rtems_filesystem_null_mt_entry; 40007d04: c2 27 60 20 st %g1, [ %i5 + 0x20 ] <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40007d08: 91 d0 20 09 ta 9 <== NOT EXECUTED &loc->mt_entry->location_chain, 40007d0c: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 <== NOT EXECUTED old_last = tail->previous; 40007d10: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 <== NOT EXECUTED return &the_chain->Tail.Node; 40007d14: 88 00 a0 18 add %g2, 0x18, %g4 <== NOT EXECUTED the_node->next = tail; 40007d18: c8 27 60 0c st %g4, [ %i5 + 0xc ] <== NOT EXECUTED rtems_chain_append_unprotected( 40007d1c: 88 07 60 0c add %i5, 0xc, %g4 <== NOT EXECUTED tail->previous = the_node; 40007d20: c8 20 a0 1c st %g4, [ %g2 + 0x1c ] <== NOT EXECUTED old_last->next = the_node; 40007d24: c8 20 c0 00 st %g4, [ %g3 ] <== NOT EXECUTED the_node->previous = old_last; 40007d28: c6 27 60 10 st %g3, [ %i5 + 0x10 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40007d2c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007d30: 01 00 00 00 nop *obj = desired; 40007d34: 82 10 29 06 mov 0x906, %g1 ! 906 40007d38: c2 27 60 08 st %g1, [ %i5 + 8 ] } rtems_libio_iop_flags_initialize( iop, flags ); return fd; } 40007d3c: 81 c7 e0 08 ret 40007d40: 81 e8 00 00 restore ++shm->reference_count; 40007d44: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007d48: 40 00 01 13 call 40008194 <_RTEMS_Unlock_allocator> <== NOT EXECUTED 40007d4c: c2 27 20 1c st %g1, [ %i4 + 0x1c ] <== NOT EXECUTED if ( oflag & O_TRUNC ) { 40007d50: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40007d54: 22 bf ff de be,a 40007ccc <== NOT EXECUTED 40007d58: 03 2a aa aa sethi %hi(0xaaaaa800), %g1 <== NOT EXECUTED err = shm_ftruncate( iop, 0 ); 40007d5c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007d60: 94 10 20 00 clr %o2 <== NOT EXECUTED 40007d64: 7f ff ff 11 call 400079a8 <== NOT EXECUTED 40007d68: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED fd = rtems_libio_iop_to_descriptor( iop ); 40007d6c: 10 bf ff d8 b 40007ccc <== NOT EXECUTED 40007d70: 03 2a aa aa sethi %hi(0xaaaaa800), %g1 <== NOT EXECUTED 40007d74: 40 00 01 08 call 40008194 <_RTEMS_Unlock_allocator> <== NOT EXECUTED 40007d78: b8 10 20 16 mov 0x16, %i4 <== NOT EXECUTED rtems_libio_free( iop ); 40007d7c: 10 bf ff 87 b 40007b98 <== NOT EXECUTED 40007d80: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 40007d84: 40 00 01 04 call 40008194 <_RTEMS_Unlock_allocator> <== NOT EXECUTED 40007d88: b8 10 20 5b mov 0x5b, %i4 <== NOT EXECUTED 40007d8c: 10 bf ff 83 b 40007b98 <== NOT EXECUTED 40007d90: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); 40007d94: 40 00 21 b1 call 40010458 <__errno> <== NOT EXECUTED 40007d98: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007d9c: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 40007da0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007da4: 81 c7 e0 08 ret <== NOT EXECUTED 40007da8: 81 e8 00 00 restore <== NOT EXECUTED 40007dac: 40 00 00 fa call 40008194 <_RTEMS_Unlock_allocator> <== NOT EXECUTED 40007db0: b8 10 20 02 mov 2, %i4 <== NOT EXECUTED rtems_libio_free( iop ); 40007db4: 10 bf ff 79 b 40007b98 <== NOT EXECUTED 40007db8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EMFILE ); 40007dbc: 40 00 21 a7 call 40010458 <__errno> <== NOT EXECUTED 40007dc0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007dc4: 82 10 20 18 mov 0x18, %g1 <== NOT EXECUTED 40007dc8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007dcc: 81 c7 e0 08 ret <== NOT EXECUTED 40007dd0: 81 e8 00 00 restore <== NOT EXECUTED 40007dd4: 40 00 00 f0 call 40008194 <_RTEMS_Unlock_allocator> <== NOT EXECUTED 40007dd8: b8 10 20 1c mov 0x1c, %i4 <== NOT EXECUTED rtems_libio_free( iop ); 40007ddc: 10 bf ff 6f b 40007b98 <== NOT EXECUTED 40007de0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED _Workspace_Free( name ); 40007de4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40007de8: 40 00 16 93 call 4000d834 <_Workspace_Free> <== NOT EXECUTED 40007dec: b8 10 20 17 mov 0x17, %i4 <== NOT EXECUTED 40007df0: 40 00 00 e9 call 40008194 <_RTEMS_Unlock_allocator> <== NOT EXECUTED 40007df4: 01 00 00 00 nop <== NOT EXECUTED rtems_libio_free( iop ); 40007df8: 10 bf ff 68 b 40007b98 <== NOT EXECUTED 40007dfc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED =============================================================================== 40007150 : int sigaction( int sig, const struct sigaction *__restrict act, struct sigaction *__restrict oact ) { 40007150: 9d e3 bf 98 save %sp, -104, %sp Thread_queue_Context queue_context; if ( !sig ) 40007154: 80 a6 20 00 cmp %i0, 0 40007158: 02 80 00 43 be 40007264 4000715c: 82 06 3f ff add %i0, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40007160: 80 a0 60 1f cmp %g1, 0x1f 40007164: 18 80 00 40 bgu 40007264 40007168: 80 a6 20 09 cmp %i0, 9 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 4000716c: 02 80 00 3e be 40007264 40007170: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40007174: 91 d0 20 09 ta 9 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_queue_Context_initialize( &queue_context ); _POSIX_signals_Acquire( &queue_context ); if ( oact ) 40007178: 80 a6 a0 00 cmp %i2, 0 4000717c: 02 80 00 0d be 400071b0 40007180: 85 2e 20 01 sll %i0, 1, %g2 *oact = _POSIX_signals_Vectors[ sig ]; 40007184: 07 10 00 74 sethi %hi(0x4001d000), %g3 40007188: 84 00 80 18 add %g2, %i0, %g2 4000718c: 86 10 e3 88 or %g3, 0x388, %g3 40007190: 85 28 a0 02 sll %g2, 2, %g2 40007194: fa 00 c0 02 ld [ %g3 + %g2 ], %i5 40007198: 88 00 c0 02 add %g3, %g2, %g4 4000719c: c6 01 20 04 ld [ %g4 + 4 ], %g3 400071a0: c4 01 20 08 ld [ %g4 + 8 ], %g2 400071a4: fa 26 80 00 st %i5, [ %i2 ] 400071a8: c6 26 a0 04 st %g3, [ %i2 + 4 ] 400071ac: c4 26 a0 08 st %g2, [ %i2 + 8 ] /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 400071b0: 80 a6 60 00 cmp %i1, 0 400071b4: 02 80 00 16 be 4000720c <== NEVER TAKEN 400071b8: 01 00 00 00 nop /* * 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 ) { 400071bc: c4 06 60 08 ld [ %i1 + 8 ], %g2 400071c0: 80 a0 a0 00 cmp %g2, 0 400071c4: 02 80 00 16 be 4000721c 400071c8: 85 2e 20 01 sll %i0, 1, %g2 400071cc: c2 27 bf fc st %g1, [ %fp + -4 ] _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 400071d0: 40 00 1e aa call 4000ec78 <_POSIX_signals_Clear_process_signals> 400071d4: 90 10 00 18 mov %i0, %o0 _POSIX_signals_Vectors[ sig ] = *act; 400071d8: 87 2e 20 01 sll %i0, 1, %g3 <== NOT EXECUTED 400071dc: fa 06 40 00 ld [ %i1 ], %i5 <== NOT EXECUTED 400071e0: b0 00 c0 18 add %g3, %i0, %i0 <== NOT EXECUTED 400071e4: 05 10 00 74 sethi %hi(0x4001d000), %g2 <== NOT EXECUTED 400071e8: b1 2e 20 02 sll %i0, 2, %i0 <== NOT EXECUTED 400071ec: 84 10 a3 88 or %g2, 0x388, %g2 <== NOT EXECUTED 400071f0: c8 06 60 04 ld [ %i1 + 4 ], %g4 <== NOT EXECUTED 400071f4: fa 20 80 18 st %i5, [ %g2 + %i0 ] <== NOT EXECUTED 400071f8: b0 00 80 18 add %g2, %i0, %i0 <== NOT EXECUTED 400071fc: c6 06 60 08 ld [ %i1 + 8 ], %g3 <== NOT EXECUTED 40007200: c8 26 20 04 st %g4, [ %i0 + 4 ] <== NOT EXECUTED 40007204: c6 26 20 08 st %g3, [ %i0 + 8 ] <== NOT EXECUTED 40007208: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000720c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007210: 01 00 00 00 nop } _POSIX_signals_Release( &queue_context ); return 0; } 40007214: 81 c7 e0 08 ret 40007218: 91 e8 20 00 restore %g0, 0, %o0 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 4000721c: 07 10 00 66 sethi %hi(0x40019800), %g3 <== NOT EXECUTED 40007220: b0 00 80 18 add %g2, %i0, %i0 <== NOT EXECUTED 40007224: 86 10 e2 a0 or %g3, 0x2a0, %g3 <== NOT EXECUTED 40007228: b1 2e 20 02 sll %i0, 2, %i0 <== NOT EXECUTED 4000722c: fa 00 c0 18 ld [ %g3 + %i0 ], %i5 <== NOT EXECUTED 40007230: 05 10 00 74 sethi %hi(0x4001d000), %g2 <== NOT EXECUTED 40007234: 86 00 c0 18 add %g3, %i0, %g3 <== NOT EXECUTED 40007238: 84 10 a3 88 or %g2, 0x388, %g2 <== NOT EXECUTED 4000723c: c8 00 e0 04 ld [ %g3 + 4 ], %g4 <== NOT EXECUTED 40007240: fa 20 80 18 st %i5, [ %g2 + %i0 ] <== NOT EXECUTED 40007244: b0 00 80 18 add %g2, %i0, %i0 <== NOT EXECUTED 40007248: c6 00 e0 08 ld [ %g3 + 8 ], %g3 <== NOT EXECUTED 4000724c: c8 26 20 04 st %g4, [ %i0 + 4 ] <== NOT EXECUTED 40007250: c6 26 20 08 st %g3, [ %i0 + 8 ] <== NOT EXECUTED 40007254: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40007258: 01 00 00 00 nop } 4000725c: 81 c7 e0 08 ret 40007260: 91 e8 20 00 restore %g0, 0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40007264: 40 00 23 c9 call 40010188 <__errno> 40007268: b0 10 3f ff mov -1, %i0 4000726c: 82 10 20 16 mov 0x16, %g1 40007270: c2 22 00 00 st %g1, [ %o0 ] 40007274: 81 c7 e0 08 ret 40007278: 81 e8 00 00 restore =============================================================================== 400073e4 : int sigtimedwait( const sigset_t *__restrict set, siginfo_t *__restrict info, const struct timespec *__restrict timeout ) { 400073e4: 9d e3 bf 58 save %sp, -168, %sp int error; /* * Error check parameters before disabling interrupts. */ if ( !set ) 400073e8: b8 96 20 00 orcc %i0, 0, %i4 400073ec: 02 80 00 9b be 40007658 400073f0: 80 a6 a0 00 cmp %i2, 0 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ if ( timeout != NULL ) { 400073f4: 02 80 00 50 be 40007534 400073f8: 03 10 00 2f sethi %hi(0x4000bc00), %g1 const struct timespec *end; _Timecounter_Nanouptime( &uptime ); 400073fc: 40 00 07 bb call 400092e8 <_Timecounter_Nanouptime> 40007400: 90 07 bf c8 add %fp, -56, %o0 && (unsigned long) ts->tv_nsec < WATCHDOG_NANOSECONDS_PER_SECOND; 40007404: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40007408: 05 0e e6 b2 sethi %hi(0x3b9ac800), %g2 4000740c: 84 10 a1 ff or %g2, 0x1ff, %g2 ! 3b9ac9ff 40007410: 80 a0 40 02 cmp %g1, %g2 40007414: 28 80 00 37 bleu,a 400074f0 40007418: d4 1e 80 00 ldd [ %i2 ], %o2 return NULL; 4000741c: 82 10 20 00 clr %g1 queue_context->Timeout.arg = abstime; 40007420: c2 27 bf e8 st %g1, [ %fp + -24 ] queue_context->enqueue_callout = 40007424: 03 10 00 32 sethi %hi(0x4000c800), %g1 40007428: 82 10 62 80 or %g1, 0x280, %g1 ! 4000ca80 <_Thread_queue_Add_timeout_monotonic_timespec> /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 4000742c: 80 a6 60 00 cmp %i1, 0 40007430: 02 80 00 45 be 40007544 <== NEVER TAKEN 40007434: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED 40007438: fa 01 a0 20 ld [ %g6 + 0x20 ], %i5 <== NOT EXECUTED executing = _Thread_Get_executing(); api = executing->API_Extensions[ THREAD_API_POSIX ]; 4000743c: f6 07 61 5c ld [ %i5 + 0x15c ], %i3 <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40007440: 91 d0 20 09 ta 9 <== NOT EXECUTED Thread_queue_Control *the_thread_queue, Thread_queue_Context *queue_context ) { (void) the_thread_queue; _ISR_lock_ISR_disable( &queue_context->Lock_context.Lock_context ); 40007444: c2 27 bf dc st %g1, [ %fp + -36 ] */ /* API signals pending? */ _POSIX_signals_Acquire( &queue_context ); if ( *set & api->signals_pending ) { 40007448: c2 07 00 00 ld [ %i4 ], %g1 4000744c: d0 06 e0 6c ld [ %i3 + 0x6c ], %o0 40007450: 80 88 40 08 btst %g1, %o0 40007454: 12 80 00 46 bne 4000756c 40007458: 05 10 00 77 sethi %hi(0x4001dc00), %g2 return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 4000745c: d0 00 a0 14 ld [ %g2 + 0x14 ], %o0 ! 4001dc14 <_POSIX_signals_Pending> 40007460: 80 88 40 08 btst %g1, %o0 40007464: 12 80 00 55 bne 400075b8 40007468: 84 10 3f ff mov -1, %g2 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 4000746c: c4 26 40 00 st %g2, [ %i1 ] executing->Wait.return_argument = the_info; _Thread_queue_Context_set_thread_state( &queue_context, STATES_WAITING_FOR_SIGNAL | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_queue_Enqueue( 40007470: 94 10 00 1d mov %i5, %o2 executing->Wait.option = *set; 40007474: c2 27 60 48 st %g1, [ %i5 + 0x48 ] queue_context->thread_state = thread_state; 40007478: 03 04 00 01 sethi %hi(0x10000400), %g1 executing->Wait.return_argument = the_info; 4000747c: f2 27 60 40 st %i1, [ %i5 + 0x40 ] _Thread_queue_Enqueue( 40007480: 96 07 bf dc add %fp, -36, %o3 40007484: c2 27 bf e0 st %g1, [ %fp + -32 ] 40007488: 13 10 00 67 sethi %hi(0x40019c00), %o1 4000748c: 11 10 00 6f sethi %hi(0x4001bc00), %o0 40007490: 92 12 63 24 or %o1, 0x324, %o1 40007494: 40 00 12 0a call 4000bcbc <_Thread_queue_Enqueue> 40007498: 90 12 21 a4 or %o0, 0x1a4, %o0 /* * When the thread is set free by a signal, it is need to eliminate * the signal. */ _POSIX_signals_Clear_signals( 4000749c: d2 06 40 00 ld [ %i1 ], %o1 400074a0: 9a 10 20 01 mov 1, %o5 400074a4: 98 10 20 00 clr %o4 400074a8: 96 10 20 00 clr %o3 400074ac: 94 10 00 19 mov %i1, %o2 400074b0: 40 00 1f a0 call 4000f330 <_POSIX_signals_Clear_signals> 400074b4: 90 10 00 1b mov %i3, %o0 return _POSIX_Get_by_name_error_table[ error ]; } RTEMS_INLINE_ROUTINE int _POSIX_Get_error( Status_Control status ) { return STATUS_GET_POSIX( status ); 400074b8: fa 07 60 4c ld [ %i5 + 0x4c ], %i5 400074bc: bb 3f 60 08 sra %i5, 8, %i5 * was not in our set. */ error = _POSIX_Get_error_after_wait( executing ); if ( 400074c0: 80 a7 60 04 cmp %i5, 4 400074c4: 12 80 00 5d bne 40007638 400074c8: 82 10 20 01 mov 1, %g1 error != EINTR || ( *set & signo_to_mask( the_info->si_signo ) ) == 0 400074cc: f0 06 40 00 ld [ %i1 ], %i0 400074d0: c4 07 00 00 ld [ %i4 ], %g2 400074d4: 86 06 3f ff add %i0, -1, %g3 400074d8: 83 28 40 03 sll %g1, %g3, %g1 400074dc: 80 88 40 02 btst %g1, %g2 400074e0: 02 80 00 59 be 40007644 400074e4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( error ); } return the_info->si_signo; } 400074e8: 81 c7 e0 08 ret 400074ec: 81 e8 00 00 restore return _Watchdog_Is_valid_timespec( ts ) && ts->tv_sec >= 0; 400074f0: 80 a2 a0 00 cmp %o2, 0 400074f4: 06 bf ff ca bl 4000741c <== NEVER TAKEN 400074f8: c6 07 bf d0 ld [ %fp + -48 ], %g3 sec = (uint64_t) now->tv_sec; 400074fc: f4 1f bf c8 ldd [ %fp + -56 ], %i2 sec += (uint64_t) delta->tv_sec; 40007500: 9a 82 c0 1b addcc %o3, %i3, %o5 40007504: 98 42 80 1a addx %o2, %i2, %o4 now->tv_nsec += delta->tv_nsec; 40007508: 82 00 40 03 add %g1, %g3, %g1 if ( now->tv_nsec >= WATCHDOG_NANOSECONDS_PER_SECOND ) { 4000750c: 80 a0 40 02 cmp %g1, %g2 40007510: 34 80 00 3d bg,a 40007604 <== NEVER TAKEN 40007514: 05 31 19 4d sethi %hi(0xc4653400), %g2 <== NOT EXECUTED if ( sec <= INT64_MAX ) { 40007518: 80 a3 20 00 cmp %o4, 0 4000751c: 06 80 00 41 bl 40007620 <== NEVER TAKEN 40007520: c2 27 bf d0 st %g1, [ %fp + -48 ] now->tv_sec = sec; 40007524: d8 27 bf c8 st %o4, [ %fp + -56 ] return now; 40007528: 82 07 bf c8 add %fp, -56, %g1 now->tv_sec = sec; 4000752c: 10 bf ff bd b 40007420 40007530: da 27 bf cc st %o5, [ %fp + -52 ] queue_context->enqueue_callout = _Thread_queue_Enqueue_do_nothing_extra; 40007534: 82 10 60 a4 or %g1, 0xa4, %g1 the_info = ( info ) ? info : &signal_information; 40007538: 80 a6 60 00 cmp %i1, 0 4000753c: 12 bf ff bf bne 40007438 40007540: c2 27 bf e4 st %g1, [ %fp + -28 ] 40007544: fa 01 a0 20 ld [ %g6 + 0x20 ], %i5 <== NOT EXECUTED 40007548: b2 07 bf bc add %fp, -68, %i1 <== NOT EXECUTED api = executing->API_Extensions[ THREAD_API_POSIX ]; 4000754c: f6 07 61 5c ld [ %i5 + 0x15c ], %i3 <== NOT EXECUTED 40007550: 91 d0 20 09 ta 9 <== NOT EXECUTED _ISR_lock_ISR_disable( &queue_context->Lock_context.Lock_context ); 40007554: c2 27 bf dc st %g1, [ %fp + -36 ] if ( *set & api->signals_pending ) { 40007558: c2 07 00 00 ld [ %i4 ], %g1 4000755c: d0 06 e0 6c ld [ %i3 + 0x6c ], %o0 40007560: 80 88 40 08 btst %g1, %o0 40007564: 02 bf ff be be 4000745c 40007568: 05 10 00 77 sethi %hi(0x4001dc00), %g2 the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending ); 4000756c: 7f ff ff 78 call 4000734c <_POSIX_signals_Get_lowest> 40007570: 01 00 00 00 nop 40007574: d0 26 40 00 st %o0, [ %i1 ] 40007578: 92 10 00 08 mov %o0, %o1 _POSIX_signals_Clear_signals( 4000757c: 9a 10 20 00 clr %o5 40007580: 98 10 20 00 clr %o4 40007584: 96 10 20 00 clr %o3 40007588: 94 10 00 19 mov %i1, %o2 4000758c: 40 00 1f 69 call 4000f330 <_POSIX_signals_Clear_signals> 40007590: 90 10 00 1b mov %i3, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40007594: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40007598: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000759c: 01 00 00 00 nop the_info->si_code = SI_USER; 400075a0: 82 10 20 01 mov 1, %g1 ! 1 <_TLS_Alignment> the_info->si_value.sival_int = 0; 400075a4: c0 26 60 08 clr [ %i1 + 8 ] the_info->si_code = SI_USER; 400075a8: c2 26 60 04 st %g1, [ %i1 + 4 ] return the_info->si_signo; 400075ac: f0 06 40 00 ld [ %i1 ], %i0 400075b0: 81 c7 e0 08 ret 400075b4: 81 e8 00 00 restore signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); 400075b8: 7f ff ff 65 call 4000734c <_POSIX_signals_Get_lowest> 400075bc: 01 00 00 00 nop _POSIX_signals_Clear_signals( api, signo, the_info, true, false, false ); 400075c0: 9a 10 20 00 clr %o5 ! 0 400075c4: 92 10 00 08 mov %o0, %o1 signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); 400075c8: b0 10 00 08 mov %o0, %i0 _POSIX_signals_Clear_signals( api, signo, the_info, true, false, false ); 400075cc: 98 10 20 00 clr %o4 400075d0: 96 10 20 01 mov 1, %o3 400075d4: 94 10 00 19 mov %i1, %o2 400075d8: 40 00 1f 56 call 4000f330 <_POSIX_signals_Clear_signals> 400075dc: 90 10 00 1b mov %i3, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 400075e0: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400075e4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400075e8: 01 00 00 00 nop the_info->si_code = SI_USER; 400075ec: 82 10 20 01 mov 1, %g1 ! 1 <_TLS_Alignment> the_info->si_signo = signo; 400075f0: f0 26 40 00 st %i0, [ %i1 ] the_info->si_code = SI_USER; 400075f4: c2 26 60 04 st %g1, [ %i1 + 4 ] the_info->si_value.sival_int = 0; 400075f8: c0 26 60 08 clr [ %i1 + 8 ] return signo; 400075fc: 81 c7 e0 08 ret 40007600: 81 e8 00 00 restore now->tv_nsec -= WATCHDOG_NANOSECONDS_PER_SECOND; 40007604: 84 10 a2 00 or %g2, 0x200, %g2 <== NOT EXECUTED 40007608: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED ++sec; 4000760c: 9a 83 60 01 inccc %o5 <== NOT EXECUTED 40007610: 98 43 20 00 addx %o4, 0, %o4 <== NOT EXECUTED if ( sec <= INT64_MAX ) { 40007614: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 40007618: 16 bf ff c3 bge 40007524 <== NOT EXECUTED 4000761c: c2 27 bf d0 st %g1, [ %fp + -48 ] <== NOT EXECUTED now->tv_sec = INT64_MAX; 40007620: 05 1f ff ff sethi %hi(0x7ffffc00), %g2 <== NOT EXECUTED 40007624: 86 10 3f ff mov -1, %g3 <== NOT EXECUTED 40007628: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED return now; 4000762c: 82 07 bf c8 add %fp, -56, %g1 <== NOT EXECUTED now->tv_sec = INT64_MAX; 40007630: 10 bf ff 7c b 40007420 <== NOT EXECUTED 40007634: c4 3f bf c8 std %g2, [ %fp + -56 ] <== NOT EXECUTED if ( error == ETIMEDOUT ) { 40007638: 80 a7 60 74 cmp %i5, 0x74 4000763c: 22 80 00 02 be,a 40007644 40007640: ba 10 20 0b mov 0xb, %i5 rtems_set_errno_and_return_minus_one( error ); 40007644: 40 00 24 62 call 400107cc <__errno> 40007648: b0 10 3f ff mov -1, %i0 4000764c: fa 22 00 00 st %i5, [ %o0 ] 40007650: 81 c7 e0 08 ret 40007654: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); 40007658: 40 00 24 5d call 400107cc <__errno> 4000765c: b0 10 3f ff mov -1, %i0 40007660: 82 10 20 16 mov 0x16, %g1 40007664: c2 22 00 00 st %g1, [ %o0 ] 40007668: 81 c7 e0 08 ret 4000766c: 81 e8 00 00 restore =============================================================================== 4000882c : int sigwait( const sigset_t *__restrict set, int *__restrict sig ) { 4000882c: 9d e3 bf a0 save %sp, -96, %sp int status; status = sigtimedwait( set, NULL, NULL ); 40008830: 94 10 20 00 clr %o2 40008834: 92 10 20 00 clr %o1 40008838: 7f ff ff 56 call 40008590 4000883c: 90 10 00 18 mov %i0, %o0 if ( status != -1 ) { 40008840: 80 a2 3f ff cmp %o0, -1 40008844: 02 80 00 07 be 40008860 40008848: 80 a6 60 00 cmp %i1, 0 if ( sig ) 4000884c: 02 80 00 03 be 40008858 <== NEVER TAKEN 40008850: b0 10 20 00 clr %i0 *sig = status; 40008854: d0 26 40 00 st %o0, [ %i1 ] 40008858: 81 c7 e0 08 ret 4000885c: 81 e8 00 00 restore return 0; } return errno; 40008860: 40 00 24 1e call 400118d8 <__errno> 40008864: 01 00 00 00 nop 40008868: f0 02 00 00 ld [ %o0 ], %i0 } 4000886c: 81 c7 e0 08 ret 40008870: 81 e8 00 00 restore =============================================================================== 400064e0 : */ long sysconf( int name ) { 400064e0: 9d e3 bf a0 save %sp, -96, %sp switch ( name ) { 400064e4: 80 a6 20 0a cmp %i0, 0xa 400064e8: 02 80 00 2f be 400065a4 400064ec: 01 00 00 00 nop 400064f0: 04 80 00 0f ble 4000652c 400064f4: 80 a6 20 04 cmp %i0, 4 400064f8: 80 a6 20 4f cmp %i0, 0x4f 400064fc: 02 80 00 0a be 40006524 <== NEVER TAKEN 40006500: 82 10 20 20 mov 0x20, %g1 40006504: 04 80 00 1a ble 4000656c 40006508: 80 a6 20 8c cmp %i0, 0x8c case _SC_NPROCESSORS_CONF: return (long) rtems_configuration_get_maximum_processors(); case _SC_NPROCESSORS_ONLN: return (long) rtems_get_processor_count(); case _SC_POSIX_26_VERSION: return (long) _POSIX_26_VERSION; 4000650c: 03 00 00 c3 sethi %hi(0x30c00), %g1 switch ( name ) { 40006510: 02 80 00 05 be 40006524 <== NEVER TAKEN 40006514: 82 10 62 78 or %g1, 0x278, %g1 ! 30e78 <_Configuration_Interrupt_stack_size+0x2fe78> 40006518: 80 a6 22 03 cmp %i0, 0x203 4000651c: 12 80 00 0d bne 40006550 <== ALWAYS TAKEN 40006520: 82 10 20 00 clr %g1 return 0; #endif default: rtems_set_errno_and_return_minus_one( EINVAL ); } } 40006524: 81 c7 e0 08 ret 40006528: 91 e8 00 01 restore %g0, %g1, %o0 switch ( name ) { 4000652c: 02 80 00 1b be 40006598 40006530: 03 10 00 42 sethi %hi(0x40010800), %g1 40006534: 04 80 00 13 ble 40006580 40006538: 80 a6 20 08 cmp %i0, 8 4000653c: 02 bf ff fa be 40006524 40006540: 03 00 00 04 sethi %hi(0x1000), %g1 40006544: 80 a6 20 09 cmp %i0, 9 40006548: 02 bf ff f7 be 40006524 <== ALWAYS TAKEN 4000654c: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 40006550: 40 00 21 b7 call 4000ec2c <__errno> 40006554: 01 00 00 00 nop 40006558: 82 10 20 16 mov 0x16, %g1 ! 16 <_TLS_Alignment+0x15> 4000655c: c2 22 00 00 st %g1, [ %o0 ] 40006560: 82 10 3f ff mov -1, %g1 } 40006564: 81 c7 e0 08 ret 40006568: 91 e8 00 01 restore %g0, %g1, %o0 switch ( name ) { 4000656c: 80 a6 20 33 cmp %i0, 0x33 40006570: 12 bf ff f8 bne 40006550 <== NEVER TAKEN 40006574: 82 10 24 00 mov 0x400, %g1 } 40006578: 81 c7 e0 08 ret 4000657c: 91 e8 00 01 restore %g0, %g1, %o0 return (long) rtems_clock_get_ticks_per_second(); 40006580: 03 10 00 42 sethi %hi(0x40010800), %g1 switch ( name ) { 40006584: 80 a6 20 02 cmp %i0, 2 40006588: 12 bf ff f2 bne 40006550 4000658c: c2 00 61 e8 ld [ %g1 + 0x1e8 ], %g1 } 40006590: 81 c7 e0 08 ret 40006594: 91 e8 00 01 restore %g0, %g1, %o0 return rtems_libio_number_iops; 40006598: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 } 4000659c: 81 c7 e0 08 ret 400065a0: 91 e8 00 01 restore %g0, %g1, %o0 return (long) rtems_get_processor_count(); 400065a4: 40 00 00 02 call 400065ac 400065a8: 81 e8 00 00 restore =============================================================================== 40007b3c : int timer_create( clockid_t clock_id, struct sigevent *__restrict evp, timer_t *__restrict timerid ) { 40007b3c: 9d e3 bf a0 save %sp, -96, %sp POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 40007b40: 80 a6 20 01 cmp %i0, 1 40007b44: 12 80 00 43 bne 40007c50 40007b48: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 40007b4c: 02 80 00 41 be 40007c50 40007b50: 80 a6 60 00 cmp %i1, 0 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 40007b54: 02 80 00 35 be 40007c28 40007b58: 3b 10 00 68 sethi %hi(0x4001a000), %i5 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 40007b5c: c2 06 40 00 ld [ %i1 ], %g1 40007b60: 82 00 7f ff add %g1, -1, %g1 40007b64: 80 a0 60 01 cmp %g1, 1 40007b68: 18 80 00 3a bgu 40007c50 <== NEVER TAKEN 40007b6c: 01 00 00 00 nop ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 40007b70: c2 06 60 04 ld [ %i1 + 4 ], %g1 40007b74: 80 a0 60 00 cmp %g1, 0 40007b78: 02 80 00 36 be 40007c50 <== NEVER TAKEN 40007b7c: 82 00 7f ff add %g1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 40007b80: 80 a0 60 1f cmp %g1, 0x1f 40007b84: 18 80 00 33 bgu 40007c50 <== NEVER TAKEN 40007b88: 01 00 00 00 nop * 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 ); 40007b8c: 40 00 0c 53 call 4000acd8 <_Objects_Allocate> 40007b90: 90 17 61 c4 or %i5, 0x1c4, %o0 /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 40007b94: 80 a2 20 00 cmp %o0, 0 40007b98: 02 80 00 34 be 40007c68 <== NEVER TAKEN 40007b9c: 82 10 20 02 mov 2, %g1 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 40007ba0: c2 2a 20 34 stb %g1, [ %o0 + 0x34 ] ptimer->thread_id = _Thread_Get_executing()->Object.id; 40007ba4: c2 01 a0 20 ld [ %g6 + 0x20 ], %g1 40007ba8: c8 00 60 08 ld [ %g1 + 8 ], %g4 if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 40007bac: c6 06 40 00 ld [ %i1 ], %g3 ptimer->inf.sigev_signo = evp->sigev_signo; 40007bb0: c4 06 60 04 ld [ %i1 + 4 ], %g2 ptimer->inf.sigev_value = evp->sigev_value; 40007bb4: c2 06 60 08 ld [ %i1 + 8 ], %g1 ptimer->thread_id = _Thread_Get_executing()->Object.id; 40007bb8: c8 22 20 30 st %g4, [ %o0 + 0x30 ] ptimer->inf.sigev_notify = evp->sigev_notify; 40007bbc: c6 22 20 38 st %g3, [ %o0 + 0x38 ] ptimer->inf.sigev_signo = evp->sigev_signo; 40007bc0: c4 22 20 3c st %g2, [ %o0 + 0x3c ] ptimer->inf.sigev_value = evp->sigev_value; 40007bc4: c2 22 20 40 st %g1, [ %o0 + 0x40 ] RB_COLOR( &the_watchdog->Node.RBTree, Node ) = state; 40007bc8: 84 10 20 02 mov 2, %g2 40007bcc: c4 22 20 1c st %g2, [ %o0 + 0x1c ] the_watchdog->routine = routine; 40007bd0: 05 10 00 1f sethi %hi(0x40007c00), %g2 40007bd4: 84 10 a0 88 or %g2, 0x88, %g2 ! 40007c88 <_POSIX_Timer_TSR> information->local_table[ index ] = the_object; 40007bd8: c6 02 20 08 ld [ %o0 + 8 ], %g3 40007bdc: c2 12 20 0a lduh [ %o0 + 0xa ], %g1 40007be0: c4 22 20 20 st %g2, [ %o0 + 0x20 ] 40007be4: ba 17 61 c4 or %i5, 0x1c4, %i5 } ptimer->overrun = 0; ptimer->timer_data.it_value.tv_sec = 0; 40007be8: c0 22 20 60 clr [ %o0 + 0x60 ] 40007bec: 83 28 60 02 sll %g1, 2, %g1 40007bf0: c0 22 20 64 clr [ %o0 + 0x64 ] _Watchdog_Initialize( &ptimer->Timer, _POSIX_Timer_TSR ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Objects_Allocator_unlock(); return 0; 40007bf4: b0 10 20 00 clr %i0 ptimer->overrun = 0; 40007bf8: c0 22 20 74 clr [ %o0 + 0x74 ] ptimer->timer_data.it_interval.tv_sec = 0; 40007bfc: c0 22 20 50 clr [ %o0 + 0x50 ] 40007c00: c0 22 20 54 clr [ %o0 + 0x54 ] ptimer->timer_data.it_value.tv_nsec = 0; 40007c04: c0 22 20 68 clr [ %o0 + 0x68 ] ptimer->timer_data.it_interval.tv_nsec = 0; 40007c08: c0 22 20 58 clr [ %o0 + 0x58 ] the_object->name.name_u32 = name; 40007c0c: c0 22 20 0c clr [ %o0 + 0xc ] information->local_table[ index ] = the_object; 40007c10: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 40007c14: d0 20 80 01 st %o0, [ %g2 + %g1 ] _RTEMS_Unlock_allocator(); 40007c18: 40 00 04 1a call 40008c80 <_RTEMS_Unlock_allocator> 40007c1c: c6 26 80 00 st %g3, [ %i2 ] } 40007c20: 81 c7 e0 08 ret 40007c24: 81 e8 00 00 restore 40007c28: 40 00 0c 2c call 4000acd8 <_Objects_Allocate> 40007c2c: 90 17 61 c4 or %i5, 0x1c4, %o0 if ( !ptimer ) { 40007c30: 80 a2 20 00 cmp %o0, 0 40007c34: 02 80 00 0d be 40007c68 40007c38: 82 10 20 02 mov 2, %g1 ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 40007c3c: c2 2a 20 34 stb %g1, [ %o0 + 0x34 ] ptimer->thread_id = _Thread_Get_executing()->Object.id; 40007c40: c2 01 a0 20 ld [ %g6 + 0x20 ], %g1 40007c44: c2 00 60 08 ld [ %g1 + 8 ], %g1 40007c48: 10 bf ff e0 b 40007bc8 40007c4c: c2 22 20 30 st %g1, [ %o0 + 0x30 ] rtems_set_errno_and_return_minus_one( EINVAL ); 40007c50: 40 00 27 1c call 400118c0 <__errno> 40007c54: b0 10 3f ff mov -1, %i0 40007c58: 82 10 20 16 mov 0x16, %g1 40007c5c: c2 22 00 00 st %g1, [ %o0 ] 40007c60: 81 c7 e0 08 ret 40007c64: 81 e8 00 00 restore 40007c68: 40 00 04 06 call 40008c80 <_RTEMS_Unlock_allocator> 40007c6c: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EAGAIN ); 40007c70: 40 00 27 14 call 400118c0 <__errno> 40007c74: 01 00 00 00 nop 40007c78: 82 10 20 0b mov 0xb, %g1 ! b <_TLS_Alignment+0xa> 40007c7c: c2 22 00 00 st %g1, [ %o0 ] 40007c80: 81 c7 e0 08 ret 40007c84: 81 e8 00 00 restore =============================================================================== 40006f0c : int timer_delete( timer_t timerid ) { 40006f0c: 9d e3 bf 98 save %sp, -104, %sp _RTEMS_Lock_allocator(); 40006f10: 40 00 01 af call 400075cc <_RTEMS_Lock_allocator> 40006f14: 39 10 00 59 sethi %hi(0x40016400), %i4 RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, ISR_lock_Context *lock_context ) { return (POSIX_Timer_Control *) _Objects_Get( 40006f18: 92 07 bf fc add %fp, -4, %o1 40006f1c: 94 17 22 90 or %i4, 0x290, %o2 40006f20: 40 00 0a 77 call 400098fc <_Objects_Get> 40006f24: 90 10 00 18 mov %i0, %o0 ISR_lock_Context lock_context; _Objects_Allocator_lock(); ptimer = _POSIX_Timer_Get( timerid, &lock_context ); if ( ptimer != NULL ) { 40006f28: ba 92 20 00 orcc %o0, 0, %i5 40006f2c: 02 80 00 15 be 40006f80 40006f30: 92 10 00 1d mov %i5, %o1 Per_CPU_Control *cpu; _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); 40006f34: 40 00 09 7a call 4000951c <_Objects_Close> 40006f38: 90 17 22 90 or %i4, 0x290, %o0 cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context ); ptimer->state = POSIX_TIMER_STATE_FREE; 40006f3c: 82 10 20 01 mov 1, %g1 40006f40: c2 2f 60 34 stb %g1, [ %i5 + 0x34 ] _Watchdog_Remove( 40006f44: 92 07 60 10 add %i5, 0x10, %o1 40006f48: 11 10 00 59 sethi %hi(0x40016400), %o0 40006f4c: 40 00 16 e4 call 4000cadc <_Watchdog_Remove> 40006f50: 90 12 21 78 or %o0, 0x178, %o0 ! 40016578 <_Per_CPU_Information+0x38> register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40006f54: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006f58: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006f5c: 01 00 00 00 nop _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 40006f60: 92 10 00 1d mov %i5, %o1 40006f64: 90 17 22 90 or %i4, 0x290, %o0 40006f68: 40 00 0a 39 call 4000984c <_Objects_Free> 40006f6c: b0 10 20 00 clr %i0 _RTEMS_Unlock_allocator(); 40006f70: 40 00 01 9c call 400075e0 <_RTEMS_Unlock_allocator> 40006f74: 01 00 00 00 nop &ptimer->Timer ); _POSIX_Timer_Release( cpu, &lock_context ); _POSIX_Timer_Free( ptimer ); _Objects_Allocator_unlock(); return 0; 40006f78: 81 c7 e0 08 ret 40006f7c: 81 e8 00 00 restore 40006f80: 40 00 01 98 call 400075e0 <_RTEMS_Unlock_allocator> 40006f84: b0 10 3f ff mov -1, %i0 } _Objects_Allocator_unlock(); rtems_set_errno_and_return_minus_one( EINVAL ); 40006f88: 40 00 25 0a call 400103b0 <__errno> 40006f8c: 01 00 00 00 nop 40006f90: 82 10 20 16 mov 0x16, %g1 ! 16 <_TLS_Alignment+0x15> 40006f94: c2 22 00 00 st %g1, [ %o0 ] } 40006f98: 81 c7 e0 08 ret 40006f9c: 81 e8 00 00 restore =============================================================================== 400082f8 : #include int timer_getoverrun( timer_t timerid ) { 400082f8: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, ISR_lock_Context *lock_context ) { return (POSIX_Timer_Control *) _Objects_Get( 400082fc: 15 10 00 9c sethi %hi(0x40027000), %o2 40008300: 92 07 bf fc add %fp, -4, %o1 40008304: 94 12 a1 98 or %o2, 0x198, %o2 40008308: 40 00 0a 70 call 4000acc8 <_Objects_Get> 4000830c: 90 10 00 18 mov %i0, %o0 POSIX_Timer_Control *ptimer; ISR_lock_Context lock_context; ptimer = _POSIX_Timer_Get( timerid, &lock_context ); if ( ptimer != NULL ) { 40008310: 80 a2 20 00 cmp %o0, 0 40008314: 02 80 00 09 be 40008338 40008318: 01 00 00 00 nop Per_CPU_Control *cpu; int overrun; cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context ); overrun = ptimer->overrun; 4000831c: f0 02 20 74 ld [ %o0 + 0x74 ], %i0 <== NOT EXECUTED ptimer->overrun = 0; 40008320: c0 22 20 74 clr [ %o0 + 0x74 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40008324: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40008328: 91 d0 20 0a ta 0xa <== NOT EXECUTED 4000832c: 01 00 00 00 nop _POSIX_Timer_Release( cpu, &lock_context ); return overrun; 40008330: 81 c7 e0 08 ret 40008334: 81 e8 00 00 restore } rtems_set_errno_and_return_minus_one( EINVAL ); 40008338: 40 00 25 2a call 400117e0 <__errno> 4000833c: b0 10 3f ff mov -1, %i0 40008340: 82 10 20 16 mov 0x16, %g1 40008344: c2 22 00 00 st %g1, [ %o0 ] } 40008348: 81 c7 e0 08 ret 4000834c: 81 e8 00 00 restore =============================================================================== 40008350 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 40008350: 9d e3 bf 98 save %sp, -104, %sp POSIX_Timer_Control *ptimer; ISR_lock_Context lock_context; uint64_t now; uint32_t remaining; if ( !value ) 40008354: 80 a6 60 00 cmp %i1, 0 40008358: 02 80 00 22 be 400083e0 4000835c: 92 07 bf fc add %fp, -4, %o1 40008360: 15 10 00 9c sethi %hi(0x40027000), %o2 40008364: 90 10 00 18 mov %i0, %o0 40008368: 40 00 0a 58 call 4000acc8 <_Objects_Get> 4000836c: 94 12 a1 98 or %o2, 0x198, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); ptimer = _POSIX_Timer_Get( timerid, &lock_context ); if ( ptimer != NULL ) { 40008370: ba 92 20 00 orcc %o0, 0, %i5 40008374: 02 80 00 21 be 400083f8 40008378: 03 10 00 9b sethi %hi(0x40026c00), %g1 Per_CPU_Control *cpu; cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context ); now = cpu->Watchdog.ticks; if ( now < ptimer->Timer.expire ) { 4000837c: c6 07 60 28 ld [ %i5 + 0x28 ], %g3 now = cpu->Watchdog.ticks; 40008380: 82 10 61 80 or %g1, 0x180, %g1 40008384: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 if ( now < ptimer->Timer.expire ) { 40008388: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 4000838c: 80 a0 c0 02 cmp %g3, %g2 40008390: 08 80 00 0e bleu 400083c8 <== ALWAYS TAKEN 40008394: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 remaining = (uint32_t) ( ptimer->Timer.expire - now ); 40008398: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED } else { remaining = 0; } _Timespec_From_ticks( remaining, &value->it_value ); 4000839c: 40 00 17 de call 4000e314 <_Timespec_From_ticks> 400083a0: 92 06 60 10 add %i1, 0x10, %o1 value->it_interval = ptimer->timer_data.it_interval; 400083a4: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 <== NOT EXECUTED 400083a8: c4 3e 40 00 std %g2, [ %i1 ] <== NOT EXECUTED 400083ac: c4 1f 60 58 ldd [ %i5 + 0x58 ], %g2 <== NOT EXECUTED 400083b0: c4 3e 60 08 std %g2, [ %i1 + 8 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 400083b4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400083b8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400083bc: 01 00 00 00 nop _POSIX_Timer_Release( cpu, &lock_context ); return 0; 400083c0: 81 c7 e0 08 ret 400083c4: 91 e8 20 00 restore %g0, 0, %o0 if ( now < ptimer->Timer.expire ) { 400083c8: 12 80 00 04 bne 400083d8 <== NEVER TAKEN 400083cc: 80 a2 00 01 cmp %o0, %g1 400083d0: 38 bf ff f3 bgu,a 4000839c <== ALWAYS TAKEN 400083d4: 90 22 00 01 sub %o0, %g1, %o0 remaining = 0; 400083d8: 10 bf ff f1 b 4000839c <== NOT EXECUTED 400083dc: 90 10 20 00 clr %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 400083e0: 40 00 25 00 call 400117e0 <__errno> 400083e4: b0 10 3f ff mov -1, %i0 400083e8: 82 10 20 16 mov 0x16, %g1 400083ec: c2 22 00 00 st %g1, [ %o0 ] 400083f0: 81 c7 e0 08 ret 400083f4: 81 e8 00 00 restore } rtems_set_errno_and_return_minus_one( EINVAL ); 400083f8: 40 00 24 fa call 400117e0 <__errno> 400083fc: b0 10 3f ff mov -1, %i0 40008400: 82 10 20 16 mov 0x16, %g1 40008404: c2 22 00 00 st %g1, [ %o0 ] } 40008408: 81 c7 e0 08 ret 4000840c: 81 e8 00 00 restore =============================================================================== 40006980 : timer_t timerid, int flags, const struct itimerspec *__restrict value, struct itimerspec *__restrict ovalue ) { 40006980: 9d e3 bf 70 save %sp, -144, %sp POSIX_Timer_Control *ptimer; ISR_lock_Context lock_context; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 40006984: 80 a6 a0 00 cmp %i2, 0 40006988: 02 80 00 7d be 40006b7c <== NEVER TAKEN 4000698c: a0 10 00 18 mov %i0, %l0 /* * 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) ) ) { 40006990: 40 00 15 be call 4000c088 <_Timespec_Is_valid> 40006994: 90 06 a0 10 add %i2, 0x10, %o0 40006998: 80 a2 20 00 cmp %o0, 0 4000699c: 02 80 00 78 be 40006b7c 400069a0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !_Timespec_Is_valid( &(value->it_interval) ) ) { 400069a4: 40 00 15 b9 call 4000c088 <_Timespec_Is_valid> 400069a8: 90 10 00 1a mov %i2, %o0 400069ac: 80 a2 20 00 cmp %o0, 0 400069b0: 02 80 00 73 be 40006b7c <== NEVER TAKEN 400069b4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 400069b8: b0 8e 7f fb andcc %i1, -5, %i0 400069bc: 12 80 00 70 bne 40006b7c 400069c0: 80 a6 60 04 cmp %i1, 4 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 400069c4: d4 1e 80 00 ldd [ %i2 ], %o2 400069c8: d8 1e a0 08 ldd [ %i2 + 8 ], %o4 400069cc: f8 1e a0 10 ldd [ %i2 + 0x10 ], %i4 400069d0: c4 1e a0 18 ldd [ %i2 + 0x18 ], %g2 400069d4: d4 3f bf e0 std %o2, [ %fp + -32 ] 400069d8: d8 3f bf e8 std %o4, [ %fp + -24 ] 400069dc: f8 3f bf f0 std %i4, [ %fp + -16 ] /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 400069e0: 02 80 00 5a be 40006b48 400069e4: c4 3f bf f8 std %g2, [ %fp + -8 ] RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, ISR_lock_Context *lock_context ) { return (POSIX_Timer_Control *) _Objects_Get( 400069e8: 92 07 bf d0 add %fp, -48, %o1 400069ec: 15 10 00 5e sethi %hi(0x40017800), %o2 400069f0: 90 10 00 10 mov %l0, %o0 400069f4: 40 00 0a a2 call 4000947c <_Objects_Get> 400069f8: 94 12 a1 48 or %o2, 0x148, %o2 * 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 ) { 400069fc: b2 92 20 00 orcc %o0, 0, %i1 40006a00: 02 80 00 65 be 40006b94 40006a04: ba 06 60 10 add %i1, 0x10, %i5 Per_CPU_Control *cpu; cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context ); /* Stop the timer */ _Watchdog_Remove( 40006a08: 11 10 00 5e sethi %hi(0x40017800), %o0 40006a0c: 92 10 00 1d mov %i5, %o1 40006a10: 40 00 17 3d call 4000c704 <_Watchdog_Remove> 40006a14: 90 12 20 78 or %o0, 0x78, %o0 &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 ) { 40006a18: c4 07 bf f0 ld [ %fp + -16 ], %g2 40006a1c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006a20: 80 90 80 01 orcc %g2, %g1, %g0 40006a24: 12 80 00 1d bne 40006a98 40006a28: c2 07 bf f8 ld [ %fp + -8 ], %g1 40006a2c: 80 a0 60 00 cmp %g1, 0 40006a30: 12 80 00 1a bne 40006a98 40006a34: 80 a6 e0 00 cmp %i3, 0 /* The old data of the timer are returned */ if ( ovalue ) 40006a38: 02 80 00 0a be 40006a60 40006a3c: 82 10 20 04 mov 4, %g1 *ovalue = ptimer->timer_data; 40006a40: d8 1e 60 50 ldd [ %i1 + 0x50 ], %o4 <== NOT EXECUTED 40006a44: f8 1e 60 58 ldd [ %i1 + 0x58 ], %i4 <== NOT EXECUTED 40006a48: c4 1e 60 60 ldd [ %i1 + 0x60 ], %g2 <== NOT EXECUTED 40006a4c: d4 1e 60 68 ldd [ %i1 + 0x68 ], %o2 <== NOT EXECUTED 40006a50: d8 3e c0 00 std %o4, [ %i3 ] <== NOT EXECUTED 40006a54: f8 3e e0 08 std %i4, [ %i3 + 8 ] <== NOT EXECUTED 40006a58: c4 3e e0 10 std %g2, [ %i3 + 0x10 ] <== NOT EXECUTED 40006a5c: d4 3e e0 18 std %o2, [ %i3 + 0x18 ] <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = normalize; 40006a60: c4 1f bf e0 ldd [ %fp + -32 ], %g2 <== NOT EXECUTED 40006a64: c4 3e 60 50 std %g2, [ %i1 + 0x50 ] <== NOT EXECUTED 40006a68: c4 1f bf e8 ldd [ %fp + -24 ], %g2 <== NOT EXECUTED 40006a6c: c4 3e 60 58 std %g2, [ %i1 + 0x58 ] <== NOT EXECUTED 40006a70: c4 1f bf f0 ldd [ %fp + -16 ], %g2 <== NOT EXECUTED 40006a74: c4 3e 60 60 std %g2, [ %i1 + 0x60 ] <== NOT EXECUTED 40006a78: c4 1f bf f8 ldd [ %fp + -8 ], %g2 <== NOT EXECUTED 40006a7c: c4 3e 60 68 std %g2, [ %i1 + 0x68 ] <== NOT EXECUTED /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 40006a80: c2 2e 60 34 stb %g1, [ %i1 + 0x34 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40006a84: c2 07 bf d0 ld [ %fp + -48 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006a88: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006a8c: 01 00 00 00 nop /* Returns with success */ _POSIX_Timer_Release( cpu, &lock_context ); return 0; 40006a90: 81 c7 e0 08 ret 40006a94: 81 e8 00 00 restore } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 40006a98: 40 00 15 c0 call 4000c198 <_Timespec_To_ticks> 40006a9c: 90 10 00 1a mov %i2, %o0 40006aa0: d0 26 60 70 st %o0, [ %i1 + 0x70 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 40006aa4: 40 00 15 bd call 4000c198 <_Timespec_To_ticks> 40006aa8: 90 07 bf f0 add %fp, -16, %o0 ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 40006aac: 82 10 20 03 mov 3, %g1 40006ab0: c2 2e 60 34 stb %g1, [ %i1 + 0x34 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 40006ab4: b8 10 00 08 mov %o0, %i4 40006ab8: 40 00 08 4b call 40008be4 <_Timecounter_Nanotime> 40006abc: 90 06 60 78 add %i1, 0x78, %o0 cpu->Watchdog.ticks + ticks 40006ac0: 11 10 00 5e sethi %hi(0x40017800), %o0 40006ac4: 90 12 20 40 or %o0, 0x40, %o0 ! 40017840 <_Per_CPU_Information> _Watchdog_Insert( 40006ac8: d4 1a 20 30 ldd [ %o0 + 0x30 ], %o2 40006acc: 86 82 c0 1c addcc %o3, %i4, %g3 40006ad0: 84 42 a0 00 addx %o2, 0, %g2 40006ad4: 96 10 00 03 mov %g3, %o3 40006ad8: 94 10 00 02 mov %g2, %o2 40006adc: 92 10 00 1d mov %i5, %o1 40006ae0: 40 00 16 e1 call 4000c664 <_Watchdog_Insert> 40006ae4: 90 02 20 38 add %o0, 0x38, %o0 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 40006ae8: 80 a6 e0 00 cmp %i3, 0 40006aec: 02 80 00 0b be 40006b18 40006af0: c4 1f bf e0 ldd [ %fp + -32 ], %g2 *ovalue = ptimer->timer_data; 40006af4: d8 1e 60 50 ldd [ %i1 + 0x50 ], %o4 <== NOT EXECUTED 40006af8: f8 1e 60 58 ldd [ %i1 + 0x58 ], %i4 <== NOT EXECUTED 40006afc: c4 1e 60 60 ldd [ %i1 + 0x60 ], %g2 <== NOT EXECUTED 40006b00: d4 1e 60 68 ldd [ %i1 + 0x68 ], %o2 <== NOT EXECUTED 40006b04: d8 3e c0 00 std %o4, [ %i3 ] <== NOT EXECUTED 40006b08: f8 3e e0 08 std %i4, [ %i3 + 8 ] <== NOT EXECUTED 40006b0c: c4 3e e0 10 std %g2, [ %i3 + 0x10 ] <== NOT EXECUTED 40006b10: d4 3e e0 18 std %o2, [ %i3 + 0x18 ] <== NOT EXECUTED ptimer->timer_data = normalize; 40006b14: c4 1f bf e0 ldd [ %fp + -32 ], %g2 <== NOT EXECUTED 40006b18: c4 3e 60 50 std %g2, [ %i1 + 0x50 ] <== NOT EXECUTED 40006b1c: c4 1f bf e8 ldd [ %fp + -24 ], %g2 <== NOT EXECUTED 40006b20: c4 3e 60 58 std %g2, [ %i1 + 0x58 ] <== NOT EXECUTED 40006b24: c4 1f bf f0 ldd [ %fp + -16 ], %g2 <== NOT EXECUTED 40006b28: c4 3e 60 60 std %g2, [ %i1 + 0x60 ] <== NOT EXECUTED 40006b2c: c4 1f bf f8 ldd [ %fp + -8 ], %g2 <== NOT EXECUTED 40006b30: c4 3e 60 68 std %g2, [ %i1 + 0x68 ] <== NOT EXECUTED register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40006b34: c2 07 bf d0 ld [ %fp + -48 ], %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006b38: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006b3c: 01 00 00 00 nop _POSIX_Timer_Release( cpu, &lock_context ); return 0; 40006b40: 81 c7 e0 08 ret 40006b44: 81 e8 00 00 restore 40006b48: 40 00 08 27 call 40008be4 <_Timecounter_Nanotime> 40006b4c: 90 07 bf d0 add %fp, -48, %o0 if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 40006b50: 92 07 bf d0 add %fp, -48, %o1 40006b54: 40 00 15 5b call 4000c0c0 <_Timespec_Less_than> 40006b58: 90 07 bf f0 add %fp, -16, %o0 40006b5c: 80 a2 20 00 cmp %o0, 0 40006b60: 12 80 00 07 bne 40006b7c 40006b64: 94 07 bf f0 add %fp, -16, %o2 _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 40006b68: 90 07 bf d0 add %fp, -48, %o0 40006b6c: 40 00 15 73 call 4000c138 <_Timespec_Subtract> 40006b70: 92 10 00 0a mov %o2, %o1 40006b74: 10 bf ff 9e b 400069ec 40006b78: 92 07 bf d0 add %fp, -48, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); 40006b7c: 40 00 23 39 call 4000f860 <__errno> 40006b80: b0 10 3f ff mov -1, %i0 40006b84: 82 10 20 16 mov 0x16, %g1 40006b88: c2 22 00 00 st %g1, [ %o0 ] 40006b8c: 81 c7 e0 08 ret 40006b90: 81 e8 00 00 restore } rtems_set_errno_and_return_minus_one( EINVAL ); 40006b94: 40 00 23 33 call 4000f860 <__errno> 40006b98: b0 10 3f ff mov -1, %i0 40006b9c: 82 10 20 16 mov 0x16, %g1 40006ba0: c2 22 00 00 st %g1, [ %o0 ] } 40006ba4: 81 c7 e0 08 ret 40006ba8: 81 e8 00 00 restore =============================================================================== 400068bc : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 400068bc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED uint32_t us_per_tick = rtems_configuration_get_microseconds_per_tick(); 400068c0: 3b 10 00 5d sethi %hi(0x40017400), %i5 <== NOT EXECUTED 400068c4: ba 17 60 04 or %i5, 4, %i5 ! 40017404 <== NOT EXECUTED 400068c8: e2 07 60 14 ld [ %i5 + 0x14 ], %l1 <== NOT EXECUTED 400068cc: a0 04 7f ff add %l1, -1, %l0 <== NOT EXECUTED return ( us + us_per_tick - 1 ) / us_per_tick; 400068d0: b0 06 00 10 add %i0, %l0, %i0 <== NOT EXECUTED 400068d4: 81 80 20 00 wr %g0, %y <== NOT EXECUTED 400068d8: 01 00 00 00 nop <== NOT EXECUTED 400068dc: 01 00 00 00 nop <== NOT EXECUTED 400068e0: 01 00 00 00 nop <== NOT EXECUTED 400068e4: b4 76 00 11 udiv %i0, %l1, %i2 <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400068e8: 91 d0 20 09 ta 9 <== NOT EXECUTED return psr; 400068ec: b0 10 00 01 mov %g1, %i0 &lock_context ); cpu = _Watchdog_Get_CPU( the_watchdog ); _Watchdog_Per_CPU_acquire_critical( cpu, &lock_context2 ); now = cpu->Watchdog.ticks; 400068f0: 05 10 00 6c sethi %hi(0x4001b000), %g2 expire = the_watchdog->expire; 400068f4: 37 10 00 65 sethi %hi(0x40019400), %i3 400068f8: e4 18 a3 f0 ldd [ %g2 + 0x3f0 ], %l2 400068fc: 84 16 e2 d8 or %i3, 0x2d8, %g2 40006900: c6 00 a0 18 ld [ %g2 + 0x18 ], %g3 if ( now < expire ) { 40006904: 80 a0 c0 12 cmp %g3, %l2 40006908: 18 80 00 21 bgu 4000698c <== NEVER TAKEN 4000690c: f8 00 a0 1c ld [ %g2 + 0x1c ], %i4 40006910: 02 80 00 1d be 40006984 <== ALWAYS TAKEN 40006914: 80 a7 00 13 cmp %i4, %l3 40006918: b8 10 20 00 clr %i4 <== NOT EXECUTED _Watchdog_Remove( header, the_watchdog ); 4000691c: 92 16 e2 d8 or %i3, 0x2d8, %o1 40006920: 11 10 00 6c sethi %hi(0x4001b000), %o0 40006924: 40 00 16 15 call 4000c178 <_Watchdog_Remove> 40006928: 90 12 23 f8 or %o0, 0x3f8, %o0 ! 4001b3f8 <_Per_CPU_Information+0x38> &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_TICKS ], the_watchdog, now ); if ( ticks_initial != 0 ) { 4000692c: 80 a6 a0 00 cmp %i2, 0 40006930: 02 80 00 0e be 40006968 40006934: a0 06 40 10 add %i1, %l0, %l0 _POSIX_signals_Ualarm_interval = ticks_interval; 40006938: 03 10 00 6a sethi %hi(0x4001a800), %g1 return ( us + us_per_tick - 1 ) / us_per_tick; 4000693c: 81 80 20 00 wr %g0, %y 40006940: 01 00 00 00 nop 40006944: 01 00 00 00 nop 40006948: 01 00 00 00 nop 4000694c: 84 74 00 11 udiv %l0, %l1, %g2 cpu = _Per_CPU_Get(); _Watchdog_Set_CPU( the_watchdog, cpu ); _Watchdog_Insert( 40006950: 96 84 c0 1a addcc %l3, %i2, %o3 40006954: 92 16 e2 d8 or %i3, 0x2d8, %o1 40006958: 94 44 a0 00 addx %l2, 0, %o2 _POSIX_signals_Ualarm_interval = ticks_interval; 4000695c: c4 20 61 0c st %g2, [ %g1 + 0x10c ] _Watchdog_Insert( 40006960: 40 00 15 de call 4000c0d8 <_Watchdog_Insert> 40006964: 90 01 a0 38 add %g6, 0x38, %o0 register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */ 40006968: 82 10 00 18 mov %i0, %g1 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000696c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006970: 01 00 00 00 nop _ISR_lock_Release_and_ISR_enable( &_POSIX_signals_Ualarm_lock, &lock_context ); remaining *= rtems_configuration_get_microseconds_per_tick(); 40006974: f0 07 60 14 ld [ %i5 + 0x14 ], %i0 return remaining; } 40006978: b0 5f 00 18 smul %i4, %i0, %i0 4000697c: 81 c7 e0 08 ret 40006980: 81 e8 00 00 restore if ( now < expire ) { 40006984: 28 bf ff e6 bleu,a 4000691c 40006988: b8 10 20 00 clr %i4 4000698c: 10 bf ff e4 b 4000691c 40006990: b8 27 00 13 sub %i4, %l3, %i4