=============================================================================== 0004a91c : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 4a91c: 7007 moveq #7,%d0 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 4a91e: 4e56 0000 linkw %fp,#0 4a922: 206e 0008 moveal %fp@(8),%a0 4a926: 2f0a movel %a2,%sp@- IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4a928: 2468 0010 moveal %a0@(16),%a2 switch( node->type ) { 4a92c: 2250 moveal %a0@,%a1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4a92e: 246a 0034 moveal %a2@(52),%a2 switch( node->type ) { 4a932: b0a9 0048 cmpl %a1@(72),%d0 4a936: 6526 bcss 4a95e <== NEVER TAKEN 4a938: 2029 0048 movel %a1@(72),%d0 4a93c: d080 addl %d0,%d0 4a93e: 303b 0808 movew %pc@(4a948 ,%d0:l),%d0 4a942: 48c0 extl %d0 4a944: 4efb 0802 jmp %pc@(4a948 ,%d0:l) 4a948: 0016 .short 0x0016 <== NOT EXECUTED 4a94a: 0010 .short 0x0010 <== NOT EXECUTED 4a94c: 004c .short 0x004c <== NOT EXECUTED 4a94e: 002c .short 0x002c <== NOT EXECUTED 4a950: 002c .short 0x002c <== NOT EXECUTED 4a952: 001e .short 0x001e <== NOT EXECUTED 4a954: 001e .short 0x001e <== NOT EXECUTED 4a956: 003e .short 0x003e <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 4a958: 216a 000c 0008 movel %a2@(12),%a0@(8) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 4a95e: 245f moveal %sp@+,%a2 4a960: 4280 clrl %d0 4a962: 4e5e unlk %fp 4a964: 4e75 rts 4a966: 4280 clrl %d0 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 4a968: 216a 0008 0008 movel %a2@(8),%a0@(8) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 4a96e: 245f moveal %sp@+,%a2 4a970: 4e5e unlk %fp 4a972: 4e75 rts 4a974: 245f moveal %sp@+,%a2 case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 4a976: 203c 0005 ea52 movel #387666,%d0 loc->handlers = fs_info->fifo_handlers; break; } return 0; } 4a97c: 4e5e unlk %fp case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 4a97e: 2140 0008 movel %d0,%a0@(8) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 4a982: 4280 clrl %d0 4a984: 4e75 rts 4a986: 4280 clrl %d0 break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 4a988: 216a 0010 0008 movel %a2@(16),%a0@(8) break; } return 0; } 4a98e: 245f moveal %sp@+,%a2 4a990: 4e5e unlk %fp 4a992: 4e75 rts 4a994: 245f moveal %sp@+,%a2 switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 4a996: 203c 0005 e9e2 movel #387554,%d0 loc->handlers = fs_info->fifo_handlers; break; } return 0; } 4a99c: 4e5e unlk %fp switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 4a99e: 2140 0008 movel %d0,%a0@(8) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 4a9a2: 4280 clrl %d0 <== NOT EXECUTED =============================================================================== 0004b478 : void IMFS_check_node_remove( IMFS_jnode_t *jnode ) { 4b478: 4e56 0000 linkw %fp,#0 4b47c: 2f0a movel %a2,%sp@- 4b47e: 246e 0008 moveal %fp@(8),%a2 if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { 4b482: 2f0a movel %a2,%sp@- 4b484: 4eb9 0004 bc08 jsr 4bc08 4b48a: 588f addql #4,%sp 4b48c: 4a80 tstl %d0 4b48e: 6634 bnes 4b4c4 4b490: 4a6a 0032 tstw %a2@(50) 4b494: 662e bnes 4b4c4 if ( rtems_filesystem_current.node_access == jnode ) 4b496: 2079 0005 f8d0 moveal 5f8d0 ,%a0 4b49c: b5e8 0004 cmpal %a0@(4),%a2 4b4a0: 6744 beqs 4b4e6 rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { 4b4a2: 202a 0048 movel %a2@(72),%d0 4b4a6: 7204 moveq #4,%d1 4b4a8: b280 cmpl %d0,%d1 4b4aa: 6748 beqs 4b4f4 4b4ac: 123c 0005 moveb #5,%d1 4b4b0: b280 cmpl %d0,%d1 4b4b2: 6718 beqs 4b4cc break; default: break; } free( jnode ); 4b4b4: 2d4a 0008 movel %a2,%fp@(8) } } 4b4b8: 246e fffc moveal %fp@(-4),%a2 4b4bc: 4e5e unlk %fp break; default: break; } free( jnode ); 4b4be: 4ef9 0004 32dc jmp 432dc } } 4b4c4: 246e fffc moveal %fp@(-4),%a2 4b4c8: 4e5e unlk %fp 4b4ca: 4e75 rts if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); 4b4cc: 2f0a movel %a2,%sp@- 4b4ce: 4eb9 0004 d9fc jsr 4d9fc break; 4b4d4: 588f addql #4,%sp break; default: break; } free( jnode ); 4b4d6: 2d4a 0008 movel %a2,%fp@(8) } } 4b4da: 246e fffc moveal %fp@(-4),%a2 4b4de: 4e5e unlk %fp break; default: break; } free( jnode ); 4b4e0: 4ef9 0004 32dc jmp 432dc { if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { 4b4e6: 202a 0048 movel %a2@(72),%d0 4b4ea: 7204 moveq #4,%d1 void IMFS_check_node_remove( IMFS_jnode_t *jnode ) { if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; 4b4ec: 42a8 0004 clrl %a0@(4) switch ( jnode->type ) { 4b4f0: b280 cmpl %d0,%d1 4b4f2: 66b8 bnes 4b4ac <== ALWAYS TAKEN case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); break; case IMFS_SYM_LINK: free( jnode->info.sym_link.name ); 4b4f4: 2f2a 004c movel %a2@(76),%sp@- 4b4f8: 4eb9 0004 32dc jsr 432dc break; 4b4fe: 588f addql #4,%sp default: break; } free( jnode ); 4b500: 2d4a 0008 movel %a2,%fp@(8) } } 4b504: 246e fffc moveal %fp@(-4),%a2 4b508: 4e5e unlk %fp break; default: break; } free( jnode ); 4b50a: 4ef9 0004 32dc jmp 432dc =============================================================================== 0004a5a4 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4a5a4: 4e56 ffe8 linkw %fp,#-24 4a5a8: 206e 0008 moveal %fp@(8),%a0 4a5ac: 48d7 041c moveml %d2-%d4/%a2,%sp@ IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 4a5b0: 2450 moveal %a0@,%a2 */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4a5b2: 4284 clrl %d4 int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4a5b4: 362e 000e movew %fp@(14),%d3 4a5b8: 342e 0012 movew %fp@(18),%d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4a5bc: 4eb9 0004 b994 jsr 4b994 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4a5c2: 4281 clrl %d1 4a5c4: 382a 0038 movew %a2@(56),%d4 4a5c8: 3200 movew %d0,%d1 4a5ca: b284 cmpl %d4,%d1 4a5cc: 6704 beqs 4a5d2 4a5ce: 4a40 tstw %d0 4a5d0: 6628 bnes 4a5fa <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 4a5d2: 3543 0038 movew %d3,%a2@(56) jnode->st_gid = group; 4a5d6: 3542 003a movew %d2,%a2@(58) IMFS_update_ctime( jnode ); 4a5da: 42a7 clrl %sp@- 4a5dc: 486e fff8 pea %fp@(-8) 4a5e0: 4eb9 0004 336c jsr 4336c 4a5e6: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4a5ec: 508f addql #8,%sp 4a5ee: 4280 clrl %d0 } 4a5f0: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4a5f6: 4e5e unlk %fp 4a5f8: 4e75 rts #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4a5fa: 4eb9 0004 f098 jsr 4f098 <__errno> 4a600: 7201 moveq #1,%d1 4a602: 2040 moveal %d0,%a0 4a604: 70ff moveq #-1,%d0 jnode->st_gid = group; IMFS_update_ctime( jnode ); return 0; } 4a606: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4a60c: 2081 movel %d1,%a0@ jnode->st_gid = group; IMFS_update_ctime( jnode ); return 0; } 4a60e: 4e5e unlk %fp ... =============================================================================== 0004a692 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4a692: 4e56 ffec linkw %fp,#-20 4a696: 206e 0008 moveal %fp@(8),%a0 4a69a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4a69e: 242e 000c movel %fp@(12),%d2 4a6a2: 286e 0018 moveal %fp@(24),%a4 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 4a6a6: 4a88 tstl %a0 4a6a8: 6700 00aa beqw 4a754 return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4a6ac: 2268 0010 moveal %a0@(16),%a1 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 4a6b0: 7007 moveq #7,%d0 * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; 4a6b2: 2650 moveal %a0@,%a3 fs_info = parent_loc->mt_entry->fs_info; 4a6b4: 2469 0034 moveal %a1@(52),%a2 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 4a6b8: b082 cmpl %d2,%d0 4a6ba: 6700 008a beqw 4a746 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4a6be: 2079 0005 f8d0 moveal 5f8d0 ,%a0 4a6c4: 2028 002c movel %a0@(44),%d0 4a6c8: 4680 notl %d0 4a6ca: c0ae 0014 andl %fp@(20),%d0 4a6ce: 2f00 movel %d0,%sp@- 4a6d0: 2f2e 0010 movel %fp@(16),%sp@- 4a6d4: 2f02 movel %d2,%sp@- 4a6d6: 4eb9 0004 a614 jsr 4a614 if ( !node ) 4a6dc: 4fef 000c lea %sp@(12),%sp return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4a6e0: 2a40 moveal %d0,%a5 if ( !node ) 4a6e2: 4a80 tstl %d0 4a6e4: 6754 beqs 4a73a return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 4a6e6: 7001 moveq #1,%d0 4a6e8: b082 cmpl %d2,%d0 4a6ea: 6700 009c beqw 4a788 rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 4a6ee: 7003 moveq #3,%d0 4a6f0: b082 cmpl %d2,%d0 4a6f2: 676e beqs 4a762 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 4a6f4: 7204 moveq #4,%d1 4a6f6: b282 cmpl %d2,%d1 4a6f8: 6768 beqs 4a762 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { 4a6fa: 7002 moveq #2,%d0 4a6fc: b082 cmpl %d2,%d0 4a6fe: 6700 00f4 beqw 4a7f4 node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { 4a702: 7206 moveq #6,%d1 4a704: b282 cmpl %d2,%d1 4a706: 6700 00b8 beqw 4a7c0 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { 4a70a: 7205 moveq #5,%d1 4a70c: b282 cmpl %d2,%d1 4a70e: 6700 0112 beqw 4a822 node->info.file.size = 0; node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; } else if ( type == IMFS_FIFO ) { 4a712: 7207 moveq #7,%d1 4a714: b282 cmpl %d2,%d1 4a716: 6700 0146 beqw 4a85e /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a71a: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4a71e: 5280 addql #1,%d0 <== NOT EXECUTED } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a720: 2b4b 0008 movel %a3,%a5@(8) <== NOT EXECUTED node->st_ino = ++fs_info->ino_count; 4a724: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED 4a728: 2b40 0034 movel %d0,%a5@(52) <== NOT EXECUTED 4a72c: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4a72e: 486b 004c pea %a3@(76) <== NOT EXECUTED 4a732: 4eb9 0004 7574 jsr 47574 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a738: 508f addql #8,%sp <== NOT EXECUTED } 4a73a: 200d movel %a5,%d0 4a73c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a742: 4e5e unlk %fp 4a744: 4e75 rts fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 4a746: 223c 0005 e972 movel #387442,%d1 4a74c: b2aa 0010 cmpl %a2@(16),%d1 4a750: 6600 ff6c bnew 4a6be fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 4a754: 9bcd subal %a5,%a5 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4a756: 200d movel %a5,%d0 4a758: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a75e: 4e5e unlk %fp 4a760: 4e75 rts if ( type == IMFS_DIRECTORY ) { rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; 4a762: 2b54 004c movel %a4@,%a5@(76) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a766: 202a 0004 movel %a2@(4),%d0 4a76a: 5280 addql #1,%d0 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a76c: 2b4b 0008 movel %a3,%a5@(8) node->st_ino = ++fs_info->ino_count; 4a770: 2540 0004 movel %d0,%a2@(4) 4a774: 2b40 0034 movel %d0,%a5@(52) 4a778: 2f0d movel %a5,%sp@- 4a77a: 486b 004c pea %a3@(76) 4a77e: 4eb9 0004 7574 jsr 47574 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a784: 508f addql #8,%sp 4a786: 60b2 bras 4a73a RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4a788: 41ed 0050 lea %a5@(80),%a0 4a78c: 2b48 004c movel %a0,%a5@(76) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4a790: 41ed 004c lea %a5@(76),%a0 /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a794: 202a 0004 movel %a2@(4),%d0 4a798: 5280 addql #1,%d0 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 4a79a: 42ad 0050 clrl %a5@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4a79e: 2b48 0054 movel %a0,%a5@(84) } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a7a2: 2b4b 0008 movel %a3,%a5@(8) node->st_ino = ++fs_info->ino_count; 4a7a6: 2540 0004 movel %d0,%a2@(4) 4a7aa: 2b40 0034 movel %d0,%a5@(52) 4a7ae: 2f0d movel %a5,%sp@- 4a7b0: 486b 004c pea %a3@(76) 4a7b4: 4eb9 0004 7574 jsr 47574 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a7ba: 508f addql #8,%sp 4a7bc: 6000 ff7c braw 4a73a } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 4a7c0: 42ad 0054 clrl %a5@(84) node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; 4a7c4: 4280 clrl %d0 4a7c6: 4281 clrl %d1 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a7c8: 2b4b 0008 movel %a3,%a5@(8) node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; 4a7cc: 2b40 004c movel %d0,%a5@(76) 4a7d0: 2b41 0050 movel %d1,%a5@(80) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a7d4: 202a 0004 movel %a2@(4),%d0 4a7d8: 5280 addql #1,%d0 4a7da: 2540 0004 movel %d0,%a2@(4) 4a7de: 2b40 0034 movel %d0,%a5@(52) 4a7e2: 2f0d movel %a5,%sp@- 4a7e4: 486b 004c pea %a3@(76) 4a7e8: 4eb9 0004 7574 jsr 47574 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a7ee: 508f addql #8,%sp 4a7f0: 6000 ff48 braw 4a73a } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; 4a7f4: 2b54 004c movel %a4@,%a5@(76) node->info.device.minor = info->device.minor; 4a7f8: 2b6c 0004 0050 movel %a4@(4),%a5@(80) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a7fe: 202a 0004 movel %a2@(4),%d0 4a802: 5280 addql #1,%d0 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a804: 2b4b 0008 movel %a3,%a5@(8) node->st_ino = ++fs_info->ino_count; 4a808: 2540 0004 movel %d0,%a2@(4) 4a80c: 2b40 0034 movel %d0,%a5@(52) 4a810: 2f0d movel %a5,%sp@- 4a812: 486b 004c pea %a3@(76) 4a816: 4eb9 0004 7574 jsr 47574 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a81c: 508f addql #8,%sp 4a81e: 6000 ff1a braw 4a73a } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; node->info.file.indirect = 0; 4a822: 42ad 0054 clrl %a5@(84) node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; 4a826: 4280 clrl %d0 4a828: 4281 clrl %d1 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 4a82a: 42ad 0058 clrl %a5@(88) node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; 4a82e: 2b40 004c movel %d0,%a5@(76) 4a832: 2b41 0050 movel %d1,%a5@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 4a836: 42ad 005c clrl %a5@(92) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a83a: 202a 0004 movel %a2@(4),%d0 4a83e: 5280 addql #1,%d0 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a840: 2b4b 0008 movel %a3,%a5@(8) node->st_ino = ++fs_info->ino_count; 4a844: 2540 0004 movel %d0,%a2@(4) 4a848: 2b40 0034 movel %d0,%a5@(52) 4a84c: 2f0d movel %a5,%sp@- 4a84e: 486b 004c pea %a3@(76) 4a852: 4eb9 0004 7574 jsr 47574 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a858: 508f addql #8,%sp 4a85a: 6000 fede braw 4a73a node->info.file.size = 0; node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; } else if ( type == IMFS_FIFO ) { node->info.fifo.pipe = NULL; 4a85e: 42ad 004c clrl %a5@(76) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a862: 202a 0004 movel %a2@(4),%d0 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a866: 2b4b 0008 movel %a3,%a5@(8) node->st_ino = ++fs_info->ino_count; 4a86a: 5280 addql #1,%d0 4a86c: 2540 0004 movel %d0,%a2@(4) 4a870: 2b40 0034 movel %d0,%a5@(52) 4a874: 2f0d movel %a5,%sp@- 4a876: 486b 004c pea %a3@(76) 4a87a: 4eb9 0004 7574 jsr 47574 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a880: 508f addql #8,%sp 4a882: 6000 feb6 braw 4a73a =============================================================================== 0004536c : */ void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 4536c: 4e56 ffe0 linkw %fp,#-32 45370: 206e 0008 moveal %fp@(8),%a0 45374: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 45378: 2808 movel %a0,%d4 4537a: 49f9 0004 51e0 lea 451e0 ,%a4 45380: 0684 0000 0050 addil #80,%d4 45386: 262e 000c movel %fp@(12),%d3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4538a: 2668 004c moveal %a0@(76),%a3 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 4538e: b88b cmpl %a3,%d4 45390: 674e beqs 453e0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 45392: 2a03 movel %d3,%d5 45394: 45f9 0005 45ac lea 545ac ,%a2 4539a: 5285 addql #1,%d5 4539c: 4bf9 0004 536c lea 4536c ,%a5 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 453a2: 4a83 tstl %d3 453a4: 6d26 blts 453cc <== NEVER TAKEN 453a6: 4282 clrl %d2 fprintf(stdout, "...." ); 453a8: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 453ae: 5282 addql #1,%d2 fprintf(stdout, "...." ); 453b0: 2f28 0008 movel %a0@(8),%sp@- 453b4: 4878 0004 pea 4 453b8: 4878 0001 pea 1 453bc: 4879 0006 4288 pea 64288 453c2: 4e92 jsr %a2@ !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 453c4: 4fef 0010 lea %sp@(16),%sp 453c8: b483 cmpl %d3,%d2 453ca: 6fdc bles 453a8 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 453cc: 2f0b movel %a3,%sp@- 453ce: 4e94 jsr %a4@ if ( the_jnode->type == IMFS_DIRECTORY ) 453d0: 588f addql #4,%sp 453d2: 7001 moveq #1,%d0 453d4: b0ab 0048 cmpl %a3@(72),%d0 453d8: 6710 beqs 453ea the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 453da: 2653 moveal %a3@,%a3 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 453dc: b88b cmpl %a3,%d4 453de: 66c2 bnes 453a2 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 453e0: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 453e6: 4e5e unlk %fp 453e8: 4e75 rts for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 453ea: 2f05 movel %d5,%sp@- 453ec: 2f0b movel %a3,%sp@- 453ee: 4e95 jsr %a5@ the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 453f0: 2653 moveal %a3@,%a3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 453f2: 508f addql #8,%sp IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 453f4: b88b cmpl %a3,%d4 453f6: 66aa bnes 453a2 453f8: 60e6 bras 453e0 =============================================================================== 0004aa8c : IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 4aa8c: 70f8 moveq #-8,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4aa8e: 4e56 ffac linkw %fp,#-84 4aa92: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4aa96: 2a2e 0010 movel %fp@(16),%d5 IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 4aa9a: c085 andl %d5,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4aa9c: 286e 0008 moveal %fp@(8),%a4 4aaa0: 246e 0014 moveal %fp@(20),%a2 int i = 0; 4aaa4: 42ae fff8 clrl %fp@(-8) IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 4aaa8: 4a80 tstl %d0 4aaaa: 6600 0280 bnew 4ad2c 4aaae: 280e movel %fp,%d4 4aab0: 260e movel %fp,%d3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4aab2: 4280 clrl %d0 4aab4: 5984 subql #4,%d4 4aab6: 0683 ffff ffd7 addil #-41,%d3 4aabc: 4bf9 0004 b354 lea 4b354 ,%a5 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4aac2: 2e3c 0004 a9a6 movel #305574,%d7 rtems_set_errno_and_return_minus_one( ENOTDIR ); /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 4aac8: 2c3c 0004 b2cc movel #307916,%d6 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4aace: 2652 moveal %a2@,%a3 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 4aad0: 2f04 movel %d4,%sp@- 4aad2: 2f03 movel %d3,%sp@- 4aad4: 2f2e 000c movel %fp@(12),%sp@- 4aad8: 4874 0800 pea %a4@(00000000,%d0:l) 4aadc: 4e95 jsr %a5@ pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4aade: 2052 moveal %a2@,%a0 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 4aae0: 2400 movel %d0,%d2 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4aae2: 4fef 0010 lea %sp@(16),%sp */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 4aae6: 202e fffc movel %fp@(-4),%d0 4aaea: 91ae 000c subl %d0,%fp@(12) i += len; 4aaee: d1ae fff8 addl %d0,%fp@(-8) if ( !pathloc->node_access ) 4aaf2: 4a88 tstl %a0 4aaf4: 6700 00f2 beqw 4abe8 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4aaf8: 4a82 tstl %d2 4aafa: 665c bnes 4ab58 * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { 4aafc: 7201 moveq #1,%d1 4aafe: b2a8 0048 cmpl %a0@(72),%d1 4ab02: 6600 019c bnew 4aca0 if ( node->info.directory.mt_fs != NULL ) { 4ab06: 2268 0058 moveal %a0@(88),%a1 4ab0a: 4a89 tstl %a1 4ab0c: 6700 0192 beqw 4aca0 *pathloc = node->info.directory.mt_fs->mt_fs_root; 4ab10: 204a moveal %a2,%a0 <== NOT EXECUTED 4ab12: 20e9 001c movel %a1@(28),%a0@+ <== NOT EXECUTED 4ab16: 20e9 0020 movel %a1@(32),%a0@+ <== NOT EXECUTED 4ab1a: 20e9 0024 movel %a1@(36),%a0@+ <== NOT EXECUTED 4ab1e: 20e9 0028 movel %a1@(40),%a0@+ <== NOT EXECUTED 4ab22: 20a9 002c movel %a1@(44),%a0@ <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4ab26: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED 4ab2a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ab2c: 222e fff8 movel %fp@(-8),%d1 <== NOT EXECUTED 4ab30: 9280 subl %d0,%d1 <== NOT EXECUTED 4ab32: d0ae 000c addl %fp@(12),%d0 <== NOT EXECUTED 4ab36: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 4ab3a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4ab3c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ab3e: 4874 1800 pea %a4@(00000000,%d1:l) <== NOT EXECUTED 4ab42: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4ab44: 4e90 jsr %a0@ <== NOT EXECUTED 4ab46: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4ab4a: 2400 movel %d0,%d2 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ab4c: 2002 movel %d2,%d0 4ab4e: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4ab54: 4e5e unlk %fp 4ab56: 4e75 rts /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 4ab58: 7001 moveq #1,%d0 4ab5a: b0ab 0048 cmpl %a3@(72),%d0 4ab5e: 6700 00bc beqw 4ac1c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4ab62: 7003 moveq #3,%d0 4ab64: b082 cmpl %d2,%d0 4ab66: 6722 beqs 4ab8a 4ab68: 7204 moveq #4,%d1 4ab6a: b282 cmpl %d2,%d1 4ab6c: 6700 0094 beqw 4ac02 4ab70: 103c 0002 moveb #2,%d0 4ab74: b082 cmpl %d2,%d0 4ab76: 6750 beqs 4abc8 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4ab78: 7004 moveq #4,%d0 4ab7a: b082 cmpl %d2,%d0 4ab7c: 6700 ff7e beqw 4aafc 4ab80: 202e fff8 movel %fp@(-8),%d0 4ab84: 2648 moveal %a0,%a3 4ab86: 6000 ff48 braw 4aad0 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 4ab8a: 2028 0048 movel %a0@(72),%d0 4ab8e: 7203 moveq #3,%d1 4ab90: b280 cmpl %d0,%d1 4ab92: 6700 0142 beqw 4acd6 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 4ab96: 7404 moveq #4,%d2 4ab98: b480 cmpl %d0,%d2 4ab9a: 6700 00e4 beqw 4ac80 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4ab9e: 7201 moveq #1,%d1 4aba0: b280 cmpl %d0,%d1 4aba2: 6600 01a2 bnew 4ad46 rtems_set_errno_and_return_minus_one( ENOTDIR ); /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 4aba6: 2f03 movel %d3,%sp@- 4aba8: 2f08 movel %a0,%sp@- 4abaa: 2046 moveal %d6,%a0 4abac: 4e90 jsr %a0@ if ( !node ) 4abae: 508f addql #8,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 4abb0: 2640 moveal %d0,%a3 if ( !node ) 4abb2: 4a80 tstl %d0 4abb4: 6732 beqs 4abe8 * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 4abb6: 7001 moveq #1,%d0 4abb8: b0ab 0048 cmpl %a3@(72),%d0 4abbc: 6776 beqs 4ac34 } /* * Set the node access to the point we have found. */ pathloc->node_access = node; 4abbe: 248b movel %a3,%a2@ /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4abc0: 202e fff8 movel %fp@(-8),%d0 4abc4: 6000 ff0a braw 4aad0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4abc8: 2279 0005 f8d0 moveal 5f8d0 ,%a1 4abce: b1e9 0018 cmpal %a1@(24),%a0 4abd2: 67ac beqs 4ab80 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4abd4: 226a 0010 moveal %a2@(16),%a1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 4abd8: b1e9 001c cmpal %a1@(28),%a0 4abdc: 6700 010e beqw 4acec pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 4abe0: 2668 0008 moveal %a0@(8),%a3 4abe4: 4a8b tstl %a3 4abe6: 66d6 bnes 4abbe /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 4abe8: 4eb9 0004 f098 jsr 4f098 <__errno> 4abee: 74ff moveq #-1,%d2 4abf0: 7a02 moveq #2,%d5 4abf2: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4abf4: 2002 movel %d2,%d0 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 4abf6: 2085 movel %d5,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4abf8: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4abfe: 4e5e unlk %fp 4ac00: 4e75 rts case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4ac02: 4eb9 0004 f098 jsr 4f098 <__errno> 4ac08: 74ff moveq #-1,%d2 4ac0a: 785b moveq #91,%d4 4ac0c: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ac0e: 2002 movel %d2,%d0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4ac10: 2084 movel %d4,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ac12: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4ac18: 4e5e unlk %fp 4ac1a: 4e75 rts /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4ac1c: 4878 0001 pea 1 4ac20: 2047 moveal %d7,%a0 4ac22: 2f0a movel %a2,%sp@- 4ac24: 4e90 jsr %a0@ 4ac26: 508f addql #8,%sp 4ac28: 4a80 tstl %d0 4ac2a: 6700 0090 beqw 4acbc 4ac2e: 2052 moveal %a2@,%a0 4ac30: 6000 ff30 braw 4ab62 * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 4ac34: 4aab 0058 tstl %a3@(88) 4ac38: 6784 beqs 4abbe IMFS_skip_separator( pathname, &pathnamelen, &i); 4ac3a: 486e fff8 pea %fp@(-8) if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 4ac3e: 742e moveq #46,%d2 * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); 4ac40: 486e 000c pea %fp@(12) 4ac44: 2f0c movel %a4,%sp@- 4ac46: 4eba fc78 jsr %pc@(4a8c0 ) if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 4ac4a: 202e fff8 movel %fp@(-8),%d0 4ac4e: 4fef 000c lea %sp@(12),%sp 4ac52: 41f4 0800 lea %a4@(00000000,%d0:l),%a0 4ac56: 1210 moveb %a0@,%d1 4ac58: 49c1 extbl %d1 4ac5a: b481 cmpl %d1,%d2 4ac5c: 6600 0102 bnew 4ad60 4ac60: 1234 0801 moveb %a4@(00000001,%d0:l),%d1 4ac64: 49c1 extbl %d1 4ac66: b481 cmpl %d1,%d2 4ac68: 6600 00f6 bnew 4ad60 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; 4ac6c: 266b 0008 moveal %a3@(8),%a3 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; 4ac70: 5480 addql #2,%d0 pathnamelen -= 2; 4ac72: 55ae 000c subql #2,%fp@(12) *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; 4ac76: 2d40 fff8 movel %d0,%fp@(-8) } /* * Set the node access to the point we have found. */ pathloc->node_access = node; 4ac7a: 248b movel %a3,%a2@ 4ac7c: 6000 ff42 braw 4abc0 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 4ac80: 42a7 clrl %sp@- 4ac82: 2f0a movel %a2,%sp@- 4ac84: 4eb9 0004 ada0 jsr 4ada0 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 4ac8a: 2052 moveal %a2@,%a0 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 4ac8c: 2400 movel %d0,%d2 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) 4ac8e: 508f addql #8,%sp 4ac90: 70ff moveq #-1,%d0 4ac92: b082 cmpl %d2,%d0 4ac94: 6700 feb6 beqw 4ab4c 4ac98: 2028 0048 movel %a0@(72),%d0 4ac9c: 6000 ff00 braw 4ab9e flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4aca0: 2f0a movel %a2,%sp@- 4aca2: 4eb9 0004 a91c jsr 4a91c 4aca8: 2400 movel %d0,%d2 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4acaa: 2e85 movel %d5,%sp@ 4acac: 2f0a movel %a2,%sp@- 4acae: 4eb9 0004 a9a6 jsr 4a9a6 4acb4: 508f addql #8,%sp 4acb6: 4a80 tstl %d0 4acb8: 6600 fe92 bnew 4ab4c rtems_set_errno_and_return_minus_one( EACCES ); 4acbc: 4eb9 0004 f098 jsr 4f098 <__errno> 4acc2: 74ff moveq #-1,%d2 4acc4: 760d moveq #13,%d3 4acc6: 2040 moveal %d0,%a0 return result; } 4acc8: 2002 movel %d2,%d0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4acca: 2083 movel %d3,%a0@ return result; } 4accc: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4acd2: 4e5e unlk %fp 4acd4: 4e75 rts case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 4acd6: 42a7 clrl %sp@- 4acd8: 2f0a movel %a2,%sp@- 4acda: 4eb9 0004 aa40 jsr 4aa40 node = pathloc->node_access; 4ace0: 2052 moveal %a2@,%a0 4ace2: 508f addql #8,%sp 4ace4: 2028 0048 movel %a0@(72),%d0 4ace8: 6000 feb4 braw 4ab9e */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 4acec: 204a moveal %a2,%a0 4acee: 20e9 0008 movel %a1@(8),%a0@+ 4acf2: 20e9 000c movel %a1@(12),%a0@+ 4acf6: 20e9 0010 movel %a1@(16),%a0@+ 4acfa: 20e9 0014 movel %a1@(20),%a0@+ 4acfe: 20a9 0018 movel %a1@(24),%a0@ */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4ad02: 202e fffc movel %fp@(-4),%d0 4ad06: 2f0a movel %a2,%sp@- 4ad08: 222e fff8 movel %fp@(-8),%d1 4ad0c: 9280 subl %d0,%d1 4ad0e: d0ae 000c addl %fp@(12),%d0 4ad12: 206a 000c moveal %a2@(12),%a0 4ad16: 2f05 movel %d5,%sp@- 4ad18: 2f00 movel %d0,%sp@- 4ad1a: 4874 1800 pea %a4@(00000000,%d1:l) 4ad1e: 2050 moveal %a0@,%a0 4ad20: 4e90 jsr %a0@ 4ad22: 4fef 0010 lea %sp@(16),%sp 4ad26: 2400 movel %d0,%d2 4ad28: 6000 fe22 braw 4ab4c char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); 4ad2c: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 4ad32: 74ff moveq #-1,%d2 <== NOT EXECUTED 4ad34: 7e05 moveq #5,%d7 <== NOT EXECUTED 4ad36: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ad38: 2002 movel %d2,%d0 <== NOT EXECUTED char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); 4ad3a: 2087 movel %d7,%a0@ <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ad3c: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ad42: 4e5e unlk %fp <== NOT EXECUTED 4ad44: 4e75 rts <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4ad46: 4eb9 0004 f098 jsr 4f098 <__errno> 4ad4c: 74ff moveq #-1,%d2 4ad4e: 7c14 moveq #20,%d6 4ad50: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ad52: 2002 movel %d2,%d0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4ad54: 2086 movel %d6,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ad56: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4ad5c: 4e5e unlk %fp 4ad5e: 4e75 rts * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 4ad60: 266b 0058 moveal %a3@(88),%a3 4ad64: 224a moveal %a2,%a1 4ad66: 22eb 001c movel %a3@(28),%a1@+ 4ad6a: 22eb 0020 movel %a3@(32),%a1@+ 4ad6e: 22eb 0024 movel %a3@(36),%a1@+ 4ad72: 22eb 0028 movel %a3@(40),%a1@+ 4ad76: 22ab 002c movel %a3@(44),%a1@ return (*pathloc->ops->evalpath_h)( &pathname[i], 4ad7a: 226a 000c moveal %a2@(12),%a1 4ad7e: 2f0a movel %a2,%sp@- 4ad80: 2f05 movel %d5,%sp@- 4ad82: 2f2e 000c movel %fp@(12),%sp@- 4ad86: 2f08 movel %a0,%sp@- 4ad88: 2011 movel %a1@,%d0 4ad8a: 2040 moveal %d0,%a0 4ad8c: 4e90 jsr %a0@ 4ad8e: 4fef 0010 lea %sp@(16),%sp 4ad92: 2400 movel %d0,%d2 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ad94: 2002 movel %d2,%d0 4ad96: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4ad9c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004aee2 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4aee2: 4e56 ffa8 linkw %fp,#-88 4aee6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4aeea: 286e 0008 moveal %fp@(8),%a4 4aeee: 280e movel %fp,%d4 4aef0: 260e movel %fp,%d3 4aef2: 5184 subql #8,%d4 4aef4: 0683 ffff ffd3 addil #-45,%d3 4aefa: 4bf9 0004 b354 lea 4b354 ,%a5 * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4af00: 2c3c 0004 a9a6 movel #305574,%d6 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4af06: 2a3c 0004 b2cc movel #307916,%d5 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 4af0c: 2e3c 0004 ae28 movel #306728,%d7 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4af12: 2f0c movel %a4,%sp@- int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4af14: 246e 000c moveal %fp@(12),%a2 int i = 0; 4af18: 42ae fff4 clrl %fp@(-12) node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4af1c: 4eb9 0005 0404 jsr 50404 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4af22: 2652 moveal %a2@,%a3 /* * Get the path length. */ pathlen = strlen( path ); 4af24: 588f addql #4,%sp 4af26: 4281 clrl %d1 4af28: 2d40 fffc movel %d0,%fp@(-4) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4af2c: 2f04 movel %d4,%sp@- 4af2e: 2f03 movel %d3,%sp@- 4af30: 2f00 movel %d0,%sp@- 4af32: 4874 1800 pea %a4@(00000000,%d1:l) 4af36: 4e95 jsr %a5@ pathlen -= len; i += len; if ( !pathloc->node_access ) 4af38: 2052 moveal %a2@,%a0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4af3a: 2400 movel %d0,%d2 pathlen -= len; i += len; if ( !pathloc->node_access ) 4af3c: 4fef 0010 lea %sp@(16),%sp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 4af40: 202e fff8 movel %fp@(-8),%d0 4af44: 91ae fffc subl %d0,%fp@(-4) i += len; 4af48: d1ae fff4 addl %d0,%fp@(-12) if ( !pathloc->node_access ) 4af4c: 4a88 tstl %a0 4af4e: 6700 016e beqw 4b0be /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4af52: 4a82 tstl %d2 4af54: 6730 beqs 4af86 if ( node->type == IMFS_DIRECTORY ) 4af56: 7001 moveq #1,%d0 4af58: b0ab 0048 cmpl %a3@(72),%d0 4af5c: 6700 00dc beqw 4b03a if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4af60: 7002 moveq #2,%d0 4af62: b082 cmpl %d2,%d0 4af64: 6700 00a0 beqw 4b006 4af68: 6418 bccs 4af82 4af6a: 7203 moveq #3,%d1 4af6c: b282 cmpl %d2,%d1 4af6e: 674a beqs 4afba 4af70: 7004 moveq #4,%d0 4af72: b082 cmpl %d2,%d0 4af74: 672a beqs 4afa0 <== ALWAYS TAKEN 4af76: 202e fffc movel %fp@(-4),%d0 4af7a: 2648 moveal %a0,%a3 4af7c: 222e fff4 movel %fp@(-12),%d1 4af80: 60aa bras 4af2c 4af82: 4a82 tstl %d2 4af84: 66f0 bnes 4af76 <== ALWAYS TAKEN pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 4af86: 4eb9 0004 f098 jsr 4f098 <__errno> 4af8c: 7e11 moveq #17,%d7 4af8e: 74ff moveq #-1,%d2 4af90: 2040 moveal %d0,%a0 4af92: 2087 movel %d7,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4af94: 2002 movel %d2,%d0 4af96: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4af9c: 4e5e unlk %fp 4af9e: 4e75 rts case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4afa0: 4eb9 0004 f098 jsr 4f098 <__errno> 4afa6: 74ff moveq #-1,%d2 4afa8: 7c5b moveq #91,%d6 4afaa: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4afac: 2002 movel %d2,%d0 case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4afae: 2086 movel %d6,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4afb0: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4afb6: 4e5e unlk %fp 4afb8: 4e75 rts pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4afba: 2028 0048 movel %a0@(72),%d0 4afbe: 7203 moveq #3,%d1 4afc0: b280 cmpl %d0,%d1 4afc2: 6700 00e0 beqw 4b0a4 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 4afc6: 7204 moveq #4,%d1 4afc8: b280 cmpl %d0,%d1 4afca: 6700 00d8 beqw 4b0a4 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 4afce: 4a88 tstl %a0 4afd0: 6700 01d8 beqw 4b1aa /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4afd4: 7001 moveq #1,%d0 4afd6: b0a8 0048 cmpl %a0@(72),%d0 4afda: 6600 01ce bnew 4b1aa /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4afde: 2f03 movel %d3,%sp@- 4afe0: 2f08 movel %a0,%sp@- 4afe2: 2045 moveal %d5,%a0 4afe4: 4e90 jsr %a0@ /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4afe6: 508f addql #8,%sp /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4afe8: 2640 moveal %d0,%a3 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4afea: 4a80 tstl %d0 4afec: 6700 013a beqw 4b128 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 4aff0: 7001 moveq #1,%d0 4aff2: b0ab 0048 cmpl %a3@(72),%d0 4aff6: 675a beqs 4b052 4aff8: 202e fffc movel %fp@(-4),%d0 4affc: 222e fff4 movel %fp@(-12),%d1 } i += 2; pathlen -= 2; node = node->Parent; } pathloc->node_access = node; 4b000: 248b movel %a3,%a2@ 4b002: 6000 ff28 braw 4af2c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4b006: 2279 0005 f8d0 moveal 5f8d0 ,%a1 4b00c: 2669 0018 moveal %a1@(24),%a3 4b010: b1cb cmpal %a3,%a0 4b012: 6700 00c4 beqw 4b0d8 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b016: 226a 0010 moveal %a2@(16),%a1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 4b01a: b1e9 001c cmpal %a1@(28),%a0 4b01e: 6700 00c4 beqw 4b0e4 *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 4b022: 2668 0008 moveal %a0@(8),%a3 4b026: 4a8b tstl %a3 4b028: 6700 0094 beqw 4b0be rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; 4b02c: 248b movel %a3,%a2@ 4b02e: 202e fffc movel %fp@(-4),%d0 4b032: 222e fff4 movel %fp@(-12),%d1 break; 4b036: 6000 fef4 braw 4af2c * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4b03a: 4878 0001 pea 1 4b03e: 2046 moveal %d6,%a0 4b040: 2f0a movel %a2,%sp@- 4b042: 4e90 jsr %a0@ 4b044: 508f addql #8,%sp 4b046: 4a80 tstl %d0 4b048: 6700 0146 beqw 4b190 4b04c: 2052 moveal %a2@,%a0 4b04e: 6000 ff10 braw 4af60 */ if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 4b052: 4aab 0058 tstl %a3@(88) 4b056: 67a0 beqs 4aff8 IMFS_skip_separator( path, &pathlen, &i); 4b058: 486e fff4 pea %fp@(-12) if ((path[i] != '.') || (path[i + 1] != '.')) { 4b05c: 742e moveq #46,%d2 if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); 4b05e: 486e fffc pea %fp@(-4) 4b062: 2f0c movel %a4,%sp@- 4b064: 4eba f85a jsr %pc@(4a8c0 ) if ((path[i] != '.') || (path[i + 1] != '.')) { 4b068: 222e fff4 movel %fp@(-12),%d1 4b06c: 4fef 000c lea %sp@(12),%sp 4b070: 41f4 1800 lea %a4@(00000000,%d1:l),%a0 4b074: 1010 moveb %a0@,%d0 4b076: 49c0 extbl %d0 4b078: b480 cmpl %d0,%d2 4b07a: 6600 0148 bnew 4b1c4 4b07e: 1034 1801 moveb %a4@(00000001,%d1:l),%d0 4b082: 49c0 extbl %d0 4b084: b480 cmpl %d0,%d2 4b086: 6600 013c bnew 4b1c4 return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; pathlen -= 2; 4b08a: 202e fffc movel %fp@(-4),%d0 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; 4b08e: 5481 addql #2,%d1 pathlen -= 2; 4b090: 5580 subql #2,%d0 node = node->Parent; 4b092: 266b 0008 moveal %a3@(8),%a3 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; 4b096: 2d41 fff4 movel %d1,%fp@(-12) pathlen -= 2; 4b09a: 2d40 fffc movel %d0,%fp@(-4) node = node->Parent; } pathloc->node_access = node; 4b09e: 248b movel %a3,%a2@ 4b0a0: 6000 fe8a braw 4af2c if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 4b0a4: 42a7 clrl %sp@- 4b0a6: 2047 moveal %d7,%a0 4b0a8: 2f0a movel %a2,%sp@- 4b0aa: 4e90 jsr %a0@ if ( result == -1 ) 4b0ac: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 4b0ae: 2400 movel %d0,%d2 if ( result == -1 ) 4b0b0: 70ff moveq #-1,%d0 4b0b2: b082 cmpl %d2,%d0 4b0b4: 6700 fede beqw 4af94 4b0b8: 2052 moveal %a2@,%a0 4b0ba: 6000 ff12 braw 4afce * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 4b0be: 4eb9 0004 f098 jsr 4f098 <__errno> 4b0c4: 74ff moveq #-1,%d2 4b0c6: 7a02 moveq #2,%d5 4b0c8: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b0ca: 2002 movel %d2,%d0 * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 4b0cc: 2085 movel %d5,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b0ce: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4b0d4: 4e5e unlk %fp 4b0d6: 4e75 rts /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4b0d8: 202e fffc movel %fp@(-4),%d0 4b0dc: 222e fff4 movel %fp@(-12),%d1 4b0e0: 6000 fe4a braw 4af2c if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 4b0e4: 204a moveal %a2,%a0 4b0e6: 20e9 0008 movel %a1@(8),%a0@+ 4b0ea: 20e9 000c movel %a1@(12),%a0@+ 4b0ee: 20e9 0010 movel %a1@(16),%a0@+ 4b0f2: 20e9 0014 movel %a1@(20),%a0@+ 4b0f6: 20a9 0018 movel %a1@(24),%a0@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4b0fa: 206a 000c moveal %a2@(12),%a0 4b0fe: 2f2e 0010 movel %fp@(16),%sp@- 4b102: 202e fff4 movel %fp@(-12),%d0 4b106: 90ae fff8 subl %fp@(-8),%d0 4b10a: 2f0a movel %a2,%sp@- 4b10c: 4874 0800 pea %a4@(00000000,%d0:l) 4b110: 2068 0004 moveal %a0@(4),%a0 4b114: 4e90 jsr %a0@ 4b116: 4fef 000c lea %sp@(12),%sp 4b11a: 2400 movel %d0,%d2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b11c: 2002 movel %d2,%d0 4b11e: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4b124: 4e5e unlk %fp 4b126: 4e75 rts case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4b128: 202e fff4 movel %fp@(-12),%d0 4b12c: 2200 movel %d0,%d1 4b12e: 92ae fff8 subl %fp@(-8),%d1 4b132: d28c addl %a4,%d1 4b134: 206e 0010 moveal %fp@(16),%a0 4b138: 2081 movel %d1,%a0@ /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 4b13a: 1034 0800 moveb %a4@(00000000,%d0:l),%d0 4b13e: 6726 beqs 4b166 4b140: 47f9 0004 4220 lea 44220 ,%a3 if ( !IMFS_is_separator( path[ i ] ) ) 4b146: 49c0 extbl %d0 4b148: 2f00 movel %d0,%sp@- 4b14a: 4e93 jsr %a3@ 4b14c: 588f addql #4,%sp 4b14e: 4a80 tstl %d0 4b150: 6700 ff6c beqw 4b0be /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 4b154: 222e fff4 movel %fp@(-12),%d1 4b158: 5281 addql #1,%d1 4b15a: 1034 1800 moveb %a4@(00000000,%d1:l),%d0 4b15e: 2d41 fff4 movel %d1,%fp@(-12) 4b162: 4a00 tstb %d0 4b164: 66e0 bnes 4b146 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4b166: 2f0a movel %a2,%sp@- 4b168: 4eb9 0004 a91c jsr 4a91c /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 4b16e: 2052 moveal %a2@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4b170: 2400 movel %d0,%d2 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 4b172: 588f addql #4,%sp 4b174: 7001 moveq #1,%d0 4b176: b0a8 0048 cmpl %a0@(72),%d0 4b17a: 662e bnes 4b1aa <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 4b17c: 4878 0003 pea 3 4b180: 2f0a movel %a2,%sp@- 4b182: 4eb9 0004 a9a6 jsr 4a9a6 4b188: 508f addql #8,%sp 4b18a: 4a80 tstl %d0 4b18c: 6600 fe06 bnew 4af94 rtems_set_errno_and_return_minus_one( EACCES ); 4b190: 4eb9 0004 f098 jsr 4f098 <__errno> 4b196: 74ff moveq #-1,%d2 4b198: 760d moveq #13,%d3 4b19a: 2040 moveal %d0,%a0 return result; } 4b19c: 2002 movel %d2,%d0 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4b19e: 2083 movel %d3,%a0@ return result; } 4b1a0: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4b1a6: 4e5e unlk %fp 4b1a8: 4e75 rts /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4b1aa: 4eb9 0004 f098 jsr 4f098 <__errno> 4b1b0: 74ff moveq #-1,%d2 4b1b2: 7814 moveq #20,%d4 4b1b4: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b1b6: 2002 movel %d2,%d0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4b1b8: 2084 movel %d4,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b1ba: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4b1c0: 4e5e unlk %fp 4b1c2: 4e75 rts done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 4b1c4: 266b 0058 moveal %a3@(88),%a3 4b1c8: 224a moveal %a2,%a1 4b1ca: 22eb 001c movel %a3@(28),%a1@+ 4b1ce: 22eb 0020 movel %a3@(32),%a1@+ 4b1d2: 22eb 0024 movel %a3@(36),%a1@+ 4b1d6: 22eb 0028 movel %a3@(40),%a1@+ 4b1da: 22ab 002c movel %a3@(44),%a1@ return (*pathloc->ops->evalformake_h)( &path[i], 4b1de: 226a 000c moveal %a2@(12),%a1 4b1e2: 2f2e 0010 movel %fp@(16),%sp@- 4b1e6: 2f0a movel %a2,%sp@- 4b1e8: 2f08 movel %a0,%sp@- 4b1ea: 2029 0004 movel %a1@(4),%d0 4b1ee: 2040 moveal %d0,%a0 4b1f0: 4e90 jsr %a0@ 4b1f2: 4fef 000c lea %sp@(12),%sp 4b1f6: 2400 movel %d0,%d2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b1f8: 2002 movel %d2,%d0 4b1fa: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4b200: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ae28 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4ae28: 4e56 ffec linkw %fp,#-20 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 4ae2c: 2079 0005 f8d0 moveal 5f8d0 ,%a0 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4ae32: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4ae36: 266e 0008 moveal %fp@(8),%a3 if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 4ae3a: 4bf9 0004 ada0 lea 4ada0 ,%a5 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 4ae40: 49f9 0004 aa40 lea 4aa40 ,%a4 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4ae46: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 4ae4a: 2453 moveal %a3@,%a2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4ae4c: 4281 clrl %d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4ae4e: 3028 0030 movew %a0@(48),%d0 4ae52: 5280 addql #1,%d0 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4ae54: 3200 movew %d0,%d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4ae56: 3140 0030 movew %d0,%a0@(48) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4ae5a: 7005 moveq #5,%d0 4ae5c: b081 cmpl %d1,%d0 4ae5e: 6564 bcss 4aec4 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 4ae60: 202a 0048 movel %a2@(72),%d0 4ae64: 7203 moveq #3,%d1 4ae66: b280 cmpl %d0,%d1 4ae68: 6740 beqs 4aeaa result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 4ae6a: 7204 moveq #4,%d1 4ae6c: b280 cmpl %d0,%d1 4ae6e: 671a beqs 4ae8a result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 4ae70: 5780 subql #3,%d0 4ae72: 7201 moveq #1,%d1 4ae74: b280 cmpl %d0,%d1 4ae76: 64d2 bccs 4ae4a <== NEVER TAKEN 4ae78: 4280 clrl %d0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4ae7a: 4241 clrw %d1 4ae7c: 3141 0030 movew %d1,%a0@(48) return result; } 4ae80: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4ae86: 4e5e unlk %fp 4ae88: 4e75 rts if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 4ae8a: 2f02 movel %d2,%sp@- 4ae8c: 2f0b movel %a3,%sp@- 4ae8e: 4e95 jsr %a5@ 4ae90: 508f addql #8,%sp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4ae92: 4a80 tstl %d0 4ae94: 6620 bnes 4aeb6 4ae96: 202a 0048 movel %a2@(72),%d0 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 4ae9a: 7201 moveq #1,%d1 4ae9c: 5780 subql #3,%d0 ( jnode->type == IMFS_HARD_LINK ) ) ); 4ae9e: 2079 0005 f8d0 moveal 5f8d0 ,%a0 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 4aea4: b280 cmpl %d0,%d1 4aea6: 64a2 bccs 4ae4a <== ALWAYS TAKEN 4aea8: 60ce bras 4ae78 <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 4aeaa: 2f02 movel %d2,%sp@- 4aeac: 2f0b movel %a3,%sp@- 4aeae: 4e94 jsr %a4@ 4aeb0: 508f addql #8,%sp else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4aeb2: 4a80 tstl %d0 4aeb4: 67e0 beqs 4ae96 4aeb6: 2079 0005 f8d0 moveal 5f8d0 ,%a0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4aebc: 4241 clrw %d1 4aebe: 3141 0030 movew %d1,%a0@(48) 4aec2: 60bc bras 4ae80 * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 4aec4: 4241 clrw %d1 4aec6: 3141 0030 movew %d1,%a0@(48) rtems_set_errno_and_return_minus_one( ELOOP ); 4aeca: 4eb9 0004 f098 jsr 4f098 <__errno> 4aed0: 725c moveq #92,%d1 4aed2: 2040 moveal %d0,%a0 4aed4: 70ff moveq #-1,%d0 */ rtems_filesystem_link_counts = 0; return result; } 4aed6: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 4aedc: 2081 movel %d1,%a0@ */ rtems_filesystem_link_counts = 0; return result; } 4aede: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a9a6 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 4a9a6: 70f8 moveq #-8,%d0 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4a9a8: 4e56 fff4 linkw %fp,#-12 4a9ac: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4a9b0: 242e 000c movel %fp@(12),%d2 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 4a9b4: c082 andl %d2,%d0 4a9b6: 6670 bnes 4aa28 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; 4a9b8: 206e 0008 moveal %fp@(8),%a0 4a9bc: 2450 moveal %a0@,%a2 #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4a9be: 4eb9 0004 b994 jsr 4b994 4a9c4: 3600 movew %d0,%d3 st_gid = getegid(); 4a9c6: 4eb9 0004 b980 jsr 4b980 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 4a9cc: 4281 clrl %d1 4a9ce: 0283 0000 ffff andil #65535,%d3 4a9d4: 322a 0038 movew %a2@(56),%d1 4a9d8: b681 cmpl %d1,%d3 4a9da: 6728 beqs 4aa04 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 4a9dc: 4281 clrl %d1 4a9de: 0280 0000 ffff andil #65535,%d0 4a9e4: 322a 003a movew %a2@(58),%d1 4a9e8: b081 cmpl %d1,%d0 4a9ea: 672a beqs 4aa16 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4a9ec: 2002 movel %d2,%d0 4a9ee: c0aa 002e andl %a2@(46),%d0 return 1; 4a9f2: b082 cmpl %d2,%d0 4a9f4: 57c0 seq %d0 4a9f6: 49c0 extbl %d0 4a9f8: 4480 negl %d0 return 0; } 4a9fa: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4aa00: 4e5e unlk %fp 4aa02: 4e75 rts */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 4aa04: ed8a lsll #6,%d2 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4aa06: 2002 movel %d2,%d0 4aa08: c0aa 002e andl %a2@(46),%d0 return 1; 4aa0c: b082 cmpl %d2,%d0 4aa0e: 57c0 seq %d0 4aa10: 49c0 extbl %d0 4aa12: 4480 negl %d0 4aa14: 60e4 bras 4a9fa flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; 4aa16: e78a lsll #3,%d2 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4aa18: 2002 movel %d2,%d0 4aa1a: c0aa 002e andl %a2@(46),%d0 return 1; 4aa1e: b082 cmpl %d2,%d0 4aa20: 57c0 seq %d0 4aa22: 49c0 extbl %d0 4aa24: 4480 negl %d0 4aa26: 60d2 bras 4a9fa gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4aa28: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 4aa2e: 7201 moveq #1,%d1 <== NOT EXECUTED 4aa30: 2040 moveal %d0,%a0 <== NOT EXECUTED 4aa32: 70ff moveq #-1,%d0 <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 4aa34: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4aa3a: 2081 movel %d1,%a0@ <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 4aa3c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e570 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4e570: 4e56 fff8 linkw %fp,#-8 4e574: 206e 0008 moveal %fp@(8),%a0 4e578: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 4e57a: 2450 moveal %a0@,%a2 int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4e57c: 2f02 movel %d2,%sp@- * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4e57e: 4282 clrl %d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4e580: 4eb9 0004 b994 jsr 4b994 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4e586: 4281 clrl %d1 4e588: 342a 0038 movew %a2@(56),%d2 4e58c: 3200 movew %d0,%d1 4e58e: b282 cmpl %d2,%d1 4e590: 6704 beqs 4e596 4e592: 4a40 tstw %d0 4e594: 663c bnes 4e5d2 <== ALWAYS TAKEN /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4e596: 202a 002e movel %a2@(46),%d0 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4e59a: 222e 000c movel %fp@(12),%d1 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4e59e: 0280 ffff f000 andil #-4096,%d0 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4e5a4: 0281 0000 0fff andil #4095,%d1 4e5aa: 8280 orl %d0,%d1 4e5ac: 2541 002e movel %d1,%a2@(46) IMFS_update_ctime( jnode ); 4e5b0: 42a7 clrl %sp@- 4e5b2: 486e fff8 pea %fp@(-8) 4e5b6: 4eb9 0004 336c jsr 4336c 4e5bc: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4e5c2: 508f addql #8,%sp 4e5c4: 4280 clrl %d0 } 4e5c6: 242e fff0 movel %fp@(-16),%d2 4e5ca: 246e fff4 moveal %fp@(-12),%a2 4e5ce: 4e5e unlk %fp 4e5d0: 4e75 rts */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4e5d2: 4eb9 0004 f098 jsr 4f098 <__errno> jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; } 4e5d8: 242e fff0 movel %fp@(-16),%d2 */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4e5dc: 2040 moveal %d0,%a0 4e5de: 7201 moveq #1,%d1 4e5e0: 70ff moveq #-1,%d0 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; } 4e5e2: 246e fff4 moveal %fp@(-12),%a2 4e5e6: 4e5e unlk %fp */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4e5e8: 2081 movel %d1,%a0@ <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; } =============================================================================== 00043c46 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 43c46: 4e56 0000 linkw %fp,#0 43c4a: 206e 0008 moveal %fp@(8),%a0 43c4e: 202e 000c movel %fp@(12),%d0 43c52: 226e 0010 moveal %fp@(16),%a1 43c56: 2f02 movel %d2,%sp@- int err; if (command == FIONBIO) { 43c58: 0c80 8004 667e cmpil #-2147195266,%d0 43c5e: 6724 beqs 43c84 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 43c60: 2f08 movel %a0,%sp@- 43c62: 2068 0018 moveal %a0@(24),%a0 43c66: 2f09 movel %a1,%sp@- 43c68: 2f00 movel %d0,%sp@- 43c6a: 2f28 004c movel %a0@(76),%sp@- 43c6e: 4eb9 0004 df04 jsr 4df04 IMFS_FIFO_RETURN(err); 43c74: 4fef 0010 lea %sp@(16),%sp 43c78: 4a80 tstl %d0 43c7a: 6d44 blts 43cc0 <== NEVER TAKEN } 43c7c: 242e fffc movel %fp@(-4),%d2 43c80: 4e5e unlk %fp 43c82: 4e75 rts ) { int err; if (command == FIONBIO) { if (buffer == NULL) 43c84: 4a89 tstl %a1 43c86: 6722 beqs 43caa <== NEVER TAKEN err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 43c88: 4280 clrl %d0 if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) 43c8a: 4a91 tstl %a1@ 43c8c: 670e beqs 43c9c iop->flags |= LIBIO_FLAGS_NO_DELAY; 43c8e: 7201 moveq #1,%d1 } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 43c90: 242e fffc movel %fp@(-4),%d2 43c94: 4e5e unlk %fp if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 43c96: 83a8 0014 orl %d1,%a0@(20) } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 43c9a: 4e75 rts err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 43c9c: 72fe moveq #-2,%d1 } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 43c9e: 242e fffc movel %fp@(-4),%d2 43ca2: 4e5e unlk %fp err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 43ca4: c3a8 0014 andl %d1,%a0@(20) } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 43ca8: 4e75 rts } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 43caa: 4eb9 0005 13ac jsr 513ac <__errno> ) { int err; if (command == FIONBIO) { if (buffer == NULL) 43cb0: 740e moveq #14,%d2 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 43cb2: 2040 moveal %d0,%a0 43cb4: 70ff moveq #-1,%d0 43cb6: 2082 movel %d2,%a0@ } 43cb8: 242e fffc movel %fp@(-4),%d2 43cbc: 4e5e unlk %fp 43cbe: 4e75 rts } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 43cc0: 2400 movel %d0,%d2 43cc2: 4482 negl %d2 43cc4: 4eb9 0005 13ac jsr 513ac <__errno> 43cca: 2040 moveal %d0,%a0 43ccc: 70ff moveq #-1,%d0 43cce: 2082 movel %d2,%a0@ 43cd0: 60e6 bras 43cb8 ... =============================================================================== 00043a80 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 43a80: 4e56 fff4 linkw %fp,#-12 43a84: 206e 0008 moveal %fp@(8),%a0 43a88: 48d7 001c moveml %d2-%d4,%sp@ off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 43a8c: 2f08 movel %a0,%sp@- 43a8e: 2f2e 0014 movel %fp@(20),%sp@- 43a92: 2068 0018 moveal %a0@(24),%a0 43a96: 2f2e 0010 movel %fp@(16),%sp@- 43a9a: 2f2e 000c movel %fp@(12),%sp@- 43a9e: 2f28 004c movel %a0@(76),%sp@- 43aa2: 4eb9 0004 df82 jsr 4df82 IMFS_FIFO_RETURN(err); 43aa8: 4fef 0014 lea %sp@(20),%sp rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 43aac: 2800 movel %d0,%d4 43aae: 2600 movel %d0,%d3 43ab0: 5bc2 smi %d2 43ab2: 49c2 extbl %d2 IMFS_FIFO_RETURN(err); 43ab4: 4a82 tstl %d2 43ab6: 6b0e bmis 43ac6 <== ALWAYS TAKEN } 43ab8: 2002 movel %d2,%d0 <== NOT EXECUTED 43aba: 2203 movel %d3,%d1 <== NOT EXECUTED 43abc: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 43ac2: 4e5e unlk %fp <== NOT EXECUTED 43ac4: 4e75 rts <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 43ac6: 4eb9 0005 13ac jsr 513ac <__errno> 43acc: 4484 negl %d4 43ace: 2040 moveal %d0,%a0 43ad0: 74ff moveq #-1,%d2 43ad2: 76ff moveq #-1,%d3 43ad4: 2084 movel %d4,%a0@ } 43ad6: 2002 movel %d2,%d0 43ad8: 2203 movel %d3,%d1 43ada: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 43ae0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043ae4 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 43ae4: 4e56 fff8 linkw %fp,#-8 43ae8: 206e 0008 moveal %fp@(8),%a0 43aec: 2f0a movel %a2,%sp@- 43aee: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 43af0: 2f08 movel %a0,%sp@- 43af2: 2f2e 0010 movel %fp@(16),%sp@- rtems_libio_t *iop, const void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; 43af6: 2468 0018 moveal %a0@(24),%a2 int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 43afa: 2f2e 000c movel %fp@(12),%sp@- 43afe: 2f2a 004c movel %a2@(76),%sp@- 43b02: 4eb9 0004 dcae jsr 4dcae if (err > 0) { 43b08: 4fef 0010 lea %sp@(16),%sp size_t count ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 43b0c: 2400 movel %d0,%d2 if (err > 0) { 43b0e: 6f28 bles 43b38 IMFS_mtime_ctime_update(jnode); 43b10: 42a7 clrl %sp@- 43b12: 486e fff8 pea %fp@(-8) 43b16: 4eb9 0004 5020 jsr 45020 43b1c: 202e fff8 movel %fp@(-8),%d0 43b20: 508f addql #8,%sp 43b22: 2540 0040 movel %d0,%a2@(64) 43b26: 2540 0044 movel %d0,%a2@(68) } IMFS_FIFO_RETURN(err); } 43b2a: 2002 movel %d2,%d0 43b2c: 242e fff0 movel %fp@(-16),%d2 43b30: 246e fff4 moveal %fp@(-12),%a2 43b34: 4e5e unlk %fp 43b36: 4e75 rts int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 43b38: 4a80 tstl %d0 43b3a: 67ee beqs 43b2a <== NEVER TAKEN 43b3c: 4eb9 0005 13ac jsr 513ac <__errno> 43b42: 4482 negl %d2 43b44: 2040 moveal %d0,%a0 43b46: 2082 movel %d2,%a0@ 43b48: 74ff moveq #-1,%d2 } 43b4a: 2002 movel %d2,%d0 43b4c: 242e fff0 movel %fp@(-16),%d2 43b50: 246e fff4 moveal %fp@(-12),%a2 43b54: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b2cc : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4b2cc: 4e56 ffec linkw %fp,#-20 4b2d0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4b2d4: 4879 0005 e9da pea 5e9da 4b2da: 47f9 0004 fe50 lea 4fe50 ,%a3 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4b2e0: 242e 000c movel %fp@(12),%d2 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4b2e4: 2f02 movel %d2,%sp@- IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4b2e6: 286e 0008 moveal %fp@(8),%a4 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4b2ea: 4e93 jsr %a3@ 4b2ec: 508f addql #8,%sp 4b2ee: 4a80 tstl %d0 4b2f0: 6736 beqs 4b328 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 4b2f2: 4879 0005 e9dc pea 5e9dc 4b2f8: 2f02 movel %d2,%sp@- 4b2fa: 4e93 jsr %a3@ 4b2fc: 508f addql #8,%sp 4b2fe: 4a80 tstl %d0 4b300: 6732 beqs 4b334 <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 4b302: 260c movel %a4,%d3 4b304: 0683 0000 0050 addil #80,%d3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4b30a: 246c 004c moveal %a4@(76),%a2 return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 4b30e: b68a cmpl %a2,%d3 4b310: 6714 beqs 4b326 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 4b312: 486a 000c pea %a2@(12) 4b316: 2f02 movel %d2,%sp@- 4b318: 4e93 jsr %a3@ 4b31a: 508f addql #8,%sp 4b31c: 4a80 tstl %d0 4b31e: 6724 beqs 4b344 the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 4b320: 2452 moveal %a2@,%a2 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 4b322: b68a cmpl %a2,%d3 4b324: 66ec bnes 4b312 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; 4b326: 99cc subal %a4,%a4 } 4b328: 200c movel %a4,%d0 4b32a: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4b330: 4e5e unlk %fp 4b332: 4e75 rts if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) return directory->Parent; 4b334: 286c 0008 moveal %a4@(8),%a4 <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4b338: 200c movel %a4,%d0 <== NOT EXECUTED 4b33a: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4b340: 4e5e unlk %fp <== NOT EXECUTED 4b342: 4e75 rts <== NOT EXECUTED !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 4b344: 284a moveal %a2,%a4 return the_jnode; } return 0; } 4b346: 200c movel %a4,%d0 4b348: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4b34e: 4e5e unlk %fp ... =============================================================================== 0004b204 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4b204: 4e56 ffd8 linkw %fp,#-40 4b208: 206e 0008 moveal %fp@(8),%a0 4b20c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 4b210: 47ee ffec lea %fp@(-20),%a3 4b214: 49f9 0004 a91c lea 4a91c ,%a4 next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 4b21a: 4bf9 0004 2b9c lea 42b9c ,%a5 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 4b220: 26a8 001c movel %a0@(28),%a3@ /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 4b224: 2468 001c moveal %a0@(28),%a2 loc = temp_mt_entry->mt_fs_root; 4b228: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4b22e: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4b234: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) 4b23a: 2d68 002c fffc movel %a0@(44),%fp@(-4) /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4b240: 42a8 001c clrl %a0@(28) do { next = jnode->Parent; 4b244: 242a 0008 movel %a2@(8),%d2 loc.node_access = (void *)jnode; 4b248: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4b24c: 2f0b movel %a3,%sp@- 4b24e: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 4b250: 588f addql #4,%sp 4b252: 7001 moveq #1,%d0 4b254: b0aa 0048 cmpl %a2@(72),%d0 4b258: 6646 bnes 4b2a0 <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4b25a: 200a movel %a2,%d0 4b25c: 0680 0000 0050 addil #80,%d0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 4b262: b0aa 004c cmpl %a2@(76),%d0 4b266: 6738 beqs 4b2a0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 4b268: 4a8a tstl %a2 4b26a: 6746 beqs 4b2b2 <== NEVER TAKEN if ( jnode->type == IMFS_DIRECTORY ) { 4b26c: 7001 moveq #1,%d0 4b26e: b0aa 0048 cmpl %a2@(72),%d0 4b272: 66d0 bnes 4b244 <== NEVER TAKEN 4b274: 220a movel %a2,%d1 4b276: 0681 0000 0050 addil #80,%d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4b27c: 202a 004c movel %a2@(76),%d0 if ( jnode_has_children( jnode ) ) 4b280: b280 cmpl %d0,%d1 4b282: 67c0 beqs 4b244 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4b284: 4a80 tstl %d0 4b286: 672c beqs 4b2b4 <== NEVER TAKEN 4b288: 2440 moveal %d0,%a2 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4b28a: 242a 0008 movel %a2@(8),%d2 loc.node_access = (void *)jnode; 4b28e: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4b292: 2f0b movel %a3,%sp@- 4b294: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 4b296: 588f addql #4,%sp 4b298: 7001 moveq #1,%d0 4b29a: b0aa 0048 cmpl %a2@(72),%d0 4b29e: 67ba beqs 4b25a result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 4b2a0: 2f0b movel %a3,%sp@- 4b2a2: 42a7 clrl %sp@- 4b2a4: 4e95 jsr %a5@ if (result != 0) 4b2a6: 508f addql #8,%sp 4b2a8: 4a80 tstl %d0 4b2aa: 6612 bnes 4b2be <== NEVER TAKEN return -1; jnode = next; 4b2ac: 2442 moveal %d2,%a2 } if ( jnode != NULL ) { 4b2ae: 4a8a tstl %a2 4b2b0: 66ba bnes 4b26c jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 4b2b2: 4280 clrl %d0 } 4b2b4: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4b2ba: 4e5e unlk %fp 4b2bc: 4e75 rts return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 4b2be: 70ff moveq #-1,%d0 <== NOT EXECUTED } } } while (jnode != NULL); return 0; } 4b2c0: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED 4b2c6: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004b354 : const char *path, int pathlen, char *token, int *token_len ) { 4b354: 4e56 ffe4 linkw %fp,#-28 4b358: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4b35c: 246e 0008 moveal %fp@(8),%a2 4b360: 49f9 0004 4220 lea 44220 ,%a4 int pathlen, char *token, int *token_len ) { register int i = 0; 4b366: 4282 clrl %d2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4b368: 161a moveb %a2@+,%d3 const char *path, int pathlen, char *token, int *token_len ) { 4b36a: 2a6e 0010 moveal %fp@(16),%a5 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4b36e: 264d moveal %a5,%a3 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4b370: 1003 moveb %d3,%d0 const char *path, int pathlen, char *token, int *token_len ) { 4b372: 282e 000c movel %fp@(12),%d4 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4b376: 49c0 extbl %d0 4b378: 2f00 movel %d0,%sp@- 4b37a: 4e94 jsr %a4@ 4b37c: 588f addql #4,%sp 4b37e: 4a80 tstl %d0 4b380: 6620 bnes 4b3a2 4b382: b882 cmpl %d2,%d4 4b384: 6f1c bles 4b3a2 token[i] = c; if ( i == IMFS_NAME_MAX ) 4b386: 7020 moveq #32,%d0 * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; 4b388: 16c3 moveb %d3,%a3@+ if ( i == IMFS_NAME_MAX ) 4b38a: b082 cmpl %d2,%d0 4b38c: 6700 0082 beqw 4b410 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4b390: 5282 addql #1,%d2 4b392: 161a moveb %a2@+,%d3 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4b394: 1003 moveb %d3,%d0 4b396: 49c0 extbl %d0 4b398: 2f00 movel %d0,%sp@- 4b39a: 4e94 jsr %a4@ 4b39c: 588f addql #4,%sp 4b39e: 4a80 tstl %d0 4b3a0: 67e0 beqs 4b382 /* * Copy a seperator into token. */ if ( i == 0 ) { 4b3a2: 4a82 tstl %d2 4b3a4: 6626 bnes 4b3cc token[i] = c; 4b3a6: 1a83 moveb %d3,%a5@ if ( (token[i] != '\0') && pathlen ) { 4b3a8: 6718 beqs 4b3c2 4b3aa: 4a84 tstl %d4 4b3ac: 6714 beqs 4b3c2 /* * Set token_len to the number of characters copied. */ *token_len = i; 4b3ae: 206e 0014 moveal %fp@(20),%a0 if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; 4b3b2: 7401 moveq #1,%d2 type = IMFS_CURRENT_DIR; 4b3b4: 7001 moveq #1,%d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 4b3b6: 2082 movel %d2,%a0@ else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4b3b8: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b3be: 4e5e unlk %fp 4b3c0: 4e75 rts /* * Set token_len to the number of characters copied. */ *token_len = i; 4b3c2: 206e 0014 moveal %fp@(20),%a0 if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 4b3c6: 4280 clrl %d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 4b3c8: 2082 movel %d2,%a0@ 4b3ca: 60ec bras 4b3b8 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4b3cc: 4a35 28ff tstb %a5@(ffffffff,%d2:l) 4b3d0: 6706 beqs 4b3d8 <== NEVER TAKEN token[i] = '\0'; 4b3d2: 4200 clrb %d0 4b3d4: 1b80 2800 moveb %d0,%a5@(00000000,%d2:l) * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4b3d8: 4879 0005 e9df pea 5e9df 4b3de: 45f9 0004 fe50 lea 4fe50 ,%a2 /* * Set token_len to the number of characters copied. */ *token_len = i; 4b3e4: 206e 0014 moveal %fp@(20),%a0 4b3e8: 2082 movel %d2,%a0@ * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4b3ea: 2f0d movel %a5,%sp@- 4b3ec: 4e92 jsr %a2@ 4b3ee: 508f addql #8,%sp 4b3f0: 4a80 tstl %d0 4b3f2: 6728 beqs 4b41c type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4b3f4: 4879 0005 e9e0 pea 5e9e0 4b3fa: 2f0d movel %a5,%sp@- 4b3fc: 4e92 jsr %a2@ 4b3fe: 508f addql #8,%sp 4b400: 4a80 tstl %d0 4b402: 6724 beqs 4b428 4b404: 7003 moveq #3,%d0 type = IMFS_CURRENT_DIR; } return type; } 4b406: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b40c: 4e5e unlk %fp 4b40e: 4e75 rts while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; 4b410: 7004 moveq #4,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4b412: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b418: 4e5e unlk %fp 4b41a: 4e75 rts * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; 4b41c: 7002 moveq #2,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4b41e: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b424: 4e5e unlk %fp 4b426: 4e75 rts if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; 4b428: 7001 moveq #1,%d0 } return type; } 4b42a: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b430: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000426e0 : /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 426e0: 7010 moveq #16,%d0 const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 426e2: 4e56 fff4 linkw %fp,#-12 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 426e6: 2239 0005 f78e movel 5f78e ,%d1 const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 426ec: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 426f0: 246e 0008 moveal %fp@(8),%a2 426f4: 242e 0014 movel %fp@(20),%d2 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 426f8: b081 cmpl %d1,%d0 426fa: 6724 beqs 42720 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 426fc: 103c 000f moveb #15,%d0 42700: b081 cmpl %d1,%d0 42702: 6c16 bges 4271a 42704: 307c 0005 moveaw #5,%a0 42708: 103c 0020 moveb #32,%d0 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 4270c: 5388 subql #1,%a0 if (bit_mask == requested_bytes_per_block) { 4270e: b081 cmpl %d1,%d0 42710: 670e beqs 42720 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 42712: 6e06 bgts 4271a <== NEVER TAKEN int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 42714: d080 addl %d0,%d0 42716: 4a88 tstl %a0 42718: 66f2 bnes 4270c <== ALWAYS TAKEN if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 4271a: 223c 0000 0080 movel #128,%d1 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 42720: 23c1 0006 06f4 movel %d1,606f4 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 42726: 4eb9 0004 a886 jsr 4a886 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4272c: 4878 0014 pea 14 * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 42730: 41f9 0005 e9aa lea 5e9aa ,%a0 42736: 43f9 0005 e9ae lea 5e9ae ,%a1 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 4273c: 2640 moveal %d0,%a3 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4273e: 2550 0038 movel %a0@,%a2@(56) 42742: 41f9 0005 e9b2 lea 5e9b2 ,%a0 42748: 2551 003c movel %a1@,%a2@(60) 4274c: 43f9 0005 e9b6 lea 5e9b6 ,%a1 42752: 2550 0040 movel %a0@,%a2@(64) 42756: 41f9 0005 e9ba lea 5e9ba ,%a0 4275c: 2551 0044 movel %a1@,%a2@(68) 42760: 43f9 0005 e9be lea 5e9be ,%a1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 42766: 4878 0001 pea 1 * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4276a: 2550 0048 movel %a0@,%a2@(72) 4276e: 41f9 0005 e9c2 lea 5e9c2 ,%a0 42774: 2551 004c movel %a1@,%a2@(76) 42778: 43f9 0005 e9c6 lea 5e9c6 ,%a1 4277e: 2550 0050 movel %a0@,%a2@(80) 42782: 41f9 0005 e9ca lea 5e9ca ,%a0 42788: 2551 0054 movel %a1@,%a2@(84) 4278c: 43f9 0005 e9ce lea 5e9ce ,%a1 42792: 2550 0058 movel %a0@,%a2@(88) 42796: 41f9 0005 e9d2 lea 5e9d2 ,%a0 4279c: 2551 005c movel %a1@,%a2@(92) 427a0: 43f9 0005 e9d6 lea 5e9d6 ,%a1 427a6: 2550 0060 movel %a0@,%a2@(96) 427aa: 2551 0064 movel %a1@,%a2@(100) * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 427ae: 256e 000c 0028 movel %fp@(12),%a2@(40) /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 427b4: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 427b8: 2542 0024 movel %d2,%a2@(36) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 427bc: 4eb9 0004 2ec8 jsr 42ec8 if ( !fs_info ) { 427c2: 508f addql #8,%sp temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 427c4: 2040 moveal %d0,%a0 if ( !fs_info ) { 427c6: 4a80 tstl %d0 427c8: 673c beqs 42806 <== NEVER TAKEN free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 427ca: 2548 0034 movel %a0,%a2@(52) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 427ce: 2239 0006 06f8 movel 606f8 ,%d1 427d4: 2241 moveal %d1,%a1 427d6: 5289 addql #1,%a1 fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; 427d8: 4280 clrl %d0 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 427da: 2081 movel %d1,%a0@ fs_info->ino_count = 1; 427dc: 7201 moveq #1,%d1 fs_info->memfile_handlers = memfile_handlers; 427de: 216e 0010 0008 movel %fp@(16),%a0@(8) fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; 427e4: 216e 0018 0010 movel %fp@(24),%a0@(16) */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 427ea: 2142 000c movel %d2,%a0@(12) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 427ee: 2141 0004 movel %d1,%a0@(4) fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 427f2: 2741 0034 movel %d1,%a3@(52) return 0; } 427f6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 427fc: 23c9 0006 06f8 movel %a1,606f8 jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; } 42802: 4e5e unlk %fp 42804: 4e75 rts /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 42806: 2f0b movel %a3,%sp@- 42808: 4eb9 0004 32dc jsr 432dc rtems_set_errno_and_return_minus_one(ENOMEM); 4280e: 4eb9 0004 f098 jsr 4f098 <__errno> 42814: 588f addql #4,%sp 42816: 720c moveq #12,%d1 42818: 2040 moveal %d0,%a0 4281a: 70ff moveq #-1,%d0 jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; } 4281c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); 42822: 2081 movel %d1,%a0@ jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; } 42824: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004db3a : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4db3a: 4e56 ffd0 linkw %fp,#-48 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4db3e: 2039 0006 06f4 movel 606f4 ,%d0 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4db44: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4db48: 2800 movel %d0,%d4 4db4a: e48c lsrl #2,%d4 4db4c: 2204 movel %d4,%d1 4db4e: 5281 addql #1,%d1 4db50: 4c04 1800 mulsl %d4,%d1 4db54: 4282 clrl %d2 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4db56: 246e 0008 moveal %fp@(8),%a2 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4db5a: 5281 addql #1,%d1 4db5c: 4c04 1800 mulsl %d4,%d1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4db60: 2c2e 000c movel %fp@(12),%d6 4db64: 2e2e 0010 movel %fp@(16),%d7 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4db68: 5381 subql #1,%d1 4db6a: 4c00 1800 mulsl %d0,%d1 4db6e: 2601 movel %d1,%d3 4db70: 2802 movel %d2,%d4 4db72: 2a03 movel %d3,%d5 4db74: 9a87 subl %d7,%d5 4db76: 9986 subxl %d6,%d4 4db78: 6f00 00da blew 4dc54 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 4db7c: 282a 004c movel %a2@(76),%d4 4db80: 2a2a 0050 movel %a2@(80),%d5 4db84: 2206 movel %d6,%d1 4db86: 2407 movel %d7,%d2 4db88: 9485 subl %d5,%d2 4db8a: 9384 subxl %d4,%d1 4db8c: 6f00 008a blew 4dc18 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4db90: 47f9 0005 b5e4 lea 5b5e4 <__divdi3>,%a3 4db96: 2400 movel %d0,%d2 4db98: 5bc1 smi %d1 4db9a: 49c1 extbl %d1 4db9c: 2841 moveal %d1,%a4 4db9e: 2a42 moveal %d2,%a5 4dba0: 2f0d movel %a5,%sp@- 4dba2: 2f01 movel %d1,%sp@- 4dba4: 2f07 movel %d7,%sp@- 4dba6: 2f06 movel %d6,%sp@- 4dba8: 4e93 jsr %a3@ 4dbaa: 4fef 0010 lea %sp@(16),%sp 4dbae: 2401 movel %d1,%d2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4dbb0: 2f0d movel %a5,%sp@- 4dbb2: 2f0c movel %a4,%sp@- 4dbb4: 2f05 movel %d5,%sp@- 4dbb6: 2f04 movel %d4,%sp@- 4dbb8: 4e93 jsr %a3@ 4dbba: 4fef 0010 lea %sp@(16),%sp 4dbbe: 2841 moveal %d1,%a4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4dbc0: b282 cmpl %d2,%d1 4dbc2: 621a bhis 4dbde <== NEVER TAKEN 4dbc4: 2801 movel %d1,%d4 4dbc6: 47f9 0004 d950 lea 4d950 ,%a3 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4dbcc: 2f04 movel %d4,%sp@- 4dbce: 2f0a movel %a2,%sp@- 4dbd0: 4e93 jsr %a3@ 4dbd2: 508f addql #8,%sp 4dbd4: 4a80 tstl %d0 4dbd6: 664c bnes 4dc24 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4dbd8: 5284 addql #1,%d4 4dbda: b882 cmpl %d2,%d4 4dbdc: 63ee blss 4dbcc /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); 4dbde: 42a7 clrl %sp@- 4dbe0: 240e movel %fp,%d2 4dbe2: 5182 subql #8,%d2 4dbe4: 47f9 0004 336c lea 4336c ,%a3 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4dbea: 2546 004c movel %d6,%a2@(76) 4dbee: 2547 0050 movel %d7,%a2@(80) IMFS_update_ctime(the_jnode); 4dbf2: 2f02 movel %d2,%sp@- 4dbf4: 4e93 jsr %a3@ 4dbf6: 256e fff8 0044 movel %fp@(-8),%a2@(68) IMFS_update_mtime(the_jnode); 4dbfc: 42a7 clrl %sp@- 4dbfe: 2f02 movel %d2,%sp@- 4dc00: 4e93 jsr %a3@ 4dc02: 256e fff8 0040 movel %fp@(-8),%a2@(64) 4dc08: 4fef 0010 lea %sp@(16),%sp return 0; 4dc0c: 4280 clrl %d0 } 4dc0e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dc14: 4e5e unlk %fp 4dc16: 4e75 rts /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; 4dc18: 4280 clrl %d0 the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4dc1a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dc20: 4e5e unlk %fp 4dc22: 4e75 rts /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4dc24: b88c cmpl %a4,%d4 4dc26: 6514 bcss 4dc3c <== NEVER TAKEN 4dc28: 47f9 0004 db12 lea 4db12 ,%a3 IMFS_memfile_remove_block( the_jnode, block ); 4dc2e: 2f04 movel %d4,%sp@- /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4dc30: 5384 subql #1,%d4 IMFS_memfile_remove_block( the_jnode, block ); 4dc32: 2f0a movel %a2,%sp@- 4dc34: 4e93 jsr %a3@ /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4dc36: 508f addql #8,%sp 4dc38: b88c cmpl %a4,%d4 4dc3a: 64f2 bccs 4dc2e IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4dc3c: 4eb9 0004 f098 jsr 4f098 <__errno> 4dc42: 721c moveq #28,%d1 4dc44: 2040 moveal %d0,%a0 4dc46: 70ff moveq #-1,%d0 the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4dc48: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4dc4e: 2081 movel %d1,%a0@ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4dc50: 4e5e unlk %fp 4dc52: 4e75 rts /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); 4dc54: 4eb9 0004 f098 jsr 4f098 <__errno> 4dc5a: 7416 moveq #22,%d2 4dc5c: 2040 moveal %d0,%a0 4dc5e: 70ff moveq #-1,%d0 4dc60: 2082 movel %d2,%a0@ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4dc62: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dc68: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d51c : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4d51c: 4e56 fff0 linkw %fp,#-16 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4d520: 2239 0006 06f4 movel 606f4 ,%d1 4d526: e489 lsrl #2,%d1 4d528: 2001 movel %d1,%d0 4d52a: 5380 subql #1,%d0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4d52c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4d530: 246e 0008 moveal %fp@(8),%a2 4d534: 242e 000c movel %fp@(12),%d2 4d538: 206e 0010 moveal %fp@(16),%a0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4d53c: b082 cmpl %d2,%d0 4d53e: 6520 bcss 4d560 p = info->indirect; 4d540: 226a 0054 moveal %a2@(84),%a1 if ( malloc_it ) { 4d544: 4a88 tstl %a0 4d546: 6700 00a4 beqw 4d5ec if ( !p ) { 4d54a: 4a89 tstl %a1 4d54c: 6700 0106 beqw 4d654 } if ( !p ) return 0; return &info->indirect[ my_block ]; 4d550: 43f1 2c00 lea %a1@(00000000,%d2:l:4),%a1 4d554: 2009 movel %a1,%d0 /* * This means the requested block number is out of range. */ return 0; } 4d556: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4d55c: 4e5e unlk %fp 4d55e: 4e75 rts /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4d560: 2001 movel %d1,%d0 4d562: 5280 addql #1,%d0 4d564: 4c01 0800 mulsl %d1,%d0 4d568: 2240 moveal %d0,%a1 4d56a: 5389 subql #1,%a1 4d56c: b3c2 cmpal %d2,%a1 4d56e: 644e bccs 4d5be } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4d570: 2600 movel %d0,%d3 4d572: 5283 addql #1,%d3 4d574: 4c01 3800 mulsl %d1,%d3 4d578: 5383 subql #1,%d3 4d57a: b682 cmpl %d2,%d3 4d57c: 6574 bcss 4d5f2 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 4d57e: 9480 subl %d0,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4d580: 4c41 2004 remul %d1,%d4,%d2 4d584: 4c41 2002 remul %d1,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 4d588: 226a 005c moveal %a2@(92),%a1 if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 4d58c: 4c41 2003 remul %d1,%d3,%d2 4d590: 4c41 2002 remul %d1,%d2,%d2 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 4d594: 4a88 tstl %a0 4d596: 6600 008a bnew 4d622 p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 4d59a: 4a89 tstl %a1 4d59c: 6754 beqs 4d5f2 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; 4d59e: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 if ( !p1 ) 4d5a2: 4a88 tstl %a0 4d5a4: 674c beqs 4d5f2 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; 4d5a6: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 if ( !p2 ) 4d5aa: 4a88 tstl %a0 4d5ac: 6744 beqs 4d5f2 <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; 4d5ae: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 4d5b2: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 4d5b4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4d5ba: 4e5e unlk %fp 4d5bc: 4e75 rts /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; 4d5be: 9481 subl %d1,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4d5c0: 226a 0058 moveal %a2@(88),%a1 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4d5c4: 4c41 2003 remul %d1,%d3,%d2 4d5c8: 4c41 2002 remul %d1,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 4d5cc: 4a88 tstl %a0 4d5ce: 662e bnes 4d5fe } return (block_p *)&p1[ singly ]; } if ( !p ) 4d5d0: 4a89 tstl %a1 4d5d2: 671e beqs 4d5f2 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; 4d5d4: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 if ( !p ) 4d5d8: 4a88 tstl %a0 4d5da: 6716 beqs 4d5f2 <== NEVER TAKEN return 0; return (block_p *)&p[ singly ]; 4d5dc: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4d5e0: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 4d5e2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4d5e8: 4e5e unlk %fp 4d5ea: 4e75 rts info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 4d5ec: 4a89 tstl %a1 4d5ee: 6600 ff60 bnew 4d550 return 0; 4d5f2: 4280 clrl %d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4d5f4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 4d5fa: 4e5e unlk %fp <== NOT EXECUTED 4d5fc: 4e75 rts <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { 4d5fe: 4a89 tstl %a1 4d600: 676c beqs 4d66e if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 4d602: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4d606: 2052 moveal %a2@,%a0 if ( !p1 ) { 4d608: 4a88 tstl %a0 4d60a: 66d0 bnes 4d5dc p1 = memfile_alloc_block(); 4d60c: 4eb9 0004 d4f8 jsr 4d4f8 4d612: 2040 moveal %d0,%a0 if ( !p1 ) 4d614: 4a80 tstl %d0 4d616: 67da beqs 4d5f2 <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; 4d618: 2480 movel %d0,%a2@ p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; 4d61a: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4d61e: 2008 movel %a0,%d0 4d620: 60c0 bras 4d5e2 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { 4d622: 4a89 tstl %a1 4d624: 676a beqs 4d690 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 4d626: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4d62a: 2052 moveal %a2@,%a0 if ( !p1 ) { 4d62c: 4a88 tstl %a0 4d62e: 677c beqs 4d6ac if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 4d630: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 4d634: 2052 moveal %a2@,%a0 if ( !p2 ) { 4d636: 4a88 tstl %a0 4d638: 6600 ff74 bnew 4d5ae p2 = memfile_alloc_block(); 4d63c: 4eb9 0004 d4f8 jsr 4d4f8 4d642: 2040 moveal %d0,%a0 if ( !p2 ) 4d644: 4a80 tstl %d0 4d646: 67aa beqs 4d5f2 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 4d648: 2480 movel %d0,%a2@ p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 4d64a: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 4d64e: 2008 movel %a0,%d0 4d650: 6000 ff62 braw 4d5b4 p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4d654: 4eb9 0004 d4f8 jsr 4d4f8 4d65a: 2240 moveal %d0,%a1 if ( !p ) 4d65c: 4a80 tstl %d0 4d65e: 6792 beqs 4d5f2 <== NEVER TAKEN return 0; info->indirect = p; 4d660: 2540 0054 movel %d0,%a2@(84) } if ( !p ) return 0; return &info->indirect[ my_block ]; 4d664: 43f1 2c00 lea %a1@(00000000,%d2:l:4),%a1 4d668: 2009 movel %a1,%d0 4d66a: 6000 feea braw 4d556 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4d66e: 4eb9 0004 d4f8 jsr 4d4f8 4d674: 2240 moveal %d0,%a1 if ( !p ) 4d676: 4a80 tstl %d0 4d678: 6700 ff78 beqw 4d5f2 return 0; info->doubly_indirect = p; 4d67c: 2540 0058 movel %d0,%a2@(88) } p1 = (block_p *)p[ doubly ]; 4d680: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4d684: 2052 moveal %a2@,%a0 if ( !p1 ) { 4d686: 4a88 tstl %a0 4d688: 6600 ff52 bnew 4d5dc 4d68c: 6000 ff7e braw 4d60c p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4d690: 4eb9 0004 d4f8 jsr 4d4f8 4d696: 2240 moveal %d0,%a1 if ( !p ) 4d698: 4a80 tstl %d0 4d69a: 6700 ff56 beqw 4d5f2 return 0; info->triply_indirect = p; 4d69e: 2540 005c movel %d0,%a2@(92) } p1 = (block_p *) p[ triply ]; 4d6a2: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4d6a6: 2052 moveal %a2@,%a0 if ( !p1 ) { 4d6a8: 4a88 tstl %a0 4d6aa: 6684 bnes 4d630 <== NEVER TAKEN p1 = memfile_alloc_block(); 4d6ac: 4eb9 0004 d4f8 jsr 4d4f8 4d6b2: 2040 moveal %d0,%a0 if ( !p1 ) 4d6b4: 4a80 tstl %d0 4d6b6: 6700 ff3a beqw 4d5f2 return 0; p[ triply ] = (block_p) p1; 4d6ba: 2480 movel %d0,%a2@ } p2 = (block_p *)p1[ doubly ]; 4d6bc: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 4d6c0: 2052 moveal %a2@,%a0 if ( !p2 ) { 4d6c2: 4a88 tstl %a0 4d6c4: 6600 fee8 bnew 4d5ae 4d6c8: 6000 ff72 braw 4d63c =============================================================================== 0004d6cc : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4d6cc: 4e56 ffc8 linkw %fp,#-56 4d6d0: 206e 0018 moveal %fp@(24),%a0 4d6d4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4d6d8: 246e 0008 moveal %fp@(8),%a2 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 4d6dc: 7406 moveq #6,%d2 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4d6de: 2e2e 0014 movel %fp@(20),%d7 4d6e2: 286e 000c moveal %fp@(12),%a4 4d6e6: 2a6e 0010 moveal %fp@(16),%a5 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 4d6ea: b4aa 0048 cmpl %a2@(72),%d2 4d6ee: 6700 017a beqw 4d86a /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; 4d6f2: 2408 movel %a0,%d2 4d6f4: d48d addl %a5,%d2 if ( last_byte > the_jnode->info.file.size ) 4d6f6: 2202 movel %d2,%d1 4d6f8: 4280 clrl %d0 4d6fa: 242a 004c movel %a2@(76),%d2 4d6fe: 262a 0050 movel %a2@(80),%d3 4d702: 2800 movel %d0,%d4 4d704: 2a01 movel %d1,%d5 4d706: 9a83 subl %d3,%d5 4d708: 9982 subxl %d2,%d4 4d70a: 6f00 010e blew 4d81a */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d70e: 2839 0006 06f4 movel 606f4 ,%d4 * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; 4d714: 2a03 movel %d3,%d5 4d716: 9a8d subl %a5,%d5 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d718: 2604 movel %d4,%d3 4d71a: 5bc2 smi %d2 4d71c: 49c2 extbl %d2 4d71e: 2f03 movel %d3,%sp@- 4d720: 2f02 movel %d2,%sp@- 4d722: 2f0d movel %a5,%sp@- 4d724: 2f0c movel %a4,%sp@- 4d726: 4eb9 0005 ba2c jsr 5ba2c <__moddi3> 4d72c: 4fef 0010 lea %sp@(16),%sp 4d730: 2c01 movel %d1,%d6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d732: 2f03 movel %d3,%sp@- 4d734: 2f02 movel %d2,%sp@- 4d736: 2f0d movel %a5,%sp@- 4d738: 2f0c movel %a4,%sp@- 4d73a: 4eb9 0005 b5e4 jsr 5b5e4 <__divdi3> 4d740: 4fef 0010 lea %sp@(16),%sp 4d744: 2401 movel %d1,%d2 if ( start_offset ) { 4d746: 4a86 tstl %d6 4d748: 6700 010c beqw 4d856 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d74c: 42a7 clrl %sp@- 4d74e: 2f01 movel %d1,%sp@- 4d750: 2f0a movel %a2,%sp@- 4d752: 4eb9 0004 d51c jsr 4d51c if ( !block_ptr ) 4d758: 4fef 000c lea %sp@(12),%sp 4d75c: 4a80 tstl %d0 4d75e: 6700 01be beqw 4d91e * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4d762: 9886 subl %d6,%d4 4d764: 2845 moveal %d5,%a4 4d766: b885 cmpl %d5,%d4 4d768: 6500 0162 bcsw 4d8cc if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4d76c: 2f0c movel %a4,%sp@- 4d76e: 2040 moveal %d0,%a0 4d770: dc90 addl %a0@,%d6 dest += to_copy; block++; 4d772: 5282 addql #1,%d2 my_length -= to_copy; 4d774: 9a8c subl %a4,%d5 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4d776: 2f06 movel %d6,%sp@- dest += to_copy; 4d778: 2c07 movel %d7,%d6 4d77a: dc8c addl %a4,%d6 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4d77c: 2f07 movel %d7,%sp@- 4d77e: 4eb9 0004 f8b8 jsr 4f8b8 dest += to_copy; block++; my_length -= to_copy; 4d784: 2839 0006 06f4 movel 606f4 ,%d4 4d78a: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4d78e: b885 cmpl %d5,%d4 4d790: 623c bhis 4d7ce 4d792: 47f9 0004 d51c lea 4d51c ,%a3 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4d798: 4bf9 0004 f8b8 lea 4f8b8 ,%a5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d79e: 42a7 clrl %sp@- if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 4d7a0: 9a84 subl %d4,%d5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d7a2: 2f02 movel %d2,%sp@- if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 4d7a4: 5282 addql #1,%d2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d7a6: 2f0a movel %a2,%sp@- 4d7a8: 4e93 jsr %a3@ if ( !block_ptr ) 4d7aa: 4fef 000c lea %sp@(12),%sp 4d7ae: 4a80 tstl %d0 4d7b0: 6700 00ac beqw 4d85e return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4d7b4: 2240 moveal %d0,%a1 dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 4d7b6: d9c4 addal %d4,%a4 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4d7b8: 2f04 movel %d4,%sp@- 4d7ba: 2f11 movel %a1@,%sp@- 4d7bc: 2f06 movel %d6,%sp@- dest += to_copy; 4d7be: dc84 addl %d4,%d6 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4d7c0: 4e95 jsr %a5@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4d7c2: 4fef 000c lea %sp@(12),%sp 4d7c6: bab9 0006 06f4 cmpl 606f4 ,%d5 4d7cc: 64d0 bccs 4d79e /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4d7ce: 4a85 tstl %d5 4d7d0: 6728 beqs 4d7fa block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d7d2: 42a7 clrl %sp@- 4d7d4: 2f02 movel %d2,%sp@- 4d7d6: 2f0a movel %a2,%sp@- 4d7d8: 4eb9 0004 d51c jsr 4d51c if ( !block_ptr ) 4d7de: 4fef 000c lea %sp@(12),%sp 4d7e2: 4a80 tstl %d0 4d7e4: 6778 beqs 4d85e <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4d7e6: 2040 moveal %d0,%a0 copied += my_length; 4d7e8: d9c5 addal %d5,%a4 if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4d7ea: 2f05 movel %d5,%sp@- 4d7ec: 2f10 movel %a0@,%sp@- 4d7ee: 2f06 movel %d6,%sp@- 4d7f0: 4eb9 0004 f8b8 jsr 4f8b8 copied += my_length; 4d7f6: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 4d7fa: 42a7 clrl %sp@- 4d7fc: 486e fff8 pea %fp@(-8) 4d800: 4eb9 0004 336c jsr 4336c 4d806: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 4d80c: 200c movel %a4,%d0 4d80e: 508f addql #8,%sp } 4d810: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4d816: 4e5e unlk %fp 4d818: 4e75 rts */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d81a: 2839 0006 06f4 movel 606f4 ,%d4 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4d820: 2a08 movel %a0,%d5 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d822: 2604 movel %d4,%d3 4d824: 5bc2 smi %d2 4d826: 49c2 extbl %d2 4d828: 2f03 movel %d3,%sp@- 4d82a: 2f02 movel %d2,%sp@- 4d82c: 2f0d movel %a5,%sp@- 4d82e: 2f0c movel %a4,%sp@- 4d830: 4eb9 0005 ba2c jsr 5ba2c <__moddi3> 4d836: 4fef 0010 lea %sp@(16),%sp 4d83a: 2c01 movel %d1,%d6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d83c: 2f03 movel %d3,%sp@- 4d83e: 2f02 movel %d2,%sp@- 4d840: 2f0d movel %a5,%sp@- 4d842: 2f0c movel %a4,%sp@- 4d844: 4eb9 0005 b5e4 jsr 5b5e4 <__divdi3> 4d84a: 4fef 0010 lea %sp@(16),%sp 4d84e: 2401 movel %d1,%d2 if ( start_offset ) { 4d850: 4a86 tstl %d6 4d852: 6600 fef8 bnew 4d74c unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 4d856: 2c07 movel %d7,%d6 */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 4d858: 99cc subal %a4,%a4 4d85a: 6000 ff32 braw 4d78e IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 4d85e: 200c movel %a4,%d0 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4d860: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4d866: 4e5e unlk %fp <== NOT EXECUTED 4d868: 4e75 rts <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4d86a: 93c9 subal %a1,%a1 4d86c: 242a 004c movel %a2@(76),%d2 4d870: 262a 0050 movel %a2@(80),%d3 4d874: 2d49 fff0 movel %a1,%fp@(-16) my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 4d878: 226a 0054 moveal %a2@(84),%a1 if (my_length > (the_jnode->info.linearfile.size - start)) 4d87c: 2002 movel %d2,%d0 4d87e: 2203 movel %d3,%d1 4d880: 2d48 fff4 movel %a0,%fp@(-12) 4d884: 280c movel %a4,%d4 4d886: 928d subl %a5,%d1 4d888: 9184 subxl %d4,%d0 4d88a: 2a2e fff0 movel %fp@(-16),%d5 4d88e: 2c2e fff4 movel %fp@(-12),%d6 4d892: 9c81 subl %d1,%d6 4d894: 9b80 subxl %d0,%d5 4d896: 6f5c bles 4d8f4 <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 4d898: 2403 movel %d3,%d2 4d89a: 948d subl %a5,%d2 memcpy(dest, &file_ptr[start], my_length); 4d89c: 2f02 movel %d2,%sp@- 4d89e: 4871 d800 pea %a1@(00000000,%a5:l) 4d8a2: 2f07 movel %d7,%sp@- 4d8a4: 4eb9 0004 f8b8 jsr 4f8b8 IMFS_update_atime( the_jnode ); 4d8aa: 42a7 clrl %sp@- 4d8ac: 486e fff8 pea %fp@(-8) 4d8b0: 4eb9 0004 336c jsr 4336c 4d8b6: 256e fff8 003c movel %fp@(-8),%a2@(60) return my_length; 4d8bc: 2002 movel %d2,%d0 4d8be: 4fef 0014 lea %sp@(20),%sp } IMFS_update_atime( the_jnode ); return copied; } 4d8c2: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4d8c8: 4e5e unlk %fp 4d8ca: 4e75 rts * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4d8cc: 2844 moveal %d4,%a4 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4d8ce: 2040 moveal %d0,%a0 dest += to_copy; block++; 4d8d0: 5282 addql #1,%d2 my_length -= to_copy; 4d8d2: 9a8c subl %a4,%d5 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4d8d4: 2f0c movel %a4,%sp@- 4d8d6: dc90 addl %a0@,%d6 4d8d8: 2f06 movel %d6,%sp@- dest += to_copy; 4d8da: 2c07 movel %d7,%d6 4d8dc: dc8c addl %a4,%d6 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4d8de: 2f07 movel %d7,%sp@- 4d8e0: 4eb9 0004 f8b8 jsr 4f8b8 dest += to_copy; block++; my_length -= to_copy; 4d8e6: 2839 0006 06f4 movel 606f4 ,%d4 4d8ec: 4fef 000c lea %sp@(12),%sp 4d8f0: 6000 fe9c braw 4d78e /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4d8f4: 2408 movel %a0,%d2 <== NOT EXECUTED file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 4d8f6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d8f8: 4871 d800 pea %a1@(00000000,%a5:l) <== NOT EXECUTED 4d8fc: 2f07 movel %d7,%sp@- <== NOT EXECUTED 4d8fe: 4eb9 0004 f8b8 jsr 4f8b8 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 4d904: 42a7 clrl %sp@- <== NOT EXECUTED 4d906: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4d90a: 4eb9 0004 336c jsr 4336c <== NOT EXECUTED 4d910: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED return my_length; 4d916: 2002 movel %d2,%d0 <== NOT EXECUTED 4d918: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4d91c: 60a4 bras 4d8c2 <== NOT EXECUTED to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 4d91e: 4280 clrl %d0 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4d920: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4d926: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d9fc : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4d9fc: 4e56 ffe0 linkw %fp,#-32 4da00: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 4da04: 2839 0006 06f4 movel 606f4 ,%d4 4da0a: e48c lsrl #2,%d4 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4da0c: 286e 0008 moveal %fp@(8),%a4 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4da10: 4aac 0054 tstl %a4@(84) 4da14: 670e beqs 4da24 memfile_free_blocks_in_table( &info->indirect, to_free ); 4da16: 2f04 movel %d4,%sp@- 4da18: 486c 0054 pea %a4@(84) 4da1c: 4eb9 0004 d9b6 jsr 4d9b6 4da22: 508f addql #8,%sp } if ( info->doubly_indirect ) { 4da24: 206c 0058 moveal %a4@(88),%a0 4da28: 4a88 tstl %a0 4da2a: 674e beqs 4da7a for ( i=0 ; i,%d1 4da32: 2001 movel %d1,%d0 4da34: e488 lsrl #2,%d0 4da36: 47f9 0004 d9b6 lea 4d9b6 ,%a3 4da3c: 6732 beqs 4da70 <== NEVER TAKEN 4da3e: 4280 clrl %d0 4da40: 4282 clrl %d2 4da42: 47f9 0004 d9b6 lea 4d9b6 ,%a3 4da48: 5282 addql #1,%d2 if ( info->doubly_indirect[i] ) { 4da4a: 41f0 0c00 lea %a0@(00000000,%d0:l:4),%a0 4da4e: 4a90 tstl %a0@ 4da50: 670e beqs 4da60 <== NEVER TAKEN memfile_free_blocks_in_table( 4da52: 2f04 movel %d4,%sp@- 4da54: 2f08 movel %a0,%sp@- 4da56: 4e93 jsr %a3@ 4da58: 2239 0006 06f4 movel 606f4 ,%d1 4da5e: 508f addql #8,%sp if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i 4da6a: 206c 0058 moveal %a4@(88),%a0 4da6e: 60d8 bras 4da48 if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); 4da70: 2f04 movel %d4,%sp@- 4da72: 486c 0058 pea %a4@(88) 4da76: 4e93 jsr %a3@ 4da78: 508f addql #8,%sp } if ( info->triply_indirect ) { 4da7a: 206c 005c moveal %a4@(92),%a0 4da7e: 4a88 tstl %a0 4da80: 6700 0084 beqw 4db06 for ( i=0 ; i,%d1 4da8a: 2001 movel %d1,%d0 4da8c: e488 lsrl #2,%d0 4da8e: 47f9 0004 d9b6 lea 4d9b6 ,%a3 4da94: 6766 beqs 4dafc <== NEVER TAKEN p = (block_p *) info->triply_indirect[i]; 4da96: 2450 moveal %a0@,%a2 4da98: 47f9 0004 d9b6 lea 4d9b6 ,%a3 if ( !p ) /* ensure we have a valid pointer */ 4da9e: 4a8a tstl %a2 4daa0: 675a beqs 4dafc <== NEVER TAKEN } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4daa2: 4286 clrl %d6 if ( !p ) /* ensure we have a valid pointer */ 4daa4: 4285 clrl %d5 break; for ( j=0 ; j <== NEVER TAKEN 4daaa: 4280 clrl %d0 4daac: 4282 clrl %d2 4daae: 5282 addql #1,%d2 if ( p[j] ) { 4dab0: 41f2 0c00 lea %a2@(00000000,%d0:l:4),%a0 4dab4: 4a90 tstl %a0@ 4dab6: 670e beqs 4dac6 <== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4dab8: 2f04 movel %d4,%sp@- 4daba: 2f08 movel %a0,%sp@- 4dabc: 4e93 jsr %a3@ 4dabe: 2239 0006 06f4 movel 606f4 ,%d1 4dac4: 508f addql #8,%sp if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NEVER TAKEN if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4dad0: 2f04 movel %d4,%sp@- 4dad2: dcac 005c addl %a4@(92),%d6 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; idoubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i,%d1 4dae2: 2001 movel %d1,%d0 4dae4: 508f addql #8,%sp 4dae6: e488 lsrl #2,%d0 4dae8: b085 cmpl %d5,%d0 4daea: 6310 blss 4dafc * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( 4daec: 2c05 movel %d5,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4daee: 206c 005c moveal %a4@(92),%a0 * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( 4daf2: e58e lsll #2,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4daf4: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 if ( !p ) /* ensure we have a valid pointer */ 4daf8: 4a8a tstl %a2 4dafa: 66aa bnes 4daa6 } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4dafc: 2f04 movel %d4,%sp@- 4dafe: 486c 005c pea %a4@(92) 4db02: 4e93 jsr %a3@ 4db04: 508f addql #8,%sp (block_p **)&info->triply_indirect, to_free ); } return 0; } 4db06: 4280 clrl %d0 4db08: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 4db0e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004dc6c : * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { 4dc6c: 4280 clrl %d0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4dc6e: 4e56 ffd0 linkw %fp,#-48 4dc72: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4dc76: 286e 000c moveal %fp@(12),%a4 4dc7a: 2a6e 0010 moveal %fp@(16),%a5 4dc7e: 282e 0018 movel %fp@(24),%d4 /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; 4dc82: 41f5 4800 lea %a5@(00000000,%d4:l),%a0 if ( last_byte > the_jnode->info.file.size ) { 4dc86: 2208 movel %a0,%d1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4dc88: 246e 0008 moveal %fp@(8),%a2 4dc8c: 2e2e 0014 movel %fp@(20),%d7 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { 4dc90: 242a 004c movel %a2@(76),%d2 4dc94: 262a 0050 movel %a2@(80),%d3 4dc98: 9681 subl %d1,%d3 4dc9a: 9580 subxl %d0,%d2 4dc9c: 6d00 0116 bltw 4ddb4 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4dca0: 2a39 0006 06f4 movel 606f4 ,%d5 4dca6: 2605 movel %d5,%d3 4dca8: 5bc2 smi %d2 4dcaa: 49c2 extbl %d2 4dcac: 2f03 movel %d3,%sp@- 4dcae: 2f02 movel %d2,%sp@- 4dcb0: 2f0d movel %a5,%sp@- 4dcb2: 2f0c movel %a4,%sp@- 4dcb4: 4eb9 0005 ba2c jsr 5ba2c <__moddi3> 4dcba: 4fef 0010 lea %sp@(16),%sp 4dcbe: 2c01 movel %d1,%d6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4dcc0: 2f03 movel %d3,%sp@- 4dcc2: 2f02 movel %d2,%sp@- 4dcc4: 2f0d movel %a5,%sp@- 4dcc6: 2f0c movel %a4,%sp@- 4dcc8: 4eb9 0005 b5e4 jsr 5b5e4 <__divdi3> 4dcce: 4fef 0010 lea %sp@(16),%sp 4dcd2: 2401 movel %d1,%d2 if ( start_offset ) { 4dcd4: 4a86 tstl %d6 4dcd6: 6700 00d4 beqw 4ddac to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4dcda: 42a7 clrl %sp@- 4dcdc: 2f01 movel %d1,%sp@- 4dcde: 2f0a movel %a2,%sp@- 4dce0: 4eb9 0004 d51c jsr 4d51c if ( !block_ptr ) 4dce6: 4fef 000c lea %sp@(12),%sp 4dcea: 4a80 tstl %d0 4dcec: 6700 0120 beqw 4de0e * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4dcf0: 9a86 subl %d6,%d5 4dcf2: b885 cmpl %d5,%d4 4dcf4: 6500 00ee bcsw 4dde4 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4dcf8: 2f05 movel %d5,%sp@- 4dcfa: 2040 moveal %d0,%a0 src += to_copy; 4dcfc: 2847 moveal %d7,%a4 4dcfe: d9c5 addal %d5,%a4 block++; my_length -= to_copy; 4dd00: 9885 subl %d5,%d4 copied += to_copy; 4dd02: 2605 movel %d5,%d3 src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 4dd04: 5282 addql #1,%d2 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4dd06: 2f07 movel %d7,%sp@- 4dd08: dc90 addl %a0@,%d6 4dd0a: 2f06 movel %d6,%sp@- 4dd0c: 4eb9 0004 f8b8 jsr 4f8b8 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4dd12: 2a39 0006 06f4 movel 606f4 ,%d5 4dd18: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4dd1c: ba84 cmpl %d4,%d5 4dd1e: 623a bhis 4dd5a 4dd20: 47f9 0004 d51c lea 4d51c ,%a3 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 4dd26: 4bf9 0004 f8b8 lea 4f8b8 ,%a5 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4dd2c: 42a7 clrl %sp@- fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; 4dd2e: 9885 subl %d5,%d4 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4dd30: 2f02 movel %d2,%sp@- #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; 4dd32: 5282 addql #1,%d2 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4dd34: 2f0a movel %a2,%sp@- 4dd36: 4e93 jsr %a3@ if ( !block_ptr ) 4dd38: 4fef 000c lea %sp@(12),%sp 4dd3c: 4a80 tstl %d0 4dd3e: 6760 beqs 4dda0 <== NEVER TAKEN return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 4dd40: 2f05 movel %d5,%sp@- 4dd42: 2040 moveal %d0,%a0 * IMFS_memfile_write * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 4dd44: d685 addl %d5,%d3 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 4dd46: 2f0c movel %a4,%sp@- 4dd48: 2f10 movel %a0@,%sp@- src += to_copy; 4dd4a: d9c5 addal %d5,%a4 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 4dd4c: 4e95 jsr %a5@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4dd4e: 4fef 000c lea %sp@(12),%sp 4dd52: b8b9 0006 06f4 cmpl 606f4 ,%d4 4dd58: 64d2 bccs 4dd2c * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4dd5a: 4a84 tstl %d4 4dd5c: 6728 beqs 4dd86 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4dd5e: 42a7 clrl %sp@- 4dd60: 2f02 movel %d2,%sp@- 4dd62: 2f0a movel %a2,%sp@- 4dd64: 4eb9 0004 d51c jsr 4d51c if ( !block_ptr ) 4dd6a: 4fef 000c lea %sp@(12),%sp 4dd6e: 4a80 tstl %d0 4dd70: 672e beqs 4dda0 <== NEVER TAKEN return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 4dd72: 2f04 movel %d4,%sp@- 4dd74: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4dd76: d684 addl %d4,%d3 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 4dd78: 2f0c movel %a4,%sp@- 4dd7a: 2f10 movel %a0@,%sp@- 4dd7c: 4eb9 0004 f8b8 jsr 4f8b8 my_length = 0; copied += to_copy; 4dd82: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4dd86: 42a7 clrl %sp@- 4dd88: 486e fff8 pea %fp@(-8) 4dd8c: 4eb9 0004 336c jsr 4336c 4dd92: 202e fff8 movel %fp@(-8),%d0 return copied; 4dd96: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4dd98: 2540 0040 movel %d0,%a2@(64) 4dd9c: 2540 0044 movel %d0,%a2@(68) return copied; } 4dda0: 2003 movel %d3,%d0 4dda2: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dda8: 4e5e unlk %fp 4ddaa: 4e75 rts unsigned int last_byte; unsigned int start_offset; int copied; const unsigned char *src; src = source; 4ddac: 2847 moveal %d7,%a4 status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; 4ddae: 4283 clrl %d3 4ddb0: 6000 ff6a braw 4dd1c * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 4ddb4: 2f08 movel %a0,%sp@- 4ddb6: 2f00 movel %d0,%sp@- 4ddb8: 2f0a movel %a2,%sp@- 4ddba: 4eb9 0004 db3a jsr 4db3a if ( status ) 4ddc0: 4fef 000c lea %sp@(12),%sp 4ddc4: 4a80 tstl %d0 4ddc6: 6700 fed8 beqw 4dca0 rtems_set_errno_and_return_minus_one( ENOSPC ); 4ddca: 4eb9 0004 f098 jsr 4f098 <__errno> 4ddd0: 76ff moveq #-1,%d3 4ddd2: 781c moveq #28,%d4 4ddd4: 2040 moveal %d0,%a0 } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4ddd6: 2003 movel %d3,%d0 last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); 4ddd8: 2084 movel %d4,%a0@ } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4ddda: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dde0: 4e5e unlk %fp 4dde2: 4e75 rts * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4dde4: 2a04 movel %d4,%d5 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4dde6: 2040 moveal %d0,%a0 src += to_copy; 4dde8: 2847 moveal %d7,%a4 4ddea: d9c5 addal %d5,%a4 block++; my_length -= to_copy; 4ddec: 9885 subl %d5,%d4 copied += to_copy; 4ddee: 2605 movel %d5,%d3 src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 4ddf0: 5282 addql #1,%d2 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4ddf2: 2f05 movel %d5,%sp@- 4ddf4: 2f07 movel %d7,%sp@- 4ddf6: dc90 addl %a0@,%d6 4ddf8: 2f06 movel %d6,%sp@- 4ddfa: 4eb9 0004 f8b8 jsr 4f8b8 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4de00: 2a39 0006 06f4 movel 606f4 ,%d5 4de06: 4fef 000c lea %sp@(12),%sp 4de0a: 6000 ff10 braw 4dd1c to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 4de0e: 4283 clrl %d3 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4de10: 2003 movel %d3,%d0 <== NOT EXECUTED 4de12: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4de18: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000428f8 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 428f8: 4e56 ffa8 linkw %fp,#-88 428fc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 42900: 262e 0008 movel %fp@(8),%d3 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 42904: 45ee ffbf lea %fp@(-65),%a2 42908: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4290a: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 4290e: 4eb9 0005 0404 jsr 50404 42914: 588f addql #4,%sp 42916: 486e fffc pea %fp@(-4) const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4291a: 282e 0010 movel %fp@(16),%d4 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 4291e: 2f0a movel %a2,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 42920: 266e 0014 moveal %fp@(20),%a3 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 42924: 2f00 movel %d0,%sp@- 42926: 2f03 movel %d3,%sp@- 42928: 4eb9 0004 b354 jsr 4b354 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4292e: 4fef 0010 lea %sp@(16),%sp 42932: 2002 movel %d2,%d0 42934: 0280 0000 f000 andil #61440,%d0 4293a: 0c80 0000 4000 cmpil #16384,%d0 42940: 6700 008e beqw 429d0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 42944: 0c80 0000 8000 cmpil #32768,%d0 4294a: 6700 0088 beqw 429d4 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4294e: 0c80 0000 6000 cmpil #24576,%d0 42954: 676e beqs 429c4 42956: 0c80 0000 2000 cmpil #8192,%d0 4295c: 6766 beqs 429c4 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 4295e: 0c80 0000 1000 cmpil #4096,%d0 42964: 6772 beqs 429d8 <== ALWAYS TAKEN mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { IMFS_token_types type = 0; 42966: 4280 clrl %d0 <== NOT EXECUTED * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); 42968: 486e ffe0 pea %fp@(-32) 4296c: 2f02 movel %d2,%sp@- 4296e: 2f0a movel %a2,%sp@- 42970: 2f00 movel %d0,%sp@- 42972: 2f2e 0018 movel %fp@(24),%sp@- 42976: 4eb9 0004 a692 jsr 4a692 if ( !new_node ) 4297c: 4fef 0014 lea %sp@(20),%sp * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); 42980: 2440 moveal %d0,%a2 if ( !new_node ) 42982: 4a80 tstl %d0 42984: 6756 beqs 429dc rtems_set_errno_and_return_minus_one( ENOMEM ); IMFS_update_ctime(new_node->Parent); 42986: 42a7 clrl %sp@- 42988: 240e movel %fp,%d2 4298a: 0682 ffff fff4 addil #-12,%d2 42990: 47f9 0004 336c lea 4336c ,%a3 42996: 2f02 movel %d2,%sp@- 42998: 4e93 jsr %a3@ 4299a: 206a 0008 moveal %a2@(8),%a0 4299e: 216e fff4 0044 movel %fp@(-12),%a0@(68) IMFS_update_mtime(new_node->Parent); 429a4: 42a7 clrl %sp@- 429a6: 2f02 movel %d2,%sp@- 429a8: 4e93 jsr %a3@ 429aa: 206a 0008 moveal %a2@(8),%a0 return 0; 429ae: 4fef 0010 lea %sp@(16),%sp 429b2: 4280 clrl %d0 new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); IMFS_update_ctime(new_node->Parent); IMFS_update_mtime(new_node->Parent); 429b4: 216e fff4 0040 movel %fp@(-12),%a0@(64) return 0; } 429ba: 4cee 0c1c ffa8 moveml %fp@(-88),%d2-%d4/%a2-%a3 429c0: 4e5e unlk %fp 429c2: 4e75 rts type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 429c4: 2d44 ffe0 movel %d4,%fp@(-32) if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; 429c8: 7002 moveq #2,%d0 rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 429ca: 2d4b ffe4 movel %a3,%fp@(-28) 429ce: 6098 bras 42968 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 429d0: 7001 moveq #1,%d0 429d2: 6094 bras 42968 else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; 429d4: 7005 moveq #5,%d0 429d6: 6090 bras 42968 else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; 429d8: 7007 moveq #7,%d0 429da: 608c bras 42968 * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 429dc: 4eb9 0004 f098 jsr 4f098 <__errno> 429e2: 720c moveq #12,%d1 429e4: 2040 moveal %d0,%a0 429e6: 70ff moveq #-1,%d0 IMFS_update_ctime(new_node->Parent); IMFS_update_mtime(new_node->Parent); return 0; } 429e8: 4cee 0c1c ffa8 moveml %fp@(-88),%d2-%d4/%a2-%a3 * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 429ee: 2081 movel %d1,%a0@ IMFS_update_ctime(new_node->Parent); IMFS_update_mtime(new_node->Parent); return 0; } 429f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000429f4 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 429f4: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 429f6: 4e56 0000 linkw %fp,#0 429fa: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 429fe: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42a02: b0a8 0048 cmpl %a0@(72),%d0 42a06: 660a bnes 42a12 <== NEVER TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 42a08: 2149 0058 movel %a1,%a0@(88) return 0; 42a0c: 4280 clrl %d0 } 42a0e: 4e5e unlk %fp 42a10: 4e75 rts /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 42a12: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 42a18: 7214 moveq #20,%d1 <== NOT EXECUTED 42a1a: 2040 moveal %d0,%a0 <== NOT EXECUTED 42a1c: 70ff moveq #-1,%d0 <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 42a1e: 4e5e unlk %fp <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 42a20: 2081 movel %d1,%a0@ <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } =============================================================================== 000451e0 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 451e0: 4e56 0000 linkw %fp,#0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 451e4: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 451ea: 2f0a movel %a2,%sp@- IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 451ec: 2f28 0008 movel %a0@(8),%sp@- * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 451f0: 246e 0008 moveal %fp@(8),%a2 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 451f4: 486a 000c pea %a2@(12) 451f8: 4eb9 0005 3a7c jsr 53a7c switch( the_jnode->type ) { 451fe: 202a 0048 movel %a2@(72),%d0 45202: 508f addql #8,%sp 45204: 7207 moveq #7,%d1 45206: b280 cmpl %d0,%d1 45208: 6424 bccs 4522e <== ALWAYS TAKEN case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 4520a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4520c: 4879 0006 427a pea 6427a <== NOT EXECUTED 45212: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 <== NOT EXECUTED 45218: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4521c: 4eb9 0005 392e jsr 5392e <== NOT EXECUTED return; } puts(""); } 45222: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; 45226: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } puts(""); } 4522a: 4e5e unlk %fp <== NOT EXECUTED 4522c: 4e75 rts <== NOT EXECUTED ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 4522e: 323b 0a08 movew %pc@(45238 ,%d0:l:2),%d1 45232: 48c1 extl %d1 45234: 4efb 1802 jmp %pc@(45238 ,%d1:l) 45238: ffd2 .short 0xffd2 <== NOT EXECUTED 4523a: 003a .short 0x003a <== NOT EXECUTED 4523c: 0066 .short 0x0066 <== NOT EXECUTED 4523e: 0010 .short 0x0010 <== NOT EXECUTED 45240: 0010 .short 0x0010 <== NOT EXECUTED 45242: 009e 00d2 010a oril #13762826,%d6 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 45248: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 4524e: 2f28 0008 movel %a0@(8),%sp@- 45252: 4878 0013 pea 13 45256: 4878 0001 pea 1 4525a: 4879 0006 4253 pea 64253 45260: 4eb9 0005 45ac jsr 545ac default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 45266: 246e fffc moveal %fp@(-4),%a2 fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; 4526a: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 4526e: 4e5e unlk %fp 45270: 4e75 rts IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 45272: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 45278: 2f28 0008 movel %a0@(8),%sp@- 4527c: 4878 002f pea 2f 45280: 4eb9 0005 39ac jsr 539ac default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 45286: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 4528a: 203c 0006 492e movel #411950,%d0 fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; 45290: 508f addql #8,%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 45292: 2d40 0008 movel %d0,%fp@(8) } 45296: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 45298: 4ef9 0005 52ba jmp 552ba case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 4529e: 2f2a 0050 movel %a2@(80),%sp@- 452a2: 2f2a 004c movel %a2@(76),%sp@- 452a6: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 452ac: 4879 0006 4225 pea 64225 452b2: 2f28 0008 movel %a0@(8),%sp@- 452b6: 4eb9 0005 392e jsr 5392e default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 452bc: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 452c0: 203c 0006 492e movel #411950,%d0 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; 452c6: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 452ca: 2d40 0008 movel %d0,%fp@(8) } 452ce: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 452d0: 4ef9 0005 52ba jmp 552ba the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 452d6: 2f2a 0050 movel %a2@(80),%sp@- 452da: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 452e0: 4879 0006 4247 pea 64247 452e6: 2f28 0008 movel %a0@(8),%sp@- 452ea: 4eb9 0005 392e jsr 5392e default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 452f0: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 452f4: 203c 0006 492e movel #411950,%d0 ); #else fprintf(stdout, " (file %" PRId32 ")", (uint32_t)the_jnode->info.file.size ); #endif break; 452fa: 4fef 000c lea %sp@(12),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 452fe: 2d40 0008 movel %d0,%fp@(8) } 45302: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 45304: 4ef9 0005 52ba jmp 552ba fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 4530a: 2f2a 0054 movel %a2@(84),%sp@- 4530e: 2f2a 0050 movel %a2@(80),%sp@- 45312: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 45318: 4879 0006 4238 pea 64238 4531e: 2f28 0008 movel %a0@(8),%sp@- 45322: 4eb9 0005 392e jsr 5392e default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 45328: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 4532c: 203c 0006 492e movel #411950,%d0 case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 45332: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 45336: 2d40 0008 movel %d0,%fp@(8) } 4533a: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 4533c: 4ef9 0005 52ba jmp 552ba case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 45342: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 45348: 2f28 0008 movel %a0@(8),%sp@- 4534c: 4878 0012 pea 12 45350: 4878 0001 pea 1 45354: 4879 0006 4267 pea 64267 4535a: 4eb9 0005 45ac jsr 545ac default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 45360: 246e fffc moveal %fp@(-4),%a2 fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; 45364: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 45368: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042a38 : ssize_t IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42a38: 4e56 fff4 linkw %fp,#-12 IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 42a3c: 206e 0008 moveal %fp@(8),%a0 ssize_t IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42a40: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42a44: 266e 000c moveal %fp@(12),%a3 42a48: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 42a4c: 2450 moveal %a0@,%a2 IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42a4e: 672a beqs 42a7a <== NEVER TAKEN 42a50: 206a 004c moveal %a2@(76),%a0 42a54: 1210 moveb %a0@,%d1 42a56: 6722 beqs 42a7a <== NEVER TAKEN 42a58: 91c8 subal %a0,%a0 42a5a: 4280 clrl %d0 42a5c: 5280 addql #1,%d0 buf[i] = node->info.sym_link.name[i]; 42a5e: 1781 8800 moveb %d1,%a3@(00000000,%a0:l) node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42a62: 2040 moveal %d0,%a0 42a64: b480 cmpl %d0,%d2 42a66: 670a beqs 42a72 42a68: 226a 004c moveal %a2@(76),%a1 42a6c: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 42a70: 66ea bnes 42a5c buf[i] = node->info.sym_link.name[i]; return i; } 42a72: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 42a76: 4e5e unlk %fp 42a78: 4e75 rts node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42a7a: 4280 clrl %d0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 42a7c: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 <== NOT EXECUTED 42a80: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042a84 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 42a84: 4e56 fff8 linkw %fp,#-8 IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42a88: 206e 000c moveal %fp@(12),%a0 rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 42a8c: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 42a8e: 4878 0020 pea 20 42a92: 2f2e 0014 movel %fp@(20),%sp@- ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42a96: 2450 moveal %a0@,%a2 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 42a98: 486a 000c pea %a2@(12) 42a9c: 4eb9 0005 0420 jsr 50420 if ( the_jnode->Parent != NULL ) 42aa2: 4fef 000c lea %sp@(12),%sp 42aa6: 4aaa 0008 tstl %a2@(8) 42aaa: 670a beqs 42ab6 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 42aac: 2f0a movel %a2,%sp@- 42aae: 4eb9 0004 75ac jsr 475ac <_Chain_Extract> 42ab4: 588f addql #4,%sp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 42ab6: 206e 0010 moveal %fp@(16),%a0 42aba: 2050 moveal %a0@,%a0 the_jnode->Parent = new_parent; 42abc: 2548 0008 movel %a0,%a2@(8) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 42ac0: 2f0a movel %a2,%sp@- 42ac2: 4868 004c pea %a0@(76) 42ac6: 4eb9 0004 7574 jsr 47574 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 42acc: 42a7 clrl %sp@- 42ace: 486e fff8 pea %fp@(-8) 42ad2: 4eb9 0004 336c jsr 4336c 42ad8: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; } 42ade: 4280 clrl %d0 42ae0: 246e fff4 moveal %fp@(-12),%a2 42ae4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a8c0 : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 4a8c0: 4e56 fff0 linkw %fp,#-16 4a8c4: 48d7 3c00 moveml %a2-%a5,%sp@ 4a8c8: 266e 0010 moveal %fp@(16),%a3 4a8cc: 4bf9 0004 4220 lea 44220 ,%a5 4a8d2: 2013 movel %a3@,%d0 4a8d4: 246e 0008 moveal %fp@(8),%a2 while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 4a8d8: 1032 0800 moveb %a2@(00000000,%d0:l),%d0 static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 4a8dc: 286e 000c moveal %fp@(12),%a4 while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 4a8e0: 49c0 extbl %d0 4a8e2: 2f00 movel %d0,%sp@- 4a8e4: 4e95 jsr %a5@ 4a8e6: 588f addql #4,%sp 4a8e8: 4a80 tstl %d0 4a8ea: 6726 beqs 4a912 <== NEVER TAKEN 4a8ec: 2013 movel %a3@,%d0 4a8ee: 4a32 0800 tstb %a2@(00000000,%d0:l) 4a8f2: 671e beqs 4a912 4a8f4: 2214 movel %a4@,%d1 ++(*index); 4a8f6: 5280 addql #1,%d0 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 4a8f8: 4a81 tstl %d1 4a8fa: 6716 beqs 4a912 <== NEVER TAKEN ++(*index); 4a8fc: 2680 movel %d0,%a3@ --(*len); 4a8fe: 5381 subql #1,%d1 4a900: 2881 movel %d1,%a4@ const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 4a902: 1032 0800 moveb %a2@(00000000,%d0:l),%d0 4a906: 49c0 extbl %d0 4a908: 2f00 movel %d0,%sp@- 4a90a: 4e95 jsr %a5@ 4a90c: 588f addql #4,%sp 4a90e: 4a80 tstl %d0 4a910: 66da bnes 4a8ec ++(*index); --(*len); } } 4a912: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 4a918: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b538 : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4b538: 7007 moveq #7,%d0 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4b53a: 4e56 0000 linkw %fp,#0 4b53e: 206e 000c moveal %fp@(12),%a0 4b542: 2f0a movel %a2,%sp@- 4b544: 246e 0008 moveal %fp@(8),%a2 IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4b548: 2252 moveal %a2@,%a1 switch ( the_jnode->type ) { 4b54a: b0a9 0048 cmpl %a1@(72),%d0 4b54e: 6418 bccs 4b568 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b550: 4eb9 0004 f098 jsr 4f098 <__errno> buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 4b556: 246e fffc moveal %fp@(-4),%a2 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b55a: 2040 moveal %d0,%a0 4b55c: 70ff moveq #-1,%d0 buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 4b55e: 4e5e unlk %fp case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b560: 20bc 0000 0086 movel #134,%a0@ buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 4b566: 4e75 rts IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4b568: 2029 0048 movel %a1@(72),%d0 4b56c: d080 addl %d0,%d0 4b56e: 303b 0808 movew %pc@(4b578 ,%d0:l),%d0 4b572: 48c0 extl %d0 4b574: 4efb 0802 jmp %pc@(4b578 ,%d0:l) 4b578: ffd8 .short 0xffd8 <== NOT EXECUTED 4b57a: ffd8 .short 0xffd8 <== NOT EXECUTED 4b57c: 00d6 .short 0x00d6 <== NOT EXECUTED 4b57e: ffd8 .short 0xffd8 <== NOT EXECUTED 4b580: 0010 .short 0x0010 <== NOT EXECUTED 4b582: 0074 .short 0x0074 <== NOT EXECUTED 4b584: 0074 .short 0x0074 <== NOT EXECUTED 4b586: 0010 .short 0x0010 <== NOT EXECUTED /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 4b588: 246a 0010 moveal %a2@(16),%a2 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4b58c: 4280 clrl %d0 4b58e: 4281 clrl %d1 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b590: 246a 0034 moveal %a2@(52),%a2 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4b594: 2140 001e movel %d0,%a0@(30) 4b598: 2141 0022 movel %d1,%a0@(34) * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b59c: 2212 movel %a2@,%d1 buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; 4b59e: 4280 clrl %d0 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 4b5a0: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; 4b5a6: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; 4b5ac: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; 4b5b2: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 4b5b8: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; 4b5be: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 4b5c4: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 4b5ca: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_blksize = imfs_rq_memfile_bytes_per_block; 4b5d0: 43f9 0005 f78e lea 5f78e ,%a1 4b5d6: 2151 003e movel %a1@,%a0@(62) /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 4b5da: 2141 0004 movel %d1,%a0@(4) 4b5de: 20bc 0000 fffe movel #65534,%a0@ buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 4b5e4: 246e fffc moveal %fp@(-4),%a2 4b5e8: 4e5e unlk %fp 4b5ea: 4e75 rts /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 4b5ec: 246a 0010 moveal %a2@(16),%a2 buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4b5f0: 2029 004c movel %a1@(76),%d0 4b5f4: 2229 0050 movel %a1@(80),%d1 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b5f8: 246a 0034 moveal %a2@(52),%a2 buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4b5fc: 2140 001e movel %d0,%a0@(30) 4b600: 2141 0022 movel %d1,%a0@(34) * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b604: 2212 movel %a2@,%d1 buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; 4b606: 4280 clrl %d0 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 4b608: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; 4b60e: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; 4b614: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; 4b61a: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 4b620: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; 4b626: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 4b62c: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 4b632: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_blksize = imfs_rq_memfile_bytes_per_block; 4b638: 43f9 0005 f78e lea 5f78e ,%a1 4b63e: 2151 003e movel %a1@,%a0@(62) /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 4b642: 2141 0004 movel %d1,%a0@(4) 4b646: 20bc 0000 fffe movel #65534,%a0@ 4b64c: 6096 bras 4b5e4 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 4b64e: 246a 0010 moveal %a2@(16),%a2 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4b652: 2029 0050 movel %a1@(80),%d0 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b656: 246a 0034 moveal %a2@(52),%a2 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4b65a: 2169 004c 0016 movel %a1@(76),%a0@(22) * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b660: 2212 movel %a2@,%d1 buf->st_mode = the_jnode->st_mode; 4b662: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; 4b668: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; 4b66e: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; 4b674: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 4b67a: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; 4b680: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 4b686: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 4b68c: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_blksize = imfs_rq_memfile_bytes_per_block; 4b692: 43f9 0005 f78e lea 5f78e ,%a1 4b698: 2151 003e movel %a1@,%a0@(62) switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4b69c: 2140 001a movel %d0,%a0@(26) buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; 4b6a0: 4280 clrl %d0 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 4b6a2: 20bc 0000 fffe movel #65534,%a0@ 4b6a8: 2141 0004 movel %d1,%a0@(4) 4b6ac: 6000 ff36 braw 4b5e4 =============================================================================== 00042b9c : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42b9c: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 42b9e: 4e56 ffd4 linkw %fp,#-44 42ba2: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 42ba6: 246e 000c moveal %fp@(12),%a2 42baa: 242e 0008 movel %fp@(8),%d2 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 42bae: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42bb0: b0ab 0048 cmpl %a3@(72),%d0 42bb4: 671a beqs 42bd0 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 42bb6: 2f0a movel %a2,%sp@- 42bb8: 206a 0008 moveal %a2@(8),%a0 42bbc: 2f02 movel %d2,%sp@- 42bbe: 2068 0034 moveal %a0@(52),%a0 42bc2: 4e90 jsr %a0@ return result; 42bc4: 508f addql #8,%sp } 42bc6: 4cee 0c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a3 42bcc: 4e5e unlk %fp 42bce: 4e75 rts * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 42bd0: 202b 004c movel %a3@(76),%d0 42bd4: 6700 008c beqw 42c62 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 42bd8: 41ea 0004 lea %a2@(4),%a0 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 42bdc: 7601 moveq #1,%d3 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 42bde: 2d58 ffe8 movel %a0@+,%fp@(-24) 42be2: 2d58 ffec movel %a0@+,%fp@(-20) 42be6: 2d58 fff0 movel %a0@+,%fp@(-16) 42bea: 2d50 fff4 movel %a0@,%fp@(-12) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 42bee: 486e ffe4 pea %fp@(-28) if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; 42bf2: 2d40 ffe4 movel %d0,%fp@(-28) IMFS_Set_handlers( &the_link ); 42bf6: 4eb9 0004 a91c jsr 4a91c /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 42bfc: 206b 004c moveal %a3@(76),%a0 42c00: 4281 clrl %d1 42c02: 588f addql #4,%sp 42c04: 3028 0032 movew %a0@(50),%d0 42c08: 3200 movew %d0,%d1 42c0a: b681 cmpl %d1,%d3 42c0c: 6730 beqs 42c3e if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 42c0e: 5380 subql #1,%d0 42c10: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 42c14: 42a7 clrl %sp@- 42c16: 486e fff8 pea %fp@(-8) 42c1a: 4eb9 0004 336c jsr 4336c 42c20: 206b 004c moveal %a3@(76),%a0 42c24: 508f addql #8,%sp 42c26: 216e fff8 0044 movel %fp@(-8),%a0@(68) /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 42c2c: 2f0a movel %a2,%sp@- 42c2e: 206a 0008 moveal %a2@(8),%a0 42c32: 2f02 movel %d2,%sp@- 42c34: 2068 0034 moveal %a0@(52),%a0 42c38: 4e90 jsr %a0@ return result; 42c3a: 508f addql #8,%sp 42c3c: 6088 bras 42bc6 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 42c3e: 486e ffe4 pea %fp@(-28) 42c42: 206e ffec moveal %fp@(-20),%a0 42c46: 2f02 movel %d2,%sp@- 42c48: 2068 0034 moveal %a0@(52),%a0 42c4c: 4e90 jsr %a0@ if ( result != 0 ) 42c4e: 508f addql #8,%sp 42c50: 4a80 tstl %d0 42c52: 6700 ff62 beqw 42bb6 return -1; 42c56: 70ff moveq #-1,%d0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 42c58: 4cee 0c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a3 42c5e: 4e5e unlk %fp 42c60: 4e75 rts */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 42c62: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 42c68: 7216 moveq #22,%d1 <== NOT EXECUTED 42c6a: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c6c: 70ff moveq #-1,%d0 <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 42c6e: 4cee 0c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a3 <== NOT EXECUTED */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 42c74: 2081 movel %d1,%a0@ <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 42c76: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00042c7c : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42c7c: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42c7e: 4e56 0000 linkw %fp,#0 42c82: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42c86: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42c8a: b0a8 0048 cmpl %a0@(72),%d0 42c8e: 6610 bnes 42ca0 <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 42c90: 4aa8 0058 tstl %a0@(88) 42c94: 671c beqs 42cb2 <== NEVER TAKEN /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 42c96: 42a8 0058 clrl %a0@(88) return 0; 42c9a: 4280 clrl %d0 } 42c9c: 4e5e unlk %fp 42c9e: 4e75 rts /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 42ca0: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 42ca6: 7214 moveq #20,%d1 <== NOT EXECUTED 42ca8: 2040 moveal %d0,%a0 <== NOT EXECUTED 42caa: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 42cac: 4e5e unlk %fp <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 42cae: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 42cb0: 4e75 rts <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 42cb2: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 42cb8: 7216 moveq #22,%d1 <== NOT EXECUTED 42cba: 2040 moveal %d0,%a0 <== NOT EXECUTED 42cbc: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 42cbe: 4e5e unlk %fp <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 42cc0: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } =============================================================================== 00043538 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 43538: 4e56 0000 linkw %fp,#0 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 4353c: 2079 0005 fec4 moveal 5fec4 ,%a0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 43542: 2f03 movel %d3,%sp@- 43544: 262e 0008 movel %fp@(8),%d3 43548: 2f02 movel %d2,%sp@- 4354a: 242e 000c movel %fp@(12),%d2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 4354e: 4a88 tstl %a0 43550: 6704 beqs 43556 (*rtems_malloc_statistics_helpers->initialize)(); 43552: 2050 moveal %a0@,%a0 43554: 4e90 jsr %a0@ } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 43556: 4eb9 0004 34bc jsr 434bc /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 4355c: 2079 0005 fec0 moveal 5fec0 ,%a0 43562: 4a88 tstl %a0 43564: 6712 beqs 43578 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 43566: 2f2e 0010 movel %fp@(16),%sp@- heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 4356a: d483 addl %d3,%d2 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 4356c: 2f03 movel %d3,%sp@- 4356e: 2050 moveal %a0@,%a0 43570: 4e90 jsr %a0@ heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 43572: 508f addql #8,%sp 43574: 9480 subl %d0,%d2 heap_begin = new_heap_begin; 43576: 2600 movel %d0,%d3 * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 43578: 4a39 0005 fec8 tstb 5fec8 4357e: 6624 bnes 435a4 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 43580: 4a39 0005 f694 tstb 5f694 43586: 6644 bnes 435cc void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 43588: 4878 0004 pea 4 4358c: 2f02 movel %d2,%sp@- 4358e: 2f03 movel %d3,%sp@- 43590: 2f39 0005 f74a movel 5f74a ,%sp@- 43596: 4eb9 0004 7c62 jsr 47c62 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 4359c: 4fef 0010 lea %sp@(16),%sp 435a0: 4a80 tstl %d0 435a2: 675c beqs 43600 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 435a4: 2f39 0005 f74a movel 5f74a ,%sp@- 435aa: 2439 0006 0f0c movel 60f0c ,%d2 435b0: 4eb9 0004 87c4 jsr 487c4 <_Protected_heap_Get_size> } 435b6: 262e fffc movel %fp@(-4),%d3 if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 435ba: d082 addl %d2,%d0 435bc: 588f addql #4,%sp } 435be: 242e fff8 movel %fp@(-8),%d2 435c2: 4e5e unlk %fp if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 435c4: 23c0 0006 0f0c movel %d0,60f0c } 435ca: 4e75 rts if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 435cc: 2f02 movel %d2,%sp@- 435ce: 42a7 clrl %sp@- 435d0: 2f03 movel %d3,%sp@- 435d2: 4eb9 0004 f928 jsr 4f928 * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 435d8: 4fef 000c lea %sp@(12),%sp 435dc: 4a39 0005 fec8 tstb 5fec8 435e2: 66c0 bnes 435a4 <== NEVER TAKEN 435e4: 4878 0004 pea 4 435e8: 2f02 movel %d2,%sp@- 435ea: 2f03 movel %d3,%sp@- 435ec: 2f39 0005 f74a movel 5f74a ,%sp@- 435f2: 4eb9 0004 7c62 jsr 47c62 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 435f8: 4fef 0010 lea %sp@(16),%sp 435fc: 4a80 tstl %d0 435fe: 66a4 bnes 435a4 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 43600: 4878 001a pea 1a 43604: 4eb9 0004 724c jsr 4724c ... =============================================================================== 00042b58 : /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 42b58: 70ff moveq #-1,%d0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 42b5a: 4e56 ffdc linkw %fp,#-36 <== NOT EXECUTED 42b5e: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ <== NOT EXECUTED 42b62: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 42b66: b08a cmpl %a2,%d0 <== NOT EXECUTED 42b68: 6700 015a beqw 42cc4 <== NOT EXECUTED current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 42b6c: 262a 00f2 movel %a2@(242),%d3 <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 42b70: 47ea 00b2 lea %a2@(178),%a3 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 42b74: 226a 00b6 moveal %a2@(182),%a1 <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 42b78: 2413 movel %a3@,%d2 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 42b7a: 72fc moveq #-4,%d1 <== NOT EXECUTED stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 42b7c: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 42b82: 2009 movel %a1,%d0 <== NOT EXECUTED 42b84: 0680 0000 0020 addil #32,%d0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 42b8a: c282 andl %d2,%d1 <== NOT EXECUTED 42b8c: d280 addl %d0,%d1 <== NOT EXECUTED 42b8e: b280 cmpl %d0,%d1 <== NOT EXECUTED 42b90: 6300 00bc blsw 42c4e <== NOT EXECUTED if (*base != U32_PATTERN) 42b94: 283c a5a5 a5a5 movel #-1515870811,%d4 <== NOT EXECUTED 42b9a: b8a9 0020 cmpl %a1@(32),%d4 <== NOT EXECUTED 42b9e: 6616 bnes 42bb6 <== NOT EXECUTED * Try to print out how much stack was actually used by the task. */ static void *print_context; static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( 42ba0: 41e9 0024 lea %a1@(36),%a0 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 42ba4: 5880 addql #4,%d0 <== NOT EXECUTED 42ba6: b081 cmpl %d1,%d0 <== NOT EXECUTED 42ba8: 6400 00a4 bccw 42c4e <== NOT EXECUTED if (*base != U32_PATTERN) 42bac: 283c a5a5 a5a5 movel #-1515870811,%d4 <== NOT EXECUTED 42bb2: b898 cmpl %a0@+,%d4 <== NOT EXECUTED 42bb4: 67ee beqs 42ba4 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 42bb6: 4a80 tstl %d0 <== NOT EXECUTED 42bb8: 6700 0094 beqw 42c4e <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 42bbc: 49f1 2810 lea %a1@(00000010,%d2:l),%a4 <== NOT EXECUTED 42bc0: 99c0 subal %d0,%a4 <== NOT EXECUTED else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 42bc2: 4a8a tstl %a2 <== NOT EXECUTED 42bc4: 6700 0090 beqw 42c56 <== NOT EXECUTED #endif { (*print_handler)( 42bc8: 486e fffb pea %fp@(-5) <== NOT EXECUTED 42bcc: 4878 0005 pea 5 <== NOT EXECUTED 42bd0: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42bd4: 2a79 0006 352c moveal 6352c ,%a5 <== NOT EXECUTED 42bda: 4eb9 0004 940c jsr 4940c <== NOT EXECUTED 42be0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42be2: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42be6: 4879 0006 0e91 pea 60e91 <== NOT EXECUTED 42bec: 2f39 0006 3530 movel 63530 ,%sp@- <== NOT EXECUTED 42bf2: 4e95 jsr %a5@ <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 42bf4: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( 42bf8: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 42bfc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42bfe: 2f03 movel %d3,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 42c00: 2013 movel %a3@,%d0 <== NOT EXECUTED 42c02: 5380 subql #1,%d0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 42c04: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42c08: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42c0a: 4879 0006 0eac pea 60eac <== NOT EXECUTED 42c10: 2f39 0006 3530 movel 63530 ,%sp@- <== NOT EXECUTED 42c16: 2079 0006 352c moveal 6352c ,%a0 <== NOT EXECUTED 42c1c: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 42c1e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 42c22: 4ab9 0006 3528 tstl 63528 <== NOT EXECUTED 42c28: 677a beqs 42ca4 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 42c2a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 42c2c: 4879 0006 0ed7 pea 60ed7 <== NOT EXECUTED 42c32: 2f39 0006 3530 movel 63530 ,%sp@- <== NOT EXECUTED 42c38: 2079 0006 352c moveal 6352c ,%a0 <== NOT EXECUTED 42c3e: 4e90 jsr %a0@ <== NOT EXECUTED 42c40: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 42c44: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 42c4a: 4e5e unlk %fp <== NOT EXECUTED 42c4c: 4e75 rts <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; 42c4e: 99cc subal %a4,%a4 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 42c50: 4a8a tstl %a2 <== NOT EXECUTED 42c52: 6600 ff74 bnew 42bc8 <== NOT EXECUTED rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 42c56: 4878 ffff pea ffffffff <== NOT EXECUTED 42c5a: 4879 0006 0e9e pea 60e9e <== NOT EXECUTED 42c60: 2f39 0006 3530 movel 63530 ,%sp@- <== NOT EXECUTED 42c66: 2079 0006 352c moveal 6352c ,%a0 <== NOT EXECUTED 42c6c: 4e90 jsr %a0@ <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 42c6e: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 42c72: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } #endif (*print_handler)( 42c76: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42c78: 2f03 movel %d3,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 42c7a: 2013 movel %a3@,%d0 <== NOT EXECUTED 42c7c: 5380 subql #1,%d0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 42c7e: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42c82: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42c84: 4879 0006 0eac pea 60eac <== NOT EXECUTED 42c8a: 2f39 0006 3530 movel 63530 ,%sp@- <== NOT EXECUTED 42c90: 2079 0006 352c moveal 6352c ,%a0 <== NOT EXECUTED 42c96: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 42c98: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 42c9c: 4ab9 0006 3528 tstl 63528 <== NOT EXECUTED 42ca2: 6686 bnes 42c2a <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 42ca4: 4879 0006 0eca pea 60eca <== NOT EXECUTED 42caa: 2f39 0006 3530 movel 63530 ,%sp@- <== NOT EXECUTED 42cb0: 2079 0006 352c moveal 6352c ,%a0 <== NOT EXECUTED 42cb6: 4e90 jsr %a0@ <== NOT EXECUTED 42cb8: 508f addql #8,%sp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 42cba: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 42cc0: 4e5e unlk %fp <== NOT EXECUTED 42cc2: 4e75 rts <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) 42cc4: 2279 0006 3d48 moveal 63d48 ,%a1<== NOT EXECUTED 42cca: 4a89 tstl %a1 <== NOT EXECUTED 42ccc: 6700 ff76 beqw 42c44 <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; 42cd0: 47f9 0006 3d44 lea 63d44 ,%a3 <== NOT EXECUTED the_thread = 0; current = 0; 42cd6: 4283 clrl %d3 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) return; stack = &Stack_check_Interrupt_stack; the_thread = 0; 42cd8: 95ca subal %a2,%a2 <== NOT EXECUTED 42cda: 6000 fe9c braw 42b78 <== NOT EXECUTED =============================================================================== 00042cde : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 42cde: 4e56 0000 linkw %fp,#0 static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if ( Stack_check_Initialized ) 42ce2: 4ab9 0006 3528 tstl 63528 42ce8: 666a bnes 42d54 /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 42cea: 2039 0006 4366 movel 64366 <_Per_CPU_Information>,%d0 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 42cf0: 223c feed f00d movel #-17960947,%d1 42cf6: 23c1 0006 3d34 movel %d1,63d34 42cfc: 223c 0bad 0d06 movel #195890438,%d1 42d02: 23c1 0006 3d38 movel %d1,63d38 42d08: 223c dead f00d movel #-559026163,%d1 42d0e: 23c1 0006 3d3c movel %d1,63d3c 42d14: 223c 600d 0d06 movel #1611468038,%d1 42d1a: 23c1 0006 3d40 movel %d1,63d40 /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 42d20: 4a80 tstl %d0 42d22: 6728 beqs 42d4c <== NEVER TAKEN 42d24: 2239 0006 436a movel 6436a <_Per_CPU_Information+0x4>,%d1 42d2a: 6720 beqs 42d4c <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 42d2c: 9280 subl %d0,%d1 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 42d2e: 2f01 movel %d1,%sp@- 42d30: 4878 00a5 pea a5 * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 42d34: 23c0 0006 3d48 movel %d0,63d48 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 42d3a: 2f00 movel %d0,%sp@- * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 42d3c: 23c1 0006 3d44 movel %d1,63d44 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 42d42: 4eb9 0005 2458 jsr 52458 42d48: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 42d4c: 7001 moveq #1,%d0 42d4e: 23c0 0006 3528 movel %d0,63528 } 42d54: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042dca : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 42dca: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 42dce: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); 42dd2: 4879 0006 0edd pea 60edd <== NOT EXECUTED 42dd8: 47f9 0004 4f38 lea 44f38 ,%a3 <== NOT EXECUTED Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 42dde: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); 42de2: 286a 00b6 moveal %a2@(182),%a4 <== NOT EXECUTED Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 42de6: 142e 000f moveb %fp@(15),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); 42dea: 4e93 jsr %a3@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 42dec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42dee: 4879 0006 0eed pea 60eed <== NOT EXECUTED 42df4: 4e93 jsr %a3@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 42df6: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42dfa: 4879 0006 0f0a pea 60f0a <== NOT EXECUTED 42e00: 4e93 jsr %a3@ <== NOT EXECUTED printk( 42e02: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 42e06: 4879 0006 0f1c pea 60f1c <== NOT EXECUTED 42e0c: 4e93 jsr %a3@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 42e0e: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 42e12: 4878 0020 pea 20 <== NOT EXECUTED 42e16: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42e1a: 4eb9 0004 940c jsr 4940c <== NOT EXECUTED 42e20: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 42e24: 2e80 movel %d0,%sp@ <== NOT EXECUTED 42e26: 4879 0006 0f30 pea 60f30 <== NOT EXECUTED 42e2c: 4e93 jsr %a3@ <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 42e2e: 206a 00b6 moveal %a2@(182),%a0 <== NOT EXECUTED 42e32: 202a 00b2 movel %a2@(178),%d0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 42e36: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42e3a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42e3c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42e3e: 4879 0006 0f46 pea 60f46 <== NOT EXECUTED 42e44: 4e93 jsr %a3@ <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 42e46: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 42e4a: 4a02 tstb %d2 <== NOT EXECUTED 42e4c: 670a beqs 42e58 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 42e4e: 4878 0081 pea 81 <== NOT EXECUTED 42e52: 4eb9 0004 9d60 jsr 49d60 <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 42e58: 486c 0018 pea %a4@(24) <== NOT EXECUTED 42e5c: 486c 0008 pea %a4@(8) <== NOT EXECUTED 42e60: 4878 0010 pea 10 <== NOT EXECUTED 42e64: 4879 0006 0f77 pea 60f77 <== NOT EXECUTED 42e6a: 4e93 jsr %a3@ <== NOT EXECUTED 42e6c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 42e70: 4878 0081 pea 81 <== NOT EXECUTED 42e74: 4eb9 0004 9d60 jsr 49d60 <== NOT EXECUTED =============================================================================== 0004cc84 : * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ticks = microseconds / microseconds_per_tick; 4cc84: 41f9 0006 4ca8 lea 64ca8 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4cc8a: 4e56 0000 linkw %fp,#0 * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ticks = microseconds / microseconds_per_tick; 4cc8e: 202e 0008 movel %fp@(8),%d0 4cc92: 4c50 0001 remul %a0@,%d1,%d0 4cc96: 4c50 0000 remul %a0@,%d0,%d0 if ( (microseconds % microseconds_per_tick) != 0 ) 4cc9a: 4a81 tstl %d1 4cc9c: 6702 beqs 4cca0 <== ALWAYS TAKEN ticks += 1; 4cc9e: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 4cca0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000482d4 : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 482d4: 4e56 0000 linkw %fp,#0 /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick(); 482d8: 2039 0006 0838 movel 60838 ,%d0 #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 482de: 2f02 movel %d2,%sp@- /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick(); 482e0: 243c 0000 03e8 movel #1000,%d2 482e6: 4c42 0000 remul %d2,%d0,%d0 ticks = milliseconds / milliseconds_per_tick; 482ea: 242e 0008 movel %fp@(8),%d2 482ee: 4c40 2001 remul %d0,%d1,%d2 482f2: 4c40 2002 remul %d0,%d2,%d2 482f6: 2002 movel %d2,%d0 if ( (milliseconds % milliseconds_per_tick) != 0 ) 482f8: 4a81 tstl %d1 482fa: 6702 beqs 482fe <== ALWAYS TAKEN ticks += 1; 482fc: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 482fe: 241f movel %sp@+,%d2 48300: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047416 <_API_extensions_Run_postdriver>: /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 47416: 4e56 0000 linkw %fp,#0 4741a: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4741c: 2479 0006 119c moveal 6119c <_API_extensions_List>,%a2 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 47422: b5fc 0006 11a0 cmpal #397728,%a2 47428: 6710 beqs 4743a <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 4742a: 206a 0008 moveal %a2@(8),%a0 4742e: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 47430: 2452 moveal %a2@,%a2 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 47432: b5fc 0006 11a0 cmpal #397728,%a2 47438: 66f0 bnes 4742a <_API_extensions_Run_postdriver+0x14> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 4743a: 246e fffc moveal %fp@(-4),%a2 4743e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047442 <_API_extensions_Run_postswitch>: /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 47442: 4e56 0000 linkw %fp,#0 47446: 2f0a movel %a2,%sp@- 47448: 2479 0006 119c moveal 6119c <_API_extensions_List>,%a2 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 4744e: b5fc 0006 11a0 cmpal #397728,%a2 47454: 6718 beqs 4746e <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); 47456: 2f39 0006 14aa movel 614aa <_Per_CPU_Information+0xc>,%sp@- 4745c: 206a 000c moveal %a2@(12),%a0 47460: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 47462: 2452 moveal %a2@,%a2 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 47464: 588f addql #4,%sp 47466: b5fc 0006 11a0 cmpal #397728,%a2 4746c: 66e8 bnes 47456 <_API_extensions_Run_postswitch+0x14> the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 4746e: 246e fffc moveal %fp@(-4),%a2 47472: 4e5e unlk %fp ... =============================================================================== 000498e0 <_CORE_RWLock_Obtain_for_writing>: * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 498e0: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 498e6: 4e56 fff4 linkw %fp,#-12 498ea: 206e 0008 moveal %fp@(8),%a0 498ee: 48d7 001c moveml %d2-%d4,%sp@ 498f2: 282e 000c movel %fp@(12),%d4 498f6: 262e 0014 movel %fp@(20),%d3 ISR_Level level; Thread_Control *executing = _Thread_Executing; 498fa: 2279 0006 40ce moveal 640ce <_Per_CPU_Information+0xc>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 49900: 142e 0013 moveb %fp@(19),%d2 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 49904: 40c1 movew %sr,%d1 49906: 8081 orl %d1,%d0 49908: 46c0 movew %d0,%sr switch ( the_rwlock->current_state ) { 4990a: 4aa8 0044 tstl %a0@(68) 4990e: 6614 bnes 49924 <_CORE_RWLock_Obtain_for_writing+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 49910: 7002 moveq #2,%d0 49912: 2140 0044 movel %d0,%a0@(68) _ISR_Enable( level ); 49916: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 49918: 42a9 0034 clrl %a1@(52) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4991c: 4cd7 001c moveml %sp@,%d2-%d4 49920: 4e5e unlk %fp 49922: 4e75 rts /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 49924: 4a02 tstb %d2 49926: 6610 bnes 49938 <_CORE_RWLock_Obtain_for_writing+0x58> _ISR_Enable( level ); 49928: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 4992a: 7002 moveq #2,%d0 _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4992c: 4cd7 001c moveml %sp@,%d2-%d4 * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 49930: 2340 0034 movel %d0,%a1@(52) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 49934: 4e5e unlk %fp 49936: 4e75 rts 49938: 7001 moveq #1,%d0 4993a: 2140 0030 movel %d0,%a0@(48) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 4993e: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 49942: 2344 0020 movel %d4,%a1@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 49946: 2340 0030 movel %d0,%a1@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4994a: 42a9 0034 clrl %a1@(52) _ISR_Enable( level ); 4994e: 46c1 movew %d1,%sr _Thread_queue_Enqueue_with_handler( 49950: 2d43 000c movel %d3,%fp@(12) 49954: 203c 0004 9a4c movel #301644,%d0 4995a: 2d48 0008 movel %a0,%fp@(8) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4995e: 4cd7 001c moveml %sp@,%d2-%d4 executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 49962: 2d40 0010 movel %d0,%fp@(16) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 49966: 4e5e unlk %fp executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 49968: 4ef9 0004 b7ec jmp 4b7ec <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 00049970 <_CORE_RWLock_Release>: * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 49970: 203c 0000 0700 movel #1792,%d0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 49976: 4e56 fff0 linkw %fp,#-16 ISR_Level level; Thread_Control *executing = _Thread_Executing; 4997a: 2079 0006 40ce moveal 640ce <_Per_CPU_Information+0xc>,%a0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 49980: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49984: 246e 0008 moveal %fp@(8),%a2 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 49988: 40c1 movew %sr,%d1 4998a: 8081 orl %d1,%d0 4998c: 46c0 movew %d0,%sr if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 4998e: 202a 0044 movel %a2@(68),%d0 49992: 6700 0090 beqw 49a24 <_CORE_RWLock_Release+0xb4> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 49996: 7401 moveq #1,%d2 49998: b480 cmpl %d0,%d2 4999a: 676e beqs 49a0a <_CORE_RWLock_Release+0x9a> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4999c: 42a8 0034 clrl %a0@(52) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 499a0: 42aa 0044 clrl %a2@(68) _ISR_Enable( level ); 499a4: 46c1 movew %d1,%sr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 499a6: 2f0a movel %a2,%sp@- 499a8: 4eb9 0004 b67c jsr 4b67c <_Thread_queue_Dequeue> if ( next ) { 499ae: 588f addql #4,%sp 499b0: 4a80 tstl %d0 499b2: 674a beqs 499fe <_CORE_RWLock_Release+0x8e> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 499b4: 7201 moveq #1,%d1 499b6: 2040 moveal %d0,%a0 499b8: b2a8 0030 cmpl %a0@(48),%d1 499bc: 677c beqs 49a3a <_CORE_RWLock_Release+0xca> /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 499be: 7201 moveq #1,%d1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 499c0: 52aa 0048 addql #1,%a2@(72) 499c4: 47f9 0004 bb58 lea 4bb58 <_Thread_queue_First>,%a3 next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 499ca: 49f9 0004 ba0c lea 4ba0c <_Thread_queue_Extract>,%a4 /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 499d0: 2541 0044 movel %d1,%a2@(68) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 499d4: 2f0a movel %a2,%sp@- 499d6: 4e93 jsr %a3@ if ( !next || 499d8: 588f addql #4,%sp 499da: 4a80 tstl %d0 499dc: 6720 beqs 499fe <_CORE_RWLock_Release+0x8e> 499de: 7401 moveq #1,%d2 499e0: 2040 moveal %d0,%a0 499e2: b4a8 0030 cmpl %a0@(48),%d2 499e6: 6716 beqs 499fe <_CORE_RWLock_Release+0x8e> <== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 499e8: 52aa 0048 addql #1,%a2@(72) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 499ec: 2f00 movel %d0,%sp@- 499ee: 2f0a movel %a2,%sp@- 499f0: 4e94 jsr %a4@ } 499f2: 508f addql #8,%sp /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 499f4: 2f0a movel %a2,%sp@- 499f6: 4e93 jsr %a3@ if ( !next || 499f8: 588f addql #4,%sp 499fa: 4a80 tstl %d0 499fc: 66e0 bnes 499de <_CORE_RWLock_Release+0x6e> <== NEVER TAKEN } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 499fe: 4280 clrl %d0 49a00: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49a06: 4e5e unlk %fp 49a08: 4e75 rts _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 49a0a: 202a 0048 movel %a2@(72),%d0 49a0e: 5380 subql #1,%d0 49a10: 2540 0048 movel %d0,%a2@(72) if ( the_rwlock->number_of_readers != 0 ) { 49a14: 6786 beqs 4999c <_CORE_RWLock_Release+0x2c> /* must be unlocked again */ _ISR_Enable( level ); 49a16: 46c1 movew %d1,%sr } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 49a18: 4280 clrl %d0 49a1a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49a20: 4e5e unlk %fp 49a22: 4e75 rts * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 49a24: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 49a26: 103c 0002 moveb #2,%d0 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 49a2a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 49a30: 2140 0034 movel %d0,%a0@(52) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 49a34: 4280 clrl %d0 49a36: 4e5e unlk %fp 49a38: 4e75 rts next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 49a3a: 7002 moveq #2,%d0 49a3c: 2540 0044 movel %d0,%a2@(68) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 49a40: 4280 clrl %d0 49a42: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49a48: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049a4c <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 49a4c: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 49a50: 486e fffc pea %fp@(-4) 49a54: 2f2e 0008 movel %fp@(8),%sp@- 49a58: 4eb9 0004 b318 jsr 4b318 <_Thread_Get> switch ( location ) { 49a5e: 508f addql #8,%sp 49a60: 4aae fffc tstl %fp@(-4) 49a64: 661e bnes 49a84 <_CORE_RWLock_Timeout+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 49a66: 2f00 movel %d0,%sp@- 49a68: 4eb9 0004 bc78 jsr 4bc78 <_Thread_queue_Process_timeout> * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; return _Thread_Dispatch_disable_level; 49a6e: 588f addql #4,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 49a70: 2039 0006 3c6c movel 63c6c <_Thread_Dispatch_disable_level>,%d0 49a76: 5380 subql #1,%d0 49a78: 23c0 0006 3c6c movel %d0,63c6c <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 49a7e: 2039 0006 3c6c movel 63c6c <_Thread_Dispatch_disable_level>,%d0 _Thread_Unnest_dispatch(); break; } } 49a84: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000485c8 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 485c8: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 485ce: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 485d2: 2279 0006 29be moveal 629be <_Per_CPU_Information+0xc>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 485d8: 48d7 001c moveml %d2-%d4,%sp@ 485dc: 206e 0008 moveal %fp@(8),%a0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 485e0: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 485e4: 242e 000c movel %fp@(12),%d2 485e8: 262e 0014 movel %fp@(20),%d3 485ec: 282e 0018 movel %fp@(24),%d4 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 485f0: 40c1 movew %sr,%d1 485f2: 8081 orl %d1,%d0 485f4: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 485f6: 2028 0048 movel %a0@(72),%d0 485fa: 5280 addql #1,%d0 485fc: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 48600: 4aa8 0040 tstl %a0@(64) 48604: 6606 bnes 4860c <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == 48606: b0a8 0044 cmpl %a0@(68),%d0 4860a: 672e beqs 4863a <_CORE_barrier_Wait+0x72> RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4860c: 7001 moveq #1,%d0 4860e: 2140 0030 movel %d0,%a0@(48) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 48612: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 48616: 2342 0020 movel %d2,%a1@(32) _ISR_Enable( level ); 4861a: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4861c: 2d43 000c movel %d3,%fp@(12) 48620: 203c 0004 aa68 movel #305768,%d0 48626: 2d48 0008 movel %a0,%fp@(8) } 4862a: 4cd7 001c moveml %sp@,%d2-%d4 _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4862e: 2d40 0010 movel %d0,%fp@(16) } 48632: 4e5e unlk %fp _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 48634: 4ef9 0004 a6e0 jmp 4a6e0 <_Thread_queue_Enqueue_with_handler> _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4863a: 7001 moveq #1,%d0 4863c: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 48640: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 48642: 2d44 0010 movel %d4,%fp@(16) 48646: 2d42 000c movel %d2,%fp@(12) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 4864a: 4cd7 001c moveml %sp@,%d2-%d4 if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4864e: 2d48 0008 movel %a0,%fp@(8) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 48652: 4e5e unlk %fp if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 48654: 4ef9 0004 dcd8 jmp 4dcd8 <_CORE_barrier_Release> ... =============================================================================== 0004dd18 <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 4dd18: 4e56 0000 linkw %fp,#0 4dd1c: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 4dd1e: 2f2e 0010 movel %fp@(16),%sp@- 4dd22: 2f2e 000c movel %fp@(12),%sp@- void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 4dd26: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 4dd2a: 2f0a movel %a2,%sp@- 4dd2c: 4eb9 0004 a374 jsr 4a374 <_Thread_queue_Flush> * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) 4dd32: 4fef 000c lea %sp@(12),%sp 4dd36: 4aaa 0048 tstl %a2@(72) 4dd3a: 6612 bnes 4dd4e <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 4dd3c: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 4dd42: 246e fffc moveal %fp@(-4),%a2 4dd46: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 4dd48: 4ef9 0004 ad0e jmp 4ad0e <_Workspace_Free> * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 4dd4e: 2f0a movel %a2,%sp@- 4dd50: 4eb9 0004 dd6c jsr 4dd6c <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 4dd56: 2d6a 005c 0008 movel %a2@(92),%fp@(8) * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 4dd5c: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 4dd5e: 246e fffc moveal %fp@(-4),%a2 4dd62: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 4dd64: 4ef9 0004 ad0e jmp 4ad0e <_Workspace_Free> ... =============================================================================== 00050438 <_CORE_message_queue_Initialize>: /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 50438: 7203 moveq #3,%d1 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 5043a: 4e56 ffe4 linkw %fp,#-28 5043e: 202e 0014 movel %fp@(20),%d0 50442: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 50446: 246e 0008 moveal %fp@(8),%a2 * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 5044a: 2600 movel %d0,%d3 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 5044c: 242e 0010 movel %fp@(16),%d2 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 50450: c280 andl %d0,%d1 ) { size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 50452: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 50456: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 5045a: 2540 004c movel %d0,%a2@(76) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 5045e: 42aa 0060 clrl %a2@(96) the_message_queue->notify_argument = the_argument; 50462: 42aa 0064 clrl %a2@(100) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 50466: 4a81 tstl %d1 50468: 6716 beqs 50480 <_CORE_message_queue_Initialize+0x48> allocated_message_size += sizeof(uint32_t); 5046a: 5883 addql #4,%d3 allocated_message_size &= ~(sizeof(uint32_t) - 1); 5046c: 72fc moveq #-4,%d1 5046e: c681 andl %d1,%d3 } if (allocated_message_size < maximum_message_size) 50470: b680 cmpl %d0,%d3 50472: 640c bccs 50480 <_CORE_message_queue_Initialize+0x48><== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 50474: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) return false; 5047a: 4200 clrb %d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 5047c: 4e5e unlk %fp 5047e: 4e75 rts /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( 50480: 0683 0000 0014 addil #20,%d3 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 50486: 2f03 movel %d3,%sp@- if ( x > SIZE_MAX ) 50488: 4286 clrl %d6 5048a: 7eff moveq #-1,%d7 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 5048c: 42a7 clrl %sp@- 5048e: 2f02 movel %d2,%sp@- 50490: 42a7 clrl %sp@- 50492: 4eb9 0006 4928 jsr 64928 <__muldi3> 50498: 4fef 0010 lea %sp@(16),%sp 5049c: 2800 movel %d0,%d4 5049e: 2a01 movel %d1,%d5 if ( x > SIZE_MAX ) 504a0: 9e85 subl %d5,%d7 504a2: 9d84 subxl %d4,%d6 504a4: 6dce blts 50474 <_CORE_message_queue_Initialize+0x3c> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 504a6: 2f01 movel %d1,%sp@- 504a8: 4eb9 0005 34de jsr 534de <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) 504ae: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 504b0: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 504b4: 67be beqs 50474 <_CORE_message_queue_Initialize+0x3c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 504b6: 2f03 movel %d3,%sp@- allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 504b8: 7e01 moveq #1,%d7 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 504ba: 2f02 movel %d2,%sp@- 504bc: 2f00 movel %d0,%sp@- 504be: 486a 0068 pea %a2@(104) 504c2: 4eb9 0005 5e0c jsr 55e0c <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 504c8: 4878 0006 pea 6 504cc: 206e 000c moveal %fp@(12),%a0 504d0: be90 cmpl %a0@,%d7 504d2: 57c0 seq %d0 504d4: 4878 0080 pea 80 504d8: 49c0 extbl %d0 504da: 4480 negl %d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 504dc: 41ea 0054 lea %a2@(84),%a0 504e0: 2f00 movel %d0,%sp@- 504e2: 2548 0050 movel %a0,%a2@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 504e6: 41ea 0050 lea %a2@(80),%a0 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 504ea: 42aa 0054 clrl %a2@(84) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 504ee: 2548 0058 movel %a0,%a2@(88) 504f2: 2f0a movel %a2,%sp@- 504f4: 4eb9 0005 2b9c jsr 52b9c <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 504fa: 4fef 0020 lea %sp@(32),%sp } 504fe: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 50504: 7001 moveq #1,%d0 } 50506: 4e5e unlk %fp ... =============================================================================== 00055e80 <_CORE_message_queue_Insert_message>: void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 55e80: 4e56 fff4 linkw %fp,#-12 55e84: 226e 000c moveal %fp@(12),%a1 55e88: 202e 0010 movel %fp@(16),%d0 55e8c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 55e90: 206e 0008 moveal %fp@(8),%a0 55e94: 2340 0008 movel %d0,%a1@(8) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { 55e98: 0c80 7fff ffff cmpil #2147483647,%d0 55e9e: 6700 0082 beqw 55f22 <_CORE_message_queue_Insert_message+0xa2> _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 55ea2: 0c80 8000 0000 cmpil #-2147483648,%d0 55ea8: 6700 00ae beqw 55f58 <_CORE_message_queue_Insert_message+0xd8> RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 55eac: 2208 movel %a0,%d1 55eae: 0681 0000 0054 addil #84,%d1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 55eb4: 2468 0050 moveal %a0@(80),%a2 int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = _Chain_First( the_header ); while ( !_Chain_Is_tail( the_header, the_node ) ) { 55eb8: b5c1 cmpal %d1,%a2 55eba: 6712 beqs 55ece <_CORE_message_queue_Insert_message+0x4e> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 55ebc: b0aa 0008 cmpl %a2@(8),%d0 55ec0: 6d0c blts 55ece <_CORE_message_queue_Insert_message+0x4e> the_node = the_node->next; 55ec2: 2452 moveal %a2@,%a2 int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = _Chain_First( the_header ); while ( !_Chain_Is_tail( the_header, the_node ) ) { 55ec4: b5c1 cmpal %d1,%a2 55ec6: 6706 beqs 55ece <_CORE_message_queue_Insert_message+0x4e> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 55ec8: b0aa 0008 cmpl %a2@(8),%d0 55ecc: 6cf4 bges 55ec2 <_CORE_message_queue_Insert_message+0x42> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 55ece: 203c 0000 0700 movel #1792,%d0 55ed4: 40c1 movew %sr,%d1 55ed6: 8081 orl %d1,%d0 55ed8: 46c0 movew %d0,%sr SET_NOTIFY(); 55eda: 2028 0048 movel %a0@(72),%d0 the_message_queue->number_of_pending_messages++; 55ede: 2400 movel %d0,%d2 55ee0: 5282 addql #1,%d2 * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 55ee2: 4a80 tstl %d0 55ee4: 57c0 seq %d0 break; } _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 55ee6: 246a 0004 moveal %a2@(4),%a2 * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 55eea: 4480 negl %d0 } break; } _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 55eec: 2142 0048 movel %d2,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 55ef0: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 55ef2: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 55ef6: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 55ef8: 2749 0004 movel %a1,%a3@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 55efc: 228b movel %a3,%a1@ _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 55efe: 46c1 movew %d1,%sr /* * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 55f00: 4a00 tstb %d0 55f02: 6716 beqs 55f1a <_CORE_message_queue_Insert_message+0x9a> 55f04: 2268 0060 moveal %a0@(96),%a1 55f08: 4a89 tstl %a1 55f0a: 670e beqs 55f1a <_CORE_message_queue_Insert_message+0x9a> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 55f0c: 2d68 0064 0008 movel %a0@(100),%fp@(8) #endif } 55f12: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 55f16: 4e5e unlk %fp * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 55f18: 4ed1 jmp %a1@ #endif } 55f1a: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 55f1e: 4e5e unlk %fp 55f20: 4e75 rts else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); 55f22: 203c 0000 0700 movel #1792,%d0 55f28: 40c1 movew %sr,%d1 55f2a: 8081 orl %d1,%d0 55f2c: 46c0 movew %d0,%sr SET_NOTIFY(); 55f2e: 2028 0048 movel %a0@(72),%d0 the_message_queue->number_of_pending_messages++; 55f32: 2400 movel %d0,%d2 55f34: 5282 addql #1,%d2 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 55f36: 47e8 0054 lea %a0@(84),%a3 * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 55f3a: 4a80 tstl %d0 55f3c: 57c0 seq %d0 _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 55f3e: 2142 0048 movel %d2,%a0@(72) Chain_Node *old_last = tail->previous; 55f42: 2468 0058 moveal %a0@(88),%a2 * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 55f46: 4480 negl %d0 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 55f48: 228b movel %a3,%a1@ Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 55f4a: 2149 0058 movel %a1,%a0@(88) old_last->next = the_node; 55f4e: 2489 movel %a1,%a2@ the_node->previous = old_last; 55f50: 234a 0004 movel %a2,%a1@(4) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 55f54: 46c1 movew %d1,%sr 55f56: 60a8 bras 55f00 <_CORE_message_queue_Insert_message+0x80> } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 55f58: 203c 0000 0700 movel #1792,%d0 55f5e: 40c1 movew %sr,%d1 55f60: 8081 orl %d1,%d0 55f62: 46c0 movew %d0,%sr SET_NOTIFY(); 55f64: 2028 0048 movel %a0@(72),%d0 the_message_queue->number_of_pending_messages++; 55f68: 2400 movel %d0,%d2 55f6a: 5282 addql #1,%d2 RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert_unprotected(_Chain_Head(the_chain), the_node); 55f6c: 47e8 0050 lea %a0@(80),%a3 * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 55f70: 4a80 tstl %d0 55f72: 57c0 seq %d0 _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 55f74: 2142 0048 movel %d2,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 55f78: 2468 0050 moveal %a0@(80),%a2 * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 55f7c: 4480 negl %d0 RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert_unprotected(_Chain_Head(the_chain), the_node); 55f7e: 234b 0004 movel %a3,%a1@(4) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; 55f82: 2149 0050 movel %a1,%a0@(80) the_node->next = before_node; before_node->previous = the_node; 55f86: 2549 0004 movel %a1,%a2@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 55f8a: 228a movel %a2,%a1@ } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 55f8c: 46c1 movew %d1,%sr 55f8e: 6000 ff70 braw 55f00 <_CORE_message_queue_Insert_message+0x80> ... =============================================================================== 0005050c <_CORE_message_queue_Seize>: CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 5050c: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 50512: 4e56 ffe4 linkw %fp,#-28 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 50516: 2279 0006 b032 moveal 6b032 <_Per_CPU_Information+0xc>,%a1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 5051c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 50520: 246e 0008 moveal %fp@(8),%a2 50524: 2a2e 000c movel %fp@(12),%d5 50528: 262e 0010 movel %fp@(16),%d3 5052c: 206e 0014 moveal %fp@(20),%a0 50530: 286e 001c moveal %fp@(28),%a4 50534: 182e 001b moveb %fp@(27),%d4 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 50538: 42a9 0034 clrl %a1@(52) _ISR_Disable( level ); 5053c: 40c1 movew %sr,%d1 5053e: 8081 orl %d1,%d0 50540: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 50542: 240a movel %a2,%d2 50544: 200a movel %a2,%d0 50546: 0682 0000 0050 addil #80,%d2 5054c: 0680 0000 0054 addil #84,%d0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 50552: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 50556: b08b cmpl %a3,%d0 50558: 6700 0084 beqw 505de <_CORE_message_queue_Seize+0xd2> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 5055c: 2253 moveal %a3@,%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 5055e: 2342 0004 movel %d2,%a1@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 50562: 53aa 0048 subql #1,%a2@(72) Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 50566: 2549 0050 movel %a1,%a2@(80) _ISR_Enable( level ); 5056a: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 5056c: 2279 0006 b032 moveal 6b032 <_Per_CPU_Information+0xc>,%a1 _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 50572: 240b movel %a3,%d2 50574: 0682 0000 0010 addil #16,%d2 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5057a: 49f9 0005 8b6c lea 58b6c ,%a4 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 50580: 20ab 000c movel %a3@(12),%a0@ _Thread_Executing->Wait.count = 50584: 236b 0008 0024 movel %a3@(8),%a1@(36) 5058a: 2f10 movel %a0@,%sp@- 5058c: 2f02 movel %d2,%sp@- 5058e: 2f03 movel %d3,%sp@- 50590: 4e94 jsr %a4@ * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 50592: 2f0a movel %a2,%sp@- 50594: 4eb9 0005 27a0 jsr 527a0 <_Thread_queue_Dequeue> if ( !the_thread ) { 5059a: 4fef 0010 lea %sp@(16),%sp * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 5059e: 2040 moveal %d0,%a0 if ( !the_thread ) { 505a0: 4a80 tstl %d0 505a2: 6700 0088 beqw 5062c <_CORE_message_queue_Seize+0x120> */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 505a6: 2028 0030 movel %a0@(48),%d0 CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 505aa: 2768 0024 0008 movel %a0@(36),%a3@(8) 505b0: 2740 000c movel %d0,%a3@(12) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 505b4: 2f00 movel %d0,%sp@- 505b6: 2f28 002c movel %a0@(44),%sp@- 505ba: 2f02 movel %d2,%sp@- 505bc: 4e94 jsr %a4@ the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 505be: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 505c4: 4fef 000c lea %sp@(12),%sp 505c8: 2d4b 000c movel %a3,%fp@(12) 505cc: 2d4a 0008 movel %a2,%fp@(8) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 505d0: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 505d6: 4e5e unlk %fp the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 505d8: 4ef9 0005 5e80 jmp 55e80 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 505de: 4a04 tstb %d4 505e0: 6612 bnes 505f4 <_CORE_message_queue_Seize+0xe8> _ISR_Enable( level ); 505e2: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 505e4: 7004 moveq #4,%d0 executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 505e6: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 505ec: 2340 0034 movel %d0,%a1@(52) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 505f0: 4e5e unlk %fp 505f2: 4e75 rts RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 505f4: 7001 moveq #1,%d0 505f6: 2540 0030 movel %d0,%a2@(48) } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; 505fa: 2343 002c movel %d3,%a1@(44) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 505fe: 234a 0044 movel %a2,%a1@(68) executing->Wait.id = id; 50602: 2345 0020 movel %d5,%a1@(32) executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 50606: 2348 0028 movel %a0,%a1@(40) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 5060a: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 5060c: 2d4c 000c movel %a4,%fp@(12) 50610: 203c 0005 2c98 movel #339096,%d0 50616: 2d4a 0008 movel %a2,%fp@(8) } 5061a: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50620: 2d40 0010 movel %d0,%fp@(16) } 50624: 4e5e unlk %fp executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50626: 4ef9 0005 2910 jmp 52910 <_Thread_queue_Enqueue_with_handler> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 5062c: 45ea 0068 lea %a2@(104),%a2 50630: 2d4b 000c movel %a3,%fp@(12) 50634: 2d4a 0008 movel %a2,%fp@(8) } 50638: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 5063e: 4e5e unlk %fp 50640: 4ef9 0005 036c jmp 5036c <_Chain_Append> ... =============================================================================== 000479ac <_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 ) { 479ac: 4e56 0000 linkw %fp,#0 479b0: 2f0a movel %a2,%sp@- 479b2: 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)) ) { 479b6: 2f0a movel %a2,%sp@- 479b8: 4eb9 0004 95a4 jsr 495a4 <_Thread_queue_Dequeue> 479be: 588f addql #4,%sp 479c0: 4a80 tstl %d0 479c2: 670a beqs 479ce <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 479c4: 246e fffc moveal %fp@(-4),%a2 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 479c8: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 479ca: 4e5e unlk %fp 479cc: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 479ce: 303c 0700 movew #1792,%d0 479d2: 40c1 movew %sr,%d1 479d4: 8081 orl %d1,%d0 479d6: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 479d8: 202a 0048 movel %a2@(72),%d0 479dc: b0aa 0040 cmpl %a2@(64),%d0 479e0: 6412 bccs 479f4 <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN the_semaphore->count += 1; 479e2: 5280 addql #1,%d0 479e4: 2540 0048 movel %d0,%a2@(72) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 479e8: 4280 clrl %d0 _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 479ea: 46c1 movew %d1,%sr } return status; } 479ec: 246e fffc moveal %fp@(-4),%a2 479f0: 4e5e unlk %fp 479f2: 4e75 rts } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 479f4: 7004 moveq #4,%d0 <== NOT EXECUTED _ISR_Enable( level ); 479f6: 46c1 movew %d1,%sr <== NOT EXECUTED 479f8: 60f2 bras 479ec <_CORE_semaphore_Surrender+0x40> <== NOT EXECUTED ... =============================================================================== 0004cbfc <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4cbfc: 4e56 ffec linkw %fp,#-20 4cc00: 202e 0010 movel %fp@(16),%d0 4cc04: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4cc08: 246e 0008 moveal %fp@(8),%a2 size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4cc0c: 280a movel %a2,%d4 4cc0e: 5884 addql #4,%d4 Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4cc10: 262e 000c movel %fp@(12),%d3 4cc14: 242e 0014 movel %fp@(20),%d2 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; 4cc18: 42aa 0004 clrl %a2@(4) while ( count-- ) { 4cc1c: 4a80 tstl %d0 4cc1e: 6740 beqs 4cc60 <_Chain_Initialize+0x64> <== NEVER TAKEN { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; 4cc20: 2043 moveal %d3,%a0 ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 4cc22: 224a moveal %a2,%a1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4cc24: 5380 subql #1,%d0 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4cc26: 2208 movel %a0,%d1 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4cc28: 2a00 movel %d0,%d5 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4cc2a: d282 addl %d2,%d1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 4cc2c: 2288 movel %a0,%a1@ next->previous = current; 4cc2e: 2149 0004 movel %a1,%a0@(4) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4cc32: 4a80 tstl %d0 4cc34: 6714 beqs 4cc4a <_Chain_Initialize+0x4e> 4cc36: 2248 moveal %a0,%a1 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 4cc38: 2041 moveal %d1,%a0 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4cc3a: 2208 movel %a0,%d1 4cc3c: 5380 subql #1,%d0 4cc3e: d282 addl %d2,%d1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 4cc40: 2288 movel %a0,%a1@ next->previous = current; 4cc42: 2149 0004 movel %a1,%a0@(4) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4cc46: 4a80 tstl %d0 4cc48: 66ec bnes 4cc36 <_Chain_Initialize+0x3a> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4cc4a: 4c05 2800 mulsl %d5,%d2 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4cc4e: 2043 moveal %d3,%a0 4cc50: d1c2 addal %d2,%a0 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 4cc52: 2084 movel %d4,%a0@ tail->previous = current; 4cc54: 2548 0008 movel %a0,%a2@(8) } 4cc58: 4cd7 043c moveml %sp@,%d2-%d5/%a2 4cc5c: 4e5e unlk %fp 4cc5e: 4e75 rts ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 4cc60: 204a moveal %a2,%a0 <== NOT EXECUTED current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 4cc62: 2084 movel %d4,%a0@ <== NOT EXECUTED tail->previous = current; 4cc64: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED } 4cc68: 4cd7 043c moveml %sp@,%d2-%d5/%a2 <== NOT EXECUTED 4cc6c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004661c <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 4661c: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 46622: 4e56 ffec linkw %fp,#-20 46626: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4662a: 246e 0008 moveal %fp@(8),%a2 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 4662e: 206a 00fe moveal %a2@(254),%a0 option_set = (rtems_option) the_thread->Wait.option; 46632: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 46636: 40c3 movew %sr,%d3 46638: 8083 orl %d3,%d0 4663a: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 4663c: 222a 0024 movel %a2@(36),%d1 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 46640: 2001 movel %d1,%d0 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); pending_events = api->pending_events; 46642: 2410 movel %a0@,%d2 46644: c082 andl %d2,%d0 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 46646: 6700 00ac beqw 466f4 <_Event_Surrender+0xd8> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 4664a: 4ab9 0006 14a6 tstl 614a6 <_Per_CPU_Information+0x8> 46650: 6708 beqs 4665a <_Event_Surrender+0x3e> 46652: b5f9 0006 14aa cmpal 614aa <_Per_CPU_Information+0xc>,%a2 46658: 675c beqs 466b6 <_Event_Surrender+0x9a> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); 4665a: 2a2a 0010 movel %a2@(16),%d5 4665e: 0285 0000 0100 andil #256,%d5 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 46664: 6700 008e beqw 466f4 <_Event_Surrender+0xd8> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 46668: b081 cmpl %d1,%d0 4666a: 6708 beqs 46674 <_Event_Surrender+0x58> 4666c: 0804 0001 btst #1,%d4 46670: 6700 0082 beqw 466f4 <_Event_Surrender+0xd8> RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 46674: 2200 movel %d0,%d1 46676: 4681 notl %d1 46678: c282 andl %d2,%d1 4667a: 2081 movel %d1,%a0@ api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4667c: 206a 0028 moveal %a2@(40),%a0 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 46680: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 46684: 2080 movel %d0,%a0@ _ISR_Flash( level ); 46686: 203c 0000 0700 movel #1792,%d0 4668c: 46c3 movew %d3,%sr 4668e: 8083 orl %d3,%d0 46690: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 46692: 7a02 moveq #2,%d5 46694: baaa 0050 cmpl %a2@(80),%d5 46698: 6766 beqs 46700 <_Event_Surrender+0xe4> _ISR_Enable( level ); 4669a: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4669c: 2f3c 1003 fff8 movel #268697592,%sp@- 466a2: 2f0a movel %a2,%sp@- 466a4: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> 466aa: 508f addql #8,%sp } return; } } _ISR_Enable( level ); } 466ac: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 466b2: 4e5e unlk %fp 466b4: 4e75 rts * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 466b6: 2279 0006 1884 moveal 61884 <_Event_Sync_state>,%a1 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && 466bc: 7a02 moveq #2,%d5 466be: ba89 cmpl %a1,%d5 466c0: 670e beqs 466d0 <_Event_Surrender+0xb4> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 466c2: 2279 0006 1884 moveal 61884 <_Event_Sync_state>,%a1 * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 466c8: 1a3c 0001 moveb #1,%d5 466cc: ba89 cmpl %a1,%d5 466ce: 668a bnes 4665a <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 466d0: b081 cmpl %d1,%d0 466d2: 6706 beqs 466da <_Event_Surrender+0xbe> 466d4: 0804 0001 btst #1,%d4 466d8: 671a beqs 466f4 <_Event_Surrender+0xd8> <== NEVER TAKEN 466da: 2200 movel %d0,%d1 466dc: 4681 notl %d1 466de: c282 andl %d2,%d1 466e0: 2081 movel %d1,%a0@ api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 466e2: 206a 0028 moveal %a2@(40),%a0 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 466e6: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 466ea: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 466ec: 7003 moveq #3,%d0 466ee: 23c0 0006 1884 movel %d0,61884 <_Event_Sync_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 466f4: 46c3 movew %d3,%sr } 466f6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 466fc: 4e5e unlk %fp 466fe: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 46700: 7003 moveq #3,%d0 46702: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 46706: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 46708: 486a 0048 pea %a2@(72) 4670c: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 46712: 2f3c 1003 fff8 movel #268697592,%sp@- 46718: 2f0a movel %a2,%sp@- 4671a: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> 46720: 4fef 000c lea %sp@(12),%sp } return; } } _ISR_Enable( level ); } 46724: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4672a: 4e5e unlk %fp ... =============================================================================== 00046730 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 46730: 4e56 fffc linkw %fp,#-4 46734: 2f03 movel %d3,%sp@- 46736: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 46738: 486e fffc pea %fp@(-4) 4673c: 2f2e 0008 movel %fp@(8),%sp@- 46740: 4eb9 0004 9240 jsr 49240 <_Thread_Get> switch ( location ) { 46746: 508f addql #8,%sp 46748: 4aae fffc tstl %fp@(-4) 4674c: 6648 bnes 46796 <_Event_Timeout+0x66> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 4674e: 223c 0000 0700 movel #1792,%d1 46754: 40c2 movew %sr,%d2 46756: 8282 orl %d2,%d1 46758: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 4675a: 2040 moveal %d0,%a0 4675c: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 46760: b0b9 0006 14aa cmpl 614aa <_Per_CPU_Information+0xc>,%d0 46766: 673a beqs 467a2 <_Event_Timeout+0x72> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 46768: 7606 moveq #6,%d3 4676a: 2040 moveal %d0,%a0 4676c: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 46770: 46c2 movew %d2,%sr 46772: 2f3c 1003 fff8 movel #268697592,%sp@- 46778: 2f00 movel %d0,%sp@- 4677a: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; return _Thread_Dispatch_disable_level; 46780: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 46782: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 46788: 5380 subql #1,%d0 4678a: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 46790: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 46796: 242e fff4 movel %fp@(-12),%d2 4679a: 262e fff8 movel %fp@(-8),%d3 4679e: 4e5e unlk %fp 467a0: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 467a2: 2239 0006 1884 movel 61884 <_Event_Sync_state>,%d1 467a8: 7601 moveq #1,%d3 467aa: b681 cmpl %d1,%d3 467ac: 66ba bnes 46768 <_Event_Timeout+0x38> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 467ae: 7606 moveq #6,%d3 467b0: 2040 moveal %d0,%a0 #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 467b2: 7202 moveq #2,%d1 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 467b4: 2143 0034 movel %d3,%a0@(52) #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 467b8: 23c1 0006 1884 movel %d1,61884 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); 467be: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 467c0: 2f3c 1003 fff8 movel #268697592,%sp@- 467c6: 2f00 movel %d0,%sp@- 467c8: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; return _Thread_Dispatch_disable_level; 467ce: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 467d0: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 467d6: 5380 subql #1,%d0 467d8: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 467de: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 467e4: 60b0 bras 46796 <_Event_Timeout+0x66> ... =============================================================================== 0004ce00 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4ce00: 4e56 ffcc linkw %fp,#-52 4ce04: 226e 000c moveal %fp@(12),%a1 4ce08: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4ce0c: 246e 0008 moveal %fp@(8),%a2 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 4ce10: 2c09 movel %a1,%d6 4ce12: 5886 addql #4,%d6 - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 4ce14: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4ce18: 222e 0010 movel %fp@(16),%d1 4ce1c: 282e 0014 movel %fp@(20),%d4 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 4ce20: 2d40 fffc movel %d0,%fp@(-4) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 4ce24: bc89 cmpl %a1,%d6 4ce26: 6500 0148 bcsw 4cf70 <_Heap_Allocate_aligned_with_boundary+0x170> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4ce2a: 4a84 tstl %d4 4ce2c: 670c beqs 4ce3a <_Heap_Allocate_aligned_with_boundary+0x3a> if ( boundary < alloc_size ) { 4ce2e: b889 cmpl %a1,%d4 4ce30: 6500 013e bcsw 4cf70 <_Heap_Allocate_aligned_with_boundary+0x170> return NULL; } if ( alignment == 0 ) { 4ce34: 4a81 tstl %d1 4ce36: 6602 bnes 4ce3a <_Heap_Allocate_aligned_with_boundary+0x3a> alignment = page_size; 4ce38: 2200 movel %d0,%d1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4ce3a: 206a 0008 moveal %a2@(8),%a0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4ce3e: 4283 clrl %d3 4ce40: b1ca cmpal %a2,%a0 4ce42: 6732 beqs 4ce76 <_Heap_Allocate_aligned_with_boundary+0x76> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4ce44: 242e fffc movel %fp@(-4),%d2 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4ce48: 7a04 moveq #4,%d5 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4ce4a: 5e82 addql #7,%d2 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4ce4c: 9a89 subl %a1,%d5 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4ce4e: 2d42 fff8 movel %d2,%fp@(-8) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4ce52: 2d45 fff4 movel %d5,%fp@(-12) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4ce56: 2028 0004 movel %a0@(4),%d0 4ce5a: b086 cmpl %d6,%d0 4ce5c: 6330 blss 4ce8e <_Heap_Allocate_aligned_with_boundary+0x8e> if ( alignment == 0 ) { 4ce5e: 4a81 tstl %d1 4ce60: 6638 bnes 4ce9a <_Heap_Allocate_aligned_with_boundary+0x9a> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4ce62: 2408 movel %a0,%d2 4ce64: 5082 addql #8,%d2 ); } } /* Statistics */ ++search_count; 4ce66: 5283 addql #1,%d3 if ( alloc_begin != 0 ) { 4ce68: 4a82 tstl %d2 4ce6a: 6600 00e6 bnew 4cf52 <_Heap_Allocate_aligned_with_boundary+0x152> break; } block = block->next; 4ce6e: 2068 0008 moveal %a0@(8),%a0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4ce72: b1ca cmpal %a2,%a0 4ce74: 66e0 bnes 4ce56 <_Heap_Allocate_aligned_with_boundary+0x56> 4ce76: 4282 clrl %d2 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 4ce78: b6aa 0044 cmpl %a2@(68),%d3 4ce7c: 6304 blss 4ce82 <_Heap_Allocate_aligned_with_boundary+0x82> stats->max_search = search_count; 4ce7e: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; 4ce82: 2002 movel %d2,%d0 } 4ce84: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4ce8a: 4e5e unlk %fp 4ce8c: 4e75 rts if ( alloc_begin != 0 ) { break; } block = block->next; 4ce8e: 2068 0008 moveal %a0@(8),%a0 ); } } /* Statistics */ ++search_count; 4ce92: 5283 addql #1,%d3 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4ce94: b1ca cmpal %a2,%a0 4ce96: 66be bnes 4ce56 <_Heap_Allocate_aligned_with_boundary+0x56> 4ce98: 60dc bras 4ce76 <_Heap_Allocate_aligned_with_boundary+0x76> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4ce9a: 7efe moveq #-2,%d7 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4ce9c: 4be8 0008 lea %a0@(8),%a5 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4cea0: c087 andl %d7,%d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4cea2: 286a 0014 moveal %a2@(20),%a4 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4cea6: d088 addl %a0,%d0 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4cea8: 2a2e fff8 movel %fp@(-8),%d5 4ceac: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 4ceae: 242e fff4 movel %fp@(-12),%d2 4ceb2: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4ceb4: 2e02 movel %d2,%d7 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4ceb6: d085 addl %d5,%d0 4ceb8: 4c41 7005 remul %d1,%d5,%d7 4cebc: 9485 subl %d5,%d2 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4cebe: b480 cmpl %d0,%d2 4cec0: 630a blss 4cecc <_Heap_Allocate_aligned_with_boundary+0xcc> 4cec2: 2a00 movel %d0,%d5 4cec4: 4c41 5002 remul %d1,%d2,%d5 4cec8: 9082 subl %d2,%d0 4ceca: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4cecc: 4a84 tstl %d4 4cece: 6756 beqs 4cf26 <_Heap_Allocate_aligned_with_boundary+0x126> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4ced0: 2002 movel %d2,%d0 4ced2: d089 addl %a1,%d0 4ced4: 2e00 movel %d0,%d7 4ced6: 4c44 7005 remul %d4,%d5,%d7 4ceda: 2e00 movel %d0,%d7 4cedc: 9e85 subl %d5,%d7 4cede: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4cee0: be82 cmpl %d2,%d7 4cee2: 6342 blss 4cf26 <_Heap_Allocate_aligned_with_boundary+0x126> 4cee4: be80 cmpl %d0,%d7 4cee6: 643e bccs 4cf26 <_Heap_Allocate_aligned_with_boundary+0x126> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4cee8: 2e0d movel %a5,%d7 4ceea: de89 addl %a1,%d7 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4ceec: ba87 cmpl %d7,%d5 4ceee: 652a bcss 4cf1a <_Heap_Allocate_aligned_with_boundary+0x11a> 4cef0: 2647 moveal %d7,%a3 return 0; } alloc_begin = boundary_line - alloc_size; 4cef2: 2405 movel %d5,%d2 4cef4: 9489 subl %a1,%d2 4cef6: 2a02 movel %d2,%d5 4cef8: 4c41 5000 remul %d1,%d0,%d5 4cefc: 9480 subl %d0,%d2 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4cefe: 2002 movel %d2,%d0 4cf00: d089 addl %a1,%d0 4cf02: 2e00 movel %d0,%d7 4cf04: 4c44 7005 remul %d4,%d5,%d7 4cf08: 2e00 movel %d0,%d7 4cf0a: 9e85 subl %d5,%d7 4cf0c: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4cf0e: be82 cmpl %d2,%d7 4cf10: 6314 blss 4cf26 <_Heap_Allocate_aligned_with_boundary+0x126> 4cf12: be80 cmpl %d0,%d7 4cf14: 6410 bccs 4cf26 <_Heap_Allocate_aligned_with_boundary+0x126> if ( boundary_line < boundary_floor ) { 4cf16: ba8b cmpl %a3,%d5 4cf18: 64d8 bccs 4cef2 <_Heap_Allocate_aligned_with_boundary+0xf2><== ALWAYS TAKEN if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; 4cf1a: 4282 clrl %d2 ); } } /* Statistics */ ++search_count; 4cf1c: 5283 addql #1,%d3 if ( alloc_begin != 0 ) { 4cf1e: 4a82 tstl %d2 4cf20: 6700 ff4c beqw 4ce6e <_Heap_Allocate_aligned_with_boundary+0x6e> 4cf24: 602c bras 4cf52 <_Heap_Allocate_aligned_with_boundary+0x152><== NOT EXECUTED boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 4cf26: b48d cmpl %a5,%d2 4cf28: 65f0 bcss 4cf1a <_Heap_Allocate_aligned_with_boundary+0x11a> 4cf2a: 70f8 moveq #-8,%d0 4cf2c: 9088 subl %a0,%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4cf2e: 2a40 moveal %d0,%a5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4cf30: 2e02 movel %d2,%d7 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4cf32: dbc2 addal %d2,%a5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4cf34: 202e fffc movel %fp@(-4),%d0 4cf38: 4c40 7005 remul %d0,%d5,%d7 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 4cf3c: 9bc5 subal %d5,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4cf3e: bbcc cmpal %a4,%a5 4cf40: 6400 ff24 bccw 4ce66 <_Heap_Allocate_aligned_with_boundary+0x66> return alloc_begin; } } return 0; 4cf44: 4a8d tstl %a5 4cf46: 57c0 seq %d0 ); } } /* Statistics */ ++search_count; 4cf48: 5283 addql #1,%d3 if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; 4cf4a: 49c0 extbl %d0 4cf4c: c480 andl %d0,%d2 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 4cf4e: 6700 ff1e beqw 4ce6e <_Heap_Allocate_aligned_with_boundary+0x6e> if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4cf52: 2f09 movel %a1,%sp@- search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 4cf54: 52aa 0048 addql #1,%a2@(72) stats->searches += search_count; 4cf58: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4cf5c: 2f02 movel %d2,%sp@- 4cf5e: 2f08 movel %a0,%sp@- 4cf60: 2f0a movel %a2,%sp@- 4cf62: 4eb9 0004 7dac jsr 47dac <_Heap_Block_allocate> 4cf68: 4fef 0010 lea %sp@(16),%sp 4cf6c: 6000 ff0a braw 4ce78 <_Heap_Allocate_aligned_with_boundary+0x78> return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; 4cf70: 4280 clrl %d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4cf72: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4cf78: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cf30 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 4cf30: 4e56 ffcc linkw %fp,#-52 4cf34: 202e 0010 movel %fp@(16),%d0 4cf38: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4cf3c: 246e 0008 moveal %fp@(8),%a2 4cf40: 242e 000c movel %fp@(12),%d2 Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; 4cf44: 2602 movel %d2,%d3 4cf46: d680 addl %d0,%d3 uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 4cf48: 2a2a 0020 movel %a2@(32),%d5 Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; 4cf4c: 282a 0010 movel %a2@(16),%d4 uintptr_t const min_block_size = heap->min_block_size; 4cf50: 222a 0014 movel %a2@(20),%d1 uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 4cf54: 2c2a 0030 movel %a2@(48),%d6 Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 4cf58: 42ae fff8 clrl %fp@(-8) Heap_Block *extend_last_block = NULL; 4cf5c: 42ae fffc clrl %fp@(-4) uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 4cf60: b682 cmpl %d2,%d3 4cf62: 640c bccs 4cf70 <_Heap_Extend+0x40> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4cf64: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 4cf6a: 4200 clrb %d0 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4cf6c: 4e5e unlk %fp 4cf6e: 4e75 rts if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 4cf70: 486e fffc pea %fp@(-4) 4cf74: 486e fff8 pea %fp@(-8) 4cf78: 2f01 movel %d1,%sp@- 4cf7a: 2f04 movel %d4,%sp@- 4cf7c: 2f00 movel %d0,%sp@- 4cf7e: 2f02 movel %d2,%sp@- 4cf80: 4eb9 0004 7bd0 jsr 47bd0 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 4cf86: 4fef 0018 lea %sp@(24),%sp 4cf8a: 4a00 tstb %d0 4cf8c: 67d6 beqs 4cf64 <_Heap_Extend+0x34> 4cf8e: 2045 moveal %d5,%a0 4cf90: 9bcd subal %a5,%a5 4cf92: 97cb subal %a3,%a3 4cf94: 99cc subal %a4,%a4 4cf96: 42ae fff4 clrl %fp@(-12) return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4cf9a: ba88 cmpl %a0,%d5 4cf9c: 6700 0148 beqw 4d0e6 <_Heap_Extend+0x1b6> 4cfa0: 2208 movel %a0,%d1 uintptr_t const sub_area_end = start_block->prev_size; 4cfa2: 2010 movel %a0@,%d0 Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 4cfa4: b082 cmpl %d2,%d0 4cfa6: 6304 blss 4cfac <_Heap_Extend+0x7c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 4cfa8: b681 cmpl %d1,%d3 4cfaa: 62b8 bhis 4cf64 <_Heap_Extend+0x34> <== NEVER TAKEN ) { return false; } if ( extend_area_end == sub_area_begin ) { 4cfac: b681 cmpl %d1,%d3 4cfae: 6700 0130 beqw 4d0e0 <_Heap_Extend+0x1b0> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4cfb2: b083 cmpl %d3,%d0 4cfb4: 6304 blss 4cfba <_Heap_Extend+0x8a> 4cfb6: 2d48 fff4 movel %a0,%fp@(-12) 4cfba: 2e00 movel %d0,%d7 4cfbc: 2240 moveal %d0,%a1 4cfbe: 5189 subql #8,%a1 4cfc0: 4c44 7001 remul %d4,%d1,%d7 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4cfc4: 93c1 subal %d1,%a1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 4cfc6: b480 cmpl %d0,%d2 4cfc8: 6700 00fe beqw 4d0c8 <_Heap_Extend+0x198> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 4cfcc: b082 cmpl %d2,%d0 4cfce: 6402 bccs 4cfd2 <_Heap_Extend+0xa2> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4cfd0: 2a49 moveal %a1,%a5 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4cfd2: 70fe moveq #-2,%d0 4cfd4: c0a9 0004 andl %a1@(4),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4cfd8: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 4cfdc: b1c5 cmpal %d5,%a0 4cfde: 66ba bnes 4cf9a <_Heap_Extend+0x6a> if ( extend_area_begin < heap->area_begin ) { 4cfe0: b4aa 0018 cmpl %a2@(24),%d2 4cfe4: 6500 0108 bcsw 4d0ee <_Heap_Extend+0x1be> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 4cfe8: b6aa 001c cmpl %a2@(28),%d3 4cfec: 6304 blss 4cff2 <_Heap_Extend+0xc2> heap->area_end = extend_area_end; 4cfee: 2543 001c movel %d3,%a2@(28) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4cff2: 226e fffc moveal %fp@(-4),%a1 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4cff6: 2009 movel %a1,%d0 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4cff8: 7201 moveq #1,%d1 } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4cffa: 206e fff8 moveal %fp@(-8),%a0 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4cffe: 9088 subl %a0,%d0 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4d000: 8280 orl %d0,%d1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 4d002: 2083 movel %d3,%a0@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4d004: 2141 0004 movel %d1,%a0@(4) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 4d008: 2280 movel %d0,%a1@ extend_last_block->size_and_flag = 0; 4d00a: 42a9 0004 clrl %a1@(4) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4d00e: b1ea 0020 cmpal %a2@(32),%a0 4d012: 6400 0102 bccw 4d116 <_Heap_Extend+0x1e6> heap->first_block = extend_first_block; 4d016: 2548 0020 movel %a0,%a2@(32) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 4d01a: 4a8c tstl %a4 4d01c: 6700 0146 beqw 4d164 <_Heap_Extend+0x234> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 4d020: 202a 0010 movel %a2@(16),%d0 uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 4d024: 5082 addql #8,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 4d026: 2802 movel %d2,%d4 4d028: 4c40 4001 remul %d0,%d1,%d4 if ( remainder != 0 ) { 4d02c: 4a81 tstl %d1 4d02e: 6704 beqs 4d034 <_Heap_Extend+0x104> return value - remainder + alignment; 4d030: d480 addl %d0,%d2 4d032: 9481 subl %d1,%d2 uintptr_t const new_first_block_begin = 4d034: 2042 moveal %d2,%a0 4d036: 5188 subql #8,%a0 new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 4d038: 200c movel %a4,%d0 4d03a: 9088 subl %a0,%d0 first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4d03c: 7201 moveq #1,%d1 4d03e: 8280 orl %d0,%d1 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 4d040: 2094 movel %a4@,%a0@ new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4d042: 2141 0004 movel %d1,%a0@(4) _Heap_Free_block( heap, new_first_block ); 4d046: 2f08 movel %a0,%sp@- 4d048: 2f0a movel %a2,%sp@- 4d04a: 4eba fec8 jsr %pc@(4cf14 <_Heap_Free_block>) 4d04e: 508f addql #8,%sp link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 4d050: 4a8b tstl %a3 4d052: 6700 00d2 beqw 4d126 <_Heap_Extend+0x1f6> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, 4d056: 5183 subql #8,%d3 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 4d058: 968b subl %a3,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4d05a: 2203 movel %d3,%d1 4d05c: 4c6a 1000 0010 remul %a2@(16),%d0,%d1 Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; 4d062: 7201 moveq #1,%d1 4d064: 9680 subl %d0,%d3 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 4d066: 202b 0004 movel %a3@(4),%d0 4d06a: 9083 subl %d3,%d0 | HEAP_PREV_BLOCK_USED; 4d06c: 8280 orl %d0,%d1 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4d06e: 7001 moveq #1,%d0 4d070: 2781 3804 movel %d1,%a3@(00000004,%d3:l) 4d074: c0ab 0004 andl %a3@(4),%d0 block->size_and_flag = size | flag; 4d078: 8680 orl %d0,%d3 4d07a: 2743 0004 movel %d3,%a3@(4) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 4d07e: 2f0b movel %a3,%sp@- 4d080: 2f0a movel %a2,%sp@- 4d082: 4eba fe90 jsr %pc@(4cf14 <_Heap_Free_block>) 4d086: 508f addql #8,%sp extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4d088: 4a8c tstl %a4 4d08a: 6700 00c2 beqw 4d14e <_Heap_Extend+0x21e> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4d08e: 206a 0024 moveal %a2@(36),%a0 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4d092: 7201 moveq #1,%d1 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 4d094: 202a 0020 movel %a2@(32),%d0 4d098: 9088 subl %a0,%d0 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4d09a: c2a8 0004 andl %a0@(4),%d1 block->size_and_flag = size | flag; 4d09e: 8280 orl %d0,%d1 4d0a0: 2141 0004 movel %d1,%a0@(4) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 4d0a4: 222a 0030 movel %a2@(48),%d1 4d0a8: 9286 subl %d6,%d1 /* Statistics */ stats->size += extended_size; 4d0aa: d3aa 002c addl %d1,%a2@(44) if ( extended_size_ptr != NULL ) 4d0ae: 4aae 0014 tstl %fp@(20) 4d0b2: 6700 00ca beqw 4d17e <_Heap_Extend+0x24e> *extended_size_ptr = extended_size; 4d0b6: 206e 0014 moveal %fp@(20),%a0 return true; } 4d0ba: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 4d0c0: 7001 moveq #1,%d0 /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; 4d0c2: 2081 movel %d1,%a0@ return true; } 4d0c4: 4e5e unlk %fp 4d0c6: 4e75 rts - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4d0c8: 70fe moveq #-2,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4d0ca: 2649 moveal %a1,%a3 } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { start_block->prev_size = extend_area_end; 4d0cc: 2083 movel %d3,%a0@ - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4d0ce: c0a9 0004 andl %a1@(4),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4d0d2: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 4d0d6: b1c5 cmpal %d5,%a0 4d0d8: 6600 fec0 bnew 4cf9a <_Heap_Extend+0x6a> 4d0dc: 6000 ff02 braw 4cfe0 <_Heap_Extend+0xb0> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 4d0e0: 2848 moveal %a0,%a4 4d0e2: 6000 fed6 braw 4cfba <_Heap_Extend+0x8a> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4d0e6: 222a 0018 movel %a2@(24),%d1 4d0ea: 6000 feb6 braw 4cfa2 <_Heap_Extend+0x72> } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4d0ee: 226e fffc moveal %fp@(-4),%a1 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4d0f2: 2009 movel %a1,%d0 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4d0f4: 7201 moveq #1,%d1 } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4d0f6: 206e fff8 moveal %fp@(-8),%a0 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4d0fa: 9088 subl %a0,%d0 start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; 4d0fc: 2542 0018 movel %d2,%a2@(24) extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4d100: 8280 orl %d0,%d1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 4d102: 2083 movel %d3,%a0@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4d104: 2141 0004 movel %d1,%a0@(4) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 4d108: 2280 movel %d0,%a1@ extend_last_block->size_and_flag = 0; 4d10a: 42a9 0004 clrl %a1@(4) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4d10e: b1ea 0020 cmpal %a2@(32),%a0 4d112: 6500 ff02 bcsw 4d016 <_Heap_Extend+0xe6> heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 4d116: b3ea 0024 cmpal %a2@(36),%a1 4d11a: 6300 fefe blsw 4d01a <_Heap_Extend+0xea> heap->last_block = extend_last_block; 4d11e: 2549 0024 movel %a1,%a2@(36) 4d122: 6000 fef6 braw 4d01a <_Heap_Extend+0xea> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 4d126: 4a8d tstl %a5 4d128: 6700 ff5e beqw 4d088 <_Heap_Extend+0x158> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4d12c: 7201 moveq #1,%d1 ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 4d12e: 202e fff8 movel %fp@(-8),%d0 4d132: 908d subl %a5,%d0 4d134: c2ad 0004 andl %a5@(4),%d1 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( 4d138: 206e fffc moveal %fp@(-4),%a0 block->size_and_flag = size | flag; 4d13c: 8280 orl %d0,%d1 uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 4d13e: 7001 moveq #1,%d0 4d140: 2b41 0004 movel %d1,%a5@(4) 4d144: 81a8 0004 orl %d0,%a0@(4) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4d148: 4a8c tstl %a4 4d14a: 6600 ff42 bnew 4d08e <_Heap_Extend+0x15e> 4d14e: 4a8b tstl %a3 4d150: 6600 ff3c bnew 4d08e <_Heap_Extend+0x15e> _Heap_Free_block( heap, extend_first_block ); 4d154: 2f2e fff8 movel %fp@(-8),%sp@- 4d158: 2f0a movel %a2,%sp@- 4d15a: 4eba fdb8 jsr %pc@(4cf14 <_Heap_Free_block>) 4d15e: 508f addql #8,%sp 4d160: 6000 ff2c braw 4d08e <_Heap_Extend+0x15e> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 4d164: 4aae fff4 tstl %fp@(-12) 4d168: 6700 fee6 beqw 4d050 <_Heap_Extend+0x120> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 4d16c: 202e fff4 movel %fp@(-12),%d0 4d170: 7201 moveq #1,%d1 4d172: 9089 subl %a1,%d0 4d174: 8280 orl %d0,%d1 4d176: 2341 0004 movel %d1,%a1@(4) 4d17a: 6000 fed4 braw 4d050 <_Heap_Extend+0x120> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4d17e: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 4d184: 7001 moveq #1,%d0 <== NOT EXECUTED } 4d186: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004cf7c <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4cf7c: 4e56 ffe8 linkw %fp,#-24 4cf80: 206e 0008 moveal %fp@(8),%a0 4cf84: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4cf88: 202e 000c movel %fp@(12),%d0 /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { 4cf8c: 6700 00f2 beqw 4d080 <_Heap_Free+0x104> 4cf90: 2240 moveal %d0,%a1 4cf92: 5189 subql #8,%a1 4cf94: 4c68 0001 0010 remul %a0@(16),%d1,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4cf9a: 2028 0020 movel %a0@(32),%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4cf9e: 93c1 subal %d1,%a1 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4cfa0: b089 cmpl %a1,%d0 4cfa2: 6200 0098 bhiw 4d03c <_Heap_Free+0xc0> 4cfa6: 2228 0024 movel %a0@(36),%d1 4cfaa: b289 cmpl %a1,%d1 4cfac: 6500 008e bcsw 4d03c <_Heap_Free+0xc0> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4cfb0: 2629 0004 movel %a1@(4),%d3 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4cfb4: 74fe moveq #-2,%d2 4cfb6: c483 andl %d3,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4cfb8: 45f1 2800 lea %a1@(00000000,%d2:l),%a2 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4cfbc: b5c0 cmpal %d0,%a2 4cfbe: 657c bcss 4d03c <_Heap_Free+0xc0> <== NEVER TAKEN 4cfc0: b5c1 cmpal %d1,%a2 4cfc2: 6278 bhis 4d03c <_Heap_Free+0xc0> <== NEVER TAKEN 4cfc4: 282a 0004 movel %a2@(4),%d4 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 4cfc8: 0804 0000 btst #0,%d4 4cfcc: 676e beqs 4d03c <_Heap_Free+0xc0> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4cfce: 7afe moveq #-2,%d5 4cfd0: c885 andl %d5,%d4 return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4cfd2: b5c1 cmpal %d1,%a2 4cfd4: 6700 00fa beqw 4d0d0 <_Heap_Free+0x154> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4cfd8: 7a01 moveq #1,%d5 4cfda: cab2 4804 andl %a2@(00000004,%d4:l),%d5 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4cfde: 57c5 seq %d5 4cfe0: 4485 negl %d5 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4cfe2: 0803 0000 btst #0,%d3 4cfe6: 665e bnes 4d046 <_Heap_Free+0xca> uintptr_t const prev_size = block->prev_size; 4cfe8: 2611 movel %a1@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4cfea: 93c3 subal %d3,%a1 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4cfec: b3c0 cmpal %d0,%a1 4cfee: 654c bcss 4d03c <_Heap_Free+0xc0> <== NEVER TAKEN 4cff0: b3c1 cmpal %d1,%a1 4cff2: 6248 bhis 4d03c <_Heap_Free+0xc0> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4cff4: 7001 moveq #1,%d0 4cff6: c0a9 0004 andl %a1@(4),%d0 return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 4cffa: 6740 beqs 4d03c <_Heap_Free+0xc0> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4cffc: 4a05 tstb %d5 4cffe: 6700 00d6 beqw 4d0d6 <_Heap_Free+0x15a> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4d002: 266a 0008 moveal %a2@(8),%a3 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4d006: d682 addl %d2,%d3 4d008: d883 addl %d3,%d4 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d00a: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4d00c: 246a 000c moveal %a2@(12),%a2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4d010: 254b 0008 movel %a3,%a2@(8) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d014: 8084 orl %d4,%d0 next->prev = prev; 4d016: 274a 000c movel %a2,%a3@(12) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 4d01a: 53a8 0038 subql #1,%a0@(56) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4d01e: 2384 4800 movel %d4,%a1@(00000000,%d4:l) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d022: 2340 0004 movel %d0,%a1@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4d026: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4d02a: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4d02e: d5a8 0030 addl %d2,%a0@(48) return( true ); 4d032: 7001 moveq #1,%d0 } 4d034: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4d038: 4e5e unlk %fp 4d03a: 4e75 rts 4d03c: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { _HAssert( false ); return( false ); 4d040: 4200 clrb %d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4d042: 4e5e unlk %fp 4d044: 4e75 rts uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4d046: 4a05 tstb %d5 4d048: 673a beqs 4d084 <_Heap_Free+0x108> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4d04a: 266a 0008 moveal %a2@(8),%a3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; 4d04e: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d050: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4d052: 246a 000c moveal %a2@(12),%a2 next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d056: 8084 orl %d4,%d0 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4d058: 234b 0008 movel %a3,%a1@(8) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4d05c: 2384 4800 movel %d4,%a1@(00000000,%d4:l) new_block->prev = prev; 4d060: 234a 000c movel %a2,%a1@(12) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d064: 2340 0004 movel %d0,%a1@(4) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4d068: 7001 moveq #1,%d0 next->prev = new_block; prev->next = new_block; 4d06a: 2549 0008 movel %a1,%a2@(8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 4d06e: 2749 000c movel %a1,%a3@(12) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4d072: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4d076: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4d07a: d5a8 0030 addl %d2,%a0@(48) 4d07e: 60b4 bras 4d034 <_Heap_Free+0xb8> * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; 4d080: 7001 moveq #1,%d0 4d082: 60b0 bras 4d034 <_Heap_Free+0xb8> block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4d084: 2028 0038 movel %a0@(56),%d0 next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4d088: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4d08a: 7afe moveq #-2,%d5 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4d08c: 5280 addql #1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4d08e: 2668 0008 moveal %a0@(8),%a3 new_block->next = next; new_block->prev = block_before; 4d092: 2348 000c movel %a0,%a1@(12) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4d096: 8282 orl %d2,%d1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 4d098: 234b 0008 movel %a3,%a1@(8) 4d09c: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4d0a0: cbaa 0004 andl %d5,%a2@(4) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 4d0a4: 2749 000c movel %a1,%a3@(12) next_block->prev_size = block_size; 4d0a8: 2482 movel %d2,%a2@ { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4d0aa: 2149 0008 movel %a1,%a0@(8) /* Statistics */ ++stats->free_blocks; 4d0ae: 2140 0038 movel %d0,%a0@(56) if ( stats->max_free_blocks < stats->free_blocks ) { 4d0b2: b0a8 003c cmpl %a0@(60),%d0 4d0b6: 6300 ff6e blsw 4d026 <_Heap_Free+0xaa> stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4d0ba: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4d0be: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4d0c2: d5a8 0030 addl %d2,%a0@(48) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 4d0c6: 2140 003c movel %d0,%a0@(60) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4d0ca: 7001 moveq #1,%d0 4d0cc: 6000 ff66 braw 4d034 <_Heap_Free+0xb8> return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4d0d0: 4205 clrb %d5 4d0d2: 6000 ff0e braw 4cfe2 <_Heap_Free+0x66> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 4d0d6: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d0d8: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4d0da: 7afe moveq #-2,%d5 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d0dc: 8283 orl %d3,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4d0de: 2483 movel %d3,%a2@ /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4d0e0: 7001 moveq #1,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d0e2: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4d0e6: cbaa 0004 andl %d5,%a2@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4d0ea: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4d0ee: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4d0f2: d5a8 0030 addl %d2,%a0@(48) 4d0f6: 6000 ff3c braw 4d034 <_Heap_Free+0xb8> ... =============================================================================== 0004d99c <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 4d99c: 4e56 fff0 linkw %fp,#-16 4d9a0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4d9a4: 246e 0008 moveal %fp@(8),%a2 4d9a8: 282e 000c movel %fp@(12),%d4 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); 4d9ac: 2044 moveal %d4,%a0 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 4d9ae: 226a 0020 moveal %a2@(32),%a1 Heap_Block *const end = the_heap->last_block; 4d9b2: 242a 0024 movel %a2@(36),%d2 memset(the_info, 0, sizeof(*the_info)); 4d9b6: 4298 clrl %a0@+ 4d9b8: 4298 clrl %a0@+ 4d9ba: 4298 clrl %a0@+ 4d9bc: 4298 clrl %a0@+ 4d9be: 4298 clrl %a0@+ 4d9c0: 4290 clrl %a0@ while ( the_block != end ) { 4d9c2: b489 cmpl %a1,%d2 4d9c4: 6734 beqs 4d9fa <_Heap_Get_information+0x5e> <== NEVER TAKEN uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 4d9c6: 2604 movel %d4,%d3 4d9c8: 0683 0000 000c addil #12,%d3 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 4d9ce: 2229 0004 movel %a1@(4),%d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4d9d2: 70fe moveq #-2,%d0 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 4d9d4: 2043 moveal %d3,%a0 4d9d6: c081 andl %d1,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4d9d8: d3c0 addal %d0,%a1 if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 4d9da: 2229 0004 movel %a1@(4),%d1 while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 4d9de: 0801 0000 btst #0,%d1 4d9e2: 6602 bnes 4d9e6 <_Heap_Get_information+0x4a> info = &the_info->Used; else info = &the_info->Free; 4d9e4: 2044 moveal %d4,%a0 info->number++; 4d9e6: 5290 addql #1,%a0@ info->total += the_size; 4d9e8: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 4d9ec: b0a8 0004 cmpl %a0@(4),%d0 4d9f0: 6304 blss 4d9f6 <_Heap_Get_information+0x5a> info->largest = the_size; 4d9f2: 2140 0004 movel %d0,%a0@(4) Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 4d9f6: b3c2 cmpal %d2,%a1 4d9f8: 66d8 bnes 4d9d2 <_Heap_Get_information+0x36> if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 4d9fa: 4cd7 041c moveml %sp@,%d2-%d4/%a2 4d9fe: 4e5e unlk %fp ... =============================================================================== 0005d654 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5d654: 4e56 0000 linkw %fp,#0 5d658: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 5d65c: 2040 moveal %d0,%a0 5d65e: 5188 subql #8,%a0 5d660: 226e 0008 moveal %fp@(8),%a1 5d664: 2f02 movel %d2,%sp@- 5d666: 2400 movel %d0,%d2 5d668: 4c69 2001 0010 remul %a1@(16),%d1,%d2 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 5d66e: 91c1 subal %d1,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 5d670: 2229 0020 movel %a1@(32),%d1 && (uintptr_t) block <= (uintptr_t) heap->last_block; 5d674: b288 cmpl %a0,%d1 5d676: 6238 bhis 5d6b0 <_Heap_Size_of_alloc_area+0x5c> 5d678: 2269 0024 moveal %a1@(36),%a1 5d67c: b3c8 cmpal %a0,%a1 5d67e: 6530 bcss 5d6b0 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 5d680: 74fe moveq #-2,%d2 5d682: c4a8 0004 andl %a0@(4),%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5d686: 41f0 2800 lea %a0@(00000000,%d2:l),%a0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 5d68a: b1c1 cmpal %d1,%a0 5d68c: 6522 bcss 5d6b0 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN 5d68e: b1c9 cmpal %a1,%a0 5d690: 621e bhis 5d6b0 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 5d692: 7201 moveq #1,%d1 5d694: c2a8 0004 andl %a0@(4),%d1 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 5d698: 6716 beqs 5d6b0 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5d69a: 7204 moveq #4,%d1 5d69c: 9280 subl %d0,%d1 5d69e: 2001 movel %d1,%d0 5d6a0: d088 addl %a0,%d0 5d6a2: 226e 0010 moveal %fp@(16),%a1 return true; } 5d6a6: 241f movel %sp@+,%d2 5d6a8: 4e5e unlk %fp || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5d6aa: 2280 movel %d0,%a1@ return true; 5d6ac: 7001 moveq #1,%d0 } 5d6ae: 4e75 rts 5d6b0: 241f movel %sp@+,%d2 5d6b2: 4e5e unlk %fp if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 5d6b4: 4200 clrb %d0 <== NOT EXECUTED } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } =============================================================================== 0004864a <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 4864a: 4e56 ffc4 linkw %fp,#-60 4864e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 48652: 246e 0008 moveal %fp@(8),%a2 uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 48656: 4bfa ff94 lea %pc@(485ec <_Heap_Walk_print_nothing>),%a5 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 4865a: 2a2e 000c movel %fp@(12),%d5 uintptr_t const page_size = heap->page_size; 4865e: 262a 0010 movel %a2@(16),%d3 uintptr_t const min_block_size = heap->min_block_size; 48662: 2c2a 0014 movel %a2@(20),%d6 Heap_Block *const first_block = heap->first_block; 48666: 282a 0020 movel %a2@(32),%d4 Heap_Block *const last_block = heap->last_block; 4866a: 2e2a 0024 movel %a2@(36),%d7 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 4866e: 4a2e 0013 tstb %fp@(19) 48672: 6704 beqs 48678 <_Heap_Walk+0x2e> 48674: 4bfa ff7e lea %pc@(485f4 <_Heap_Walk_print>),%a5 if ( !_System_state_Is_up( _System_state_Get() ) ) { 48678: 7003 moveq #3,%d0 4867a: b0b9 0006 3364 cmpl 63364 <_System_state_Current>,%d0 48680: 670c beqs 4868e <_Heap_Walk+0x44> block = next_block; } while ( block != first_block ); return true; } 48682: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 } block = next_block; } while ( block != first_block ); return true; 48688: 7001 moveq #1,%d0 } 4868a: 4e5e unlk %fp 4868c: 4e75 rts Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 4868e: 2f2a 000c movel %a2@(12),%sp@- 48692: 2f2a 0008 movel %a2@(8),%sp@- 48696: 2f07 movel %d7,%sp@- 48698: 2f04 movel %d4,%sp@- 4869a: 2f2a 001c movel %a2@(28),%sp@- 4869e: 2f2a 0018 movel %a2@(24),%sp@- 486a2: 2f06 movel %d6,%sp@- 486a4: 2f03 movel %d3,%sp@- 486a6: 4879 0005 f5eb pea 5f5eb <_Status_Object_name_errors_to_status+0x5d> 486ac: 42a7 clrl %sp@- 486ae: 2f05 movel %d5,%sp@- 486b0: 4e95 jsr %a5@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 486b2: 4fef 002c lea %sp@(44),%sp 486b6: 4a83 tstl %d3 486b8: 6700 0082 beqw 4873c <_Heap_Walk+0xf2> ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 486bc: 7003 moveq #3,%d0 486be: c083 andl %d3,%d0 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 486c0: 6600 0090 bnew 48752 <_Heap_Walk+0x108> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 486c4: 2206 movel %d6,%d1 486c6: 4c43 1000 remul %d3,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 486ca: 4a80 tstl %d0 486cc: 6600 00a4 bnew 48772 <_Heap_Walk+0x128> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 486d0: 2004 movel %d4,%d0 486d2: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 486d4: 4c43 0001 remul %d3,%d1,%d0 ); return false; } if ( 486d8: 4a81 tstl %d1 486da: 6600 00ae bnew 4878a <_Heap_Walk+0x140> block = next_block; } while ( block != first_block ); return true; } 486de: 2044 moveal %d4,%a0 486e0: 2228 0004 movel %a0@(4),%d1 486e4: 2d41 fff0 movel %d1,%fp@(-16) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 486e8: 0801 0000 btst #0,%d1 486ec: 6700 00b4 beqw 487a2 <_Heap_Walk+0x158> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 486f0: 2047 moveal %d7,%a0 486f2: 72fe moveq #-2,%d1 486f4: c2a8 0004 andl %a0@(4),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 486f8: d1c1 addal %d1,%a0 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 486fa: 7201 moveq #1,%d1 486fc: c2a8 0004 andl %a0@(4),%d1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 48700: 6724 beqs 48726 <_Heap_Walk+0xdc> ); return false; } if ( 48702: b1c4 cmpal %d4,%a0 48704: 6700 00b4 beqw 487ba <_Heap_Walk+0x170> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 48708: 4879 0005 f745 pea 5f745 <_Status_Object_name_errors_to_status+0x1b7> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 4870e: 4878 0001 pea 1 48712: 2f05 movel %d5,%sp@- 48714: 4e95 jsr %a5@ 48716: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4871a: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 4871c: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48722: 4e5e unlk %fp 48724: 4e75 rts return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 48726: 4879 0005 f730 pea 5f730 <_Status_Object_name_errors_to_status+0x1a2> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 4872c: 4878 0001 pea 1 48730: 2f05 movel %d5,%sp@- 48732: 4e95 jsr %a5@ 48734: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48738: 4200 clrb %d0 4873a: 60e0 bras 4871c <_Heap_Walk+0xd2> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 4873c: 4879 0005 f67c pea 5f67c <_Status_Object_name_errors_to_status+0xee> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 48742: 4878 0001 pea 1 48746: 2f05 movel %d5,%sp@- 48748: 4e95 jsr %a5@ 4874a: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4874e: 4200 clrb %d0 48750: 60ca bras 4871c <_Heap_Walk+0xd2> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 48752: 2f03 movel %d3,%sp@- 48754: 4879 0005 f68f pea 5f68f <_Status_Object_name_errors_to_status+0x101> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 4875a: 4878 0001 pea 1 4875e: 2f05 movel %d5,%sp@- 48760: 4e95 jsr %a5@ 48762: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48766: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48768: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4876e: 4e5e unlk %fp 48770: 4e75 rts return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 48772: 2f06 movel %d6,%sp@- 48774: 4879 0005 f6ad pea 5f6ad <_Status_Object_name_errors_to_status+0x11f> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 4877a: 4878 0001 pea 1 4877e: 2f05 movel %d5,%sp@- 48780: 4e95 jsr %a5@ 48782: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48786: 4200 clrb %d0 48788: 60de bras 48768 <_Heap_Walk+0x11e> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 4878a: 2f04 movel %d4,%sp@- 4878c: 4879 0005 f6d1 pea 5f6d1 <_Status_Object_name_errors_to_status+0x143> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 48792: 4878 0001 pea 1 48796: 2f05 movel %d5,%sp@- 48798: 4e95 jsr %a5@ 4879a: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4879e: 4200 clrb %d0 487a0: 60c6 bras 48768 <_Heap_Walk+0x11e> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 487a2: 4879 0005 f702 pea 5f702 <_Status_Object_name_errors_to_status+0x174> 487a8: 4878 0001 pea 1 487ac: 2f05 movel %d5,%sp@- 487ae: 4e95 jsr %a5@ 487b0: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 487b4: 4200 clrb %d0 487b6: 6000 ff64 braw 4871c <_Heap_Walk+0xd2> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 487ba: 202a 0010 movel %a2@(16),%d0 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 487be: 206a 0008 moveal %a2@(8),%a0 487c2: 2d40 fffc movel %d0,%fp@(-4) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 487c6: b1ca cmpal %a2,%a0 487c8: 6700 0316 beqw 48ae0 <_Heap_Walk+0x496> block = next_block; } while ( block != first_block ); return true; } 487cc: 242a 0020 movel %a2@(32),%d2 487d0: 2d42 fff4 movel %d2,%fp@(-12) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 487d4: b1c2 cmpal %d2,%a0 487d6: 6500 0090 bcsw 48868 <_Heap_Walk+0x21e> 487da: 266a 0024 moveal %a2@(36),%a3 487de: b7c8 cmpal %a0,%a3 487e0: 6500 0086 bcsw 48868 <_Heap_Walk+0x21e> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 487e4: 49e8 0008 lea %a0@(8),%a4 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 487e8: 200c movel %a4,%d0 487ea: 222e fffc movel %fp@(-4),%d1 487ee: 4c41 0002 remul %d1,%d2,%d0 ); return false; } if ( 487f2: 4a82 tstl %d2 487f4: 6600 00ae bnew 488a4 <_Heap_Walk+0x25a> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 487f8: 74fe moveq #-2,%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 487fa: 7001 moveq #1,%d0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 487fc: c4a8 0004 andl %a0@(4),%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 48800: c0b0 2804 andl %a0@(00000004,%d2:l),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 48804: 6648 bnes 4884e <_Heap_Walk+0x204> <== NEVER TAKEN 48806: 222e fff4 movel %fp@(-12),%d1 4880a: 224a moveal %a2,%a1 4880c: 2848 moveal %a0,%a4 4880e: 2d43 fff8 movel %d3,%fp@(-8) ); return false; } if ( free_block->prev != prev_block ) { 48812: 2428 000c movel %a0@(12),%d2 48816: b3c2 cmpal %d2,%a1 48818: 6668 bnes 48882 <_Heap_Walk+0x238> return false; } prev_block = free_block; free_block = free_block->next; 4881a: 2068 0008 moveal %a0@(8),%a0 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 4881e: b1ca cmpal %a2,%a0 48820: 6700 009c beqw 488be <_Heap_Walk+0x274> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 48824: b288 cmpl %a0,%d1 48826: 6240 bhis 48868 <_Heap_Walk+0x21e> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 48828: 2408 movel %a0,%d2 4882a: 5082 addql #8,%d2 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4882c: b7c8 cmpal %a0,%a3 4882e: 6538 bcss 48868 <_Heap_Walk+0x21e> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 48830: 202e fffc movel %fp@(-4),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 48834: 224c moveal %a4,%a1 48836: 2848 moveal %a0,%a4 48838: 4c40 2003 remul %d0,%d3,%d2 ); return false; } if ( 4883c: 4a83 tstl %d3 4883e: 6664 bnes 488a4 <_Heap_Walk+0x25a> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 48840: 74fe moveq #-2,%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 48842: 7001 moveq #1,%d0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 48844: c4a8 0004 andl %a0@(4),%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 48848: c0b0 2804 andl %a0@(00000004,%d2:l),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 4884c: 67c4 beqs 48812 <_Heap_Walk+0x1c8> (*printer)( 4884e: 2f08 movel %a0,%sp@- 48850: 4879 0005 f7c4 pea 5f7c4 <_Status_Object_name_errors_to_status+0x236> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 48856: 4878 0001 pea 1 4885a: 2f05 movel %d5,%sp@- 4885c: 4e95 jsr %a5@ 4885e: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48862: 4200 clrb %d0 48864: 6000 ff02 braw 48768 <_Heap_Walk+0x11e> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 48868: 2f08 movel %a0,%sp@- 4886a: 4879 0005 f774 pea 5f774 <_Status_Object_name_errors_to_status+0x1e6> 48870: 4878 0001 pea 1 48874: 2f05 movel %d5,%sp@- 48876: 4e95 jsr %a5@ 48878: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4887c: 4200 clrb %d0 4887e: 6000 fee8 braw 48768 <_Heap_Walk+0x11e> return false; } if ( free_block->prev != prev_block ) { (*printer)( 48882: 2f02 movel %d2,%sp@- 48884: 2f08 movel %a0,%sp@- 48886: 4879 0005 f7e0 pea 5f7e0 <_Status_Object_name_errors_to_status+0x252> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 4888c: 4878 0001 pea 1 48890: 2f05 movel %d5,%sp@- 48892: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 48894: 4fef 0014 lea %sp@(20),%sp 48898: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 4889a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 488a0: 4e5e unlk %fp 488a2: 4e75 rts } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 488a4: 2f08 movel %a0,%sp@- 488a6: 4879 0005 f794 pea 5f794 <_Status_Object_name_errors_to_status+0x206> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 488ac: 4878 0001 pea 1 488b0: 2f05 movel %d5,%sp@- 488b2: 4e95 jsr %a5@ 488b4: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 488b8: 4200 clrb %d0 488ba: 6000 feac braw 48768 <_Heap_Walk+0x11e> 488be: 262e fff8 movel %fp@(-8),%d3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 488c2: 2844 moveal %d4,%a4 488c4: 2d41 fff4 movel %d1,%fp@(-12) 488c8: 222e fff4 movel %fp@(-12),%d1 488cc: 2d43 fffc movel %d3,%fp@(-4) 488d0: 262e fff0 movel %fp@(-16),%d3 488d4: 2d47 ffec movel %d7,%fp@(-20) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 488d8: 74fe moveq #-2,%d2 488da: c483 andl %d3,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 488dc: 47f4 2800 lea %a4@(00000000,%d2:l),%a3 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 488e0: b7c1 cmpal %d1,%a3 488e2: 657e bcss 48962 <_Heap_Walk+0x318> <== NEVER TAKEN 488e4: b7ea 0024 cmpal %a2@(36),%a3 488e8: 6278 bhis 48962 <_Heap_Walk+0x318> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 488ea: b9ee ffec cmpal %fp@(-20),%a4 488ee: 56c1 sne %d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 488f0: 202e fffc movel %fp@(-4),%d0 488f4: 2e02 movel %d2,%d7 488f6: 3241 moveaw %d1,%a1 488f8: 4c40 7001 remul %d0,%d1,%d7 488fc: 2009 movel %a1,%d0 488fe: 4480 negl %d0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 48900: 4a81 tstl %d1 48902: 6704 beqs 48908 <_Heap_Walk+0x2be> 48904: 4a00 tstb %d0 48906: 6676 bnes 4897e <_Heap_Walk+0x334> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 48908: b486 cmpl %d6,%d2 4890a: 6406 bccs 48912 <_Heap_Walk+0x2c8> 4890c: 4a00 tstb %d0 4890e: 6600 008a bnew 4899a <_Heap_Walk+0x350> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 48912: b7cc cmpal %a4,%a3 48914: 6206 bhis 4891c <_Heap_Walk+0x2d2> 48916: 4a00 tstb %d0 48918: 6600 00a4 bnew 489be <_Heap_Walk+0x374> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4891c: 7001 moveq #1,%d0 4891e: 7e01 moveq #1,%d7 48920: c0ab 0004 andl %a3@(4),%d0 48924: c687 andl %d7,%d3 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 48926: 4a80 tstl %d0 48928: 6700 00ca beqw 489f4 <_Heap_Walk+0x3aa> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 4892c: 4a83 tstl %d3 4892e: 6700 00aa beqw 489da <_Heap_Walk+0x390> (*printer)( 48932: 2f02 movel %d2,%sp@- 48934: 2f0c movel %a4,%sp@- 48936: 4879 0005 f969 pea 5f969 <_Status_Object_name_errors_to_status+0x3db> 4893c: 42a7 clrl %sp@- 4893e: 2f05 movel %d5,%sp@- 48940: 4e95 jsr %a5@ 48942: 4fef 0014 lea %sp@(20),%sp block->prev_size ); } block = next_block; } while ( block != first_block ); 48946: b7c4 cmpal %d4,%a3 48948: 6700 fd38 beqw 48682 <_Heap_Walk+0x38> 4894c: 262b 0004 movel %a3@(4),%d3 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 48950: 74fe moveq #-2,%d2 48952: 284b moveal %a3,%a4 48954: c483 andl %d3,%d2 48956: 222a 0020 movel %a2@(32),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4895a: 47f4 2800 lea %a4@(00000000,%d2:l),%a3 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4895e: b7c1 cmpal %d1,%a3 48960: 6482 bccs 488e4 <_Heap_Walk+0x29a> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 48962: 2f0b movel %a3,%sp@- 48964: 2f0c movel %a4,%sp@- 48966: 4879 0005 f812 pea 5f812 <_Status_Object_name_errors_to_status+0x284> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 4896c: 4878 0001 pea 1 48970: 2f05 movel %d5,%sp@- 48972: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 48974: 4fef 0014 lea %sp@(20),%sp 48978: 4200 clrb %d0 4897a: 6000 ff1e braw 4889a <_Heap_Walk+0x250> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 4897e: 2f02 movel %d2,%sp@- 48980: 2f0c movel %a4,%sp@- 48982: 4879 0005 f83f pea 5f83f <_Status_Object_name_errors_to_status+0x2b1> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48988: 4878 0001 pea 1 4898c: 2f05 movel %d5,%sp@- 4898e: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 48990: 4fef 0014 lea %sp@(20),%sp 48994: 4200 clrb %d0 48996: 6000 ff02 braw 4889a <_Heap_Walk+0x250> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 4899a: 2f06 movel %d6,%sp@- 4899c: 2f02 movel %d2,%sp@- 4899e: 2f0c movel %a4,%sp@- 489a0: 4879 0005 f86d pea 5f86d <_Status_Object_name_errors_to_status+0x2df> 489a6: 4878 0001 pea 1 489aa: 2f05 movel %d5,%sp@- 489ac: 4e95 jsr %a5@ block, block_size, min_block_size ); return false; 489ae: 4fef 0018 lea %sp@(24),%sp block = next_block; } while ( block != first_block ); return true; } 489b2: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 block, block_size, min_block_size ); return false; 489b8: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 489ba: 4e5e unlk %fp 489bc: 4e75 rts return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 489be: 2f0b movel %a3,%sp@- 489c0: 2f0c movel %a4,%sp@- 489c2: 4879 0005 f898 pea 5f898 <_Status_Object_name_errors_to_status+0x30a> 489c8: 4878 0001 pea 1 489cc: 2f05 movel %d5,%sp@- 489ce: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 489d0: 4fef 0014 lea %sp@(20),%sp 489d4: 4200 clrb %d0 489d6: 6000 fec2 braw 4889a <_Heap_Walk+0x250> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 489da: 2f14 movel %a4@,%sp@- 489dc: 2f02 movel %d2,%sp@- 489de: 2f0c movel %a4,%sp@- 489e0: 4879 0005 f980 pea 5f980 <_Status_Object_name_errors_to_status+0x3f2> 489e6: 42a7 clrl %sp@- 489e8: 2f05 movel %d5,%sp@- 489ea: 4e95 jsr %a5@ 489ec: 4fef 0018 lea %sp@(24),%sp 489f0: 6000 ff54 braw 48946 <_Heap_Walk+0x2fc> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 489f4: 2e2a 0008 movel %a2@(8),%d7 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 489f8: 43f9 0005 f5b8 lea 5f5b8 <_Status_Object_name_errors_to_status+0x2a>,%a1 block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 489fe: 222c 0008 movel %a4@(8),%d1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 48a02: b2aa 000c cmpl %a2@(12),%d1 48a06: 670a beqs 48a12 <_Heap_Walk+0x3c8> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 48a08: 43f9 0005 f500 lea 5f500 ,%a1 48a0e: b28a cmpl %a2,%d1 48a10: 676c beqs 48a7e <_Heap_Walk+0x434> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 48a12: 202c 000c movel %a4@(12),%d0 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 48a16: 41f9 0005 f5d1 lea 5f5d1 <_Status_Object_name_errors_to_status+0x43>,%a0 48a1c: b087 cmpl %d7,%d0 48a1e: 670a beqs 48a2a <_Heap_Walk+0x3e0> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 48a20: 41f9 0005 f500 lea 5f500 ,%a0 48a26: b08a cmpl %a2,%d0 48a28: 674c beqs 48a76 <_Heap_Walk+0x42c> Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 48a2a: 2f09 movel %a1,%sp@- 48a2c: 2f01 movel %d1,%sp@- 48a2e: 2f08 movel %a0,%sp@- 48a30: 2f00 movel %d0,%sp@- 48a32: 2f02 movel %d2,%sp@- 48a34: 2f0c movel %a4,%sp@- 48a36: 4879 0005 f8cc pea 5f8cc <_Status_Object_name_errors_to_status+0x33e> 48a3c: 42a7 clrl %sp@- 48a3e: 2f05 movel %d5,%sp@- 48a40: 4e95 jsr %a5@ block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 48a42: 2213 movel %a3@,%d1 48a44: 4fef 0024 lea %sp@(36),%sp 48a48: b282 cmpl %d2,%d1 48a4a: 663a bnes 48a86 <_Heap_Walk+0x43c> ); return false; } if ( !prev_used ) { 48a4c: 4a83 tstl %d3 48a4e: 6776 beqs 48ac6 <_Heap_Walk+0x47c> 48a50: 206a 0008 moveal %a2@(8),%a0 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 48a54: b1ca cmpal %a2,%a0 48a56: 6754 beqs 48aac <_Heap_Walk+0x462> <== NEVER TAKEN if ( free_block == block ) { 48a58: b1cc cmpal %a4,%a0 48a5a: 6700 feea beqw 48946 <_Heap_Walk+0x2fc> 48a5e: 2e2e ffec movel %fp@(-20),%d7 return true; } free_block = free_block->next; 48a62: 2068 0008 moveal %a0@(8),%a0 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 48a66: b1ca cmpal %a2,%a0 48a68: 6742 beqs 48aac <_Heap_Walk+0x462> if ( free_block == block ) { 48a6a: b1cc cmpal %a4,%a0 48a6c: 66f4 bnes 48a62 <_Heap_Walk+0x418> 48a6e: 2d47 ffec movel %d7,%fp@(-20) 48a72: 6000 fed2 braw 48946 <_Heap_Walk+0x2fc> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 48a76: 41f9 0005 f5e1 lea 5f5e1 <_Status_Object_name_errors_to_status+0x53>,%a0 48a7c: 60ac bras 48a2a <_Heap_Walk+0x3e0> block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 48a7e: 43f9 0005 f5c7 lea 5f5c7 <_Status_Object_name_errors_to_status+0x39>,%a1 48a84: 608c bras 48a12 <_Heap_Walk+0x3c8> ); if ( block_size != next_block->prev_size ) { (*printer)( 48a86: 2f0b movel %a3,%sp@- 48a88: 2f01 movel %d1,%sp@- 48a8a: 2f02 movel %d2,%sp@- 48a8c: 2f0c movel %a4,%sp@- 48a8e: 4879 0005 f901 pea 5f901 <_Status_Object_name_errors_to_status+0x373> 48a94: 4878 0001 pea 1 48a98: 2f05 movel %d5,%sp@- 48a9a: 4e95 jsr %a5@ 48a9c: 4fef 001c lea %sp@(28),%sp block = next_block; } while ( block != first_block ); return true; } 48aa0: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 48aa6: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48aa8: 4e5e unlk %fp 48aaa: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48aac: 2f0c movel %a4,%sp@- 48aae: 4879 0005 f9a5 pea 5f9a5 <_Status_Object_name_errors_to_status+0x417> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 48ab4: 4878 0001 pea 1 48ab8: 2f05 movel %d5,%sp@- 48aba: 4e95 jsr %a5@ 48abc: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48ac0: 4200 clrb %d0 48ac2: 6000 fca4 braw 48768 <_Heap_Walk+0x11e> return false; } if ( !prev_used ) { (*printer)( 48ac6: 2f0c movel %a4,%sp@- 48ac8: 4879 0005 f93a pea 5f93a <_Status_Object_name_errors_to_status+0x3ac> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 48ace: 4878 0001 pea 1 48ad2: 2f05 movel %d5,%sp@- 48ad4: 4e95 jsr %a5@ 48ad6: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48ada: 4200 clrb %d0 48adc: 6000 fc8a braw 48768 <_Heap_Walk+0x11e> const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 48ae0: 222a 0020 movel %a2@(32),%d1 ); return false; } if ( _Heap_Is_used( free_block ) ) { 48ae4: 2844 moveal %d4,%a4 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 48ae6: 2d41 fff4 movel %d1,%fp@(-12) 48aea: 222e fff4 movel %fp@(-12),%d1 48aee: 2d43 fffc movel %d3,%fp@(-4) 48af2: 262e fff0 movel %fp@(-16),%d3 48af6: 2d47 ffec movel %d7,%fp@(-20) 48afa: 6000 fddc braw 488d8 <_Heap_Walk+0x28e> ... =============================================================================== 000472fa <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 472fa: 4e56 0000 linkw %fp,#0 472fe: 2f0a movel %a2,%sp@- 47300: 2f02 movel %d2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 47302: 4ab9 0006 18c2 tstl 618c2 <_IO_Number_of_drivers> 47308: 671e beqs 47328 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN 4730a: 4282 clrl %d2 4730c: 45f9 0004 cbb4 lea 4cbb4 ,%a2 (void) rtems_io_initialize( major, 0, NULL ); 47312: 42a7 clrl %sp@- 47314: 42a7 clrl %sp@- 47316: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 47318: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 4731a: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 4731c: 4fef 000c lea %sp@(12),%sp 47320: b4b9 0006 18c2 cmpl 618c2 <_IO_Number_of_drivers>,%d2 47326: 65ea bcss 47312 <_IO_Initialize_all_drivers+0x18> (void) rtems_io_initialize( major, 0, NULL ); } 47328: 242e fff8 movel %fp@(-8),%d2 4732c: 246e fffc moveal %fp@(-4),%a2 47330: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047260 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 47260: 4e56 fff0 linkw %fp,#-16 47264: 48d7 003c moveml %d2-%d5,%sp@ uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 47268: 2639 0005 f69e movel 5f69e ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 4726e: 2439 0005 f69a movel 5f69a ,%d2 number_of_drivers = Configuration.maximum_drivers; 47274: 2839 0005 f696 movel 5f696 ,%d4 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 4727a: b882 cmpl %d2,%d4 4727c: 6366 blss 472e4 <_IO_Manager_initialization+0x84> * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( 4727e: 2004 movel %d4,%d0 47280: 2a04 movel %d4,%d5 47282: e788 lsll #3,%d0 47284: eb8d lsll #5,%d5 47286: 9a80 subl %d0,%d5 47288: 2f05 movel %d5,%sp@- 4728a: 4eb9 0004 a318 jsr 4a318 <_Workspace_Allocate_or_fatal_error> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 47290: 2f05 movel %d5,%sp@- 47292: 42a7 clrl %sp@- /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 47294: 23c0 0006 18c6 movel %d0,618c6 <_IO_Driver_address_table> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 4729a: 2f00 movel %d0,%sp@- _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 4729c: 23c4 0006 18c2 movel %d4,618c2 <_IO_Number_of_drivers> memset( 472a2: 4eb9 0004 f928 jsr 4f928 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 472a8: 4fef 0010 lea %sp@(16),%sp 472ac: 4a82 tstl %d2 472ae: 672a beqs 472da <_IO_Manager_initialization+0x7a><== NEVER TAKEN 472b0: 2839 0006 18c6 movel 618c6 <_IO_Driver_address_table>,%d4 472b6: 4280 clrl %d0 472b8: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 472ba: 2243 moveal %d3,%a1 472bc: 2044 moveal %d4,%a0 472be: d3c0 addal %d0,%a1 472c0: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 472c2: 5281 addql #1,%d1 472c4: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 472ca: 20d9 movel %a1@+,%a0@+ 472cc: 20d9 movel %a1@+,%a0@+ 472ce: 20d9 movel %a1@+,%a0@+ 472d0: 20d9 movel %a1@+,%a0@+ 472d2: 20d9 movel %a1@+,%a0@+ 472d4: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 472d6: b481 cmpl %d1,%d2 472d8: 66e0 bnes 472ba <_IO_Manager_initialization+0x5a> _IO_Driver_address_table[index] = driver_table[index]; } 472da: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 472e0: 4e5e unlk %fp 472e2: 4e75 rts * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 472e4: 23c3 0006 18c6 movel %d3,618c6 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 472ea: 23c2 0006 18c2 movel %d2,618c2 <_IO_Number_of_drivers> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } 472f0: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 472f6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047ec8 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47ec8: 4e56 fffc linkw %fp,#-4 47ecc: 206e 0010 moveal %fp@(16),%a0 47ed0: 2f02 movel %d2,%sp@- 47ed2: 222e 000c movel %fp@(12),%d1 _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 ); 47ed6: 4282 clrl %d2 47ed8: 1401 moveb %d1,%d2 47eda: 2242 moveal %d2,%a1 47edc: 2f08 movel %a0,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47ede: 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 ); 47ee2: 2f09 movel %a1,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 47ee4: 13c1 0006 10e2 moveb %d1,610e2 <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 47eea: 2d48 fffc movel %a0,%fp@(-4) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 47eee: 23c0 0006 10de movel %d0,610de <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 47ef4: 23c8 0006 10e4 movel %a0,610e4 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 47efa: 2f00 movel %d0,%sp@- 47efc: 4eb9 0004 9ea2 jsr 49ea2 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 47f02: 206e fffc moveal %fp@(-4),%a0 47f06: 327c 0700 moveaw #1792,%a1 47f0a: 2409 movel %a1,%d2 47f0c: 40c0 movew %sr,%d0 47f0e: 8082 orl %d2,%d0 47f10: 46c0 movew %d0,%sr 47f12: 2008 movel %a0,%d0 <== NOT EXECUTED 47f14: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47f1a: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 47f1c: 7005 moveq #5,%d0 47f1e: 4fef 000c lea %sp@(12),%sp 47f22: 23c0 0006 118c movel %d0,6118c <_System_state_Current> 47f28: 60fe bras 47f28 <_Internal_error_Occurred+0x60> ... =============================================================================== 00047f8c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47f8c: 4e56 fff0 linkw %fp,#-16 47f90: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47f94: 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 ) 47f98: 4aaa 0014 tstl %a2@(20) 47f9c: 6756 beqs 47ff4 <_Objects_Allocate+0x68> <== NEVER TAKEN /* * 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 ); 47f9e: 240a movel %a2,%d2 47fa0: 0682 0000 001c addil #28,%d2 47fa6: 47f9 0004 75d4 lea 475d4 <_Chain_Get>,%a3 47fac: 2f02 movel %d2,%sp@- 47fae: 4e93 jsr %a3@ if ( information->auto_extend ) { 47fb0: 588f addql #4,%sp 47fb2: 4a2a 0010 tstb %a2@(16) 47fb6: 6732 beqs 47fea <_Objects_Allocate+0x5e> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 47fb8: 4a80 tstl %d0 47fba: 6744 beqs 48000 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47fbc: 2040 moveal %d0,%a0 47fbe: 4281 clrl %d1 47fc0: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47fc2: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47fc4: 3228 000a movew %a0@(10),%d1 47fc8: 362a 0008 movew %a2@(8),%d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47fcc: 342a 0012 movew %a2@(18),%d2 information->inactive_per_block[ block ]--; 47fd0: 206a 002a moveal %a2@(42),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47fd4: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47fd6: 4c42 1001 remul %d2,%d1,%d1 information->inactive_per_block[ block ]--; information->inactive--; 47fda: 326a 0028 moveaw %a2@(40),%a1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47fde: e589 lsll #2,%d1 information->inactive--; 47fe0: 5389 subql #1,%a1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47fe2: d1c1 addal %d1,%a0 47fe4: 5390 subql #1,%a0@ information->inactive--; 47fe6: 3549 0028 movew %a1,%a2@(40) ); } #endif return the_object; } 47fea: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47ff0: 4e5e unlk %fp 47ff2: 4e75 rts * 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 ) return NULL; 47ff4: 4280 clrl %d0 <== NOT EXECUTED ); } #endif return the_object; } 47ff6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 47ffc: 4e5e unlk %fp <== NOT EXECUTED 47ffe: 4e75 rts <== NOT EXECUTED * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 48000: 2f0a movel %a2,%sp@- 48002: 4eb9 0004 8044 jsr 48044 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 48008: 2f02 movel %d2,%sp@- 4800a: 4e93 jsr %a3@ } if ( the_object ) { 4800c: 508f addql #8,%sp 4800e: 4a80 tstl %d0 48010: 66aa bnes 47fbc <_Objects_Allocate+0x30> ); } #endif return the_object; } 48012: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 48018: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004801c <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4801c: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 4801e: 4e56 0000 linkw %fp,#0 48022: 206e 0008 moveal %fp@(8),%a0 48026: 226e 000c moveal %fp@(12),%a1 4802a: 2f0a movel %a2,%sp@- 4802c: 2468 0018 moveal %a0@(24),%a2 48030: 3029 000a movew %a1@(10),%d0 48034: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); } 48038: 245f moveal %sp@+,%a2 4803a: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 4803c: 4ef9 0004 85d8 jmp 485d8 <_Objects_Namespace_remove> ... =============================================================================== 00048044 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 48044: 4e56 ffcc linkw %fp,#-52 48048: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4804c: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 48050: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48052: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 48056: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 4805a: 4a88 tstl %a0 4805c: 6700 0232 beqw 48290 <_Objects_Extend_information+0x24c> block_count = 0; else { block_count = information->maximum / information->allocation_size; 48060: 322a 000e movew %a2@(14),%d1 48064: 302a 0012 movew %a2@(18),%d0 48068: 3801 movew %d1,%d4 4806a: 0284 0000 ffff andil #65535,%d4 48070: 88c0 divuw %d0,%d4 48072: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 48078: 6700 022c beqw 482a6 <_Objects_Extend_information+0x262> if ( information->object_blocks[ block ] == NULL ) { 4807c: 4a90 tstl %a0@ 4807e: 6700 0236 beqw 482b6 <_Objects_Extend_information+0x272> * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 48082: 5888 addql #4,%a0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 48084: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 48086: 4282 clrl %d2 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 48088: 0280 0000 ffff andil #65535,%d0 do_extend = false; break; } else index_base += information->allocation_size; 4808e: d680 addl %d0,%d3 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 48090: 5282 addql #1,%d2 48092: b484 cmpl %d4,%d2 48094: 6400 01a6 bccw 4823c <_Objects_Extend_information+0x1f8> if ( information->object_blocks[ block ] == NULL ) { 48098: 4a98 tstl %a0@+ 4809a: 66f2 bnes 4808e <_Objects_Extend_information+0x4a> do_extend = false; 4809c: 4207 clrb %d7 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 4809e: 0281 0000 ffff andil #65535,%d1 480a4: 2641 moveal %d1,%a3 480a6: d7c0 addal %d0,%a3 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 480a8: b7fc 0000 ffff cmpal #65535,%a3 480ae: 6200 0182 bhiw 48232 <_Objects_Extend_information+0x1ee> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 480b2: 41ea 0014 lea %a2@(20),%a0 480b6: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 480ba: 4a2a 0010 tstb %a2@(16) 480be: 6700 0182 beqw 48242 <_Objects_Extend_information+0x1fe> new_object_block = _Workspace_Allocate( block_size ); 480c2: 2f00 movel %d0,%sp@- 480c4: 4eb9 0004 a2e2 jsr 4a2e2 <_Workspace_Allocate> if ( !new_object_block ) 480ca: 588f addql #4,%sp * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 480cc: 2c00 movel %d0,%d6 if ( !new_object_block ) 480ce: 6700 0162 beqw 48232 <_Objects_Extend_information+0x1ee> } /* * Do we need to grow the tables? */ if ( do_extend ) { 480d2: 4a07 tstb %d7 480d4: 6700 00be beqw 48194 <_Objects_Extend_information+0x150> */ /* * Up the block count and maximum */ block_count++; 480d8: 2a44 moveal %d4,%a5 480da: 528d addql #1,%a5 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); 480dc: 200b movel %a3,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 480de: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 ((maximum + minimum_index) * sizeof(Objects_Control *)); 480e2: d088 addl %a0,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 480e4: d085 addl %d5,%d0 block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 480e6: e588 lsll #2,%d0 (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 480e8: 2f00 movel %d0,%sp@- 480ea: 4eb9 0004 a2e2 jsr 4a2e2 <_Workspace_Allocate> if ( !object_blocks ) { 480f0: 588f addql #4,%sp * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 480f2: 2840 moveal %d0,%a4 if ( !object_blocks ) { 480f4: 4a80 tstl %d0 480f6: 6700 01ce beqw 482c6 <_Objects_Extend_information+0x282> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 480fa: 2e0d movel %a5,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 480fc: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 480fe: e58f lsll #2,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 48100: 302a 000e movew %a2@(14),%d0 48104: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 48108: de8d addl %a5,%d7 4810a: b085 cmpl %d5,%d0 4810c: 6200 0144 bhiw 48252 <_Objects_Extend_information+0x20e> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 48110: 4a85 tstl %d5 48112: 670c beqs 48120 <_Objects_Extend_information+0xdc><== NEVER TAKEN 48114: 2047 moveal %d7,%a0 48116: 4280 clrl %d0 local_table[ index ] = NULL; 48118: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 4811a: 5280 addql #1,%d0 4811c: b085 cmpl %d5,%d0 4811e: 65f8 bcss 48118 <_Objects_Extend_information+0xd4><== NEVER TAKEN 48120: e58c lsll #2,%d4 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 48122: 4281 clrl %d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 48124: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 48128: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 4812c: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 48130: d283 addl %d3,%d1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 48132: b283 cmpl %d3,%d1 48134: 6310 blss 48146 <_Objects_Extend_information+0x102><== NEVER TAKEN 48136: 2247 moveal %d7,%a1 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 48138: 2003 movel %d3,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 4813a: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 4813e: 4298 clrl %a0@+ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 48140: 5280 addql #1,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 48142: b081 cmpl %d1,%d0 48144: 65f8 bcss 4813e <_Objects_Extend_information+0xfa> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 48146: 203c 0000 0700 movel #1792,%d0 4814c: 40c4 movew %sr,%d4 4814e: 8084 orl %d4,%d0 48150: 46c0 movew %d0,%sr uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48152: 2012 movel %a2@,%d0 48154: 7a18 moveq #24,%d5 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 48156: 4281 clrl %d1 48158: eba8 lsll %d5,%d0 4815a: 322a 0004 movew %a2@(4),%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 4815e: 1a3c 001b moveb #27,%d5 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48162: 08c0 0010 bset #16,%d0 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48166: eba9 lsll %d5,%d1 48168: 4285 clrl %d5 4816a: 8081 orl %d1,%d0 4816c: 3a0b movew %a3,%d5 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 4816e: 206a 002e moveal %a2@(46),%a0 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48172: 8085 orl %d5,%d0 information->object_blocks = object_blocks; 48174: 254c 002e movel %a4,%a2@(46) information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 48178: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 4817c: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; 48180: 2547 0018 movel %d7,%a2@(24) 48184: 2540 000a movel %d0,%a2@(10) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 48188: 46c4 movew %d4,%sr _Workspace_Free( old_tables ); 4818a: 2f08 movel %a0,%sp@- 4818c: 4eb9 0004 a2fe jsr 4a2fe <_Workspace_Free> 48192: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 48194: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48198: 4280 clrl %d0 4819a: 280e movel %fp,%d4 4819c: 0684 ffff fff4 addil #-12,%d4 481a2: 47f9 0004 75d4 lea 475d4 <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 481a8: 2a0a movel %a2,%d5 481aa: 0685 0000 001c addil #28,%d5 481b0: 49f9 0004 7574 lea 47574 <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 481b6: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 481b8: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 481bc: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 481c0: 2f2a 0014 movel %a2@(20),%sp@- 481c4: 206a 002e moveal %a2@(46),%a0 481c8: 2f00 movel %d0,%sp@- 481ca: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 481ce: 2f04 movel %d4,%sp@- 481d0: 4eb9 0004 cbfc jsr 4cbfc <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 481d6: 4fef 0010 lea %sp@(16),%sp 481da: 2f04 movel %d4,%sp@- 481dc: 4e93 jsr %a3@ 481de: 588f addql #4,%sp 481e0: 4a80 tstl %d0 481e2: 6734 beqs 48218 <_Objects_Extend_information+0x1d4><== NEVER TAKEN 481e4: 2212 movel %a2@,%d1 481e6: 7e18 moveq #24,%d7 the_object->id = _Objects_Build_id( 481e8: 4286 clrl %d6 481ea: 2040 moveal %d0,%a0 481ec: 3c2a 0004 movew %a2@(4),%d6 481f0: efa9 lsll %d7,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 481f2: 1e3c 001b moveb #27,%d7 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 481f6: 08c1 0010 bset #16,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 481fa: efae lsll %d7,%d6 481fc: 8286 orl %d6,%d1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 481fe: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 48200: 5283 addql #1,%d3 48202: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 48206: 2f00 movel %d0,%sp@- 48208: 2f05 movel %d5,%sp@- 4820a: 4e94 jsr %a4@ index++; 4820c: 508f addql #8,%sp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 4820e: 2f04 movel %d4,%sp@- 48210: 4e93 jsr %a3@ 48212: 588f addql #4,%sp 48214: 4a80 tstl %d0 48216: 66cc bnes 481e4 <_Objects_Extend_information+0x1a0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 48218: 4281 clrl %d1 4821a: 302a 0012 movew %a2@(18),%d0 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 4821e: 326a 0028 moveaw %a2@(40),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 48222: 206a 002a moveal %a2@(42),%a0 48226: 3200 movew %d0,%d1 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 48228: d089 addl %a1,%d0 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4822a: 2181 2800 movel %d1,%a0@(00000000,%d2:l) information->inactive = 4822e: 3540 0028 movew %d0,%a2@(40) (Objects_Maximum)(information->inactive + information->allocation_size); } 48232: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 48238: 4e5e unlk %fp 4823a: 4e75 rts /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 4823c: 7e01 moveq #1,%d7 4823e: 6000 fe5e braw 4809e <_Objects_Extend_information+0x5a> if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 48242: 2f00 movel %d0,%sp@- 48244: 4eb9 0004 a318 jsr 4a318 <_Workspace_Allocate_or_fatal_error> 4824a: 588f addql #4,%sp 4824c: 2c00 movel %d0,%d6 4824e: 6000 fe82 braw 480d2 <_Objects_Extend_information+0x8e> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 48252: e58c lsll #2,%d4 48254: 2f04 movel %d4,%sp@- 48256: 2f2a 002e movel %a2@(46),%sp@- 4825a: 2f0c movel %a4,%sp@- 4825c: 4eb9 0004 f8b8 jsr 4f8b8 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 48262: 2f04 movel %d4,%sp@- 48264: 2f2a 002a movel %a2@(42),%sp@- 48268: 2f0d movel %a5,%sp@- 4826a: 4eb9 0004 f8b8 jsr 4f8b8 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 48270: 4280 clrl %d0 48272: 302a 000e movew %a2@(14),%d0 48276: da80 addl %d0,%d5 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 48278: e58d lsll #2,%d5 4827a: 2f05 movel %d5,%sp@- 4827c: 2f2a 0018 movel %a2@(24),%sp@- 48280: 2f07 movel %d7,%sp@- 48282: 4eb9 0004 f8b8 jsr 4f8b8 48288: 4fef 0024 lea %sp@(36),%sp 4828c: 6000 fe94 braw 48122 <_Objects_Extend_information+0xde> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48290: 4280 clrl %d0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 48292: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 48294: 4282 clrl %d2 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 48296: 4284 clrl %d4 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48298: 322a 000e movew %a2@(14),%d1 4829c: 302a 0012 movew %a2@(18),%d0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 482a0: 7e01 moveq #1,%d7 482a2: 6000 fdfa braw 4809e <_Objects_Extend_information+0x5a> minimum_index = _Objects_Get_index( information->minimum_id ); 482a6: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 482a8: 4282 clrl %d2 <== NOT EXECUTED if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 482aa: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 482b0: 7e01 moveq #1,%d7 <== NOT EXECUTED 482b2: 6000 fdea braw 4809e <_Objects_Extend_information+0x5a><== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); 482b6: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 482b8: 4282 clrl %d2 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 482ba: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED do_extend = false; 482c0: 4207 clrb %d7 <== NOT EXECUTED 482c2: 6000 fdda braw 4809e <_Objects_Extend_information+0x5a><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 482c6: 2f06 movel %d6,%sp@- 482c8: 4eb9 0004 a2fe jsr 4a2fe <_Workspace_Free> return; 482ce: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 482d0: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 482d6: 4e5e unlk %fp ... =============================================================================== 0004838c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 4838c: 4e56 0000 linkw %fp,#0 48390: 2f03 movel %d3,%sp@- 48392: 262e 0008 movel %fp@(8),%d3 48396: 2f02 movel %d2,%sp@- 48398: 342e 000e movew %fp@(14),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 4839c: 6744 beqs 483e2 <_Objects_Get_information+0x56> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 4839e: 2f03 movel %d3,%sp@- 483a0: 4eb9 0004 d0fc jsr 4d0fc <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 483a6: 588f addql #4,%sp 483a8: 4a80 tstl %d0 483aa: 6736 beqs 483e2 <_Objects_Get_information+0x56> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 483ac: 0282 0000 ffff andil #65535,%d2 483b2: b480 cmpl %d0,%d2 483b4: 622c bhis 483e2 <_Objects_Get_information+0x56> return NULL; if ( !_Objects_Information_table[ the_api ] ) 483b6: 41f9 0006 1004 lea 61004 <_Objects_Information_table>,%a0 483bc: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 483c0: 4a88 tstl %a0 483c2: 671e beqs 483e2 <_Objects_Get_information+0x56> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 483c4: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 483c8: 670c beqs 483d6 <_Objects_Get_information+0x4a> <== NEVER TAKEN * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 483ca: 2040 moveal %d0,%a0 483cc: 4a68 000e tstw %a0@(14) 483d0: 56c1 sne %d1 483d2: 49c1 extbl %d1 483d4: c081 andl %d1,%d0 #endif return info; } 483d6: 242e fff8 movel %fp@(-8),%d2 483da: 262e fffc movel %fp@(-4),%d3 483de: 4e5e unlk %fp 483e0: 4e75 rts 483e2: 242e fff8 movel %fp@(-8),%d2 if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) return NULL; 483e6: 4280 clrl %d0 if ( info->maximum == 0 ) return NULL; #endif return info; } 483e8: 262e fffc movel %fp@(-4),%d3 483ec: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000483a0 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 483a0: 4e56 ffec linkw %fp,#-20 483a4: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 483a8: 246e 0008 moveal %fp@(8),%a2 483ac: 242e 000c movel %fp@(12),%d2 483b0: 266e 0010 moveal %fp@(16),%a3 483b4: 2a6e 0014 moveal %fp@(20),%a5 Objects_Control *object; Objects_Id next_id; if ( !information ) 483b8: 4a8a tstl %a2 483ba: 6756 beqs 48412 <_Objects_Get_next+0x72> <== NEVER TAKEN return NULL; if ( !location_p ) 483bc: 4a8b tstl %a3 483be: 6752 beqs 48412 <_Objects_Get_next+0x72> <== NEVER TAKEN return NULL; if ( !next_id_p ) 483c0: 4a8d tstl %a5 483c2: 674e beqs 48412 <_Objects_Get_next+0x72> <== NEVER TAKEN return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 483c4: 4a42 tstw %d2 483c6: 6604 bnes 483cc <_Objects_Get_next+0x2c> next_id = information->minimum_id; 483c8: 242a 0006 movel %a2@(6),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 483cc: 49f9 0004 8420 lea 48420 <_Objects_Get>,%a4 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 483d2: 4281 clrl %d1 483d4: 4280 clrl %d0 483d6: 322a 000e movew %a2@(14),%d1 483da: 3002 movew %d2,%d0 483dc: b081 cmpl %d1,%d0 483de: 621e bhis 483fe <_Objects_Get_next+0x5e> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 483e0: 2f0b movel %a3,%sp@- 483e2: 2f02 movel %d2,%sp@- next_id++; 483e4: 5282 addql #1,%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 483e6: 2f0a movel %a2,%sp@- 483e8: 4e94 jsr %a4@ next_id++; } while (*location_p != OBJECTS_LOCAL); 483ea: 4fef 000c lea %sp@(12),%sp 483ee: 4a93 tstl %a3@ 483f0: 66e0 bnes 483d2 <_Objects_Get_next+0x32> *next_id_p = next_id; 483f2: 2a82 movel %d2,%a5@ return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 483f4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 483fa: 4e5e unlk %fp 483fc: 4e75 rts do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 483fe: 7001 moveq #1,%d0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 48400: 72ff moveq #-1,%d1 do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 48402: 2680 movel %d0,%a3@ *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 48404: 4280 clrl %d0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 48406: 2a81 movel %d1,%a5@ return 0; } 48408: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4840e: 4e5e unlk %fp 48410: 4e75 rts if ( !location_p ) return NULL; if ( !next_id_p ) return NULL; 48412: 4280 clrl %d0 return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 48414: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4841a: 4e5e unlk %fp ... =============================================================================== 00059f00 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 59f00: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 59f02: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 59f04: 4e56 0000 linkw %fp,#0 59f08: 206e 0008 moveal %fp@(8),%a0 /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 59f0c: 90a8 0006 subl %a0@(6),%d0 59f10: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 59f14: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 59f18: 226e 0010 moveal %fp@(16),%a1 * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; if ( information->maximum >= index ) { 59f1c: b280 cmpl %d0,%d1 59f1e: 6510 bcss 59f30 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 59f20: 2068 0018 moveal %a0@(24),%a0 59f24: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 59f28: 6706 beqs 59f30 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 59f2a: 4291 clrl %a1@ * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 59f2c: 4e5e unlk %fp 59f2e: 4e75 rts /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 59f30: 7001 moveq #1,%d0 return NULL; } 59f32: 4e5e unlk %fp /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 59f34: 2280 movel %d0,%a1@ return NULL; 59f36: 4280 clrl %d0 } ... =============================================================================== 00048e04 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 48e04: 4e56 fffc linkw %fp,#-4 48e08: 202e 0008 movel %fp@(8),%d0 48e0c: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 48e0e: 4a80 tstl %d0 48e10: 664e bnes 48e60 <_Objects_Id_to_name+0x5c> 48e12: 2079 0006 26c2 moveal 626c2 <_Per_CPU_Information+0xc>,%a0 48e18: 2228 0008 movel %a0@(8),%d1 48e1c: 7418 moveq #24,%d2 48e1e: 2001 movel %d1,%d0 48e20: e4a8 lsrl %d2,%d0 48e22: 143c 0007 moveb #7,%d2 48e26: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 48e28: 143c 0002 moveb #2,%d2 48e2c: 2040 moveal %d0,%a0 48e2e: 5388 subql #1,%a0 48e30: b488 cmpl %a0,%d2 48e32: 6522 bcss 48e56 <_Objects_Id_to_name+0x52> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 48e34: 41f9 0006 221c lea 6221c <_Objects_Information_table>,%a0 48e3a: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 48e3e: 4a88 tstl %a0 48e40: 6714 beqs 48e56 <_Objects_Id_to_name+0x52> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 48e42: 2001 movel %d1,%d0 48e44: 741b moveq #27,%d2 48e46: e4a8 lsrl %d2,%d0 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 48e48: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !information ) 48e4c: 4a88 tstl %a0 48e4e: 6706 beqs 48e56 <_Objects_Id_to_name+0x52> <== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 48e50: 4a28 0032 tstb %a0@(50) 48e54: 670e beqs 48e64 <_Objects_Id_to_name+0x60> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 48e56: 242e fff8 movel %fp@(-8),%d2 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; 48e5a: 7003 moveq #3,%d0 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 48e5c: 4e5e unlk %fp 48e5e: 4e75 rts /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 48e60: 2200 movel %d0,%d1 48e62: 60b8 bras 48e1c <_Objects_Id_to_name+0x18> #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 48e64: 486e fffc pea %fp@(-4) 48e68: 2f01 movel %d1,%sp@- 48e6a: 2f08 movel %a0,%sp@- 48e6c: 4eb9 0004 8d90 jsr 48d90 <_Objects_Get> if ( !the_object ) 48e72: 4fef 000c lea %sp@(12),%sp 48e76: 4a80 tstl %d0 48e78: 67dc beqs 48e56 <_Objects_Id_to_name+0x52> <== NEVER TAKEN return OBJECTS_INVALID_ID; *name = the_object->name; 48e7a: 206e 000c moveal %fp@(12),%a0 48e7e: 2240 moveal %d0,%a1 48e80: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 48e84: 4eb9 0004 9b68 jsr 49b68 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 48e8a: 242e fff8 movel %fp@(-8),%d2 if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 48e8e: 4280 clrl %d0 } 48e90: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048780 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48780: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 48782: 4e56 fff0 linkw %fp,#-16 48786: 48d7 3c00 moveml %a2-%a5,%sp@ 4878a: 286e 0008 moveal %fp@(8),%a4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 4878e: 302c 0034 movew %a4@(52),%d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 48792: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48796: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 48798: 2a6e 000c moveal %fp@(12),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 4879c: 2f0a movel %a2,%sp@- 4879e: 4eb9 0005 0a7c jsr 50a7c #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 487a4: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 487a6: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 487a8: 4a2c 0032 tstb %a4@(50) 487ac: 6662 bnes 48810 <_Objects_Set_name+0x90> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 487ae: 7018 moveq #24,%d0 487b0: 1212 moveb %a2@,%d1 487b2: 49c1 extbl %d1 487b4: e1a9 lsll %d0,%d1 487b6: 103c 0001 moveb #1,%d0 487ba: b08b cmpl %a3,%d0 487bc: 643c bccs 487fa <_Objects_Set_name+0x7a> 487be: 102a 0001 moveb %a2@(1),%d0 487c2: 49c0 extbl %d0 487c4: 4840 swap %d0 487c6: 4240 clrw %d0 487c8: 8081 orl %d1,%d0 487ca: 7202 moveq #2,%d1 487cc: b28b cmpl %a3,%d1 487ce: 6730 beqs 48800 <_Objects_Set_name+0x80> 487d0: 122a 0002 moveb %a2@(2),%d1 487d4: 49c1 extbl %d1 487d6: e189 lsll #8,%d1 487d8: 8081 orl %d1,%d0 487da: 7203 moveq #3,%d1 487dc: b28b cmpl %a3,%d1 487de: 6700 0082 beqw 48862 <_Objects_Set_name+0xe2> 487e2: 122a 0003 moveb %a2@(3),%d1 487e6: 49c1 extbl %d1 487e8: 8081 orl %d1,%d0 487ea: 2b40 000c movel %d0,%a5@(12) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 487ee: 7001 moveq #1,%d0 } 487f0: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 487f6: 4e5e unlk %fp 487f8: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 487fa: 2001 movel %d1,%d0 487fc: 08c0 0015 bset #21,%d0 48800: 7220 moveq #32,%d1 48802: 08c0 000d bset #13,%d0 48806: 8081 orl %d1,%d0 48808: 2b40 000c movel %d0,%a5@(12) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 4880c: 7001 moveq #1,%d0 4880e: 60e0 bras 487f0 <_Objects_Set_name+0x70> #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 48810: 486b 0001 pea %a3@(1) 48814: 4eb9 0004 a4c2 jsr 4a4c2 <_Workspace_Allocate> if ( !d ) 4881a: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 4881c: 2840 moveal %d0,%a4 if ( !d ) 4881e: 4a80 tstl %d0 48820: 6734 beqs 48856 <_Objects_Set_name+0xd6> return false; _Workspace_Free( (void *)the_object->name.name_p ); 48822: 2f2d 000c movel %a5@(12),%sp@- 48826: 4eb9 0004 a4de jsr 4a4de <_Workspace_Free> the_object->name.name_p = NULL; strncpy( d, name, length ); 4882c: 2f0b movel %a3,%sp@- 4882e: 2f0a movel %a2,%sp@- d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; 48830: 42ad 000c clrl %a5@(12) strncpy( d, name, length ); 48834: 2f0c movel %a4,%sp@- 48836: 4eb9 0005 09f4 jsr 509f4 d[length] = '\0'; the_object->name.name_p = d; 4883c: 4fef 0010 lea %sp@(16),%sp _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; strncpy( d, name, length ); d[length] = '\0'; 48840: 4200 clrb %d0 48842: 1980 b800 moveb %d0,%a4@(00000000,%a3:l) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 48846: 7001 moveq #1,%d0 _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; strncpy( d, name, length ); d[length] = '\0'; the_object->name.name_p = d; 48848: 2b4c 000c movel %a4,%a5@(12) ); } return true; } 4884c: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 48852: 4e5e unlk %fp 48854: 4e75 rts 48856: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; 4885c: 4200 clrb %d0 ); } return true; } 4885e: 4e5e unlk %fp 48860: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 48862: 7220 moveq #32,%d1 48864: 8081 orl %d1,%d0 48866: 2b40 000c movel %d0,%a5@(12) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 4886a: 7001 moveq #1,%d0 4886c: 6082 bras 487f0 <_Objects_Set_name+0x70> ... =============================================================================== 00048690 <_Objects_Shrink_information>: /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 48690: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 48692: 4e56 ffec linkw %fp,#-20 48696: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4869a: 246e 0008 moveal %fp@(8),%a2 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 4869e: 4282 clrl %d2 block_count = (information->maximum - index_base) / 486a0: 4283 clrl %d3 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 486a2: 342a 0008 movew %a2@(8),%d2 block_count = (information->maximum - index_base) / 486a6: 362a 000e movew %a2@(14),%d3 486aa: 322a 0012 movew %a2@(18),%d1 486ae: 9682 subl %d2,%d3 486b0: 4c41 3003 remul %d1,%d3,%d3 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 486b4: 6774 beqs 4872a <_Objects_Shrink_information+0x9a><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 486b6: 206a 002a moveal %a2@(42),%a0 486ba: b290 cmpl %a0@,%d1 486bc: 677e beqs 4873c <_Objects_Shrink_information+0xac><== NEVER TAKEN * the_block - the block to remove * * Output parameters: NONE */ void _Objects_Shrink_information( 486be: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 486c0: 4280 clrl %d0 486c2: 5280 addql #1,%d0 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 486c4: d481 addl %d1,%d2 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 486c6: b680 cmpl %d0,%d3 486c8: 6760 beqs 4872a <_Objects_Shrink_information+0x9a> if ( information->inactive_per_block[ block ] == 486ca: 2800 movel %d0,%d4 486cc: e58c lsll #2,%d4 486ce: b298 cmpl %a0@+,%d1 486d0: 66f0 bnes 486c2 <_Objects_Shrink_information+0x32> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 486d2: 206a 001c moveal %a2@(28),%a0 */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 486d6: 47f9 0004 75ac lea 475ac <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); 486dc: 4280 clrl %d0 486de: 3028 000a movew %a0@(10),%d0 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 486e2: 2610 movel %a0@,%d3 if ((index >= index_base) && 486e4: b480 cmpl %d0,%d2 486e6: 620c bhis 486f4 <_Objects_Shrink_information+0x64> (index < (index_base + information->allocation_size))) { 486e8: 4281 clrl %d1 486ea: 322a 0012 movew %a2@(18),%d1 486ee: d282 addl %d2,%d1 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 486f0: b280 cmpl %d0,%d1 486f2: 6240 bhis 48734 <_Objects_Shrink_information+0xa4> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 486f4: 4a83 tstl %d3 486f6: 6704 beqs 486fc <_Objects_Shrink_information+0x6c> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 486f8: 2043 moveal %d3,%a0 486fa: 60e0 bras 486dc <_Objects_Shrink_information+0x4c> while ( the_object ); /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 486fc: 206a 002e moveal %a2@(46),%a0 48700: 2f30 4800 movel %a0@(00000000,%d4:l),%sp@- 48704: 4eb9 0004 a2fe jsr 4a2fe <_Workspace_Free> information->object_blocks[ block ] = NULL; 4870a: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 4870e: 588f addql #4,%sp /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 48710: 42b0 4800 clrl %a0@(00000000,%d4:l) information->inactive_per_block[ block ] = 0; 48714: 206a 002a moveal %a2@(42),%a0 information->inactive -= information->allocation_size; 48718: 302a 0028 movew %a2@(40),%d0 4871c: 322a 0012 movew %a2@(18),%d1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 48720: 42b0 4800 clrl %a0@(00000000,%d4:l) information->inactive -= information->allocation_size; 48724: 9081 subl %d1,%d0 48726: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 4872a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48730: 4e5e unlk %fp 48732: 4e75 rts */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 48734: 2f08 movel %a0,%sp@- 48736: 4e93 jsr %a3@ 48738: 588f addql #4,%sp 4873a: 60b8 bras 486f4 <_Objects_Shrink_information+0x64> 4873c: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 48740: 4284 clrl %d4 <== NOT EXECUTED */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 48742: 47f9 0004 75ac lea 475ac <_Chain_Extract>,%a3 <== NOT EXECUTED 48748: 6092 bras 486dc <_Objects_Shrink_information+0x4c><== NOT EXECUTED ... =============================================================================== 000474c0 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 474c0: 4e56 0000 linkw %fp,#0 474c4: 2f0b movel %a3,%sp@- 474c6: 266e 000c moveal %fp@(12),%a3 474ca: 2f0a movel %a2,%sp@- 474cc: 246e 0008 moveal %fp@(8),%a2 int status; if ( !cond ) { 474d0: 4a8a tstl %a2 474d2: 6750 beqs 47524 <_POSIX_Condition_variables_Get+0x64> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 474d4: 2012 movel %a2@,%d0 474d6: 72ff moveq #-1,%d1 474d8: b280 cmpl %d0,%d1 474da: 6720 beqs 474fc <_POSIX_Condition_variables_Get+0x3c><== NEVER TAKEN } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 474dc: 2f0b movel %a3,%sp@- 474de: 2f00 movel %d0,%sp@- 474e0: 4879 0006 3a8a pea 63a8a <_POSIX_Condition_variables_Information> 474e6: 4eb9 0004 a448 jsr 4a448 <_Objects_Get> 474ec: 4fef 000c lea %sp@(12),%sp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 474f0: 246e fff8 moveal %fp@(-8),%a2 474f4: 266e fffc moveal %fp@(-4),%a3 474f8: 4e5e unlk %fp 474fa: 4e75 rts if ( *cond == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 474fc: 42a7 clrl %sp@- 474fe: 2f0a movel %a2,%sp@- 47500: 4eb9 0004 7538 jsr 47538 if ( status ) { 47506: 508f addql #8,%sp 47508: 4a80 tstl %d0 4750a: 6618 bnes 47524 <_POSIX_Condition_variables_Get+0x64> 4750c: 2012 movel %a2@,%d0 } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 4750e: 2f0b movel %a3,%sp@- 47510: 2f00 movel %d0,%sp@- 47512: 4879 0006 3a8a pea 63a8a <_POSIX_Condition_variables_Information> 47518: 4eb9 0004 a448 jsr 4a448 <_Objects_Get> 4751e: 4fef 000c lea %sp@(12),%sp 47522: 60cc bras 474f0 <_POSIX_Condition_variables_Get+0x30> * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); if ( status ) { *location = OBJECTS_ERROR; 47524: 7001 moveq #1,%d0 47526: 2680 movel %d0,%a3@ return (POSIX_Condition_variables_Control *)_Objects_Get( &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 47528: 246e fff8 moveal %fp@(-8),%a2 */ status = pthread_cond_init( cond, 0 ); if ( status ) { *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; 4752c: 4280 clrl %d0 return (POSIX_Condition_variables_Control *)_Objects_Get( &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 4752e: 266e fffc moveal %fp@(-4),%a3 47532: 4e5e unlk %fp ... =============================================================================== 000476dc <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 476dc: 4e56 ffe8 linkw %fp,#-24 476e0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 476e4: 240e movel %fp,%d2 476e6: 5982 subql #4,%d2 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 476e8: 246e 000c moveal %fp@(12),%a2 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 476ec: 2f02 movel %d2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 476ee: 266e 0008 moveal %fp@(8),%a3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 476f2: 2f0a movel %a2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 476f4: 162e 0017 moveb %fp@(23),%d3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 476f8: 4eb9 0004 7864 jsr 47864 <_POSIX_Mutex_Get> 476fe: 508f addql #8,%sp 47700: 4a80 tstl %d0 47702: 676a beqs 4776e <_POSIX_Condition_variables_Wait_support+0x92> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 47704: 2039 0006 3708 movel 63708 <_Thread_Dispatch_disable_level>,%d0 4770a: 5380 subql #1,%d0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 4770c: 2f02 movel %d2,%sp@- 4770e: 23c0 0006 3708 movel %d0,63708 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47714: 2039 0006 3708 movel 63708 <_Thread_Dispatch_disable_level>,%d0 4771a: 2f0b movel %a3,%sp@- 4771c: 4eb9 0004 74c0 jsr 474c0 <_POSIX_Condition_variables_Get> switch ( location ) { 47722: 508f addql #8,%sp return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 47724: 2840 moveal %d0,%a4 switch ( location ) { 47726: 4aae fffc tstl %fp@(-4) 4772a: 6642 bnes 4776e <_POSIX_Condition_variables_Wait_support+0x92> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 4772c: 202c 0014 movel %a4@(20),%d0 47730: 6718 beqs 4774a <_POSIX_Condition_variables_Wait_support+0x6e> 47732: b092 cmpl %a2@,%d0 47734: 6714 beqs 4774a <_POSIX_Condition_variables_Wait_support+0x6e> _Thread_Enable_dispatch(); 47736: 4eb9 0004 b190 jsr 4b190 <_Thread_Enable_dispatch> return EINVAL; 4773c: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 4773e: 2002 movel %d2,%d0 47740: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 47746: 4e5e unlk %fp 47748: 4e75 rts if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 4774a: 2f0a movel %a2,%sp@- 4774c: 4eb9 0004 7b2c jsr 47b2c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 47752: 588f addql #4,%sp 47754: 4a03 tstb %d3 47756: 6724 beqs 4777c <_POSIX_Condition_variables_Wait_support+0xa0> status = _Thread_Executing->Wait.return_code; if ( status == EINTR ) status = 0; } else { _Thread_Enable_dispatch(); 47758: 4eb9 0004 b190 jsr 4b190 <_Thread_Enable_dispatch> status = ETIMEDOUT; 4775e: 7474 moveq #116,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 47760: 2f0a movel %a2,%sp@- 47762: 4eb9 0004 7a90 jsr 47a90 if ( mutex_status ) 47768: 588f addql #4,%sp 4776a: 4a80 tstl %d0 4776c: 67d0 beqs 4773e <_POSIX_Condition_variables_Wait_support+0x62><== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } return EINVAL; 4776e: 7416 moveq #22,%d2 } 47770: 2002 movel %d2,%d0 47772: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 47778: 4e5e unlk %fp 4777a: 4e75 rts return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 4777c: 2952 0014 movel %a2@,%a4@(20) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 47780: 7201 moveq #1,%d1 _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 47782: 200c movel %a4,%d0 47784: 0680 0000 0018 addil #24,%d0 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 4778a: 2079 0006 3b6a moveal 63b6a <_Per_CPU_Information+0xc>,%a0 47790: 2941 0048 movel %d1,%a4@(72) 47794: 42a8 0034 clrl %a0@(52) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 47798: 2153 0020 movel %a3@,%a0@(32) if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 4779c: 2140 0044 movel %d0,%a0@(68) _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 477a0: 4879 0004 ba70 pea 4ba70 <_Thread_queue_Timeout> 477a6: 2f2e 0010 movel %fp@(16),%sp@- 477aa: 2f00 movel %d0,%sp@- 477ac: 4eb9 0004 b68c jsr 4b68c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 477b2: 4eb9 0004 b190 jsr 4b190 <_Thread_Enable_dispatch> * a POSIX signal, then pthread_cond_wait returns spuriously, * 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. */ status = _Thread_Executing->Wait.return_code; 477b8: 2079 0006 3b6a moveal 63b6a <_Per_CPU_Information+0xc>,%a0 if ( status == EINTR ) status = 0; 477be: 7004 moveq #4,%d0 * 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. */ status = _Thread_Executing->Wait.return_code; if ( status == EINTR ) 477c0: 4fef 000c lea %sp@(12),%sp * a POSIX signal, then pthread_cond_wait returns spuriously, * 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. */ status = _Thread_Executing->Wait.return_code; 477c4: 2428 0034 movel %a0@(52),%d2 if ( status == EINTR ) status = 0; 477c8: b082 cmpl %d2,%d0 477ca: 56c0 sne %d0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 477cc: 2f0a movel %a2,%sp@- * returns a success status, except for the fact that it was not * woken up a pthread_cond_signal or a pthread_cond_broadcast. */ status = _Thread_Executing->Wait.return_code; if ( status == EINTR ) status = 0; 477ce: 49c0 extbl %d0 477d0: c480 andl %d0,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 477d2: 4eb9 0004 7a90 jsr 47a90 if ( mutex_status ) 477d8: 588f addql #4,%sp 477da: 4a80 tstl %d0 477dc: 6690 bnes 4776e <_POSIX_Condition_variables_Wait_support+0x92> 477de: 6000 ff5e braw 4773e <_POSIX_Condition_variables_Wait_support+0x62> ... =============================================================================== 000468d0 <_POSIX_Keys_Free_memory>: #include void _POSIX_Keys_Free_memory( POSIX_Keys_Control *the_key ) { 468d0: 4e56 0000 linkw %fp,#0 468d4: 2f0b movel %a3,%sp@- uint32_t the_api; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) _Workspace_Free( the_key->Values[ the_api ] ); 468d6: 47f9 0004 b1d6 lea 4b1d6 <_Workspace_Free>,%a3 #include void _POSIX_Keys_Free_memory( POSIX_Keys_Control *the_key ) { 468dc: 2f0a movel %a2,%sp@- 468de: 246e 0008 moveal %fp@(8),%a2 uint32_t the_api; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) _Workspace_Free( the_key->Values[ the_api ] ); 468e2: 2f2a 0018 movel %a2@(24),%sp@- 468e6: 4e93 jsr %a3@ 468e8: 2f2a 001c movel %a2@(28),%sp@- 468ec: 4e93 jsr %a3@ 468ee: 2d6a 0020 0008 movel %a2@(32),%fp@(8) 468f4: 508f addql #8,%sp } 468f6: 246e fff8 moveal %fp@(-8),%a2 468fa: 266e fffc moveal %fp@(-4),%a3 468fe: 4e5e unlk %fp ) { uint32_t the_api; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) _Workspace_Free( the_key->Values[ the_api ] ); 46900: 4ef9 0004 b1d6 jmp 4b1d6 <_Workspace_Free> ... =============================================================================== 0004e6bc <_POSIX_Keys_Run_destructors>: 4e6bc: 7218 moveq #24,%d1 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4e6be: 4e56 ffec linkw %fp,#-20 4e6c2: 206e 0008 moveal %fp@(8),%a0 4e6c6: 48d7 007c moveml %d2-%d6,%sp@ Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 4e6ca: 2628 0008 movel %a0@(8),%d3 4e6ce: 2003 movel %d3,%d0 4e6d0: e2a8 lsrl %d1,%d0 4e6d2: 123c 0007 moveb #7,%d1 4e6d6: c081 andl %d1,%d0 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 4e6d8: 0283 0000 ffff andil #65535,%d3 4e6de: 2c00 movel %d0,%d6 4e6e0: 5a86 addql #5,%d6 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 4e6e2: 3039 0006 139e movew 6139e <_POSIX_Keys_Information+0xe>,%d0 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 4e6e8: e58b lsll #2,%d3 Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4e6ea: 4a40 tstw %d0 4e6ec: 660a bnes 4e6f8 <_POSIX_Keys_Run_destructors+0x3c> done = false; } } } } } 4e6ee: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 4e6f4: 4e5e unlk %fp 4e6f6: 4e75 rts 4e6f8: 4285 clrl %d5 4e6fa: 7201 moveq #1,%d1 Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4e6fc: 7401 moveq #1,%d2 4e6fe: 7801 moveq #1,%d4 4e700: 3a00 movew %d0,%d5 POSIX_Keys_Control *key = (POSIX_Keys_Control *) 4e702: 2079 0006 13a8 moveal 613a8 <_POSIX_Keys_Information+0x18>,%a0 Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4e708: 5282 addql #1,%d2 POSIX_Keys_Control *key = (POSIX_Keys_Control *) 4e70a: 2070 1c00 moveal %a0@(00000000,%d1:l:4),%a0 _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 4e70e: 4a88 tstl %a0 4e710: 671e beqs 4e730 <_POSIX_Keys_Run_destructors+0x74> 4e712: 4aa8 0010 tstl %a0@(16) 4e716: 6718 beqs 4e730 <_POSIX_Keys_Run_destructors+0x74> void *value = key->Values [ thread_api ][ thread_index ]; 4e718: 2270 6c00 moveal %a0@(00000000,%d6:l:4),%a1 4e71c: d3c3 addal %d3,%a1 4e71e: 2211 movel %a1@,%d1 if ( value != NULL ) { 4e720: 670e beqs 4e730 <_POSIX_Keys_Run_destructors+0x74><== ALWAYS TAKEN key->Values [ thread_api ][ thread_index ] = NULL; 4e722: 4291 clrl %a1@ <== NOT EXECUTED (*key->destructor)( value ); done = false; 4e724: 4204 clrb %d4 <== NOT EXECUTED if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; if ( value != NULL ) { key->Values [ thread_api ][ thread_index ] = NULL; (*key->destructor)( value ); 4e726: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4e728: 2068 0010 moveal %a0@(16),%a0 <== NOT EXECUTED 4e72c: 4e90 jsr %a0@ <== NOT EXECUTED 4e72e: 588f addql #4,%sp <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4e730: 4281 clrl %d1 4e732: 3202 movew %d2,%d1 4e734: b285 cmpl %d5,%d1 4e736: 63ca blss 4e702 <_POSIX_Keys_Run_destructors+0x46> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 4e738: 4a04 tstb %d4 4e73a: 66b2 bnes 4e6ee <_POSIX_Keys_Run_destructors+0x32><== ALWAYS TAKEN Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 4e73c: 3039 0006 139e movew 6139e <_POSIX_Keys_Information+0xe>,%d0<== NOT EXECUTED done = true; for ( index = 1 ; index <= max ; ++index ) { 4e742: 67aa beqs 4e6ee <_POSIX_Keys_Run_destructors+0x32><== NOT EXECUTED 4e744: 60b2 bras 4e6f8 <_POSIX_Keys_Run_destructors+0x3c><== NOT EXECUTED ... =============================================================================== 0004c288 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 4c288: 4e56 ffe4 linkw %fp,#-28 4c28c: 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( 4c290: 486e fff8 pea %fp@(-8) 4c294: 242e 0008 movel %fp@(8),%d2 4c298: 2f02 movel %d2,%sp@- 4c29a: 4879 0006 abd4 pea 6abd4 <_POSIX_Message_queue_Information_fds> 4c2a0: 246e 0014 moveal %fp@(20),%a2 4c2a4: 162e 001b moveb %fp@(27),%d3 4c2a8: 4eb9 0004 f7d4 jsr 4f7d4 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4c2ae: 4fef 000c lea %sp@(12),%sp 4c2b2: 4aae fff8 tstl %fp@(-8) 4c2b6: 671a beqs 4c2d2 <_POSIX_Message_queue_Receive_support+0x4a> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c2b8: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c2be: 72ff moveq #-1,%d1 4c2c0: 2040 moveal %d0,%a0 4c2c2: 7009 moveq #9,%d0 } 4c2c4: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c2ca: 2080 movel %d0,%a0@ } 4c2cc: 2001 movel %d1,%d0 4c2ce: 4e5e unlk %fp 4c2d0: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 4c2d2: 2040 moveal %d0,%a0 4c2d4: 7803 moveq #3,%d4 4c2d6: 7a01 moveq #1,%d5 4c2d8: 2228 0014 movel %a0@(20),%d1 4c2dc: c881 andl %d1,%d4 4c2de: ba84 cmpl %d4,%d5 4c2e0: 6700 00c4 beqw 4c3a6 <_POSIX_Message_queue_Receive_support+0x11e> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4c2e4: 2068 0010 moveal %a0@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4c2e8: 202e 0010 movel %fp@(16),%d0 4c2ec: b0a8 0066 cmpl %a0@(102),%d0 4c2f0: 656a bcss 4c35c <_POSIX_Message_queue_Receive_support+0xd4> /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4c2f2: 70ff moveq #-1,%d0 4c2f4: 2d40 fffc movel %d0,%fp@(-4) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c2f8: 4a03 tstb %d3 4c2fa: 6756 beqs 4c352 <_POSIX_Message_queue_Receive_support+0xca> 4c2fc: 0801 000e btst #14,%d1 4c300: 57c0 seq %d0 4c302: 49c0 extbl %d0 4c304: 4480 negl %d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4c306: 2f2e 001c movel %fp@(28),%sp@- 4c30a: 2f00 movel %d0,%sp@- 4c30c: 486e fffc pea %fp@(-4) 4c310: 2f2e 000c movel %fp@(12),%sp@- 4c314: 2f02 movel %d2,%sp@- 4c316: 4868 001a pea %a0@(26) 4c31a: 4eb9 0004 e6f4 jsr 4e6f4 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4c320: 4eb9 0005 05a4 jsr 505a4 <_Thread_Enable_dispatch> if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count 4c326: 2079 0006 ac46 moveal 6ac46 <_Per_CPU_Information+0xc>,%a0 do_wait, timeout ); _Thread_Enable_dispatch(); if (msg_prio) { 4c32c: 4fef 0018 lea %sp@(24),%sp 4c330: 4a8a tstl %a2 4c332: 6708 beqs 4c33c <_POSIX_Message_queue_Receive_support+0xb4><== NEVER TAKEN RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return ((priority >= 0) ? priority : -priority); 4c334: 2028 0024 movel %a0@(36),%d0 4c338: 6d1c blts 4c356 <_POSIX_Message_queue_Receive_support+0xce> *msg_prio = _POSIX_Message_queue_Priority_from_core( 4c33a: 2480 movel %d0,%a2@ _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) 4c33c: 4aa8 0034 tstl %a0@(52) 4c340: 663a bnes 4c37c <_POSIX_Message_queue_Receive_support+0xf4> return length_out; 4c342: 222e fffc movel %fp@(-4),%d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c346: 2001 movel %d1,%d0 4c348: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c34e: 4e5e unlk %fp 4c350: 4e75 rts length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c352: 4280 clrl %d0 4c354: 60b0 bras 4c306 <_POSIX_Message_queue_Receive_support+0x7e> 4c356: 4480 negl %d0 timeout ); _Thread_Enable_dispatch(); if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( 4c358: 2480 movel %d0,%a2@ 4c35a: 60e0 bras 4c33c <_POSIX_Message_queue_Receive_support+0xb4> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 4c35c: 4eb9 0005 05a4 jsr 505a4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4c362: 747a moveq #122,%d2 4c364: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c36a: 72ff moveq #-1,%d1 4c36c: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c36e: 2001 movel %d1,%d0 the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4c370: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c372: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c378: 4e5e unlk %fp 4c37a: 4e75 rts } if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 4c37c: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c382: 2079 0006 ac46 moveal 6ac46 <_Per_CPU_Information+0xc>,%a0 4c388: 2440 moveal %d0,%a2 4c38a: 2f28 0034 movel %a0@(52),%sp@- 4c38e: 4eb9 0004 c65c jsr 4c65c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c394: 588f addql #4,%sp 4c396: 72ff moveq #-1,%d1 4c398: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c39a: 2001 movel %d1,%d0 4c39c: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c3a2: 4e5e unlk %fp 4c3a4: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 4c3a6: 4eb9 0005 05a4 jsr 505a4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4c3ac: 7609 moveq #9,%d3 4c3ae: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c3b4: 72ff moveq #-1,%d1 4c3b6: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c3b8: 2001 movel %d1,%d0 switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4c3ba: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c3bc: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c3c2: 4e5e unlk %fp ... =============================================================================== 0004c3ec <_POSIX_Message_queue_Send_support>: /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 4c3ec: 7020 moveq #32,%d0 size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 4c3ee: 4e56 ffe8 linkw %fp,#-24 4c3f2: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4c3f6: 262e 0008 movel %fp@(8),%d3 4c3fa: 242e 0014 movel %fp@(20),%d2 4c3fe: 182e 001b moveb %fp@(27),%d4 /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 4c402: b082 cmpl %d2,%d0 4c404: 6500 00e2 bcsw 4c4e8 <_POSIX_Message_queue_Send_support+0xfc> 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( 4c408: 486e fffc pea %fp@(-4) 4c40c: 2f03 movel %d3,%sp@- 4c40e: 4879 0006 abd4 pea 6abd4 <_POSIX_Message_queue_Information_fds> 4c414: 4eb9 0004 f7d4 jsr 4f7d4 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4c41a: 4fef 000c lea %sp@(12),%sp 4c41e: 4aae fffc tstl %fp@(-4) 4c422: 6600 00aa bnew 4c4ce <_POSIX_Message_queue_Send_support+0xe2> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 4c426: 2240 moveal %d0,%a1 4c428: 7a03 moveq #3,%d5 4c42a: 2229 0014 movel %a1@(20),%d1 4c42e: ca81 andl %d1,%d5 4c430: 6700 00d0 beqw 4c502 <_POSIX_Message_queue_Send_support+0x116> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4c434: 2240 moveal %d0,%a1 4c436: 2069 0010 moveal %a1@(16),%a0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c43a: 4a04 tstb %d4 4c43c: 6750 beqs 4c48e <_POSIX_Message_queue_Send_support+0xa2> do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c43e: 2f2e 001c movel %fp@(28),%sp@- 4c442: 4482 negl %d2 the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c444: 0801 000e btst #14,%d1 4c448: 57c0 seq %d0 4c44a: 49c0 extbl %d0 4c44c: 4480 negl %d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c44e: 2f00 movel %d0,%sp@- 4c450: 2f02 movel %d2,%sp@- 4c452: 42a7 clrl %sp@- 4c454: 2f03 movel %d3,%sp@- 4c456: 2f2e 0010 movel %fp@(16),%sp@- 4c45a: 2f2e 000c movel %fp@(12),%sp@- 4c45e: 4868 001a pea %a0@(26) 4c462: 4eb9 0004 e830 jsr 4e830 <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4c468: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c46c: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4c46e: 4eb9 0005 05a4 jsr 505a4 <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4c474: 7007 moveq #7,%d0 4c476: b082 cmpl %d2,%d0 4c478: 6748 beqs 4c4c2 <_POSIX_Message_queue_Send_support+0xd6> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 4c47a: 4a82 tstl %d2 4c47c: 6600 00a4 bnew 4c522 <_POSIX_Message_queue_Send_support+0x136> return msg_status; 4c480: 4281 clrl %d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c482: 2001 movel %d1,%d0 4c484: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c48a: 4e5e unlk %fp 4c48c: 4e75 rts do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c48e: 2f2e 001c movel %fp@(28),%sp@- the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c492: 4280 clrl %d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c494: 4482 negl %d2 4c496: 2f00 movel %d0,%sp@- 4c498: 2f02 movel %d2,%sp@- 4c49a: 42a7 clrl %sp@- 4c49c: 2f03 movel %d3,%sp@- 4c49e: 2f2e 0010 movel %fp@(16),%sp@- 4c4a2: 2f2e 000c movel %fp@(12),%sp@- 4c4a6: 4868 001a pea %a0@(26) 4c4aa: 4eb9 0004 e830 jsr 4e830 <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4c4b0: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c4b4: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4c4b6: 4eb9 0005 05a4 jsr 505a4 <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4c4bc: 7007 moveq #7,%d0 4c4be: b082 cmpl %d2,%d0 4c4c0: 66b8 bnes 4c47a <_POSIX_Message_queue_Send_support+0x8e><== ALWAYS TAKEN msg_status = _Thread_Executing->Wait.return_code; 4c4c2: 2079 0006 ac46 moveal 6ac46 <_Per_CPU_Information+0xc>,%a0 4c4c8: 2428 0034 movel %a0@(52),%d2 4c4cc: 60ac bras 4c47a <_POSIX_Message_queue_Send_support+0x8e> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c4ce: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c4d4: 72ff moveq #-1,%d1 4c4d6: 2040 moveal %d0,%a0 4c4d8: 7009 moveq #9,%d0 } 4c4da: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c4e0: 2080 movel %d0,%a0@ } 4c4e2: 2001 movel %d1,%d0 4c4e4: 4e5e unlk %fp 4c4e6: 4e75 rts * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 4c4e8: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c4ee: 7616 moveq #22,%d3 4c4f0: 72ff moveq #-1,%d1 4c4f2: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c4f4: 2001 movel %d1,%d0 * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 4c4f6: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c4f8: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c4fe: 4e5e unlk %fp 4c500: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); 4c502: 4eb9 0005 05a4 jsr 505a4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4c508: 7409 moveq #9,%d2 4c50a: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c510: 72ff moveq #-1,%d1 4c512: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c514: 2001 movel %d1,%d0 switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4c516: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c518: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c51e: 4e5e unlk %fp 4c520: 4e75 rts msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 4c522: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c528: 2440 moveal %d0,%a2 4c52a: 2f02 movel %d2,%sp@- 4c52c: 4eb9 0004 c65c jsr 4c65c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c532: 588f addql #4,%sp 4c534: 72ff moveq #-1,%d1 4c536: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c538: 2001 movel %d1,%d0 4c53a: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c540: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c05c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 4c05c: 4e56 0000 linkw %fp,#0 4c060: 226e 0008 moveal %fp@(8),%a1 POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c064: 2069 0102 moveal %a1@(258),%a0 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4c068: 4aa8 00d8 tstl %a0@(216) 4c06c: 6608 bnes 4c076 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a><== NEVER TAKEN 4c06e: 7001 moveq #1,%d0 4c070: b0a8 00dc cmpl %a0@(220),%d0 4c074: 6708 beqs 4c07e <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 4c076: 4e5e unlk %fp thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 4c078: 4ef9 0004 92d8 jmp 492d8 <_Thread_Enable_dispatch> POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 4c07e: 4aa8 00e0 tstl %a0@(224) 4c082: 67f2 beqs 4c076 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 4c084: 2039 0006 14bc movel 614bc <_Thread_Dispatch_disable_level>,%d0 thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 4c08a: 4878 ffff pea ffffffff 4c08e: 5380 subql #1,%d0 4c090: 23c0 0006 14bc movel %d0,614bc <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 4c096: 2039 0006 14bc movel 614bc <_Thread_Dispatch_disable_level>,%d0 4c09c: 2f09 movel %a1,%sp@- 4c09e: 4eb9 0004 c798 jsr 4c798 <_POSIX_Thread_Exit> 4c0a4: 508f addql #8,%sp } else _Thread_Enable_dispatch(); } 4c0a6: 4e5e unlk %fp ... =============================================================================== 0004d6b0 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4d6b0: 4e56 ffe8 linkw %fp,#-24 4d6b4: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4d6b8: 246e 000c moveal %fp@(12),%a2 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4d6bc: 47f9 0004 d68c lea 4d68c <_POSIX_Priority_Is_valid>,%a3 4d6c2: 2f12 movel %a2@,%sp@- int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4d6c4: 242e 0008 movel %fp@(8),%d2 4d6c8: 286e 0010 moveal %fp@(16),%a4 4d6cc: 2a6e 0014 moveal %fp@(20),%a5 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4d6d0: 4e93 jsr %a3@ 4d6d2: 588f addql #4,%sp 4d6d4: 4a00 tstb %d0 4d6d6: 660c bnes 4d6e4 <_POSIX_Thread_Translate_sched_param+0x34><== ALWAYS TAKEN if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; 4d6d8: 7016 moveq #22,%d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d6da: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d6e0: 4e5e unlk %fp 4d6e2: 4e75 rts ) { if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4d6e4: 4294 clrl %a4@ *budget_callout = NULL; 4d6e6: 4295 clrl %a5@ if ( policy == SCHED_OTHER ) { 4d6e8: 4a82 tstl %d2 4d6ea: 676c beqs 4d758 <_POSIX_Thread_Translate_sched_param+0xa8> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 4d6ec: 7001 moveq #1,%d0 4d6ee: b082 cmpl %d2,%d0 4d6f0: 6776 beqs 4d768 <_POSIX_Thread_Translate_sched_param+0xb8> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 4d6f2: 103c 0002 moveb #2,%d0 4d6f6: b082 cmpl %d2,%d0 4d6f8: 677a beqs 4d774 <_POSIX_Thread_Translate_sched_param+0xc4> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 4d6fa: 7004 moveq #4,%d0 4d6fc: b082 cmpl %d2,%d0 4d6fe: 66d8 bnes 4d6d8 <_POSIX_Thread_Translate_sched_param+0x28> if ( (param->sched_ss_repl_period.tv_sec == 0) && 4d700: 4aaa 0008 tstl %a2@(8) 4d704: 6606 bnes 4d70c <_POSIX_Thread_Translate_sched_param+0x5c> 4d706: 4aaa 000c tstl %a2@(12) 4d70a: 67cc beqs 4d6d8 <_POSIX_Thread_Translate_sched_param+0x28> (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 4d70c: 4aaa 0010 tstl %a2@(16) 4d710: 6606 bnes 4d718 <_POSIX_Thread_Translate_sched_param+0x68> 4d712: 4aaa 0014 tstl %a2@(20) 4d716: 67c0 beqs 4d6d8 <_POSIX_Thread_Translate_sched_param+0x28> (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4d718: 486a 0008 pea %a2@(8) 4d71c: 243c 0004 aeec movel #306924,%d2 4d722: 2042 moveal %d2,%a0 4d724: 4e90 jsr %a0@ _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 4d726: 486a 0010 pea %a2@(16) if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4d72a: 2600 movel %d0,%d3 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 4d72c: 2042 moveal %d2,%a0 4d72e: 4e90 jsr %a0@ if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4d730: 508f addql #8,%sp 4d732: b083 cmpl %d3,%d0 4d734: 62a2 bhis 4d6d8 <_POSIX_Thread_Translate_sched_param+0x28> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 4d736: 2f2a 0004 movel %a2@(4),%sp@- 4d73a: 4e93 jsr %a3@ 4d73c: 588f addql #4,%sp 4d73e: 4a00 tstb %d0 4d740: 6796 beqs 4d6d8 <_POSIX_Thread_Translate_sched_param+0x28> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4d742: 7003 moveq #3,%d0 4d744: 2880 movel %d0,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 4d746: 4280 clrl %d0 if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4d748: 2abc 0004 726e movel #291438,%a5@ return 0; } return EINVAL; } 4d74e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d754: 4e5e unlk %fp 4d756: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4d758: 7401 moveq #1,%d2 return 0; 4d75a: 4280 clrl %d0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4d75c: 2882 movel %d2,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d75e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d764: 4e5e unlk %fp 4d766: 4e75 rts return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; 4d768: 4280 clrl %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d76a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d770: 4e5e unlk %fp 4d772: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4d774: 7202 moveq #2,%d1 return 0; 4d776: 4200 clrb %d0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4d778: 2881 movel %d1,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d77a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d780: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c3aa <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 4c3aa: 4e56 ffec linkw %fp,#-20 4c3ae: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4c3b2: 266e 000c moveal %fp@(12),%a3 4c3b6: 45f9 0004 95a4 lea 495a4 <_Thread_queue_Dequeue>,%a2 api = deleted->API_Extensions[ THREAD_API_POSIX ]; /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 4c3bc: 2f0b movel %a3,%sp@- { Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 4c3be: 286b 0102 moveal %a3@(258),%a4 4c3c2: 240c movel %a4,%d2 4c3c4: 0682 0000 0044 addil #68,%d2 /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 4c3ca: 4eb9 0004 e650 jsr 4e650 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 4c3d0: 2f0b movel %a3,%sp@- 4c3d2: 4eb9 0004 e6bc jsr 4e6bc <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 4c3d8: 262b 0028 movel %a3@(40),%d3 while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 4c3dc: 508f addql #8,%sp 4c3de: 2f02 movel %d2,%sp@- 4c3e0: 4e92 jsr %a2@ 4c3e2: 588f addql #4,%sp 4c3e4: 4a80 tstl %d0 4c3e6: 6712 beqs 4c3fa <_POSIX_Threads_Delete_extension+0x50><== ALWAYS TAKEN *(void **)the_thread->Wait.return_argument = value_ptr; 4c3e8: 2240 moveal %d0,%a1 <== NOT EXECUTED 4c3ea: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED 4c3ee: 2083 movel %d3,%a0@ <== NOT EXECUTED /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 4c3f0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c3f2: 4e92 jsr %a2@ <== NOT EXECUTED 4c3f4: 588f addql #4,%sp <== NOT EXECUTED 4c3f6: 4a80 tstl %d0 <== NOT EXECUTED 4c3f8: 66ee bnes 4c3e8 <_POSIX_Threads_Delete_extension+0x3e><== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 4c3fa: 103c 0004 moveb #4,%d0 4c3fe: b0ac 0084 cmpl %a4@(132),%d0 4c402: 6716 beqs 4c41a <_POSIX_Threads_Delete_extension+0x70> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 4c404: 42ab 0102 clrl %a3@(258) _Workspace_Free( api ); 4c408: 2d4c 0008 movel %a4,%fp@(8) } 4c40c: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4c412: 4e5e unlk %fp if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; _Workspace_Free( api ); 4c414: 4ef9 0004 a2fe jmp 4a2fe <_Workspace_Free> while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 4c41a: 486c 00a8 pea %a4@(168) 4c41e: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 4c424: 588f addql #4,%sp deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 4c426: 42ab 0102 clrl %a3@(258) _Workspace_Free( api ); 4c42a: 2d4c 0008 movel %a4,%fp@(8) } 4c42e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4c434: 4e5e unlk %fp if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; _Workspace_Free( api ); 4c436: 4ef9 0004 a2fe jmp 4a2fe <_Workspace_Free> =============================================================================== 00046efc <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 46efc: 4e56 ff98 linkw %fp,#-104 46f00: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%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; 46f04: 2479 0006 07a4 moveal 607a4 ,%a2 maximum = Configuration_POSIX_API.number_of_initialization_threads; 46f0a: 2839 0006 07a0 movel 607a0 ,%d4 if ( !user_threads || maximum == 0 ) 46f10: 4a8a tstl %a2 46f12: 675a beqs 46f6e <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN 46f14: 4a84 tstl %d4 46f16: 6756 beqs 46f6e <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN 46f18: 240e movel %fp,%d2 46f1a: 2a0e movel %fp,%d5 46f1c: 4283 clrl %d3 46f1e: 0682 ffff ffbc addil #-68,%d2 46f24: 2c3c 0004 d784 movel #317316,%d6 46f2a: 4bf9 0004 d7b0 lea 4d7b0 ,%a5 46f30: 49f9 0004 d7ec lea 4d7ec ,%a4 46f36: 5985 subql #4,%d5 46f38: 47f9 0004 6af8 lea 46af8 ,%a3 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 46f3e: 2f02 movel %d2,%sp@- 46f40: 2046 moveal %d6,%a0 46f42: 4e90 jsr %a0@ (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 46f44: 4878 0002 pea 2 46f48: 2f02 movel %d2,%sp@- 46f4a: 4e95 jsr %a5@ (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 46f4c: 2f2a 0004 movel %a2@(4),%sp@- 46f50: 2f02 movel %d2,%sp@- 46f52: 4e94 jsr %a4@ status = pthread_create( 46f54: 42a7 clrl %sp@- 46f56: 2f12 movel %a2@,%sp@- 46f58: 2f02 movel %d2,%sp@- 46f5a: 2f05 movel %d5,%sp@- 46f5c: 4e93 jsr %a3@ &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 46f5e: 4fef 0024 lea %sp@(36),%sp 46f62: 4a80 tstl %d0 46f64: 6612 bnes 46f78 <_POSIX_Threads_Initialize_user_threads_body+0x7c> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 46f66: 5283 addql #1,%d3 46f68: 508a addql #8,%a2 46f6a: b684 cmpl %d4,%d3 46f6c: 66d0 bnes 46f3e <_POSIX_Threads_Initialize_user_threads_body+0x42><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 46f6e: 4cee 3c7c ff98 moveml %fp@(-104),%d2-%d6/%a2-%a5 46f74: 4e5e unlk %fp 46f76: 4e75 rts &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 46f78: 2f00 movel %d0,%sp@- 46f7a: 4878 0001 pea 1 46f7e: 4878 0002 pea 2 46f82: 4eb9 0004 9098 jsr 49098 <_Internal_error_Occurred> =============================================================================== 0004c5a6 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 4c5a6: 4e56 fff4 linkw %fp,#-12 4c5aa: 48d7 1c00 moveml %a2-%a4,%sp@ 4c5ae: 266e 000c moveal %fp@(12),%a3 the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 4c5b2: 49f9 0004 d418 lea 4d418 <_Timespec_To_ticks>,%a4 Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c5b8: 246b 0102 moveal %a3@(258),%a2 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 4c5bc: 486a 0098 pea %a2@(152) 4c5c0: 4e94 jsr %a4@ */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4c5c2: 588f addql #4,%sp RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4c5c4: 4281 clrl %d1 4c5c6: 1239 0005 f6aa moveb 5f6aa ,%d1 4c5cc: 92aa 0088 subl %a2@(136),%d1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; 4c5d0: 2740 0076 movel %d0,%a3@(118) new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 4c5d4: 2741 0018 movel %d1,%a3@(24) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4c5d8: 4aab 001c tstl %a3@(28) 4c5dc: 6606 bnes 4c5e4 <_POSIX_Threads_Sporadic_budget_TSR+0x3e><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 4c5de: b2ab 0014 cmpl %a3@(20),%d1 4c5e2: 652c bcss 4c610 <_POSIX_Threads_Sporadic_budget_TSR+0x6a> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 4c5e4: 486a 0090 pea %a2@(144) 4c5e8: 4e94 jsr %a4@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4c5ea: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4c5ec: 2540 00b4 movel %d0,%a2@(180) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 4c5f0: 45ea 00a8 lea %a2@(168),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4c5f4: 203c 0006 1100 movel #397568,%d0 4c5fa: 2d4a 000c movel %a2,%fp@(12) } 4c5fe: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4c604: 2d40 0008 movel %d0,%fp@(8) 4c608: 4e5e unlk %fp 4c60a: 4ef9 0004 a018 jmp 4a018 <_Watchdog_Insert> if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 4c610: 4878 0001 pea 1 4c614: 2f01 movel %d1,%sp@- 4c616: 2f0b movel %a3,%sp@- 4c618: 4eb9 0004 8d38 jsr 48d38 <_Thread_Change_priority> 4c61e: 4fef 000c lea %sp@(12),%sp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 4c622: 486a 0090 pea %a2@(144) 4c626: 4e94 jsr %a4@ 4c628: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4c62a: 2540 00b4 movel %d0,%a2@(180) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 4c62e: 45ea 00a8 lea %a2@(168),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4c632: 203c 0006 1100 movel #397568,%d0 4c638: 2d4a 000c movel %a2,%fp@(12) } 4c63c: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4c642: 2d40 0008 movel %d0,%fp@(8) 4c646: 4e5e unlk %fp 4c648: 4ef9 0004 a018 jmp 4a018 <_Watchdog_Insert> =============================================================================== 0004c64e <_POSIX_Threads_Sporadic_budget_callout>: 4c64e: 4280 clrl %d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4c650: 72ff moveq #-1,%d1 * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 4c652: 4e56 0000 linkw %fp,#0 4c656: 206e 0008 moveal %fp@(8),%a0 4c65a: 1039 0005 f6aa moveb 5f6aa ,%d0 POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c660: 2268 0102 moveal %a0@(258),%a1 4c664: 90a9 008c subl %a1@(140),%d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4c668: 2141 0076 movel %d1,%a0@(118) new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 4c66c: 2140 0018 movel %d0,%a0@(24) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4c670: 4aa8 001c tstl %a0@(28) 4c674: 6606 bnes 4c67c <_POSIX_Threads_Sporadic_budget_callout+0x2e><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 4c676: b0a8 0014 cmpl %a0@(20),%d0 4c67a: 6204 bhis 4c680 <_POSIX_Threads_Sporadic_budget_callout+0x32><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } 4c67c: 4e5e unlk %fp <== NOT EXECUTED 4c67e: 4e75 rts <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 4c680: 4878 0001 pea 1 4c684: 2f00 movel %d0,%sp@- 4c686: 2f08 movel %a0,%sp@- 4c688: 4eb9 0004 8d38 jsr 48d38 <_Thread_Change_priority> 4c68e: 4fef 000c lea %sp@(12),%sp #if 0 printk( "lower priority\n" ); #endif } } } 4c692: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e650 <_POSIX_Threads_cancel_run>: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4e650: 7001 moveq #1,%d0 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4e652: 4e56 ffec linkw %fp,#-20 4e656: 206e 0008 moveal %fp@(8),%a0 4e65a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e65e: 2668 0102 moveal %a0@(258),%a3 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4e662: 240b movel %a3,%d2 4e664: 0682 0000 00e8 addil #232,%d2 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4e66a: 2740 00d8 movel %d0,%a3@(216) while ( !_Chain_Is_empty( handler_stack ) ) { 4e66e: b4ab 00e4 cmpl %a3@(228),%d2 4e672: 673c beqs 4e6b0 <_POSIX_Threads_cancel_run+0x60> 4e674: 49f9 0004 a2fe lea 4a2fe <_Workspace_Free>,%a4 _ISR_Disable( level ); 4e67a: 263c 0000 0700 movel #1792,%d3 4e680: 2003 movel %d3,%d0 4e682: 40c1 movew %sr,%d1 4e684: 8081 orl %d1,%d0 4e686: 46c0 movew %d0,%sr handler = (POSIX_Cancel_Handler_control *) 4e688: 246b 00ec moveal %a3@(236),%a2 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4e68c: 2252 moveal %a2@,%a1 previous = the_node->previous; 4e68e: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4e692: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4e696: 2089 movel %a1,%a0@ _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4e698: 46c1 movew %d1,%sr (*handler->routine)( handler->arg ); 4e69a: 2f2a 000c movel %a2@(12),%sp@- 4e69e: 206a 0008 moveal %a2@(8),%a0 4e6a2: 4e90 jsr %a0@ _Workspace_Free( handler ); 4e6a4: 2f0a movel %a2,%sp@- 4e6a6: 4e94 jsr %a4@ handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 4e6a8: 508f addql #8,%sp 4e6aa: b4ab 00e4 cmpl %a3@(228),%d2 4e6ae: 66d0 bnes 4e680 <_POSIX_Threads_cancel_run+0x30> <== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 4e6b0: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4e6b6: 4e5e unlk %fp ... =============================================================================== 000467d0 <_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) { 467d0: 4e56 0000 linkw %fp,#0 467d4: 2f0a movel %a2,%sp@- 467d6: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 467da: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 467de: 4aaa 0052 tstl %a2@(82) 467e2: 6606 bnes 467ea <_POSIX_Timer_TSR+0x1a> 467e4: 4aaa 0056 tstl %a2@(86) 467e8: 672a beqs 46814 <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 467ea: 2f0a movel %a2,%sp@- 467ec: 4879 0004 67d0 pea 467d0 <_POSIX_Timer_TSR> 467f2: 2f2a 0008 movel %a2@(8),%sp@- 467f6: 2f2a 0062 movel %a2@(98),%sp@- 467fa: 486a 0010 pea %a2@(16) 467fe: 4eb9 0004 ce90 jsr 4ce90 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 46804: 4fef 0014 lea %sp@(20),%sp 46808: 4a00 tstb %d0 4680a: 662a bnes 46836 <_POSIX_Timer_TSR+0x66> <== ALWAYS TAKEN /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; } 4680c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 46810: 4e5e unlk %fp <== NOT EXECUTED 46812: 4e75 rts <== NOT EXECUTED /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 46814: 7004 moveq #4,%d0 <== NOT EXECUTED 46816: 1540 003c moveb %d0,%a2@(60) <== 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 ) ) { 4681a: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 4681e: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 46822: 4eb9 0004 c9b4 jsr 4c9b4 <== NOT EXECUTED } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 46828: 508f addql #8,%sp <== NOT EXECUTED 4682a: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED } 4682e: 246e fffc moveal %fp@(-4),%a2 46832: 4e5e unlk %fp 46834: 4e75 rts ); if ( !activated ) return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 46836: 486a 006a pea %a2@(106) 4683a: 4eb9 0004 800c jsr 4800c <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 46840: 588f addql #4,%sp 46842: 7003 moveq #3,%d0 46844: 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 ) ) { 46848: 2f2a 0042 movel %a2@(66),%sp@- 4684c: 2f2a 0038 movel %a2@(56),%sp@- 46850: 4eb9 0004 c9b4 jsr 4c9b4 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 46856: 508f addql #8,%sp 46858: 42aa 0066 clrl %a2@(102) 4685c: 60d0 bras 4682e <_POSIX_Timer_TSR+0x5e> ... =============================================================================== 0004f004 <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4f004: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Clear_process_signals( int signo ) { 4f00a: 4e56 0000 linkw %fp,#0 4f00e: 222e 0008 movel %fp@(8),%d1 4f012: 2f03 movel %d3,%sp@- 4f014: 2f02 movel %d2,%sp@- clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4f016: 40c2 movew %sr,%d2 4f018: 8082 orl %d2,%d0 4f01a: 46c0 movew %d0,%sr if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4f01c: 2601 movel %d1,%d3 4f01e: 2001 movel %d1,%d0 4f020: 41f9 0006 14e4 lea 614e4 <_POSIX_signals_Vectors>,%a0 4f026: e58b lsll #2,%d3 4f028: e988 lsll #4,%d0 4f02a: 9083 subl %d3,%d0 4f02c: 7602 moveq #2,%d3 4f02e: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3 4f032: 6718 beqs 4f04c <_POSIX_signals_Clear_process_signals+0x48> 4f034: 5381 subql #1,%d1 4f036: 7001 moveq #1,%d0 4f038: e3a8 lsll %d1,%d0 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4f03a: 4680 notl %d0 4f03c: c1b9 0006 16d8 andl %d0,616d8 <_POSIX_signals_Pending> } _ISR_Enable( level ); 4f042: 46c2 movew %d2,%sr } 4f044: 241f movel %sp@+,%d2 4f046: 261f movel %sp@+,%d3 4f048: 4e5e unlk %fp 4f04a: 4e75 rts ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4f04c: 0680 0006 16dc addil #399068,%d0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4f052: 2040 moveal %d0,%a0 4f054: 5888 addql #4,%a0 4f056: 2240 moveal %d0,%a1 4f058: b1d1 cmpal %a1@,%a0 4f05a: 67d8 beqs 4f034 <_POSIX_signals_Clear_process_signals+0x30><== ALWAYS TAKEN clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); 4f05c: 46c2 movew %d2,%sr <== NOT EXECUTED } 4f05e: 241f movel %sp@+,%d2 <== NOT EXECUTED 4f060: 261f movel %sp@+,%d3 <== NOT EXECUTED 4f062: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 000475f4 <_POSIX_signals_Get_lowest>: sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 475f4: 701b moveq #27,%d0 #include int _POSIX_signals_Get_lowest( sigset_t set ) { 475f6: 4e56 fff4 linkw %fp,#-12 475fa: 48d7 001c moveml %d2-%d4,%sp@ 475fe: 242e 0008 movel %fp@(8),%d2 47602: 7601 moveq #1,%d3 #include #include #include #include int _POSIX_signals_Get_lowest( 47604: 2200 movel %d0,%d1 47606: 5381 subql #1,%d1 47608: 2803 movel %d3,%d4 4760a: e3ac lsll %d1,%d4 4760c: 2204 movel %d4,%d1 ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 4760e: c282 andl %d2,%d1 47610: 6626 bnes 47638 <_POSIX_signals_Get_lowest+0x44> <== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 47612: 5280 addql #1,%d0 47614: 123c 0020 moveb #32,%d1 47618: b280 cmpl %d0,%d1 4761a: 66e8 bnes 47604 <_POSIX_signals_Get_lowest+0x10> 4761c: 7001 moveq #1,%d0 4761e: 7601 moveq #1,%d3 #include #include #include #include int _POSIX_signals_Get_lowest( 47620: 2200 movel %d0,%d1 47622: 5381 subql #1,%d1 47624: 2803 movel %d3,%d4 47626: e3ac lsll %d1,%d4 47628: 2204 movel %d4,%d1 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 4762a: c282 andl %d2,%d1 4762c: 660a bnes 47638 <_POSIX_signals_Get_lowest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4762e: 5280 addql #1,%d0 47630: 123c 001b moveb #27,%d1 47634: b280 cmpl %d0,%d1 47636: 66e8 bnes 47620 <_POSIX_signals_Get_lowest+0x2c> <== ALWAYS TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 47638: 4cd7 001c moveml %sp@,%d2-%d4 4763c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c13a <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4c13a: 4e56 ffec linkw %fp,#-20 4c13e: 206e 0008 moveal %fp@(8),%a0 4c142: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ POSIX_API_Control *api; int signo; ISR_Level level; int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c146: 2468 0102 moveal %a0@(258),%a2 /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; 4c14a: 2079 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a0 4c150: 2828 0034 movel %a0@(52),%d4 /* * api may be NULL in case of a thread close in progress */ if ( !api ) 4c154: 4a8a tstl %a2 4c156: 6700 0098 beqw 4c1f0 <_POSIX_signals_Post_switch_extension+0xb6> * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 4c15a: 263c 0000 0700 movel #1792,%d3 4c160: 47f9 0004 e748 lea 4e748 <_POSIX_signals_Check_signal>,%a3 4c166: 2003 movel %d3,%d0 4c168: 40c1 movew %sr,%d1 4c16a: 8081 orl %d1,%d0 4c16c: 46c0 movew %d0,%sr if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 4c16e: 2039 0006 16d8 movel 616d8 <_POSIX_signals_Pending>,%d0 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4c174: 242a 00d0 movel %a2@(208),%d2 4c178: 4682 notl %d2 (api->signals_pending | _POSIX_signals_Pending)) ) { 4c17a: 80aa 00d4 orl %a2@(212),%d0 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4c17e: c082 andl %d2,%d0 (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4c180: 46c1 movew %d1,%sr * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4c182: 4a80 tstl %d0 4c184: 6760 beqs 4c1e6 <_POSIX_signals_Post_switch_extension+0xac> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4c186: 741b moveq #27,%d2 _POSIX_signals_Check_signal( api, signo, false ); 4c188: 42a7 clrl %sp@- 4c18a: 2f02 movel %d2,%sp@- 4c18c: 2f0a movel %a2,%sp@- 4c18e: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4c190: 4878 0001 pea 1 4c194: 2f02 movel %d2,%sp@- _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4c196: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4c198: 2f0a movel %a2,%sp@- 4c19a: 4e93 jsr %a3@ _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4c19c: 4fef 0018 lea %sp@(24),%sp 4c1a0: 7020 moveq #32,%d0 4c1a2: b082 cmpl %d2,%d0 4c1a4: 66e2 bnes 4c188 <_POSIX_signals_Post_switch_extension+0x4e> 4c1a6: 7401 moveq #1,%d2 _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 4c1a8: 42a7 clrl %sp@- 4c1aa: 2f02 movel %d2,%sp@- 4c1ac: 2f0a movel %a2,%sp@- 4c1ae: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4c1b0: 4878 0001 pea 1 4c1b4: 2f02 movel %d2,%sp@- _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4c1b6: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4c1b8: 2f0a movel %a2,%sp@- 4c1ba: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4c1bc: 4fef 0018 lea %sp@(24),%sp 4c1c0: 701b moveq #27,%d0 4c1c2: b082 cmpl %d2,%d0 4c1c4: 67a0 beqs 4c166 <_POSIX_signals_Post_switch_extension+0x2c><== NEVER TAKEN _POSIX_signals_Check_signal( api, signo, false ); 4c1c6: 42a7 clrl %sp@- 4c1c8: 2f02 movel %d2,%sp@- 4c1ca: 2f0a movel %a2,%sp@- 4c1cc: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4c1ce: 4878 0001 pea 1 4c1d2: 2f02 movel %d2,%sp@- _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4c1d4: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4c1d6: 2f0a movel %a2,%sp@- 4c1d8: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4c1da: 4fef 0018 lea %sp@(24),%sp 4c1de: 701b moveq #27,%d0 4c1e0: b082 cmpl %d2,%d0 4c1e2: 66c4 bnes 4c1a8 <_POSIX_signals_Post_switch_extension+0x6e> 4c1e4: 6080 bras 4c166 <_POSIX_signals_Post_switch_extension+0x2c> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } _Thread_Executing->Wait.return_code = hold_errno; 4c1e6: 2079 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a0 4c1ec: 2144 0034 movel %d4,%a0@(52) } 4c1f0: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4c1f6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005d2c0 <_POSIX_signals_Unblock_thread>: 5d2c0: 7001 moveq #1,%d0 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 5d2c2: 4e56 ffec linkw %fp,#-20 5d2c6: 206e 000c moveal %fp@(12),%a0 5d2ca: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 5d2ce: 246e 0008 moveal %fp@(8),%a2 5d2d2: 2608 movel %a0,%d3 5d2d4: 5383 subql #1,%d3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 5d2d6: 222a 0010 movel %a2@(16),%d1 5d2da: 2401 movel %d1,%d2 5d2dc: 0282 1000 8000 andil #268468224,%d2 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 5d2e2: 282e 0010 movel %fp@(16),%d4 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5d2e6: 226a 0102 moveal %a2@(258),%a1 5d2ea: e7a8 lsll %d3,%d0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 5d2ec: 0c82 1000 8000 cmpil #268468224,%d2 5d2f2: 6770 beqs 5d364 <_POSIX_signals_Unblock_thread+0xa4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 5d2f4: 2429 00d0 movel %a1@(208),%d2 5d2f8: 4682 notl %d2 5d2fa: c082 andl %d2,%d0 5d2fc: 675a beqs 5d358 <_POSIX_signals_Unblock_thread+0x98> * 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 ) ) { 5d2fe: 0801 001c btst #28,%d1 5d302: 673e beqs 5d342 <_POSIX_signals_Unblock_thread+0x82> the_thread->Wait.return_code = EINTR; 5d304: 7004 moveq #4,%d0 5d306: 2540 0034 movel %d0,%a2@(52) */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 5d30a: 2001 movel %d1,%d0 5d30c: 0280 0003 bee0 andil #245472,%d0 /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 5d312: 6600 00a0 bnew 5d3b4 <_POSIX_signals_Unblock_thread+0xf4> _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { 5d316: 44c1 movew %d1,%ccr 5d318: 6a3e bpls 5d358 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 5d31a: 486a 0048 pea %a2@(72) 5d31e: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 5d324: 2f3c 1003 fff8 movel #268697592,%sp@- 5d32a: 2f0a movel %a2,%sp@- 5d32c: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> 5d332: 4fef 000c lea %sp@(12),%sp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 5d336: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 5d33c: 4200 clrb %d0 } 5d33e: 4e5e unlk %fp 5d340: 4e75 rts else if ( _States_Is_delaying(the_thread->current_state) ) { (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 5d342: 4a81 tstl %d1 5d344: 6612 bnes 5d358 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 5d346: 4ab9 0006 14a6 tstl 614a6 <_Per_CPU_Information+0x8> 5d34c: 670a beqs 5d358 <_POSIX_signals_Unblock_thread+0x98> 5d34e: b5f9 0006 14aa cmpal 614aa <_Per_CPU_Information+0xc>,%a2 5d354: 6700 0090 beqw 5d3e6 <_POSIX_signals_Unblock_thread+0x126> _Thread_Dispatch_necessary = true; } } return false; } 5d358: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 5d35e: 4200 clrb %d0 } 5d360: 4e5e unlk %fp 5d362: 4e75 rts * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 5d364: 2200 movel %d0,%d1 5d366: c2aa 0030 andl %a2@(48),%d1 5d36a: 672e beqs 5d39a <_POSIX_signals_Unblock_thread+0xda> the_thread->Wait.return_code = EINTR; 5d36c: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 5d36e: 266a 0028 moveal %a2@(40),%a3 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 5d372: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 5d376: 4a84 tstl %d4 5d378: 6750 beqs 5d3ca <_POSIX_signals_Unblock_thread+0x10a> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 5d37a: 2244 moveal %d4,%a1 5d37c: 204b moveal %a3,%a0 5d37e: 20d9 movel %a1@+,%a0@+ 5d380: 20d9 movel %a1@+,%a0@+ 5d382: 2091 movel %a1@,%a0@ } _Thread_queue_Extract_with_proxy( the_thread ); 5d384: 2f0a movel %a2,%sp@- 5d386: 4eb9 0004 9934 jsr 49934 <_Thread_queue_Extract_with_proxy> return true; 5d38c: 588f addql #4,%sp 5d38e: 7001 moveq #1,%d0 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 5d390: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5d396: 4e5e unlk %fp 5d398: 4e75 rts * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 5d39a: 2229 00d0 movel %a1@(208),%d1 5d39e: 4681 notl %d1 5d3a0: c081 andl %d1,%d0 5d3a2: 67b4 beqs 5d358 <_POSIX_signals_Unblock_thread+0x98> the_thread->Wait.return_code = EINTR; 5d3a4: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 5d3a6: 266a 0028 moveal %a2@(40),%a3 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 5d3aa: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 5d3ae: 4a84 tstl %d4 5d3b0: 66c8 bnes 5d37a <_POSIX_signals_Unblock_thread+0xba><== ALWAYS TAKEN 5d3b2: 6016 bras 5d3ca <_POSIX_signals_Unblock_thread+0x10a><== NOT EXECUTED /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); 5d3b4: 2f0a movel %a2,%sp@- 5d3b6: 4eb9 0004 9934 jsr 49934 <_Thread_queue_Extract_with_proxy> 5d3bc: 588f addql #4,%sp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 5d3be: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 5d3c4: 4200 clrb %d0 } 5d3c6: 4e5e unlk %fp 5d3c8: 4e75 rts the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 5d3ca: 103c 0001 moveb #1,%d0 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 5d3ce: 2688 movel %a0,%a3@ the_info->si_code = SI_USER; 5d3d0: 2740 0004 movel %d0,%a3@(4) the_info->si_value.sival_int = 0; 5d3d4: 42ab 0008 clrl %a3@(8) } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 5d3d8: 2f0a movel %a2,%sp@- 5d3da: 4eb9 0004 9934 jsr 49934 <_Thread_queue_Extract_with_proxy> return true; 5d3e0: 588f addql #4,%sp 5d3e2: 7001 moveq #1,%d0 5d3e4: 60aa bras 5d390 <_POSIX_signals_Unblock_thread+0xd0> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 5d3e6: 7001 moveq #1,%d0 } } return false; } 5d3e8: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5d3ee: 4e5e unlk %fp _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 5d3f0: 13c0 0006 14b6 moveb %d0,614b6 <_Per_CPU_Information+0x18> } } return false; 5d3f6: 4200 clrb %d0 } ... =============================================================================== 0004d5b0 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4d5b0: 4e56 fff0 linkw %fp,#-16 * This routine returns true if thread dispatch indicates * that we are in a critical section. */ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) { if ( _Thread_Dispatch_disable_level == 0 ) 4d5b4: 2039 0006 7254 movel 67254 <_Thread_Dispatch_disable_level>,%d0 4d5ba: 48d7 001c moveml %d2-%d4,%sp@ 4d5be: 242e 0008 movel %fp@(8),%d2 4d5c2: 282e 000c movel %fp@(12),%d4 4d5c6: 162e 0013 moveb %fp@(19),%d3 4d5ca: 4a80 tstl %d0 4d5cc: 6640 bnes 4d60e <_Protected_heap_Walk+0x5e> * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); 4d5ce: 2f39 0006 72f4 movel 672f4 <_RTEMS_Allocator_Mutex>,%sp@- status = _Heap_Walk( the_heap, source, do_dump ); 4d5d4: 0283 0000 00ff andil #255,%d3 * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); 4d5da: 4eb9 0004 b7d0 jsr 4b7d0 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 4d5e0: 2f03 movel %d3,%sp@- 4d5e2: 2f04 movel %d4,%sp@- 4d5e4: 2f02 movel %d2,%sp@- 4d5e6: 4eb9 0004 c69e jsr 4c69e <_Heap_Walk> _RTEMS_Unlock_allocator(); 4d5ec: 2f39 0006 72f4 movel 672f4 <_RTEMS_Allocator_Mutex>,%sp@- 4d5f2: 2d40 fffc movel %d0,%fp@(-4) 4d5f6: 4eb9 0004 b830 jsr 4b830 <_API_Mutex_Unlock> } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4d5fc: 202e fffc movel %fp@(-4),%d0 * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); 4d600: 4fef 0014 lea %sp@(20),%sp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4d604: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4d60a: 4e5e unlk %fp 4d60c: 4e75 rts if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4d60e: 2d44 000c movel %d4,%fp@(12) 4d612: 0283 0000 00ff andil #255,%d3 4d618: 2d42 0008 movel %d2,%fp@(8) 4d61c: 2d43 0010 movel %d3,%fp@(16) } return status; } 4d620: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4d626: 4e5e unlk %fp if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4d628: 4ef9 0004 c69e jmp 4c69e <_Heap_Walk> ... =============================================================================== 0004dd38 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 4dd38: 4e56 ffec linkw %fp,#-20 4dd3c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4dd40: 2a6e 0008 moveal %fp@(8),%a5 4dd44: 266e 000c moveal %fp@(12),%a3 RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 4dd48: 4a8b tstl %a3 4dd4a: 6700 00b0 beqw 4ddfc <_RBTree_Extract_unprotected+0xc4> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 4dd4e: b7ed 0008 cmpal %a5@(8),%a3 4dd52: 6700 00f6 beqw 4de4a <_RBTree_Extract_unprotected+0x112> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 4dd56: b7ed 000c cmpal %a5@(12),%a3 4dd5a: 6700 00aa beqw 4de06 <_RBTree_Extract_unprotected+0xce> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 4dd5e: 246b 0004 moveal %a3@(4),%a2 4dd62: 4a8a tstl %a2 4dd64: 6700 00b6 beqw 4de1c <_RBTree_Extract_unprotected+0xe4> 4dd68: 4aab 0008 tstl %a3@(8) 4dd6c: 6700 00f0 beqw 4de5e <_RBTree_Extract_unprotected+0x126> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 4dd70: 202a 0008 movel %a2@(8),%d0 4dd74: 6708 beqs 4dd7e <_RBTree_Extract_unprotected+0x46> 4dd76: 2440 moveal %d0,%a2 4dd78: 202a 0008 movel %a2@(8),%d0 4dd7c: 66f8 bnes 4dd76 <_RBTree_Extract_unprotected+0x3e> * target's position (target is the right child of target->parent) * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; 4dd7e: 286a 0004 moveal %a2@(4),%a4 if(leaf) { 4dd82: 4a8c tstl %a4 4dd84: 6700 00f4 beqw 4de7a <_RBTree_Extract_unprotected+0x142> leaf->parent = target->parent; 4dd88: 2892 movel %a2@,%a4@ } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; 4dd8a: 2252 moveal %a2@,%a1 4dd8c: b5e9 0004 cmpal %a1@(4),%a2 4dd90: 56c0 sne %d0 target->parent->child[dir] = leaf; 4dd92: 7201 moveq #1,%d1 /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = target; 4dd94: 7401 moveq #1,%d2 } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; 4dd96: 49c0 extbl %d0 target->parent->child[dir] = leaf; 4dd98: 9280 subl %d0,%d1 /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 4dd9a: 2053 moveal %a3@,%a0 /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; target->parent->child[dir] = leaf; 4dd9c: 238c 1c00 movel %a4,%a1@(00000000,%d1:l:4) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 4dda0: b7e8 0004 cmpal %a0@(4),%a3 4dda4: 56c1 sne %d1 leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; 4dda6: 202a 000c movel %a2@(12),%d0 dir = target != target->parent->child[0]; target->parent->child[dir] = leaf; /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 4ddaa: 49c1 extbl %d1 the_node->parent->child[dir] = target; 4ddac: 9481 subl %d1,%d2 4ddae: 218a 2c00 movel %a2,%a0@(00000000,%d2:l:4) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; 4ddb2: 256b 0008 0008 movel %a3@(8),%a2@(8) if (the_node->child[RBT_RIGHT]) 4ddb8: 206b 0008 moveal %a3@(8),%a0 4ddbc: 4a88 tstl %a0 4ddbe: 6702 beqs 4ddc2 <_RBTree_Extract_unprotected+0x8a><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; 4ddc0: 208a movel %a2,%a0@ target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 4ddc2: 256b 0004 0004 movel %a3@(4),%a2@(4) if (the_node->child[RBT_LEFT]) 4ddc8: 206b 0004 moveal %a3@(4),%a0 4ddcc: 4a88 tstl %a0 4ddce: 6702 beqs 4ddd2 <_RBTree_Extract_unprotected+0x9a> the_node->child[RBT_LEFT]->parent = target; 4ddd0: 208a movel %a2,%a0@ /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; 4ddd2: 2493 movel %a3@,%a2@ target->color = the_node->color; 4ddd4: 256b 000c 000c movel %a3@(12),%a2@(12) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 4ddda: 4a80 tstl %d0 4dddc: 6608 bnes 4dde6 <_RBTree_Extract_unprotected+0xae> if (leaf) { 4ddde: 4a8c tstl %a4 4dde0: 6704 beqs 4dde6 <_RBTree_Extract_unprotected+0xae> leaf->color = RBT_BLACK; /* case 2 */ 4dde2: 42ac 000c clrl %a4@(12) /* Wipe the_node */ _RBTree_Set_off_rbtree(the_node); /* set root to black, if it exists */ if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK; 4dde6: 206d 0004 moveal %a5@(4),%a0 */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; 4ddea: 42ab 0008 clrl %a3@(8) 4ddee: 42ab 0004 clrl %a3@(4) 4ddf2: 4293 clrl %a3@ 4ddf4: 4a88 tstl %a0 4ddf6: 6704 beqs 4ddfc <_RBTree_Extract_unprotected+0xc4> 4ddf8: 42a8 000c clrl %a0@(12) } 4ddfc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4de02: 4e5e unlk %fp 4de04: 4e75 rts the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) 4de06: 202b 0004 movel %a3@(4),%d0 4de0a: 6700 0098 beqw 4dea4 <_RBTree_Extract_unprotected+0x16c> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 4de0e: 246b 0004 moveal %a3@(4),%a2 } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 4de12: 2b40 000c movel %d0,%a5@(12) * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 4de16: 4a8a tstl %a2 4de18: 6600 ff4e bnew 4dd68 <_RBTree_Extract_unprotected+0x30> * the_node's location in the tree. This may cause the coloring to be * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; 4de1c: 286b 0008 moveal %a3@(8),%a4 if( leaf ) { 4de20: 4a8c tstl %a4 4de22: 663c bnes 4de60 <_RBTree_Extract_unprotected+0x128> leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4de24: 2f0b movel %a3,%sp@- } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4de26: 7401 moveq #1,%d2 the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4de28: 4eb9 0004 db3c jsr 4db3c <_RBTree_Extract_validate_unprotected> } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4de2e: 2053 moveal %a3@,%a0 4de30: b7e8 0004 cmpal %a0@(4),%a3 4de34: 56c1 sne %d1 leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; 4de36: 202b 000c movel %a3@(12),%d0 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4de3a: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4de3c: 9481 subl %d1,%d2 the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4de3e: 588f addql #4,%sp } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4de40: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 4de44: 4a80 tstl %d0 4de46: 669e bnes 4dde6 <_RBTree_Extract_unprotected+0xae> 4de48: 6094 bras 4ddde <_RBTree_Extract_unprotected+0xa6> if (!the_node) return; /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) 4de4a: 202b 0008 movel %a3@(8),%d0 4de4e: 6738 beqs 4de88 <_RBTree_Extract_unprotected+0x150> the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 4de50: 2b40 0008 movel %d0,%a5@(8) the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 4de54: b7ed 000c cmpal %a5@(12),%a3 4de58: 6600 ff04 bnew 4dd5e <_RBTree_Extract_unprotected+0x26> 4de5c: 60a8 bras 4de06 <_RBTree_Extract_unprotected+0xce><== NOT EXECUTED * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 4de5e: 284a moveal %a2,%a4 * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; 4de60: 2893 movel %a3@,%a4@ } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4de62: 7401 moveq #1,%d2 _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4de64: 2053 moveal %a3@,%a0 4de66: b7e8 0004 cmpal %a0@(4),%a3 4de6a: 56c1 sne %d1 leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; 4de6c: 202b 000c movel %a3@(12),%d0 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4de70: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4de72: 9481 subl %d1,%d2 4de74: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4) 4de78: 60ca bras 4de44 <_RBTree_Extract_unprotected+0x10c> leaf = target->child[RBT_LEFT]; if(leaf) { leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 4de7a: 2f0a movel %a2,%sp@- 4de7c: 4eb9 0004 db3c jsr 4db3c <_RBTree_Extract_validate_unprotected> 4de82: 588f addql #4,%sp 4de84: 6000 ff04 braw 4dd8a <_RBTree_Extract_unprotected+0x52> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; 4de88: 2013 movel %a3@,%d0 4de8a: 2b40 0008 movel %d0,%a5@(8) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 4de8e: b08d cmpl %a5,%d0 4de90: 6600 fec4 bnew 4dd56 <_RBTree_Extract_unprotected+0x1e> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 4de94: 42ad 0008 clrl %a5@(8) } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 4de98: b7ed 000c cmpal %a5@(12),%a3 4de9c: 6600 fec0 bnew 4dd5e <_RBTree_Extract_unprotected+0x26> 4dea0: 6000 ff64 braw 4de06 <_RBTree_Extract_unprotected+0xce> if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; 4dea4: 2013 movel %a3@,%d0 4dea6: 2b40 000c movel %d0,%a5@(12) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 4deaa: b08d cmpl %a5,%d0 4deac: 6600 feb0 bnew 4dd5e <_RBTree_Extract_unprotected+0x26> the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 4deb0: 42ad 000c clrl %a5@(12) 4deb4: 6000 fea8 braw 4dd5e <_RBTree_Extract_unprotected+0x26> =============================================================================== 0004db3c <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 4db3c: 4e56 ffec linkw %fp,#-20 4db40: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4db44: 266e 0008 moveal %fp@(8),%a3 RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 4db48: 2053 moveal %a3@,%a0 if(!parent->parent) return; 4db4a: 4a90 tstl %a0@ 4db4c: 677e beqs 4dbcc <_RBTree_Extract_validate_unprotected+0x90><== NEVER TAKEN { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) 4db4e: 2268 0004 moveal %a0@(4),%a1 4db52: b3cb cmpal %a3,%a1 4db54: 6700 01da beqw 4dd30 <_RBTree_Extract_validate_unprotected+0x1f4> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4db58: 7401 moveq #1,%d2 4db5a: b4ab 000c cmpl %a3@(12),%d2 4db5e: 6764 beqs 4dbc4 <_RBTree_Extract_validate_unprotected+0x88> sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 4db60: 4a90 tstl %a0@ 4db62: 6760 beqs 4dbc4 <_RBTree_Extract_validate_unprotected+0x88> 4db64: 4a89 tstl %a1 4db66: 6708 beqs 4db70 <_RBTree_Extract_validate_unprotected+0x34><== NEVER TAKEN 4db68: 7001 moveq #1,%d0 4db6a: b0a9 000c cmpl %a1@(12),%d0 4db6e: 6764 beqs 4dbd4 <_RBTree_Extract_validate_unprotected+0x98> _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 4db70: 2469 0008 moveal %a1@(8),%a2 4db74: 4a8a tstl %a2 4db76: 670a beqs 4db82 <_RBTree_Extract_validate_unprotected+0x46> 4db78: 7001 moveq #1,%d0 4db7a: b0aa 000c cmpl %a2@(12),%d0 4db7e: 6700 00dc beqw 4dc5c <_RBTree_Extract_validate_unprotected+0x120> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 4db82: 2469 0004 moveal %a1@(4),%a2 4db86: 4a8a tstl %a2 4db88: 670a beqs 4db94 <_RBTree_Extract_validate_unprotected+0x58> 4db8a: 7201 moveq #1,%d1 4db8c: b2aa 000c cmpl %a2@(12),%d1 4db90: 6700 00ca beqw 4dc5c <_RBTree_Extract_validate_unprotected+0x120> sibling->color = RBT_RED; 4db94: 7601 moveq #1,%d3 4db96: 2343 000c movel %d3,%a1@(12) 4db9a: b6a8 000c cmpl %a0@(12),%d3 4db9e: 6700 00ac beqw 4dc4c <_RBTree_Extract_validate_unprotected+0x110> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; 4dba2: 2450 moveal %a0@,%a2 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 4dba4: 4a8a tstl %a2 4dba6: 6700 009a beqw 4dc42 <_RBTree_Extract_validate_unprotected+0x106> if(!(the_node->parent->parent)) return NULL; 4dbaa: 4a92 tstl %a2@ 4dbac: 6700 0094 beqw 4dc42 <_RBTree_Extract_validate_unprotected+0x106> if(the_node == the_node->parent->child[RBT_LEFT]) 4dbb0: 226a 0004 moveal %a2@(4),%a1 4dbb4: b3c8 cmpal %a0,%a1 4dbb6: 677e beqs 4dc36 <_RBTree_Extract_validate_unprotected+0xfa> c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; the_node->parent = c; 4dbb8: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 4dbba: 204a moveal %a2,%a0 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4dbbc: 7401 moveq #1,%d2 4dbbe: b4ab 000c cmpl %a3@(12),%d2 4dbc2: 669c bnes 4db60 <_RBTree_Extract_validate_unprotected+0x24><== ALWAYS TAKEN sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4dbc4: 2053 moveal %a3@,%a0 4dbc6: 4a90 tstl %a0@ 4dbc8: 6700 015a beqw 4dd24 <_RBTree_Extract_validate_unprotected+0x1e8> } 4dbcc: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4dbd0: 4e5e unlk %fp 4dbd2: 4e75 rts * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 4dbd4: b7e8 0004 cmpal %a0@(4),%a3 4dbd8: 56c0 sne %d0 * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; 4dbda: 7201 moveq #1,%d1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4dbdc: 7402 moveq #2,%d2 sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 4dbde: 49c0 extbl %d0 4dbe0: 4480 negl %d0 4dbe2: 9480 subl %d0,%d2 * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; 4dbe4: 2141 000c movel %d1,%a0@(12) 4dbe8: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2 sibling->color = RBT_BLACK; 4dbec: 42a9 000c clrl %a1@(12) 4dbf0: 4a8a tstl %a2 4dbf2: 6730 beqs 4dc24 <_RBTree_Extract_validate_unprotected+0xe8><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4dbf4: 2200 movel %d0,%d1 4dbf6: 5281 addql #1,%d1 4dbf8: 43f2 1c00 lea %a2@(00000000,%d1:l:4),%a1 4dbfc: 2191 2c00 movel %a1@,%a0@(00000000,%d2:l:4) if (c->child[dir]) 4dc00: 2272 1c00 moveal %a2@(00000000,%d1:l:4),%a1 4dc04: 4a89 tstl %a1 4dc06: 6702 beqs 4dc0a <_RBTree_Extract_validate_unprotected+0xce><== NEVER TAKEN c->child[dir]->parent = the_node; 4dc08: 2288 movel %a0,%a1@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4dc0a: 2250 moveal %a0@,%a1 4dc0c: 7401 moveq #1,%d2 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4dc0e: 2588 1c00 movel %a0,%a2@(00000000,%d1:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4dc12: b1e9 0004 cmpal %a1@(4),%a0 4dc16: 56c1 sne %d1 c->parent = the_node->parent; 4dc18: 2489 movel %a1,%a2@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4dc1a: 49c1 extbl %d1 4dc1c: 9481 subl %d1,%d2 4dc1e: 238a 2c00 movel %a2,%a1@(00000000,%d2:l:4) c->parent = the_node->parent; the_node->parent = c; 4dc22: 208a movel %a2,%a0@ dir = the_node != parent->child[0]; _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; 4dc24: 4a80 tstl %d0 4dc26: 57c0 seq %d0 4dc28: 7601 moveq #1,%d3 4dc2a: 49c0 extbl %d0 4dc2c: 9680 subl %d0,%d3 4dc2e: 2270 3c00 moveal %a0@(00000000,%d3:l:4),%a1 4dc32: 6000 ff3c braw 4db70 <_RBTree_Extract_validate_unprotected+0x34> 4dc36: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 4dc38: 204a moveal %a2,%a0 if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 4dc3a: 226a 0008 moveal %a2@(8),%a1 4dc3e: 6000 ff7c braw 4dbbc <_RBTree_Extract_validate_unprotected+0x80> c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; the_node->parent = c; 4dc42: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 4dc44: 93c9 subal %a1,%a1 4dc46: 204a moveal %a2,%a0 4dc48: 6000 ff72 braw 4dbbc <_RBTree_Extract_validate_unprotected+0x80> /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; 4dc4c: 42a8 000c clrl %a0@(12) sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4dc50: 2053 moveal %a3@,%a0 4dc52: 4a90 tstl %a0@ 4dc54: 6600 ff76 bnew 4dbcc <_RBTree_Extract_validate_unprotected+0x90> 4dc58: 6000 00ca braw 4dd24 <_RBTree_Extract_validate_unprotected+0x1e8><== NOT EXECUTED * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; 4dc5c: b7e8 0004 cmpal %a0@(4),%a3 4dc60: 56c0 sne %d0 if (!_RBTree_Is_red(sibling->child[!dir])) { 4dc62: 7401 moveq #1,%d2 * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; 4dc64: 49c0 extbl %d0 4dc66: 4480 negl %d0 if (!_RBTree_Is_red(sibling->child[!dir])) { 4dc68: 57c1 seq %d1 4dc6a: 49c1 extbl %d1 4dc6c: 9481 subl %d1,%d2 4dc6e: 2202 movel %d2,%d1 4dc70: 2471 2c00 moveal %a1@(00000000,%d2:l:4),%a2 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4dc74: 4a8a tstl %a2 4dc76: 6708 beqs 4dc80 <_RBTree_Extract_validate_unprotected+0x144> 4dc78: 7601 moveq #1,%d3 4dc7a: b6aa 000c cmpl %a2@(12),%d3 4dc7e: 6756 beqs 4dcd6 <_RBTree_Extract_validate_unprotected+0x19a> sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); 4dc80: 7601 moveq #1,%d3 * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; 4dc82: 7401 moveq #1,%d2 sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); 4dc84: b183 eorl %d0,%d3 * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; 4dc86: 2342 000c movel %d2,%a1@(12) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4dc8a: 143c 0002 moveb #2,%d2 4dc8e: 9483 subl %d3,%d2 sibling->child[dir]->color = RBT_BLACK; 4dc90: 2871 0c04 moveal %a1@(00000004,%d0:l:4),%a4 4dc94: 2471 2c00 moveal %a1@(00000000,%d2:l:4),%a2 4dc98: 42ac 000c clrl %a4@(12) 4dc9c: 4a8a tstl %a2 4dc9e: 672e beqs 4dcce <_RBTree_Extract_validate_unprotected+0x192><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4dca0: 5283 addql #1,%d3 4dca2: 49f2 3c00 lea %a2@(00000000,%d3:l:4),%a4 4dca6: 2394 2c00 movel %a4@,%a1@(00000000,%d2:l:4) if (c->child[dir]) 4dcaa: 2872 3c00 moveal %a2@(00000000,%d3:l:4),%a4 4dcae: 4a8c tstl %a4 4dcb0: 6702 beqs 4dcb4 <_RBTree_Extract_validate_unprotected+0x178> c->child[dir]->parent = the_node; 4dcb2: 2889 movel %a1,%a4@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4dcb4: 2851 moveal %a1@,%a4 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4dcb6: 2589 3c00 movel %a1,%a2@(00000000,%d3:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4dcba: 7601 moveq #1,%d3 4dcbc: b3ec 0004 cmpal %a4@(4),%a1 4dcc0: 56c2 sne %d2 c->parent = the_node->parent; 4dcc2: 248c movel %a4,%a2@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4dcc4: 49c2 extbl %d2 4dcc6: 9682 subl %d2,%d3 4dcc8: 298a 3c00 movel %a2,%a4@(00000000,%d3:l:4) c->parent = the_node->parent; the_node->parent = c; 4dccc: 228a movel %a2,%a1@ _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; 4dcce: 2270 1c00 moveal %a0@(00000000,%d1:l:4),%a1 4dcd2: 2471 1c00 moveal %a1@(00000000,%d1:l:4),%a2 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4dcd6: 7202 moveq #2,%d1 4dcd8: 9280 subl %d0,%d1 } sibling->color = parent->color; 4dcda: 2368 000c 000c movel %a0@(12),%a1@(12) 4dce0: 2270 1c00 moveal %a0@(00000000,%d1:l:4),%a1 parent->color = RBT_BLACK; 4dce4: 42a8 000c clrl %a0@(12) sibling->child[!dir]->color = RBT_BLACK; 4dce8: 42aa 000c clrl %a2@(12) 4dcec: 4a89 tstl %a1 4dcee: 6700 fed4 beqw 4dbc4 <_RBTree_Extract_validate_unprotected+0x88> c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4dcf2: 5280 addql #1,%d0 4dcf4: 45f1 0c00 lea %a1@(00000000,%d0:l:4),%a2 4dcf8: 2192 1c00 movel %a2@,%a0@(00000000,%d1:l:4) if (c->child[dir]) 4dcfc: 2471 0c00 moveal %a1@(00000000,%d0:l:4),%a2 4dd00: 4a8a tstl %a2 4dd02: 6702 beqs 4dd06 <_RBTree_Extract_validate_unprotected+0x1ca> c->child[dir]->parent = the_node; 4dd04: 2488 movel %a0,%a2@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4dd06: 2450 moveal %a0@,%a2 4dd08: 7201 moveq #1,%d1 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4dd0a: 2388 0c00 movel %a0,%a1@(00000000,%d0:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4dd0e: b1ea 0004 cmpal %a2@(4),%a0 4dd12: 56c0 sne %d0 c->parent = the_node->parent; 4dd14: 228a movel %a2,%a1@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4dd16: 49c0 extbl %d0 4dd18: 9280 subl %d0,%d1 4dd1a: 2589 1c00 movel %a1,%a2@(00000000,%d1:l:4) c->parent = the_node->parent; the_node->parent = c; 4dd1e: 2089 movel %a1,%a0@ 4dd20: 6000 fea2 braw 4dbc4 <_RBTree_Extract_validate_unprotected+0x88> _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4dd24: 42ab 000c clrl %a3@(12) } 4dd28: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4dd2c: 4e5e unlk %fp 4dd2e: 4e75 rts if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 4dd30: 2268 0008 moveal %a0@(8),%a1 4dd34: 6000 fe22 braw 4db58 <_RBTree_Extract_validate_unprotected+0x1c> =============================================================================== 00049bc8 <_RBTree_Find>: { ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 49bc8: 203c 0000 0700 movel #1792,%d0 RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { 49bce: 4e56 ffec linkw %fp,#-20 49bd2: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 49bd6: 266e 0008 moveal %fp@(8),%a3 49bda: 242e 000c movel %fp@(12),%d2 ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 49bde: 40c4 movew %sr,%d4 49be0: 8084 orl %d4,%d0 49be2: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; 49be4: 246b 0004 moveal %a3@(4),%a2 RBTree_Node* found = NULL; int compare_result; while (iter_node) { 49be8: 4283 clrl %d3 49bea: 4a8a tstl %a2 49bec: 672a beqs 49c18 <_RBTree_Find+0x50> <== NEVER TAKEN compare_result = the_rbtree->compare_function(the_node, iter_node); 49bee: 2f0a movel %a2,%sp@- 49bf0: 206b 0010 moveal %a3@(16),%a0 49bf4: 2f02 movel %d2,%sp@- 49bf6: 4e90 jsr %a0@ if (compare_result == 0) { 49bf8: 508f addql #8,%sp 49bfa: 4a80 tstl %d0 49bfc: 6608 bnes 49c06 <_RBTree_Find+0x3e> <== NEVER TAKEN found = iter_node; if ( the_rbtree->is_unique ) 49bfe: 260a movel %a2,%d3 49c00: 4a2b 0014 tstb %a3@(20) 49c04: 6612 bnes 49c18 <_RBTree_Find+0x50> break; } RBTree_Direction dir = (compare_result == 1); 49c06: 7201 moveq #1,%d1 49c08: b280 cmpl %d0,%d1 49c0a: 57c0 seq %d0 49c0c: 49c0 extbl %d0 iter_node = iter_node->child[dir]; 49c0e: 9280 subl %d0,%d1 49c10: 2472 1c00 moveal %a2@(00000000,%d1:l:4),%a2 ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { 49c14: 4a8a tstl %a2 49c16: 66d6 bnes 49bee <_RBTree_Find+0x26> <== NEVER TAKEN return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 49c18: 46c4 movew %d4,%sr return return_node; } 49c1a: 2003 movel %d3,%d0 49c1c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 49c22: 4e5e unlk %fp ... =============================================================================== 00049b88 <_RBTree_Find_header>: { ISR_Level level; RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); 49b88: 203c 0000 0700 movel #1792,%d0 */ RBTree_Control *_RBTree_Find_header( RBTree_Node *the_node ) { 49b8e: 4e56 0000 linkw %fp,#0 49b92: 206e 0008 moveal %fp@(8),%a0 49b96: 2f02 movel %d2,%sp@- ISR_Level level; RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); 49b98: 40c2 movew %sr,%d2 49b9a: 8082 orl %d2,%d0 49b9c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; 49b9e: 4a88 tstl %a0 49ba0: 671a beqs 49bbc <_RBTree_Find_header+0x34> if(!(the_node->parent)) return NULL; 49ba2: 2050 moveal %a0@,%a0 49ba4: 4a88 tstl %a0 49ba6: 670a beqs 49bb2 <_RBTree_Find_header+0x2a> 49ba8: 2210 movel %a0@,%d1 while(the_node->parent) the_node = the_node->parent; 49baa: 6706 beqs 49bb2 <_RBTree_Find_header+0x2a> <== NEVER TAKEN 49bac: 2041 moveal %d1,%a0 RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 49bae: 2210 movel %a0@,%d1 while(the_node->parent) the_node = the_node->parent; 49bb0: 66fa bnes 49bac <_RBTree_Find_header+0x24> return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); 49bb2: 46c2 movew %d2,%sr return return_header; } 49bb4: 241f movel %sp@+,%d2 49bb6: 2008 movel %a0,%d0 49bb8: 4e5e unlk %fp 49bba: 4e75 rts */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; 49bbc: 91c8 subal %a0,%a0 RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); 49bbe: 46c2 movew %d2,%sr return return_header; } 49bc0: 241f movel %sp@+,%d2 49bc2: 2008 movel %a0,%d0 49bc4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049e90 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 49e90: 4e56 ffec linkw %fp,#-20 49e94: 202e 001c movel %fp@(28),%d0 49e98: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 49e9c: 246e 0008 moveal %fp@(8),%a2 49ea0: 242e 0014 movel %fp@(20),%d2 49ea4: 282e 0018 movel %fp@(24),%d4 size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 49ea8: 4a8a tstl %a2 49eaa: 6736 beqs 49ee2 <_RBTree_Initialize+0x52> <== NEVER TAKEN RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 49eac: 4292 clrl %a2@ the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function; 49eae: 256e 000c 0010 movel %fp@(12),%a2@(16) the_rbtree->is_unique = is_unique; 49eb4: 1540 0014 moveb %d0,%a2@(20) RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; the_rbtree->root = NULL; 49eb8: 42aa 0004 clrl %a2@(4) the_rbtree->first[0] = NULL; 49ebc: 42aa 0008 clrl %a2@(8) the_rbtree->first[1] = NULL; 49ec0: 42aa 000c clrl %a2@(12) /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 49ec4: 4a82 tstl %d2 49ec6: 671a beqs 49ee2 <_RBTree_Initialize+0x52> <== NEVER TAKEN /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; 49ec8: 262e 0010 movel %fp@(16),%d3 49ecc: 47f9 0004 9e62 lea 49e62 <_RBTree_Insert>,%a3 while ( count-- ) { _RBTree_Insert(the_rbtree, next); 49ed2: 2f03 movel %d3,%sp@- * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 49ed4: d684 addl %d4,%d3 49ed6: 5382 subql #1,%d2 _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { _RBTree_Insert(the_rbtree, next); 49ed8: 2f0a movel %a2,%sp@- 49eda: 4e93 jsr %a3@ /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 49edc: 508f addql #8,%sp 49ede: 4a82 tstl %d2 49ee0: 66f0 bnes 49ed2 <_RBTree_Initialize+0x42> _RBTree_Insert(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } 49ee2: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 49ee8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e0e2 <_RBTree_Insert>: RBTree_Node *node ) { ISR_Level level; _ISR_Disable( level ); 4e0e2: 203c 0000 0700 movel #1792,%d0 RBTree_Node *_RBTree_Insert( RBTree_Control *tree, RBTree_Node *node ) { 4e0e8: 4e56 0000 linkw %fp,#0 4e0ec: 222e 0008 movel %fp@(8),%d1 4e0f0: 206e 000c moveal %fp@(12),%a0 4e0f4: 2f02 movel %d2,%sp@- ISR_Level level; _ISR_Disable( level ); 4e0f6: 40c2 movew %sr,%d2 4e0f8: 8082 orl %d2,%d0 4e0fa: 46c0 movew %d0,%sr return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 4e0fc: 241f movel %sp@+,%d2 ) { ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); 4e0fe: 2d48 000c movel %a0,%fp@(12) 4e102: 2d41 0008 movel %d1,%fp@(8) _ISR_Enable( level ); } 4e106: 4e5e unlk %fp ) { ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); 4e108: 4ef9 0004 e00e jmp 4e00e <_RBTree_Insert_unprotected> ... =============================================================================== 0004dee4 <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { 4dee4: 4e56 ffe8 linkw %fp,#-24 4dee8: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4deec: 266e 0008 moveal %fp@(8),%a3 ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 4def0: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 4def2: 2250 moveal %a0@,%a1 4def4: 2449 moveal %a1,%a2 4def6: 4a89 tstl %a1 4def8: 6700 00de beqw 4dfd8 <_RBTree_Validate_insert_unprotected+0xf4> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4defc: 7601 moveq #1,%d3 4defe: b6a8 000c cmpl %a0@(12),%d3 4df02: 6708 beqs 4df0c <_RBTree_Validate_insert_unprotected+0x28> /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; } 4df04: 4cd7 3c0c moveml %sp@,%d2-%d3/%a2-%a5 4df08: 4e5e unlk %fp 4df0a: 4e75 rts ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; 4df0c: 4a91 tstl %a1@ 4df0e: 6700 00ee beqw 4dffe <_RBTree_Validate_insert_unprotected+0x11a> { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) 4df12: 2429 0004 movel %a1@(4),%d2 4df16: b488 cmpl %a0,%d2 4df18: 6700 00ec beqw 4e006 <_RBTree_Validate_insert_unprotected+0x122> 4df1c: 2842 moveal %d2,%a4 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4df1e: 4a8c tstl %a4 4df20: 670a beqs 4df2c <_RBTree_Validate_insert_unprotected+0x48> 4df22: 7001 moveq #1,%d0 4df24: b0ac 000c cmpl %a4@(12),%d0 4df28: 6700 00ba beqw 4dfe4 <_RBTree_Validate_insert_unprotected+0x100> the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 4df2c: b7e8 0004 cmpal %a0@(4),%a3 4df30: 56c1 sne %d1 RBTree_Direction pdir = the_node->parent != g->child[0]; 4df32: b488 cmpl %a0,%d2 4df34: 56c0 sne %d0 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 4df36: 49c1 extbl %d1 4df38: 4481 negl %d1 RBTree_Direction pdir = the_node->parent != g->child[0]; 4df3a: 49c0 extbl %d0 4df3c: 4480 negl %d0 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4df3e: 7401 moveq #1,%d2 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 4df40: b081 cmpl %d1,%d0 4df42: 6700 00b2 beqw 4dff6 <_RBTree_Validate_insert_unprotected+0x112> 4df46: 9480 subl %d0,%d2 4df48: 2202 movel %d2,%d1 4df4a: 5281 addql #1,%d1 4df4c: 5280 addql #1,%d0 4df4e: 2870 1c00 moveal %a0@(00000000,%d1:l:4),%a4 4df52: 4a8c tstl %a4 4df54: 672c beqs 4df82 <_RBTree_Validate_insert_unprotected+0x9e><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4df56: 4bf4 0c00 lea %a4@(00000000,%d0:l:4),%a5 4df5a: 2195 1c00 movel %a5@,%a0@(00000000,%d1:l:4) if (c->child[dir]) 4df5e: 2a74 0c00 moveal %a4@(00000000,%d0:l:4),%a5 4df62: 4a8d tstl %a5 4df64: 6704 beqs 4df6a <_RBTree_Validate_insert_unprotected+0x86> c->child[dir]->parent = the_node; 4df66: 2a88 movel %a0,%a5@ 4df68: 2250 moveal %a0@,%a1 c->child[dir] = the_node; 4df6a: 2988 0c00 movel %a0,%a4@(00000000,%d0:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4df6e: 7601 moveq #1,%d3 4df70: b1e9 0004 cmpal %a1@(4),%a0 4df74: 56c1 sne %d1 c->parent = the_node->parent; 4df76: 2889 movel %a1,%a4@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4df78: 49c1 extbl %d1 4df7a: 9681 subl %d1,%d3 4df7c: 238c 3c00 movel %a4,%a1@(00000000,%d3:l:4) c->parent = the_node->parent; the_node->parent = c; 4df80: 208c movel %a4,%a0@ _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; 4df82: 2673 0c00 moveal %a3@(00000000,%d0:l:4),%a3 4df86: 2053 moveal %a3@,%a0 } the_node->parent->color = RBT_BLACK; 4df88: 42a8 000c clrl %a0@(12) g->color = RBT_RED; 4df8c: 7201 moveq #1,%d1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4df8e: 2072 0c00 moveal %a2@(00000000,%d0:l:4),%a0 4df92: 2541 000c movel %d1,%a2@(12) 4df96: 4a88 tstl %a0 4df98: 6700 ff56 beqw 4def0 <_RBTree_Validate_insert_unprotected+0xc> c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4df9c: 2202 movel %d2,%d1 4df9e: 5281 addql #1,%d1 4dfa0: 43f0 1c00 lea %a0@(00000000,%d1:l:4),%a1 4dfa4: 2591 0c00 movel %a1@,%a2@(00000000,%d0:l:4) if (c->child[dir]) 4dfa8: 2270 1c00 moveal %a0@(00000000,%d1:l:4),%a1 4dfac: 4a89 tstl %a1 4dfae: 6702 beqs 4dfb2 <_RBTree_Validate_insert_unprotected+0xce> c->child[dir]->parent = the_node; 4dfb0: 228a movel %a2,%a1@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4dfb2: 2252 moveal %a2@,%a1 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4dfb4: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4dfb8: 7201 moveq #1,%d1 4dfba: b5e9 0004 cmpal %a1@(4),%a2 4dfbe: 56c0 sne %d0 c->parent = the_node->parent; 4dfc0: 2089 movel %a1,%a0@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4dfc2: 49c0 extbl %d0 4dfc4: 9280 subl %d0,%d1 4dfc6: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) c->parent = the_node->parent; the_node->parent = c; 4dfca: 2488 movel %a0,%a2@ ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 4dfcc: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 4dfce: 2250 moveal %a0@,%a1 4dfd0: 2449 moveal %a1,%a2 4dfd2: 4a89 tstl %a1 4dfd4: 6600 ff26 bnew 4defc <_RBTree_Validate_insert_unprotected+0x18> /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4dfd8: 42ab 000c clrl %a3@(12) } 4dfdc: 4cd7 3c0c moveml %sp@,%d2-%d3/%a2-%a5 4dfe0: 4e5e unlk %fp 4dfe2: 4e75 rts u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; 4dfe4: 42a8 000c clrl %a0@(12) u->color = RBT_BLACK; g->color = RBT_RED; 4dfe8: 2649 moveal %a1,%a3 g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; 4dfea: 42ac 000c clrl %a4@(12) g->color = RBT_RED; 4dfee: 2340 000c movel %d0,%a1@(12) 4dff2: 6000 fefc braw 4def0 <_RBTree_Validate_insert_unprotected+0xc> 4dff6: 2001 movel %d1,%d0 } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 4dff8: 9481 subl %d1,%d2 4dffa: 5280 addql #1,%d0 4dffc: 608a bras 4df88 <_RBTree_Validate_insert_unprotected+0xa4> /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; } 4dffe: 2429 0004 movel %a1@(4),%d2 <== NOT EXECUTED 4e002: 6000 ff28 braw 4df2c <_RBTree_Validate_insert_unprotected+0x48><== NOT EXECUTED if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 4e006: 2869 0008 moveal %a1@(8),%a4 4e00a: 6000 ff12 braw 4df1e <_RBTree_Validate_insert_unprotected+0x3a> =============================================================================== 0004ca52 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4ca52: 4e56 0000 linkw %fp,#0 4ca56: 2f0a movel %a2,%sp@- 4ca58: 246e 000c moveal %fp@(12),%a2 /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 4ca5c: 4a39 0005 f6b4 tstb 5f6b4 4ca62: 6758 beqs 4cabc <_RTEMS_tasks_Create_extension+0x6a> /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); 4ca64: 705e moveq #94,%d0 if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4ca66: 2f00 movel %d0,%sp@- 4ca68: 4eb9 0004 a2e2 jsr 4a2e2 <_Workspace_Allocate> if ( !api ) 4ca6e: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4ca70: 2040 moveal %d0,%a0 if ( !api ) 4ca72: 4a80 tstl %d0 4ca74: 6758 beqs 4cace <_RTEMS_tasks_Create_extension+0x7c> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4ca76: 2540 00fe movel %d0,%a2@(254) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4ca7a: 4200 clrb %d0 api->pending_events = EVENT_SETS_NONE_PENDING; 4ca7c: 4290 clrl %a0@ 4ca7e: 1140 0008 moveb %d0,%a0@(8) api->event_condition = 0; 4ca82: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4ca86: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4ca8a: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4ca8e: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4ca92: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4ca96: 42a8 001a clrl %a0@(26) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 4ca9a: 42aa 010a clrl %a2@(266) if ( rtems_configuration_get_notepads_enabled() ) { 4ca9e: 4a39 0005 f6b4 tstb 5f6b4 4caa4: 670c beqs 4cab2 <_RTEMS_tasks_Create_extension+0x60> * task is created via another API, then this routine is invoked * and this API given the opportunity to initialize its extension * area. */ bool _RTEMS_tasks_Create_extension( 4caa6: 41e8 001e lea %a0@(30),%a0 4caaa: 7010 moveq #16,%d0 _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4caac: 4298 clrl %a0@+ 4caae: 5380 subql #1,%d0 api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 4cab0: 66fa bnes 4caac <_RTEMS_tasks_Create_extension+0x5a> api->Notepads[i] = 0; } return true; } 4cab2: 246e fffc moveal %fp@(-4),%a2 4cab6: 4e5e unlk %fp if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; 4cab8: 7001 moveq #1,%d0 } 4caba: 4e75 rts * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); 4cabc: 701e moveq #30,%d0 api = _Workspace_Allocate( to_allocate ); 4cabe: 2f00 movel %d0,%sp@- 4cac0: 4eb9 0004 a2e2 jsr 4a2e2 <_Workspace_Allocate> if ( !api ) 4cac6: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4cac8: 2040 moveal %d0,%a0 if ( !api ) 4caca: 4a80 tstl %d0 4cacc: 66a8 bnes 4ca76 <_RTEMS_tasks_Create_extension+0x24><== ALWAYS TAKEN for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4cace: 246e fffc moveal %fp@(-4),%a2 4cad2: 4e5e unlk %fp to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 4cad4: 4200 clrb %d0 <== NOT EXECUTED for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } =============================================================================== 0004c9fc <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 4c9fc: 4e56 fff4 linkw %fp,#-12 4ca00: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4ca04: 246e 000c moveal %fp@(12),%a2 4ca08: 47f9 0004 cb24 lea 4cb24 <_RTEMS_Tasks_Invoke_task_variable_dtor>,%a3 /* * Free per task variable memory */ tvp = deleted->task_variables; 4ca0e: 206a 010a moveal %a2@(266),%a0 deleted->task_variables = NULL; 4ca12: 42aa 010a clrl %a2@(266) while (tvp) { 4ca16: 4a88 tstl %a0 4ca18: 671e beqs 4ca38 <_RTEMS_tasks_Delete_extension+0x3c> next = (rtems_task_variable_t *)tvp->next; 4ca1a: 2410 movel %a0@,%d2 _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 4ca1c: 2f08 movel %a0,%sp@- 4ca1e: 2f0a movel %a2,%sp@- 4ca20: 4e93 jsr %a3@ * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4ca22: 508f addql #8,%sp 4ca24: 4a82 tstl %d2 4ca26: 6710 beqs 4ca38 <_RTEMS_tasks_Delete_extension+0x3c><== NEVER TAKEN next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 4ca28: 2042 moveal %d2,%a0 */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 4ca2a: 2410 movel %a0@,%d2 _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 4ca2c: 2f08 movel %a0,%sp@- 4ca2e: 2f0a movel %a2,%sp@- 4ca30: 4e93 jsr %a3@ * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4ca32: 508f addql #8,%sp 4ca34: 4a82 tstl %d2 4ca36: 66f0 bnes 4ca28 <_RTEMS_tasks_Delete_extension+0x2c> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 4ca38: 2f2a 00fe movel %a2@(254),%sp@- 4ca3c: 4eb9 0004 a2fe jsr 4a2fe <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 4ca42: 588f addql #4,%sp 4ca44: 42aa 00fe clrl %a2@(254) } 4ca48: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4ca4e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046f00 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46f00: 4e56 ffe4 linkw %fp,#-28 46f04: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 46f08: 2479 0005 f6da moveal 5f6da ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 46f0e: 2639 0005 f6d6 movel 5f6d6 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 46f14: 4a8a tstl %a2 46f16: 6754 beqs 46f6c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46f18: 4a83 tstl %d3 46f1a: 6750 beqs 46f6c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN 46f1c: 280e movel %fp,%d4 46f1e: 4282 clrl %d2 46f20: 5984 subql #4,%d4 46f22: 47f9 0004 6cd8 lea 46cd8 ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46f28: 49f9 0004 6f88 lea 46f88 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 46f2e: 2f04 movel %d4,%sp@- 46f30: 2f2a 000c movel %a2@(12),%sp@- 46f34: 2f2a 0014 movel %a2@(20),%sp@- 46f38: 2f2a 0004 movel %a2@(4),%sp@- 46f3c: 2f2a 0008 movel %a2@(8),%sp@- 46f40: 2f12 movel %a2@,%sp@- 46f42: 4e93 jsr %a3@ user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 46f44: 4fef 0018 lea %sp@(24),%sp 46f48: 4a80 tstl %d0 46f4a: 662a bnes 46f76 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46f4c: 2f2a 0018 movel %a2@(24),%sp@- 46f50: 2f2a 0010 movel %a2@(16),%sp@- 46f54: 2f2e fffc movel %fp@(-4),%sp@- 46f58: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 46f5a: 4fef 000c lea %sp@(12),%sp 46f5e: 4a80 tstl %d0 46f60: 6614 bnes 46f76 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46f62: 5282 addql #1,%d2 46f64: 45ea 001c lea %a2@(28),%a2 46f68: b682 cmpl %d2,%d3 46f6a: 66c2 bnes 46f2e <_RTEMS_tasks_Initialize_user_tasks_body+0x2e><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 46f6c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 46f72: 4e5e unlk %fp 46f74: 4e75 rts id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 46f76: 2f00 movel %d0,%sp@- 46f78: 4878 0001 pea 1 46f7c: 4878 0001 pea 1 46f80: 4eb9 0004 7ec8 jsr 47ec8 <_Internal_error_Occurred> ... =============================================================================== 0004c926 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 4c926: 4e56 0000 linkw %fp,#0 4c92a: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 4c92e: 2068 010a moveal %a0@(266),%a0 while (tvp) { 4c932: 4a88 tstl %a0 4c934: 6712 beqs 4c948 <_RTEMS_tasks_Switch_extension+0x22> tvp->tval = *tvp->ptr; 4c936: 2268 0004 moveal %a0@(4),%a1 4c93a: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 4c93e: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4c942: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4c944: 4a88 tstl %a0 4c946: 66ee bnes 4c936 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 4c948: 206e 000c moveal %fp@(12),%a0 4c94c: 2068 010a moveal %a0@(266),%a0 while (tvp) { 4c950: 4a88 tstl %a0 4c952: 6712 beqs 4c966 <_RTEMS_tasks_Switch_extension+0x40> tvp->gval = *tvp->ptr; 4c954: 2268 0004 moveal %a0@(4),%a1 4c958: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 4c95c: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4c960: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4c962: 4a88 tstl %a0 4c964: 66ee bnes 4c954 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 4c966: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047e14 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 47e14: 4e56 fffc linkw %fp,#-4 47e18: 2f0a movel %a2,%sp@- 47e1a: 486e fffc pea %fp@(-4) 47e1e: 2f2e 0008 movel %fp@(8),%sp@- 47e22: 4879 0006 2e4c pea 62e4c <_Rate_monotonic_Information> 47e28: 4eb9 0004 9dd4 jsr 49dd4 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 47e2e: 4fef 000c lea %sp@(12),%sp 47e32: 2440 moveal %d0,%a2 47e34: 4aae fffc tstl %fp@(-4) 47e38: 663c bnes 47e76 <_Rate_monotonic_Timeout+0x62> <== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 47e3a: 206a 0040 moveal %a2@(64),%a0 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); 47e3e: 2028 0010 movel %a0@(16),%d0 47e42: 0280 0000 4000 andil #16384,%d0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 47e48: 670a beqs 47e54 <_Rate_monotonic_Timeout+0x40> 47e4a: 202a 0008 movel %a2@(8),%d0 47e4e: b0a8 0020 cmpl %a0@(32),%d0 47e52: 676a beqs 47ebe <_Rate_monotonic_Timeout+0xaa> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 47e54: 7001 moveq #1,%d0 47e56: b0aa 0038 cmpl %a2@(56),%d0 47e5a: 6722 beqs 47e7e <_Rate_monotonic_Timeout+0x6a> <== NEVER TAKEN _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 47e5c: 7004 moveq #4,%d0 47e5e: 2540 0038 movel %d0,%a2@(56) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 47e62: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 47e68: 5380 subql #1,%d0 47e6a: 23c0 0006 2f42 movel %d0,62f42 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47e70: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 47e76: 246e fff8 moveal %fp@(-8),%a2 47e7a: 4e5e unlk %fp 47e7c: 4e75 rts _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 47e7e: 103c 0003 moveb #3,%d0 47e82: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 47e86: 2f0a movel %a2,%sp@- 47e88: 4eb9 0004 77b0 jsr 477b0 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47e8e: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47e94: 486a 0010 pea %a2@(16) 47e98: 4879 0006 2ffa pea 62ffa <_Watchdog_Ticks_chain> 47e9e: 4eb9 0004 ba94 jsr 4ba94 <_Watchdog_Insert> 47ea4: 4fef 000c lea %sp@(12),%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 47ea8: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 47eae: 5380 subql #1,%d0 47eb0: 23c0 0006 2f42 movel %d0,62f42 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47eb6: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 47ebc: 60b8 bras 47e76 <_Rate_monotonic_Timeout+0x62> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47ebe: 2f3c 1003 fff8 movel #268697592,%sp@- 47ec4: 2f08 movel %a0,%sp@- 47ec6: 4eb9 0004 a7a0 jsr 4a7a0 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 47ecc: 2f0a movel %a2,%sp@- 47ece: 4eb9 0004 77b0 jsr 477b0 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47ed4: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47eda: 486a 0010 pea %a2@(16) 47ede: 4879 0006 2ffa pea 62ffa <_Watchdog_Ticks_chain> 47ee4: 4eb9 0004 ba94 jsr 4ba94 <_Watchdog_Insert> 47eea: 4fef 0014 lea %sp@(20),%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 47eee: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 47ef4: 5380 subql #1,%d0 47ef6: 23c0 0006 2f42 movel %d0,62f42 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47efc: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 47f02: 6000 ff72 braw 47e76 <_Rate_monotonic_Timeout+0x62> ... =============================================================================== 0005e5fc <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 5e5fc: 4e56 ffe4 linkw %fp,#-28 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 5e600: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0 5e606: 5280 addql #1,%d0 5e608: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5e60c: 23c0 0007 dd4c movel %d0,7dd4c <_Thread_Dispatch_disable_level> 5e612: 266e 0008 moveal %fp@(8),%a3 return _Thread_Dispatch_disable_level; 5e616: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 5e61c: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@- 5e622: 240b movel %a3,%d2 5e624: 0682 0000 0010 addil #16,%d2 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 5e62a: 260b movel %a3,%d3 5e62c: 49f9 0005 ee48 lea 5ee48 <_Thread_queue_First>,%a4 5e632: 0683 0000 0068 addil #104,%d3 5e638: 4bf9 0005 8e2c lea 58e2c <_Heap_Allocate_aligned_with_boundary>,%a5 5e63e: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock> 5e644: 588f addql #4,%sp if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 5e646: 283c 0005 ed2c movel #388396,%d4 /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 5e64c: 2f02 movel %d2,%sp@- 5e64e: 4e94 jsr %a4@ if ( the_thread == NULL ) 5e650: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 5e652: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 5e654: 4a80 tstl %d0 5e656: 6738 beqs 5e690 <_Region_Process_queue+0x94> 5e658: 42a7 clrl %sp@- 5e65a: 42a7 clrl %sp@- 5e65c: 2f2a 0024 movel %a2@(36),%sp@- 5e660: 2f03 movel %d3,%sp@- 5e662: 4e95 jsr %a5@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 5e664: 4fef 0010 lea %sp@(16),%sp 5e668: 4a80 tstl %d0 5e66a: 6724 beqs 5e690 <_Region_Process_queue+0x94> break; *(void **)the_thread->Wait.return_argument = the_segment; 5e66c: 206a 0028 moveal %a2@(40),%a0 5e670: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; 5e672: 52ab 0064 addql #1,%a3@(100) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 5e676: 2044 moveal %d4,%a0 5e678: 2f0a movel %a2,%sp@- 5e67a: 2f02 movel %d2,%sp@- 5e67c: 4e90 jsr %a0@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 5e67e: 508f addql #8,%sp break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 5e680: 42aa 0034 clrl %a2@(52) /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 5e684: 2f02 movel %d2,%sp@- 5e686: 4e94 jsr %a4@ if ( the_thread == NULL ) 5e688: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 5e68a: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 5e68c: 4a80 tstl %d0 5e68e: 66c8 bnes 5e658 <_Region_Process_queue+0x5c> the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); } 5e690: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 5e696: 4e5e unlk %fp *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 5e698: 4ef9 0005 ad04 jmp 5ad04 <_Thread_Enable_dispatch> ... =============================================================================== 00049174 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 49174: 4e56 0000 linkw %fp,#0 49178: 2f0a movel %a2,%sp@- void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 4917a: 4878 0018 pea 18 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 4917e: 246e 0008 moveal %fp@(8),%a2 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 49182: 4eb9 0004 acfe jsr 4acfe <_Workspace_Allocate> if ( sched ) { 49188: 588f addql #4,%sp 4918a: 4a80 tstl %d0 4918c: 670e beqs 4919c <_Scheduler_EDF_Allocate+0x28> <== NEVER TAKEN the_thread->scheduler_info = sched; 4918e: 2540 008a movel %d0,%a2@(138) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 49192: 2040 moveal %d0,%a0 schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 49194: 7202 moveq #2,%d1 sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); if ( sched ) { the_thread->scheduler_info = sched; schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 49196: 208a movel %a2,%a0@ schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 49198: 2141 0014 movel %d1,%a0@(20) } return sched; } 4919c: 246e fffc moveal %fp@(-4),%a2 491a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000491a4 <_Scheduler_EDF_Block>: #include void _Scheduler_EDF_Block( Thread_Control *the_thread ) { 491a4: 4e56 0000 linkw %fp,#0 491a8: 2f02 movel %d2,%sp@- 491aa: 242e 0008 movel %fp@(8),%d2 _Scheduler_EDF_Extract( the_thread ); 491ae: 2f02 movel %d2,%sp@- 491b0: 4eb9 0004 922c jsr 4922c <_Scheduler_EDF_Extract> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 491b6: 588f addql #4,%sp 491b8: b4b9 0006 2d36 cmpl 62d36 <_Per_CPU_Information+0x10>,%d2 491be: 6720 beqs 491e0 <_Scheduler_EDF_Block+0x3c> <== ALWAYS TAKEN _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) 491c0: b4b9 0006 2d32 cmpl 62d32 <_Per_CPU_Information+0xc>,%d2 <== NOT EXECUTED 491c6: 6708 beqs 491d0 <_Scheduler_EDF_Block+0x2c> <== NOT EXECUTED _Thread_Dispatch_necessary = true; } 491c8: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 491cc: 4e5e unlk %fp <== NOT EXECUTED 491ce: 4e75 rts <== NOT EXECUTED 491d0: 242e fffc movel %fp@(-4),%d2 491d4: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 491d6: 7001 moveq #1,%d0 491d8: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18> } 491de: 4e75 rts _Scheduler_EDF_Extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); 491e0: 4eb9 0004 9364 jsr 49364 <_Scheduler_EDF_Schedule> if ( _Thread_Is_executing( the_thread ) ) 491e6: b4b9 0006 2d32 cmpl 62d32 <_Per_CPU_Information+0xc>,%d2 491ec: 66da bnes 491c8 <_Scheduler_EDF_Block+0x24> <== NEVER TAKEN 491ee: 60e0 bras 491d0 <_Scheduler_EDF_Block+0x2c> =============================================================================== 00049258 <_Scheduler_EDF_Free>: #include void _Scheduler_EDF_Free( Thread_Control *the_thread ) { 49258: 4e56 0000 linkw %fp,#0 4925c: 206e 0008 moveal %fp@(8),%a0 _Workspace_Free( the_thread->scheduler_info ); 49260: 2d68 008a 0008 movel %a0@(138),%fp@(8) } 49266: 4e5e unlk %fp void _Scheduler_EDF_Free( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 49268: 4ef9 0004 ad1a jmp 4ad1a <_Workspace_Free> ... =============================================================================== 00049310 <_Scheduler_EDF_Release_job>: void _Scheduler_EDF_Release_job( Thread_Control *the_thread, uint32_t deadline ) { 49310: 4e56 0000 linkw %fp,#0 49314: 206e 0008 moveal %fp@(8),%a0 49318: 202e 000c movel %fp@(12),%d0 Priority_Control new_priority; if (deadline) { 4931c: 661e bnes 4933c <_Scheduler_EDF_Release_job+0x2c><== ALWAYS TAKEN new_priority = (_Watchdog_Ticks_since_boot + deadline) & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; 4931e: 2028 00ac movel %a0@(172),%d0 <== NOT EXECUTED } the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 49322: 4878 0001 pea 1 <== NOT EXECUTED 49326: 2f00 movel %d0,%sp@- <== NOT EXECUTED else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; 49328: 2140 0018 movel %d0,%a0@(24) <== NOT EXECUTED _Thread_Change_priority(the_thread, new_priority, true); 4932c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4932e: 4eb9 0004 96c0 jsr 496c0 <_Thread_Change_priority> <== NOT EXECUTED 49334: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } 49338: 4e5e unlk %fp <== NOT EXECUTED 4933a: 4e75 rts <== NOT EXECUTED { Priority_Control new_priority; if (deadline) { /* Initializing or shifting deadline. */ new_priority = (_Watchdog_Ticks_since_boot + deadline) 4933c: 2239 0006 29d2 movel 629d2 <_Watchdog_Ticks_since_boot>,%d1 /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 49342: 4878 0001 pea 1 { Priority_Control new_priority; if (deadline) { /* Initializing or shifting deadline. */ new_priority = (_Watchdog_Ticks_since_boot + deadline) 49346: d081 addl %d1,%d0 49348: 0880 001f bclr #31,%d0 /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 4934c: 2f00 movel %d0,%sp@- else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; 4934e: 2140 0018 movel %d0,%a0@(24) _Thread_Change_priority(the_thread, new_priority, true); 49352: 2f08 movel %a0,%sp@- 49354: 4eb9 0004 96c0 jsr 496c0 <_Thread_Change_priority> 4935a: 4fef 000c lea %sp@(12),%sp } 4935e: 4e5e unlk %fp ... =============================================================================== 00049388 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 49388: 4e56 0000 linkw %fp,#0 4938c: 2f0a movel %a2,%sp@- 4938e: 246e 0008 moveal %fp@(8),%a2 _Scheduler_EDF_Enqueue(the_thread); 49392: 2f0a movel %a2,%sp@- 49394: 4eb9 0004 91fc jsr 491fc <_Scheduler_EDF_Enqueue> 4939a: 2f2a 0014 movel %a2@(20),%sp@- * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( 4939e: 2079 0006 2d36 moveal 62d36 <_Per_CPU_Information+0x10>,%a0 493a4: 2f28 0014 movel %a0@(20),%sp@- 493a8: 2079 0006 0f8e moveal 60f8e <_Scheduler+0x30>,%a0 493ae: 4e90 jsr %a0@ 493b0: 4fef 000c lea %sp@(12),%sp 493b4: 4a80 tstl %d0 493b6: 6d08 blts 493c0 <_Scheduler_EDF_Unblock+0x38> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } 493b8: 246e fffc moveal %fp@(-4),%a2 493bc: 4e5e unlk %fp 493be: 4e75 rts */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 493c0: 2079 0006 2d32 moveal 62d32 <_Per_CPU_Information+0xc>,%a0 * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; 493c6: 23ca 0006 2d36 movel %a2,62d36 <_Per_CPU_Information+0x10> if ( _Thread_Executing->is_preemptible || 493cc: 4a28 0074 tstb %a0@(116) 493d0: 6710 beqs 493e2 <_Scheduler_EDF_Unblock+0x5a> <== NEVER TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 493d2: 7001 moveq #1,%d0 493d4: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18> } } 493da: 246e fffc moveal %fp@(-4),%a2 493de: 4e5e unlk %fp 493e0: 4e75 rts */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 493e2: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 493e6: 66d0 bnes 493b8 <_Scheduler_EDF_Unblock+0x30> <== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 493e8: 7001 moveq #1,%d0 <== NOT EXECUTED 493ea: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18> <== NOT EXECUTED 493f0: 60e8 bras 493da <_Scheduler_EDF_Unblock+0x52> <== NOT EXECUTED ... =============================================================================== 000493f4 <_Scheduler_EDF_Update>: { Scheduler_EDF_Per_thread *sched_info = (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { 493f4: 7202 moveq #2,%d1 #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { 493f6: 4e56 0000 linkw %fp,#0 493fa: 2f0a movel %a2,%sp@- 493fc: 246e 0008 moveal %fp@(8),%a2 Scheduler_EDF_Per_thread *sched_info = 49400: 206a 008a moveal %a2@(138),%a0 (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { 49404: 2028 0014 movel %a0@(20),%d0 #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { 49408: 2f02 movel %d2,%sp@- Scheduler_EDF_Per_thread *sched_info = (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { 4940a: b280 cmpl %d0,%d1 4940c: 6712 beqs 49420 <_Scheduler_EDF_Update+0x2c> the_thread->real_priority = the_thread->Start.initial_priority; the_thread->current_priority = the_thread->Start.initial_priority; sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; } if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) { 4940e: 7201 moveq #1,%d1 49410: b280 cmpl %d0,%d1 49412: 6730 beqs 49444 <_Scheduler_EDF_Update+0x50> <== NEVER TAKEN if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 49414: 242e fff8 movel %fp@(-8),%d2 49418: 246e fffc moveal %fp@(-4),%a2 4941c: 4e5e unlk %fp 4941e: 4e75 rts (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); 49420: 202a 00ac movel %a2@(172),%d0 49424: 08c0 001f bset #31,%d0 if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 49428: 242e fff8 movel %fp@(-8),%d2 (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); 4942c: 2540 00ac movel %d0,%a2@(172) the_thread->real_priority = the_thread->Start.initial_priority; 49430: 2540 0018 movel %d0,%a2@(24) the_thread->current_priority = the_thread->Start.initial_priority; 49434: 2540 0014 movel %d0,%a2@(20) if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 49438: 246e fffc moveal %fp@(-4),%a2 4943c: 4e5e unlk %fp if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); the_thread->real_priority = the_thread->Start.initial_priority; the_thread->current_priority = the_thread->Start.initial_priority; sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; 4943e: 42a8 0014 clrl %a0@(20) if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 49442: 4e75 rts Thread_Control *the_thread ) { Scheduler_EDF_Per_thread *sched_info = (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); 49444: 2408 movel %a0,%d2 <== NOT EXECUTED 49446: 5882 addql #4,%d2 <== NOT EXECUTED the_thread->current_priority = the_thread->Start.initial_priority; sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; } if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) { _RBTree_Extract(&_Scheduler_EDF_Ready_queue, the_node); 49448: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4944a: 4879 0006 2d48 pea 62d48 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 49450: 4eb9 0004 deb8 jsr 4deb8 <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert(&_Scheduler_EDF_Ready_queue, the_node); 49456: 2f02 movel %d2,%sp@- <== NOT EXECUTED 49458: 4879 0006 2d48 pea 62d48 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 4945e: 4eb9 0004 e0e2 jsr 4e0e2 <_RBTree_Insert> <== NOT EXECUTED _Scheduler_EDF_Schedule(); 49464: 4eb9 0004 9364 jsr 49364 <_Scheduler_EDF_Schedule> <== NOT EXECUTED if ( _Thread_Executing != _Thread_Heir ) { 4946a: 2079 0006 2d32 moveal 62d32 <_Per_CPU_Information+0xc>,%a0 <== NOT EXECUTED 49470: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 49474: b1f9 0006 2d36 cmpal 62d36 <_Per_CPU_Information+0x10>,%a0 <== NOT EXECUTED 4947a: 6798 beqs 49414 <_Scheduler_EDF_Update+0x20> <== NOT EXECUTED if ( _Thread_Executing->is_preemptible || 4947c: 4a28 0074 tstb %a0@(116) <== NOT EXECUTED 49480: 6606 bnes 49488 <_Scheduler_EDF_Update+0x94> <== NOT EXECUTED 49482: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 49486: 668c bnes 49414 <_Scheduler_EDF_Update+0x20> <== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 49488: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED _Scheduler_EDF_Schedule(); if ( _Thread_Executing != _Thread_Heir ) { if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 4948c: 7001 moveq #1,%d0 <== NOT EXECUTED } } } 4948e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 49492: 4e5e unlk %fp <== NOT EXECUTED _Scheduler_EDF_Schedule(); if ( _Thread_Executing != _Thread_Heir ) { if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 49494: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18> <== NOT EXECUTED } } } =============================================================================== 0004949c <_Scheduler_EDF_Yield>: Thread_Control *executing = _Thread_Executing; Scheduler_EDF_Per_thread *executing_info = (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); _ISR_Disable( level ); 4949c: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED #include #include #include void _Scheduler_EDF_Yield(void) { 494a2: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 494a6: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED Scheduler_EDF_Per_thread *first_info; RBTree_Node *first_node; ISR_Level level; Thread_Control *executing = _Thread_Executing; 494aa: 2479 0006 2d32 moveal 62d32 <_Per_CPU_Information+0xc>,%a2 <== NOT EXECUTED Scheduler_EDF_Per_thread *executing_info = 494b0: 262a 008a movel %a2@(138),%d3 <== NOT EXECUTED (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); _ISR_Disable( level ); 494b4: 40c2 movew %sr,%d2 <== NOT EXECUTED 494b6: 8082 orl %d2,%d0 <== NOT EXECUTED 494b8: 46c0 movew %d0,%sr <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _RBTree_Has_only_one_node( const RBTree_Control *the_rbtree ) { if(!the_rbtree) return NULL; /* TODO: expected behavior? */ return (the_rbtree->root->child[RBT_LEFT] == NULL && the_rbtree->root->child[RBT_RIGHT] == NULL); 494ba: 2079 0006 2d4c moveal 62d4c <_Scheduler_EDF_Ready_queue+0x4>,%a0<== NOT EXECUTED 494c0: 4aa8 0004 tstl %a0@(4) <== NOT EXECUTED 494c4: 674a beqs 49510 <_Scheduler_EDF_Yield+0x74> <== NOT EXECUTED ISR_Level level; Thread_Control *executing = _Thread_Executing; Scheduler_EDF_Per_thread *executing_info = (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); 494c6: 5883 addql #4,%d3 <== NOT EXECUTED if ( !_RBTree_Has_only_one_node(&_Scheduler_EDF_Ready_queue) ) { /* * The RBTree has more than one node, enqueue behind the tasks * with the same priority in case there are such ones. */ _RBTree_Extract( &_Scheduler_EDF_Ready_queue, executing_node ); 494c8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 494ca: 4879 0006 2d48 pea 62d48 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 494d0: 4eb9 0004 deb8 jsr 4deb8 <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node ); 494d6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 494d8: 4879 0006 2d48 pea 62d48 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 494de: 4eb9 0004 e0e2 jsr 4e0e2 <_RBTree_Insert> <== NOT EXECUTED _ISR_Flash( level ); 494e4: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 494ea: 46c2 movew %d2,%sr <== NOT EXECUTED 494ec: 8082 orl %d2,%d0 <== NOT EXECUTED 494ee: 46c0 movew %d0,%sr <== NOT EXECUTED if ( _Thread_Is_heir( executing ) ) { 494f0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 494f4: b5f9 0006 2d36 cmpal 62d36 <_Per_CPU_Information+0x10>,%a2 <== NOT EXECUTED 494fa: 672c beqs 49528 <_Scheduler_EDF_Yield+0x8c> <== NOT EXECUTED _Thread_Heir = first_info->thread; } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; 494fc: 7001 moveq #1,%d0 <== NOT EXECUTED 494fe: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18> <== NOT EXECUTED _ISR_Enable( level ); 49504: 46c2 movew %d2,%sr <== NOT EXECUTED } 49506: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4950c: 4e5e unlk %fp <== NOT EXECUTED 4950e: 4e75 rts <== NOT EXECUTED 49510: 4aa8 0008 tstl %a0@(8) <== NOT EXECUTED 49514: 66b0 bnes 494c6 <_Scheduler_EDF_Yield+0x2a> <== NOT EXECUTED _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node); _Thread_Heir = first_info->thread; } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 49516: b5f9 0006 2d36 cmpal 62d36 <_Per_CPU_Information+0x10>,%a2 <== NOT EXECUTED 4951c: 67e6 beqs 49504 <_Scheduler_EDF_Yield+0x68> <== NOT EXECUTED _Thread_Dispatch_necessary = true; 4951e: 7001 moveq #1,%d0 <== NOT EXECUTED 49520: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18> <== NOT EXECUTED 49526: 60dc bras 49504 <_Scheduler_EDF_Yield+0x68> <== NOT EXECUTED _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) { first_node = _RBTree_Peek( &_Scheduler_EDF_Ready_queue, RBT_LEFT ); 49528: 42a7 clrl %sp@- <== NOT EXECUTED 4952a: 4879 0006 2d48 pea 62d48 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 49530: 4eb9 0004 e110 jsr 4e110 <_RBTree_Peek> <== NOT EXECUTED first_info = _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node); _Thread_Heir = first_info->thread; 49536: 508f addql #8,%sp <== NOT EXECUTED 49538: 2040 moveal %d0,%a0 <== NOT EXECUTED 4953a: 5988 subql #4,%a0 <== NOT EXECUTED 4953c: 23d0 0006 2d36 movel %a0@,62d36 <_Per_CPU_Information+0x10><== NOT EXECUTED } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; 49542: 7001 moveq #1,%d0 <== NOT EXECUTED 49544: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18> <== NOT EXECUTED 4954a: 60b8 bras 49504 <_Scheduler_EDF_Yield+0x68> <== NOT EXECUTED =============================================================================== 000487d4 <_Scheduler_Handler_initialization>: #include #include #include void _Scheduler_Handler_initialization(void) { 487d4: 4e56 0000 linkw %fp,#0 (*_Scheduler.Operations.initialize)(); } 487d8: 4e5e unlk %fp #include #include void _Scheduler_Handler_initialization(void) { (*_Scheduler.Operations.initialize)(); 487da: 2279 0005 f752 moveal 5f752 <_Scheduler+0x4>,%a1 487e0: 4ed1 jmp %a1@ ... =============================================================================== 00048800 <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 48800: 4e56 0000 linkw %fp,#0 48804: 206e 0008 moveal %fp@(8),%a0 48808: 2f0b movel %a3,%sp@- 4880a: 2f0a movel %a2,%sp@- ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; 4880c: 2468 008a moveal %a0@(138),%a2 ready = sched_info->ready_chain; 48810: 2252 moveal %a2@,%a1 if ( _Chain_Has_only_one_node( ready ) ) { 48812: 2029 0008 movel %a1@(8),%d0 48816: b091 cmpl %a1@,%d0 48818: 6700 0088 beqw 488a2 <_Scheduler_priority_Block+0xa2> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4881c: 2450 moveal %a0@,%a2 previous = the_node->previous; 4881e: 2268 0004 moveal %a0@(4),%a1 next->previous = previous; 48822: 2549 0004 movel %a1,%a2@(4) previous->next = next; 48826: 228a movel %a2,%a1@ _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 48828: b1f9 0006 14ae cmpal 614ae <_Per_CPU_Information+0x10>,%a0 4882e: 6720 beqs 48850 <_Scheduler_priority_Block+0x50> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 48830: b1f9 0006 14aa cmpal 614aa <_Per_CPU_Information+0xc>,%a0 48836: 6708 beqs 48840 <_Scheduler_priority_Block+0x40> _Thread_Dispatch_necessary = true; } 48838: 245f moveal %sp@+,%a2 4883a: 265f moveal %sp@+,%a3 4883c: 4e5e unlk %fp 4883e: 4e75 rts 48840: 245f moveal %sp@+,%a2 if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 48842: 7001 moveq #1,%d0 } 48844: 265f moveal %sp@+,%a3 48846: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 48848: 13c0 0006 14b6 moveb %d0,614b6 <_Per_CPU_Information+0x18> } 4884e: 4e75 rts RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 48850: 3039 0006 14c0 movew 614c0 <_Priority_Major_bit_map>,%d0 48856: 4840 swap %d0 48858: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4885a: 43f9 0006 14c4 lea 614c4 <_Priority_Bit_map>,%a1 48860: 0280 0000 ffff andil #65535,%d0 48866: 3231 0a00 movew %a1@(00000000,%d0:l:2),%d1 4886a: 4841 swap %d1 4886c: 04c1 ff1 %d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4886e: 2279 0005 f74e moveal 5f74e <_Scheduler>,%a1 return (_Priority_Bits_index( major ) << 4) + 48874: 0281 0000 ffff andil #65535,%d1 4887a: e988 lsll #4,%d0 4887c: d081 addl %d1,%d0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 4887e: 2200 movel %d0,%d1 48880: e988 lsll #4,%d0 48882: e589 lsll #2,%d1 48884: 9081 subl %d1,%d0 48886: d3c0 addal %d0,%a1 48888: 2019 movel %a1@+,%d0 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 4888a: b3c0 cmpal %d0,%a1 4888c: 56c1 sne %d1 4888e: 49c1 extbl %d1 * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 48890: c081 andl %d1,%d0 48892: 23c0 0006 14ae movel %d0,614ae <_Per_CPU_Information+0x10> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 48898: b1f9 0006 14aa cmpal 614aa <_Per_CPU_Information+0xc>,%a0 4889e: 6698 bnes 48838 <_Scheduler_priority_Block+0x38> 488a0: 609e bras 48840 <_Scheduler_priority_Block+0x40> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 488a2: 266a 0004 moveal %a2@(4),%a3 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 488a6: 2009 movel %a1,%d0 488a8: 5880 addql #4,%d0 488aa: 2280 movel %d0,%a1@ 488ac: 3213 movew %a3@,%d1 488ae: 302a 000e movew %a2@(14),%d0 head->next = tail; head->previous = NULL; 488b2: 42a9 0004 clrl %a1@(4) 488b6: c081 andl %d1,%d0 tail->previous = head; 488b8: 2349 0008 movel %a1,%a1@(8) 488bc: 3680 movew %d0,%a3@ if ( *the_priority_map->minor == 0 ) 488be: 6600 ff68 bnew 48828 <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; 488c2: 3239 0006 14c0 movew 614c0 <_Priority_Major_bit_map>,%d1 488c8: 302a 000c movew %a2@(12),%d0 488cc: c081 andl %d1,%d0 488ce: 33c0 0006 14c0 movew %d0,614c0 <_Priority_Major_bit_map> { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 488d4: b1f9 0006 14ae cmpal 614ae <_Per_CPU_Information+0x10>,%a0 488da: 6600 ff54 bnew 48830 <_Scheduler_priority_Block+0x30> 488de: 6000 ff70 braw 48850 <_Scheduler_priority_Block+0x50> ... =============================================================================== 000489d8 <_Scheduler_priority_Free>: #include void _Scheduler_priority_Free ( Thread_Control *the_thread ) { 489d8: 4e56 0000 linkw %fp,#0 489dc: 206e 0008 moveal %fp@(8),%a0 _Workspace_Free( the_thread->scheduler_info ); 489e0: 2d68 008a 0008 movel %a0@(138),%fp@(8) } 489e6: 4e5e unlk %fp void _Scheduler_priority_Free ( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 489e8: 4ef9 0004 a2fe jmp 4a2fe <_Workspace_Free> ... =============================================================================== 00048ad4 <_Scheduler_priority_Tick>: #include #include void _Scheduler_priority_Tick( void ) { 48ad4: 4e56 0000 linkw %fp,#0 48ad8: 2f0a movel %a2,%sp@- Thread_Control *executing; executing = _Thread_Executing; 48ada: 2479 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a2 /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 48ae0: 4a2a 0074 tstb %a2@(116) 48ae4: 6720 beqs 48b06 <_Scheduler_priority_Tick+0x32> return; if ( !_States_Is_ready( executing->current_state ) ) 48ae6: 4aaa 0010 tstl %a2@(16) 48aea: 661a bnes 48b06 <_Scheduler_priority_Tick+0x32> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 48aec: 202a 007a movel %a2@(122),%d0 48af0: 7201 moveq #1,%d1 48af2: b280 cmpl %d0,%d1 48af4: 6210 bhis 48b06 <_Scheduler_priority_Tick+0x32> 48af6: 123c 0002 moveb #2,%d1 48afa: b280 cmpl %d0,%d1 48afc: 642e bccs 48b2c <_Scheduler_priority_Tick+0x58> 48afe: 123c 0003 moveb #3,%d1 48b02: b280 cmpl %d0,%d1 48b04: 6708 beqs 48b0e <_Scheduler_priority_Tick+0x3a> <== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 48b06: 246e fffc moveal %fp@(-4),%a2 48b0a: 4e5e unlk %fp 48b0c: 4e75 rts } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 48b0e: 202a 0076 movel %a2@(118),%d0 48b12: 5380 subql #1,%d0 48b14: 2540 0076 movel %d0,%a2@(118) 48b18: 66ec bnes 48b06 <_Scheduler_priority_Tick+0x32> (*executing->budget_callout)( executing ); 48b1a: 2f0a movel %a2,%sp@- 48b1c: 206a 007e moveal %a2@(126),%a0 48b20: 4e90 jsr %a0@ break; #endif } } 48b22: 246e fffc moveal %fp@(-4),%a2 break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); 48b26: 588f addql #4,%sp break; #endif } } 48b28: 4e5e unlk %fp 48b2a: 4e75 rts case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 48b2c: 202a 0076 movel %a2@(118),%d0 48b30: 5380 subql #1,%d0 48b32: 2540 0076 movel %d0,%a2@(118) 48b36: 6ece bgts 48b06 <_Scheduler_priority_Tick+0x32> * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 48b38: 2079 0005 f75a moveal 5f75a <_Scheduler+0xc>,%a0 48b3e: 4e90 jsr %a0@ * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield(); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 48b40: 41f9 0006 1000 lea 61000 <_Thread_Ticks_per_timeslice>,%a0 48b46: 2550 0076 movel %a0@,%a2@(118) if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 48b4a: 246e fffc moveal %fp@(-4),%a2 48b4e: 4e5e unlk %fp ... =============================================================================== 000491d0 <_Scheduler_simple_Block>: #include void _Scheduler_simple_Block( Thread_Control *the_thread ) { 491d0: 4e56 0000 linkw %fp,#0 491d4: 2f02 movel %d2,%sp@- 491d6: 242e 0008 movel %fp@(8),%d2 _Scheduler_simple_Extract(the_thread); 491da: 2f02 movel %d2,%sp@- 491dc: 4eb9 0004 9234 jsr 49234 <_Scheduler_simple_Extract> if ( _Thread_Is_heir( the_thread ) ) 491e2: 588f addql #4,%sp 491e4: b4b9 0006 23f6 cmpl 623f6 <_Per_CPU_Information+0x10>,%d2 491ea: 6720 beqs 4920c <_Scheduler_simple_Block+0x3c> _Scheduler_simple_Schedule(); if ( _Thread_Is_executing( the_thread ) ) 491ec: b4b9 0006 23f2 cmpl 623f2 <_Per_CPU_Information+0xc>,%d2 491f2: 6708 beqs 491fc <_Scheduler_simple_Block+0x2c> <== NEVER TAKEN _Thread_Dispatch_necessary = true; } 491f4: 242e fffc movel %fp@(-4),%d2 491f8: 4e5e unlk %fp 491fa: 4e75 rts 491fc: 242e fffc movel %fp@(-4),%d2 49200: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_simple_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 49202: 7001 moveq #1,%d0 49204: 13c0 0006 23fe moveb %d0,623fe <_Per_CPU_Information+0x18> } 4920a: 4e75 rts ) { _Scheduler_simple_Extract(the_thread); if ( _Thread_Is_heir( the_thread ) ) _Scheduler_simple_Schedule(); 4920c: 4eb9 0004 9348 jsr 49348 <_Scheduler_simple_Schedule> if ( _Thread_Is_executing( the_thread ) ) 49212: b4b9 0006 23f2 cmpl 623f2 <_Per_CPU_Information+0xc>,%d2 49218: 66da bnes 491f4 <_Scheduler_simple_Block+0x24> <== NEVER TAKEN 4921a: 60e0 bras 491fc <_Scheduler_simple_Block+0x2c> =============================================================================== 00047750 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 47750: 4e56 0000 linkw %fp,#0 47754: 206e 0008 moveal %fp@(8),%a0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 47758: 2039 0006 1a98 movel 61a98 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 4775e: 2f02 movel %d2,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 47760: 4a88 tstl %a0 47762: 6762 beqs 477c6 <_TOD_Validate+0x76> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 47764: 243c 000f 4240 movel #1000000,%d2 4776a: 4c40 2002 remul %d0,%d2,%d2 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 4776e: b4a8 0018 cmpl %a0@(24),%d2 47772: 6352 blss 477c6 <_TOD_Validate+0x76> (the_tod->ticks >= ticks_per_second) || 47774: 703b moveq #59,%d0 47776: b0a8 0014 cmpl %a0@(20),%d0 4777a: 654a bcss 477c6 <_TOD_Validate+0x76> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 4777c: b0a8 0010 cmpl %a0@(16),%d0 47780: 6544 bcss 477c6 <_TOD_Validate+0x76> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 47782: 7217 moveq #23,%d1 47784: b2a8 000c cmpl %a0@(12),%d1 47788: 653c bcss 477c6 <_TOD_Validate+0x76> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 4778a: 2028 0004 movel %a0@(4),%d0 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 4778e: 6736 beqs 477c6 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->month == 0) || 47790: 740c moveq #12,%d2 47792: b480 cmpl %d0,%d2 47794: 6530 bcss 477c6 <_TOD_Validate+0x76> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 47796: 2210 movel %a0@,%d1 (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 47798: 0c81 0000 07c3 cmpil #1987,%d1 4779e: 6326 blss 477c6 <_TOD_Validate+0x76> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 477a0: 2068 0008 moveal %a0@(8),%a0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 477a4: 4a88 tstl %a0 477a6: 671e beqs 477c6 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 477a8: 143c 0003 moveb #3,%d2 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 477ac: 43f9 0006 0b18 lea 60b18 <_TOD_Days_per_month>,%a1 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 477b2: c282 andl %d2,%d1 477b4: 6618 bnes 477ce <_TOD_Validate+0x7e> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 477b6: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 477ba: b1c0 cmpal %d0,%a0 477bc: 53c0 sls %d0 477be: 4480 negl %d0 if ( the_tod->day > days_in_month ) return false; return true; } 477c0: 241f movel %sp@+,%d2 477c2: 4e5e unlk %fp 477c4: 4e75 rts 477c6: 241f movel %sp@+,%d2 477c8: 4e5e unlk %fp (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 477ca: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 477cc: 4e75 rts return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 477ce: 2031 0c00 movel %a1@(00000000,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 477d2: b1c0 cmpal %d0,%a0 477d4: 53c0 sls %d0 477d6: 4480 negl %d0 477d8: 60e6 bras 477c0 <_TOD_Validate+0x70> ... =============================================================================== 00048d38 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48d38: 4e56 fff0 linkw %fp,#-16 48d3c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48d40: 246e 0008 moveal %fp@(8),%a2 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 48d44: 262a 0010 movel %a2@(16),%d3 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48d48: 242e 000c movel %fp@(12),%d2 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 48d4c: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48d4e: 182e 0013 moveb %fp@(19),%d4 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 48d52: 4eb9 0004 9b3c jsr 49b3c <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 48d58: 588f addql #4,%sp 48d5a: b4aa 0014 cmpl %a2@(20),%d2 48d5e: 670c beqs 48d6c <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 48d60: 2f02 movel %d2,%sp@- 48d62: 2f0a movel %a2,%sp@- 48d64: 4eb9 0004 9ad8 jsr 49ad8 <_Thread_Set_priority> 48d6a: 508f addql #8,%sp _ISR_Disable( level ); 48d6c: 203c 0000 0700 movel #1792,%d0 48d72: 40c2 movew %sr,%d2 48d74: 8082 orl %d2,%d0 48d76: 46c0 movew %d0,%sr /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 48d78: 202a 0010 movel %a2@(16),%d0 if ( state != STATES_TRANSIENT ) { 48d7c: 7204 moveq #4,%d1 48d7e: b280 cmpl %d0,%d1 48d80: 6738 beqs 48dba <_Thread_Change_priority+0x82> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 48d82: 44c3 movew %d3,%ccr 48d84: 6708 beqs 48d8e <_Thread_Change_priority+0x56> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 48d86: 72fb moveq #-5,%d1 48d88: c280 andl %d0,%d1 48d8a: 2541 0010 movel %d1,%a2@(16) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 48d8e: 46c2 movew %d2,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 48d90: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 48d96: 660a bnes 48da2 <_Thread_Change_priority+0x6a> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 48d98: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48d9e: 4e5e unlk %fp 48da0: 4e75 rts /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 48da2: 2d4a 000c movel %a2,%fp@(12) 48da6: 2d6a 0044 0008 movel %a2@(68),%fp@(8) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 48dac: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48db2: 4e5e unlk %fp /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 48db4: 4ef9 0004 9a28 jmp 49a28 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 48dba: 44c3 movew %d3,%ccr 48dbc: 6714 beqs 48dd2 <_Thread_Change_priority+0x9a> <== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 48dbe: 42aa 0010 clrl %a2@(16) if ( prepend_it ) 48dc2: 4a04 tstb %d4 48dc4: 6748 beqs 48e0e <_Thread_Change_priority+0xd6> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 48dc6: 2f0a movel %a2,%sp@- 48dc8: 2079 0005 f776 moveal 5f776 <_Scheduler+0x28>,%a0 48dce: 4e90 jsr %a0@ 48dd0: 588f addql #4,%sp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 48dd2: 203c 0000 0700 movel #1792,%d0 48dd8: 46c2 movew %d2,%sr 48dda: 8082 orl %d2,%d0 48ddc: 46c0 movew %d0,%sr * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); 48dde: 2079 0005 f756 moveal 5f756 <_Scheduler+0x8>,%a0 48de4: 4e90 jsr %a0@ * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 48de6: 2079 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a0 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && 48dec: b1f9 0006 14ae cmpal 614ae <_Per_CPU_Information+0x10>,%a0 48df2: 670e beqs 48e02 <_Thread_Change_priority+0xca> 48df4: 4a28 0074 tstb %a0@(116) 48df8: 6708 beqs 48e02 <_Thread_Change_priority+0xca> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 48dfa: 7001 moveq #1,%d0 48dfc: 13c0 0006 14b6 moveb %d0,614b6 <_Per_CPU_Information+0x18> _ISR_Enable( level ); 48e02: 46c2 movew %d2,%sr } 48e04: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48e0a: 4e5e unlk %fp 48e0c: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 48e0e: 2f0a movel %a2,%sp@- 48e10: 2079 0005 f772 moveal 5f772 <_Scheduler+0x24>,%a0 48e16: 4e90 jsr %a0@ 48e18: 588f addql #4,%sp 48e1a: 60b6 bras 48dd2 <_Thread_Change_priority+0x9a> =============================================================================== 00048e78 <_Thread_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48e78: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 48e7a: 4e56 0000 linkw %fp,#0 48e7e: 2f0b movel %a3,%sp@- 48e80: 266e 0008 moveal %fp@(8),%a3 48e84: 2f0a movel %a2,%sp@- 48e86: 246e 000c moveal %fp@(12),%a2 48e8a: 206b 0018 moveal %a3@(24),%a0 48e8e: 302a 000a movew %a2@(10),%d0 48e92: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 48e96: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 48e9c: 5380 subql #1,%d0 48e9e: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 48ea4: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 48eaa: 2f0a movel %a2,%sp@- 48eac: 4eb9 0004 9f4c jsr 49f4c <_User_extensions_Thread_delete> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 48eb2: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 48eb8: 5280 addql #1,%d0 48eba: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 48ec0: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 48ec6: 2f0a movel %a2,%sp@- 48ec8: 2f0b movel %a3,%sp@- 48eca: 4eb9 0004 801c jsr 4801c <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 48ed0: 4878 0001 pea 1 48ed4: 2f0a movel %a2,%sp@- 48ed6: 4eb9 0004 9af0 jsr 49af0 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 48edc: 2f0a movel %a2,%sp@- 48ede: 4eb9 0004 9934 jsr 49934 <_Thread_queue_Extract_with_proxy> 48ee4: 4fef 0018 lea %sp@(24),%sp 48ee8: 4a00 tstb %d0 48eea: 660a bnes 48ef6 <_Thread_Close+0x7e> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 48eec: 7002 moveq #2,%d0 48eee: b0aa 0050 cmpl %a2@(80),%d0 48ef2: 6700 0088 beqw 48f7c <_Thread_Close+0x104> */ RTEMS_INLINE_ROUTINE void _Scheduler_Free( Thread_Control *the_thread ) { return _Scheduler.Operations.free( the_thread ); 48ef6: 2f0a movel %a2,%sp@- 48ef8: 2079 0005 f76a moveal 5f76a <_Scheduler+0x1c>,%a0 48efe: 4e90 jsr %a0@ /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 48f00: 588f addql #4,%sp 48f02: b5f9 0006 10ca cmpal 610ca <_Thread_Allocated_fp>,%a2 48f08: 6736 beqs 48f40 <_Thread_Close+0xc8> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; _Workspace_Free( the_thread->Start.fp_context ); 48f0a: 2f2a 00ba movel %a2@(186),%sp@- 48f0e: 47f9 0004 a2fe lea 4a2fe <_Workspace_Free>,%a3 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 48f14: 42aa 00f6 clrl %a2@(246) _Workspace_Free( the_thread->Start.fp_context ); 48f18: 4e93 jsr %a3@ /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 48f1a: 2f0a movel %a2,%sp@- 48f1c: 4eb9 0004 9be8 jsr 49be8 <_Thread_Stack_Free> the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); 48f22: 2f2a 0106 movel %a2@(262),%sp@- /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 48f26: 42aa 00be clrl %a2@(190) _Workspace_Free( the_thread->extensions ); 48f2a: 4e93 jsr %a3@ the_thread->extensions = NULL; } 48f2c: 266e fffc moveal %fp@(-4),%a3 */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; 48f30: 4fef 000c lea %sp@(12),%sp 48f34: 42aa 0106 clrl %a2@(262) } 48f38: 246e fff8 moveal %fp@(-8),%a2 48f3c: 4e5e unlk %fp 48f3e: 4e75 rts if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; _Workspace_Free( the_thread->Start.fp_context ); 48f40: 2f2a 00ba movel %a2@(186),%sp@- 48f44: 47f9 0004 a2fe lea 4a2fe <_Workspace_Free>,%a3 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 48f4a: 42aa 00f6 clrl %a2@(246) */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 48f4e: 42b9 0006 10ca clrl 610ca <_Thread_Allocated_fp> _Workspace_Free( the_thread->Start.fp_context ); 48f54: 4e93 jsr %a3@ /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 48f56: 2f0a movel %a2,%sp@- 48f58: 4eb9 0004 9be8 jsr 49be8 <_Thread_Stack_Free> the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); 48f5e: 2f2a 0106 movel %a2@(262),%sp@- /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 48f62: 42aa 00be clrl %a2@(190) _Workspace_Free( the_thread->extensions ); 48f66: 4e93 jsr %a3@ the_thread->extensions = NULL; } 48f68: 266e fffc moveal %fp@(-4),%a3 */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; 48f6c: 4fef 000c lea %sp@(12),%sp 48f70: 42aa 0106 clrl %a2@(262) } 48f74: 246e fff8 moveal %fp@(-8),%a2 48f78: 4e5e unlk %fp 48f7a: 4e75 rts */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 48f7c: 486a 0048 pea %a2@(72) 48f80: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 48f86: 588f addql #4,%sp 48f88: 2079 0005 f76a moveal 5f76a <_Scheduler+0x1c>,%a0 48f8e: 2f0a movel %a2,%sp@- 48f90: 4e90 jsr %a0@ /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 48f92: 588f addql #4,%sp 48f94: b5f9 0006 10ca cmpal 610ca <_Thread_Allocated_fp>,%a2 48f9a: 6600 ff6e bnew 48f0a <_Thread_Close+0x92> 48f9e: 60a0 bras 48f40 <_Thread_Close+0xc8> <== NOT EXECUTED =============================================================================== 00049058 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 49058: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 4905c: 486e fffc pea %fp@(-4) 49060: 2f2e 0008 movel %fp@(8),%sp@- 49064: 4eb9 0004 9240 jsr 49240 <_Thread_Get> switch ( location ) { 4906a: 508f addql #8,%sp 4906c: 4aae fffc tstl %fp@(-4) 49070: 6624 bnes 49096 <_Thread_Delay_ended+0x3e> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 49072: 2f3c 1000 0018 movel #268435480,%sp@- 49078: 2f00 movel %d0,%sp@- 4907a: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> 49080: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 49082: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 49088: 5380 subql #1,%d0 4908a: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 49090: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 49096: 4e5e unlk %fp ... =============================================================================== 0004909c <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 4909c: 4e56 ffc8 linkw %fp,#-56 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 490a0: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 490a6: 5280 addql #1,%d0 490a8: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 490ae: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 490b4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); 490b8: 283c 0000 0700 movel #1792,%d4 490be: 2004 movel %d4,%d0 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 490c0: 2479 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 490c6: 40c1 movew %sr,%d1 490c8: 8081 orl %d1,%d0 490ca: 46c0 movew %d0,%sr while ( _Thread_Dispatch_necessary == true ) { 490cc: 1039 0006 14b6 moveb 614b6 <_Per_CPU_Information+0x18>,%d0 490d2: 6700 0110 beqw 491e4 <_Thread_Dispatch+0x148> heir = _Thread_Heir; 490d6: 2679 0006 14ae moveal 614ae <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_necessary = false; 490dc: 4200 clrb %d0 _Thread_Executing = heir; 490de: 23cb 0006 14aa movel %a3,614aa <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 490e4: 13c0 0006 14b6 moveb %d0,614b6 <_Per_CPU_Information+0x18> /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 490ea: b7ca cmpal %a2,%a3 490ec: 6700 00f6 beqw 491e4 <_Thread_Dispatch+0x148> 490f0: 260e movel %fp,%d3 490f2: 240e movel %fp,%d2 490f4: 0683 ffff fff0 addil #-16,%d3 490fa: 2e3c 0004 cd9c movel #314780,%d7 49100: 5182 subql #8,%d2 49102: 2c3c 0004 9d0c movel #302348,%d6 49108: 2a3c 0004 9cc4 movel #302276,%d5 4910e: 4bf9 0004 9fd8 lea 49fd8 <_User_extensions_Thread_switch>,%a5 49114: 49f9 0004 a34c lea 4a34c <_CPU_Context_switch>,%a4 */ #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 4911a: 7001 moveq #1,%d0 4911c: b0ab 007a cmpl %a3@(122),%d0 49120: 6700 00e8 beqw 4920a <_Thread_Dispatch+0x16e> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 49124: 46c1 movew %d1,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 49126: 2f03 movel %d3,%sp@- 49128: 2047 moveal %d7,%a0 4912a: 4e90 jsr %a0@ _Timestamp_Subtract( 4912c: 2046 moveal %d6,%a0 4912e: 2f02 movel %d2,%sp@- 49130: 2f03 movel %d3,%sp@- 49132: 4879 0006 14b8 pea 614b8 <_Per_CPU_Information+0x1a> 49138: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 4913a: 2045 moveal %d5,%a0 4913c: 2f02 movel %d2,%sp@- 4913e: 486a 0082 pea %a2@(130) 49142: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 49144: 2079 0006 10ce moveal 610ce <_Thread_libc_reent>,%a0 4914a: 4fef 0018 lea %sp@(24),%sp &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 4914e: 202e fff0 movel %fp@(-16),%d0 49152: 222e fff4 movel %fp@(-12),%d1 49156: 23c0 0006 14b8 movel %d0,614b8 <_Per_CPU_Information+0x1a> 4915c: 23c1 0006 14bc movel %d1,614bc <_Per_CPU_Information+0x1e> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 49162: 4a88 tstl %a0 49164: 6708 beqs 4916e <_Thread_Dispatch+0xd2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 49166: 2550 00fa movel %a0@,%a2@(250) *_Thread_libc_reent = heir->libc_reent; 4916a: 20ab 00fa movel %a3@(250),%a0@ } _User_extensions_Thread_switch( executing, heir ); 4916e: 2f0b movel %a3,%sp@- 49170: 2f0a movel %a2,%sp@- 49172: 4e95 jsr %a5@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 49174: 486b 00c2 pea %a3@(194) 49178: 486a 00c2 pea %a2@(194) 4917c: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4917e: 4fef 0010 lea %sp@(16),%sp 49182: 4aaa 00f6 tstl %a2@(246) 49186: 672c beqs 491b4 <_Thread_Dispatch+0x118> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 49188: 2079 0006 10ca moveal 610ca <_Thread_Allocated_fp>,%a0 4918e: b1ca cmpal %a2,%a0 49190: 6722 beqs 491b4 <_Thread_Dispatch+0x118> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 49192: 4a88 tstl %a0 49194: 670c beqs 491a2 <_Thread_Dispatch+0x106> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 49196: 4868 00f6 pea %a0@(246) 4919a: 4eb9 0004 a47c jsr 4a47c <_CPU_Context_save_fp> 491a0: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 491a2: 486a 00f6 pea %a2@(246) 491a6: 4eb9 0004 a4b4 jsr 4a4b4 <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 491ac: 588f addql #4,%sp 491ae: 23ca 0006 10ca movel %a2,610ca <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 491b4: 2479 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 491ba: 2004 movel %d4,%d0 491bc: 40c1 movew %sr,%d1 491be: 8081 orl %d1,%d0 491c0: 46c0 movew %d0,%sr /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 491c2: 1039 0006 14b6 moveb 614b6 <_Per_CPU_Information+0x18>,%d0 491c8: 671a beqs 491e4 <_Thread_Dispatch+0x148> heir = _Thread_Heir; 491ca: 2679 0006 14ae moveal 614ae <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_necessary = false; 491d0: 4200 clrb %d0 _Thread_Executing = heir; 491d2: 23cb 0006 14aa movel %a3,614aa <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 491d8: 13c0 0006 14b6 moveb %d0,614b6 <_Per_CPU_Information+0x18> /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 491de: b5cb cmpal %a3,%a2 491e0: 6600 ff38 bnew 4911a <_Thread_Dispatch+0x7e> _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 491e4: 46c1 movew %d1,%sr * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 491e6: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 491ec: 5380 subql #1,%d0 491ee: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 491f4: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 491fa: 4eb9 0004 7442 jsr 47442 <_API_extensions_Run_postswitch> } 49200: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 49206: 4e5e unlk %fp 49208: 4e75 rts #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 4920a: 41f9 0006 1000 lea 61000 <_Thread_Ticks_per_timeslice>,%a0 49210: 2750 0076 movel %a0@,%a3@(118) 49214: 6000 ff0e braw 49124 <_Thread_Dispatch+0x88> =============================================================================== 00049218 <_Thread_Enable_dispatch>: * dispatch thread * no dispatch thread */ #if defined (__THREAD_DO_NOT_INLINE_ENABLE_DISPATCH__ ) void _Thread_Enable_dispatch( void ) { 49218: 4e56 0000 linkw %fp,#0 * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 4921c: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 49222: 5380 subql #1,%d0 49224: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 4922a: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 if ( _Thread_Dispatch_decrement_disable_level() ) 49230: 6704 beqs 49236 <_Thread_Enable_dispatch+0x1e> return; _Thread_Dispatch(); } 49232: 4e5e unlk %fp 49234: 4e75 rts 49236: 4e5e unlk %fp #if defined (__THREAD_DO_NOT_INLINE_ENABLE_DISPATCH__ ) void _Thread_Enable_dispatch( void ) { if ( _Thread_Dispatch_decrement_disable_level() ) return; _Thread_Dispatch(); 49238: 4ef9 0004 909c jmp 4909c <_Thread_Dispatch> ... =============================================================================== 0004ee40 <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 4ee40: 4e56 0000 linkw %fp,#0 4ee44: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 4ee46: 2479 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a2 * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 4ee4c: 2f02 movel %d2,%sp@- /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4ee4e: 222a 00a8 movel %a2@(168),%d1 _ISR_Set_level(level); 4ee52: 40c0 movew %sr,%d0 4ee54: e189 lsll #8,%d1 4ee56: 0280 0000 f8ff andil #63743,%d0 4ee5c: 8081 orl %d1,%d0 4ee5e: 46c0 movew %d0,%sr && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; doneConstructors = true; 4ee60: 7001 moveq #1,%d0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 4ee62: 1439 0006 0808 moveb 60808 ,%d2 doneConstructors = true; 4ee68: 13c0 0006 0808 moveb %d0,60808 #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4ee6e: 4aaa 00f6 tstl %a2@(246) 4ee72: 6720 beqs 4ee94 <_Thread_Handler+0x54> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 4ee74: 2079 0006 10ca moveal 610ca <_Thread_Allocated_fp>,%a0 4ee7a: b1ca cmpal %a2,%a0 4ee7c: 6716 beqs 4ee94 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4ee7e: 4a88 tstl %a0 4ee80: 670c beqs 4ee8e <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4ee82: 4868 00f6 pea %a0@(246) 4ee86: 4eb9 0004 a47c jsr 4a47c <_CPU_Context_save_fp> 4ee8c: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4ee8e: 23ca 0006 10ca movel %a2,610ca <_Thread_Allocated_fp> /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 4ee94: 2f0a movel %a2,%sp@- 4ee96: 4eb9 0004 9e24 jsr 49e24 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4ee9c: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (doCons) /* && (volatile void *)_init) */ { 4eea2: 588f addql #4,%sp 4eea4: 4a02 tstb %d2 4eea6: 6724 beqs 4eecc <_Thread_Handler+0x8c> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4eea8: 202a 0092 movel %a2@(146),%d0 4eeac: 672a beqs 4eed8 <_Thread_Handler+0x98> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 4eeae: 7201 moveq #1,%d1 4eeb0: b280 cmpl %d0,%d1 4eeb2: 674c beqs 4ef00 <_Thread_Handler+0xc0> <== ALWAYS TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4eeb4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4eeb6: 4eb9 0004 9e62 jsr 49e62 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4eebc: 4878 0005 pea 5 <== NOT EXECUTED 4eec0: 4878 0001 pea 1 <== NOT EXECUTED 4eec4: 42a7 clrl %sp@- <== NOT EXECUTED 4eec6: 4eb9 0004 7ec8 jsr 47ec8 <_Internal_error_Occurred> <== NOT EXECUTED * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (doCons) /* && (volatile void *)_init) */ { INIT_NAME (); 4eecc: 4eb9 0005 d74c jsr 5d74c <_init> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4eed2: 202a 0092 movel %a2@(146),%d0 4eed6: 66d6 bnes 4eeae <_Thread_Handler+0x6e> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4eed8: 2f2a 009a movel %a2@(154),%sp@- 4eedc: 206a 008e moveal %a2@(142),%a0 4eee0: 4e90 jsr %a0@ #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4eee2: 588f addql #4,%sp 4eee4: 2540 0028 movel %d0,%a2@(40) * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4eee8: 2f0a movel %a2,%sp@- 4eeea: 4eb9 0004 9e62 jsr 49e62 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4eef0: 4878 0005 pea 5 4eef4: 4878 0001 pea 1 4eef8: 42a7 clrl %sp@- 4eefa: 4eb9 0004 7ec8 jsr 47ec8 <_Internal_error_Occurred> ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 4ef00: 2f2a 0096 movel %a2@(150),%sp@- 4ef04: 206a 008e moveal %a2@(142),%a0 4ef08: 4e90 jsr %a0@ executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 4ef0a: 588f addql #4,%sp 4ef0c: 2540 0028 movel %d0,%a2@(40) * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4ef10: 2f0a movel %a2,%sp@- 4ef12: 4eb9 0004 9e62 jsr 49e62 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4ef18: 4878 0005 pea 5 <== NOT EXECUTED 4ef1c: 4878 0001 pea 1 <== NOT EXECUTED 4ef20: 42a7 clrl %sp@- <== NOT EXECUTED 4ef22: 4eb9 0004 7ec8 jsr 47ec8 <_Internal_error_Occurred> <== NOT EXECUTED =============================================================================== 00049518 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 49518: 4e56 0000 linkw %fp,#0 /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) 4951c: 4ab9 0005 f690 tstl 5f690 49522: 57c1 seq %d1 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 49524: 4ab9 0005 f68c tstl 5f68c 4952a: 57c0 seq %d0 == (!Configuration.stack_free_hook) ) ) 4952c: 4481 negl %d1 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 4952e: 4480 negl %d0 49530: b380 eorl %d1,%d0 uint32_t maximum_internal_threads; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 49532: 2239 0005 f67c movel 5f67c ,%d1 maximum_extensions = Configuration.maximum_extensions; 49538: 2079 0005 f674 moveal 5f674 ,%a0 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 4953e: 4a00 tstb %d0 49540: 6650 bnes 49592 <_Thread_Handler_initialization+0x7a> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 49542: 4878 0008 pea 8 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Thread_Dispatch_necessary = false; 49546: 4200 clrb %d0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 49548: 42a7 clrl %sp@- 4954a: 4878 010e pea 10e 4954e: 4878 0001 pea 1 49552: 4878 0001 pea 1 49556: 4878 0001 pea 1 4955a: 4879 0006 1152 pea 61152 <_Thread_Internal_information> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Thread_Dispatch_necessary = false; 49560: 13c0 0006 14b6 moveb %d0,614b6 <_Per_CPU_Information+0x18> _Thread_Executing = NULL; 49566: 42b9 0006 14aa clrl 614aa <_Per_CPU_Information+0xc> _Thread_Heir = NULL; 4956c: 42b9 0006 14ae clrl 614ae <_Per_CPU_Information+0x10> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 49572: 42b9 0006 10ca clrl 610ca <_Thread_Allocated_fp> #endif _Thread_Maximum_extensions = maximum_extensions; 49578: 23c8 0006 10da movel %a0,610da <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 4957e: 23c1 0006 1000 movel %d1,61000 <_Thread_Ticks_per_timeslice> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 49584: 4eb9 0004 84c4 jsr 484c4 <_Objects_Initialize_information> 4958a: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4958e: 4e5e unlk %fp 49590: 4e75 rts * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 49592: 4878 000e pea e 49596: 4878 0001 pea 1 4959a: 42a7 clrl %sp@- 4959c: 4eb9 0004 7ec8 jsr 47ec8 <_Internal_error_Occurred> ... =============================================================================== 000492e4 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 492e4: 4e56 ffe4 linkw %fp,#-28 492e8: 202e 0010 movel %fp@(16),%d0 492ec: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 492f0: 246e 000c moveal %fp@(12),%a2 492f4: 242e 0014 movel %fp@(20),%d2 492f8: 262e 001c movel %fp@(28),%d3 492fc: 282e 0024 movel %fp@(36),%d4 49300: 1a2e 001b moveb %fp@(27),%d5 49304: 1c2e 0023 moveb %fp@(35),%d6 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 49308: 42aa 00fe clrl %a2@(254) 4930c: 42aa 0102 clrl %a2@(258) extensions_area = NULL; the_thread->libc_reent = NULL; 49310: 42aa 00fa clrl %a2@(250) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 49314: 4a80 tstl %d0 49316: 6700 0198 beqw 494b0 <_Thread_Initialize+0x1cc> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 4931a: 2202 movel %d2,%d1 4931c: 4202 clrb %d2 4931e: 1542 00b0 moveb %d2,%a2@(176) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 49322: 2540 00b6 movel %d0,%a2@(182) the_stack->size = size; 49326: 2541 00b2 movel %d1,%a2@(178) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 4932a: 4a05 tstb %d5 4932c: 6600 0100 bnew 4942e <_Thread_Initialize+0x14a> extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 49330: 4282 clrl %d2 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 49332: 2039 0006 10da movel 610da <_Thread_Maximum_extensions>,%d0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 49338: 2542 00f6 movel %d2,%a2@(246) the_thread->Start.fp_context = fp_area; 4933c: 2542 00ba movel %d2,%a2@(186) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 49340: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 49344: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 49348: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 4934c: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 49350: 4a80 tstl %d0 49352: 6600 0124 bnew 49478 <_Thread_Initialize+0x194> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 49356: 42aa 0106 clrl %a2@(262) * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 4935a: 4285 clrl %d5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 4935c: 2544 00a0 movel %d4,%a2@(160) the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 49360: 7002 moveq #2,%d0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 49362: 1546 009e moveb %d6,%a2@(158) the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 49366: 256e 0028 00a4 movel %fp@(40),%a2@(164) switch ( budget_algorithm ) { 4936c: b084 cmpl %d4,%d0 4936e: 6700 00a4 beqw 49414 <_Thread_Initialize+0x130> #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 49372: 7001 moveq #1,%d0 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 49374: 256e 002c 00a8 movel %fp@(44),%a2@(168) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 4937a: 2079 0005 f766 moveal 5f766 <_Scheduler+0x18>,%a0 the_thread->current_state = STATES_DORMANT; 49380: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 49384: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 49388: 42aa 001c clrl %a2@(28) the_thread->real_priority = priority; 4938c: 2543 0018 movel %d3,%a2@(24) the_thread->Start.initial_priority = priority; 49390: 2543 00ac movel %d3,%a2@(172) 49394: 2f0a movel %a2,%sp@- 49396: 4e90 jsr %a0@ sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 49398: 588f addql #4,%sp 4939a: 2800 movel %d0,%d4 4939c: 673a beqs 493d8 <_Thread_Initialize+0xf4> goto failed; _Thread_Set_priority( the_thread, priority ); 4939e: 2f03 movel %d3,%sp@- 493a0: 2f0a movel %a2,%sp@- 493a2: 4eb9 0004 9ad8 jsr 49ad8 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 493a8: 206e 0008 moveal %fp@(8),%a0 493ac: 4280 clrl %d0 493ae: 2068 0018 moveal %a0@(24),%a0 493b2: 302a 000a movew %a2@(10),%d0 /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 493b6: 42aa 0082 clrl %a2@(130) 493ba: 42aa 0086 clrl %a2@(134) 493be: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 493c2: 256e 0030 000c movel %fp@(48),%a2@(12) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 493c8: 2f0a movel %a2,%sp@- 493ca: 4eb9 0004 9ef4 jsr 49ef4 <_User_extensions_Thread_create> if ( extension_status ) 493d0: 4fef 000c lea %sp@(12),%sp 493d4: 4a00 tstb %d0 493d6: 664a bnes 49422 <_Thread_Initialize+0x13e> return true; failed: _Workspace_Free( the_thread->libc_reent ); 493d8: 2f2a 00fa movel %a2@(250),%sp@- 493dc: 47f9 0004 a2fe lea 4a2fe <_Workspace_Free>,%a3 493e2: 4e93 jsr %a3@ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 493e4: 2f2a 00fe movel %a2@(254),%sp@- 493e8: 4e93 jsr %a3@ 493ea: 2f2a 0102 movel %a2@(258),%sp@- 493ee: 4e93 jsr %a3@ _Workspace_Free( extensions_area ); 493f0: 2f05 movel %d5,%sp@- 493f2: 4e93 jsr %a3@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 493f4: 2f02 movel %d2,%sp@- 493f6: 4e93 jsr %a3@ #endif _Workspace_Free( sched ); 493f8: 2f04 movel %d4,%sp@- 493fa: 4e93 jsr %a3@ _Thread_Stack_Free( the_thread ); 493fc: 2f0a movel %a2,%sp@- 493fe: 4eb9 0004 9be8 jsr 49be8 <_Thread_Stack_Free> return false; 49404: 4fef 001c lea %sp@(28),%sp 49408: 4200 clrb %d0 } 4940a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 49410: 4e5e unlk %fp 49412: 4e75 rts case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 49414: 41f9 0006 1000 lea 61000 <_Thread_Ticks_per_timeslice>,%a0 4941a: 2550 0076 movel %a0@,%a2@(118) break; 4941e: 6000 ff52 braw 49372 <_Thread_Initialize+0x8e> _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 49422: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; 49428: 7001 moveq #1,%d0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 4942a: 4e5e unlk %fp 4942c: 4e75 rts /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 4942e: 4878 001c pea 1c 49432: 4eb9 0004 a2e2 jsr 4a2e2 <_Workspace_Allocate> if ( !fp_area ) 49438: 588f addql #4,%sp /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 4943a: 2400 movel %d0,%d2 if ( !fp_area ) 4943c: 6600 fef4 bnew 49332 <_Thread_Initialize+0x4e> extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 49440: 2f2a 00fa movel %a2@(250),%sp@- 49444: 47f9 0004 a2fe lea 4a2fe <_Workspace_Free>,%a3 * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 4944a: 4285 clrl %d5 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 4944c: 4284 clrl %d4 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 4944e: 4e93 jsr %a3@ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 49450: 2f2a 00fe movel %a2@(254),%sp@- 49454: 4e93 jsr %a3@ 49456: 2f2a 0102 movel %a2@(258),%sp@- 4945a: 4e93 jsr %a3@ _Workspace_Free( extensions_area ); 4945c: 2f05 movel %d5,%sp@- 4945e: 4e93 jsr %a3@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 49460: 2f02 movel %d2,%sp@- 49462: 4e93 jsr %a3@ #endif _Workspace_Free( sched ); 49464: 2f04 movel %d4,%sp@- 49466: 4e93 jsr %a3@ _Thread_Stack_Free( the_thread ); 49468: 2f0a movel %a2,%sp@- 4946a: 4eb9 0004 9be8 jsr 49be8 <_Thread_Stack_Free> return false; 49470: 4fef 001c lea %sp@(28),%sp 49474: 4200 clrb %d0 49476: 6092 bras 4940a <_Thread_Initialize+0x126> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 49478: e588 lsll #2,%d0 4947a: 2040 moveal %d0,%a0 4947c: 4868 0004 pea %a0@(4) 49480: 4eb9 0004 a2e2 jsr 4a2e2 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 49486: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 49488: 2a00 movel %d0,%d5 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 4948a: 6752 beqs 494de <_Thread_Initialize+0x1fa> goto failed; } the_thread->extensions = (void **) extensions_area; 4948c: 2540 0106 movel %d0,%a2@(262) 49490: 2040 moveal %d0,%a0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 49492: 4281 clrl %d1 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 49494: 4280 clrl %d0 49496: 2279 0006 10da moveal 610da <_Thread_Maximum_extensions>,%a1 * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 4949c: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 494a0: 5280 addql #1,%d0 494a2: 2200 movel %d0,%d1 494a4: b3c0 cmpal %d0,%a1 494a6: 6500 feb4 bcsw 4935c <_Thread_Initialize+0x78> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 494aa: 206a 0106 moveal %a2@(262),%a0 494ae: 60ec bras 4949c <_Thread_Initialize+0x1b8> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 494b0: 2f02 movel %d2,%sp@- 494b2: 2f0a movel %a2,%sp@- 494b4: 4eb9 0004 9b84 jsr 49b84 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 494ba: 508f addql #8,%sp return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 494bc: 2200 movel %d0,%d1 if ( !actual_stack_size || actual_stack_size < stack_size ) 494be: 6712 beqs 494d2 <_Thread_Initialize+0x1ee> 494c0: b082 cmpl %d2,%d0 494c2: 650e bcss 494d2 <_Thread_Initialize+0x1ee> <== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 494c4: 202a 00be movel %a2@(190),%d0 the_thread->Start.core_allocated_stack = true; 494c8: 7401 moveq #1,%d2 494ca: 1542 00b0 moveb %d2,%a2@(176) 494ce: 6000 fe52 braw 49322 <_Thread_Initialize+0x3e> _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 494d2: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 494d8: 4200 clrb %d0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 494da: 4e5e unlk %fp 494dc: 4e75 rts extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 494de: 2f2a 00fa movel %a2@(250),%sp@- 494e2: 47f9 0004 a2fe lea 4a2fe <_Workspace_Free>,%a3 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 494e8: 4284 clrl %d4 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 494ea: 4e93 jsr %a3@ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 494ec: 2f2a 00fe movel %a2@(254),%sp@- 494f0: 4e93 jsr %a3@ 494f2: 2f2a 0102 movel %a2@(258),%sp@- 494f6: 4e93 jsr %a3@ _Workspace_Free( extensions_area ); 494f8: 2f05 movel %d5,%sp@- 494fa: 4e93 jsr %a3@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 494fc: 2f02 movel %d2,%sp@- 494fe: 4e93 jsr %a3@ #endif _Workspace_Free( sched ); 49500: 2f04 movel %d4,%sp@- 49502: 4e93 jsr %a3@ _Thread_Stack_Free( the_thread ); 49504: 2f0a movel %a2,%sp@- 49506: 4eb9 0004 9be8 jsr 49be8 <_Thread_Stack_Free> return false; 4950c: 4fef 001c lea %sp@(28),%sp 49510: 4200 clrb %d0 49512: 6000 fef6 braw 4940a <_Thread_Initialize+0x126> ... =============================================================================== 0004dda4 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4dda4: 4e56 0000 linkw %fp,#0 4dda8: 2f0a movel %a2,%sp@- 4ddaa: 246e 0008 moveal %fp@(8),%a2 the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4ddae: 256a 00a0 007a movel %a2@(160),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4ddb4: 256a 00a4 007e movel %a2@(164),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4ddba: 256e 000c 0096 movel %fp@(12),%a2@(150) the_thread->Start.numeric_argument = numeric_argument; 4ddc0: 256e 0010 009a movel %fp@(16),%a2@(154) void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4ddc6: 156a 009e 0074 moveb %a2@(158),%a2@(116) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4ddcc: 42aa 001c clrl %a2@(28) the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4ddd0: 2f0a movel %a2,%sp@- 4ddd2: 4eb9 0004 a1ec jsr 4a1ec <_Thread_queue_Extract_with_proxy> 4ddd8: 588f addql #4,%sp 4ddda: 4a00 tstb %d0 4dddc: 6608 bnes 4dde6 <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4ddde: 7002 moveq #2,%d0 4dde0: b0aa 0050 cmpl %a2@(80),%d0 4dde4: 672a beqs 4de10 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4dde6: 202a 00ac movel %a2@(172),%d0 4ddea: b0aa 0014 cmpl %a2@(20),%d0 4ddee: 6718 beqs 4de08 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; 4ddf0: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4ddf4: 2d4a 0008 movel %a2,%fp@(8) } } 4ddf8: 246e fffc moveal %fp@(-4),%a2 (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4ddfc: 2d40 000c movel %d0,%fp@(12) } } 4de00: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4de02: 4ef9 0004 a420 jmp 4a420 <_Thread_Set_priority> } } 4de08: 246e fffc moveal %fp@(-4),%a2 4de0c: 4e5e unlk %fp 4de0e: 4e75 rts the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4de10: 486a 0048 pea %a2@(72) 4de14: 4eb9 0004 aaec jsr 4aaec <_Watchdog_Remove> 4de1a: 588f addql #4,%sp 4de1c: 60c8 bras 4dde6 <_Thread_Reset+0x42> ... =============================================================================== 0004a390 <_Thread_Restart>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 4a390: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4a392: 4e56 0000 linkw %fp,#0 4a396: 2f0a movel %a2,%sp@- 4a398: 246e 0008 moveal %fp@(8),%a2 4a39c: c0aa 0010 andl %a2@(16),%d0 if ( !_States_Is_dormant( the_thread->current_state ) ) { 4a3a0: 670a beqs 4a3ac <_Thread_Restart+0x1c> return true; } return false; } 4a3a2: 246e fffc moveal %fp@(-4),%a2 4a3a6: 4e5e unlk %fp _Thread_Restart_self(); return true; } return false; 4a3a8: 4200 clrb %d0 } 4a3aa: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 4a3ac: 2f0a movel %a2,%sp@- 4a3ae: 4eb9 0004 a484 jsr 4a484 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 4a3b4: 2f2e 0010 movel %fp@(16),%sp@- 4a3b8: 2f2e 000c movel %fp@(12),%sp@- 4a3bc: 2f0a movel %a2,%sp@- 4a3be: 4eb9 0004 dda4 jsr 4dda4 <_Thread_Reset> _Thread_Load_environment( the_thread ); 4a3c4: 2f0a movel %a2,%sp@- 4a3c6: 4eb9 0004 daac jsr 4daac <_Thread_Load_environment> _Thread_Ready( the_thread ); 4a3cc: 2f0a movel %a2,%sp@- 4a3ce: 4eb9 0004 dd74 jsr 4dd74 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 4a3d4: 2f0a movel %a2,%sp@- 4a3d6: 4eb9 0004 a8dc jsr 4a8dc <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 4a3dc: 4fef 001c lea %sp@(28),%sp 4a3e0: b5f9 0006 2082 cmpal 62082 <_Per_CPU_Information+0xc>,%a2 4a3e6: 670a beqs 4a3f2 <_Thread_Restart+0x62> return true; } return false; } 4a3e8: 246e fffc moveal %fp@(-4),%a2 4a3ec: 4e5e unlk %fp _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 4a3ee: 7001 moveq #1,%d0 } return false; } 4a3f0: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 4a3f2: 4aaa 00f6 tstl %a2@(246) 4a3f6: 6712 beqs 4a40a <_Thread_Restart+0x7a> _Context_Restore_fp( &_Thread_Executing->fp_context ); 4a3f8: 486a 00f6 pea %a2@(246) 4a3fc: 4eb9 0004 ae40 jsr 4ae40 <_CPU_Context_restore_fp> 4a402: 2479 0006 2082 moveal 62082 <_Per_CPU_Information+0xc>,%a2 4a408: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 4a40a: 486a 00c2 pea %a2@(194) 4a40e: 4eb9 0004 acee jsr 4acee <_CPU_Context_Restart_self> 4a414: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a418: 588f addql #4,%sp <== NOT EXECUTED 4a41a: 4e5e unlk %fp <== NOT EXECUTED _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 4a41c: 7001 moveq #1,%d0 <== NOT EXECUTED } return false; } =============================================================================== 00049be8 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 49be8: 4e56 0000 linkw %fp,#0 49bec: 206e 0008 moveal %fp@(8),%a0 #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 49bf0: 4a28 00b0 tstb %a0@(176) 49bf4: 6714 beqs 49c0a <_Thread_Stack_Free+0x22> <== NEVER TAKEN * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 49bf6: 2279 0005 f690 moveal 5f690 ,%a1 (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 49bfc: 2d68 00b6 0008 movel %a0@(182),%fp@(8) * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 49c02: 4a89 tstl %a1 49c04: 6708 beqs 49c0e <_Thread_Stack_Free+0x26> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 49c06: 4e5e unlk %fp * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 49c08: 4ed1 jmp %a1@ else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 49c0a: 4e5e unlk %fp <== NOT EXECUTED 49c0c: 4e75 rts <== NOT EXECUTED 49c0e: 4e5e unlk %fp */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 49c10: 4ef9 0004 a2fe jmp 4a2fe <_Workspace_Free> ... =============================================================================== 00048cd0 <_Thread_blocking_operation_Cancel>: /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 48cd0: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 48cd2: 4e56 0000 linkw %fp,#0 48cd6: 202e 0010 movel %fp@(16),%d0 48cda: 2f0a movel %a2,%sp@- 48cdc: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 48ce0: 42aa 0044 clrl %a2@(68) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 48ce4: b2aa 0050 cmpl %a2@(80),%d1 48ce8: 671c beqs 48d06 <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 48cea: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 48cec: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 48cf0: 246e fffc moveal %fp@(-4),%a2 48cf4: 203c 1003 fff8 movel #268697592,%d0 48cfa: 2d40 000c movel %d0,%fp@(12) 48cfe: 4e5e unlk %fp 48d00: 4ef9 0004 8e1c jmp 48e1c <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 48d06: 123c 0003 moveb #3,%d1 48d0a: 2541 0050 movel %d1,%a2@(80) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 48d0e: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 48d10: 486a 0048 pea %a2@(72) 48d14: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 48d1a: 588f addql #4,%sp 48d1c: 203c 1003 fff8 movel #268697592,%d0 48d22: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 48d26: 246e fffc moveal %fp@(-4),%a2 48d2a: 2d40 000c movel %d0,%fp@(12) 48d2e: 4e5e unlk %fp 48d30: 4ef9 0004 8e1c jmp 48e1c <_Thread_Clear_state> ... =============================================================================== 00049620 <_Thread_queue_Dequeue_priority>: Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 49620: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 49626: 4e56 ffe8 linkw %fp,#-24 4962a: 226e 0008 moveal %fp@(8),%a1 4962e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 49632: 40c3 movew %sr,%d3 49634: 8083 orl %d3,%d0 49636: 46c0 movew %d0,%sr for( index=0 ; 49638: 4280 clrl %d0 index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 4963a: 2400 movel %d0,%d2 4963c: 2200 movel %d0,%d1 Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 4963e: 5280 addql #1,%d0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 49640: e58a lsll #2,%d2 49642: e989 lsll #4,%d1 49644: 9282 subl %d2,%d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 49646: 41f1 1800 lea %a1@(00000000,%d1:l),%a0 4964a: 2458 moveal %a0@+,%a2 4964c: b1ca cmpal %a2,%a0 4964e: 6616 bnes 49666 <_Thread_queue_Dequeue_priority+0x46> Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 49650: 7204 moveq #4,%d1 49652: b280 cmpl %d0,%d1 49654: 66e4 bnes 4963a <_Thread_queue_Dequeue_priority+0x1a> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 49656: 46c3 movew %d3,%sr return NULL; 49658: 95ca subal %a2,%a2 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 4965a: 200a movel %a2,%d0 4965c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49662: 4e5e unlk %fp 49664: 4e75 rts RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 49666: 200a movel %a2,%d0 49668: 0680 0000 003c addil #60,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4966e: 206a 0038 moveal %a2@(56),%a0 dequeue: the_thread->Wait.queue = NULL; new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 49672: 2252 moveal %a2@,%a1 previous_node = the_thread->Object.Node.previous; 49674: 266a 0004 moveal %a2@(4),%a3 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 49678: 42aa 0044 clrl %a2@(68) new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4967c: b088 cmpl %a0,%d0 4967e: 6700 008a beqw 4970a <_Thread_queue_Dequeue_priority+0xea> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 49682: 286a 0040 moveal %a2@(64),%a4 last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 49686: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 49688: 2348 0004 movel %a0,%a1@(4) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; 4968c: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4968e: 214b 0004 movel %a3,%a0@(4) last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 49692: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 49694: 226a 0040 moveal %a2@(64),%a1 49698: b3ea 0038 cmpal %a2@(56),%a1 4969c: 6716 beqs 496b4 <_Thread_queue_Dequeue_priority+0x94> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 4969e: 214d 0038 movel %a5,%a0@(56) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 496a2: 43e8 003c lea %a0@(60),%a1 496a6: 2889 movel %a1,%a4@ new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 496a8: 43e8 0038 lea %a0@(56),%a1 496ac: 2b49 0004 movel %a1,%a5@(4) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; tail->previous = last_node; 496b0: 214c 0040 movel %a4,%a0@(64) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 496b4: 7002 moveq #2,%d0 496b6: b0aa 0050 cmpl %a2@(80),%d0 496ba: 671e beqs 496da <_Thread_queue_Dequeue_priority+0xba> _ISR_Enable( level ); 496bc: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 496be: 2f3c 1003 fff8 movel #268697592,%sp@- 496c4: 2f0a movel %a2,%sp@- 496c6: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> 496cc: 508f addql #8,%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 496ce: 200a movel %a2,%d0 496d0: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 496d6: 4e5e unlk %fp 496d8: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 496da: 7203 moveq #3,%d1 496dc: 2541 0050 movel %d1,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 496e0: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 496e2: 486a 0048 pea %a2@(72) 496e6: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 496ec: 2f3c 1003 fff8 movel #268697592,%sp@- 496f2: 2f0a movel %a2,%sp@- 496f4: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> 496fa: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 496fe: 200a movel %a2,%d0 49700: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49706: 4e5e unlk %fp 49708: 4e75 rts head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 4970a: 2689 movel %a1,%a3@ next_node->previous = previous_node; 4970c: 234b 0004 movel %a3,%a1@(4) 49710: 60a2 bras 496b4 <_Thread_queue_Dequeue_priority+0x94> ... =============================================================================== 000497bc <_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 ) { 497bc: 4e56 ffe0 linkw %fp,#-32 497c0: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 497c4: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 497c8: 45eb 0038 lea %a3@(56),%a2 Chain_Node *tail = _Chain_Tail( the_chain ); 497cc: 41eb 003c lea %a3@(60),%a0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 497d0: 2a3c 0000 0700 movel #1792,%d5 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 497d6: 222b 0014 movel %a3@(20),%d1 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 497da: 2001 movel %d1,%d0 497dc: ec88 lsrl #6,%d0 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 497de: 2400 movel %d0,%d2 497e0: e988 lsll #4,%d0 497e2: 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 ) { 497e4: 286e 0008 moveal %fp@(8),%a4 _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 ]; 497e8: 9082 subl %d2,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 497ea: 274a 0040 movel %a2,%a3@(64) block_state = the_thread_queue->state; 497ee: 242c 0038 movel %a4@(56),%d2 _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 ]; 497f2: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 Chain_Node *tail = _Chain_Tail( the_chain ); 497f6: 2748 0038 movel %a0,%a3@(56) head->next = tail; head->previous = NULL; 497fa: 42ab 003c clrl %a3@(60) block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 497fe: 0801 0005 btst #5,%d1 49802: 6652 bnes 49856 <_Thread_queue_Enqueue_priority+0x9a> 49804: 2c0a movel %a2,%d6 49806: 5886 addql #4,%d6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 49808: 2005 movel %d5,%d0 4980a: 40c3 movew %sr,%d3 4980c: 8083 orl %d3,%d0 4980e: 46c0 movew %d0,%sr 49810: 2803 movel %d3,%d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49812: 2052 moveal %a2@,%a0 search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 49814: bc88 cmpl %a0,%d6 49816: 6700 010a beqw 49922 <_Thread_queue_Enqueue_priority+0x166> search_priority = search_thread->current_priority; 4981a: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 4981e: b3c1 cmpal %d1,%a1 49820: 6418 bccs 4983a <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 49822: 2005 movel %d5,%d0 49824: 46c3 movew %d3,%sr 49826: 8083 orl %d3,%d0 49828: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 4982a: 2002 movel %d2,%d0 4982c: c0a8 0010 andl %a0@(16),%d0 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 49830: 6700 0090 beqw 498c2 <_Thread_queue_Enqueue_priority+0x106> _ISR_Enable( level ); goto restart_forward_search; } search_thread = 49834: 2050 moveal %a0@,%a0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 49836: bc88 cmpl %a0,%d6 49838: 66e0 bnes 4981a <_Thread_queue_Enqueue_priority+0x5e> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4983a: 202c 0030 movel %a4@(48),%d0 4983e: 7401 moveq #1,%d2 49840: b480 cmpl %d0,%d2 49842: 6700 0094 beqw 498d8 <_Thread_queue_Enqueue_priority+0x11c> * 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; 49846: 206e 0010 moveal %fp@(16),%a0 4984a: 2084 movel %d4,%a0@ return the_thread_queue->sync_state; } 4984c: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 49850: 4e5e unlk %fp 49852: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 49854: 46c3 movew %d3,%sr the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 49856: 4283 clrl %d3 49858: 1639 0005 f6aa moveb 5f6aa ,%d3 _ISR_Disable( level ); 4985e: 2005 movel %d5,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 49860: 2243 moveal %d3,%a1 49862: 5289 addql #1,%a1 _ISR_Disable( level ); 49864: 40c3 movew %sr,%d3 49866: 8083 orl %d3,%d0 49868: 46c0 movew %d0,%sr 4986a: 2803 movel %d3,%d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4986c: 206a 0008 moveal %a2@(8),%a0 search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 49870: b5c8 cmpal %a0,%a2 49872: 6720 beqs 49894 <_Thread_queue_Enqueue_priority+0xd8> search_priority = search_thread->current_priority; 49874: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 49878: b3c1 cmpal %d1,%a1 4987a: 6318 blss 49894 <_Thread_queue_Enqueue_priority+0xd8> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 4987c: 2005 movel %d5,%d0 4987e: 46c3 movew %d3,%sr 49880: 8083 orl %d3,%d0 49882: 46c0 movew %d0,%sr 49884: 2002 movel %d2,%d0 49886: c0a8 0010 andl %a0@(16),%d0 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4988a: 67c8 beqs 49854 <_Thread_queue_Enqueue_priority+0x98> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 4988c: 2068 0004 moveal %a0@(4),%a0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 49890: b5c8 cmpal %a0,%a2 49892: 66e0 bnes 49874 <_Thread_queue_Enqueue_priority+0xb8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 49894: 202c 0030 movel %a4@(48),%d0 49898: 7401 moveq #1,%d2 4989a: b480 cmpl %d0,%d2 4989c: 66a8 bnes 49846 <_Thread_queue_Enqueue_priority+0x8a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4989e: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 498a2: b3c1 cmpal %d1,%a1 498a4: 6758 beqs 498fe <_Thread_queue_Enqueue_priority+0x142><== NEVER TAKEN goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 498a6: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 498a8: 2748 0004 movel %a0,%a3@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 498ac: 2689 movel %a1,%a3@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 498ae: 234b 0004 movel %a3,%a1@(4) 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; 498b2: 208b movel %a3,%a0@ next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 498b4: 274c 0044 movel %a4,%a3@(68) _ISR_Enable( level ); 498b8: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 498ba: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 498be: 4e5e unlk %fp 498c0: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 498c2: 46c3 movew %d3,%sr if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 498c4: 2005 movel %d5,%d0 498c6: 40c3 movew %sr,%d3 498c8: 8083 orl %d3,%d0 498ca: 46c0 movew %d0,%sr 498cc: 2803 movel %d3,%d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 498ce: 2052 moveal %a2@,%a0 search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 498d0: bc88 cmpl %a0,%d6 498d2: 6600 ff46 bnew 4981a <_Thread_queue_Enqueue_priority+0x5e> 498d6: 604a bras 49922 <_Thread_queue_Enqueue_priority+0x166> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 498d8: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 498dc: b3c1 cmpal %d1,%a1 498de: 671e beqs 498fe <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 498e0: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 498e4: 2688 movel %a0,%a3@ the_node->previous = previous_node; 498e6: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; 498ea: 228b movel %a3,%a1@ search_node->previous = the_node; 498ec: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; 498f0: 274c 0044 movel %a4,%a3@(68) _ISR_Enable( level ); 498f4: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 498f6: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 498fa: 4e5e unlk %fp 498fc: 4e75 rts _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 498fe: 2268 0040 moveal %a0@(64),%a1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); 49902: 45e8 003c lea %a0@(60),%a2 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; 49906: 2749 0004 movel %a1,%a3@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); 4990a: 268a movel %a2,%a3@ the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; 4990c: 214b 0040 movel %a3,%a0@(64) 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; 49910: 228b movel %a3,%a1@ search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 49912: 274c 0044 movel %a4,%a3@(68) _ISR_Enable( level ); 49916: 46c4 movew %d4,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 49918: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4991a: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 4991e: 4e5e unlk %fp 49920: 4e75 rts } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 49922: 202c 0030 movel %a4@(48),%d0 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 49926: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4992a: 7401 moveq #1,%d2 4992c: b480 cmpl %d0,%d2 4992e: 6600 ff16 bnew 49846 <_Thread_queue_Enqueue_priority+0x8a> 49932: 60a4 bras 498d8 <_Thread_queue_Enqueue_priority+0x11c> =============================================================================== 0004ef28 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4ef28: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4ef2e: 4e56 0000 linkw %fp,#0 4ef32: 2f0a movel %a2,%sp@- 4ef34: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4ef38: 40c1 movew %sr,%d1 4ef3a: 8081 orl %d1,%d0 4ef3c: 46c0 movew %d0,%sr 4ef3e: 202a 0010 movel %a2@(16),%d0 4ef42: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4ef48: 6734 beqs 4ef7e <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4ef4a: 2252 moveal %a2@,%a1 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4ef4c: 7002 moveq #2,%d0 previous = the_node->previous; 4ef4e: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4ef52: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4ef56: 2089 movel %a1,%a0@ return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4ef58: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4ef5c: b0aa 0050 cmpl %a2@(80),%d0 4ef60: 6726 beqs 4ef88 <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4ef62: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4ef64: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4ef68: 246e fffc moveal %fp@(-4),%a2 4ef6c: 203c 1003 fff8 movel #268697592,%d0 4ef72: 2d40 000c movel %d0,%fp@(12) 4ef76: 4e5e unlk %fp 4ef78: 4ef9 0004 8e1c jmp 48e1c <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4ef7e: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4ef80: 246e fffc moveal %fp@(-4),%a2 4ef84: 4e5e unlk %fp 4ef86: 4e75 rts 4ef88: 7003 moveq #3,%d0 4ef8a: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4ef8e: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4ef90: 486a 0048 pea %a2@(72) 4ef94: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 4ef9a: 588f addql #4,%sp 4ef9c: 203c 1003 fff8 movel #268697592,%d0 4efa2: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4efa6: 246e fffc moveal %fp@(-4),%a2 4efaa: 2d40 000c movel %d0,%fp@(12) 4efae: 4e5e unlk %fp 4efb0: 4ef9 0004 8e1c jmp 48e1c <_Thread_Clear_state> ... =============================================================================== 0004d2bc <_Thread_queue_Extract_priority_helper>: Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4d2bc: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 4d2c2: 4e56 ffec linkw %fp,#-20 4d2c6: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4d2ca: 246e 000c moveal %fp@(12),%a2 4d2ce: 142e 0013 moveb %fp@(19),%d2 Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4d2d2: 40c1 movew %sr,%d1 4d2d4: 8081 orl %d1,%d0 4d2d6: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 4d2d8: 202a 0010 movel %a2@(16),%d0 4d2dc: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4d2e2: 6772 beqs 4d356 <_Thread_queue_Extract_priority_helper+0x9a> RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4d2e4: 200a movel %a2,%d0 4d2e6: 0680 0000 003c addil #60,%d0 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4d2ec: 2252 moveal %a2@,%a1 previous_node = the_node->previous; 4d2ee: 266a 0004 moveal %a2@(4),%a3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4d2f2: 206a 0038 moveal %a2@(56),%a0 if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4d2f6: b088 cmpl %a0,%d0 4d2f8: 6768 beqs 4d362 <_Thread_queue_Extract_priority_helper+0xa6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4d2fa: 286a 0040 moveal %a2@(64),%a4 new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 4d2fe: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4d300: 2348 0004 movel %a0,%a1@(4) new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; 4d304: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4d306: 214b 0004 movel %a3,%a0@(4) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4d30a: 202a 0040 movel %a2@(64),%d0 last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4d30e: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4d310: b0aa 0038 cmpl %a2@(56),%d0 4d314: 6716 beqs 4d32c <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 4d316: 214d 0038 movel %a5,%a0@(56) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4d31a: 43e8 003c lea %a0@(60),%a1 4d31e: 2889 movel %a1,%a4@ new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 4d320: 43e8 0038 lea %a0@(56),%a1 4d324: 2b49 0004 movel %a1,%a5@(4) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; tail->previous = last_node; 4d328: 214c 0040 movel %a4,%a0@(64) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4d32c: 4a02 tstb %d2 4d32e: 6626 bnes 4d356 <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4d330: 7002 moveq #2,%d0 4d332: b0aa 0050 cmpl %a2@(80),%d0 4d336: 6736 beqs 4d36e <_Thread_queue_Extract_priority_helper+0xb2> _ISR_Enable( level ); 4d338: 46c1 movew %d1,%sr 4d33a: 2d4a 0008 movel %a2,%fp@(8) 4d33e: 227c 1003 fff8 moveal #268697592,%a1 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d344: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d34a: 2d49 000c movel %a1,%fp@(12) 4d34e: 4e5e unlk %fp 4d350: 4ef9 0004 8e1c jmp 48e1c <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4d356: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d358: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d35e: 4e5e unlk %fp 4d360: 4e75 rts head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 4d362: 2689 movel %a1,%a3@ next_node->previous = previous_node; 4d364: 234b 0004 movel %a3,%a1@(4) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4d368: 4a02 tstb %d2 4d36a: 67c4 beqs 4d330 <_Thread_queue_Extract_priority_helper+0x74> 4d36c: 60e8 bras 4d356 <_Thread_queue_Extract_priority_helper+0x9a> 4d36e: 7003 moveq #3,%d0 4d370: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4d374: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4d376: 486a 0048 pea %a2@(72) 4d37a: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 4d380: 588f addql #4,%sp 4d382: 227c 1003 fff8 moveal #268697592,%a1 4d388: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d38c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d392: 2d49 000c movel %a1,%fp@(12) 4d396: 4e5e unlk %fp 4d398: 4ef9 0004 8e1c jmp 48e1c <_Thread_Clear_state> ... =============================================================================== 000499a0 <_Thread_queue_Initialize>: the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 499a0: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 499a2: 4e56 0000 linkw %fp,#0 499a6: 206e 0008 moveal %fp@(8),%a0 499aa: 2f02 movel %d2,%sp@- 499ac: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; 499b0: 216e 0010 0038 movel %fp@(16),%a0@(56) the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 499b6: 216e 0014 003c movel %fp@(20),%a0@(60) States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; 499bc: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 499c0: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 499c4: b280 cmpl %d0,%d1 499c6: 6714 beqs 499dc <_Thread_queue_Initialize+0x3c> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 499c8: 2008 movel %a0,%d0 499ca: 5880 addql #4,%d0 head->next = tail; head->previous = NULL; 499cc: 42a8 0004 clrl %a0@(4) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 499d0: 2080 movel %d0,%a0@ head->next = tail; head->previous = NULL; tail->previous = head; 499d2: 2148 0008 movel %a0,%a0@(8) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 499d6: 241f movel %sp@+,%d2 499d8: 4e5e unlk %fp 499da: 4e75 rts the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 499dc: 4280 clrl %d0 uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 499de: 2400 movel %d0,%d2 499e0: 2200 movel %d0,%d1 if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 499e2: 5280 addql #1,%d0 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 499e4: e58a lsll #2,%d2 499e6: e989 lsll #4,%d1 499e8: 9282 subl %d2,%d1 499ea: 43f0 1800 lea %a0@(00000000,%d1:l),%a1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 499ee: 2209 movel %a1,%d1 499f0: 5881 addql #4,%d1 499f2: 2281 movel %d1,%a1@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 499f4: 7204 moveq #4,%d1 head->next = tail; head->previous = NULL; 499f6: 42a9 0004 clrl %a1@(4) tail->previous = head; 499fa: 2349 0008 movel %a1,%a1@(8) 499fe: b280 cmpl %d0,%d1 49a00: 67d4 beqs 499d6 <_Thread_queue_Initialize+0x36> <== NEVER TAKEN index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 49a02: 2400 movel %d0,%d2 49a04: 2200 movel %d0,%d1 if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 49a06: 5280 addql #1,%d0 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 49a08: e58a lsll #2,%d2 49a0a: e989 lsll #4,%d1 49a0c: 9282 subl %d2,%d1 49a0e: 43f0 1800 lea %a0@(00000000,%d1:l),%a1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 49a12: 2209 movel %a1,%d1 49a14: 5881 addql #4,%d1 49a16: 2281 movel %d1,%a1@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 49a18: 7204 moveq #4,%d1 head->next = tail; head->previous = NULL; 49a1a: 42a9 0004 clrl %a1@(4) tail->previous = head; 49a1e: 2349 0008 movel %a1,%a1@(8) 49a22: b280 cmpl %d0,%d1 49a24: 66b8 bnes 499de <_Thread_queue_Initialize+0x3e> 49a26: 60ae bras 499d6 <_Thread_queue_Initialize+0x36> =============================================================================== 00049a28 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 49a28: 4e56 fff0 linkw %fp,#-16 49a2c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 49a30: 246e 0008 moveal %fp@(8),%a2 49a34: 266e 000c moveal %fp@(12),%a3 /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 49a38: 4a8a tstl %a2 49a3a: 6708 beqs 49a44 <_Thread_queue_Requeue+0x1c> <== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 49a3c: 7001 moveq #1,%d0 49a3e: b0aa 0034 cmpl %a2@(52),%d0 49a42: 670a beqs 49a4e <_Thread_queue_Requeue+0x26> <== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 49a44: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 49a4a: 4e5e unlk %fp <== NOT EXECUTED 49a4c: 4e75 rts <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 49a4e: 303c 0700 movew #1792,%d0 49a52: 40c2 movew %sr,%d2 49a54: 8082 orl %d2,%d0 49a56: 46c0 movew %d0,%sr 49a58: 202b 0010 movel %a3@(16),%d0 49a5c: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 49a62: 660c bnes 49a70 <_Thread_queue_Requeue+0x48> <== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 49a64: 46c2 movew %d2,%sr <== NOT EXECUTED } } 49a66: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 49a6c: 4e5e unlk %fp 49a6e: 4e75 rts ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 49a70: 4878 0001 pea 1 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 49a74: 7001 moveq #1,%d0 49a76: 2f0b movel %a3,%sp@- 49a78: 2540 0030 movel %d0,%a2@(48) 49a7c: 2f0a movel %a2,%sp@- 49a7e: 4eb9 0004 d2bc jsr 4d2bc <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 49a84: 486e fffc pea %fp@(-4) 49a88: 2f0b movel %a3,%sp@- 49a8a: 2f0a movel %a2,%sp@- 49a8c: 4eb9 0004 97bc jsr 497bc <_Thread_queue_Enqueue_priority> 49a92: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 49a96: 46c2 movew %d2,%sr 49a98: 60cc bras 49a66 <_Thread_queue_Requeue+0x3e> ... =============================================================================== 00049a9c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 49a9c: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 49aa0: 486e fffc pea %fp@(-4) 49aa4: 2f2e 0008 movel %fp@(8),%sp@- 49aa8: 4eb9 0004 9240 jsr 49240 <_Thread_Get> switch ( location ) { 49aae: 508f addql #8,%sp 49ab0: 4aae fffc tstl %fp@(-4) 49ab4: 661e bnes 49ad4 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 49ab6: 2f00 movel %d0,%sp@- 49ab8: 4eb9 0004 d3a0 jsr 4d3a0 <_Thread_queue_Process_timeout> * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; return _Thread_Dispatch_disable_level; 49abe: 588f addql #4,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 49ac0: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 49ac6: 5380 subql #1,%d0 49ac8: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 49ace: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 _Thread_Unnest_dispatch(); break; } } 49ad4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00057684 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 57684: 4e56 ffb0 linkw %fp,#-80 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 57688: 41ee ffe8 lea %fp@(-24),%a0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 5768c: 200e movel %fp,%d0 5768e: 5180 subql #8,%d0 57690: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 57694: 246e 0008 moveal %fp@(8),%a2 57698: 260e movel %fp,%d3 5769a: 2c0e movel %fp,%d6 5769c: 0683 ffff fff4 addil #-12,%d3 576a2: 0686 ffff ffec addil #-20,%d6 576a8: 240a movel %a2,%d2 576aa: 2a0a movel %a2,%d5 576ac: 4bf9 0005 bcd4 lea 5bcd4 <_Watchdog_Adjust_to_chain>,%a5 576b2: 0682 0000 0030 addil #48,%d2 576b8: 0685 0000 0068 addil #104,%d5 576be: 47f9 0005 82bc lea 582bc <_Chain_Get>,%a3 576c4: 49f9 0005 bd5c lea 5bd5c <_Watchdog_Insert>,%a4 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 576ca: 283c 0000 0700 movel #1792,%d4 head->previous = NULL; tail->previous = head; 576d0: 2d48 fff0 movel %a0,%fp@(-16) 576d4: 41ea 0008 lea %a2@(8),%a0 576d8: 2d48 ffe4 movel %a0,%fp@(-28) 576dc: 41ea 0040 lea %a2@(64),%a0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 576e0: 2d40 fff4 movel %d0,%fp@(-12) head->previous = NULL; 576e4: 42ae ffec clrl %fp@(-20) 576e8: 42ae fff8 clrl %fp@(-8) tail->previous = head; 576ec: 2d43 fffc movel %d3,%fp@(-4) 576f0: 2d40 ffd8 movel %d0,%fp@(-40) 576f4: 2d48 ffe0 movel %a0,%fp@(-32) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 576f8: 2d46 ffe8 movel %d6,%fp@(-24) { /* * 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; 576fc: 41ee ffe8 lea %fp@(-24),%a0 57700: 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; 57704: 2039 0007 de4e movel 7de4e <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 5770a: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 5770e: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 57712: 9081 subl %d1,%d0 57714: 2f03 movel %d3,%sp@- 57716: 2f00 movel %d0,%sp@- 57718: 2f02 movel %d2,%sp@- 5771a: 4e95 jsr %a5@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 5771c: 2039 0007 ddd6 movel 7ddd6 <_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 ) { 57722: 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; 57726: 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 ) { 5772a: b280 cmpl %d0,%d1 5772c: 6500 0086 bcsw 577b4 <_Timer_server_Body+0x130> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 57730: b280 cmpl %d0,%d1 57732: 6200 00a4 bhiw 577d8 <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 57736: 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 ); 5773a: 202a 0078 movel %a2@(120),%d0 5773e: 2f00 movel %d0,%sp@- 57740: 4e93 jsr %a3@ if ( timer == NULL ) { 57742: 588f addql #4,%sp 57744: 4a80 tstl %d0 57746: 672e beqs 57776 <_Timer_server_Body+0xf2> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 57748: 2040 moveal %d0,%a0 <== NOT EXECUTED 5774a: 7e01 moveq #1,%d7 <== NOT EXECUTED 5774c: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 57750: be81 cmpl %d1,%d7 <== NOT EXECUTED 57752: 6700 00a8 beqw 577fc <_Timer_server_Body+0x178> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 57756: 7e03 moveq #3,%d7 <== NOT EXECUTED 57758: be81 cmpl %d1,%d7 <== NOT EXECUTED 5775a: 66de bnes 5773a <_Timer_server_Body+0xb6> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5775c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5775e: 4868 0010 pea %a0@(16) <== NOT EXECUTED 57762: 2f05 movel %d5,%sp@- <== NOT EXECUTED 57764: 4e94 jsr %a4@ <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 57766: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED ) { 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 ); 5776a: 508f addql #8,%sp <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 5776c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5776e: 4e93 jsr %a3@ <== NOT EXECUTED if ( timer == NULL ) { 57770: 588f addql #4,%sp <== NOT EXECUTED 57772: 4a80 tstl %d0 <== NOT EXECUTED 57774: 66d2 bnes 57748 <_Timer_server_Body+0xc4> <== 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 ); 57776: 2004 movel %d4,%d0 57778: 40c1 movew %sr,%d1 5777a: 8081 orl %d1,%d0 5777c: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 5777e: bcae ffe8 cmpl %fp@(-24),%d6 57782: 6700 0086 beqw 5780a <_Timer_server_Body+0x186> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 57786: 46c1 movew %d1,%sr <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 57788: 2039 0007 de4e movel 7de4e <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 5778e: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 57792: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 57796: 9081 subl %d1,%d0 <== NOT EXECUTED 57798: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5779a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5779c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5779e: 4e95 jsr %a5@ <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 577a0: 2039 0007 ddd6 movel 7ddd6 <_TOD_Now>,%d0 <== NOT EXECUTED /* * 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 ) { 577a6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 577aa: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED /* * 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 ) { 577ae: b280 cmpl %d0,%d1 <== NOT EXECUTED 577b0: 6400 ff7e bccw 57730 <_Timer_server_Body+0xac> <== NOT EXECUTED /* * 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 ); 577b4: 2f03 movel %d3,%sp@- 577b6: 2e00 movel %d0,%d7 577b8: 9e81 subl %d1,%d7 577ba: 2f07 movel %d7,%sp@- 577bc: 2d40 ffdc movel %d0,%fp@(-36) 577c0: 2f05 movel %d5,%sp@- 577c2: 4eb9 0005 bcd4 jsr 5bcd4 <_Watchdog_Adjust_to_chain> 577c8: 202e ffdc movel %fp@(-36),%d0 577cc: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 577d0: 2540 0074 movel %d0,%a2@(116) 577d4: 6000 ff64 braw 5773a <_Timer_server_Body+0xb6> /* * 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 ); 577d8: 9280 subl %d0,%d1 577da: 2f01 movel %d1,%sp@- 577dc: 4878 0001 pea 1 577e0: 2d40 ffdc movel %d0,%fp@(-36) 577e4: 2f05 movel %d5,%sp@- 577e6: 4eb9 0005 bc40 jsr 5bc40 <_Watchdog_Adjust> 577ec: 202e ffdc movel %fp@(-36),%d0 577f0: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 577f4: 2540 0074 movel %d0,%a2@(116) 577f8: 6000 ff40 braw 5773a <_Timer_server_Body+0xb6> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 577fc: 4868 0010 pea %a0@(16) <== NOT EXECUTED 57800: 2f02 movel %d2,%sp@- <== NOT EXECUTED 57802: 4e94 jsr %a4@ <== NOT EXECUTED 57804: 508f addql #8,%sp <== NOT EXECUTED 57806: 6000 ff32 braw 5773a <_Timer_server_Body+0xb6> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 5780a: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 5780e: 46c1 movew %d1,%sr _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 ) ) { 57810: 2e2e ffd8 movel %fp@(-40),%d7 57814: beae fff4 cmpl %fp@(-12),%d7 57818: 6752 beqs 5786c <_Timer_server_Body+0x1e8> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 5781a: 2204 movel %d4,%d1 5781c: 40c0 movew %sr,%d0 5781e: 8280 orl %d0,%d1 57820: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57822: 206e fff4 moveal %fp@(-12),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 57826: b1ee ffd8 cmpal %fp@(-40),%a0 5782a: 6732 beqs 5785e <_Timer_server_Body+0x1da> <== NEVER TAKEN Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 5782c: 2250 moveal %a0@,%a1 head->next = new_first; new_first->previous = head; 5782e: 2343 0004 movel %d3,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 57832: 42a8 0008 clrl %a0@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 57836: 2d49 fff4 movel %a1,%fp@(-12) _ISR_Enable( level ); 5783a: 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 ); 5783c: 2f28 0024 movel %a0@(36),%sp@- 57840: 2f28 0020 movel %a0@(32),%sp@- 57844: 2068 001c moveal %a0@(28),%a0 57848: 4e90 jsr %a0@ } 5784a: 508f addql #8,%sp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 5784c: 2204 movel %d4,%d1 5784e: 40c0 movew %sr,%d0 57850: 8280 orl %d0,%d1 57852: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57854: 206e fff4 moveal %fp@(-12),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 57858: b1ee ffd8 cmpal %fp@(-40),%a0 5785c: 66ce bnes 5782c <_Timer_server_Body+0x1a8> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 5785e: 46c0 movew %d0,%sr { /* * 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; 57860: 41ee ffe8 lea %fp@(-24),%a0 57864: 2548 0078 movel %a0,%a2@(120) 57868: 6000 fe9a braw 57704 <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 5786c: 4200 clrb %d0 5786e: 1540 007c moveb %d0,%a2@(124) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 57872: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0 57878: 5280 addql #1,%d0 5787a: 23c0 0007 dd4c movel %d0,7dd4c <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 57880: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 57886: 4878 0008 pea 8 5788a: 2f12 movel %a2@,%sp@- _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 5788c: 7e01 moveq #1,%d7 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 5788e: 4eb9 0005 b66c jsr 5b66c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 57894: 2f0a movel %a2,%sp@- 57896: 4eba fd14 jsr %pc@(575ac <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5789a: 2f0a movel %a2,%sp@- 5789c: 4eba fd78 jsr %pc@(57616 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 578a0: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch> ts->active = true; 578a6: 1547 007c moveb %d7,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 578aa: 2f2e ffe4 movel %fp@(-28),%sp@- 578ae: 4eb9 0005 bea4 jsr 5bea4 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 578b4: 2f2e ffe0 movel %fp@(-32),%sp@- 578b8: 4eb9 0005 bea4 jsr 5bea4 <_Watchdog_Remove> 578be: 4fef 0018 lea %sp@(24),%sp 578c2: 6000 fe38 braw 576fc <_Timer_server_Body+0x78> =============================================================================== 000578c6 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 578c6: 4e56 fff0 linkw %fp,#-16 578ca: 206e 000c moveal %fp@(12),%a0 578ce: 48d7 041c moveml %d2-%d4/%a2,%sp@ 578d2: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 578d6: 202a 0078 movel %a2@(120),%d0 578da: 671a beqs 578f6 <_Timer_server_Schedule_operation_method+0x30><== ALWAYS TAKEN * 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 ); 578dc: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 578e0: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 578e4: 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 ); 578ea: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 578ee: 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 ); 578f0: 4ef9 0005 825c jmp 5825c <_Chain_Append> <== NOT EXECUTED * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 578f6: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0 578fc: 5280 addql #1,%d0 578fe: 23c0 0007 dd4c movel %d0,7dd4c <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 57904: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 5790a: 2028 0038 movel %a0@(56),%d0 5790e: 7201 moveq #1,%d1 57910: b280 cmpl %d0,%d1 57912: 6700 008a beqw 5799e <_Timer_server_Schedule_operation_method+0xd8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 57916: 7803 moveq #3,%d4 57918: b880 cmpl %d0,%d4 5791a: 670e beqs 5792a <_Timer_server_Schedule_operation_method+0x64> * 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 ); } } 5791c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 57922: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57924: 4ef9 0005 ad04 jmp 5ad04 <_Thread_Enable_dispatch> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 5792a: 203c 0000 0700 movel #1792,%d0 57930: 40c2 movew %sr,%d2 57932: 8082 orl %d2,%d0 57934: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 57936: 260a movel %a2,%d3 57938: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 5793e: 2039 0007 ddd6 movel 7ddd6 <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 57944: 222a 0074 movel %a2@(116),%d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57948: 226a 0068 moveal %a2@(104),%a1 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 5794c: b689 cmpl %a1,%d3 5794e: 671c beqs 5796c <_Timer_server_Schedule_operation_method+0xa6> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 57950: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 57954: b280 cmpl %d0,%d1 57956: 6400 00ba bccw 57a12 <_Timer_server_Schedule_operation_method+0x14c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 5795a: 2800 movel %d0,%d4 5795c: 9881 subl %d1,%d4 if (delta_interval > delta) { 5795e: b883 cmpl %d3,%d4 57960: 6400 00bc bccw 57a1e <_Timer_server_Schedule_operation_method+0x158> delta_interval -= delta; 57964: 9684 subl %d4,%d3 57966: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 57968: 2341 0010 movel %d1,%a1@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 5796c: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 57970: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 57972: 4868 0010 pea %a0@(16) 57976: 486a 0068 pea %a2@(104) 5797a: 4eb9 0005 bd5c jsr 5bd5c <_Watchdog_Insert> if ( !ts->active ) { 57980: 508f addql #8,%sp 57982: 102a 007c moveb %a2@(124),%d0 57986: 6694 bnes 5791c <_Timer_server_Schedule_operation_method+0x56> _Timer_server_Reset_tod_system_watchdog( ts ); 57988: 2f0a movel %a2,%sp@- 5798a: 4eba fc8a jsr %pc@(57616 <_Timer_server_Reset_tod_system_watchdog>) 5798e: 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 ); } } 57990: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 57996: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57998: 4ef9 0005 ad04 jmp 5ad04 <_Thread_Enable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 5799e: 203c 0000 0700 movel #1792,%d0 579a4: 40c3 movew %sr,%d3 579a6: 8083 orl %d3,%d0 579a8: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 579aa: 2039 0007 de4e movel 7de4e <_Watchdog_Ticks_since_boot>,%d0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 579b0: 220a movel %a2,%d1 579b2: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 579b8: 282a 003c movel %a2@(60),%d4 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 579bc: 226a 0030 moveal %a2@(48),%a1 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 579c0: b289 cmpl %a1,%d1 579c2: 6712 beqs 579d6 <_Timer_server_Schedule_operation_method+0x110> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 579c4: 2200 movel %d0,%d1 579c6: 9284 subl %d4,%d1 delta_interval = first_watchdog->delta_interval; 579c8: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 579cc: b481 cmpl %d1,%d2 579ce: 633a blss 57a0a <_Timer_server_Schedule_operation_method+0x144> delta_interval -= delta; 579d0: 9481 subl %d1,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 579d2: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 579d6: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 579da: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 579dc: 4868 0010 pea %a0@(16) 579e0: 486a 0030 pea %a2@(48) 579e4: 4eb9 0005 bd5c jsr 5bd5c <_Watchdog_Insert> if ( !ts->active ) { 579ea: 508f addql #8,%sp 579ec: 102a 007c moveb %a2@(124),%d0 579f0: 6600 ff2a bnew 5791c <_Timer_server_Schedule_operation_method+0x56> _Timer_server_Reset_interval_system_watchdog( ts ); 579f4: 2f0a movel %a2,%sp@- 579f6: 4eba fbb4 jsr %pc@(575ac <_Timer_server_Reset_interval_system_watchdog>) 579fa: 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 ); } } 579fc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 57a02: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57a04: 4ef9 0005 ad04 jmp 5ad04 <_Thread_Enable_dispatch> delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 57a0a: 4282 clrl %d2 } first_watchdog->delta_interval = delta_interval; 57a0c: 2342 0010 movel %d2,%a1@(16) 57a10: 60c4 bras 579d6 <_Timer_server_Schedule_operation_method+0x110> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 57a12: d283 addl %d3,%d1 delta_interval += delta; 57a14: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 57a16: 2341 0010 movel %d1,%a1@(16) 57a1a: 6000 ff50 braw 5796c <_Timer_server_Schedule_operation_method+0xa6> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 57a1e: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 57a20: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED 57a24: 6000 ff46 braw 5796c <_Timer_server_Schedule_operation_method+0xa6><== NOT EXECUTED =============================================================================== 00049ea2 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 49ea2: 4e56 fff0 linkw %fp,#-16 49ea6: 48d7 041c moveml %d2-%d4/%a2,%sp@ 49eaa: 242e 0008 movel %fp@(8),%d2 49eae: 262e 0010 movel %fp@(16),%d3 49eb2: 2479 0006 1198 moveal 61198 <_User_extensions_List+0x8>,%a2 49eb8: 182e 000f moveb %fp@(15),%d4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49ebc: b5fc 0006 1190 cmpal #397712,%a2 49ec2: 6726 beqs 49eea <_User_extensions_Fatal+0x48> <== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 49ec4: 0284 0000 00ff andil #255,%d4 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 49eca: 206a 0030 moveal %a2@(48),%a0 49ece: 4a88 tstl %a0 49ed0: 670c beqs 49ede <_User_extensions_Fatal+0x3c> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 49ed2: 2f03 movel %d3,%sp@- 49ed4: 2f04 movel %d4,%sp@- 49ed6: 2f02 movel %d2,%sp@- 49ed8: 4e90 jsr %a0@ 49eda: 4fef 000c lea %sp@(12),%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49ede: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49ee2: b5fc 0006 1190 cmpal #397712,%a2 49ee8: 66e0 bnes 49eca <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 49eea: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 49ef0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049d60 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 49d60: 4e56 ffec linkw %fp,#-20 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 49d64: 203c 0006 1194 movel #397716,%d0 49d6a: 23c0 0006 1190 movel %d0,61190 <_User_extensions_List> head->previous = NULL; tail->previous = head; 49d70: 203c 0006 1190 movel #397712,%d0 49d76: 23c0 0006 1198 movel %d0,61198 <_User_extensions_List+0x8> ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 49d7c: 203c 0006 1050 movel #397392,%d0 49d82: 23c0 0006 104c movel %d0,6104c <_User_extensions_Switches_list> head->previous = NULL; tail->previous = head; 49d88: 203c 0006 104c movel #397388,%d0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 49d8e: 42b9 0006 1194 clrl 61194 <_User_extensions_List+0x4> 49d94: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 49d98: 2439 0005 f6a2 movel 5f6a2 ,%d2 initial_extensions = Configuration.User_extension_table; 49d9e: 2639 0005 f6a6 movel 5f6a6 ,%d3 49da4: 42b9 0006 1050 clrl 61050 <_User_extensions_Switches_list+0x4> tail->previous = head; 49daa: 23c0 0006 1054 movel %d0,61054 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 49db0: 4a83 tstl %d3 49db2: 6764 beqs 49e18 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 49db4: 7834 moveq #52,%d4 49db6: 4c02 4800 mulsl %d2,%d4 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 49dba: 2f04 movel %d4,%sp@- 49dbc: 4eb9 0004 a318 jsr 4a318 <_Workspace_Allocate_or_fatal_error> 49dc2: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 49dc4: 2f04 movel %d4,%sp@- 49dc6: 42a7 clrl %sp@- 49dc8: 2f00 movel %d0,%sp@- 49dca: 4eb9 0004 f928 jsr 4f928 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 49dd0: 4fef 0010 lea %sp@(16),%sp 49dd4: 4a82 tstl %d2 49dd6: 6740 beqs 49e18 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN 49dd8: 4284 clrl %d4 49dda: 47f9 0004 d474 lea 4d474 <_User_extensions_Add_set>,%a3 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 49de0: 2043 moveal %d3,%a0 49de2: 5284 addql #1,%d4 49de4: 0683 0000 0020 addil #32,%d3 49dea: 2558 0014 movel %a0@+,%a2@(20) 49dee: 2558 0018 movel %a0@+,%a2@(24) 49df2: 2558 001c movel %a0@+,%a2@(28) 49df6: 2558 0020 movel %a0@+,%a2@(32) 49dfa: 2558 0024 movel %a0@+,%a2@(36) 49dfe: 2558 0028 movel %a0@+,%a2@(40) 49e02: 2558 002c movel %a0@+,%a2@(44) 49e06: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 49e0a: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 49e0c: 45ea 0034 lea %a2@(52),%a2 49e10: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 49e12: 588f addql #4,%sp 49e14: b484 cmpl %d4,%d2 49e16: 66c8 bnes 49de0 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 49e18: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 49e1e: 4e5e unlk %fp ... =============================================================================== 00049e24 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 49e24: 4e56 0000 linkw %fp,#0 49e28: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49e2a: 2479 0006 1190 moveal 61190 <_User_extensions_List>,%a2 49e30: 2f02 movel %d2,%sp@- 49e32: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49e36: b5fc 0006 1194 cmpal #397716,%a2 49e3c: 6718 beqs 49e56 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 49e3e: 206a 0028 moveal %a2@(40),%a0 49e42: 4a88 tstl %a0 49e44: 6706 beqs 49e4c <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 49e46: 2f02 movel %d2,%sp@- 49e48: 4e90 jsr %a0@ 49e4a: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49e4c: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49e4e: b5fc 0006 1194 cmpal #397716,%a2 49e54: 66e8 bnes 49e3e <_User_extensions_Thread_begin+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 49e56: 242e fff8 movel %fp@(-8),%d2 49e5a: 246e fffc moveal %fp@(-4),%a2 49e5e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049ef4 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 49ef4: 4e56 0000 linkw %fp,#0 49ef8: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49efa: 2479 0006 1190 moveal 61190 <_User_extensions_List>,%a2 49f00: 2f02 movel %d2,%sp@- 49f02: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 49f06: b5fc 0006 1194 cmpal #397716,%a2 49f0c: 6722 beqs 49f30 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 49f0e: 206a 0014 moveal %a2@(20),%a0 49f12: 4a88 tstl %a0 49f14: 6710 beqs 49f26 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 49f16: 2f02 movel %d2,%sp@- 49f18: 2f39 0006 14aa movel 614aa <_Per_CPU_Information+0xc>,%sp@- 49f1e: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 49f20: 508f addql #8,%sp 49f22: 4a00 tstb %d0 49f24: 6718 beqs 49f3e <_User_extensions_Thread_create+0x4a> User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49f26: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 49f28: b5fc 0006 1194 cmpal #397716,%a2 49f2e: 66de bnes 49f0e <_User_extensions_Thread_create+0x1a> return false; } } return true; } 49f30: 242e fff8 movel %fp@(-8),%d2 49f34: 246e fffc moveal %fp@(-4),%a2 49f38: 4e5e unlk %fp if ( !status ) return false; } } return true; 49f3a: 7001 moveq #1,%d0 } 49f3c: 4e75 rts 49f3e: 242e fff8 movel %fp@(-8),%d2 49f42: 246e fffc moveal %fp@(-4),%a2 49f46: 4e5e unlk %fp status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 49f48: 4200 clrb %d0 <== NOT EXECUTED } } return true; } =============================================================================== 00049f4c <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 49f4c: 4e56 0000 linkw %fp,#0 49f50: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 49f52: 2479 0006 1198 moveal 61198 <_User_extensions_List+0x8>,%a2 49f58: 2f02 movel %d2,%sp@- 49f5a: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49f5e: b5fc 0006 1190 cmpal #397712,%a2 49f64: 6720 beqs 49f86 <_User_extensions_Thread_delete+0x3a><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 49f66: 206a 0020 moveal %a2@(32),%a0 49f6a: 4a88 tstl %a0 49f6c: 670c beqs 49f7a <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 49f6e: 2f02 movel %d2,%sp@- 49f70: 2f39 0006 14aa movel 614aa <_Per_CPU_Information+0xc>,%sp@- 49f76: 4e90 jsr %a0@ 49f78: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49f7a: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49f7e: b5fc 0006 1190 cmpal #397712,%a2 49f84: 66e0 bnes 49f66 <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 49f86: 242e fff8 movel %fp@(-8),%d2 49f8a: 246e fffc moveal %fp@(-4),%a2 49f8e: 4e5e unlk %fp ... =============================================================================== 00049e62 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 49e62: 4e56 0000 linkw %fp,#0 49e66: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 49e68: 2479 0006 1198 moveal 61198 <_User_extensions_List+0x8>,%a2 49e6e: 2f02 movel %d2,%sp@- 49e70: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49e74: b5fc 0006 1190 cmpal #397712,%a2 49e7a: 671a beqs 49e96 <_User_extensions_Thread_exitted+0x34><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 49e7c: 206a 002c moveal %a2@(44),%a0 49e80: 4a88 tstl %a0 49e82: 6706 beqs 49e8a <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 49e84: 2f02 movel %d2,%sp@- 49e86: 4e90 jsr %a0@ 49e88: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49e8a: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49e8e: b5fc 0006 1190 cmpal #397712,%a2 49e94: 66e6 bnes 49e7c <_User_extensions_Thread_exitted+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 49e96: 242e fff8 movel %fp@(-8),%d2 49e9a: 246e fffc moveal %fp@(-4),%a2 49e9e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a8dc <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 4a8dc: 4e56 0000 linkw %fp,#0 4a8e0: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a8e2: 2479 0006 1d68 moveal 61d68 <_User_extensions_List>,%a2 4a8e8: 2f02 movel %d2,%sp@- 4a8ea: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 4a8ee: b5fc 0006 1d6c cmpal #400748,%a2 4a8f4: 671e beqs 4a914 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 4a8f6: 206a 001c moveal %a2@(28),%a0 4a8fa: 4a88 tstl %a0 4a8fc: 670c beqs 4a90a <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 4a8fe: 2f02 movel %d2,%sp@- 4a900: 2f39 0006 2082 movel 62082 <_Per_CPU_Information+0xc>,%sp@- 4a906: 4e90 jsr %a0@ 4a908: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 4a90a: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 4a90c: b5fc 0006 1d6c cmpal #400748,%a2 4a912: 66e2 bnes 4a8f6 <_User_extensions_Thread_restart+0x1a> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 4a914: 242e fff8 movel %fp@(-8),%d2 4a918: 246e fffc moveal %fp@(-4),%a2 4a91c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049f94 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 49f94: 4e56 0000 linkw %fp,#0 49f98: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49f9a: 2479 0006 1190 moveal 61190 <_User_extensions_List>,%a2 49fa0: 2f02 movel %d2,%sp@- 49fa2: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49fa6: b5fc 0006 1194 cmpal #397716,%a2 49fac: 671e beqs 49fcc <_User_extensions_Thread_start+0x38><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 49fae: 206a 0018 moveal %a2@(24),%a0 49fb2: 4a88 tstl %a0 49fb4: 670c beqs 49fc2 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 49fb6: 2f02 movel %d2,%sp@- 49fb8: 2f39 0006 14aa movel 614aa <_Per_CPU_Information+0xc>,%sp@- 49fbe: 4e90 jsr %a0@ 49fc0: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49fc2: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49fc4: b5fc 0006 1194 cmpal #397716,%a2 49fca: 66e2 bnes 49fae <_User_extensions_Thread_start+0x1a> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 49fcc: 242e fff8 movel %fp@(-8),%d2 49fd0: 246e fffc moveal %fp@(-4),%a2 49fd4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049fd8 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 49fd8: 4e56 fff4 linkw %fp,#-12 49fdc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49fe0: 262e 0008 movel %fp@(8),%d3 49fe4: 242e 000c movel %fp@(12),%d2 49fe8: 2479 0006 104c moveal 6104c <_User_extensions_Switches_list>,%a2 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 49fee: b5fc 0006 1050 cmpal #397392,%a2 49ff4: 6716 beqs 4a00c <_User_extensions_Thread_switch+0x34><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 49ff6: 2f02 movel %d2,%sp@- 49ff8: 2f03 movel %d3,%sp@- 49ffa: 206a 0008 moveal %a2@(8),%a0 49ffe: 4e90 jsr %a0@ Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 4a000: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 4a002: 508f addql #8,%sp 4a004: b5fc 0006 1050 cmpal #397392,%a2 4a00a: 66ea bnes 49ff6 <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 4a00c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4a012: 4e5e unlk %fp ... =============================================================================== 0004b938 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4b938: 4e56 ffe8 linkw %fp,#-24 4b93c: 226e 000c moveal %fp@(12),%a1 4b940: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ ISR_Level level; _ISR_Disable( level ); 4b944: 283c 0000 0700 movel #1792,%d4 4b94a: 2004 movel %d4,%d0 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4b94c: 266e 0008 moveal %fp@(8),%a3 4b950: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4b954: 40c1 movew %sr,%d1 4b956: 8081 orl %d1,%d0 4b958: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4b95a: 244b moveal %a3,%a2 4b95c: 205a moveal %a2@+,%a0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4b95e: b5c8 cmpal %a0,%a2 4b960: 6746 beqs 4b9a8 <_Watchdog_Adjust+0x70> switch ( direction ) { 4b962: 4a89 tstl %a1 4b964: 664e bnes 4b9b4 <_Watchdog_Adjust+0x7c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4b966: 4a82 tstl %d2 4b968: 673e beqs 4b9a8 <_Watchdog_Adjust+0x70> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4b96a: 2628 0010 movel %a0@(16),%d3 4b96e: 49f9 0004 bbb4 lea 4bbb4 <_Watchdog_Tickle>,%a4 4b974: b682 cmpl %d2,%d3 4b976: 622a bhis 4b9a2 <_Watchdog_Adjust+0x6a> <== NEVER TAKEN _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4b978: 7001 moveq #1,%d0 4b97a: 2140 0010 movel %d0,%a0@(16) _ISR_Enable( level ); 4b97e: 46c1 movew %d1,%sr _Watchdog_Tickle( header ); 4b980: 2f0b movel %a3,%sp@- 4b982: 4e94 jsr %a4@ _ISR_Disable( level ); 4b984: 2004 movel %d4,%d0 4b986: 40c1 movew %sr,%d1 4b988: 8081 orl %d1,%d0 4b98a: 46c0 movew %d0,%sr if ( _Chain_Is_empty( header ) ) 4b98c: 588f addql #4,%sp while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 4b98e: 9483 subl %d3,%d2 4b990: 2053 moveal %a3@,%a0 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 4b992: b1ca cmpal %a2,%a0 4b994: 6712 beqs 4b9a8 <_Watchdog_Adjust+0x70> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4b996: 4a82 tstl %d2 4b998: 670e beqs 4b9a8 <_Watchdog_Adjust+0x70> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4b99a: 2628 0010 movel %a0@(16),%d3 4b99e: b483 cmpl %d3,%d2 4b9a0: 64d6 bccs 4b978 <_Watchdog_Adjust+0x40> _Watchdog_First( header )->delta_interval -= units; 4b9a2: 9682 subl %d2,%d3 4b9a4: 2143 0010 movel %d3,%a0@(16) } break; } } _ISR_Enable( level ); 4b9a8: 46c1 movew %d1,%sr } 4b9aa: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b9b0: 4e5e unlk %fp 4b9b2: 4e75 rts * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4b9b4: 7001 moveq #1,%d0 4b9b6: b089 cmpl %a1,%d0 4b9b8: 66ee bnes 4b9a8 <_Watchdog_Adjust+0x70> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4b9ba: d5a8 0010 addl %d2,%a0@(16) } break; } } _ISR_Enable( level ); 4b9be: 46c1 movew %d1,%sr } 4b9c0: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b9c6: 4e5e unlk %fp ... =============================================================================== 0004a018 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 4a018: 4e56 ffec linkw %fp,#-20 4a01c: 226e 000c moveal %fp@(12),%a1 4a020: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4a024: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 4a028: 283c 0000 0700 movel #1792,%d4 4a02e: 2004 movel %d4,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 4a030: 2639 0006 14a6 movel 614a6 <_Per_CPU_Information+0x8>,%d3 _ISR_Disable( level ); 4a036: 40c2 movew %sr,%d2 4a038: 8082 orl %d2,%d0 4a03a: 46c0 movew %d0,%sr /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 4a03c: 4aa9 0008 tstl %a1@(8) 4a040: 6600 00bc bnew 4a0fe <_Watchdog_Insert+0xe6> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 4a044: 2039 0006 1146 movel 61146 <_Watchdog_Sync_count>,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4a04a: 7201 moveq #1,%d1 _Watchdog_Sync_count++; 4a04c: 5280 addql #1,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4a04e: 2341 0008 movel %d1,%a1@(8) _Watchdog_Sync_count++; 4a052: 23c0 0006 1146 movel %d0,61146 <_Watchdog_Sync_count> restart: delta_interval = the_watchdog->initial; 4a058: 2029 000c movel %a1@(12),%d0 4a05c: 2052 moveal %a2@,%a0 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 4a05e: 6764 beqs 4a0c4 <_Watchdog_Insert+0xac> <== NEVER TAKEN 4a060: 4a90 tstl %a0@ 4a062: 6760 beqs 4a0c4 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 4a064: 2228 0010 movel %a0@(16),%d1 4a068: b280 cmpl %d0,%d1 4a06a: 6252 bhis 4a0be <_Watchdog_Insert+0xa6> break; } delta_interval -= after->delta_interval; _ISR_Flash( level ); 4a06c: 2a04 movel %d4,%d5 4a06e: 46c2 movew %d2,%sr 4a070: 8a82 orl %d2,%d5 4a072: 46c5 movew %d5,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 4a074: 7a01 moveq #1,%d5 4a076: baa9 0008 cmpl %a1@(8),%d5 4a07a: 666e bnes 4a0ea <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 4a07c: 2a39 0006 10ec movel 610ec <_Watchdog_Sync_level>,%d5 4a082: ba83 cmpl %d3,%d5 4a084: 6230 bhis 4a0b6 <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 4a086: 9081 subl %d1,%d0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 4a088: 2050 moveal %a0@,%a0 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 4a08a: 4a80 tstl %d0 4a08c: 6736 beqs 4a0c4 <_Watchdog_Insert+0xac> 4a08e: 4a90 tstl %a0@ 4a090: 6732 beqs 4a0c4 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 4a092: 2228 0010 movel %a0@(16),%d1 4a096: b081 cmpl %d1,%d0 4a098: 6524 bcss 4a0be <_Watchdog_Insert+0xa6> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 4a09a: 9081 subl %d1,%d0 _ISR_Flash( level ); 4a09c: 2204 movel %d4,%d1 4a09e: 46c2 movew %d2,%sr 4a0a0: 8282 orl %d2,%d1 4a0a2: 46c1 movew %d1,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 4a0a4: 7201 moveq #1,%d1 4a0a6: b2a9 0008 cmpl %a1@(8),%d1 4a0aa: 663e bnes 4a0ea <_Watchdog_Insert+0xd2> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 4a0ac: 2239 0006 10ec movel 610ec <_Watchdog_Sync_level>,%d1 4a0b2: b283 cmpl %d3,%d1 4a0b4: 63d2 blss 4a088 <_Watchdog_Insert+0x70> <== ALWAYS TAKEN _Watchdog_Sync_level = insert_isr_nest_level; 4a0b6: 23c3 0006 10ec movel %d3,610ec <_Watchdog_Sync_level> goto restart; 4a0bc: 609a bras 4a058 <_Watchdog_Insert+0x40> if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 4a0be: 9280 subl %d0,%d1 4a0c0: 2141 0010 movel %d1,%a0@(16) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 4a0c4: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 4a0c8: 7a02 moveq #2,%d5 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4a0ca: 2450 moveal %a0@,%a2 } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 4a0cc: 2340 0010 movel %d0,%a1@(16) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 4a0d0: 2039 0006 114a movel 6114a <_Watchdog_Ticks_since_boot>,%d0 4a0d6: 2345 0008 movel %d5,%a1@(8) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4a0da: 2348 0004 movel %a0,%a1@(4) before_node = after_node->next; after_node->next = the_node; 4a0de: 2089 movel %a1,%a0@ the_node->next = before_node; before_node->previous = the_node; 4a0e0: 2549 0004 movel %a1,%a2@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 4a0e4: 228a movel %a2,%a1@ 4a0e6: 2340 0014 movel %d0,%a1@(20) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 4a0ea: 23c3 0006 10ec movel %d3,610ec <_Watchdog_Sync_level> _Watchdog_Sync_count--; 4a0f0: 2039 0006 1146 movel 61146 <_Watchdog_Sync_count>,%d0 4a0f6: 5380 subql #1,%d0 4a0f8: 23c0 0006 1146 movel %d0,61146 <_Watchdog_Sync_count> _ISR_Enable( level ); 4a0fe: 46c2 movew %d2,%sr } 4a100: 4cd7 043c moveml %sp@,%d2-%d5/%a2 4a104: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a160 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4a160: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4a166: 4e56 0000 linkw %fp,#0 4a16a: 206e 0008 moveal %fp@(8),%a0 4a16e: 2f0a movel %a2,%sp@- 4a170: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4a172: 40c1 movew %sr,%d1 4a174: 8081 orl %d1,%d0 4a176: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 4a178: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 4a17c: 7401 moveq #1,%d2 4a17e: b480 cmpl %d0,%d2 4a180: 6764 beqs 4a1e6 <_Watchdog_Remove+0x86> <== NEVER TAKEN 4a182: 6314 blss 4a198 <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4a184: 2279 0006 114a moveal 6114a <_Watchdog_Ticks_since_boot>,%a1 4a18a: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 4a18e: 46c1 movew %d1,%sr return( previous_state ); } 4a190: 241f movel %sp@+,%d2 4a192: 245f moveal %sp@+,%a2 4a194: 4e5e unlk %fp 4a196: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 4a198: 143c 0003 moveb #3,%d2 4a19c: b480 cmpl %d0,%d2 4a19e: 65e4 bcss 4a184 <_Watchdog_Remove+0x24> <== NEVER TAKEN } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 4a1a0: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4a1a2: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4a1a6: 4a91 tstl %a1@ 4a1a8: 6708 beqs 4a1b2 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 4a1aa: 2428 0010 movel %a0@(16),%d2 4a1ae: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 4a1b2: 2479 0006 1146 moveal 61146 <_Watchdog_Sync_count>,%a2 4a1b8: 4a8a tstl %a2 4a1ba: 670c beqs 4a1c8 <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 4a1bc: 45f9 0006 14a6 lea 614a6 <_Per_CPU_Information+0x8>,%a2 4a1c2: 23d2 0006 10ec movel %a2@,610ec <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4a1c8: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; 4a1cc: 234a 0004 movel %a2,%a1@(4) previous->next = next; 4a1d0: 2489 movel %a1,%a2@ _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4a1d2: 2279 0006 114a moveal 6114a <_Watchdog_Ticks_since_boot>,%a1 4a1d8: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 4a1dc: 46c1 movew %d1,%sr return( previous_state ); } 4a1de: 241f movel %sp@+,%d2 4a1e0: 245f moveal %sp@+,%a2 4a1e2: 4e5e unlk %fp 4a1e4: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4a1e6: 2279 0006 114a moveal 6114a <_Watchdog_Ticks_since_boot>,%a1 /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 4a1ec: 42a8 0008 clrl %a0@(8) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4a1f0: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 4a1f4: 46c1 movew %d1,%sr return( previous_state ); } 4a1f6: 241f movel %sp@+,%d2 4a1f8: 245f moveal %sp@+,%a2 4a1fa: 4e5e unlk %fp ... =============================================================================== 0004b328 <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4b328: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4b32e: 4e56 ffe8 linkw %fp,#-24 4b332: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4b336: 242e 0008 movel %fp@(8),%d2 4b33a: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4b33e: 40c3 movew %sr,%d3 4b340: 8083 orl %d3,%d0 4b342: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4b344: 2f0b movel %a3,%sp@- 4b346: 4bf9 0004 4be0 lea 44be0 ,%a5 4b34c: 2f02 movel %d2,%sp@- 4b34e: 4879 0006 051c pea 6051c <_Status_Object_name_errors_to_status+0x14> 4b354: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4b356: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4b358: 4fef 000c lea %sp@(12),%sp 4b35c: b7ca cmpal %a2,%a3 4b35e: 672c beqs 4b38c <_Watchdog_Report_chain+0x64> 4b360: 49f9 0004 b3a4 lea 4b3a4 <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4b366: 2f0a movel %a2,%sp@- 4b368: 42a7 clrl %sp@- 4b36a: 4e94 jsr %a4@ _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) 4b36c: 2452 moveal %a2@,%a2 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; 4b36e: 508f addql #8,%sp 4b370: b7ca cmpal %a2,%a3 4b372: 66f2 bnes 4b366 <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4b374: 2f02 movel %d2,%sp@- 4b376: 4879 0006 0533 pea 60533 <_Status_Object_name_errors_to_status+0x2b> 4b37c: 4e95 jsr %a5@ 4b37e: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4b380: 46c3 movew %d3,%sr } 4b382: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b388: 4e5e unlk %fp 4b38a: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4b38c: 4879 0006 0542 pea 60542 <_Status_Object_name_errors_to_status+0x3a> 4b392: 4e95 jsr %a5@ 4b394: 588f addql #4,%sp } _ISR_Enable( level ); 4b396: 46c3 movew %d3,%sr } 4b398: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b39e: 4e5e unlk %fp ... =============================================================================== 0004a200 <_Watchdog_Tickle>: * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 4a200: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 4a206: 4e56 ffe8 linkw %fp,#-24 4a20a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a20e: 286e 0008 moveal %fp@(8),%a4 * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 4a212: 40c2 movew %sr,%d2 4a214: 8082 orl %d2,%d0 4a216: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4a218: 264c moveal %a4,%a3 4a21a: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 4a21c: b7ca cmpal %a2,%a3 4a21e: 673c beqs 4a25c <_Watchdog_Tickle+0x5c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 4a220: 202a 0010 movel %a2@(16),%d0 4a224: 4bf9 0004 a160 lea 4a160 <_Watchdog_Remove>,%a5 4a22a: 6708 beqs 4a234 <_Watchdog_Tickle+0x34> the_watchdog->delta_interval--; 4a22c: 5380 subql #1,%d0 4a22e: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 4a232: 6628 bnes 4a25c <_Watchdog_Tickle+0x5c> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 4a234: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 4a23a: 2f0a movel %a2,%sp@- 4a23c: 4e95 jsr %a5@ _ISR_Enable( level ); 4a23e: 46c2 movew %d2,%sr switch( watchdog_state ) { 4a240: 7202 moveq #2,%d1 4a242: 588f addql #4,%sp 4a244: b280 cmpl %d0,%d1 4a246: 6720 beqs 4a268 <_Watchdog_Tickle+0x68> <== ALWAYS TAKEN case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 4a248: 2003 movel %d3,%d0 4a24a: 40c2 movew %sr,%d2 4a24c: 8082 orl %d2,%d0 4a24e: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a250: 2454 moveal %a4@,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 4a252: b5cb cmpal %a3,%a2 4a254: 6706 beqs 4a25c <_Watchdog_Tickle+0x5c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 4a256: 4aaa 0010 tstl %a2@(16) 4a25a: 67de beqs 4a23a <_Watchdog_Tickle+0x3a> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 4a25c: 46c2 movew %d2,%sr } 4a25e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a264: 4e5e unlk %fp 4a266: 4e75 rts _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 4a268: 2f2a 0024 movel %a2@(36),%sp@- 4a26c: 2f2a 0020 movel %a2@(32),%sp@- 4a270: 206a 001c moveal %a2@(28),%a0 4a274: 4e90 jsr %a0@ the_watchdog->id, the_watchdog->user_data ); break; 4a276: 508f addql #8,%sp 4a278: 60ce bras 4a248 <_Watchdog_Tickle+0x48> ... =============================================================================== 0005ca7c <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 5ca7c: 4e56 0000 linkw %fp,#0 5ca80: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 5ca84: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5ca8a: 2d40 0008 movel %d0,%fp@(8) } 5ca8e: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 5ca90: 4ef9 0004 2ec8 jmp 42ec8 ... =============================================================================== 00053bf2 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 53bf2: 4e56 ffd8 linkw %fp,#-40 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 53bf6: 206e 0008 moveal %fp@(8),%a0 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 53bfa: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 53bfe: 242e 0014 movel %fp@(20),%d2 53c02: 286e 0018 moveal %fp@(24),%a4 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 53c06: 2468 0034 moveal %a0@(52),%a2 ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 53c0a: 42ae fffc clrl %fp@(-4) uint32_t c = 0; while (count > 0) 53c0e: 4a82 tstl %d2 53c10: 6776 beqs 53c88 <_fat_block_read+0x96> <== NEVER TAKEN 53c12: 2c0e movel %fp,%d6 53c14: 4283 clrl %d3 53c16: 5986 subql #4,%d6 53c18: 47f9 0005 387c lea 5387c ,%a3 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 53c1e: 4bf9 0005 e2a0 lea 5e2a0 ,%a5 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 53c24: 2a2e 0010 movel %fp@(16),%d5 53c28: 282e 000c movel %fp@(12),%d4 { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 53c2c: 2f06 movel %d6,%sp@- 53c2e: 4878 0001 pea 1 53c32: 2f04 movel %d4,%sp@- c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; 53c34: 5284 addql #1,%d4 rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 53c36: 2f0a movel %a2,%sp@- 53c38: 4e93 jsr %a3@ if (rc != RC_OK) 53c3a: 4fef 0010 lea %sp@(16),%sp 53c3e: 4a80 tstl %d0 53c40: 6638 bnes 53c7a <_fat_block_read+0x88> <== NEVER TAKEN return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 53c42: 4280 clrl %d0 53c44: 3012 movew %a2@,%d0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 53c46: 206e fffc moveal %fp@(-4),%a0 { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 53c4a: 9085 subl %d5,%d0 53c4c: b480 cmpl %d0,%d2 53c4e: 6402 bccs 53c52 <_fat_block_read+0x60> 53c50: 2002 movel %d2,%d0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 53c52: 2f00 movel %d0,%sp@- 53c54: daa8 001e addl %a0@(30),%d5 count -= c; 53c58: 9480 subl %d0,%d2 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 53c5a: 2f05 movel %d5,%sp@- 53c5c: 4874 3800 pea %a4@(00000000,%d3:l) count -= c; cmpltd += c; 53c60: d680 addl %d0,%d3 blk++; ofs = 0; 53c62: 4285 clrl %d5 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 53c64: 4e95 jsr %a5@ uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 53c66: 4fef 000c lea %sp@(12),%sp 53c6a: 4a82 tstl %d2 53c6c: 66be bnes 53c2c <_fat_block_read+0x3a> cmpltd += c; blk++; ofs = 0; } return cmpltd; } 53c6e: 2003 movel %d3,%d0 53c70: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 53c76: 4e5e unlk %fp 53c78: 4e75 rts while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; 53c7a: 76ff moveq #-1,%d3 <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } 53c7c: 2003 movel %d3,%d0 <== NOT EXECUTED 53c7e: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 53c84: 4e5e unlk %fp <== NOT EXECUTED 53c86: 4e75 rts <== NOT EXECUTED void *buff ) { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; 53c88: 4283 clrl %d3 <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } 53c8a: 2003 movel %d3,%d0 <== NOT EXECUTED 53c8c: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 53c92: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053d60 <_fat_block_release>: * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { 53d60: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 53d64: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 53d68: 2d68 0034 0008 movel %a0@(52),%fp@(8) <== NOT EXECUTED } 53d6e: 4e5e unlk %fp <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 53d70: 4ef9 0005 3a90 jmp 53a90 <== NOT EXECUTED =============================================================================== 00053c96 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 53c96: 4e56 ffd4 linkw %fp,#-44 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 53c9a: 206e 0008 moveal %fp@(8),%a0 rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 53c9e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 53ca2: 262e 0014 movel %fp@(20),%d3 53ca6: 286e 0018 moveal %fp@(24),%a4 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 53caa: 2468 0034 moveal %a0@(52),%a2 ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 53cae: 42ae fffc clrl %fp@(-4) uint32_t c = 0; while(count > 0) 53cb2: 4a83 tstl %d3 53cb4: 6700 009c beqw 53d52 <_fat_block_write+0xbc> 53cb8: 2e0e movel %fp,%d7 53cba: 4284 clrl %d4 53cbc: 5987 subql #4,%d7 53cbe: 47f9 0005 387c lea 5387c ,%a3 else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 53cc4: 4bf9 0005 e2a0 lea 5e2a0 ,%a5 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 53cca: 2c2e 0010 movel %fp@(16),%d6 53cce: 2a2e 000c movel %fp@(12),%d5 { c = MIN(count, (fs_info->vol.bps - ofs)); 53cd2: 4280 clrl %d0 53cd4: 3012 movew %a2@,%d0 53cd6: 2400 movel %d0,%d2 53cd8: 9486 subl %d6,%d2 53cda: b682 cmpl %d2,%d3 53cdc: 6402 bccs 53ce0 <_fat_block_write+0x4a> 53cde: 2403 movel %d3,%d2 if (c == fs_info->vol.bps) 53ce0: b480 cmpl %d0,%d2 53ce2: 6748 beqs 53d2c <_fat_block_write+0x96> rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 53ce4: 2f07 movel %d7,%sp@- 53ce6: 4878 0001 pea 1 memcpy((block->buffer + ofs), (buff + cmpltd), c); fat_buf_mark_modified(fs_info); count -= c; 53cea: 9682 subl %d2,%d3 c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 53cec: 2f05 movel %d5,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 53cee: 5285 addql #1,%d5 c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 53cf0: 2f0a movel %a2,%sp@- 53cf2: 4e93 jsr %a3@ 53cf4: 4fef 0010 lea %sp@(16),%sp if (rc != RC_OK) 53cf8: 4a80 tstl %d0 53cfa: 6648 bnes 53d44 <_fat_block_write+0xae> <== NEVER TAKEN return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 53cfc: 2f02 movel %d2,%sp@- 53cfe: 4874 4800 pea %a4@(00000000,%d4:l) fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 53d02: d882 addl %d2,%d4 else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 53d04: 206e fffc moveal %fp@(-4),%a0 53d08: dca8 001e addl %a0@(30),%d6 53d0c: 2f06 movel %d6,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ofs = 0; 53d0e: 4286 clrl %d6 else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 53d10: 4e95 jsr %a5@ uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 53d12: 4fef 000c lea %sp@(12),%sp } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 53d16: 7001 moveq #1,%d0 53d18: 1540 0076 moveb %d0,%a2@(118) 53d1c: 4a83 tstl %d3 53d1e: 66b2 bnes 53cd2 <_fat_block_write+0x3c> cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 53d20: 2004 movel %d4,%d0 53d22: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 53d28: 4e5e unlk %fp 53d2a: 4e75 rts while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 53d2c: 2f07 movel %d7,%sp@- 53d2e: 4878 0002 pea 2 memcpy((block->buffer + ofs), (buff + cmpltd), c); fat_buf_mark_modified(fs_info); count -= c; 53d32: 9682 subl %d2,%d3 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 53d34: 2f05 movel %d5,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 53d36: 5285 addql #1,%d5 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 53d38: 2f0a movel %a2,%sp@- 53d3a: 4e93 jsr %a3@ 53d3c: 4fef 0010 lea %sp@(16),%sp else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) 53d40: 4a80 tstl %d0 53d42: 67b8 beqs 53cfc <_fat_block_write+0x66> <== ALWAYS TAKEN return -1; 53d44: 78ff moveq #-1,%d4 <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 53d46: 2004 movel %d4,%d0 <== NOT EXECUTED 53d48: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53d4e: 4e5e unlk %fp <== NOT EXECUTED 53d50: 4e75 rts <== NOT EXECUTED uint32_t count, const void *buff) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; 53d52: 4284 clrl %d4 <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 53d54: 2004 movel %d4,%d0 <== NOT EXECUTED 53d56: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53d5c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005ca98 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 5ca98: 4e56 0000 linkw %fp,#0 free( ptr ); 5ca9c: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5caa2: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 5caa4: 4ef9 0004 32dc jmp 432dc ... =============================================================================== 0005cb48 <_fstat_r>: int _fstat_r( struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { 5cb48: 4e56 0000 linkw %fp,#0 5cb4c: 202e 000c movel %fp@(12),%d0 return fstat( fd, buf ); 5cb50: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5cb56: 2d40 0008 movel %d0,%fp@(8) } 5cb5a: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { return fstat( fd, buf ); 5cb5c: 4ef9 0005 caac jmp 5caac ... =============================================================================== 000433ea <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 433ea: 4e56 0000 linkw %fp,#0 return gettimeofday( tp, tzp ); } 433ee: 4e5e unlk %fp int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 433f0: 4ef9 0004 336c jmp 4336c ... =============================================================================== 0005cb78 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 5cb78: 4e56 0000 linkw %fp,#0 return isatty( fd ); 5cb7c: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5cb82: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 5cb84: 4ef9 0005 d6b8 jmp 5d6b8 ... =============================================================================== 0005ce20 <_kill_r>: int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 5ce20: 4e56 0000 linkw %fp,#0 return killinfo( pid, sig, NULL ); 5ce24: 2d6e 000c 0008 movel %fp@(12),%fp@(8) int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 5ce2a: 202e 0010 movel %fp@(16),%d0 return killinfo( pid, sig, NULL ); 5ce2e: 42ae 0010 clrl %fp@(16) 5ce32: 2d40 000c movel %d0,%fp@(12) } 5ce36: 4e5e unlk %fp struct _reent *ptr, pid_t pid, int sig ) { return killinfo( pid, sig, NULL ); 5ce38: 4ef9 0005 d028 jmp 5d028 ... =============================================================================== 000446e4 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 446e4: 4e56 0000 linkw %fp,#0 446e8: 202e 000c movel %fp@(12),%d0 return link( existing, new ); 446ec: 2d6e 0010 000c movel %fp@(16),%fp@(12) 446f2: 2d40 0008 movel %d0,%fp@(8) } 446f6: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 446f8: 4ef9 0004 45e8 jmp 445e8 ... =============================================================================== 00045fe8 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 45fe8: 4e56 0000 linkw %fp,#0 45fec: 202e 000c movel %fp@(12),%d0 return _STAT_NAME( path, buf ); 45ff0: 2d6e 0010 000c movel %fp@(16),%fp@(12) 45ff6: 2d40 0008 movel %d0,%fp@(8) } 45ffa: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 45ffc: 4ef9 0004 5f50 jmp 45f50 ... =============================================================================== 0005ccf4 <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 5ccf4: 4e56 0000 linkw %fp,#0 return malloc( size ); 5ccf8: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5ccfe: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 5cd00: 4ef9 0004 360c jmp 4360c ... =============================================================================== 0005cde0 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5cde0: 4e56 0000 linkw %fp,#0 5cde4: 202e 000c movel %fp@(12),%d0 return realloc( ptr, size ); 5cde8: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5cdee: 2d40 0008 movel %d0,%fp@(8) } 5cdf2: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 5cdf4: 4ef9 0005 ce40 jmp 5ce40 ... =============================================================================== 000600b0 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 600b0: 4e56 ffa0 linkw %fp,#-96 600b4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 600b8: 262e 000c movel %fp@(12),%d3 600bc: 2a2e 0010 movel %fp@(16),%d5 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 600c0: 2f03 movel %d3,%sp@- 600c2: 4eb9 0004 5b6c jsr 45b6c if ( old_parent_pathlen == 0 ) 600c8: 588f addql #4,%sp 600ca: 4a80 tstl %d0 600cc: 6600 0092 bnew 60160 <_rename_r+0xb0> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 600d0: 45ee ffd0 lea %fp@(-48),%a2 600d4: 4282 clrl %d2 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 600d6: d483 addl %d3,%d2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 600d8: 47f9 0005 38f8 lea 538f8 ,%a3 */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 600de: 2f0a movel %a2,%sp@- 600e0: 486e fff8 pea %fp@(-8) rtems_filesystem_location_info_t old_parent_loc; rtems_filesystem_location_info_t new_parent_loc; int i; int result; const char *name; bool free_old_parentloc = false; 600e4: 4204 clrb %d4 */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 600e6: 2f03 movel %d3,%sp@- old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 600e8: 260e movel %fp,%d3 600ea: 0683 ffff ffbc addil #-68,%d3 */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 600f0: 4eb9 0004 75b0 jsr 475b0 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 600f6: 2d52 ffbc movel %a2@,%fp@(-68) */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 600fa: 4fef 000c lea %sp@(12),%sp /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 600fe: 2d6e ffd4 ffc0 movel %fp@(-44),%fp@(-64) 60104: 2d6e ffd8 ffc4 movel %fp@(-40),%fp@(-60) 6010a: 2d6e ffdc ffc8 movel %fp@(-36),%fp@(-56) 60110: 2d6e ffe0 ffcc movel %fp@(-32),%fp@(-52) name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 60116: 2f02 movel %d2,%sp@- /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 60118: 2d42 fffc movel %d2,%fp@(-4) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 6011c: 4e93 jsr %a3@ 6011e: 2e80 movel %d0,%sp@ 60120: 2f02 movel %d2,%sp@- 60122: 4eb9 0004 5bae jsr 45bae 60128: d480 addl %d0,%d2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 6012a: 2f02 movel %d2,%sp@- * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 6012c: 2d42 fffc movel %d2,%fp@(-4) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 60130: 4e93 jsr %a3@ 60132: 4297 clrl %sp@ 60134: 2f03 movel %d3,%sp@- 60136: 42a7 clrl %sp@- 60138: 2f00 movel %d0,%sp@- 6013a: 2f02 movel %d2,%sp@- 6013c: 4eb9 0004 5ab0 jsr 45ab0 0, &old_loc, false ); if ( result != 0 ) { 60142: 4fef 001c lea %sp@(28),%sp 60146: 4a80 tstl %d0 60148: 6700 009a beqw 601e4 <_rename_r+0x134> if ( free_old_parentloc ) 6014c: 4a04 tstb %d4 6014e: 6600 010a bnew 6025a <_rename_r+0x1aa> rtems_filesystem_freenode( &old_parent_loc ); return -1; 60152: 74ff moveq #-1,%d2 if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 60154: 2002 movel %d2,%d0 60156: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 6015c: 4e5e unlk %fp 6015e: 4e75 rts old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 60160: 42a7 clrl %sp@- 60162: 45ee ffd0 lea %fp@(-48),%a2 60166: 2400 movel %d0,%d2 60168: 2f0a movel %a2,%sp@- 6016a: 4878 0002 pea 2 6016e: 2f00 movel %d0,%sp@- 60170: 2f03 movel %d3,%sp@- 60172: 4eb9 0004 5b20 jsr 45b20 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 60178: 4fef 0014 lea %sp@(20),%sp 6017c: 4a80 tstl %d0 6017e: 66d2 bnes 60152 <_rename_r+0xa2> <== NEVER TAKEN /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 60180: 2d52 ffbc movel %a2@,%fp@(-68) name = old + old_parent_pathlen; 60184: d483 addl %d3,%d2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 60186: 47f9 0005 38f8 lea 538f8 ,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 6018c: 260e movel %fp,%d3 6018e: 0683 ffff ffbc addil #-68,%d3 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 60194: 2d6e ffd4 ffc0 movel %fp@(-44),%fp@(-64) 6019a: 2d6e ffd8 ffc4 movel %fp@(-40),%fp@(-60) 601a0: 2d6e ffdc ffc8 movel %fp@(-36),%fp@(-56) 601a6: 2d6e ffe0 ffcc movel %fp@(-32),%fp@(-52) name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 601ac: 2f02 movel %d2,%sp@- &old_parent_loc, false ); if ( result != 0 ) return -1; free_old_parentloc = true; 601ae: 7801 moveq #1,%d4 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 601b0: 2d42 fffc movel %d2,%fp@(-4) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 601b4: 4e93 jsr %a3@ 601b6: 2e80 movel %d0,%sp@ 601b8: 2f02 movel %d2,%sp@- 601ba: 4eb9 0004 5bae jsr 45bae 601c0: d480 addl %d0,%d2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 601c2: 2f02 movel %d2,%sp@- * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 601c4: 2d42 fffc movel %d2,%fp@(-4) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 601c8: 4e93 jsr %a3@ 601ca: 4297 clrl %sp@ 601cc: 2f03 movel %d3,%sp@- 601ce: 42a7 clrl %sp@- 601d0: 2f00 movel %d0,%sp@- 601d2: 2f02 movel %d2,%sp@- 601d4: 4eb9 0004 5ab0 jsr 45ab0 0, &old_loc, false ); if ( result != 0 ) { 601da: 4fef 001c lea %sp@(28),%sp 601de: 4a80 tstl %d0 601e0: 6600 ff6a bnew 6014c <_rename_r+0x9c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 601e4: 47ee ffe4 lea %fp@(-28),%a3 601e8: 2f0b movel %a3,%sp@- 601ea: 486e fff8 pea %fp@(-8) 601ee: 2f05 movel %d5,%sp@- 601f0: 4eb9 0004 75b0 jsr 475b0 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 601f6: 486e fffc pea %fp@(-4) 601fa: daae fff8 addl %fp@(-8),%d5 601fe: 2f0b movel %a3,%sp@- 60200: 206e fff0 moveal %fp@(-16),%a0 60204: 2f05 movel %d5,%sp@- 60206: 2068 0004 moveal %a0@(4),%a0 6020a: 4e90 jsr %a0@ if ( result != 0 ) { 6020c: 4fef 0018 lea %sp@(24),%sp 60210: 4a80 tstl %d0 60212: 6600 00b8 bnew 602cc <_rename_r+0x21c> /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 60216: 202e fff4 movel %fp@(-12),%d0 6021a: b0ae ffe0 cmpl %fp@(-32),%d0 6021e: 6660 bnes 60280 <_rename_r+0x1d0> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 60220: 2f2e fffc movel %fp@(-4),%sp@- rtems_filesystem_freenode( &new_parent_loc ); 60224: 49f9 0004 5d30 lea 45d30 ,%a4 rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 6022a: 206e fff0 moveal %fp@(-16),%a0 6022e: 2f0b movel %a3,%sp@- 60230: 2f03 movel %d3,%sp@- 60232: 2f0a movel %a2,%sp@- 60234: 2068 0040 moveal %a0@(64),%a0 60238: 4e90 jsr %a0@ 6023a: 2400 movel %d0,%d2 rtems_filesystem_freenode( &new_parent_loc ); 6023c: 2f0b movel %a3,%sp@- 6023e: 4e94 jsr %a4@ if ( free_old_parentloc ) 60240: 4fef 0014 lea %sp@(20),%sp 60244: 4a04 tstb %d4 60246: 662a bnes 60272 <_rename_r+0x1c2> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 60248: 2f03 movel %d3,%sp@- 6024a: 4e94 jsr %a4@ return result; 6024c: 588f addql #4,%sp } 6024e: 2002 movel %d2,%d0 60250: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 60256: 4e5e unlk %fp 60258: 4e75 rts result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 6025a: 2f0a movel %a2,%sp@- return -1; 6025c: 74ff moveq #-1,%d2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 6025e: 4eb9 0004 5d30 jsr 45d30 60264: 588f addql #4,%sp if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 60266: 2002 movel %d2,%d0 60268: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 6026e: 4e5e unlk %fp 60270: 4e75 rts result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 60272: 2f0a movel %a2,%sp@- 60274: 4e94 jsr %a4@ 60276: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 60278: 2f03 movel %d3,%sp@- 6027a: 4e94 jsr %a4@ return result; 6027c: 588f addql #4,%sp 6027e: 60ce bras 6024e <_rename_r+0x19e> * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 60280: 2f0b movel %a3,%sp@- 60282: 49f9 0004 5d30 lea 45d30 ,%a4 60288: 4e94 jsr %a4@ if ( free_old_parentloc ) 6028a: 588f addql #4,%sp 6028c: 4a04 tstb %d4 6028e: 6620 bnes 602b0 <_rename_r+0x200> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 60290: 2f03 movel %d3,%sp@- rtems_set_errno_and_return_minus_one( EXDEV ); 60292: 74ff moveq #-1,%d2 if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 60294: 4e94 jsr %a4@ rtems_set_errno_and_return_minus_one( EXDEV ); 60296: 4eb9 0005 24d4 jsr 524d4 <__errno> 6029c: 588f addql #4,%sp 6029e: 2040 moveal %d0,%a0 602a0: 7012 moveq #18,%d0 602a2: 2080 movel %d0,%a0@ if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 602a4: 2002 movel %d2,%d0 602a6: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 602ac: 4e5e unlk %fp 602ae: 4e75 rts */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 602b0: 2f0a movel %a2,%sp@- rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); 602b2: 74ff moveq #-1,%d2 */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 602b4: 4e94 jsr %a4@ 602b6: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 602b8: 2f03 movel %d3,%sp@- 602ba: 4e94 jsr %a4@ rtems_set_errno_and_return_minus_one( EXDEV ); 602bc: 4eb9 0005 24d4 jsr 524d4 <__errno> 602c2: 588f addql #4,%sp 602c4: 2040 moveal %d0,%a0 602c6: 7012 moveq #18,%d0 602c8: 2080 movel %d0,%a0@ 602ca: 60d8 bras 602a4 <_rename_r+0x1f4> rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 602cc: 2f0b movel %a3,%sp@- 602ce: 49f9 0004 5d30 lea 45d30 ,%a4 602d4: 4e94 jsr %a4@ if ( free_old_parentloc ) 602d6: 588f addql #4,%sp 602d8: 4a04 tstb %d4 602da: 6614 bnes 602f0 <_rename_r+0x240> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 602dc: 2f03 movel %d3,%sp@- return -1; 602de: 74ff moveq #-1,%d2 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 602e0: 4e94 jsr %a4@ return -1; 602e2: 588f addql #4,%sp if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 602e4: 2002 movel %d2,%d0 602e6: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 602ec: 4e5e unlk %fp 602ee: 4e75 rts result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 602f0: 2f0a movel %a2,%sp@- rtems_filesystem_freenode( &old_loc ); return -1; 602f2: 74ff moveq #-1,%d2 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 602f4: 4e94 jsr %a4@ 602f6: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 602f8: 2f03 movel %d3,%sp@- 602fa: 4e94 jsr %a4@ return -1; 602fc: 588f addql #4,%sp 602fe: 60e4 bras 602e4 <_rename_r+0x234> =============================================================================== 00045fe8 <_times>: #endif clock_t _times( struct tms *ptms ) { 45fe8: 4e56 ffdc linkw %fp,#-36 45fec: 48d7 041c moveml %d2-%d4/%a2,%sp@ 45ff0: 246e 0008 moveal %fp@(8),%a2 rtems_interval ticks; if ( !ptms ) 45ff4: 4a8a tstl %a2 45ff6: 6776 beqs 4606e <_times+0x86> <== NEVER TAKEN /* * This call does not depend on TOD being initialized and can't fail. */ ticks = rtems_clock_get_ticks_since_boot(); 45ff8: 4eb9 0004 648c jsr 4648c { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 45ffe: 2239 0005 f758 movel 5f758 ,%d1 46004: 243c 0000 03e8 movel #1000,%d2 TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 4600a: 486e fffc pea %fp@(-4) { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 4600e: 4c01 2800 mulsl %d1,%d2 46012: 283c 000f 4240 movel #1000000,%d4 46018: 4c44 1001 remul %d4,%d1,%d1 TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 4601c: 486e fff8 pea %fp@(-8) 46020: 486e fff0 pea %fp@(-16) 46024: 2079 0006 158a moveal 6158a <_Per_CPU_Information+0xc>,%a0 4602a: 41e8 0082 lea %a0@(130),%a0 { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 4602e: 2d41 fff0 movel %d1,%fp@(-16) 46032: 223c 3b9a ca00 movel #1000000000,%d1 46038: 4c41 2003 remul %d1,%d3,%d2 TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 4603c: 2d40 ffec movel %d0,%fp@(-20) { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 46040: 2d43 fff4 movel %d3,%fp@(-12) TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 46044: 2f08 movel %a0,%sp@- 46046: 4eb9 0004 9d1c jsr 49d1c <_Timespec_Divide> ptms->tms_utime = ticks; } #else ptms->tms_utime = _Thread_Executing->cpu_time_used; #endif ptms->tms_stime = ticks; 4604c: 202e ffec movel %fp@(-20),%d0 ptms->tms_cutime = 0; ptms->tms_cstime = 0; return ticks; 46050: 4fef 0010 lea %sp@(16),%sp &_Thread_Executing->cpu_time_used, &per_tick, &ticks, &fractional_ticks ); ptms->tms_utime = ticks; 46054: 24ae fff8 movel %fp@(-8),%a2@ } #else ptms->tms_utime = _Thread_Executing->cpu_time_used; #endif ptms->tms_stime = ticks; 46058: 2540 0004 movel %d0,%a2@(4) ptms->tms_cutime = 0; 4605c: 42aa 0008 clrl %a2@(8) ptms->tms_cstime = 0; 46060: 42aa 000c clrl %a2@(12) return ticks; } 46064: 4cee 041c ffdc moveml %fp@(-36),%d2-%d4/%a2 4606a: 4e5e unlk %fp 4606c: 4e75 rts ) { rtems_interval ticks; if ( !ptms ) rtems_set_errno_and_return_minus_one( EFAULT ); 4606e: 4eb9 0004 f18c jsr 4f18c <__errno> 46074: 720e moveq #14,%d1 46076: 2040 moveal %d0,%a0 46078: 70ff moveq #-1,%d0 ptms->tms_stime = ticks; ptms->tms_cutime = 0; ptms->tms_cstime = 0; return ticks; } 4607a: 4cee 041c ffdc moveml %fp@(-36),%d2-%d4/%a2 ) { rtems_interval ticks; if ( !ptms ) rtems_set_errno_and_return_minus_one( EFAULT ); 46080: 2081 movel %d1,%a0@ ptms->tms_stime = ticks; ptms->tms_cutime = 0; ptms->tms_cstime = 0; return ticks; } 46082: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047190 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 47190: 4e56 0000 linkw %fp,#0 return unlink( path ); 47194: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 4719a: 4e5e unlk %fp int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4719c: 4ef9 0004 6fc4 jmp 46fc4 ... =============================================================================== 0005cdfc <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5cdfc: 4e56 0000 linkw %fp,#0 5ce00: 222e 0010 movel %fp@(16),%d1 5ce04: 202e 000c movel %fp@(12),%d0 return write( fd, buf, nbytes ); 5ce08: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5ce0e: 2d41 000c movel %d1,%fp@(12) 5ce12: 2d40 0008 movel %d0,%fp@(8) } 5ce16: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 5ce18: 4ef9 0005 cf74 jmp 5cf74 ... =============================================================================== 000468c8 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 468c8: 4e56 ffec linkw %fp,#-20 468cc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 468d0: 246e 0008 moveal %fp@(8),%a2 468d4: 266e 000c moveal %fp@(12),%a3 long adjustment; /* * Simple validations */ if ( !delta ) 468d8: 4a8a tstl %a2 468da: 6700 00f2 beqw 469ce rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 468de: 202a 0004 movel %a2@(4),%d0 468e2: 0c80 000f 423f cmpil #999999,%d0 468e8: 6200 00e4 bhiw 469ce rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 468ec: 4a8b tstl %a3 468ee: 670a beqs 468fa olddelta->tv_sec = 0; olddelta->tv_usec = 0; 468f0: 42ab 0004 clrl %a3@(4) 468f4: 202a 0004 movel %a2@(4),%d0 if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; 468f8: 4293 clrl %a3@ olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 468fa: 223c 000f 4240 movel #1000000,%d1 46900: 4c12 1800 mulsl %a2@,%d1 adjustment += delta->tv_usec; 46904: d081 addl %d1,%d0 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 46906: b0b9 0006 0a98 cmpl 60a98 ,%d0 4690c: 640c bccs 4691a return 0; 4690e: 4280 clrl %d0 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 46910: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 46916: 4e5e unlk %fp 46918: 4e75 rts * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 4691a: 2039 0006 25a0 movel 625a0 <_Thread_Dispatch_disable_level>,%d0 46920: 5280 addql #1,%d0 46922: 23c0 0006 25a0 movel %d0,625a0 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 46928: 2039 0006 25a0 movel 625a0 <_Thread_Dispatch_disable_level>,%d0 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 4692e: 240e movel %fp,%d2 46930: 5182 subql #8,%d2 46932: 2f02 movel %d2,%sp@- 46934: 4eb9 0004 82f0 jsr 482f0 <_TOD_Get> ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 4693a: 202a 0004 movel %a2@(4),%d0 4693e: 223c 0000 03e8 movel #1000,%d1 46944: 4c01 0800 mulsl %d1,%d0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 46948: 588f addql #4,%sp _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 4694a: 2212 movel %a2@,%d1 ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 4694c: d0ae fffc addl %fp@(-4),%d0 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 46950: d3ae fff8 addl %d1,%fp@(-8) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 46954: 2d40 fffc movel %d0,%fp@(-4) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 46958: 0c80 3b9a c9ff cmpil #999999999,%d0 4695e: 631c blss 4697c 46960: 222e fff8 movel %fp@(-8),%d1 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; 46964: 5281 addql #1,%d1 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 46966: 0680 c465 3600 addil #-1000000000,%d0 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4696c: 0c80 3b9a c9ff cmpil #999999999,%d0 46972: 62f0 bhis 46964 <== NEVER TAKEN 46974: 2d40 fffc movel %d0,%fp@(-4) 46978: 2d41 fff8 movel %d1,%fp@(-8) ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 4697c: 0c80 c465 3600 cmpil #-1000000000,%d0 46982: 621c bhis 469a0 <== NEVER TAKEN 46984: 222e fff8 movel %fp@(-8),%d1 ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; 46988: 5381 subql #1,%d1 ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 4698a: 0680 3b9a ca00 addil #1000000000,%d0 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 46990: 0c80 c465 3600 cmpil #-1000000000,%d0 46996: 63f0 blss 46988 46998: 2d40 fffc movel %d0,%fp@(-4) 4699c: 2d41 fff8 movel %d1,%fp@(-8) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 469a0: 2f02 movel %d2,%sp@- 469a2: 4eb9 0004 8384 jsr 48384 <_TOD_Set> _Thread_Enable_dispatch(); 469a8: 4eb9 0004 9b28 jsr 49b28 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 469ae: 588f addql #4,%sp *olddelta = *delta; return 0; 469b0: 4280 clrl %d0 _TOD_Set( &ts ); _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) 469b2: 4a8b tstl %a3 469b4: 6700 ff5a beqw 46910 *olddelta = *delta; 469b8: 2212 movel %a2@,%d1 469ba: 242a 0004 movel %a2@(4),%d2 469be: 2681 movel %d1,%a3@ 469c0: 2742 0004 movel %d2,%a3@(4) return 0; } 469c4: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 469ca: 4e5e unlk %fp 469cc: 4e75 rts */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 469ce: 4eb9 0004 fae0 jsr 4fae0 <__errno> 469d4: 7216 moveq #22,%d1 469d6: 2040 moveal %d0,%a0 469d8: 70ff moveq #-1,%d0 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 469da: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 469e0: 2081 movel %d1,%a0@ /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 469e2: 4e5e unlk %fp ... =============================================================================== 0004714c : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 4714c: 4e56 ffe8 linkw %fp,#-24 47150: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 47154: 4879 0006 3de8 pea 63de8 4715a: 49f9 0004 8510 lea 48510 ,%a4 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 47160: 242e 0008 movel %fp@(8),%d2 47164: 246e 000c moveal %fp@(12),%a2 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 47168: 4e94 jsr %a4@ if (fcntl (fildes, F_GETFD) < 0) { 4716a: 4878 0001 pea 1 4716e: 2f02 movel %d2,%sp@- 47170: 4eb9 0004 e65c jsr 4e65c 47176: 4fef 000c lea %sp@(12),%sp 4717a: 4a80 tstl %d0 4717c: 6d00 01c4 bltw 47342 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) { 47180: 4a8a tstl %a2 47182: 6700 00f4 beqw 47278 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { 47186: 2612 movel %a2@,%d3 47188: b483 cmpl %d3,%d2 4718a: 6600 00c4 bnew 47250 pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 4718e: 42a7 clrl %sp@- 47190: 4bf9 0004 75c2 lea 475c2 ,%a5 47196: 2f03 movel %d3,%sp@- 47198: 4879 0006 3e30 pea 63e30 4719e: 4e95 jsr %a5@ if (r_chain == NULL) { 471a0: 4fef 000c lea %sp@(12),%sp if (aiocbp->aio_fildes != fildes) { pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 471a4: 2640 moveal %d0,%a3 if (r_chain == NULL) { 471a6: 4a80 tstl %d0 471a8: 673c beqs 471e6 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 471aa: 2600 movel %d0,%d3 471ac: 0683 0000 001c addil #28,%d3 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); pthread_mutex_unlock (&r_chain->mutex); 471b2: 4bf9 0004 85ac lea 485ac ,%a5 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 471b8: 2f03 movel %d3,%sp@- 471ba: 4e94 jsr %a4@ result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 471bc: 2f0a movel %a2,%sp@- 471be: 486b 0008 pea %a3@(8) 471c2: 4eb9 0004 7a3a jsr 47a3a 471c8: 2400 movel %d0,%d2 pthread_mutex_unlock (&r_chain->mutex); 471ca: 2f03 movel %d3,%sp@- 471cc: 4e95 jsr %a5@ pthread_mutex_unlock (&aio_request_queue.mutex); 471ce: 4879 0006 3de8 pea 63de8 471d4: 4e95 jsr %a5@ return result; 471d6: 4fef 0014 lea %sp@(20),%sp } return AIO_ALLDONE; } 471da: 2002 movel %d2,%d0 471dc: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 471e2: 4e5e unlk %fp 471e4: 4e75 rts rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 471e6: 203c 0006 3e40 movel #409152,%d0 471ec: b0b9 0006 3e3c cmpl 63e3c ,%d0 471f2: 6740 beqs 47234 <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 471f4: 42a7 clrl %sp@- 471f6: 2f03 movel %d3,%sp@- 471f8: 4879 0006 3e3c pea 63e3c 471fe: 4e95 jsr %a5@ if (r_chain == NULL) { 47200: 4fef 000c lea %sp@(12),%sp 47204: 4a80 tstl %d0 47206: 6748 beqs 47250 rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 47208: 2f0a movel %a2,%sp@- 4720a: 2040 moveal %d0,%a0 4720c: 4868 0008 pea %a0@(8) 47210: 4eb9 0004 7a3a jsr 47a3a pthread_mutex_unlock (&aio_request_queue.mutex); 47216: 4879 0006 3de8 pea 63de8 rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 4721c: 2400 movel %d0,%d2 pthread_mutex_unlock (&aio_request_queue.mutex); 4721e: 4eb9 0004 85ac jsr 485ac return result; 47224: 4fef 000c lea %sp@(12),%sp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 47228: 2002 movel %d2,%d0 4722a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 47230: 4e5e unlk %fp 47232: 4e75 rts result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } else { pthread_mutex_unlock (&aio_request_queue.mutex); 47234: 4879 0006 3de8 pea 63de8 return AIO_ALLDONE; 4723a: 7402 moveq #2,%d2 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } else { pthread_mutex_unlock (&aio_request_queue.mutex); 4723c: 4eb9 0004 85ac jsr 485ac return AIO_ALLDONE; 47242: 588f addql #4,%sp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 47244: 2002 movel %d2,%d0 47246: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4724c: 4e5e unlk %fp 4724e: 4e75 rts r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); 47250: 4879 0006 3de8 pea 63de8 rtems_set_errno_and_return_minus_one (EINVAL); 47256: 74ff moveq #-1,%d2 r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); 47258: 4eb9 0004 85ac jsr 485ac rtems_set_errno_and_return_minus_one (EINVAL); 4725e: 4eb9 0005 1b40 jsr 51b40 <__errno> 47264: 588f addql #4,%sp 47266: 2040 moveal %d0,%a0 47268: 7016 moveq #22,%d0 4726a: 2080 movel %d0,%a0@ pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 4726c: 2002 movel %d2,%d0 4726e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 47274: 4e5e unlk %fp 47276: 4e75 rts /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 47278: 42a7 clrl %sp@- 4727a: 45f9 0004 75c2 lea 475c2 ,%a2 47280: 2f02 movel %d2,%sp@- 47282: 4879 0006 3e30 pea 63e30 47288: 4e92 jsr %a2@ if (r_chain == NULL) { 4728a: 4fef 000c lea %sp@(12),%sp /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 4728e: 2600 movel %d0,%d3 if (r_chain == NULL) { 47290: 673e beqs 472d0 <== NEVER TAKEN return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 47292: 2640 moveal %d0,%a3 47294: 47eb 001c lea %a3@(28),%a3 rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_unlock (&r_chain->mutex); 47298: 45f9 0004 85ac lea 485ac ,%a2 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; 4729e: 4282 clrl %d2 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 472a0: 2f0b movel %a3,%sp@- 472a2: 4e94 jsr %a4@ */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 472a4: 2f03 movel %d3,%sp@- 472a6: 4eb9 0004 a0c0 jsr 4a0c0 <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 472ac: 2f03 movel %d3,%sp@- 472ae: 4eb9 0004 79e2 jsr 479e2 pthread_mutex_unlock (&r_chain->mutex); 472b4: 2f0b movel %a3,%sp@- 472b6: 4e92 jsr %a2@ pthread_mutex_unlock (&aio_request_queue.mutex); 472b8: 4879 0006 3de8 pea 63de8 472be: 4e92 jsr %a2@ return AIO_CANCELED; 472c0: 4fef 0014 lea %sp@(20),%sp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 472c4: 2002 movel %d2,%d0 472c6: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 472cc: 4e5e unlk %fp 472ce: 4e75 rts r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 472d0: 203c 0006 3e40 movel #409152,%d0 472d6: b0b9 0006 3e3c cmpl 63e3c ,%d0 472dc: 6700 ff56 beqw 47234 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 472e0: 42a7 clrl %sp@- 472e2: 2f02 movel %d2,%sp@- 472e4: 4879 0006 3e3c pea 63e3c 472ea: 4e92 jsr %a2@ if (r_chain == NULL) { 472ec: 4fef 000c lea %sp@(12),%sp r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 472f0: 2600 movel %d0,%d3 if (r_chain == NULL) { 472f2: 6700 ff40 beqw 47234 472f6: 2f00 movel %d0,%sp@- AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); 472f8: 2440 moveal %d0,%a2 472fa: 45ea 001c lea %a2@(28),%a2 pthread_cond_destroy (&r_chain->mutex); free (r_chain); pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; 472fe: 4282 clrl %d2 47300: 4eb9 0004 a0c0 jsr 4a0c0 <_Chain_Extract> } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 47306: 2f03 movel %d3,%sp@- 47308: 4eb9 0004 79e2 jsr 479e2 pthread_mutex_destroy (&r_chain->mutex); 4730e: 2f0a movel %a2,%sp@- 47310: 4eb9 0004 8264 jsr 48264 pthread_cond_destroy (&r_chain->mutex); 47316: 2f0a movel %a2,%sp@- 47318: 4eb9 0004 7ee4 jsr 47ee4 free (r_chain); 4731e: 2f03 movel %d3,%sp@- 47320: 4eb9 0004 3c9c jsr 43c9c pthread_mutex_unlock (&aio_request_queue.mutex); 47326: 4879 0006 3de8 pea 63de8 4732c: 4eb9 0004 85ac jsr 485ac return AIO_CANCELED; 47332: 4fef 0018 lea %sp@(24),%sp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 47336: 2002 movel %d2,%d0 47338: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4733e: 4e5e unlk %fp 47340: 4e75 rts int result; pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); 47342: 4879 0006 3de8 pea 63de8 rtems_set_errno_and_return_minus_one (EBADF); 47348: 74ff moveq #-1,%d2 int result; pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); 4734a: 4eb9 0004 85ac jsr 485ac rtems_set_errno_and_return_minus_one (EBADF); 47350: 4eb9 0005 1b40 jsr 51b40 <__errno> 47356: 588f addql #4,%sp 47358: 7209 moveq #9,%d1 4735a: 2040 moveal %d0,%a0 pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 4735c: 2002 movel %d2,%d0 4735e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EBADF); 47364: 2081 movel %d1,%a0@ pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 47366: 4e5e unlk %fp ... =============================================================================== 0004737c : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 4737c: 203c 0000 2000 movel #8192,%d0 int aio_fsync( int op, struct aiocb *aiocbp ) { 47382: 4e56 0000 linkw %fp,#0 47386: 2f0a movel %a2,%sp@- 47388: 246e 000c moveal %fp@(12),%a2 rtems_aio_request *req; int mode; if (op != O_SYNC) 4738c: b0ae 0008 cmpl %fp@(8),%d0 47390: 6648 bnes 473da rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 47392: 4878 0003 pea 3 47396: 2f12 movel %a2@,%sp@- 47398: 4eb9 0004 e65c jsr 4e65c if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 4739e: 508f addql #8,%sp 473a0: 7203 moveq #3,%d1 473a2: c081 andl %d1,%d0 473a4: 123c 0001 moveb #1,%d1 473a8: 5380 subql #1,%d0 473aa: b280 cmpl %d0,%d1 473ac: 654e bcss 473fc rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 473ae: 4878 0018 pea 18 473b2: 4eb9 0004 42ac jsr 442ac if (req == NULL) 473b8: 588f addql #4,%sp 473ba: 4a80 tstl %d0 473bc: 6760 beqs 4741e <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 473be: 2040 moveal %d0,%a0 req->aiocbp->aio_lio_opcode = LIO_SYNC; 473c0: 7203 moveq #3,%d1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 473c2: 214a 0014 movel %a2,%a0@(20) req->aiocbp->aio_lio_opcode = LIO_SYNC; 473c6: 2541 002c movel %d1,%a2@(44) return rtems_aio_enqueue (req); } 473ca: 246e fffc moveal %fp@(-4),%a2 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 473ce: 2d40 0008 movel %d0,%fp@(8) } 473d2: 4e5e unlk %fp rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 473d4: 4ef9 0004 7a9e jmp 47a9e { rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 473da: 7216 moveq #22,%d1 473dc: 70ff moveq #-1,%d0 473de: 2541 0030 movel %d1,%a2@(48) 473e2: 2540 0034 movel %d0,%a2@(52) 473e6: 4eb9 0005 1b40 jsr 51b40 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 473ec: 246e fffc moveal %fp@(-4),%a2 { rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 473f0: 2040 moveal %d0,%a0 473f2: 7016 moveq #22,%d0 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 473f4: 4e5e unlk %fp { rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 473f6: 2080 movel %d0,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 473f8: 70ff moveq #-1,%d0 473fa: 4e75 rts if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 473fc: 72ff moveq #-1,%d1 473fe: 7009 moveq #9,%d0 47400: 2541 0034 movel %d1,%a2@(52) 47404: 2540 0030 movel %d0,%a2@(48) 47408: 4eb9 0005 1b40 jsr 51b40 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4740e: 246e fffc moveal %fp@(-4),%a2 if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47412: 2040 moveal %d0,%a0 47414: 7209 moveq #9,%d1 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 47416: 70ff moveq #-1,%d0 47418: 4e5e unlk %fp if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 4741a: 2081 movel %d1,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4741c: 4e75 rts if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 4741e: 103c 000b moveb #11,%d0 <== NOT EXECUTED 47422: 72ff moveq #-1,%d1 <== NOT EXECUTED 47424: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 47428: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 4742c: 4eb9 0005 1b40 jsr 51b40 <__errno> <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 47432: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47436: 2040 moveal %d0,%a0 <== NOT EXECUTED 47438: 700b moveq #11,%d0 <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4743a: 4e5e unlk %fp <== NOT EXECUTED if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 4743c: 2080 movel %d0,%a0@ <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4743e: 70ff moveq #-1,%d0 <== NOT EXECUTED ... =============================================================================== 00047cc4 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 47cc4: 4e56 0000 linkw %fp,#0 47cc8: 2f0a movel %a2,%sp@- rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 47cca: 4878 0003 pea 3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 47cce: 246e 0008 moveal %fp@(8),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 47cd2: 2f12 movel %a2@,%sp@- 47cd4: 4eb9 0004 e65c jsr 4e65c if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 47cda: 508f addql #8,%sp 47cdc: 7203 moveq #3,%d1 47cde: c081 andl %d1,%d0 47ce0: 6708 beqs 47cea <== NEVER TAKEN 47ce2: 123c 0002 moveb #2,%d1 47ce6: b280 cmpl %d0,%d1 47ce8: 6638 bnes 47d22 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 47cea: 4aaa 0014 tstl %a2@(20) 47cee: 6654 bnes 47d44 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 47cf0: 4aaa 0004 tstl %a2@(4) 47cf4: 6b4e bmis 47d44 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 47cf6: 4878 0018 pea 18 47cfa: 4eb9 0004 42ac jsr 442ac if (req == NULL) 47d00: 588f addql #4,%sp 47d02: 4a80 tstl %d0 47d04: 6760 beqs 47d66 <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 47d06: 2040 moveal %d0,%a0 req->aiocbp->aio_lio_opcode = LIO_READ; 47d08: 7201 moveq #1,%d1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 47d0a: 214a 0014 movel %a2,%a0@(20) req->aiocbp->aio_lio_opcode = LIO_READ; 47d0e: 2541 002c movel %d1,%a2@(44) return rtems_aio_enqueue (req); } 47d12: 246e fffc moveal %fp@(-4),%a2 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); 47d16: 2d40 0008 movel %d0,%fp@(8) } 47d1a: 4e5e unlk %fp rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); 47d1c: 4ef9 0004 7a9e jmp 47a9e rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47d22: 7009 moveq #9,%d0 47d24: 72ff moveq #-1,%d1 47d26: 2540 0030 movel %d0,%a2@(48) 47d2a: 2541 0034 movel %d1,%a2@(52) 47d2e: 4eb9 0005 1b40 jsr 51b40 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47d34: 246e fffc moveal %fp@(-4),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47d38: 2040 moveal %d0,%a0 47d3a: 7009 moveq #9,%d0 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47d3c: 4e5e unlk %fp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47d3e: 2080 movel %d0,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47d40: 70ff moveq #-1,%d0 47d42: 4e75 rts if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47d44: 72ff moveq #-1,%d1 47d46: 7016 moveq #22,%d0 47d48: 2541 0034 movel %d1,%a2@(52) 47d4c: 2540 0030 movel %d0,%a2@(48) 47d50: 4eb9 0005 1b40 jsr 51b40 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47d56: 246e fffc moveal %fp@(-4),%a2 if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47d5a: 2040 moveal %d0,%a0 47d5c: 7216 moveq #22,%d1 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47d5e: 70ff moveq #-1,%d0 47d60: 4e5e unlk %fp if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47d62: 2081 movel %d1,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47d64: 4e75 rts if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47d66: 103c 000b moveb #11,%d0 <== NOT EXECUTED 47d6a: 72ff moveq #-1,%d1 <== NOT EXECUTED 47d6c: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 47d70: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 47d74: 4eb9 0005 1b40 jsr 51b40 <__errno> <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47d7a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47d7e: 2040 moveal %d0,%a0 <== NOT EXECUTED 47d80: 700b moveq #11,%d0 <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47d82: 4e5e unlk %fp <== NOT EXECUTED if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47d84: 2080 movel %d0,%a0@ <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47d86: 70ff moveq #-1,%d0 <== NOT EXECUTED ... =============================================================================== 00047d9c : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 47d9c: 4e56 0000 linkw %fp,#0 47da0: 2f0a movel %a2,%sp@- rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 47da2: 4878 0003 pea 3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 47da6: 246e 0008 moveal %fp@(8),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 47daa: 2f12 movel %a2@,%sp@- 47dac: 4eb9 0004 e65c jsr 4e65c if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 47db2: 508f addql #8,%sp 47db4: 7203 moveq #3,%d1 47db6: c081 andl %d1,%d0 47db8: 123c 0001 moveb #1,%d1 47dbc: 5380 subql #1,%d0 47dbe: b280 cmpl %d0,%d1 47dc0: 6538 bcss 47dfa rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 47dc2: 4aaa 0014 tstl %a2@(20) 47dc6: 6654 bnes 47e1c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 47dc8: 4aaa 0004 tstl %a2@(4) 47dcc: 6b4e bmis 47e1c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 47dce: 4878 0018 pea 18 47dd2: 4eb9 0004 42ac jsr 442ac if (req == NULL) 47dd8: 588f addql #4,%sp 47dda: 4a80 tstl %d0 47ddc: 6760 beqs 47e3e <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 47dde: 2040 moveal %d0,%a0 req->aiocbp->aio_lio_opcode = LIO_WRITE; 47de0: 7202 moveq #2,%d1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 47de2: 214a 0014 movel %a2,%a0@(20) req->aiocbp->aio_lio_opcode = LIO_WRITE; 47de6: 2541 002c movel %d1,%a2@(44) return rtems_aio_enqueue (req); } 47dea: 246e fffc moveal %fp@(-4),%a2 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); 47dee: 2d40 0008 movel %d0,%fp@(8) } 47df2: 4e5e unlk %fp rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); 47df4: 4ef9 0004 7a9e jmp 47a9e rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47dfa: 7009 moveq #9,%d0 47dfc: 72ff moveq #-1,%d1 47dfe: 2540 0030 movel %d0,%a2@(48) 47e02: 2541 0034 movel %d1,%a2@(52) 47e06: 4eb9 0005 1b40 jsr 51b40 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47e0c: 246e fffc moveal %fp@(-4),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47e10: 2040 moveal %d0,%a0 47e12: 7009 moveq #9,%d0 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47e14: 4e5e unlk %fp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47e16: 2080 movel %d0,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47e18: 70ff moveq #-1,%d0 47e1a: 4e75 rts if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47e1c: 72ff moveq #-1,%d1 47e1e: 7016 moveq #22,%d0 47e20: 2541 0034 movel %d1,%a2@(52) 47e24: 2540 0030 movel %d0,%a2@(48) 47e28: 4eb9 0005 1b40 jsr 51b40 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47e2e: 246e fffc moveal %fp@(-4),%a2 if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47e32: 2040 moveal %d0,%a0 47e34: 7216 moveq #22,%d1 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47e36: 70ff moveq #-1,%d0 47e38: 4e5e unlk %fp if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47e3a: 2081 movel %d1,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47e3c: 4e75 rts if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47e3e: 103c 000b moveb #11,%d0 <== NOT EXECUTED 47e42: 72ff moveq #-1,%d1 <== NOT EXECUTED 47e44: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 47e48: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 47e4c: 4eb9 0005 1b40 jsr 51b40 <__errno> <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47e52: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47e56: 2040 moveal %d0,%a0 <== NOT EXECUTED 47e58: 700b moveq #11,%d0 <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47e5a: 4e5e unlk %fp <== NOT EXECUTED if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47e5c: 2080 movel %d0,%a0@ <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47e5e: 70ff moveq #-1,%d0 <== NOT EXECUTED ... =============================================================================== 00048828 : } unsigned int alarm( unsigned int seconds ) { 48828: 4e56 fff4 linkw %fp,#-12 4882c: 48d7 001c moveml %d2-%d4,%sp@ 48830: 242e 0008 movel %fp@(8),%d2 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 48834: 4ab9 0006 5bcc tstl 65bcc <_POSIX_signals_Alarm_timer+0x1c> 4883a: 674e beqs 4888a _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 4883c: 4879 0006 5bb0 pea 65bb0 <_POSIX_signals_Alarm_timer> 48842: 4eb9 0004 d99c jsr 4d99c <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 48848: 588f addql #4,%sp 4884a: 7201 moveq #1,%d1 4884c: 5580 subql #2,%d0 4884e: b280 cmpl %d0,%d1 48850: 645e bccs 488b0 unsigned int alarm( unsigned int seconds ) { unsigned int remaining = 0; 48852: 4283 clrl %d3 remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 48854: 4a82 tstl %d2 48856: 660c bnes 48864 <== NEVER TAKEN _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 48858: 2003 movel %d3,%d0 4885a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 48860: 4e5e unlk %fp 48862: 4e75 rts ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 48864: 4879 0006 5bb0 pea 65bb0 <_POSIX_signals_Alarm_timer> 4886a: 4879 0006 5eec pea 65eec <_Watchdog_Seconds_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 48870: 23c2 0006 5bbc movel %d2,65bbc <_POSIX_signals_Alarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 48876: 4eb9 0004 d854 jsr 4d854 <_Watchdog_Insert> 4887c: 508f addql #8,%sp 4887e: 2003 movel %d3,%d0 48880: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 48886: 4e5e unlk %fp 48888: 4e75 rts Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4888a: 42b9 0006 5bb8 clrl 65bb8 <_POSIX_signals_Alarm_timer+0x8> unsigned int alarm( unsigned int seconds ) { unsigned int remaining = 0; 48890: 4283 clrl %d3 the_watchdog->routine = routine; 48892: 203c 0004 880c movel #296972,%d0 the_watchdog->id = id; 48898: 42b9 0006 5bd0 clrl 65bd0 <_POSIX_signals_Alarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4889e: 23c0 0006 5bcc movel %d0,65bcc <_POSIX_signals_Alarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 488a4: 42b9 0006 5bd4 clrl 65bd4 <_POSIX_signals_Alarm_timer+0x24> remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 488aa: 4a82 tstl %d2 488ac: 67aa beqs 48858 <== NEVER TAKEN 488ae: 60b4 bras 48864 * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 488b0: 2839 0006 5bc8 movel 65bc8 <_POSIX_signals_Alarm_timer+0x18>,%d4 488b6: 98b9 0006 5bc4 subl 65bc4 <_POSIX_signals_Alarm_timer+0x14>,%d4 * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 488bc: 2639 0006 5bbc movel 65bbc <_POSIX_signals_Alarm_timer+0xc>,%d3 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 488c2: 4eb9 0004 b248 jsr 4b248 488c8: 4c40 4004 remul %d0,%d4,%d4 * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 488cc: 9684 subl %d4,%d3 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 488ce: 4a82 tstl %d2 488d0: 6786 beqs 48858 <== NEVER TAKEN 488d2: 6090 bras 48864 =============================================================================== 00045224 : int chmod( const char *path, mode_t mode ) { 45224: 4e56 ffe8 linkw %fp,#-24 45228: 2f03 movel %d3,%sp@- 4522a: 262e 0008 movel %fp@(8),%d3 4522e: 2f02 movel %d2,%sp@- int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 45230: 240e movel %fp,%d2 45232: 0682 ffff ffec addil #-20,%d2 45238: 2f03 movel %d3,%sp@- 4523a: 4eb9 0005 371c jsr 5371c 45240: 7201 moveq #1,%d1 45242: 2e81 movel %d1,%sp@ 45244: 2f02 movel %d2,%sp@- 45246: 42a7 clrl %sp@- 45248: 2f00 movel %d0,%sp@- 4524a: 2f03 movel %d3,%sp@- 4524c: 4eb9 0004 5774 jsr 45774 if ( status != 0 ) 45252: 4fef 0014 lea %sp@(20),%sp 45256: 4a80 tstl %d0 45258: 6630 bnes 4528a <== NEVER TAKEN return -1; result = (*loc.handlers->fchmod_h)( &loc, mode ); 4525a: 2f2e 000c movel %fp@(12),%sp@- 4525e: 206e fff4 moveal %fp@(-12),%a0 45262: 2f02 movel %d2,%sp@- 45264: 2068 001c moveal %a0@(28),%a0 45268: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4526a: 2f02 movel %d2,%sp@- 4526c: 2d40 ffe8 movel %d0,%fp@(-24) 45270: 4eb9 0004 5984 jsr 45984 return result; 45276: 202e ffe8 movel %fp@(-24),%d0 4527a: 4fef 000c lea %sp@(12),%sp } 4527e: 242e ffe0 movel %fp@(-32),%d2 45282: 262e ffe4 movel %fp@(-28),%d3 45286: 4e5e unlk %fp 45288: 4e75 rts 4528a: 242e ffe0 movel %fp@(-32),%d2 rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; 4528e: 70ff moveq #-1,%d0 result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 45290: 262e ffe4 movel %fp@(-28),%d3 45294: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000456e8 : #include int chroot( const char *pathname ) { 456e8: 4e56 ffec linkw %fp,#-20 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 456ec: 203c 0006 47e4 movel #411620,%d0 #include int chroot( const char *pathname ) { 456f2: 2f0b movel %a3,%sp@- 456f4: 2f0a movel %a2,%sp@- int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 456f6: b0b9 0006 3170 cmpl 63170 ,%d0 456fc: 6778 beqs 45776 rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 456fe: 2f2e 0008 movel %fp@(8),%sp@- 45702: 4eb9 0004 5614 jsr 45614 if (result) { 45708: 588f addql #4,%sp 4570a: 4a80 tstl %d0 4570c: 6600 009a bnew 457a8 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 45710: 42a7 clrl %sp@- 45712: 45ee ffec lea %fp@(-20),%a2 45716: 2f0a movel %a2,%sp@- 45718: 42a7 clrl %sp@- 4571a: 4878 0001 pea 1 4571e: 4879 0006 0f85 pea 60f85 <_rodata_start+0x1b5> 45724: 4eb9 0004 5b20 jsr 45b20 4572a: 4fef 0014 lea %sp@(20),%sp 4572e: 4a80 tstl %d0 45730: 6676 bnes 457a8 <== NEVER TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 45732: 2079 0006 3170 moveal 63170 ,%a0 45738: 41e8 0018 lea %a0@(24),%a0 4573c: 2f08 movel %a0,%sp@- 4573e: 4eb9 0004 5d30 jsr 45d30 rtems_filesystem_root = loc; 45744: 2079 0006 3170 moveal 63170 ,%a0 return 0; 4574a: 588f addql #4,%sp 4574c: 4280 clrl %d0 if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; 4574e: 2152 0018 movel %a2@,%a0@(24) 45752: 216e fff0 001c movel %fp@(-16),%a0@(28) 45758: 216e fff4 0020 movel %fp@(-12),%a0@(32) 4575e: 216e fff8 0024 movel %fp@(-8),%a0@(36) 45764: 216e fffc 0028 movel %fp@(-4),%a0@(40) return 0; } 4576a: 246e ffe4 moveal %fp@(-28),%a2 4576e: 266e ffe8 moveal %fp@(-24),%a3 45772: 4e5e unlk %fp 45774: 4e75 rts int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 45776: 4eb9 0004 70a8 jsr 470a8 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 4577c: 41f9 0006 47e4 lea 647e4 ,%a0 45782: b1f9 0006 3170 cmpal 63170 ,%a0 45788: 6600 ff74 bnew 456fe rtems_set_errno_and_return_minus_one( ENOTSUP ); 4578c: 4eb9 0005 24d4 jsr 524d4 <__errno> } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 45792: 246e ffe4 moveal %fp@(-28),%a2 /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); 45796: 2040 moveal %d0,%a0 45798: 70ff moveq #-1,%d0 } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 4579a: 266e ffe8 moveal %fp@(-24),%a3 4579e: 4e5e unlk %fp /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); 457a0: 20bc 0000 0086 movel #134,%a0@ } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 457a6: 4e75 rts } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 457a8: 45f9 0005 24d4 lea 524d4 <__errno>,%a2 457ae: 4e92 jsr %a2@ 457b0: 2640 moveal %d0,%a3 457b2: 4e92 jsr %a2@ } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 457b4: 246e ffe4 moveal %fp@(-28),%a2 } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 457b8: 2040 moveal %d0,%a0 457ba: 70ff moveq #-1,%d0 457bc: 2690 movel %a0@,%a3@ } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 457be: 266e ffe8 moveal %fp@(-24),%a3 457c2: 4e5e unlk %fp ... =============================================================================== 0004671c : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 4671c: 4e56 0000 linkw %fp,#0 46720: 202e 0008 movel %fp@(8),%d0 46724: 222e 000c movel %fp@(12),%d1 46728: 2f02 movel %d2,%sp@- if ( !tp ) 4672a: 4a81 tstl %d1 4672c: 6718 beqs 46746 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 4672e: 7401 moveq #1,%d2 46730: b480 cmpl %d0,%d2 46732: 6752 beqs 46786 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 46734: 7404 moveq #4,%d2 46736: b480 cmpl %d0,%d2 46738: 6738 beqs 46772 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 4673a: 7402 moveq #2,%d2 4673c: b480 cmpl %d0,%d2 4673e: 6732 beqs 46772 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 46740: 7203 moveq #3,%d1 46742: b280 cmpl %d0,%d1 46744: 6716 beqs 4675c rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 46746: 4eb9 0004 ffa8 jsr 4ffa8 <__errno> return 0; } 4674c: 242e fffc movel %fp@(-4),%d2 #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 46750: 2040 moveal %d0,%a0 46752: 7216 moveq #22,%d1 46754: 70ff moveq #-1,%d0 return 0; } 46756: 4e5e unlk %fp #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 46758: 2081 movel %d1,%a0@ return 0; } 4675a: 4e75 rts } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); 4675c: 4eb9 0004 ffa8 jsr 4ffa8 <__errno> 46762: 7458 moveq #88,%d2 46764: 2040 moveal %d0,%a0 46766: 70ff moveq #-1,%d0 46768: 2082 movel %d2,%a0@ #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 4676a: 242e fffc movel %fp@(-4),%d2 4676e: 4e5e unlk %fp 46770: 4e75 rts } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { _TOD_Get_uptime_as_timespec( tp ); 46772: 2f01 movel %d1,%sp@- 46774: 4eb9 0004 8824 jsr 48824 <_TOD_Get_uptime_as_timespec> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 4677a: 242e fffc movel %fp@(-4),%d2 #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { _TOD_Get_uptime_as_timespec( tp ); return 0; 4677e: 588f addql #4,%sp 46780: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 46782: 4e5e unlk %fp 46784: 4e75 rts { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 46786: 2f01 movel %d1,%sp@- 46788: 4eb9 0004 87c0 jsr 487c0 <_TOD_Get> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 4678e: 242e fffc movel %fp@(-4),%d2 if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); return 0; 46792: 588f addql #4,%sp 46794: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 46796: 4e5e unlk %fp ... =============================================================================== 0004679c : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 4679c: 4e56 0000 linkw %fp,#0 467a0: 202e 0008 movel %fp@(8),%d0 467a4: 206e 000c moveal %fp@(12),%a0 if ( !tp ) 467a8: 4a88 tstl %a0 467aa: 6712 beqs 467be <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 467ac: 7201 moveq #1,%d1 467ae: b280 cmpl %d0,%d1 467b0: 6730 beqs 467e2 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 467b2: 7202 moveq #2,%d1 467b4: b280 cmpl %d0,%d1 467b6: 6718 beqs 467d0 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 467b8: 7203 moveq #3,%d1 467ba: b280 cmpl %d0,%d1 467bc: 6712 beqs 467d0 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 467be: 4eb9 0004 ffa8 jsr 4ffa8 <__errno> 467c4: 7216 moveq #22,%d1 467c6: 2040 moveal %d0,%a0 467c8: 70ff moveq #-1,%d0 return 0; } 467ca: 4e5e unlk %fp #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 467cc: 2081 movel %d1,%a0@ return 0; } 467ce: 4e75 rts else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); 467d0: 4eb9 0004 ffa8 jsr 4ffa8 <__errno> 467d6: 7258 moveq #88,%d1 467d8: 2040 moveal %d0,%a0 467da: 70ff moveq #-1,%d0 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 467dc: 4e5e unlk %fp else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); 467de: 2081 movel %d1,%a0@ #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 467e0: 4e75 rts { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 467e2: 203c 21da e4ff movel #567993599,%d0 467e8: b090 cmpl %a0@,%d0 467ea: 64d2 bccs 467be * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 467ec: 2039 0006 2c58 movel 62c58 <_Thread_Dispatch_disable_level>,%d0 467f2: 5280 addql #1,%d0 467f4: 23c0 0006 2c58 movel %d0,62c58 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 467fa: 2039 0006 2c58 movel 62c58 <_Thread_Dispatch_disable_level>,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 46800: 2f08 movel %a0,%sp@- 46802: 4eb9 0004 887c jsr 4887c <_TOD_Set> _Thread_Enable_dispatch(); 46808: 4eb9 0004 a020 jsr 4a020 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 4680e: 588f addql #4,%sp 46810: 4280 clrl %d0 } 46812: 4e5e unlk %fp ... =============================================================================== 00042dfc : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 42dfc: 4e56 ffe0 linkw %fp,#-32 42e00: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@ 42e04: 242e 0008 movel %fp@(8),%d2 42e08: 262e 000c movel %fp@(12),%d3 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 42e0c: 2c39 0006 44fa movel 644fa ,%d6 ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 42e12: 2802 movel %d2,%d4 ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.minor; 42e14: 2a03 movel %d3,%d5 42e16: bc84 cmpl %d4,%d6 42e18: 6300 008e blsw 42ea8 42e1c: 2479 0006 44fe moveal 644fe ,%a2 memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 42e22: e78c lsll #3,%d4 42e24: 47f2 4800 lea %a2@(00000000,%d4:l),%a3 42e28: 2453 moveal %a3@,%a2 42e2a: 282b 0004 movel %a3@(4),%d4 42e2e: 4a8a tstl %a2 42e30: 671e beqs 42e50 42e32: b885 cmpl %d5,%d4 42e34: 631a blss 42e50 <== NEVER TAKEN memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; disktab [major].size = new_size; } return disktab [major].minor + minor; 42e36: 45f2 5c00 lea %a2@(00000000,%d5:l:4),%a2 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 42e3a: 4a8a tstl %a2 42e3c: 675e beqs 42e9c <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 42e3e: 4a92 tstl %a2@ 42e40: 6700 00c0 beqw 42f02 return RTEMS_RESOURCE_IN_USE; 42e44: 700c moveq #12,%d0 *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 42e46: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 42e4c: 4e5e unlk %fp 42e4e: 4e75 rts if (disktab [major].minor == NULL || minor >= disktab[major].size) { rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; rtems_device_minor_number new_size = 0; if (old_size == 0) { 42e50: 4a84 tstl %d4 42e52: 6600 00a6 bnew 42efa new_size = DISKTAB_INITIAL_SIZE; 42e56: 7c08 moveq #8,%d6 } else { new_size = 2 * old_size; } if (minor >= new_size) { 42e58: bc85 cmpl %d5,%d6 42e5a: 6204 bhis 42e60 new_size = minor + 1; 42e5c: 2c05 movel %d5,%d6 42e5e: 5286 addql #1,%d6 } table = realloc(table, new_size * sizeof(*table)); 42e60: 2006 movel %d6,%d0 42e62: e588 lsll #2,%d0 42e64: 2f00 movel %d0,%sp@- 42e66: 2f0a movel %a2,%sp@- 42e68: 4eb9 0004 507c jsr 4507c if (table == NULL) { 42e6e: 508f addql #8,%sp } if (minor >= new_size) { new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 42e70: 2440 moveal %d0,%a2 if (table == NULL) { 42e72: 4a80 tstl %d0 42e74: 6726 beqs 42e9c return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 42e76: 2006 movel %d6,%d0 42e78: 9084 subl %d4,%d0 42e7a: e588 lsll #2,%d0 42e7c: 2f00 movel %d0,%sp@- 42e7e: 42a7 clrl %sp@- 42e80: 4872 4c00 pea %a2@(00000000,%d4:l:4) 42e84: 4eb9 0005 3a14 jsr 53a14 disktab [major].minor = table; disktab [major].size = new_size; 42e8a: 4fef 000c lea %sp@(12),%sp if (table == NULL) { return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; 42e8e: 268a movel %a2,%a3@ disktab [major].size = new_size; } return disktab [major].minor + minor; 42e90: 45f2 5c00 lea %a2@(00000000,%d5:l:4),%a2 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; disktab [major].size = new_size; 42e94: 2746 0004 movel %d6,%a3@(4) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 42e98: 4a8a tstl %a2 42e9a: 66a2 bnes 42e3e <== ALWAYS TAKEN return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); if (dd == NULL) { return RTEMS_NO_MEMORY; 42e9c: 701a moveq #26,%d0 *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 42e9e: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 42ea4: 4e5e unlk %fp 42ea6: 4e75 rts rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 42ea8: 2e06 movel %d6,%d7 42eaa: de87 addl %d7,%d7 rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; 42eac: 2039 0006 44fe movel 644fe ,%d0 rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; if (major >= new_size) { 42eb2: be84 cmpl %d4,%d7 42eb4: 6204 bhis 42eba <== NEVER TAKEN new_size = major + 1; 42eb6: 2e04 movel %d4,%d7 42eb8: 5287 addql #1,%d7 } table = realloc(table, new_size * sizeof(*table)); 42eba: 2207 movel %d7,%d1 42ebc: e789 lsll #3,%d1 42ebe: 2f01 movel %d1,%sp@- 42ec0: 2f00 movel %d0,%sp@- 42ec2: 4eb9 0004 507c jsr 4507c if (table == NULL) { 42ec8: 508f addql #8,%sp if (major >= new_size) { new_size = major + 1; } table = realloc(table, new_size * sizeof(*table)); 42eca: 2440 moveal %d0,%a2 if (table == NULL) { 42ecc: 4a80 tstl %d0 42ece: 67cc beqs 42e9c <== ALWAYS TAKEN return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 42ed0: 2007 movel %d7,%d0 <== NOT EXECUTED 42ed2: 9086 subl %d6,%d0 <== NOT EXECUTED 42ed4: e788 lsll #3,%d0 <== NOT EXECUTED 42ed6: e78e lsll #3,%d6 <== NOT EXECUTED 42ed8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42eda: 42a7 clrl %sp@- <== NOT EXECUTED 42edc: 4872 6800 pea %a2@(00000000,%d6:l) <== NOT EXECUTED 42ee0: 4eb9 0005 3a14 jsr 53a14 <== NOT EXECUTED disktab = table; disktab_size = new_size; 42ee6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED if (table == NULL) { return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; 42eea: 23ca 0006 44fe movel %a2,644fe <== NOT EXECUTED disktab_size = new_size; 42ef0: 23c7 0006 44fa movel %d7,644fa <== NOT EXECUTED 42ef6: 6000 ff2a braw 42e22 <== NOT EXECUTED rtems_device_minor_number new_size = 0; if (old_size == 0) { new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 42efa: 2c04 movel %d4,%d6 <== NOT EXECUTED 42efc: dc86 addl %d6,%d6 <== NOT EXECUTED 42efe: 6000 ff58 braw 42e58 <== NOT EXECUTED if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 42f02: 4878 0032 pea 32 42f06: 4eb9 0004 44d8 jsr 444d8 if (dd == NULL) { 42f0c: 588f addql #4,%sp if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 42f0e: 2640 moveal %d0,%a3 if (dd == NULL) { 42f10: 4a80 tstl %d0 42f12: 6788 beqs 42e9c <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { 42f14: 4aae 0010 tstl %fp@(16) 42f18: 676e beqs 42f88 alloc_name = strdup(name); 42f1a: 2f2e 0010 movel %fp@(16),%sp@- 42f1e: 4eb9 0005 4004 jsr 54004 if (alloc_name == NULL) { 42f24: 588f addql #4,%sp if (dd == NULL) { return RTEMS_NO_MEMORY; } if (name != NULL) { alloc_name = strdup(name); 42f26: 2800 movel %d0,%d4 42f28: 2a00 movel %d0,%d5 if (alloc_name == NULL) { 42f2a: 677e beqs 42faa <== NEVER TAKEN return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 42f2c: 2f03 movel %d3,%sp@- 42f2e: 2f02 movel %d2,%sp@- 42f30: 4878 61ff pea 61ff 42f34: 2f00 movel %d0,%sp@- 42f36: 4eb9 0004 45bc jsr 445bc 42f3c: 4fef 0010 lea %sp@(16),%sp 42f40: 4a80 tstl %d0 42f42: 6d28 blts 42f6c <== NEVER TAKEN return RTEMS_UNSATISFIED; } } dd->dev = dev; dd->name = alloc_name; 42f44: 2745 0010 movel %d5,%a3@(16) dd->uses = 0; dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; 42f48: 206e 0014 moveal %fp@(20),%a0 } } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; 42f4c: 42ab 0014 clrl %a3@(20) dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; 42f50: 4280 clrl %d0 } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; dd->deleted = false; 42f52: 4201 clrb %d1 free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 42f54: 2682 movel %d2,%a3@ 42f56: 2743 0004 movel %d3,%a3@(4) dd->name = alloc_name; dd->uses = 0; dd->deleted = false; 42f5a: 1741 0030 moveb %d1,%a3@(48) *dd_entry = dd; 42f5e: 248b movel %a3,%a2@ *dd_ptr = dd; 42f60: 208b movel %a3,%a0@ return RTEMS_SUCCESSFUL; } 42f62: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 42f68: 4e5e unlk %fp 42f6a: 4e75 rts } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 42f6c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 42f6e: 45f9 0004 41a8 lea 441a8 ,%a2 <== NOT EXECUTED 42f74: 4e92 jsr %a2@ <== NOT EXECUTED free(dd); 42f76: 2f0b movel %a3,%sp@- <== NOT EXECUTED 42f78: 4e92 jsr %a2@ <== NOT EXECUTED return RTEMS_UNSATISFIED; 42f7a: 508f addql #8,%sp <== NOT EXECUTED 42f7c: 700d moveq #13,%d0 <== NOT EXECUTED *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 42f7e: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 42f84: 4e5e unlk %fp <== NOT EXECUTED 42f86: 4e75 rts <== NOT EXECUTED static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; 42f88: 4285 clrl %d5 dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; 42f8a: 4280 clrl %d0 } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; dd->deleted = false; 42f8c: 4201 clrb %d1 return RTEMS_UNSATISFIED; } } dd->dev = dev; dd->name = alloc_name; 42f8e: 2745 0010 movel %d5,%a3@(16) dd->uses = 0; dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; 42f92: 206e 0014 moveal %fp@(20),%a0 } } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; 42f96: 42ab 0014 clrl %a3@(20) free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 42f9a: 2682 movel %d2,%a3@ 42f9c: 2743 0004 movel %d3,%a3@(4) dd->name = alloc_name; dd->uses = 0; dd->deleted = false; 42fa0: 1741 0030 moveb %d1,%a3@(48) *dd_entry = dd; 42fa4: 248b movel %a3,%a2@ *dd_ptr = dd; 42fa6: 208b movel %a3,%a0@ 42fa8: 60b8 bras 42f62 if (name != NULL) { alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); 42faa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 42fac: 4eb9 0004 41a8 jsr 441a8 <== NOT EXECUTED return RTEMS_NO_MEMORY; 42fb2: 588f addql #4,%sp <== NOT EXECUTED 42fb4: 701a moveq #26,%d0 <== NOT EXECUTED *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 42fb6: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 42fbc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b794 : { int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4b794: 70f8 moveq #-8,%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4b796: 4e56 ffdc linkw %fp,#-36 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4b79a: c0ae 0010 andl %fp@(16),%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4b79e: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4b7a2: 2c2e 0008 movel %fp@(8),%d6 4b7a6: 262e 000c movel %fp@(12),%d3 4b7aa: 286e 0014 moveal %fp@(20),%a4 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4b7ae: 4a80 tstl %d0 4b7b0: 6600 0090 bnew 4b842 rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 4b7b4: 2814 movel %a4@,%d4 if (!device_name_table) 4b7b6: 6700 00a2 beqw 4b85a rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4b7ba: 2a39 0005 dc56 movel 5dc56 ,%d5 4b7c0: 673c beqs 4b7fe <== NEVER TAKEN 4b7c2: 4280 clrl %d0 * handlers. */ extern rtems_filesystem_file_handlers_r devFS_file_handlers; int devFS_evaluate_path( 4b7c4: 4282 clrl %d2 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4b7c6: 4bf9 0004 f630 lea 4f630 ,%a5 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 4b7cc: 2200 movel %d0,%d1 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4b7ce: 5282 addql #1,%d2 if (!device_name_table[i].device_name) 4b7d0: e989 lsll #4,%d1 4b7d2: 2041 moveal %d1,%a0 4b7d4: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3 4b7d8: 47f3 4800 lea %a3@(00000000,%d4:l),%a3 4b7dc: 2453 moveal %a3@,%a2 4b7de: 4a8a tstl %a2 4b7e0: 6716 beqs 4b7f8 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4b7e2: 2f03 movel %d3,%sp@- 4b7e4: 2f0a movel %a2,%sp@- 4b7e6: 2f06 movel %d6,%sp@- 4b7e8: 4e95 jsr %a5@ 4b7ea: 4fef 000c lea %sp@(12),%sp 4b7ee: 4a80 tstl %d0 4b7f0: 6606 bnes 4b7f8 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 4b7f2: 4a32 3800 tstb %a2@(00000000,%d3:l) 4b7f6: 671e beqs 4b816 <== ALWAYS TAKEN /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4b7f8: 2002 movel %d2,%d0 4b7fa: ba82 cmpl %d2,%d5 4b7fc: 66ce bnes 4b7cc pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 4b7fe: 4eb9 0004 e2a8 jsr 4e2a8 <__errno> 4b804: 7202 moveq #2,%d1 4b806: 2040 moveal %d0,%a0 4b808: 70ff moveq #-1,%d0 } 4b80a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 4b810: 2081 movel %d1,%a0@ } 4b812: 4e5e unlk %fp 4b814: 4e75 rts /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4b816: 2079 0005 de34 moveal 5de34 ,%a0 4b81c: 2968 0028 0010 movel %a0@(40),%a4@(16) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 4b822: 223c 0005 dc98 movel #384152,%d1 pathloc->ops = &devFS_ops; 4b828: 41f9 0005 dcd0 lea 5dcd0 ,%a0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 4b82e: 2941 0008 movel %d1,%a4@(8) pathloc->ops = &devFS_ops; 4b832: 2948 000c movel %a0,%a4@(12) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 4b836: 288b movel %a3,%a4@ return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 4b838: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4b83e: 4e5e unlk %fp 4b840: 4e75 rts int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4b842: 4eb9 0004 e2a8 jsr 4e2a8 <__errno> <== NOT EXECUTED 4b848: 7601 moveq #1,%d3 <== NOT EXECUTED 4b84a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b84c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4b84e: 2083 movel %d3,%a0@ <== NOT EXECUTED return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 4b850: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4b856: 4e5e unlk %fp <== NOT EXECUTED 4b858: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 4b85a: 4eb9 0004 e2a8 jsr 4e2a8 <__errno> 4b860: 740e moveq #14,%d2 4b862: 2040 moveal %d0,%a0 4b864: 70ff moveq #-1,%d0 4b866: 2082 movel %d2,%a0@ return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 4b868: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4b86e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042da0 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 42da0: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 42da4: 42a7 clrl %sp@- 42da6: 42a7 clrl %sp@- 42da8: 2f39 0006 44f6 movel 644f6 ,%sp@- 42dae: 4eb9 0004 7cac jsr 47cac if (sc == RTEMS_SUCCESSFUL) { 42db4: 4fef 000c lea %sp@(12),%sp 42db8: 4a80 tstl %d0 42dba: 6706 beqs 42dc2 <== ALWAYS TAKEN diskdevs_protected = true; return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; 42dbc: 7016 moveq #22,%d0 <== NOT EXECUTED } } 42dbe: 4e5e unlk %fp <== NOT EXECUTED 42dc0: 4e75 rts <== NOT EXECUTED 42dc2: 4e5e unlk %fp { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { diskdevs_protected = true; 42dc4: 7201 moveq #1,%d1 42dc6: 13c1 0006 44f4 moveb %d1,644f4 return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } =============================================================================== 00042dce : static void disk_unlock(void) { 42dce: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 42dd2: 4200 clrb %d0 sc = rtems_semaphore_release(diskdevs_mutex); 42dd4: 2f39 0006 44f6 movel 644f6 ,%sp@- static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 42dda: 13c0 0006 44f4 moveb %d0,644f4 sc = rtems_semaphore_release(diskdevs_mutex); 42de0: 4eb9 0004 7dfc jsr 47dfc if (sc != RTEMS_SUCCESSFUL) { 42de6: 588f addql #4,%sp 42de8: 4a80 tstl %d0 42dea: 6604 bnes 42df0 <== NEVER TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); } } 42dec: 4e5e unlk %fp 42dee: 4e75 rts diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); if (sc != RTEMS_SUCCESSFUL) { /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 42df0: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 42df6: 4eb9 0004 83dc jsr 483dc <== NOT EXECUTED =============================================================================== 000442c4 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 442c4: 4e56 fff4 linkw %fp,#-12 442c8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 442cc: 243c 0000 0700 movel #1792,%d2 442d2: 2002 movel %d2,%d0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 442d4: 246e 0008 moveal %fp@(8),%a2 { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 442d8: 40c1 movew %sr,%d1 442da: 8081 orl %d1,%d0 442dc: 46c0 movew %d0,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 442de: 206a 0084 moveal %a2@(132),%a0 442e2: 202a 0080 movel %a2@(128),%d0 442e6: b088 cmpl %a0,%d0 442e8: 6734 beqs 4431e 442ea: 47f9 0004 6acc lea 46acc ,%a3 tty->rawOutBufState = rob_wait; 442f0: 7002 moveq #2,%d0 442f2: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 442f6: 46c1 movew %d1,%sr sc = rtems_semaphore_obtain( 442f8: 42a7 clrl %sp@- 442fa: 42a7 clrl %sp@- 442fc: 2f2a 008c movel %a2@(140),%sp@- 44300: 4e93 jsr %a3@ tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44302: 4fef 000c lea %sp@(12),%sp 44306: 4a80 tstl %d0 44308: 6620 bnes 4432a <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 4430a: 2002 movel %d2,%d0 4430c: 40c1 movew %sr,%d1 4430e: 8081 orl %d1,%d0 44310: 46c0 movew %d0,%sr rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 44312: 206a 0084 moveal %a2@(132),%a0 44316: 202a 0080 movel %a2@(128),%d0 4431a: b088 cmpl %a0,%d0 4431c: 66d2 bnes 442f0 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 4431e: 46c1 movew %d1,%sr } } 44320: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 44326: 4e5e unlk %fp 44328: 4e75 rts tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 4432a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4432c: 4eb9 0004 724c jsr 4724c <== NOT EXECUTED =============================================================================== 00045038 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 45038: 4e56 fffc linkw %fp,#-4 4503c: 222e 0008 movel %fp@(8),%d1 45040: 2f0a movel %a2,%sp@- 45042: 246e 000c moveal %fp@(12),%a2 45046: 2f02 movel %d2,%sp@- if ((tty->termios.c_lflag & ECHOCTL) && 45048: 242a 003c movel %a2@(60),%d2 /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 4504c: 1001 moveb %d1,%d0 if ((tty->termios.c_lflag & ECHOCTL) && 4504e: 0282 0000 0200 andil #512,%d2 iscntrl(c) && (c != '\t') && (c != '\n')) { 45054: 0280 0000 00ff andil #255,%d0 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 4505a: 4a82 tstl %d2 4505c: 6720 beqs 4507e <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 4505e: 2079 0005 f994 moveal 5f994 <__ctype_ptr__>,%a0 45064: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 45068: 49c2 extbl %d2 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 4506a: 0802 0005 btst #5,%d2 4506e: 670e beqs 4507e iscntrl(c) && (c != '\t') && (c != '\n')) { 45070: 7409 moveq #9,%d2 45072: b480 cmpl %d0,%d2 45074: 6708 beqs 4507e 45076: 143c 000a moveb #10,%d2 4507a: b480 cmpl %d0,%d2 4507c: 6616 bnes 45094 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 4507e: 2f0a movel %a2,%sp@- 45080: 2f00 movel %d0,%sp@- 45082: 4eba fde0 jsr %pc@(44e64 ) } } 45086: 242e fff4 movel %fp@(-12),%d2 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 4508a: 508f addql #8,%sp } } 4508c: 246e fff8 moveal %fp@(-8),%a2 45090: 4e5e unlk %fp 45092: 4e75 rts iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 45094: 2f0a movel %a2,%sp@- 45096: 4878 0002 pea 2 if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 4509a: 7040 moveq #64,%d0 rtems_termios_puts (echobuf, 2, tty); 4509c: 486e fffe pea %fp@(-2) if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 450a0: b181 eorl %d0,%d1 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 450a2: 745e moveq #94,%d2 echobuf[1] = c ^ 0x40; 450a4: 1d41 ffff moveb %d1,%fp@(-1) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 450a8: 1d42 fffe moveb %d2,%fp@(-2) echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 450ac: 4eb9 0004 4d60 jsr 44d60 tty->column += 2; } else { oproc (c, tty); } } 450b2: 242e fff4 movel %fp@(-12),%d2 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; 450b6: 54aa 0028 addql #2,%a2@(40) 450ba: 4fef 000c lea %sp@(12),%sp } else { oproc (c, tty); } } 450be: 246e fff8 moveal %fp@(-8),%a2 450c2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004401c : void endgrent(void) { 4401c: 4e56 0000 linkw %fp,#0 if (group_fp != NULL) 44020: 2039 0006 2080 movel 62080 ,%d0 44026: 670a beqs 44032 <== NEVER TAKEN fclose(group_fp); 44028: 2f00 movel %d0,%sp@- 4402a: 4eb9 0004 fe20 jsr 4fe20 44030: 588f addql #4,%sp } 44032: 4e5e unlk %fp ... =============================================================================== 00043ed0 : void endpwent(void) { 43ed0: 4e56 0000 linkw %fp,#0 if (passwd_fp != NULL) 43ed4: 2039 0006 1fa6 movel 61fa6 ,%d0 43eda: 670a beqs 43ee6 <== NEVER TAKEN fclose(passwd_fp); 43edc: 2f00 movel %d0,%sp@- 43ede: 4eb9 0004 fe20 jsr 4fe20 43ee4: 588f addql #4,%sp } 43ee6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000450c6 : * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 450c6: 4e56 ffe4 linkw %fp,#-28 450ca: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 450ce: 246e 0008 moveal %fp@(8),%a2 450d2: 282e 000c movel %fp@(12),%d4 if (tty->ccount == 0) 450d6: 202a 0020 movel %a2@(32),%d0 450da: 6736 beqs 45112 return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 450dc: 262a 003c movel %a2@(60),%d3 450e0: 7208 moveq #8,%d1 450e2: c283 andl %d3,%d1 static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { 450e4: 4a84 tstl %d4 450e6: 6734 beqs 4511c if (!(tty->termios.c_lflag & ECHO)) { 450e8: 4a81 tstl %d1 450ea: 6700 01a8 beqw 45294 tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 450ee: 0803 0004 btst #4,%d3 450f2: 6628 bnes 4511c <== ALWAYS TAKEN tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 450f4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 450f6: 4280 clrl %d0 <== NOT EXECUTED 450f8: 102a 0044 moveb %a2@(68),%d0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 450fc: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 45100: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45102: 4eba ff34 jsr %pc@(45038 ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 45106: 508f addql #8,%sp <== NOT EXECUTED 45108: 7020 moveq #32,%d0 <== NOT EXECUTED 4510a: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 4510e: 6600 0192 bnew 452a2 <== NOT EXECUTED } } if (!lineFlag) break; } } 45112: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 45118: 4e5e unlk %fp 4511a: 4e75 rts 4511c: 47f9 0004 4d60 lea 44d60 ,%a3 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 45122: 5380 subql #1,%d0 45124: 206a 001c moveal %a2@(28),%a0 45128: 2540 0020 movel %d0,%a2@(32) 4512c: 1430 0800 moveb %a0@(00000000,%d0:l),%d2 if (tty->termios.c_lflag & ECHO) { 45130: 4a81 tstl %d1 45132: 6734 beqs 45168 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 45134: 4a84 tstl %d4 45136: 6608 bnes 45140 45138: 0803 0004 btst #4,%d3 4513c: 6700 013c beqw 4527a echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 45140: 7209 moveq #9,%d1 45142: 0282 0000 00ff andil #255,%d2 45148: b282 cmpl %d2,%d1 4514a: 6700 0090 beqw 451dc rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 4514e: 2079 0005 f994 moveal 5f994 <__ctype_ptr__>,%a0 45154: 5282 addql #1,%d2 45156: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 4515a: 49c0 extbl %d0 4515c: 0800 0005 btst #5,%d0 45160: 6756 beqs 451b8 45162: 0803 0009 btst #9,%d3 <== NOT EXECUTED 45166: 6614 bnes 4517c <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 45168: 4a84 tstl %d4 4516a: 67a6 beqs 45112 echo ('\n', tty); return; } } while (tty->ccount) { 4516c: 202a 0020 movel %a2@(32),%d0 45170: 67a0 beqs 45112 } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 45172: 262a 003c movel %a2@(60),%d3 45176: 7208 moveq #8,%d1 45178: c283 andl %d3,%d1 4517a: 60a6 bras 45122 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 4517c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4517e: 4878 0003 pea 3 <== NOT EXECUTED 45182: 4879 0005 e7cd pea 5e7cd <== NOT EXECUTED 45188: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 4518a: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 4518e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45192: 6706 beqs 4519a <== NOT EXECUTED tty->column--; 45194: 5380 subql #1,%d0 <== NOT EXECUTED 45196: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 4519a: 2079 0005 f994 moveal 5f994 <__ctype_ptr__>,%a0 <== NOT EXECUTED 451a0: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 451a4: 49c0 extbl %d0 <== NOT EXECUTED 451a6: 0800 0005 btst #5,%d0 <== NOT EXECUTED 451aa: 670c beqs 451b8 <== NOT EXECUTED 451ac: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 451b0: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 451b6: 67b0 beqs 45168 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 451b8: 2f0a movel %a2,%sp@- 451ba: 4878 0003 pea 3 451be: 4879 0005 e7cd pea 5e7cd 451c4: 4eb9 0004 4d60 jsr 44d60 if (tty->column) 451ca: 202a 0028 movel %a2@(40),%d0 451ce: 4fef 000c lea %sp@(12),%sp 451d2: 6794 beqs 45168 <== NEVER TAKEN tty->column--; 451d4: 5380 subql #1,%d0 451d6: 2540 0028 movel %d0,%a2@(40) 451da: 608c bras 45168 if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 451dc: 242a 002c movel %a2@(44),%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 451e0: 4a80 tstl %d0 451e2: 6732 beqs 45216 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 451e4: 2c03 movel %d3,%d6 if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; int i = 0; 451e6: 4201 clrb %d1 while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 451e8: 0286 0000 0200 andil #512,%d6 */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 451ee: 2279 0005 f994 moveal 5f994 <__ctype_ptr__>,%a1 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 451f4: 4283 clrl %d3 451f6: 1618 moveb %a0@+,%d3 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 451f8: 5281 addql #1,%d1 if (c == '\t') { 451fa: 7a09 moveq #9,%d5 451fc: ba83 cmpl %d3,%d5 451fe: 676c beqs 4526c col = (col | 7) + 1; } else if (iscntrl (c)) { 45200: 1a31 3801 moveb %a1@(00000001,%d3:l),%d5 45204: 49c5 extbl %d5 45206: 0805 0005 btst #5,%d5 4520a: 6758 beqs 45264 <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) 4520c: 4a86 tstl %d6 <== NOT EXECUTED 4520e: 6702 beqs 45212 <== NOT EXECUTED col += 2; 45210: 5482 addql #2,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45212: b280 cmpl %d0,%d1 <== NOT EXECUTED 45214: 66de bnes 451f4 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 45216: b4aa 0028 cmpl %a2@(40),%d2 4521a: 6c00 ff4c bgew 45168 rtems_termios_puts ("\b", 1, tty); 4521e: 2f0a movel %a2,%sp@- 45220: 4878 0001 pea 1 45224: 4879 0005 e7cf pea 5e7cf 4522a: 4e93 jsr %a3@ tty->column--; 4522c: 202a 0028 movel %a2@(40),%d0 45230: 5380 subql #1,%d0 } /* * Back up over the tab */ while (tty->column > col) { 45232: 4fef 000c lea %sp@(12),%sp rtems_termios_puts ("\b", 1, tty); tty->column--; 45236: 2540 0028 movel %d0,%a2@(40) } /* * Back up over the tab */ while (tty->column > col) { 4523a: b480 cmpl %d0,%d2 4523c: 6c00 ff2a bgew 45168 rtems_termios_puts ("\b", 1, tty); 45240: 2f0a movel %a2,%sp@- 45242: 4878 0001 pea 1 45246: 4879 0005 e7cf pea 5e7cf 4524c: 4e93 jsr %a3@ tty->column--; 4524e: 202a 0028 movel %a2@(40),%d0 45252: 5380 subql #1,%d0 } /* * Back up over the tab */ while (tty->column > col) { 45254: 4fef 000c lea %sp@(12),%sp rtems_termios_puts ("\b", 1, tty); tty->column--; 45258: 2540 0028 movel %d0,%a2@(40) } /* * Back up over the tab */ while (tty->column > col) { 4525c: b480 cmpl %d0,%d2 4525e: 6dbe blts 4521e 45260: 6000 ff06 braw 45168 col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 45264: 5282 addql #1,%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45266: b280 cmpl %d0,%d1 45268: 668a bnes 451f4 4526a: 60aa bras 45216 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 4526c: 7607 moveq #7,%d3 4526e: 8483 orl %d3,%d2 45270: 5282 addql #1,%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45272: b280 cmpl %d0,%d1 45274: 6600 ff7e bnew 451f4 45278: 609c bras 45216 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 4527a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 4527e: 4280 clrl %d0 <== NOT EXECUTED 45280: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED } } if (!lineFlag) break; } } 45284: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 4528a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 4528e: 4e5e unlk %fp <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 45290: 6000 fda6 braw 45038 <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 45294: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED } } if (!lineFlag) break; } } 45298: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 4529e: 4e5e unlk %fp <== NOT EXECUTED 452a0: 4e75 rts <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 452a2: 700a moveq #10,%d0 <== NOT EXECUTED 452a4: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } } if (!lineFlag) break; } } 452a8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 452ae: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 452b2: 4e5e unlk %fp <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 452b4: 6000 fd82 braw 45038 <== NOT EXECUTED =============================================================================== 0005387c : #include "fat_fat_operations.h" int fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type, rtems_bdbuf_buffer **buf) { 5387c: 4e56 ffdc linkw %fp,#-36 53880: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 53884: 246e 0008 moveal %fp@(8),%a2 53888: 242e 000c movel %fp@(12),%d2 5388c: 282e 0010 movel %fp@(16),%d4 rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 53890: 4a2a 0077 tstb %a2@(119) 53894: 6700 0116 beqw 539ac fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 53898: 4281 clrl %d1 5389a: 322a 0014 movew %a2@(20),%d1 rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 5389e: 202a 0072 movel %a2@(114),%d0 fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 538a2: b081 cmpl %d1,%d0 538a4: 6500 0146 bcsw 539ec 538a8: b0aa 001a cmpl %a2@(26),%d0 538ac: 55c3 scs %d3 538ae: 4483 negl %d3 (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 538b0: b082 cmpl %d2,%d0 538b2: 6700 00e4 beqw 53998 { if (fs_info->c.modified) 538b6: 4a2a 0076 tstb %a2@(118) 538ba: 6700 0136 beqw 539f2 { if (sec_of_fat && !fs_info->vol.mirror) 538be: 4a03 tstb %d3 538c0: 6708 beqs 538ca <== ALWAYS TAKEN 538c2: 4a2a 0042 tstb %a2@(66) <== NOT EXECUTED 538c6: 6700 0174 beqw 53a3c <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 538ca: 2f2a 0078 movel %a2@(120),%sp@- 538ce: 47f9 0005 215c lea 5215c ,%a3 538d4: 4e93 jsr %a3@ fs_info->c.state = FAT_CACHE_EMPTY; fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 538d6: 588f addql #4,%sp if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; 538d8: 4201 clrb %d1 538da: 1541 0077 moveb %d1,%a2@(119) fs_info->c.modified = 0; 538de: 1541 0076 moveb %d1,%a2@(118) if (sc != RTEMS_SUCCESSFUL) 538e2: 4a80 tstl %d0 538e4: 6600 0124 bnew 53a0a rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 538e8: 4a03 tstb %d3 538ea: 677e beqs 5396a <== ALWAYS TAKEN 538ec: 4a2a 0042 tstb %a2@(66) <== NOT EXECUTED 538f0: 6678 bnes 5396a <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 538f2: 4280 clrl %d0 <== NOT EXECUTED 538f4: 102a 0009 moveb %a2@(9),%d0 <== NOT EXECUTED 538f8: 7201 moveq #1,%d1 <== NOT EXECUTED 538fa: b280 cmpl %d0,%d1 <== NOT EXECUTED 538fc: 646c bccs 5396a <== NOT EXECUTED 538fe: 2a0e movel %fp,%d5 <== NOT EXECUTED 53900: 49f9 0005 1cf4 lea 51cf4 ,%a4 <== NOT EXECUTED 53906: 5985 subql #4,%d5 <== NOT EXECUTED 53908: 7001 moveq #1,%d0 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 5390a: 4bf9 0005 e2a0 lea 5e2a0 ,%a5 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 53910: 7601 moveq #1,%d3 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 53912: 2f05 movel %d5,%sp@- <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, 53914: 41ea 0016 lea %a2@(22),%a0 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 53918: 5283 addql #1,%d3 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, 5391a: 4c10 0800 mulsl %a0@,%d0 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 5391e: d0aa 0072 addl %a2@(114),%d0 <== NOT EXECUTED 53922: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53924: 2f2a 004e movel %a2@(78),%sp@- <== NOT EXECUTED 53928: 2f2a 004a movel %a2@(74),%sp@- <== NOT EXECUTED 5392c: 4e94 jsr %a4@ <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 5392e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 53932: 4a80 tstl %d0 <== NOT EXECUTED 53934: 6600 0142 bnew 53a78 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 53938: 4280 clrl %d0 <== NOT EXECUTED 5393a: 3012 movew %a2@,%d0 <== NOT EXECUTED 5393c: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 53940: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53942: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 53946: 2f28 001e movel %a0@(30),%sp@- <== NOT EXECUTED 5394a: 4e95 jsr %a5@ <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 5394c: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 53950: 4e93 jsr %a3@ <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 53952: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 53956: 4a80 tstl %d0 <== NOT EXECUTED 53958: 6600 011e bnew 53a78 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 5395c: 4281 clrl %d1 <== NOT EXECUTED 5395e: 122a 0009 moveb %a2@(9),%d1 <== NOT EXECUTED 53962: 4280 clrl %d0 <== NOT EXECUTED 53964: 1003 moveb %d3,%d0 <== NOT EXECUTED 53966: b081 cmpl %d1,%d0 <== NOT EXECUTED 53968: 65a8 bcss 53912 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 5396a: 7001 moveq #1,%d0 5396c: b084 cmpl %d4,%d0 5396e: 6700 00ec beqw 53a5c sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 53972: 486a 0078 pea %a2@(120) 53976: 2f02 movel %d2,%sp@- 53978: 2f2a 004e movel %a2@(78),%sp@- 5397c: 2f2a 004a movel %a2@(74),%sp@- 53980: 4eb9 0005 1cf4 jsr 51cf4 53986: 4fef 0010 lea %sp@(16),%sp if (sc != RTEMS_SUCCESSFUL) 5398a: 4a80 tstl %d0 5398c: 667c bnes 53a0a <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 5398e: 2542 0072 movel %d2,%a2@(114) fs_info->c.state = FAT_CACHE_ACTUAL; 53992: 7201 moveq #1,%d1 53994: 1541 0077 moveb %d1,%a2@(119) } *buf = fs_info->c.buf; 53998: 206e 0014 moveal %fp@(20),%a0 return RC_OK; 5399c: 4280 clrl %d0 if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; 5399e: 20aa 0078 movel %a2@(120),%a0@ return RC_OK; } 539a2: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 539a8: 4e5e unlk %fp 539aa: 4e75 rts bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) 539ac: 7001 moveq #1,%d0 539ae: b084 cmpl %d4,%d0 539b0: 6770 beqs 53a22 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 539b2: 486a 0078 pea %a2@(120) 539b6: 2f02 movel %d2,%sp@- 539b8: 2f2a 004e movel %a2@(78),%sp@- 539bc: 2f2a 004a movel %a2@(74),%sp@- 539c0: 4eb9 0005 1cf4 jsr 51cf4 539c6: 4fef 0010 lea %sp@(16),%sp if (sc != RTEMS_SUCCESSFUL) 539ca: 4a80 tstl %d0 539cc: 663c bnes 53a0a <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 539ce: 2542 0072 movel %d2,%a2@(114) fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; 539d2: 2002 movel %d2,%d0 else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; 539d4: 4201 clrb %d1 539d6: 1541 0076 moveb %d1,%a2@(118) fs_info->c.state = FAT_CACHE_ACTUAL; 539da: 7201 moveq #1,%d1 539dc: 1541 0077 moveb %d1,%a2@(119) } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 539e0: 4281 clrl %d1 539e2: 322a 0014 movew %a2@(20),%d1 539e6: b081 cmpl %d1,%d0 539e8: 6400 febe bccw 538a8 539ec: 4203 clrb %d3 <== NOT EXECUTED 539ee: 6000 fec0 braw 538b0 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 539f2: 2f2a 0078 movel %a2@(120),%sp@- 539f6: 4eb9 0005 2090 jsr 52090 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 539fc: 588f addql #4,%sp } } else { sc = rtems_bdbuf_release(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; 539fe: 4201 clrb %d1 53a00: 1541 0077 moveb %d1,%a2@(119) if (sc != RTEMS_SUCCESSFUL) 53a04: 4a80 tstl %d0 53a06: 6700 ff62 beqw 5396a if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 53a0a: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53a10: 7205 moveq #5,%d1 <== NOT EXECUTED 53a12: 2040 moveal %d0,%a0 <== NOT EXECUTED 53a14: 70ff moveq #-1,%d0 <== NOT EXECUTED fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; return RC_OK; } 53a16: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 53a1c: 2081 movel %d1,%a0@ <== NOT EXECUTED fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; return RC_OK; } 53a1e: 4e5e unlk %fp <== NOT EXECUTED 53a20: 4e75 rts <== NOT EXECUTED if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 53a22: 486a 0078 pea %a2@(120) 53a26: 2f02 movel %d2,%sp@- 53a28: 2f2a 004e movel %a2@(78),%sp@- 53a2c: 2f2a 004a movel %a2@(74),%sp@- 53a30: 4eb9 0005 1de8 jsr 51de8 53a36: 4fef 0010 lea %sp@(16),%sp 53a3a: 608e bras 539ca if (fs_info->c.blk_num != blk) { if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 53a3c: 4280 clrl %d0 <== NOT EXECUTED 53a3e: 206a 0078 moveal %a2@(120),%a0 <== NOT EXECUTED 53a42: 3012 movew %a2@,%d0 <== NOT EXECUTED 53a44: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53a46: 2f28 001e movel %a0@(30),%sp@- <== NOT EXECUTED 53a4a: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 53a4e: 4eb9 0005 e2a0 jsr 5e2a0 <== NOT EXECUTED 53a54: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53a58: 6000 fe70 braw 538ca <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 53a5c: 486a 0078 pea %a2@(120) 53a60: 2f02 movel %d2,%sp@- 53a62: 2f2a 004e movel %a2@(78),%sp@- 53a66: 2f2a 004a movel %a2@(74),%sp@- 53a6a: 4eb9 0005 1de8 jsr 51de8 53a70: 4fef 0010 lea %sp@(16),%sp 53a74: 6000 ff14 braw 5398a if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 53a78: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53a7e: 740c moveq #12,%d2 <== NOT EXECUTED 53a80: 2040 moveal %d0,%a0 <== NOT EXECUTED 53a82: 70ff moveq #-1,%d0 <== NOT EXECUTED 53a84: 2082 movel %d2,%a0@ <== NOT EXECUTED fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; return RC_OK; } 53a86: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 53a8c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053a90 : int fat_buf_release(fat_fs_info_t *fs_info) { 53a90: 4e56 ffe4 linkw %fp,#-28 53a94: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 53a98: 246e 0008 moveal %fp@(8),%a2 rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 53a9c: 4a2a 0077 tstb %a2@(119) 53aa0: 6700 010c beqw 53bae return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 53aa4: 4281 clrl %d1 53aa6: 322a 0014 movew %a2@(20),%d1 53aaa: 202a 0072 movel %a2@(114),%d0 53aae: b280 cmpl %d0,%d1 53ab0: 6200 00ca bhiw 53b7c *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 53ab4: b0aa 001a cmpl %a2@(26),%d0 53ab8: 55c2 scs %d2 53aba: 4482 negl %d2 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 53abc: 4a2a 0076 tstb %a2@(118) 53ac0: 6700 00c4 beqw 53b86 { if (sec_of_fat && !fs_info->vol.mirror) 53ac4: 4a02 tstb %d2 53ac6: 6708 beqs 53ad0 53ac8: 4a2a 0042 tstb %a2@(66) 53acc: 6700 00ec beqw 53bba memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 53ad0: 2f2a 0078 movel %a2@(120),%sp@- 53ad4: 47f9 0005 215c lea 5215c ,%a3 53ada: 4e93 jsr %a3@ if (sc != RTEMS_SUCCESSFUL) 53adc: 588f addql #4,%sp 53ade: 4a80 tstl %d0 53ae0: 6600 00b4 bnew 53b96 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 53ae4: 4200 clrb %d0 53ae6: 1540 0076 moveb %d0,%a2@(118) if (sec_of_fat && !fs_info->vol.mirror) 53aea: 4a02 tstb %d2 53aec: 677c beqs 53b6a 53aee: 4a2a 0042 tstb %a2@(66) 53af2: 6676 bnes 53b6a <== NEVER TAKEN { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 53af4: 4280 clrl %d0 53af6: 102a 0009 moveb %a2@(9),%d0 53afa: 7201 moveq #1,%d1 53afc: b280 cmpl %d0,%d1 53afe: 646a bccs 53b6a <== NEVER TAKEN 53b00: 260e movel %fp,%d3 53b02: 5983 subql #4,%d3 53b04: 7001 moveq #1,%d0 53b06: 49f9 0005 1cf4 lea 51cf4 ,%a4 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 53b0c: 4bf9 0005 e2a0 lea 5e2a0 ,%a5 if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 53b12: 7401 moveq #1,%d2 { sc = rtems_bdbuf_get(fs_info->vol.dev, 53b14: 2f03 movel %d3,%sp@- fs_info->c.blk_num + fs_info->vol.fat_length * i, 53b16: 41ea 0016 lea %a2@(22),%a0 if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 53b1a: 5282 addql #1,%d2 { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, 53b1c: 4c10 0800 mulsl %a0@,%d0 { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 53b20: d0aa 0072 addl %a2@(114),%d0 53b24: 2f00 movel %d0,%sp@- 53b26: 2f2a 004e movel %a2@(78),%sp@- 53b2a: 2f2a 004a movel %a2@(74),%sp@- 53b2e: 4e94 jsr %a4@ fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 53b30: 4fef 0010 lea %sp@(16),%sp 53b34: 4a80 tstl %d0 53b36: 6600 00a2 bnew 53bda rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 53b3a: 4280 clrl %d0 53b3c: 3012 movew %a2@,%d0 53b3e: 206e fffc moveal %fp@(-4),%a0 53b42: 2f00 movel %d0,%sp@- 53b44: 2f2a 007c movel %a2@(124),%sp@- 53b48: 2f28 001e movel %a0@(30),%sp@- 53b4c: 4e95 jsr %a5@ sc = rtems_bdbuf_release_modified(b); 53b4e: 2f2e fffc movel %fp@(-4),%sp@- 53b52: 4e93 jsr %a3@ if ( sc != RTEMS_SUCCESSFUL) 53b54: 4fef 0010 lea %sp@(16),%sp 53b58: 4a80 tstl %d0 53b5a: 667e bnes 53bda <== NEVER TAKEN if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 53b5c: 4281 clrl %d1 53b5e: 122a 0009 moveb %a2@(9),%d1 53b62: 4280 clrl %d0 53b64: 1002 moveb %d2,%d0 53b66: b280 cmpl %d0,%d1 53b68: 62aa bhis 53b14 <== NEVER TAKEN sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; 53b6a: 4280 clrl %d0 { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 53b6c: 4201 clrb %d1 53b6e: 1541 0077 moveb %d1,%a2@(119) return RC_OK; } 53b72: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 53b78: 4e5e unlk %fp 53b7a: 4e75 rts bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 53b7c: 4202 clrb %d2 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 53b7e: 4a2a 0076 tstb %a2@(118) <== NOT EXECUTED 53b82: 6600 ff40 bnew 53ac4 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 53b86: 2f2a 0078 movel %a2@(120),%sp@- 53b8a: 4eb9 0005 2090 jsr 52090 if (sc != RTEMS_SUCCESSFUL) 53b90: 588f addql #4,%sp 53b92: 4a80 tstl %d0 53b94: 67d4 beqs 53b6a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 53b96: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53b9c: 7605 moveq #5,%d3 <== NOT EXECUTED 53b9e: 2040 moveal %d0,%a0 <== NOT EXECUTED 53ba0: 70ff moveq #-1,%d0 <== NOT EXECUTED 53ba2: 2083 movel %d3,%a0@ <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 53ba4: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 <== NOT EXECUTED 53baa: 4e5e unlk %fp <== NOT EXECUTED 53bac: 4e75 rts <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) return RC_OK; 53bae: 4280 clrl %d0 if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 53bb0: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 53bb6: 4e5e unlk %fp 53bb8: 4e75 rts (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 53bba: 4280 clrl %d0 53bbc: 206a 0078 moveal %a2@(120),%a0 53bc0: 3012 movew %a2@,%d0 53bc2: 2f00 movel %d0,%sp@- 53bc4: 2f28 001e movel %a0@(30),%sp@- 53bc8: 2f2a 007c movel %a2@(124),%sp@- 53bcc: 4eb9 0005 e2a0 jsr 5e2a0 53bd2: 4fef 000c lea %sp@(12),%sp 53bd6: 6000 fef8 braw 53ad0 if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 53bda: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53be0: 720c moveq #12,%d1 <== NOT EXECUTED 53be2: 2040 moveal %d0,%a0 <== NOT EXECUTED 53be4: 70ff moveq #-1,%d0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 53be6: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 53bec: 2081 movel %d1,%a0@ <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 53bee: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053d76 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 53d76: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 53d7a: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 53d7e: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 53d82: 2069 0034 moveal %a1@(52),%a0 <== NOT EXECUTED fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 53d86: 2f02 movel %d2,%sp@- <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 53d88: 4a80 tstl %d0 <== NOT EXECUTED 53d8a: 660c bnes 53d98 <== NOT EXECUTED 53d8c: 4281 clrl %d1 <== NOT EXECUTED 53d8e: 1228 000a moveb %a0@(10),%d1 <== NOT EXECUTED 53d92: 7403 moveq #3,%d2 <== NOT EXECUTED 53d94: c282 andl %d2,%d1 <== NOT EXECUTED 53d96: 6636 bnes 53dce <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 53d98: 4281 clrl %d1 <== NOT EXECUTED 53d9a: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED 53d9e: 5580 subql #2,%d0 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53da0: 4282 clrl %d2 <== NOT EXECUTED 53da2: e3a8 lsll %d1,%d0 <== NOT EXECUTED 53da4: 4281 clrl %d1 <== NOT EXECUTED 53da6: d0a8 002c addl %a0@(44),%d0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 53daa: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53dae: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED 53db2: 1228 0004 moveb %a0@(4),%d1 <== NOT EXECUTED 53db6: e5a9 lsll %d2,%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 53db8: 2f01 movel %d1,%sp@- <== NOT EXECUTED 53dba: 42a7 clrl %sp@- <== NOT EXECUTED 53dbc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53dbe: 2f09 movel %a1,%sp@- <== NOT EXECUTED 53dc0: 4eb9 0005 3bf2 jsr 53bf2 <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 53dc6: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 53dca: 4e5e unlk %fp <== NOT EXECUTED 53dcc: 4e75 rts <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 53dce: 2028 001a movel %a0@(26),%d0 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53dd2: 4281 clrl %d1 <== NOT EXECUTED 53dd4: 4282 clrl %d2 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 53dd6: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53dda: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED 53dde: 1228 0004 moveb %a0@(4),%d1 <== NOT EXECUTED 53de2: e5a9 lsll %d2,%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 53de4: 2f01 movel %d1,%sp@- <== NOT EXECUTED 53de6: 42a7 clrl %sp@- <== NOT EXECUTED 53de8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53dea: 2f09 movel %a1,%sp@- <== NOT EXECUTED 53dec: 4eb9 0005 3bf2 jsr 53bf2 <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 53df2: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 53df6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053dfa : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 53dfa: 4e56 0000 linkw %fp,#0 53dfe: 226e 0008 moveal %fp@(8),%a1 53e02: 202e 000c movel %fp@(12),%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; 53e06: 2069 0034 moveal %a1@(52),%a0 fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 53e0a: 2f02 movel %d2,%sp@- uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 53e0c: 4a80 tstl %d0 53e0e: 660c bnes 53e1c <== ALWAYS TAKEN 53e10: 4281 clrl %d1 <== NOT EXECUTED 53e12: 1228 000a moveb %a0@(10),%d1 <== NOT EXECUTED 53e16: 7403 moveq #3,%d2 <== NOT EXECUTED 53e18: c282 andl %d2,%d1 <== NOT EXECUTED 53e1a: 6636 bnes 53e52 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 53e1c: 4281 clrl %d1 53e1e: 1228 0005 moveb %a0@(5),%d1 53e22: 5580 subql #2,%d0 uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53e24: 4282 clrl %d2 53e26: e3a8 lsll %d1,%d0 53e28: 4281 clrl %d1 53e2a: d0a8 002c addl %a0@(44),%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 53e2e: 2f2e 0010 movel %fp@(16),%sp@- fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53e32: 1428 0002 moveb %a0@(2),%d2 53e36: 1228 0004 moveb %a0@(4),%d1 53e3a: e5a9 lsll %d2,%d1 fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 53e3c: 2f01 movel %d1,%sp@- 53e3e: 42a7 clrl %sp@- 53e40: 2f00 movel %d0,%sp@- 53e42: 2f09 movel %a1,%sp@- 53e44: 4eb9 0005 3c96 jsr 53c96 <_fat_block_write> fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 53e4a: 242e fffc movel %fp@(-4),%d2 53e4e: 4e5e unlk %fp 53e50: 4e75 rts ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 53e52: 2028 001a movel %a0@(26),%d0 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53e56: 4281 clrl %d1 <== NOT EXECUTED 53e58: 4282 clrl %d2 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 53e5a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53e5e: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED 53e62: 1228 0004 moveb %a0@(4),%d1 <== NOT EXECUTED 53e66: e5a9 lsll %d2,%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 53e68: 2f01 movel %d1,%sp@- <== NOT EXECUTED 53e6a: 42a7 clrl %sp@- <== NOT EXECUTED 53e6c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53e6e: 2f09 movel %a1,%sp@- <== NOT EXECUTED 53e70: 4eb9 0005 3c96 jsr 53c96 <_fat_block_write> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 53e76: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 53e7a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00054084 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 54084: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 54088: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 5408c: 2200 movel %d0,%d1 <== NOT EXECUTED 5408e: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ <== NOT EXECUTED 54092: 7418 moveq #24,%d2 <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 54094: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 54098: e4a9 lsrl %d2,%d1 <== NOT EXECUTED 5409a: 2041 moveal %d1,%a0 <== NOT EXECUTED 5409c: 4878 0004 pea 4 <== NOT EXECUTED 540a0: 7a18 moveq #24,%d5 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 540a2: 2200 movel %d0,%d1 <== NOT EXECUTED 540a4: 4878 01e8 pea 1e8 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 540a8: 2800 movel %d0,%d4 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 540aa: 7c18 moveq #24,%d6 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 540ac: e08c lsrl #8,%d4 <== NOT EXECUTED 540ae: 47f9 0005 3c96 lea 53c96 <_fat_block_write>,%a3 <== NOT EXECUTED fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 540b4: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 540b8: 2e02 movel %d2,%d7 <== NOT EXECUTED 540ba: eaaf lsrl %d5,%d7 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 540bc: 2602 movel %d2,%d3 <== NOT EXECUTED 540be: e08b lsrl #8,%d3 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 540c0: eba9 lsll %d5,%d1 <== NOT EXECUTED 540c2: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 540c6: 2a00 movel %d0,%d5 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 540c8: 2002 movel %d2,%d0 <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 540ca: 286a 0034 moveal %a2@(52),%a4 <== NOT EXECUTED 540ce: eda8 lsll %d6,%d0 <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 540d0: 4286 clrl %d6 <== NOT EXECUTED 540d2: 3c2c 0038 movew %a4@(56),%d6 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 540d6: e18d lsll #8,%d5 <== NOT EXECUTED 540d8: e18a lsll #8,%d2 <== NOT EXECUTED 540da: 2246 moveal %d6,%a1 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 540dc: 2c08 movel %a0,%d6 <== NOT EXECUTED 540de: 0282 00ff 0000 andil #16711680,%d2 <== NOT EXECUTED 540e4: 8286 orl %d6,%d1 <== NOT EXECUTED 540e6: 0285 00ff 0000 andil #16711680,%d5 <== NOT EXECUTED 540ec: 8087 orl %d7,%d0 <== NOT EXECUTED 540ee: 2f09 movel %a1,%sp@- <== NOT EXECUTED 540f0: 8082 orl %d2,%d0 <== NOT EXECUTED 540f2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 540f4: 8285 orl %d5,%d1 <== NOT EXECUTED 540f6: 0284 0000 ff00 andil #65280,%d4 <== NOT EXECUTED 540fc: 0283 0000 ff00 andil #65280,%d3 <== NOT EXECUTED 54102: 8284 orl %d4,%d1 <== NOT EXECUTED 54104: 8083 orl %d3,%d0 <== NOT EXECUTED 54106: 2d41 fff8 movel %d1,%fp@(-8) <== NOT EXECUTED 5410a: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED 5410e: 4e93 jsr %a3@ <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 54110: 486e fffc pea %fp@(-4) <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 54114: 2400 movel %d0,%d2 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 54116: 4878 0004 pea 4 <== NOT EXECUTED 5411a: 4280 clrl %d0 <== NOT EXECUTED 5411c: 4878 01ec pea 1ec <== NOT EXECUTED 54120: 302c 0038 movew %a4@(56),%d0 <== NOT EXECUTED 54124: 2f00 movel %d0,%sp@- <== NOT EXECUTED 54126: 2f0a movel %a2,%sp@- <== NOT EXECUTED 54128: 4e93 jsr %a3@ <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 5412a: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED 5412e: 4a82 tstl %d2 <== NOT EXECUTED 54130: 6d10 blts 54142 <== NOT EXECUTED return -1; 54132: 4a80 tstl %d0 <== NOT EXECUTED 54134: 5dc0 slt %d0 <== NOT EXECUTED return RC_OK; } 54136: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED 5413c: 4e5e unlk %fp <== NOT EXECUTED FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) return -1; 5413e: 49c0 extbl %d0 <== NOT EXECUTED return RC_OK; } 54140: 4e75 rts <== NOT EXECUTED FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) return -1; 54142: 70ff moveq #-1,%d0 <== NOT EXECUTED return RC_OK; } 54144: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED 5414a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052fc2 : /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) 52fc2: 7201 moveq #1,%d1 int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 52fc4: 4e56 fff4 linkw %fp,#-12 52fc8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 52fcc: 266e 0008 moveal %fp@(8),%a3 52fd0: 246e 000c moveal %fp@(12),%a2 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 52fd4: 242b 0034 movel %a3@(52),%d2 /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) 52fd8: 202a 0008 movel %a2@(8),%d0 52fdc: b280 cmpl %d0,%d1 52fde: 6412 bccs 52ff2 { fat_fd->links_num--; 52fe0: 5380 subql #1,%d0 52fe2: 2540 0008 movel %d0,%a2@(8) return rc; 52fe6: 4280 clrl %d0 * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 52fe8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 52fee: 4e5e unlk %fp 52ff0: 4e75 rts return rc; } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 52ff2: 4280 clrl %d0 52ff4: 102a 0030 moveb %a2@(48),%d0 52ff8: 0800 0000 btst #0,%d0 52ffc: 674c beqs 5304a <== ALWAYS TAKEN { rc = fat_file_truncate(mt_entry, fat_fd, 0); 52ffe: 42a7 clrl %sp@- <== NOT EXECUTED 53000: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53002: 2f0b movel %a3,%sp@- <== NOT EXECUTED 53004: 4eb9 0005 2ec6 jsr 52ec6 <== NOT EXECUTED if ( rc != RC_OK ) 5300a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5300e: 4a80 tstl %d0 <== NOT EXECUTED 53010: 66d6 bnes 52fe8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 53012: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53014: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract> <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) 5301a: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 5301e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 53020: 4eb9 0005 4068 jsr 54068 <== NOT EXECUTED 53026: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5302a: 4a00 tstb %d0 <== NOT EXECUTED 5302c: 6668 bnes 53096 <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); free(fat_fd); 5302e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53030: 4eb9 0004 680c jsr 4680c <== NOT EXECUTED 53036: 588f addql #4,%sp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 53038: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED return rc; } 5303c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 53042: 4e5e unlk %fp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 53044: 4ef9 0005 3a90 jmp 53a90 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 5304a: 2f2a 000c movel %a2@(12),%sp@- 5304e: 2f0b movel %a3,%sp@- 53050: 4eb9 0005 4068 jsr 54068 53056: 508f addql #8,%sp 53058: 4a00 tstb %d0 5305a: 6716 beqs 53072 <== ALWAYS TAKEN { fat_fd->links_num = 0; 5305c: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 53060: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED return rc; } 53064: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 5306a: 4e5e unlk %fp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 5306c: 4ef9 0005 3a90 jmp 53a90 <== NOT EXECUTED 53072: 2f0a movel %a2,%sp@- 53074: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract> fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 5307a: 2f0a movel %a2,%sp@- 5307c: 4eb9 0004 680c jsr 4680c 53082: 508f addql #8,%sp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 53084: 2d42 0008 movel %d2,%fp@(8) return rc; } 53088: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5308e: 4e5e unlk %fp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 53090: 4ef9 0005 3a90 jmp 53a90 return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) fat_free_unique_ino(mt_entry, fat_fd->ino); 53096: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 5309a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5309c: 4eb9 0005 4032 jsr 54032 <== NOT EXECUTED 530a2: 508f addql #8,%sp <== NOT EXECUTED free(fat_fd); 530a4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 530a6: 4eb9 0004 680c jsr 4680c <== NOT EXECUTED 530ac: 588f addql #4,%sp <== NOT EXECUTED 530ae: 6088 bras 53038 <== NOT EXECUTED =============================================================================== 000536b0 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 536b0: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 536b4: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 536b8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 536bc: 2a2e 0008 movel %fp@(8),%d5 <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; 536c0: 2245 moveal %d5,%a1 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 536c2: 2d68 001c fff8 movel %a0@(28),%fp@(-8) <== NOT EXECUTED fat_file_fd_t *fat_fd ) { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; 536c8: 2669 0034 moveal %a1@(52),%a3 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; 536cc: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 536d0: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED 536d4: 660e bnes 536e4 <== NOT EXECUTED return RC_OK; 536d6: 4284 clrl %d4 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 536d8: 2004 movel %d4,%d0 <== NOT EXECUTED 536da: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 536e0: 4e5e unlk %fp <== NOT EXECUTED 536e2: 4e75 rts <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); 536e4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 536e6: 4eb9 0005 3a90 jsr 53a90 <== NOT EXECUTED if (rc != RC_OK) 536ec: 588f addql #4,%sp <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); 536ee: 2800 movel %d0,%d4 <== NOT EXECUTED if (rc != RC_OK) 536f0: 66e6 bnes 536d8 <== NOT EXECUTED 536f2: 240e movel %fp,%d2 <== NOT EXECUTED 536f4: 5982 subql #4,%d2 <== NOT EXECUTED 536f6: 4bf9 0005 1de8 lea 51de8 ,%a5 <== NOT EXECUTED /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 536fc: 263c 0005 21da movel #336346,%d3 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53702: 2c3c 0005 b828 movel #374824,%d6 <== NOT EXECUTED rc = fat_buf_release(fs_info); if (rc != RC_OK) return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53708: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 5370c: 2200 movel %d0,%d1 <== NOT EXECUTED 5370e: c2ab 000c andl %a3@(12),%d1 <== NOT EXECUTED 53712: b2ab 0010 cmpl %a3@(16),%d1 <== NOT EXECUTED 53716: 64c0 bccs 536d8 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 53718: 2245 moveal %d5,%a1 <== NOT EXECUTED 5371a: 2069 0034 moveal %a1@(52),%a0 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 5371e: 4a80 tstl %d0 <== NOT EXECUTED 53720: 6670 bnes 53792 <== NOT EXECUTED 53722: 4281 clrl %d1 <== NOT EXECUTED 53724: 1228 000a moveb %a0@(10),%d1 <== NOT EXECUTED 53728: 7e03 moveq #3,%d7 <== NOT EXECUTED 5372a: c287 andl %d7,%d1 <== NOT EXECUTED 5372c: 6764 beqs 53792 <== NOT EXECUTED return fs_info->vol.rdir_loc; 5372e: 2868 001a moveal %a0@(26),%a4 <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 53732: 4a2b 0004 tstb %a3@(4) <== NOT EXECUTED 53736: 6738 beqs 53770 <== NOT EXECUTED 53738: 95ca subal %a2,%a2 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 5373a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5373c: 4872 c800 pea %a2@(00000000,%a4:l) <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 53740: 528a addql #1,%a2 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 53742: 2f2b 004e movel %a3@(78),%sp@- <== NOT EXECUTED 53746: 2f2b 004a movel %a3@(74),%sp@- <== NOT EXECUTED 5374a: 4e95 jsr %a5@ <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 5374c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 53750: 4a80 tstl %d0 <== NOT EXECUTED 53752: 6654 bnes 537a8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 53754: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 53758: 2243 moveal %d3,%a1 <== NOT EXECUTED 5375a: 4e91 jsr %a1@ <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 5375c: 588f addql #4,%sp <== NOT EXECUTED 5375e: 4a80 tstl %d0 <== NOT EXECUTED 53760: 6646 bnes 537a8 <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 53762: 4280 clrl %d0 <== NOT EXECUTED 53764: 102b 0004 moveb %a3@(4),%d0 <== NOT EXECUTED 53768: b5c0 cmpal %d0,%a2 <== NOT EXECUTED 5376a: 65ce bcss 5373a <== NOT EXECUTED 5376c: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53770: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 53774: 2246 moveal %d6,%a1 <== NOT EXECUTED 53776: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53778: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5377a: 4e91 jsr %a1@ <== NOT EXECUTED if ( rc != RC_OK ) 5377c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53780: 4a80 tstl %d0 <== NOT EXECUTED 53782: 6784 beqs 53708 <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53784: 2800 movel %d0,%d4 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } return rc; } 53786: 2004 movel %d4,%d0 <== NOT EXECUTED 53788: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5378e: 4e5e unlk %fp <== NOT EXECUTED 53790: 4e75 rts <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 53792: 4281 clrl %d1 <== NOT EXECUTED 53794: 2840 moveal %d0,%a4 <== NOT EXECUTED 53796: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED 5379a: 558c subql #2,%a4 <== NOT EXECUTED 5379c: 2e0c movel %a4,%d7 <== NOT EXECUTED 5379e: e3af lsll %d1,%d7 <== NOT EXECUTED 537a0: 2847 moveal %d7,%a4 <== NOT EXECUTED 537a2: d9e8 002c addal %a0@(44),%a4 <== NOT EXECUTED 537a6: 608a bras 53732 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); 537a8: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 537ae: 78ff moveq #-1,%d4 <== NOT EXECUTED 537b0: 7a05 moveq #5,%d5 <== NOT EXECUTED 537b2: 2040 moveal %d0,%a0 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 537b4: 2004 movel %d4,%d0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); 537b6: 2085 movel %d5,%a0@ <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 537b8: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 537be: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053162 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 53162: 4e56 ffcc linkw %fp,#-52 53166: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 5316a: 266e 0008 moveal %fp@(8),%a3 5316e: 242e 0010 movel %fp@(16),%d2 53172: 2a6e 0014 moveal %fp@(20),%a5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 53176: 286b 0034 moveal %a3@(52),%a4 rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 5317a: 246e 000c moveal %fp@(12),%a2 uint32_t old_last_cl; uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 5317e: 2a82 movel %d2,%a5@ if (new_length <= fat_fd->fat_file_size) 53180: 202a 0018 movel %a2@(24),%d0 uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; 53184: 42ae fff0 clrl %fp@(-16) uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 53188: 42ae fff8 clrl %fp@(-8) uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 5318c: b082 cmpl %d2,%d0 5318e: 6400 00c4 bccw 53254 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 53192: 7201 moveq #1,%d1 53194: b2aa 0020 cmpl %a2@(32),%d1 53198: 6700 00c8 beqw 53262 (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 5319c: 4283 clrl %d3 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 5319e: 2a02 movel %d2,%d5 531a0: 9a80 subl %d0,%d5 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 531a2: 362c 0006 movew %a4@(6),%d3 531a6: 2203 movel %d3,%d1 531a8: 5381 subql #1,%d1 531aa: c081 andl %d1,%d0 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - 531ac: 9680 subl %d0,%d3 531ae: c681 andl %d1,%d3 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; if (bytes2add > bytes_remain) 531b0: ba83 cmpl %d3,%d5 531b2: 6300 00a0 blsw 53254 bytes2add -= bytes_remain; 531b6: 9a83 subl %d3,%d5 /* * if in last cluster allocated for the file there is enough room to * handle extention (hence we don't need to add even one cluster to the * file ) - return */ if (bytes2add == 0) 531b8: 6700 009a beqw 53254 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 531bc: 4280 clrl %d0 531be: 102c 0008 moveb %a4@(8),%d0 531c2: 2c05 movel %d5,%d6 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 531c4: 486e fff8 pea %fp@(-8) * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 531c8: 5386 subql #1,%d6 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 531ca: 486e fffc pea %fp@(-4) * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 531ce: e0ae lsrl %d0,%d6 531d0: 5286 addql #1,%d6 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 531d2: 2f06 movel %d6,%sp@- 531d4: 486e fff0 pea %fp@(-16) 531d8: 2f0b movel %a3,%sp@- 531da: 4eb9 0005 bd46 jsr 5bd46 &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 531e0: 4fef 0014 lea %sp@(20),%sp if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 531e4: 2800 movel %d0,%d4 &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 531e6: 6660 bnes 53248 <== NEVER TAKEN return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 531e8: 202e fffc movel %fp@(-4),%d0 531ec: 6606 bnes 531f4 <== ALWAYS TAKEN 531ee: 4a83 tstl %d3 <== NOT EXECUTED 531f0: 6700 0086 beqw 53278 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 531f4: b086 cmpl %d6,%d0 531f6: 6720 beqs 53218 <== ALWAYS TAKEN *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 531f8: 2200 movel %d0,%d1 <== NOT EXECUTED 531fa: 4681 notl %d1 <== NOT EXECUTED 531fc: dc81 addl %d1,%d6 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 531fe: 4281 clrl %d1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 53200: 4283 clrl %d3 <== NOT EXECUTED 53202: 162c 0008 moveb %a4@(8),%d3 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 53206: 322c 0006 movew %a4@(6),%d1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 5320a: e7ae lsll %d3,%d6 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 5320c: 5381 subql #1,%d1 <== NOT EXECUTED 5320e: ca81 andl %d1,%d5 <== NOT EXECUTED if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - 53210: 2202 movel %d2,%d1 <== NOT EXECUTED 53212: 9286 subl %d6,%d1 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 53214: 9285 subl %d5,%d1 <== NOT EXECUTED 53216: 2a81 movel %d1,%a5@ <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 53218: 206a 0018 moveal %a2@(24),%a0 5321c: 4a88 tstl %a0 5321e: 6672 bnes 53292 { fat_fd->map.disk_cln = fat_fd->cln = chain; 53220: 222e fff0 movel %fp@(-16),%d1 fat_fd->map.file_cln = 0; 53224: 42aa 0032 clrl %a2@(50) (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) { fat_fd->map.disk_cln = fat_fd->cln = chain; 53228: 2541 001c movel %d1,%a2@(28) 5322c: 2541 0036 movel %d1,%a2@(54) } fat_buf_release(fs_info); } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 53230: 4a80 tstl %d0 53232: 6710 beqs 53244 <== NEVER TAKEN { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) 53234: 7601 moveq #1,%d3 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) { fat_fd->map.last_cln = last_cl; 53236: 256e fff8 003a movel %fp@(-8),%a2@(58) if (fat_fd->fat_file_type == FAT_DIRECTORY) 5323c: b6aa 0010 cmpl %a2@(16),%d3 53240: 6700 0086 beqw 532c8 return rc; } } } fat_fd->fat_file_size = new_length; 53244: 2542 0018 movel %d2,%a2@(24) return RC_OK; } 53248: 2004 movel %d4,%d0 5324a: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 53250: 4e5e unlk %fp 53252: 4e75 rts * if in last cluster allocated for the file there is enough room to * handle extention (hence we don't need to add even one cluster to the * file ) - return */ if (bytes2add == 0) return RC_OK; 53254: 4284 clrl %d4 } fat_fd->fat_file_size = new_length; return RC_OK; } 53256: 2004 movel %d4,%d0 53258: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 5325e: 4e5e unlk %fp 53260: 4e75 rts *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 53262: 4aaa 0024 tstl %a2@(36) <== NOT EXECUTED 53266: 6600 ff34 bnew 5319c <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 5326a: 4281 clrl %d1 <== NOT EXECUTED 5326c: 122c 000a moveb %a4@(10),%d1 <== NOT EXECUTED 53270: 7603 moveq #3,%d3 <== NOT EXECUTED 53272: c283 andl %d3,%d1 <== NOT EXECUTED *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 53274: 6700 ff26 beqw 5319c <== NOT EXECUTED if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); 53278: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5327e: 78ff moveq #-1,%d4 <== NOT EXECUTED 53280: 761c moveq #28,%d3 <== NOT EXECUTED 53282: 2040 moveal %d0,%a0 <== NOT EXECUTED } fat_fd->fat_file_size = new_length; return RC_OK; } 53284: 2004 movel %d4,%d0 <== NOT EXECUTED if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); 53286: 2083 movel %d3,%a0@ <== NOT EXECUTED } fat_fd->fat_file_size = new_length; return RC_OK; } 53288: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 <== NOT EXECUTED 5328e: 4e5e unlk %fp <== NOT EXECUTED 53290: 4e75 rts <== NOT EXECUTED fat_fd->map.disk_cln = fat_fd->cln = chain; fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 53292: 202a 003a movel %a2@(58),%d0 53296: 72ff moveq #-1,%d1 53298: b280 cmpl %d0,%d1 5329a: 675c beqs 532f8 <== NEVER TAKEN fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 5329c: 2f2e fff0 movel %fp@(-16),%sp@- 532a0: 2f00 movel %d0,%sp@- } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) { old_last_cl = fat_fd->map.last_cln; 532a2: 2d40 fff4 movel %d0,%fp@(-12) fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 532a6: 2f0b movel %a3,%sp@- 532a8: 4eb9 0005 b9da jsr 5b9da if ( rc != RC_OK ) 532ae: 4fef 000c lea %sp@(12),%sp 532b2: 4a80 tstl %d0 532b4: 6626 bnes 532dc <== NEVER TAKEN { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 532b6: 2f0c movel %a4,%sp@- 532b8: 4eb9 0005 3a90 jsr 53a90 532be: 202e fffc movel %fp@(-4),%d0 532c2: 588f addql #4,%sp 532c4: 6000 ff6a braw 53230 if (cls_added != 0) { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); 532c8: 2f2e fff0 movel %fp@(-16),%sp@- 532cc: 2f0b movel %a3,%sp@- 532ce: 4eb9 0005 3e7e jsr 53e7e if ( rc != RC_OK ) 532d4: 508f addql #8,%sp 532d6: 4a80 tstl %d0 532d8: 6700 ff6a beqw 53244 { fat_free_fat_clusters_chain(mt_entry, chain); 532dc: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED return rc; 532e0: 2800 movel %d0,%d4 <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(mt_entry, chain); 532e2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 532e4: 4eb9 0005 bc70 jsr 5bc70 <== NOT EXECUTED return rc; 532ea: 508f addql #8,%sp <== NOT EXECUTED } fat_fd->fat_file_size = new_length; return RC_OK; } 532ec: 2004 movel %d4,%d0 <== NOT EXECUTED 532ee: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 <== NOT EXECUTED 532f4: 4e5e unlk %fp <== NOT EXECUTED 532f6: 4e75 rts <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 532f8: 486e fff4 pea %fp@(-12) <== NOT EXECUTED 532fc: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 53300: 4878 0001 pea 1 <== NOT EXECUTED 53304: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53306: 2f0b movel %a3,%sp@- <== NOT EXECUTED 53308: 4eb9 0005 30b0 jsr 530b0 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 5330e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 53312: 4a80 tstl %d0 <== NOT EXECUTED 53314: 66c6 bnes 532dc <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 53316: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(mt_entry, chain); return rc; 5331a: 202e fff4 movel %fp@(-12),%d0 <== NOT EXECUTED } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 5331e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53320: 2f0b movel %a3,%sp@- <== NOT EXECUTED 53322: 4eb9 0005 b9da jsr 5b9da <== NOT EXECUTED if ( rc != RC_OK ) 53328: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5332c: 4a80 tstl %d0 <== NOT EXECUTED 5332e: 6786 beqs 532b6 <== NOT EXECUTED 53330: 60aa bras 532dc <== NOT EXECUTED =============================================================================== 000530b0 : uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 530b0: 7001 moveq #1,%d0 fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 530b2: 4e56 fff0 linkw %fp,#-16 530b6: 226e 0008 moveal %fp@(8),%a1 530ba: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 530be: 206e 000c moveal %fp@(12),%a0 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 530c2: 2669 0034 moveal %a1@(52),%a3 uint32_t cur_cln = 0; 530c6: 42ae fffc clrl %fp@(-4) uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 530ca: b0ae 0010 cmpl %fp@(16),%d0 530ce: 6718 beqs 530e8 <== ALWAYS TAKEN *ret = cur_cln; break; default: errno = EINVAL; 530d0: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 530d6: 7216 moveq #22,%d1 <== NOT EXECUTED 530d8: 2040 moveal %d0,%a0 <== NOT EXECUTED rc = -1; 530da: 70ff moveq #-1,%d0 <== NOT EXECUTED *ret = cur_cln; break; default: errno = EINVAL; 530dc: 2081 movel %d1,%a0@ <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 530de: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 530e4: 4e5e unlk %fp <== NOT EXECUTED 530e6: 4e75 rts <== NOT EXECUTED va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 530e8: 202e 0014 movel %fp@(20),%d0 ret = va_arg(ap, uint32_t *); 530ec: 246e 0018 moveal %fp@(24),%a2 /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 530f0: b0a8 0018 cmpl %a0@(24),%d0 530f4: 6454 bccs 5314a <== NEVER TAKEN va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 530f6: 7201 moveq #1,%d1 530f8: b2a8 0020 cmpl %a0@(32),%d1 530fc: 672c beqs 5312a break; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 530fe: 486e fffc pea %fp@(-4) *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; 53102: 4281 clrl %d1 53104: 122b 0008 moveb %a3@(8),%d1 53108: e2a8 lsrl %d1,%d0 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 5310a: 2f00 movel %d0,%sp@- 5310c: 2f08 movel %a0,%sp@- 5310e: 2f09 movel %a1,%sp@- 53110: 4eba f802 jsr %pc@(52914 ) if ( rc != RC_OK ) 53114: 4fef 0010 lea %sp@(16),%sp break; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 53118: 2001 movel %d1,%d0 if ( rc != RC_OK ) 5311a: 66c2 bnes 530de <== NEVER TAKEN break; *ret = cur_cln; 5311c: 24ae fffc movel %fp@(-4),%a2@ rc = -1; break; } va_end(ap); return rc; } 53120: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 53126: 4e5e unlk %fp 53128: 4e75 rts if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 5312a: 4aa8 0024 tstl %a0@(36) 5312e: 66ce bnes 530fe <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 53130: 4281 clrl %d1 53132: 122b 000a moveb %a3@(10),%d1 53136: 7403 moveq #3,%d2 53138: c282 andl %d2,%d1 if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 5313a: 67c2 beqs 530fe <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 5313c: 4292 clrl %a2@ rc = RC_OK; 5313e: 4280 clrl %d0 rc = -1; break; } va_end(ap); return rc; } 53140: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 53146: 4e5e unlk %fp 53148: 4e75 rts ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 5314a: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53150: 7405 moveq #5,%d2 <== NOT EXECUTED 53152: 2040 moveal %d0,%a0 <== NOT EXECUTED 53154: 70ff moveq #-1,%d0 <== NOT EXECUTED 53156: 2082 movel %d2,%a0@ <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 53158: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 5315e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052914 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 52914: 4e56 ffdc linkw %fp,#-36 52918: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 5291c: 266e 000c moveal %fp@(12),%a3 52920: 282e 0008 movel %fp@(8),%d4 52924: 2c2e 0010 movel %fp@(16),%d6 52928: 286e 0014 moveal %fp@(20),%a4 int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 5292c: 202b 0032 movel %a3@(50),%d0 52930: bc80 cmpl %d0,%d6 52932: 676c beqs 529a0 <== ALWAYS TAKEN { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 52934: 634e blss 52984 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 52936: 206b 0036 moveal %a3@(54),%a0 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 5293a: 2606 movel %d6,%d3 <== NOT EXECUTED 5293c: 9680 subl %d0,%d3 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 5293e: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 52942: 4a83 tstl %d3 <== NOT EXECUTED 52944: 6726 beqs 5296c <== NOT EXECUTED 52946: 2a0e movel %fp,%d5 <== NOT EXECUTED 52948: 4282 clrl %d2 <== NOT EXECUTED 5294a: 5985 subql #4,%d5 <== NOT EXECUTED 5294c: 45f9 0005 b828 lea 5b828 ,%a2 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 52952: 2f05 movel %d5,%sp@- <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 52954: 5282 addql #1,%d2 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 52956: 2f08 movel %a0,%sp@- <== NOT EXECUTED 52958: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5295a: 4e92 jsr %a2@ <== NOT EXECUTED if ( rc != RC_OK ) 5295c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52960: 4a80 tstl %d0 <== NOT EXECUTED 52962: 662c bnes 52990 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 52964: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 52968: b682 cmpl %d2,%d3 <== NOT EXECUTED 5296a: 66e6 bnes 52952 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 5296c: 2746 0032 movel %d6,%a3@(50) <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 52970: 2748 0036 movel %a0,%a3@(54) <== NOT EXECUTED *disk_cln = cur_cln; } return RC_OK; 52974: 4280 clrl %d0 <== NOT EXECUTED 52976: 4281 clrl %d1 <== NOT EXECUTED /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; 52978: 2888 movel %a0,%a4@ <== NOT EXECUTED } return RC_OK; } 5297a: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 52980: 4e5e unlk %fp <== NOT EXECUTED 52982: 4e75 rts <== NOT EXECUTED cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 52984: 206b 001c moveal %a3@(28),%a0 <== NOT EXECUTED 52988: 2606 movel %d6,%d3 <== NOT EXECUTED 5298a: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 5298e: 60b2 bras 52942 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 52990: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED /* skip over the clusters */ for (i = 0; i < count; i++) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; 52996: 2200 movel %d0,%d1 <== NOT EXECUTED 52998: 5bc0 smi %d0 <== NOT EXECUTED 5299a: 49c0 extbl %d0 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 5299c: 4e5e unlk %fp <== NOT EXECUTED 5299e: 4e75 rts <== NOT EXECUTED ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 529a0: 28ab 0036 movel %a3@(54),%a4@ fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 529a4: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; 529aa: 4280 clrl %d0 529ac: 4281 clrl %d1 } 529ae: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000535ae : uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 535ae: 7001 moveq #1,%d0 <== NOT EXECUTED void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 535b0: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 535b4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 535b8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED 535bc: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 535c0: 2668 0034 moveal %a0@(52),%a3 <== NOT EXECUTED 535c4: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 535c8: b081 cmpl %d1,%d0 <== NOT EXECUTED 535ca: 6700 008c beqw 53658 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 535ce: 4a81 tstl %d1 <== NOT EXECUTED 535d0: 666e bnes 53640 <== NOT EXECUTED 535d2: 4280 clrl %d0 <== NOT EXECUTED 535d4: 102b 000a moveb %a3@(10),%d0 <== NOT EXECUTED 535d8: 7403 moveq #3,%d2 <== NOT EXECUTED 535da: c082 andl %d2,%d0 <== NOT EXECUTED 535dc: 6762 beqs 53640 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 535de: 4280 clrl %d0 <== NOT EXECUTED 535e0: 102b 0003 moveb %a3@(3),%d0 <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 535e4: 222b 001a movel %a3@(26),%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 535e8: e1a9 lsll %d0,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 535ea: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 535ee: 7609 moveq #9,%d3 <== NOT EXECUTED 535f0: 2400 movel %d0,%d2 <== NOT EXECUTED 535f2: e6aa lsrl %d3,%d2 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 535f4: d282 addl %d2,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 535f6: 740f moveq #15,%d2 <== NOT EXECUTED 535f8: ea88 lsrl #5,%d0 <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 535fa: 163c 0001 moveb #1,%d3 <== NOT EXECUTED fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 535fe: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 53600: c082 andl %d2,%d0 <== NOT EXECUTED 53602: 2f0a movel %a2,%sp@- <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 53604: 2401 movel %d1,%d2 <== NOT EXECUTED 53606: d480 addl %d0,%d2 <== NOT EXECUTED 53608: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract> <== NOT EXECUTED */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 5360e: 7001 moveq #1,%d0 <== NOT EXECUTED 53610: c082 andl %d2,%d0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 53612: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53614: 2200 movel %d0,%d1 <== NOT EXECUTED 53616: e988 lsll #4,%d0 <== NOT EXECUTED 53618: e589 lsll #2,%d1 <== NOT EXECUTED 5361a: 9081 subl %d1,%d0 <== NOT EXECUTED 5361c: d0ab 005e addl %a3@(94),%d0 <== NOT EXECUTED 53620: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53622: 4eb9 0004 bb40 jsr 4bb40 <_Chain_Append> <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 53628: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5362c: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 53630: 8083 orl %d3,%d0 <== NOT EXECUTED 53632: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED } 53636: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 5363c: 4e5e unlk %fp <== NOT EXECUTED 5363e: 4e75 rts <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 53640: 4280 clrl %d0 <== NOT EXECUTED 53642: 102b 0005 moveb %a3@(5),%d0 <== NOT EXECUTED 53646: 5581 subql #2,%d1 <== NOT EXECUTED 53648: e1a9 lsll %d0,%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 5364a: 4280 clrl %d0 <== NOT EXECUTED 5364c: 102b 0003 moveb %a3@(3),%d0 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 53650: d2ab 002c addl %a3@(44),%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 53654: e1a9 lsll %d0,%d1 <== NOT EXECUTED 53656: 6092 bras 535ea <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 53658: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 5365c: 7609 moveq #9,%d3 <== NOT EXECUTED 5365e: 2400 movel %d0,%d2 <== NOT EXECUTED 53660: e6aa lsrl %d3,%d2 <== NOT EXECUTED ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; 53662: 7201 moveq #1,%d1 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 53664: d282 addl %d2,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 53666: 740f moveq #15,%d2 <== NOT EXECUTED 53668: ea88 lsrl #5,%d0 <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 5366a: 163c 0001 moveb #1,%d3 <== NOT EXECUTED fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 5366e: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 53670: c082 andl %d2,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 53672: 2f0a movel %a2,%sp@- <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 53674: 2401 movel %d1,%d2 <== NOT EXECUTED 53676: d480 addl %d0,%d2 <== NOT EXECUTED 53678: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract> <== NOT EXECUTED */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 5367e: 7001 moveq #1,%d0 <== NOT EXECUTED 53680: c082 andl %d2,%d0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 53682: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53684: 2200 movel %d0,%d1 <== NOT EXECUTED 53686: e988 lsll #4,%d0 <== NOT EXECUTED 53688: e589 lsll #2,%d1 <== NOT EXECUTED 5368a: 9081 subl %d1,%d0 <== NOT EXECUTED 5368c: d0ab 005e addl %a3@(94),%d0 <== NOT EXECUTED 53690: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53692: 4eb9 0004 bb40 jsr 4bb40 <_Chain_Append> <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 53698: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5369c: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 536a0: 8083 orl %d3,%d0 <== NOT EXECUTED 536a2: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED } 536a6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 536ac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000529b2 : uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 529b2: 7201 moveq #1,%d1 fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 529b4: 4e56 ffdc linkw %fp,#-36 529b8: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 529bc: 282e 0008 movel %fp@(8),%d4 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 529c0: 2044 moveal %d4,%a0 fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 529c2: 286e 000c moveal %fp@(12),%a4 529c6: 2a6e 0010 moveal %fp@(16),%a5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 529ca: 2468 0034 moveal %a0@(52),%a2 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 529ce: 2014 movel %a4@,%d0 529d0: b280 cmpl %d0,%d1 529d2: 6700 020a beqw 52bde uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 529d6: 4a80 tstl %d0 529d8: 6600 016e bnew 52b48 529dc: 4281 clrl %d1 529de: 122a 000a moveb %a2@(10),%d1 529e2: 7403 moveq #3,%d2 529e4: c282 andl %d2,%d1 529e6: 6700 0160 beqw 52b48 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 529ea: 4281 clrl %d1 529ec: 122a 0003 moveb %a2@(3),%d1 ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 529f0: 202a 001a movel %a2@(26),%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 529f4: e3a8 lsll %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 529f6: 242c 0004 movel %a4@(4),%d2 529fa: 7609 moveq #9,%d3 529fc: 2202 movel %d2,%d1 529fe: e6a9 lsrl %d3,%d1 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52a00: d081 addl %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52a02: ea8a lsrl #5,%d2 52a04: 7a0f moveq #15,%d5 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 52a06: 163c 0001 moveb #1,%d3 fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52a0a: e988 lsll #4,%d0 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52a0c: c485 andl %d5,%d2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 52a0e: 226a 005a moveal %a2@(90),%a1 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52a12: d480 addl %d0,%d2 52a14: c682 andl %d2,%d3 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 52a16: 2003 movel %d3,%d0 52a18: e98b lsll #4,%d3 52a1a: e588 lsll #2,%d0 52a1c: 9680 subl %d0,%d3 52a1e: d3c3 addal %d3,%a1 52a20: 2059 moveal %a1@+,%a0 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 52a22: b3c8 cmpal %a0,%a1 52a24: 6752 beqs 52a78 52a26: 2228 0020 movel %a0@(32),%d1 register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52a2a: 2001 movel %d1,%d0 52a2c: 5580 subql #2,%d0 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 52a2e: 7c01 moveq #1,%d6 52a30: bc81 cmpl %d1,%d6 52a32: 6700 0158 beqw 52b8c uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 52a36: 4a81 tstl %d1 52a38: 6600 0128 bnew 52b62 52a3c: 4281 clrl %d1 52a3e: 122a 000a moveb %a2@(10),%d1 52a42: 7a03 moveq #3,%d5 52a44: c285 andl %d5,%d1 52a46: 6700 011a beqw 52b62 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52a4a: 4281 clrl %d1 52a4c: 122a 0003 moveb %a2@(3),%d1 ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 52a50: 202a 001a movel %a2@(26),%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52a54: e3a8 lsll %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52a56: 2228 0024 movel %a0@(36),%d1 52a5a: 7c09 moveq #9,%d6 52a5c: 2a01 movel %d1,%d5 52a5e: ecad lsrl %d6,%d5 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52a60: d085 addl %d5,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52a62: ea89 lsrl #5,%d1 52a64: 7a0f moveq #15,%d5 fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52a66: e988 lsll #4,%d0 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52a68: c285 andl %d5,%d1 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52a6a: d081 addl %d1,%d0 { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 52a6c: b082 cmpl %d2,%d0 52a6e: 6700 010a beqw 52b7a { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 52a72: 2050 moveal %a0@,%a0 ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 52a74: b3c8 cmpal %a0,%a1 52a76: 66ae bnes 52a26 52a78: 226a 005e moveal %a2@(94),%a1 52a7c: d3c3 addal %d3,%a1 52a7e: 2059 moveal %a1@+,%a0 52a80: b3c8 cmpal %a0,%a1 52a82: 674e beqs 52ad2 <== ALWAYS TAKEN 52a84: 2228 0020 movel %a0@(32),%d1 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 52a88: 7c01 moveq #1,%d6 <== NOT EXECUTED 52a8a: bc81 cmpl %d1,%d6 <== NOT EXECUTED 52a8c: 6700 0130 beqw 52bbe <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 52a90: 4a81 tstl %d1 <== NOT EXECUTED 52a92: 6600 0110 bnew 52ba4 <== NOT EXECUTED 52a96: 4280 clrl %d0 <== NOT EXECUTED 52a98: 102a 000a moveb %a2@(10),%d0 <== NOT EXECUTED 52a9c: 7a03 moveq #3,%d5 <== NOT EXECUTED 52a9e: c085 andl %d5,%d0 <== NOT EXECUTED 52aa0: 6700 0102 beqw 52ba4 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52aa4: 4280 clrl %d0 <== NOT EXECUTED 52aa6: 102a 0003 moveb %a2@(3),%d0 <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 52aaa: 222a 001a movel %a2@(26),%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52aae: e1a9 lsll %d0,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52ab0: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 52ab4: 7c09 moveq #9,%d6 <== NOT EXECUTED 52ab6: 2a00 movel %d0,%d5 <== NOT EXECUTED 52ab8: ecad lsrl %d6,%d5 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52aba: d285 addl %d5,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52abc: ea88 lsrl #5,%d0 <== NOT EXECUTED 52abe: 7a0f moveq #15,%d5 <== NOT EXECUTED fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52ac0: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52ac2: c085 andl %d5,%d0 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52ac4: d081 addl %d1,%d0 <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 52ac6: b082 cmpl %d2,%d0 <== NOT EXECUTED 52ac8: 6700 00c8 beqw 52b92 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 52acc: 2050 moveal %a0@,%a0 <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 52ace: b3c8 cmpal %a0,%a1 <== NOT EXECUTED 52ad0: 66b2 bnes 52a84 <== NOT EXECUTED return 0; } } the_node = the_node->next; } return -1; 52ad2: 7aff moveq #-1,%d5 } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 52ad4: 4878 0042 pea 42 52ad8: 4eb9 0004 6f84 jsr 46f84 if ( lfat_fd == NULL ) 52ade: 588f addql #4,%sp } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 52ae0: 2640 moveal %d0,%a3 52ae2: 2a80 movel %d0,%a5@ if ( lfat_fd == NULL ) 52ae4: 6700 0164 beqw 52c4a rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 52ae8: 4878 0042 pea 42 lfat_fd->links_num = 1; 52aec: 7c01 moveq #1,%d6 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 52aee: 42a7 clrl %sp@- 52af0: 2f00 movel %d0,%sp@- 52af2: 4eb9 0005 e310 jsr 5e310 lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 52af8: 275c 0020 movel %a4@+,%a3@(32) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 52afc: 72fe moveq #-2,%d1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) 52afe: 4fef 000c lea %sp@(12),%sp lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 52b02: 275c 0024 movel %a4@+,%a3@(36) 52b06: 275c 0028 movel %a4@+,%a3@(40) 52b0a: 2754 002c movel %a4@,%a3@(44) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 52b0e: 102b 0030 moveb %a3@(48),%d0 if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; 52b12: 2746 0008 movel %d6,%a3@(8) lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 52b16: 7cff moveq #-1,%d6 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 52b18: c081 andl %d1,%d0 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 52b1a: 2746 003a movel %d6,%a3@(58) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 52b1e: 1740 0030 moveb %d0,%a3@(48) lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) 52b22: 4a85 tstl %d5 52b24: 6700 00f0 beqw 52c16 lfat_fd->ino = key; 52b28: 2742 000c movel %d2,%a3@(12) 52b2c: 2f0b movel %a3,%sp@- 52b2e: d6aa 005a addl %a2@(90),%d3 52b32: 2f03 movel %d3,%sp@- 52b34: 4eb9 0004 bb40 jsr 4bb40 <_Chain_Append> /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 52b3a: 508f addql #8,%sp 52b3c: 4280 clrl %d0 } 52b3e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 52b44: 4e5e unlk %fp 52b46: 4e75 rts register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52b48: 4281 clrl %d1 52b4a: 122a 0005 moveb %a2@(5),%d1 52b4e: 5580 subql #2,%d0 52b50: e3a8 lsll %d1,%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52b52: 4281 clrl %d1 52b54: 122a 0003 moveb %a2@(3),%d1 register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52b58: d0aa 002c addl %a2@(44),%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52b5c: e3a8 lsll %d1,%d0 52b5e: 6000 fe96 braw 529f6 register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52b62: 4281 clrl %d1 52b64: 122a 0005 moveb %a2@(5),%d1 52b68: e3a8 lsll %d1,%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52b6a: 4281 clrl %d1 52b6c: 122a 0003 moveb %a2@(3),%d1 register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52b70: d0aa 002c addl %a2@(44),%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52b74: e3a8 lsll %d1,%d0 52b76: 6000 fede braw 52a56 /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 52b7a: 2a88 movel %a0,%a5@ lfat_fd->links_num++; return rc; 52b7c: 4280 clrl %d0 rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; 52b7e: 52a8 0008 addql #1,%a0@(8) * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 52b82: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 52b88: 4e5e unlk %fp 52b8a: 4e75 rts ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; 52b8c: 7001 moveq #1,%d0 52b8e: 6000 fec6 braw 52a56 fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 52b92: 4a82 tstl %d2 <== NOT EXECUTED 52b94: 6708 beqs 52b9e <== NOT EXECUTED 52b96: b4a8 000c cmpl %a0@(12),%d2 <== NOT EXECUTED 52b9a: 6600 ff30 bnew 52acc <== NOT EXECUTED { *ret = (void *)the_node; return 0; 52b9e: 4285 clrl %d5 <== NOT EXECUTED 52ba0: 6000 ff32 braw 52ad4 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52ba4: 4280 clrl %d0 <== NOT EXECUTED 52ba6: 102a 0005 moveb %a2@(5),%d0 <== NOT EXECUTED 52baa: 5581 subql #2,%d1 <== NOT EXECUTED 52bac: e1a9 lsll %d0,%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52bae: 4280 clrl %d0 <== NOT EXECUTED 52bb0: 102a 0003 moveb %a2@(3),%d0 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52bb4: d2aa 002c addl %a2@(44),%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52bb8: e1a9 lsll %d0,%d1 <== NOT EXECUTED 52bba: 6000 fef4 braw 52ab0 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52bbe: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 52bc2: 7c09 moveq #9,%d6 <== NOT EXECUTED 52bc4: 2a00 movel %d0,%d5 <== NOT EXECUTED 52bc6: ecad lsrl %d6,%d5 <== NOT EXECUTED ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; 52bc8: 7201 moveq #1,%d1 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52bca: d285 addl %d5,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52bcc: ea88 lsrl #5,%d0 <== NOT EXECUTED 52bce: 7a0f moveq #15,%d5 <== NOT EXECUTED fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52bd0: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52bd2: c085 andl %d5,%d0 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52bd4: d081 addl %d1,%d0 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 52bd6: b082 cmpl %d2,%d0 <== NOT EXECUTED 52bd8: 6600 fef2 bnew 52acc <== NOT EXECUTED 52bdc: 60b4 bras 52b92 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52bde: 242c 0004 movel %a4@(4),%d2 52be2: 7609 moveq #9,%d3 52be4: 2202 movel %d2,%d1 52be6: e6a9 lsrl %d3,%d1 52be8: 7001 moveq #1,%d0 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52bea: d081 addl %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52bec: ea8a lsrl #5,%d2 52bee: 7a0f moveq #15,%d5 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 52bf0: 163c 0001 moveb #1,%d3 fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52bf4: e988 lsll #4,%d0 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52bf6: c485 andl %d5,%d2 52bf8: 226a 005a moveal %a2@(90),%a1 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52bfc: d480 addl %d0,%d2 52bfe: c682 andl %d2,%d3 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 52c00: 2003 movel %d3,%d0 52c02: e98b lsll #4,%d3 52c04: e588 lsll #2,%d0 52c06: 9680 subl %d0,%d3 52c08: d3c3 addal %d3,%a1 52c0a: 2059 moveal %a1@+,%a0 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 52c0c: b3c8 cmpal %a0,%a1 52c0e: 6600 fe16 bnew 52a26 52c12: 6000 fe64 braw 52a78 if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 52c16: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52c18: 4eb9 0005 3f70 jsr 53f70 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 52c1e: 588f addql #4,%sp <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 52c20: 2740 000c movel %d0,%a3@(12) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 52c24: 6600 ff06 bnew 52b2c <== NOT EXECUTED { free((*fat_fd)); 52c28: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 52c2a: 4eb9 0004 680c jsr 4680c <== NOT EXECUTED /* * XXX: kernel resource is unsufficient, but not the memory, * but there is no suitable errno :( */ rtems_set_errno_and_return_minus_one( ENOMEM ); 52c30: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 52c36: 588f addql #4,%sp <== NOT EXECUTED 52c38: 720c moveq #12,%d1 <== NOT EXECUTED 52c3a: 2040 moveal %d0,%a0 <== NOT EXECUTED 52c3c: 70ff moveq #-1,%d0 <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 52c3e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED free((*fat_fd)); /* * XXX: kernel resource is unsufficient, but not the memory, * but there is no suitable errno :( */ rtems_set_errno_and_return_minus_one( ENOMEM ); 52c44: 2081 movel %d1,%a0@ <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 52c46: 4e5e unlk %fp <== NOT EXECUTED 52c48: 4e75 rts <== NOT EXECUTED /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 52c4a: 4eb9 0005 d92c jsr 5d92c <__errno> 52c50: 740c moveq #12,%d2 52c52: 2040 moveal %d0,%a0 52c54: 70ff moveq #-1,%d0 52c56: 2082 movel %d2,%a0@ * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 52c58: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 52c5e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052c74 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 52c74: 4e56 ffc8 linkw %fp,#-56 52c78: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52c7c: 246e 0008 moveal %fp@(8),%a2 52c80: 286e 000c moveal %fp@(12),%a4 52c84: 282e 0010 movel %fp@(16),%d4 52c88: 242e 0014 movel %fp@(20),%d2 int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 52c8c: 266a 0034 moveal %a2@(52),%a3 uint32_t cmpltd = 0; uint32_t cur_cln = 0; 52c90: 42ae fffc clrl %fp@(-4) uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) 52c94: 4a82 tstl %d2 52c96: 6700 0106 beqw 52d9e /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 52c9a: 202c 0018 movel %a4@(24),%d0 52c9e: b880 cmpl %d0,%d4 52ca0: 6400 00fc bccw 52d9e return FAT_EOF; if ((count > fat_fd->fat_file_size) || 52ca4: b082 cmpl %d2,%d0 52ca6: 6400 0102 bccw 52daa (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 52caa: 2400 movel %d0,%d2 <== NOT EXECUTED 52cac: 9484 subl %d4,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 52cae: 7001 moveq #1,%d0 52cb0: b0ac 0020 cmpl %a4@(32),%d0 52cb4: 6700 0106 beqw 52dbc return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 52cb8: 4280 clrl %d0 52cba: 102b 0008 moveb %a3@(8),%d0 52cbe: 2604 movel %d4,%d3 52cc0: e0ab lsrl %d0,%d3 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 52cc2: 3a2b 0006 movew %a3@(6),%d5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 52cc6: 486e fffc pea %fp@(-4) 52cca: 2f03 movel %d3,%sp@- 52ccc: 2f0c movel %a4,%sp@- return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 52cce: 2d43 fff8 movel %d3,%fp@(-8) save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 52cd2: 2f0a movel %a2,%sp@- 52cd4: 4eba fc3e jsr %pc@(52914 ) if (rc != RC_OK) 52cd8: 4fef 0010 lea %sp@(16),%sp 52cdc: 4a81 tstl %d1 52cde: 6600 0136 bnew 52e16 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 52ce2: 0285 0000 ffff andil #65535,%d5 52ce8: 5385 subql #1,%d5 52cea: c885 andl %d5,%d4 52cec: 2d44 fff4 movel %d4,%fp@(-12) rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 52cf0: 4a82 tstl %d2 52cf2: 6700 01ac beqw 52ea0 cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 52cf6: 2d4c fff0 movel %a4,%fp@(-16) return rc; while (count > 0) 52cfa: 2a2e fff4 movel %fp@(-12),%d5 cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 52cfe: 286e 0018 moveal %fp@(24),%a4 return rc; while (count > 0) 52d02: 9bcd subal %a5,%a5 cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 52d04: 1e2b 0002 moveb %a3@(2),%d7 52d08: 3c13 movew %a3@,%d6 return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 52d0a: 4280 clrl %d0 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 52d0c: 226e fffc moveal %fp@(-4),%a1 register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52d10: 2209 movel %a1,%d1 52d12: 5581 subql #2,%d1 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 52d14: 302b 0006 movew %a3@(6),%d0 52d18: 9085 subl %d5,%d0 52d1a: b480 cmpl %d0,%d2 52d1c: 6402 bccs 52d20 52d1e: 2002 movel %d2,%d0 fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 52d20: 206a 0034 moveal %a2@(52),%a0 uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 52d24: 4a89 tstl %a1 52d26: 6600 00fa bnew 52e22 52d2a: 4284 clrl %d4 <== NOT EXECUTED 52d2c: 1828 000a moveb %a0@(10),%d4 <== NOT EXECUTED 52d30: 7603 moveq #3,%d3 <== NOT EXECUTED 52d32: c883 andl %d3,%d4 <== NOT EXECUTED 52d34: 6700 00ec beqw 52e22 <== NOT EXECUTED return fs_info->vol.rdir_loc; 52d38: 2228 001a movel %a0@(26),%d1 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 52d3c: 4874 d800 pea %a4@(00000000,%a5:l) 52d40: 2041 moveal %d1,%a0 if ( ret < 0 ) return -1; count -= c; 52d42: 9480 subl %d0,%d2 cmpltd += c; 52d44: dbc0 addal %d0,%a5 { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 52d46: 0286 0000 ffff andil #65535,%d6 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 52d4c: 2f00 movel %d0,%sp@- { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 52d4e: 5386 subql #1,%d6 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 52d50: 0287 0000 00ff andil #255,%d7 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 52d56: cc85 andl %d5,%d6 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 52d58: eead lsrl %d7,%d5 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 52d5a: 2f06 movel %d6,%sp@- 52d5c: 4870 5800 pea %a0@(00000000,%d5:l) 52d60: 2f0a movel %a2,%sp@- 52d62: 4eb9 0005 3bf2 jsr 53bf2 <_fat_block_read> if ( ret < 0 ) 52d68: 4fef 0014 lea %sp@(20),%sp 52d6c: 4a80 tstl %d0 52d6e: 6d00 009a bltw 52e0a return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 52d72: 486e fffc pea %fp@(-4) if ( rc != RC_OK ) return rc; ofs = 0; 52d76: 4285 clrl %d5 if ( ret < 0 ) return -1; count -= c; cmpltd += c; save_cln = cur_cln; 52d78: 2c2e fffc movel %fp@(-4),%d6 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 52d7c: 2f06 movel %d6,%sp@- 52d7e: 2f0a movel %a2,%sp@- 52d80: 4eb9 0005 b828 jsr 5b828 if ( rc != RC_OK ) 52d86: 4fef 000c lea %sp@(12),%sp 52d8a: 4a80 tstl %d0 52d8c: 6612 bnes 52da0 <== NEVER TAKEN rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 52d8e: 4a82 tstl %d2 52d90: 6700 00e0 beqw 52e72 52d94: 1e2b 0002 moveb %a3@(2),%d7 <== NOT EXECUTED 52d98: 3c13 movew %a3@,%d6 <== NOT EXECUTED 52d9a: 6000 ff6e braw 52d0a <== NOT EXECUTED /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; 52d9e: 4280 clrl %d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 52da0: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 52da6: 4e5e unlk %fp 52da8: 4e75 rts */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) 52daa: 2200 movel %d0,%d1 52dac: 9282 subl %d2,%d1 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 52dae: b284 cmpl %d4,%d1 52db0: 6400 fefc bccw 52cae (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 52db4: 2400 movel %d0,%d2 <== NOT EXECUTED 52db6: 9484 subl %d4,%d2 <== NOT EXECUTED 52db8: 6000 fef4 braw 52cae <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 52dbc: 4aac 0024 tstl %a4@(36) 52dc0: 6600 fef6 bnew 52cb8 (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 52dc4: 4280 clrl %d0 52dc6: 102b 000a moveb %a3@(10),%d0 52dca: 7203 moveq #3,%d1 52dcc: c081 andl %d1,%d0 if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 52dce: 6700 fee8 beqw 52cb8 (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 52dd2: 202c 001c movel %a4@(28),%d0 uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 52dd6: 665a bnes 52e32 <== NEVER TAKEN return fs_info->vol.rdir_loc; 52dd8: 202b 001a movel %a3@(26),%d0 sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 52ddc: 4281 clrl %d1 ret = _fat_block_read(mt_entry, sec, byte, count, buf); 52dde: 2040 moveal %d0,%a0 52de0: 2f2e 0018 movel %fp@(24),%sp@- 52de4: 2f02 movel %d2,%sp@- if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 52de6: 3213 movew %a3@,%d1 52de8: 5381 subql #1,%d1 ret = _fat_block_read(mt_entry, sec, byte, count, buf); 52dea: c284 andl %d4,%d1 52dec: 2f01 movel %d1,%sp@- if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 52dee: 4281 clrl %d1 52df0: 122b 0002 moveb %a3@(2),%d1 52df4: e2ac lsrl %d1,%d4 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 52df6: 4870 4800 pea %a0@(00000000,%d4:l) 52dfa: 2f0a movel %a2,%sp@- 52dfc: 4eb9 0005 3bf2 jsr 53bf2 <_fat_block_read> if ( ret < 0 ) 52e02: 4fef 0014 lea %sp@(20),%sp 52e06: 4a80 tstl %d0 52e08: 6c96 bges 52da0 <== ALWAYS TAKEN sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 52e0a: 70ff moveq #-1,%d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 52e0c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52e12: 4e5e unlk %fp <== NOT EXECUTED 52e14: 4e75 rts <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 52e16: 2001 movel %d1,%d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 52e18: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52e1e: 4e5e unlk %fp <== NOT EXECUTED 52e20: 4e75 rts <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52e22: 4284 clrl %d4 52e24: 1828 0005 moveb %a0@(5),%d4 52e28: e9a9 lsll %d4,%d1 52e2a: d2a8 002c addl %a0@(44),%d1 52e2e: 6000 ff0c braw 52d3c 52e32: 4281 clrl %d1 <== NOT EXECUTED 52e34: 122b 0005 moveb %a3@(5),%d1 <== NOT EXECUTED 52e38: 5580 subql #2,%d0 <== NOT EXECUTED 52e3a: e3a8 lsll %d1,%d0 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 52e3c: 4281 clrl %d1 <== NOT EXECUTED 52e3e: d0ab 002c addl %a3@(44),%d0 <== NOT EXECUTED ret = _fat_block_read(mt_entry, sec, byte, count, buf); 52e42: 2040 moveal %d0,%a0 <== NOT EXECUTED 52e44: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 52e48: 2f02 movel %d2,%sp@- <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 52e4a: 3213 movew %a3@,%d1 <== NOT EXECUTED 52e4c: 5381 subql #1,%d1 <== NOT EXECUTED ret = _fat_block_read(mt_entry, sec, byte, count, buf); 52e4e: c284 andl %d4,%d1 <== NOT EXECUTED 52e50: 2f01 movel %d1,%sp@- <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 52e52: 4281 clrl %d1 <== NOT EXECUTED 52e54: 122b 0002 moveb %a3@(2),%d1 <== NOT EXECUTED 52e58: e2ac lsrl %d1,%d4 <== NOT EXECUTED byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 52e5a: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 52e5e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52e60: 4eb9 0005 3bf2 jsr 53bf2 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 52e66: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 52e6a: 4a80 tstl %d0 <== NOT EXECUTED 52e6c: 6c00 ff32 bgew 52da0 <== NOT EXECUTED 52e70: 6098 bras 52e0a <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 52e72: 206e fff4 moveal %fp@(-12),%a0 52e76: 4282 clrl %d2 52e78: 142b 0008 moveb %a3@(8),%d2 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ofs = 0; 52e7c: 200d movel %a5,%d0 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 52e7e: 41f0 d8ff lea %a0@(ffffffff,%a5:l),%a0 52e82: 286e fff0 moveal %fp@(-16),%a4 52e86: 2208 movel %a0,%d1 52e88: e4a9 lsrl %d2,%d1 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 52e8a: d2ae fff8 addl %fp@(-8),%d1 ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 52e8e: 2946 0036 movel %d6,%a4@(54) ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 52e92: 2941 0032 movel %d1,%a4@(50) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 52e96: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 52e9c: 4e5e unlk %fp 52e9e: 4e75 rts } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 52ea0: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 52ea4: 9bcd subal %a5,%a5 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 52ea6: 4282 clrl %d2 <== NOT EXECUTED 52ea8: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 52eac: 4286 clrl %d6 <== NOT EXECUTED 52eae: 4280 clrl %d0 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 52eb0: 41f0 d8ff lea %a0@(ffffffff,%a5:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 52eb4: 2946 0036 movel %d6,%a4@(54) <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 52eb8: 2208 movel %a0,%d1 <== NOT EXECUTED 52eba: e4a9 lsrl %d2,%d1 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 52ebc: d2ae fff8 addl %fp@(-8),%d1 <== NOT EXECUTED 52ec0: 2941 0032 movel %d1,%a4@(50) <== NOT EXECUTED 52ec4: 60d0 bras 52e96 <== NOT EXECUTED =============================================================================== 000537c2 : fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 537c2: 7001 moveq #1,%d0 int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 537c4: 4e56 ffe0 linkw %fp,#-32 537c8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 537cc: 266e 000c moveal %fp@(12),%a3 537d0: 286e 0008 moveal %fp@(8),%a4 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 537d4: 242b 001c movel %a3@(28),%d2 rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 537d8: 246c 0034 moveal %a4@(52),%a2 uint32_t cur_cln = fat_fd->cln; 537dc: 2d42 fffc movel %d2,%fp@(-4) uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 537e0: b0ab 0020 cmpl %a3@(32),%d0 537e4: 6760 beqs 53846 <== NEVER TAKEN return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 537e6: 2002 movel %d2,%d0 537e8: c0aa 000c andl %a2@(12),%d0 { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 537ec: 42ab 0018 clrl %a3@(24) while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 537f0: b0aa 0010 cmpl %a2@(16),%d0 537f4: 6474 bccs 5386a <== NEVER TAKEN 537f6: 260e movel %fp,%d3 537f8: 5983 subql #4,%d3 537fa: 4bf9 0005 b828 lea 5b828 ,%a5 { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53800: 2f03 movel %d3,%sp@- 53802: 2f02 movel %d2,%sp@- 53804: 2f0c movel %a4,%sp@- 53806: 4e95 jsr %a5@ if ( rc != RC_OK ) 53808: 4fef 000c lea %sp@(12),%sp 5380c: 4a80 tstl %d0 5380e: 662c bnes 5383c <== NEVER TAKEN return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53810: 202e fffc movel %fp@(-4),%d0 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 53814: 4284 clrl %d4 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53816: 2200 movel %d0,%d1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 53818: 382a 0006 movew %a2@(6),%d4 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5381c: c2aa 000c andl %a2@(12),%d1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 53820: d9ab 0018 addl %d4,%a3@(24) return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53824: b2aa 0010 cmpl %a2@(16),%d1 53828: 6442 bccs 5386c <== ALWAYS TAKEN { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 5382a: 2f03 movel %d3,%sp@- <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5382c: 2400 movel %d0,%d2 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 5382e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 53830: 2f0c movel %a4,%sp@- <== NOT EXECUTED 53832: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 53834: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53838: 4a80 tstl %d0 <== NOT EXECUTED 5383a: 67d4 beqs 53810 <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 5383c: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53842: 4e5e unlk %fp <== NOT EXECUTED 53844: 4e75 rts <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 53846: 4aab 0024 tstl %a3@(36) <== NOT EXECUTED 5384a: 669a bnes 537e6 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 5384c: 4280 clrl %d0 <== NOT EXECUTED 5384e: 102a 000a moveb %a2@(10),%d0 <== NOT EXECUTED 53852: 7203 moveq #3,%d1 <== NOT EXECUTED 53854: c081 andl %d1,%d0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 53856: 678e beqs 537e6 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; 53858: 4280 clrl %d0 <== NOT EXECUTED /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 5385a: 276a 0024 0018 movel %a2@(36),%a3@(24) <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 53860: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53866: 4e5e unlk %fp <== NOT EXECUTED 53868: 4e75 rts <== NOT EXECUTED ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; 5386a: 4282 clrl %d2 <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 5386c: 2742 003a movel %d2,%a3@(58) return rc; 53870: 4280 clrl %d0 } 53872: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 53878: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052ec6 : { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 52ec6: 72ff moveq #-1,%d1 fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 52ec8: 4e56 ffe4 linkw %fp,#-28 52ecc: 206e 0010 moveal %fp@(16),%a0 52ed0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 52ed4: 246e 0008 moveal %fp@(8),%a2 52ed8: 266e 000c moveal %fp@(12),%a3 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 52edc: 226a 0034 moveal %a2@(52),%a1 uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 52ee0: 202b 0018 movel %a3@(24),%d0 uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 52ee4: 42ae fff8 clrl %fp@(-8) uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 52ee8: 2d41 fffc movel %d1,%fp@(-4) if ( new_length >= fat_fd->fat_file_size ) 52eec: b1c0 cmpal %d0,%a0 52eee: 6460 bccs 52f50 <== NEVER TAKEN return rc; assert(fat_fd->fat_file_size); 52ef0: 4a80 tstl %d0 52ef2: 6700 00b2 beqw 52fa6 cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 52ef6: 4282 clrl %d2 52ef8: 4281 clrl %d1 52efa: 1229 0008 moveb %a1@(8),%d1 52efe: 3429 0006 movew %a1@(6),%d2 52f02: 41f0 28ff lea %a0@(ffffffff,%d2:l),%a0 52f06: 2408 movel %a0,%d2 52f08: e2aa lsrl %d1,%d2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 52f0a: 2602 movel %d2,%d3 52f0c: e3ab lsll %d1,%d3 52f0e: b680 cmpl %d0,%d3 52f10: 643e bccs 52f50 <== NEVER TAKEN 52f12: 49fa fa00 lea %pc@(52914 ),%a4 return RC_OK; if (cl_start != 0) 52f16: 4a82 tstl %d2 52f18: 6718 beqs 52f32 <== ALWAYS TAKEN { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 52f1a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 52f1e: 2042 moveal %d2,%a0 <== NOT EXECUTED 52f20: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 52f24: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52f26: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52f28: 4e94 jsr %a4@ <== NOT EXECUTED if (rc != RC_OK) 52f2a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) return RC_OK; if (cl_start != 0) { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 52f2e: 2001 movel %d1,%d0 <== NOT EXECUTED if (rc != RC_OK) 52f30: 6614 bnes 52f46 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 52f32: 486e fff8 pea %fp@(-8) 52f36: 2f02 movel %d2,%sp@- 52f38: 2f0b movel %a3,%sp@- 52f3a: 2f0a movel %a2,%sp@- 52f3c: 4e94 jsr %a4@ if (rc != RC_OK) 52f3e: 4fef 0010 lea %sp@(16),%sp if (rc != RC_OK) return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 52f42: 2001 movel %d1,%d0 if (rc != RC_OK) 52f44: 6716 beqs 52f5c <== ALWAYS TAKEN fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; } return RC_OK; } 52f46: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 52f4c: 4e5e unlk %fp 52f4e: 4e75 rts assert(fat_fd->fat_file_size); cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) return RC_OK; 52f50: 4280 clrl %d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; } return RC_OK; } 52f52: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 <== NOT EXECUTED 52f58: 4e5e unlk %fp <== NOT EXECUTED 52f5a: 4e75 rts <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 52f5c: 2f2e fff8 movel %fp@(-8),%sp@- 52f60: 2f0a movel %a2,%sp@- 52f62: 4eb9 0005 bc70 jsr 5bc70 if (rc != RC_OK) 52f68: 508f addql #8,%sp 52f6a: 4a80 tstl %d0 52f6c: 66d8 bnes 52f46 <== NEVER TAKEN return rc; if (cl_start != 0) 52f6e: 4a82 tstl %d2 52f70: 67d4 beqs 52f46 <== ALWAYS TAKEN { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 52f72: 4878 ffff pea ffffffff <== NOT EXECUTED 52f76: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 52f7a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52f7c: 4eb9 0005 b9da jsr 5b9da <== NOT EXECUTED if ( rc != RC_OK ) 52f82: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52f86: 4a80 tstl %d0 <== NOT EXECUTED 52f88: 66bc bnes 52f46 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; 52f8a: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 52f8e: 5382 subql #1,%d2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 52f90: 2741 0036 movel %d1,%a3@(54) <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 52f94: 2742 0032 movel %d2,%a3@(50) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 52f98: 2741 003a movel %d1,%a3@(58) <== NOT EXECUTED } return RC_OK; } 52f9c: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 <== NOT EXECUTED 52fa2: 4e5e unlk %fp <== NOT EXECUTED 52fa4: 4e75 rts <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 52fa6: 4879 0006 d91a pea 6d91a <== NOT EXECUTED 52fac: 4879 0006 d978 pea 6d978 <__FUNCTION__.6164> <== NOT EXECUTED 52fb2: 4878 026d pea 26d <== NOT EXECUTED 52fb6: 4879 0006 d930 pea 6d930 <== NOT EXECUTED 52fbc: 4eb9 0005 5c24 jsr 55c24 <__assert_func> <== NOT EXECUTED =============================================================================== 00053332 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 53332: 4e56 ffc8 linkw %fp,#-56 53336: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5333a: 246e 0008 moveal %fp@(8),%a2 5333e: 286e 000c moveal %fp@(12),%a4 53342: 282e 0010 movel %fp@(16),%d4 53346: 242e 0014 movel %fp@(20),%d2 5334a: 2a6e 0018 moveal %fp@(24),%a5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 5334e: 266a 0034 moveal %a2@(52),%a3 uint32_t cmpltd = 0; uint32_t cur_cln = 0; 53352: 42ae fff8 clrl %fp@(-8) uint32_t cl_start = 0; uint32_t ofs = 0; uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; 53356: 42ae fffc clrl %fp@(-4) if ( count == 0 ) 5335a: 4a82 tstl %d2 5335c: 6700 0128 beqw 53486 return cmpltd; if ( start > fat_fd->fat_file_size ) 53360: b8ac 0018 cmpl %a4@(24),%d4 53364: 6200 01a4 bhiw 5350a rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 53368: 202c 0014 movel %a4@(20),%d0 5336c: b082 cmpl %d2,%d0 5336e: 6500 019a bcsw 5350a (start > fat_fd->size_limit - count)) 53372: 9082 subl %d2,%d0 return cmpltd; if ( start > fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 53374: b084 cmpl %d4,%d0 53376: 6500 0192 bcsw 5350a (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 5337a: 486e fffc pea %fp@(-4) 5337e: 2602 movel %d2,%d3 53380: d684 addl %d4,%d3 53382: 2f03 movel %d3,%sp@- 53384: 2f0c movel %a4,%sp@- 53386: 2f0a movel %a2,%sp@- 53388: 4eb9 0005 3162 jsr 53162 if (rc != RC_OK) 5338e: 4fef 0010 lea %sp@(16),%sp 53392: 4a80 tstl %d0 53394: 6600 00f2 bnew 53488 /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 53398: 202e fffc movel %fp@(-4),%d0 5339c: b083 cmpl %d3,%d0 5339e: 6704 beqs 533a4 <== ALWAYS TAKEN count = c - start; 533a0: 2400 movel %d0,%d2 <== NOT EXECUTED 533a2: 9484 subl %d4,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 533a4: 7001 moveq #1,%d0 533a6: b0ac 0020 cmpl %a4@(32),%d0 533aa: 6700 00e6 beqw 53492 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 533ae: 4280 clrl %d0 533b0: 102b 0008 moveb %a3@(8),%d0 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 533b4: 260e movel %fp,%d3 533b6: 5183 subql #8,%d3 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 533b8: 2c04 movel %d4,%d6 533ba: e0ae lsrl %d0,%d6 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 533bc: 3a2b 0006 movew %a3@(6),%d5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 533c0: 2f03 movel %d3,%sp@- 533c2: 2f06 movel %d6,%sp@- 533c4: 2f0c movel %a4,%sp@- return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 533c6: 2d46 fff4 movel %d6,%fp@(-12) save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 533ca: 2f0a movel %a2,%sp@- 533cc: 4eba f546 jsr %pc@(52914 ) if (rc != RC_OK) 533d0: 4fef 0010 lea %sp@(16),%sp } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 533d4: 2001 movel %d1,%d0 if (rc != RC_OK) 533d6: 6600 00b0 bnew 53488 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 533da: 0285 0000 ffff andil #65535,%d5 533e0: 5385 subql #1,%d5 533e2: c885 andl %d5,%d4 533e4: 2d44 fff0 movel %d4,%fp@(-16) rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 533e8: 4a82 tstl %d2 533ea: 6700 019e beqw 5358a 533ee: 2e2e fff0 movel %fp@(-16),%d7 533f2: 4284 clrl %d4 { c = MIN(count, (fs_info->vol.bpc - ofs)); 533f4: 4280 clrl %d0 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 533f6: 226e fff8 moveal %fp@(-8),%a1 533fa: 2209 movel %a1,%d1 533fc: 5581 subql #2,%d1 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 533fe: 302b 0006 movew %a3@(6),%d0 53402: 9087 subl %d7,%d0 53404: b480 cmpl %d0,%d2 53406: 6402 bccs 5340a 53408: 2002 movel %d2,%d0 fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 5340a: 206a 0034 moveal %a2@(52),%a0 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 5340e: 2d40 fffc movel %d0,%fp@(-4) uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 53412: 4a89 tstl %a1 53414: 6600 00e4 bnew 534fa 53418: 4285 clrl %d5 <== NOT EXECUTED 5341a: 1a28 000a moveb %a0@(10),%d5 <== NOT EXECUTED 5341e: 7c03 moveq #3,%d6 <== NOT EXECUTED 53420: ca86 andl %d6,%d5 <== NOT EXECUTED 53422: 6700 00d6 beqw 534fa <== NOT EXECUTED return fs_info->vol.rdir_loc; 53426: 2228 001a movel %a0@(26),%d1 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 5342a: 4875 4800 pea %a5@(00000000,%d4:l) 5342e: 2041 moveal %d1,%a0 53430: 2f00 movel %d0,%sp@- { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 53432: 4280 clrl %d0 53434: 3013 movew %a3@,%d0 53436: 5380 subql #1,%d0 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 53438: c087 andl %d7,%d0 5343a: 2f00 movel %d0,%sp@- while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 5343c: 4280 clrl %d0 5343e: 102b 0002 moveb %a3@(2),%d0 53442: e0af lsrl %d0,%d7 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 53444: 4870 7800 pea %a0@(00000000,%d7:l) 53448: 2f0a movel %a2,%sp@- 5344a: 4eb9 0005 3c96 jsr 53c96 <_fat_block_write> if ( ret < 0 ) 53450: 4fef 0014 lea %sp@(20),%sp 53454: 4a80 tstl %d0 53456: 6d00 0096 bltw 534ee return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 5345a: 2f03 movel %d3,%sp@- if ( ret < 0 ) return -1; count -= c; cmpltd += c; save_cln = cur_cln; 5345c: 2e2e fff8 movel %fp@(-8),%d7 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53460: 2f07 movel %d7,%sp@- ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 53462: 202e fffc movel %fp@(-4),%d0 53466: 9480 subl %d0,%d2 cmpltd += c; 53468: d880 addl %d0,%d4 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 5346a: 2f0a movel %a2,%sp@- 5346c: 4eb9 0005 b828 jsr 5b828 if ( rc != RC_OK ) 53472: 4fef 000c lea %sp@(12),%sp 53476: 4a80 tstl %d0 53478: 660e bnes 53488 <== NEVER TAKEN rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 5347a: 4a82 tstl %d2 5347c: 6700 00e2 beqw 53560 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ofs = 0; 53480: 4287 clrl %d7 53482: 6000 ff70 braw 533f4 uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) return cmpltd; 53486: 4280 clrl %d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 53488: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 5348e: 4e5e unlk %fp 53490: 4e75 rts * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 53492: 4aac 0024 tstl %a4@(36) 53496: 6600 ff16 bnew 533ae (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 5349a: 4280 clrl %d0 5349c: 102b 000a moveb %a3@(10),%d0 534a0: 7203 moveq #3,%d1 534a2: c081 andl %d1,%d0 * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 534a4: 6700 ff08 beqw 533ae (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 534a8: 202c 001c movel %a4@(28),%d0 fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 534ac: 206a 0034 moveal %a2@(52),%a0 uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 534b0: 6670 bnes 53522 <== NEVER TAKEN 534b2: 4281 clrl %d1 534b4: 1228 000a moveb %a0@(10),%d1 534b8: 7603 moveq #3,%d3 534ba: c283 andl %d3,%d1 534bc: 6764 beqs 53522 <== NEVER TAKEN return fs_info->vol.rdir_loc; 534be: 2028 001a movel %a0@(26),%d0 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 534c2: 4281 clrl %d1 ret = _fat_block_write(mt_entry, sec, byte, count, buf); 534c4: 2040 moveal %d0,%a0 534c6: 2f0d movel %a5,%sp@- 534c8: 2f02 movel %d2,%sp@- if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 534ca: 3213 movew %a3@,%d1 534cc: 5381 subql #1,%d1 ret = _fat_block_write(mt_entry, sec, byte, count, buf); 534ce: c284 andl %d4,%d1 534d0: 2f01 movel %d1,%sp@- if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 534d2: 4281 clrl %d1 534d4: 122b 0002 moveb %a3@(2),%d1 534d8: e2ac lsrl %d1,%d4 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 534da: 4870 4800 pea %a0@(00000000,%d4:l) 534de: 2f0a movel %a2,%sp@- 534e0: 4eb9 0005 3c96 jsr 53c96 <_fat_block_write> if ( ret < 0 ) 534e6: 4fef 0014 lea %sp@(20),%sp 534ea: 4a80 tstl %d0 534ec: 6c9a bges 53488 <== ALWAYS TAKEN sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 534ee: 70ff moveq #-1,%d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 534f0: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 534f6: 4e5e unlk %fp <== NOT EXECUTED 534f8: 4e75 rts <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 534fa: 4285 clrl %d5 534fc: 1a28 0005 moveb %a0@(5),%d5 53500: eba9 lsll %d5,%d1 53502: d2a8 002c addl %a0@(44),%d1 53506: 6000 ff22 braw 5342a if ( start > fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 5350a: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53510: 7805 moveq #5,%d4 <== NOT EXECUTED 53512: 2040 moveal %d0,%a0 <== NOT EXECUTED 53514: 70ff moveq #-1,%d0 <== NOT EXECUTED 53516: 2084 movel %d4,%a0@ <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 53518: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5351e: 4e5e unlk %fp <== NOT EXECUTED 53520: 4e75 rts <== NOT EXECUTED 53522: 4281 clrl %d1 <== NOT EXECUTED 53524: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED 53528: 5580 subql #2,%d0 <== NOT EXECUTED 5352a: e3a8 lsll %d1,%d0 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 5352c: 4281 clrl %d1 <== NOT EXECUTED 5352e: d0a8 002c addl %a0@(44),%d0 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, count, buf); 53532: 2040 moveal %d0,%a0 <== NOT EXECUTED 53534: 2f0d movel %a5,%sp@- <== NOT EXECUTED 53536: 2f02 movel %d2,%sp@- <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 53538: 3213 movew %a3@,%d1 <== NOT EXECUTED 5353a: 5381 subql #1,%d1 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, count, buf); 5353c: c284 andl %d4,%d1 <== NOT EXECUTED 5353e: 2f01 movel %d1,%sp@- <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 53540: 4281 clrl %d1 <== NOT EXECUTED 53542: 122b 0002 moveb %a3@(2),%d1 <== NOT EXECUTED 53546: e2ac lsrl %d1,%d4 <== NOT EXECUTED byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 53548: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 5354c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5354e: 4eb9 0005 3c96 jsr 53c96 <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 53554: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 53558: 4a80 tstl %d0 <== NOT EXECUTED 5355a: 6c00 ff2c bgew 53488 <== NOT EXECUTED 5355e: 608e bras 534ee <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 53560: 206e fff0 moveal %fp@(-16),%a0 53564: 4282 clrl %d2 53566: 142b 0008 moveb %a3@(8),%d2 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 5356a: 2004 movel %d4,%d0 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 5356c: 41f0 48ff lea %a0@(ffffffff,%d4:l),%a0 fat_fd->map.disk_cln = save_cln; 53570: 2947 0036 movel %d7,%a4@(54) } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 53574: 2208 movel %a0,%d1 53576: e4a9 lsrl %d2,%d1 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 53578: d2ae fff4 addl %fp@(-12),%d1 5357c: 2941 0032 movel %d1,%a4@(50) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 53580: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 53586: 4e5e unlk %fp 53588: 4e75 rts } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 5358a: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 5358e: 4284 clrl %d4 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 53590: 4282 clrl %d2 <== NOT EXECUTED 53592: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 53596: 4287 clrl %d7 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 53598: 41f0 48ff lea %a0@(ffffffff,%d4:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 5359c: 2947 0036 movel %d7,%a4@(54) <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 535a0: 2208 movel %a0,%d1 <== NOT EXECUTED 535a2: e4a9 lsrl %d2,%d1 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 535a4: d2ae fff4 addl %fp@(-12),%d1 <== NOT EXECUTED 535a8: 2941 0032 movel %d1,%a4@(50) <== NOT EXECUTED 535ac: 60d2 bras 53580 <== NOT EXECUTED =============================================================================== 0005bc70 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 5bc70: 4e56 ffd4 linkw %fp,#-44 5bc74: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5bc78: 266e 0008 moveal %fp@(8),%a3 5bc7c: 2e2e 000c movel %fp@(12),%d7 fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5bc80: 2007 movel %d7,%d0 rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5bc82: 246b 0034 moveal %a3@(52),%a2 uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5bc86: c0aa 000c andl %a2@(12),%d0 ) { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; 5bc8a: 42ae fffc clrl %fp@(-4) uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5bc8e: b0aa 0010 cmpl %a2@(16),%d0 5bc92: 6400 009e bccw 5bd32 5bc96: 2a0e movel %fp,%d5 5bc98: 2407 movel %d7,%d2 5bc9a: 4284 clrl %d4 5bc9c: 4286 clrl %d6 5bc9e: 5985 subql #4,%d5 5bca0: 49f9 0005 b828 lea 5b828 ,%a4 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 5bca6: 4bf9 0005 b9da lea 5b9da ,%a5 uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 5bcac: 2f05 movel %d5,%sp@- 5bcae: 2f02 movel %d2,%sp@- 5bcb0: 2f0b movel %a3,%sp@- 5bcb2: 4e94 jsr %a4@ if ( rc != RC_OK ) 5bcb4: 4fef 000c lea %sp@(12),%sp uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 5bcb8: 2600 movel %d0,%d3 if ( rc != RC_OK ) 5bcba: 6650 bnes 5bd0c <== NEVER TAKEN fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 5bcbc: 42a7 clrl %sp@- if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; 5bcbe: 5284 addql #1,%d4 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 5bcc0: 2f02 movel %d2,%sp@- 5bcc2: 2f0b movel %a3,%sp@- 5bcc4: 4e95 jsr %a5@ if ( rc != RC_OK ) 5bcc6: 4fef 000c lea %sp@(12),%sp 5bcca: 4a80 tstl %d0 5bccc: 6702 beqs 5bcd0 <== ALWAYS TAKEN 5bcce: 2c00 movel %d0,%d6 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 5bcd0: 242e fffc movel %fp@(-4),%d2 fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5bcd4: 2002 movel %d2,%d0 5bcd6: c0aa 000c andl %a2@(12),%d0 5bcda: b0aa 0010 cmpl %a2@(16),%d0 5bcde: 65cc bcss 5bcac <== NEVER TAKEN freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5bce0: 202a 003a movel %a2@(58),%d0 5bce4: 72ff moveq #-1,%d1 freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 5bce6: 2547 003e movel %d7,%a2@(62) if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5bcea: b280 cmpl %d0,%d1 5bcec: 6706 beqs 5bcf4 <== ALWAYS TAKEN fs_info->vol.free_cls += freed_cls_cnt; 5bcee: d880 addl %d0,%d4 <== NOT EXECUTED 5bcf0: 2544 003a movel %d4,%a2@(58) <== NOT EXECUTED fat_buf_release(fs_info); 5bcf4: 2f0a movel %a2,%sp@- 5bcf6: 2606 movel %d6,%d3 5bcf8: 4eb9 0005 3a90 jsr 53a90 5bcfe: 588f addql #4,%sp if (rc1 != RC_OK) return rc1; return RC_OK; } 5bd00: 2003 movel %d3,%d0 5bd02: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 5bd08: 4e5e unlk %fp 5bd0a: 4e75 rts while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); if ( rc != RC_OK ) { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5bd0c: 202a 003a movel %a2@(58),%d0 <== NOT EXECUTED 5bd10: 72ff moveq #-1,%d1 <== NOT EXECUTED 5bd12: b280 cmpl %d0,%d1 <== NOT EXECUTED 5bd14: 6706 beqs 5bd1c <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 5bd16: d880 addl %d0,%d4 <== NOT EXECUTED 5bd18: 2544 003a movel %d4,%a2@(58) <== NOT EXECUTED fat_buf_release(fs_info); 5bd1c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5bd1e: 4eb9 0005 3a90 jsr 53a90 <== NOT EXECUTED return rc; 5bd24: 588f addql #4,%sp <== NOT EXECUTED fat_buf_release(fs_info); if (rc1 != RC_OK) return rc1; return RC_OK; } 5bd26: 2003 movel %d3,%d0 <== NOT EXECUTED 5bd28: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5bd2e: 4e5e unlk %fp <== NOT EXECUTED 5bd30: 4e75 rts <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5bd32: 202a 003a movel %a2@(58),%d0 <== NOT EXECUTED { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; 5bd36: 4284 clrl %d4 <== NOT EXECUTED fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; 5bd38: 4286 clrl %d6 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5bd3a: 72ff moveq #-1,%d1 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 5bd3c: 2547 003e movel %d7,%a2@(62) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5bd40: b280 cmpl %d0,%d1 <== NOT EXECUTED 5bd42: 66aa bnes 5bcee <== NOT EXECUTED 5bd44: 60ae bras 5bcf4 <== NOT EXECUTED =============================================================================== 00054032 : uint32_t ino ) { fat_fs_info_t *fs_info = mt_entry->fs_info; FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 54032: 7001 moveq #1,%d0 <== NOT EXECUTED void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 54034: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 54038: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 5403c: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { fat_fs_info_t *fs_info = mt_entry->fs_info; 54040: 2268 0034 moveal %a0@(52),%a1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 54044: 92a9 006e subl %a1@(110),%d1 <== NOT EXECUTED void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 54048: 2f02 movel %d2,%sp@- <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 5404a: 2401 movel %d1,%d2 <== NOT EXECUTED 5404c: e68a lsrl #3,%d2 <== NOT EXECUTED 5404e: 2069 0062 moveal %a1@(98),%a0 <== NOT EXECUTED 54052: d1c2 addal %d2,%a0 <== NOT EXECUTED 54054: 7407 moveq #7,%d2 <== NOT EXECUTED 54056: c282 andl %d2,%d1 <== NOT EXECUTED 54058: 1410 moveb %a0@,%d2 <== NOT EXECUTED 5405a: e3a8 lsll %d1,%d0 <== NOT EXECUTED 5405c: 4680 notl %d0 <== NOT EXECUTED 5405e: c082 andl %d2,%d0 <== NOT EXECUTED 54060: 1080 moveb %d0,%a0@ <== NOT EXECUTED } 54062: 241f movel %sp@+,%d2 <== NOT EXECUTED 54064: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005b828 : rtems_bdbuf_buffer *block0 = NULL; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 5b828: 7001 moveq #1,%d0 fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 5b82a: 4e56 ffdc linkw %fp,#-36 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 5b82e: 206e 0008 moveal %fp@(8),%a0 fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 5b832: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 5b836: 242e 000c movel %fp@(12),%d2 5b83a: 286e 0010 moveal %fp@(16),%a4 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 5b83e: 2468 0034 moveal %a0@(52),%a2 rtems_bdbuf_buffer *block0 = NULL; 5b842: 42ae fffc clrl %fp@(-4) uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 5b846: b082 cmpl %d2,%d0 5b848: 6474 bccs 5b8be <== NEVER TAKEN 5b84a: 202a 0030 movel %a2@(48),%d0 5b84e: 5280 addql #1,%d0 5b850: b082 cmpl %d2,%d0 5b852: 656a bcss 5b8be <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 5b854: 4280 clrl %d0 5b856: 102a 000a moveb %a2@(10),%d0 5b85a: 2a02 movel %d2,%d5 5b85c: 0800 0000 btst #0,%d0 5b860: 6676 bnes 5b8d8 <== ALWAYS TAKEN 5b862: 0800 0001 btst #1,%d0 <== NOT EXECUTED 5b866: 6776 beqs 5b8de <== NOT EXECUTED 5b868: da85 addl %d5,%d5 <== NOT EXECUTED 5b86a: 4280 clrl %d0 5b86c: 102a 0002 moveb %a2@(2),%d0 5b870: 2605 movel %d5,%d3 5b872: e0ab lsrl %d0,%d3 5b874: d6aa 0044 addl %a2@(68),%d3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 5b878: 47f9 0005 387c lea 5387c ,%a3 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 5b87e: 3c12 movew %a2@,%d6 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 5b880: 486e fffc pea %fp@(-4) 5b884: 4878 0001 pea 1 5b888: 2f03 movel %d3,%sp@- 5b88a: 2f0a movel %a2,%sp@- 5b88c: 4e93 jsr %a3@ if (rc != RC_OK) 5b88e: 4fef 0010 lea %sp@(16),%sp sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 5b892: 2800 movel %d0,%d4 if (rc != RC_OK) 5b894: 6636 bnes 5b8cc <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) 5b896: 4280 clrl %d0 5b898: 102a 000a moveb %a2@(10),%d0 5b89c: 7202 moveq #2,%d1 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 5b89e: 0286 0000 ffff andil #65535,%d6 5b8a4: 5386 subql #1,%d6 5b8a6: ca86 andl %d6,%d5 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 5b8a8: b280 cmpl %d0,%d1 5b8aa: 6700 00b2 beqw 5b95e 5b8ae: 123c 0004 moveb #4,%d1 5b8b2: b280 cmpl %d0,%d1 5b8b4: 676a beqs 5b920 <== NEVER TAKEN 5b8b6: 123c 0001 moveb #1,%d1 5b8ba: b280 cmpl %d0,%d1 5b8bc: 6724 beqs 5b8e2 <== ALWAYS TAKEN *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 5b8be: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5b8c4: 78ff moveq #-1,%d4 <== NOT EXECUTED 5b8c6: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b8c8: 7005 moveq #5,%d0 <== NOT EXECUTED 5b8ca: 2080 movel %d0,%a0@ <== NOT EXECUTED break; } return RC_OK; } 5b8cc: 2004 movel %d4,%d0 <== NOT EXECUTED 5b8ce: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5b8d4: 4e5e unlk %fp <== NOT EXECUTED 5b8d6: 4e75 rts <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 5b8d8: e28d lsrl #1,%d5 5b8da: da82 addl %d2,%d5 5b8dc: 608c bras 5b86a 5b8de: e58d lsll #2,%d5 <== NOT EXECUTED 5b8e0: 6088 bras 5b86a <== NOT EXECUTED case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 5b8e2: 206e fffc moveal %fp@(-4),%a0 5b8e6: 4281 clrl %d1 if ( ofs == (fs_info->vol.bps - 1) ) 5b8e8: 4280 clrl %d0 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 5b8ea: 2068 001e moveal %a0@(30),%a0 5b8ee: 1230 5800 moveb %a0@(00000000,%d5:l),%d1 if ( ofs == (fs_info->vol.bps - 1) ) 5b8f2: 3012 movew %a2@,%d0 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 5b8f4: 2881 movel %d1,%a4@ if ( ofs == (fs_info->vol.bps - 1) ) 5b8f6: 5380 subql #1,%d0 5b8f8: ba80 cmpl %d0,%d5 5b8fa: 6700 00a0 beqw 5b99c *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 5b8fe: 4280 clrl %d0 5b900: 1030 5801 moveb %a0@(00000001,%d5:l),%d0 5b904: e188 lsll #8,%d0 5b906: 8081 orl %d1,%d0 5b908: 2880 movel %d0,%a4@ } if ( FAT_CLUSTER_IS_ODD(cln) ) 5b90a: 0802 0000 btst #0,%d2 5b90e: 6778 beqs 5b988 *ret_val = (*ret_val) >> FAT12_SHIFT; 5b910: e888 lsrl #4,%d0 5b912: 2880 movel %d0,%a4@ rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 5b914: 2004 movel %d4,%d0 5b916: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 5b91c: 4e5e unlk %fp 5b91e: 4e75 rts *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 5b920: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 5b924: 7018 moveq #24,%d0 <== NOT EXECUTED 5b926: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5b92a: 2230 5800 movel %a0@(00000000,%d5:l),%d1 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5b92e: 7a18 moveq #24,%d5 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 5b930: 2601 movel %d1,%d3 <== NOT EXECUTED 5b932: e0ab lsrl %d0,%d3 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 5b934: 2401 movel %d1,%d2 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5b936: 2001 movel %d1,%d0 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 5b938: e08a lsrl #8,%d2 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5b93a: eba8 lsll %d5,%d0 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 5b93c: e189 lsll #8,%d1 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5b93e: 0282 0000 ff00 andil #65280,%d2 <== NOT EXECUTED 5b944: 8083 orl %d3,%d0 <== NOT EXECUTED 5b946: 0281 00ff 0000 andil #16711680,%d1 <== NOT EXECUTED 5b94c: 8081 orl %d1,%d0 <== NOT EXECUTED 5b94e: 8082 orl %d2,%d0 <== NOT EXECUTED 5b950: 2880 movel %d0,%a4@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 5b952: 2004 movel %d4,%d0 <== NOT EXECUTED 5b954: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5b95a: 4e5e unlk %fp <== NOT EXECUTED 5b95c: 4e75 rts <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 5b95e: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 5b962: 4281 clrl %d1 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 5b964: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 5b968: 3230 5800 movew %a0@(00000000,%d5:l),%d1 <== NOT EXECUTED static inline uint16_t m68k_swap_u16( uint16_t value ) { return (((value & 0xff) << 8) | ((value >> 8) & 0xff)); 5b96c: 2001 movel %d1,%d0 <== NOT EXECUTED 5b96e: e089 lsrl #8,%d1 <== NOT EXECUTED 5b970: e188 lsll #8,%d0 <== NOT EXECUTED 5b972: 0280 0000 ff00 andil #65280,%d0 <== NOT EXECUTED 5b978: 8081 orl %d1,%d0 <== NOT EXECUTED 5b97a: 2880 movel %d0,%a4@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 5b97c: 2004 movel %d4,%d0 <== NOT EXECUTED 5b97e: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5b984: 4e5e unlk %fp <== NOT EXECUTED 5b986: 4e75 rts <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 5b988: 0280 0000 0fff andil #4095,%d0 5b98e: 2880 movel %d0,%a4@ rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 5b990: 2004 movel %d4,%d0 5b992: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 5b998: 4e5e unlk %fp 5b99a: 4e75 rts * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 5b99c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5b9a0: 2043 moveal %d3,%a0 <== NOT EXECUTED 5b9a2: 4878 0001 pea 1 <== NOT EXECUTED 5b9a6: 4868 0001 pea %a0@(1) <== NOT EXECUTED 5b9aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b9ac: 4e93 jsr %a3@ <== NOT EXECUTED &block0); if (rc != RC_OK) 5b9ae: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5b9b2: 4a80 tstl %d0 <== NOT EXECUTED 5b9b4: 6616 bnes 5b9cc <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 5b9b6: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5b9ba: 4280 clrl %d0 <== NOT EXECUTED 5b9bc: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5b9c0: 1010 moveb %a0@,%d0 <== NOT EXECUTED 5b9c2: e188 lsll #8,%d0 <== NOT EXECUTED 5b9c4: 8094 orl %a4@,%d0 <== NOT EXECUTED 5b9c6: 2880 movel %d0,%a4@ <== NOT EXECUTED 5b9c8: 6000 ff40 braw 5b90a <== NOT EXECUTED *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) 5b9cc: 2800 movel %d0,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 5b9ce: 2004 movel %d4,%d0 <== NOT EXECUTED 5b9d0: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5b9d6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053f70 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 53f70: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 53f74: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 53f78: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 53f7c: 2468 0034 moveal %a0@(52),%a2 <== NOT EXECUTED } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 53f80: 47f9 0004 7df8 lea 47df8 ,%a3 <== NOT EXECUTED * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 53f86: 242a 006a movel %a2@(106),%d2 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 53f8a: 4a82 tstl %d2 <== NOT EXECUTED 53f8c: 6768 beqs 53ff6 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 53f8e: 202a 0066 movel %a2@(102),%d0 <== NOT EXECUTED 53f92: 2200 movel %d0,%d1 <== NOT EXECUTED 53f94: e689 lsrl #3,%d1 <== NOT EXECUTED 53f96: 7807 moveq #7,%d4 <== NOT EXECUTED 53f98: 226a 0062 moveal %a2@(98),%a1 <== NOT EXECUTED 53f9c: 41f1 1800 lea %a1@(00000000,%d1:l),%a0 <== NOT EXECUTED 53fa0: 1610 moveb %a0@,%d3 <== NOT EXECUTED 53fa2: c880 andl %d0,%d4 <== NOT EXECUTED 53fa4: 1203 moveb %d3,%d1 <== NOT EXECUTED 53fa6: 49c1 extbl %d1 <== NOT EXECUTED 53fa8: 0901 btst %d4,%d1 <== NOT EXECUTED 53faa: 6730 beqs 53fdc <== NOT EXECUTED 53fac: 4281 clrl %d1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 53fae: 5280 addql #1,%d0 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 53fb0: 5281 addql #1,%d1 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 53fb2: 2540 0066 movel %d0,%a2@(102) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 53fb6: b480 cmpl %d0,%d2 <== NOT EXECUTED 53fb8: 6204 bhis 53fbe <== NOT EXECUTED fs_info->index = 0; 53fba: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 53fbe: b481 cmpl %d1,%d2 <== NOT EXECUTED 53fc0: 6734 beqs 53ff6 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 53fc2: 202a 0066 movel %a2@(102),%d0 <== NOT EXECUTED 53fc6: 2600 movel %d0,%d3 <== NOT EXECUTED 53fc8: e68b lsrl #3,%d3 <== NOT EXECUTED 53fca: 41f1 3800 lea %a1@(00000000,%d3:l),%a0 <== NOT EXECUTED 53fce: 7807 moveq #7,%d4 <== NOT EXECUTED 53fd0: 1610 moveb %a0@,%d3 <== NOT EXECUTED 53fd2: c880 andl %d0,%d4 <== NOT EXECUTED 53fd4: 1a03 moveb %d3,%d5 <== NOT EXECUTED 53fd6: 49c5 extbl %d5 <== NOT EXECUTED 53fd8: 0905 btst %d4,%d5 <== NOT EXECUTED 53fda: 66d2 bnes 53fae <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 53fdc: 7001 moveq #1,%d0 <== NOT EXECUTED 53fde: e9a8 lsll %d4,%d0 <== NOT EXECUTED 53fe0: 8083 orl %d3,%d0 <== NOT EXECUTED 53fe2: 1080 moveb %d0,%a0@ <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 53fe4: 202a 0066 movel %a2@(102),%d0 <== NOT EXECUTED 53fe8: d0aa 006e addl %a2@(110),%d0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 53fec: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 53ff2: 4e5e unlk %fp <== NOT EXECUTED 53ff4: 4e75 rts <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 53ff6: 203c 0fff ffff movel #268435455,%d0 <== NOT EXECUTED 53ffc: 90aa 006e subl %a2@(110),%d0 <== NOT EXECUTED 54000: d482 addl %d2,%d2 <== NOT EXECUTED 54002: b082 cmpl %d2,%d0 <== NOT EXECUTED 54004: 620c bhis 54012 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 54006: 4280 clrl %d0 <== NOT EXECUTED } 54008: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 5400e: 4e5e unlk %fp <== NOT EXECUTED 54010: 4e75 rts <== NOT EXECUTED fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; 54012: 2542 006a movel %d2,%a2@(106) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 54016: 2f02 movel %d2,%sp@- <== NOT EXECUTED 54018: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 5401c: 4e93 jsr %a3@ <== NOT EXECUTED if (fs_info->uino != NULL) 5401e: 508f addql #8,%sp <== NOT EXECUTED } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 54020: 2540 0062 movel %d0,%a2@(98) <== NOT EXECUTED if (fs_info->uino != NULL) 54024: 67e0 beqs 54006 <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 54026: 242a 006a movel %a2@(106),%d2 <== NOT EXECUTED 5402a: 2542 0066 movel %d2,%a2@(102) <== NOT EXECUTED 5402e: 6000 ff5a braw 53f8a <== NOT EXECUTED =============================================================================== 00053e7e : ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 53e7e: 4280 clrl %d0 int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 53e80: 4e56 ffdc linkw %fp,#-36 53e84: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 53e88: 4878 0001 pea 1 int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 53e8c: 266e 0008 moveal %fp@(8),%a3 int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 53e90: 246b 0034 moveal %a3@(52),%a2 int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 53e94: 242e 000c movel %fp@(12),%d2 ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 53e98: 302a 0006 movew %a2@(6),%d0 ) { int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; 53e9c: 2d42 fffc movel %d2,%fp@(-4) char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 53ea0: 2f00 movel %d0,%sp@- 53ea2: 4eb9 0004 6090 jsr 46090 if ( buf == NULL ) 53ea8: 508f addql #8,%sp ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 53eaa: 2600 movel %d0,%d3 if ( buf == NULL ) 53eac: 6700 00aa beqw 53f58 rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53eb0: 2002 movel %d2,%d0 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53eb2: 280e movel %fp,%d4 if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); 53eb4: 49f9 0005 3dfa lea 53dfa ,%a4 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53eba: 5984 subql #4,%d4 53ebc: 4bf9 0005 b828 lea 5b828 ,%a5 buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53ec2: c0aa 000c andl %a2@(12),%d0 53ec6: b0aa 0010 cmpl %a2@(16),%d0 53eca: 6434 bccs 53f00 <== NEVER TAKEN { ret = fat_cluster_write(mt_entry, cur_cln, buf); 53ecc: 2f03 movel %d3,%sp@- 53ece: 2f02 movel %d2,%sp@- 53ed0: 2f0b movel %a3,%sp@- 53ed2: 4e94 jsr %a4@ if ( ret == -1 ) 53ed4: 4fef 000c lea %sp@(12),%sp 53ed8: 72ff moveq #-1,%d1 53eda: b280 cmpl %d0,%d1 53edc: 675c beqs 53f3a <== NEVER TAKEN { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53ede: 2f04 movel %d4,%sp@- 53ee0: 2f2e fffc movel %fp@(-4),%sp@- 53ee4: 2f0b movel %a3,%sp@- 53ee6: 4e95 jsr %a5@ if ( rc != RC_OK ) 53ee8: 4fef 000c lea %sp@(12),%sp 53eec: 4a80 tstl %d0 53eee: 662e bnes 53f1e <== NEVER TAKEN 53ef0: 242e fffc movel %fp@(-4),%d2 buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53ef4: 2002 movel %d2,%d0 53ef6: c0aa 000c andl %a2@(12),%d0 53efa: b0aa 0010 cmpl %a2@(16),%d0 53efe: 65cc bcss 53ecc <== NEVER TAKEN return rc; } } free(buf); return rc; 53f00: 4280 clrl %d0 free(buf); return rc; } } free(buf); 53f02: 2f03 movel %d3,%sp@- 53f04: 2d40 fff8 movel %d0,%fp@(-8) 53f08: 4eb9 0004 680c jsr 4680c return rc; 53f0e: 202e fff8 movel %fp@(-8),%d0 53f12: 588f addql #4,%sp } 53f14: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 53f1a: 4e5e unlk %fp 53f1c: 4e75 rts } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) { free(buf); 53f1e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 53f20: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 53f24: 4eb9 0004 680c jsr 4680c <== NOT EXECUTED return rc; 53f2a: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 53f2e: 588f addql #4,%sp <== NOT EXECUTED } } free(buf); return rc; } 53f30: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53f36: 4e5e unlk %fp <== NOT EXECUTED 53f38: 4e75 rts <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) { free(buf); return -1; 53f3a: 70ff moveq #-1,%d0 <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) { free(buf); 53f3c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 53f3e: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 53f42: 4eb9 0004 680c jsr 4680c <== NOT EXECUTED return -1; 53f48: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 53f4c: 588f addql #4,%sp <== NOT EXECUTED } } free(buf); return rc; } 53f4e: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53f54: 4e5e unlk %fp <== NOT EXECUTED 53f56: 4e75 rts <== NOT EXECUTED uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); 53f58: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53f5e: 7405 moveq #5,%d2 <== NOT EXECUTED 53f60: 2040 moveal %d0,%a0 <== NOT EXECUTED 53f62: 70ff moveq #-1,%d0 <== NOT EXECUTED 53f64: 2082 movel %d2,%a0@ <== NOT EXECUTED } } free(buf); return rc; } 53f66: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53f6c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00054296 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { 54296: 4e56 ff60 linkw %fp,#-160 5429a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 5429e: 486e ffaa pea %fp@(-86) * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { 542a2: 266e 0008 moveal %fp@(8),%a3 ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 542a6: 2f2b 0070 movel %a3@(112),%sp@- int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 542aa: 246b 0034 moveal %a3@(52),%a2 char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; 542ae: 42ae fffc clrl %fp@(-4) rc = stat(mt_entry->dev, &stat_buf); 542b2: 4eb9 0004 80f8 jsr 480f8 if (rc == -1) 542b8: 508f addql #8,%sp ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 542ba: 2400 movel %d0,%d2 if (rc == -1) 542bc: 70ff moveq #-1,%d0 542be: b082 cmpl %d2,%d0 542c0: 6700 041c beqw 546de return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 542c4: 202e ffb6 movel %fp@(-74),%d0 542c8: 0280 0000 f000 andil #61440,%d0 542ce: 0c80 0000 6000 cmpil #24576,%d0 542d4: 6600 0658 bnew 5492e rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 542d8: 2f2e ffc4 movel %fp@(-60),%sp@- 542dc: 2f2e ffc0 movel %fp@(-64),%sp@- 542e0: 4eb9 0004 55a2 jsr 455a2 if (vol->dd == NULL) 542e6: 508f addql #8,%sp /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 542e8: 2540 0052 movel %d0,%a2@(82) if (vol->dd == NULL) 542ec: 6700 0702 beqw 549f0 rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 542f0: 202e ffc0 movel %fp@(-64),%d0 542f4: 222e ffc4 movel %fp@(-60),%d1 542f8: 2540 004a movel %d0,%a2@(74) 542fc: 2541 004e movel %d1,%a2@(78) /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 54300: 486e fffc pea %fp@(-4) 54304: 42a7 clrl %sp@- 54306: 2f01 movel %d1,%sp@- 54308: 2f00 movel %d0,%sp@- 5430a: 4eb9 0005 1de8 jsr 51de8 if (sc != RTEMS_SUCCESSFUL) 54310: 4fef 0010 lea %sp@(16),%sp 54314: 4a80 tstl %d0 54316: 6600 065c bnew 54974 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 5431a: 226e fffc moveal %fp@(-4),%a1 5431e: 2069 001e moveal %a1@(30),%a0 54322: 1228 000e moveb %a0@(14),%d1 54326: 1628 000f moveb %a0@(15),%d3 5432a: 1028 0013 moveb %a0@(19),%d0 5432e: 1d41 ffa7 moveb %d1,%fp@(-89) 54332: 1228 0014 moveb %a0@(20),%d1 54336: 1d43 ffa6 moveb %d3,%fp@(-90) 5433a: 3a41 moveaw %d1,%a5 5433c: 1228 0016 moveb %a0@(22),%d1 54340: 1828 000b moveb %a0@(11),%d4 54344: 1d41 ffa5 moveb %d1,%fp@(-91) 54348: 1228 0017 moveb %a0@(23),%d1 5434c: 1a28 000c moveb %a0@(12),%d5 54350: 1d41 ffa4 moveb %d1,%fp@(-92) 54354: 1228 0020 moveb %a0@(32),%d1 54358: 1428 000d moveb %a0@(13),%d2 5435c: 1d41 ff9c moveb %d1,%fp@(-100) 54360: 1228 0021 moveb %a0@(33),%d1 54364: 1628 0010 moveb %a0@(16),%d3 54368: 1d41 ff9b moveb %d1,%fp@(-101) 5436c: 1228 0022 moveb %a0@(34),%d1 54370: 1c28 0011 moveb %a0@(17),%d6 54374: 1d41 ff9a moveb %d1,%fp@(-102) 54378: 1228 0023 moveb %a0@(35),%d1 5437c: 1e28 0012 moveb %a0@(18),%d7 54380: 1d41 ff99 moveb %d1,%fp@(-103) 54384: 1228 0024 moveb %a0@(36),%d1 54388: 3840 moveaw %d0,%a4 5438a: 1d41 ffa2 moveb %d1,%fp@(-94) 5438e: 1228 0025 moveb %a0@(37),%d1 54392: 1d41 ff9d moveb %d1,%fp@(-99) 54396: 1228 0026 moveb %a0@(38),%d1 5439a: 1d41 ffa3 moveb %d1,%fp@(-93) 5439e: 1228 0027 moveb %a0@(39),%d1 543a2: 1d41 ffa1 moveb %d1,%fp@(-95) 543a6: 1228 0028 moveb %a0@(40),%d1 543aa: 1d41 ff95 moveb %d1,%fp@(-107) 543ae: 1228 002c moveb %a0@(44),%d1 543b2: 1d41 ff8b moveb %d1,%fp@(-117) 543b6: 1228 002d moveb %a0@(45),%d1 543ba: 1d41 ff8a moveb %d1,%fp@(-118) 543be: 1228 002e moveb %a0@(46),%d1 543c2: 1d41 ff89 moveb %d1,%fp@(-119) 543c6: 1228 002f moveb %a0@(47),%d1 543ca: 1d41 ff8f moveb %d1,%fp@(-113) 543ce: 1228 0030 moveb %a0@(48),%d1 543d2: 1d41 ff91 moveb %d1,%fp@(-111) 543d6: 1228 0031 moveb %a0@(49),%d1 sc = rtems_bdbuf_release( block); 543da: 2f09 movel %a1,%sp@- { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 543dc: 1d41 ff90 moveb %d1,%fp@(-112) sc = rtems_bdbuf_release( block); 543e0: 4eb9 0005 2090 jsr 52090 if (sc != RTEMS_SUCCESSFUL) 543e6: 588f addql #4,%sp 543e8: 4a80 tstl %d0 543ea: 6600 0588 bnew 54974 rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 543ee: 0285 0000 00ff andil #255,%d5 543f4: 0284 0000 00ff andil #255,%d4 543fa: e18d lsll #8,%d5 543fc: 8a84 orl %d4,%d5 543fe: 3485 movew %d5,%a2@ if ( (vol->bps != 512) && 54400: 0c85 0000 0200 cmpil #512,%d5 54406: 6700 04d8 beqw 548e0 5440a: 0c85 0000 0400 cmpil #1024,%d5 <== NOT EXECUTED 54410: 6712 beqs 54424 <== NOT EXECUTED (vol->bps != 1024) && 54412: 0c85 0000 0800 cmpil #2048,%d5 <== NOT EXECUTED 54418: 670a beqs 54424 <== NOT EXECUTED (vol->bps != 2048) && 5441a: 0c85 0000 1000 cmpil #4096,%d5 <== NOT EXECUTED 54420: 6600 052c bnew 5494e <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 54424: 7209 moveq #9,%d1 <== NOT EXECUTED 54426: 2005 movel %d5,%d0 <== NOT EXECUTED 54428: e2a8 lsrl %d1,%d0 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 5442a: e280 asrl #1,%d0 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 5442c: 7201 moveq #1,%d1 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 5442e: 2801 movel %d1,%d4 <== NOT EXECUTED 54430: 5284 addql #1,%d4 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 54432: 0800 0000 btst #0,%d0 <== NOT EXECUTED 54436: 660e bnes 54446 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 54438: e280 asrl #1,%d0 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 5443a: 1204 moveb %d4,%d1 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 5443c: 2801 movel %d1,%d4 <== NOT EXECUTED 5443e: 5284 addql #1,%d4 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 54440: 0800 0000 btst #0,%d0 <== NOT EXECUTED 54444: 67f2 beqs 54438 <== NOT EXECUTED 54446: 1541 0003 moveb %d1,%a2@(3) <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 5444a: 4201 clrb %d1 <== NOT EXECUTED 5444c: 1541 0002 moveb %d1,%a2@(2) <== NOT EXECUTED 54450: 0805 0000 btst #0,%d5 <== NOT EXECUTED 54454: 6622 bnes 54478 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 54456: 2005 movel %d5,%d0 <== NOT EXECUTED 54458: 7201 moveq #1,%d1 <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; i >>= 1, vol->sec_log2++); 5445a: 2801 movel %d1,%d4 5445c: 5284 addql #1,%d4 5445e: e280 asrl #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 54460: 0800 0000 btst #0,%d0 54464: 660e bnes 54474 <== NEVER TAKEN i >>= 1, vol->sec_log2++); 54466: e280 asrl #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 54468: 1204 moveb %d4,%d1 i >>= 1, vol->sec_log2++); 5446a: 2801 movel %d1,%d4 5446c: 5284 addql #1,%d4 rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 5446e: 0800 0000 btst #0,%d0 54472: 67f2 beqs 54466 54474: 1541 0002 moveb %d1,%a2@(2) i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 54478: 1542 0004 moveb %d2,%a2@(4) /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 5447c: 6700 051c beqw 5499a { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 54480: 4200 clrb %d0 54482: 0282 0000 00ff andil #255,%d2 54488: 1540 0005 moveb %d0,%a2@(5) 5448c: 2002 movel %d2,%d0 5448e: 0802 0000 btst #0,%d2 54492: 6600 04b4 bnew 54948 i >>= 1, vol->spc_log2++); 54496: e280 asrl #1,%d0 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 54498: 7201 moveq #1,%d1 i >>= 1, vol->spc_log2++); 5449a: 2801 movel %d1,%d4 5449c: 5284 addql #1,%d4 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 5449e: 0800 0000 btst #0,%d0 544a2: 660e bnes 544b2 <== ALWAYS TAKEN i >>= 1, vol->spc_log2++); 544a4: e280 asrl #1,%d0 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 544a6: 1204 moveb %d4,%d1 <== NOT EXECUTED i >>= 1, vol->spc_log2++); 544a8: 2801 movel %d1,%d4 <== NOT EXECUTED 544aa: 5284 addql #1,%d4 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 544ac: 0800 0000 btst #0,%d0 <== NOT EXECUTED 544b0: 67f2 beqs 544a4 <== NOT EXECUTED 544b2: 1541 0005 moveb %d1,%a2@(5) 544b6: 0281 0000 00ff andil #255,%d1 i >>= 1, vol->spc_log2++); /* * "bytes per cluster" value greater than 32K is invalid */ if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT) 544bc: 2805 movel %d5,%d4 544be: 4280 clrl %d0 544c0: e3ac lsll %d1,%d4 544c2: 3004 movew %d4,%d0 544c4: 3544 0006 movew %d4,%a2@(6) 544c8: 0c80 0000 8000 cmpil #32768,%d0 544ce: 6200 04ca bhiw 5499a { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 544d2: 4201 clrb %d1 544d4: 1541 0008 moveb %d1,%a2@(8) 544d8: 0800 0000 btst #0,%d0 544dc: 6620 bnes 544fe <== NEVER TAKEN i >>= 1, vol->bpc_log2++); 544de: e280 asrl #1,%d0 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 544e0: 7201 moveq #1,%d1 i >>= 1, vol->bpc_log2++); 544e2: 2801 movel %d1,%d4 544e4: 5284 addql #1,%d4 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 544e6: 0800 0000 btst #0,%d0 544ea: 660e bnes 544fa <== NEVER TAKEN i >>= 1, vol->bpc_log2++); 544ec: e280 asrl #1,%d0 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 544ee: 1204 moveb %d4,%d1 i >>= 1, vol->bpc_log2++); 544f0: 2801 movel %d1,%d4 544f2: 5284 addql #1,%d4 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 544f4: 0800 0000 btst #0,%d0 544f8: 67f2 beqs 544ec 544fa: 1541 0008 moveb %d1,%a2@(8) i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 544fe: 4281 clrl %d1 54500: 122e ffa6 moveb %fp@(-90),%d1 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 54504: 4284 clrl %d4 54506: 182e ffa4 moveb %fp@(-92),%d4 i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 5450a: 0287 0000 00ff andil #255,%d7 54510: 0286 0000 00ff andil #255,%d6 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 54516: e189 lsll #8,%d1 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 54518: e18f lsll #8,%d7 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 5451a: e18c lsll #8,%d4 i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 5451c: 8e86 orl %d6,%d7 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 5451e: 4286 clrl %d6 54520: 1c2e ffa7 moveb %fp@(-89),%d6 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 54524: 2007 movel %d7,%d0 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 54526: 2246 moveal %d6,%a1 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 54528: eb88 lsll #5,%d0 } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 5452a: 1543 0009 moveb %d3,%a2@(9) vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 5452e: 3547 001e movew %d7,%a2@(30) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 54532: 2040 moveal %d0,%a0 54534: 41f0 58ff lea %a0@(ffffffff,%d5:l),%a0 54538: 2008 movel %a0,%d0 5453a: 4c45 0800 remsl %d5,%d0,%d0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 5453e: 4285 clrl %d5 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 54540: 4286 clrl %d6 54542: 1c2e ffa5 moveb %fp@(-91),%d6 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 54546: 1a2a 0002 moveb %a2@(2),%d5 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 5454a: 2046 moveal %d6,%a0 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 5454c: 2c09 movel %a1,%d6 5454e: 8286 orl %d6,%d1 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 54550: 2c00 movel %d0,%d6 54552: ebae lsll %d5,%d6 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 54554: 3541 0014 movew %d1,%a2@(20) vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 54558: 2540 0020 movel %d0,%a2@(32) vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 5455c: 2a06 movel %d6,%d5 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 5455e: 2c08 movel %a0,%d6 54560: 8886 orl %d6,%d4 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 54562: 2545 0024 movel %d5,%a2@(36) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 54566: 4a44 tstw %d4 54568: 6700 0348 beqw 548b2 vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 5456c: 0284 0000 ffff andil #65535,%d4 54572: 2544 0016 movel %d4,%a2@(22) else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 54576: 0283 0000 00ff andil #255,%d3 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 5457c: 3a0d movew %a5,%d5 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 5457e: 4c04 3800 mulsl %d4,%d3 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 54582: 4284 clrl %d4 54584: 1805 moveb %d5,%d4 54586: 4285 clrl %d5 54588: 3c0c movew %a4,%d6 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 5458a: 0281 0000 ffff andil #65535,%d1 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 54590: e18c lsll #8,%d4 54592: 1a06 moveb %d6,%d5 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 54594: d283 addl %d3,%d1 54596: d081 addl %d1,%d0 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 54598: 8885 orl %d5,%d4 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 5459a: 2540 002c movel %d0,%a2@(44) vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 5459e: 2541 001a movel %d1,%a2@(26) if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 545a2: 4a44 tstw %d4 545a4: 6700 0144 beqw 546ea vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 545a8: 0284 0000 ffff andil #65535,%d4 545ae: 2544 0028 movel %d4,%a2@(40) else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; 545b2: 9880 subl %d0,%d4 vol->data_cls = data_secs / vol->spc; 545b4: 4c42 4004 remul %d2,%d4,%d4 545b8: 2544 0030 movel %d4,%a2@(48) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 545bc: 0c84 0000 0ff4 cmpil #4084,%d4 545c2: 6200 0164 bhiw 54728 { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; 545c6: 223c 0000 0ff8 movel #4088,%d1 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; 545cc: 307c 0fff moveaw #4095,%a0 vol->data_cls = data_secs / vol->spc; /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; 545d0: 7001 moveq #1,%d0 vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; 545d2: 2541 0010 movel %d1,%a2@(16) } } else { vol->rdir_cl = 0; vol->mirror = 0; 545d6: 4201 clrb %d1 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; 545d8: 2548 000c movel %a0,%a2@(12) vol->data_cls = data_secs / vol->spc; /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; 545dc: 1540 000a moveb %d0,%a2@(10) else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 545e0: 70ff moveq #-1,%d0 } } else { vol->rdir_cl = 0; vol->mirror = 0; 545e2: 1541 0042 moveb %d1,%a2@(66) vol->afat = 0; 545e6: 1541 0048 moveb %d1,%a2@(72) } } } else { vol->rdir_cl = 0; 545ea: 42aa 0034 clrl %a2@(52) vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 545ee: 2540 003a movel %d0,%a2@(58) vol->next_cl = 0xFFFFFFFF; 545f2: 2540 003e movel %d0,%a2@(62) int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 545f6: 2f2b 0034 movel %a3@(52),%sp@- _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 545fa: 47f9 0004 6090 lea 46090 ,%a3 int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 54600: 4eb9 0005 3a90 jsr 53a90 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 54606: 4280 clrl %d0 54608: 102a 0048 moveb %a2@(72),%d0 5460c: 41ea 0016 lea %a2@(22),%a0 54610: 4c10 0800 mulsl %a0@,%d0 54614: 4281 clrl %d1 54616: 322a 0014 movew %a2@(20),%d1 5461a: d081 addl %d1,%d0 5461c: 2540 0044 movel %d0,%a2@(68) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 54620: 4878 000c pea c 54624: 4878 0002 pea 2 54628: 4e93 jsr %a3@ if ( fs_info->vhash == NULL ) 5462a: 4fef 000c lea %sp@(12),%sp _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 5462e: 2040 moveal %d0,%a0 54630: 2540 005a movel %d0,%a2@(90) if ( fs_info->vhash == NULL ) 54634: 6700 0472 beqw 54aa8 } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 54638: 4878 000c pea c RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 5463c: 2240 moveal %d0,%a1 5463e: 5889 addql #4,%a1 54640: 2089 movel %a1,%a0@ 54642: 43e8 0010 lea %a0@(16),%a1 54646: 2149 000c movel %a1,%a0@(12) 5464a: 4878 0002 pea 2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 5464e: 43e8 000c lea %a0@(12),%a1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 54652: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 54656: 2149 0014 movel %a1,%a0@(20) Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 5465a: 2140 0008 movel %d0,%a0@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 5465e: 42a8 0010 clrl %a0@(16) 54662: 4e93 jsr %a3@ if ( fs_info->rhash == NULL ) 54664: 508f addql #8,%sp } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 54666: 2040 moveal %d0,%a0 54668: 2540 005e movel %d0,%a2@(94) if ( fs_info->rhash == NULL ) 5466c: 6700 0460 beqw 54ace RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 54670: 2240 moveal %d0,%a1 54672: 5889 addql #4,%a1 } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 54674: 4281 clrl %d1 rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 54676: 243c 0000 0100 movel #256,%d2 5467c: 2089 movel %a1,%a0@ 5467e: 43e8 0010 lea %a0@(16),%a1 fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 54682: 202a 0028 movel %a2@(40),%d0 54686: 2149 000c movel %a1,%a0@(12) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 5468a: 43e8 000c lea %a0@(12),%a1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 5468e: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 54692: 2149 0014 movel %a1,%a0@(20) Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 54696: 2148 0008 movel %a0,%a0@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 5469a: 42a8 0010 clrl %a0@(16) 5469e: 122a 0003 moveb %a2@(3),%d1 546a2: e3a8 lsll %d1,%d0 rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 546a4: 2542 006a movel %d2,%a2@(106) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 546a8: e988 lsll #4,%d0 fs_info->index = 0; 546aa: 42aa 0066 clrl %a2@(102) } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 546ae: 2540 006e movel %d0,%a2@(110) fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 546b2: 4878 0001 pea 1 546b6: 4878 0100 pea 100 546ba: 4e93 jsr %a3@ if ( fs_info->uino == NULL ) 546bc: 508f addql #8,%sp rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 546be: 2540 0062 movel %d0,%a2@(98) if ( fs_info->uino == NULL ) 546c2: 6700 0346 beqw 54a0a rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 546c6: 4878 0001 pea 1 546ca: 4280 clrl %d0 546cc: 3012 movew %a2@,%d0 546ce: 2f00 movel %d0,%sp@- 546d0: 4e93 jsr %a3@ if (fs_info->sec_buf == NULL) 546d2: 508f addql #8,%sp rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 546d4: 2540 007c movel %d0,%a2@(124) if (fs_info->sec_buf == NULL) 546d8: 6700 038e beqw 54a68 free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; 546dc: 4282 clrl %d2 } 546de: 2002 movel %d2,%d0 546e0: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 546e6: 4e5e unlk %fp 546e8: 4e75 rts vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 546ea: 4284 clrl %d4 <== NOT EXECUTED 546ec: 4281 clrl %d1 <== NOT EXECUTED 546ee: 182e ff9b moveb %fp@(-101),%d4 <== NOT EXECUTED 546f2: 122e ff9a moveb %fp@(-102),%d1 <== NOT EXECUTED 546f6: 4283 clrl %d3 <== NOT EXECUTED 546f8: 162e ff9c moveb %fp@(-100),%d3 <== NOT EXECUTED 546fc: 7e18 moveq #24,%d7 <== NOT EXECUTED 546fe: 4841 swap %d1 <== NOT EXECUTED 54700: 4241 clrw %d1 <== NOT EXECUTED 54702: e18c lsll #8,%d4 <== NOT EXECUTED 54704: 8881 orl %d1,%d4 <== NOT EXECUTED 54706: 122e ff99 moveb %fp@(-103),%d1 <== NOT EXECUTED 5470a: 8883 orl %d3,%d4 <== NOT EXECUTED 5470c: efa9 lsll %d7,%d1 <== NOT EXECUTED 5470e: 8881 orl %d1,%d4 <== NOT EXECUTED 54710: 2544 0028 movel %d4,%a2@(40) <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 54714: 9880 subl %d0,%d4 <== NOT EXECUTED vol->data_cls = data_secs / vol->spc; 54716: 4c42 4004 remul %d2,%d4,%d4 <== NOT EXECUTED 5471a: 2544 0030 movel %d4,%a2@(48) <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 5471e: 0c84 0000 0ff4 cmpil #4084,%d4 <== NOT EXECUTED 54724: 6300 fea0 blsw 545c6 <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 54728: 0c84 0000 fff4 cmpil #65524,%d4 <== NOT EXECUTED 5472e: 6300 01be blsw 548ee <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 54732: 4280 clrl %d0 <== NOT EXECUTED 54734: 4281 clrl %d1 <== NOT EXECUTED 54736: 102e ff8a moveb %fp@(-118),%d0 <== NOT EXECUTED 5473a: 122e ff89 moveb %fp@(-119),%d1 <== NOT EXECUTED 5473e: 4283 clrl %d3 <== NOT EXECUTED 54740: 162e ff8b moveb %fp@(-117),%d3 <== NOT EXECUTED 54744: 7a18 moveq #24,%d5 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 54746: 7c80 moveq #-128,%d6 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 54748: 207c 0fff ffff moveal #268435455,%a0 <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 5474e: 227c 0fff fff8 moveal #268435448,%a1 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 54754: 4841 swap %d1 <== NOT EXECUTED 54756: 4241 clrw %d1 <== NOT EXECUTED 54758: e188 lsll #8,%d0 <== NOT EXECUTED 5475a: 142e ff8f moveb %fp@(-113),%d2 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 5475e: 7e04 moveq #4,%d7 <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 54760: 2548 000c movel %a0,%a2@(12) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 54764: 8081 orl %d1,%d0 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 54766: 122e ff95 moveb %fp@(-107),%d1 <== NOT EXECUTED } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; vol->eoc_val = FAT_FAT32_EOC; 5476a: 2549 0010 movel %a1,%a2@(16) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 5476e: ebaa lsll %d5,%d2 <== NOT EXECUTED 54770: 8083 orl %d3,%d0 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 54772: c286 andl %d6,%d1 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 54774: 8082 orl %d2,%d0 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 54776: 1547 000a moveb %d7,%a2@(10) <== NOT EXECUTED if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 5477a: 1541 0042 moveb %d1,%a2@(66) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 5477e: 2540 0034 movel %d0,%a2@(52) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) 54782: 4a01 tstb %d1 <== NOT EXECUTED 54784: 6700 019e beqw 54924 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 54788: 740f moveq #15,%d2 <== NOT EXECUTED 5478a: 102e ff95 moveb %fp@(-107),%d0 <== NOT EXECUTED 5478e: c082 andl %d2,%d0 <== NOT EXECUTED 54790: 1540 0048 moveb %d0,%a2@(72) <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 54794: 4280 clrl %d0 <== NOT EXECUTED 54796: 102e ff90 moveb %fp@(-112),%d0 <== NOT EXECUTED 5479a: 4281 clrl %d1 <== NOT EXECUTED 5479c: 122e ff91 moveb %fp@(-111),%d1 <== NOT EXECUTED 547a0: e188 lsll #8,%d0 <== NOT EXECUTED 547a2: 8081 orl %d1,%d0 <== NOT EXECUTED 547a4: 3540 0038 movew %d0,%a2@(56) <== NOT EXECUTED if( vol->info_sec == 0 ) 547a8: 6700 01f0 beqw 5499a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); 547ac: 49ee fff0 lea %fp@(-16),%a4 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 547b0: 4bf9 0005 3bf2 lea 53bf2 <_fat_block_read>,%a5 <== NOT EXECUTED 547b6: 2f0c movel %a4,%sp@- <== NOT EXECUTED 547b8: 4878 0004 pea 4 <== NOT EXECUTED 547bc: 42a7 clrl %sp@- <== NOT EXECUTED 547be: 3f00 movew %d0,%sp@- <== NOT EXECUTED 547c0: 4267 clrw %sp@- <== NOT EXECUTED 547c2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 547c4: 4e95 jsr %a5@ <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 547c6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 547ca: 4a80 tstl %d0 <== NOT EXECUTED 547cc: 6d00 0330 bltw 54afe <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 547d0: 4280 clrl %d0 <== NOT EXECUTED 547d2: 4281 clrl %d1 <== NOT EXECUTED 547d4: 102c 0001 moveb %a4@(1),%d0 <== NOT EXECUTED 547d8: 122c 0002 moveb %a4@(2),%d1 <== NOT EXECUTED 547dc: 4282 clrl %d2 <== NOT EXECUTED 547de: 1414 moveb %a4@,%d2 <== NOT EXECUTED 547e0: 4841 swap %d1 <== NOT EXECUTED 547e2: 4241 clrw %d1 <== NOT EXECUTED 547e4: e188 lsll #8,%d0 <== NOT EXECUTED 547e6: 8081 orl %d1,%d0 <== NOT EXECUTED 547e8: 4281 clrl %d1 <== NOT EXECUTED 547ea: 122c 0003 moveb %a4@(3),%d1 <== NOT EXECUTED 547ee: 8082 orl %d2,%d0 <== NOT EXECUTED 547f0: 7418 moveq #24,%d2 <== NOT EXECUTED 547f2: e5a9 lsll %d2,%d1 <== NOT EXECUTED 547f4: 8081 orl %d1,%d0 <== NOT EXECUTED 547f6: 0c80 4161 5252 cmpil #1096897106,%d0 <== NOT EXECUTED 547fc: 6600 01c2 bnew 549c0 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 54800: 2f0c movel %a4,%sp@- <== NOT EXECUTED 54802: 4878 000c pea c <== NOT EXECUTED 54806: 4280 clrl %d0 <== NOT EXECUTED 54808: 4878 01e4 pea 1e4 <== NOT EXECUTED 5480c: 302a 0038 movew %a2@(56),%d0 <== NOT EXECUTED 54810: 2f00 movel %d0,%sp@- <== NOT EXECUTED 54812: 2f0b movel %a3,%sp@- <== NOT EXECUTED 54814: 4e95 jsr %a5@ <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 54816: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5481a: 4a80 tstl %d0 <== NOT EXECUTED 5481c: 6d00 0226 bltw 54a44 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 54820: 4281 clrl %d1 <== NOT EXECUTED 54822: 4283 clrl %d3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 54824: 4280 clrl %d0 <== NOT EXECUTED 54826: 4282 clrl %d2 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 54828: 122c 0005 moveb %a4@(5),%d1 <== NOT EXECUTED 5482c: 162c 0006 moveb %a4@(6),%d3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 54830: 102c 0009 moveb %a4@(9),%d0 <== NOT EXECUTED 54834: 142c 000a moveb %a4@(10),%d2 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 54838: 4285 clrl %d5 <== NOT EXECUTED 5483a: 1a2c 0004 moveb %a4@(4),%d5 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5483e: 4284 clrl %d4 <== NOT EXECUTED 54840: 182c 0008 moveb %a4@(8),%d4 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 54844: 4843 swap %d3 <== NOT EXECUTED 54846: 4243 clrw %d3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 54848: 4842 swap %d2 <== NOT EXECUTED 5484a: 4242 clrw %d2 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 5484c: e189 lsll #8,%d1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5484e: e188 lsll #8,%d0 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 54850: 8283 orl %d3,%d1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 54852: 8082 orl %d2,%d0 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 54854: 4283 clrl %d3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 54856: 4282 clrl %d2 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 54858: 162c 0007 moveb %a4@(7),%d3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5485c: 142c 000b moveb %a4@(11),%d2 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 54860: 8285 orl %d5,%d1 <== NOT EXECUTED 54862: 7a18 moveq #24,%d5 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 54864: 8084 orl %d4,%d0 <== NOT EXECUTED 54866: ebaa lsll %d5,%d2 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 54868: ebab lsll %d5,%d3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5486a: 8082 orl %d2,%d0 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 5486c: 8283 orl %d3,%d1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5486e: 2540 003e movel %d0,%a2@(62) <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 54872: 2541 003a movel %d1,%a2@(58) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 54876: 4878 ffff pea ffffffff <== NOT EXECUTED 5487a: 4878 ffff pea ffffffff <== NOT EXECUTED 5487e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 54880: 4eb9 0005 4084 jsr 54084 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 54886: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 5488a: 2400 movel %d0,%d2 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 5488c: 6700 fd68 beqw 545f6 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 54890: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED 54894: 4eb9 0005 3a90 jsr 53a90 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 0xFFFFFFFF); if ( rc != RC_OK ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 5489a: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 5489e: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED return rc; 548a4: 508f addql #8,%sp <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 548a6: 2002 movel %d2,%d0 <== NOT EXECUTED 548a8: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 548ae: 4e5e unlk %fp <== NOT EXECUTED 548b0: 4e75 rts <== NOT EXECUTED vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 548b2: 4284 clrl %d4 <== NOT EXECUTED 548b4: 4285 clrl %d5 <== NOT EXECUTED 548b6: 182e ff9d moveb %fp@(-99),%d4 <== NOT EXECUTED 548ba: 1a2e ffa3 moveb %fp@(-93),%d5 <== NOT EXECUTED 548be: 4286 clrl %d6 <== NOT EXECUTED 548c0: 1c2e ffa2 moveb %fp@(-94),%d6 <== NOT EXECUTED 548c4: 7e18 moveq #24,%d7 <== NOT EXECUTED 548c6: 4845 swap %d5 <== NOT EXECUTED 548c8: 4245 clrw %d5 <== NOT EXECUTED 548ca: e18c lsll #8,%d4 <== NOT EXECUTED 548cc: 8885 orl %d5,%d4 <== NOT EXECUTED 548ce: 1a2e ffa1 moveb %fp@(-95),%d5 <== NOT EXECUTED 548d2: 8886 orl %d6,%d4 <== NOT EXECUTED 548d4: efad lsll %d7,%d5 <== NOT EXECUTED 548d6: 8885 orl %d5,%d4 <== NOT EXECUTED 548d8: 2544 0016 movel %d4,%a2@(22) <== NOT EXECUTED 548dc: 6000 fc98 braw 54576 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 548e0: 4200 clrb %d0 548e2: 7201 moveq #1,%d1 548e4: 1540 0003 moveb %d0,%a2@(3) 548e8: 2005 movel %d5,%d0 548ea: 6000 fb6e braw 5445a else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 548ee: 70ff moveq #-1,%d0 <== NOT EXECUTED else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; vol->mask = FAT_FAT16_MASK; 548f0: 243c 0000 ffff movel #65535,%d2 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 548f6: 283c 0000 fff8 movel #65528,%d4 <== NOT EXECUTED } } else { vol->rdir_cl = 0; vol->mirror = 0; 548fc: 4201 clrb %d1 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 548fe: 7602 moveq #2,%d3 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 54900: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 54904: 1543 000a moveb %d3,%a2@(10) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; 54908: 2544 0010 movel %d4,%a2@(16) <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 5490c: 42aa 0034 clrl %a2@(52) <== NOT EXECUTED vol->mirror = 0; 54910: 1541 0042 moveb %d1,%a2@(66) <== NOT EXECUTED vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 54914: 2540 003a movel %d0,%a2@(58) <== NOT EXECUTED } else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; 54918: 1541 0048 moveb %d1,%a2@(72) <== NOT EXECUTED vol->free_cls = 0xFFFFFFFF; vol->next_cl = 0xFFFFFFFF; 5491c: 2540 003e movel %d0,%a2@(62) <== NOT EXECUTED 54920: 6000 fcd4 braw 545f6 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; 54924: 4203 clrb %d3 <== NOT EXECUTED 54926: 1543 0048 moveb %d3,%a2@(72) <== NOT EXECUTED 5492a: 6000 fe68 braw 54794 <== NOT EXECUTED if (rc == -1) return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); 5492e: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54934: 74ff moveq #-1,%d2 <== NOT EXECUTED 54936: 7c19 moveq #25,%d6 <== NOT EXECUTED 54938: 2040 moveal %d0,%a0 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 5493a: 2002 movel %d2,%d0 <== NOT EXECUTED if (rc == -1) return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); 5493c: 2086 movel %d6,%a0@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 5493e: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54944: 4e5e unlk %fp <== NOT EXECUTED 54946: 4e75 rts <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 54948: 4281 clrl %d1 <== NOT EXECUTED 5494a: 6000 fb70 braw 544bc <== NOT EXECUTED if ( (vol->bps != 512) && (vol->bps != 1024) && (vol->bps != 2048) && (vol->bps != 4096)) { rtems_disk_release(vol->dd); 5494e: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 54952: 74ff moveq #-1,%d2 <== NOT EXECUTED 54954: 7616 moveq #22,%d3 <== NOT EXECUTED if ( (vol->bps != 512) && (vol->bps != 1024) && (vol->bps != 2048) && (vol->bps != 4096)) { rtems_disk_release(vol->dd); 54956: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 5495c: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54962: 588f addql #4,%sp <== NOT EXECUTED 54964: 2240 moveal %d0,%a1 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54966: 2002 movel %d2,%d0 <== NOT EXECUTED (vol->bps != 1024) && (vol->bps != 2048) && (vol->bps != 4096)) { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); 54968: 2283 movel %d3,%a1@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 5496a: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54970: 4e5e unlk %fp <== NOT EXECUTED 54972: 4e75 rts <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); 54974: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 54978: 74ff moveq #-1,%d2 <== NOT EXECUTED 5497a: 7805 moveq #5,%d4 <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); 5497c: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 54982: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54988: 588f addql #4,%sp <== NOT EXECUTED 5498a: 2040 moveal %d0,%a0 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 5498c: 2002 movel %d2,%d0 <== NOT EXECUTED sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); 5498e: 2084 movel %d4,%a0@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54990: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54996: 4e5e unlk %fp <== NOT EXECUTED 54998: 4e75 rts <== NOT EXECUTED vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { rtems_disk_release(vol->dd); 5499a: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 5499e: 74ff moveq #-1,%d2 <== NOT EXECUTED vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { rtems_disk_release(vol->dd); 549a0: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 549a6: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 549ac: 588f addql #4,%sp <== NOT EXECUTED 549ae: 7216 moveq #22,%d1 <== NOT EXECUTED 549b0: 2040 moveal %d0,%a0 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 549b2: 2002 movel %d2,%d0 <== NOT EXECUTED 549b4: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); 549ba: 2081 movel %d1,%a0@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 549bc: 4e5e unlk %fp <== NOT EXECUTED 549be: 4e75 rts <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 549c0: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); 549c4: 74ff moveq #-1,%d2 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 549c6: 4eb9 0005 3a90 jsr 53a90 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 549cc: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 549d0: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 549d6: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 549dc: 508f addql #8,%sp <== NOT EXECUTED 549de: 2040 moveal %d0,%a0 <== NOT EXECUTED 549e0: 7016 moveq #22,%d0 <== NOT EXECUTED 549e2: 2080 movel %d0,%a0@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 549e4: 2002 movel %d2,%d0 <== NOT EXECUTED 549e6: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 549ec: 4e5e unlk %fp <== NOT EXECUTED 549ee: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); 549f0: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 549f6: 74ff moveq #-1,%d2 <== NOT EXECUTED 549f8: 7a05 moveq #5,%d5 <== NOT EXECUTED 549fa: 2240 moveal %d0,%a1 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 549fc: 2002 movel %d2,%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); 549fe: 2285 movel %d5,%a1@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54a00: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54a06: 4e5e unlk %fp <== NOT EXECUTED 54a08: 4e75 rts <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { rtems_disk_release(vol->dd); 54a0a: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED free(fs_info->vhash); 54a0e: 47f9 0004 680c lea 4680c ,%a3 <== NOT EXECUTED free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 54a14: 74ff moveq #-1,%d2 <== NOT EXECUTED 54a16: 7a0c moveq #12,%d5 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { rtems_disk_release(vol->dd); 54a18: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED free(fs_info->vhash); 54a1e: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 54a22: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 54a24: 2f2a 005e movel %a2@(94),%sp@- <== NOT EXECUTED 54a28: 4e93 jsr %a3@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 54a2a: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54a30: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 54a34: 2240 moveal %d0,%a1 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54a36: 2002 movel %d2,%d0 <== NOT EXECUTED if ( fs_info->uino == NULL ) { rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 54a38: 2285 movel %d5,%a1@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54a3a: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54a40: 4e5e unlk %fp <== NOT EXECUTED 54a42: 4e75 rts <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 54a44: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; 54a48: 74ff moveq #-1,%d2 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 54a4a: 4eb9 0005 3a90 jsr 53a90 <== NOT EXECUTED ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 54a50: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 54a54: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED return -1; 54a5a: 508f addql #8,%sp <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54a5c: 2002 movel %d2,%d0 <== NOT EXECUTED 54a5e: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54a64: 4e5e unlk %fp <== NOT EXECUTED 54a66: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { rtems_disk_release(vol->dd); 54a68: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED free(fs_info->vhash); 54a6c: 47f9 0004 680c lea 4680c ,%a3 <== NOT EXECUTED free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); 54a72: 74ff moveq #-1,%d2 <== NOT EXECUTED 54a74: 780c moveq #12,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { rtems_disk_release(vol->dd); 54a76: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED free(fs_info->vhash); 54a7c: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 54a80: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 54a82: 2f2a 005e movel %a2@(94),%sp@- <== NOT EXECUTED 54a86: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->uino); 54a88: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 54a8c: 4e93 jsr %a3@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 54a8e: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54a94: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 54a98: 2040 moveal %d0,%a0 <== NOT EXECUTED } return RC_OK; } 54a9a: 2002 movel %d2,%d0 <== NOT EXECUTED { rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); 54a9c: 2084 movel %d4,%a0@ <== NOT EXECUTED } return RC_OK; } 54a9e: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54aa4: 4e5e unlk %fp <== NOT EXECUTED 54aa6: 4e75 rts <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { rtems_disk_release(vol->dd); 54aa8: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 54aac: 74ff moveq #-1,%d2 <== NOT EXECUTED 54aae: 7e0c moveq #12,%d7 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { rtems_disk_release(vol->dd); 54ab0: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 54ab6: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54abc: 588f addql #4,%sp <== NOT EXECUTED 54abe: 2040 moveal %d0,%a0 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54ac0: 2002 movel %d2,%d0 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( ENOMEM ); 54ac2: 2087 movel %d7,%a0@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54ac4: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54aca: 4e5e unlk %fp <== NOT EXECUTED 54acc: 4e75 rts <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { rtems_disk_release(vol->dd); 54ace: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 54ad2: 74ff moveq #-1,%d2 <== NOT EXECUTED 54ad4: 7c0c moveq #12,%d6 <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { rtems_disk_release(vol->dd); 54ad6: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED free(fs_info->vhash); 54adc: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 54ae0: 4eb9 0004 680c jsr 4680c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 54ae6: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54aec: 508f addql #8,%sp <== NOT EXECUTED 54aee: 2040 moveal %d0,%a0 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54af0: 2002 movel %d2,%d0 <== NOT EXECUTED fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { rtems_disk_release(vol->dd); free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 54af2: 2086 movel %d6,%a0@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54af4: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54afa: 4e5e unlk %fp <== NOT EXECUTED 54afc: 4e75 rts <== NOT EXECUTED { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) { rtems_disk_release(vol->dd); 54afe: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED return -1; 54b02: 74ff moveq #-1,%d2 <== NOT EXECUTED { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) { rtems_disk_release(vol->dd); 54b04: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED return -1; 54b0a: 588f addql #4,%sp <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54b0c: 2002 movel %d2,%d0 <== NOT EXECUTED 54b0e: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54b14: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005bd46 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 5bd46: 4e56 ffd0 linkw %fp,#-48 5bd4a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5bd4e: 246e 0008 moveal %fp@(8),%a2 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5bd52: 206a 0034 moveal %a2@(52),%a0 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 5bd56: 266e 0014 moveal %fp@(20),%a3 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 5bd5a: 2a28 0030 movel %a0@(48),%d5 uint32_t *cls_added, uint32_t *last_cl ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5bd5e: 2d48 fff8 movel %a0,%fp@(-8) uint32_t cl4find = 2; uint32_t next_cln = 0; 5bd62: 42ae fffc clrl %fp@(-4) uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; 5bd66: 4293 clrl %a3@ if (count == 0) 5bd68: 4aae 0010 tstl %fp@(16) 5bd6c: 6700 0112 beqw 5be80 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 5bd70: 2428 003e movel %a0@(62),%d2 5bd74: 70ff moveq #-1,%d0 5bd76: b082 cmpl %d2,%d0 5bd78: 6700 0114 beqw 5be8e int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 5bd7c: 5485 addql #2,%d5 /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 5bd7e: 7202 moveq #2,%d1 5bd80: b285 cmpl %d5,%d1 5bd82: 6400 0192 bccw 5bf16 5bd86: 2c0e movel %fp,%d6 5bd88: 7602 moveq #2,%d3 5bd8a: 4287 clrl %d7 5bd8c: 5986 subql #4,%d6 5bd8e: 49f9 0005 b828 lea 5b828 ,%a4 } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5bd94: 4bf9 0005 b9da lea 5b9da ,%a5 * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 5bd9a: 2f06 movel %d6,%sp@- 5bd9c: 2f02 movel %d2,%sp@- 5bd9e: 2f0a movel %a2,%sp@- 5bda0: 4e94 jsr %a4@ if ( rc != RC_OK ) 5bda2: 4fef 000c lea %sp@(12),%sp * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 5bda6: 2800 movel %d0,%d4 if ( rc != RC_OK ) 5bda8: 6600 00ea bnew 5be94 if (*cls_added != 0) fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 5bdac: 4aae fffc tstl %fp@(-4) 5bdb0: 662e bnes 5bde0 /* * We are enforced to process allocation of the first free cluster * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) 5bdb2: 4a93 tstl %a3@ 5bdb4: 6670 bnes 5be26 <== NEVER TAKEN { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5bdb6: 4878 ffff pea ffffffff * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; 5bdba: 206e 000c moveal %fp@(12),%a0 rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5bdbe: 2f02 movel %d2,%sp@- * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; 5bdc0: 2082 movel %d2,%a0@ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5bdc2: 2f0a movel %a2,%sp@- 5bdc4: 4e95 jsr %a5@ if ( rc != RC_OK ) 5bdc6: 4fef 000c lea %sp@(12),%sp 5bdca: 4a80 tstl %d0 5bdcc: 6600 011c bnew 5beea return rc; } } save_cln = cl4find; (*cls_added)++; 5bdd0: 2013 movel %a3@,%d0 5bdd2: 5280 addql #1,%d0 5bdd4: 2680 movel %d0,%a3@ /* have we satisfied request ? */ if (*cls_added == count) 5bdd6: b0ae 0010 cmpl %fp@(16),%d0 5bdda: 6700 00d8 beqw 5beb4 5bdde: 2e02 movel %d2,%d7 <== NOT EXECUTED *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; 5bde0: 5283 addql #1,%d3 cl4find++; 5bde2: 5282 addql #1,%d2 if (cl4find >= data_cls_val) 5bde4: b485 cmpl %d5,%d2 5bde6: 6502 bcss 5bdea <== ALWAYS TAKEN cl4find = 2; 5bde8: 7402 moveq #2,%d2 <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 5bdea: b685 cmpl %d5,%d3 5bdec: 65ac bcss 5bd9a <== ALWAYS TAKEN if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 5bdee: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 5bdf2: 72ff moveq #-1,%d1 <== NOT EXECUTED 5bdf4: 2028 003a movel %a0@(58),%d0 <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 5bdf8: 2147 003e movel %d7,%a0@(62) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 5bdfc: b280 cmpl %d0,%d1 <== NOT EXECUTED 5bdfe: 6706 beqs 5be06 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 5be00: 9093 subl %a3@,%d0 <== NOT EXECUTED 5be02: 2140 003a movel %d0,%a0@(58) <== NOT EXECUTED *last_cl = save_cln; 5be06: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED fat_buf_release(fs_info); return RC_OK; 5be0a: 4284 clrl %d4 <== NOT EXECUTED fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; 5be0c: 2087 movel %d7,%a0@ <== NOT EXECUTED fat_buf_release(fs_info); 5be0e: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 5be12: 4eb9 0005 3a90 jsr 53a90 <== NOT EXECUTED return RC_OK; 5be18: 588f addql #4,%sp <== NOT EXECUTED } 5be1a: 2004 movel %d4,%d0 <== NOT EXECUTED 5be1c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5be22: 4e5e unlk %fp <== NOT EXECUTED 5be24: 4e75 rts <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5be26: 4878 ffff pea ffffffff <== NOT EXECUTED 5be2a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5be2c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5be2e: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 5be30: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5be34: 4a80 tstl %d0 <== NOT EXECUTED 5be36: 6600 00c0 bnew 5bef8 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 5be3a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5be3c: 2f07 movel %d7,%sp@- <== NOT EXECUTED 5be3e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5be40: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 5be42: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5be46: 4a80 tstl %d0 <== NOT EXECUTED 5be48: 6786 beqs 5bdd0 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 5be4a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 5be4e: 2800 movel %d0,%d4 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 5be50: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5be52: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5be54: 4eb9 0005 bc70 jsr 5bc70 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 5be5a: 42a7 clrl %sp@- <== NOT EXECUTED 5be5c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5be5e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5be60: 4eb9 0005 b9da jsr 5b9da <== NOT EXECUTED fat_buf_release(fs_info); 5be66: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 5be6a: 4eb9 0005 3a90 jsr 53a90 <== NOT EXECUTED return rc; 5be70: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 5be74: 2004 movel %d4,%d0 <== NOT EXECUTED 5be76: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5be7c: 4e5e unlk %fp <== NOT EXECUTED 5be7e: 4e75 rts <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; if (count == 0) return rc; 5be80: 4284 clrl %d4 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 5be82: 2004 movel %d4,%d0 <== NOT EXECUTED 5be84: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5be8a: 4e5e unlk %fp <== NOT EXECUTED 5be8c: 4e75 rts <== NOT EXECUTED uint32_t *last_cl ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; 5be8e: 7402 moveq #2,%d2 5be90: 6000 feea braw 5bd7c while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); if ( rc != RC_OK ) { if (*cls_added != 0) 5be94: 4a93 tstl %a3@ <== NOT EXECUTED 5be96: 6782 beqs 5be1a <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 5be98: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5be9c: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5be9e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5bea0: 4eb9 0005 bc70 jsr 5bc70 <== NOT EXECUTED 5bea6: 508f addql #8,%sp <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 5bea8: 2004 movel %d4,%d0 <== NOT EXECUTED 5beaa: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5beb0: 4e5e unlk %fp <== NOT EXECUTED 5beb2: 4e75 rts <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 5beb4: 206e fff8 moveal %fp@(-8),%a0 5beb8: 72ff moveq #-1,%d1 5beba: 2028 003a movel %a0@(58),%d0 (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; 5bebe: 2142 003e movel %d2,%a0@(62) if (fs_info->vol.free_cls != 0xFFFFFFFF) 5bec2: b280 cmpl %d0,%d1 5bec4: 6706 beqs 5becc <== ALWAYS TAKEN fs_info->vol.free_cls -= (*cls_added); 5bec6: 9093 subl %a3@,%d0 <== NOT EXECUTED 5bec8: 2140 003a movel %d0,%a0@(58) <== NOT EXECUTED *last_cl = save_cln; 5becc: 206e 0018 moveal %fp@(24),%a0 5bed0: 2082 movel %d2,%a0@ fat_buf_release(fs_info); 5bed2: 2f2e fff8 movel %fp@(-8),%sp@- 5bed6: 4eb9 0005 3a90 jsr 53a90 return rc; 5bedc: 588f addql #4,%sp fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 5bede: 2004 movel %d4,%d0 5bee0: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 5bee6: 4e5e unlk %fp 5bee8: 4e75 rts * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5beea: 2800 movel %d0,%d4 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 5beec: 2004 movel %d4,%d0 <== NOT EXECUTED 5beee: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5bef4: 4e5e unlk %fp <== NOT EXECUTED 5bef6: 4e75 rts <== NOT EXECUTED /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 5bef8: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5befc: 2800 movel %d0,%d4 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 5befe: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5bf00: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5bf02: 4eb9 0005 bc70 jsr 5bc70 <== NOT EXECUTED return rc; 5bf08: 508f addql #8,%sp <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 5bf0a: 2004 movel %d4,%d0 <== NOT EXECUTED 5bf0c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5bf12: 4e5e unlk %fp <== NOT EXECUTED 5bf14: 4e75 rts <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 5bf16: 4287 clrl %d7 <== NOT EXECUTED 5bf18: 6000 fed4 braw 5bdee <== NOT EXECUTED =============================================================================== 0005b9da : uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 5b9da: 7001 moveq #1,%d0 fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 5b9dc: 4e56 ffe0 linkw %fp,#-32 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5b9e0: 206e 0008 moveal %fp@(8),%a0 fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 5b9e4: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 5b9e8: 242e 000c movel %fp@(12),%d2 5b9ec: 2a2e 0010 movel %fp@(16),%d5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5b9f0: 2468 0034 moveal %a0@(52),%a2 uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; 5b9f4: 42ae fffc clrl %fp@(-4) /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 5b9f8: b082 cmpl %d2,%d0 5b9fa: 6476 bccs 5ba72 <== NEVER TAKEN 5b9fc: 202a 0030 movel %a2@(48),%d0 5ba00: 5280 addql #1,%d0 5ba02: b082 cmpl %d2,%d0 5ba04: 656c bcss 5ba72 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 5ba06: 4280 clrl %d0 5ba08: 102a 000a moveb %a2@(10),%d0 5ba0c: 2802 movel %d2,%d4 5ba0e: 0800 0000 btst #0,%d0 5ba12: 6676 bnes 5ba8a <== ALWAYS TAKEN 5ba14: 0800 0001 btst #1,%d0 <== NOT EXECUTED 5ba18: 6776 beqs 5ba90 <== NOT EXECUTED 5ba1a: d884 addl %d4,%d4 <== NOT EXECUTED 5ba1c: 4280 clrl %d0 5ba1e: 102a 0002 moveb %a2@(2),%d0 5ba22: 2604 movel %d4,%d3 5ba24: e0ab lsrl %d0,%d3 5ba26: d6aa 0044 addl %a2@(68),%d3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 5ba2a: 47f9 0005 387c lea 5387c ,%a3 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 5ba30: 3c12 movew %a2@,%d6 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 5ba32: 486e fffc pea %fp@(-4) 5ba36: 4878 0001 pea 1 5ba3a: 2f03 movel %d3,%sp@- 5ba3c: 2f0a movel %a2,%sp@- 5ba3e: 4e93 jsr %a3@ if (rc != RC_OK) 5ba40: 4fef 0010 lea %sp@(16),%sp 5ba44: 4a80 tstl %d0 5ba46: 6638 bnes 5ba80 <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) 5ba48: 4281 clrl %d1 5ba4a: 122a 000a moveb %a2@(10),%d1 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 5ba4e: 0286 0000 ffff andil #65535,%d6 5ba54: 5386 subql #1,%d6 5ba56: c886 andl %d6,%d4 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 5ba58: 7c02 moveq #2,%d6 5ba5a: bc81 cmpl %d1,%d6 5ba5c: 6700 00f2 beqw 5bb50 5ba60: 1c3c 0004 moveb #4,%d6 5ba64: bc81 cmpl %d1,%d6 5ba66: 6700 009a beqw 5bb02 5ba6a: 1c3c 0001 moveb #1,%d6 5ba6e: bc81 cmpl %d1,%d6 5ba70: 6722 beqs 5ba94 <== ALWAYS TAKEN fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 5ba72: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5ba78: 7205 moveq #5,%d1 <== NOT EXECUTED 5ba7a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5ba7c: 70ff moveq #-1,%d0 <== NOT EXECUTED 5ba7e: 2081 movel %d1,%a0@ <== NOT EXECUTED break; } return RC_OK; } 5ba80: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5ba86: 4e5e unlk %fp <== NOT EXECUTED 5ba88: 4e75 rts <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 5ba8a: e28c lsrl #1,%d4 5ba8c: d882 addl %d2,%d4 5ba8e: 608c bras 5ba1c 5ba90: e58c lsll #2,%d4 <== NOT EXECUTED 5ba92: 6088 bras 5ba1c <== NOT EXECUTED case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 5ba94: 206e fffc moveal %fp@(-4),%a0 5ba98: 2068 001e moveal %a0@(30),%a0 return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 5ba9c: 0802 0000 btst #0,%d2 5baa0: 6700 00d8 beqw 5bb7a { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 5baa4: d1c4 addal %d4,%a0 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 5baa6: 740f moveq #15,%d2 5baa8: 1210 moveb %a0@,%d1 switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 5baaa: e98d lsll #4,%d5 *((uint8_t *)(block0->buffer + ofs)) = 5baac: c282 andl %d2,%d1 5baae: 1081 moveb %d1,%a0@ (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 5bab0: 206e fffc moveal %fp@(-4),%a0 5bab4: 2068 001e moveal %a0@(30),%a0 5bab8: d1c4 addal %d4,%a0 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 5baba: 1210 moveb %a0@,%d1 5babc: 8285 orl %d5,%d1 5babe: 1081 moveb %d1,%a0@ (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 5bac0: 4281 clrl %d1 5bac2: 3212 movew %a2@,%d1 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 5bac4: 1546 0076 moveb %d6,%a2@(118) 5bac8: 5381 subql #1,%d1 5baca: b881 cmpl %d1,%d4 5bacc: 6700 0110 beqw 5bbde fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 5bad0: 206e fffc moveal %fp@(-4),%a0 5bad4: 5284 addql #1,%d4 5bad6: 2068 001e moveal %a0@(30),%a0 5bada: 4201 clrb %d1 *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5badc: 0285 0000 ffff andil #65535,%d5 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 5bae2: 1181 4800 moveb %d1,%a0@(00000000,%d4:l) *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5bae6: e08d lsrl #8,%d5 else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 5bae8: 206e fffc moveal %fp@(-4),%a0 5baec: 2068 001e moveal %a0@(30),%a0 5baf0: d1c4 addal %d4,%a0 } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 5baf2: 1210 moveb %a0@,%d1 5baf4: 8a81 orl %d1,%d5 5baf6: 1085 moveb %d5,%a0@ break; } return RC_OK; } 5baf8: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 5bafe: 4e5e unlk %fp 5bb00: 4e75 rts case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 5bb02: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); fat_buf_mark_modified(fs_info); break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 5bb06: 2405 movel %d5,%d2 <== NOT EXECUTED byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5bb08: 7c18 moveq #24,%d6 <== NOT EXECUTED 5bb0a: 0282 0fff ffff andil #268435455,%d2 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 5bb10: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5bb14: d1c4 addal %d4,%a0 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 5bb16: 2802 movel %d2,%d4 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 5bb18: 2202 movel %d2,%d1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 5bb1a: ecac lsrl %d6,%d4 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 5bb1c: e089 lsrl #8,%d1 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5bb1e: edad lsll %d6,%d5 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 5bb20: e18a lsll #8,%d2 <== NOT EXECUTED 5bb22: 2610 movel %a0@,%d3 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5bb24: 8a84 orl %d4,%d5 <== NOT EXECUTED 5bb26: 0282 00ff 0000 andil #16711680,%d2 <== NOT EXECUTED 5bb2c: 0281 0000 ff00 andil #65280,%d1 <== NOT EXECUTED 5bb32: 0283 0000 00f0 andil #240,%d3 <== NOT EXECUTED 5bb38: 8a82 orl %d2,%d5 <== NOT EXECUTED 5bb3a: 8a81 orl %d1,%d5 <== NOT EXECUTED 5bb3c: 7201 moveq #1,%d1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 5bb3e: 8a83 orl %d3,%d5 <== NOT EXECUTED 5bb40: 2085 movel %d5,%a0@ <== NOT EXECUTED 5bb42: 1541 0076 moveb %d1,%a2@(118) <== NOT EXECUTED break; } return RC_OK; } 5bb46: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5bb4c: 4e5e unlk %fp <== NOT EXECUTED 5bb4e: 4e75 rts <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 5bb50: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 5bb54: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 5bb5a: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED static inline uint16_t m68k_swap_u16( uint16_t value ) { return (((value & 0xff) << 8) | ((value >> 8) & 0xff)); 5bb5e: 2205 movel %d5,%d1 <== NOT EXECUTED 5bb60: e089 lsrl #8,%d1 <== NOT EXECUTED 5bb62: e18d lsll #8,%d5 <== NOT EXECUTED 5bb64: 8a81 orl %d1,%d5 <== NOT EXECUTED 5bb66: 7201 moveq #1,%d1 <== NOT EXECUTED 5bb68: 3185 4800 movew %d5,%a0@(00000000,%d4:l) <== NOT EXECUTED 5bb6c: 1541 0076 moveb %d1,%a2@(118) <== NOT EXECUTED break; } return RC_OK; } 5bb70: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5bb76: 4e5e unlk %fp <== NOT EXECUTED 5bb78: 4e75 rts <== NOT EXECUTED } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 5bb7a: 4202 clrb %d2 (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 5bb7c: 0285 0000 0fff andil #4095,%d5 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 5bb82: 1182 4800 moveb %d2,%a0@(00000000,%d4:l) 5bb86: 7c01 moveq #1,%d6 *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 5bb88: 206e fffc moveal %fp@(-4),%a0 5bb8c: 2068 001e moveal %a0@(30),%a0 5bb90: d1c4 addal %d4,%a0 else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 5bb92: 1210 moveb %a0@,%d1 5bb94: 8285 orl %d5,%d1 5bb96: 1081 moveb %d1,%a0@ (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 5bb98: 4281 clrl %d1 5bb9a: 3212 movew %a2@,%d1 5bb9c: 1546 0076 moveb %d6,%a2@(118) 5bba0: 5381 subql #1,%d1 5bba2: b881 cmpl %d1,%d4 5bba4: 6700 0082 beqw 5bc28 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 5bba8: 206e fffc moveal %fp@(-4),%a0 5bbac: 5284 addql #1,%d4 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 5bbae: 7cf0 moveq #-16,%d6 (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 5bbb0: 2068 001e moveal %a0@(30),%a0 5bbb4: d1c4 addal %d4,%a0 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 5bbb6: 1210 moveb %a0@,%d1 (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5bbb8: 0285 0000 ffff andil #65535,%d5 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 5bbbe: c286 andl %d6,%d1 (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5bbc0: e08d lsrl #8,%d5 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 5bbc2: 1081 moveb %d1,%a0@ (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 5bbc4: 206e fffc moveal %fp@(-4),%a0 5bbc8: 2068 001e moveal %a0@(30),%a0 5bbcc: d1c4 addal %d4,%a0 else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 5bbce: 1210 moveb %a0@,%d1 5bbd0: 8a81 orl %d1,%d5 5bbd2: 1085 moveb %d5,%a0@ break; } return RC_OK; } 5bbd4: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 5bbda: 4e5e unlk %fp 5bbdc: 4e75 rts fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 5bbde: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5bbe2: 2043 moveal %d3,%a0 <== NOT EXECUTED 5bbe4: 4878 0001 pea 1 <== NOT EXECUTED 5bbe8: 4868 0001 pea %a0@(1) <== NOT EXECUTED 5bbec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5bbee: 4e93 jsr %a3@ <== NOT EXECUTED &block0); if (rc != RC_OK) 5bbf0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5bbf4: 4a80 tstl %d0 <== NOT EXECUTED 5bbf6: 6600 fe88 bnew 5ba80 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 5bbfa: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5bbfe: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5bc02: 4210 clrb %a0@ <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5bc04: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 5bc0a: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5bc0e: e08d lsrl #8,%d5 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 5bc10: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 5bc14: 1210 moveb %a0@,%d1 <== NOT EXECUTED 5bc16: 8a81 orl %d1,%d5 <== NOT EXECUTED 5bc18: 1085 moveb %d5,%a0@ <== NOT EXECUTED 5bc1a: 1546 0076 moveb %d6,%a2@(118) <== NOT EXECUTED break; } return RC_OK; } 5bc1e: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5bc24: 4e5e unlk %fp <== NOT EXECUTED 5bc26: 4e75 rts <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 5bc28: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5bc2c: 2043 moveal %d3,%a0 <== NOT EXECUTED 5bc2e: 4878 0001 pea 1 <== NOT EXECUTED 5bc32: 4868 0001 pea %a0@(1) <== NOT EXECUTED 5bc36: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5bc38: 4e93 jsr %a3@ <== NOT EXECUTED &block0); if (rc != RC_OK) 5bc3a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5bc3e: 4a80 tstl %d0 <== NOT EXECUTED 5bc40: 6600 fe3e bnew 5ba80 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 5bc44: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 5bc48: 74f0 moveq #-16,%d2 <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; 5bc4a: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 5bc4e: 1210 moveb %a0@,%d1 <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5bc50: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 5bc56: c282 andl %d2,%d1 <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5bc58: e08d lsrl #8,%d5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 5bc5a: 1081 moveb %d1,%a0@ <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 5bc5c: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5bc60: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 5bc64: 1210 moveb %a0@,%d1 <== NOT EXECUTED 5bc66: 8a81 orl %d1,%d5 <== NOT EXECUTED 5bc68: 1085 moveb %d5,%a0@ <== NOT EXECUTED 5bc6a: 1546 0076 moveb %d6,%a2@(118) <== NOT EXECUTED 5bc6e: 60ae bras 5bc1e <== NOT EXECUTED =============================================================================== 0005414e : { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) 5414e: 4280 clrl %d0 <== NOT EXECUTED * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { 54150: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 54154: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 54158: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5415c: 2868 0034 moveal %a0@(52),%a4 <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 54160: 102c 000a moveb %a4@(10),%d0 <== NOT EXECUTED 54164: 44c0 movew %d0,%ccr <== NOT EXECUTED 54166: 6700 00de beqw 54246 <== NOT EXECUTED * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { int rc = RC_OK; 5416a: 4284 clrl %d4 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); 5416c: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5416e: 4eb9 0005 3a90 jsr 53a90 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 54174: 2f2c 004e movel %a4@(78),%sp@- <== NOT EXECUTED 54178: 2f2c 004a movel %a4@(74),%sp@- <== NOT EXECUTED 5417c: 4eb9 0005 233c jsr 5233c <== NOT EXECUTED 54182: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 54186: 4a80 tstl %d0 <== NOT EXECUTED 54188: 6600 00f8 bnew 54282 <== NOT EXECUTED rc = -1; 5418c: 4283 clrl %d3 <== NOT EXECUTED 5418e: 45f9 0004 680c lea 4680c ,%a2 <== NOT EXECUTED 54194: 47f9 0004 bba0 lea 4bba0 <_Chain_Get>,%a3 <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 5419a: 242c 005a movel %a4@(90),%d2 <== NOT EXECUTED 5419e: d483 addl %d3,%d2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 541a0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 541a2: 4e93 jsr %a3@ <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 541a4: 588f addql #4,%sp <== NOT EXECUTED 541a6: 4a80 tstl %d0 <== NOT EXECUTED 541a8: 6710 beqs 541ba <== NOT EXECUTED free(node); 541aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 541ac: 4e92 jsr %a2@ <== NOT EXECUTED 541ae: 588f addql #4,%sp <== NOT EXECUTED 541b0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 541b2: 4e93 jsr %a3@ <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 541b4: 588f addql #4,%sp <== NOT EXECUTED 541b6: 4a80 tstl %d0 <== NOT EXECUTED 541b8: 66f0 bnes 541aa <== NOT EXECUTED 541ba: 0683 0000 000c addil #12,%d3 <== NOT EXECUTED fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 541c0: 103c 0018 moveb #24,%d0 <== NOT EXECUTED 541c4: b083 cmpl %d3,%d0 <== NOT EXECUTED 541c6: 66d2 bnes 5419a <== NOT EXECUTED 541c8: 4283 clrl %d3 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 541ca: 242c 005e movel %a4@(94),%d2 <== NOT EXECUTED 541ce: d483 addl %d3,%d2 <== NOT EXECUTED 541d0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 541d2: 4e93 jsr %a3@ <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 541d4: 588f addql #4,%sp <== NOT EXECUTED 541d6: 4a80 tstl %d0 <== NOT EXECUTED 541d8: 6710 beqs 541ea <== NOT EXECUTED free(node); 541da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 541dc: 4e92 jsr %a2@ <== NOT EXECUTED 541de: 588f addql #4,%sp <== NOT EXECUTED 541e0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 541e2: 4e93 jsr %a3@ <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 541e4: 588f addql #4,%sp <== NOT EXECUTED 541e6: 4a80 tstl %d0 <== NOT EXECUTED 541e8: 66f0 bnes 541da <== NOT EXECUTED 541ea: 0683 0000 000c addil #12,%d3 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 541f0: 103c 0018 moveb #24,%d0 <== NOT EXECUTED 541f4: b083 cmpl %d3,%d0 <== NOT EXECUTED 541f6: 66d2 bnes 541ca <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 541f8: 2f2c 005a movel %a4@(90),%sp@- <== NOT EXECUTED 541fc: 4e92 jsr %a2@ <== NOT EXECUTED free(fs_info->rhash); 541fe: 2f2c 005e movel %a4@(94),%sp@- <== NOT EXECUTED 54202: 4e92 jsr %a2@ <== NOT EXECUTED free(fs_info->uino); 54204: 2f2c 0062 movel %a4@(98),%sp@- <== NOT EXECUTED 54208: 4e92 jsr %a2@ <== NOT EXECUTED free(fs_info->sec_buf); 5420a: 2f2c 007c movel %a4@(124),%sp@- <== NOT EXECUTED 5420e: 4e92 jsr %a2@ <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 54210: 2f2c 0052 movel %a4@(82),%sp@- <== NOT EXECUTED 54214: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED if (rc) 5421a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5421e: 4a84 tstl %d4 <== NOT EXECUTED 54220: 660c bnes 5422e <== NOT EXECUTED errno = EIO; return rc; } 54222: 2004 movel %d4,%d0 <== NOT EXECUTED 54224: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5422a: 4e5e unlk %fp <== NOT EXECUTED 5422c: 4e75 rts <== NOT EXECUTED free(fs_info->uino); free(fs_info->sec_buf); rtems_disk_release(fs_info->vol.dd); if (rc) errno = EIO; 5422e: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54234: 7605 moveq #5,%d3 <== NOT EXECUTED 54236: 2040 moveal %d0,%a0 <== NOT EXECUTED return rc; } 54238: 2004 movel %d4,%d0 <== NOT EXECUTED free(fs_info->uino); free(fs_info->sec_buf); rtems_disk_release(fs_info->vol.dd); if (rc) errno = EIO; 5423a: 2083 movel %d3,%a0@ <== NOT EXECUTED return rc; } 5423c: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 54242: 4e5e unlk %fp <== NOT EXECUTED 54244: 4e75 rts <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 54246: 2f2c 003e movel %a4@(62),%sp@- <== NOT EXECUTED 5424a: 2f2c 003a movel %a4@(58),%sp@- <== NOT EXECUTED 5424e: 2f08 movel %a0,%sp@- <== NOT EXECUTED 54250: 4eb9 0005 4084 jsr 54084 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 54256: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 5425a: 2800 movel %d0,%d4 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 5425c: 6700 ff0e beqw 5416c <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 54260: 2f0c movel %a4,%sp@- <== NOT EXECUTED if (fs_info->vol.type & FAT_FAT32) { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; 54262: 78ff moveq #-1,%d4 <== NOT EXECUTED } fat_buf_release(fs_info); 54264: 4eb9 0005 3a90 jsr 53a90 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 5426a: 2f2c 004e movel %a4@(78),%sp@- <== NOT EXECUTED 5426e: 2f2c 004a movel %a4@(74),%sp@- <== NOT EXECUTED 54272: 4eb9 0005 233c jsr 5233c <== NOT EXECUTED 54278: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5427c: 4a80 tstl %d0 <== NOT EXECUTED 5427e: 6700 ff0c beqw 5418c <== NOT EXECUTED rc = -1; 54282: 78ff moveq #-1,%d4 <== NOT EXECUTED 54284: 4283 clrl %d3 <== NOT EXECUTED 54286: 45f9 0004 680c lea 4680c ,%a2 <== NOT EXECUTED 5428c: 47f9 0004 bba0 lea 4bba0 <_Chain_Get>,%a3 <== NOT EXECUTED 54292: 6000 ff06 braw 5419a <== NOT EXECUTED =============================================================================== 0005e418 : int fcntl( int fd, int cmd, ... ) { 5e418: 4e56 fff0 linkw %fp,#-16 5e41c: 202e 0008 movel %fp@(8),%d0 5e420: 48d7 041c moveml %d2-%d4/%a2,%sp@ 5e424: 242e 000c movel %fp@(12),%d2 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 5e428: 2239 0006 1602 movel 61602 ,%d1 5e42e: b280 cmpl %d0,%d1 5e430: 6300 018c blsw 5e5be iop = rtems_libio_iop( fd ); 5e434: 2600 movel %d0,%d3 5e436: ed88 lsll #6,%d0 5e438: e78b lsll #3,%d3 5e43a: 2079 0006 2df4 moveal 62df4 ,%a0 5e440: 9083 subl %d3,%d0 5e442: 45f0 0800 lea %a0@(00000000,%d0:l),%a2 rtems_libio_check_is_open(iop); 5e446: 282a 0014 movel %a2@(20),%d4 5e44a: 0804 0008 btst #8,%d4 5e44e: 6700 016e beqw 5e5be /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 5e452: 7009 moveq #9,%d0 5e454: b082 cmpl %d2,%d0 5e456: 641a bccs 5e472 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 5e458: 4eb9 0005 01a4 jsr 501a4 <__errno> 5e45e: 2040 moveal %d0,%a0 5e460: 7016 moveq #22,%d0 5e462: 2080 movel %d0,%a0@ int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 5e464: 76ff moveq #-1,%d3 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5e466: 2003 movel %d3,%d0 5e468: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5e46e: 4e5e unlk %fp 5e470: 4e75 rts /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 5e472: 303b 2a08 movew %pc@(5e47c ,%d2:l:2),%d0 5e476: 48c0 extl %d0 5e478: 4efb 0802 jmp %pc@(5e47c ,%d0:l) 5e47c: 00ae 00a2 0090 oril #10616976,%d6 <== NOT EXECUTED 5e482: 0076 .short 0x0076 <== NOT EXECUTED 5e484: 0026 .short 0x0026 <== NOT EXECUTED 5e486: 0014 .short 0x0014 <== NOT EXECUTED 5e488: 0014 .short 0x0014 <== NOT EXECUTED 5e48a: 0014 .short 0x0014 <== NOT EXECUTED 5e48c: 0014 .short 0x0014 <== NOT EXECUTED 5e48e: 0014 .short 0x0014 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 5e490: 4eb9 0005 01a4 jsr 501a4 <__errno> int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 5e496: 76ff moveq #-1,%d3 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 5e498: 2040 moveal %d0,%a0 5e49a: 20bc 0000 0086 movel #134,%a0@ 5e4a0: 60c4 bras 5e466 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 5e4a2: 2f2e 0010 movel %fp@(16),%sp@- rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 5e4a6: 4283 clrl %d3 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 5e4a8: 4eb9 0004 3f24 jsr 43f24 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 5e4ae: 222a 0014 movel %a2@(20),%d1 5e4b2: 588f addql #4,%sp 5e4b4: 0280 0000 0201 andil #513,%d0 5e4ba: 0281 ffff fdfe andil #-514,%d1 5e4c0: 8081 orl %d1,%d0 5e4c2: 2540 0014 movel %d0,%a2@(20) * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 5e4c6: 206a 0020 moveal %a2@(32),%a0 5e4ca: 2f0a movel %a2,%sp@- 5e4cc: 2f02 movel %d2,%sp@- 5e4ce: 2068 0030 moveal %a0@(48),%a0 5e4d2: 4e90 jsr %a0@ if (err) { 5e4d4: 508f addql #8,%sp * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 5e4d6: 2400 movel %d0,%d2 if (err) { 5e4d8: 678c beqs 5e466 <== ALWAYS TAKEN errno = err; 5e4da: 4eb9 0005 01a4 jsr 501a4 <__errno> <== NOT EXECUTED ret = -1; 5e4e0: 76ff moveq #-1,%d3 <== NOT EXECUTED */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 5e4e2: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5e4e4: 2003 movel %d3,%d0 <== NOT EXECUTED */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 5e4e6: 2082 movel %d2,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5e4e8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5e4ee: 4e5e unlk %fp <== NOT EXECUTED 5e4f0: 4e75 rts <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 5e4f2: 2f04 movel %d4,%sp@- 5e4f4: 4eb9 0004 3f64 jsr 43f64 5e4fa: 588f addql #4,%sp 5e4fc: 2600 movel %d0,%d3 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 5e4fe: 6cc6 bges 5e4c6 <== ALWAYS TAKEN va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5e500: 2003 movel %d3,%d0 <== NOT EXECUTED 5e502: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5e508: 4e5e unlk %fp <== NOT EXECUTED 5e50a: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 5e50c: 4283 clrl %d3 * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 5e50e: 4aae 0010 tstl %fp@(16) 5e512: 6768 beqs 5e57c iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 5e514: 08c4 000b bset #11,%d4 5e518: 2544 0014 movel %d4,%a2@(20) 5e51c: 60a8 bras 5e4c6 diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 5e51e: 0804 000b btst #11,%d4 5e522: 56c3 sne %d3 5e524: 49c3 extbl %d3 5e526: 4483 negl %d3 5e528: 609c bras 5e4c6 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 5e52a: 202e 0010 movel %fp@(16),%d0 if ( fd2 ) 5e52e: 6700 00a8 beqw 5e5d8 diop = rtems_libio_iop( fd2 ); 5e532: b081 cmpl %d1,%d0 5e534: 6452 bccs 5e588 <== NEVER TAKEN 5e536: 2200 movel %d0,%d1 5e538: ed88 lsll #6,%d0 5e53a: e789 lsll #3,%d1 5e53c: 9081 subl %d1,%d0 5e53e: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 5e542: 2609 movel %a1,%d3 } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 5e544: 9688 subl %a0,%d3 5e546: e683 asrl #3,%d3 5e548: 203c b6db 6db7 movel #-1227133513,%d0 5e54e: 4c00 3800 mulsl %d0,%d3 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 5e552: 236a 0018 0018 movel %a2@(24),%a1@(24) 5e558: 236a 001c 001c movel %a2@(28),%a1@(28) 5e55e: 236a 0020 0020 movel %a2@(32),%a1@(32) 5e564: 236a 0024 0024 movel %a2@(36),%a1@(36) 5e56a: 236a 0028 0028 movel %a2@(40),%a1@(40) ret = -1; break; } } diop->flags = iop->flags; 5e570: 2344 0014 movel %d4,%a1@(20) /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 5e574: 4a83 tstl %d3 5e576: 6c00 ff4e bgew 5e4c6 5e57a: 6084 bras 5e500 <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 5e57c: 0884 000b bclr #11,%d4 5e580: 2544 0014 movel %d4,%a2@(20) 5e584: 6000 ff40 braw 5e4c6 switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 5e588: 93c9 subal %a1,%a1 <== NOT EXECUTED 5e58a: 4283 clrl %d3 <== NOT EXECUTED } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 5e58c: 9688 subl %a0,%d3 <== NOT EXECUTED 5e58e: e683 asrl #3,%d3 <== NOT EXECUTED 5e590: 203c b6db 6db7 movel #-1227133513,%d0 <== NOT EXECUTED 5e596: 4c00 3800 mulsl %d0,%d3 <== NOT EXECUTED break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 5e59a: 236a 0018 0018 movel %a2@(24),%a1@(24) <== NOT EXECUTED 5e5a0: 236a 001c 001c movel %a2@(28),%a1@(28) <== NOT EXECUTED 5e5a6: 236a 0020 0020 movel %a2@(32),%a1@(32) <== NOT EXECUTED 5e5ac: 236a 0024 0024 movel %a2@(36),%a1@(36) <== NOT EXECUTED 5e5b2: 236a 0028 0028 movel %a2@(40),%a1@(40) <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; 5e5b8: 2344 0014 movel %d4,%a1@(20) <== NOT EXECUTED 5e5bc: 60b6 bras 5e574 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 5e5be: 4eb9 0005 01a4 jsr 501a4 <__errno> 5e5c4: 76ff moveq #-1,%d3 5e5c6: 7209 moveq #9,%d1 5e5c8: 2040 moveal %d0,%a0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5e5ca: 2003 movel %d3,%d0 5e5cc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 5e5d2: 2081 movel %d1,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5e5d4: 4e5e unlk %fp 5e5d6: 4e75 rts fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 5e5d8: 4eb9 0004 3fb2 jsr 43fb2 5e5de: 2240 moveal %d0,%a1 if ( diop == 0 ) { 5e5e0: 4a80 tstl %d0 5e5e2: 6700 fe80 beqw 5e464 5e5e6: 282a 0014 movel %a2@(20),%d4 5e5ea: 2600 movel %d0,%d3 } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 5e5ec: 203c b6db 6db7 movel #-1227133513,%d0 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 5e5f2: 236a 0018 0018 movel %a2@(24),%a1@(24) 5e5f8: 236a 001c 001c movel %a2@(28),%a1@(28) 5e5fe: 236a 0020 0020 movel %a2@(32),%a1@(32) 5e604: 236a 0024 0024 movel %a2@(36),%a1@(36) if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); if ( diop == 0 ) { 5e60a: 2079 0006 2df4 moveal 62df4 ,%a0 } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 5e610: 9688 subl %a0,%d3 5e612: e683 asrl #3,%d3 5e614: 4c00 3800 mulsl %d0,%d3 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 5e618: 236a 0028 0028 movel %a2@(40),%a1@(40) ret = -1; break; } } diop->flags = iop->flags; 5e61e: 2344 0014 movel %d4,%a1@(20) 5e622: 6000 ff50 braw 5e574 =============================================================================== 0004d622 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4d622: 4e56 ffdc linkw %fp,#-36 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4d626: 2039 0006 2ee8 movel 62ee8 ,%d0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4d62c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4d630: 286e 0008 moveal %fp@(8),%a4 4d634: 47f9 0004 8d58 lea 48d58 ,%a3 4d63a: 262e 000c movel %fp@(12),%d3 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4d63e: 4a80 tstl %d0 4d640: 6700 0086 beqw 4d6c8 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4d644: 42a7 clrl %sp@- 4d646: 42a7 clrl %sp@- 4d648: 2f00 movel %d0,%sp@- 4d64a: 4e93 jsr %a3@ } if (sc == RTEMS_SUCCESSFUL) { 4d64c: 4fef 000c lea %sp@(12),%sp 4d650: 4a80 tstl %d0 4d652: 6600 0380 bnew 4d9d4 err = pipe_lock(); if (err) return err; pipe = *pipep; 4d656: 2414 movel %a4@,%d2 if (pipe == NULL) { 4d658: 6700 011a beqw 4d774 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4d65c: 42a7 clrl %sp@- 4d65e: 2042 moveal %d2,%a0 4d660: 42a7 clrl %sp@- 4d662: 2f28 0028 movel %a0@(40),%sp@- 4d666: 4e93 jsr %a3@ 4d668: 4fef 000c lea %sp@(12),%sp 4d66c: 4a80 tstl %d0 4d66e: 6600 008a bnew 4d6fa 4d672: 95ca subal %a2,%a2 err = -EINTR; if (*pipep == NULL) { 4d674: 4a94 tstl %a4@ 4d676: 6700 030c beqw 4d984 static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4d67a: 2f39 0006 2ee8 movel 62ee8 ,%sp@- 4d680: 4bf9 0004 8ea8 lea 48ea8 ,%a5 4d686: 4e95 jsr %a5@ pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 4d688: 588f addql #4,%sp 4d68a: 4a8a tstl %a2 4d68c: 662e bnes 4d6bc <== NEVER TAKEN return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4d68e: 7006 moveq #6,%d0 4d690: 2043 moveal %d3,%a0 4d692: 7204 moveq #4,%d1 4d694: c0a8 0014 andl %a0@(20),%d0 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4d698: 2454 moveal %a4@,%a2 switch (LIBIO_ACCMODE(iop)) { 4d69a: b280 cmpl %d0,%d1 4d69c: 6700 0270 beqw 4d90e 4d6a0: 123c 0006 moveb #6,%d1 4d6a4: b280 cmpl %d0,%d1 4d6a6: 6700 021c beqw 4d8c4 4d6aa: 123c 0002 moveb #2,%d1 4d6ae: b280 cmpl %d0,%d1 4d6b0: 6750 beqs 4d702 <== ALWAYS TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d6b2: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4d6b6: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d6b8: 4e95 jsr %a5@ return 0; 4d6ba: 588f addql #4,%sp out_error: pipe_release(pipep, iop); return err; } 4d6bc: 200a movel %a2,%d0 4d6be: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 4d6c4: 4e5e unlk %fp 4d6c6: 4e75 rts rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4d6c8: 42a7 clrl %sp@- 4d6ca: 42a7 clrl %sp@- 4d6cc: 2f39 0006 35e0 movel 635e0 ,%sp@- 4d6d2: 4e93 jsr %a3@ rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 4d6d4: 4fef 000c lea %sp@(12),%sp 4d6d8: 4ab9 0006 2ee8 tstl 62ee8 4d6de: 6700 02c0 beqw 4d9a0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4d6e2: 2f39 0006 35e0 movel 635e0 ,%sp@- <== NOT EXECUTED 4d6e8: 4eb9 0004 8ea8 jsr 48ea8 <== NOT EXECUTED 4d6ee: 2039 0006 2ee8 movel 62ee8 ,%d0 <== NOT EXECUTED 4d6f4: 588f addql #4,%sp <== NOT EXECUTED 4d6f6: 6000 ff4c braw 4d644 <== NOT EXECUTED if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4d6fa: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED 4d6fe: 6000 ff74 braw 4d674 <== NOT EXECUTED pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4d702: 202a 0010 movel %a2@(16),%d0 4d706: 2040 moveal %d0,%a0 4d708: 5288 addql #1,%a0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4d70a: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4d70e: 2548 0010 movel %a0,%a2@(16) 4d712: 4a80 tstl %d0 4d714: 6700 02f6 beqw 4da0c PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4d718: 4aaa 0014 tstl %a2@(20) 4d71c: 6694 bnes 4d6b2 /* Not an error */ if (LIBIO_NODELAY(iop)) 4d71e: 7001 moveq #1,%d0 4d720: 2043 moveal %d3,%a0 4d722: c0a8 0014 andl %a0@(20),%d0 4d726: 668a bnes 4d6b2 break; prevCounter = pipe->writerCounter; 4d728: 282a 0024 movel %a2@(36),%d4 4d72c: 243c 0004 f56c movel #324972,%d2 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4d732: 2f2a 0028 movel %a2@(40),%sp@- 4d736: 4e95 jsr %a5@ if (! PIPE_READWAIT(pipe)) 4d738: 2042 moveal %d2,%a0 4d73a: 42a7 clrl %sp@- 4d73c: 2f2a 002c movel %a2@(44),%sp@- 4d740: 4e90 jsr %a0@ 4d742: 4fef 000c lea %sp@(12),%sp 4d746: 4a80 tstl %d0 4d748: 6600 02d6 bnew 4da20 goto out_error; if (! PIPE_LOCK(pipe)) 4d74c: 42a7 clrl %sp@- 4d74e: 42a7 clrl %sp@- 4d750: 2f2a 0028 movel %a2@(40),%sp@- 4d754: 4e93 jsr %a3@ 4d756: 4fef 000c lea %sp@(12),%sp 4d75a: 4a80 tstl %d0 4d75c: 6600 02c2 bnew 4da20 goto out_error; } while (prevCounter == pipe->writerCounter); 4d760: b8aa 0024 cmpl %a2@(36),%d4 4d764: 67cc beqs 4d732 <== NEVER TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d766: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4d76a: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d76c: 4e95 jsr %a5@ return 0; 4d76e: 588f addql #4,%sp 4d770: 6000 ff4a braw 4d6bc { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4d774: 4878 0034 pea 34 4d778: 45f9 0004 5788 lea 45788 ,%a2 4d77e: 4e92 jsr %a2@ if (pipe == NULL) 4d780: 588f addql #4,%sp { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4d782: 2400 movel %d0,%d2 if (pipe == NULL) 4d784: 6700 034e beqw 4dad4 return err; memset(pipe, 0, sizeof(pipe_control_t)); 4d788: 2040 moveal %d0,%a0 pipe->Size = PIPE_BUF; 4d78a: 203c 0000 0200 movel #512,%d0 int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 4d790: 4298 clrl %a0@+ 4d792: 5888 addql #4,%a0 4d794: 4298 clrl %a0@+ 4d796: 4298 clrl %a0@+ 4d798: 4298 clrl %a0@+ 4d79a: 4298 clrl %a0@+ 4d79c: 4298 clrl %a0@+ 4d79e: 4298 clrl %a0@+ 4d7a0: 4298 clrl %a0@+ 4d7a2: 4298 clrl %a0@+ 4d7a4: 4298 clrl %a0@+ 4d7a6: 4298 clrl %a0@+ 4d7a8: 4290 clrl %a0@ pipe->Size = PIPE_BUF; 4d7aa: 2042 moveal %d2,%a0 4d7ac: 2140 0004 movel %d0,%a0@(4) pipe->Buffer = malloc(pipe->Size); 4d7b0: 4878 0200 pea 200 4d7b4: 4e92 jsr %a2@ if (! pipe->Buffer) 4d7b6: 588f addql #4,%sp if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4d7b8: 2042 moveal %d2,%a0 4d7ba: 45f9 0004 4f68 lea 44f68 ,%a2 4d7c0: 2080 movel %d0,%a0@ if (! pipe->Buffer) 4d7c2: 6700 030a beqw 4dace goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4d7c6: 2042 moveal %d2,%a0 4d7c8: 4868 002c pea %a0@(44) 4d7cc: 45f9 0004 f378 lea 4f378 ,%a2 rtems_build_name ('P', 'I', 'r', c), 4d7d2: 1039 0006 1f98 moveb 61f98 ,%d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4d7d8: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'r', c), 4d7da: 49c0 extbl %d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4d7dc: 42a7 clrl %sp@- 4d7de: 0080 5049 7200 oril #1346990592,%d0 4d7e4: 2f00 movel %d0,%sp@- 4d7e6: 4e92 jsr %a2@ 4d7e8: 4fef 0010 lea %sp@(16),%sp 4d7ec: 4a80 tstl %d0 4d7ee: 6600 02d0 bnew 4dac0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4d7f2: 2042 moveal %d2,%a0 4d7f4: 4868 0030 pea %a0@(48) rtems_build_name ('P', 'I', 'w', c), 4d7f8: 1039 0006 1f98 moveb 61f98 ,%d0 if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4d7fe: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'w', c), 4d800: 49c0 extbl %d0 if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4d802: 42a7 clrl %sp@- 4d804: 0080 5049 7700 oril #1346991872,%d0 4d80a: 2f00 movel %d0,%sp@- 4d80c: 4e92 jsr %a2@ 4d80e: 4fef 0010 lea %sp@(16),%sp 4d812: 45f9 0004 f450 lea 4f450 ,%a2 4d818: 4a80 tstl %d0 4d81a: 6600 029a bnew 4dab6 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4d81e: 2042 moveal %d2,%a0 4d820: 4868 0028 pea %a0@(40) rtems_build_name ('P', 'I', 's', c), 1, 4d824: 1039 0006 1f98 moveb 61f98 ,%d0 if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4d82a: 42a7 clrl %sp@- 4d82c: 4878 0010 pea 10 rtems_build_name ('P', 'I', 's', c), 1, 4d830: 49c0 extbl %d0 if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4d832: 4878 0001 pea 1 4d836: 0080 5049 7300 oril #1346990848,%d0 4d83c: 2f00 movel %d0,%sp@- 4d83e: 4eb9 0004 8ab8 jsr 48ab8 4d844: 4fef 0014 lea %sp@(20),%sp 4d848: 4a80 tstl %d0 4d84a: 6600 025a bnew 4daa6 /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 4d84e: 280e movel %fp,%d4 4d850: 5984 subql #4,%d4 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4d852: 2042 moveal %d2,%a0 4d854: 4bf9 0004 a68c lea 4a68c <_Objects_Get>,%a5 |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4d85a: 45f9 0004 b404 lea 4b404 <_Thread_Enable_dispatch>,%a2 4d860: 2f04 movel %d4,%sp@- 4d862: 2f28 002c movel %a0@(44),%sp@- 4d866: 4879 0006 3f68 pea 63f68 <_Barrier_Information> 4d86c: 4e95 jsr %a5@ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 4d86e: 223c 1000 0000 movel #268435456,%d1 4d874: 2040 moveal %d0,%a0 4d876: 83a8 004c orl %d1,%a0@(76) _Thread_Enable_dispatch(); 4d87a: 4e92 jsr %a2@ 4d87c: 2042 moveal %d2,%a0 4d87e: 2f04 movel %d4,%sp@- 4d880: 2f28 0030 movel %a0@(48),%sp@- 4d884: 4879 0006 3f68 pea 63f68 <_Barrier_Information> 4d88a: 4e95 jsr %a5@ _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 4d88c: 223c 1000 0000 movel #268435456,%d1 4d892: 2040 moveal %d0,%a0 4d894: 83a8 004c orl %d1,%a0@(76) _Thread_Enable_dispatch(); 4d898: 4e92 jsr %a2@ #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4d89a: 4fef 0018 lea %sp@(24),%sp 4d89e: 1039 0006 1f98 moveb 61f98 ,%d0 4d8a4: 49c0 extbl %d0 4d8a6: 2200 movel %d0,%d1 4d8a8: 5281 addql #1,%d1 4d8aa: 13c1 0006 1f98 moveb %d1,61f98 4d8b0: 727a moveq #122,%d1 4d8b2: b280 cmpl %d0,%d1 4d8b4: 6600 fda6 bnew 4d65c c = 'a'; 4d8b8: 7061 moveq #97,%d0 4d8ba: 13c0 0006 1f98 moveb %d0,61f98 4d8c0: 6000 fd9a braw 4d65c } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4d8c4: 202a 0010 movel %a2@(16),%d0 4d8c8: 2200 movel %d0,%d1 4d8ca: 5281 addql #1,%d1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4d8cc: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4d8d0: 2541 0010 movel %d1,%a2@(16) 4d8d4: 4a80 tstl %d0 4d8d6: 6700 0120 beqw 4d9f8 PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4d8da: 202a 0014 movel %a2@(20),%d0 4d8de: 2040 moveal %d0,%a0 4d8e0: 5288 addql #1,%a0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4d8e2: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4d8e6: 2548 0014 movel %a0,%a2@(20) 4d8ea: 4a80 tstl %d0 4d8ec: 6600 fdc4 bnew 4d6b2 PIPE_WAKEUPREADERS(pipe); 4d8f0: 486e fff8 pea %fp@(-8) 4d8f4: 2f2a 002c movel %a2@(44),%sp@- 4d8f8: 4eb9 0004 f4f4 jsr 4f4f4 4d8fe: 508f addql #8,%sp break; } PIPE_UNLOCK(pipe); 4d900: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4d904: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d906: 4e95 jsr %a5@ return 0; 4d908: 588f addql #4,%sp 4d90a: 6000 fdb0 braw 4d6bc break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4d90e: 202a 0014 movel %a2@(20),%d0 4d912: 2200 movel %d0,%d1 4d914: 5281 addql #1,%d1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 4d916: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4d91a: 2541 0014 movel %d1,%a2@(20) 4d91e: 4a80 tstl %d0 4d920: 6700 00c2 beqw 4d9e4 PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4d924: 4aaa 0010 tstl %a2@(16) 4d928: 6600 fd88 bnew 4d6b2 4d92c: 7001 moveq #1,%d0 4d92e: 2043 moveal %d3,%a0 4d930: c0a8 0014 andl %a0@(20),%d0 4d934: 6600 0156 bnew 4da8c err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 4d938: 282a 0020 movel %a2@(32),%d4 4d93c: 243c 0004 f56c movel #324972,%d2 err = -EINTR; do { PIPE_UNLOCK(pipe); 4d942: 2f2a 0028 movel %a2@(40),%sp@- 4d946: 4e95 jsr %a5@ if (! PIPE_WRITEWAIT(pipe)) 4d948: 2042 moveal %d2,%a0 4d94a: 42a7 clrl %sp@- 4d94c: 2f2a 0030 movel %a2@(48),%sp@- 4d950: 4e90 jsr %a0@ 4d952: 4fef 000c lea %sp@(12),%sp 4d956: 4a80 tstl %d0 4d958: 6600 00c6 bnew 4da20 goto out_error; if (! PIPE_LOCK(pipe)) 4d95c: 42a7 clrl %sp@- 4d95e: 42a7 clrl %sp@- 4d960: 2f2a 0028 movel %a2@(40),%sp@- 4d964: 4e93 jsr %a3@ 4d966: 4fef 000c lea %sp@(12),%sp 4d96a: 4a80 tstl %d0 4d96c: 6600 00b2 bnew 4da20 goto out_error; } while (prevCounter == pipe->readerCounter); 4d970: b8aa 0020 cmpl %a2@(32),%d4 4d974: 67cc beqs 4d942 <== NEVER TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d976: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4d97a: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d97c: 4e95 jsr %a5@ return 0; 4d97e: 588f addql #4,%sp 4d980: 6000 fd3a braw 4d6bc if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 4d984: 4a8a tstl %a2 4d986: 6600 00b4 bnew 4da3c static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4d98a: 2f39 0006 2ee8 movel 62ee8 ,%sp@- 4d990: 4bf9 0004 8ea8 lea 48ea8 ,%a5 if (*pipep == NULL) { if (err) pipe_free(pipe); else *pipep = pipe; 4d996: 2882 movel %d2,%a4@ static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4d998: 4e95 jsr %a5@ 4d99a: 588f addql #4,%sp 4d99c: 6000 fcf0 braw 4d68e if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( 4d9a0: 4879 0006 2ee8 pea 62ee8 4d9a6: 42a7 clrl %sp@- 4d9a8: 4878 0054 pea 54 4d9ac: 4878 0001 pea 1 4d9b0: 2f3c 5049 5045 movel #1346981957,%sp@- 4d9b6: 4eb9 0004 8ab8 jsr 48ab8 4d9bc: 2f39 0006 35e0 movel 635e0 ,%sp@- 4d9c2: 2400 movel %d0,%d2 4d9c4: 4eb9 0004 8ea8 jsr 48ea8 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4d9ca: 4fef 0018 lea %sp@(24),%sp 4d9ce: 4a82 tstl %d2 4d9d0: 6700 0116 beqw 4dae8 sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); } if (sc == RTEMS_SUCCESSFUL) { 4d9d4: 347c fff4 moveaw #-12,%a2 return 0; out_error: pipe_release(pipep, iop); return err; } 4d9d8: 200a movel %a2,%d0 4d9da: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 4d9e0: 4e5e unlk %fp 4d9e2: 4e75 rts case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4d9e4: 486e fff8 pea %fp@(-8) 4d9e8: 2f2a 002c movel %a2@(44),%sp@- 4d9ec: 4eb9 0004 f4f4 jsr 4f4f4 4d9f2: 508f addql #8,%sp 4d9f4: 6000 ff2e braw 4d924 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4d9f8: 486e fff8 pea %fp@(-8) 4d9fc: 2f2a 0030 movel %a2@(48),%sp@- 4da00: 4eb9 0004 f4f4 jsr 4f4f4 4da06: 508f addql #8,%sp 4da08: 6000 fed0 braw 4d8da switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4da0c: 486e fff8 pea %fp@(-8) 4da10: 2f2a 0030 movel %a2@(48),%sp@- 4da14: 4eb9 0004 f4f4 jsr 4f4f4 4da1a: 508f addql #8,%sp 4da1c: 6000 fcfa braw 4d718 PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4da20: 2f03 movel %d3,%sp@- <== NOT EXECUTED goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 4da22: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4da26: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4da28: 4eb9 0004 d53c jsr 4d53c <== NOT EXECUTED return err; 4da2e: 508f addql #8,%sp <== NOT EXECUTED } 4da30: 200a movel %a2,%d0 4da32: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 4da38: 4e5e unlk %fp 4da3a: 4e75 rts /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4da3c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4da3e: 49f9 0004 f450 lea 4f450 ,%a4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4da44: 47f9 0004 4f68 lea 44f68 ,%a3 <== NOT EXECUTED /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4da4a: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4da4e: 4e94 jsr %a4@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4da50: 2042 moveal %d2,%a0 <== NOT EXECUTED 4da52: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4da56: 4e94 jsr %a4@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4da58: 2042 moveal %d2,%a0 <== NOT EXECUTED 4da5a: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4da5e: 4eb9 0004 8c80 jsr 48c80 <== NOT EXECUTED free(pipe->Buffer); 4da64: 2042 moveal %d2,%a0 <== NOT EXECUTED 4da66: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4da68: 4e93 jsr %a3@ <== NOT EXECUTED free(pipe); 4da6a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4da6c: 4e93 jsr %a3@ <== NOT EXECUTED 4da6e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4da72: 2f39 0006 2ee8 movel 62ee8 ,%sp@- <== NOT EXECUTED 4da78: 4eb9 0004 8ea8 jsr 48ea8 <== NOT EXECUTED 4da7e: 588f addql #4,%sp <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 4da80: 200a movel %a2,%d0 4da82: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 4da88: 4e5e unlk %fp 4da8a: 4e75 rts if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4da8c: 2f2a 0028 movel %a2@(40),%sp@- err = -ENXIO; 4da90: 347c fffa moveaw #-6,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4da94: 4e95 jsr %a5@ err = -ENXIO; goto out_error; 4da96: 588f addql #4,%sp PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4da98: 2f03 movel %d3,%sp@- 4da9a: 2f0c movel %a4,%sp@- 4da9c: 4eb9 0004 d53c jsr 4d53c return err; 4daa2: 508f addql #8,%sp 4daa4: 608a bras 4da30 if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4daa6: 2042 moveal %d2,%a0 4daa8: 45f9 0004 f450 lea 4f450 ,%a2 4daae: 2f28 0030 movel %a0@(48),%sp@- 4dab2: 4e92 jsr %a2@ 4dab4: 588f addql #4,%sp err_wbar: rtems_barrier_delete(pipe->readBarrier); 4dab6: 2042 moveal %d2,%a0 4dab8: 2f28 002c movel %a0@(44),%sp@- 4dabc: 4e92 jsr %a2@ 4dabe: 588f addql #4,%sp err_rbar: free(pipe->Buffer); 4dac0: 2042 moveal %d2,%a0 4dac2: 45f9 0004 4f68 lea 44f68 ,%a2 4dac8: 2f10 movel %a0@,%sp@- 4daca: 4e92 jsr %a2@ 4dacc: 588f addql #4,%sp err_buf: free(pipe); 4dace: 2f02 movel %d2,%sp@- 4dad0: 4e92 jsr %a2@ 4dad2: 588f addql #4,%sp static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4dad4: 2f39 0006 2ee8 movel 62ee8 ,%sp@- } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4dada: 347c fff4 moveaw #-12,%a2 static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4dade: 4eb9 0004 8ea8 jsr 48ea8 4dae4: 588f addql #4,%sp 4dae6: 6098 bras 4da80 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4dae8: 2039 0006 2ee8 movel 62ee8 ,%d0 4daee: 6000 fb54 braw 4d644 =============================================================================== 00043d7c : long fpathconf( int fd, int name ) { 43d7c: 4e56 0000 linkw %fp,#0 43d80: 202e 0008 movel %fp@(8),%d0 43d84: 222e 000c movel %fp@(12),%d1 43d88: 2f02 movel %d2,%sp@- long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 43d8a: b0b9 0006 11b2 cmpl 611b2 ,%d0 43d90: 6400 00f2 bccw 43e84 iop = rtems_libio_iop(fd); 43d94: 2400 movel %d0,%d2 43d96: ed88 lsll #6,%d0 43d98: e78a lsll #3,%d2 43d9a: 2079 0006 2914 moveal 62914 ,%a0 43da0: 9082 subl %d2,%d0 43da2: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43da4: 2028 0014 movel %a0@(20),%d0 43da8: 0280 0000 0100 andil #256,%d0 43dae: 6700 00d4 beqw 43e84 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 43db2: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 43db6: 700b moveq #11,%d0 43db8: b081 cmpl %d1,%d0 43dba: 6416 bccs 43dd2 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43dbc: 4eb9 0005 0080 jsr 50080 <__errno> break; } return return_value; } 43dc2: 242e fffc movel %fp@(-4),%d2 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43dc6: 2040 moveal %d0,%a0 43dc8: 7216 moveq #22,%d1 43dca: 70ff moveq #-1,%d0 break; } return return_value; } 43dcc: 4e5e unlk %fp break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43dce: 2081 movel %d1,%a0@ break; } return return_value; } 43dd0: 4e75 rts * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 43dd2: 303b 1a08 movew %pc@(43ddc ,%d1:l:2),%d0 43dd6: 48c0 extl %d0 43dd8: 4efb 0802 jmp %pc@(43ddc ,%d0:l) 43ddc: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 43de2: 006c .short 0x006c <== NOT EXECUTED 43de4: 0060 .short 0x0060 <== NOT EXECUTED 43de6: 0054 .short 0x0054 <== NOT EXECUTED 43de8: 0048 .short 0x0048 <== NOT EXECUTED 43dea: 003c .short 0x003c <== NOT EXECUTED 43dec: 0030 .short 0x0030 <== NOT EXECUTED 43dee: 0024 .short 0x0024 <== NOT EXECUTED 43df0: 0018 .short 0x0018 <== NOT EXECUTED 43df2: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43df8: 4e5e unlk %fp break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 43dfa: 2028 005c movel %a0@(92),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43dfe: 4e75 rts 43e00: 242e fffc movel %fp@(-4),%d2 43e04: 4e5e unlk %fp break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 43e06: 2028 0050 movel %a0@(80),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e0a: 4e75 rts 43e0c: 242e fffc movel %fp@(-4),%d2 43e10: 4e5e unlk %fp break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 43e12: 2028 0064 movel %a0@(100),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e16: 4e75 rts 43e18: 242e fffc movel %fp@(-4),%d2 43e1c: 4e5e unlk %fp break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 43e1e: 2028 0058 movel %a0@(88),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e22: 4e75 rts 43e24: 242e fffc movel %fp@(-4),%d2 43e28: 4e5e unlk %fp break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 43e2a: 2028 0054 movel %a0@(84),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e2e: 4e75 rts 43e30: 242e fffc movel %fp@(-4),%d2 43e34: 4e5e unlk %fp break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 43e36: 2028 004c movel %a0@(76),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e3a: 4e75 rts 43e3c: 242e fffc movel %fp@(-4),%d2 43e40: 4e5e unlk %fp break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 43e42: 2028 0048 movel %a0@(72),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e46: 4e75 rts 43e48: 242e fffc movel %fp@(-4),%d2 43e4c: 4e5e unlk %fp break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 43e4e: 2028 0044 movel %a0@(68),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e52: 4e75 rts 43e54: 242e fffc movel %fp@(-4),%d2 43e58: 4e5e unlk %fp break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 43e5a: 2028 0040 movel %a0@(64),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e5e: 4e75 rts 43e60: 242e fffc movel %fp@(-4),%d2 43e64: 4e5e unlk %fp switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 43e66: 2028 003c movel %a0@(60),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e6a: 4e75 rts 43e6c: 242e fffc movel %fp@(-4),%d2 43e70: 4e5e unlk %fp the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 43e72: 2028 0038 movel %a0@(56),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e76: 4e75 rts 43e78: 242e fffc movel %fp@(-4),%d2 43e7c: 4e5e unlk %fp break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 43e7e: 2028 0060 movel %a0@(96),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e82: 4e75 rts rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 43e84: 4eb9 0005 0080 jsr 50080 <__errno> 43e8a: 7409 moveq #9,%d2 43e8c: 2040 moveal %d0,%a0 43e8e: 70ff moveq #-1,%d0 43e90: 2082 movel %d2,%a0@ rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e92: 242e fffc movel %fp@(-4),%d2 43e96: 4e5e unlk %fp ... =============================================================================== 000432dc : #include void free( void *ptr ) { 432dc: 4e56 0000 linkw %fp,#0 MSBUMP(free_calls, 1); 432e0: 52b9 0006 0f18 addql #1,60f18 #include void free( void *ptr ) { 432e6: 2f02 movel %d2,%sp@- 432e8: 242e 0008 movel %fp@(8),%d2 MSBUMP(free_calls, 1); if ( !ptr ) 432ec: 6732 beqs 43320 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 432ee: 7003 moveq #3,%d0 432f0: b0b9 0006 118c cmpl 6118c <_System_state_Current>,%d0 432f6: 6758 beqs 43350 <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 432f8: 2079 0005 fec4 moveal 5fec4 ,%a0 432fe: 4a88 tstl %a0 43300: 670a beqs 4330c (*rtems_malloc_statistics_helpers->at_free)(ptr); 43302: 2f02 movel %d2,%sp@- 43304: 2068 0008 moveal %a0@(8),%a0 43308: 4e90 jsr %a0@ 4330a: 588f addql #4,%sp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4330c: 2f02 movel %d2,%sp@- 4330e: 2f39 0005 f74a movel 5f74a ,%sp@- 43314: 4eb9 0004 878c jsr 4878c <_Protected_heap_Free> 4331a: 508f addql #8,%sp 4331c: 4a00 tstb %d0 4331e: 6708 beqs 43328 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 43320: 242e fffc movel %fp@(-4),%d2 43324: 4e5e unlk %fp 43326: 4e75 rts if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 43328: 2079 0005 f74a moveal 5f74a ,%a0 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4332e: 2f28 001c movel %a0@(28),%sp@- 43332: 2f28 0018 movel %a0@(24),%sp@- 43336: 2f02 movel %d2,%sp@- 43338: 4879 0005 e6e4 pea 5e6e4 4333e: 4eb9 0004 4198 jsr 44198 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 43344: 242e fffc movel %fp@(-4),%d2 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 43348: 4fef 0010 lea %sp@(16),%sp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4334c: 4e5e unlk %fp 4334e: 4e75 rts /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { 43350: 4eb9 0004 349c jsr 4349c return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 43356: 4a00 tstb %d0 43358: 669e bnes 432f8 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4335a: 2d42 0008 movel %d2,%fp@(8) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4335e: 242e fffc movel %fp@(-4),%d2 43362: 4e5e unlk %fp /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 43364: 4ef9 0004 351e jmp 4351e ... =============================================================================== 00047060 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 47060: 4e56 0000 linkw %fp,#0 47064: 2f0b movel %a3,%sp@- 47066: 2f0a movel %a2,%sp@- 47068: 246e 0008 moveal %fp@(8),%a2 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 4706c: b5fc 0006 47e4 cmpal #411620,%a2 47072: 6728 beqs 4709c <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 47074: 486a 0004 pea %a2@(4) 47078: 47f9 0004 5d30 lea 45d30 ,%a3 4707e: 4e93 jsr %a3@ rtems_filesystem_freenode( &env->root_directory); 47080: 486a 0018 pea %a2@(24) 47084: 4e93 jsr %a3@ free(env); } } 47086: 266e fffc moveal %fp@(-4),%a3 && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 4708a: 508f addql #8,%sp 4708c: 2d4a 0008 movel %a2,%fp@(8) } } 47090: 246e fff8 moveal %fp@(-8),%a2 47094: 4e5e unlk %fp && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 47096: 4ef9 0004 5d44 jmp 45d44 } } 4709c: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 470a0: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 470a4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042cf8 : } } static rtems_disk_device * get_disk_entry(dev_t dev, bool lookup_only) { 42cf8: 4e56 0000 linkw %fp,#0 42cfc: 202e 0008 movel %fp@(8),%d0 42d00: 2f02 movel %d2,%sp@- 42d02: 206e 000c moveal %fp@(12),%a0 42d06: 142e 0013 moveb %fp@(19),%d2 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { 42d0a: b0b9 0006 44fa cmpl 644fa ,%d0 42d10: 6436 bccs 42d48 <== NEVER TAKEN 42d12: 2239 0006 44fe movel 644fe ,%d1 42d18: 672e beqs 42d48 <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; 42d1a: 2241 moveal %d1,%a1 42d1c: e788 lsll #3,%d0 42d1e: d3c0 addal %d0,%a1 if (minor < dtab->size && dtab->minor != NULL) { 42d20: b1e9 0004 cmpal %a1@(4),%a0 42d24: 6422 bccs 42d48 <== NEVER TAKEN 42d26: 2251 moveal %a1@,%a1 42d28: 4a89 tstl %a1 42d2a: 671c beqs 42d48 <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; 42d2c: 2031 8c00 movel %a1@(00000000,%a0:l:4),%d0 if (dd != NULL && !lookup_only) { 42d30: 6710 beqs 42d42 42d32: 4a02 tstb %d2 42d34: 660c bnes 42d42 if (!dd->deleted) { 42d36: 2040 moveal %d0,%a0 42d38: 4a28 0030 tstb %a0@(48) 42d3c: 660a bnes 42d48 ++dd->uses; 42d3e: 52a8 0014 addql #1,%a0@(20) return dd; } } return NULL; } 42d42: 241f movel %sp@+,%d2 42d44: 4e5e unlk %fp 42d46: 4e75 rts 42d48: 241f movel %sp@+,%d2 if (dd != NULL && !lookup_only) { if (!dd->deleted) { ++dd->uses; } else { dd = NULL; 42d4a: 4280 clrl %d0 return dd; } } return NULL; } 42d4c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005e714 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5e714: 4e56 ffec linkw %fp,#-20 5e718: 202e 0008 movel %fp@(8),%d0 5e71c: 2f0a movel %a2,%sp@- rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5e71e: b0b9 0006 1602 cmpl 61602 ,%d0 5e724: 6464 bccs 5e78a <== NEVER TAKEN 5e726: 2200 movel %d0,%d1 5e728: ed88 lsll #6,%d0 5e72a: e789 lsll #3,%d1 5e72c: 2479 0006 2df4 moveal 62df4 ,%a2 5e732: 9081 subl %d1,%d0 5e734: d5c0 addal %d0,%a2 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5e736: 2d6a 0018 ffec movel %a2@(24),%fp@(-20) 5e73c: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 5e742: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 5e748: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5e74e: 206e fff8 moveal %fp@(-8),%a0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5e752: 2d6a 0028 fffc movel %a2@(40),%fp@(-4) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5e758: 486e ffec pea %fp@(-20) 5e75c: 2068 0010 moveal %a0@(16),%a0 5e760: 4e90 jsr %a0@ 5e762: 588f addql #4,%sp 5e764: 7201 moveq #1,%d1 5e766: b280 cmpl %d0,%d1 5e768: 6624 bnes 5e78e /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); 5e76a: 206a 0020 moveal %a2@(32),%a0 5e76e: 2f2e 0010 movel %fp@(16),%sp@- 5e772: 2f2e 000c movel %fp@(12),%sp@- 5e776: 2f0a movel %a2,%sp@- 5e778: 2068 0008 moveal %a0@(8),%a0 5e77c: 4e90 jsr %a0@ } 5e77e: 246e ffe8 moveal %fp@(-24),%a2 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); 5e782: 4fef 000c lea %sp@(12),%sp } 5e786: 4e5e unlk %fp 5e788: 4e75 rts rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5e78a: 95ca subal %a2,%a2 <== NOT EXECUTED 5e78c: 60a8 bras 5e736 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 5e78e: 4eb9 0005 01a4 jsr 501a4 <__errno> /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); } 5e794: 246e ffe8 moveal %fp@(-24),%a2 /* * Make sure we are working on a directory */ loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 5e798: 2040 moveal %d0,%a0 5e79a: 7214 moveq #20,%d1 5e79c: 70ff moveq #-1,%d0 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); } 5e79e: 4e5e unlk %fp /* * Make sure we are working on a directory */ loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 5e7a0: 2081 movel %d1,%a0@ <== NOT EXECUTED /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); } =============================================================================== 00043bf6 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 43bf6: 4e56 ffe0 linkw %fp,#-32 43bfa: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 43bfe: 242e 0008 movel %fp@(8),%d2 43c02: 47fa fcce lea %pc@(438d2 ),%a3 for(;;) { if (!scangr(fp, grp, buffer, bufsize)) goto error_einval; if (name) { match = (strcmp(grp->gr_name, name) == 0); 43c06: 49f9 0005 1638 lea 51638 ,%a4 struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 43c0c: 2c2e 000c movel %fp@(12),%d6 43c10: 246e 0010 moveal %fp@(16),%a2 43c14: 2a2e 0014 movel %fp@(20),%d5 43c18: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 43c1c: 4eb9 0004 3aec jsr 43aec if ((fp = fopen("/etc/group", "r")) == NULL) 43c22: 4879 0006 0727 pea 60727 <_global_impure_ptr+0xc7> 43c28: 4879 0005 feb0 pea 5feb0 43c2e: 4eb9 0005 04e2 jsr 504e2 43c34: 508f addql #8,%sp 43c36: 2600 movel %d0,%d3 43c38: 6778 beqs 43cb2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scangr(fp, grp, buffer, bufsize)) 43c3a: 2f04 movel %d4,%sp@- 43c3c: 2f05 movel %d5,%sp@- 43c3e: 2f0a movel %a2,%sp@- 43c40: 2f03 movel %d3,%sp@- 43c42: 4e93 jsr %a3@ 43c44: 4fef 0010 lea %sp@(16),%sp 43c48: 4a80 tstl %d0 43c4a: 6744 beqs 43c90 goto error_einval; if (name) { 43c4c: 4a82 tstl %d2 43c4e: 672e beqs 43c7e match = (strcmp(grp->gr_name, name) == 0); 43c50: 2f02 movel %d2,%sp@- 43c52: 2f12 movel %a2@,%sp@- 43c54: 4e94 jsr %a4@ 43c56: 508f addql #8,%sp 43c58: 4a80 tstl %d0 43c5a: 57c0 seq %d0 43c5c: 49c0 extbl %d0 43c5e: 4480 negl %d0 } else { match = (grp->gr_gid == gid); } if (match) { 43c60: 67d8 beqs 43c3a fclose(fp); 43c62: 2f03 movel %d3,%sp@- 43c64: 4eb9 0004 fe20 jsr 4fe20 *result = grp; 43c6a: 206e 001c moveal %fp@(28),%a0 return 0; 43c6e: 588f addql #4,%sp 43c70: 4280 clrl %d0 match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 43c72: 208a movel %a2,%a0@ } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 43c74: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 43c7a: 4e5e unlk %fp 43c7c: 4e75 rts goto error_einval; if (name) { match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 43c7e: 4280 clrl %d0 43c80: 302a 0008 movew %a2@(8),%d0 43c84: bc80 cmpl %d0,%d6 43c86: 57c0 seq %d0 43c88: 49c0 extbl %d0 43c8a: 4480 negl %d0 } if (match) { 43c8c: 67ac beqs 43c3a 43c8e: 60d2 bras 43c62 *result = grp; return 0; } } error_einval: fclose(fp); 43c90: 2f03 movel %d3,%sp@- 43c92: 4eb9 0004 fe20 jsr 4fe20 rtems_set_errno_and_return_minus_one( EINVAL ); 43c98: 4eb9 0004 fcec jsr 4fcec <__errno> 43c9e: 588f addql #4,%sp 43ca0: 7216 moveq #22,%d1 43ca2: 2040 moveal %d0,%a0 43ca4: 70ff moveq #-1,%d0 } 43ca6: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 return 0; } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); 43cac: 2081 movel %d1,%a0@ } 43cae: 4e5e unlk %fp 43cb0: 4e75 rts int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 43cb2: 4eb9 0004 fcec jsr 4fcec <__errno> 43cb8: 7416 moveq #22,%d2 43cba: 2040 moveal %d0,%a0 43cbc: 70ff moveq #-1,%d0 43cbe: 2082 movel %d2,%a0@ } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 43cc0: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 43cc6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e294 : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) 4e294: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4e296: 4e56 0000 linkw %fp,#0 4e29a: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) 4e29e: 2268 0018 moveal %a0@(24),%a1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4e2a2: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) 4e2a4: b0a9 0048 cmpl %a1@(72),%d0 4e2a8: 6614 bnes 4e2be <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; 4e2aa: 4200 clrb %d0 the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 4e2ac: 4281 clrl %d1 4e2ae: 4282 clrl %d2 4e2b0: 2141 000c movel %d1,%a0@(12) 4e2b4: 2142 0010 movel %d2,%a0@(16) return 0; } 4e2b8: 241f movel %sp@+,%d2 4e2ba: 4e5e unlk %fp 4e2bc: 4e75 rts 4e2be: 241f movel %sp@+,%d2 <== NOT EXECUTED /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ 4e2c0: 70ff moveq #-1,%d0 <== NOT EXECUTED iop->offset = 0; return 0; } 4e2c2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e4fc : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4e4fc: 4e56 0000 linkw %fp,#0 4e500: 206e 000c moveal %fp@(12),%a0 4e504: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4e506: 2450 moveal %a0@,%a2 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4e508: 200a movel %a2,%d0 4e50a: 0680 0000 0050 addil #80,%d0 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) 4e510: b0aa 004c cmpl %a2@(76),%d0 4e514: 6642 bnes 4e558 static inline bool rtems_filesystem_is_root_location( const rtems_filesystem_location_info_t *loc ) { return loc->mt_entry->mt_fs_root.node_access == loc->node_access; 4e516: 2068 0010 moveal %a0@(16),%a0 /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) 4e51a: b5e8 001c cmpal %a0@(28),%a2 4e51e: 6722 beqs 4e542 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4e520: 4aaa 0058 tstl %a2@(88) 4e524: 661c bnes 4e542 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 4e526: 2f0a movel %a2,%sp@- 4e528: 4eb9 0004 b434 jsr 4b434 IMFS_check_node_remove( the_jnode ); 4e52e: 2f0a movel %a2,%sp@- 4e530: 4eb9 0004 b478 jsr 4b478 return 0; } 4e536: 246e fffc moveal %fp@(-4),%a2 rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; 4e53a: 508f addql #8,%sp 4e53c: 4280 clrl %d0 } 4e53e: 4e5e unlk %fp 4e540: 4e75 rts /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 4e542: 4eb9 0004 f098 jsr 4f098 <__errno> IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 4e548: 246e fffc moveal %fp@(-4),%a2 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 4e54c: 2040 moveal %d0,%a0 4e54e: 7210 moveq #16,%d1 4e550: 70ff moveq #-1,%d0 IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 4e552: 4e5e unlk %fp /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 4e554: 2081 movel %d1,%a0@ IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 4e556: 4e75 rts /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4e558: 4eb9 0004 f098 jsr 4f098 <__errno> IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 4e55e: 246e fffc moveal %fp@(-4),%a2 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4e562: 2040 moveal %d0,%a0 4e564: 725a moveq #90,%d1 4e566: 70ff moveq #-1,%d0 IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 4e568: 4e5e unlk %fp /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4e56a: 2081 movel %d1,%a0@ IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } ... =============================================================================== 000452b8 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 452b8: 4e56 fff4 linkw %fp,#-12 452bc: 222e 0008 movel %fp@(8),%d1 452c0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 452c4: 246e 000c moveal %fp@(12),%a2 if (tty->termios.c_iflag & ISTRIP) 452c8: 202a 0030 movel %a2@(48),%d0 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 452cc: 1401 moveb %d1,%d2 if (tty->termios.c_iflag & ISTRIP) 452ce: 0800 0005 btst #5,%d0 452d2: 6704 beqs 452d8 <== ALWAYS TAKEN c &= 0x7f; 452d4: 747f moveq #127,%d2 <== NOT EXECUTED 452d6: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 452d8: 0800 0009 btst #9,%d0 452dc: 6720 beqs 452fe c = tolower (c); 452de: 2079 0005 f994 moveal 5f994 <__ctype_ptr__>,%a0 452e4: 7603 moveq #3,%d3 452e6: 0282 0000 00ff andil #255,%d2 452ec: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 452f0: 49c1 extbl %d1 452f2: c283 andl %d3,%d1 452f4: 163c 0001 moveb #1,%d3 452f8: b681 cmpl %d1,%d3 452fa: 6700 00e0 beqw 453dc if (c == '\r') { 452fe: 4281 clrl %d1 45300: 1202 moveb %d2,%d1 45302: 760d moveq #13,%d3 45304: b681 cmpl %d1,%d3 45306: 6740 beqs 45348 if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 45308: 760a moveq #10,%d3 4530a: b681 cmpl %d1,%d3 4530c: 6700 00c4 beqw 453d2 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 45310: 4a02 tstb %d2 45312: 664c bnes 45360 <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 45314: 2039 0005 f8c8 movel 5f8c8 ,%d0 4531a: 5380 subql #1,%d0 4531c: 222a 0020 movel %a2@(32),%d1 45320: b081 cmpl %d1,%d0 45322: 6f28 bles 4534c <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 45324: 7008 moveq #8,%d0 45326: c0aa 003c andl %a2@(60),%d0 4532a: 6600 00ba bnew 453e6 echo (c, tty); tty->cbuf[tty->ccount++] = c; 4532e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED } return 0; 45332: 4280 clrl %d0 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 45334: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45338: 5281 addql #1,%d1 <== NOT EXECUTED 4533a: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED } return 0; } 4533e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 45344: 4e5e unlk %fp 45346: 4e75 rts if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 45348: 4a00 tstb %d0 4534a: 6c0c bges 45358 <== ALWAYS TAKEN if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 4534c: 4280 clrl %d0 <== NOT EXECUTED } 4534e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 45354: 4e5e unlk %fp <== NOT EXECUTED 45356: 4e75 rts <== NOT EXECUTED c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 45358: 0800 0008 btst #8,%d0 4535c: 6702 beqs 45360 <== NEVER TAKEN c = '\n'; 4535e: 740a moveq #10,%d2 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 45360: 222a 003c movel %a2@(60),%d1 45364: 0801 0001 btst #1,%d1 45368: 67aa beqs 45314 if (c == tty->termios.c_cc[VERASE]) { 4536a: 4283 clrl %d3 4536c: 162a 0043 moveb %a2@(67),%d3 45370: 4280 clrl %d0 45372: 1002 moveb %d2,%d0 45374: b083 cmpl %d3,%d0 45376: 6700 0122 beqw 4549a erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 4537a: 4283 clrl %d3 4537c: 162a 0044 moveb %a2@(68),%d3 45380: b083 cmpl %d3,%d0 45382: 6700 00a8 beqw 4542c erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 45386: 4283 clrl %d3 45388: 162a 0045 moveb %a2@(69),%d3 4538c: b083 cmpl %d3,%d0 4538e: 6700 00fe beqw 4548e return 1; } else if (c == '\n') { 45392: 760a moveq #10,%d3 45394: b680 cmpl %d0,%d3 45396: 6700 00ac beqw 45444 if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 4539a: 4283 clrl %d3 4539c: 162a 004c moveb %a2@(76),%d3 453a0: b083 cmpl %d3,%d0 453a2: 670c beqs 453b0 <== NEVER TAKEN 453a4: 4283 clrl %d3 453a6: 162a 0051 moveb %a2@(81),%d3 453aa: b083 cmpl %d3,%d0 453ac: 6600 ff66 bnew 45314 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 453b0: 44c1 movew %d1,%ccr <== NOT EXECUTED 453b2: 6b58 bmis 4540c <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 453b4: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED return 1; 453b8: 7001 moveq #1,%d0 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 453ba: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 453be: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 453c2: 5281 addql #1,%d1 <== NOT EXECUTED 453c4: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 453c8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 453ce: 4e5e unlk %fp <== NOT EXECUTED 453d0: 4e75 rts <== NOT EXECUTED if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 453d2: 0800 0006 btst #6,%d0 453d6: 6788 beqs 45360 <== ALWAYS TAKEN c = '\r'; 453d8: 740d moveq #13,%d2 <== NOT EXECUTED 453da: 6084 bras 45360 <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 453dc: 0682 0000 0020 addil #32,%d2 453e2: 6000 ff1a braw 452fe /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 453e6: 2f0a movel %a2,%sp@- 453e8: 4280 clrl %d0 453ea: 1002 moveb %d2,%d0 453ec: 2f00 movel %d0,%sp@- 453ee: 4eba fc48 jsr %pc@(45038 ) 453f2: 222a 0020 movel %a2@(32),%d1 453f6: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; } return 0; 453f8: 4280 clrl %d0 * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 453fa: 206a 001c moveal %a2@(28),%a0 453fe: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) 45402: 5281 addql #1,%d1 45404: 2541 0020 movel %d1,%a2@(32) 45408: 6000 ff34 braw 4533e tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 4540c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4540e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45410: 4eba fc26 jsr %pc@(45038 ) <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 45414: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 45418: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; return 1; 4541a: 7001 moveq #1,%d0 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 4541c: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45420: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45424: 5281 addql #1,%d1 <== NOT EXECUTED 45426: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 4542a: 609c bras 453c8 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 4542c: 4878 0001 pea 1 45430: 2f0a movel %a2,%sp@- 45432: 4eba fc92 jsr %pc@(450c6 ) return 0; 45436: 508f addql #8,%sp 45438: 4280 clrl %d0 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4543a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 45440: 4e5e unlk %fp 45442: 4e75 rts return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 45444: 7048 moveq #72,%d0 45446: c280 andl %d0,%d1 45448: 6620 bnes 4546a <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; 4544a: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED return 1; 4544e: 7001 moveq #1,%d0 <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; 45450: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45454: 740a moveq #10,%d2 <== NOT EXECUTED 45456: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 4545a: 5281 addql #1,%d1 <== NOT EXECUTED 4545c: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45460: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 45466: 4e5e unlk %fp 45468: 4e75 rts } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 4546a: 2f0a movel %a2,%sp@- 4546c: 4878 000a pea a tty->cbuf[tty->ccount++] = c; 45470: 740a moveq #10,%d2 } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 45472: 4eba fbc4 jsr %pc@(45038 ) tty->cbuf[tty->ccount++] = c; 45476: 222a 0020 movel %a2@(32),%d1 } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 4547a: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; return 1; 4547c: 7001 moveq #1,%d0 else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; 4547e: 206a 001c moveal %a2@(28),%a0 45482: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) 45486: 5281 addql #1,%d1 45488: 2541 0020 movel %d1,%a2@(32) 4548c: 60d2 bras 45460 else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 4548e: 7001 moveq #1,%d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45490: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 45496: 4e5e unlk %fp <== NOT EXECUTED 45498: 4e75 rts <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 4549a: 42a7 clrl %sp@- 4549c: 2f0a movel %a2,%sp@- 4549e: 4eba fc26 jsr %pc@(450c6 ) return 0; 454a2: 508f addql #8,%sp 454a4: 4280 clrl %d0 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 454a6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 454ac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005d028 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 5d028: 4e56 ffc4 linkw %fp,#-60 5d02c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5d030: 262e 000c movel %fp@(12),%d3 5d034: 246e 0010 moveal %fp@(16),%a2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 5d038: 4eb9 0005 cb64 jsr 5cb64 5d03e: b0ae 0008 cmpl %fp@(8),%d0 5d042: 6600 020c bnew 5d250 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 5d046: 4a83 tstl %d3 5d048: 6700 021e beqw 5d268 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 5d04c: 2003 movel %d3,%d0 5d04e: 5380 subql #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 5d050: 721f moveq #31,%d1 5d052: b280 cmpl %d0,%d1 5d054: 6500 0212 bcsw 5d268 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 ) 5d058: 2c03 movel %d3,%d6 5d05a: 2a03 movel %d3,%d5 5d05c: 7201 moveq #1,%d1 5d05e: e98e lsll #4,%d6 5d060: e58d lsll #2,%d5 5d062: 2806 movel %d6,%d4 5d064: 9885 subl %d5,%d4 5d066: 2044 moveal %d4,%a0 5d068: d1fc 0006 14ec addal #398572,%a0 5d06e: b290 cmpl %a0@,%d1 5d070: 6700 01ca beqw 5d23c /* * 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 ) ) 5d074: 123c 0008 moveb #8,%d1 5d078: b283 cmpl %d3,%d1 5d07a: 6700 0160 beqw 5d1dc 5d07e: 123c 0004 moveb #4,%d1 5d082: b283 cmpl %d3,%d1 5d084: 6700 0156 beqw 5d1dc 5d088: 123c 000b moveb #11,%d1 5d08c: b283 cmpl %d3,%d1 5d08e: 6700 014c beqw 5d1dc static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 5d092: 7401 moveq #1,%d2 5d094: e1aa lsll %d0,%d2 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 5d096: 7001 moveq #1,%d0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 5d098: 2d43 fff4 movel %d3,%fp@(-12) siginfo->si_code = SI_USER; 5d09c: 2d40 fff8 movel %d0,%fp@(-8) if ( !value ) { 5d0a0: 4a8a tstl %a2 5d0a2: 6700 01a4 beqw 5d248 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 5d0a6: 2d52 fffc movel %a2@,%fp@(-4) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 5d0aa: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 5d0b0: 5280 addql #1,%d0 5d0b2: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 5d0b8: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 5d0be: 2679 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 5d0c4: 206b 0102 moveal %a3@(258),%a0 5d0c8: 2028 00d0 movel %a0@(208),%d0 5d0cc: 4680 notl %d0 5d0ce: c082 andl %d2,%d0 5d0d0: 6600 00ca bnew 5d19c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 5d0d4: 2679 0006 1670 moveal 61670 <_POSIX_signals_Wait_queue>,%a3 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 5d0da: b7fc 0006 1674 cmpal #398964,%a3 5d0e0: 6724 beqs 5d106 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5d0e2: 2002 movel %d2,%d0 5d0e4: c0ab 0030 andl %a3@(48),%d0 for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5d0e8: 206b 0102 moveal %a3@(258),%a0 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5d0ec: 6600 00ae bnew 5d19c /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 5d0f0: 2028 00d0 movel %a0@(208),%d0 5d0f4: 4680 notl %d0 5d0f6: c082 andl %d2,%d0 5d0f8: 6600 00a2 bnew 5d19c the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 5d0fc: 2653 moveal %a3@,%a3 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 5d0fe: b7fc 0006 1674 cmpal #398964,%a3 5d104: 66dc bnes 5d0e2 <== NEVER TAKEN * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 5d106: 4287 clrl %d7 5d108: 1e39 0005 f6aa moveb 5f6aa ,%d7 5d10e: 49f9 0006 100c lea 6100c <_Objects_Information_table+0x8>,%a4 5d114: 5287 addql #1,%d7 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 5d116: 97cb subal %a3,%a3 interested_priority = PRIORITY_MAXIMUM + 1; 5d118: 2447 moveal %d7,%a2 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 5d11a: 205c moveal %a4@+,%a0 5d11c: 4a88 tstl %a0 5d11e: 6770 beqs 5d190 <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 5d120: 2068 0004 moveal %a0@(4),%a0 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 5d124: 4287 clrl %d7 5d126: 3e28 000e movew %a0@(14),%d7 object_table = the_info->local_table; 5d12a: 2268 0018 moveal %a0@(24),%a1 for ( index = 1 ; index <= maximum ; index++ ) { 5d12e: 4a87 tstl %d7 5d130: 675e beqs 5d190 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 5d132: 5889 addql #4,%a1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 5d134: 7001 moveq #1,%d0 5d136: 2d43 ffec movel %d3,%fp@(-20) the_thread = (Thread_Control *) object_table[ index ]; 5d13a: 2059 moveal %a1@+,%a0 if ( !the_thread ) 5d13c: 4a88 tstl %a0 5d13e: 6746 beqs 5d186 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 5d140: 2228 0014 movel %a0@(20),%d1 5d144: b5c1 cmpal %d1,%a2 5d146: 653e bcss 5d186 <== NEVER TAKEN #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 5d148: 2a68 0102 moveal %a0@(258),%a5 5d14c: 262d 00d0 movel %a5@(208),%d3 5d150: 4683 notl %d3 5d152: c682 andl %d2,%d3 5d154: 6730 beqs 5d186 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 5d156: b5c1 cmpal %d1,%a2 5d158: 6228 bhis 5d182 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 5d15a: 4a8b tstl %a3 5d15c: 6728 beqs 5d186 <== NEVER TAKEN 5d15e: 2a6b 0010 moveal %a3@(16),%a5 5d162: 4a8d tstl %a5 5d164: 6720 beqs 5d186 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 5d166: 2628 0010 movel %a0@(16),%d3 5d16a: 2d43 fff0 movel %d3,%fp@(-16) 5d16e: 6712 beqs 5d182 <== NEVER TAKEN continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 5d170: 260d movel %a5,%d3 5d172: 0803 001c btst #28,%d3 5d176: 660e bnes 5d186 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 5d178: 262e fff0 movel %fp@(-16),%d3 5d17c: 0803 001c btst #28,%d3 5d180: 6704 beqs 5d186 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 5d182: 2441 moveal %d1,%a2 5d184: 2648 moveal %a0,%a3 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 5d186: 5280 addql #1,%d0 5d188: b087 cmpl %d7,%d0 5d18a: 63ae blss 5d13a 5d18c: 262e ffec movel %fp@(-20),%d3 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 5d190: b9fc 0006 1014 cmpal #397332,%a4 5d196: 6682 bnes 5d11a } } } } if ( interested ) { 5d198: 4a8b tstl %a3 5d19a: 6716 beqs 5d1b2 /* * 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 ) ) { 5d19c: 486e fff4 pea %fp@(-12) 5d1a0: 2f03 movel %d3,%sp@- 5d1a2: 2f0b movel %a3,%sp@- 5d1a4: 4eb9 0005 d2c0 jsr 5d2c0 <_POSIX_signals_Unblock_thread> 5d1aa: 4fef 000c lea %sp@(12),%sp 5d1ae: 4a00 tstb %d0 5d1b0: 6618 bnes 5d1ca /* * 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 ); 5d1b2: 2f02 movel %d2,%sp@- 5d1b4: 4eb9 0005 d2a0 jsr 5d2a0 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 5d1ba: 588f addql #4,%sp 5d1bc: 41f9 0006 14e4 lea 614e4 <_POSIX_signals_Vectors>,%a0 5d1c2: 7002 moveq #2,%d0 5d1c4: b0b0 4800 cmpl %a0@(00000000,%d4:l),%d0 5d1c8: 672e beqs 5d1f8 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 5d1ca: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch> return 0; 5d1d0: 4280 clrl %d0 } 5d1d2: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d1d8: 4e5e unlk %fp 5d1da: 4e75 rts * 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 ) ) return pthread_kill( pthread_self(), sig ); 5d1dc: 4eb9 0005 d4cc jsr 5d4cc 5d1e2: 2f03 movel %d3,%sp@- 5d1e4: 2f00 movel %d0,%sp@- 5d1e6: 4eb9 0005 d3fc jsr 5d3fc 5d1ec: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d1ee: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d1f4: 4e5e unlk %fp 5d1f6: 4e75 rts */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 5d1f8: 4879 0006 1664 pea 61664 <_POSIX_signals_Inactive_siginfo> 5d1fe: 4eb9 0004 75d4 jsr 475d4 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 5d204: 588f addql #4,%sp */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 5d206: 2040 moveal %d0,%a0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 5d208: 4a80 tstl %d0 5d20a: 6774 beqs 5d280 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 5d20c: 9c85 subl %d5,%d6 5d20e: 0686 0006 16dc addil #399068,%d6 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 5d214: 216e fff4 0008 movel %fp@(-12),%a0@(8) 5d21a: 216e fff8 000c movel %fp@(-8),%a0@(12) 5d220: 216e fffc 0010 movel %fp@(-4),%a0@(16) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 5d226: 2f00 movel %d0,%sp@- 5d228: 2f06 movel %d6,%sp@- 5d22a: 4eb9 0004 7574 jsr 47574 <_Chain_Append> 5d230: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 5d232: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch> return 0; 5d238: 4280 clrl %d0 5d23a: 6096 bras 5d1d2 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) return 0; 5d23c: 4280 clrl %d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d23e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d244: 4e5e unlk %fp 5d246: 4e75 rts */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 5d248: 42ae fffc clrl %fp@(-4) 5d24c: 6000 fe5c braw 5d0aa /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 5d250: 4eb9 0004 f098 jsr 4f098 <__errno> 5d256: 7603 moveq #3,%d3 5d258: 2040 moveal %d0,%a0 5d25a: 70ff moveq #-1,%d0 5d25c: 2083 movel %d3,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d25e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d264: 4e5e unlk %fp 5d266: 4e75 rts */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 5d268: 4eb9 0004 f098 jsr 4f098 <__errno> 5d26e: 7416 moveq #22,%d2 5d270: 2040 moveal %d0,%a0 5d272: 70ff moveq #-1,%d0 5d274: 2082 movel %d2,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d276: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d27c: 4e5e unlk %fp 5d27e: 4e75 rts if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 5d280: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 5d286: 4eb9 0004 f098 jsr 4f098 <__errno> 5d28c: 720b moveq #11,%d1 5d28e: 2040 moveal %d0,%a0 5d290: 70ff moveq #-1,%d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d292: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 5d298: 2081 movel %d1,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d29a: 4e5e unlk %fp ... =============================================================================== 00043b84 : /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 43b84: 7003 moveq #3,%d0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 43b86: 4e56 0000 linkw %fp,#0 43b8a: 2f0a movel %a2,%sp@- /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 43b8c: b0b9 0006 118c cmpl 6118c <_System_state_Current>,%d0 43b92: 6708 beqs 43b9c <== ALWAYS TAKEN */ fclose (stdin); fclose (stdout); fclose (stderr); } 43b94: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43b98: 4e5e unlk %fp <== NOT EXECUTED 43b9a: 4e75 rts <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 43b9c: 2479 0005 ee96 moveal 5ee96 <_global_impure_ptr>,%a2 43ba2: b5f9 0005 f998 cmpal 5f998 <_impure_ptr>,%a2 43ba8: 6710 beqs 43bba _wrapup_reent(_global_impure_ptr); 43baa: 2f0a movel %a2,%sp@- 43bac: 4eb9 0004 fb02 jsr 4fb02 <_wrapup_reent> /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = _global_impure_ptr; 43bb2: 588f addql #4,%sp 43bb4: 23ca 0005 f998 movel %a2,5f998 <_impure_ptr> * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 43bba: 2f2a 0004 movel %a2@(4),%sp@- 43bbe: 45f9 0004 f1cc lea 4f1cc ,%a2 43bc4: 4e92 jsr %a2@ fclose (stdout); 43bc6: 2079 0005 f998 moveal 5f998 <_impure_ptr>,%a0 43bcc: 2f28 0008 movel %a0@(8),%sp@- 43bd0: 4e92 jsr %a2@ fclose (stderr); 43bd2: 2079 0005 f998 moveal 5f998 <_impure_ptr>,%a0 43bd8: 2f28 000c movel %a0@(12),%sp@- 43bdc: 4e92 jsr %a2@ } 43bde: 246e fffc moveal %fp@(-4),%a2 * _fwalk (_REENT, fclose); */ fclose (stdin); fclose (stdout); fclose (stderr); 43be2: 4fef 000c lea %sp@(12),%sp } 43be6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000445e8 : int link( const char *existing, const char *new ) { 445e8: 4e56 ffc0 linkw %fp,#-64 445ec: 48d7 041c moveml %d2-%d4/%a2,%sp@ 445f0: 242e 0008 movel %fp@(8),%d2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 445f4: 260e movel %fp,%d3 445f6: 0683 ffff ffd0 addil #-48,%d3 445fc: 2f02 movel %d2,%sp@- int link( const char *existing, const char *new ) { 445fe: 282e 000c movel %fp@(12),%d4 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 44602: 4eb9 0005 1840 jsr 51840 44608: 7201 moveq #1,%d1 4460a: 2e81 movel %d1,%sp@ 4460c: 2f03 movel %d3,%sp@- 4460e: 42a7 clrl %sp@- 44610: 2f00 movel %d0,%sp@- 44612: 2f02 movel %d2,%sp@- 44614: 4eb9 0004 3f24 jsr 43f24 0, &existing_loc, true ); if ( result != 0 ) 4461a: 4fef 0014 lea %sp@(20),%sp 4461e: 4a80 tstl %d0 44620: 6600 009c bnew 446be /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 44624: 240e movel %fp,%d2 44626: 0682 ffff ffe4 addil #-28,%d2 4462c: 2f02 movel %d2,%sp@- 4462e: 486e fff8 pea %fp@(-8) 44632: 2f04 movel %d4,%sp@- 44634: 4eb9 0004 56c0 jsr 456c0 result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 4463a: 486e fffc pea %fp@(-4) 4463e: d8ae fff8 addl %fp@(-8),%d4 44642: 2f02 movel %d2,%sp@- 44644: 206e fff0 moveal %fp@(-16),%a0 44648: 2f04 movel %d4,%sp@- 4464a: 2068 0004 moveal %a0@(4),%a0 4464e: 4e90 jsr %a0@ if ( result != 0 ) { 44650: 4fef 0018 lea %sp@(24),%sp 44654: 4a80 tstl %d0 44656: 6674 bnes 446cc <== NEVER TAKEN /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 44658: 202e ffe0 movel %fp@(-32),%d0 4465c: b0ae fff4 cmpl %fp@(-12),%d0 44660: 6632 bnes 44694 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 44662: 2f2e fffc movel %fp@(-4),%sp@- rtems_filesystem_freenode( &existing_loc ); 44666: 45f9 0004 4134 lea 44134 ,%a2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 4466c: 206e fff0 moveal %fp@(-16),%a0 44670: 2f02 movel %d2,%sp@- 44672: 2f03 movel %d3,%sp@- 44674: 2068 0008 moveal %a0@(8),%a0 44678: 4e90 jsr %a0@ 4467a: 2800 movel %d0,%d4 rtems_filesystem_freenode( &existing_loc ); 4467c: 2f03 movel %d3,%sp@- 4467e: 4e92 jsr %a2@ rtems_filesystem_freenode( &parent_loc ); 44680: 2f02 movel %d2,%sp@- 44682: 4e92 jsr %a2@ return result; 44684: 4fef 0014 lea %sp@(20),%sp } 44688: 2004 movel %d4,%d0 4468a: 4cee 041c ffc0 moveml %fp@(-64),%d2-%d4/%a2 44690: 4e5e unlk %fp 44692: 4e75 rts * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 44694: 2f03 movel %d3,%sp@- 44696: 45f9 0004 4134 lea 44134 ,%a2 rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); 4469c: 78ff moveq #-1,%d4 * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 4469e: 4e92 jsr %a2@ rtems_filesystem_freenode( &parent_loc ); 446a0: 2f02 movel %d2,%sp@- 446a2: 4e92 jsr %a2@ rtems_set_errno_and_return_minus_one( EXDEV ); 446a4: 4eb9 0005 04d4 jsr 504d4 <__errno> 446aa: 508f addql #8,%sp 446ac: 2040 moveal %d0,%a0 446ae: 7012 moveq #18,%d0 446b0: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 446b2: 2004 movel %d4,%d0 446b4: 4cee 041c ffc0 moveml %fp@(-64),%d2-%d4/%a2 446ba: 4e5e unlk %fp 446bc: 4e75 rts */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 0, &existing_loc, true ); if ( result != 0 ) return -1; 446be: 78ff moveq #-1,%d4 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 446c0: 2004 movel %d4,%d0 446c2: 4cee 041c ffc0 moveml %fp@(-64),%d2-%d4/%a2 446c8: 4e5e unlk %fp 446ca: 4e75 rts rtems_filesystem_get_start_loc( new, &i, &parent_loc ); result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 446cc: 2f03 movel %d3,%sp@- return -1; 446ce: 78ff moveq #-1,%d4 rtems_filesystem_get_start_loc( new, &i, &parent_loc ); result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 446d0: 4eb9 0004 4134 jsr 44134 return -1; 446d6: 588f addql #4,%sp rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 446d8: 2004 movel %d4,%d0 446da: 4cee 041c ffc0 moveml %fp@(-64),%d2-%d4/%a2 446e0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004360c : #include "malloc_p.h" void *malloc( size_t size ) { 4360c: 4e56 0000 linkw %fp,#0 void *return_this; MSBUMP(malloc_calls, 1); 43610: 52b9 0006 0f10 addql #1,60f10 #include "malloc_p.h" void *malloc( size_t size ) { 43616: 2f03 movel %d3,%sp@- 43618: 262e 0008 movel %fp@(8),%d3 4361c: 2f02 movel %d2,%sp@- MSBUMP(malloc_calls, 1); /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4361e: 4eb9 0004 34dc jsr 434dc /* * Validate the parameters */ if ( !size ) 43624: 4a83 tstl %d3 43626: 6762 beqs 4368a return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 43628: 7003 moveq #3,%d0 4362a: b0b9 0006 118c cmpl 6118c <_System_state_Current>,%d0 43630: 674e beqs 43680 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 43632: 42a7 clrl %sp@- 43634: 42a7 clrl %sp@- 43636: 2f03 movel %d3,%sp@- 43638: 2f39 0005 f74a movel 5f74a ,%sp@- 4363e: 4eb9 0004 874c jsr 4874c <_Protected_heap_Allocate_aligned_with_boundary> * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 43644: 4fef 0010 lea %sp@(16),%sp 43648: 2400 movel %d0,%d2 4364a: 674e beqs 4369a } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4364c: 2079 0005 febc moveal 5febc ,%a0 43652: 4a88 tstl %a0 43654: 6708 beqs 4365e (*rtems_malloc_dirty_helper)( return_this, size ); 43656: 2f03 movel %d3,%sp@- 43658: 2f02 movel %d2,%sp@- 4365a: 4e90 jsr %a0@ 4365c: 508f addql #8,%sp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4365e: 2079 0005 fec4 moveal 5fec4 ,%a0 43664: 4a88 tstl %a0 43666: 670a beqs 43672 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 43668: 2f02 movel %d2,%sp@- 4366a: 2068 0004 moveal %a0@(4),%a0 4366e: 4e90 jsr %a0@ 43670: 588f addql #4,%sp return return_this; } 43672: 2002 movel %d2,%d0 43674: 242e fff8 movel %fp@(-8),%d2 43678: 262e fffc movel %fp@(-4),%d3 4367c: 4e5e unlk %fp 4367e: 4e75 rts /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) 43680: 4eb9 0004 349c jsr 4349c return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 43686: 4a00 tstb %d0 43688: 66a8 bnes 43632 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) return NULL; 4368a: 4282 clrl %d2 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 4368c: 2002 movel %d2,%d0 4368e: 242e fff8 movel %fp@(-8),%d2 43692: 262e fffc movel %fp@(-4),%d3 43696: 4e5e unlk %fp 43698: 4e75 rts */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 4369a: 2079 0005 fec0 moveal 5fec0 ,%a0 436a0: 4a88 tstl %a0 436a2: 6712 beqs 436b6 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 436a4: 2f03 movel %d3,%sp@- 436a6: 2068 0004 moveal %a0@(4),%a0 436aa: 4e90 jsr %a0@ if ( !return_this ) { 436ac: 588f addql #4,%sp 436ae: 4a80 tstl %d0 436b0: 6704 beqs 436b6 436b2: 2400 movel %d0,%d2 436b4: 6096 bras 4364c errno = ENOMEM; 436b6: 4eb9 0004 f098 jsr 4f098 <__errno> */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 436bc: 262e fffc movel %fp@(-4),%d3 if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; 436c0: 2040 moveal %d0,%a0 436c2: 700c moveq #12,%d0 436c4: 2080 movel %d0,%a0@ */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 436c6: 2002 movel %d2,%d0 436c8: 242e fff8 movel %fp@(-8),%d2 436cc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000434dc : void malloc_deferred_frees_process(void) { 434dc: 4e56 0000 linkw %fp,#0 434e0: 2f0b movel %a3,%sp@- /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 434e2: 47f9 0004 32dc lea 432dc ,%a3 { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 434e8: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 434ea: 4879 0006 0f00 pea 60f00 434f0: 45f9 0004 75d4 lea 475d4 <_Chain_Get>,%a2 434f6: 4e92 jsr %a2@ rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 434f8: 588f addql #4,%sp 434fa: 4a80 tstl %d0 434fc: 6714 beqs 43512 free(to_be_freed); 434fe: 2f00 movel %d0,%sp@- 43500: 4e93 jsr %a3@ 43502: 588f addql #4,%sp 43504: 4879 0006 0f00 pea 60f00 4350a: 4e92 jsr %a2@ rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 4350c: 588f addql #4,%sp 4350e: 4a80 tstl %d0 43510: 66ec bnes 434fe <== NEVER TAKEN free(to_be_freed); } 43512: 246e fff8 moveal %fp@(-8),%a2 43516: 266e fffc moveal %fp@(-4),%a3 4351a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043600 : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 43600: 4e56 fff4 linkw %fp,#-12 * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; 43604: 2039 0006 11e0 movel 611e0 ,%d0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { 4360a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4360e: 262e 0008 movel %fp@(8),%d3 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) 43612: 4a80 tstl %d0 43614: 675c beqs 43672 <== NEVER TAKEN return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 43616: 2403 movel %d3,%d2 43618: d480 addl %d0,%d2 starting_address = (void *) sbrk(the_size); 4361a: 45f9 0004 0750 lea 40750 ,%a2 sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 43620: 4c40 2002 remul %d0,%d2,%d2 43624: 4c00 2800 mulsl %d0,%d2 starting_address = (void *) sbrk(the_size); 43628: 2f02 movel %d2,%sp@- 4362a: 4e92 jsr %a2@ if ( starting_address == (void*) -1 ) 4362c: 588f addql #4,%sp 4362e: 72ff moveq #-1,%d1 43630: b280 cmpl %d0,%d1 43632: 673e beqs 43672 return (void *) 0; if ( !_Protected_heap_Extend( 43634: 2f02 movel %d2,%sp@- 43636: 2f00 movel %d0,%sp@- 43638: 2f39 0005 f8aa movel 5f8aa ,%sp@- 4363e: 4eb9 0004 86e4 jsr 486e4 <_Protected_heap_Extend> 43644: 4fef 000c lea %sp@(12),%sp 43648: 4a00 tstb %d0 4364a: 6732 beqs 4367e 4364c: 42a7 clrl %sp@- sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); 4364e: d5b9 0006 11b4 addl %d2,611b4 43654: 42a7 clrl %sp@- 43656: 2f03 movel %d3,%sp@- 43658: 2f39 0005 f8aa movel 5f8aa ,%sp@- 4365e: 4eb9 0004 86a4 jsr 486a4 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; 43664: 4fef 0010 lea %sp@(16),%sp } 43668: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4366e: 4e5e unlk %fp 43670: 4e75 rts the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); if ( starting_address == (void*) -1 ) return (void *) 0; 43672: 4280 clrl %d0 MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 43674: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4367a: 4e5e unlk %fp 4367c: 4e75 rts if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 4367e: 4482 negl %d2 43680: 2f02 movel %d2,%sp@- 43682: 4e92 jsr %a2@ errno = ENOMEM; 43684: 4eb9 0004 f2a8 jsr 4f2a8 <__errno> return (void *) 0; 4368a: 588f addql #4,%sp return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); errno = ENOMEM; 4368c: 720c moveq #12,%d1 4368e: 2040 moveal %d0,%a0 return (void *) 0; 43690: 4280 clrl %d0 MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 43692: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); errno = ENOMEM; 43698: 2081 movel %d1,%a0@ MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 4369a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004369e : void *malloc_sbrk_initialize( void *starting_address, size_t length ) { 4369e: 4e56 0000 linkw %fp,#0 436a2: 222e 000c movel %fp@(12),%d1 436a6: 202e 0008 movel %fp@(8),%d0 uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; 436aa: 23c1 0006 11e0 movel %d1,611e0 * If the starting address is 0 then we are to attempt to * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { 436b0: 4a80 tstl %d0 436b2: 6704 beqs 436b8 } starting_address = (void *)uaddress; } return starting_address; } 436b4: 4e5e unlk %fp 436b6: 4e75 rts * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { uaddress = (uintptr_t)sbrk(length); 436b8: 2f01 movel %d1,%sp@- 436ba: 4eb9 0004 0750 jsr 40750 if (uaddress == (uintptr_t) -1) { 436c0: 588f addql #4,%sp 436c2: 72ff moveq #-1,%d1 436c4: b280 cmpl %d0,%d1 436c6: 6710 beqs 436d8 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 436c8: 7203 moveq #3,%d1 <== NOT EXECUTED 436ca: c280 andl %d0,%d1 <== NOT EXECUTED 436cc: 67e6 beqs 436b4 <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 436ce: 5880 addql #4,%d0 <== NOT EXECUTED 436d0: 72fc moveq #-4,%d1 <== NOT EXECUTED } starting_address = (void *)uaddress; } return starting_address; } 436d2: 4e5e unlk %fp <== NOT EXECUTED /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 436d4: c081 andl %d1,%d0 <== NOT EXECUTED } starting_address = (void *)uaddress; } return starting_address; } 436d6: 4e75 rts <== NOT EXECUTED if (!starting_address) { uaddress = (uintptr_t)sbrk(length); if (uaddress == (uintptr_t) -1) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 436d8: 4878 001a pea 1a 436dc: 4eb9 0004 7224 jsr 47224 ... =============================================================================== 0004d9b6 : */ void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4d9b6: 4e56 ffec linkw %fp,#-20 4d9ba: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d9be: 286e 0008 moveal %fp@(8),%a4 4d9c2: 47f9 0004 d99c lea 4d99c ,%a3 4d9c8: 262e 000c movel %fp@(12),%d3 IMFS_assert( block_table ); /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 4d9cc: 2454 moveal %a4@,%a2 for ( i=0 ; i<== NEVER TAKEN 4d9d0: 4282 clrl %d2 if ( b[i] ) { 4d9d2: 201a movel %a2@+,%d0 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); 4d9da: 2f00 movel %d0,%sp@- 4d9dc: 4e93 jsr %a3@ b[i] = 0; 4d9de: 588f addql #4,%sp 4d9e0: 42aa fffc clrl %a2@(-4) /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 4d9e8: 2454 moveal %a4@,%a2 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 4d9ea: 2f0a movel %a2,%sp@- 4d9ec: 4e93 jsr %a3@ *block_table = 0; 4d9ee: 588f addql #4,%sp 4d9f0: 4294 clrl %a4@ } 4d9f2: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4d9f8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004df96 : { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { 4df96: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4df98: 4e56 ffe8 linkw %fp,#-24 4df9c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4dfa0: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4dfa4: 266a 0018 moveal %a2@(24),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 4dfa8: b0ab 0048 cmpl %a3@(72),%d0 4dfac: 673a beqs 4dfe8 if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4dfae: 2f2a 0010 movel %a2@(16),%sp@- 4dfb2: 2f2a 000c movel %a2@(12),%sp@- 4dfb6: 2f0b movel %a3,%sp@- 4dfb8: 4eb9 0004 db3a jsr 4db3a 4dfbe: 4fef 000c lea %sp@(12),%sp 4dfc2: 4a80 tstl %d0 4dfc4: 6652 bnes 4e018 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 4dfc6: 202b 004c movel %a3@(76),%d0 4dfca: 222b 0050 movel %a3@(80),%d1 4dfce: 2540 0004 movel %d0,%a2@(4) 4dfd2: 2541 0008 movel %d1,%a2@(8) 4dfd6: 202a 000c movel %a2@(12),%d0 4dfda: 222a 0010 movel %a2@(16),%d1 } return iop->offset; } 4dfde: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4dfe4: 4e5e unlk %fp 4dfe6: 4e75 rts IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 4dfe8: 202a 000c movel %a2@(12),%d0 4dfec: 222a 0010 movel %a2@(16),%d1 4dff0: 242b 004c movel %a3@(76),%d2 4dff4: 262b 0050 movel %a3@(80),%d3 4dff8: 2800 movel %d0,%d4 4dffa: 2a01 movel %d1,%d5 4dffc: 9a83 subl %d3,%d5 4dffe: 9982 subxl %d2,%d4 4e000: 6fdc bles 4dfde <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; 4e002: 2002 movel %d2,%d0 <== NOT EXECUTED 4e004: 2203 movel %d3,%d1 <== NOT EXECUTED 4e006: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 4e00a: 2543 0010 movel %d3,%a2@(16) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 4e00e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4e014: 4e5e unlk %fp <== NOT EXECUTED 4e016: 4e75 rts <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 4e018: 4eb9 0004 f098 jsr 4f098 <__errno> 4e01e: 7a1c moveq #28,%d5 4e020: 2040 moveal %d0,%a0 4e022: 2085 movel %d5,%a0@ iop->size = the_jnode->info.file.size; } return iop->offset; } 4e024: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 4e02a: 70ff moveq #-1,%d0 4e02c: 72ff moveq #-1,%d1 iop->size = the_jnode->info.file.size; } return iop->offset; } 4e02e: 4e5e unlk %fp ... =============================================================================== 0004de5e : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4de5e: 4e56 fff0 linkw %fp,#-16 4de62: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4de66: 246e 0008 moveal %fp@(8),%a2 the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4de6a: 202a 0014 movel %a2@(20),%d0 4de6e: 2200 movel %d0,%d1 4de70: 0281 0000 0204 andil #516,%d1 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4de76: 266a 0018 moveal %a2@(24),%a3 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4de7a: 6708 beqs 4de84 && (the_jnode->type == IMFS_LINEAR_FILE)) { 4de7c: 7206 moveq #6,%d1 4de7e: b2ab 0048 cmpl %a3@(72),%d1 4de82: 6732 beqs 4deb6 <== NEVER TAKEN the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4de84: 206b 004c moveal %a3@(76),%a0 4de88: 226b 0050 moveal %a3@(80),%a1 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4de8c: 0800 0009 btst #9,%d0 4de90: 6710 beqs 4dea2 iop->offset = the_jnode->info.file.size; 4de92: 2548 000c movel %a0,%a2@(12) 4de96: 2549 0010 movel %a1,%a2@(16) 4de9a: 206b 004c moveal %a3@(76),%a0 4de9e: 226b 0050 moveal %a3@(80),%a1 iop->size = the_jnode->info.file.size; return 0; 4dea2: 4280 clrl %d0 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 4dea4: 2548 0004 movel %a0,%a2@(4) 4dea8: 2549 0008 movel %a1,%a2@(8) return 0; } 4deac: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4deb2: 4e5e unlk %fp 4deb4: 4e75 rts /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 4deb6: 202b 0050 movel %a3@(80),%d0 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4deba: 4282 clrl %d2 <== NOT EXECUTED 4debc: 4283 clrl %d3 <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; 4debe: 222b 0054 movel %a3@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4dec2: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED 4dec6: 2743 0050 movel %d3,%a3@(80) <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 4deca: 7605 moveq #5,%d3 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 4decc: 42ab 0054 clrl %a3@(84) <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 4ded0: 2743 0048 movel %d3,%a3@(72) <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 4ded4: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4ded8: 42ab 005c clrl %a3@(92) <== NOT EXECUTED if ((count != 0) 4dedc: 4a80 tstl %d0 <== NOT EXECUTED 4dede: 6610 bnes 4def0 <== NOT EXECUTED 4dee0: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4dee4: 91c8 subal %a0,%a0 <== NOT EXECUTED 4dee6: 93c9 subal %a1,%a1 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4dee8: 0800 0009 btst #9,%d0 <== NOT EXECUTED 4deec: 67b4 beqs 4dea2 <== NOT EXECUTED 4deee: 60a2 bras 4de92 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4def0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4def2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4def4: 42a7 clrl %sp@- <== NOT EXECUTED 4def6: 42a7 clrl %sp@- <== NOT EXECUTED 4def8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4defa: 4eb9 0004 dc6c jsr 4dc6c <== NOT EXECUTED 4df00: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4df04: 72ff moveq #-1,%d1 <== NOT EXECUTED 4df06: b280 cmpl %d0,%d1 <== NOT EXECUTED 4df08: 6710 beqs 4df1a <== NOT EXECUTED 4df0a: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4df0e: 206b 004c moveal %a3@(76),%a0 <== NOT EXECUTED 4df12: 226b 0050 moveal %a3@(80),%a1 <== NOT EXECUTED 4df16: 6000 ff74 braw 4de8c <== NOT EXECUTED return -1; 4df1a: 70ff moveq #-1,%d0 <== NOT EXECUTED if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; return 0; } 4df1c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4df22: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000436f0 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 436f0: 4e56 ffd4 linkw %fp,#-44 436f4: 48d7 001c moveml %d2-%d4,%sp@ 436f8: 262e 000c movel %fp@(12),%d3 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 436fc: 2003 movel %d3,%d0 436fe: 0280 0000 f000 andil #61440,%d0 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 43704: 282e 0008 movel %fp@(8),%d4 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 43708: 0c80 0000 4000 cmpil #16384,%d0 4370e: 673a beqs 4374a 43710: 6328 blss 4373a 43712: 0c80 0000 6000 cmpil #24576,%d0 43718: 6730 beqs 4374a 4371a: 0c80 0000 8000 cmpil #32768,%d0 43720: 6728 beqs 4374a <== ALWAYS TAKEN case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43722: 4eb9 0004 f098 jsr 4f098 <__errno> 43728: 7216 moveq #22,%d1 4372a: 2040 moveal %d0,%a0 4372c: 70ff moveq #-1,%d0 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 4372e: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43734: 2081 movel %d1,%a0@ result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 43736: 4e5e unlk %fp 43738: 4e75 rts int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 4373a: 0c80 0000 1000 cmpil #4096,%d0 43740: 6708 beqs 4374a 43742: 0c80 0000 2000 cmpil #8192,%d0 43748: 66d8 bnes 43722 break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 4374a: 240e movel %fp,%d2 4374c: 0682 ffff ffe4 addil #-28,%d2 43752: 2f02 movel %d2,%sp@- 43754: 486e fff8 pea %fp@(-8) 43758: 2f04 movel %d4,%sp@- 4375a: 4eb9 0004 41b0 jsr 441b0 result = (*temp_loc.ops->evalformake_h)( 43760: 486e fffc pea %fp@(-4) 43764: d8ae fff8 addl %fp@(-8),%d4 43768: 2f02 movel %d2,%sp@- 4376a: 206e fff0 moveal %fp@(-16),%a0 4376e: 2f04 movel %d4,%sp@- 43770: 2068 0004 moveal %a0@(4),%a0 43774: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 43776: 4fef 0018 lea %sp@(24),%sp 4377a: 4a80 tstl %d0 4377c: 6638 bnes 437b6 return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 4377e: 2f02 movel %d2,%sp@- 43780: 2f2e 0014 movel %fp@(20),%sp@- 43784: 2f2e 0010 movel %fp@(16),%sp@- 43788: 206e fff0 moveal %fp@(-16),%a0 4378c: 2f03 movel %d3,%sp@- 4378e: 2f2e fffc movel %fp@(-4),%sp@- 43792: 2068 0014 moveal %a0@(20),%a0 43796: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 43798: 2f02 movel %d2,%sp@- 4379a: 2d40 ffe0 movel %d0,%fp@(-32) 4379e: 4eb9 0004 32c8 jsr 432c8 return result; 437a4: 202e ffe0 movel %fp@(-32),%d0 437a8: 4fef 0018 lea %sp@(24),%sp } 437ac: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 437b2: 4e5e unlk %fp 437b4: 4e75 rts &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) return -1; 437b6: 70ff moveq #-1,%d0 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 437b8: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 437be: 4e5e unlk %fp ... =============================================================================== 00043858 : /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 43858: 7001 moveq #1,%d0 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 4385a: 4e56 ffb4 linkw %fp,#-76 4385e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 43862: 282e 0008 movel %fp@(8),%d4 43866: 242e 000c movel %fp@(12),%d2 4386a: 262e 0010 movel %fp@(16),%d3 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 4386e: b0ae 0014 cmpl %fp@(20),%d0 43872: 6500 022a bcsw 43a9e rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 43876: 2f03 movel %d3,%sp@- 43878: 4eb9 0004 bd84 jsr 4bd84 if ( !mount_h ) 4387e: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 43880: 2d40 ffe4 movel %d0,%fp@(-28) if ( !mount_h ) 43884: 6700 0218 beqw 43a9e { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 43888: 4a82 tstl %d2 4388a: 56c7 sne %d7 4388c: 4487 negl %d7 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 4388e: 4a07 tstb %d7 43890: 6700 01ee beqw 43a80 * 4) The mount point exists with the proper permissions to allow mounting * 5) The selected mount point already has a file system mounted to it * */ int mount( 43894: 2f02 movel %d2,%sp@- 43896: 45f9 0005 0404 lea 50404 ,%a2 4389c: 2d42 ffdc movel %d2,%fp@(-36) 438a0: 4e92 jsr %a2@ 438a2: 588f addql #4,%sp 438a4: 2a40 moveal %d0,%a5 438a6: 528d addql #1,%a5 438a8: 2d40 ffe0 movel %d0,%fp@(-32) const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 438ac: 2f03 movel %d3,%sp@- 438ae: 4e92 jsr %a2@ 438b0: 588f addql #4,%sp 438b2: 2840 moveal %d0,%a4 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 438b4: 4a84 tstl %d4 438b6: 6700 01c2 beqw 43a7a 438ba: 2f04 movel %d4,%sp@- 438bc: 4eb9 0005 0404 jsr 50404 438c2: 588f addql #4,%sp 438c4: 2640 moveal %d0,%a3 438c6: 528b addql #1,%a3 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 438c8: 41f4 d875 lea %a4@(00000075,%a5:l),%a0 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 438cc: 4870 b800 pea %a0@(00000000,%a3:l) 438d0: 4878 0001 pea 1 438d4: 4eb9 0004 2ec8 jsr 42ec8 if ( mt_entry != NULL ) { 438da: 508f addql #8,%sp size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 438dc: 2440 moveal %d0,%a2 if ( mt_entry != NULL ) { 438de: 4a80 tstl %d0 438e0: 6700 0180 beqw 43a62 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 438e4: 200c movel %a4,%d0 438e6: 5280 addql #1,%d0 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); 438e8: 2c0a movel %a2,%d6 438ea: 0686 0000 0074 addil #116,%d6 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; 438f0: 2a06 movel %d6,%d5 438f2: da80 addl %d0,%d5 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; 438f4: 41f3 5800 lea %a3@(00000000,%d5:l),%a0 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); 438f8: 49f9 0004 f8b8 lea 4f8b8 ,%a4 438fe: 2f00 movel %d0,%sp@- 43900: 2f03 movel %d3,%sp@- mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; 43902: 2d48 ffe8 movel %a0,%fp@(-24) rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); 43906: 2f06 movel %d6,%sp@- 43908: 4e94 jsr %a4@ mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 4390a: 2f0b movel %a3,%sp@- 4390c: 2f04 movel %d4,%sp@- if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; 4390e: 2546 006c movel %d6,%a2@(108) str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 43912: 2f05 movel %d5,%sp@- 43914: 4e94 jsr %a4@ mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); 43916: 2f0d movel %a5,%sp@- 43918: 2f2e ffdc movel %fp@(-36),%sp@- memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; 4391c: 2545 0070 movel %d5,%a2@(112) str += source_size; memcpy( str, target, target_size ); 43920: 2f2e ffe8 movel %fp@(-24),%sp@- 43924: 4e94 jsr %a4@ mt_entry->target = str; 43926: 222e ffe8 movel %fp@(-24),%d1 if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 4392a: 7005 moveq #5,%d0 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 4392c: 4fef 0024 lea %sp@(36),%sp ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 43930: 206e 0014 moveal %fp@(20),%a0 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; 43934: 2541 0068 movel %d1,%a2@(104) if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 43938: 223c 0000 0080 movel #128,%d1 4393e: 2540 0038 movel %d0,%a2@(56) 43942: 103c 0007 moveb #7,%d0 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 43946: 2548 0030 movel %a0,%a2@(48) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 4394a: 307c 0400 moveaw #1024,%a0 4394e: 2541 003c movel %d1,%a2@(60) 43952: 123c ffff moveb #-1,%d1 43956: 2540 0040 movel %d0,%a2@(64) 4395a: 103c 0001 moveb #1,%d0 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 4395e: 254a 002c movel %a2,%a2@(44) mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 43962: 2541 0044 movel %d1,%a2@(68) 43966: 2541 0048 movel %d1,%a2@(72) 4396a: 2548 004c movel %a0,%a2@(76) 4396e: 42aa 0050 clrl %a2@(80) 43972: 42aa 0054 clrl %a2@(84) 43976: 2540 0058 movel %d0,%a2@(88) 4397a: 42aa 005c clrl %a2@(92) 4397e: 42aa 0060 clrl %a2@(96) 43982: 42aa 0064 clrl %a2@(100) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 43986: 4a07 tstb %d7 43988: 6632 bnes 439bc } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 4398a: 203c 0005 f7b8 movel #391096,%d0 43990: b0b9 0005 f7b4 cmpl 5f7b4 ,%d0 43996: 6700 0090 beqw 43a28 errno = EINVAL; 4399a: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 439a0: 2040 moveal %d0,%a0 <== NOT EXECUTED 439a2: 7016 moveq #22,%d0 <== NOT EXECUTED 439a4: 2080 movel %d0,%a0@ <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 439a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 439a8: 4eb9 0004 32dc jsr 432dc <== NOT EXECUTED 439ae: 588f addql #4,%sp <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 439b0: 70ff moveq #-1,%d0 <== NOT EXECUTED } 439b2: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 <== NOT EXECUTED 439b8: 4e5e unlk %fp <== NOT EXECUTED 439ba: 4e75 rts <== NOT EXECUTED * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 439bc: 4878 0001 pea 1 439c0: 260e movel %fp,%d3 439c2: 0683 ffff ffec addil #-20,%d3 439c8: 2f03 movel %d3,%sp@- 439ca: 4878 0007 pea 7 439ce: 2f2e ffe0 movel %fp@(-32),%sp@- 439d2: 2f02 movel %d2,%sp@- 439d4: 4eb9 0004 31e4 jsr 431e4 439da: 4fef 0014 lea %sp@(20),%sp 439de: 72ff moveq #-1,%d1 439e0: b280 cmpl %d0,%d1 439e2: 67c2 beqs 439a6 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 439e4: 206e fff8 moveal %fp@(-8),%a0 439e8: 2f03 movel %d3,%sp@- 439ea: 2068 0010 moveal %a0@(16),%a0 439ee: 4e90 jsr %a0@ 439f0: 588f addql #4,%sp 439f2: 7201 moveq #1,%d1 439f4: b280 cmpl %d0,%d1 439f6: 6700 012c beqw 43b24 errno = ENOTDIR; 439fa: 4eb9 0004 f098 jsr 4f098 <__errno> 43a00: 7414 moveq #20,%d2 43a02: 2040 moveal %d0,%a0 43a04: 2082 movel %d2,%a0@ return 0; cleanup_and_bail: free( mt_entry ); 43a06: 2f0a movel %a2,%sp@- if ( has_target ) { if ( rtems_filesystem_evaluate_path( target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) goto cleanup_and_bail; loc_to_free = &loc; 43a08: 2403 movel %d3,%d2 return 0; cleanup_and_bail: free( mt_entry ); 43a0a: 4eb9 0004 32dc jsr 432dc 43a10: 588f addql #4,%sp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 43a12: 2f02 movel %d2,%sp@- 43a14: 4eb9 0004 32c8 jsr 432c8 43a1a: 588f addql #4,%sp return -1; 43a1c: 70ff moveq #-1,%d0 } 43a1e: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 43a24: 4e5e unlk %fp 43a26: 4e75 rts ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; 43a28: 4282 clrl %d2 * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 43a2a: 2f2e 0018 movel %fp@(24),%sp@- 43a2e: 206e ffe4 moveal %fp@(-28),%a0 43a32: 2f0a movel %a2,%sp@- 43a34: 4e90 jsr %a0@ 43a36: 508f addql #8,%sp 43a38: 4a80 tstl %d0 43a3a: 677a beqs 43ab6 /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 43a3c: 206e fff8 moveal %fp@(-8),%a0 43a40: 2f0a movel %a2,%sp@- 43a42: 2068 0028 moveal %a0@(40),%a0 43a46: 4e90 jsr %a0@ return 0; cleanup_and_bail: free( mt_entry ); 43a48: 2e8a movel %a2,%sp@ 43a4a: 4eb9 0004 32dc jsr 432dc if ( loc_to_free ) 43a50: 588f addql #4,%sp 43a52: 4a82 tstl %d2 43a54: 66bc bnes 43a12 <== ALWAYS TAKEN rtems_filesystem_freenode( loc_to_free ); return -1; 43a56: 70ff moveq #-1,%d0 <== NOT EXECUTED } 43a58: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43a5e: 4e5e unlk %fp <== NOT EXECUTED 43a60: 4e75 rts <== NOT EXECUTED target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 43a62: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 43a68: 760c moveq #12,%d3 <== NOT EXECUTED 43a6a: 2040 moveal %d0,%a0 <== NOT EXECUTED 43a6c: 70ff moveq #-1,%d0 <== NOT EXECUTED 43a6e: 2083 movel %d3,%a0@ <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 43a70: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43a76: 4e5e unlk %fp <== NOT EXECUTED 43a78: 4e75 rts <== NOT EXECUTED ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 43a7a: 97cb subal %a3,%a3 43a7c: 6000 fe4a braw 438c8 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 43a80: 7201 moveq #1,%d1 43a82: 41f9 0005 e268 lea 5e268 ,%a0 43a88: 3a7c 0002 moveaw #2,%a5 43a8c: 45f9 0005 0404 lea 50404 ,%a2 43a92: 2d41 ffe0 movel %d1,%fp@(-32) 43a96: 2d48 ffdc movel %a0,%fp@(-36) 43a9a: 6000 fe10 braw 438ac /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 43a9e: 4eb9 0004 f098 jsr 4f098 <__errno> 43aa4: 7816 moveq #22,%d4 43aa6: 2040 moveal %d0,%a0 43aa8: 70ff moveq #-1,%d0 43aaa: 2084 movel %d4,%a0@ if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 43aac: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 43ab2: 4e5e unlk %fp 43ab4: 4e75 rts rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 43ab6: 42a7 clrl %sp@- 43ab8: 42a7 clrl %sp@- 43aba: 2f39 0006 0efc movel 60efc ,%sp@- 43ac0: 4eb9 0004 6acc jsr 46acc 43ac6: 2f0a movel %a2,%sp@- 43ac8: 4879 0005 f7b4 pea 5f7b4 43ace: 4eb9 0004 7574 jsr 47574 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 43ad4: 2f39 0006 0efc movel 60efc ,%sp@- 43ada: 4eb9 0004 6c1c jsr 46c1c */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 43ae0: 4fef 0018 lea %sp@(24),%sp 43ae4: 4a07 tstb %d7 43ae6: 6630 bnes 43b18 rtems_filesystem_root = mt_entry->mt_fs_root; 43ae8: 2079 0005 f8d0 moveal 5f8d0 ,%a0 return 0; 43aee: 4280 clrl %d0 rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; 43af0: 216a 001c 0018 movel %a2@(28),%a0@(24) 43af6: 216a 0020 001c movel %a2@(32),%a0@(28) 43afc: 216a 0024 0020 movel %a2@(36),%a0@(32) 43b02: 216a 0028 0024 movel %a2@(40),%a0@(36) 43b08: 216a 002c 0028 movel %a2@(44),%a0@(40) if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 43b0e: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 43b14: 4e5e unlk %fp 43b16: 4e75 rts rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 43b18: 4280 clrl %d0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 43b1a: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 43b20: 4e5e unlk %fp 43b22: 4e75 rts /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 43b24: 2f2e ffec movel %fp@(-20),%sp@- 43b28: 487a fc9a pea %pc@(437c4 ) 43b2c: 4eb9 0004 37dc jsr 437dc 43b32: 508f addql #8,%sp 43b34: 4a00 tstb %d0 43b36: 671c beqs 43b54 errno = EBUSY; 43b38: 4eb9 0004 f098 jsr 4f098 <__errno> if ( has_target ) { if ( rtems_filesystem_evaluate_path( target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) goto cleanup_and_bail; loc_to_free = &loc; 43b3e: 2403 movel %d3,%d2 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; 43b40: 7210 moveq #16,%d1 43b42: 2040 moveal %d0,%a0 43b44: 2081 movel %d1,%a0@ return 0; cleanup_and_bail: free( mt_entry ); 43b46: 2f0a movel %a2,%sp@- 43b48: 4eb9 0004 32dc jsr 432dc 43b4e: 588f addql #4,%sp 43b50: 6000 fec0 braw 43a12 * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 43b54: 206e fff8 moveal %fp@(-8),%a0 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 43b58: 256e ffec 0008 movel %fp@(-20),%a2@(8) mt_entry->mt_point_node.handlers = loc.handlers; 43b5e: 256e fff4 0010 movel %fp@(-12),%a2@(16) mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 43b64: 256e fffc 0018 movel %fp@(-4),%a2@(24) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { 43b6a: 2f0a movel %a2,%sp@- 43b6c: 2268 0020 moveal %a0@(32),%a1 * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 43b70: 2548 0014 movel %a0,%a2@(20) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { 43b74: 4e91 jsr %a1@ 43b76: 588f addql #4,%sp 43b78: 4a80 tstl %d0 43b7a: 6600 fe8a bnew 43a06 if ( has_target ) { if ( rtems_filesystem_evaluate_path( target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) goto cleanup_and_bail; loc_to_free = &loc; 43b7e: 2403 movel %d3,%d2 43b80: 6000 fea8 braw 43a2a =============================================================================== 00043d08 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 43d08: 4e56 ffec linkw %fp,#-20 43d0c: 48d7 007c moveml %d2-%d6,%sp@ 43d10: 262e 0008 movel %fp@(8),%d3 43d14: 242e 000c movel %fp@(12),%d2 43d18: 282e 0010 movel %fp@(16),%d4 43d1c: 2a2e 0014 movel %fp@(20),%d5 43d20: 2c2e 0018 movel %fp@(24),%d6 int rv = -1; if (target != NULL) { 43d24: 4a82 tstl %d2 43d26: 673e beqs 43d66 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 43d28: 4878 01ff pea 1ff 43d2c: 2f02 movel %d2,%sp@- 43d2e: 4eb9 0004 476c jsr 4476c if (rv == 0) { 43d34: 508f addql #8,%sp 43d36: 4a80 tstl %d0 43d38: 670a beqs 43d44 <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } 43d3a: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 <== NOT EXECUTED 43d40: 4e5e unlk %fp <== NOT EXECUTED 43d42: 4e75 rts <== NOT EXECUTED int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 43d44: 2d46 0018 movel %d6,%fp@(24) 43d48: 2d45 0014 movel %d5,%fp@(20) 43d4c: 2d44 0010 movel %d4,%fp@(16) 43d50: 2d42 000c movel %d2,%fp@(12) 43d54: 2d43 0008 movel %d3,%fp@(8) } else { errno = EINVAL; } return rv; } 43d58: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 43d5e: 4e5e unlk %fp int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 43d60: 4ef9 0004 3e14 jmp 43e14 options, data ); } } else { errno = EINVAL; 43d66: 4eb9 0004 f5cc jsr 4f5cc <__errno> 43d6c: 7216 moveq #22,%d1 43d6e: 2040 moveal %d0,%a0 const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 43d70: 70ff moveq #-1,%d0 } else { errno = EINVAL; } return rv; } 43d72: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 options, data ); } } else { errno = EINVAL; 43d78: 2081 movel %d1,%a0@ } return rv; } 43d7a: 4e5e unlk %fp ... =============================================================================== 0005897c : fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 5897c: 72ff moveq #-1,%d1 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 5897e: 4e56 ff3c linkw %fp,#-196 ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; time_t time_ret = 0; uint16_t time_val = 0; 58982: 4240 clrw %d0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 58984: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 58988: 266e 0008 moveal %fp@(8),%a3 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 5898c: 2a0e movel %fp,%d5 5898e: 0685 ffff ff68 addil #-152,%d5 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 58994: 45ee ffa8 lea %fp@(-88),%a2 mode_t mode, const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 58998: 206b 0010 moveal %a3@(16),%a0 5899c: 2a68 0034 moveal %a0@(52),%a5 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 589a0: 4878 0040 pea 40 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 589a4: 242e 0010 movel %fp@(16),%d2 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 589a8: 42a7 clrl %sp@- msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 589aa: 282e 0014 movel %fp@(20),%d4 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 589ae: 2f05 movel %d5,%sp@- const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 589b0: 2d53 ff64 movel %a3@,%fp@(-156) msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 589b4: 262e 000c movel %fp@(12),%d3 589b8: 2d41 fff0 movel %d1,%fp@(-16) ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; time_t time_ret = 0; uint16_t time_val = 0; 589bc: 3d40 fffc movew %d0,%fp@(-4) dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 589c0: 2d41 fff4 movel %d1,%fp@(-12) uint16_t date = 0; 589c4: 3d40 fffe movew %d0,%fp@(-2) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 589c8: 42ae fff8 clrl %fp@(-8) name_type = msdos_long_to_short (name, name_len, MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 589cc: 4207 clrb %d7 static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 589ce: 42ae ffe8 clrl %fp@(-24) dir_pos->sname.ofs = 0; 589d2: 42ae ffec clrl %fp@(-20) uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 589d6: 4292 clrl %a2@ 589d8: 42ae ffac clrl %fp@(-84) 589dc: 42ae ffb0 clrl %fp@(-80) 589e0: 42ae ffb4 clrl %fp@(-76) 589e4: 42ae ffb8 clrl %fp@(-72) 589e8: 42ae ffbc clrl %fp@(-68) 589ec: 42ae ffc0 clrl %fp@(-64) 589f0: 42ae ffc4 clrl %fp@(-60) memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 589f4: 4eb9 0005 e310 jsr 5e310 name_type = msdos_long_to_short (name, name_len, 589fa: 4878 000b pea b 589fe: 2f0a movel %a2,%sp@- 58a00: 2f04 movel %d4,%sp@- 58a02: 2f02 movel %d2,%sp@- 58a04: 4eb9 0005 9b40 jsr 59b40 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 58a0a: 1d47 ffb4 moveb %d7,%fp@(-76) fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); name_type = msdos_long_to_short (name, name_len, 58a0e: 2c00 movel %d0,%d6 /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; /* set up last write date and time */ time_ret = time(NULL); 58a10: 42a7 clrl %sp@- 58a12: 4eb9 0006 1748 jsr 61748