00051920 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 51920: 4e56 ffe0 linkw %fp,#-32 51924: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 51928: 246e 0008 moveal %fp@(8),%a2 5192c: 2a2e 000c movel %fp@(12),%d5 51930: 262e 0010 movel %fp@(16),%d3 51934: 286e 001c moveal %fp@(28),%a4 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 51938: b6aa 004c cmpl %a2@(76),%d3 5193c: 6304 blss 51942 <_CORE_message_queue_Broadcast+0x22> 5193e: 7001 moveq #1,%d0 <== NOT EXECUTED 51940: 6042 bras 51984 <_CORE_message_queue_Broadcast+0x64> <== NOT EXECUTED * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 51942: 4aaa 0048 tstl %a2@(72) 51946: 6610 bnes 51958 <_CORE_message_queue_Broadcast+0x38> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 51948: 4282 clrl %d2 5194a: 283c 0005 3c24 movel #343076,%d4 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 51950: 4bf9 0005 9e70 lea 59e70 ,%a5 51956: 601a bras 51972 <_CORE_message_queue_Broadcast+0x52> * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 51958: 4294 clrl %a4@ 5195a: 6026 bras 51982 <_CORE_message_queue_Broadcast+0x62> 5195c: 2f03 movel %d3,%sp@- */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 5195e: 5282 addql #1,%d2 51960: 2f05 movel %d5,%sp@- 51962: 2f2b 002c movel %a3@(44),%sp@- 51966: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 51968: 206b 0028 moveal %a3@(40),%a0 5196c: 4fef 000c lea %sp@(12),%sp 51970: 2083 movel %d3,%a0@ * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 51972: 2f0a movel %a2,%sp@- 51974: 2044 moveal %d4,%a0 51976: 4e90 jsr %a0@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 51978: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 5197a: 2640 moveal %d0,%a3 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5197c: 4a80 tstl %d0 5197e: 66dc bnes 5195c <_CORE_message_queue_Broadcast+0x3c> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 51980: 2882 movel %d2,%a4@ 51982: 4280 clrl %d0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 51984: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 5198a: 4e5e unlk %fp 5198c: 4e75 rts ... 00045c14 <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { 45c14: 4e56 0000 linkw %fp,#0 45c18: 2f0a movel %a2,%sp@- 45c1a: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 45c1e: 2f0a movel %a2,%sp@- 45c20: 4eb9 0004 702c jsr 4702c <_Thread_queue_Dequeue> 45c26: 588f addql #4,%sp 45c28: 4a80 tstl %d0 45c2a: 6704 beqs 45c30 <_CORE_semaphore_Surrender+0x1c> 45c2c: 4280 clrl %d0 45c2e: 6024 bras 45c54 <_CORE_semaphore_Surrender+0x40> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 45c30: 203c 0000 0700 movel #1792,%d0 45c36: 40c1 movew %sr,%d1 45c38: 8081 orl %d1,%d0 45c3a: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 45c3c: 202a 0048 movel %a2@(72),%d0 45c40: b0aa 0040 cmpl %a2@(64),%d0 45c44: 6504 bcss 45c4a <_CORE_semaphore_Surrender+0x36> 45c46: 7004 moveq #4,%d0 <== NOT EXECUTED 45c48: 6008 bras 45c52 <_CORE_semaphore_Surrender+0x3e> <== NOT EXECUTED the_semaphore->count += 1; 45c4a: 5280 addql #1,%d0 45c4c: 2540 0048 movel %d0,%a2@(72) 45c50: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 45c52: 46c1 movew %d1,%sr } return status; } 45c54: 246e fffc moveal %fp@(-4),%a2 45c58: 4e5e unlk %fp 45c5a: 4e75 rts 00045fd8 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45fd8: 4e56 0000 linkw %fp,#0 45fdc: 222e 000c movel %fp@(12),%d1 45fe0: 2f03 movel %d3,%sp@- _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45fe2: 4283 clrl %d3 45fe4: 1601 moveb %d1,%d3 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45fe6: 2f02 movel %d2,%sp@- 45fe8: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45fec: 2f02 movel %d2,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45fee: 202e 0008 movel %fp@(8),%d0 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45ff2: 2f03 movel %d3,%sp@- _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 45ff4: 263c 0000 0700 movel #1792,%d3 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45ffa: 2f00 movel %d0,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 45ffc: 13c1 0005 cf8e moveb %d1,5cf8e <_Internal_errors_What_happened+0x4> bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46002: 23c0 0005 cf8a movel %d0,5cf8a <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 46008: 23c2 0005 cf90 movel %d2,5cf90 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 4600e: 4eb9 0004 7b02 jsr 47b02 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46014: 40c0 movew %sr,%d0 46016: 8083 orl %d3,%d0 46018: 46c0 movew %d0,%sr 4601a: 2002 movel %d2,%d0 <== NOT EXECUTED 4601c: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46022: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46024: 7005 moveq #5,%d0 46026: 4fef 000c lea %sp@(12),%sp 4602a: 23c0 0005 d06c movel %d0,5d06c <_System_state_Current> 46030: 60fe bras 46030 <_Internal_error_Occurred+0x58> ... 0004609c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 4609c: 4e56 fff0 linkw %fp,#-16 460a0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 460a4: 246e 0008 moveal %fp@(8),%a2 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 460a8: 4aaa 0014 tstl %a2@(20) 460ac: 6604 bnes 460b2 <_Objects_Allocate+0x16> 460ae: 4280 clrl %d0 <== NOT EXECUTED 460b0: 605e bras 46110 <_Objects_Allocate+0x74> <== NOT EXECUTED /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 460b2: 240a movel %a2,%d2 460b4: 0682 0000 001c addil #28,%d2 460ba: 47f9 0004 a168 lea 4a168 <_Chain_Get>,%a3 460c0: 2f02 movel %d2,%sp@- 460c2: 4e93 jsr %a3@ if ( information->auto_extend ) { 460c4: 588f addql #4,%sp 460c6: 4a2a 0010 tstb %a2@(16) 460ca: 6744 beqs 46110 <_Objects_Allocate+0x74> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 460cc: 4a80 tstl %d0 460ce: 6612 bnes 460e2 <_Objects_Allocate+0x46> _Objects_Extend_information( information ); 460d0: 2f0a movel %a2,%sp@- 460d2: 4eb9 0004 6148 jsr 46148 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 460d8: 2f02 movel %d2,%sp@- 460da: 4e93 jsr %a3@ } if ( the_object ) { 460dc: 508f addql #8,%sp 460de: 4a80 tstl %d0 460e0: 672e beqs 46110 <_Objects_Allocate+0x74> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 460e2: 2040 moveal %d0,%a0 460e4: 4281 clrl %d1 460e6: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460e8: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 460ea: 362a 0008 movew %a2@(8),%d3 460ee: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460f2: 342a 0012 movew %a2@(18),%d2 information->inactive--; 460f6: 306a 0028 moveaw %a2@(40),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 460fa: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460fc: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 46100: 5388 subql #1,%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 46102: e589 lsll #2,%d1 information->inactive--; 46104: 3548 0028 movew %a0,%a2@(40) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 46108: 206a 002a moveal %a2@(42),%a0 4610c: d1c1 addal %d1,%a0 4610e: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 46110: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 46116: 4e5e unlk %fp 46118: 4e75 rts ... 00046a44 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a44: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 46a46: 4e56 ffe0 linkw %fp,#-32 46a4a: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46a4e: 2a6e 0008 moveal %fp@(8),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a52: 302d 0034 movew %a5@(52),%d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 46a56: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a5a: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 46a5c: 286e 000c moveal %fp@(12),%a4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a60: 2f0a movel %a2,%sp@- 46a62: 4eb9 0004 e798 jsr 4e798 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 46a68: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a6a: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 46a6c: 4a2d 0032 tstb %a5@(50) 46a70: 6748 beqs 46aba <_Objects_Set_name+0x76> char *d; d = _Workspace_Allocate( length + 1 ); 46a72: 486b 0001 pea %a3@(1) 46a76: 4eb9 0004 82c8 jsr 482c8 <_Workspace_Allocate> if ( !d ) 46a7c: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 46a7e: 2a40 moveal %d0,%a5 if ( !d ) 46a80: 4a80 tstl %d0 46a82: 6604 bnes 46a88 <_Objects_Set_name+0x44> 46a84: 4200 clrb %d0 <== NOT EXECUTED 46a86: 6076 bras 46afe <_Objects_Set_name+0xba> <== NOT EXECUTED return false; if ( the_object->name.name_p ) { 46a88: 202c 000c movel %a4@(12),%d0 46a8c: 670e beqs 46a9c <_Objects_Set_name+0x58> _Workspace_Free( (void *)the_object->name.name_p ); 46a8e: 2f00 movel %d0,%sp@- 46a90: 4eb9 0004 82e4 jsr 482e4 <_Workspace_Free> the_object->name.name_p = NULL; 46a96: 588f addql #4,%sp 46a98: 42ac 000c clrl %a4@(12) } strncpy( d, name, length ); 46a9c: 2f0b movel %a3,%sp@- 46a9e: 2f0a movel %a2,%sp@- 46aa0: 2f0d movel %a5,%sp@- 46aa2: 4eb9 0004 e710 jsr 4e710 d[length] = '\0'; the_object->name.name_p = d; 46aa8: 4fef 000c lea %sp@(12),%sp _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; } strncpy( d, name, length ); d[length] = '\0'; 46aac: 4200 clrb %d0 46aae: 1b80 b800 moveb %d0,%a5@(00000000,%a3:l) the_object->name.name_p = d; 46ab2: 7001 moveq #1,%d0 46ab4: 294d 000c movel %a5,%a4@(12) 46ab8: 6044 bras 46afe <_Objects_Set_name+0xba> } else #endif { the_object->name.name_u32 = _Objects_Build_name( 46aba: 7201 moveq #1,%d1 46abc: 1012 moveb %a2@,%d0 46abe: b28b cmpl %a3,%d1 46ac0: 6446 bccs 46b08 <_Objects_Set_name+0xc4> 46ac2: 7602 moveq #2,%d3 46ac4: 142a 0001 moveb %a2@(1),%d2 46ac8: 49c2 extbl %d2 46aca: 4842 swap %d2 46acc: 4242 clrw %d2 46ace: b68b cmpl %a3,%d3 46ad0: 643a bccs 46b0c <_Objects_Set_name+0xc8> 46ad2: 7a03 moveq #3,%d5 46ad4: 122a 0002 moveb %a2@(2),%d1 46ad8: 49c1 extbl %d1 46ada: e189 lsll #8,%d1 46adc: ba8b cmpl %a3,%d5 46ade: 6506 bcss 46ae6 <_Objects_Set_name+0xa2> 46ae0: 163c 0020 moveb #32,%d3 46ae4: 6006 bras 46aec <_Objects_Set_name+0xa8> 46ae6: 162a 0003 moveb %a2@(3),%d3 46aea: 49c3 extbl %d3 46aec: 2800 movel %d0,%d4 46aee: 7a18 moveq #24,%d5 46af0: ebac lsll %d5,%d4 46af2: 7001 moveq #1,%d0 46af4: 8484 orl %d4,%d2 46af6: 8481 orl %d1,%d2 46af8: 8483 orl %d3,%d2 46afa: 2942 000c movel %d2,%a4@(12) ); } return true; } 46afe: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46b04: 4e5e unlk %fp 46b06: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 46b08: 7420 moveq #32,%d2 46b0a: 4842 swap %d2 46b0c: 223c 0000 2000 movel #8192,%d1 46b12: 7620 moveq #32,%d3 46b14: 60d6 bras 46aec <_Objects_Set_name+0xa8> ... 00049268 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 49268: 4e56 ffe4 linkw %fp,#-28 4926c: 48d7 043c moveml %d2-%d5/%a2,%sp@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 49270: 486e fffc pea %fp@(-4) 49274: 242e 0008 movel %fp@(8),%d2 49278: 2f02 movel %d2,%sp@- 4927a: 4879 0006 501c pea 6501c <_POSIX_Message_queue_Information_fds> 49280: 246e 0014 moveal %fp@(20),%a2 49284: 262e 0018 movel %fp@(24),%d3 49288: 4eb9 0004 bf64 jsr 4bf64 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4928e: 4fef 000c lea %sp@(12),%sp 49292: 4aae fffc tstl %fp@(-4) 49296: 6600 00c4 bnew 4935c <_POSIX_Message_queue_Receive_support+0xf4> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 4929a: 2040 moveal %d0,%a0 4929c: 7803 moveq #3,%d4 4929e: 7a01 moveq #1,%d5 492a0: 2228 0014 movel %a0@(20),%d1 492a4: c881 andl %d1,%d4 492a6: ba84 cmpl %d4,%d5 492a8: 660a bnes 492b4 <_POSIX_Message_queue_Receive_support+0x4c> _Thread_Enable_dispatch(); 492aa: 4eb9 0004 c7b6 jsr 4c7b6 <_Thread_Enable_dispatch> 492b0: 6000 00aa braw 4935c <_POSIX_Message_queue_Receive_support+0xf4> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 492b4: 2240 moveal %d0,%a1 492b6: 2069 0010 moveal %a1@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 492ba: 2028 0066 movel %a0@(102),%d0 492be: b0ae 0010 cmpl %fp@(16),%d0 492c2: 6318 blss 492dc <_POSIX_Message_queue_Receive_support+0x74> _Thread_Enable_dispatch(); 492c4: 4eb9 0004 c7b6 jsr 4c7b6 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 492ca: 747a moveq #122,%d2 492cc: 4eb9 0005 2884 jsr 52884 <__errno> 492d2: 72ff moveq #-1,%d1 492d4: 2040 moveal %d0,%a0 492d6: 2082 movel %d2,%a0@ 492d8: 6000 0090 braw 4936a <_POSIX_Message_queue_Receive_support+0x102> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 492dc: 4a03 tstb %d3 492de: 6604 bnes 492e4 <_POSIX_Message_queue_Receive_support+0x7c> 492e0: 4200 clrb %d0 <== NOT EXECUTED 492e2: 600c bras 492f0 <_POSIX_Message_queue_Receive_support+0x88> <== NOT EXECUTED do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 492e4: 2001 movel %d1,%d0 492e6: 760e moveq #14,%d3 492e8: 7a01 moveq #1,%d5 492ea: e6a8 lsrl %d3,%d0 492ec: bb80 eorl %d5,%d0 492ee: c085 andl %d5,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 492f0: 2f2e 001c movel %fp@(28),%sp@- 492f4: 7201 moveq #1,%d1 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 492f6: 76ff moveq #-1,%d3 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 492f8: c280 andl %d0,%d1 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 492fa: 2d43 fff8 movel %d3,%fp@(-8) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 492fe: 2f01 movel %d1,%sp@- 49300: 486e fff8 pea %fp@(-8) 49304: 2f2e 000c movel %fp@(12),%sp@- 49308: 2f02 movel %d2,%sp@- 4930a: 4868 001a pea %a0@(26) 4930e: 4eb9 0004 b0ac jsr 4b0ac <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 49314: 4eb9 0004 c7b6 jsr 4c7b6 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4931a: 2079 0006 4c9a moveal 64c9a <_Thread_Executing>,%a0 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 49320: 24a8 0024 movel %a0@(36),%a2@ 49324: 6c06 bges 4932c <_POSIX_Message_queue_Receive_support+0xc4> 49326: 2a12 movel %a2@,%d5 49328: 4485 negl %d5 4932a: 2485 movel %d5,%a2@ _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4932c: 4fef 0018 lea %sp@(24),%sp 49330: 4aa8 0034 tstl %a0@(52) 49334: 6606 bnes 4933c <_POSIX_Message_queue_Receive_support+0xd4> return length_out; 49336: 222e fff8 movel %fp@(-8),%d1 4933a: 602e bras 4936a <_POSIX_Message_queue_Receive_support+0x102> rtems_set_errno_and_return_minus_one( 4933c: 4eb9 0005 2884 jsr 52884 <__errno> 49342: 2079 0006 4c9a moveal 64c9a <_Thread_Executing>,%a0 49348: 2440 moveal %d0,%a2 4934a: 2f28 0034 movel %a0@(52),%sp@- 4934e: 4eb9 0004 9594 jsr 49594 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 49354: 588f addql #4,%sp 49356: 72ff moveq #-1,%d1 49358: 2480 movel %d0,%a2@ 4935a: 600e bras 4936a <_POSIX_Message_queue_Receive_support+0x102> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4935c: 4eb9 0005 2884 jsr 52884 <__errno> 49362: 72ff moveq #-1,%d1 49364: 2040 moveal %d0,%a0 49366: 7009 moveq #9,%d0 49368: 2080 movel %d0,%a0@ } 4936a: 2001 movel %d1,%d0 4936c: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 49372: 4e5e unlk %fp 49374: 4e75 rts ... 00044e64 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 44e64: 4e56 0000 linkw %fp,#0 44e68: 2f0a movel %a2,%sp@- 44e6a: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 44e6e: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 44e72: 4aaa 0052 tstl %a2@(82) 44e76: 6606 bnes 44e7e <_POSIX_Timer_TSR+0x1a> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 44e78: 4aaa 0056 tstl %a2@(86) 44e7c: 6732 beqs 44eb0 <_POSIX_Timer_TSR+0x4c> activated = _POSIX_Timer_Insert_helper( 44e7e: 2f0a movel %a2,%sp@- 44e80: 4879 0004 4e64 pea 44e64 <_POSIX_Timer_TSR> 44e86: 2f2a 0008 movel %a2@(8),%sp@- 44e8a: 2f2a 0062 movel %a2@(98),%sp@- 44e8e: 486a 0010 pea %a2@(16) 44e92: 4eb9 0004 a3c4 jsr 4a3c4 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 44e98: 4fef 0014 lea %sp@(20),%sp 44e9c: 4a00 tstb %d0 44e9e: 672a beqs 44eca <_POSIX_Timer_TSR+0x66> return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 44ea0: 486a 006a pea %a2@(106) 44ea4: 4eb9 0004 633c jsr 4633c <_TOD_Get> /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 44eaa: 588f addql #4,%sp /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 44eac: 7003 moveq #3,%d0 44eae: 6002 bras 44eb2 <_POSIX_Timer_TSR+0x4e> } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 44eb0: 7004 moveq #4,%d0 <== NOT EXECUTED 44eb2: 1540 003c moveb %d0,%a2@(60) /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 44eb6: 2f2a 0042 movel %a2@(66),%sp@- 44eba: 2f2a 0038 movel %a2@(56),%sp@- 44ebe: 4eb9 0004 9fa4 jsr 49fa4 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 44ec4: 508f addql #8,%sp 44ec6: 42aa 0066 clrl %a2@(102) } 44eca: 246e fffc moveal %fp@(-4),%a2 44ece: 4e5e unlk %fp 44ed0: 4e75 rts ... 00047b9c <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 47b9c: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 47b9e: 4e56 0000 linkw %fp,#0 47ba2: 2f0a movel %a2,%sp@- 47ba4: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 47ba8: c0aa 0010 andl %a2@(16),%d0 47bac: 4a00 tstb %d0 47bae: 6704 beqs 47bb4 <_Thread_Restart+0x18> 47bb0: 4200 clrb %d0 47bb2: 6064 bras 47c18 <_Thread_Restart+0x7c> _Thread_Set_transient( the_thread ); 47bb4: 2f0a movel %a2,%sp@- 47bb6: 4eb9 0004 7d78 jsr 47d78 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 47bbc: 2f2e 0010 movel %fp@(16),%sp@- 47bc0: 2f2e 000c movel %fp@(12),%sp@- 47bc4: 2f0a movel %a2,%sp@- 47bc6: 4eb9 0004 b23c jsr 4b23c <_Thread_Reset> _Thread_Load_environment( the_thread ); 47bcc: 2f0a movel %a2,%sp@- 47bce: 4eb9 0004 aed8 jsr 4aed8 <_Thread_Load_environment> _Thread_Ready( the_thread ); 47bd4: 2f0a movel %a2,%sp@- 47bd6: 4eb9 0004 b17c jsr 4b17c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 47bdc: 2f0a movel %a2,%sp@- 47bde: 4eb9 0004 8360 jsr 48360 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 47be4: 4fef 001c lea %sp@(28),%sp 47be8: b5f9 0005 da06 cmpal 5da06 <_Thread_Executing>,%a2 47bee: 6626 bnes 47c16 <_Thread_Restart+0x7a> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 47bf0: 4aaa 0102 tstl %a2@(258) 47bf4: 670c beqs 47c02 <_Thread_Restart+0x66> _Context_Restore_fp( &_Thread_Executing->fp_context ); 47bf6: 486a 0102 pea %a2@(258) 47bfa: 4eb9 0004 8850 jsr 48850 <_CPU_Context_restore_fp> 47c00: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 47c02: 2079 0005 da06 moveal 5da06 <_Thread_Executing>,%a0 47c08: 41e8 00ce lea %a0@(206),%a0 47c0c: 2f08 movel %a0,%sp@- 47c0e: 4eb9 0004 870e jsr 4870e <_CPU_Context_Restart_self> 47c14: 588f addql #4,%sp <== NOT EXECUTED 47c16: 7001 moveq #1,%d0 return true; } return false; } 47c18: 246e fffc moveal %fp@(-4),%a2 47c1c: 4e5e unlk %fp 47c1e: 4e75 rts 00047204 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 47204: 4e56 ffe4 linkw %fp,#-28 47208: 206e 000c moveal %fp@(12),%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4720c: 43e8 003c lea %a0@(60),%a1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 47210: 2028 0014 movel %a0@(20),%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 47214: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 47218: 2400 movel %d0,%d2 4721a: ec8a lsrl #6,%d2 4721c: 2202 movel %d2,%d1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 4721e: 283c 0000 0700 movel #1792,%d4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 47224: e989 lsll #4,%d1 47226: e58a lsll #2,%d2 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 47228: 246e 0008 moveal %fp@(8),%a2 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 4722c: 9282 subl %d2,%d1 4722e: 47f2 1800 lea %a2@(00000000,%d1:l),%a3 47232: 2149 0038 movel %a1,%a0@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47236: 43e8 0038 lea %a0@(56),%a1 block_state = the_thread_queue->state; 4723a: 2a2a 0038 movel %a2@(56),%d5 4723e: 2149 0040 movel %a1,%a0@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47242: 42a8 003c clrl %a0@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 47246: 0800 0005 btst #5,%d0 4724a: 6660 bnes 472ac <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4724c: 2c0b movel %a3,%d6 4724e: 5886 addql #4,%d6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 47250: 2404 movel %d4,%d2 47252: 40c1 movew %sr,%d1 47254: 8481 orl %d1,%d2 47256: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->first; 47258: 2253 moveal %a3@,%a1 4725a: 76ff moveq #-1,%d3 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4725c: 601e bras 4727c <_Thread_queue_Enqueue_priority+0x78> search_priority = search_thread->current_priority; 4725e: 2629 0014 movel %a1@(20),%d3 if ( priority <= search_priority ) 47262: b680 cmpl %d0,%d3 47264: 641a bccs 47280 <_Thread_queue_Enqueue_priority+0x7c> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 47266: 2404 movel %d4,%d2 47268: 46c1 movew %d1,%sr 4726a: 8481 orl %d1,%d2 4726c: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4726e: 2405 movel %d5,%d2 47270: c4a9 0010 andl %a1@(16),%d2 47274: 6604 bnes 4727a <_Thread_queue_Enqueue_priority+0x76> _ISR_Enable( level ); 47276: 46c1 movew %d1,%sr <== NOT EXECUTED goto restart_forward_search; 47278: 60d6 bras 47250 <_Thread_queue_Enqueue_priority+0x4c> <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 4727a: 2251 moveal %a1@,%a1 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4727c: bc89 cmpl %a1,%d6 4727e: 66de bnes 4725e <_Thread_queue_Enqueue_priority+0x5a> 47280: 2401 movel %d1,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 47282: 7801 moveq #1,%d4 47284: b8aa 0030 cmpl %a2@(48),%d4 47288: 6600 00a4 bnew 4732e <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4728c: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 47290: b680 cmpl %d0,%d3 47292: 677e beqs 47312 <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 47294: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 47298: 2089 movel %a1,%a0@ the_node->previous = previous_node; 4729a: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4729e: 214a 0044 movel %a2,%a0@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 472a2: 2688 movel %a0,%a3@ search_node->previous = the_node; 472a4: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 472a8: 46c1 movew %d1,%sr 472aa: 6062 bras 4730e <_Thread_queue_Enqueue_priority+0x10a> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 472ac: 4283 clrl %d3 472ae: 1639 0005 b732 moveb 5b732 ,%d3 _ISR_Disable( level ); 472b4: 2404 movel %d4,%d2 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 472b6: 5283 addql #1,%d3 _ISR_Disable( level ); 472b8: 40c1 movew %sr,%d1 472ba: 8481 orl %d1,%d2 472bc: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->last; 472be: 226b 0008 moveal %a3@(8),%a1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 472c2: 6020 bras 472e4 <_Thread_queue_Enqueue_priority+0xe0> search_priority = search_thread->current_priority; 472c4: 2629 0014 movel %a1@(20),%d3 if ( priority >= search_priority ) 472c8: b680 cmpl %d0,%d3 472ca: 631c blss 472e8 <_Thread_queue_Enqueue_priority+0xe4> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 472cc: 2404 movel %d4,%d2 472ce: 46c1 movew %d1,%sr 472d0: 8481 orl %d1,%d2 472d2: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 472d4: 2405 movel %d5,%d2 472d6: c4a9 0010 andl %a1@(16),%d2 472da: 6604 bnes 472e0 <_Thread_queue_Enqueue_priority+0xdc> _ISR_Enable( level ); 472dc: 46c1 movew %d1,%sr goto restart_reverse_search; 472de: 60cc bras 472ac <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *) 472e0: 2269 0004 moveal %a1@(4),%a1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 472e4: b7c9 cmpal %a1,%a3 472e6: 66dc bnes 472c4 <_Thread_queue_Enqueue_priority+0xc0> 472e8: 2401 movel %d1,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 472ea: 7801 moveq #1,%d4 472ec: b8aa 0030 cmpl %a2@(48),%d4 472f0: 663c bnes 4732e <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 472f2: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 472f6: b680 cmpl %d0,%d3 472f8: 6718 beqs 47312 <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 472fa: 2651 moveal %a1@,%a3 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 472fc: 2149 0004 movel %a1,%a0@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 47300: 208b movel %a3,%a0@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47302: 214a 0044 movel %a2,%a0@(68) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 47306: 2288 movel %a0,%a1@ next_node->previous = the_node; 47308: 2748 0004 movel %a0,%a3@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4730c: 46c1 movew %d1,%sr 4730e: 7001 moveq #1,%d0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 47310: 6026 bras 47338 <_Thread_queue_Enqueue_priority+0x134> 47312: 43e9 003c lea %a1@(60),%a1 equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 47316: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4731a: 2089 movel %a1,%a0@ the_node->previous = previous_node; 4731c: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47320: 214a 0044 movel %a2,%a0@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 47324: 2688 movel %a0,%a3@ search_node->previous = the_node; 47326: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4732a: 46c2 movew %d2,%sr 4732c: 60e0 bras 4730e <_Thread_queue_Enqueue_priority+0x10a> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 4732e: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 47332: 202a 0030 movel %a2@(48),%d0 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 47336: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 47338: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4733c: 4e5e unlk %fp 4733e: 4e75 rts 00050edc <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 50edc: 4e56 ffb4 linkw %fp,#-76 50ee0: 200e movel %fp,%d0 50ee2: 0680 ffff fff4 addil #-12,%d0 50ee8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 50eec: 246e 0008 moveal %fp@(8),%a2 50ef0: 240e movel %fp,%d2 50ef2: 2a0e movel %fp,%d5 50ef4: 260e movel %fp,%d3 50ef6: 0682 ffff ffe8 addil #-24,%d2 50efc: 5185 subql #8,%d5 50efe: 0683 ffff ffec addil #-20,%d3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 50f04: 41ea 0008 lea %a2@(8),%a0 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 50f08: 4bea 0040 lea %a2@(64),%a5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f0c: 2e0a movel %a2,%d7 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f0e: 280a movel %a2,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f10: 0687 0000 0030 addil #48,%d7 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f16: 0684 0000 0068 addil #104,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f1c: 49f9 0005 4a8c lea 54a8c <_Watchdog_Adjust_to_chain>,%a4 ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 50f22: 47f9 0005 4b1c lea 54b1c <_Watchdog_Insert>,%a3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 50f28: 2d48 ffe4 movel %a0,%fp@(-28) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 50f2c: 2d45 fff4 movel %d5,%fp@(-12) the_chain->permanent_null = NULL; 50f30: 42ae fff8 clrl %fp@(-8) the_chain->last = _Chain_Head(the_chain); 50f34: 2d40 fffc movel %d0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 50f38: 2d43 ffe8 movel %d3,%fp@(-24) the_chain->permanent_null = NULL; 50f3c: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 50f40: 2d42 fff0 movel %d2,%fp@(-16) 50f44: 2d4d ffe0 movel %a5,%fp@(-32) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 50f48: 41ee fff4 lea %fp@(-12),%a0 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 50f4c: 3a7c 0700 moveaw #1792,%a5 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 50f50: 2548 0078 movel %a0,%a2@(120) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 50f54: 2039 0007 500c movel 7500c <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 50f5a: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 50f5e: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f62: 486e ffe8 pea %fp@(-24) 50f66: 9081 subl %d1,%d0 50f68: 2f00 movel %d0,%sp@- 50f6a: 2f07 movel %d7,%sp@- 50f6c: 4e94 jsr %a4@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 50f6e: 2039 0007 4f5a movel 74f5a <_TOD_Now>,%d0 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 50f74: 4fef 000c lea %sp@(12),%sp Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 50f78: 222a 0074 movel %a2@(116),%d1 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 50f7c: b280 cmpl %d0,%d1 50f7e: 6414 bccs 50f94 <_Timer_server_Body+0xb8> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f80: 486e ffe8 pea %fp@(-24) 50f84: 2c00 movel %d0,%d6 50f86: 9c81 subl %d1,%d6 50f88: 2f06 movel %d6,%sp@- 50f8a: 2d40 ffdc movel %d0,%fp@(-36) 50f8e: 2f04 movel %d4,%sp@- 50f90: 4e94 jsr %a4@ 50f92: 6018 bras 50fac <_Timer_server_Body+0xd0> } else if ( snapshot < last_snapshot ) { 50f94: b280 cmpl %d0,%d1 50f96: 631c blss 50fb4 <_Timer_server_Body+0xd8> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 50f98: 9280 subl %d0,%d1 50f9a: 2f01 movel %d1,%sp@- 50f9c: 4878 0001 pea 1 50fa0: 2d40 ffdc movel %d0,%fp@(-36) 50fa4: 2f04 movel %d4,%sp@- 50fa6: 4eb9 0005 4a0c jsr 54a0c <_Watchdog_Adjust> 50fac: 202e ffdc movel %fp@(-36),%d0 50fb0: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 50fb4: 2540 0074 movel %d0,%a2@(116) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 50fb8: 202a 0078 movel %a2@(120),%d0 50fbc: 2f00 movel %d0,%sp@- 50fbe: 4eb9 0005 18ac jsr 518ac <_Chain_Get> if ( timer == NULL ) { 50fc4: 588f addql #4,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 50fc6: 2040 moveal %d0,%a0 if ( timer == NULL ) { 50fc8: 4a80 tstl %d0 50fca: 6724 beqs 50ff0 <_Timer_server_Body+0x114> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 50fcc: 2028 0038 movel %a0@(56),%d0 <== NOT EXECUTED 50fd0: 7201 moveq #1,%d1 <== NOT EXECUTED 50fd2: b280 cmpl %d0,%d1 <== NOT EXECUTED 50fd4: 6608 bnes 50fde <_Timer_server_Body+0x102> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 50fd6: 4868 0010 pea %a0@(16) <== NOT EXECUTED 50fda: 2f07 movel %d7,%sp@- <== NOT EXECUTED 50fdc: 600c bras 50fea <_Timer_server_Body+0x10e> <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 50fde: 7c03 moveq #3,%d6 <== NOT EXECUTED 50fe0: bc80 cmpl %d0,%d6 <== NOT EXECUTED 50fe2: 66d4 bnes 50fb8 <_Timer_server_Body+0xdc> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 50fe4: 4868 0010 pea %a0@(16) <== NOT EXECUTED 50fe8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 50fea: 4e93 jsr %a3@ <== NOT EXECUTED 50fec: 508f addql #8,%sp <== NOT EXECUTED 50fee: 60c8 bras 50fb8 <_Timer_server_Body+0xdc> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 50ff0: 200d movel %a5,%d0 50ff2: 40c1 movew %sr,%d1 50ff4: 8081 orl %d1,%d0 50ff6: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 50ff8: baae fff4 cmpl %fp@(-12),%d5 50ffc: 6612 bnes 51010 <_Timer_server_Body+0x134> ts->insert_chain = NULL; 50ffe: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 51002: 46c1 movew %d1,%sr /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 51004: 3a7c 0700 moveaw #1792,%a5 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 51008: b6ae ffe8 cmpl %fp@(-24),%d3 5100c: 6608 bnes 51016 <_Timer_server_Body+0x13a> 5100e: 6042 bras 51052 <_Timer_server_Body+0x176> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 51010: 46c1 movew %d1,%sr <== NOT EXECUTED 51012: 6000 ff40 braw 50f54 <_Timer_server_Body+0x78> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 51016: 220d movel %a5,%d1 51018: 40c0 movew %sr,%d0 5101a: 8280 orl %d0,%d1 5101c: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5101e: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 51022: b688 cmpl %a0,%d3 51024: 6726 beqs 5104c <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 51026: 2250 moveal %a0@,%a1 the_chain->first = new_first; 51028: 2d49 ffe8 movel %a1,%fp@(-24) new_first->previous = _Chain_Head(the_chain); 5102c: 2342 0004 movel %d2,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 51030: 4a88 tstl %a0 51032: 6718 beqs 5104c <_Timer_server_Body+0x170> watchdog->state = WATCHDOG_INACTIVE; 51034: 42a8 0008 clrl %a0@(8) _ISR_Enable( level ); 51038: 46c0 movew %d0,%sr /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 5103a: 2f28 0024 movel %a0@(36),%sp@- 5103e: 2f28 0020 movel %a0@(32),%sp@- 51042: 2068 001c moveal %a0@(28),%a0 51046: 4e90 jsr %a0@ } 51048: 508f addql #8,%sp 5104a: 60ca bras 51016 <_Timer_server_Body+0x13a> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 5104c: 46c0 movew %d0,%sr 5104e: 6000 fef8 braw 50f48 <_Timer_server_Body+0x6c> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 51052: 4200 clrb %d0 51054: 1540 007c moveb %d0,%a2@(124) 51058: 2039 0007 4ec8 movel 74ec8 <_Thread_Dispatch_disable_level>,%d0 5105e: 5280 addql #1,%d0 51060: 23c0 0007 4ec8 movel %d0,74ec8 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 51066: 4878 0008 pea 8 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 5106a: 4bf9 0005 4c38 lea 54c38 <_Watchdog_Remove>,%a5 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 51070: 2f12 movel %a2@,%sp@- 51072: 4eb9 0005 4224 jsr 54224 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 51078: 2f0a movel %a2,%sp@- 5107a: 4eba fd9c jsr %pc@(50e18 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5107e: 2f0a movel %a2,%sp@- 51080: 4eba fdf6 jsr %pc@(50e78 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 51084: 4eb9 0005 38aa jsr 538aa <_Thread_Enable_dispatch> ts->active = true; 5108a: 7201 moveq #1,%d1 5108c: 1541 007c moveb %d1,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 51090: 2f2e ffe4 movel %fp@(-28),%sp@- 51094: 4e95 jsr %a5@ static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 51096: 2f2e ffe0 movel %fp@(-32),%sp@- 5109a: 4e95 jsr %a5@ 5109c: 4fef 0018 lea %sp@(24),%sp 510a0: 6000 fea6 braw 50f48 <_Timer_server_Body+0x6c> 000510a4 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 510a4: 4e56 fff0 linkw %fp,#-16 510a8: 206e 000c moveal %fp@(12),%a0 510ac: 48d7 041c moveml %d2-%d4/%a2,%sp@ 510b0: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 510b4: 202a 0078 movel %a2@(120),%d0 510b8: 6600 00f8 bnew 511b2 <_Timer_server_Schedule_operation_method+0x10e> 510bc: 2039 0007 4ec8 movel 74ec8 <_Thread_Dispatch_disable_level>,%d0 510c2: 5280 addql #1,%d0 510c4: 23c0 0007 4ec8 movel %d0,74ec8 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 510ca: 2028 0038 movel %a0@(56),%d0 510ce: 7201 moveq #1,%d1 510d0: b280 cmpl %d0,%d1 510d2: 6660 bnes 51134 <_Timer_server_Schedule_operation_method+0x90> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 510d4: 203c 0000 0700 movel #1792,%d0 510da: 40c3 movew %sr,%d3 510dc: 8083 orl %d3,%d0 510de: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 510e0: 2039 0007 500c movel 7500c <_Watchdog_Ticks_since_boot>,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 510e6: 220a movel %a2,%d1 510e8: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 510ee: 242a 003c movel %a2@(60),%d2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 510f2: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 510f6: b289 cmpl %a1,%d1 510f8: 6716 beqs 51110 <_Timer_server_Schedule_operation_method+0x6c> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 510fa: 2800 movel %d0,%d4 510fc: 9882 subl %d2,%d4 delta_interval = first_watchdog->delta_interval; 510fe: 2229 0010 movel %a1@(16),%d1 if (delta_interval > delta) { 51102: b881 cmpl %d1,%d4 51104: 6504 bcss 5110a <_Timer_server_Schedule_operation_method+0x66> 51106: 4281 clrl %d1 51108: 6002 bras 5110c <_Timer_server_Schedule_operation_method+0x68> delta_interval -= delta; 5110a: 9284 subl %d4,%d1 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 5110c: 2341 0010 movel %d1,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 51110: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 51114: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 51116: 4868 0010 pea %a0@(16) 5111a: 486a 0030 pea %a2@(48) 5111e: 4eb9 0005 4b1c jsr 54b1c <_Watchdog_Insert> if ( !ts->active ) { 51124: 508f addql #8,%sp 51126: 102a 007c moveb %a2@(124),%d0 5112a: 6678 bnes 511a4 <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_interval_system_watchdog( ts ); 5112c: 2f0a movel %a2,%sp@- 5112e: 4eba fce8 jsr %pc@(50e18 <_Timer_server_Reset_interval_system_watchdog>) 51132: 606e bras 511a2 <_Timer_server_Schedule_operation_method+0xfe> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 51134: 7203 moveq #3,%d1 51136: b280 cmpl %d0,%d1 51138: 666a bnes 511a4 <_Timer_server_Schedule_operation_method+0x100> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 5113a: 203c 0000 0700 movel #1792,%d0 51140: 40c3 movew %sr,%d3 51142: 8083 orl %d3,%d0 51144: 46c0 movew %d0,%sr 51146: 200a movel %a2,%d0 51148: 0680 0000 006c addil #108,%d0 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 5114e: 2239 0007 4f5a movel 74f5a <_TOD_Now>,%d1 last_snapshot = ts->TOD_watchdogs.last_snapshot; 51154: 242a 0074 movel %a2@(116),%d2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 51158: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5115c: b089 cmpl %a1,%d0 5115e: 6720 beqs 51180 <_Timer_server_Schedule_operation_method+0xdc> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 51160: 2029 0010 movel %a1@(16),%d0 if ( snapshot > last_snapshot ) { 51164: b481 cmpl %d1,%d2 51166: 6410 bccs 51178 <_Timer_server_Schedule_operation_method+0xd4> /* * We advanced in time. */ delta = snapshot - last_snapshot; 51168: 2801 movel %d1,%d4 5116a: 9882 subl %d2,%d4 if (delta_interval > delta) { 5116c: b880 cmpl %d0,%d4 5116e: 6504 bcss 51174 <_Timer_server_Schedule_operation_method+0xd0> 51170: 4280 clrl %d0 <== NOT EXECUTED 51172: 6008 bras 5117c <_Timer_server_Schedule_operation_method+0xd8> <== NOT EXECUTED delta_interval -= delta; 51174: 9084 subl %d4,%d0 51176: 6004 bras 5117c <_Timer_server_Schedule_operation_method+0xd8> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 51178: d082 addl %d2,%d0 delta_interval += delta; 5117a: 9081 subl %d1,%d0 } first_watchdog->delta_interval = delta_interval; 5117c: 2340 0010 movel %d0,%a1@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 51180: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 51184: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 51186: 4868 0010 pea %a0@(16) 5118a: 486a 0068 pea %a2@(104) 5118e: 4eb9 0005 4b1c jsr 54b1c <_Watchdog_Insert> if ( !ts->active ) { 51194: 508f addql #8,%sp 51196: 102a 007c moveb %a2@(124),%d0 5119a: 6608 bnes 511a4 <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_tod_system_watchdog( ts ); 5119c: 2f0a movel %a2,%sp@- 5119e: 4eba fcd8 jsr %pc@(50e78 <_Timer_server_Reset_tod_system_watchdog>) 511a2: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 511a4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 511aa: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 511ac: 4ef9 0005 38aa jmp 538aa <_Thread_Enable_dispatch> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 511b2: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 511b6: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 511ba: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 511c0: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 511c4: 4e5e unlk %fp <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 511c6: 4ef9 0005 1874 jmp 51874 <_Chain_Append> <== NOT EXECUTED 0004bc7c : } void pthread_exit( void *value_ptr ) { 4bc7c: 4e56 0000 linkw %fp,#0 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 4bc80: 2f2e 0008 movel %fp@(8),%sp@- 4bc84: 2f39 0005 cf9e movel 5cf9e <_Thread_Executing>,%sp@- 4bc8a: 4eb9 0004 bc0c jsr 4bc0c <_POSIX_Thread_Exit> 4bc90: 508f addql #8,%sp <== NOT EXECUTED } 4bc92: 4e5e unlk %fp <== NOT EXECUTED 4bc94: 4e75 rts <== NOT EXECUTED ... 00045404 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 45404: 4e56 0000 linkw %fp,#0 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 45408: 2039 0005 de5a movel 5de5a <_ISR_Nest_level>,%d0 * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 4540e: 2f02 movel %d2,%sp@- * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 45410: 4a80 tstl %d0 45412: 6646 bnes 4545a return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 45414: 2079 0005 de7a moveal 5de7a <_Thread_Executing>,%a0 4541a: 2039 0005 ddc0 movel 5ddc0 <_Thread_Dispatch_disable_level>,%d0 45420: 5280 addql #1,%d0 45422: 2068 010e moveal %a0@(270),%a0 45426: 23c0 0005 ddc0 movel %d0,5ddc0 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4542c: 4aa8 00d4 tstl %a0@(212) 45430: 6704 beqs 45436 45432: 4202 clrb %d2 <== NOT EXECUTED 45434: 6008 bras 4543e <== NOT EXECUTED /* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); void _EXFUN(pthread_testcancel, (void)); 45436: 4aa8 00dc tstl %a0@(220) 4543a: 56c2 sne %d2 4543c: 4482 negl %d2 thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4543e: 4eb9 0004 770e jsr 4770e <_Thread_Enable_dispatch> if ( cancel ) 45444: 4a02 tstb %d2 45446: 6712 beqs 4545a _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 45448: 4878 ffff pea ffffffff 4544c: 2f39 0005 de7a movel 5de7a <_Thread_Executing>,%sp@- 45452: 4eb9 0004 a5a8 jsr 4a5a8 <_POSIX_Thread_Exit> 45458: 508f addql #8,%sp <== NOT EXECUTED } 4545a: 242e fffc movel %fp@(-4),%d2 4545e: 4e5e unlk %fp 45460: 4e75 rts ... 00071a2c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 71a2c: 4e56 ffec linkw %fp,#-20 71a30: 48d7 041c moveml %d2-%d4/%a2,%sp@ 71a34: 486e fffc pea %fp@(-4) 71a38: 262e 0008 movel %fp@(8),%d3 71a3c: 2f03 movel %d3,%sp@- 71a3e: 4879 0009 c96c pea 9c96c <_Rate_monotonic_Information> 71a44: 242e 000c movel %fp@(12),%d2 71a48: 4eb9 0004 ba84 jsr 4ba84 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 71a4e: 4fef 000c lea %sp@(12),%sp 71a52: 2440 moveal %d0,%a2 71a54: 4aae fffc tstl %fp@(-4) 71a58: 6600 0138 bnew 71b92 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 71a5c: 2039 0009 bf82 movel 9bf82 <_Thread_Executing>,%d0 71a62: b0aa 0040 cmpl %a2@(64),%d0 71a66: 670c beqs 71a74 _Thread_Enable_dispatch(); 71a68: 4eb9 0004 c33e jsr 4c33e <_Thread_Enable_dispatch> 71a6e: 7817 moveq #23,%d4 return RTEMS_NOT_OWNER_OF_RESOURCE; 71a70: 6000 0122 braw 71b94 } if ( length == RTEMS_PERIOD_STATUS ) { 71a74: 4a82 tstl %d2 71a76: 6622 bnes 71a9a switch ( the_period->state ) { 71a78: 202a 0038 movel %a2@(56),%d0 71a7c: 7204 moveq #4,%d1 71a7e: b280 cmpl %d0,%d1 71a80: 6404 bccs 71a86 71a82: 4284 clrl %d4 <== NOT EXECUTED 71a84: 600a bras 71a90 <== NOT EXECUTED 71a86: 41f9 0009 5ef8 lea 95ef8 ,%a0 71a8c: 2830 0c00 movel %a0@(00000000,%d0:l:4),%d4 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 71a90: 4eb9 0004 c33e jsr 4c33e <_Thread_Enable_dispatch> return( return_value ); 71a96: 6000 00fc braw 71b94 } _ISR_Disable( level ); 71a9a: 203c 0000 0700 movel #1792,%d0 71aa0: 40c4 movew %sr,%d4 71aa2: 8084 orl %d4,%d0 71aa4: 46c0 movew %d0,%sr switch ( the_period->state ) { 71aa6: 202a 0038 movel %a2@(56),%d0 71aaa: 7202 moveq #2,%d1 71aac: b280 cmpl %d0,%d1 71aae: 6740 beqs 71af0 71ab0: 123c 0004 moveb #4,%d1 71ab4: b280 cmpl %d0,%d1 71ab6: 6700 00a4 beqw 71b5c 71aba: 4a80 tstl %d0 71abc: 6600 00d4 bnew 71b92 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 71ac0: 46c4 movew %d4,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 71ac2: 2f0a movel %a2,%sp@- ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 71ac4: 4284 clrl %d4 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 71ac6: 4eb9 0007 1818 jsr 71818 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 71acc: 203c 0007 1ba0 movel #465824,%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 71ad2: 7202 moveq #2,%d1 71ad4: 2540 002c movel %d0,%a2@(44) the_watchdog->id = id; 71ad8: 2543 0030 movel %d3,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 71adc: 2542 001c movel %d2,%a2@(28) 71ae0: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 71ae4: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 71ae8: 42aa 0034 clrl %a2@(52) 71aec: 6000 0084 braw 71b72 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 71af0: 2f0a movel %a2,%sp@- 71af2: 4eb9 0007 1938 jsr 71938 <_Rate_monotonic_Update_statistics> * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; 71af8: 2542 003c movel %d2,%a2@(60) /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 71afc: 7401 moveq #1,%d2 71afe: 2542 0038 movel %d2,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 71b02: 46c4 movew %d4,%sr _Thread_Executing->Wait.id = the_period->Object.id; 71b04: 2079 0009 bf82 moveal 9bf82 <_Thread_Executing>,%a0 71b0a: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 71b10: 4878 4000 pea 4000 71b14: 2f08 movel %a0,%sp@- 71b16: 4eb9 0004 cb5c jsr 4cb5c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 71b1c: 203c 0000 0700 movel #1792,%d0 71b22: 40c1 movew %sr,%d1 71b24: 8081 orl %d1,%d0 71b26: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 71b28: 143c 0002 moveb #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 71b2c: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 71b30: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 71b34: 46c1 movew %d1,%sr /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 71b36: 7203 moveq #3,%d1 71b38: 4fef 000c lea %sp@(12),%sp 71b3c: b280 cmpl %d0,%d1 71b3e: 6612 bnes 71b52 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 71b40: 4878 4000 pea 4000 71b44: 2f39 0009 bf82 movel 9bf82 <_Thread_Executing>,%sp@- 71b4a: 4eb9 0004 bf84 jsr 4bf84 <_Thread_Clear_state> 71b50: 508f addql #8,%sp _Thread_Enable_dispatch(); 71b52: 4eb9 0004 c33e jsr 4c33e <_Thread_Enable_dispatch> 71b58: 4284 clrl %d4 return RTEMS_SUCCESSFUL; 71b5a: 6038 bras 71b94 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 71b5c: 2f0a movel %a2,%sp@- 71b5e: 4eb9 0007 1938 jsr 71938 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 71b64: 46c4 movew %d4,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 71b66: 7002 moveq #2,%d0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 71b68: 7806 moveq #6,%d4 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 71b6a: 2542 001c movel %d2,%a2@(28) */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 71b6e: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; 71b72: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 71b76: 486a 0010 pea %a2@(16) 71b7a: 4879 0009 bfa0 pea 9bfa0 <_Watchdog_Ticks_chain> 71b80: 4eb9 0004 d2a4 jsr 4d2a4 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 71b86: 4eb9 0004 c33e jsr 4c33e <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 71b8c: 4fef 000c lea %sp@(12),%sp 71b90: 6002 bras 71b94 71b92: 7804 moveq #4,%d4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 71b94: 2004 movel %d4,%d0 71b96: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 71b9c: 4e5e unlk %fp 71b9e: 4e75 rts 0004f820 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 4f820: 4e56 fffc linkw %fp,#-4 4f824: 2f03 movel %d3,%sp@- 4f826: 262e 0010 movel %fp@(16),%d3 4f82a: 2f02 movel %d2,%sp@- 4f82c: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 4f830: 6766 beqs 4f898 return RTEMS_INVALID_ADDRESS; if ( !size ) 4f832: 4a83 tstl %d3 4f834: 6762 beqs 4f898 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4f836: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f83c: 4eb9 0005 17e0 jsr 517e0 <_API_Mutex_Lock> 4f842: 486e fffc pea %fp@(-4) 4f846: 2f2e 0008 movel %fp@(8),%sp@- 4f84a: 4879 0007 4dc6 pea 74dc6 <_Region_Information> 4f850: 4eb9 0005 2fec jsr 52fec <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f856: 222e fffc movel %fp@(-4),%d1 4f85a: 4fef 0010 lea %sp@(16),%sp 4f85e: 670a beqs 4f86a 4f860: 7001 moveq #1,%d0 4f862: b081 cmpl %d1,%d0 4f864: 6620 bnes 4f886 4f866: 7404 moveq #4,%d2 4f868: 601e bras 4f888 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 4f86a: 2f03 movel %d3,%sp@- 4f86c: 2040 moveal %d0,%a0 4f86e: 2f02 movel %d2,%sp@- 4f870: 4868 0068 pea %a0@(104) 4f874: 4eb9 0005 2a6c jsr 52a6c <_Heap_Size_of_alloc_area> 4f87a: 4fef 000c lea %sp@(12),%sp 4f87e: 4a00 tstb %d0 4f880: 6604 bnes 4f886 4f882: 7409 moveq #9,%d2 <== NOT EXECUTED 4f884: 6002 bras 4f888 <== NOT EXECUTED 4f886: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f888: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f88e: 4eb9 0005 1840 jsr 51840 <_API_Mutex_Unlock> return return_status; 4f894: 588f addql #4,%sp 4f896: 6002 bras 4f89a 4f898: 7409 moveq #9,%d2 } 4f89a: 2002 movel %d2,%d0 4f89c: 242e fff4 movel %fp@(-12),%d2 4f8a0: 262e fff8 movel %fp@(-8),%d3 4f8a4: 4e5e unlk %fp 4f8a6: 4e75 rts 00050bc4 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 50bc4: 4e56 ffe8 linkw %fp,#-24 50bc8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 50bcc: 282e 0008 movel %fp@(8),%d4 50bd0: 262e 000c movel %fp@(12),%d3 50bd4: 242e 0010 movel %fp@(16),%d2 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 50bd8: 2679 0007 576e moveal 7576e <_Timer_server>,%a3 if ( !timer_server ) 50bde: 4a8b tstl %a3 50be0: 6606 bnes 50be8 50be2: 700e moveq #14,%d0 50be4: 6000 00a4 braw 50c8a return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 50be8: 4a39 0007 4edc tstb 74edc <_TOD_Is_set> 50bee: 6606 bnes 50bf6 50bf0: 700b moveq #11,%d0 <== NOT EXECUTED 50bf2: 6000 0096 braw 50c8a <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !routine ) 50bf6: 4a82 tstl %d2 50bf8: 6606 bnes 50c00 50bfa: 7009 moveq #9,%d0 50bfc: 6000 008c braw 50c8a return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 50c00: 2f03 movel %d3,%sp@- 50c02: 4eb9 0004 e040 jsr 4e040 <_TOD_Validate> 50c08: 588f addql #4,%sp 50c0a: 4a00 tstb %d0 50c0c: 677a beqs 50c88 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 50c0e: 2f03 movel %d3,%sp@- 50c10: 4eb9 0004 dfa0 jsr 4dfa0 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 50c16: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 50c18: 2600 movel %d0,%d3 if ( seconds <= _TOD_Seconds_since_epoch() ) 50c1a: b0b9 0007 4f5a cmpl 74f5a <_TOD_Now>,%d0 50c20: 6366 blss 50c88 50c22: 486e fffc pea %fp@(-4) 50c26: 2f04 movel %d4,%sp@- 50c28: 4879 0007 5734 pea 75734 <_Timer_Information> 50c2e: 4eb9 0005 3024 jsr 53024 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 50c34: 4fef 000c lea %sp@(12),%sp 50c38: 2440 moveal %d0,%a2 50c3a: 4aae fffc tstl %fp@(-4) 50c3e: 6704 beqs 50c44 50c40: 7004 moveq #4,%d0 50c42: 6046 bras 50c8a case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 50c44: 486a 0010 pea %a2@(16) 50c48: 4eb9 0005 4c38 jsr 54c38 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 50c4e: 256e 0014 0034 movel %fp@(20),%a2@(52) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 50c54: 7003 moveq #3,%d0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 50c56: 2544 0030 movel %d4,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 50c5a: 96b9 0007 4f5a subl 74f5a <_TOD_Now>,%d3 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 50c60: 2540 0038 movel %d0,%a2@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 50c64: 2543 001c movel %d3,%a2@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 50c68: 2542 002c movel %d2,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 50c6c: 42aa 0018 clrl %a2@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 50c70: 2f0a movel %a2,%sp@- 50c72: 2f0b movel %a3,%sp@- 50c74: 206b 0004 moveal %a3@(4),%a0 50c78: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 50c7a: 4eb9 0005 38aa jsr 538aa <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 50c80: 4fef 000c lea %sp@(12),%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 50c84: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 50c86: 6002 bras 50c8a 50c88: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50c8a: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 50c90: 4e5e unlk %fp 50c92: 4e75 rts 00049ba8 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 49ba8: 4e56 ffe8 linkw %fp,#-24 49bac: 48d7 041c moveml %d2-%d4/%a2,%sp@ 49bb0: 262e 0008 movel %fp@(8),%d3 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 49bb4: 4ab9 0005 d6fe tstl 5d6fe <_POSIX_signals_Ualarm_timer+0x1c> 49bba: 6622 bnes 49bde Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 49bbc: 42b9 0005 d6ea clrl 5d6ea <_POSIX_signals_Ualarm_timer+0x8> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 49bc2: 4282 clrl %d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 49bc4: 203c 0004 9c94 movel #302228,%d0 the_watchdog->id = id; 49bca: 42b9 0005 d702 clrl 5d702 <_POSIX_signals_Ualarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 49bd0: 23c0 0005 d6fe movel %d0,5d6fe <_POSIX_signals_Ualarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 49bd6: 42b9 0005 d706 clrl 5d706 <_POSIX_signals_Ualarm_timer+0x24> 49bdc: 6058 bras 49c36 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 49bde: 4879 0005 d6e2 pea 5d6e2 <_POSIX_signals_Ualarm_timer> 49be4: 4eb9 0004 7d64 jsr 47d64 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 49bea: 588f addql #4,%sp 49bec: 7201 moveq #1,%d1 49bee: 5580 subql #2,%d0 49bf0: b280 cmpl %d0,%d1 49bf2: 6404 bccs 49bf8 49bf4: 4282 clrl %d2 <== NOT EXECUTED 49bf6: 603e bras 49c36 <== NOT EXECUTED * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 49bf8: 2039 0005 d6f6 movel 5d6f6 <_POSIX_signals_Ualarm_timer+0x14>,%d0 49bfe: d0b9 0005 d6ee addl 5d6ee <_POSIX_signals_Ualarm_timer+0xc>,%d0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 49c04: 486e fff8 pea %fp@(-8) 49c08: 90b9 0005 d6fa subl 5d6fa <_POSIX_signals_Ualarm_timer+0x18>,%d0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 49c0e: 283c 000f 4240 movel #1000000,%d4 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 49c14: 2f00 movel %d0,%sp@- 49c16: 4eb9 0004 aae0 jsr 4aae0 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 49c1c: 202e fff8 movel %fp@(-8),%d0 49c20: 4c04 0800 mulsl %d4,%d0 remaining += tp.tv_nsec / 1000; 49c24: 283c 0000 03e8 movel #1000,%d4 49c2a: 508f addql #8,%sp 49c2c: 242e fffc movel %fp@(-4),%d2 49c30: 4c44 2802 remsl %d4,%d2,%d2 49c34: d480 addl %d0,%d2 /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 49c36: 4a83 tstl %d3 49c38: 674e beqs 49c88 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 49c3a: 280e movel %fp,%d4 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 49c3c: 223c 000f 4240 movel #1000000,%d1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 49c42: 5184 subql #8,%d4 49c44: 45f9 0004 ab1c lea 4ab1c <_Timespec_To_ticks>,%a2 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 49c4a: 4c41 3000 remul %d1,%d0,%d3 49c4e: 4c41 3003 remul %d1,%d3,%d3 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 49c52: 223c 0000 03e8 movel #1000,%d1 49c58: 4c00 1800 mulsl %d0,%d1 ticks = _Timespec_To_ticks( &tp ); 49c5c: 2f04 movel %d4,%sp@- */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 49c5e: 2d41 fffc movel %d1,%fp@(-4) * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 49c62: 2d43 fff8 movel %d3,%fp@(-8) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 49c66: 4e92 jsr %a2@ if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 49c68: 2f04 movel %d4,%sp@- 49c6a: 4e92 jsr %a2@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 49c6c: 4879 0005 d6e2 pea 5d6e2 <_POSIX_signals_Ualarm_timer> 49c72: 4879 0005 cfbc pea 5cfbc <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 49c78: 23c0 0005 d6ee movel %d0,5d6ee <_POSIX_signals_Ualarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 49c7e: 4eb9 0004 7c48 jsr 47c48 <_Watchdog_Insert> 49c84: 4fef 0010 lea %sp@(16),%sp } return remaining; } 49c88: 2002 movel %d2,%d0 49c8a: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 49c90: 4e5e unlk %fp 49c92: 4e75 rts