=============================================================================== 00048d94 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 48d94: 7206 moveq #6,%d1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 48d96: 4e56 0000 linkw %fp,#0 48d9a: 206e 0008 moveal %fp@(8),%a0 48d9e: 2f0a movel %a2,%sp@- IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 48da0: 2450 moveal %a0@,%a2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 48da2: 2268 0010 moveal %a0@(16),%a1 switch( node->type ) { 48da6: 202a 0048 movel %a2@(72),%d0 48daa: 5380 subql #1,%d0 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 48dac: 2269 0034 moveal %a1@(52),%a1 switch( node->type ) { 48db0: b280 cmpl %d0,%d1 48db2: 6546 bcss 48dfa <== NEVER TAKEN 48db4: 303b 0a08 movew %pc@(48dbe ,%d0:l:2),%d0 48db8: 48c0 extl %d0 48dba: 4efb 0802 jmp %pc@(48dbe ,%d0:l) 48dbe: 000e .short 0x000e <== NOT EXECUTED 48dc0: 0016 .short 0x0016 <== NOT EXECUTED 48dc2: 0022 .short 0x0022 <== NOT EXECUTED 48dc4: 0022 .short 0x0022 <== NOT EXECUTED 48dc6: 002e .short 0x002e <== NOT EXECUTED 48dc8: 002e .short 0x002e <== NOT EXECUTED 48dca: 0036 .short 0x0036 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 48dcc: 2169 000c 0008 movel %a1@(12),%a0@(8) break; 48dd2: 6026 bras 48dfa case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 48dd4: 203c 0005 b154 movel #373076,%d0 48dda: 2140 0008 movel %d0,%a0@(8) break; 48dde: 601a bras 48dfa case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 48de0: 223c 0005 b1c4 movel #373188,%d1 48de6: 2141 0008 movel %d1,%a0@(8) break; 48dea: 600e bras 48dfa case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 48dec: 2169 0008 0008 movel %a1@(8),%a0@(8) break; 48df2: 6006 bras 48dfa case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 48df4: 2169 0010 0008 movel %a1@(16),%a0@(8) break; } return 0; } 48dfa: 245f moveal %sp@+,%a2 48dfc: 4280 clrl %d0 48dfe: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048c44 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 48c44: 4e56 ffec linkw %fp,#-20 48c48: 206e 0008 moveal %fp@(8),%a0 48c4c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 48c50: 242e 000c movel %fp@(12),%d2 48c54: 246e 0018 moveal %fp@(24),%a2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 48c58: 4a88 tstl %a0 48c5a: 6700 00ee beqw 48d4a return NULL; parent = parent_loc->node_access; 48c5e: 2850 moveal %a0@,%a4 fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 48c60: 7007 moveq #7,%d0 */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 48c62: 2068 0010 moveal %a0@(16),%a0 48c66: 2668 0034 moveal %a0@(52),%a3 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 48c6a: b082 cmpl %d2,%d0 48c6c: 660e bnes 48c7c 48c6e: 223c 0005 b0e4 movel #372964,%d1 48c74: b2ab 0010 cmpl %a3@(16),%d1 48c78: 6700 00d0 beqw 48d4a return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 48c7c: 2079 0005 be64 moveal 5be64 ,%a0 48c82: 2028 002c movel %a0@(44),%d0 48c86: 4680 notl %d0 48c88: c0ae 0014 andl %fp@(20),%d0 48c8c: 2f00 movel %d0,%sp@- 48c8e: 2f2e 0010 movel %fp@(16),%sp@- 48c92: 2f02 movel %d2,%sp@- 48c94: 4eb9 0004 8bd0 jsr 48bd0 if ( !node ) 48c9a: 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 ); 48c9e: 2a40 moveal %d0,%a5 if ( !node ) 48ca0: 4a80 tstl %d0 48ca2: 6700 00a8 beqw 48d4c return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 48ca6: 7001 moveq #1,%d0 48ca8: b082 cmpl %d2,%d0 48caa: 6616 bnes 48cc2 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 ); 48cac: 41ed 0050 lea %a5@(80),%a0 48cb0: 2b48 004c movel %a0,%a5@(76) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 48cb4: 41ed 004c lea %a5@(76),%a0 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 48cb8: 42ad 0050 clrl %a5@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 48cbc: 2b48 0054 movel %a0,%a5@(84) 48cc0: 6066 bras 48d28 rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 48cc2: 7003 moveq #3,%d0 48cc4: b082 cmpl %d2,%d0 48cc6: 6706 beqs 48cce node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 48cc8: 7204 moveq #4,%d1 48cca: b282 cmpl %d2,%d1 48ccc: 6606 bnes 48cd4 node->info.sym_link.name = info->sym_link.name; 48cce: 2b52 004c movel %a2@,%a5@(76) 48cd2: 6054 bras 48d28 } else if ( type == IMFS_DEVICE ) { 48cd4: 7002 moveq #2,%d0 48cd6: b082 cmpl %d2,%d0 48cd8: 660c bnes 48ce6 node->info.device.major = info->device.major; 48cda: 2b52 004c movel %a2@,%a5@(76) node->info.device.minor = info->device.minor; 48cde: 2b6a 0004 0050 movel %a2@(4),%a5@(80) 48ce4: 6042 bras 48d28 } else if ( type == IMFS_LINEAR_FILE ) { 48ce6: 7206 moveq #6,%d1 48ce8: b282 cmpl %d2,%d1 48cea: 6612 bnes 48cfe node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 48cec: 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; 48cf0: 4280 clrl %d0 48cf2: 4281 clrl %d1 48cf4: 2b40 004c movel %d0,%a5@(76) 48cf8: 2b41 0050 movel %d1,%a5@(80) 48cfc: 602a bras 48d28 node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { 48cfe: 7205 moveq #5,%d1 48d00: b282 cmpl %d2,%d1 48d02: 661a bnes 48d1e node->info.file.size = 0; node->info.file.indirect = 0; 48d04: 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; 48d08: 4280 clrl %d0 48d0a: 4281 clrl %d1 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 48d0c: 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; 48d10: 2b40 004c movel %d0,%a5@(76) 48d14: 2b41 0050 movel %d1,%a5@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 48d18: 42ad 005c clrl %a5@(92) 48d1c: 600a bras 48d28 } else if ( type == IMFS_FIFO ) { 48d1e: 7207 moveq #7,%d1 48d20: b282 cmpl %d2,%d1 48d22: 6604 bnes 48d28 <== NEVER TAKEN node->info.fifo.pipe = NULL; 48d24: 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; 48d28: 202b 0004 movel %a3@(4),%d0 48d2c: 5280 addql #1,%d0 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 48d2e: 2b4c 0008 movel %a4,%a5@(8) node->st_ino = ++fs_info->ino_count; 48d32: 2740 0004 movel %d0,%a3@(4) 48d36: 2b40 0034 movel %d0,%a5@(52) 48d3a: 2f0d movel %a5,%sp@- 48d3c: 486c 004c pea %a4@(76) 48d40: 4eb9 0004 61b0 jsr 461b0 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 48d46: 508f addql #8,%sp 48d48: 6002 bras 48d4c /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 48d4a: 9bcd subal %a5,%a5 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 48d4c: 200d movel %a5,%d0 48d4e: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 48d54: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048d58 : return node; } IMFS_jnode_t *IMFS_create_root_node(void) { 48d58: 4e56 0000 linkw %fp,#0 IMFS_jnode_t *node; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) ); 48d5c: 4878 41ed pea 41ed 48d60: 4879 0005 af46 pea 5af46 48d66: 4878 0001 pea 1 48d6a: 4eb9 0004 8bd0 jsr 48bd0 if ( !node ) 48d70: 4fef 000c lea %sp@(12),%sp 48d74: 4a80 tstl %d0 48d76: 6716 beqs 48d8e <== NEVER TAKEN Chain_Node *tail = _Chain_Tail( the_chain ); 48d78: 2240 moveal %d0,%a1 48d7a: 2040 moveal %d0,%a0 48d7c: 43e9 0050 lea %a1@(80),%a1 48d80: 2149 004c movel %a1,%a0@(76) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 48d84: 5989 subql #4,%a1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 48d86: 42a8 0050 clrl %a0@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 48d8a: 2149 0054 movel %a1,%a0@(84) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 48d8e: 4e5e unlk %fp ... =============================================================================== 00048e80 : char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 48e80: 70f8 moveq #-8,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48e82: 4e56 ff9c linkw %fp,#-100 48e86: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 48e8a: 282e 0010 movel %fp@(16),%d4 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 48e8e: c084 andl %d4,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48e90: 2a6e 0008 moveal %fp@(8),%a5 48e94: 286e 000c moveal %fp@(12),%a4 48e98: 246e 0014 moveal %fp@(20),%a2 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 48e9c: 670e beqs 48eac <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); 48e9e: 4eb9 0004 bca0 jsr 4bca0 <__errno> <== NOT EXECUTED 48ea4: 7c05 moveq #5,%d6 <== NOT EXECUTED 48ea6: 2040 moveal %d0,%a0 <== NOT EXECUTED 48ea8: 2086 movel %d6,%a0@ <== NOT EXECUTED 48eaa: 603e bras 48eea <== NOT EXECUTED * 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 ); 48eac: 2a0e movel %fp,%d5 size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; 48eae: 4282 clrl %d2 * 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 ); 48eb0: 0685 ffff ffc7 addil #-57,%d5 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 48eb6: 2e3c 0004 9438 movel #300088,%d7 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 48ebc: 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 ); 48ebe: 486e fffc pea %fp@(-4) 48ec2: 2f05 movel %d5,%sp@- 48ec4: 2f0c movel %a4,%sp@- 48ec6: 4875 2800 pea %a5@(00000000,%d2:l) 48eca: 4eb9 0004 94a4 jsr 494a4 pathnamelen -= len; 48ed0: 2c2e fffc movel %fp@(-4),%d6 * 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 ); 48ed4: 2600 movel %d0,%d3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 48ed6: 4fef 0010 lea %sp@(16),%sp 48eda: 4a92 tstl %a2@ 48edc: 6612 bnes 48ef0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOENT ); 48ede: 4eb9 0004 bca0 jsr 4bca0 <__errno> 48ee4: 7a02 moveq #2,%d5 48ee6: 2040 moveal %d0,%a0 48ee8: 2085 movel %d5,%a0@ 48eea: 76ff moveq #-1,%d3 48eec: 6000 017c braw 4906a /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 48ef0: 4a80 tstl %d0 48ef2: 671c beqs 48f10 if ( node->type == IMFS_DIRECTORY ) 48ef4: 7001 moveq #1,%d0 48ef6: b0ab 0048 cmpl %a3@(72),%d0 48efa: 6614 bnes 48f10 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 48efc: 4878 0001 pea 1 48f00: 2f0a movel %a2,%sp@- 48f02: 4eb9 0004 8e02 jsr 48e02 48f08: 508f addql #8,%sp 48f0a: 4a80 tstl %d0 48f0c: 6700 014a beqw 49058 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 48f10: 2652 moveal %a2@,%a3 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 48f12: 99c6 subal %d6,%a4 i += len; 48f14: d486 addl %d6,%d2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 48f16: 7003 moveq #3,%d0 48f18: b083 cmpl %d3,%d0 48f1a: 6742 beqs 48f5e 48f1c: 7204 moveq #4,%d1 48f1e: b283 cmpl %d3,%d1 48f20: 6700 00aa beqw 48fcc 48f24: 103c 0002 moveb #2,%d0 48f28: b083 cmpl %d3,%d0 48f2a: 6600 00b0 bnew 48fdc case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 48f2e: 2079 0005 be64 moveal 5be64 ,%a0 48f34: b7e8 0018 cmpal %a0@(24),%a3 48f38: 6784 beqs 48ebe /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 48f3a: 206a 0010 moveal %a2@(16),%a0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 48f3e: b7e8 001c cmpal %a0@(28),%a3 48f42: 6614 bnes 48f58 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 48f44: 4878 0014 pea 14 48f48: 260e movel %fp,%d3 48f4a: 4868 0008 pea %a0@(8) 48f4e: 0683 ffff ffe8 addil #-24,%d3 48f54: 6000 00b2 braw 49008 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 48f58: 266b 0008 moveal %a3@(8),%a3 48f5c: 6062 bras 48fc0 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 48f5e: 202b 0048 movel %a3@(72),%d0 48f62: 7203 moveq #3,%d1 48f64: b280 cmpl %d0,%d1 48f66: 6610 bnes 48f78 IMFS_evaluate_hard_link( pathloc, 0 ); 48f68: 42a7 clrl %sp@- 48f6a: 2f0a movel %a2,%sp@- 48f6c: 4eb9 0004 8e3a jsr 48e3a node = pathloc->node_access; 48f72: 2652 moveal %a2@,%a3 48f74: 508f addql #8,%sp 48f76: 601c bras 48f94 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 48f78: 7204 moveq #4,%d1 48f7a: b280 cmpl %d0,%d1 48f7c: 6616 bnes 48f94 result = IMFS_evaluate_sym_link( pathloc, 0 ); 48f7e: 42a7 clrl %sp@- 48f80: 2f0a movel %a2,%sp@- 48f82: 4eb9 0004 9076 jsr 49076 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 48f88: 2652 moveal %a2@,%a3 if ( result == -1 ) 48f8a: 508f addql #8,%sp 48f8c: 72ff moveq #-1,%d1 48f8e: b280 cmpl %d0,%d1 48f90: 6700 00d6 beqw 49068 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 48f94: 7001 moveq #1,%d0 48f96: b0ab 0048 cmpl %a3@(72),%d0 48f9a: 6710 beqs 48fac rtems_set_errno_and_return_minus_one( ENOTDIR ); 48f9c: 4eb9 0004 bca0 jsr 4bca0 <__errno> 48fa2: 7814 moveq #20,%d4 48fa4: 2040 moveal %d0,%a0 48fa6: 2084 movel %d4,%a0@ 48fa8: 6000 ff40 braw 48eea /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 48fac: 206b 0058 moveal %a3@(88),%a0 48fb0: 4a88 tstl %a0 48fb2: 6644 bnes 48ff8 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 48fb4: 2f05 movel %d5,%sp@- 48fb6: 2047 moveal %d7,%a0 48fb8: 2f0b movel %a3,%sp@- 48fba: 4e90 jsr %a0@ if ( !node ) 48fbc: 508f addql #8,%sp } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 48fbe: 2640 moveal %d0,%a3 if ( !node ) 48fc0: 4a8b tstl %a3 48fc2: 6700 ff1a beqw 48ede /* * Set the node access to the point we have found. */ pathloc->node_access = node; 48fc6: 248b movel %a3,%a2@ 48fc8: 6000 fef4 braw 48ebe case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 48fcc: 4eb9 0004 bca0 jsr 4bca0 <__errno> 48fd2: 765b moveq #91,%d3 48fd4: 2040 moveal %d0,%a0 48fd6: 2083 movel %d3,%a0@ 48fd8: 6000 ff10 braw 48eea /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 48fdc: 4a83 tstl %d3 48fde: 6708 beqs 48fe8 48fe0: 7004 moveq #4,%d0 48fe2: b083 cmpl %d3,%d0 48fe4: 6600 fed8 bnew 48ebe * 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 ) { 48fe8: 7201 moveq #1,%d1 48fea: b2ab 0048 cmpl %a3@(72),%d1 48fee: 664e bnes 4903e if ( node->info.directory.mt_fs != NULL ) { 48ff0: 206b 0058 moveal %a3@(88),%a0 48ff4: 4a88 tstl %a0 48ff6: 6746 beqs 4903e newloc = node->info.directory.mt_fs->mt_fs_root; 48ff8: 4878 0014 pea 14 48ffc: 260e movel %fp,%d3 48ffe: 0683 ffff ffe8 addil #-24,%d3 49004: 4868 001c pea %a0@(28) 49008: 2f03 movel %d3,%sp@- 4900a: 47f9 0004 c54c lea 4c54c ,%a3 49010: 4e93 jsr %a3@ *pathloc = newloc; 49012: 4878 0014 pea 14 49016: 2f03 movel %d3,%sp@- 49018: 2f0a movel %a2,%sp@- 4901a: 4e93 jsr %a3@ return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4901c: 226a 000c moveal %a2@(12),%a1 49020: 2f0a movel %a2,%sp@- 49022: 206e fffc moveal %fp@(-4),%a0 49026: 9488 subl %a0,%d2 49028: 2f04 movel %d4,%sp@- 4902a: 4874 8800 pea %a4@(00000000,%a0:l) 4902e: 4875 2800 pea %a5@(00000000,%d2:l) 49032: 2051 moveal %a1@,%a0 49034: 4e90 jsr %a0@ 49036: 4fef 0028 lea %sp@(40),%sp 4903a: 2600 movel %d0,%d3 4903c: 602c bras 4906a flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4903e: 2f0a movel %a2,%sp@- 49040: 4eb9 0004 8d94 jsr 48d94 49046: 2600 movel %d0,%d3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 49048: 2e84 movel %d4,%sp@ 4904a: 2f0a movel %a2,%sp@- 4904c: 4eb9 0004 8e02 jsr 48e02 49052: 508f addql #8,%sp 49054: 4a80 tstl %d0 49056: 6612 bnes 4906a rtems_set_errno_and_return_minus_one( EACCES ); 49058: 4eb9 0004 bca0 jsr 4bca0 <__errno> 4905e: 740d moveq #13,%d2 49060: 2040 moveal %d0,%a0 49062: 2082 movel %d2,%a0@ 49064: 6000 fe84 braw 48eea 49068: 2600 movel %d0,%d3 <== NOT EXECUTED return result; } 4906a: 2003 movel %d3,%d0 4906c: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 49072: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004918a : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4918a: 4e56 ff9c linkw %fp,#-100 4918e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 49192: 246e 000c moveal %fp@(12),%a2 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 49196: 2c0e movel %fp,%d6 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 49198: 4282 clrl %d2 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4919a: 0686 ffff ffc7 addil #-57,%d6 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 491a0: 2a3c 0004 90f2 movel #299250,%d5 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 491a6: 286e 0008 moveal %fp@(8),%a4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 491aa: 2652 moveal %a2@,%a3 /* * Get the path length. */ pathlen = strlen( path ); 491ac: 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 */ ) { 491ae: 2a6e 0010 moveal %fp@(16),%a5 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 491b2: 4eb9 0004 d0f8 jsr 4d0f8 491b8: 588f addql #4,%sp 491ba: 2800 movel %d0,%d4 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 491bc: 486e fffc pea %fp@(-4) 491c0: 2f06 movel %d6,%sp@- 491c2: 2f04 movel %d4,%sp@- 491c4: 4874 2800 pea %a4@(00000000,%d2:l) 491c8: 4eb9 0004 94a4 jsr 494a4 pathlen -= len; 491ce: 2e2e fffc movel %fp@(-4),%d7 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 491d2: 2600 movel %d0,%d3 pathlen -= len; 491d4: 9887 subl %d7,%d4 i += len; if ( !pathloc->node_access ) 491d6: 4fef 0010 lea %sp@(16),%sp 491da: 4a92 tstl %a2@ 491dc: 6700 0154 beqw 49332 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 491e0: 4a80 tstl %d0 491e2: 671c beqs 49200 if ( node->type == IMFS_DIRECTORY ) 491e4: 7001 moveq #1,%d0 491e6: b0ab 0048 cmpl %a3@(72),%d0 491ea: 6614 bnes 49200 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 491ec: 4878 0001 pea 1 491f0: 2f0a movel %a2,%sp@- 491f2: 4eb9 0004 8e02 jsr 48e02 491f8: 508f addql #8,%sp 491fa: 4a80 tstl %d0 491fc: 6700 017c beqw 4937a rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 49200: 2652 moveal %a2@,%a3 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 49202: d487 addl %d7,%d2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 49204: 7002 moveq #2,%d0 49206: b083 cmpl %d3,%d0 49208: 671a beqs 49224 4920a: 6508 bcss 49214 4920c: 4a83 tstl %d3 4920e: 6700 00e4 beqw 492f4 49212: 60a8 bras 491bc 49214: 7203 moveq #3,%d1 49216: b283 cmpl %d3,%d1 49218: 6740 beqs 4925a 4921a: 7004 moveq #4,%d0 4921c: b083 cmpl %d3,%d0 4921e: 669c bnes 491bc <== NEVER TAKEN 49220: 6000 00e2 braw 49304 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 49224: 2079 0005 be64 moveal 5be64 ,%a0 4922a: b7e8 0018 cmpal %a0@(24),%a3 4922e: 678c beqs 491bc /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 49230: 206a 0010 moveal %a2@(16),%a0 49234: b7e8 001c cmpal %a0@(28),%a3 49238: 6612 bnes 4924c if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 4923a: 4878 0014 pea 14 4923e: 260e movel %fp,%d3 49240: 4868 0008 pea %a0@(8) 49244: 0683 ffff ffe8 addil #-24,%d3 4924a: 605c bras 492a8 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 4924c: 266b 0008 moveal %a3@(8),%a3 49250: 4a8b tstl %a3 49252: 6600 009a bnew 492ee 49256: 6000 00da braw 49332 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4925a: 202b 0048 movel %a3@(72),%d0 4925e: 7203 moveq #3,%d1 49260: b280 cmpl %d0,%d1 49262: 6706 beqs 4926a result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 49264: 7204 moveq #4,%d1 49266: b280 cmpl %d0,%d1 49268: 6614 bnes 4927e result = IMFS_evaluate_link( pathloc, 0 ); 4926a: 42a7 clrl %sp@- 4926c: 2045 moveal %d5,%a0 4926e: 2f0a movel %a2,%sp@- 49270: 4e90 jsr %a0@ if ( result == -1 ) 49272: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 49274: 2600 movel %d0,%d3 if ( result == -1 ) 49276: 70ff moveq #-1,%d0 49278: b083 cmpl %d3,%d0 4927a: 6700 010c beqw 49388 return -1; } node = pathloc->node_access; 4927e: 2052 moveal %a2@,%a0 if ( !node ) 49280: 4a88 tstl %a0 49282: 6700 00d6 beqw 4935a /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 49286: 7001 moveq #1,%d0 49288: b0a8 0048 cmpl %a0@(72),%d0 4928c: 6600 00cc bnew 4935a /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 49290: 2268 0058 moveal %a0@(88),%a1 49294: 4a89 tstl %a1 49296: 6744 beqs 492dc newloc = node->info.directory.mt_fs->mt_fs_root; 49298: 4878 0014 pea 14 4929c: 260e movel %fp,%d3 4929e: 0683 ffff ffe8 addil #-24,%d3 492a4: 4869 001c pea %a1@(28) 492a8: 2f03 movel %d3,%sp@- 492aa: 47f9 0004 c54c lea 4c54c ,%a3 492b0: 4e93 jsr %a3@ *pathloc = newloc; 492b2: 4878 0014 pea 14 492b6: 2f03 movel %d3,%sp@- 492b8: 2f0a movel %a2,%sp@- 492ba: 4e93 jsr %a3@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 492bc: 206a 000c moveal %a2@(12),%a0 492c0: 94ae fffc subl %fp@(-4),%d2 492c4: 2f0d movel %a5,%sp@- 492c6: 2f0a movel %a2,%sp@- 492c8: 4874 2800 pea %a4@(00000000,%d2:l) 492cc: 2068 0004 moveal %a0@(4),%a0 492d0: 4e90 jsr %a0@ 492d2: 4fef 0024 lea %sp@(36),%sp 492d6: 2600 movel %d0,%d3 492d8: 6000 00ae braw 49388 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 492dc: 2f06 movel %d6,%sp@- 492de: 2f08 movel %a0,%sp@- 492e0: 4eb9 0004 9438 jsr 49438 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 492e6: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 492e8: 2640 moveal %d0,%a3 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 492ea: 4a80 tstl %d0 492ec: 6724 beqs 49312 done = true; else pathloc->node_access = node; 492ee: 248b movel %a3,%a2@ 492f0: 6000 feca braw 491bc break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 492f4: 4eb9 0004 bca0 jsr 4bca0 <__errno> 492fa: 7c11 moveq #17,%d6 492fc: 2040 moveal %d0,%a0 492fe: 2086 movel %d6,%a0@ 49300: 6000 0084 braw 49386 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 49304: 4eb9 0004 bca0 jsr 4bca0 <__errno> 4930a: 7a5b moveq #91,%d5 4930c: 2040 moveal %d0,%a0 4930e: 2085 movel %d5,%a0@ 49310: 6074 bras 49386 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 49312: 2002 movel %d2,%d0 49314: 90ae fffc subl %fp@(-4),%d0 * 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++) { if ( !IMFS_is_separator( path[ i ] ) ) 49318: 47f9 0004 3728 lea 43728 ,%a3 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4931e: d08c addl %a4,%d0 * pathloc is returned with a pointer to the parent of the new node. * name is returned with a pointer to the first character in the * new node name. The parent node is verified to be a directory. */ int IMFS_evaluate_for_make( 49320: d9c2 addal %d2,%a4 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 49322: 2a80 movel %d0,%a5@ /* * 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++) { 49324: 601a bras 49340 if ( !IMFS_is_separator( path[ i ] ) ) 49326: 49c0 extbl %d0 49328: 2f00 movel %d0,%sp@- 4932a: 4e93 jsr %a3@ 4932c: 588f addql #4,%sp 4932e: 4a80 tstl %d0 49330: 660e bnes 49340 rtems_set_errno_and_return_minus_one( ENOENT ); 49332: 4eb9 0004 bca0 jsr 4bca0 <__errno> 49338: 7802 moveq #2,%d4 4933a: 2040 moveal %d0,%a0 4933c: 2084 movel %d4,%a0@ 4933e: 6046 bras 49386 /* * 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++) { 49340: 101c moveb %a4@+,%d0 49342: 66e2 bnes 49326 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 49344: 2f0a movel %a2,%sp@- 49346: 4eb9 0004 8d94 jsr 48d94 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 4934c: 2052 moveal %a2@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4934e: 2600 movel %d0,%d3 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 49350: 588f addql #4,%sp 49352: 7001 moveq #1,%d0 49354: b0a8 0048 cmpl %a0@(72),%d0 49358: 670e beqs 49368 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 4935a: 4eb9 0004 bca0 jsr 4bca0 <__errno> 49360: 7614 moveq #20,%d3 49362: 2040 moveal %d0,%a0 49364: 2083 movel %d3,%a0@ 49366: 601e bras 49386 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 49368: 4878 0003 pea 3 4936c: 2f0a movel %a2,%sp@- 4936e: 4eb9 0004 8e02 jsr 48e02 49374: 508f addql #8,%sp 49376: 4a80 tstl %d0 49378: 660e bnes 49388 rtems_set_errno_and_return_minus_one( EACCES ); 4937a: 4eb9 0004 bca0 jsr 4bca0 <__errno> 49380: 740d moveq #13,%d2 49382: 2040 moveal %d0,%a0 49384: 2082 movel %d2,%a0@ 49386: 76ff moveq #-1,%d3 return result; } 49388: 2003 movel %d3,%d0 4938a: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 49390: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048e02 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 48e02: 72f8 moveq #-8,%d1 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 48e04: 4e56 0000 linkw %fp,#0 48e08: 202e 000c movel %fp@(12),%d0 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 48e0c: c280 andl %d0,%d1 48e0e: 6710 beqs 48e20 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 48e10: 4eb9 0004 bca0 jsr 4bca0 <__errno> <== NOT EXECUTED 48e16: 2040 moveal %d0,%a0 <== NOT EXECUTED 48e18: 7001 moveq #1,%d0 <== NOT EXECUTED 48e1a: 2080 movel %d0,%a0@ <== NOT EXECUTED 48e1c: 70ff moveq #-1,%d0 <== NOT EXECUTED 48e1e: 6016 bras 48e36 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 48e20: 206e 0008 moveal %fp@(8),%a0 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 48e24: ed88 lsll #6,%d0 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 48e26: 2050 moveal %a0@,%a0 48e28: 2200 movel %d0,%d1 48e2a: c2a8 002e andl %a0@(46),%d1 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 ); 48e2e: b081 cmpl %d1,%d0 48e30: 57c0 seq %d0 48e32: 49c0 extbl %d0 48e34: 4480 negl %d0 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 48e36: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042fdc : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 42fdc: 4e56 0000 linkw %fp,#0 42fe0: 206e 0008 moveal %fp@(8),%a0 42fe4: 2f03 movel %d3,%sp@- 42fe6: 2f02 movel %d2,%sp@- off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 42fe8: 2f08 movel %a0,%sp@- 42fea: 2f2e 0014 movel %fp@(20),%sp@- 42fee: 2f2e 0010 movel %fp@(16),%sp@- 42ff2: 2f2e 000c movel %fp@(12),%sp@- 42ff6: 2068 0018 moveal %a0@(24),%a0 42ffa: 2f28 004c movel %a0@(76),%sp@- 42ffe: 4eb9 0004 ba3a jsr 4ba3a IMFS_FIFO_RETURN(err); 43004: 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); 43008: 2600 movel %d0,%d3 4300a: 2400 movel %d0,%d2 4300c: 5bc1 smi %d1 4300e: 49c1 extbl %d1 IMFS_FIFO_RETURN(err); 43010: 4a81 tstl %d1 43012: 6a10 bpls 43024 <== NEVER TAKEN 43014: 4eb9 0004 d714 jsr 4d714 <__errno> 4301a: 4483 negl %d3 4301c: 2040 moveal %d0,%a0 4301e: 72ff moveq #-1,%d1 43020: 74ff moveq #-1,%d2 43022: 2083 movel %d3,%a0@ } 43024: 2001 movel %d1,%d0 43026: 2202 movel %d2,%d1 43028: 242e fff8 movel %fp@(-8),%d2 4302c: 262e fffc movel %fp@(-4),%d3 43030: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000430a0 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 430a0: 4e56 fff8 linkw %fp,#-8 430a4: 206e 0008 moveal %fp@(8),%a0 430a8: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; 430aa: 2468 0018 moveal %a0@(24),%a2 ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 430ae: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 430b0: 2f08 movel %a0,%sp@- 430b2: 2f2e 0010 movel %fp@(16),%sp@- 430b6: 2f2e 000c movel %fp@(12),%sp@- 430ba: 2f2a 004c movel %a2@(76),%sp@- 430be: 4eb9 0004 b862 jsr 4b862 if (err > 0) { 430c4: 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); 430c8: 2400 movel %d0,%d2 if (err > 0) { 430ca: 6f1e bles 430ea IMFS_mtime_ctime_update(jnode); 430cc: 42a7 clrl %sp@- 430ce: 486e fff8 pea %fp@(-8) 430d2: 4eb9 0004 41b4 jsr 441b4 430d8: 202e fff8 movel %fp@(-8),%d0 430dc: 508f addql #8,%sp 430de: 2540 0040 movel %d0,%a2@(64) 430e2: 2540 0044 movel %d0,%a2@(68) 430e6: 2002 movel %d2,%d0 430e8: 6016 bras 43100 } IMFS_FIFO_RETURN(err); 430ea: 4a80 tstl %d0 430ec: 6710 beqs 430fe <== NEVER TAKEN 430ee: 4eb9 0004 d714 jsr 4d714 <__errno> 430f4: 4482 negl %d2 430f6: 2040 moveal %d0,%a0 430f8: 70ff moveq #-1,%d0 430fa: 2082 movel %d2,%a0@ 430fc: 6002 bras 43100 430fe: 4280 clrl %d0 <== NOT EXECUTED } 43100: 242e fff0 movel %fp@(-16),%d2 43104: 246e fff4 moveal %fp@(-12),%a2 43108: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049438 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 49438: 4e56 fff0 linkw %fp,#-16 4943c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 49440: 4879 0005 b14c pea 5b14c 49446: 49f9 0004 cba0 lea 4cba0 ,%a4 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4944c: 242e 000c movel %fp@(12),%d2 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 49450: 2f02 movel %d2,%sp@- IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 49452: 246e 0008 moveal %fp@(8),%a2 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 49456: 4e94 jsr %a4@ 49458: 508f addql #8,%sp 4945a: 4a80 tstl %d0 4945c: 673a beqs 49498 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 4945e: 4879 0005 b14e pea 5b14e 49464: 2f02 movel %d2,%sp@- 49466: 4e94 jsr %a4@ 49468: 508f addql #8,%sp 4946a: 4a80 tstl %d0 4946c: 6606 bnes 49474 <== ALWAYS TAKEN return directory->Parent; 4946e: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED 49472: 6024 bras 49498 <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 49474: 266a 004c moveal %a2@(76),%a3 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 49478: 45ea 0050 lea %a2@(80),%a2 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 4947c: 6010 bras 4948e !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 ) ) 4947e: 486b 000c pea %a3@(12) 49482: 2f02 movel %d2,%sp@- 49484: 4e94 jsr %a4@ 49486: 508f addql #8,%sp 49488: 4a80 tstl %d0 4948a: 670a beqs 49496 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 ) { 4948c: 2653 moveal %a3@,%a3 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 4948e: b5cb cmpal %a3,%a2 49490: 66ec bnes 4947e if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; 49492: 95ca subal %a2,%a2 49494: 6002 bras 49498 for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 49496: 244b moveal %a3,%a2 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 49498: 200a movel %a2,%d0 4949a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 494a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049394 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 49394: 4e56 ffd8 linkw %fp,#-40 49398: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4939c: 266e 0008 moveal %fp@(8),%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; loc = temp_mt_entry->mt_fs_root; 493a0: 240e movel %fp,%d2 493a2: 0682 ffff ffec addil #-20,%d2 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 493a8: 49f9 0004 8d94 lea 48d94 ,%a4 /* * 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; 493ae: 246b 001c moveal %a3@(28),%a2 loc = temp_mt_entry->mt_fs_root; 493b2: 4878 0014 pea 14 493b6: 486b 001c pea %a3@(28) 493ba: 2f02 movel %d2,%sp@- 493bc: 4eb9 0004 c54c jsr 4c54c /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 493c2: 4fef 000c lea %sp@(12),%sp 493c6: 42ab 001c clrl %a3@(28) next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 493ca: 47f9 0004 2370 lea 42370 ,%a3 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 493d0: 262a 0008 movel %a2@(8),%d3 loc.node_access = (void *)jnode; 493d4: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 493d8: 2f02 movel %d2,%sp@- 493da: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 493dc: 588f addql #4,%sp 493de: 7001 moveq #1,%d0 493e0: b0aa 0048 cmpl %a2@(72),%d0 493e4: 660e bnes 493f4 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 493e6: 200a movel %a2,%d0 493e8: 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 ) ) { 493ee: b0aa 004c cmpl %a2@(76),%d0 493f2: 660e bnes 49402 result = IMFS_unlink( NULL, &loc ); 493f4: 2f02 movel %d2,%sp@- 493f6: 42a7 clrl %sp@- 493f8: 4e93 jsr %a3@ if (result != 0) 493fa: 508f addql #8,%sp 493fc: 4a80 tstl %d0 493fe: 6626 bnes 49426 <== NEVER TAKEN return -1; jnode = next; 49400: 2443 moveal %d3,%a2 } if ( jnode != NULL ) { 49402: 4a8a tstl %a2 49404: 6724 beqs 4942a if ( jnode->type == IMFS_DIRECTORY ) { 49406: 7001 moveq #1,%d0 49408: b0aa 0048 cmpl %a2@(72),%d0 4940c: 66c2 bnes 493d0 <== NEVER TAKEN 4940e: 220a movel %a2,%d1 49410: 0681 0000 0050 addil #80,%d1 } } } while (jnode != NULL); return 0; } 49416: 202a 004c movel %a2@(76),%d0 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) 4941a: b280 cmpl %d0,%d1 4941c: 67b2 beqs 493d0 jnode = jnode_get_first_child( jnode ); 4941e: 2440 moveal %d0,%a2 } } } while (jnode != NULL); 49420: 4a80 tstl %d0 49422: 66ac bnes 493d0 <== ALWAYS TAKEN 49424: 6004 bras 4942a <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 49426: 70ff moveq #-1,%d0 <== NOT EXECUTED 49428: 6002 bras 4942c <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 4942a: 4280 clrl %d0 } 4942c: 4cee 1c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a4 49432: 4e5e unlk %fp ... =============================================================================== 000494a4 : const char *path, int pathlen, char *token, int *token_len ) { 494a4: 4e56 ffe4 linkw %fp,#-28 494a8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 494ac: 246e 0010 moveal %fp@(16),%a2 register int i = 0; 494b0: 4283 clrl %d3 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 494b2: 284a moveal %a2,%a4 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 494b4: 4bf9 0004 3728 lea 43728 ,%a5 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 494ba: 266e 0008 moveal %fp@(8),%a3 const char *path, int pathlen, char *token, int *token_len ) { 494be: 282e 000c movel %fp@(12),%d4 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 494c2: 141b moveb %a3@+,%d2 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 494c4: 600c bras 494d2 token[i] = c; if ( i == IMFS_NAME_MAX ) 494c6: 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; 494c8: 18c2 moveb %d2,%a4@+ if ( i == IMFS_NAME_MAX ) 494ca: b083 cmpl %d3,%d0 494cc: 6772 beqs 49540 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 494ce: 5283 addql #1,%d3 494d0: 141b moveb %a3@+,%d2 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 494d2: 1002 moveb %d2,%d0 494d4: 49c0 extbl %d0 494d6: 2f00 movel %d0,%sp@- 494d8: 4e95 jsr %a5@ 494da: 588f addql #4,%sp 494dc: 4a80 tstl %d0 494de: 6604 bnes 494e4 494e0: b883 cmpl %d3,%d4 494e2: 6ee2 bgts 494c6 /* * Copy a seperator into token. */ if ( i == 0 ) { 494e4: 4a83 tstl %d3 494e6: 660a bnes 494f2 token[i] = c; 494e8: 1482 moveb %d2,%a2@ if ( (token[i] != '\0') && pathlen ) { 494ea: 6714 beqs 49500 494ec: 4a84 tstl %d4 494ee: 6614 bnes 49504 494f0: 600e bras 49500 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 494f2: 4a32 38ff tstb %a2@(ffffffff,%d3:l) 494f6: 6712 beqs 4950a <== NEVER TAKEN token[i] = '\0'; 494f8: 4200 clrb %d0 494fa: 1580 3800 moveb %d0,%a2@(00000000,%d3:l) 494fe: 600a bras 4950a if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 49500: 4282 clrl %d2 49502: 6008 bras 4950c if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; 49504: 7401 moveq #1,%d2 if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; 49506: 7601 moveq #1,%d3 49508: 6002 bras 4950c char *token, int *token_len ) { register int i = 0; IMFS_token_types type = IMFS_NAME; 4950a: 7403 moveq #3,%d2 /* * Set token_len to the number of characters copied. */ *token_len = i; 4950c: 206e 0014 moveal %fp@(20),%a0 /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 49510: 7003 moveq #3,%d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 49512: 2083 movel %d3,%a0@ /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 49514: b082 cmpl %d2,%d0 49516: 6632 bnes 4954a if ( strcmp( token, "..") == 0 ) 49518: 4879 0005 b151 pea 5b151 4951e: 47f9 0004 cba0 lea 4cba0 ,%a3 49524: 2f0a movel %a2,%sp@- 49526: 4e93 jsr %a3@ 49528: 508f addql #8,%sp 4952a: 4a80 tstl %d0 4952c: 6716 beqs 49544 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4952e: 4879 0005 b152 pea 5b152 49534: 2f0a movel %a2,%sp@- 49536: 4e93 jsr %a3@ 49538: 508f addql #8,%sp 4953a: 4a80 tstl %d0 4953c: 670a beqs 49548 4953e: 600a bras 4954a while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; 49540: 7404 moveq #4,%d2 49542: 6006 bras 4954a * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; 49544: 7402 moveq #2,%d2 49546: 6002 bras 4954a else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; 49548: 7401 moveq #1,%d2 } return type; } 4954a: 2002 movel %d2,%d0 4954c: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 49552: 4e5e unlk %fp ... =============================================================================== 00041fb8 : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 41fb8: 307c 0006 moveaw #6,%a0 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 41fbc: 7210 moveq #16,%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 ) { 41fbe: 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, 41fc2: 2039 0005 bc18 movel 5bc18 ,%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 ) { 41fc8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 41fcc: 246e 0008 moveal %fp@(8),%a2 41fd0: 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) { 41fd4: b081 cmpl %d1,%d0 41fd6: 6710 beqs 41fe8 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 41fd8: 6d08 blts 41fe2 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 41fda: 5388 subql #1,%a0 41fdc: d281 addl %d1,%d1 41fde: 4a88 tstl %a0 41fe0: 66f2 bnes 41fd4 <== ALWAYS TAKEN if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 41fe2: 203c 0000 0080 movel #128,%d0 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 41fe8: 23c0 0005 cc08 movel %d0,5cc08 /* * 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(); 41fee: 4eb9 0004 8d58 jsr 48d58 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 41ff4: 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(); 41ffa: 2640 moveal %d0,%a3 41ffc: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 42000: 2542 0024 movel %d2,%a2@(36) temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 42004: 4878 0030 pea 30 42008: 4879 0005 b11c pea 5b11c 4200e: 486a 0038 pea %a2@(56) 42012: 4eb9 0004 c54c jsr 4c54c /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 42018: 4878 0014 pea 14 4201c: 4878 0001 pea 1 42020: 4eb9 0004 2654 jsr 42654 if ( !fs_info ) { 42026: 4fef 0014 lea %sp@(20),%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 ) ); 4202a: 2040 moveal %d0,%a0 if ( !fs_info ) { 4202c: 4a80 tstl %d0 4202e: 661a bnes 4204a free(temp_mt_entry->mt_fs_root.node_access); 42030: 2f0b movel %a3,%sp@- 42032: 4eb9 0004 29ec jsr 429ec rtems_set_errno_and_return_minus_one(ENOMEM); 42038: 4eb9 0004 bca0 jsr 4bca0 <__errno> 4203e: 588f addql #4,%sp 42040: 2040 moveal %d0,%a0 42042: 700c moveq #12,%d0 42044: 2080 movel %d0,%a0@ 42046: 70ff moveq #-1,%d0 42048: 6030 bras 4207a } temp_mt_entry->fs_info = fs_info; 4204a: 2540 0034 movel %d0,%a2@(52) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 4204e: 2039 0005 cc0c movel 5cc0c ,%d0 42054: 2080 movel %d0,%a0@ 42056: 5280 addql #1,%d0 42058: 23c0 0005 cc0c movel %d0,5cc0c fs_info->ino_count = 1; 4205e: 7001 moveq #1,%d0 fs_info->memfile_handlers = memfile_handlers; 42060: 216e 0010 0008 movel %fp@(16),%a0@(8) fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; 42066: 216e 0018 0010 movel %fp@(24),%a0@(16) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 4206c: 2140 0004 movel %d0,%a0@(4) fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 42070: 2142 000c movel %d2,%a0@(12) fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 42074: 2740 0034 movel %d0,%a3@(52) return 0; 42078: 4200 clrb %d0 } 4207a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 42080: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004aa40 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4aa40: 4e56 fff0 linkw %fp,#-16 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4aa44: 2039 0005 cc08 movel 5cc08 ,%d0 4aa4a: e488 lsrl #2,%d0 4aa4c: 2200 movel %d0,%d1 4aa4e: 5381 subql #1,%d1 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4aa50: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4aa54: 246e 0008 moveal %fp@(8),%a2 4aa58: 242e 000c movel %fp@(12),%d2 4aa5c: 206e 0010 moveal %fp@(16),%a0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4aa60: b282 cmpl %d2,%d1 4aa62: 6536 bcss 4aa9a p = info->indirect; 4aa64: 226a 0054 moveal %a2@(84),%a1 if ( malloc_it ) { 4aa68: 4a88 tstl %a0 4aa6a: 6720 beqs 4aa8c if ( !p ) { 4aa6c: 4a89 tstl %a1 4aa6e: 6610 bnes 4aa80 p = memfile_alloc_block(); 4aa70: 4eb9 0004 aa1c jsr 4aa1c if ( !p ) 4aa76: 4a80 tstl %d0 4aa78: 6700 00f8 beqw 4ab72 return 0; info->indirect = p; 4aa7c: 2540 0054 movel %d0,%a2@(84) } return &info->indirect[ my_block ]; 4aa80: 206a 0054 moveal %a2@(84),%a0 4aa84: e58a lsll #2,%d2 4aa86: d1c2 addal %d2,%a0 4aa88: 6000 00ea braw 4ab74 } if ( !p ) 4aa8c: 4a89 tstl %a1 4aa8e: 6700 00e2 beqw 4ab72 return 0; return &info->indirect[ my_block ]; 4aa92: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 4aa96: 6000 00dc braw 4ab74 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4aa9a: 2200 movel %d0,%d1 4aa9c: 5281 addql #1,%d1 4aa9e: 4c00 1800 mulsl %d0,%d1 4aaa2: 2241 moveal %d1,%a1 4aaa4: 5389 subql #1,%a1 4aaa6: b3c2 cmpal %d2,%a1 4aaa8: 653e bcss 4aae8 my_block -= FIRST_DOUBLY_INDIRECT; 4aaaa: 9480 subl %d0,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4aaac: 4c40 2003 remul %d0,%d3,%d2 4aab0: 4c40 2002 remul %d0,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4aab4: 202a 0058 movel %a2@(88),%d0 if ( malloc_it ) { 4aab8: 4a88 tstl %a0 4aaba: 671c beqs 4aad8 if ( !p ) { 4aabc: 4a80 tstl %d0 4aabe: 6610 bnes 4aad0 p = memfile_alloc_block(); 4aac0: 4eb9 0004 aa1c jsr 4aa1c if ( !p ) 4aac6: 4a80 tstl %d0 4aac8: 6700 00a8 beqw 4ab72 return 0; info->doubly_indirect = p; 4aacc: 2540 0058 movel %d0,%a2@(88) } p1 = (block_p *)p[ doubly ]; 4aad0: 2040 moveal %d0,%a0 4aad2: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4aad6: 6066 bras 4ab3e } return (block_p *)&p1[ singly ]; } if ( !p ) 4aad8: 4a80 tstl %d0 4aada: 6700 0096 beqw 4ab72 return 0; p = (block_p *)p[ doubly ]; 4aade: 2240 moveal %d0,%a1 4aae0: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 4aae4: 6000 0082 braw 4ab68 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4aae8: 2601 movel %d1,%d3 4aaea: 5283 addql #1,%d3 4aaec: 4c00 3800 mulsl %d0,%d3 4aaf0: 5383 subql #1,%d3 4aaf2: b682 cmpl %d2,%d3 4aaf4: 657c bcss 4ab72 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 4aaf6: 9481 subl %d1,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4aaf8: 4c40 2003 remul %d0,%d3,%d2 4aafc: 4c40 2002 remul %d0,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 4ab00: 4c40 2004 remul %d0,%d4,%d2 4ab04: 4c40 2002 remul %d0,%d2,%d2 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 4ab08: 202a 005c movel %a2@(92),%d0 if ( malloc_it ) { 4ab0c: 4a88 tstl %a0 4ab0e: 6746 beqs 4ab56 if ( !p ) { 4ab10: 4a80 tstl %d0 4ab12: 660e bnes 4ab22 p = memfile_alloc_block(); 4ab14: 4eb9 0004 aa1c jsr 4aa1c if ( !p ) 4ab1a: 4a80 tstl %d0 4ab1c: 6754 beqs 4ab72 <== NEVER TAKEN return 0; info->triply_indirect = p; 4ab1e: 2540 005c movel %d0,%a2@(92) } p1 = (block_p *) p[ triply ]; 4ab22: 2040 moveal %d0,%a0 4ab24: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4ab28: 2012 movel %a2@,%d0 if ( !p1 ) { 4ab2a: 660c bnes 4ab38 p1 = memfile_alloc_block(); 4ab2c: 4eb9 0004 aa1c jsr 4aa1c if ( !p1 ) 4ab32: 4a80 tstl %d0 4ab34: 673c beqs 4ab72 <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; 4ab36: 2480 movel %d0,%a2@ } p2 = (block_p *)p1[ doubly ]; 4ab38: 2240 moveal %d0,%a1 4ab3a: 45f1 4c00 lea %a1@(00000000,%d4:l:4),%a2 4ab3e: 2012 movel %a2@,%d0 if ( !p2 ) { 4ab40: 660c bnes 4ab4e p2 = memfile_alloc_block(); 4ab42: 4eb9 0004 aa1c jsr 4aa1c if ( !p2 ) 4ab48: 4a80 tstl %d0 4ab4a: 6726 beqs 4ab72 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 4ab4c: 2480 movel %d0,%a2@ } return (block_p *)&p2[ singly ]; 4ab4e: 2240 moveal %d0,%a1 4ab50: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 4ab54: 601e bras 4ab74 } if ( !p ) 4ab56: 4a80 tstl %d0 4ab58: 6718 beqs 4ab72 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; 4ab5a: 2240 moveal %d0,%a1 4ab5c: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 if ( !p1 ) 4ab60: 4a88 tstl %a0 4ab62: 670e beqs 4ab72 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; 4ab64: 2070 4c00 moveal %a0@(00000000,%d4:l:4),%a0 if ( !p2 ) 4ab68: 4a88 tstl %a0 4ab6a: 6706 beqs 4ab72 <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; 4ab6c: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4ab70: 6002 bras 4ab74 if ( !p1 ) return 0; p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; 4ab72: 91c8 subal %a0,%a0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4ab74: 2008 movel %a0,%d0 4ab76: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4ab7c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ab80 : * 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) { 4ab80: 7006 moveq #6,%d0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4ab82: 4e56 ffc8 linkw %fp,#-56 4ab86: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4ab8a: 246e 0008 moveal %fp@(8),%a2 4ab8e: 2e2e 0014 movel %fp@(20),%d7 4ab92: 2c2e 0018 movel %fp@(24),%d6 4ab96: 242e 000c movel %fp@(12),%d2 4ab9a: 262e 0010 movel %fp@(16),%d3 * 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) { 4ab9e: b0aa 0048 cmpl %a2@(72),%d0 4aba2: 6656 bnes 4abfa unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4aba4: 2246 moveal %d6,%a1 4aba6: 91c8 subal %a0,%a0 4aba8: 282a 004c movel %a2@(76),%d4 4abac: 2a2a 0050 movel %a2@(80),%d5 my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 4abb0: 266a 0054 moveal %a2@(84),%a3 if (my_length > (the_jnode->info.linearfile.size - start)) 4abb4: 2d44 fff0 movel %d4,%fp@(-16) 4abb8: 2d45 fff4 movel %d5,%fp@(-12) 4abbc: 9a83 subl %d3,%d5 4abbe: 9982 subxl %d2,%d4 4abc0: 2008 movel %a0,%d0 4abc2: 2209 movel %a1,%d1 4abc4: 9285 subl %d5,%d1 4abc6: 9184 subxl %d4,%d0 4abc8: 6f06 bles 4abd0 <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 4abca: 2c2e fff4 movel %fp@(-12),%d6 4abce: 9c83 subl %d3,%d6 memcpy(dest, &file_ptr[start], my_length); 4abd0: 2f06 movel %d6,%sp@- 4abd2: 4873 3800 pea %a3@(00000000,%d3:l) IMFS_update_atime( the_jnode ); return my_length; 4abd6: 2406 movel %d6,%d2 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); 4abd8: 2f07 movel %d7,%sp@- 4abda: 4eb9 0004 c54c jsr 4c54c IMFS_update_atime( the_jnode ); 4abe0: 42a7 clrl %sp@- 4abe2: 486e fff8 pea %fp@(-8) 4abe6: 4eb9 0004 2a74 jsr 42a74 4abec: 256e fff8 003c movel %fp@(-8),%a2@(60) return my_length; 4abf2: 4fef 0014 lea %sp@(20),%sp 4abf6: 6000 011e braw 4ad16 /* * 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; 4abfa: 2043 moveal %d3,%a0 4abfc: 43f0 6800 lea %a0@(00000000,%d6:l),%a1 if ( last_byte > the_jnode->info.file.size ) 4ac00: 97cb subal %a3,%a3 4ac02: 2849 moveal %a1,%a4 4ac04: 202a 004c movel %a2@(76),%d0 4ac08: 222a 0050 movel %a2@(80),%d1 4ac0c: 280b movel %a3,%d4 4ac0e: 2a0c movel %a4,%d5 4ac10: 9a81 subl %d1,%d5 4ac12: 9980 subxl %d0,%d4 4ac14: 6f04 bles 4ac1a my_length = the_jnode->info.file.size - start; 4ac16: 2c01 movel %d1,%d6 4ac18: 9c83 subl %d3,%d6 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4ac1a: 2879 0005 cc08 moveal 5cc08 ,%a4 4ac20: 2a0c movel %a4,%d5 4ac22: 5bc4 smi %d4 4ac24: 49c4 extbl %d4 4ac26: 2f05 movel %d5,%sp@- 4ac28: 2f04 movel %d4,%sp@- 4ac2a: 2f03 movel %d3,%sp@- 4ac2c: 2f02 movel %d2,%sp@- 4ac2e: 4eb9 0005 891c jsr 5891c <__moddi3> 4ac34: 4fef 0010 lea %sp@(16),%sp 4ac38: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4ac3a: 2f05 movel %d5,%sp@- 4ac3c: 2f04 movel %d4,%sp@- 4ac3e: 2f03 movel %d3,%sp@- 4ac40: 2f02 movel %d2,%sp@- 4ac42: 4eb9 0005 8568 jsr 58568 <__divdi3> 4ac48: 4fef 0010 lea %sp@(16),%sp 4ac4c: 2801 movel %d1,%d4 if ( start_offset ) { 4ac4e: 4a8b tstl %a3 4ac50: 673c beqs 4ac8e 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 ); 4ac52: 42a7 clrl %sp@- 4ac54: 2f01 movel %d1,%sp@- 4ac56: 2f0a movel %a2,%sp@- 4ac58: 4eb9 0004 aa40 jsr 4aa40 if ( !block_ptr ) 4ac5e: 4fef 000c lea %sp@(12),%sp 4ac62: 4a80 tstl %d0 4ac64: 6700 00ae beqw 4ad14 * 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; 4ac68: 99cb subal %a3,%a4 4ac6a: 2406 movel %d6,%d2 4ac6c: b9c6 cmpal %d6,%a4 4ac6e: 6402 bccs 4ac72 4ac70: 240c movel %a4,%d2 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 ); 4ac72: 2f02 movel %d2,%sp@- 4ac74: 2040 moveal %d0,%a0 4ac76: d7d0 addal %a0@,%a3 dest += to_copy; block++; 4ac78: 5284 addql #1,%d4 my_length -= to_copy; 4ac7a: 9c82 subl %d2,%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 ); 4ac7c: 2f0b movel %a3,%sp@- 4ac7e: 2f07 movel %d7,%sp@- dest += to_copy; 4ac80: de82 addl %d2,%d7 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 ); 4ac82: 4eb9 0004 c54c jsr 4c54c dest += to_copy; block++; my_length -= to_copy; 4ac88: 4fef 000c lea %sp@(12),%sp 4ac8c: 6002 bras 4ac90 */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 4ac8e: 4282 clrl %d2 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4ac90: 2679 0005 cc08 moveal 5cc08 ,%a3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4ac96: 4bf9 0004 aa40 lea 4aa40 ,%a5 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4ac9c: 49f9 0004 c54c lea 4c54c ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4aca2: 6026 bras 4acca block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4aca4: 42a7 clrl %sp@- 4aca6: 2f04 movel %d4,%sp@- 4aca8: 2f0a movel %a2,%sp@- 4acaa: 4e95 jsr %a5@ if ( !block_ptr ) 4acac: 4fef 000c lea %sp@(12),%sp 4acb0: 4a80 tstl %d0 4acb2: 6762 beqs 4ad16 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4acb4: 2040 moveal %d0,%a0 dest += to_copy; block++; 4acb6: 5284 addql #1,%d4 my_length -= to_copy; 4acb8: 9c8b subl %a3,%d6 copied += to_copy; 4acba: d48b addl %a3,%d2 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 ); 4acbc: 2f0b movel %a3,%sp@- 4acbe: 2f10 movel %a0@,%sp@- 4acc0: 2f07 movel %d7,%sp@- dest += to_copy; 4acc2: de8b addl %a3,%d7 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 ); 4acc4: 4e94 jsr %a4@ dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 4acc6: 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 ) { 4acca: bcb9 0005 cc08 cmpl 5cc08 ,%d6 4acd0: 64d2 bccs 4aca4 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4acd2: 4a86 tstl %d6 4acd4: 6728 beqs 4acfe block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4acd6: 42a7 clrl %sp@- 4acd8: 2f04 movel %d4,%sp@- 4acda: 2f0a movel %a2,%sp@- 4acdc: 4eb9 0004 aa40 jsr 4aa40 if ( !block_ptr ) 4ace2: 4fef 000c lea %sp@(12),%sp 4ace6: 4a80 tstl %d0 4ace8: 672c beqs 4ad16 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4acea: 2040 moveal %d0,%a0 copied += my_length; 4acec: d486 addl %d6,%d2 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 ); 4acee: 2f06 movel %d6,%sp@- 4acf0: 2f10 movel %a0@,%sp@- 4acf2: 2f07 movel %d7,%sp@- 4acf4: 4eb9 0004 c54c jsr 4c54c copied += my_length; 4acfa: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 4acfe: 42a7 clrl %sp@- 4ad00: 486e fff8 pea %fp@(-8) 4ad04: 4eb9 0004 2a74 jsr 42a74 4ad0a: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 4ad10: 508f addql #8,%sp 4ad12: 6002 bras 4ad16 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; 4ad14: 4282 clrl %d2 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4ad16: 2002 movel %d2,%d0 4ad18: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4ad1e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ade4 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4ade4: 4e56 ffe4 linkw %fp,#-28 4ade8: 48d7 1c3c moveml %d2-%d5/%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; 4adec: 2439 0005 cc08 movel 5cc08 ,%d2 4adf2: e48a lsrl #2,%d2 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4adf4: 246e 0008 moveal %fp@(8),%a2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4adf8: 4aaa 0054 tstl %a2@(84) 4adfc: 670e beqs 4ae0c memfile_free_blocks_in_table( &info->indirect, to_free ); 4adfe: 2f02 movel %d2,%sp@- 4ae00: 486a 0054 pea %a2@(84) 4ae04: 4eb9 0004 ad9e jsr 4ad9e 4ae0a: 508f addql #8,%sp } if ( info->doubly_indirect ) { 4ae0c: 4aaa 0058 tstl %a2@(88) 4ae10: 673e beqs 4ae50 4ae12: 4283 clrl %d3 for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( 4ae14: 47f9 0004 ad9e lea 4ad9e ,%a3 4ae1a: 601a bras 4ae36 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 4ae1c: 2003 movel %d3,%d0 4ae1e: 206a 0058 moveal %a2@(88),%a0 4ae22: e588 lsll #2,%d0 4ae24: 4ab0 0800 tstl %a0@(00000000,%d0:l) 4ae28: 670a beqs 4ae34 <== NEVER TAKEN memfile_free_blocks_in_table( 4ae2a: 2f02 movel %d2,%sp@- 4ae2c: 4870 0800 pea %a0@(00000000,%d0:l) 4ae30: 4e93 jsr %a3@ 4ae32: 508f addql #8,%sp if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i,%d0 4ae3c: e488 lsrl #2,%d0 4ae3e: b083 cmpl %d3,%d0 4ae40: 62da bhis 4ae1c 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 ); 4ae42: 2f02 movel %d2,%sp@- 4ae44: 486a 0058 pea %a2@(88) 4ae48: 4eb9 0004 ad9e jsr 4ad9e 4ae4e: 508f addql #8,%sp } if ( info->triply_indirect ) { 4ae50: 4aaa 005c tstl %a2@(92) 4ae54: 6762 beqs 4aeb8 4ae56: 4283 clrl %d3 p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j,%a4 4ae5e: 603e bras 4ae9e } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 4ae60: 2a03 movel %d3,%d5 for ( i=0 ; itriply_indirect[i]; 4ae62: 206a 005c moveal %a2@(92),%a0 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 4ae66: e58d lsll #2,%d5 for ( i=0 ; itriply_indirect[i]; 4ae68: 2670 5800 moveal %a0@(00000000,%d5:l),%a3 if ( !p ) /* ensure we have a valid pointer */ 4ae6c: 4a8b tstl %a3 4ae6e: 673a beqs 4aeaa <== NEVER TAKEN 4ae70: 4284 clrl %d4 4ae72: 6010 bras 4ae84 break; for ( j=0 ; j <== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4ae78: 2f02 movel %d2,%sp@- 4ae7a: 2f0b movel %a3,%sp@- 4ae7c: 4e94 jsr %a4@ 4ae7e: 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,%d0 4ae8a: e488 lsrl #2,%d0 4ae8c: b084 cmpl %d4,%d0 4ae8e: 62e4 bhis 4ae74 if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4ae90: 2f02 movel %d2,%sp@- 4ae92: daaa 005c addl %a2@(92),%d5 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,%d0 4aea4: e488 lsrl #2,%d0 4aea6: b083 cmpl %d3,%d0 4aea8: 62b6 bhis 4ae60 } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4aeaa: 2f02 movel %d2,%sp@- 4aeac: 486a 005c pea %a2@(92) 4aeb0: 4eb9 0004 ad9e jsr 4ad9e 4aeb6: 508f addql #8,%sp (block_p **)&info->triply_indirect, to_free ); } return 0; } 4aeb8: 4280 clrl %d0 4aeba: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4aec0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004afd0 : * 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 ) { 4afd0: 4280 clrl %d0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4afd2: 4e56 ffd0 linkw %fp,#-48 4afd6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4afda: 246e 0008 moveal %fp@(8),%a2 4afde: 242e 000c movel %fp@(12),%d2 4afe2: 262e 0010 movel %fp@(16),%d3 4afe6: 2c2e 0018 movel %fp@(24),%d6 /* * 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; 4afea: 2046 moveal %d6,%a0 4afec: d1c3 addal %d3,%a0 if ( last_byte > the_jnode->info.file.size ) { 4afee: 2208 movel %a0,%d1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4aff0: 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 ) { 4aff4: 282a 004c movel %a2@(76),%d4 4aff8: 2a2a 0050 movel %a2@(80),%d5 4affc: 9a81 subl %d1,%d5 4affe: 9980 subxl %d0,%d4 4b000: 6c28 bges 4b02a <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 4b002: 2f08 movel %a0,%sp@- 4b004: 2f00 movel %d0,%sp@- 4b006: 2f0a movel %a2,%sp@- 4b008: 4eb9 0004 aeec jsr 4aeec if ( status ) 4b00e: 4fef 000c lea %sp@(12),%sp 4b012: 4a80 tstl %d0 4b014: 6714 beqs 4b02a rtems_set_errno_and_return_minus_one( ENOSPC ); 4b016: 4eb9 0004 bca0 jsr 4bca0 <__errno> 4b01c: 741c moveq #28,%d2 4b01e: 2040 moveal %d0,%a0 4b020: 387c ffff moveaw #-1,%a4 4b024: 2082 movel %d2,%a0@ 4b026: 6000 0102 braw 4b12a */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4b02a: 2879 0005 cc08 moveal 5cc08 ,%a4 4b030: 2a0c movel %a4,%d5 4b032: 5bc4 smi %d4 4b034: 49c4 extbl %d4 4b036: 2f05 movel %d5,%sp@- 4b038: 2f04 movel %d4,%sp@- 4b03a: 2f03 movel %d3,%sp@- 4b03c: 2f02 movel %d2,%sp@- 4b03e: 4eb9 0005 891c jsr 5891c <__moddi3> 4b044: 4fef 0010 lea %sp@(16),%sp 4b048: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4b04a: 2f05 movel %d5,%sp@- 4b04c: 2f04 movel %d4,%sp@- 4b04e: 2f03 movel %d3,%sp@- 4b050: 2f02 movel %d2,%sp@- 4b052: 4eb9 0005 8568 jsr 58568 <__divdi3> 4b058: 4fef 0010 lea %sp@(16),%sp 4b05c: 2401 movel %d1,%d2 if ( start_offset ) { 4b05e: 4a8b tstl %a3 4b060: 673a beqs 4b09c 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 ); 4b062: 42a7 clrl %sp@- 4b064: 2f01 movel %d1,%sp@- 4b066: 2f0a movel %a2,%sp@- 4b068: 4eb9 0004 aa40 jsr 4aa40 if ( !block_ptr ) 4b06e: 4fef 000c lea %sp@(12),%sp 4b072: 4a80 tstl %d0 4b074: 6700 00b2 beqw 4b128 * 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; 4b078: 99cb subal %a3,%a4 4b07a: bc8c cmpl %a4,%d6 4b07c: 6402 bccs 4b080 4b07e: 2846 moveal %d6,%a4 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4b080: 2f0c movel %a4,%sp@- 4b082: 2040 moveal %d0,%a0 src += to_copy; block++; 4b084: 5282 addql #1,%d2 my_length -= to_copy; 4b086: 9c8c subl %a4,%d6 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4b088: 2f07 movel %d7,%sp@- 4b08a: d7d0 addal %a0@,%a3 src += to_copy; 4b08c: de8c addl %a4,%d7 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4b08e: 2f0b movel %a3,%sp@- 4b090: 4eb9 0004 c54c jsr 4c54c src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4b096: 4fef 000c lea %sp@(12),%sp 4b09a: 6002 bras 4b09e status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; 4b09c: 99cc subal %a4,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4b09e: 2839 0005 cc08 movel 5cc08 ,%d4 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b0a4: 4bf9 0004 aa40 lea 4aa40 ,%a5 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 ); 4b0aa: 47f9 0004 c54c lea 4c54c ,%a3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4b0b0: 6026 bras 4b0d8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b0b2: 42a7 clrl %sp@- 4b0b4: 2f02 movel %d2,%sp@- 4b0b6: 2f0a movel %a2,%sp@- 4b0b8: 4e95 jsr %a5@ if ( !block_ptr ) 4b0ba: 4fef 000c lea %sp@(12),%sp 4b0be: 4a80 tstl %d0 4b0c0: 6768 beqs 4b12a <== 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 ); 4b0c2: 2f04 movel %d4,%sp@- 4b0c4: 2040 moveal %d0,%a0 src += to_copy; block++; 4b0c6: 5282 addql #1,%d2 my_length -= to_copy; 4b0c8: 9c84 subl %d4,%d6 * 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( 4b0ca: d9c4 addal %d4,%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 ); 4b0cc: 2f07 movel %d7,%sp@- 4b0ce: 2f10 movel %a0@,%sp@- src += to_copy; 4b0d0: de84 addl %d4,%d7 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 ); 4b0d2: 4e93 jsr %a3@ * 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( 4b0d4: 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 ) { 4b0d8: bcb9 0005 cc08 cmpl 5cc08 ,%d6 4b0de: 64d2 bccs 4b0b2 * 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 ) { 4b0e0: 4a86 tstl %d6 4b0e2: 6728 beqs 4b10c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b0e4: 42a7 clrl %sp@- 4b0e6: 2f02 movel %d2,%sp@- 4b0e8: 2f0a movel %a2,%sp@- 4b0ea: 4eb9 0004 aa40 jsr 4aa40 if ( !block_ptr ) 4b0f0: 4fef 000c lea %sp@(12),%sp 4b0f4: 4a80 tstl %d0 4b0f6: 6732 beqs 4b12a <== 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 ); 4b0f8: 2f06 movel %d6,%sp@- 4b0fa: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4b0fc: d9c6 addal %d6,%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, my_length ); 4b0fe: 2f07 movel %d7,%sp@- 4b100: 2f10 movel %a0@,%sp@- 4b102: 4eb9 0004 c54c jsr 4c54c my_length = 0; copied += to_copy; 4b108: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4b10c: 42a7 clrl %sp@- 4b10e: 486e fff8 pea %fp@(-8) 4b112: 4eb9 0004 2a74 jsr 42a74 4b118: 202e fff8 movel %fp@(-8),%d0 return copied; 4b11c: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4b11e: 2540 0040 movel %d0,%a2@(64) 4b122: 2540 0044 movel %d0,%a2@(68) return copied; 4b126: 6002 bras 4b12a 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; 4b128: 99cc subal %a4,%a4 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4b12a: 200c movel %a4,%d0 4b12c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4b132: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004213c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4213c: 4e56 ffb4 linkw %fp,#-76 42140: 48d7 003c moveml %d2-%d5,%sp@ 42144: 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 ); 42148: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4214a: 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 ); 4214e: 4eb9 0004 d0f8 jsr 4d0f8 42154: 588f addql #4,%sp 42156: 486e fffc pea %fp@(-4) 4215a: 486e ffc7 pea %fp@(-57) const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4215e: 2a2e 0010 movel %fp@(16),%d5 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 ); 42162: 2f00 movel %d0,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 42164: 282e 0014 movel %fp@(20),%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 ); 42168: 2f03 movel %d3,%sp@- 4216a: 4eb9 0004 94a4 jsr 494a4 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 42170: 4fef 0010 lea %sp@(16),%sp 42174: 2002 movel %d2,%d0 42176: 0280 0000 f000 andil #61440,%d0 4217c: 0c80 0000 4000 cmpil #16384,%d0 42182: 6730 beqs 421b4 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 42184: 0c80 0000 8000 cmpil #32768,%d0 4218a: 672c beqs 421b8 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4218c: 0c80 0000 6000 cmpil #24576,%d0 42192: 6708 beqs 4219c 42194: 0c80 0000 2000 cmpil #8192,%d0 4219a: 660c bnes 421a8 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 4219c: 2d45 ffe8 movel %d5,%fp@(-24) 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; 421a0: 7002 moveq #2,%d0 rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 421a2: 2d44 ffec movel %d4,%fp@(-20) 421a6: 6016 bras 421be } else if (S_ISFIFO(mode)) 421a8: 0c80 0000 1000 cmpil #4096,%d0 421ae: 670c beqs 421bc <== ALWAYS TAKEN mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { IMFS_token_types type = 0; 421b0: 4280 clrl %d0 <== NOT EXECUTED 421b2: 600a bras 421be <== NOT EXECUTED /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 421b4: 7001 moveq #1,%d0 421b6: 6006 bras 421be else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; 421b8: 7005 moveq #5,%d0 421ba: 6002 bras 421be 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; 421bc: 7007 moveq #7,%d0 * 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 ); 421be: 486e ffe8 pea %fp@(-24) 421c2: 2f02 movel %d2,%sp@- 421c4: 486e ffc7 pea %fp@(-57) 421c8: 2f00 movel %d0,%sp@- 421ca: 2f2e 0018 movel %fp@(24),%sp@- 421ce: 4eb9 0004 8c44 jsr 48c44 if ( !new_node ) 421d4: 4fef 0014 lea %sp@(20),%sp 421d8: 4a80 tstl %d0 421da: 6610 bnes 421ec rtems_set_errno_and_return_minus_one( ENOMEM ); 421dc: 4eb9 0004 bca0 jsr 4bca0 <__errno> 421e2: 2040 moveal %d0,%a0 421e4: 700c moveq #12,%d0 421e6: 2080 movel %d0,%a0@ 421e8: 70ff moveq #-1,%d0 421ea: 6002 bras 421ee return 0; 421ec: 4280 clrl %d0 } 421ee: 4cee 003c ffb4 moveml %fp@(-76),%d2-%d5 421f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000421f8 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 421f8: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 421fa: 4e56 0000 linkw %fp,#0 421fe: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42202: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42206: b0a8 0048 cmpl %a0@(72),%d0 4220a: 6710 beqs 4221c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 4220c: 4eb9 0004 bca0 jsr 4bca0 <__errno> <== NOT EXECUTED 42212: 2040 moveal %d0,%a0 <== NOT EXECUTED 42214: 7014 moveq #20,%d0 <== NOT EXECUTED 42216: 2080 movel %d0,%a0@ <== NOT EXECUTED 42218: 70ff moveq #-1,%d0 <== NOT EXECUTED 4221a: 6006 bras 42222 <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 4221c: 2149 0058 movel %a1,%a0@(88) return 0; 42220: 4280 clrl %d0 } 42222: 4e5e unlk %fp ... =============================================================================== 00044898 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 44898: 4e56 0000 linkw %fp,#0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 4489c: 2079 0006 19c8 moveal 619c8 <_impure_ptr>,%a0 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 448a2: 2f0a movel %a2,%sp@- 448a4: 246e 0008 moveal %fp@(8),%a2 448a8: 2f02 movel %d2,%sp@- IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 448aa: 2f28 0008 movel %a0@(8),%sp@- switch( the_jnode->type ) { 448ae: 7406 moveq #6,%d2 IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 448b0: 486a 000c pea %a2@(12) 448b4: 4eb9 0004 ffc4 jsr 4ffc4 switch( the_jnode->type ) { 448ba: 202a 0048 movel %a2@(72),%d0 448be: 2200 movel %d0,%d1 448c0: 508f addql #8,%sp 448c2: 5381 subql #1,%d1 448c4: b481 cmpl %d1,%d2 448c6: 6500 009c bcsw 44964 448ca: 2079 0006 19c8 moveal 619c8 <_impure_ptr>,%a0 448d0: 303b 1a08 movew %pc@(448da ,%d1:l:2),%d0 448d4: 48c0 extl %d0 448d6: 4efb 0802 jmp %pc@(448da ,%d0:l) 448da: 000e .short 0x000e <== NOT EXECUTED 448dc: 0022 .short 0x0022 <== NOT EXECUTED 448de: 006a .short 0x006a <== NOT EXECUTED 448e0: 006a .short 0x006a <== NOT EXECUTED 448e2: 0050 .short 0x0050 <== NOT EXECUTED 448e4: 0032 .short 0x0032 <== NOT EXECUTED 448e6: 0076 .short 0x0076 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 448e8: 2f28 0008 movel %a0@(8),%sp@- 448ec: 4878 002f pea 2f 448f0: 4eb9 0004 fef4 jsr 4fef4 break; 448f6: 508f addql #8,%sp 448f8: 6000 0088 braw 44982 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 448fc: 2f2a 0050 movel %a2@(80),%sp@- 44900: 2f2a 004c movel %a2@(76),%sp@- 44904: 4879 0006 0234 pea 60234 4490a: 600e bras 4491a the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 4490c: 2f2a 0054 movel %a2@(84),%sp@- 44910: 2f2a 0050 movel %a2@(80),%sp@- 44914: 4879 0006 0247 pea 60247 4491a: 2f28 0008 movel %a0@(8),%sp@- 4491e: 4eb9 0004 fe76 jsr 4fe76 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 44924: 4fef 0010 lea %sp@(16),%sp 44928: 6058 bras 44982 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 4492a: 2f2a 0050 movel %a2@(80),%sp@- 4492e: 4879 0006 0256 pea 60256 44934: 2f28 0008 movel %a0@(8),%sp@- 44938: 4eb9 0004 fe76 jsr 4fe76 (uint32_t)the_jnode->info.file.size ); #endif break; 4493e: 4fef 000c lea %sp@(12),%sp 44942: 603e bras 44982 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 44944: 2f28 0008 movel %a0@(8),%sp@- 44948: 4879 0006 0262 pea 60262 4494e: 600a bras 4495a return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 44950: 2f28 0008 movel %a0@(8),%sp@- 44954: 4879 0006 0276 pea 60276 4495a: 4eb9 0004 ffc4 jsr 4ffc4 return; 44960: 508f addql #8,%sp 44962: 6038 bras 4499c default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 44964: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44966: 4879 0006 0289 pea 60289 <== NOT EXECUTED 4496c: 2079 0006 19c8 moveal 619c8 <_impure_ptr>,%a0 <== NOT EXECUTED 44972: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44976: 4eb9 0004 fe76 jsr 4fe76 <== NOT EXECUTED return; 4497c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44980: 601a bras 4499c <== NOT EXECUTED } puts(""); } 44982: 242e fff8 movel %fp@(-8),%d2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 44986: 203c 0006 093c movel #395580,%d0 } 4498c: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 44990: 2d40 0008 movel %d0,%fp@(8) } 44994: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 44996: 4ef9 0005 1792 jmp 51792 } 4499c: 242e fff8 movel %fp@(-8),%d2 449a0: 246e fffc moveal %fp@(-4),%a2 449a4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042270 : 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 */ ) { 42270: 4e56 fff8 linkw %fp,#-8 IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42274: 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 */ ) { 42278: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 4227a: 2450 moveal %a0@,%a2 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 4227c: 4878 0020 pea 20 42280: 2f2e 0014 movel %fp@(20),%sp@- 42284: 486a 000c pea %a2@(12) 42288: 4eb9 0004 d110 jsr 4d110 if ( the_jnode->Parent != NULL ) 4228e: 4fef 000c lea %sp@(12),%sp 42292: 4aaa 0008 tstl %a2@(8) 42296: 670a beqs 422a2 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 42298: 2f0a movel %a2,%sp@- 4229a: 4eb9 0004 61e8 jsr 461e8 <_Chain_Extract> 422a0: 588f addql #4,%sp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 422a2: 206e 0010 moveal %fp@(16),%a0 422a6: 2050 moveal %a0@,%a0 the_jnode->Parent = new_parent; 422a8: 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 ); 422ac: 2f0a movel %a2,%sp@- 422ae: 4868 004c pea %a0@(76) 422b2: 4eb9 0004 61b0 jsr 461b0 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 422b8: 42a7 clrl %sp@- 422ba: 486e fff8 pea %fp@(-8) 422be: 4eb9 0004 2a74 jsr 42a74 422c4: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; } 422ca: 4280 clrl %d0 422cc: 246e fff4 moveal %fp@(-12),%a2 422d0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049630 : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 49630: 7205 moveq #5,%d1 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 49632: 4e56 0000 linkw %fp,#0 49636: 206e 000c moveal %fp@(12),%a0 4963a: 2f0a movel %a2,%sp@- 4963c: 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; 49640: 2252 moveal %a2@,%a1 switch ( the_jnode->type ) { 49642: 2029 0048 movel %a1@(72),%d0 49646: 5580 subql #2,%d0 49648: b280 cmpl %d0,%d1 4964a: 653e bcss 4968a <== NEVER TAKEN 4964c: 303b 0a08 movew %pc@(49656 ,%d0:l:2),%d0 49650: 48c0 extl %d0 49652: 4efb 0802 jmp %pc@(49656 ,%d0:l) 49656: 000c .short 0x000c <== NOT EXECUTED 49658: 0034 .short 0x0034 <== NOT EXECUTED 4965a: 0026 .short 0x0026 <== NOT EXECUTED 4965c: 001c .short 0x001c <== NOT EXECUTED 4965e: 001c .short 0x001c <== NOT EXECUTED 49660: 0026 .short 0x0026 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 49662: 2029 0050 movel %a1@(80),%d0 49666: 2169 004c 0016 movel %a1@(76),%a0@(22) 4966c: 2140 001a movel %d0,%a0@(26) break; 49670: 602a bras 4969c case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 49672: 2029 004c movel %a1@(76),%d0 49676: 2229 0050 movel %a1@(80),%d1 4967a: 6004 bras 49680 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4967c: 4280 clrl %d0 4967e: 4281 clrl %d1 49680: 2140 001e movel %d0,%a0@(30) 49684: 2141 0022 movel %d1,%a0@(34) break; 49688: 6012 bras 4969c default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4968a: 4eb9 0004 bca0 jsr 4bca0 <__errno> 49690: 2040 moveal %d0,%a0 49692: 70ff moveq #-1,%d0 49694: 20bc 0000 0086 movel #134,%a0@ 4969a: 6046 bras 496e2 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 4969c: 246a 0010 moveal %a2@(16),%a2 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 496a0: 246a 0034 moveal %a2@(52),%a2 496a4: 2012 movel %a2@,%d0 buf->st_mode = the_jnode->st_mode; 496a6: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; 496ac: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; 496b2: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; 496b8: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 496be: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; 496c4: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 496ca: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 496d0: 2169 0044 0036 movel %a1@(68),%a0@(54) /* * 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 = 496d6: 2140 0004 movel %d0,%a0@(4) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; 496da: 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 = 496dc: 20bc 0000 fffe movel #65534,%a0@ buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 496e2: 246e fffc moveal %fp@(-4),%a2 496e6: 4e5e unlk %fp ... =============================================================================== 00042370 : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42370: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 42372: 4e56 ffd0 linkw %fp,#-48 42376: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4237a: 246e 000c moveal %fp@(12),%a2 4237e: 262e 0008 movel %fp@(8),%d3 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 42382: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42384: b0ab 0048 cmpl %a3@(72),%d0 42388: 6600 0082 bnew 4240c if ( !node->info.hard_link.link_node ) 4238c: 282b 004c movel %a3@(76),%d4 42390: 660e bnes 423a0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42392: 4eb9 0004 bca0 jsr 4bca0 <__errno> <== NOT EXECUTED 42398: 2040 moveal %d0,%a0 <== NOT EXECUTED 4239a: 7016 moveq #22,%d0 <== NOT EXECUTED 4239c: 2080 movel %d0,%a0@ <== NOT EXECUTED 4239e: 607e bras 4241e <== NOT EXECUTED the_link = *loc; 423a0: 4878 0014 pea 14 423a4: 240e movel %fp,%d2 423a6: 0682 ffff ffe4 addil #-28,%d2 423ac: 2f0a movel %a2,%sp@- 423ae: 2f02 movel %d2,%sp@- 423b0: 4eb9 0004 c54c jsr 4c54c the_link.node_access = node->info.hard_link.link_node; 423b6: 2d44 ffe4 movel %d4,%fp@(-28) /* * 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) 423ba: 7801 moveq #1,%d4 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; IMFS_Set_handlers( &the_link ); 423bc: 2f02 movel %d2,%sp@- 423be: 4eb9 0004 8d94 jsr 48d94 /* * 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) 423c4: 206b 004c moveal %a3@(76),%a0 423c8: 4281 clrl %d1 423ca: 4fef 0010 lea %sp@(16),%sp 423ce: 3028 0032 movew %a0@(50),%d0 423d2: 3200 movew %d0,%d1 423d4: b881 cmpl %d1,%d4 423d6: 6616 bnes 423ee { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 423d8: 2f02 movel %d2,%sp@- 423da: 206e ffec moveal %fp@(-20),%a0 423de: 2f03 movel %d3,%sp@- 423e0: 2068 0034 moveal %a0@(52),%a0 423e4: 4e90 jsr %a0@ if ( result != 0 ) 423e6: 508f addql #8,%sp 423e8: 4a80 tstl %d0 423ea: 6720 beqs 4240c 423ec: 6030 bras 4241e return -1; } else { node->info.hard_link.link_node->st_nlink --; 423ee: 5380 subql #1,%d0 423f0: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 423f4: 42a7 clrl %sp@- 423f6: 486e fff8 pea %fp@(-8) 423fa: 4eb9 0004 2a74 jsr 42a74 42400: 206b 004c moveal %a3@(76),%a0 42404: 508f addql #8,%sp 42406: 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 ); 4240c: 206a 0008 moveal %a2@(8),%a0 42410: 2f0a movel %a2,%sp@- 42412: 2f03 movel %d3,%sp@- 42414: 2068 0034 moveal %a0@(52),%a0 42418: 4e90 jsr %a0@ return result; 4241a: 508f addql #8,%sp 4241c: 6002 bras 42420 if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; 4241e: 70ff moveq #-1,%d0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 42420: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 42426: 4e5e unlk %fp ... =============================================================================== 0004242c : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 4242c: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 4242e: 4e56 0000 linkw %fp,#0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42432: 206e 0008 moveal %fp@(8),%a0 42436: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 4243a: b0a8 0048 cmpl %a0@(72),%d0 4243e: 670e beqs 4244e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 42440: 4eb9 0004 bca0 jsr 4bca0 <__errno> <== NOT EXECUTED 42446: 7214 moveq #20,%d1 <== NOT EXECUTED 42448: 2040 moveal %d0,%a0 <== NOT EXECUTED 4244a: 2081 movel %d1,%a0@ <== NOT EXECUTED 4244c: 6012 bras 42460 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 4244e: 4aa8 0058 tstl %a0@(88) 42452: 6610 bnes 42464 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 42454: 4eb9 0004 bca0 jsr 4bca0 <__errno> <== NOT EXECUTED 4245a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4245c: 7016 moveq #22,%d0 <== NOT EXECUTED 4245e: 2080 movel %d0,%a0@ <== NOT EXECUTED 42460: 70ff moveq #-1,%d0 <== NOT EXECUTED 42462: 6006 bras 4246a <== NOT EXECUTED /* * 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; 42464: 42a8 0058 clrl %a0@(88) return 0; 42468: 4280 clrl %d0 } 4246a: 4e5e unlk %fp ... =============================================================================== 00041f60 : /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 41f60: 70ff moveq #-1,%d0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 41f62: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 41f66: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 41f6a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 41f6e: b08a cmpl %a2,%d0 <== NOT EXECUTED 41f70: 6616 bnes 41f88 <== NOT EXECUTED if (!Stack_check_Interrupt_stack.area) 41f72: 4ab9 0005 d9c4 tstl 5d9c4 <== NOT EXECUTED 41f78: 6700 00fe beqw 42078 <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; 41f7c: 49f9 0005 d9c0 lea 5d9c0 ,%a4 <== NOT EXECUTED the_thread = 0; current = 0; 41f82: 4284 clrl %d4 <== 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; 41f84: 95ca subal %a2,%a2 <== NOT EXECUTED 41f86: 6008 bras 41f90 <== NOT EXECUTED current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 41f88: 282a 00f0 movel %a2@(240),%d4 <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 41f8c: 49ea 00b0 lea %a2@(176),%a4 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 41f90: 2614 movel %a4@,%d3 <== 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++) 41f92: 70fc moveq #-4,%d0 <== 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); 41f94: 0683 ffff fff0 addil #-16,%d3 <== NOT EXECUTED { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 41f9a: 206c 0004 moveal %a4@(4),%a0 <== NOT EXECUTED 41f9e: 43e8 0010 lea %a0@(16),%a1 <== 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( 41fa2: 41e8 0020 lea %a0@(32),%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++) 41fa6: c083 andl %d3,%d0 <== NOT EXECUTED 41fa8: 47f1 0810 lea %a1@(00000010,%d0:l),%a3 <== NOT EXECUTED 41fac: 600a bras 41fb8 <== NOT EXECUTED if (*base != U32_PATTERN) 41fae: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 41fb4: b298 cmpl %a0@+,%d1 <== NOT EXECUTED 41fb6: 6608 bnes 41fc0 <== NOT EXECUTED 41fb8: 2008 movel %a0,%d0 <== 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++) 41fba: b7c8 cmpal %a0,%a3 <== NOT EXECUTED 41fbc: 62f0 bhis 41fae <== NOT EXECUTED 41fbe: 600c bras 41fcc <== 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 ) 41fc0: 4a80 tstl %d0 <== NOT EXECUTED 41fc2: 6708 beqs 41fcc <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 41fc4: 2409 movel %a1,%d2 <== NOT EXECUTED 41fc6: d483 addl %d3,%d2 <== NOT EXECUTED 41fc8: 9480 subl %d0,%d2 <== NOT EXECUTED 41fca: 6002 bras 41fce <== NOT EXECUTED else used = 0; 41fcc: 4282 clrl %d2 <== NOT EXECUTED 41fce: 2679 0005 d1ac moveal 5d1ac ,%a3 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 41fd4: 4a8a tstl %a2 <== NOT EXECUTED 41fd6: 672c beqs 42004 <== NOT EXECUTED #endif { (*print_handler)( 41fd8: 486e fffb pea %fp@(-5) <== NOT EXECUTED 41fdc: 4878 0005 pea 5 <== NOT EXECUTED 41fe0: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 41fe4: 4eb9 0004 5a04 jsr 45a04 <== NOT EXECUTED 41fea: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41fec: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 41ff0: 4879 0005 adaa pea 5adaa <== NOT EXECUTED 41ff6: 2f39 0005 d1a8 movel 5d1a8 ,%sp@- <== NOT EXECUTED 41ffc: 4e93 jsr %a3@ <== NOT EXECUTED 41ffe: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 42002: 6016 bras 4201a <== 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 ); 42004: 4878 ffff pea ffffffff <== NOT EXECUTED 42008: 4879 0005 adb7 pea 5adb7 <== NOT EXECUTED 4200e: 2f39 0005 d1a8 movel 5d1a8 ,%sp@- <== NOT EXECUTED 42014: 4e93 jsr %a3@ <== NOT EXECUTED 42016: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 4201a: 206c 0004 moveal %a4@(4),%a0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 4201e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42020: 2f04 movel %d4,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 42022: 2014 movel %a4@,%d0 <== NOT EXECUTED 42024: 5380 subql #1,%d0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 42026: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4202a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4202c: 4879 0005 adc5 pea 5adc5 <== NOT EXECUTED 42032: 2f39 0005 d1a8 movel 5d1a8 ,%sp@- <== NOT EXECUTED 42038: 2079 0005 d1ac moveal 5d1ac ,%a0 <== NOT EXECUTED 4203e: 4e90 jsr %a0@ <== NOT EXECUTED 42040: 2679 0005 d1ac moveal 5d1ac ,%a3 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 42046: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4204a: 4ab9 0005 d1b0 tstl 5d1b0 <== NOT EXECUTED 42050: 6612 bnes 42064 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 42052: 4879 0005 ade3 pea 5ade3 <== NOT EXECUTED 42058: 2f39 0005 d1a8 movel 5d1a8 ,%sp@- <== NOT EXECUTED 4205e: 4e93 jsr %a3@ <== NOT EXECUTED 42060: 508f addql #8,%sp <== NOT EXECUTED 42062: 6014 bras 42078 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 42064: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42066: 4879 0005 adf0 pea 5adf0 <== NOT EXECUTED 4206c: 2f39 0005 d1a8 movel 5d1a8 ,%sp@- <== NOT EXECUTED 42072: 4e93 jsr %a3@ <== NOT EXECUTED 42074: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 42078: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4207e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042082 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 42082: 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 ) 42086: 4ab9 0005 d1b0 tstl 5d1b0 4208c: 6668 bnes 420f6 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 4208e: 203c feed f00d movel #-17960947,%d0 42094: 23c0 0005 d9b0 movel %d0,5d9b0 4209a: 203c 0bad 0d06 movel #195890438,%d0 420a0: 23c0 0005 d9b4 movel %d0,5d9b4 420a6: 203c dead f00d movel #-559026163,%d0 420ac: 23c0 0005 d9b8 movel %d0,5d9b8 420b2: 203c 600d 0d06 movel #1611468038,%d0 420b8: 23c0 0005 d9bc movel %d0,5d9bc /* * 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) { 420be: 2039 0005 dcac movel 5dcac <_Per_CPU_Information>,%d0 420c4: 6728 beqs 420ee <== NEVER TAKEN 420c6: 2239 0005 dcb0 movel 5dcb0 <_Per_CPU_Information+0x4>,%d1 420cc: 6720 beqs 420ee <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 420ce: 9280 subl %d0,%d1 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 420d0: 2f01 movel %d1,%sp@- 420d2: 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; 420d6: 23c0 0005 d9c4 movel %d0,5d9c4 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 420dc: 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 - 420de: 23c1 0005 d9c0 movel %d1,5d9c0 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 420e4: 4eb9 0004 ca94 jsr 4ca94 420ea: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 420ee: 7001 moveq #1,%d0 420f0: 23c0 0005 d1b0 movel %d0,5d1b0 } 420f6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004215c : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 4215c: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 42160: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED 42164: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); 42168: 45f9 0004 3a7c lea 43a7c ,%a2 <== NOT EXECUTED ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); 4216e: 286b 00b4 moveal %a3@(180),%a4 <== NOT EXECUTED char name[32]; printk("BLOWN STACK!!!\n"); 42172: 4879 0005 adf6 pea 5adf6 <== 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) { 42178: 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"); 4217c: 4e92 jsr %a2@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 4217e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 42180: 4879 0005 ae06 pea 5ae06 <== NOT EXECUTED 42186: 4e92 jsr %a2@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 42188: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 4218c: 4879 0005 ae23 pea 5ae23 <== NOT EXECUTED 42192: 4e92 jsr %a2@ <== NOT EXECUTED printk( 42194: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 42198: 4879 0005 ae35 pea 5ae35 <== NOT EXECUTED 4219e: 4e92 jsr %a2@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 421a0: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 421a4: 4878 0020 pea 20 <== NOT EXECUTED 421a8: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 421ac: 4eb9 0004 5a04 jsr 45a04 <== NOT EXECUTED 421b2: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 421b6: 2e80 movel %d0,%sp@ <== NOT EXECUTED 421b8: 4879 0005 ae49 pea 5ae49 <== NOT EXECUTED 421be: 4e92 jsr %a2@ <== 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) 421c0: 206b 00b4 moveal %a3@(180),%a0 <== NOT EXECUTED 421c4: 202b 00b0 movel %a3@(176),%d0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 421c8: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 421cc: 2f08 movel %a0,%sp@- <== NOT EXECUTED 421ce: 2f00 movel %d0,%sp@- <== NOT EXECUTED 421d0: 4879 0005 ae5f pea 5ae5f <== NOT EXECUTED 421d6: 4e92 jsr %a2@ <== 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) { 421d8: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 421dc: 4a02 tstb %d2 <== NOT EXECUTED 421de: 6618 bnes 421f8 <== NOT EXECUTED printk( 421e0: 486c 0018 pea %a4@(24) <== NOT EXECUTED 421e4: 486c 0008 pea %a4@(8) <== NOT EXECUTED 421e8: 4878 0010 pea 10 <== NOT EXECUTED 421ec: 4879 0005 ae90 pea 5ae90 <== NOT EXECUTED 421f2: 4e92 jsr %a2@ <== NOT EXECUTED 421f4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 421f8: 4878 0081 pea 81 <== NOT EXECUTED 421fc: 4eb9 0004 62a0 jsr 462a0 <== NOT EXECUTED =============================================================================== 0004617c <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 4617c: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46180: 2039 0005 d558 movel 5d558 <_Thread_Dispatch_disable_level>,%d0 46186: 5280 addql #1,%d0 46188: 206e 0008 moveal %fp@(8),%a0 4618c: 23c0 0005 d558 movel %d0,5d558 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 46192: 42a7 clrl %sp@- 46194: 2f28 0008 movel %a0@(8),%sp@- 46198: 4868 0010 pea %a0@(16) 4619c: 4eb9 0004 6400 jsr 46400 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 461a2: 4fef 000c lea %sp@(12),%sp } 461a6: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 461a8: 4ef9 0004 7a36 jmp 47a36 <_Thread_Enable_dispatch> ... =============================================================================== 0004cbd0 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4cbd0: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4cbd6: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4cbda: 2279 0005 f9b8 moveal 5f9b8 <_Per_CPU_Information+0xc>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4cbe0: 48d7 001c moveml %d2-%d4,%sp@ 4cbe4: 206e 0008 moveal %fp@(8),%a0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4cbe8: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4cbec: 242e 000c movel %fp@(12),%d2 4cbf0: 262e 0014 movel %fp@(20),%d3 4cbf4: 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 ); 4cbf8: 40c1 movew %sr,%d1 4cbfa: 8081 orl %d1,%d0 4cbfc: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4cbfe: 2028 0048 movel %a0@(72),%d0 4cc02: 5280 addql #1,%d0 4cc04: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4cc08: 4aa8 0040 tstl %a0@(64) 4cc0c: 6626 bnes 4cc34 <_CORE_barrier_Wait+0x64> if ( the_barrier->number_of_waiting_threads == 4cc0e: b0a8 0044 cmpl %a0@(68),%d0 4cc12: 6620 bnes 4cc34 <_CORE_barrier_Wait+0x64> the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4cc14: 7001 moveq #1,%d0 4cc16: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4cc1a: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4cc1c: 2d44 0010 movel %d4,%fp@(16) 4cc20: 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 ); } 4cc24: 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 ); 4cc28: 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 ); } 4cc2c: 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 ); 4cc2e: 4ef9 0004 cb9c jmp 4cb9c <_CORE_barrier_Release> 4cc34: 7001 moveq #1,%d0 4cc36: 2140 0030 movel %d0,%a0@(48) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4cc3a: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 4cc3e: 2342 0020 movel %d2,%a1@(32) _ISR_Enable( level ); 4cc42: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4cc44: 2d43 000c movel %d3,%fp@(12) 4cc48: 203c 0004 9cec movel #302316,%d0 4cc4e: 2d48 0008 movel %a0,%fp@(8) } 4cc52: 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 ); 4cc56: 2d40 0010 movel %d0,%fp@(16) } 4cc5a: 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 ); 4cc5c: 4ef9 0004 99d8 jmp 499d8 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 0004e02c <_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)) { 4e02c: 7003 moveq #3,%d0 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 ) { 4e02e: 4e56 fff4 linkw %fp,#-12 4e032: 222e 0014 movel %fp@(20),%d1 4e036: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4e03a: 246e 0008 moveal %fp@(8),%a2 4e03e: 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)) { 4e042: c081 andl %d1,%d0 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4e044: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4e048: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4e04c: 2541 004c movel %d1,%a2@(76) /* * 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)) { 4e050: 4a80 tstl %d0 4e052: 670e beqs 4e062 <_CORE_message_queue_Initialize+0x36> allocated_message_size += sizeof(uint32_t); 4e054: 2001 movel %d1,%d0 4e056: 5880 addql #4,%d0 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4e058: 76fc moveq #-4,%d3 4e05a: c083 andl %d3,%d0 } if (allocated_message_size < maximum_message_size) 4e05c: b280 cmpl %d0,%d1 4e05e: 6272 bhis 4e0d2 <_CORE_message_queue_Initialize+0xa6><== NEVER TAKEN 4e060: 6002 bras 4e064 <_CORE_message_queue_Initialize+0x38> /* * 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)) { 4e062: 2001 movel %d1,%d0 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 4e064: 2600 movel %d0,%d3 4e066: 0683 0000 0010 addil #16,%d3 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 4e06c: 2203 movel %d3,%d1 4e06e: 4c02 1800 mulsl %d2,%d1 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4e072: b081 cmpl %d1,%d0 4e074: 625c bhis 4e0d2 <_CORE_message_queue_Initialize+0xa6><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 4e076: 2f01 movel %d1,%sp@- 4e078: 4eb9 0005 0998 jsr 50998 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) 4e07e: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4e080: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4e084: 674c beqs 4e0d2 <_CORE_message_queue_Initialize+0xa6> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4e086: 2f03 movel %d3,%sp@- 4e088: 2f02 movel %d2,%sp@- 4e08a: 2f00 movel %d0,%sp@- 4e08c: 486a 0060 pea %a2@(96) 4e090: 4eb9 0005 22f0 jsr 522f0 <_Chain_Initialize> 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 ); 4e096: 41ea 0054 lea %a2@(84),%a0 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4e09a: 7001 moveq #1,%d0 4e09c: 2548 0050 movel %a0,%a2@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4e0a0: 41ea 0050 lea %a2@(80),%a0 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 4e0a4: 42aa 0054 clrl %a2@(84) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4e0a8: 2548 0058 movel %a0,%a2@(88) 4e0ac: 4878 0006 pea 6 4e0b0: 206e 000c moveal %fp@(12),%a0 4e0b4: 4878 0080 pea 80 4e0b8: b090 cmpl %a0@,%d0 4e0ba: 57c0 seq %d0 4e0bc: 49c0 extbl %d0 4e0be: 4480 negl %d0 4e0c0: 2f00 movel %d0,%sp@- 4e0c2: 2f0a movel %a2,%sp@- 4e0c4: 4eb9 0005 0128 jsr 50128 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4e0ca: 4fef 0020 lea %sp@(32),%sp 4e0ce: 7001 moveq #1,%d0 4e0d0: 6002 bras 4e0d4 <_CORE_message_queue_Initialize+0xa8> */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) return false; 4e0d2: 4200 clrb %d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 4e0d4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4e0da: 4e5e unlk %fp ... =============================================================================== 0004e0e0 <_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 ); 4e0e0: 223c 0000 0700 movel #1792,%d1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4e0e6: 4e56 ffe0 linkw %fp,#-32 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4e0ea: 2079 0006 61ac moveal 661ac <_Per_CPU_Information+0xc>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4e0f0: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4e0f4: 246e 0008 moveal %fp@(8),%a2 4e0f8: 282e 000c movel %fp@(12),%d4 4e0fc: 242e 0010 movel %fp@(16),%d2 4e100: 226e 0014 moveal %fp@(20),%a1 4e104: 262e 001c movel %fp@(28),%d3 4e108: 1a2e 001b moveb %fp@(27),%d5 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; 4e10c: 42a8 0034 clrl %a0@(52) _ISR_Disable( level ); 4e110: 40c0 movew %sr,%d0 4e112: 8280 orl %d0,%d1 4e114: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4e116: 220a movel %a2,%d1 4e118: 0681 0000 0054 addil #84,%d1 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 ); } 4e11e: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 4e122: b28b cmpl %a3,%d1 4e124: 6752 beqs 4e178 <_CORE_message_queue_Seize+0x98> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 4e126: 2853 moveal %a3@,%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4e128: 4bea 0050 lea %a2@(80),%a5 Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 4e12c: 254c 0050 movel %a4,%a2@(80) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4e130: 294d 0004 movel %a5,%a4@(4) executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 4e134: 4a8b tstl %a3 4e136: 6740 beqs 4e178 <_CORE_message_queue_Seize+0x98> <== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 4e138: 53aa 0048 subql #1,%a2@(72) _ISR_Enable( level ); 4e13c: 46c0 movew %d0,%sr *size_p = the_message->Contents.size; 4e13e: 22ab 0008 movel %a3@(8),%a1@ _Thread_Executing->Wait.count = 4e142: 2079 0006 61ac moveal 661ac <_Per_CPU_Information+0xc>,%a0 4e148: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4e14c: 2f11 movel %a1@,%sp@- 4e14e: 486b 000c pea %a3@(12) 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 ); 4e152: 45ea 0060 lea %a2@(96),%a2 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4e156: 2f02 movel %d2,%sp@- 4e158: 4eb9 0005 4654 jsr 54654 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 ); 4e15e: 4fef 000c lea %sp@(12),%sp 4e162: 2d4b 000c movel %a3,%fp@(12) 4e166: 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 ); } 4e16a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4e170: 4e5e unlk %fp 4e172: 4ef9 0004 df68 jmp 4df68 <_Chain_Append> return; } #endif } if ( !wait ) { 4e178: 4a05 tstb %d5 4e17a: 6612 bnes 4e18e <_CORE_message_queue_Seize+0xae> _ISR_Enable( level ); 4e17c: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4e17e: 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 ); } 4e180: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4e186: 2140 0034 movel %d0,%a0@(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 ); } 4e18a: 4e5e unlk %fp 4e18c: 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; 4e18e: 7201 moveq #1,%d1 4e190: 2541 0030 movel %d1,%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; 4e194: 2142 002c movel %d2,%a0@(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; 4e198: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; 4e19c: 2144 0020 movel %d4,%a0@(32) executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 4e1a0: 2149 0028 movel %a1,%a0@(40) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 4e1a4: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4e1a6: 4bf9 0005 01f8 lea 501f8 <_Thread_queue_Timeout>,%a5 4e1ac: 2d43 000c movel %d3,%fp@(12) 4e1b0: 2d4d 0010 movel %a5,%fp@(16) 4e1b4: 2d4a 0008 movel %a2,%fp@(8) } 4e1b8: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4e1be: 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 ); 4e1c0: 4ef9 0004 fee4 jmp 4fee4 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 0004635c <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 4635c: 4e56 0000 linkw %fp,#0 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 46360: 2039 0005 d558 movel 5d558 <_Thread_Dispatch_disable_level>,%d0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 46366: 2f0a movel %a2,%sp@- 46368: 246e 0008 moveal %fp@(8),%a2 4636c: 2f02 movel %d2,%sp@- 4636e: 142e 0013 moveb %fp@(19),%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 46372: 4a80 tstl %d0 46374: 671c beqs 46392 <_CORE_mutex_Seize+0x36> 46376: 4a02 tstb %d2 46378: 6718 beqs 46392 <_CORE_mutex_Seize+0x36> <== NEVER TAKEN 4637a: 7001 moveq #1,%d0 4637c: b0b9 0005 d6a0 cmpl 5d6a0 <_System_state_Current>,%d0 46382: 640e bccs 46392 <_CORE_mutex_Seize+0x36> 46384: 4878 0012 pea 12 46388: 42a7 clrl %sp@- 4638a: 42a7 clrl %sp@- 4638c: 4eb9 0004 69b0 jsr 469b0 <_Internal_error_Occurred> 46392: 486e 0018 pea %fp@(24) 46396: 2f0a movel %a2,%sp@- 46398: 4eb9 0004 a274 jsr 4a274 <_CORE_mutex_Seize_interrupt_trylock> 4639e: 508f addql #8,%sp 463a0: 4a80 tstl %d0 463a2: 6750 beqs 463f4 <_CORE_mutex_Seize+0x98> 463a4: 4a02 tstb %d2 463a6: 6614 bnes 463bc <_CORE_mutex_Seize+0x60> 463a8: 202e 0018 movel %fp@(24),%d0 463ac: 46c0 movew %d0,%sr 463ae: 2079 0005 d6f4 moveal 5d6f4 <_Per_CPU_Information+0xc>,%a0 463b4: 7001 moveq #1,%d0 463b6: 2140 0034 movel %d0,%a0@(52) 463ba: 6038 bras 463f4 <_CORE_mutex_Seize+0x98> 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; 463bc: 7001 moveq #1,%d0 463be: 2079 0005 d6f4 moveal 5d6f4 <_Per_CPU_Information+0xc>,%a0 463c4: 2540 0030 movel %d0,%a2@(48) 463c8: 2039 0005 d558 movel 5d558 <_Thread_Dispatch_disable_level>,%d0 463ce: 5280 addql #1,%d0 463d0: 216e 000c 0020 movel %fp@(12),%a0@(32) 463d6: 214a 0044 movel %a2,%a0@(68) 463da: 23c0 0005 d558 movel %d0,5d558 <_Thread_Dispatch_disable_level> 463e0: 202e 0018 movel %fp@(24),%d0 463e4: 46c0 movew %d0,%sr 463e6: 2f2e 0014 movel %fp@(20),%sp@- 463ea: 2f0a movel %a2,%sp@- 463ec: 4eb9 0004 62f8 jsr 462f8 <_CORE_mutex_Seize_interrupt_blocking> 463f2: 508f addql #8,%sp } 463f4: 242e fff8 movel %fp@(-8),%d2 463f8: 246e fffc moveal %fp@(-4),%a2 463fc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046538 <_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 ) { 46538: 4e56 0000 linkw %fp,#0 4653c: 2f0a movel %a2,%sp@- 4653e: 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)) ) { 46542: 2f0a movel %a2,%sp@- 46544: 4eb9 0004 7cf8 jsr 47cf8 <_Thread_queue_Dequeue> 4654a: 588f addql #4,%sp 4654c: 4a80 tstl %d0 4654e: 6624 bnes 46574 <_CORE_semaphore_Surrender+0x3c> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 46550: 303c 0700 movew #1792,%d0 46554: 40c1 movew %sr,%d1 46556: 8081 orl %d1,%d0 46558: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 4655a: 202a 0048 movel %a2@(72),%d0 4655e: b0aa 0040 cmpl %a2@(64),%d0 46562: 640a bccs 4656e <_CORE_semaphore_Surrender+0x36> <== NEVER TAKEN the_semaphore->count += 1; 46564: 5280 addql #1,%d0 46566: 2540 0048 movel %d0,%a2@(72) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 4656a: 4280 clrl %d0 4656c: 6002 bras 46570 <_CORE_semaphore_Surrender+0x38> } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 4656e: 7004 moveq #4,%d0 <== NOT EXECUTED _ISR_Enable( level ); 46570: 46c1 movew %d1,%sr 46572: 6002 bras 46576 <_CORE_semaphore_Surrender+0x3e> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 46574: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46576: 246e fffc moveal %fp@(-4),%a2 4657a: 4e5e unlk %fp ... =============================================================================== 00045458 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 45458: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 4545e: 4e56 ffe8 linkw %fp,#-24 45462: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 45466: 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 ]; 4546a: 206a 00fc moveal %a2@(252),%a0 option_set = (rtems_option) the_thread->Wait.option; 4546e: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 45472: 40c1 movew %sr,%d1 45474: 8081 orl %d1,%d0 45476: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 45478: 262a 0024 movel %a2@(36),%d3 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 ); 4547c: 2003 movel %d3,%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; 4547e: 2410 movel %a0@,%d2 45480: 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 ) ) { 45482: 6606 bnes 4548a <_Event_Surrender+0x32> _ISR_Enable( level ); 45484: 46c1 movew %d1,%sr return; 45486: 6000 00ca braw 45552 <_Event_Surrender+0xfa> /* * 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() && 4548a: 4ab9 0005 d6f0 tstl 5d6f0 <_Per_CPU_Information+0x8> 45490: 674a beqs 454dc <_Event_Surrender+0x84> 45492: b5f9 0005 d6f4 cmpal 5d6f4 <_Per_CPU_Information+0xc>,%a2 45498: 6642 bnes 454dc <_Event_Surrender+0x84> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 4549a: 2279 0005 d728 moveal 5d728 <_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 ) && 454a0: 7a02 moveq #2,%d5 454a2: ba89 cmpl %a1,%d5 454a4: 670e beqs 454b4 <_Event_Surrender+0x5c> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 454a6: 2279 0005 d728 moveal 5d728 <_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) || 454ac: 1a3c 0001 moveb #1,%d5 454b0: ba89 cmpl %a1,%d5 454b2: 6628 bnes 454dc <_Event_Surrender+0x84> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 454b4: b680 cmpl %d0,%d3 454b6: 6706 beqs 454be <_Event_Surrender+0x66> 454b8: 0804 0001 btst #1,%d4 454bc: 671a beqs 454d8 <_Event_Surrender+0x80> <== NEVER TAKEN 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) ); 454be: 2600 movel %d0,%d3 454c0: 4683 notl %d3 454c2: c682 andl %d2,%d3 454c4: 2083 movel %d3,%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; 454c6: 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; 454ca: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 454ce: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 454d0: 7003 moveq #3,%d0 454d2: 23c0 0005 d728 movel %d0,5d728 <_Event_Sync_state> } _ISR_Enable( level ); 454d8: 46c1 movew %d1,%sr return; 454da: 6076 bras 45552 <_Event_Surrender+0xfa> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); 454dc: 2a2a 0010 movel %a2@(16),%d5 454e0: 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 ) ) { 454e6: 6768 beqs 45550 <_Event_Surrender+0xf8> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 454e8: b680 cmpl %d0,%d3 454ea: 6706 beqs 454f2 <_Event_Surrender+0x9a> 454ec: 0804 0001 btst #1,%d4 454f0: 675e beqs 45550 <_Event_Surrender+0xf8> <== NEVER TAKEN 454f2: 2600 movel %d0,%d3 454f4: 4683 notl %d3 454f6: c682 andl %d2,%d3 454f8: 2083 movel %d3,%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; 454fa: 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; 454fe: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45502: 2080 movel %d0,%a0@ _ISR_Flash( level ); 45504: 203c 0000 0700 movel #1792,%d0 4550a: 46c1 movew %d1,%sr 4550c: 8081 orl %d1,%d0 4550e: 46c0 movew %d0,%sr 45510: 47f9 0004 76f4 lea 476f4 <_Thread_Clear_state>,%a3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 45516: 7a02 moveq #2,%d5 45518: baaa 0050 cmpl %a2@(80),%d5 4551c: 6710 beqs 4552e <_Event_Surrender+0xd6> _ISR_Enable( level ); 4551e: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 45520: 2f3c 1003 fff8 movel #268697592,%sp@- 45526: 2f0a movel %a2,%sp@- 45528: 4e93 jsr %a3@ 4552a: 508f addql #8,%sp 4552c: 6024 bras 45552 <_Event_Surrender+0xfa> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4552e: 7003 moveq #3,%d0 45530: 2540 0050 movel %d0,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 45534: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 45536: 486a 0048 pea %a2@(72) 4553a: 4eb9 0004 8794 jsr 48794 <_Watchdog_Remove> 45540: 2f3c 1003 fff8 movel #268697592,%sp@- 45546: 2f0a movel %a2,%sp@- 45548: 4e93 jsr %a3@ 4554a: 4fef 000c lea %sp@(12),%sp 4554e: 6002 bras 45552 <_Event_Surrender+0xfa> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 45550: 46c1 movew %d1,%sr } 45552: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 45558: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004555c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 4555c: 4e56 fffc linkw %fp,#-4 45560: 2f03 movel %d3,%sp@- 45562: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 45564: 486e fffc pea %fp@(-4) 45568: 2f2e 0008 movel %fp@(8),%sp@- 4556c: 4eb9 0004 7a5c jsr 47a5c <_Thread_Get> switch ( location ) { 45572: 508f addql #8,%sp 45574: 4aae fffc tstl %fp@(-4) 45578: 6656 bnes 455d0 <_Event_Timeout+0x74> <== 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 ); 4557a: 223c 0000 0700 movel #1792,%d1 45580: 40c2 movew %sr,%d2 45582: 8282 orl %d2,%d1 45584: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 45586: 2040 moveal %d0,%a0 45588: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 4558c: b0b9 0005 d6f4 cmpl 5d6f4 <_Per_CPU_Information+0xc>,%d0 45592: 6614 bnes 455a8 <_Event_Timeout+0x4c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 45594: 2239 0005 d728 movel 5d728 <_Event_Sync_state>,%d1 4559a: 7601 moveq #1,%d3 4559c: b681 cmpl %d1,%d3 4559e: 6608 bnes 455a8 <_Event_Timeout+0x4c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 455a0: 7202 moveq #2,%d1 455a2: 23c1 0005 d728 movel %d1,5d728 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; 455a8: 7606 moveq #6,%d3 455aa: 2040 moveal %d0,%a0 455ac: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 455b0: 46c2 movew %d2,%sr 455b2: 2f3c 1003 fff8 movel #268697592,%sp@- 455b8: 2f00 movel %d0,%sp@- 455ba: 4eb9 0004 76f4 jsr 476f4 <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 455c0: 508f addql #8,%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 455c2: 2039 0005 d558 movel 5d558 <_Thread_Dispatch_disable_level>,%d0 455c8: 5380 subql #1,%d0 455ca: 23c0 0005 d558 movel %d0,5d558 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 455d0: 242e fff4 movel %fp@(-12),%d2 455d4: 262e fff8 movel %fp@(-8),%d3 455d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a838 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 4a838: 4e56 ffcc linkw %fp,#-52 4a83c: 202e 0010 movel %fp@(16),%d0 4a840: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4a844: 246e 0008 moveal %fp@(8),%a2 4a848: 262e 000c movel %fp@(12),%d3 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; 4a84c: 2403 movel %d3,%d2 4a84e: d480 addl %d0,%d2 uintptr_t const free_size = stats->free_size; 4a850: 206a 0030 moveal %a2@(48),%a0 uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 4a854: 282a 0020 movel %a2@(32),%d4 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; 4a858: 2a2a 0010 movel %a2@(16),%d5 uintptr_t const min_block_size = heap->min_block_size; 4a85c: 222a 0014 movel %a2@(20),%d1 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; 4a860: 42ae fffc clrl %fp@(-4) Heap_Block *extend_last_block = NULL; 4a864: 42ae fff8 clrl %fp@(-8) 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; uintptr_t const free_size = stats->free_size; 4a868: 2d48 fff4 movel %a0,%fp@(-12) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 4a86c: b682 cmpl %d2,%d3 4a86e: 6200 01aa bhiw 4aa1a <_Heap_Extend+0x1e2> return false; } extend_area_ok = _Heap_Get_first_and_last_block( 4a872: 486e fff8 pea %fp@(-8) 4a876: 486e fffc pea %fp@(-4) 4a87a: 2f01 movel %d1,%sp@- 4a87c: 2f05 movel %d5,%sp@- 4a87e: 2f00 movel %d0,%sp@- 4a880: 2f03 movel %d3,%sp@- 4a882: 4eb9 0004 6a6e jsr 46a6e <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 4a888: 4fef 0018 lea %sp@(24),%sp 4a88c: 4a00 tstb %d0 4a88e: 6700 018a beqw 4aa1a <_Heap_Extend+0x1e2> 4a892: 2044 moveal %d4,%a0 4a894: 9bcd subal %a5,%a5 4a896: 4281 clrl %d1 4a898: 97cb subal %a3,%a3 4a89a: 99cc subal %a4,%a4 return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4a89c: b888 cmpl %a0,%d4 4a89e: 6704 beqs 4a8a4 <_Heap_Extend+0x6c> 4a8a0: 2248 moveal %a0,%a1 4a8a2: 6004 bras 4a8a8 <_Heap_Extend+0x70> 4a8a4: 226a 0018 moveal %a2@(24),%a1 uintptr_t const sub_area_end = start_block->prev_size; 4a8a8: 2010 movel %a0@,%d0 Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 4a8aa: b680 cmpl %d0,%d3 4a8ac: 6406 bccs 4a8b4 <_Heap_Extend+0x7c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 4a8ae: b3c2 cmpal %d2,%a1 4a8b0: 6500 0168 bcsw 4aa1a <_Heap_Extend+0x1e2> ) { return false; } if ( extend_area_end == sub_area_begin ) { 4a8b4: b3c2 cmpal %d2,%a1 4a8b6: 6706 beqs 4a8be <_Heap_Extend+0x86> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4a8b8: b082 cmpl %d2,%d0 4a8ba: 6206 bhis 4a8c2 <_Heap_Extend+0x8a> 4a8bc: 6006 bras 4a8c4 <_Heap_Extend+0x8c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 4a8be: 2848 moveal %a0,%a4 4a8c0: 6002 bras 4a8c4 <_Heap_Extend+0x8c> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4a8c2: 2208 movel %a0,%d1 4a8c4: 2e00 movel %d0,%d7 4a8c6: 2240 moveal %d0,%a1 4a8c8: 5189 subql #8,%a1 4a8ca: 4c45 7006 remul %d5,%d6,%d7 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4a8ce: 93c6 subal %d6,%a1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 4a8d0: b680 cmpl %d0,%d3 4a8d2: 6606 bnes 4a8da <_Heap_Extend+0xa2> start_block->prev_size = extend_area_end; 4a8d4: 2082 movel %d2,%a0@ 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 ) 4a8d6: 2649 moveal %a1,%a3 4a8d8: 6006 bras 4a8e0 <_Heap_Extend+0xa8> merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 4a8da: b680 cmpl %d0,%d3 4a8dc: 6302 blss 4a8e0 <_Heap_Extend+0xa8> 4a8de: 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; 4a8e0: 70fe moveq #-2,%d0 4a8e2: 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); 4a8e6: 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 ); 4a8ea: b888 cmpl %a0,%d4 4a8ec: 66ae bnes 4a89c <_Heap_Extend+0x64> if ( extend_area_begin < heap->area_begin ) { 4a8ee: b6aa 0018 cmpl %a2@(24),%d3 4a8f2: 6406 bccs 4a8fa <_Heap_Extend+0xc2> heap->area_begin = extend_area_begin; 4a8f4: 2543 0018 movel %d3,%a2@(24) 4a8f8: 600a bras 4a904 <_Heap_Extend+0xcc> } else if ( heap->area_end < extend_area_end ) { 4a8fa: b4aa 001c cmpl %a2@(28),%d2 4a8fe: 6304 blss 4a904 <_Heap_Extend+0xcc> heap->area_end = extend_area_end; 4a900: 2542 001c movel %d2,%a2@(28) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4a904: 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 = 4a908: 2008 movel %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; 4a90a: 7801 moveq #1,%d4 } 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; 4a90c: 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 = 4a910: 9089 subl %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; 4a912: 8880 orl %d0,%d4 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 4a914: 2282 movel %d2,%a1@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4a916: 2344 0004 movel %d4,%a1@(4) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 4a91a: 2080 movel %d0,%a0@ extend_last_block->size_and_flag = 0; 4a91c: 42a8 0004 clrl %a0@(4) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4a920: b3ea 0020 cmpal %a2@(32),%a1 4a924: 6406 bccs 4a92c <_Heap_Extend+0xf4> heap->first_block = extend_first_block; 4a926: 2549 0020 movel %a1,%a2@(32) 4a92a: 600a bras 4a936 <_Heap_Extend+0xfe> } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 4a92c: b1ea 0024 cmpal %a2@(36),%a0 4a930: 6304 blss 4a936 <_Heap_Extend+0xfe> heap->last_block = extend_last_block; 4a932: 2548 0024 movel %a0,%a2@(36) } if ( merge_below_block != NULL ) { 4a936: 4a8c tstl %a4 4a938: 6732 beqs 4a96c <_Heap_Extend+0x134> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 4a93a: 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 ); 4a93e: 5083 addql #8,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 4a940: 2803 movel %d3,%d4 4a942: 4c40 4001 remul %d0,%d1,%d4 if ( remainder != 0 ) { 4a946: 4a81 tstl %d1 4a948: 6704 beqs 4a94e <_Heap_Extend+0x116> return value - remainder + alignment; 4a94a: d680 addl %d0,%d3 4a94c: 9681 subl %d1,%d3 uintptr_t const new_first_block_begin = 4a94e: 2043 moveal %d3,%a0 4a950: 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 = 4a952: 200c movel %a4,%d0 4a954: 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; 4a956: 7201 moveq #1,%d1 4a958: 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; 4a95a: 2094 movel %a4@,%a0@ new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4a95c: 2141 0004 movel %d1,%a0@(4) _Heap_Free_block( heap, new_first_block ); 4a960: 2f08 movel %a0,%sp@- 4a962: 2f0a movel %a2,%sp@- 4a964: 4eba feb6 jsr %pc@(4a81c <_Heap_Free_block>) 4a968: 508f addql #8,%sp 4a96a: 6012 bras 4a97e <_Heap_Extend+0x146> 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 ) { 4a96c: 4a81 tstl %d1 4a96e: 670e beqs 4a97e <_Heap_Extend+0x146> _Heap_Link_below( 4a970: 206e fff8 moveal %fp@(-8),%a0 { 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; 4a974: 7801 moveq #1,%d4 4a976: 9288 subl %a0,%d1 4a978: 8881 orl %d1,%d4 4a97a: 2144 0004 movel %d4,%a0@(4) link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 4a97e: 4a8b tstl %a3 4a980: 6734 beqs 4a9b6 <_Heap_Extend+0x17e> ) { 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, 4a982: 5182 subql #8,%d2 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( 4a984: 948b subl %a3,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4a986: 2202 movel %d2,%d1 4a988: 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; 4a98e: 7201 moveq #1,%d1 4a990: 9480 subl %d0,%d2 ); 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) 4a992: 202b 0004 movel %a3@(4),%d0 4a996: 9082 subl %d2,%d0 | HEAP_PREV_BLOCK_USED; 4a998: 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; 4a99a: 7001 moveq #1,%d0 4a99c: 2781 2804 movel %d1,%a3@(00000004,%d2:l) 4a9a0: c0ab 0004 andl %a3@(4),%d0 block->size_and_flag = size | flag; 4a9a4: 8480 orl %d0,%d2 4a9a6: 2742 0004 movel %d2,%a3@(4) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 4a9aa: 2f0b movel %a3,%sp@- 4a9ac: 2f0a movel %a2,%sp@- 4a9ae: 4eba fe6c jsr %pc@(4a81c <_Heap_Free_block>) 4a9b2: 508f addql #8,%sp 4a9b4: 6020 bras 4a9d6 <_Heap_Extend+0x19e> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 4a9b6: 4a8d tstl %a5 4a9b8: 671c beqs 4a9d6 <_Heap_Extend+0x19e> 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; 4a9ba: 7001 moveq #1,%d0 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; 4a9bc: 7801 moveq #1,%d4 ) { 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 ); 4a9be: 222e fffc movel %fp@(-4),%d1 4a9c2: 928d subl %a5,%d1 4a9c4: c0ad 0004 andl %a5@(4),%d0 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( 4a9c8: 206e fff8 moveal %fp@(-8),%a0 block->size_and_flag = size | flag; 4a9cc: 8280 orl %d0,%d1 4a9ce: 2b41 0004 movel %d1,%a5@(4) 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; 4a9d2: 89a8 0004 orl %d4,%a0@(4) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4a9d6: 4a8c tstl %a4 4a9d8: 6610 bnes 4a9ea <_Heap_Extend+0x1b2> 4a9da: 4a8b tstl %a3 4a9dc: 660c bnes 4a9ea <_Heap_Extend+0x1b2> _Heap_Free_block( heap, extend_first_block ); 4a9de: 2f2e fffc movel %fp@(-4),%sp@- 4a9e2: 2f0a movel %a2,%sp@- 4a9e4: 4eba fe36 jsr %pc@(4a81c <_Heap_Free_block>) 4a9e8: 508f addql #8,%sp */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block 4a9ea: 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; 4a9ee: 7001 moveq #1,%d0 * 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( 4a9f0: 222a 0020 movel %a2@(32),%d1 4a9f4: 9288 subl %a0,%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; 4a9f6: c0a8 0004 andl %a0@(4),%d0 block->size_and_flag = size | flag; 4a9fa: 8280 orl %d0,%d1 } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 4a9fc: 202a 0030 movel %a2@(48),%d0 4aa00: 90ae fff4 subl %fp@(-12),%d0 4aa04: 2141 0004 movel %d1,%a0@(4) /* Statistics */ stats->size += extended_size; 4aa08: d1aa 002c addl %d0,%a2@(44) if ( extended_size_ptr != NULL ) 4aa0c: 4aae 0014 tstl %fp@(20) 4aa10: 670c beqs 4aa1e <_Heap_Extend+0x1e6> <== NEVER TAKEN *extended_size_ptr = extended_size; 4aa12: 206e 0014 moveal %fp@(20),%a0 4aa16: 2080 movel %d0,%a0@ 4aa18: 6004 bras 4aa1e <_Heap_Extend+0x1e6> _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; 4aa1a: 4200 clrb %d0 4aa1c: 6002 bras 4aa20 <_Heap_Extend+0x1e8> stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 4aa1e: 7001 moveq #1,%d0 } 4aa20: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4aa26: 4e5e unlk %fp ... =============================================================================== 0004a53c <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4a53c: 4e56 ffe8 linkw %fp,#-24 4a540: 206e 0008 moveal %fp@(8),%a0 4a544: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4a548: 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 ) { 4a54c: 6700 0150 beqw 4a69e <_Heap_Free+0x162> 4a550: 2240 moveal %d0,%a1 4a552: 5189 subql #8,%a1 4a554: 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 4a55a: 2828 0020 movel %a0@(32),%d4 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4a55e: 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; 4a560: b889 cmpl %a1,%d4 4a562: 620c bhis 4a570 <_Heap_Free+0x34> 4a564: b3e8 0024 cmpal %a0@(36),%a1 4a568: 53c0 sls %d0 4a56a: 49c0 extbl %d0 4a56c: 4480 negl %d0 4a56e: 6002 bras 4a572 <_Heap_Free+0x36> 4a570: 4280 clrl %d0 } alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { 4a572: 4a00 tstb %d0 4a574: 6700 012c beqw 4a6a2 <_Heap_Free+0x166> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4a578: 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; 4a57c: 70fe moveq #-2,%d0 4a57e: c083 andl %d3,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4a580: 45f1 0800 lea %a1@(00000000,%d0: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; 4a584: b88a cmpl %a2,%d4 4a586: 620c bhis 4a594 <_Heap_Free+0x58> <== NEVER TAKEN 4a588: b5e8 0024 cmpal %a0@(36),%a2 4a58c: 53c1 sls %d1 4a58e: 49c1 extbl %d1 4a590: 4481 negl %d1 4a592: 6002 bras 4a596 <_Heap_Free+0x5a> 4a594: 4281 clrl %d1 <== NOT EXECUTED _Heap_Protection_block_check( heap, block ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 4a596: 4a01 tstb %d1 4a598: 6700 0108 beqw 4a6a2 <_Heap_Free+0x166> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4a59c: 242a 0004 movel %a2@(4),%d2 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 4a5a0: 0802 0000 btst #0,%d2 4a5a4: 6700 00fc beqw 4a6a2 <_Heap_Free+0x166> - 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; 4a5a8: 72fe moveq #-2,%d1 if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4a5aa: 2668 0024 moveal %a0@(36),%a3 4a5ae: c481 andl %d1,%d2 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4a5b0: b7ca cmpal %a2,%a3 4a5b2: 670c beqs 4a5c0 <_Heap_Free+0x84> 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; 4a5b4: 7201 moveq #1,%d1 4a5b6: c2b2 2804 andl %a2@(00000004,%d2:l),%d1 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4a5ba: 5381 subql #1,%d1 4a5bc: 4481 negl %d1 4a5be: 6002 bras 4a5c2 <_Heap_Free+0x86> 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 )); 4a5c0: 4281 clrl %d1 if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4a5c2: 1a01 moveb %d1,%d5 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4a5c4: 0803 0000 btst #0,%d3 4a5c8: 6662 bnes 4a62c <_Heap_Free+0xf0> uintptr_t const prev_size = block->prev_size; 4a5ca: 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); 4a5cc: 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; 4a5ce: b889 cmpl %a1,%d4 4a5d0: 620a bhis 4a5dc <_Heap_Free+0xa0> <== NEVER TAKEN 4a5d2: b3cb cmpal %a3,%a1 4a5d4: 53c1 sls %d1 4a5d6: 49c1 extbl %d1 4a5d8: 4481 negl %d1 4a5da: 6002 bras 4a5de <_Heap_Free+0xa2> 4a5dc: 4281 clrl %d1 <== NOT EXECUTED Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 4a5de: 4a01 tstb %d1 4a5e0: 6700 00c0 beqw 4a6a2 <_Heap_Free+0x166> 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; 4a5e4: 7201 moveq #1,%d1 4a5e6: c2a9 0004 andl %a1@(4),%d1 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) ) { 4a5ea: 6700 00b6 beqw 4a6a2 <_Heap_Free+0x166> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4a5ee: 4a05 tstb %d5 4a5f0: 6726 beqs 4a618 <_Heap_Free+0xdc> return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4a5f2: 266a 0008 moveal %a2@(8),%a3 uintptr_t const size = block_size + prev_size + next_block_size; 4a5f6: d480 addl %d0,%d2 4a5f8: d682 addl %d2,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a5fa: 7401 moveq #1,%d2 Heap_Block *prev = block->prev; 4a5fc: 246a 000c moveal %a2@(12),%a2 prev->next = next; 4a600: 254b 0008 movel %a3,%a2@(8) 4a604: 8483 orl %d3,%d2 next->prev = prev; 4a606: 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; 4a60a: 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; 4a60e: 2383 3800 movel %d3,%a1@(00000000,%d3: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; 4a612: 2342 0004 movel %d2,%a1@(4) 4a616: 607a bras 4a692 <_Heap_Free+0x156> 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; 4a618: d680 addl %d0,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a61a: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a61c: 74fe moveq #-2,%d2 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; 4a61e: 8283 orl %d3,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4a620: 2483 movel %d3,%a2@ 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; 4a622: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a626: c5aa 0004 andl %d2,%a2@(4) 4a62a: 6066 bras 4a692 <_Heap_Free+0x156> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4a62c: 4a01 tstb %d1 4a62e: 672a beqs 4a65a <_Heap_Free+0x11e> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4a630: 266a 0008 moveal %a2@(8),%a3 uintptr_t const size = block_size + next_block_size; 4a634: 2202 movel %d2,%d1 4a636: d280 addl %d0,%d1 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a638: 7401 moveq #1,%d2 Heap_Block *prev = old_block->prev; 4a63a: 246a 000c moveal %a2@(12),%a2 new_block->next = next; 4a63e: 234b 0008 movel %a3,%a1@(8) 4a642: 8481 orl %d1,%d2 new_block->prev = prev; 4a644: 234a 000c movel %a2,%a1@(12) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4a648: 2381 1800 movel %d1,%a1@(00000000,%d1:l) next->prev = new_block; 4a64c: 2749 000c movel %a1,%a3@(12) prev->next = new_block; 4a650: 2549 0008 movel %a1,%a2@(8) 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; 4a654: 2342 0004 movel %d2,%a1@(4) 4a658: 6038 bras 4a692 <_Heap_Free+0x156> 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; 4a65a: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a65c: 74fe moveq #-2,%d2 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; 4a65e: 8280 orl %d0,%d1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4a660: 2668 0008 moveal %a0@(8),%a3 new_block->next = next; new_block->prev = block_before; 4a664: 2348 000c movel %a0,%a1@(12) 4a668: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4a66c: 2228 0038 movel %a0@(56),%d1 4a670: 5281 addql #1,%d1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 4a672: 234b 0008 movel %a3,%a1@(8) } 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; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a676: c5aa 0004 andl %d2,%a2@(4) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 4a67a: 2749 000c movel %a1,%a3@(12) next_block->prev_size = block_size; 4a67e: 2480 movel %d0,%a2@ { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4a680: 2149 0008 movel %a1,%a0@(8) /* Statistics */ ++stats->free_blocks; 4a684: 2141 0038 movel %d1,%a0@(56) if ( stats->max_free_blocks < stats->free_blocks ) { 4a688: b2a8 003c cmpl %a0@(60),%d1 4a68c: 6304 blss 4a692 <_Heap_Free+0x156> stats->max_free_blocks = stats->free_blocks; 4a68e: 2141 003c movel %d1,%a0@(60) } } /* Statistics */ --stats->used_blocks; 4a692: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4a696: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4a69a: d1a8 0030 addl %d0,%a0@(48) * 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; 4a69e: 7001 moveq #1,%d0 4a6a0: 6002 bras 4a6a4 <_Heap_Free+0x168> /* 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 ); 4a6a2: 4200 clrb %d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4a6a4: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4a6a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059f68 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 59f68: 4e56 0000 linkw %fp,#0 59f6c: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 59f70: 2040 moveal %d0,%a0 59f72: 5188 subql #8,%a0 59f74: 226e 0008 moveal %fp@(8),%a1 59f78: 2f02 movel %d2,%sp@- 59f7a: 2400 movel %d0,%d2 59f7c: 4c69 2001 0010 remul %a1@(16),%d1,%d2 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 59f82: 2429 0020 movel %a1@(32),%d2 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 59f86: 91c1 subal %d1,%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; 59f88: b488 cmpl %a0,%d2 59f8a: 620c bhis 59f98 <_Heap_Size_of_alloc_area+0x30> 59f8c: b1e9 0024 cmpal %a1@(36),%a0 59f90: 53c1 sls %d1 59f92: 49c1 extbl %d1 59f94: 4481 negl %d1 59f96: 6002 bras 59f9a <_Heap_Size_of_alloc_area+0x32> 59f98: 4281 clrl %d1 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 59f9a: 4a01 tstb %d1 59f9c: 6738 beqs 59fd6 <_Heap_Size_of_alloc_area+0x6e> - 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; 59f9e: 72fe moveq #-2,%d1 59fa0: 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); 59fa4: d1c1 addal %d1,%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; 59fa6: b488 cmpl %a0,%d2 59fa8: 620c bhis 59fb6 <_Heap_Size_of_alloc_area+0x4e> <== NEVER TAKEN 59faa: b1e9 0024 cmpal %a1@(36),%a0 59fae: 53c1 sls %d1 59fb0: 49c1 extbl %d1 59fb2: 4481 negl %d1 59fb4: 6002 bras 59fb8 <_Heap_Size_of_alloc_area+0x50> 59fb6: 4281 clrl %d1 <== NOT EXECUTED } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 59fb8: 4a01 tstb %d1 59fba: 671a beqs 59fd6 <_Heap_Size_of_alloc_area+0x6e> <== 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; 59fbc: 7201 moveq #1,%d1 59fbe: c2a8 0004 andl %a0@(4),%d1 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 59fc2: 6712 beqs 59fd6 <_Heap_Size_of_alloc_area+0x6e> <== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 59fc4: 7204 moveq #4,%d1 59fc6: 9280 subl %d0,%d1 59fc8: 2001 movel %d1,%d0 59fca: d088 addl %a0,%d0 59fcc: 226e 0010 moveal %fp@(16),%a1 59fd0: 2280 movel %d0,%a1@ return true; 59fd2: 7001 moveq #1,%d0 59fd4: 6002 bras 59fd8 <_Heap_Size_of_alloc_area+0x70> if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 59fd6: 4200 clrb %d0 } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 59fd8: 241f movel %sp@+,%d2 59fda: 4e5e unlk %fp ... =============================================================================== 000473ce <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 473ce: 4e56 ffd0 linkw %fp,#-48 473d2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 473d6: 266e 0008 moveal %fp@(8),%a3 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; 473da: 45fa ffac lea %pc@(47388 <_Heap_Walk_print_nothing>),%a2 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 473de: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 473e2: 282b 0010 movel %a3@(16),%d4 uintptr_t const min_block_size = heap->min_block_size; 473e6: 2a2b 0014 movel %a3@(20),%d5 Heap_Block *const first_block = heap->first_block; 473ea: 2c2b 0020 movel %a3@(32),%d6 Heap_Block *const last_block = heap->last_block; 473ee: 2e2b 0024 movel %a3@(36),%d7 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 473f2: 4a2e 0013 tstb %fp@(19) 473f6: 6704 beqs 473fc <_Heap_Walk+0x2e> 473f8: 45fa ff96 lea %pc@(47390 <_Heap_Walk_print>),%a2 if ( !_System_state_Is_up( _System_state_Get() ) ) { 473fc: 7003 moveq #3,%d0 473fe: b0b9 0005 fa48 cmpl 5fa48 <_System_state_Current>,%d0 47404: 6600 02fc bnew 47702 <_Heap_Walk+0x334> 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)( 47408: 2f2b 000c movel %a3@(12),%sp@- 4740c: 2f2b 0008 movel %a3@(8),%sp@- 47410: 2f07 movel %d7,%sp@- 47412: 2f06 movel %d6,%sp@- 47414: 2f2b 001c movel %a3@(28),%sp@- 47418: 2f2b 0018 movel %a3@(24),%sp@- 4741c: 2f05 movel %d5,%sp@- 4741e: 2f04 movel %d4,%sp@- 47420: 4879 0005 bf15 pea 5bf15 <_Status_Object_name_errors_to_status+0x5d> 47426: 42a7 clrl %sp@- 47428: 2f02 movel %d2,%sp@- 4742a: 4e92 jsr %a2@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 4742c: 4fef 002c lea %sp@(44),%sp 47430: 4a84 tstl %d4 47432: 6608 bnes 4743c <_Heap_Walk+0x6e> (*printer)( source, true, "page size is zero\n" ); 47434: 4879 0005 bfa6 pea 5bfa6 <_Status_Object_name_errors_to_status+0xee> 4743a: 6050 bras 4748c <_Heap_Walk+0xbe> ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 4743c: 7003 moveq #3,%d0 4743e: c084 andl %d4,%d0 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 47440: 670c beqs 4744e <_Heap_Walk+0x80> (*printer)( 47442: 2f04 movel %d4,%sp@- 47444: 4879 0005 bfb9 pea 5bfb9 <_Status_Object_name_errors_to_status+0x101> 4744a: 6000 02ca braw 47716 <_Heap_Walk+0x348> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4744e: 2205 movel %d5,%d1 47450: 4c44 1000 remul %d4,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 47454: 4a80 tstl %d0 47456: 670c beqs 47464 <_Heap_Walk+0x96> (*printer)( 47458: 2f05 movel %d5,%sp@- 4745a: 4879 0005 bfd7 pea 5bfd7 <_Status_Object_name_errors_to_status+0x11f> 47460: 6000 02b4 braw 47716 <_Heap_Walk+0x348> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 47464: 2006 movel %d6,%d0 47466: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 47468: 4c44 0001 remul %d4,%d1,%d0 ); return false; } if ( 4746c: 4a81 tstl %d1 4746e: 670c beqs 4747c <_Heap_Walk+0xae> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 47470: 2f06 movel %d6,%sp@- 47472: 4879 0005 bffb pea 5bffb <_Status_Object_name_errors_to_status+0x143> 47478: 6000 029c braw 47716 <_Heap_Walk+0x348> 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; 4747c: 7001 moveq #1,%d0 4747e: 2046 moveal %d6,%a0 47480: c0a8 0004 andl %a0@(4),%d0 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 47484: 6616 bnes 4749c <_Heap_Walk+0xce> (*printer)( 47486: 4879 0005 c02c pea 5c02c <_Status_Object_name_errors_to_status+0x174> 4748c: 4878 0001 pea 1 47490: 2f02 movel %d2,%sp@- 47492: 4e92 jsr %a2@ 47494: 4fef 000c lea %sp@(12),%sp 47498: 6000 00ba braw 47554 <_Heap_Walk+0x186> - 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; 4749c: 70fe moveq #-2,%d0 4749e: 2047 moveal %d7,%a0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 474a0: 2847 moveal %d7,%a4 - 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; 474a2: c0a8 0004 andl %a0@(4),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 474a6: d9c0 addal %d0,%a4 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; 474a8: 7001 moveq #1,%d0 474aa: c0ac 0004 andl %a4@(4),%d0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 474ae: 6608 bnes 474b8 <_Heap_Walk+0xea> (*printer)( 474b0: 4879 0005 c05a pea 5c05a <_Status_Object_name_errors_to_status+0x1a2> 474b6: 60d4 bras 4748c <_Heap_Walk+0xbe> ); return false; } if ( 474b8: bc8c cmpl %a4,%d6 474ba: 6708 beqs 474c4 <_Heap_Walk+0xf6> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 474bc: 4879 0005 c06f pea 5c06f <_Status_Object_name_errors_to_status+0x1b7> 474c2: 60c8 bras 4748c <_Heap_Walk+0xbe> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 474c4: 262b 0010 movel %a3@(16),%d3 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 474c8: 220b movel %a3,%d1 block = next_block; } while ( block != first_block ); return true; } 474ca: 206b 0008 moveal %a3@(8),%a0 474ce: 2d44 fff8 movel %d4,%fp@(-8) 474d2: 2d43 fffc movel %d3,%fp@(-4) 474d6: 6000 0088 braw 47560 <_Heap_Walk+0x192> 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; 474da: b1eb 0020 cmpal %a3@(32),%a0 474de: 650c bcss 474ec <_Heap_Walk+0x11e> 474e0: b1eb 0024 cmpal %a3@(36),%a0 474e4: 53c0 sls %d0 474e6: 49c0 extbl %d0 474e8: 4480 negl %d0 474ea: 6002 bras 474ee <_Heap_Walk+0x120> 474ec: 4280 clrl %d0 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 ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 474ee: 4a00 tstb %d0 474f0: 660c bnes 474fe <_Heap_Walk+0x130> (*printer)( 474f2: 2f08 movel %a0,%sp@- 474f4: 4879 0005 c09e pea 5c09e <_Status_Object_name_errors_to_status+0x1e6> 474fa: 6000 021a braw 47716 <_Heap_Walk+0x348> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 474fe: 4be8 0008 lea %a0@(8),%a5 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 47502: 200d movel %a5,%d0 47504: 262e fffc movel %fp@(-4),%d3 47508: 4c43 0004 remul %d3,%d4,%d0 ); return false; } if ( 4750c: 4a84 tstl %d4 4750e: 670c beqs 4751c <_Heap_Walk+0x14e> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 47510: 2f08 movel %a0,%sp@- 47512: 4879 0005 c0be pea 5c0be <_Status_Object_name_errors_to_status+0x206> 47518: 6000 01fc braw 47716 <_Heap_Walk+0x348> - 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; 4751c: 70fe moveq #-2,%d0 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; 4751e: 7601 moveq #1,%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; 47520: c0a8 0004 andl %a0@(4),%d0 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; 47524: c6b0 0804 andl %a0@(00000004,%d0:l),%d3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 47528: 670c beqs 47536 <_Heap_Walk+0x168> (*printer)( 4752a: 2f08 movel %a0,%sp@- 4752c: 4879 0005 c0ee pea 5c0ee <_Status_Object_name_errors_to_status+0x236> 47532: 6000 01e2 braw 47716 <_Heap_Walk+0x348> ); return false; } if ( free_block->prev != prev_block ) { 47536: 2028 000c movel %a0@(12),%d0 4753a: b280 cmpl %d0,%d1 4753c: 671c beqs 4755a <_Heap_Walk+0x18c> (*printer)( 4753e: 2f00 movel %d0,%sp@- 47540: 2f08 movel %a0,%sp@- 47542: 4879 0005 c10a pea 5c10a <_Status_Object_name_errors_to_status+0x252> 47548: 4878 0001 pea 1 4754c: 2f02 movel %d2,%sp@- 4754e: 4e92 jsr %a2@ 47550: 4fef 0014 lea %sp@(20),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 47554: 4200 clrb %d0 47556: 6000 01ac braw 47704 <_Heap_Walk+0x336> return false; } prev_block = free_block; free_block = free_block->next; 4755a: 2208 movel %a0,%d1 4755c: 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 ) { 47560: b7c8 cmpal %a0,%a3 47562: 6600 ff76 bnew 474da <_Heap_Walk+0x10c> 47566: 282e fff8 movel %fp@(-8),%d4 4756a: 6002 bras 4756e <_Heap_Walk+0x1a0> block->prev_size ); } block = next_block; } while ( block != first_block ); 4756c: 284d moveal %a5,%a4 return true; } 4756e: 202c 0004 movel %a4@(4),%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; 47572: 76fe moveq #-2,%d3 47574: c680 andl %d0,%d3 47576: 2d40 fffc movel %d0,%fp@(-4) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4757a: 4bf4 3800 lea %a4@(00000000,%d3:l),%a5 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; 4757e: bbeb 0020 cmpal %a3@(32),%a5 47582: 650c bcss 47590 <_Heap_Walk+0x1c2> <== NEVER TAKEN 47584: bbeb 0024 cmpal %a3@(36),%a5 47588: 53c0 sls %d0 4758a: 49c0 extbl %d0 4758c: 4480 negl %d0 4758e: 6002 bras 47592 <_Heap_Walk+0x1c4> 47590: 4280 clrl %d0 <== NOT EXECUTED 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; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 47592: 4a00 tstb %d0 47594: 660c bnes 475a2 <_Heap_Walk+0x1d4> (*printer)( 47596: 2f0d movel %a5,%sp@- 47598: 2f0c movel %a4,%sp@- 4759a: 4879 0005 c13c pea 5c13c <_Status_Object_name_errors_to_status+0x284> 475a0: 60a6 bras 47548 <_Heap_Walk+0x17a> 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; 475a2: be8c cmpl %a4,%d7 475a4: 56c0 sne %d0 475a6: 2200 movel %d0,%d1 475a8: 4481 negl %d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 475aa: 2003 movel %d3,%d0 475ac: 1d41 fffb moveb %d1,%fp@(-5) 475b0: 4c44 0001 remul %d4,%d1,%d0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 475b4: 4a81 tstl %d1 475b6: 6714 beqs 475cc <_Heap_Walk+0x1fe> 475b8: 4a2e fffb tstb %fp@(-5) 475bc: 670e beqs 475cc <_Heap_Walk+0x1fe> (*printer)( 475be: 2f03 movel %d3,%sp@- 475c0: 2f0c movel %a4,%sp@- 475c2: 4879 0005 c169 pea 5c169 <_Status_Object_name_errors_to_status+0x2b1> 475c8: 6000 ff7e braw 47548 <_Heap_Walk+0x17a> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 475cc: ba83 cmpl %d3,%d5 475ce: 6322 blss 475f2 <_Heap_Walk+0x224> 475d0: 4a2e fffb tstb %fp@(-5) 475d4: 671c beqs 475f2 <_Heap_Walk+0x224> <== NEVER TAKEN (*printer)( 475d6: 2f05 movel %d5,%sp@- 475d8: 2f03 movel %d3,%sp@- 475da: 2f0c movel %a4,%sp@- 475dc: 4879 0005 c197 pea 5c197 <_Status_Object_name_errors_to_status+0x2df> 475e2: 4878 0001 pea 1 475e6: 2f02 movel %d2,%sp@- 475e8: 4e92 jsr %a2@ block, block_size, min_block_size ); return false; 475ea: 4fef 0018 lea %sp@(24),%sp 475ee: 6000 ff64 braw 47554 <_Heap_Walk+0x186> } if ( next_block_begin <= block_begin && is_not_last_block ) { 475f2: b9cd cmpal %a5,%a4 475f4: 6514 bcss 4760a <_Heap_Walk+0x23c> 475f6: 4a2e fffb tstb %fp@(-5) 475fa: 670e beqs 4760a <_Heap_Walk+0x23c> (*printer)( 475fc: 2f0d movel %a5,%sp@- 475fe: 2f0c movel %a4,%sp@- 47600: 4879 0005 c1c2 pea 5c1c2 <_Status_Object_name_errors_to_status+0x30a> 47606: 6000 ff40 braw 47548 <_Heap_Walk+0x17a> 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; 4760a: 7001 moveq #1,%d0 4760c: c0ae fffc andl %fp@(-4),%d0 47610: 2d40 fffc movel %d0,%fp@(-4) 47614: 7001 moveq #1,%d0 47616: c0ad 0004 andl %a5@(4),%d0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4761a: 6600 00ae bnew 476ca <_Heap_Walk+0x2fc> block = next_block; } while ( block != first_block ); return true; } 4761e: 222b 0008 movel %a3@(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)( 47622: 43f9 0005 bee2 lea 5bee2 <_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 ? 47628: 206c 0008 moveal %a4@(8),%a0 block = next_block; } while ( block != first_block ); return true; } 4762c: 2d41 fff8 movel %d1,%fp@(-8) 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)( 47630: b1eb 000c cmpal %a3@(12),%a0 47634: 6710 beqs 47646 <_Heap_Walk+0x278> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 47636: 43f9 0005 be2e lea 5be2e ,%a1 4763c: b7c8 cmpal %a0,%a3 4763e: 6606 bnes 47646 <_Heap_Walk+0x278> 47640: 43f9 0005 bef1 lea 5bef1 <_Status_Object_name_errors_to_status+0x39>,%a1 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 ? 47646: 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)( 4764a: 223c 0005 befb movel #376571,%d1 47650: b0ae fff8 cmpl %fp@(-8),%d0 47654: 6710 beqs 47666 <_Heap_Walk+0x298> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 47656: 223c 0005 be2e movel #376366,%d1 4765c: b7c0 cmpal %d0,%a3 4765e: 6606 bnes 47666 <_Heap_Walk+0x298> 47660: 223c 0005 bf0b movel #376587,%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)( 47666: 2f09 movel %a1,%sp@- 47668: 2f08 movel %a0,%sp@- 4766a: 2f01 movel %d1,%sp@- 4766c: 2f00 movel %d0,%sp@- 4766e: 2f03 movel %d3,%sp@- 47670: 2f0c movel %a4,%sp@- 47672: 4879 0005 c1f6 pea 5c1f6 <_Status_Object_name_errors_to_status+0x33e> 47678: 42a7 clrl %sp@- 4767a: 2f02 movel %d2,%sp@- 4767c: 4e92 jsr %a2@ block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 4767e: 2015 movel %a5@,%d0 47680: 4fef 0024 lea %sp@(36),%sp 47684: b083 cmpl %d3,%d0 47686: 671e beqs 476a6 <_Heap_Walk+0x2d8> (*printer)( 47688: 2f0d movel %a5,%sp@- 4768a: 2f00 movel %d0,%sp@- 4768c: 2f03 movel %d3,%sp@- 4768e: 2f0c movel %a4,%sp@- 47690: 4879 0005 c22b pea 5c22b <_Status_Object_name_errors_to_status+0x373> 47696: 4878 0001 pea 1 4769a: 2f02 movel %d2,%sp@- 4769c: 4e92 jsr %a2@ 4769e: 4fef 001c lea %sp@(28),%sp 476a2: 6000 feb0 braw 47554 <_Heap_Walk+0x186> ); return false; } if ( !prev_used ) { 476a6: 4aae fffc tstl %fp@(-4) 476aa: 660a bnes 476b6 <_Heap_Walk+0x2e8> (*printer)( 476ac: 2f0c movel %a4,%sp@- 476ae: 4879 0005 c264 pea 5c264 <_Status_Object_name_errors_to_status+0x3ac> 476b4: 6060 bras 47716 <_Heap_Walk+0x348> block = next_block; } while ( block != first_block ); return true; } 476b6: 206b 0008 moveal %a3@(8),%a0 476ba: 6008 bras 476c4 <_Heap_Walk+0x2f6> { 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 ) { if ( free_block == block ) { 476bc: b9c8 cmpal %a0,%a4 476be: 673c beqs 476fc <_Heap_Walk+0x32e> return true; } free_block = free_block->next; 476c0: 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 ) { 476c4: b7c8 cmpal %a0,%a3 476c6: 66f4 bnes 476bc <_Heap_Walk+0x2ee> 476c8: 6044 bras 4770e <_Heap_Walk+0x340> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 476ca: 4aae fffc tstl %fp@(-4) 476ce: 6716 beqs 476e6 <_Heap_Walk+0x318> (*printer)( 476d0: 2f03 movel %d3,%sp@- 476d2: 2f0c movel %a4,%sp@- 476d4: 4879 0005 c293 pea 5c293 <_Status_Object_name_errors_to_status+0x3db> 476da: 42a7 clrl %sp@- 476dc: 2f02 movel %d2,%sp@- 476de: 4e92 jsr %a2@ 476e0: 4fef 0014 lea %sp@(20),%sp 476e4: 6016 bras 476fc <_Heap_Walk+0x32e> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 476e6: 2f14 movel %a4@,%sp@- 476e8: 2f03 movel %d3,%sp@- 476ea: 2f0c movel %a4,%sp@- 476ec: 4879 0005 c2aa pea 5c2aa <_Status_Object_name_errors_to_status+0x3f2> 476f2: 42a7 clrl %sp@- 476f4: 2f02 movel %d2,%sp@- 476f6: 4e92 jsr %a2@ 476f8: 4fef 0018 lea %sp@(24),%sp block->prev_size ); } block = next_block; } while ( block != first_block ); 476fc: bc8d cmpl %a5,%d6 476fe: 6600 fe6c bnew 4756c <_Heap_Walk+0x19e> Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; 47702: 7001 moveq #1,%d0 block = next_block; } while ( block != first_block ); return true; } 47704: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4770a: 4e5e unlk %fp 4770c: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 4770e: 2f0c movel %a4,%sp@- 47710: 4879 0005 c2cf pea 5c2cf <_Status_Object_name_errors_to_status+0x417> 47716: 4878 0001 pea 1 4771a: 2f02 movel %d2,%sp@- 4771c: 4e92 jsr %a2@ 4771e: 4fef 0010 lea %sp@(16),%sp 47722: 6000 fe30 braw 47554 <_Heap_Walk+0x186> ... =============================================================================== 000469b0 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 469b0: 4e56 0000 linkw %fp,#0 469b4: 222e 000c movel %fp@(12),%d1 469b8: 2f02 movel %d2,%sp@- 469ba: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 469be: 13c1 0005 d5f2 moveb %d1,5d5f2 <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 469c4: 2f02 movel %d2,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 469c6: 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 ); 469ca: 0281 0000 00ff andil #255,%d1 bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 469d0: 23c0 0005 d5ee movel %d0,5d5ee <_Internal_errors_What_happened> _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 ); 469d6: 2f01 movel %d1,%sp@- ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 469d8: 23c2 0005 d5f4 movel %d2,5d5f4 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 469de: 2f00 movel %d0,%sp@- 469e0: 4eb9 0004 8522 jsr 48522 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 469e6: 7005 moveq #5,%d0 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 469e8: 2042 moveal %d2,%a0 <== NOT EXECUTED 469ea: 243c 0000 0700 movel #1792,%d2 <== NOT EXECUTED 469f0: 23c0 0005 d6a0 movel %d0,5d6a0 <_System_state_Current> <== NOT EXECUTED 469f6: 40c0 movew %sr,%d0 <== NOT EXECUTED 469f8: 8082 orl %d2,%d0 <== NOT EXECUTED 469fa: 46c0 movew %d0,%sr <== NOT EXECUTED 469fc: 2008 movel %a0,%d0 <== NOT EXECUTED 469fe: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46a04: 4ac8 halt <== NOT EXECUTED 46a06: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 46a0a: 60fe bras 46a0a <_Internal_error_Occurred+0x5a> <== NOT EXECUTED =============================================================================== 00046a6c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 46a6c: 4e56 fff0 linkw %fp,#-16 46a70: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46a74: 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 ) 46a78: 4aaa 0014 tstl %a2@(20) 46a7c: 675e beqs 46adc <_Objects_Allocate+0x70> <== 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 ); 46a7e: 240a movel %a2,%d2 46a80: 0682 0000 001c addil #28,%d2 46a86: 47f9 0004 6210 lea 46210 <_Chain_Get>,%a3 46a8c: 2f02 movel %d2,%sp@- 46a8e: 4e93 jsr %a3@ if ( information->auto_extend ) { 46a90: 588f addql #4,%sp 46a92: 4a2a 0010 tstb %a2@(16) 46a96: 6746 beqs 46ade <_Objects_Allocate+0x72> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 46a98: 4a80 tstl %d0 46a9a: 6612 bnes 46aae <_Objects_Allocate+0x42> _Objects_Extend_information( information ); 46a9c: 2f0a movel %a2,%sp@- 46a9e: 4eb9 0004 6b14 jsr 46b14 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 46aa4: 2f02 movel %d2,%sp@- 46aa6: 4e93 jsr %a3@ } if ( the_object ) { 46aa8: 508f addql #8,%sp 46aaa: 4a80 tstl %d0 46aac: 6730 beqs 46ade <_Objects_Allocate+0x72> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 46aae: 2040 moveal %d0,%a0 46ab0: 4281 clrl %d1 46ab2: 4282 clrl %d2 46ab4: 3228 000a movew %a0@(10),%d1 46ab8: 342a 0008 movew %a2@(8),%d2 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 46abc: 206a 002a moveal %a2@(42),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 46ac0: 9282 subl %d2,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 46ac2: 342a 0012 movew %a2@(18),%d2 46ac6: 4c42 1001 remul %d2,%d1,%d1 information->inactive_per_block[ block ]--; 46aca: e589 lsll #2,%d1 46acc: d1c1 addal %d1,%a0 46ace: 5390 subql #1,%a0@ information->inactive--; 46ad0: 322a 0028 movew %a2@(40),%d1 46ad4: 5381 subql #1,%d1 46ad6: 3541 0028 movew %d1,%a2@(40) 46ada: 6002 bras 46ade <_Objects_Allocate+0x72> * 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; 46adc: 4280 clrl %d0 <== NOT EXECUTED ); } #endif return the_object; } 46ade: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 46ae4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046ae8 <_Objects_Close>: RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 46ae8: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 46aea: 4e56 0000 linkw %fp,#0 46aee: 226e 000c moveal %fp@(12),%a1 46af2: 206e 0008 moveal %fp@(8),%a0 46af6: 2f0a movel %a2,%sp@- #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46af8: 2468 0018 moveal %a0@(24),%a2 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 46afc: 3029 000a movew %a1@(10),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46b00: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); } 46b04: 245f moveal %sp@+,%a2 Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 46b06: 2d49 000c movel %a1,%fp@(12) } 46b0a: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 46b0c: 4ef9 0004 7004 jmp 47004 <_Objects_Namespace_remove> ... =============================================================================== 00046e0c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 46e0c: 4e56 0000 linkw %fp,#0 46e10: 2f03 movel %d3,%sp@- 46e12: 362e 000e movew %fp@(14),%d3 46e16: 2f02 movel %d2,%sp@- 46e18: 242e 0008 movel %fp@(8),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 46e1c: 4a43 tstw %d3 46e1e: 673a beqs 46e5a <_Objects_Get_information+0x4e> /* * 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 ); 46e20: 2f02 movel %d2,%sp@- 46e22: 4eb9 0004 a6ac jsr 4a6ac <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 46e28: 588f addql #4,%sp 46e2a: 4a80 tstl %d0 46e2c: 672c beqs 46e5a <_Objects_Get_information+0x4e> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 46e2e: 0283 0000 ffff andil #65535,%d3 46e34: b083 cmpl %d3,%d0 46e36: 6522 bcss 46e5a <_Objects_Get_information+0x4e> return NULL; if ( !_Objects_Information_table[ the_api ] ) 46e38: 41f9 0005 d514 lea 5d514 <_Objects_Information_table>,%a0 46e3e: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 46e42: 4a88 tstl %a0 46e44: 6714 beqs 46e5a <_Objects_Get_information+0x4e> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 46e46: 2030 3c00 movel %a0@(00000000,%d3:l:4),%d0 if ( !info ) 46e4a: 6710 beqs 46e5c <_Objects_Get_information+0x50> <== 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; 46e4c: 2040 moveal %d0,%a0 46e4e: 4a68 000e tstw %a0@(14) 46e52: 56c1 sne %d1 46e54: 49c1 extbl %d1 46e56: c081 andl %d1,%d0 46e58: 6002 bras 46e5c <_Objects_Get_information+0x50> if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) return NULL; 46e5a: 4280 clrl %d0 if ( info->maximum == 0 ) return NULL; #endif return info; } 46e5c: 242e fff8 movel %fp@(-8),%d2 46e60: 262e fffc movel %fp@(-4),%d3 46e64: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00054574 <_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; 54574: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 54576: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 54578: 4e56 0000 linkw %fp,#0 5457c: 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; 54580: 90a8 0006 subl %a0@(6),%d0 54584: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 54588: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5458c: 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 ) { 54590: b081 cmpl %d1,%d0 54592: 620e bhis 545a2 <_Objects_Get_no_protection+0x2e> if ( (the_object = information->local_table[ index ]) != NULL ) { 54594: 2068 0018 moveal %a0@(24),%a0 54598: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5459c: 6704 beqs 545a2 <_Objects_Get_no_protection+0x2e><== NEVER TAKEN *location = OBJECTS_LOCAL; 5459e: 4291 clrl %a1@ return the_object; 545a0: 6006 bras 545a8 <_Objects_Get_no_protection+0x34> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 545a2: 7001 moveq #1,%d0 545a4: 2280 movel %d0,%a1@ return NULL; 545a6: 4280 clrl %d0 } 545a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047dec <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 47dec: 4e56 fffc linkw %fp,#-4 47df0: 222e 0008 movel %fp@(8),%d1 47df4: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 47df6: 4a81 tstl %d1 47df8: 660a bnes 47e04 <_Objects_Id_to_name+0x18> 47dfa: 2079 0005 ebac moveal 5ebac <_Per_CPU_Information+0xc>,%a0 47e00: 2228 0008 movel %a0@(8),%d1 47e04: 7418 moveq #24,%d2 47e06: 2001 movel %d1,%d0 47e08: e4a8 lsrl %d2,%d0 47e0a: 143c 0007 moveb #7,%d2 47e0e: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 47e10: 143c 0002 moveb #2,%d2 47e14: 2040 moveal %d0,%a0 47e16: 5388 subql #1,%a0 47e18: b488 cmpl %a0,%d2 47e1a: 6538 bcss 47e54 <_Objects_Id_to_name+0x68> <== NEVER TAKEN 47e1c: 6040 bras 47e5e <_Objects_Id_to_name+0x72> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 47e1e: 2001 movel %d1,%d0 47e20: 741b moveq #27,%d2 47e22: e4a8 lsrl %d2,%d0 if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 47e24: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 47e28: 672a beqs 47e54 <_Objects_Id_to_name+0x68> <== NEVER TAKEN #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 ); 47e2a: 486e fffc pea %fp@(-4) 47e2e: 2f01 movel %d1,%sp@- 47e30: 2f00 movel %d0,%sp@- 47e32: 4eb9 0004 7d8c jsr 47d8c <_Objects_Get> if ( !the_object ) 47e38: 4fef 000c lea %sp@(12),%sp 47e3c: 4a80 tstl %d0 47e3e: 6714 beqs 47e54 <_Objects_Id_to_name+0x68> return OBJECTS_INVALID_ID; *name = the_object->name; 47e40: 206e 000c moveal %fp@(12),%a0 47e44: 2240 moveal %d0,%a1 47e46: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 47e4a: 4eb9 0004 8986 jsr 48986 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 47e50: 4280 clrl %d0 47e52: 6002 bras 47e56 <_Objects_Id_to_name+0x6a> 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; 47e54: 7003 moveq #3,%d0 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 47e56: 242e fff8 movel %fp@(-8),%d2 47e5a: 4e5e unlk %fp 47e5c: 4e75 rts the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 47e5e: 41f9 0005 e9cc lea 5e9cc <_Objects_Information_table>,%a0 47e64: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47e68: 4a88 tstl %a0 47e6a: 66b2 bnes 47e1e <_Objects_Id_to_name+0x32> 47e6c: 60e6 bras 47e54 <_Objects_Id_to_name+0x68> ... =============================================================================== 00049fe0 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 49fe0: 4e56 ffec linkw %fp,#-20 RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 49fe4: 206e 0008 moveal %fp@(8),%a0 */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 49fe8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 49fec: 2468 00fc moveal %a0@(252),%a2 if ( !api ) 49ff0: 4a8a tstl %a2 49ff2: 6754 beqs 4a048 <_RTEMS_tasks_Post_switch_extension+0x68><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 49ff4: 203c 0000 0700 movel #1792,%d0 49ffa: 40c1 movew %sr,%d1 49ffc: 8081 orl %d1,%d0 49ffe: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4a000: 262a 0012 movel %a2@(18),%d3 asr->signals_posted = 0; 4a004: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4a008: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4a00a: 4a83 tstl %d3 4a00c: 673a beqs 4a048 <_RTEMS_tasks_Post_switch_extension+0x68> return; asr->nest_level += 1; 4a00e: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4a012: 240e movel %fp,%d2 4a014: 5982 subql #4,%d2 4a016: 47f9 0004 b8a0 lea 4b8a0 ,%a3 4a01c: 2f02 movel %d2,%sp@- 4a01e: 2f3c 0000 ffff movel #65535,%sp@- 4a024: 2f2a 000e movel %a2@(14),%sp@- 4a028: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4a02a: 2f03 movel %d3,%sp@- 4a02c: 206a 000a moveal %a2@(10),%a0 4a030: 4e90 jsr %a0@ asr->nest_level -= 1; 4a032: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4a036: 2f02 movel %d2,%sp@- 4a038: 2f3c 0000 ffff movel #65535,%sp@- 4a03e: 2f2e fffc movel %fp@(-4),%sp@- 4a042: 4e93 jsr %a3@ 4a044: 4fef 001c lea %sp@(28),%sp } 4a048: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4a04e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004637c <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 4637c: 4e56 ffd4 linkw %fp,#-44 46380: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 46384: 266e 0008 moveal %fp@(8),%a3 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 46388: 240e movel %fp,%d2 4638a: 5182 subql #8,%d2 _Timestamp_Subtract( 4638c: 45f9 0004 9ab4 lea 49ab4 <_Timespec_Subtract>,%a2 ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 46392: 286b 0040 moveal %a3@(64),%a4 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 46396: 2f02 movel %d2,%sp@- 46398: 4eb9 0004 7ac0 jsr 47ac0 <_TOD_Get_uptime> _Timestamp_Subtract( 4639e: 2f2e 000c movel %fp@(12),%sp@- 463a2: 2f02 movel %d2,%sp@- 463a4: 486b 004c pea %a3@(76) 463a8: 4e92 jsr %a2@ * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 463aa: 4fef 0010 lea %sp@(16),%sp #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 463ae: 202c 0082 movel %a4@(130),%d0 463b2: 222c 0086 movel %a4@(134),%d1 463b6: 2d40 fff0 movel %d0,%fp@(-16) 463ba: 2d41 fff4 movel %d1,%fp@(-12) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 463be: b9f9 0005 f2ec cmpal 5f2ec <_Per_CPU_Information+0xc>,%a4 463c4: 6644 bnes 4640a <_Rate_monotonic_Get_status+0x8e><== NEVER TAKEN Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 463c6: 260e movel %fp,%d3 463c8: 0683 ffff ffe8 addil #-24,%d3 /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 463ce: 47eb 0044 lea %a3@(68),%a3 if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 463d2: 2f03 movel %d3,%sp@- 463d4: 2f02 movel %d2,%sp@- 463d6: 4879 0005 f1fc pea 5f1fc <_Thread_Time_of_last_context_switch> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 463dc: 5182 subql #8,%d2 if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 463de: 4e92 jsr %a2@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 463e0: 2f03 movel %d3,%sp@- 463e2: 2f02 movel %d2,%sp@- 463e4: 4eb9 0004 998c jsr 4998c <_Timespec_Add_to> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 463ea: 2f0b movel %a3,%sp@- 463ec: 2f02 movel %d2,%sp@- 463ee: 4eb9 0004 9a84 jsr 49a84 <_Timespec_Less_than> 463f4: 4fef 001c lea %sp@(28),%sp 463f8: 4a00 tstb %d0 463fa: 6612 bnes 4640e <_Rate_monotonic_Get_status+0x92> return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 463fc: 2f2e 0010 movel %fp@(16),%sp@- 46400: 2f02 movel %d2,%sp@- 46402: 2f0b movel %a3,%sp@- 46404: 4e92 jsr %a2@ 46406: 4fef 000c lea %sp@(12),%sp if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 4640a: 7001 moveq #1,%d0 4640c: 6002 bras 46410 <_Rate_monotonic_Get_status+0x94> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) return false; 4640e: 4200 clrb %d0 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 46410: 4cee 1c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a4 46416: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005783c <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 5783c: 4e56 ffe4 linkw %fp,#-28 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 57840: 2039 0007 5f54 movel 75f54 <_Thread_Dispatch_disable_level>,%d0 57846: 5280 addql #1,%d0 57848: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5784c: 266e 0008 moveal %fp@(8),%a3 57850: 23c0 0007 5f54 movel %d0,75f54 <_Thread_Dispatch_disable_level> * 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(); 57856: 2f39 0007 5ff4 movel 75ff4 <_RTEMS_Allocator_Mutex>,%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 ); 5785c: 240b movel %a3,%d2 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 5785e: 260b movel %a3,%d3 57860: 0682 0000 0010 addil #16,%d2 57866: 0683 0000 0068 addil #104,%d3 5786c: 4bf9 0005 3644 lea 53644 <_Heap_Allocate_aligned_with_boundary>,%a5 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 ); 57872: 49f9 0005 7e20 lea 57e20 <_Thread_queue_Extract>,%a4 * 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(); 57878: 4eb9 0005 2c98 jsr 52c98 <_API_Mutex_Unlock> 5787e: 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 ); 57880: 283c 0005 7f24 movel #360228,%d4 57886: 2f02 movel %d2,%sp@- 57888: 2044 moveal %d4,%a0 5788a: 4e90 jsr %a0@ if ( the_thread == NULL ) 5788c: 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 ); 5788e: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 57890: 4a80 tstl %d0 57892: 672c beqs 578c0 <_Region_Process_queue+0x84> 57894: 42a7 clrl %sp@- 57896: 42a7 clrl %sp@- 57898: 2f2a 0024 movel %a2@(36),%sp@- 5789c: 2f03 movel %d3,%sp@- 5789e: 4e95 jsr %a5@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 578a0: 4fef 0010 lea %sp@(16),%sp 578a4: 4a80 tstl %d0 578a6: 6718 beqs 578c0 <_Region_Process_queue+0x84> break; *(void **)the_thread->Wait.return_argument = the_segment; 578a8: 206a 0028 moveal %a2@(40),%a0 578ac: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; 578ae: 52ab 0064 addql #1,%a3@(100) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 578b2: 2f0a movel %a2,%sp@- 578b4: 2f02 movel %d2,%sp@- 578b6: 4e94 jsr %a4@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 578b8: 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; 578ba: 42aa 0034 clrl %a2@(52) } 578be: 60c6 bras 57886 <_Region_Process_queue+0x4a> _Thread_Enable_dispatch(); } 578c0: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 578c6: 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(); 578c8: 4ef9 0005 5122 jmp 55122 <_Thread_Enable_dispatch> ... =============================================================================== 000471b8 <_Scheduler_Handler_initialization>: #include #include #include void _Scheduler_Handler_initialization(void) { 471b8: 4e56 0000 linkw %fp,#0 (*_Scheduler.Operations.initialize)(); } 471bc: 4e5e unlk %fp #include #include void _Scheduler_Handler_initialization(void) { (*_Scheduler.Operations.initialize)(); 471be: 2279 0005 bc24 moveal 5bc24 <_Scheduler+0x4>,%a1 471c4: 4ed1 jmp %a1@ ... =============================================================================== 000471e4 <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 471e4: 4e56 0000 linkw %fp,#0 471e8: 226e 0008 moveal %fp@(8),%a1 471ec: 2f0a movel %a2,%sp@- ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; 471ee: 2469 008a moveal %a1@(138),%a2 ready = sched_info->ready_chain; 471f2: 2052 moveal %a2@,%a0 if ( _Chain_Has_only_one_node( ready ) ) { 471f4: 2028 0008 movel %a0@(8),%d0 471f8: b090 cmpl %a0@,%d0 471fa: 6632 bnes 4722e <_Scheduler_priority_Block+0x4a> Chain_Node *tail = _Chain_Tail( the_chain ); 471fc: 2008 movel %a0,%d0 471fe: 5880 addql #4,%d0 head->next = tail; head->previous = NULL; 47200: 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 ); 47204: 2080 movel %d0,%a0@ RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 47206: 302a 000e movew %a2@(14),%d0 head->next = tail; head->previous = NULL; tail->previous = head; 4720a: 2148 0008 movel %a0,%a0@(8) 4720e: 206a 0004 moveal %a2@(4),%a0 47212: 3210 movew %a0@,%d1 47214: c081 andl %d1,%d0 47216: 3080 movew %d0,%a0@ if ( *the_priority_map->minor == 0 ) 47218: 6620 bnes 4723a <_Scheduler_priority_Block+0x56> _Priority_Major_bit_map &= the_priority_map->block_major; 4721a: 3039 0005 d704 movew 5d704 <_Priority_Major_bit_map>,%d0 47220: 322a 000c movew %a2@(12),%d1 47224: c081 andl %d1,%d0 47226: 33c0 0005 d704 movew %d0,5d704 <_Priority_Major_bit_map> 4722c: 600c bras 4723a <_Scheduler_priority_Block+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4722e: 2451 moveal %a1@,%a2 previous = the_node->previous; 47230: 2069 0004 moveal %a1@(4),%a0 next->previous = previous; 47234: 2548 0004 movel %a0,%a2@(4) previous->next = next; 47238: 208a movel %a2,%a0@ _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 4723a: b3f9 0005 d6f8 cmpal 5d6f8 <_Per_CPU_Information+0x10>,%a1 47240: 6646 bnes 47288 <_Scheduler_priority_Block+0xa4> 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 ); 47242: 3039 0005 d704 movew 5d704 <_Priority_Major_bit_map>,%d0 47248: 4840 swap %d0 4724a: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4724c: 41f9 0005 d708 lea 5d708 <_Priority_Bit_map>,%a0 47252: 0280 0000 ffff andil #65535,%d0 47258: 3230 0a00 movew %a0@(00000000,%d0:l:2),%d1 4725c: 4841 swap %d1 4725e: 04c1 ff1 %d1 _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } 47260: 2079 0005 bc20 moveal 5bc20 <_Scheduler>,%a0 return (_Priority_Bits_index( major ) << 4) + 47266: 0281 0000 ffff andil #65535,%d1 4726c: e988 lsll #4,%d0 4726e: 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 ] ) ) 47270: 2200 movel %d0,%d1 47272: e988 lsll #4,%d0 47274: e589 lsll #2,%d1 47276: 9081 subl %d1,%d0 47278: d1c0 addal %d0,%a0 4727a: 2018 movel %a0@+,%d0 4727c: b1c0 cmpal %d0,%a0 4727e: 6602 bnes 47282 <_Scheduler_priority_Block+0x9e> <== ALWAYS TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 47280: 4280 clrl %d0 <== NOT EXECUTED * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 47282: 23c0 0005 d6f8 movel %d0,5d6f8 <_Per_CPU_Information+0x10> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 47288: b3f9 0005 d6f4 cmpal 5d6f4 <_Per_CPU_Information+0xc>,%a1 4728e: 6608 bnes 47298 <_Scheduler_priority_Block+0xb4> _Thread_Dispatch_necessary = true; 47290: 7001 moveq #1,%d0 47292: 13c0 0005 d700 moveb %d0,5d700 <_Per_CPU_Information+0x18> } 47298: 245f moveal %sp@+,%a2 4729a: 4e5e unlk %fp ... =============================================================================== 00047390 <_Scheduler_priority_Free>: #include void _Scheduler_priority_Free ( Thread_Control *the_thread ) { 47390: 4e56 0000 linkw %fp,#0 _Workspace_Free( the_thread->scheduler_info ); 47394: 206e 0008 moveal %fp@(8),%a0 47398: 2d68 008a 0008 movel %a0@(138),%fp@(8) } 4739e: 4e5e unlk %fp void _Scheduler_priority_Free ( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 473a0: 4ef9 0004 8908 jmp 48908 <_Workspace_Free> ... =============================================================================== 00047410 <_Scheduler_priority_Schedule>: #include #include #include void _Scheduler_priority_Schedule(void) { 47410: 4e56 0000 linkw %fp,#0 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 ); 47414: 3039 0005 d704 movew 5d704 <_Priority_Major_bit_map>,%d0 4741a: 4840 swap %d0 4741c: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4741e: 41f9 0005 d708 lea 5d708 <_Priority_Bit_map>,%a0 47424: 0280 0000 ffff andil #65535,%d0 4742a: 3230 0a00 movew %a0@(00000000,%d0:l:2),%d1 4742e: 4841 swap %d1 47430: 04c1 ff1 %d1 _Scheduler_priority_Schedule_body(); } 47432: 2079 0005 bc20 moveal 5bc20 <_Scheduler>,%a0 return (_Priority_Bits_index( major ) << 4) + 47438: 0281 0000 ffff andil #65535,%d1 4743e: e988 lsll #4,%d0 47440: 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 ] ) ) 47442: 2200 movel %d0,%d1 47444: e988 lsll #4,%d0 47446: e589 lsll #2,%d1 47448: 9081 subl %d1,%d0 4744a: d1c0 addal %d0,%a0 4744c: 2018 movel %a0@+,%d0 4744e: b1c0 cmpal %d0,%a0 47450: 6602 bnes 47454 <_Scheduler_priority_Schedule+0x44><== ALWAYS TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 47452: 4280 clrl %d0 <== NOT EXECUTED * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 47454: 23c0 0005 d6f8 movel %d0,5d6f8 <_Per_CPU_Information+0x10> 4745a: 4e5e unlk %fp ... =============================================================================== 0004754c <_Scheduler_priority_Yield>: * ready chain * select heir */ void _Scheduler_priority_Yield(void) { 4754c: 4e56 fff4 linkw %fp,#-12 Scheduler_priority_Per_thread *sched_info; ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 47550: 2079 0005 d6f4 moveal 5d6f4 <_Per_CPU_Information+0xc>,%a0 * ready chain * select heir */ void _Scheduler_priority_Yield(void) { 47556: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info; ready = sched_info->ready_chain; 4755a: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4755e: 243c 0000 0700 movel #1792,%d2 47564: 2002 movel %d2,%d0 Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info; ready = sched_info->ready_chain; 47566: 2251 moveal %a1@,%a1 _ISR_Disable( level ); 47568: 40c1 movew %sr,%d1 4756a: 8081 orl %d1,%d0 4756c: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 4756e: 2029 0008 movel %a1@(8),%d0 47572: b091 cmpl %a1@,%d0 47574: 6738 beqs 475ae <_Scheduler_priority_Yield+0x62> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 47576: 2468 0004 moveal %a0@(4),%a2 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 4757a: 2009 movel %a1,%d0 4757c: 5880 addql #4,%d0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4757e: 2650 moveal %a0@,%a3 previous = the_node->previous; next->previous = previous; 47580: 274a 0004 movel %a2,%a3@(4) previous->next = next; 47584: 248b movel %a3,%a2@ Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 47586: 2469 0008 moveal %a1@(8),%a2 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 4758a: 2080 movel %d0,%a0@ Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 4758c: 2348 0008 movel %a0,%a1@(8) old_last->next = the_node; 47590: 2488 movel %a0,%a2@ the_node->previous = old_last; 47592: 214a 0004 movel %a2,%a0@(4) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 47596: 2002 movel %d2,%d0 47598: 46c1 movew %d1,%sr 4759a: 8081 orl %d1,%d0 4759c: 46c0 movew %d0,%sr if ( _Thread_Is_heir( executing ) ) 4759e: b1f9 0005 d6f8 cmpal 5d6f8 <_Per_CPU_Information+0x10>,%a0 475a4: 6610 bnes 475b6 <_Scheduler_priority_Yield+0x6a> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) _Chain_First( ready ); 475a6: 23d1 0005 d6f8 movel %a1@,5d6f8 <_Per_CPU_Information+0x10> 475ac: 6008 bras 475b6 <_Scheduler_priority_Yield+0x6a> _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 475ae: b1f9 0005 d6f8 cmpal 5d6f8 <_Per_CPU_Information+0x10>,%a0 475b4: 6708 beqs 475be <_Scheduler_priority_Yield+0x72> <== ALWAYS TAKEN _Thread_Dispatch_necessary = true; 475b6: 7001 moveq #1,%d0 475b8: 13c0 0005 d700 moveb %d0,5d700 <_Per_CPU_Information+0x18> _ISR_Enable( level ); 475be: 46c1 movew %d1,%sr } 475c0: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 475c4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046284 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46284: 4e56 0000 linkw %fp,#0 46288: 206e 0008 moveal %fp@(8),%a0 4628c: 2f03 movel %d3,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 4628e: 2039 0005 dd80 movel 5dd80 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46294: 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) || 46296: 4a88 tstl %a0 46298: 6762 beqs 462fc <_TOD_Validate+0x78> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 4629a: 243c 000f 4240 movel #1000000,%d2 462a0: 4c40 2002 remul %d0,%d2,%d2 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 462a4: b4a8 0018 cmpl %a0@(24),%d2 462a8: 6352 blss 462fc <_TOD_Validate+0x78> (the_tod->ticks >= ticks_per_second) || 462aa: 763b moveq #59,%d3 462ac: b6a8 0014 cmpl %a0@(20),%d3 462b0: 654a bcss 462fc <_TOD_Validate+0x78> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 462b2: b6a8 0010 cmpl %a0@(16),%d3 462b6: 6544 bcss 462fc <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 462b8: 7017 moveq #23,%d0 462ba: b0a8 000c cmpl %a0@(12),%d0 462be: 653c bcss 462fc <_TOD_Validate+0x78> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 462c0: 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) || 462c4: 6736 beqs 462fc <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->month == 0) || 462c6: 720c moveq #12,%d1 462c8: b280 cmpl %d0,%d1 462ca: 6530 bcss 462fc <_TOD_Validate+0x78> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 462cc: 2410 movel %a0@,%d2 (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) || 462ce: 0c82 0000 07c3 cmpil #1987,%d2 462d4: 6326 blss 462fc <_TOD_Validate+0x78> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 462d6: 2228 0008 movel %a0@(8),%d1 (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) || 462da: 6720 beqs 462fc <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 462dc: 163c 0003 moveb #3,%d3 462e0: 41f9 0005 cf06 lea 5cf06 <_TOD_Days_per_month>,%a0 462e6: c483 andl %d3,%d2 462e8: 6606 bnes 462f0 <_TOD_Validate+0x6c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 462ea: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0 462ee: 6004 bras 462f4 <_TOD_Validate+0x70> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 462f0: 2030 0c00 movel %a0@(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( 462f4: b081 cmpl %d1,%d0 462f6: 54c0 scc %d0 462f8: 4480 negl %d0 462fa: 6002 bras 462fe <_TOD_Validate+0x7a> (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; 462fc: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 462fe: 241f movel %sp@+,%d2 46300: 261f movel %sp@+,%d3 46302: 4e5e unlk %fp ... =============================================================================== 00047618 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47618: 4e56 fff0 linkw %fp,#-16 4761c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 47620: 246e 0008 moveal %fp@(8),%a2 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 47624: 282a 0010 movel %a2@(16),%d4 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47628: 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 ); 4762c: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4762e: 162e 0013 moveb %fp@(19),%d3 /* * 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 ); 47632: 4eb9 0004 81e0 jsr 481e0 <_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 ) 47638: 588f addql #4,%sp 4763a: b4aa 0014 cmpl %a2@(20),%d2 4763e: 670c beqs 4764c <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 47640: 2f02 movel %d2,%sp@- 47642: 2f0a movel %a2,%sp@- 47644: 4eb9 0004 8184 jsr 48184 <_Thread_Set_priority> 4764a: 508f addql #8,%sp _ISR_Disable( level ); 4764c: 203c 0000 0700 movel #1792,%d0 47652: 40c2 movew %sr,%d2 47654: 8082 orl %d2,%d0 47656: 46c0 movew %d0,%sr 47658: 7204 moveq #4,%d1 /* * 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; 4765a: 202a 0010 movel %a2@(16),%d0 4765e: c284 andl %d4,%d1 if ( state != STATES_TRANSIENT ) { 47660: 7804 moveq #4,%d4 47662: b880 cmpl %d0,%d4 47664: 672e beqs 47694 <_Thread_Change_priority+0x7c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 47666: 4a81 tstl %d1 47668: 6608 bnes 47672 <_Thread_Change_priority+0x5a> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4766a: 72fb moveq #-5,%d1 4766c: c280 andl %d0,%d1 4766e: 2541 0010 movel %d1,%a2@(16) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 47672: 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); 47674: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 4767a: 676c beqs 476e8 <_Thread_Change_priority+0xd0> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 4767c: 2d4a 000c movel %a2,%fp@(12) 47680: 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 ); } 47686: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4768c: 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 ); 4768e: 4ef9 0004 80e8 jmp 480e8 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 47694: 4a81 tstl %d1 47696: 661e bnes 476b6 <_Thread_Change_priority+0x9e> <== 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 ); 47698: 42aa 0010 clrl %a2@(16) if ( prepend_it ) 4769c: 4a03 tstb %d3 4769e: 670a beqs 476aa <_Thread_Change_priority+0x92> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 476a0: 2f0a movel %a2,%sp@- 476a2: 2079 0005 bc48 moveal 5bc48 <_Scheduler+0x28>,%a0 476a8: 6008 bras 476b2 <_Thread_Change_priority+0x9a> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 476aa: 2079 0005 bc44 moveal 5bc44 <_Scheduler+0x24>,%a0 476b0: 2f0a movel %a2,%sp@- 476b2: 4e90 jsr %a0@ 476b4: 588f addql #4,%sp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 476b6: 203c 0000 0700 movel #1792,%d0 476bc: 46c2 movew %d2,%sr 476be: 8082 orl %d2,%d0 476c0: 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(); 476c2: 2079 0005 bc28 moveal 5bc28 <_Scheduler+0x8>,%a0 476c8: 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 ); 476ca: 2079 0005 d6f4 moveal 5d6f4 <_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() && 476d0: b1f9 0005 d6f8 cmpal 5d6f8 <_Per_CPU_Information+0x10>,%a0 476d6: 670e beqs 476e6 <_Thread_Change_priority+0xce> 476d8: 4a28 0074 tstb %a0@(116) 476dc: 6708 beqs 476e6 <_Thread_Change_priority+0xce> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 476de: 7801 moveq #1,%d4 476e0: 13c4 0005 d700 moveb %d4,5d700 <_Per_CPU_Information+0x18> _ISR_Enable( level ); 476e6: 46c2 movew %d2,%sr } 476e8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 476ee: 4e5e unlk %fp ... =============================================================================== 000478bc <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 478bc: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 478c0: 486e fffc pea %fp@(-4) 478c4: 2f2e 0008 movel %fp@(8),%sp@- 478c8: 4eb9 0004 7a5c jsr 47a5c <_Thread_Get> switch ( location ) { 478ce: 508f addql #8,%sp 478d0: 4aae fffc tstl %fp@(-4) 478d4: 661e bnes 478f4 <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 478d6: 2f3c 1000 0018 movel #268435480,%sp@- 478dc: 2f00 movel %d0,%sp@- 478de: 4eb9 0004 76f4 jsr 476f4 <_Thread_Clear_state> 478e4: 508f addql #8,%sp 478e6: 2039 0005 d558 movel 5d558 <_Thread_Dispatch_disable_level>,%d0 478ec: 5380 subql #1,%d0 478ee: 23c0 0005 d558 movel %d0,5d558 <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 478f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000478f8 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 478f8: 4e56 ffc8 linkw %fp,#-56 478fc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 47900: 283c 0000 0700 movel #1792,%d4 47906: 2204 movel %d4,%d1 { Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 47908: 2479 0005 d6f4 moveal 5d6f4 <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 4790e: 40c0 movew %sr,%d0 47910: 8280 orl %d0,%d1 47912: 46c1 movew %d1,%sr _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47914: 260e movel %fp,%d3 _Timestamp_Subtract( 47916: 240e movel %fp,%d2 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47918: 5183 subql #8,%d3 _Timestamp_Subtract( 4791a: 0682 ffff fff0 addil #-16,%d2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 47920: 2e3c 0004 8380 movel #295808,%d7 if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 47926: 2c3c 0004 8634 movel #296500,%d6 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 4792c: 2a3c 0004 8958 movel #297304,%d5 #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); 47932: 4bf9 0004 8ac0 lea 48ac0 <_CPU_Context_restore_fp>,%a5 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 47938: 49f9 0004 8a9e lea 48a9e <_CPU_Context_save_fp>,%a4 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 4793e: 6000 00d4 braw 47a14 <_Thread_Dispatch+0x11c> heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 47942: 7201 moveq #1,%d1 47944: 23c1 0005 d558 movel %d1,5d558 <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; 4794a: 2679 0005 d6f8 moveal 5d6f8 <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; 47950: 4201 clrb %d1 _Thread_Executing = heir; 47952: 23cb 0005 d6f4 movel %a3,5d6f4 <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; 47958: 13c1 0005 d700 moveb %d1,5d700 <_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 ) 4795e: b5cb cmpal %a3,%a2 47960: 6700 00bc beqw 47a1e <_Thread_Dispatch+0x126> */ #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 ) 47964: 7201 moveq #1,%d1 47966: b2ab 007a cmpl %a3@(122),%d1 4796a: 660a bnes 47976 <_Thread_Dispatch+0x7e> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 4796c: 41f9 0005 d510 lea 5d510 <_Thread_Ticks_per_timeslice>,%a0 47972: 2750 0076 movel %a0@,%a3@(118) _ISR_Enable( level ); 47976: 46c0 movew %d0,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47978: 2f03 movel %d3,%sp@- 4797a: 4eb9 0004 a358 jsr 4a358 <_TOD_Get_uptime> _Timestamp_Subtract( 47980: 2f02 movel %d2,%sp@- 47982: 2f03 movel %d3,%sp@- 47984: 4879 0005 d604 pea 5d604 <_Thread_Time_of_last_context_switch> 4798a: 4eb9 0004 83b8 jsr 483b8 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 47990: 2047 moveal %d7,%a0 47992: 2f02 movel %d2,%sp@- 47994: 486a 0082 pea %a2@(130) 47998: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 4799a: 2079 0005 d5de moveal 5d5de <_Thread_libc_reent>,%a0 479a0: 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; 479a4: 202e fff8 movel %fp@(-8),%d0 479a8: 222e fffc movel %fp@(-4),%d1 479ac: 23c0 0005 d604 movel %d0,5d604 <_Thread_Time_of_last_context_switch> 479b2: 23c1 0005 d608 movel %d1,5d608 <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 479b8: 4a88 tstl %a0 479ba: 6708 beqs 479c4 <_Thread_Dispatch+0xcc> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 479bc: 2550 00f8 movel %a0@,%a2@(248) *_Thread_libc_reent = heir->libc_reent; 479c0: 20ab 00f8 movel %a3@(248),%a0@ } _User_extensions_Thread_switch( executing, heir ); 479c4: 2f0b movel %a3,%sp@- 479c6: 2046 moveal %d6,%a0 479c8: 2f0a movel %a2,%sp@- 479ca: 4e90 jsr %a0@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 479cc: 486b 00c0 pea %a3@(192) 479d0: 2045 moveal %d5,%a0 479d2: 486a 00c0 pea %a2@(192) 479d6: 4e90 jsr %a0@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 479d8: 4fef 0010 lea %sp@(16),%sp 479dc: 4aaa 00f4 tstl %a2@(244) 479e0: 6724 beqs 47a06 <_Thread_Dispatch+0x10e> #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 ); 479e2: 2079 0005 d5da moveal 5d5da <_Thread_Allocated_fp>,%a0 479e8: b1ca cmpal %a2,%a0 479ea: 671a beqs 47a06 <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 479ec: 4a88 tstl %a0 479ee: 6708 beqs 479f8 <_Thread_Dispatch+0x100> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 479f0: 4868 00f4 pea %a0@(244) 479f4: 4e94 jsr %a4@ 479f6: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 479f8: 486a 00f4 pea %a2@(244) 479fc: 4e95 jsr %a5@ _Thread_Allocated_fp = executing; 479fe: 588f addql #4,%sp 47a00: 23ca 0005 d5da movel %a2,5d5da <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 47a06: 2479 0005 d6f4 moveal 5d6f4 <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 47a0c: 2204 movel %d4,%d1 47a0e: 40c0 movew %sr,%d0 47a10: 8280 orl %d0,%d1 47a12: 46c1 movew %d1,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 47a14: 1239 0005 d700 moveb 5d700 <_Per_CPU_Information+0x18>,%d1 47a1a: 6600 ff26 bnew 47942 <_Thread_Dispatch+0x4a> _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 47a1e: 42b9 0005 d558 clrl 5d558 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 47a24: 46c0 movew %d0,%sr _API_extensions_Run_postswitch(); 47a26: 4eb9 0004 6088 jsr 46088 <_API_extensions_Run_postswitch> } 47a2c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47a32: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bb20 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4bb20: 4e56 0000 linkw %fp,#0 4bb24: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4bb26: 2479 0005 d6f4 moveal 5d6f4 <_Per_CPU_Information+0xc>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4bb2c: 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; 4bb2e: 222a 00a8 movel %a2@(168),%d1 _ISR_Set_level(level); 4bb32: 40c0 movew %sr,%d0 4bb34: e189 lsll #8,%d1 4bb36: 0280 0000 f8ff andil #63743,%d0 4bb3c: 8081 orl %d1,%d0 4bb3e: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4bb40: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4bb42: 1439 0005 cd1c moveb 5cd1c ,%d2 doneConstructors = 1; 4bb48: 13c0 0005 cd1c moveb %d0,5cd1c #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4bb4e: 4aaa 00f4 tstl %a2@(244) 4bb52: 6720 beqs 4bb74 <_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 ); 4bb54: 2079 0005 d5da moveal 5d5da <_Thread_Allocated_fp>,%a0 4bb5a: b1ca cmpal %a2,%a0 4bb5c: 6716 beqs 4bb74 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4bb5e: 4a88 tstl %a0 4bb60: 670c beqs 4bb6e <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4bb62: 4868 00f4 pea %a0@(244) 4bb66: 4eb9 0004 8a9e jsr 48a9e <_CPU_Context_save_fp> 4bb6c: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4bb6e: 23ca 0005 d5da movel %a2,5d5da <_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 ); 4bb74: 2f0a movel %a2,%sp@- 4bb76: 4eb9 0004 84b0 jsr 484b0 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4bb7c: 4eb9 0004 7a36 jsr 47a36 <_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 (!doneCons) /* && (volatile void *)_init) */ { 4bb82: 588f addql #4,%sp 4bb84: 4a02 tstb %d2 4bb86: 6606 bnes 4bb8e <_Thread_Handler+0x6e> INIT_NAME (); 4bb88: 4eb9 0005 a074 jsr 5a074 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4bb8e: 4aaa 0092 tstl %a2@(146) 4bb92: 6610 bnes 4bba4 <_Thread_Handler+0x84> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4bb94: 2f2a 009a movel %a2@(154),%sp@- 4bb98: 206a 008e moveal %a2@(142),%a0 4bb9c: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4bb9e: 588f addql #4,%sp 4bba0: 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 ); 4bba4: 2f0a movel %a2,%sp@- 4bba6: 4eb9 0004 84e8 jsr 484e8 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4bbac: 4878 0005 pea 5 4bbb0: 4878 0001 pea 1 4bbb4: 42a7 clrl %sp@- 4bbb6: 4eb9 0004 69b0 jsr 469b0 <_Internal_error_Occurred> =============================================================================== 0004893c <_Thread_Restart>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 4893c: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4893e: 4e56 0000 linkw %fp,#0 48942: 2f0a movel %a2,%sp@- 48944: 246e 0008 moveal %fp@(8),%a2 48948: c0aa 0010 andl %a2@(16),%d0 if ( !_States_Is_dormant( the_thread->current_state ) ) { 4894c: 6664 bnes 489b2 <_Thread_Restart+0x76> _Thread_Set_transient( the_thread ); 4894e: 2f0a movel %a2,%sp@- 48950: 4eb9 0004 8a1c jsr 48a1c <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 48956: 2f2e 0010 movel %fp@(16),%sp@- 4895a: 2f2e 000c movel %fp@(12),%sp@- 4895e: 2f0a movel %a2,%sp@- 48960: 4eb9 0004 b214 jsr 4b214 <_Thread_Reset> _Thread_Load_environment( the_thread ); 48966: 2f0a movel %a2,%sp@- 48968: 4eb9 0004 af4c jsr 4af4c <_Thread_Load_environment> _Thread_Ready( the_thread ); 4896e: 2f0a movel %a2,%sp@- 48970: 4eb9 0004 b1e4 jsr 4b1e4 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 48976: 2f0a movel %a2,%sp@- 48978: 4eb9 0004 8e30 jsr 48e30 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 4897e: 4fef 001c lea %sp@(28),%sp 48982: b5f9 0005 e21c cmpal 5e21c <_Per_CPU_Information+0xc>,%a2 48988: 662c bnes 489b6 <_Thread_Restart+0x7a> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 4898a: 4aaa 00f4 tstl %a2@(244) 4898e: 670c beqs 4899c <_Thread_Restart+0x60> _Context_Restore_fp( &_Thread_Executing->fp_context ); 48990: 486a 00f4 pea %a2@(244) 48994: 4eb9 0004 933c jsr 4933c <_CPU_Context_restore_fp> 4899a: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 4899c: 2079 0005 e21c moveal 5e21c <_Per_CPU_Information+0xc>,%a0 489a2: 41e8 00c0 lea %a0@(192),%a0 489a6: 2f08 movel %a0,%sp@- 489a8: 4eb9 0004 91ea jsr 491ea <_CPU_Context_Restart_self> 489ae: 588f addql #4,%sp <== NOT EXECUTED 489b0: 6004 bras 489b6 <_Thread_Restart+0x7a> <== NOT EXECUTED _Thread_Restart_self(); return true; } return false; 489b2: 4200 clrb %d0 489b4: 6002 bras 489b8 <_Thread_Restart+0x7c> _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 489b6: 7001 moveq #1,%d0 } return false; } 489b8: 246e fffc moveal %fp@(-4),%a2 489bc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048268 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 48268: 4e56 0000 linkw %fp,#0 4826c: 206e 0008 moveal %fp@(8),%a0 * 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 ) 48270: 2279 0005 bd18 moveal 5bd18 ,%a1 48276: 4a89 tstl %a1 48278: 670a beqs 48284 <_Thread_Stack_Free+0x1c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 4827a: 2d68 00b4 0008 movel %a0@(180),%fp@(8) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 48280: 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 ); 48282: 4ed1 jmp %a1@ else _Workspace_Free( the_thread->Start.Initial_stack.area ); 48284: 2d68 00b4 0008 movel %a0@(180),%fp@(8) } 4828a: 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 ); 4828c: 4ef9 0004 8908 jmp 48908 <_Workspace_Free> ... =============================================================================== 000475c8 <_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 ) ) { 475c8: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 475ca: 4e56 0000 linkw %fp,#0 475ce: 202e 0010 movel %fp@(16),%d0 475d2: 2f0a movel %a2,%sp@- 475d4: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 475d8: 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 ) ) { 475dc: b2aa 0050 cmpl %a2@(80),%d1 475e0: 6618 bnes 475fa <_Thread_blocking_operation_Cancel+0x32> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 475e2: 123c 0003 moveb #3,%d1 475e6: 2541 0050 movel %d1,%a2@(80) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 475ea: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 475ec: 486a 0048 pea %a2@(72) 475f0: 4eb9 0004 8794 jsr 48794 <_Watchdog_Remove> 475f6: 588f addql #4,%sp 475f8: 6002 bras 475fc <_Thread_blocking_operation_Cancel+0x34> } else _ISR_Enable( level ); 475fa: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 475fc: 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 } 47600: 246e fffc moveal %fp@(-4),%a2 47604: 203c 1003 fff8 movel #268697592,%d0 4760a: 2d40 000c movel %d0,%fp@(12) 4760e: 4e5e unlk %fp 47610: 4ef9 0004 76f4 jmp 476f4 <_Thread_Clear_state> ... =============================================================================== 0004bbbc <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4bbbc: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4bbc2: 4e56 0000 linkw %fp,#0 4bbc6: 2f0a movel %a2,%sp@- 4bbc8: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4bbcc: 40c0 movew %sr,%d0 4bbce: 8280 orl %d0,%d1 4bbd0: 46c1 movew %d1,%sr 4bbd2: 222a 0010 movel %a2@(16),%d1 4bbd6: 0281 0003 bee0 andil #245472,%d1 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4bbdc: 660a bnes 4bbe8 <_Thread_queue_Extract_fifo+0x2c> _ISR_Enable( level ); 4bbde: 46c0 movew %d0,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4bbe0: 246e fffc moveal %fp@(-4),%a2 4bbe4: 4e5e unlk %fp 4bbe6: 4e75 rts ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4bbe8: 2252 moveal %a2@,%a1 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4bbea: 7202 moveq #2,%d1 previous = the_node->previous; 4bbec: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4bbf0: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4bbf4: 2089 movel %a1,%a0@ return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4bbf6: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4bbfa: b2aa 0050 cmpl %a2@(80),%d1 4bbfe: 6704 beqs 4bc04 <_Thread_queue_Extract_fifo+0x48> _ISR_Enable( level ); 4bc00: 46c0 movew %d0,%sr 4bc02: 6014 bras 4bc18 <_Thread_queue_Extract_fifo+0x5c> 4bc04: 7203 moveq #3,%d1 4bc06: 2541 0050 movel %d1,%a2@(80) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4bc0a: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4bc0c: 486a 0048 pea %a2@(72) 4bc10: 4eb9 0004 8794 jsr 48794 <_Watchdog_Remove> 4bc16: 588f addql #4,%sp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4bc18: 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 } 4bc1c: 246e fffc moveal %fp@(-4),%a2 4bc20: 203c 1003 fff8 movel #268697592,%d0 4bc26: 2d40 000c movel %d0,%fp@(12) 4bc2a: 4e5e unlk %fp 4bc2c: 4ef9 0004 76f4 jmp 476f4 <_Thread_Clear_state> ... =============================================================================== 0004a924 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4a924: 4e56 0000 linkw %fp,#0 4a928: 226e 0008 moveal %fp@(8),%a1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4a92c: 2069 0044 moveal %a1@(68),%a0 * 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. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 4a930: 2028 0030 movel %a0@(48),%d0 4a934: 671c beqs 4a952 <_Thread_queue_Process_timeout+0x2e> 4a936: b3f9 0005 d6f4 cmpal 5d6f4 <_Per_CPU_Information+0xc>,%a1 4a93c: 6614 bnes 4a952 <_Thread_queue_Process_timeout+0x2e><== NEVER TAKEN _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4a93e: 7203 moveq #3,%d1 4a940: b280 cmpl %d0,%d1 4a942: 6720 beqs 4a964 <_Thread_queue_Process_timeout+0x40> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4a944: 7002 moveq #2,%d0 */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4a946: 2368 003c 0034 movel %a0@(60),%a1@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4a94c: 2140 0030 movel %d0,%a0@(48) 4a950: 6012 bras 4a964 <_Thread_queue_Process_timeout+0x40> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4a952: 2368 003c 0034 movel %a0@(60),%a1@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4a958: 2f09 movel %a1,%sp@- 4a95a: 2f08 movel %a0,%sp@- 4a95c: 4eb9 0004 a820 jsr 4a820 <_Thread_queue_Extract> 4a962: 508f addql #8,%sp } } 4a964: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000480e8 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 480e8: 4e56 fff0 linkw %fp,#-16 480ec: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 480f0: 246e 0008 moveal %fp@(8),%a2 480f4: 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 ) 480f8: 4a8a tstl %a2 480fa: 6746 beqs 48142 <_Thread_queue_Requeue+0x5a> <== 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 ) { 480fc: 7001 moveq #1,%d0 480fe: b0aa 0034 cmpl %a2@(52),%d0 48102: 663e bnes 48142 <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 48104: 303c 0700 movew #1792,%d0 48108: 40c2 movew %sr,%d2 4810a: 8082 orl %d2,%d0 4810c: 46c0 movew %d0,%sr 4810e: 202b 0010 movel %a3@(16),%d0 48112: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 48118: 6726 beqs 48140 <_Thread_queue_Requeue+0x58> <== NEVER TAKEN 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; 4811a: 7001 moveq #1,%d0 4811c: 2540 0030 movel %d0,%a2@(48) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 48120: 4878 0001 pea 1 48124: 2f0b movel %a3,%sp@- 48126: 2f0a movel %a2,%sp@- 48128: 4eb9 0004 a858 jsr 4a858 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 4812e: 486e fffc pea %fp@(-4) 48132: 2f0b movel %a3,%sp@- 48134: 2f0a movel %a2,%sp@- 48136: 4eb9 0004 7ed0 jsr 47ed0 <_Thread_queue_Enqueue_priority> 4813c: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 48140: 46c2 movew %d2,%sr } } 48142: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48148: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004814c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 4814c: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48150: 486e fffc pea %fp@(-4) 48154: 2f2e 0008 movel %fp@(8),%sp@- 48158: 4eb9 0004 7a5c jsr 47a5c <_Thread_Get> switch ( location ) { 4815e: 508f addql #8,%sp 48160: 4aae fffc tstl %fp@(-4) 48164: 6618 bnes 4817e <_Thread_queue_Timeout+0x32> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 48166: 2f00 movel %d0,%sp@- 48168: 4eb9 0004 a924 jsr 4a924 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4816e: 588f addql #4,%sp 48170: 2039 0005 d558 movel 5d558 <_Thread_Dispatch_disable_level>,%d0 48176: 5380 subql #1,%d0 48178: 23c0 0005 d558 movel %d0,5d558 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 4817e: 4e5e unlk %fp ... =============================================================================== 00052292 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 52292: 4e56 ffb4 linkw %fp,#-76 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 52296: 41ee ffec lea %fp@(-20),%a0 5229a: 200e movel %fp,%d0 5229c: 220e movel %fp,%d1 5229e: 5181 subql #8,%d1 522a0: 0680 ffff fff4 addil #-12,%d0 522a6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 522aa: 246e 0008 moveal %fp@(8),%a2 522ae: 260e movel %fp,%d3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail( const Chain_Control *the_chain ) { return &the_chain->Tail.Node; 522b0: 2808 movel %a0,%d4 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 522b2: 2c0a movel %a2,%d6 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 522b4: 0683 ffff ffe8 addil #-24,%d3 522ba: 0686 0000 0040 addil #64,%d6 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 522c0: 2a0a movel %a2,%d5 /* * 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 ); 522c2: 240a movel %a2,%d2 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 522c4: 0685 0000 0030 addil #48,%d5 522ca: 47f9 0005 5efc lea 55efc <_Watchdog_Adjust_to_chain>,%a3 /* * 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 ); 522d0: 0682 0000 0068 addil #104,%d2 522d6: 4bf9 0005 5e7c lea 55e7c <_Watchdog_Adjust>,%a5 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail( const Chain_Control *the_chain ) { return &the_chain->Tail.Node; 522dc: 2e01 movel %d1,%d7 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 522de: 2d48 ffe8 movel %a0,%fp@(-24) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 522e2: 41ea 0008 lea %a2@(8),%a0 522e6: 2d41 fff4 movel %d1,%fp@(-12) head->previous = NULL; 522ea: 42ae fff8 clrl %fp@(-8) tail->previous = head; 522ee: 2d40 fffc movel %d0,%fp@(-4) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 522f2: 42ae ffec clrl %fp@(-20) tail->previous = head; 522f6: 2d43 fff0 movel %d3,%fp@(-16) 522fa: 2d48 ffe4 movel %a0,%fp@(-28) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 522fe: 2d46 ffe0 movel %d6,%fp@(-32) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 52302: 41ee fff4 lea %fp@(-12),%a0 ) { 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 ); 52306: 49f9 0005 5f8c lea 55f8c <_Watchdog_Insert>,%a4 { /* * 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; 5230c: 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; 52310: 2039 0007 605c movel 7605c <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 52316: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 5231a: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5231e: 9081 subl %d1,%d0 52320: 2f03 movel %d3,%sp@- 52322: 2f00 movel %d0,%sp@- 52324: 2f05 movel %d5,%sp@- 52326: 4e93 jsr %a3@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 52328: 2039 0007 5fde movel 75fde <_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 ) { 5232e: 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; 52332: 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 ) { 52336: b280 cmpl %d0,%d1 52338: 6412 bccs 5234c <_Timer_server_Body+0xba> /* * 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 ); 5233a: 2f03 movel %d3,%sp@- 5233c: 2c00 movel %d0,%d6 5233e: 9c81 subl %d1,%d6 52340: 2f06 movel %d6,%sp@- 52342: 2d40 ffdc movel %d0,%fp@(-36) 52346: 2f02 movel %d2,%sp@- 52348: 4e93 jsr %a3@ 5234a: 6014 bras 52360 <_Timer_server_Body+0xce> } else if ( snapshot < last_snapshot ) { 5234c: b280 cmpl %d0,%d1 5234e: 6318 blss 52368 <_Timer_server_Body+0xd6> /* * 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 ); 52350: 9280 subl %d0,%d1 52352: 2f01 movel %d1,%sp@- 52354: 4878 0001 pea 1 52358: 2d40 ffdc movel %d0,%fp@(-36) 5235c: 2f02 movel %d2,%sp@- 5235e: 4e95 jsr %a5@ 52360: 202e ffdc movel %fp@(-36),%d0 52364: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 52368: 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 ); 5236c: 202a 0078 movel %a2@(120),%d0 52370: 2f00 movel %d0,%sp@- 52372: 4eb9 0005 2d2c jsr 52d2c <_Chain_Get> if ( timer == NULL ) { 52378: 588f addql #4,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 5237a: 2040 moveal %d0,%a0 if ( timer == NULL ) { 5237c: 4a80 tstl %d0 5237e: 6724 beqs 523a4 <_Timer_server_Body+0x112> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 52380: 2028 0038 movel %a0@(56),%d0 52384: 7201 moveq #1,%d1 52386: b280 cmpl %d0,%d1 52388: 6608 bnes 52392 <_Timer_server_Body+0x100> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 5238a: 4868 0010 pea %a0@(16) 5238e: 2f05 movel %d5,%sp@- 52390: 600c bras 5239e <_Timer_server_Body+0x10c> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 52392: 7c03 moveq #3,%d6 52394: bc80 cmpl %d0,%d6 52396: 66d4 bnes 5236c <_Timer_server_Body+0xda> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 52398: 4868 0010 pea %a0@(16) 5239c: 2f02 movel %d2,%sp@- 5239e: 4e94 jsr %a4@ 523a0: 508f addql #8,%sp 523a2: 60c8 bras 5236c <_Timer_server_Body+0xda> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 523a4: 203c 0000 0700 movel #1792,%d0 523aa: 40c1 movew %sr,%d1 523ac: 8081 orl %d1,%d0 523ae: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 523b0: beae fff4 cmpl %fp@(-12),%d7 523b4: 6614 bnes 523ca <_Timer_server_Body+0x138> <== NEVER TAKEN ts->insert_chain = NULL; 523b6: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 523ba: 46c1 movew %d1,%sr /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 523bc: 2c3c 0000 0700 movel #1792,%d6 _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 ) ) { 523c2: b8ae ffe8 cmpl %fp@(-24),%d4 523c6: 6608 bnes 523d0 <_Timer_server_Body+0x13e> 523c8: 6042 bras 5240c <_Timer_server_Body+0x17a> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 523ca: 46c1 movew %d1,%sr <== NOT EXECUTED 523cc: 6000 ff42 braw 52310 <_Timer_server_Body+0x7e> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 523d0: 2006 movel %d6,%d0 523d2: 40c1 movew %sr,%d1 523d4: 8081 orl %d1,%d0 523d6: 46c0 movew %d0,%sr initialized = false; } #endif return status; } 523d8: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 523dc: b888 cmpl %a0,%d4 523de: 6726 beqs 52406 <_Timer_server_Body+0x174> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 523e0: 2250 moveal %a0@,%a1 head->next = new_first; 523e2: 2d49 ffe8 movel %a1,%fp@(-24) new_first->previous = head; 523e6: 2343 0004 movel %d3,%a1@(4) * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 523ea: 4a88 tstl %a0 523ec: 6718 beqs 52406 <_Timer_server_Body+0x174> <== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 523ee: 42a8 0008 clrl %a0@(8) _ISR_Enable( level ); 523f2: 46c1 movew %d1,%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 ); 523f4: 2f28 0024 movel %a0@(36),%sp@- 523f8: 2f28 0020 movel %a0@(32),%sp@- 523fc: 2068 001c moveal %a0@(28),%a0 52400: 4e90 jsr %a0@ } 52402: 508f addql #8,%sp 52404: 60ca bras 523d0 <_Timer_server_Body+0x13e> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 52406: 46c1 movew %d1,%sr 52408: 6000 fef8 braw 52302 <_Timer_server_Body+0x70> static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 5240c: 49f9 0005 60b4 lea 560b4 <_Watchdog_Remove>,%a4 * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 52412: 4200 clrb %d0 52414: 1540 007c moveb %d0,%a2@(124) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 52418: 4eba fd9e jsr %pc@(521b8 <_Thread_Disable_dispatch>) _Thread_Set_state( ts->thread, STATES_DELAYING ); 5241c: 4878 0008 pea 8 52420: 2f12 movel %a2@,%sp@- 52422: 4eb9 0005 590c jsr 5590c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 52428: 2f0a movel %a2,%sp@- 5242a: 4eba fda2 jsr %pc@(521ce <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5242e: 2f0a movel %a2,%sp@- 52430: 4eba fdfc jsr %pc@(5222e <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 52434: 4eb9 0005 5122 jsr 55122 <_Thread_Enable_dispatch> ts->active = true; 5243a: 7201 moveq #1,%d1 5243c: 1541 007c moveb %d1,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 52440: 2f2e ffe4 movel %fp@(-28),%sp@- 52444: 4e94 jsr %a4@ static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 52446: 2f2e ffe0 movel %fp@(-32),%sp@- 5244a: 4e94 jsr %a4@ 5244c: 4fef 0018 lea %sp@(24),%sp 52450: 6000 feb0 braw 52302 <_Timer_server_Body+0x70> =============================================================================== 00052454 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 52454: 4e56 fff0 linkw %fp,#-16 52458: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 5245c: 246e 0008 moveal %fp@(8),%a2 52460: 266e 000c moveal %fp@(12),%a3 if ( ts->insert_chain == NULL ) { 52464: 202a 0078 movel %a2@(120),%d0 52468: 6600 00ea bnew 52554 <_Timer_server_Schedule_operation_method+0x100> * is the reference point for the delta chain. Thus if we do not update the * reference point we have to add DT to the initial delta of the watchdog * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); 5246c: 4eba fd4a jsr %pc@(521b8 <_Thread_Disable_dispatch>) if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 52470: 202b 0038 movel %a3@(56),%d0 52474: 7201 moveq #1,%d1 52476: b280 cmpl %d0,%d1 52478: 665c bnes 524d6 <_Timer_server_Schedule_operation_method+0x82> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 5247a: 203c 0000 0700 movel #1792,%d0 52480: 40c2 movew %sr,%d2 52482: 8082 orl %d2,%d0 52484: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 52486: 2039 0007 605c movel 7605c <_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 ); 5248c: 43ea 0034 lea %a2@(52),%a1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 52490: 222a 003c movel %a2@(60),%d1 initialized = false; } #endif return status; } 52494: 206a 0030 moveal %a2@(48),%a0 * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 52498: b3c8 cmpal %a0,%a1 5249a: 6716 beqs 524b2 <_Timer_server_Schedule_operation_method+0x5e> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 5249c: 2240 moveal %d0,%a1 5249e: 93c1 subal %d1,%a1 delta_interval = first_watchdog->delta_interval; 524a0: 2228 0010 movel %a0@(16),%d1 if (delta_interval > delta) { 524a4: b3c1 cmpal %d1,%a1 524a6: 6404 bccs 524ac <_Timer_server_Schedule_operation_method+0x58> delta_interval -= delta; 524a8: 9289 subl %a1,%d1 524aa: 6002 bras 524ae <_Timer_server_Schedule_operation_method+0x5a> } else { delta_interval = 0; 524ac: 4281 clrl %d1 } first_watchdog->delta_interval = delta_interval; 524ae: 2141 0010 movel %d1,%a0@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 524b2: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 524b6: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 524b8: 486b 0010 pea %a3@(16) 524bc: 486a 0030 pea %a2@(48) 524c0: 4eb9 0005 5f8c jsr 55f8c <_Watchdog_Insert> if ( !ts->active ) { 524c6: 508f addql #8,%sp 524c8: 102a 007c moveb %a2@(124),%d0 524cc: 6678 bnes 52546 <_Timer_server_Schedule_operation_method+0xf2> _Timer_server_Reset_interval_system_watchdog( ts ); 524ce: 2f0a movel %a2,%sp@- 524d0: 4eba fcfc jsr %pc@(521ce <_Timer_server_Reset_interval_system_watchdog>) 524d4: 606e bras 52544 <_Timer_server_Schedule_operation_method+0xf0> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 524d6: 7203 moveq #3,%d1 524d8: b280 cmpl %d0,%d1 524da: 666a bnes 52546 <_Timer_server_Schedule_operation_method+0xf2> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 524dc: 203c 0000 0700 movel #1792,%d0 524e2: 40c2 movew %sr,%d2 524e4: 8082 orl %d2,%d0 524e6: 46c0 movew %d0,%sr 524e8: 200a movel %a2,%d0 524ea: 0680 0000 006c addil #108,%d0 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 524f0: 2239 0007 5fde movel 75fde <_TOD_Now>,%d1 last_snapshot = ts->TOD_watchdogs.last_snapshot; 524f6: 226a 0074 moveal %a2@(116),%a1 initialized = false; } #endif return status; } 524fa: 206a 0068 moveal %a2@(104),%a0 * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 524fe: b088 cmpl %a0,%d0 52500: 6720 beqs 52522 <_Timer_server_Schedule_operation_method+0xce> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 52502: 2028 0010 movel %a0@(16),%d0 if ( snapshot > last_snapshot ) { 52506: b3c1 cmpal %d1,%a1 52508: 640c bccs 52516 <_Timer_server_Schedule_operation_method+0xc2> /* * We advanced in time. */ delta = snapshot - last_snapshot; 5250a: 2841 moveal %d1,%a4 5250c: 99c9 subal %a1,%a4 if (delta_interval > delta) { 5250e: b9c0 cmpal %d0,%a4 52510: 640a bccs 5251c <_Timer_server_Schedule_operation_method+0xc8><== NEVER TAKEN delta_interval -= delta; 52512: 908c subl %a4,%d0 52514: 6008 bras 5251e <_Timer_server_Schedule_operation_method+0xca> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 52516: d089 addl %a1,%d0 delta_interval += delta; 52518: 9081 subl %d1,%d0 5251a: 6002 bras 5251e <_Timer_server_Schedule_operation_method+0xca> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 5251c: 4280 clrl %d0 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 5251e: 2140 0010 movel %d0,%a0@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 52522: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 52526: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 52528: 486b 0010 pea %a3@(16) 5252c: 486a 0068 pea %a2@(104) 52530: 4eb9 0005 5f8c jsr 55f8c <_Watchdog_Insert> if ( !ts->active ) { 52536: 508f addql #8,%sp 52538: 102a 007c moveb %a2@(124),%d0 5253c: 6608 bnes 52546 <_Timer_server_Schedule_operation_method+0xf2> _Timer_server_Reset_tod_system_watchdog( ts ); 5253e: 2f0a movel %a2,%sp@- 52540: 4eba fcec jsr %pc@(5222e <_Timer_server_Reset_tod_system_watchdog>) 52544: 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 ); } } 52546: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 5254c: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 5254e: 4ef9 0005 5122 jmp 55122 <_Thread_Enable_dispatch> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 52554: 202a 0078 movel %a2@(120),%d0 52558: 2d4b 000c movel %a3,%fp@(12) } } 5255c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 * 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 ); 52562: 2d40 0008 movel %d0,%fp@(8) } } 52566: 4e5e unlk %fp * 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 ); 52568: 4ef9 0005 2ccc jmp 52ccc <_Chain_Append> =============================================================================== 0005b5f4 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 5b5f4: 4e56 fff4 linkw %fp,#-12 5b5f8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5b5fc: 246e 0008 moveal %fp@(8),%a2 uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 5b600: 2412 movel %a2@,%d2 5b602: 6606 bnes 5b60a <_Timespec_To_ticks+0x16> 5b604: 4aaa 0004 tstl %a2@(4) 5b608: 672c beqs 5b636 <_Timespec_To_ticks+0x42> <== NEVER TAKEN return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 5b60a: 4eb9 0005 b7c0 jsr 5b7c0 ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 5b610: 2239 0005 d9e0 movel 5d9e0 ,%d1 uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 5b616: 4c02 0800 mulsl %d2,%d0 ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 5b61a: 243c 0000 03e8 movel #1000,%d2 5b620: 4c02 1800 mulsl %d2,%d1 5b624: 262a 0004 movel %a2@(4),%d3 5b628: 4c41 3003 remul %d1,%d3,%d3 5b62c: d083 addl %d3,%d0 if (ticks) 5b62e: 6608 bnes 5b638 <_Timespec_To_ticks+0x44> return ticks; return 1; 5b630: 103c 0001 moveb #1,%d0 5b634: 6002 bras 5b638 <_Timespec_To_ticks+0x44> ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; 5b636: 4280 clrl %d0 if (ticks) return ticks; return 1; } 5b638: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5b63e: 4e5e unlk %fp ... =============================================================================== 00048522 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 48522: 4e56 fff0 linkw %fp,#-16 48526: 48d7 041c moveml %d2-%d4/%a2,%sp@ 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 ); 4852a: 4282 clrl %d2 4852c: 142e 000f moveb %fp@(15),%d2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 48530: 282e 0008 movel %fp@(8),%d4 48534: 262e 0010 movel %fp@(16),%d3 the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 48538: 2479 0005 d6ac moveal 5d6ac <_User_extensions_List+0x8>,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 4853e: 6018 bras 48558 <_User_extensions_Fatal+0x36> !_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 ) 48540: 206a 0030 moveal %a2@(48),%a0 48544: 4a88 tstl %a0 48546: 670c beqs 48554 <_User_extensions_Fatal+0x32> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 48548: 2f03 movel %d3,%sp@- 4854a: 2f02 movel %d2,%sp@- 4854c: 2f04 movel %d4,%sp@- 4854e: 4e90 jsr %a0@ 48550: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 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 ) { 48554: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 48558: b5fc 0005 d6a4 cmpal #382628,%a2 4855e: 66e0 bnes 48540 <_User_extensions_Fatal+0x1e> <== ALWAYS TAKEN the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 48560: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 48566: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 000483fc <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 483fc: 4e56 ffe8 linkw %fp,#-24 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 48400: 203c 0005 d6a8 movel #382632,%d0 48406: 23c0 0005 d6a4 movel %d0,5d6a4 <_User_extensions_List> head->previous = NULL; tail->previous = head; 4840c: 203c 0005 d6a4 movel #382628,%d0 48412: 23c0 0005 d6ac movel %d0,5d6ac <_User_extensions_List+0x8> ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 48418: 203c 0005 d560 movel #382304,%d0 4841e: 23c0 0005 d55c movel %d0,5d55c <_User_extensions_Switches_list> head->previous = NULL; tail->previous = head; 48424: 203c 0005 d55c movel #382300,%d0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 4842a: 42b9 0005 d6a8 clrl 5d6a8 <_User_extensions_List+0x4> 48430: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%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; 48434: 2839 0005 bd2a movel 5bd2a ,%d4 initial_extensions = Configuration.User_extension_table; 4843a: 2639 0005 bd2e movel 5bd2e ,%d3 48440: 42b9 0005 d560 clrl 5d560 <_User_extensions_Switches_list+0x4> tail->previous = head; 48446: 23c0 0005 d564 movel %d0,5d564 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 4844c: 4a83 tstl %d3 4844e: 6754 beqs 484a4 <_User_extensions_Handler_initialization+0xa8><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 48450: 7434 moveq #52,%d2 48452: 4c04 2800 mulsl %d4,%d2 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 48456: 49f9 0004 c54c lea 4c54c ,%a4 _User_extensions_Add_set( extension ); 4845c: 47f9 0004 a998 lea 4a998 <_User_extensions_Add_set>,%a3 48462: 2f02 movel %d2,%sp@- 48464: 4eb9 0004 8922 jsr 48922 <_Workspace_Allocate_or_fatal_error> 4846a: 2440 moveal %d0,%a2 number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 4846c: 2f02 movel %d2,%sp@- extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 4846e: 4282 clrl %d2 extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 48470: 42a7 clrl %sp@- 48472: 2f00 movel %d0,%sp@- 48474: 4eb9 0004 c5bc jsr 4c5bc extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 4847a: 4fef 0010 lea %sp@(16),%sp 4847e: 6020 bras 484a0 <_User_extensions_Handler_initialization+0xa4> RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 48480: 4878 0020 pea 20 48484: 5282 addql #1,%d2 48486: 2f03 movel %d3,%sp@- 48488: 486a 0014 pea %a2@(20) 4848c: 0683 0000 0020 addil #32,%d3 48492: 4e94 jsr %a4@ _User_extensions_Add_set( extension ); 48494: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 48496: 45ea 0034 lea %a2@(52),%a2 4849a: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 4849c: 4fef 0010 lea %sp@(16),%sp 484a0: b882 cmpl %d2,%d4 484a2: 62dc bhis 48480 <_User_extensions_Handler_initialization+0x84> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 484a4: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 484aa: 4e5e unlk %fp ... =============================================================================== 00049b3c <_Watchdog_Adjust>: Watchdog_Interval units ) { ISR_Level level; _ISR_Disable( level ); 49b3c: 327c 0700 moveaw #1792,%a1 49b40: 2209 movel %a1,%d1 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 49b42: 4e56 ffe8 linkw %fp,#-24 49b46: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 49b4a: 266e 0008 moveal %fp@(8),%a3 49b4e: 262e 000c movel %fp@(12),%d3 49b52: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 49b56: 40c0 movew %sr,%d0 49b58: 8280 orl %d0,%d1 49b5a: 46c1 movew %d1,%sr } } _ISR_Enable( level ); } 49b5c: 244b moveal %a3,%a2 49b5e: 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 ) ) { 49b60: b5c8 cmpal %a0,%a2 49b62: 674c beqs 49bb0 <_Watchdog_Adjust+0x74> switch ( direction ) { 49b64: 4a83 tstl %d3 49b66: 673c beqs 49ba4 <_Watchdog_Adjust+0x68> 49b68: 7201 moveq #1,%d1 49b6a: b283 cmpl %d3,%d1 49b6c: 6642 bnes 49bb0 <_Watchdog_Adjust+0x74> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 49b6e: d5a8 0010 addl %d2,%a0@(16) break; 49b72: 603c bras 49bb0 <_Watchdog_Adjust+0x74> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); 49b74: 2053 moveal %a3@,%a0 case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 49b76: 2628 0010 movel %a0@(16),%d3 49b7a: b682 cmpl %d2,%d3 49b7c: 6308 blss 49b86 <_Watchdog_Adjust+0x4a> _Watchdog_First( header )->delta_interval -= units; 49b7e: 9682 subl %d2,%d3 49b80: 2143 0010 movel %d3,%a0@(16) break; 49b84: 602a bras 49bb0 <_Watchdog_Adjust+0x74> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 49b86: 7201 moveq #1,%d1 49b88: 2141 0010 movel %d1,%a0@(16) _ISR_Enable( level ); 49b8c: 46c0 movew %d0,%sr _Watchdog_Tickle( header ); 49b8e: 2f0b movel %a3,%sp@- 49b90: 4e94 jsr %a4@ _ISR_Disable( level ); 49b92: 2204 movel %d4,%d1 49b94: 40c0 movew %sr,%d0 49b96: 8280 orl %d0,%d1 49b98: 46c1 movew %d1,%sr if ( _Chain_Is_empty( header ) ) 49b9a: 588f addql #4,%sp 49b9c: b5d3 cmpal %a3@,%a2 49b9e: 6710 beqs 49bb0 <_Watchdog_Adjust+0x74> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 49ba0: 9483 subl %d3,%d2 49ba2: 6008 bras 49bac <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); _Watchdog_Tickle( header ); 49ba4: 49f9 0004 9d60 lea 49d60 <_Watchdog_Tickle>,%a4 _ISR_Disable( level ); 49baa: 2809 movel %a1,%d4 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 49bac: 4a82 tstl %d2 49bae: 66c4 bnes 49b74 <_Watchdog_Adjust+0x38> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 49bb0: 46c0 movew %d0,%sr } 49bb2: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 49bb8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048794 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48794: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4879a: 4e56 0000 linkw %fp,#0 4879e: 206e 0008 moveal %fp@(8),%a0 487a2: 2f0a movel %a2,%sp@- 487a4: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 487a6: 40c1 movew %sr,%d1 487a8: 8081 orl %d1,%d0 487aa: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 487ac: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 487b0: 7401 moveq #1,%d2 487b2: b480 cmpl %d0,%d2 487b4: 670c beqs 487c2 <_Watchdog_Remove+0x2e> 487b6: 6242 bhis 487fa <_Watchdog_Remove+0x66> 487b8: 143c 0003 moveb #3,%d2 487bc: b480 cmpl %d0,%d2 487be: 653a bcss 487fa <_Watchdog_Remove+0x66> <== NEVER TAKEN 487c0: 6006 bras 487c8 <_Watchdog_Remove+0x34> /* * 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; 487c2: 42a8 0008 clrl %a0@(8) break; 487c6: 6032 bras 487fa <_Watchdog_Remove+0x66> } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 487c8: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 487ca: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 487ce: 4a91 tstl %a1@ 487d0: 6708 beqs 487da <_Watchdog_Remove+0x46> next_watchdog->delta_interval += the_watchdog->delta_interval; 487d2: 2428 0010 movel %a0@(16),%d2 487d6: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 487da: 2479 0005 d65c moveal 5d65c <_Watchdog_Sync_count>,%a2 487e0: 4a8a tstl %a2 487e2: 670c beqs 487f0 <_Watchdog_Remove+0x5c> _Watchdog_Sync_level = _ISR_Nest_level; 487e4: 45f9 0005 d6f0 lea 5d6f0 <_Per_CPU_Information+0x8>,%a2 487ea: 23d2 0005 d5fc movel %a2@,5d5fc <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 487f0: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; 487f4: 234a 0004 movel %a2,%a1@(4) previous->next = next; 487f8: 2489 movel %a1,%a2@ _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 487fa: 2279 0005 d660 moveal 5d660 <_Watchdog_Ticks_since_boot>,%a1 48800: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48804: 46c1 movew %d1,%sr return( previous_state ); } 48806: 241f movel %sp@+,%d2 48808: 245f moveal %sp@+,%a2 4880a: 4e5e unlk %fp ... =============================================================================== 00049744 <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 49744: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4974a: 4e56 ffec linkw %fp,#-20 4974e: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49752: 242e 0008 movel %fp@(8),%d2 49756: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4975a: 40c3 movew %sr,%d3 4975c: 8083 orl %d3,%d0 4975e: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 49760: 2f0b movel %a3,%sp@- 49762: 49f9 0004 404c lea 4404c ,%a4 49768: 2f02 movel %d2,%sp@- 4976a: 4879 0005 caf6 pea 5caf6 <_Status_Object_name_errors_to_status+0x14> 49770: 4e94 jsr %a4@ printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } 49772: 245b moveal %a3@+,%a2 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { 49774: 4fef 000c lea %sp@(12),%sp 49778: b7ca cmpal %a2,%a3 4977a: 6726 beqs 497a2 <_Watchdog_Report_chain+0x5e> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4977c: 49f9 0004 97b8 lea 497b8 <_Watchdog_Report>,%a4 49782: 2f0a movel %a2,%sp@- 49784: 42a7 clrl %sp@- 49786: 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 ) 49788: 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 ) ; 4978a: 508f addql #8,%sp 4978c: b7ca cmpal %a2,%a3 4978e: 66f2 bnes 49782 <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 49790: 2f02 movel %d2,%sp@- 49792: 4879 0005 cb0d pea 5cb0d <_Status_Object_name_errors_to_status+0x2b> 49798: 4eb9 0004 404c jsr 4404c 4979e: 508f addql #8,%sp 497a0: 600a bras 497ac <_Watchdog_Report_chain+0x68> } else { printk( "Chain is empty\n" ); 497a2: 4879 0005 cb1c pea 5cb1c <_Status_Object_name_errors_to_status+0x3a> 497a8: 4e94 jsr %a4@ 497aa: 588f addql #4,%sp } _ISR_Enable( level ); 497ac: 46c3 movew %d3,%sr } 497ae: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 497b4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048810 <_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 ); 48810: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 48816: 4e56 ffe8 linkw %fp,#-24 4881a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4881e: 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 ); 48822: 40c2 movew %sr,%d2 48824: 8082 orl %d2,%d0 48826: 46c0 movew %d0,%sr } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 48828: 264c moveal %a4,%a3 4882a: 245b moveal %a3@+,%a2 * volatile data - till, 2003/7 */ _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 4882c: b7ca cmpal %a2,%a3 4882e: 674c beqs 4887c <_Watchdog_Tickle+0x6c> * 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) { 48830: 202a 0010 movel %a2@(16),%d0 48834: 6708 beqs 4883e <_Watchdog_Tickle+0x2e> the_watchdog->delta_interval--; 48836: 5380 subql #1,%d0 48838: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 4883c: 663e bnes 4887c <_Watchdog_Tickle+0x6c> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 4883e: 4bf9 0004 8794 lea 48794 <_Watchdog_Remove>,%a5 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 48844: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 4884a: 2f0a movel %a2,%sp@- 4884c: 4e95 jsr %a5@ _ISR_Enable( level ); 4884e: 46c2 movew %d2,%sr switch( watchdog_state ) { 48850: 7202 moveq #2,%d1 48852: 588f addql #4,%sp 48854: b280 cmpl %d0,%d1 48856: 6610 bnes 48868 <_Watchdog_Tickle+0x58> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 48858: 2f2a 0024 movel %a2@(36),%sp@- 4885c: 2f2a 0020 movel %a2@(32),%sp@- 48860: 206a 001c moveal %a2@(28),%a0 48864: 4e90 jsr %a0@ the_watchdog->id, the_watchdog->user_data ); break; 48866: 508f addql #8,%sp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 48868: 2003 movel %d3,%d0 4886a: 40c2 movew %sr,%d2 4886c: 8082 orl %d2,%d0 4886e: 46c0 movew %d0,%sr } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 48870: 2454 moveal %a4@,%a2 _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 48872: b7ca cmpal %a2,%a3 48874: 6706 beqs 4887c <_Watchdog_Tickle+0x6c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 48876: 4aaa 0010 tstl %a2@(16) 4887a: 67ce beqs 4884a <_Watchdog_Tickle+0x3a> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 4887c: 46c2 movew %d2,%sr } 4887e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 48884: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059a68 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 59a68: 4280 clrl %d0 <== NOT EXECUTED return 0; } #endif int __kill( pid_t pid, int sig ) { 59a6a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 59a6e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00059950 <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 59950: 4e56 0000 linkw %fp,#0 59954: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 59958: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5995e: 2d40 0008 movel %d0,%fp@(8) } 59962: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 59964: 4ef9 0004 2654 jmp 42654 ... =============================================================================== 00043d48 <_chown_helper>: const char *path, uid_t owner, gid_t group, int follow_link ) { 43d48: 4e56 ffd8 linkw %fp,#-40 43d4c: 48d7 003c moveml %d2-%d5,%sp@ 43d50: 262e 0008 movel %fp@(8),%d3 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, follow_link ) ) 43d54: 240e movel %fp,%d2 43d56: 0682 ffff ffec addil #-20,%d2 43d5c: 2f03 movel %d3,%sp@- const char *path, uid_t owner, gid_t group, int follow_link ) { 43d5e: 382e 000e movew %fp@(14),%d4 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, follow_link ) ) 43d62: 4eb9 0004 f440 jsr 4f440 43d68: 2eae 0014 movel %fp@(20),%sp@ 43d6c: 2f02 movel %d2,%sp@- const char *path, uid_t owner, gid_t group, int follow_link ) { 43d6e: 3a2e 0012 movew %fp@(18),%d5 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, follow_link ) ) 43d72: 42a7 clrl %sp@- 43d74: 2f00 movel %d0,%sp@- 43d76: 2f03 movel %d3,%sp@- 43d78: 4eb9 0004 404c jsr 4404c 43d7e: 4fef 0014 lea %sp@(20),%sp 43d82: 4a80 tstl %d0 43d84: 662a bnes 43db0 <_chown_helper+0x68> <== NEVER TAKEN return -1; result = (*loc.ops->chown_h)( &loc, owner, group ); 43d86: 206e fff8 moveal %fp@(-8),%a0 43d8a: 3f05 movew %d5,%sp@- 43d8c: 4267 clrw %sp@- 43d8e: 3f04 movew %d4,%sp@- 43d90: 4267 clrw %sp@- 43d92: 2f02 movel %d2,%sp@- 43d94: 2068 0018 moveal %a0@(24),%a0 43d98: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 43d9a: 2f02 movel %d2,%sp@- 43d9c: 2d40 ffe8 movel %d0,%fp@(-24) 43da0: 4eb9 0004 4118 jsr 44118 return result; 43da6: 202e ffe8 movel %fp@(-24),%d0 43daa: 4fef 0010 lea %sp@(16),%sp 43dae: 6002 bras 43db2 <_chown_helper+0x6a> { rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, follow_link ) ) return -1; 43db0: 70ff moveq #-1,%d0 result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 43db2: 4cee 003c ffd8 moveml %fp@(-40),%d2-%d5 43db8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004985c <_close_r>: int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { 4985c: 4e56 0000 linkw %fp,#0 return close( fd ); 49860: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 49866: 4e5e unlk %fp int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { return close( fd ); 49868: 4ef9 0004 97ec jmp 497ec ... =============================================================================== 000431b8 <_exit>: extern void FINI_SYMBOL( void ); #endif void EXIT_SYMBOL(int status) { 431b8: 4e56 0000 linkw %fp,#0 /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 431bc: 4eb9 0005 a088 jsr 5a088 <_fini> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 431c2: 4eb9 0004 3154 jsr 43154 rtems_shutdown_executive(status); 431c8: 2f2e 0008 movel %fp@(8),%sp@- 431cc: 4eb9 0004 5e90 jsr 45e90 ... =============================================================================== 0005996c <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 5996c: 4e56 0000 linkw %fp,#0 free( ptr ); 59970: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59976: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 59978: 4ef9 0004 29ec jmp 429ec ... =============================================================================== 00042aec <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 42aec: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 42af0: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 42af2: 4ef9 0004 2a74 jmp 42a74 <== NOT EXECUTED =============================================================================== 00059a40 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 59a40: 4e56 0000 linkw %fp,#0 return isatty( fd ); 59a44: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59a4a: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 59a4c: 4ef9 0005 9fe0 jmp 59fe0 ... =============================================================================== 00045c88 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 45c88: 4e56 0000 linkw %fp,#0 45c8c: 202e 000c movel %fp@(12),%d0 return link( existing, new ); 45c90: 2d6e 0010 000c movel %fp@(16),%fp@(12) 45c96: 2d40 0008 movel %d0,%fp@(8) } 45c9a: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 45c9c: 4ef9 0004 5bb0 jmp 45bb0 ... =============================================================================== 00059b4c <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 59b4c: 4e56 0000 linkw %fp,#0 59b50: 206e 000c moveal %fp@(12),%a0 59b54: 202e 0010 movel %fp@(16),%d0 59b58: 222e 0014 movel %fp@(20),%d1 return lseek( fd, offset, whence ); 59b5c: 2d6e 0018 0014 movel %fp@(24),%fp@(20) 59b62: 2d40 000c movel %d0,%fp@(12) 59b66: 2d41 0010 movel %d1,%fp@(16) 59b6a: 2d48 0008 movel %a0,%fp@(8) } 59b6e: 4e5e unlk %fp int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 59b70: 4ef9 0005 9a74 jmp 59a74 ... =============================================================================== 00059b78 <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 59b78: 4e56 0000 linkw %fp,#0 return malloc( size ); 59b7c: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59b82: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 59b84: 4ef9 0004 2cd4 jmp 42cd4 ... =============================================================================== 00059c28 <_read_r>: struct _reent *ptr __attribute__((unused)), int fd, void *buf, size_t nbytes ) { 59c28: 4e56 0000 linkw %fp,#0 59c2c: 222e 0010 movel %fp@(16),%d1 59c30: 202e 000c movel %fp@(12),%d0 return read( fd, buf, nbytes ); 59c34: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 59c3a: 2d41 000c movel %d1,%fp@(12) 59c3e: 2d40 0008 movel %d0,%fp@(8) } 59c42: 4e5e unlk %fp int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 59c44: 4ef9 0005 9b8c jmp 59b8c ... =============================================================================== 00059c4c <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 59c4c: 4e56 0000 linkw %fp,#0 59c50: 202e 000c movel %fp@(12),%d0 return realloc( ptr, size ); 59c54: 2d6e 0010 000c movel %fp@(16),%fp@(12) 59c5a: 2d40 0008 movel %d0,%fp@(8) } 59c5e: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 59c60: 4ef9 0005 9c8c jmp 59c8c ... =============================================================================== 000469bc <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 469bc: 4e56 ffa4 linkw %fp,#-92 469c0: 48d7 047c moveml %d2-%d6/%a2,%sp@ 469c4: 262e 000c movel %fp@(12),%d3 469c8: 2c2e 0010 movel %fp@(16),%d6 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 469cc: 2f03 movel %d3,%sp@- 469ce: 4eb9 0004 55b0 jsr 455b0 if ( old_parent_pathlen == 0 ) 469d4: 588f addql #4,%sp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 469d6: 2440 moveal %d0,%a2 469d8: 200e movel %fp,%d0 469da: 0680 ffff ffd0 addil #-48,%d0 if ( old_parent_pathlen == 0 ) 469e0: 4a8a tstl %a2 469e2: 6616 bnes 469fa <_rename_r+0x3e> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 469e4: 2f00 movel %d0,%sp@- 469e6: 486e fffc pea %fp@(-4) 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; 469ea: 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 ); 469ec: 2f03 movel %d3,%sp@- 469ee: 4eb9 0004 6d18 jsr 46d18 469f4: 4fef 000c lea %sp@(12),%sp 469f8: 601e bras 46a18 <_rename_r+0x5c> else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 469fa: 42a7 clrl %sp@- 469fc: 2f00 movel %d0,%sp@- 469fe: 4878 0002 pea 2 46a02: 2f0a movel %a2,%sp@- 46a04: 2f03 movel %d3,%sp@- 46a06: 4eb9 0004 5564 jsr 45564 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 46a0c: 4fef 0014 lea %sp@(20),%sp 46a10: 4a80 tstl %d0 46a12: 6600 012e bnew 46b42 <_rename_r+0x186> return -1; free_old_parentloc = true; 46a16: 7801 moveq #1,%d4 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 46a18: 4878 0014 pea 14 46a1c: 240e movel %fp,%d2 46a1e: 0682 ffff ffd0 addil #-48,%d2 46a24: 2a0e movel %fp,%d5 46a26: 0685 ffff ffe4 addil #-28,%d5 name = old + old_parent_pathlen; 46a2c: d68a addl %a2,%d3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 46a2e: 45f9 0005 2410 lea 52410 ,%a2 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 46a34: 2f02 movel %d2,%sp@- 46a36: 2f05 movel %d5,%sp@- 46a38: 4eb9 0005 0d2c jsr 50d2c name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 46a3e: 2f03 movel %d3,%sp@- /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 46a40: 2d43 fff8 movel %d3,%fp@(-8) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 46a44: 4e92 jsr %a2@ 46a46: 2e80 movel %d0,%sp@ 46a48: 2f03 movel %d3,%sp@- 46a4a: 4eb9 0004 55f2 jsr 455f2 46a50: d680 addl %d0,%d3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 46a52: 2f03 movel %d3,%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 ) ); 46a54: 2d43 fff8 movel %d3,%fp@(-8) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 46a58: 4e92 jsr %a2@ 46a5a: 4297 clrl %sp@ 46a5c: 2f05 movel %d5,%sp@- 46a5e: 42a7 clrl %sp@- 46a60: 2f00 movel %d0,%sp@- 46a62: 2f03 movel %d3,%sp@- 46a64: 4eb9 0004 54f4 jsr 454f4 0, &old_loc, false ); if ( result != 0 ) { 46a6a: 4fef 0028 lea %sp@(40),%sp 46a6e: 4a80 tstl %d0 46a70: 670a beqs 46a7c <_rename_r+0xc0> if ( free_old_parentloc ) 46a72: 4a04 tstb %d4 46a74: 6700 00cc beqw 46b42 <_rename_r+0x186> rtems_filesystem_freenode( &old_parent_loc ); 46a78: 2f02 movel %d2,%sp@- 46a7a: 604e bras 46aca <_rename_r+0x10e> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 46a7c: 260e movel %fp,%d3 46a7e: 0683 ffff ffbc addil #-68,%d3 46a84: 2f03 movel %d3,%sp@- 46a86: 486e fffc pea %fp@(-4) 46a8a: 2f06 movel %d6,%sp@- 46a8c: 4eb9 0004 6d18 jsr 46d18 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 46a92: 486e fff8 pea %fp@(-8) 46a96: dcae fffc addl %fp@(-4),%d6 46a9a: 2f03 movel %d3,%sp@- 46a9c: 206e ffc8 moveal %fp@(-56),%a0 46aa0: 2f06 movel %d6,%sp@- 46aa2: 2068 0004 moveal %a0@(4),%a0 46aa6: 4e90 jsr %a0@ if ( result != 0 ) { 46aa8: 4fef 0018 lea %sp@(24),%sp 46aac: 4a80 tstl %d0 46aae: 6722 beqs 46ad2 <_rename_r+0x116> rtems_filesystem_freenode( &new_parent_loc ); 46ab0: 2f03 movel %d3,%sp@- 46ab2: 45f9 0004 57b8 lea 457b8 ,%a2 46ab8: 4e92 jsr %a2@ if ( free_old_parentloc ) 46aba: 588f addql #4,%sp 46abc: 4a04 tstb %d4 46abe: 6706 beqs 46ac6 <_rename_r+0x10a> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 46ac0: 2f02 movel %d2,%sp@- 46ac2: 4e92 jsr %a2@ 46ac4: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 46ac6: 486e ffe4 pea %fp@(-28) 46aca: 4eb9 0004 57b8 jsr 457b8 46ad0: 6036 bras 46b08 <_rename_r+0x14c> /* * 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 ) { 46ad2: 202e ffcc movel %fp@(-52),%d0 46ad6: 45f9 0004 57b8 lea 457b8 ,%a2 46adc: b0ae ffe0 cmpl %fp@(-32),%d0 46ae0: 672a beqs 46b0c <_rename_r+0x150> rtems_filesystem_freenode( &new_parent_loc ); 46ae2: 2f03 movel %d3,%sp@- 46ae4: 4e92 jsr %a2@ if ( free_old_parentloc ) 46ae6: 588f addql #4,%sp 46ae8: 4a04 tstb %d4 46aea: 6706 beqs 46af2 <_rename_r+0x136> rtems_filesystem_freenode( &old_parent_loc ); 46aec: 2f02 movel %d2,%sp@- 46aee: 4e92 jsr %a2@ 46af0: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 46af2: 486e ffe4 pea %fp@(-28) 46af6: 4eb9 0004 57b8 jsr 457b8 rtems_set_errno_and_return_minus_one( EXDEV ); 46afc: 4eb9 0004 f4a0 jsr 4f4a0 <__errno> 46b02: 2040 moveal %d0,%a0 46b04: 7012 moveq #18,%d0 46b06: 2080 movel %d0,%a0@ 46b08: 588f addql #4,%sp 46b0a: 6036 bras 46b42 <_rename_r+0x186> } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 46b0c: 2f2e fff8 movel %fp@(-8),%sp@- 46b10: 206e ffc8 moveal %fp@(-56),%a0 46b14: 2f03 movel %d3,%sp@- 46b16: 2f05 movel %d5,%sp@- 46b18: 2f02 movel %d2,%sp@- 46b1a: 2068 0040 moveal %a0@(64),%a0 46b1e: 4e90 jsr %a0@ 46b20: 2a00 movel %d0,%d5 rtems_filesystem_freenode( &new_parent_loc ); 46b22: 2f03 movel %d3,%sp@- 46b24: 4e92 jsr %a2@ if ( free_old_parentloc ) 46b26: 4fef 0014 lea %sp@(20),%sp 46b2a: 4a04 tstb %d4 46b2c: 6706 beqs 46b34 <_rename_r+0x178> rtems_filesystem_freenode( &old_parent_loc ); 46b2e: 2f02 movel %d2,%sp@- 46b30: 4e92 jsr %a2@ 46b32: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 46b34: 486e ffe4 pea %fp@(-28) 46b38: 4eb9 0004 57b8 jsr 457b8 return result; 46b3e: 588f addql #4,%sp 46b40: 6002 bras 46b44 <_rename_r+0x188> 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 ); return -1; 46b42: 7aff moveq #-1,%d5 if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 46b44: 2005 movel %d5,%d0 46b46: 4cee 047c ffa4 moveml %fp@(-92),%d2-%d6/%a2 46b4c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000435b4 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 435b4: 4e56 0000 linkw %fp,#0 435b8: 202e 000c movel %fp@(12),%d0 return _STAT_NAME( path, buf ); 435bc: 2d6e 0010 000c movel %fp@(16),%fp@(12) 435c2: 2d40 0008 movel %d0,%fp@(8) } 435c6: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 435c8: 4ef9 0004 352c jmp 4352c ... =============================================================================== 0004521c <_times_r>: clock_t _times_r( struct _reent *ptr __attribute__((unused)), struct tms *ptms ) { 4521c: 4e56 0000 linkw %fp,#0 return _times( ptms ); 45220: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 45226: 4e5e unlk %fp clock_t _times_r( struct _reent *ptr __attribute__((unused)), struct tms *ptms ) { return _times( ptms ); 45228: 4ef9 0004 517c jmp 4517c <_times> ... =============================================================================== 00045e78 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 45e78: 4e56 0000 linkw %fp,#0 return unlink( path ); 45e7c: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 45e82: 4e5e unlk %fp int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 45e84: 4ef9 0004 5d54 jmp 45d54 ... =============================================================================== 00059c68 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 59c68: 4e56 0000 linkw %fp,#0 59c6c: 222e 0010 movel %fp@(16),%d1 59c70: 202e 000c movel %fp@(12),%d0 return write( fd, buf, nbytes ); 59c74: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 59c7a: 2d41 000c movel %d1,%fp@(12) 59c7e: 2d40 0008 movel %d0,%fp@(8) } 59c82: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 59c84: 4ef9 0005 9d6c jmp 59d6c ... =============================================================================== 000429a0 : #include int chroot( const char *pathname ) { 429a0: 4e56 ffe0 linkw %fp,#-32 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) { 429a4: 203c 0005 dc58 movel #384088,%d0 #include int chroot( const char *pathname ) { 429aa: 48d7 0c04 moveml %d2/%a2-%a3,%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) { 429ae: b0b9 0005 c65c cmpl 5c65c ,%d0 429b4: 6624 bnes 429da rtems_libio_set_private_env(); /* try to set a new private env*/ 429b6: 4eb9 0004 3dac jsr 43dac if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 429bc: 41f9 0005 dc58 lea 5dc58 ,%a0 429c2: b1f9 0005 c65c cmpal 5c65c ,%a0 429c8: 6610 bnes 429da rtems_set_errno_and_return_minus_one( ENOTSUP ); 429ca: 4eb9 0004 c44c jsr 4c44c <__errno> 429d0: 2040 moveal %d0,%a0 429d2: 20bc 0000 0086 movel #134,%a0@ 429d8: 6020 bras 429fa } result = chdir(pathname); 429da: 2f2e 0008 movel %fp@(8),%sp@- 429de: 4eb9 0004 a1a4 jsr 4a1a4 if (result) { 429e4: 588f addql #4,%sp 429e6: 4a80 tstl %d0 429e8: 6714 beqs 429fe rtems_set_errno_and_return_minus_one( errno ); 429ea: 45f9 0004 c44c lea 4c44c <__errno>,%a2 429f0: 4e92 jsr %a2@ 429f2: 2640 moveal %d0,%a3 429f4: 4e92 jsr %a2@ 429f6: 2040 moveal %d0,%a0 429f8: 2690 movel %a0@,%a3@ 429fa: 70ff moveq #-1,%d0 429fc: 6056 bras 42a54 } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 429fe: 42a7 clrl %sp@- 42a00: 240e movel %fp,%d2 42a02: 0682 ffff ffec addil #-20,%d2 42a08: 2f02 movel %d2,%sp@- 42a0a: 42a7 clrl %sp@- 42a0c: 4878 0001 pea 1 42a10: 4879 0005 b9ee pea 5b9ee 42a16: 4eb9 0004 2d50 jsr 42d50 42a1c: 4fef 0014 lea %sp@(20),%sp 42a20: 4a80 tstl %d0 42a22: 66c6 bnes 429ea <== 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); 42a24: 2079 0005 c65c moveal 5c65c ,%a0 42a2a: 41e8 0018 lea %a0@(24),%a0 42a2e: 2f08 movel %a0,%sp@- 42a30: 4eb9 0004 2e1c jsr 42e1c rtems_filesystem_root = loc; 42a36: 4878 0014 pea 14 42a3a: 2079 0005 c65c moveal 5c65c ,%a0 42a40: 41e8 0018 lea %a0@(24),%a0 42a44: 2f02 movel %d2,%sp@- 42a46: 2f08 movel %a0,%sp@- 42a48: 4eb9 0004 ccf8 jsr 4ccf8 return 0; 42a4e: 4fef 0010 lea %sp@(16),%sp 42a52: 4280 clrl %d0 } 42a54: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 42a5a: 4e5e unlk %fp ... =============================================================================== 0004b12c : { int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4b12c: 70f8 moveq #-8,%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4b12e: 4e56 ffe4 linkw %fp,#-28 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4b132: c0ae 0010 andl %fp@(16),%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4b136: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4b13a: 282e 0008 movel %fp@(8),%d4 4b13e: 262e 000c movel %fp@(12),%d3 4b142: 246e 0014 moveal %fp@(20),%a2 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4b146: 4a80 tstl %d0 4b148: 670e beqs 4b158 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 4b14a: 4eb9 0004 cab4 jsr 4cab4 <__errno> <== NOT EXECUTED 4b150: 7401 moveq #1,%d2 <== NOT EXECUTED 4b152: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b154: 2082 movel %d2,%a0@ <== NOT EXECUTED 4b156: 607a bras 4b1d2 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 4b158: 2652 moveal %a2@,%a3 if (!device_name_table) 4b15a: 4a8b tstl %a3 4b15c: 670a beqs 4b168 4b15e: 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) 4b160: 4bf9 0004 e3ec lea 4e3ec ,%a5 4b166: 6056 bras 4b1be 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 ); 4b168: 4eb9 0004 cab4 jsr 4cab4 <__errno> 4b16e: 720e moveq #14,%d1 4b170: 2040 moveal %d0,%a0 4b172: 2081 movel %d1,%a0@ 4b174: 605c bras 4b1d2 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 4b176: 2853 moveal %a3@,%a4 4b178: 4a8c tstl %a4 4b17a: 673c beqs 4b1b8 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4b17c: 2f03 movel %d3,%sp@- 4b17e: 2f0c movel %a4,%sp@- 4b180: 2f04 movel %d4,%sp@- 4b182: 4e95 jsr %a5@ 4b184: 4fef 000c lea %sp@(12),%sp 4b188: 4a80 tstl %d0 4b18a: 662c bnes 4b1b8 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 4b18c: 4a34 3800 tstb %a4@(00000000,%d3:l) 4b190: 6626 bnes 4b1b8 <== NEVER TAKEN continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 4b192: 41f9 0005 b1fc lea 5b1fc ,%a0 4b198: 2548 000c movel %a0,%a2@(12) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4b19c: 2079 0005 b398 moveal 5b398 ,%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; 4b1a2: 203c 0005 b244 movel #373316,%d0 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4b1a8: 2568 0028 0010 movel %a0@(40),%a2@(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; 4b1ae: 2540 0008 movel %d0,%a2@(8) pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 4b1b2: 4280 clrl %d0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 4b1b4: 248b movel %a3,%a2@ pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 4b1b6: 601c bras 4b1d4 /* 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++) { 4b1b8: 5282 addql #1,%d2 4b1ba: 47eb 0014 lea %a3@(20),%a3 4b1be: b4b9 0005 b0c8 cmpl 5b0c8 ,%d2 4b1c4: 65b0 bcss 4b176 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 4b1c6: 4eb9 0004 cab4 jsr 4cab4 <__errno> 4b1cc: 2040 moveal %d0,%a0 4b1ce: 7002 moveq #2,%d0 4b1d0: 2080 movel %d0,%a0@ 4b1d2: 70ff moveq #-1,%d0 } 4b1d4: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b1da: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000449d0 : * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 449d0: 7264 moveq #100,%d1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 449d2: 4e56 ffdc linkw %fp,#-36 449d6: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 449da: 246e 0008 moveal %fp@(8),%a2 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 449de: 1012 moveb %a2@,%d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 449e0: 282e 000c movel %fp@(12),%d4 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 449e4: 49c0 extbl %d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 449e6: 2c2e 0010 movel %fp@(16),%d6 449ea: 2a2e 0014 movel %fp@(20),%d5 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 449ee: b280 cmpl %d0,%d1 449f0: 6624 bnes 44a16 449f2: 123c 0065 moveb #101,%d1 449f6: 102a 0001 moveb %a2@(1),%d0 449fa: 49c0 extbl %d0 449fc: b280 cmpl %d0,%d1 449fe: 6616 bnes 44a16 <== NEVER TAKEN 44a00: 123c 0076 moveb #118,%d1 44a04: 102a 0002 moveb %a2@(2),%d0 44a08: 49c0 extbl %d0 44a0a: b280 cmpl %d0,%d1 44a0c: 6608 bnes 44a16 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 44a0e: 4a2a 0003 tstb %a2@(3) 44a12: 6700 00c8 beqw 44adc return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 44a16: 2004 movel %d4,%d0 44a18: 0280 0000 f000 andil #61440,%d0 44a1e: 0c80 0000 6000 cmpil #24576,%d0 44a24: 6716 beqs 44a3c 44a26: 0c80 0000 2000 cmpil #8192,%d0 44a2c: 670e beqs 44a3c rtems_set_errno_and_return_minus_one( EINVAL ); 44a2e: 4eb9 0004 cab4 jsr 4cab4 <__errno> 44a34: 7616 moveq #22,%d3 44a36: 2040 moveal %d0,%a0 44a38: 2083 movel %d3,%a0@ 44a3a: 6066 bras 44aa2 else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 44a3c: 206e 0018 moveal %fp@(24),%a0 44a40: 2650 moveal %a0@,%a3 if (!device_name_table) 44a42: 4a8b tstl %a3 44a44: 670e beqs 44a54 44a46: 284b moveal %a3,%a4 44a48: 74ff moveq #-1,%d2 44a4a: 4283 clrl %d3 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 44a4c: 4bf9 0004 def8 lea 4def8 ,%a5 44a52: 6034 bras 44a88 rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in 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 ); 44a54: 4eb9 0004 cab4 jsr 4cab4 <__errno> 44a5a: 740e moveq #14,%d2 44a5c: 2240 moveal %d0,%a1 44a5e: 2282 movel %d2,%a1@ 44a60: 6040 bras 44aa2 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 44a62: 2014 movel %a4@,%d0 44a64: 671a beqs 44a80 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 44a66: 2f00 movel %d0,%sp@- 44a68: 2f0a movel %a2,%sp@- 44a6a: 4e95 jsr %a5@ 44a6c: 508f addql #8,%sp 44a6e: 4a80 tstl %d0 44a70: 6610 bnes 44a82 rtems_set_errno_and_return_minus_one( EEXIST ); 44a72: 4eb9 0004 cab4 jsr 4cab4 <__errno> 44a78: 7211 moveq #17,%d1 44a7a: 2040 moveal %d0,%a0 44a7c: 2081 movel %d1,%a0@ 44a7e: 6022 bras 44aa2 if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; 44a80: 2403 movel %d3,%d2 /* Find an empty slot in 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 (slot = -1, i = 0; i < rtems_device_table_size; i++){ 44a82: 5283 addql #1,%d3 44a84: 49ec 0014 lea %a4@(20),%a4 44a88: b6b9 0005 b0c8 cmpl 5b0c8 ,%d3 44a8e: 65d2 bcss 44a62 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 44a90: 70ff moveq #-1,%d0 44a92: b082 cmpl %d2,%d0 44a94: 6610 bnes 44aa6 rtems_set_errno_and_return_minus_one( ENOMEM ); 44a96: 4eb9 0004 cab4 jsr 4cab4 <__errno> 44a9c: 2040 moveal %d0,%a0 44a9e: 700c moveq #12,%d0 44aa0: 2080 movel %d0,%a0@ 44aa2: 70ff moveq #-1,%d0 44aa4: 6038 bras 44ade _ISR_Disable(level); 44aa6: 203c 0000 0700 movel #1792,%d0 44aac: 40c3 movew %sr,%d3 44aae: 8083 orl %d3,%d0 44ab0: 46c0 movew %d0,%sr device_name_table[slot].device_name = (char *)path; 44ab2: 2002 movel %d2,%d0 44ab4: e988 lsll #4,%d0 44ab6: 2240 moveal %d0,%a1 44ab8: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 44abc: d7c8 addal %a0,%a3 44abe: 268a movel %a2,%a3@ device_name_table[slot].device_name_length = strlen(path); 44ac0: 2f0a movel %a2,%sp@- 44ac2: 4eb9 0004 e3d4 jsr 4e3d4 44ac8: 588f addql #4,%sp 44aca: 2740 0004 movel %d0,%a3@(4) device_name_table[slot].major = major; 44ace: 2746 0008 movel %d6,%a3@(8) device_name_table[slot].minor = minor; 44ad2: 2745 000c movel %d5,%a3@(12) device_name_table[slot].mode = mode; 44ad6: 2744 0010 movel %d4,%a3@(16) _ISR_Enable(level); 44ada: 46c3 movew %d3,%sr * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && (path[2] == 'v') && (path[3] == '\0')) return 0; 44adc: 4280 clrl %d0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 44ade: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 44ae4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000437c0 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 437c0: 4e56 fff4 linkw %fp,#-12 437c4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 437c8: 246e 0008 moveal %fp@(8),%a2 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 437cc: 4aaa 00b4 tstl %a2@(180) 437d0: 674e beqs 43820 rtems_interrupt_disable (level); 437d2: 243c 0000 0700 movel #1792,%d2 437d8: 2202 movel %d2,%d1 437da: 40c0 movew %sr,%d0 437dc: 8280 orl %d0,%d1 437de: 46c1 movew %d1,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 437e0: 47f9 0004 5854 lea 45854 ,%a3 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) { 437e6: 602a bras 43812 tty->rawOutBufState = rob_wait; 437e8: 7202 moveq #2,%d1 437ea: 2541 0094 movel %d1,%a2@(148) rtems_interrupt_enable (level); 437ee: 46c0 movew %d0,%sr sc = rtems_semaphore_obtain( 437f0: 42a7 clrl %sp@- 437f2: 42a7 clrl %sp@- 437f4: 2f2a 008c movel %a2@(140),%sp@- 437f8: 4e93 jsr %a3@ tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 437fa: 4fef 000c lea %sp@(12),%sp 437fe: 4a80 tstl %d0 43800: 6708 beqs 4380a <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 43802: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43804: 4eb9 0004 5ef8 jsr 45ef8 <== NOT EXECUTED rtems_interrupt_disable (level); 4380a: 2202 movel %d2,%d1 4380c: 40c0 movew %sr,%d0 4380e: 8280 orl %d0,%d1 43810: 46c1 movew %d1,%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) { 43812: 206a 0084 moveal %a2@(132),%a0 43816: 222a 0080 movel %a2@(128),%d1 4381a: b288 cmpl %a0,%d1 4381c: 66ca bnes 437e8 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); 4381e: 46c0 movew %d0,%sr } } 43820: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 43826: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000442f4 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 442f4: 4e56 fff0 linkw %fp,#-16 442f8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 442fc: 246e 000c moveal %fp@(12),%a2 if ((tty->termios.c_lflag & ECHOCTL) && 44300: 202a 003c movel %a2@(60),%d0 /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 44304: 242e 0008 movel %fp@(8),%d2 if ((tty->termios.c_lflag & ECHOCTL) && 44308: 0280 0000 0200 andil #512,%d0 /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 4430e: 1202 moveb %d2,%d1 if ((tty->termios.c_lflag & ECHOCTL) && 44310: 4a80 tstl %d0 44312: 674e beqs 44362 <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 44314: 4280 clrl %d0 44316: 1002 moveb %d2,%d0 44318: 2079 0005 bee4 moveal 5bee4 <__ctype_ptr__>,%a0 4431e: 1630 0801 moveb %a0@(00000001,%d0:l),%d3 44322: 49c3 extbl %d3 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 44324: 0803 0005 btst #5,%d3 44328: 6738 beqs 44362 iscntrl(c) && (c != '\t') && (c != '\n')) { 4432a: 7609 moveq #9,%d3 4432c: b680 cmpl %d0,%d3 4432e: 6732 beqs 44362 44330: 163c 000a moveb #10,%d3 44334: b680 cmpl %d0,%d3 44336: 672a beqs 44362 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 44338: 2f0a movel %a2,%sp@- 4433a: 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; 4433e: 163c 0040 moveb #64,%d3 rtems_termios_puts (echobuf, 2, tty); 44342: 486e fffe pea %fp@(-2) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 44346: 705e moveq #94,%d0 echobuf[1] = c ^ 0x40; 44348: b782 eorl %d3,%d2 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 4434a: 1d40 fffe moveb %d0,%fp@(-2) echobuf[1] = c ^ 0x40; 4434e: 1d42 ffff moveb %d2,%fp@(-1) rtems_termios_puts (echobuf, 2, tty); 44352: 4eb9 0004 40b2 jsr 440b2 */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 44358: 4fef 000c lea %sp@(12),%sp char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; 4435c: 54aa 0028 addql #2,%a2@(40) */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 44360: 6010 bras 44372 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 44362: 2f0a movel %a2,%sp@- 44364: 0281 0000 00ff andil #255,%d1 4436a: 2f01 movel %d1,%sp@- 4436c: 4eba fe3c jsr %pc@(441aa ) 44370: 508f addql #8,%sp } } 44372: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 44378: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004381e : void endgrent(void) { 4381e: 4e56 0000 linkw %fp,#0 if (group_fp != NULL) 43822: 2039 0005 e544 movel 5e544 ,%d0 43828: 670a beqs 43834 <== NEVER TAKEN fclose(group_fp); 4382a: 2f00 movel %d0,%sp@- 4382c: 4eb9 0004 cb72 jsr 4cb72 43832: 588f addql #4,%sp } 43834: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000436d8 : void endpwent(void) { 436d8: 4e56 0000 linkw %fp,#0 if (passwd_fp != NULL) 436dc: 2039 0005 e61e movel 5e61e ,%d0 436e2: 670a beqs 436ee <== NEVER TAKEN fclose(passwd_fp); 436e4: 2f00 movel %d0,%sp@- 436e6: 4eb9 0004 cb72 jsr 4cb72 436ec: 588f addql #4,%sp } 436ee: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004437c : * 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) { 4437c: 4e56 ffe4 linkw %fp,#-28 44380: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 44384: 246e 0008 moveal %fp@(8),%a2 44388: 262e 000c movel %fp@(12),%d3 if (tty->ccount == 0) 4438c: 4aaa 0020 tstl %a2@(32) 44390: 6700 0172 beqw 44504 return; if (lineFlag) { 44394: 4a83 tstl %d3 44396: 6700 015c beqw 444f4 if (!(tty->termios.c_lflag & ECHO)) { 4439a: 202a 003c movel %a2@(60),%d0 4439e: 44c0 movew %d0,%ccr 443a0: 6b08 bmis 443aa <== ALWAYS TAKEN tty->ccount = 0; 443a2: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED return; 443a6: 6000 015c braw 44504 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 443aa: 0800 0004 btst #4,%d0 443ae: 6600 0144 bnew 444f4 tty->ccount = 0; 443b2: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 443b6: 4280 clrl %d0 <== NOT EXECUTED 443b8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 443ba: 102a 0044 moveb %a2@(68),%d0 <== NOT EXECUTED 443be: 2f00 movel %d0,%sp@- <== NOT EXECUTED 443c0: 4eba ff32 jsr %pc@(442f4 ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 443c4: 508f addql #8,%sp <== NOT EXECUTED 443c6: 7020 moveq #32,%d0 <== NOT EXECUTED 443c8: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 443cc: 6700 0136 beqw 44504 <== NOT EXECUTED echo ('\n', tty); 443d0: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 443d4: 700a moveq #10,%d0 <== NOT EXECUTED 443d6: 602c bras 44404 <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 443d8: 5388 subql #1,%a0 443da: 286a 001c moveal %a2@(28),%a4 if (tty->termios.c_lflag & ECHO) { 443de: 202a 003c movel %a2@(60),%d0 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 443e2: 2548 0020 movel %a0,%a2@(32) 443e6: 1434 8800 moveb %a4@(00000000,%a0:l),%d2 if (tty->termios.c_lflag & ECHO) { 443ea: 44c0 movew %d0,%ccr 443ec: 6a00 0100 bplw 444ee if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 443f0: 4a83 tstl %d3 443f2: 6620 bnes 44414 443f4: 0800 0004 btst #4,%d0 443f8: 661a bnes 44414 <== ALWAYS TAKEN echo (tty->termios.c_cc[VERASE], tty); 443fa: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 443fe: 4280 clrl %d0 <== NOT EXECUTED 44400: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED 44404: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 44408: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 4440e: 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); 44410: 6000 fee2 braw 442f4 <== NOT EXECUTED 44414: 2279 0005 bee4 moveal 5bee4 <__ctype_ptr__>,%a1 } else if (c == '\t') { 4441a: 7209 moveq #9,%d1 4441c: 0282 0000 00ff andil #255,%d2 44422: b282 cmpl %d2,%d1 44424: 665a bnes 44480 int col = tty->read_start_column; 44426: 242a 002c movel %a2@(44),%d2 int i = 0; 4442a: 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) 4442c: 0280 0000 0200 andil #512,%d0 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 44432: 6028 bras 4445c c = tty->cbuf[i++]; if (c == '\t') { 44434: 4284 clrl %d4 44436: 181c moveb %a4@+,%d4 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 44438: 5281 addql #1,%d1 if (c == '\t') { 4443a: 7a09 moveq #9,%d5 4443c: ba84 cmpl %d4,%d5 4443e: 6606 bnes 44446 col = (col | 7) + 1; 44440: 7807 moveq #7,%d4 44442: 8484 orl %d4,%d2 44444: 6014 bras 4445a } else if (iscntrl (c)) { 44446: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 4444a: 49c4 extbl %d4 4444c: 0804 0005 btst #5,%d4 44450: 6708 beqs 4445a <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) 44452: 4a80 tstl %d0 <== NOT EXECUTED 44454: 6706 beqs 4445c <== NOT EXECUTED col += 2; 44456: 5482 addql #2,%d2 <== NOT EXECUTED 44458: 6002 bras 4445c <== NOT EXECUTED } else { col++; 4445a: 5282 addql #1,%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 4445c: b1c1 cmpal %d1,%a0 4445e: 66d4 bnes 44434 44460: 6016 bras 44478 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 44462: 2f0a movel %a2,%sp@- 44464: 4878 0001 pea 1 44468: 4879 0005 af45 pea 5af45 4446e: 4e93 jsr %a3@ tty->column--; 44470: 4fef 000c lea %sp@(12),%sp 44474: 53aa 0028 subql #1,%a2@(40) } /* * Back up over the tab */ while (tty->column > col) { 44478: b4aa 0028 cmpl %a2@(40),%d2 4447c: 6de4 blts 44462 4447e: 606e bras 444ee rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 44480: 5282 addql #1,%d2 44482: 1231 2800 moveb %a1@(00000000,%d2:l),%d1 44486: 49c1 extbl %d1 44488: 0801 0005 btst #5,%d1 4448c: 6724 beqs 444b2 <== ALWAYS TAKEN 4448e: 0800 0009 btst #9,%d0 <== NOT EXECUTED 44492: 671e beqs 444b2 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 44494: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44496: 4878 0003 pea 3 <== NOT EXECUTED 4449a: 4879 0005 af43 pea 5af43 <== NOT EXECUTED 444a0: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 444a2: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 444a6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 444aa: 6706 beqs 444b2 <== NOT EXECUTED tty->column--; 444ac: 5380 subql #1,%d0 <== NOT EXECUTED 444ae: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 444b2: 2079 0005 bee4 moveal 5bee4 <__ctype_ptr__>,%a0 444b8: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 444bc: 49c0 extbl %d0 444be: 0800 0005 btst #5,%d0 444c2: 670c beqs 444d0 <== ALWAYS TAKEN 444c4: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 444c8: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 444ce: 671e beqs 444ee <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 444d0: 2f0a movel %a2,%sp@- 444d2: 4878 0003 pea 3 444d6: 4879 0005 af43 pea 5af43 444dc: 4e93 jsr %a3@ if (tty->column) 444de: 202a 0028 movel %a2@(40),%d0 444e2: 4fef 000c lea %sp@(12),%sp 444e6: 6706 beqs 444ee <== NEVER TAKEN tty->column--; 444e8: 5380 subql #1,%d0 444ea: 2540 0028 movel %d0,%a2@(40) } } } if (!lineFlag) 444ee: 4a83 tstl %d3 444f0: 6608 bnes 444fa 444f2: 6010 bras 44504 rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 444f4: 47f9 0004 40b2 lea 440b2 ,%a3 echo ('\n', tty); return; } } while (tty->ccount) { 444fa: 206a 0020 moveal %a2@(32),%a0 444fe: 4a88 tstl %a0 44500: 6600 fed6 bnew 443d8 } } if (!lineFlag) break; } } 44504: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4450a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043314 : int fcntl( int fd, int cmd, ... ) { 43314: 4e56 fff0 linkw %fp,#-16 43318: 202e 0008 movel %fp@(8),%d0 int ret; va_list ap; va_start( ap, cmd ); 4331c: 41ee 0010 lea %fp@(16),%a0 int fcntl( int fd, int cmd, ... ) { 43320: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 43324: 262e 000c movel %fp@(12),%d3 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 43328: 2239 0005 d674 movel 5d674 ,%d1 4332e: b280 cmpl %d0,%d1 43330: 631c blss 4334e iop = rtems_libio_iop( fd ); 43332: 2400 movel %d0,%d2 43334: ed88 lsll #6,%d0 43336: e78a lsll #3,%d2 43338: 2679 0005 ee68 moveal 5ee68 ,%a3 4333e: 9082 subl %d2,%d0 43340: 45f3 0800 lea %a3@(00000000,%d0:l),%a2 rtems_libio_check_is_open(iop); 43344: 202a 0014 movel %a2@(20),%d0 43348: 0800 0008 btst #8,%d0 4334c: 6610 bnes 4335e 4334e: 4eb9 0004 cc10 jsr 4cc10 <__errno> 43354: 7209 moveq #9,%d1 43356: 2040 moveal %d0,%a0 43358: 2081 movel %d1,%a0@ 4335a: 6000 0110 braw 4346c /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4335e: 7409 moveq #9,%d2 43360: b483 cmpl %d3,%d2 43362: 6500 00d8 bcsw 4343c 43366: 327b 3a06 moveaw %pc@(4336e ,%d3:l:2),%a1 4336a: 4efb 9802 jmp %pc@(4336e ,%a1:l) 4336e: 0014 .short 0x0014 <== NOT EXECUTED 43370: 006c .short 0x006c <== NOT EXECUTED 43372: 0078 .short 0x0078 <== NOT EXECUTED 43374: 008c 009a 00be oril #10092734,%d4 <== NOT EXECUTED 4337a: 00be 00be 00be oril #12452030,%d6 <== NOT EXECUTED 43380: 00be 2410 6710 oril #605054736,%d6 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 43386: b282 cmpl %d2,%d1 43388: 631c blss 433a6 <== NEVER TAKEN 4338a: 2002 movel %d2,%d0 4338c: ed8a lsll #6,%d2 4338e: e788 lsll #3,%d0 43390: 9480 subl %d0,%d2 43392: d7c2 addal %d2,%a3 43394: 6012 bras 433a8 else { /* allocate a file control block */ diop = rtems_libio_allocate(); 43396: 4eb9 0004 3950 jsr 43950 4339c: 2640 moveal %d0,%a3 if ( diop == 0 ) { 4339e: 4a80 tstl %d0 433a0: 6606 bnes 433a8 <== ALWAYS TAKEN 433a2: 6000 00c8 braw 4346c <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 433a6: 97cb subal %a3,%a3 <== NOT EXECUTED } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 433a8: 240b movel %a3,%d2 ret = -1; break; } } diop->flags = iop->flags; 433aa: 276a 0014 0014 movel %a2@(20),%a3@(20) diop->pathinfo = iop->pathinfo; 433b0: 4878 0014 pea 14 433b4: 486a 0018 pea %a2@(24) 433b8: 486b 0018 pea %a3@(24) 433bc: 4eb9 0004 de64 jsr 4de64 ret = (int) (diop - rtems_libio_iops); 433c2: 4fef 000c lea %sp@(12),%sp 433c6: 94b9 0005 ee68 subl 5ee68 ,%d2 433cc: 203c b6db 6db7 movel #-1227133513,%d0 433d2: e682 asrl #3,%d2 433d4: 4c00 2800 mulsl %d0,%d2 433d8: 6070 bras 4344a break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 433da: 0800 000b btst #11,%d0 433de: 56c2 sne %d2 433e0: 49c2 extbl %d2 433e2: 4482 negl %d2 433e4: 6068 bras 4344e * 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 ) ) 433e6: 4a90 tstl %a0@ 433e8: 6706 beqs 433f0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 433ea: 08c0 000b bset #11,%d0 433ee: 6004 bras 433f4 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 433f0: 0880 000b bclr #11,%d0 433f4: 2540 0014 movel %d0,%a2@(20) 433f8: 602e bras 43428 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 433fa: 2f00 movel %d0,%sp@- 433fc: 4eb9 0004 3902 jsr 43902 43402: 588f addql #4,%sp 43404: 2400 movel %d0,%d2 43406: 6042 bras 4344a break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 43408: 2f10 movel %a0@,%sp@- 4340a: 4eb9 0004 38c2 jsr 438c2 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 43410: 222a 0014 movel %a2@(20),%d1 43414: 588f addql #4,%sp 43416: 0280 0000 0201 andil #513,%d0 4341c: 0281 ffff fdfe andil #-514,%d1 43422: 8081 orl %d1,%d0 43424: 2540 0014 movel %d0,%a2@(20) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 43428: 4282 clrl %d2 4342a: 6022 bras 4344e errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 4342c: 4eb9 0004 cc10 jsr 4cc10 <__errno> 43432: 2040 moveal %d0,%a0 43434: 20bc 0000 0086 movel #134,%a0@ 4343a: 6030 bras 4346c ret = -1; break; default: errno = EINVAL; 4343c: 4eb9 0004 cc10 jsr 4cc10 <__errno> 43442: 2040 moveal %d0,%a0 43444: 7016 moveq #22,%d0 43446: 2080 movel %d0,%a0@ 43448: 6022 bras 4346c /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 4344a: 4a82 tstl %d2 4344c: 6d20 blts 4346e <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 4344e: 206a 0020 moveal %a2@(32),%a0 43452: 2f0a movel %a2,%sp@- 43454: 2f03 movel %d3,%sp@- 43456: 2068 0030 moveal %a0@(48),%a0 4345a: 4e90 jsr %a0@ if (err) { 4345c: 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 ); 4345e: 2600 movel %d0,%d3 if (err) { 43460: 670c beqs 4346e <== ALWAYS TAKEN errno = err; 43462: 4eb9 0004 cc10 jsr 4cc10 <__errno> <== NOT EXECUTED 43468: 2040 moveal %d0,%a0 <== NOT EXECUTED 4346a: 2083 movel %d3,%a0@ <== NOT EXECUTED ret = -1; 4346c: 74ff moveq #-1,%d2 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4346e: 2002 movel %d2,%d0 43470: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 43476: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b37e : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b37e: 4e56 ffdc linkw %fp,#-36 4b382: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4b386: 266e 0008 moveal %fp@(8),%a3 4b38a: 286e 000c moveal %fp@(12),%a4 static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4b38e: 4ab9 0005 efdc tstl 5efdc 4b394: 6654 bnes 4b3ea 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 ); 4b396: 42a7 clrl %sp@- 4b398: 42a7 clrl %sp@- 4b39a: 2f39 0005 f6d4 movel 5f6d4 ,%sp@- 4b3a0: 4eb9 0004 7484 jsr 47484 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 4b3a6: 4fef 000c lea %sp@(12),%sp 4b3aa: 4ab9 0005 efdc tstl 5efdc 4b3b0: 6624 bnes 4b3d6 <== NEVER TAKEN sc = rtems_semaphore_create( 4b3b2: 4879 0005 efdc pea 5efdc 4b3b8: 42a7 clrl %sp@- 4b3ba: 4878 0054 pea 54 4b3be: 4878 0001 pea 1 4b3c2: 2f3c 5049 5045 movel #1346981957,%sp@- 4b3c8: 4eb9 0004 724c jsr 4724c 4b3ce: 4fef 0014 lea %sp@(20),%sp 4b3d2: 2400 movel %d0,%d2 4b3d4: 6002 bras 4b3d8 free(pipe); } static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; 4b3d6: 4282 clrl %d2 <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4b3d8: 2f39 0005 f6d4 movel 5f6d4 ,%sp@- 4b3de: 4eb9 0004 758c jsr 4758c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4b3e4: 588f addql #4,%sp 4b3e6: 4a82 tstl %d2 4b3e8: 6618 bnes 4b402 sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4b3ea: 42a7 clrl %sp@- 4b3ec: 42a7 clrl %sp@- 4b3ee: 2f39 0005 efdc movel 5efdc ,%sp@- 4b3f4: 4eb9 0004 7484 jsr 47484 } if (sc == RTEMS_SUCCESSFUL) { 4b3fa: 4fef 000c lea %sp@(12),%sp 4b3fe: 4a80 tstl %d0 4b400: 6704 beqs 4b406 <== ALWAYS TAKEN return 0; } else { return -ENOMEM; 4b402: 74f4 moveq #-12,%d2 4b404: 6002 bras 4b408 if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); } if (sc == RTEMS_SUCCESSFUL) { return 0; 4b406: 4282 clrl %d2 { pipe_control_t *pipe; int err = 0; err = pipe_lock(); if (err) 4b408: 4a82 tstl %d2 4b40a: 6600 02f0 bnew 4b6fc return err; pipe = *pipep; 4b40e: 2453 moveal %a3@,%a2 if (pipe == NULL) { 4b410: 4a8a tstl %a2 4b412: 6600 0114 bnew 4b528 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b416: 4878 0034 pea 34 4b41a: 263c 0004 4804 movel #280580,%d3 4b420: 2043 moveal %d3,%a0 4b422: 4e90 jsr %a0@ if (pipe == NULL) 4b424: 588f addql #4,%sp { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b426: 2440 moveal %d0,%a2 4b428: 2a40 moveal %d0,%a5 if (pipe == NULL) 4b42a: 4a80 tstl %d0 4b42c: 6700 00f6 beqw 4b524 return err; memset(pipe, 0, sizeof(pipe_control_t)); 4b430: 4878 0034 pea 34 4b434: 42a7 clrl %sp@- 4b436: 2f00 movel %d0,%sp@- 4b438: 4eb9 0004 e710 jsr 4e710 pipe->Size = PIPE_BUF; 4b43e: 203c 0000 0200 movel #512,%d0 pipe->Buffer = malloc(pipe->Size); 4b444: 2043 moveal %d3,%a0 pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 4b446: 2540 0004 movel %d0,%a2@(4) pipe->Buffer = malloc(pipe->Size); 4b44a: 4878 0200 pea 200 4b44e: 4e90 jsr %a0@ if (! pipe->Buffer) 4b450: 4fef 0010 lea %sp@(16),%sp if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4b454: 2480 movel %d0,%a2@ if (! pipe->Buffer) 4b456: 6700 00c2 beqw 4b51a goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4b45a: 486a 002c pea %a2@(44) 4b45e: 263c 0004 c38c movel #312204,%d3 4b464: 2043 moveal %d3,%a0 rtems_build_name ('P', 'I', 'r', c), 4b466: 1039 0005 e10c moveb 5e10c ,%d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4b46c: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'r', c), 4b46e: 49c0 extbl %d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4b470: 42a7 clrl %sp@- 4b472: 0080 5049 7200 oril #1346990592,%d0 4b478: 2f00 movel %d0,%sp@- 4b47a: 4e90 jsr %a0@ 4b47c: 4fef 0010 lea %sp@(16),%sp 4b480: 4a80 tstl %d0 4b482: 6600 008c bnew 4b510 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4b486: 486a 0030 pea %a2@(48) 4b48a: 2043 moveal %d3,%a0 rtems_build_name ('P', 'I', 'w', c), 4b48c: 1039 0005 e10c moveb 5e10c ,%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( 4b492: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'w', c), 4b494: 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( 4b496: 42a7 clrl %sp@- 4b498: 0080 5049 7700 oril #1346991872,%d0 4b49e: 2f00 movel %d0,%sp@- 4b4a0: 4e90 jsr %a0@ 4b4a2: 4fef 0010 lea %sp@(16),%sp 4b4a6: 4a80 tstl %d0 4b4a8: 665a bnes 4b504 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4b4aa: 486a 0028 pea %a2@(40) rtems_build_name ('P', 'I', 's', c), 1, 4b4ae: 1039 0005 e10c moveb 5e10c ,%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( 4b4b4: 42a7 clrl %sp@- 4b4b6: 4878 0010 pea 10 rtems_build_name ('P', 'I', 's', c), 1, 4b4ba: 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( 4b4bc: 4878 0001 pea 1 4b4c0: 0080 5049 7300 oril #1346990848,%d0 4b4c6: 2f00 movel %d0,%sp@- 4b4c8: 4eb9 0004 724c jsr 4724c 4b4ce: 4fef 0014 lea %sp@(20),%sp 4b4d2: 4a80 tstl %d0 4b4d4: 6622 bnes 4b4f8 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4b4d6: 1039 0005 e10c moveb 5e10c ,%d0 4b4dc: 49c0 extbl %d0 4b4de: 2200 movel %d0,%d1 4b4e0: 5281 addql #1,%d1 4b4e2: 13c1 0005 e10c moveb %d1,5e10c 4b4e8: 727a moveq #122,%d1 4b4ea: b280 cmpl %d0,%d1 4b4ec: 663a bnes 4b528 c = 'a'; 4b4ee: 7061 moveq #97,%d0 4b4f0: 13c0 0005 e10c moveb %d0,5e10c 4b4f6: 6030 bras 4b528 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4b4f8: 2f2a 0030 movel %a2@(48),%sp@- 4b4fc: 4eb9 0004 c43c jsr 4c43c 4b502: 588f addql #4,%sp err_wbar: rtems_barrier_delete(pipe->readBarrier); 4b504: 2f2d 002c movel %a5@(44),%sp@- 4b508: 4eb9 0004 c43c jsr 4c43c 4b50e: 588f addql #4,%sp err_rbar: free(pipe->Buffer); 4b510: 2f15 movel %a5@,%sp@- 4b512: 4eb9 0004 412c jsr 4412c 4b518: 588f addql #4,%sp err_buf: free(pipe); 4b51a: 2f0d movel %a5,%sp@- 4b51c: 4eb9 0004 412c jsr 4412c 4b522: 588f addql #4,%sp if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4b524: 74f4 moveq #-12,%d2 4b526: 602c bras 4b554 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4b528: 42a7 clrl %sp@- 4b52a: 42a7 clrl %sp@- 4b52c: 2f2a 0028 movel %a2@(40),%sp@- 4b530: 4eb9 0004 7484 jsr 47484 4b536: 4fef 000c lea %sp@(12),%sp 4b53a: 4a80 tstl %d0 4b53c: 6702 beqs 4b540 <== ALWAYS TAKEN err = -EINTR; 4b53e: 74fc moveq #-4,%d2 <== NOT EXECUTED if (*pipep == NULL) { 4b540: 4a93 tstl %a3@ 4b542: 6610 bnes 4b554 if (err) 4b544: 4a82 tstl %d2 4b546: 670a beqs 4b552 <== ALWAYS TAKEN pipe_free(pipe); 4b548: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b54a: 4eba fd62 jsr %pc@(4b2ae ) <== NOT EXECUTED 4b54e: 588f addql #4,%sp <== NOT EXECUTED 4b550: 6002 bras 4b554 <== NOT EXECUTED else *pipep = pipe; 4b552: 268a movel %a2,%a3@ } out: pipe_unlock(); 4b554: 4eba fd42 jsr %pc@(4b298 ) pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 4b558: 4a82 tstl %d2 4b55a: 6600 01a0 bnew 4b6fc return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4b55e: 7006 moveq #6,%d0 4b560: 7204 moveq #4,%d1 4b562: c0ac 0014 andl %a4@(20),%d0 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4b566: 2453 moveal %a3@,%a2 switch (LIBIO_ACCMODE(iop)) { 4b568: b280 cmpl %d0,%d1 4b56a: 6700 009c beqw 4b608 4b56e: 123c 0006 moveb #6,%d1 4b572: b280 cmpl %d0,%d1 4b574: 6700 0122 beqw 4b698 4b578: 123c 0002 moveb #2,%d1 4b57c: b280 cmpl %d0,%d1 4b57e: 6600 0160 bnew 4b6e0 case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4b582: 202a 0010 movel %a2@(16),%d0 4b586: 2040 moveal %d0,%a0 4b588: 5288 addql #1,%a0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4b58a: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4b58e: 2548 0010 movel %a0,%a2@(16) 4b592: 4a80 tstl %d0 4b594: 6610 bnes 4b5a6 <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 4b596: 486e fffc pea %fp@(-4) 4b59a: 2f2a 0030 movel %a2@(48),%sp@- 4b59e: 4eb9 0004 c4d8 jsr 4c4d8 4b5a4: 508f addql #8,%sp if (pipe->Writers == 0) { 4b5a6: 4aaa 0014 tstl %a2@(20) 4b5aa: 6600 0134 bnew 4b6e0 /* Not an error */ if (LIBIO_NODELAY(iop)) 4b5ae: 7001 moveq #1,%d0 4b5b0: c0ac 0014 andl %a4@(20),%d0 4b5b4: 6600 012a bnew 4b6e0 break; prevCounter = pipe->writerCounter; 4b5b8: 2a2a 0024 movel %a2@(36),%d5 /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4b5bc: 4bf9 0004 7484 lea 47484 ,%a5 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4b5c2: 283c 0004 758c movel #292236,%d4 if (! PIPE_READWAIT(pipe)) 4b5c8: 263c 0004 c53c movel #312636,%d3 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4b5ce: 2f2a 0028 movel %a2@(40),%sp@- 4b5d2: 2044 moveal %d4,%a0 4b5d4: 4e90 jsr %a0@ if (! PIPE_READWAIT(pipe)) 4b5d6: 2043 moveal %d3,%a0 4b5d8: 42a7 clrl %sp@- 4b5da: 2f2a 002c movel %a2@(44),%sp@- 4b5de: 4e90 jsr %a0@ 4b5e0: 4fef 000c lea %sp@(12),%sp 4b5e4: 4a80 tstl %d0 4b5e6: 6600 0106 bnew 4b6ee goto out_error; if (! PIPE_LOCK(pipe)) 4b5ea: 42a7 clrl %sp@- 4b5ec: 42a7 clrl %sp@- 4b5ee: 2f2a 0028 movel %a2@(40),%sp@- 4b5f2: 4e95 jsr %a5@ 4b5f4: 4fef 000c lea %sp@(12),%sp 4b5f8: 4a80 tstl %d0 4b5fa: 6600 00f2 bnew 4b6ee goto out_error; } while (prevCounter == pipe->writerCounter); 4b5fe: baaa 0024 cmpl %a2@(36),%d5 4b602: 67ca beqs 4b5ce <== NEVER TAKEN 4b604: 6000 00da braw 4b6e0 break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4b608: 202a 0014 movel %a2@(20),%d0 4b60c: 2200 movel %d0,%d1 4b60e: 5281 addql #1,%d1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 4b610: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4b614: 2541 0014 movel %d1,%a2@(20) 4b618: 4a80 tstl %d0 4b61a: 6610 bnes 4b62c <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 4b61c: 486e fffc pea %fp@(-4) 4b620: 2f2a 002c movel %a2@(44),%sp@- 4b624: 4eb9 0004 c4d8 jsr 4c4d8 4b62a: 508f addql #8,%sp if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4b62c: 4aaa 0010 tstl %a2@(16) 4b630: 6600 00ae bnew 4b6e0 4b634: 7001 moveq #1,%d0 4b636: c0ac 0014 andl %a4@(20),%d0 4b63a: 6712 beqs 4b64e PIPE_UNLOCK(pipe); 4b63c: 2f2a 0028 movel %a2@(40),%sp@- err = -ENXIO; 4b640: 74fa moveq #-6,%d2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4b642: 4eb9 0004 758c jsr 4758c err = -ENXIO; goto out_error; 4b648: 588f addql #4,%sp 4b64a: 6000 00a4 braw 4b6f0 } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 4b64e: 2a2a 0020 movel %a2@(32),%d5 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4b652: 4bf9 0004 7484 lea 47484 ,%a5 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4b658: 283c 0004 758c movel #292236,%d4 if (! PIPE_WRITEWAIT(pipe)) 4b65e: 263c 0004 c53c movel #312636,%d3 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4b664: 2f2a 0028 movel %a2@(40),%sp@- 4b668: 2044 moveal %d4,%a0 4b66a: 4e90 jsr %a0@ if (! PIPE_WRITEWAIT(pipe)) 4b66c: 2043 moveal %d3,%a0 4b66e: 42a7 clrl %sp@- 4b670: 2f2a 0030 movel %a2@(48),%sp@- 4b674: 4e90 jsr %a0@ 4b676: 4fef 000c lea %sp@(12),%sp 4b67a: 4a80 tstl %d0 4b67c: 6670 bnes 4b6ee <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) 4b67e: 42a7 clrl %sp@- 4b680: 42a7 clrl %sp@- 4b682: 2f2a 0028 movel %a2@(40),%sp@- 4b686: 4e95 jsr %a5@ 4b688: 4fef 000c lea %sp@(12),%sp 4b68c: 4a80 tstl %d0 4b68e: 665e bnes 4b6ee <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 4b690: baaa 0020 cmpl %a2@(32),%d5 4b694: 67ce beqs 4b664 <== NEVER TAKEN 4b696: 6048 bras 4b6e0 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4b698: 202a 0010 movel %a2@(16),%d0 4b69c: 2200 movel %d0,%d1 4b69e: 5281 addql #1,%d1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4b6a0: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4b6a4: 2541 0010 movel %d1,%a2@(16) 4b6a8: 4a80 tstl %d0 4b6aa: 6610 bnes 4b6bc <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 4b6ac: 486e fffc pea %fp@(-4) 4b6b0: 2f2a 0030 movel %a2@(48),%sp@- 4b6b4: 4eb9 0004 c4d8 jsr 4c4d8 4b6ba: 508f addql #8,%sp pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4b6bc: 202a 0014 movel %a2@(20),%d0 4b6c0: 2040 moveal %d0,%a0 4b6c2: 5288 addql #1,%a0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4b6c4: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4b6c8: 2548 0014 movel %a0,%a2@(20) 4b6cc: 4a80 tstl %d0 4b6ce: 6610 bnes 4b6e0 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 4b6d0: 486e fffc pea %fp@(-4) 4b6d4: 2f2a 002c movel %a2@(44),%sp@- 4b6d8: 4eb9 0004 c4d8 jsr 4c4d8 4b6de: 508f addql #8,%sp break; } PIPE_UNLOCK(pipe); 4b6e0: 2f2a 0028 movel %a2@(40),%sp@- 4b6e4: 4eb9 0004 758c jsr 4758c return 0; 4b6ea: 588f addql #4,%sp 4b6ec: 600e bras 4b6fc goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 4b6ee: 74fc moveq #-4,%d2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4b6f0: 2f0c movel %a4,%sp@- 4b6f2: 2f0b movel %a3,%sp@- 4b6f4: 4eb9 0004 b2f6 jsr 4b2f6 return err; 4b6fa: 508f addql #8,%sp } 4b6fc: 2002 movel %d2,%d0 4b6fe: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 4b704: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000434fc : long fpathconf( int fd, int name ) { 434fc: 4e56 0000 linkw %fp,#0 43500: 202e 0008 movel %fp@(8),%d0 43504: 222e 000c movel %fp@(12),%d1 43508: 2f02 movel %d2,%sp@- long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 4350a: b0b9 0005 d674 cmpl 5d674 ,%d0 43510: 641a bccs 4352c iop = rtems_libio_iop(fd); 43512: 2400 movel %d0,%d2 43514: ed88 lsll #6,%d0 43516: e78a lsll #3,%d2 43518: 2079 0005 ee68 moveal 5ee68 ,%a0 4351e: 9082 subl %d2,%d0 43520: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43522: 2028 0014 movel %a0@(20),%d0 43526: 0800 0008 btst #8,%d0 4352a: 6610 bnes 4353c <== ALWAYS TAKEN 4352c: 4eb9 0004 cc10 jsr 4cc10 <__errno> 43532: 7209 moveq #9,%d1 43534: 2040 moveal %d0,%a0 43536: 2081 movel %d1,%a0@ 43538: 6000 0088 braw 435c2 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 4353c: 0800 0001 btst #1,%d0 43540: 6774 beqs 435b6 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 43542: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 43546: 700b moveq #11,%d0 43548: b081 cmpl %d1,%d0 4354a: 656a bcss 435b6 4354c: 303b 1a08 movew %pc@(43556 ,%d1:l:2),%d0 43550: 48c0 extl %d0 43552: 4efb 0802 jmp %pc@(43556 ,%d0:l) 43556: 0018 .short 0x0018 <== NOT EXECUTED 43558: 001e .short 0x001e <== NOT EXECUTED 4355a: 0024 .short 0x0024 <== NOT EXECUTED 4355c: 002a .short 0x002a <== NOT EXECUTED 4355e: 0030 .short 0x0030 <== NOT EXECUTED 43560: 0036 .short 0x0036 <== NOT EXECUTED 43562: 003c .short 0x003c <== NOT EXECUTED 43564: 0042 .short 0x0042 <== NOT EXECUTED 43566: 0048 .short 0x0048 <== NOT EXECUTED 43568: 004e .short 0x004e <== NOT EXECUTED 4356a: 0054 .short 0x0054 <== NOT EXECUTED 4356c: 005a .short 0x005a <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 4356e: 2028 0038 movel %a0@(56),%d0 break; 43572: 6050 bras 435c4 case _PC_MAX_CANON: return_value = the_limits->max_canon; 43574: 2028 003c movel %a0@(60),%d0 break; 43578: 604a bras 435c4 case _PC_MAX_INPUT: return_value = the_limits->max_input; 4357a: 2028 0040 movel %a0@(64),%d0 break; 4357e: 6044 bras 435c4 case _PC_NAME_MAX: return_value = the_limits->name_max; 43580: 2028 0044 movel %a0@(68),%d0 break; 43584: 603e bras 435c4 case _PC_PATH_MAX: return_value = the_limits->path_max; 43586: 2028 0048 movel %a0@(72),%d0 break; 4358a: 6038 bras 435c4 case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 4358c: 2028 004c movel %a0@(76),%d0 break; 43590: 6032 bras 435c4 case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 43592: 2028 0054 movel %a0@(84),%d0 break; 43596: 602c bras 435c4 case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 43598: 2028 0058 movel %a0@(88),%d0 break; 4359c: 6026 bras 435c4 case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 4359e: 2028 0064 movel %a0@(100),%d0 break; 435a2: 6020 bras 435c4 case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 435a4: 2028 0050 movel %a0@(80),%d0 break; 435a8: 601a bras 435c4 case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 435aa: 2028 005c movel %a0@(92),%d0 break; 435ae: 6014 bras 435c4 case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 435b0: 2028 0060 movel %a0@(96),%d0 break; 435b4: 600e bras 435c4 default: rtems_set_errno_and_return_minus_one( EINVAL ); 435b6: 4eb9 0004 cc10 jsr 4cc10 <__errno> 435bc: 2040 moveal %d0,%a0 435be: 7016 moveq #22,%d0 435c0: 2080 movel %d0,%a0@ 435c2: 70ff moveq #-1,%d0 break; } return return_value; } 435c4: 242e fffc movel %fp@(-4),%d2 435c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000429ec : #include void free( void *ptr ) { 429ec: 4e56 0000 linkw %fp,#0 MSBUMP(free_calls, 1); 429f0: 52b9 0005 d42c addql #1,5d42c #include void free( void *ptr ) { 429f6: 2f02 movel %d2,%sp@- 429f8: 242e 0008 movel %fp@(8),%d2 MSBUMP(free_calls, 1); if ( !ptr ) 429fc: 676c beqs 42a6a return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 429fe: 7003 moveq #3,%d0 42a00: b0b9 0005 d6a0 cmpl 5d6a0 <_System_state_Current>,%d0 42a06: 661a bnes 42a22 <== NEVER TAKEN !malloc_is_system_state_OK() ) { 42a08: 4eb9 0004 2b90 jsr 42b90 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 42a0e: 4a00 tstb %d0 42a10: 6610 bnes 42a22 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 42a12: 2d42 0008 movel %d2,%fp@(8) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 42a16: 242e fffc movel %fp@(-4),%d2 42a1a: 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); 42a1c: 4ef9 0004 2c04 jmp 42c04 } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 42a22: 2079 0005 c3d6 moveal 5c3d6 ,%a0 42a28: 4a88 tstl %a0 42a2a: 670a beqs 42a36 (*rtems_malloc_statistics_helpers->at_free)(ptr); 42a2c: 2f02 movel %d2,%sp@- 42a2e: 2068 0008 moveal %a0@(8),%a0 42a32: 4e90 jsr %a0@ 42a34: 588f addql #4,%sp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 42a36: 2f02 movel %d2,%sp@- 42a38: 2f39 0005 bc50 movel 5bc50 ,%sp@- 42a3e: 4eb9 0004 7170 jsr 47170 <_Protected_heap_Free> 42a44: 508f addql #8,%sp 42a46: 4a00 tstb %d0 42a48: 6620 bnes 42a6a printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 42a4a: 2079 0005 bc50 moveal 5bc50 ,%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", 42a50: 2f28 001c movel %a0@(28),%sp@- 42a54: 2f28 0018 movel %a0@(24),%sp@- 42a58: 2f02 movel %d2,%sp@- 42a5a: 4879 0005 ae5a pea 5ae5a 42a60: 4eb9 0004 36ac jsr 436ac 42a66: 4fef 0010 lea %sp@(16),%sp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 42a6a: 242e fffc movel %fp@(-4),%d2 42a6e: 4e5e unlk %fp ... =============================================================================== 00043d64 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 43d64: 4e56 0000 linkw %fp,#0 43d68: 2f0b movel %a3,%sp@- 43d6a: 2f0a movel %a2,%sp@- 43d6c: 246e 0008 moveal %fp@(8),%a2 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 43d70: b5fc 0005 dc58 cmpal #384088,%a2 43d76: 6728 beqs 43da0 <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 43d78: 486a 0004 pea %a2@(4) 43d7c: 47f9 0004 2e1c lea 42e1c ,%a3 43d82: 4e93 jsr %a3@ rtems_filesystem_freenode( &env->root_directory); 43d84: 486a 0018 pea %a2@(24) 43d88: 4e93 jsr %a3@ free(env); } } 43d8a: 266e fffc moveal %fp@(-4),%a3 && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 43d8e: 508f addql #8,%sp 43d90: 2d4a 0008 movel %a2,%fp@(8) } } 43d94: 246e fff8 moveal %fp@(-8),%a2 43d98: 4e5e unlk %fp && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 43d9a: 4ef9 0004 2e30 jmp 42e30 } } 43da0: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 43da4: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 43da8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005b080 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5b080: 4e56 ffec linkw %fp,#-20 5b084: 202e 0008 movel %fp@(8),%d0 5b088: 2f0a movel %a2,%sp@- 5b08a: 2f02 movel %d2,%sp@- rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5b08c: b0b9 0005 db94 cmpl 5db94 ,%d0 5b092: 6412 bccs 5b0a6 <== NEVER TAKEN 5b094: 2200 movel %d0,%d1 5b096: ed88 lsll #6,%d0 5b098: e789 lsll #3,%d1 5b09a: 2479 0005 f4a8 moveal 5f4a8 ,%a2 5b0a0: 9081 subl %d1,%d0 5b0a2: d5c0 addal %d0,%a2 5b0a4: 6002 bras 5b0a8 5b0a6: 95ca subal %a2,%a2 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5b0a8: 4878 0014 pea 14 5b0ac: 240e movel %fp,%d2 5b0ae: 486a 0018 pea %a2@(24) 5b0b2: 0682 ffff ffec addil #-20,%d2 5b0b8: 2f02 movel %d2,%sp@- 5b0ba: 4eb9 0004 d454 jsr 4d454 if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5b0c0: 206e fff8 moveal %fp@(-8),%a0 5b0c4: 2f02 movel %d2,%sp@- 5b0c6: 2068 0010 moveal %a0@(16),%a0 5b0ca: 4e90 jsr %a0@ 5b0cc: 4fef 0010 lea %sp@(16),%sp 5b0d0: 7201 moveq #1,%d1 5b0d2: b280 cmpl %d0,%d1 5b0d4: 6710 beqs 5b0e6 rtems_set_errno_and_return_minus_one( ENOTDIR ); 5b0d6: 4eb9 0004 cba8 jsr 4cba8 <__errno> 5b0dc: 2040 moveal %d0,%a0 5b0de: 7014 moveq #20,%d0 5b0e0: 2080 movel %d0,%a0@ 5b0e2: 70ff moveq #-1,%d0 5b0e4: 6018 bras 5b0fe /* * 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 ); 5b0e6: 206a 0020 moveal %a2@(32),%a0 5b0ea: 2f2e 0010 movel %fp@(16),%sp@- 5b0ee: 2f2e 000c movel %fp@(12),%sp@- 5b0f2: 2f0a movel %a2,%sp@- 5b0f4: 2068 0008 moveal %a0@(8),%a0 5b0f8: 4e90 jsr %a0@ 5b0fa: 4fef 000c lea %sp@(12),%sp } 5b0fe: 242e ffe4 movel %fp@(-28),%d2 5b102: 246e ffe8 moveal %fp@(-24),%a2 5b106: 4e5e unlk %fp ... =============================================================================== 00042a74 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 42a74: 4e56 fff8 linkw %fp,#-8 42a78: 2f0a movel %a2,%sp@- 42a7a: 246e 0008 moveal %fp@(8),%a2 42a7e: 2f02 movel %d2,%sp@- /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 42a80: 4a8a tstl %a2 42a82: 6610 bnes 42a94 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 42a84: 4eb9 0004 bca0 jsr 4bca0 <__errno> <== NOT EXECUTED 42a8a: 2040 moveal %d0,%a0 <== NOT EXECUTED 42a8c: 700e moveq #14,%d0 <== NOT EXECUTED 42a8e: 2080 movel %d0,%a0@ <== NOT EXECUTED 42a90: 70ff moveq #-1,%d0 <== NOT EXECUTED 42a92: 6032 bras 42ac6 <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 42a94: 203c 0000 0700 movel #1792,%d0 42a9a: 40c2 movew %sr,%d2 42a9c: 8082 orl %d2,%d0 42a9e: 46c0 movew %d0,%sr _TOD_Get( &now ); 42aa0: 486e fff8 pea %fp@(-8) 42aa4: 4eb9 0004 6580 jsr 46580 <_TOD_Get> _ISR_Enable(level); 42aaa: 46c2 movew %d2,%sr useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 42aac: 243c 0000 03e8 movel #1000,%d2 * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 42ab2: 588f addql #4,%sp _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 42ab4: 202e fffc movel %fp@(-4),%d0 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 42ab8: 4c42 0800 remsl %d2,%d0,%d0 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 42abc: 24ae fff8 movel %fp@(-8),%a2@ time->tv_usec = useconds; 42ac0: 2540 0004 movel %d0,%a2@(4) 42ac4: 4280 clrl %d0 } 42ac6: 242e fff0 movel %fp@(-16),%d2 42aca: 246e fff4 moveal %fp@(-12),%a2 42ace: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b568 : 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 ) 4b568: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4b56a: 4e56 0000 linkw %fp,#0 4b56e: 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 ) 4b572: 2268 0018 moveal %a0@(24),%a1 4b576: b0a9 0048 cmpl %a1@(72),%d0 4b57a: 6610 bnes 4b58c <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 4b57c: 4280 clrl %d0 4b57e: 4281 clrl %d1 4b580: 2140 000c movel %d0,%a0@(12) 4b584: 2141 0010 movel %d1,%a0@(16) return 0; 4b588: 4280 clrl %d0 4b58a: 6002 bras 4b58e /* 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 */ 4b58c: 70ff moveq #-1,%d0 <== NOT EXECUTED iop->offset = 0; return 0; } 4b58e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b79c : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4b79c: 4e56 0000 linkw %fp,#0 4b7a0: 206e 000c moveal %fp@(12),%a0 4b7a4: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4b7a6: 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 ); 4b7a8: 200a movel %a2,%d0 4b7aa: 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 ) ) 4b7b0: b0aa 004c cmpl %a2@(76),%d0 4b7b4: 670e beqs 4b7c4 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4b7b6: 4eb9 0004 bca0 jsr 4bca0 <__errno> 4b7bc: 2040 moveal %d0,%a0 4b7be: 705a moveq #90,%d0 4b7c0: 2080 movel %d0,%a0@ 4b7c2: 6016 bras 4b7da /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 4b7c4: 2068 0010 moveal %a0@(16),%a0 4b7c8: b5e8 001c cmpal %a0@(28),%a2 4b7cc: 6610 bnes 4b7de rtems_set_errno_and_return_minus_one( EBUSY ); 4b7ce: 4eb9 0004 bca0 jsr 4bca0 <__errno> 4b7d4: 7210 moveq #16,%d1 4b7d6: 2040 moveal %d0,%a0 4b7d8: 2081 movel %d1,%a0@ 4b7da: 70ff moveq #-1,%d0 4b7dc: 601a bras 4b7f8 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4b7de: 4aaa 0058 tstl %a2@(88) 4b7e2: 66ea bnes 4b7ce <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 4b7e4: 2f0a movel %a2,%sp@- 4b7e6: 4eb9 0004 9558 jsr 49558 IMFS_check_node_remove( the_jnode ); 4b7ec: 2f0a movel %a2,%sp@- 4b7ee: 4eb9 0004 959c jsr 4959c return 0; 4b7f4: 508f addql #8,%sp 4b7f6: 4280 clrl %d0 } 4b7f8: 246e fffc moveal %fp@(-4),%a2 4b7fc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043354 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 43354: 4e56 0000 linkw %fp,#0 43358: 2f0a movel %a2,%sp@- 4335a: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 4335c: 4a39 0005 e706 tstb 5e706 43362: 6600 00c4 bnew 43428 return; etc_passwd_initted = 1; mkdir("/etc", 0777); 43366: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 4336a: 45f9 0004 d270 lea 4d270 ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 43370: 4879 0005 c714 pea 5c714 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 43376: 7001 moveq #1,%d0 43378: 13c0 0005 e706 moveb %d0,5e706 mkdir("/etc", 0777); 4337e: 4eb9 0004 3b64 jsr 43b64 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 43384: 4879 0005 ce39 pea 5ce39 <_global_impure_ptr+0xbf> 4338a: 4879 0005 c719 pea 5c719 43390: 4e92 jsr %a2@ 43392: 4fef 0010 lea %sp@(16),%sp 43396: 4a80 tstl %d0 43398: 670c beqs 433a6 fclose(fp); 4339a: 2f00 movel %d0,%sp@- 4339c: 4eb9 0004 cb72 jsr 4cb72 433a2: 588f addql #4,%sp 433a4: 602e bras 433d4 } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 433a6: 4879 0005 c725 pea 5c725 433ac: 4879 0005 c719 pea 5c719 433b2: 4e92 jsr %a2@ 433b4: 508f addql #8,%sp 433b6: 2400 movel %d0,%d2 433b8: 671a beqs 433d4 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 433ba: 2f00 movel %d0,%sp@- 433bc: 4879 0005 c727 pea 5c727 433c2: 4eb9 0004 d350 jsr 4d350 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 433c8: 2f02 movel %d2,%sp@- 433ca: 4eb9 0004 cb72 jsr 4cb72 433d0: 4fef 000c lea %sp@(12),%sp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 433d4: 4879 0005 ce39 pea 5ce39 <_global_impure_ptr+0xbf> 433da: 45f9 0004 d270 lea 4d270 ,%a2 433e0: 4879 0005 c78e pea 5c78e 433e6: 4e92 jsr %a2@ 433e8: 508f addql #8,%sp 433ea: 4a80 tstl %d0 433ec: 670c beqs 433fa fclose(fp); 433ee: 2f00 movel %d0,%sp@- 433f0: 4eb9 0004 cb72 jsr 4cb72 433f6: 588f addql #4,%sp 433f8: 602e bras 43428 } else if ((fp = fopen("/etc/group", "w")) != NULL) { 433fa: 4879 0005 c725 pea 5c725 43400: 4879 0005 c78e pea 5c78e 43406: 4e92 jsr %a2@ 43408: 508f addql #8,%sp 4340a: 2400 movel %d0,%d2 4340c: 671a beqs 43428 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 4340e: 2f00 movel %d0,%sp@- 43410: 4879 0005 c799 pea 5c799 43416: 4eb9 0004 d350 jsr 4d350 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 4341c: 2f02 movel %d2,%sp@- 4341e: 4eb9 0004 cb72 jsr 4cb72 43424: 4fef 000c lea %sp@(12),%sp } } 43428: 242e fff8 movel %fp@(-8),%d2 4342c: 246e fffc moveal %fp@(-4),%a2 43430: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004450e : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 4450e: 4e56 fff4 linkw %fp,#-12 44512: 222e 0008 movel %fp@(8),%d1 44516: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4451a: 246e 000c moveal %fp@(12),%a2 if (tty->termios.c_iflag & ISTRIP) 4451e: 202a 0030 movel %a2@(48),%d0 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 44522: 1401 moveb %d1,%d2 if (tty->termios.c_iflag & ISTRIP) 44524: 0800 0005 btst #5,%d0 44528: 6704 beqs 4452e <== ALWAYS TAKEN c &= 0x7f; 4452a: 747f moveq #127,%d2 <== NOT EXECUTED 4452c: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 4452e: 0800 0009 btst #9,%d0 44532: 6724 beqs 44558 c = tolower (c); 44534: 2079 0005 bee4 moveal 5bee4 <__ctype_ptr__>,%a0 4453a: 7603 moveq #3,%d3 4453c: 0282 0000 00ff andil #255,%d2 44542: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 44546: 49c1 extbl %d1 44548: c283 andl %d3,%d1 4454a: 163c 0001 moveb #1,%d3 4454e: b681 cmpl %d1,%d3 44550: 6606 bnes 44558 44552: 0682 0000 0020 addil #32,%d2 if (c == '\r') { 44558: 4281 clrl %d1 4455a: 1202 moveb %d2,%d1 4455c: 760d moveq #13,%d3 4455e: b681 cmpl %d1,%d3 44560: 6610 bnes 44572 if (tty->termios.c_iflag & IGNCR) 44562: 4a00 tstb %d0 44564: 6d00 0104 bltw 4466a return 0; if (tty->termios.c_iflag & ICRNL) 44568: 0800 0008 btst #8,%d0 4456c: 671a beqs 44588 <== NEVER TAKEN c = '\n'; 4456e: 740a moveq #10,%d2 44570: 6016 bras 44588 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 44572: 760a moveq #10,%d3 44574: b681 cmpl %d1,%d3 44576: 660a bnes 44582 44578: 0800 0006 btst #6,%d0 4457c: 670a beqs 44588 <== ALWAYS TAKEN c = '\r'; 4457e: 740d moveq #13,%d2 <== NOT EXECUTED 44580: 6006 bras 44588 <== NOT EXECUTED } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 44582: 4a02 tstb %d2 44584: 6700 00a8 beqw 4462e 44588: 222a 003c movel %a2@(60),%d1 4458c: 0801 0001 btst #1,%d1 44590: 6700 009c beqw 4462e if (c == tty->termios.c_cc[VERASE]) { 44594: 4283 clrl %d3 44596: 162a 0043 moveb %a2@(67),%d3 4459a: 4280 clrl %d0 4459c: 1002 moveb %d2,%d0 4459e: b680 cmpl %d0,%d3 445a0: 6604 bnes 445a6 erase (tty, 0); 445a2: 42a7 clrl %sp@- 445a4: 600e bras 445b4 return 0; } else if (c == tty->termios.c_cc[VKILL]) { 445a6: 4283 clrl %d3 445a8: 162a 0044 moveb %a2@(68),%d3 445ac: b680 cmpl %d0,%d3 445ae: 6610 bnes 445c0 erase (tty, 1); 445b0: 4878 0001 pea 1 445b4: 2f0a movel %a2,%sp@- 445b6: 4eba fdc4 jsr %pc@(4437c ) return 0; 445ba: 508f addql #8,%sp 445bc: 6000 00ac braw 4466a } else if (c == tty->termios.c_cc[VEOF]) { 445c0: 4283 clrl %d3 445c2: 162a 0045 moveb %a2@(69),%d3 445c6: b680 cmpl %d0,%d3 445c8: 6700 009c beqw 44666 return 1; } else if (c == '\n') { 445cc: 760a moveq #10,%d3 445ce: b680 cmpl %d0,%d3 445d0: 6622 bnes 445f4 if (tty->termios.c_lflag & (ECHO | ECHONL)) 445d2: 7048 moveq #72,%d0 445d4: c280 andl %d0,%d1 445d6: 670c beqs 445e4 <== NEVER TAKEN echo (c, tty); 445d8: 2f0a movel %a2,%sp@- 445da: 4878 000a pea a 445de: 4eba fd14 jsr %pc@(442f4 ) 445e2: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; 445e4: 202a 0020 movel %a2@(32),%d0 445e8: 206a 001c moveal %a2@(28),%a0 445ec: 720a moveq #10,%d1 445ee: 1181 0800 moveb %d1,%a0@(00000000,%d0:l) 445f2: 6032 bras 44626 return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 445f4: 4283 clrl %d3 445f6: 162a 004c moveb %a2@(76),%d3 445fa: b680 cmpl %d0,%d3 445fc: 670a beqs 44608 <== NEVER TAKEN 445fe: 4283 clrl %d3 44600: 162a 0051 moveb %a2@(81),%d3 44604: b680 cmpl %d0,%d3 44606: 6626 bnes 4462e <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 44608: 44c1 movew %d1,%ccr <== NOT EXECUTED 4460a: 6a0e bpls 4461a <== NOT EXECUTED echo (c, tty); 4460c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4460e: 4280 clrl %d0 <== NOT EXECUTED 44610: 1002 moveb %d2,%d0 <== NOT EXECUTED 44612: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44614: 4eba fcde jsr %pc@(442f4 ) <== NOT EXECUTED 44618: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 4461a: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 4461e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44622: 1182 0800 moveb %d2,%a0@(00000000,%d0:l) <== NOT EXECUTED 44626: 5280 addql #1,%d0 44628: 2540 0020 movel %d0,%a2@(32) 4462c: 6038 bras 44666 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 4462e: 2039 0005 be54 movel 5be54 ,%d0 44634: 5380 subql #1,%d0 44636: b0aa 0020 cmpl %a2@(32),%d0 4463a: 6f2e bles 4466a <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 4463c: 7008 moveq #8,%d0 4463e: c0aa 003c andl %a2@(60),%d0 44642: 670e beqs 44652 <== NEVER TAKEN echo (c, tty); 44644: 2f0a movel %a2,%sp@- 44646: 4280 clrl %d0 44648: 1002 moveb %d2,%d0 4464a: 2f00 movel %d0,%sp@- 4464c: 4eba fca6 jsr %pc@(442f4 ) 44650: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; 44652: 202a 0020 movel %a2@(32),%d0 44656: 206a 001c moveal %a2@(28),%a0 4465a: 1182 0800 moveb %d2,%a0@(00000000,%d0:l) 4465e: 5280 addql #1,%d0 44660: 2540 0020 movel %d0,%a2@(32) 44664: 6004 bras 4466a else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 44666: 7001 moveq #1,%d0 44668: 6002 bras 4466c if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 4466a: 4280 clrl %d0 } 4466c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 44672: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059a54 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 59a54: 4280 clrl %d0 <== NOT EXECUTED * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 59a56: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 59a5a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043154 : /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 43154: 7003 moveq #3,%d0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 43156: 4e56 0000 linkw %fp,#0 4315a: 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())) 4315c: b0b9 0005 d6a0 cmpl 5d6a0 <_System_state_Current>,%d0 43162: 664c bnes 431b0 <== NEVER TAKEN /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 43164: 2479 0005 b448 moveal 5b448 <_global_impure_ptr>,%a2 4316a: b5f9 0005 bee8 cmpal 5bee8 <_impure_ptr>,%a2 43170: 6710 beqs 43182 _wrapup_reent(_global_impure_ptr); 43172: 2f0a movel %a2,%sp@- 43174: 4eb9 0004 c84a jsr 4c84a <_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; 4317a: 588f addql #4,%sp 4317c: 23ca 0005 bee8 movel %a2,5bee8 <_impure_ptr> * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 43182: 2079 0005 bee8 moveal 5bee8 <_impure_ptr>,%a0 43188: 45f9 0004 bdee lea 4bdee ,%a2 4318e: 2f28 0004 movel %a0@(4),%sp@- 43192: 4e92 jsr %a2@ fclose (stdout); 43194: 2079 0005 bee8 moveal 5bee8 <_impure_ptr>,%a0 4319a: 2f28 0008 movel %a0@(8),%sp@- 4319e: 4e92 jsr %a2@ fclose (stderr); 431a0: 2079 0005 bee8 moveal 5bee8 <_impure_ptr>,%a0 431a6: 2f28 000c movel %a0@(12),%sp@- 431aa: 4e92 jsr %a2@ 431ac: 4fef 000c lea %sp@(12),%sp } 431b0: 246e fffc moveal %fp@(-4),%a2 431b4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042cd4 : #include "malloc_p.h" void *malloc( size_t size ) { 42cd4: 4e56 0000 linkw %fp,#0 void *return_this; MSBUMP(malloc_calls, 1); 42cd8: 52b9 0005 d424 addql #1,5d424 #include "malloc_p.h" void *malloc( size_t size ) { 42cde: 2f03 movel %d3,%sp@- 42ce0: 2f02 movel %d2,%sp@- 42ce2: 242e 0008 movel %fp@(8),%d2 MSBUMP(malloc_calls, 1); /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 42ce6: 4eb9 0004 2bce jsr 42bce /* * Validate the parameters */ if ( !size ) 42cec: 4a82 tstl %d2 42cee: 677e beqs 42d6e return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 42cf0: 7003 moveq #3,%d0 42cf2: b0b9 0005 d6a0 cmpl 5d6a0 <_System_state_Current>,%d0 42cf8: 660a bnes 42d04 !malloc_is_system_state_OK() ) 42cfa: 4eb9 0004 2b90 jsr 42b90 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 42d00: 4a00 tstb %d0 42d02: 676a beqs 42d6e <== NEVER TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 42d04: 42a7 clrl %sp@- 42d06: 42a7 clrl %sp@- 42d08: 2f02 movel %d2,%sp@- 42d0a: 2f39 0005 bc50 movel 5bc50 ,%sp@- 42d10: 4eb9 0004 7130 jsr 47130 <_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 ) { 42d16: 4fef 0010 lea %sp@(16),%sp 42d1a: 4a80 tstl %d0 42d1c: 6626 bnes 42d44 if (rtems_malloc_sbrk_helpers) 42d1e: 2079 0005 c3da moveal 5c3da ,%a0 42d24: 4a88 tstl %a0 42d26: 670e beqs 42d36 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 42d28: 2f02 movel %d2,%sp@- 42d2a: 2068 0004 moveal %a0@(4),%a0 42d2e: 4e90 jsr %a0@ if ( !return_this ) { 42d30: 588f addql #4,%sp return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 42d32: 2600 movel %d0,%d3 if ( !return_this ) { 42d34: 6610 bnes 42d46 errno = ENOMEM; 42d36: 4eb9 0004 bca0 jsr 4bca0 <__errno> 42d3c: 2040 moveal %d0,%a0 42d3e: 700c moveq #12,%d0 42d40: 2080 movel %d0,%a0@ 42d42: 602a bras 42d6e * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 42d44: 2600 movel %d0,%d3 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 42d46: 2079 0005 c3de moveal 5c3de ,%a0 42d4c: 4a88 tstl %a0 42d4e: 6708 beqs 42d58 (*rtems_malloc_dirty_helper)( return_this, size ); 42d50: 2f02 movel %d2,%sp@- 42d52: 2f03 movel %d3,%sp@- 42d54: 4e90 jsr %a0@ 42d56: 508f addql #8,%sp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 42d58: 2079 0005 c3d6 moveal 5c3d6 ,%a0 42d5e: 4a88 tstl %a0 42d60: 670e beqs 42d70 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 42d62: 2f03 movel %d3,%sp@- 42d64: 2068 0004 moveal %a0@(4),%a0 42d68: 4e90 jsr %a0@ 42d6a: 588f addql #4,%sp 42d6c: 6002 bras 42d70 /* * 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() ) return NULL; 42d6e: 4283 clrl %d3 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 42d70: 2003 movel %d3,%d0 42d72: 242e fff8 movel %fp@(-8),%d2 42d76: 262e fffc movel %fp@(-4),%d3 42d7a: 4e5e unlk %fp ... =============================================================================== 00043000 : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 43000: 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; 43004: 2039 0005 da94 movel 5da94 ,%d0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { 4300a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4300e: 262e 0008 movel %fp@(8),%d3 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) 43012: 4a80 tstl %d0 43014: 676a beqs 43080 <== NEVER TAKEN return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 43016: 2403 movel %d3,%d2 43018: d480 addl %d0,%d2 starting_address = (void *) sbrk(the_size); 4301a: 45f9 0004 0810 lea 40810 ,%a2 sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 43020: 4c40 2002 remul %d0,%d2,%d2 43024: 4c00 2800 mulsl %d0,%d2 starting_address = (void *) sbrk(the_size); 43028: 2f02 movel %d2,%sp@- 4302a: 4e92 jsr %a2@ if ( starting_address == (void*) -1 ) 4302c: 588f addql #4,%sp 4302e: 72ff moveq #-1,%d1 43030: b280 cmpl %d0,%d1 43032: 674c beqs 43080 return (void *) 0; if ( !_Protected_heap_Extend( 43034: 2f02 movel %d2,%sp@- 43036: 2f00 movel %d0,%sp@- 43038: 2f39 0005 c150 movel 5c150 ,%sp@- 4303e: 4eb9 0004 7410 jsr 47410 <_Protected_heap_Extend> 43044: 4fef 000c lea %sp@(12),%sp 43048: 4a00 tstb %d0 4304a: 6616 bnes 43062 RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 4304c: 4482 negl %d2 4304e: 2f02 movel %d2,%sp@- 43050: 4e92 jsr %a2@ errno = ENOMEM; 43052: 4eb9 0004 c190 jsr 4c190 <__errno> return (void *) 0; 43058: 588f addql #4,%sp return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); errno = ENOMEM; 4305a: 2040 moveal %d0,%a0 4305c: 700c moveq #12,%d0 4305e: 2080 movel %d0,%a0@ 43060: 601e bras 43080 43062: 42a7 clrl %sp@- return (void *) 0; } MSBUMP(space_available, the_size); 43064: d5b9 0005 da68 addl %d2,5da68 4306a: 42a7 clrl %sp@- 4306c: 2f03 movel %d3,%sp@- 4306e: 2f39 0005 c150 movel 5c150 ,%sp@- 43074: 4eb9 0004 73d0 jsr 473d0 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; 4307a: 4fef 0010 lea %sp@(16),%sp 4307e: 6002 bras 43082 the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); if ( starting_address == (void*) -1 ) return (void *) 0; 43080: 4280 clrl %d0 MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 43082: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 43088: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b284 : { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { 4b284: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4b286: 4e56 fff0 linkw %fp,#-16 4b28a: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b28e: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4b292: 266a 0018 moveal %a2@(24),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 4b296: b0ab 0048 cmpl %a3@(72),%d0 4b29a: 6620 bnes 4b2bc if (iop->offset > the_jnode->info.linearfile.size) 4b29c: 202b 004c movel %a3@(76),%d0 4b2a0: 222b 0050 movel %a3@(80),%d1 4b2a4: 242a 000c movel %a2@(12),%d2 4b2a8: 262a 0010 movel %a2@(16),%d3 4b2ac: 9681 subl %d1,%d3 4b2ae: 9580 subxl %d0,%d2 4b2b0: 6f44 bles 4b2f6 <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; 4b2b2: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED 4b2b6: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4b2ba: 603a bras 4b2f6 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4b2bc: 2f2a 0010 movel %a2@(16),%sp@- 4b2c0: 2f2a 000c movel %a2@(12),%sp@- 4b2c4: 2f0b movel %a3,%sp@- 4b2c6: 4eb9 0004 aeec jsr 4aeec 4b2cc: 4fef 000c lea %sp@(12),%sp 4b2d0: 4a80 tstl %d0 4b2d2: 6712 beqs 4b2e6 rtems_set_errno_and_return_minus_one( ENOSPC ); 4b2d4: 4eb9 0004 bca0 jsr 4bca0 <__errno> 4b2da: 761c moveq #28,%d3 4b2dc: 2040 moveal %d0,%a0 4b2de: 2083 movel %d3,%a0@ 4b2e0: 72ff moveq #-1,%d1 4b2e2: 74ff moveq #-1,%d2 4b2e4: 6018 bras 4b2fe iop->size = the_jnode->info.file.size; 4b2e6: 202b 004c movel %a3@(76),%d0 4b2ea: 222b 0050 movel %a3@(80),%d1 4b2ee: 2540 0004 movel %d0,%a2@(4) 4b2f2: 2541 0008 movel %d1,%a2@(8) } return iop->offset; 4b2f6: 222a 000c movel %a2@(12),%d1 4b2fa: 242a 0010 movel %a2@(16),%d2 } 4b2fe: 2001 movel %d1,%d0 4b300: 2202 movel %d2,%d1 4b302: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4b308: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b178 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4b178: 4e56 fff0 linkw %fp,#-16 4b17c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b180: 266e 0008 moveal %fp@(8),%a3 the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4b184: 202b 0014 movel %a3@(20),%d0 4b188: 0280 0000 0204 andil #516,%d0 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4b18e: 246b 0018 moveal %a3@(24),%a2 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4b192: 674c beqs 4b1e0 && (the_jnode->type == IMFS_LINEAR_FILE)) { 4b194: 7006 moveq #6,%d0 4b196: b0aa 0048 cmpl %a2@(72),%d0 4b19a: 6644 bnes 4b1e0 <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 4b19c: 7405 moveq #5,%d2 <== NOT EXECUTED 4b19e: 2542 0048 movel %d2,%a2@(72) <== 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; 4b1a2: 202a 0050 movel %a2@(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; 4b1a6: 4282 clrl %d2 <== NOT EXECUTED 4b1a8: 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; 4b1aa: 222a 0054 movel %a2@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4b1ae: 2542 004c movel %d2,%a2@(76) <== NOT EXECUTED 4b1b2: 2543 0050 movel %d3,%a2@(80) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 4b1b6: 42aa 0054 clrl %a2@(84) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 4b1ba: 42aa 0058 clrl %a2@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4b1be: 42aa 005c clrl %a2@(92) <== NOT EXECUTED if ((count != 0) 4b1c2: 4a80 tstl %d0 <== NOT EXECUTED 4b1c4: 671a beqs 4b1e0 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4b1c6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b1c8: 76ff moveq #-1,%d3 <== NOT EXECUTED 4b1ca: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4b1cc: 42a7 clrl %sp@- <== NOT EXECUTED 4b1ce: 42a7 clrl %sp@- <== NOT EXECUTED 4b1d0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b1d2: 4eb9 0004 afd0 jsr 4afd0 <== NOT EXECUTED 4b1d8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4b1dc: b680 cmpl %d0,%d3 <== NOT EXECUTED 4b1de: 6730 beqs 4b210 <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4b1e0: 202b 0014 movel %a3@(20),%d0 4b1e4: 0280 0000 0200 andil #512,%d0 4b1ea: 6710 beqs 4b1fc iop->offset = the_jnode->info.file.size; 4b1ec: 202a 004c movel %a2@(76),%d0 4b1f0: 222a 0050 movel %a2@(80),%d1 4b1f4: 2740 000c movel %d0,%a3@(12) 4b1f8: 2741 0010 movel %d1,%a3@(16) iop->size = the_jnode->info.file.size; return 0; 4b1fc: 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; 4b1fe: 222a 004c movel %a2@(76),%d1 4b202: 242a 0050 movel %a2@(80),%d2 4b206: 2741 0004 movel %d1,%a3@(4) 4b20a: 2742 0008 movel %d2,%a3@(8) return 0; 4b20e: 6002 bras 4b212 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)) return -1; 4b210: 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; } 4b212: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4b218: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042da0 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 42da0: 4e56 ffd4 linkw %fp,#-44 42da4: 48d7 001c moveml %d2-%d4,%sp@ 42da8: 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) 42dac: 2003 movel %d3,%d0 42dae: 0280 0000 f000 andil #61440,%d0 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 42db4: 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) 42db8: 0c80 0000 4000 cmpil #16384,%d0 42dbe: 6732 beqs 42df2 42dc0: 6212 bhis 42dd4 42dc2: 0c80 0000 1000 cmpil #4096,%d0 42dc8: 6728 beqs 42df2 42dca: 0c80 0000 2000 cmpil #8192,%d0 42dd0: 6612 bnes 42de4 42dd2: 601e bras 42df2 42dd4: 0c80 0000 6000 cmpil #24576,%d0 42dda: 6716 beqs 42df2 42ddc: 0c80 0000 8000 cmpil #32768,%d0 42de2: 670e beqs 42df2 <== ALWAYS TAKEN case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 42de4: 4eb9 0004 bca0 jsr 4bca0 <__errno> 42dea: 2040 moveal %d0,%a0 42dec: 7016 moveq #22,%d0 42dee: 2080 movel %d0,%a0@ 42df0: 6064 bras 42e56 } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 42df2: 240e movel %fp,%d2 42df4: 0682 ffff ffe4 addil #-28,%d2 42dfa: 2f02 movel %d2,%sp@- 42dfc: 486e fffc pea %fp@(-4) 42e00: 2f04 movel %d4,%sp@- 42e02: 4eb9 0004 36c4 jsr 436c4 result = (*temp_loc.ops->evalformake_h)( 42e08: 486e fff8 pea %fp@(-8) 42e0c: d8ae fffc addl %fp@(-4),%d4 42e10: 2f02 movel %d2,%sp@- 42e12: 206e fff0 moveal %fp@(-16),%a0 42e16: 2f04 movel %d4,%sp@- 42e18: 2068 0004 moveal %a0@(4),%a0 42e1c: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42e1e: 4fef 0018 lea %sp@(24),%sp 42e22: 4a80 tstl %d0 42e24: 6630 bnes 42e56 return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 42e26: 2f02 movel %d2,%sp@- 42e28: 2f2e 0014 movel %fp@(20),%sp@- 42e2c: 2f2e 0010 movel %fp@(16),%sp@- 42e30: 206e fff0 moveal %fp@(-16),%a0 42e34: 2f03 movel %d3,%sp@- 42e36: 2f2e fff8 movel %fp@(-8),%sp@- 42e3a: 2068 0014 moveal %a0@(20),%a0 42e3e: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 42e40: 2f02 movel %d2,%sp@- 42e42: 2d40 ffe0 movel %d0,%fp@(-32) 42e46: 4eb9 0004 29d8 jsr 429d8 return result; 42e4c: 202e ffe0 movel %fp@(-32),%d0 42e50: 4fef 0018 lea %sp@(24),%sp 42e54: 6002 bras 42e58 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) return -1; 42e56: 70ff moveq #-1,%d0 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 42e58: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 42e5e: 4e5e unlk %fp ... =============================================================================== 00042ef8 : /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 42ef8: 7001 moveq #1,%d0 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 42efa: 4e56 ffbc linkw %fp,#-68 42efe: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 42f02: 2a2e 0008 movel %fp@(8),%d5 42f06: 262e 000c movel %fp@(12),%d3 42f0a: 266e 0010 moveal %fp@(16),%a3 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 42f0e: b0ae 0014 cmpl %fp@(20),%d0 42f12: 650e bcss 42f22 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 42f14: 2f0b movel %a3,%sp@- 42f16: 4eb9 0004 9c3a jsr 49c3a if ( !mount_h ) 42f1c: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 42f1e: 2e00 movel %d0,%d7 if ( !mount_h ) 42f20: 6610 bnes 42f32 rtems_set_errno_and_return_minus_one( EINVAL ); 42f22: 4eb9 0004 bca0 jsr 4bca0 <__errno> 42f28: 7816 moveq #22,%d4 42f2a: 2040 moveal %d0,%a0 42f2c: 2084 movel %d4,%a0@ 42f2e: 6000 0218 braw 43148 { 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; 42f32: 4a83 tstl %d3 42f34: 56c2 sne %d2 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 42f36: 283c 0005 a9de movel #371166,%d4 { 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; 42f3c: 4482 negl %d2 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 42f3e: 4a02 tstb %d2 42f40: 6702 beqs 42f44 42f42: 2803 movel %d3,%d4 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 42f44: 2f0b movel %a3,%sp@- 42f46: 45f9 0004 d0f8 lea 4d0f8 ,%a2 42f4c: 4e92 jsr %a2@ 42f4e: 588f addql #4,%sp 42f50: 2a40 moveal %d0,%a5 42f52: 528d addql #1,%a5 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 42f54: 4a85 tstl %d5 42f56: 670c beqs 42f64 42f58: 2f05 movel %d5,%sp@- 42f5a: 4e92 jsr %a2@ 42f5c: 588f addql #4,%sp 42f5e: 2840 moveal %d0,%a4 42f60: 528c addql #1,%a4 42f62: 6002 bras 42f66 42f64: 99cc subal %a4,%a4 size_t target_size = strlen( target ) + 1; 42f66: 2f04 movel %d4,%sp@- 42f68: 4eb9 0004 d0f8 jsr 4d0f8 42f6e: 588f addql #4,%sp size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 42f70: 41f5 c874 lea %a5@(00000074,%a4:l),%a0 { 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; size_t target_size = strlen( target ) + 1; 42f74: 2d40 ffe4 movel %d0,%fp@(-28) 42f78: 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 ); 42f7a: 4870 0800 pea %a0@(00000000,%d0:l) 42f7e: 4878 0001 pea 1 { 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; size_t target_size = strlen( target ) + 1; 42f82: 2d40 ffe8 movel %d0,%fp@(-24) 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 ); 42f86: 4eb9 0004 2654 jsr 42654 if ( mt_entry != NULL ) { 42f8c: 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 ); 42f8e: 2440 moveal %d0,%a2 if ( mt_entry != NULL ) { 42f90: 4a80 tstl %d0 42f92: 6766 beqs 42ffa <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); 42f94: 2f0d movel %a5,%sp@- 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 ); 42f96: 2c00 movel %d0,%d6 42f98: 0686 0000 0074 addil #116,%d6 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; 42f9e: 4bf5 6800 lea %a5@(00000000,%d6:l),%a5 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 ); 42fa2: 2f0b movel %a3,%sp@- 42fa4: 47f9 0004 c54c lea 4c54c ,%a3 42faa: 2f06 movel %d6,%sp@- 42fac: 4e93 jsr %a3@ mt_entry->type = str; 42fae: 2546 006c movel %d6,%a2@(108) str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 42fb2: 2f0c movel %a4,%sp@- 42fb4: 2f05 movel %d5,%sp@- 42fb6: 2f0d movel %a5,%sp@- 42fb8: 4e93 jsr %a3@ mt_entry->dev = str; 42fba: 254d 0070 movel %a5,%a2@(112) str += source_size; memcpy( str, target, target_size ); 42fbe: 2f2e ffe8 movel %fp@(-24),%sp@- mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; 42fc2: dbcc addal %a4,%a5 memcpy( str, target, target_size ); 42fc4: 2f04 movel %d4,%sp@- 42fc6: 2f0d movel %a5,%sp@- 42fc8: 4e93 jsr %a3@ ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 42fca: 202e 0014 movel %fp@(20),%d0 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 42fce: 4fef 0024 lea %sp@(36),%sp memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; 42fd2: 254d 0068 movel %a5,%a2@(104) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 42fd6: 254a 002c movel %a2,%a2@(44) mt_entry->options = options; 42fda: 2540 0030 movel %d0,%a2@(48) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 42fde: 4878 0030 pea 30 42fe2: 4879 0005 ae92 pea 5ae92 42fe8: 486a 0038 pea %a2@(56) 42fec: 4e93 jsr %a3@ /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 42fee: 4fef 000c lea %sp@(12),%sp 42ff2: 4a02 tstb %d2 42ff4: 6700 00b4 beqw 430aa 42ff8: 6010 bras 4300a target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 42ffa: 4eb9 0004 bca0 jsr 4bca0 <__errno> <== NOT EXECUTED 43000: 760c moveq #12,%d3 <== NOT EXECUTED 43002: 2040 moveal %d0,%a0 <== NOT EXECUTED 43004: 2083 movel %d3,%a0@ <== NOT EXECUTED 43006: 6000 0140 braw 43148 <== 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( 4300a: 4878 0001 pea 1 4300e: 280e movel %fp,%d4 43010: 0684 ffff ffec addil #-20,%d4 43016: 2f04 movel %d4,%sp@- 43018: 4878 0007 pea 7 4301c: 2f2e ffe4 movel %fp@(-28),%sp@- 43020: 2f03 movel %d3,%sp@- 43022: 4eb9 0004 290c jsr 4290c 43028: 4fef 0014 lea %sp@(20),%sp 4302c: 72ff moveq #-1,%d1 4302e: b280 cmpl %d0,%d1 43030: 6700 00f2 beqw 43124 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 43034: 206e fff8 moveal %fp@(-8),%a0 43038: 2f04 movel %d4,%sp@- 4303a: 2068 0010 moveal %a0@(16),%a0 4303e: 4e90 jsr %a0@ 43040: 588f addql #4,%sp 43042: 7201 moveq #1,%d1 43044: b280 cmpl %d0,%d1 43046: 6710 beqs 43058 errno = ENOTDIR; 43048: 4eb9 0004 bca0 jsr 4bca0 <__errno> 4304e: 7414 moveq #20,%d2 43050: 2040 moveal %d0,%a0 43052: 2082 movel %d2,%a0@ 43054: 6000 00d2 braw 43128 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 43058: 2f2e ffec movel %fp@(-20),%sp@- 4305c: 487a fe06 pea %pc@(42e64 ) 43060: 4eb9 0004 2eae jsr 42eae 43066: 508f addql #8,%sp 43068: 4a00 tstb %d0 4306a: 6710 beqs 4307c errno = EBUSY; 4306c: 4eb9 0004 bca0 jsr 4bca0 <__errno> 43072: 7210 moveq #16,%d1 43074: 2040 moveal %d0,%a0 43076: 2081 movel %d1,%a0@ 43078: 6000 00ae braw 43128 * 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; 4307c: 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; 43080: 256e ffec 0008 movel %fp@(-20),%a2@(8) mt_entry->mt_point_node.handlers = loc.handlers; 43086: 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; 4308c: 256e fffc 0018 movel %fp@(-4),%a2@(24) * 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; 43092: 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 ) ) { 43096: 2f0a movel %a2,%sp@- 43098: 2068 0020 moveal %a0@(32),%a0 4309c: 4e90 jsr %a0@ 4309e: 588f addql #4,%sp 430a0: 4a80 tstl %d0 430a2: 6600 0084 bnew 43128 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; 430a6: 2604 movel %d4,%d3 430a8: 601e bras 430c8 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 430aa: 203c 0005 bd4c movel #376140,%d0 430b0: b0b9 0005 bd48 cmpl 5bd48 ,%d0 430b6: 670e beqs 430c6 <== ALWAYS TAKEN errno = EINVAL; 430b8: 4eb9 0004 bca0 jsr 4bca0 <__errno> <== NOT EXECUTED 430be: 2040 moveal %d0,%a0 <== NOT EXECUTED 430c0: 7016 moveq #22,%d0 <== NOT EXECUTED 430c2: 2080 movel %d0,%a0@ <== NOT EXECUTED 430c4: 605e bras 43124 <== NOT EXECUTED ) { 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; 430c6: 4283 clrl %d3 * 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 ) ) { 430c8: 2f2e 0018 movel %fp@(24),%sp@- 430cc: 2047 moveal %d7,%a0 430ce: 2f0a movel %a2,%sp@- 430d0: 4e90 jsr %a0@ 430d2: 508f addql #8,%sp 430d4: 4a80 tstl %d0 430d6: 6710 beqs 430e8 /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 430d8: 206e fff8 moveal %fp@(-8),%a0 430dc: 2f0a movel %a2,%sp@- 430de: 2068 0028 moveal %a0@(40),%a0 430e2: 4e90 jsr %a0@ goto cleanup_and_bail; 430e4: 588f addql #4,%sp 430e6: 6042 bras 4312a } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); 430e8: 4eba fd92 jsr %pc@(42e7c ) 430ec: 2f0a movel %a2,%sp@- 430ee: 4879 0005 bd48 pea 5bd48 430f4: 4eb9 0004 61b0 jsr 461b0 <_Chain_Append> rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); 430fa: 4eba fd9c jsr %pc@(42e98 ) if ( !has_target ) 430fe: 508f addql #8,%sp 43100: 4a02 tstb %d2 43102: 6640 bnes 43144 rtems_filesystem_root = mt_entry->mt_fs_root; 43104: 4878 0014 pea 14 43108: 486a 001c pea %a2@(28) 4310c: 2079 0005 be64 moveal 5be64 ,%a0 43112: 41e8 0018 lea %a0@(24),%a0 43116: 2f08 movel %a0,%sp@- 43118: 4eb9 0004 c54c jsr 4c54c 4311e: 4fef 000c lea %sp@(12),%sp 43122: 6020 bras 43144 ) { 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; 43124: 4283 clrl %d3 <== NOT EXECUTED 43126: 6002 bras 4312a <== NOT EXECUTED 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; 43128: 2604 movel %d4,%d3 return 0; cleanup_and_bail: free( mt_entry ); 4312a: 2f0a movel %a2,%sp@- 4312c: 4eb9 0004 29ec jsr 429ec if ( loc_to_free ) 43132: 588f addql #4,%sp 43134: 4a83 tstl %d3 43136: 6710 beqs 43148 <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); 43138: 2f03 movel %d3,%sp@- 4313a: 4eb9 0004 29d8 jsr 429d8 43140: 588f addql #4,%sp 43142: 6004 bras 43148 rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 43144: 4280 clrl %d0 43146: 6002 bras 4314a free( mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 43148: 70ff moveq #-1,%d0 } 4314a: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 43150: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000434c4 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 434c4: 4e56 ffec linkw %fp,#-20 434c8: 48d7 007c moveml %d2-%d6,%sp@ 434cc: 262e 0008 movel %fp@(8),%d3 434d0: 242e 000c movel %fp@(12),%d2 434d4: 282e 0010 movel %fp@(16),%d4 434d8: 2a2e 0014 movel %fp@(20),%d5 434dc: 2c2e 0018 movel %fp@(24),%d6 int rv = -1; if (target != NULL) { 434e0: 4a82 tstl %d2 434e2: 6734 beqs 43518 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 434e4: 4878 01ff pea 1ff 434e8: 2f02 movel %d2,%sp@- 434ea: 4eb9 0004 3d90 jsr 43d90 if (rv == 0) { 434f0: 508f addql #8,%sp 434f2: 4a80 tstl %d0 434f4: 6630 bnes 43526 <== NEVER TAKEN rv = mount( 434f6: 2d46 0018 movel %d6,%fp@(24) 434fa: 2d45 0014 movel %d5,%fp@(20) 434fe: 2d44 0010 movel %d4,%fp@(16) 43502: 2d42 000c movel %d2,%fp@(12) 43506: 2d43 0008 movel %d3,%fp@(8) } else { errno = EINVAL; } return rv; } 4350a: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 43510: 4e5e unlk %fp int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 43512: 4ef9 0004 35c4 jmp 435c4 options, data ); } } else { errno = EINVAL; 43518: 4eb9 0004 c314 jsr 4c314 <__errno> 4351e: 2040 moveal %d0,%a0 43520: 7016 moveq #22,%d0 43522: 2080 movel %d0,%a0@ const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 43524: 70ff moveq #-1,%d0 } else { errno = EINVAL; } return rv; } 43526: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 4352c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000433ca : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 433ca: 4e56 fff4 linkw %fp,#-12 433ce: 48d7 040c moveml %d2-%d3/%a2,%sp@ 433d2: 262e 0008 movel %fp@(8),%d3 433d6: 246e 000c moveal %fp@(12),%a2 /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 433da: b5c3 cmpal %d3,%a2 433dc: 6608 bnes 433e6 ptr = _REENT; 433de: 2439 0005 bee8 movel 5bee8 <_impure_ptr>,%d2 433e4: 6004 bras 433ea } else { ptr = deleted_task->libc_reent; 433e6: 242a 00f8 movel %a2@(248),%d2 } if (ptr && ptr != _global_impure_ptr) { 433ea: 4a82 tstl %d2 433ec: 6722 beqs 43410 <== NEVER TAKEN 433ee: b4b9 0005 b448 cmpl 5b448 <_global_impure_ptr>,%d2 433f4: 671a beqs 43410 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 433f6: 4879 0004 31dc pea 431dc 433fc: 2f02 movel %d2,%sp@- 433fe: 4eb9 0004 c454 jsr 4c454 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 43404: 2f02 movel %d2,%sp@- 43406: 4eb9 0004 8908 jsr 48908 <_Workspace_Free> 4340c: 4fef 000c lea %sp@(12),%sp #endif } deleted_task->libc_reent = NULL; 43410: 42aa 00f8 clrl %a2@(248) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 43414: b5c3 cmpal %d3,%a2 43416: 6606 bnes 4341e _REENT = 0; 43418: 42b9 0005 bee8 clrl 5bee8 <_impure_ptr> } } 4341e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 43424: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000431dc : */ int newlib_free_buffers( FILE *fp ) { 431dc: 4e56 0000 linkw %fp,#0 431e0: 2f0a movel %a2,%sp@- 431e2: 246e 0008 moveal %fp@(8),%a2 switch ( fileno(fp) ) { 431e6: 2f0a movel %a2,%sp@- 431e8: 4eb9 0004 c040 jsr 4c040 431ee: 588f addql #4,%sp 431f0: 7202 moveq #2,%d1 431f2: b280 cmpl %d0,%d1 431f4: 6528 bcss 4321e <== NEVER TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { 431f6: 302a 000c movew %a2@(12),%d0 431fa: 48c0 extl %d0 431fc: 4a00 tstb %d0 431fe: 6c28 bges 43228 <== ALWAYS TAKEN free( fp->_bf._base ); 43200: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43204: 4eb9 0004 29ec jsr 429ec <== NOT EXECUTED fp->_flags &= ~__SMBF; 4320a: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED 4320e: 0880 0007 bclr #7,%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 43212: 4292 clrl %a2@ <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 43214: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 43218: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED 4321c: 6008 bras 43226 <== NOT EXECUTED } break; default: fclose(fp); 4321e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43220: 4eb9 0004 bdee jsr 4bdee <== NOT EXECUTED 43226: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 43228: 246e fffc moveal %fp@(-4),%a2 4322c: 4280 clrl %d0 4322e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043498 : int open( const char *pathname, int flags, ... ) { 43498: 4e56 ffc8 linkw %fp,#-56 4349c: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 434a0: 242e 000c movel %fp@(12),%d2 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 434a4: 2002 movel %d2,%d0 434a6: 5280 addql #1,%d0 int open( const char *pathname, int flags, ... ) { 434a8: 262e 0008 movel %fp@(8),%d3 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 434ac: 0800 0000 btst #0,%d0 434b0: 6704 beqs 434b6 eval_flags |= RTEMS_LIBIO_PERMS_READ; 434b2: 7804 moveq #4,%d4 434b4: 6002 bras 434b8 int eval_flags; /* * Set the Evaluation flags */ eval_flags = 0; 434b6: 4284 clrl %d4 status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 434b8: 0800 0001 btst #1,%d0 434bc: 6704 beqs 434c2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 434be: 7002 moveq #2,%d0 434c0: 8880 orl %d0,%d4 va_start(ap, flags); mode = va_arg( ap, int ); 434c2: 2c2e 0010 movel %fp@(16),%d6 * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 434c6: 4eb9 0004 99e8 jsr 499e8 434cc: 2440 moveal %d0,%a2 if ( iop == 0 ) { 434ce: 4a80 tstl %d0 434d0: 6700 0158 beqw 4362a } /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 434d4: 2f03 movel %d3,%sp@- 434d6: 4bf9 0004 d0f8 lea 4d0f8 ,%a5 434dc: 7a01 moveq #1,%d5 434de: 49f9 0004 290c lea 4290c ,%a4 434e4: 4e95 jsr %a5@ 434e6: 2e85 movel %d5,%sp@ 434e8: 2a0e movel %fp,%d5 434ea: 0685 ffff ffec addil #-20,%d5 434f0: 2f05 movel %d5,%sp@- 434f2: 2f04 movel %d4,%sp@- 434f4: 2f00 movel %d0,%sp@- 434f6: 2f03 movel %d3,%sp@- 434f8: 4e94 jsr %a4@ pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 434fa: 4fef 0014 lea %sp@(20),%sp 434fe: 72ff moveq #-1,%d1 43500: b280 cmpl %d0,%d1 43502: 665e bnes 43562 if ( errno != ENOENT ) { 43504: 47f9 0004 bca0 lea 4bca0 <__errno>,%a3 4350a: 4e93 jsr %a3@ 4350c: 7202 moveq #2,%d1 4350e: 2040 moveal %d0,%a0 43510: b290 cmpl %a0@,%d1 43512: 6624 bnes 43538 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 43514: 0802 0009 btst #9,%d2 43518: 6700 0114 beqw 4362e rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 4351c: 42a7 clrl %sp@- 4351e: 2006 movel %d6,%d0 43520: 42a7 clrl %sp@- 43522: 08c0 000f bset #15,%d0 43526: 2f00 movel %d0,%sp@- 43528: 2f03 movel %d3,%sp@- 4352a: 4eb9 0004 2da0 jsr 42da0 if ( rc ) { 43530: 4fef 0010 lea %sp@(16),%sp 43534: 4a80 tstl %d0 43536: 670c beqs 43544 <== ALWAYS TAKEN rc = errno; 43538: 4e93 jsr %a3@ int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; 4353a: 4285 clrl %d5 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 4353c: 2040 moveal %d0,%a0 4353e: 2410 movel %a0@,%d2 goto done; 43540: 6000 00fc braw 4363e /* * After we do the mknod(), we have to evaluate the path to get the * "loc" structure needed to actually have the file itself open. * So we created it, and then we need to have "look it up." */ status = rtems_filesystem_evaluate_path( 43544: 2f03 movel %d3,%sp@- 43546: 4e95 jsr %a5@ 43548: 7201 moveq #1,%d1 4354a: 2e81 movel %d1,%sp@ 4354c: 2f05 movel %d5,%sp@- 4354e: 42a7 clrl %sp@- 43550: 2f00 movel %d0,%sp@- 43552: 2f03 movel %d3,%sp@- 43554: 4e94 jsr %a4@ pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ 43556: 4fef 0014 lea %sp@(20),%sp 4355a: 4a80 tstl %d0 4355c: 6600 00d6 bnew 43634 43560: 6012 bras 43574 rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 43562: 2002 movel %d2,%d0 43564: 0280 0000 0a00 andil #2560,%d0 4356a: 0c80 0000 0a00 cmpil #2560,%d0 43570: 6700 00c8 beqw 4363a /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); 43574: 282a 0014 movel %a2@(20),%d4 iop->pathinfo = loc; 43578: 2a0e movel %fp,%d5 4357a: 0685 ffff ffec addil #-20,%d5 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); 43580: 2f02 movel %d2,%sp@- 43582: 4eb9 0004 995a jsr 4995a 43588: 8084 orl %d4,%d0 4358a: 2540 0014 movel %d0,%a2@(20) iop->pathinfo = loc; 4358e: 4878 0014 pea 14 43592: 2f05 movel %d5,%sp@- 43594: 486a 0018 pea %a2@(24) 43598: 4eb9 0004 c54c jsr 4c54c rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); 4359e: 206a 0020 moveal %a2@(32),%a0 435a2: 2f06 movel %d6,%sp@- 435a4: 2f02 movel %d2,%sp@- 435a6: 2f03 movel %d3,%sp@- 435a8: 2f0a movel %a2,%sp@- 435aa: 2050 moveal %a0@,%a0 435ac: 4e90 jsr %a0@ if ( rc ) { 435ae: 4fef 0020 lea %sp@(32),%sp 435b2: 4a80 tstl %d0 435b4: 670c beqs 435c2 rc = errno; 435b6: 4eb9 0004 bca0 jsr 4bca0 <__errno> 435bc: 2040 moveal %d0,%a0 435be: 2410 movel %a0@,%d2 goto done; 435c0: 607c bras 4363e } /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 435c2: 0802 000a btst #10,%d2 435c6: 6700 00a4 beqw 4366c rc = ftruncate( iop - rtems_libio_iops, 0 ); 435ca: 200a movel %a2,%d0 435cc: 90b9 0005 d408 subl 5d408 ,%d0 435d2: 223c b6db 6db7 movel #-1227133513,%d1 435d8: e680 asrl #3,%d0 435da: 4c00 1800 mulsl %d0,%d1 435de: 42a7 clrl %sp@- 435e0: 42a7 clrl %sp@- 435e2: 2f01 movel %d1,%sp@- 435e4: 4eb9 0004 9870 jsr 49870 if ( rc ) { 435ea: 4fef 000c lea %sp@(12),%sp /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 435ee: 2400 movel %d0,%d2 if ( rc ) { 435f0: 677a beqs 4366c if(errno) rc = errno; 435f2: 47f9 0004 bca0 lea 4bca0 <__errno>,%a3 435f8: 4e93 jsr %a3@ 435fa: 2040 moveal %d0,%a0 435fc: 4a90 tstl %a0@ 435fe: 6706 beqs 43606 <== NEVER TAKEN 43600: 4e93 jsr %a3@ 43602: 2040 moveal %d0,%a0 43604: 2410 movel %a0@,%d2 close( iop - rtems_libio_iops ); 43606: 200a movel %a2,%d0 43608: 90b9 0005 d408 subl 5d408 ,%d0 4360e: 223c b6db 6db7 movel #-1227133513,%d1 43614: e680 asrl #3,%d0 43616: 4c00 1800 mulsl %d0,%d1 /* those are released by close(): */ iop = 0; loc_to_free = NULL; 4361a: 4285 clrl %d5 rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; close( iop - rtems_libio_iops ); /* those are released by close(): */ iop = 0; 4361c: 95ca subal %a2,%a2 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; close( iop - rtems_libio_iops ); 4361e: 2f01 movel %d1,%sp@- 43620: 4eb9 0004 97ec jsr 497ec 43626: 588f addql #4,%sp 43628: 6014 bras 4363e */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { rc = ENFILE; 4362a: 7417 moveq #23,%d2 4362c: 6030 bras 4365e int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; 4362e: 4285 clrl %d5 goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { rc = ENOENT; 43630: 7402 moveq #2,%d2 43632: 600e bras 43642 int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; 43634: 4285 clrl %d5 <== NOT EXECUTED * So we created it, and then we need to have "look it up." */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ rc = EACCES; 43636: 740d moveq #13,%d2 <== NOT EXECUTED 43638: 6008 bras 43642 <== NOT EXECUTED goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { /* We were trying to create a file that already exists */ rc = EEXIST; 4363a: 7411 moveq #17,%d2 4363c: 6004 bras 43642 * Single exit and clean up path. */ done: va_end(ap); if ( rc ) { 4363e: 4a82 tstl %d2 43640: 672a beqs 4366c <== NEVER TAKEN if ( iop ) 43642: 4a8a tstl %a2 43644: 670a beqs 43650 rtems_libio_free( iop ); 43646: 2f0a movel %a2,%sp@- 43648: 4eb9 0004 9a7a jsr 49a7a 4364e: 588f addql #4,%sp if ( loc_to_free ) 43650: 4a85 tstl %d5 43652: 670a beqs 4365e rtems_filesystem_freenode( loc_to_free ); 43654: 2f05 movel %d5,%sp@- 43656: 4eb9 0004 29d8 jsr 429d8 4365c: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( rc ); 4365e: 4eb9 0004 bca0 jsr 4bca0 <__errno> 43664: 2040 moveal %d0,%a0 43666: 70ff moveq #-1,%d0 43668: 2082 movel %d2,%a0@ 4366a: 6014 bras 43680 } return iop - rtems_libio_iops; 4366c: 200a movel %a2,%d0 4366e: 90b9 0005 d408 subl 5d408 ,%d0 43674: 223c b6db 6db7 movel #-1227133513,%d1 4367a: e680 asrl #3,%d0 4367c: 4c01 0800 mulsl %d1,%d0 } 43680: 4cee 3c7c ffc8 moveml %fp@(-56),%d2-%d6/%a2-%a5 43686: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000441aa : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 441aa: 4e56 fff0 linkw %fp,#-16 441ae: 48d7 040c moveml %d2-%d3/%a2,%sp@ 441b2: 242e 0008 movel %fp@(8),%d2 441b6: 246e 000c moveal %fp@(12),%a2 441ba: 1d42 fffe moveb %d2,%fp@(-2) int i; if (tty->termios.c_oflag & OPOST) { 441be: 202a 0034 movel %a2@(52),%d0 441c2: 0800 0000 btst #0,%d0 441c6: 6700 010e beqw 442d6 switch (c) { 441ca: 4281 clrl %d1 441cc: 1202 moveb %d2,%d1 441ce: 7609 moveq #9,%d3 441d0: b681 cmpl %d1,%d3 441d2: 6778 beqs 4424c 441d4: 650e bcss 441e4 441d6: 163c 0008 moveb #8,%d3 441da: b681 cmpl %d1,%d3 441dc: 6600 00b2 bnew 44290 441e0: 6000 00a0 braw 44282 <== NOT EXECUTED 441e4: 760a moveq #10,%d3 441e6: b681 cmpl %d1,%d3 441e8: 670c beqs 441f6 441ea: 163c 000d moveb #13,%d3 441ee: b681 cmpl %d1,%d3 441f0: 6600 009e bnew 44290 441f4: 602e bras 44224 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 441f6: 0800 0005 btst #5,%d0 441fa: 6704 beqs 44200 <== ALWAYS TAKEN tty->column = 0; 441fc: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 44200: 44c0 movew %d0,%ccr 44202: 6600 00d2 bnew 442d6 rtems_termios_puts ("\r", 1, tty); 44206: 2f0a movel %a2,%sp@- 44208: 4878 0001 pea 1 4420c: 4879 0005 af38 pea 5af38 44212: 4eb9 0004 40b2 jsr 440b2 tty->column = 0; 44218: 4fef 000c lea %sp@(12),%sp 4421c: 42aa 0028 clrl %a2@(40) 44220: 6000 00b4 braw 442d6 } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 44224: 0800 0004 btst #4,%d0 <== NOT EXECUTED 44228: 6708 beqs 44232 <== NOT EXECUTED 4422a: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 4422e: 6700 00ba beqw 442ea <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 44232: 44c0 movew %d0,%ccr <== NOT EXECUTED 44234: 6a0e bpls 44244 <== NOT EXECUTED c = '\n'; 44236: 720a moveq #10,%d1 <== NOT EXECUTED 44238: 1d41 fffe moveb %d1,%fp@(-2) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 4423c: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44240: 6700 0094 beqw 442d6 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 44244: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED break; 44248: 6000 008c braw 442d6 <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 4424c: 222a 0028 movel %a2@(40),%d1 44250: 7407 moveq #7,%d2 44252: 307c 0008 moveaw #8,%a0 44256: c481 andl %d1,%d2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 44258: 0280 0000 1800 andil #6144,%d0 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 4425e: 91c2 subal %d2,%a0 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 44260: 0c80 0000 1800 cmpil #6144,%d0 44266: 6612 bnes 4427a <== NEVER TAKEN tty->column += i; 44268: d288 addl %a0,%d1 4426a: 2541 0028 movel %d1,%a2@(40) rtems_termios_puts ( " ", i, tty); 4426e: 2f0a movel %a2,%sp@- 44270: 2f08 movel %a0,%sp@- 44272: 4879 0005 af3a pea 5af3a 44278: 6066 bras 442e0 return; } tty->column += i; 4427a: d1c1 addal %d1,%a0 <== NOT EXECUTED 4427c: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED break; 44280: 6054 bras 442d6 <== NOT EXECUTED case '\b': if (tty->column > 0) 44282: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 44286: 6f4e bles 442d6 <== NOT EXECUTED tty->column--; 44288: 5380 subql #1,%d0 <== NOT EXECUTED 4428a: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 4428e: 6046 bras 442d6 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) 44290: 0800 0001 btst #1,%d0 44294: 6724 beqs 442ba <== ALWAYS TAKEN c = toupper(c); 44296: 4280 clrl %d0 <== NOT EXECUTED 44298: 1002 moveb %d2,%d0 <== NOT EXECUTED 4429a: 7403 moveq #3,%d2 <== NOT EXECUTED 4429c: 7602 moveq #2,%d3 <== NOT EXECUTED 4429e: 2079 0005 bee4 moveal 5bee4 <__ctype_ptr__>,%a0 <== NOT EXECUTED 442a4: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 442a8: 49c1 extbl %d1 <== NOT EXECUTED 442aa: c282 andl %d2,%d1 <== NOT EXECUTED 442ac: b681 cmpl %d1,%d3 <== NOT EXECUTED 442ae: 6606 bnes 442b6 <== NOT EXECUTED 442b0: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 442b6: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED if (!iscntrl(c)) 442ba: 4280 clrl %d0 442bc: 102e fffe moveb %fp@(-2),%d0 442c0: 2079 0005 bee4 moveal 5bee4 <__ctype_ptr__>,%a0 442c6: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 442ca: 49c0 extbl %d0 442cc: 0800 0005 btst #5,%d0 442d0: 6604 bnes 442d6 <== NEVER TAKEN tty->column++; 442d2: 52aa 0028 addql #1,%a2@(40) break; } } rtems_termios_puts (&c, 1, tty); 442d6: 2f0a movel %a2,%sp@- 442d8: 4878 0001 pea 1 442dc: 486e fffe pea %fp@(-2) 442e0: 4eb9 0004 40b2 jsr 440b2 442e6: 4fef 000c lea %sp@(12),%sp } 442ea: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 442f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a664 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4a664: 4e56 ffe4 linkw %fp,#-28 4a668: 48d7 040c moveml %d2-%d3/%a2,%sp@ rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) 4a66c: 4878 01ff pea 1ff 4a670: 4879 0005 c74a pea 5c74a <_CPU_m68k_BFFFO_table+0x100> * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4a676: 246e 0008 moveal %fp@(8),%a2 rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) 4a67a: 4eb9 0004 baf4 jsr 4baf4 4a680: 508f addql #8,%sp 4a682: 4a80 tstl %d0 4a684: 6600 00e8 bnew 4a76e return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4a688: 4878 000a pea a 4a68c: 260e movel %fp,%d3 4a68e: 4879 0005 c74f pea 5c74f <_CPU_m68k_BFFFO_table+0x105> 4a694: 0683 ffff fff1 addil #-15,%d3 4a69a: 2f03 movel %d3,%sp@- 4a69c: 4eb9 0004 d93c jsr 4d93c sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4a6a2: 3039 0005 e24c movew 5e24c ,%d0 4a6a8: 2200 movel %d0,%d1 4a6aa: 5281 addql #1,%d1 4a6ac: 3f00 movew %d0,%sp@- 4a6ae: 33c1 0005 e24c movew %d1,5e24c 4a6b4: 4267 clrw %sp@- 4a6b6: 4879 0005 c75a pea 5c75a <_CPU_m68k_BFFFO_table+0x110> 4a6bc: 486e fffb pea %fp@(-5) 4a6c0: 4eb9 0004 ddb4 jsr 4ddb4 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4a6c6: 4878 0180 pea 180 4a6ca: 2f03 movel %d3,%sp@- 4a6cc: 4eb9 0004 b8b4 jsr 4b8b4 4a6d2: 4fef 0020 lea %sp@(32),%sp 4a6d6: 4a80 tstl %d0 4a6d8: 670a beqs 4a6e4 if (errno != EEXIST){ 4a6da: 4eb9 0004 d090 jsr 4d090 <__errno> 4a6e0: 6000 008c braw 4a76e return -1; /* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */ } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 4a6e4: 4878 4000 pea 4000 4a6e8: 2f03 movel %d3,%sp@- 4a6ea: 4eb9 0004 45c8 jsr 445c8 if (filsdes[0] < 0) { 4a6f0: 508f addql #8,%sp return -1; /* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */ } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 4a6f2: 2480 movel %d0,%a2@ if (filsdes[0] < 0) { 4a6f4: 6c0e bges 4a704 err = errno; 4a6f6: 4eb9 0004 d090 jsr 4d090 <__errno> 4a6fc: 2040 moveal %d0,%a0 4a6fe: 2410 movel %a0@,%d2 /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); 4a700: 2f03 movel %d3,%sp@- 4a702: 6054 bras 4a758 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4a704: b0b9 0005 d124 cmpl 5d124 ,%d0 4a70a: 6412 bccs 4a71e <== NEVER TAKEN 4a70c: 2200 movel %d0,%d1 4a70e: ed88 lsll #6,%d0 4a710: e789 lsll #3,%d1 4a712: 2079 0005 e940 moveal 5e940 ,%a0 4a718: 9081 subl %d1,%d0 4a71a: d1c0 addal %d0,%a0 4a71c: 6002 bras 4a720 4a71e: 91c8 subal %a0,%a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4a720: 70fe moveq #-2,%d0 4a722: c1a8 0014 andl %d0,%a0@(20) filsdes[1] = open(fifopath, O_WRONLY); 4a726: 4878 0001 pea 1 4a72a: 486e fff1 pea %fp@(-15) 4a72e: 4eb9 0004 45c8 jsr 445c8 if (filsdes[1] < 0) { 4a734: 508f addql #8,%sp else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); 4a736: 2540 0004 movel %d0,%a2@(4) if (filsdes[1] < 0) { 4a73a: 6c16 bges 4a752 err = errno; 4a73c: 4eb9 0004 d090 jsr 4d090 <__errno> 4a742: 2040 moveal %d0,%a0 4a744: 2410 movel %a0@,%d2 close(filsdes[0]); 4a746: 2f12 movel %a2@,%sp@- 4a748: 4eb9 0004 34f0 jsr 434f0 4a74e: 588f addql #4,%sp 4a750: 6002 bras 4a754 int pipe_create( int filsdes[2] ) { rtems_libio_t *iop; int err = 0; 4a752: 4282 clrl %d2 if (filsdes[1] < 0) { err = errno; close(filsdes[0]); } unlink(fifopath); 4a754: 486e fff1 pea %fp@(-15) 4a758: 4eb9 0004 616c jsr 4616c 4a75e: 588f addql #4,%sp } if(err != 0) 4a760: 4a82 tstl %d2 4a762: 670e beqs 4a772 rtems_set_errno_and_return_minus_one(err); 4a764: 4eb9 0004 d090 jsr 4d090 <__errno> 4a76a: 2040 moveal %d0,%a0 4a76c: 2082 movel %d2,%a0@ 4a76e: 70ff moveq #-1,%d0 4a770: 6002 bras 4a774 return 0; 4a772: 4280 clrl %d0 } 4a774: 4cee 040c ffe4 moveml %fp@(-28),%d2-%d3/%a2 4a77a: 4e5e unlk %fp ... =============================================================================== 0004b9da : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4b9da: 4e56 0000 linkw %fp,#0 if (cmd == FIONREAD) { 4b9de: 203c 4004 667f movel #1074030207,%d0 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4b9e4: 2f0b movel %a3,%sp@- 4b9e6: 266e 0010 moveal %fp@(16),%a3 4b9ea: 2f0a movel %a2,%sp@- 4b9ec: 246e 0008 moveal %fp@(8),%a2 if (cmd == FIONREAD) { 4b9f0: b0ae 000c cmpl %fp@(12),%d0 4b9f4: 662e bnes 4ba24 if (buffer == NULL) 4b9f6: 4a8b tstl %a3 4b9f8: 672e beqs 4ba28 return -EFAULT; if (! PIPE_LOCK(pipe)) 4b9fa: 42a7 clrl %sp@- 4b9fc: 42a7 clrl %sp@- 4b9fe: 2f2a 0028 movel %a2@(40),%sp@- 4ba02: 4eb9 0004 7484 jsr 47484 4ba08: 4fef 000c lea %sp@(12),%sp 4ba0c: 4a80 tstl %d0 4ba0e: 661c bnes 4ba2c <== NEVER TAKEN return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 4ba10: 26aa 000c movel %a2@(12),%a3@ PIPE_UNLOCK(pipe); 4ba14: 2f2a 0028 movel %a2@(40),%sp@- 4ba18: 4eb9 0004 758c jsr 4758c return 0; 4ba1e: 588f addql #4,%sp 4ba20: 4280 clrl %d0 4ba22: 600a bras 4ba2e } return -EINVAL; 4ba24: 70ea moveq #-22,%d0 4ba26: 6006 bras 4ba2e rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; 4ba28: 70f2 moveq #-14,%d0 4ba2a: 6002 bras 4ba2e if (! PIPE_LOCK(pipe)) return -EINTR; 4ba2c: 70fc moveq #-4,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4ba2e: 246e fff8 moveal %fp@(-8),%a2 4ba32: 266e fffc moveal %fp@(-4),%a3 4ba36: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b708 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4b708: 4e56 ffd4 linkw %fp,#-44 4b70c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4b710: 42a7 clrl %sp@- pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4b712: 246e 0008 moveal %fp@(8),%a2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4b716: 2e3c 0004 7484 movel #291972,%d7 4b71c: 2047 moveal %d7,%a0 4b71e: 42a7 clrl %sp@- 4b720: 2f2a 0028 movel %a2@(40),%sp@- pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4b724: 286e 000c moveal %fp@(12),%a4 4b728: 2a2e 0010 movel %fp@(16),%d5 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4b72c: 4e90 jsr %a0@ 4b72e: 4fef 000c lea %sp@(12),%sp 4b732: 4a80 tstl %d0 4b734: 6600 011c bnew 4b852 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 4b738: 2c0e movel %fp,%d6 rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4b73a: 4282 clrl %d2 4b73c: 47f9 0004 e5d4 lea 4e5d4 ,%a3 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 4b742: 5986 subql #4,%d6 4b744: 4bf9 0004 c4d8 lea 4c4d8 ,%a5 4b74a: 6000 00e2 braw 4b82e return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 4b74e: 4aaa 0014 tstl %a2@(20) 4b752: 6700 00e0 beqw 4b834 goto out_locked; if (LIBIO_NODELAY(iop)) { 4b756: 206e 0014 moveal %fp@(20),%a0 4b75a: 7001 moveq #1,%d0 4b75c: c0a8 0014 andl %a0@(20),%d0 4b760: 6600 00d6 bnew 4b838 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 4b764: 52aa 0018 addql #1,%a2@(24) PIPE_UNLOCK(pipe); 4b768: 2f2a 0028 movel %a2@(40),%sp@- 4b76c: 4eb9 0004 758c jsr 4758c if (! PIPE_READWAIT(pipe)) 4b772: 42a7 clrl %sp@- 4b774: 2f2a 002c movel %a2@(44),%sp@- 4b778: 4eb9 0004 c53c jsr 4c53c 4b77e: 4fef 000c lea %sp@(12),%sp 4b782: 4a80 tstl %d0 4b784: 6604 bnes 4b78a <== NEVER TAKEN 4b786: 4283 clrl %d3 4b788: 6002 bras 4b78c ret = -EINTR; 4b78a: 76fc moveq #-4,%d3 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { 4b78c: 42a7 clrl %sp@- 4b78e: 2047 moveal %d7,%a0 4b790: 42a7 clrl %sp@- 4b792: 2f2a 0028 movel %a2@(40),%sp@- 4b796: 4e90 jsr %a0@ 4b798: 4fef 000c lea %sp@(12),%sp 4b79c: 4a80 tstl %d0 4b79e: 6600 00a8 bnew 4b848 /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4b7a2: 53aa 0018 subql #1,%a2@(24) if (ret != 0) 4b7a6: 4a83 tstl %d3 4b7a8: 6600 0090 bnew 4b83a if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4b7ac: 262a 000c movel %a2@(12),%d3 4b7b0: 679c beqs 4b74e if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4b7b2: 2005 movel %d5,%d0 4b7b4: 9082 subl %d2,%d0 4b7b6: b083 cmpl %d3,%d0 4b7b8: 6402 bccs 4b7bc 4b7ba: 2600 movel %d0,%d3 chunk1 = pipe->Size - pipe->Start; 4b7bc: 222a 0008 movel %a2@(8),%d1 4b7c0: 200c movel %a4,%d0 4b7c2: d082 addl %d2,%d0 4b7c4: 282a 0004 movel %a2@(4),%d4 4b7c8: 9881 subl %d1,%d4 4b7ca: d292 addl %a2@,%d1 if (chunk > chunk1) { 4b7cc: b883 cmpl %d3,%d4 4b7ce: 6c20 bges 4b7f0 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4b7d0: 2f04 movel %d4,%sp@- 4b7d2: 2f01 movel %d1,%sp@- 4b7d4: 2f00 movel %d0,%sp@- 4b7d6: 4e93 jsr %a3@ memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4b7d8: 2203 movel %d3,%d1 4b7da: 9284 subl %d4,%d1 4b7dc: 2002 movel %d2,%d0 4b7de: d084 addl %d4,%d0 4b7e0: 2f01 movel %d1,%sp@- 4b7e2: 2f12 movel %a2@,%sp@- 4b7e4: 4874 0800 pea %a4@(00000000,%d0:l) 4b7e8: 4e93 jsr %a3@ 4b7ea: 4fef 0018 lea %sp@(24),%sp 4b7ee: 600c bras 4b7fc } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4b7f0: 2f03 movel %d3,%sp@- 4b7f2: 2f01 movel %d1,%sp@- 4b7f4: 2f00 movel %d0,%sp@- 4b7f6: 4e93 jsr %a3@ 4b7f8: 4fef 000c lea %sp@(12),%sp pipe->Start += chunk; 4b7fc: 2003 movel %d3,%d0 4b7fe: d0aa 0008 addl %a2@(8),%d0 pipe->Start %= pipe->Size; 4b802: 4c6a 0001 0004 remul %a2@(4),%d1,%d0 pipe->Length -= chunk; 4b808: 202a 000c movel %a2@(12),%d0 4b80c: 9083 subl %d3,%d0 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4b80e: 2541 0008 movel %d1,%a2@(8) pipe->Length -= chunk; 4b812: 2540 000c movel %d0,%a2@(12) /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4b816: 6604 bnes 4b81c pipe->Start = 0; 4b818: 42aa 0008 clrl %a2@(8) if (pipe->waitingWriters > 0) 4b81c: 4aaa 001c tstl %a2@(28) 4b820: 670a beqs 4b82c PIPE_WAKEUPWRITERS(pipe); 4b822: 2f06 movel %d6,%sp@- 4b824: 2f2a 0030 movel %a2@(48),%sp@- 4b828: 4e95 jsr %a5@ 4b82a: 508f addql #8,%sp read += chunk; 4b82c: d483 addl %d3,%d2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4b82e: ba82 cmpl %d2,%d5 4b830: 6200 ff7a bhiw 4b7ac while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 4b834: 4283 clrl %d3 4b836: 6002 bras 4b83a goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 4b838: 76f5 moveq #-11,%d3 PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4b83a: 2f2a 0028 movel %a2@(40),%sp@- 4b83e: 4eb9 0004 758c jsr 4758c 4b844: 588f addql #4,%sp 4b846: 6002 bras 4b84a PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; 4b848: 76fc moveq #-4,%d3 <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 4b84a: 4a82 tstl %d2 4b84c: 6f08 bles 4b856 4b84e: 2002 movel %d2,%d0 4b850: 6006 bras 4b858 ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; 4b852: 70fc moveq #-4,%d0 <== NOT EXECUTED 4b854: 6002 bras 4b858 <== NOT EXECUTED PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; 4b856: 2003 movel %d3,%d0 } 4b858: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 4b85e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b2f6 : */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b2f6: 4e56 fff0 linkw %fp,#-16 /* WARN pipe not released! */ if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); 4b2fa: 206e 000c moveal %fp@(12),%a0 */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b2fe: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4b302: 266e 0008 moveal %fp@(8),%a3 /* WARN pipe not released! */ if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); 4b306: 7406 moveq #6,%d2 void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep; 4b308: 2453 moveal %a3@,%a2 /* WARN pipe not released! */ if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); 4b30a: c4a8 0014 andl %a0@(20),%d2 if (mode & LIBIO_FLAGS_READ) 4b30e: 0802 0001 btst #1,%d2 4b312: 6704 beqs 4b318 pipe->Readers --; 4b314: 53aa 0010 subql #1,%a2@(16) if (mode & LIBIO_FLAGS_WRITE) 4b318: 44c2 movew %d2,%ccr 4b31a: 6604 bnes 4b320 pipe->Writers --; 4b31c: 53aa 0014 subql #1,%a2@(20) PIPE_UNLOCK(pipe); 4b320: 2f2a 0028 movel %a2@(40),%sp@- 4b324: 4eb9 0004 758c jsr 4758c if (pipe->Readers == 0 && pipe->Writers == 0) { 4b32a: 588f addql #4,%sp 4b32c: 4aaa 0010 tstl %a2@(16) 4b330: 6622 bnes 4b354 4b332: 4aaa 0014 tstl %a2@(20) 4b336: 660c bnes 4b344 #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 4b338: 2f0a movel %a2,%sp@- 4b33a: 4eba ff72 jsr %pc@(4b2ae ) *pipep = NULL; 4b33e: 588f addql #4,%sp 4b340: 4293 clrl %a3@ 4b342: 602c bras 4b370 } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4b344: 7004 moveq #4,%d0 4b346: b082 cmpl %d2,%d0 4b348: 670a beqs 4b354 <== NEVER TAKEN /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4b34a: 486e fffc pea %fp@(-4) 4b34e: 2f2a 0030 movel %a2@(48),%sp@- 4b352: 6014 bras 4b368 else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4b354: 4aaa 0014 tstl %a2@(20) 4b358: 6616 bnes 4b370 <== NEVER TAKEN 4b35a: 7002 moveq #2,%d0 4b35c: b082 cmpl %d2,%d0 4b35e: 6710 beqs 4b370 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 4b360: 486e fffc pea %fp@(-4) 4b364: 2f2a 002c movel %a2@(44),%sp@- 4b368: 4eb9 0004 c4d8 jsr 4c4d8 4b36e: 508f addql #8,%sp pipe_unlock(); 4b370: 4eba ff26 jsr %pc@(4b298 ) iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } 4b374: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4b37a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b862 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4b862: 4e56 ffd4 linkw %fp,#-44 4b866: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b86a: 246e 0008 moveal %fp@(8),%a2 4b86e: 286e 000c moveal %fp@(12),%a4 4b872: 282e 0010 movel %fp@(16),%d4 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4b876: 6700 014e beqw 4b9c6 return 0; if (! PIPE_LOCK(pipe)) 4b87a: 42a7 clrl %sp@- 4b87c: 42a7 clrl %sp@- 4b87e: 2f2a 0028 movel %a2@(40),%sp@- 4b882: 4eb9 0004 7484 jsr 47484 4b888: 4fef 000c lea %sp@(12),%sp 4b88c: 4a80 tstl %d0 4b88e: 6600 013a bnew 4b9ca return -EINTR; if (pipe->Readers == 0) { 4b892: 4aaa 0010 tstl %a2@(16) 4b896: 6700 010a beqw 4b9a2 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 4b89a: b8aa 0004 cmpl %a2@(4),%d4 4b89e: 6204 bhis 4b8a4 <== NEVER TAKEN 4b8a0: 2a04 movel %d4,%d5 4b8a2: 6002 bras 4b8a6 4b8a4: 7a01 moveq #1,%d5 <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; 4b8a6: 4282 clrl %d2 } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4b8a8: 2e3c 0004 c53c movel #312636,%d7 4b8ae: 47f9 0004 e5d4 lea 4e5d4 ,%a3 else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 4b8b4: 4bf9 0004 c4d8 lea 4c4d8 ,%a5 /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4b8ba: 2c3c 0004 7484 movel #291972,%d6 4b8c0: 6000 00d8 braw 4b99a /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 4b8c4: 206e 0014 moveal %fp@(20),%a0 4b8c8: 7001 moveq #1,%d0 4b8ca: c0a8 0014 andl %a0@(20),%d0 4b8ce: 6600 00d8 bnew 4b9a8 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 4b8d2: 52aa 001c addql #1,%a2@(28) PIPE_UNLOCK(pipe); 4b8d6: 2f2a 0028 movel %a2@(40),%sp@- 4b8da: 4eb9 0004 758c jsr 4758c if (! PIPE_WRITEWAIT(pipe)) 4b8e0: 2047 moveal %d7,%a0 4b8e2: 42a7 clrl %sp@- 4b8e4: 2f2a 0030 movel %a2@(48),%sp@- 4b8e8: 4e90 jsr %a0@ 4b8ea: 4fef 000c lea %sp@(12),%sp 4b8ee: 4a80 tstl %d0 4b8f0: 6604 bnes 4b8f6 <== NEVER TAKEN 4b8f2: 4283 clrl %d3 4b8f4: 6002 bras 4b8f8 ret = -EINTR; 4b8f6: 76fc moveq #-4,%d3 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { 4b8f8: 42a7 clrl %sp@- 4b8fa: 2046 moveal %d6,%a0 4b8fc: 42a7 clrl %sp@- 4b8fe: 2f2a 0028 movel %a2@(40),%sp@- 4b902: 4e90 jsr %a0@ 4b904: 4fef 000c lea %sp@(12),%sp 4b908: 4a80 tstl %d0 4b90a: 6600 00b0 bnew 4b9bc /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4b90e: 53aa 001c subql #1,%a2@(28) if (ret != 0) 4b912: 4a83 tstl %d3 4b914: 6600 0098 bnew 4b9ae goto out_locked; if (pipe->Readers == 0) { 4b918: 4aaa 0010 tstl %a2@(16) 4b91c: 6700 008e beqw 4b9ac /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 4b920: 202a 0004 movel %a2@(4),%d0 4b924: 2600 movel %d0,%d3 4b926: 222a 000c movel %a2@(12),%d1 4b92a: 9681 subl %d1,%d3 4b92c: ba83 cmpl %d3,%d5 4b92e: 6294 bhis 4b8c4 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4b930: 2044 moveal %d4,%a0 4b932: 91c2 subal %d2,%a0 4b934: b1c3 cmpal %d3,%a0 4b936: 6402 bccs 4b93a 4b938: 2608 movel %a0,%d3 chunk1 = pipe->Size - PIPE_WSTART(pipe); 4b93a: 2a01 movel %d1,%d5 4b93c: daaa 0008 addl %a2@(8),%d5 4b940: 4c40 5001 remul %d0,%d1,%d5 4b944: 2a00 movel %d0,%d5 4b946: 9a81 subl %d1,%d5 4b948: 2012 movel %a2@,%d0 4b94a: d081 addl %d1,%d0 4b94c: 220c movel %a4,%d1 4b94e: d282 addl %d2,%d1 if (chunk > chunk1) { 4b950: ba83 cmpl %d3,%d5 4b952: 6c20 bges 4b974 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4b954: 2f05 movel %d5,%sp@- 4b956: 2f01 movel %d1,%sp@- 4b958: 2f00 movel %d0,%sp@- 4b95a: 4e93 jsr %a3@ memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4b95c: 2203 movel %d3,%d1 4b95e: 9285 subl %d5,%d1 4b960: 2005 movel %d5,%d0 4b962: d082 addl %d2,%d0 4b964: 2f01 movel %d1,%sp@- 4b966: 4874 0800 pea %a4@(00000000,%d0:l) 4b96a: 2f12 movel %a2@,%sp@- 4b96c: 4e93 jsr %a3@ 4b96e: 4fef 0018 lea %sp@(24),%sp 4b972: 600c bras 4b980 } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4b974: 2f03 movel %d3,%sp@- 4b976: 2f01 movel %d1,%sp@- 4b978: 2f00 movel %d0,%sp@- 4b97a: 4e93 jsr %a3@ 4b97c: 4fef 000c lea %sp@(12),%sp pipe->Length += chunk; 4b980: d7aa 000c addl %d3,%a2@(12) if (pipe->waitingReaders > 0) 4b984: 4aaa 0018 tstl %a2@(24) 4b988: 670c beqs 4b996 PIPE_WAKEUPREADERS(pipe); 4b98a: 486e fffc pea %fp@(-4) 4b98e: 2f2a 002c movel %a2@(44),%sp@- 4b992: 4e95 jsr %a5@ 4b994: 508f addql #8,%sp written += chunk; 4b996: d483 addl %d3,%d2 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; 4b998: 7a01 moveq #1,%d5 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4b99a: b882 cmpl %d2,%d4 4b99c: 6282 bhis 4b920 <== NEVER TAKEN 4b99e: 4283 clrl %d3 4b9a0: 600c bras 4b9ae if (! PIPE_LOCK(pipe)) return -EINTR; if (pipe->Readers == 0) { ret = -EPIPE; 4b9a2: 76e0 moveq #-32,%d3 const void *buffer, size_t count, rtems_libio_t *iop ) { int chunk, chunk1, written = 0, ret = 0; 4b9a4: 4282 clrl %d2 4b9a6: 6006 bras 4b9ae chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 4b9a8: 76f5 moveq #-11,%d3 4b9aa: 6002 bras 4b9ae pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; 4b9ac: 76e0 moveq #-32,%d3 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4b9ae: 2f2a 0028 movel %a2@(40),%sp@- 4b9b2: 4eb9 0004 758c jsr 4758c 4b9b8: 588f addql #4,%sp 4b9ba: 6002 bras 4b9be PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; 4b9bc: 76fc moveq #-4,%d3 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 4b9be: 4a82 tstl %d2 4b9c0: 6f0c bles 4b9ce 4b9c2: 2002 movel %d2,%d0 4b9c4: 600a bras 4b9d0 { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; 4b9c6: 4280 clrl %d0 <== NOT EXECUTED 4b9c8: 6006 bras 4b9d0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; 4b9ca: 70fc moveq #-4,%d0 <== NOT EXECUTED 4b9cc: 6002 bras 4b9d0 <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) return written; return ret; 4b9ce: 2003 movel %d3,%d0 } 4b9d0: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 4b9d6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046dcc : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 46dcc: 4e56 0000 linkw %fp,#0 46dd0: 202e 000c movel %fp@(12),%d0 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 46dd4: 2200 movel %d0,%d1 46dd6: 5381 subql #1,%d1 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); 46dd8: 52b9 0006 2cf4 addql #1,62cf4 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 46dde: c280 andl %d0,%d1 46de0: 6610 bnes 46df2 <== NEVER TAKEN 46de2: 123c 0003 moveb #3,%d1 46de6: b280 cmpl %d0,%d1 46de8: 6408 bccs 46df2 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 46dea: 4e5e unlk %fp /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 46dec: 4ef9 0004 6f68 jmp 46f68 } 46df2: 7016 moveq #22,%d0 46df4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059b8c : ssize_t read( int fd, void *buffer, size_t count ) { 59b8c: 4e56 fff4 linkw %fp,#-12 59b90: 202e 0008 movel %fp@(8),%d0 59b94: 222e 000c movel %fp@(12),%d1 59b98: 206e 0010 moveal %fp@(16),%a0 59b9c: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 59ba0: b0b9 0005 bc14 cmpl 5bc14 ,%d0 59ba6: 641a bccs 59bc2 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 59ba8: 2400 movel %d0,%d2 59baa: ed88 lsll #6,%d0 59bac: e78a lsll #3,%d2 59bae: 2479 0005 d408 moveal 5d408 ,%a2 59bb4: 9082 subl %d2,%d0 59bb6: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 59bb8: 202a 0014 movel %a2@(20),%d0 59bbc: 0800 0008 btst #8,%d0 59bc0: 660e bnes 59bd0 59bc2: 4eb9 0004 bca0 jsr 4bca0 <__errno> 59bc8: 7209 moveq #9,%d1 59bca: 2040 moveal %d0,%a0 59bcc: 2081 movel %d1,%a0@ 59bce: 601a bras 59bea rtems_libio_check_buffer( buffer ); 59bd0: 4a81 tstl %d1 59bd2: 670a beqs 59bde <== NEVER TAKEN rtems_libio_check_count( count ); 59bd4: 4a88 tstl %a0 59bd6: 6744 beqs 59c1c rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 59bd8: 0800 0001 btst #1,%d0 59bdc: 6610 bnes 59bee 59bde: 4eb9 0004 bca0 jsr 4bca0 <__errno> 59be4: 2040 moveal %d0,%a0 59be6: 7016 moveq #22,%d0 59be8: 2080 movel %d0,%a0@ 59bea: 70ff moveq #-1,%d0 59bec: 6030 bras 59c1e /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); 59bee: 226a 0020 moveal %a2@(32),%a1 59bf2: 2f08 movel %a0,%sp@- 59bf4: 2f01 movel %d1,%sp@- 59bf6: 2f0a movel %a2,%sp@- 59bf8: 2069 0008 moveal %a1@(8),%a0 59bfc: 4e90 jsr %a0@ if ( rc > 0 ) 59bfe: 4fef 000c lea %sp@(12),%sp 59c02: 4a80 tstl %d0 59c04: 6f18 bles 59c1e iop->offset += rc; 59c06: 2400 movel %d0,%d2 59c08: 5bc1 smi %d1 59c0a: 49c1 extbl %d1 59c0c: d5aa 0010 addl %d2,%a2@(16) 59c10: 262a 000c movel %a2@(12),%d3 59c14: d781 addxl %d1,%d3 59c16: 2543 000c movel %d3,%a2@(12) 59c1a: 6002 bras 59c1e rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 59c1c: 4280 clrl %d0 if ( rc > 0 ) iop->offset += rc; return rc; } 59c1e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 59c24: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045700 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 45700: 4e56 ffe0 linkw %fp,#-32 45704: 48d7 040c moveml %d2-%d3/%a2,%sp@ 45708: 246e 0008 moveal %fp@(8),%a2 4570c: 262e 000c movel %fp@(12),%d3 rtems_filesystem_location_info_t loc; int result; if (!buf) 45710: 660e bnes 45720 rtems_set_errno_and_return_minus_one( EFAULT ); 45712: 4eb9 0004 e54c jsr 4e54c <__errno> 45718: 720e moveq #14,%d1 4571a: 2040 moveal %d0,%a0 4571c: 2081 movel %d1,%a0@ 4571e: 6076 bras 45796 result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 45720: 2f0a movel %a2,%sp@- 45722: 240e movel %fp,%d2 45724: 0682 ffff ffec addil #-20,%d2 4572a: 4eb9 0005 008c jsr 5008c 45730: 4297 clrl %sp@ 45732: 2f02 movel %d2,%sp@- 45734: 42a7 clrl %sp@- 45736: 2f00 movel %d0,%sp@- 45738: 2f0a movel %a2,%sp@- 4573a: 4eb9 0004 46bc jsr 446bc 0, &loc, false ); if ( result != 0 ) 45740: 4fef 0014 lea %sp@(20),%sp 45744: 4a80 tstl %d0 45746: 664e bnes 45796 <== NEVER TAKEN return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 45748: 206e fff8 moveal %fp@(-8),%a0 4574c: 45f9 0004 4788 lea 44788 ,%a2 45752: 2f02 movel %d2,%sp@- 45754: 2068 0010 moveal %a0@(16),%a0 45758: 4e90 jsr %a0@ 4575a: 588f addql #4,%sp 4575c: 7204 moveq #4,%d1 4575e: b280 cmpl %d0,%d1 45760: 6714 beqs 45776 rtems_filesystem_freenode( &loc ); 45762: 2f02 movel %d2,%sp@- 45764: 4e92 jsr %a2@ rtems_set_errno_and_return_minus_one( EINVAL ); 45766: 4eb9 0004 e54c jsr 4e54c <__errno> 4576c: 588f addql #4,%sp 4576e: 2040 moveal %d0,%a0 45770: 7016 moveq #22,%d0 45772: 2080 movel %d0,%a0@ 45774: 6020 bras 45796 } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 45776: 2f2e 0010 movel %fp@(16),%sp@- 4577a: 206e fff8 moveal %fp@(-8),%a0 4577e: 2f03 movel %d3,%sp@- 45780: 2f02 movel %d2,%sp@- 45782: 2068 003c moveal %a0@(60),%a0 45786: 4e90 jsr %a0@ 45788: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 4578a: 2f02 movel %d2,%sp@- 4578c: 4e92 jsr %a2@ return result; 4578e: 4fef 0010 lea %sp@(16),%sp 45792: 2003 movel %d3,%d0 45794: 6002 bras 45798 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) return -1; 45796: 70ff moveq #-1,%d0 result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 45798: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 4579e: 4e5e unlk %fp ... =============================================================================== 000444f8 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 444f8: 4e56 ffe4 linkw %fp,#-28 444fc: 202e 0008 movel %fp@(8),%d0 44500: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 44504: 246e 000c moveal %fp@(12),%a2 44508: 262e 0010 movel %fp@(16),%d3 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 4450c: b0b9 0005 c684 cmpl 5c684 ,%d0 44512: 641a bccs 4452e iop = rtems_libio_iop( fd ); 44514: 2200 movel %d0,%d1 44516: ed88 lsll #6,%d0 44518: e789 lsll #3,%d1 4451a: 2679 0005 de78 moveal 5de78 ,%a3 44520: 9081 subl %d1,%d0 44522: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 44524: 202b 0014 movel %a3@(20),%d0 44528: 0800 0008 btst #8,%d0 4452c: 6610 bnes 4453e 4452e: 4eb9 0004 c91c jsr 4c91c <__errno> 44534: 7209 moveq #9,%d1 44536: 2040 moveal %d0,%a0 44538: 2081 movel %d1,%a0@ 4453a: 6000 009e braw 445da rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4453e: 0800 0001 btst #1,%d0 44542: 672c beqs 44570 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 44544: 4a8a tstl %a2 44546: 6728 beqs 44570 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 44548: 4a83 tstl %d3 4454a: 6f24 bles 44570 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 4454c: 0c83 0000 0400 cmpil #1024,%d3 44552: 6e1c bgts 44570 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 44554: 204a moveal %a2,%a0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 44556: 93c9 subal %a1,%a1 44558: 4281 clrl %d1 4455a: 7001 moveq #1,%d0 4455c: 6002 bras 44560 if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 4455e: 2204 movel %d4,%d1 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) 44560: 4a90 tstl %a0@ 44562: 670c beqs 44570 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 44564: 2428 0004 movel %a0@(4),%d2 44568: 2801 movel %d1,%d4 4456a: d882 addl %d2,%d4 if ( total < old ) 4456c: b284 cmpl %d4,%d1 4456e: 6f0e bles 4457e rtems_set_errno_and_return_minus_one( EINVAL ); 44570: 4eb9 0004 c91c jsr 4c91c <__errno> 44576: 2040 moveal %d0,%a0 44578: 7016 moveq #22,%d0 4457a: 2080 movel %d0,%a0@ 4457c: 605c bras 445da if ( iov[v].iov_len ) all_zeros = false; 4457e: 4a82 tstl %d2 44580: 57c1 seq %d1 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44582: 5289 addql #1,%a1 44584: 5088 addql #8,%a0 total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; 44586: c081 andl %d1,%d0 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44588: b689 cmpl %a1,%d3 4458a: 6ed2 bgts 4455e /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 4458c: 4a00 tstb %d0 4458e: 6646 bnes 445d6 #include #include #include ssize_t readv( 44590: 588a addql #4,%a2 44592: 4284 clrl %d4 44594: 4282 clrl %d2 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->pathinfo.handlers->read_h)( 44596: 206b 0020 moveal %a3@(32),%a0 4459a: 2f12 movel %a2@,%sp@- 4459c: 2f2a fffc movel %a2@(-4),%sp@- 445a0: 2f0b movel %a3,%sp@- 445a2: 2068 0008 moveal %a0@(8),%a0 445a6: 4e90 jsr %a0@ iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 445a8: 4fef 000c lea %sp@(12),%sp 445ac: 4a80 tstl %d0 445ae: 6d2a blts 445da <== NEVER TAKEN return -1; if ( bytes > 0 ) { 445b0: 6716 beqs 445c8 <== NEVER TAKEN iop->offset += bytes; total += bytes; 445b2: d480 addl %d0,%d2 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 445b4: 2c00 movel %d0,%d6 445b6: 5bc5 smi %d5 445b8: 49c5 extbl %d5 445ba: ddab 0010 addl %d6,%a3@(16) 445be: 222b 000c movel %a3@(12),%d1 445c2: d385 addxl %d5,%d1 445c4: 2741 000c movel %d1,%a3@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 445c8: b092 cmpl %a2@,%d0 445ca: 6610 bnes 445dc <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 445cc: 5284 addql #1,%d4 445ce: 508a addql #8,%a2 445d0: b684 cmpl %d4,%d3 445d2: 6ec2 bgts 44596 445d4: 6006 bras 445dc * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { return 0; 445d6: 4282 clrl %d2 445d8: 6002 bras 445dc iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; 445da: 74ff moveq #-1,%d2 if (bytes != iov[ v ].iov_len) break; } return total; } 445dc: 2002 movel %d2,%d0 445de: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 445e4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059c8c : /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 59c8c: 7003 moveq #3,%d0 void *realloc( void *ptr, size_t size ) { 59c8e: 4e56 fff0 linkw %fp,#-16 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 59c92: 52b9 0005 d430 addql #1,5d430 void *realloc( void *ptr, size_t size ) { 59c98: 48d7 001c moveml %d2-%d4,%sp@ 59c9c: 242e 0008 movel %fp@(8),%d2 59ca0: 262e 000c movel %fp@(12),%d3 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 59ca4: b0b9 0005 d6a0 cmpl 5d6a0 <_System_state_Current>,%d0 59caa: 6614 bnes 59cc0 <== NEVER TAKEN if (_Thread_Dispatch_disable_level > 0) 59cac: 2039 0005 d558 movel 5d558 <_Thread_Dispatch_disable_level>,%d0 59cb2: 6600 00aa bnew 59d5e return (void *) 0; if (_ISR_Nest_level > 0) 59cb6: 4ab9 0005 d6f0 tstl 5d6f0 <_Per_CPU_Information+0x8> 59cbc: 6600 00a0 bnew 59d5e } /* * Continue with realloc(). */ if ( !ptr ) 59cc0: 4a82 tstl %d2 59cc2: 6610 bnes 59cd4 return malloc( size ); 59cc4: 2f03 movel %d3,%sp@- 59cc6: 4eb9 0004 2cd4 jsr 42cd4 59ccc: 588f addql #4,%sp 59cce: 2400 movel %d0,%d2 59cd0: 6000 008e braw 59d60 if ( !size ) { 59cd4: 4a83 tstl %d3 59cd6: 660c bnes 59ce4 <== ALWAYS TAKEN free( ptr ); 59cd8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59cda: 4eb9 0004 29ec jsr 429ec <== NOT EXECUTED return (void *) 0; 59ce0: 588f addql #4,%sp <== NOT EXECUTED 59ce2: 607a bras 59d5e <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 59ce4: 486e fffc pea %fp@(-4) 59ce8: 2f02 movel %d2,%sp@- 59cea: 2f39 0005 bc50 movel 5bc50 ,%sp@- 59cf0: 4eb9 0005 9e08 jsr 59e08 <_Protected_heap_Get_block_size> 59cf6: 4fef 000c lea %sp@(12),%sp 59cfa: 4a00 tstb %d0 59cfc: 660e bnes 59d0c errno = EINVAL; 59cfe: 4eb9 0004 bca0 jsr 4bca0 <__errno> 59d04: 2040 moveal %d0,%a0 59d06: 7016 moveq #22,%d0 59d08: 2080 movel %d0,%a0@ 59d0a: 6052 bras 59d5e } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 59d0c: 2f03 movel %d3,%sp@- 59d0e: 2f02 movel %d2,%sp@- 59d10: 2f39 0005 bc50 movel 5bc50 ,%sp@- 59d16: 4eb9 0005 9e44 jsr 59e44 <_Protected_heap_Resize_block> 59d1c: 4fef 000c lea %sp@(12),%sp 59d20: 4a00 tstb %d0 59d22: 663c bnes 59d60 * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 59d24: 2f03 movel %d3,%sp@- 59d26: 4eb9 0004 2cd4 jsr 42cd4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 59d2c: 588f addql #4,%sp * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 59d2e: 53b9 0005 d424 subql #1,5d424 * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 59d34: 2800 movel %d0,%d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 59d36: 6726 beqs 59d5e return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 59d38: 202e fffc movel %fp@(-4),%d0 59d3c: b083 cmpl %d3,%d0 59d3e: 6402 bccs 59d42 <== NEVER TAKEN 59d40: 2600 movel %d0,%d3 59d42: 2f03 movel %d3,%sp@- 59d44: 2f02 movel %d2,%sp@- 59d46: 2f04 movel %d4,%sp@- 59d48: 4eb9 0004 c54c jsr 4c54c free( ptr ); 59d4e: 2f02 movel %d2,%sp@- return new_area; 59d50: 2404 movel %d4,%d2 if ( !new_area ) { return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); 59d52: 4eb9 0004 29ec jsr 429ec return new_area; 59d58: 4fef 0010 lea %sp@(16),%sp 59d5c: 6002 bras 59d60 new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 59d5e: 4282 clrl %d2 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 59d60: 2002 movel %d2,%d0 59d62: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 59d68: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043afc : #include int rmdir( const char *pathname ) { 43afc: 4e56 ffbc linkw %fp,#-68 43b00: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 43b04: 246e 0008 moveal %fp@(8),%a2 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 43b08: 2f0a movel %a2,%sp@- 43b0a: 4eb9 0004 2d90 jsr 42d90 if ( parentpathlen == 0 ) 43b10: 588f addql #4,%sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 43b12: 2a00 movel %d0,%d5 43b14: 200e movel %fp,%d0 43b16: 0680 ffff ffe8 addil #-24,%d0 if ( parentpathlen == 0 ) 43b1c: 4a85 tstl %d5 43b1e: 6616 bnes 43b36 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 43b20: 2f00 movel %d0,%sp@- 43b22: 486e fffc pea %fp@(-4) const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 43b26: 4204 clrb %d4 */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 43b28: 2f0a movel %a2,%sp@- 43b2a: 4eb9 0004 3c20 jsr 43c20 43b30: 4fef 000c lea %sp@(12),%sp 43b34: 601e bras 43b54 else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 43b36: 42a7 clrl %sp@- 43b38: 2f00 movel %d0,%sp@- 43b3a: 4878 0002 pea 2 43b3e: 2f05 movel %d5,%sp@- 43b40: 2f0a movel %a2,%sp@- 43b42: 4eb9 0004 2d44 jsr 42d44 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 43b48: 4fef 0014 lea %sp@(20),%sp 43b4c: 4a80 tstl %d0 43b4e: 6600 00c2 bnew 43c12 return -1; free_parentloc = true; 43b52: 7801 moveq #1,%d4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 43b54: 4878 0014 pea 14 43b58: 260e movel %fp,%d3 43b5a: 0683 ffff ffe8 addil #-24,%d3 43b60: 240e movel %fp,%d2 43b62: 0682 ffff ffd4 addil #-44,%d2 name = pathname + parentpathlen; 43b68: d5c5 addal %d5,%a2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 43b6a: 47f9 0004 d7f4 lea 4d7f4 ,%a3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 43b70: 2f03 movel %d3,%sp@- 43b72: 2f02 movel %d2,%sp@- 43b74: 4eb9 0004 ccfc jsr 4ccfc name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 43b7a: 2f0a movel %a2,%sp@- 43b7c: 4e93 jsr %a3@ 43b7e: 2e80 movel %d0,%sp@ 43b80: 2f0a movel %a2,%sp@- 43b82: 4eb9 0004 2dd2 jsr 42dd2 43b88: d5c0 addal %d0,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 43b8a: 2f0a movel %a2,%sp@- 43b8c: 4e93 jsr %a3@ 43b8e: 4297 clrl %sp@ 43b90: 2f02 movel %d2,%sp@- 43b92: 42a7 clrl %sp@- 43b94: 2f00 movel %d0,%sp@- 43b96: 2f0a movel %a2,%sp@- 43b98: 4eb9 0004 2cd4 jsr 42cd4 0, &loc, false ); if ( result != 0 ) { 43b9e: 4fef 0028 lea %sp@(40),%sp 43ba2: 4a80 tstl %d0 43ba4: 6710 beqs 43bb6 if ( free_parentloc ) 43ba6: 4a04 tstb %d4 43ba8: 6768 beqs 43c12 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 43baa: 2f03 movel %d3,%sp@- 43bac: 4eb9 0004 2e10 jsr 42e10 43bb2: 588f addql #4,%sp 43bb4: 605c bras 43c12 } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 43bb6: 206e ffe0 moveal %fp@(-32),%a0 43bba: 45f9 0004 2e10 lea 42e10 ,%a2 43bc0: 2f02 movel %d2,%sp@- 43bc2: 2068 0010 moveal %a0@(16),%a0 43bc6: 4e90 jsr %a0@ 43bc8: 588f addql #4,%sp 43bca: 7201 moveq #1,%d1 43bcc: b280 cmpl %d0,%d1 43bce: 671e beqs 43bee rtems_filesystem_freenode( &loc ); 43bd0: 2f02 movel %d2,%sp@- 43bd2: 4e92 jsr %a2@ if ( free_parentloc ) 43bd4: 588f addql #4,%sp 43bd6: 4a04 tstb %d4 43bd8: 6706 beqs 43be0 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 43bda: 2f03 movel %d3,%sp@- 43bdc: 4e92 jsr %a2@ 43bde: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 43be0: 4eb9 0004 c450 jsr 4c450 <__errno> 43be6: 2040 moveal %d0,%a0 43be8: 7014 moveq #20,%d0 43bea: 2080 movel %d0,%a0@ 43bec: 6024 bras 43c12 /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 43bee: 2f02 movel %d2,%sp@- 43bf0: 206e ffdc moveal %fp@(-36),%a0 43bf4: 2f03 movel %d3,%sp@- 43bf6: 2068 0034 moveal %a0@(52),%a0 43bfa: 4e90 jsr %a0@ 43bfc: 2a00 movel %d0,%d5 rtems_filesystem_freenode( &loc ); 43bfe: 2f02 movel %d2,%sp@- 43c00: 4e92 jsr %a2@ if ( free_parentloc ) 43c02: 4fef 000c lea %sp@(12),%sp 43c06: 4a04 tstb %d4 43c08: 670a beqs 43c14 rtems_filesystem_freenode( &parentloc ); 43c0a: 2f03 movel %d3,%sp@- 43c0c: 4e92 jsr %a2@ 43c0e: 588f addql #4,%sp 43c10: 6002 bras 43c14 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; 43c12: 7aff moveq #-1,%d5 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 43c14: 2005 movel %d5,%d0 43c16: 4cee 0c3c ffbc moveml %fp@(-68),%d2-%d5/%a2-%a3 43c1c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c43c : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 4c43c: 4e56 fffc linkw %fp,#-4 4c440: 2f0a movel %a2,%sp@- Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); 4c442: 486e fffc pea %fp@(-4) 4c446: 2f2e 0008 movel %fp@(8),%sp@- 4c44a: 4879 0005 f9ec pea 5f9ec <_Barrier_Information> 4c450: 4eb9 0004 8aa4 jsr 48aa4 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4c456: 4fef 000c lea %sp@(12),%sp 4c45a: 2440 moveal %d0,%a2 4c45c: 4aae fffc tstl %fp@(-4) 4c460: 663a bnes 4c49c <== NEVER TAKEN case OBJECTS_LOCAL: _CORE_barrier_Flush( 4c462: 4878 0002 pea 2 4c466: 42a7 clrl %sp@- 4c468: 486a 0014 pea %a2@(20) 4c46c: 4eb9 0004 9be8 jsr 49be8 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 4c472: 2f0a movel %a2,%sp@- 4c474: 4879 0005 f9ec pea 5f9ec <_Barrier_Information> 4c47a: 4eb9 0004 86cc jsr 486cc <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 4c480: 2f0a movel %a2,%sp@- 4c482: 4879 0005 f9ec pea 5f9ec <_Barrier_Information> 4c488: 4eb9 0004 8940 jsr 48940 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4c48e: 4eb9 0004 95d6 jsr 495d6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4c494: 4fef 001c lea %sp@(28),%sp 4c498: 4280 clrl %d0 4c49a: 6002 bras 4c49e #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4c49c: 7004 moveq #4,%d0 } 4c49e: 246e fff8 moveal %fp@(-8),%a2 4c4a2: 4e5e unlk %fp ... =============================================================================== 000464a4 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 464a4: 4e56 ffe0 linkw %fp,#-32 464a8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( 464ac: 260e movel %fp,%d3 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 464ae: 47f9 0004 6a28 lea 46a28 <_Chain_Get>,%a3 464b4: 5983 subql #4,%d3 464b6: 45f9 0004 5930 lea 45930 ,%a2 rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 464bc: 2c2e 0008 movel %fp@(8),%d6 464c0: 2a2e 000c movel %fp@(12),%d5 464c4: 282e 0010 movel %fp@(16),%d4 464c8: 6012 bras 464dc while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( 464ca: 2f03 movel %d3,%sp@- 464cc: 2f04 movel %d4,%sp@- 464ce: 42a7 clrl %sp@- 464d0: 2f05 movel %d5,%sp@- 464d2: 4e92 jsr %a2@ ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 464d4: 4fef 0010 lea %sp@(16),%sp 464d8: 4a80 tstl %d0 464da: 660c bnes 464e8 <== ALWAYS TAKEN 464dc: 2f06 movel %d6,%sp@- 464de: 4e93 jsr %a3@ sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 464e0: 588f addql #4,%sp 464e2: 2400 movel %d0,%d2 464e4: 67e4 beqs 464ca 464e6: 4280 clrl %d0 timeout, &out ); } *node_ptr = node; 464e8: 206e 0014 moveal %fp@(20),%a0 464ec: 2082 movel %d2,%a0@ return sc; } 464ee: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 464f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f3b8 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 4f3b8: 4e56 fff8 linkw %fp,#-8 4f3bc: 2f0a movel %a2,%sp@- 4f3be: 246e 0008 moveal %fp@(8),%a2 4f3c2: 2f02 movel %d2,%sp@- if ( !time ) 4f3c4: 4a8a tstl %a2 4f3c6: 673c beqs 4f404 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 4f3c8: 4a39 0007 5f64 tstb 75f64 <_TOD_Is_set> 4f3ce: 6738 beqs 4f408 <== NEVER TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4f3d0: 203c 0000 0700 movel #1792,%d0 4f3d6: 40c2 movew %sr,%d2 4f3d8: 8082 orl %d2,%d0 4f3da: 46c0 movew %d0,%sr _TOD_Get( &now ); 4f3dc: 486e fff8 pea %fp@(-8) 4f3e0: 4eb9 0005 3444 jsr 53444 <_TOD_Get> _ISR_Enable(level); 4f3e6: 46c2 movew %d2,%sr useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 4f3e8: 243c 0000 03e8 movel #1000,%d2 return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 4f3ee: 588f addql #4,%sp _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 4f3f0: 202e fffc movel %fp@(-4),%d0 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 4f3f4: 4c42 0800 remsl %d2,%d0,%d0 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 4f3f8: 24ae fff8 movel %fp@(-8),%a2@ time->tv_usec = useconds; 4f3fc: 2540 0004 movel %d0,%a2@(4) 4f400: 4280 clrl %d0 4f402: 6006 bras 4f40a rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) return RTEMS_INVALID_ADDRESS; 4f404: 7009 moveq #9,%d0 4f406: 6002 bras 4f40a if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 4f408: 700b moveq #11,%d0 _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 4f40a: 242e fff0 movel %fp@(-16),%d2 4f40e: 246e fff4 moveal %fp@(-12),%a2 4f412: 4e5e unlk %fp ... =============================================================================== 0004bc34 : [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { 4bc34: 4e56 0000 linkw %fp,#0 4bc38: 202e 0008 movel %fp@(8),%d0 4bc3c: 2f02 movel %d2,%sp@- if (sc == RTEMS_SUCCESSFUL) { 4bc3e: 4a80 tstl %d0 4bc40: 6722 beqs 4bc64 return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { 4bc42: 721c moveq #28,%d1 4bc44: b280 cmpl %d0,%d1 4bc46: 650c bcss 4bc54 <== NEVER TAKEN eno = status_code_to_errno [sc]; 4bc48: 41f9 0005 b2d2 lea 5b2d2 ,%a0 4bc4e: 2430 0c00 movel %a0@(00000000,%d0:l:4),%d2 4bc52: 6002 bras 4bc56 int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; 4bc54: 7416 moveq #22,%d2 <== NOT EXECUTED if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { eno = status_code_to_errno [sc]; } errno = eno; 4bc56: 4eb9 0004 bca0 jsr 4bca0 <__errno> 4bc5c: 2040 moveal %d0,%a0 return -1; 4bc5e: 70ff moveq #-1,%d0 if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { eno = status_code_to_errno [sc]; } errno = eno; 4bc60: 2082 movel %d2,%a0@ return -1; 4bc62: 6002 bras 4bc66 }; int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; 4bc64: 4280 clrl %d0 errno = eno; return -1; } } 4bc66: 242e fffc movel %fp@(-4),%d2 4bc6a: 4e5e unlk %fp ... =============================================================================== 00049c3a : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 49c3a: 4e56 fff8 linkw %fp,#-8 49c3e: 202e 0008 movel %fp@(8),%d0 find_arg fa = { 49c42: 42ae fffc clrl %fp@(-4) 49c46: 2d40 fff8 movel %d0,%fp@(-8) .type = type, .mount_h = NULL }; if ( type != NULL ) { 49c4a: 6710 beqs 49c5c <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 49c4c: 486e fff8 pea %fp@(-8) 49c50: 487a ff16 pea %pc@(49b68 ) 49c54: 4eb9 0004 9bd2 jsr 49bd2 49c5a: 508f addql #8,%sp } return fa.mount_h; } 49c5c: 202e fffc movel %fp@(-4),%d0 49c60: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042560 : /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 42560: 7012 moveq #18,%d0 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 42562: 4e56 ffe0 linkw %fp,#-32 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 42566: 2079 0005 be64 moveal 5be64 ,%a0 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 4256c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 42570: 2140 002c movel %d0,%a0@(44) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 42574: 4ab9 0005 a32e tstl 5a32e 4257a: 6608 bnes 42584 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); 4257c: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 42582: 602c bras 425b0 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 42584: 2079 0005 bc1c moveal 5bc1c ,%a0 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 4258a: 42a7 clrl %sp@- 4258c: 2f28 0004 movel %a0@(4),%sp@- 42590: 2f10 movel %a0@,%sp@- 42592: 2f28 000c movel %a0@(12),%sp@- 42596: 2f28 0008 movel %a0@(8),%sp@- 4259a: 4eb9 0004 2ef8 jsr 42ef8 if ( status == -1 ) 425a0: 4fef 0014 lea %sp@(20),%sp 425a4: 72ff moveq #-1,%d1 425a6: b280 cmpl %d0,%d1 425a8: 660c bnes 425b6 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); 425aa: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 425b0: 4eb9 0004 5ef8 jsr 45ef8 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 425b6: 2079 0005 be64 moveal 5be64 ,%a0 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 425bc: 240e movel %fp,%d2 425be: 0682 ffff ffec addil #-20,%d2 425c4: 47f9 0004 290c lea 4290c ,%a3 rtems_filesystem_root = loc; 425ca: 45f9 0004 c54c lea 4c54c ,%a2 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 425d0: 4240 clrw %d0 425d2: 3140 0030 movew %d0,%a0@(48) * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 425d6: 42a7 clrl %sp@- 425d8: 2f02 movel %d2,%sp@- 425da: 42a7 clrl %sp@- 425dc: 4878 0001 pea 1 425e0: 4879 0005 a9de pea 5a9de 425e6: 4e93 jsr %a3@ rtems_filesystem_root = loc; 425e8: 4878 0014 pea 14 425ec: 2079 0005 be64 moveal 5be64 ,%a0 425f2: 41e8 0018 lea %a0@(24),%a0 425f6: 2f02 movel %d2,%sp@- 425f8: 2f08 movel %a0,%sp@- 425fa: 4e92 jsr %a2@ /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 425fc: 4fef 001c lea %sp@(28),%sp 42600: 4297 clrl %sp@ 42602: 2f02 movel %d2,%sp@- 42604: 42a7 clrl %sp@- 42606: 4878 0001 pea 1 4260a: 4879 0005 a9de pea 5a9de 42610: 4e93 jsr %a3@ rtems_filesystem_current = loc; 42612: 4878 0014 pea 14 42616: 2039 0005 be64 movel 5be64 ,%d0 4261c: 5880 addql #4,%d0 4261e: 2f02 movel %d2,%sp@- 42620: 2f00 movel %d0,%sp@- 42622: 4e92 jsr %a2@ * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 42624: 4fef 0020 lea %sp@(32),%sp 42628: 4878 01ff pea 1ff 4262c: 4879 0005 a9e0 pea 5a9e0 42632: 4eb9 0004 2d80 jsr 42d80 if ( status != 0 ) 42638: 508f addql #8,%sp 4263a: 4a80 tstl %d0 4263c: 670a beqs 42648 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0003 ); 4263e: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 42644: 6000 ff6a braw 425b0 <== NOT EXECUTED * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 42648: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 4264e: 4e5e unlk %fp ... =============================================================================== 00049bd2 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 49bd2: 4e56 fff0 linkw %fp,#-16 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; 49bd6: 4200 clrb %d0 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 49bd8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 49bdc: 266e 0008 moveal %fp@(8),%a3 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; 49be0: 45f9 0005 a30e lea 5a30e ,%a2 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 49be6: 242e 000c movel %fp@(12),%d2 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 49bea: 600a bras 49bf6 stop = (*routine)( table_entry, routine_arg ); 49bec: 2f02 movel %d2,%sp@- 49bee: 2f0a movel %a2,%sp@- ++table_entry; 49bf0: 508a addql #8,%a2 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { stop = (*routine)( table_entry, routine_arg ); 49bf2: 4e93 jsr %a3@ ++table_entry; 49bf4: 508f addql #8,%sp { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 49bf6: 4a92 tstl %a2@ 49bf8: 6706 beqs 49c00 49bfa: 4a00 tstb %d0 49bfc: 67ee beqs 49bec 49bfe: 6030 bras 49c30 49c00: 1600 moveb %d0,%d3 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 49c02: 662c bnes 49c30 rtems_libio_lock(); 49c04: 4eba ff9a jsr %pc@(49ba0 ) } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 49c08: 2479 0005 be6c moveal 5be6c ,%a2 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 49c0e: 600e bras 49c1e !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 49c10: 2f02 movel %d2,%sp@- 49c12: 486a 0008 pea %a2@(8) 49c16: 4e93 jsr %a3@ } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 49c18: 2452 moveal %a2@,%a2 if ( !stop ) { rtems_libio_lock(); for ( node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; node = rtems_chain_next( node ) 49c1a: 508f addql #8,%sp ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 49c1c: 1600 moveb %d0,%d3 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 49c1e: b5fc 0005 be70 cmpal #376432,%a2 49c24: 6704 beqs 49c2a node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; 49c26: 4a03 tstb %d3 49c28: 67e6 beqs 49c10 <== ALWAYS TAKEN ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); } rtems_libio_unlock(); 49c2a: 4eba ff90 jsr %pc@(49bbc ) 49c2e: 1003 moveb %d3,%d0 } return stop; } 49c30: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 49c36: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042eae : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 42eae: 4e56 fff0 linkw %fp,#-16 42eb2: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42eb6: 266e 0008 moveal %fp@(8),%a3 42eba: 242e 000c movel %fp@(12),%d2 rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); 42ebe: 4eba ffbc jsr %pc@(42e7c ) stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 42ec2: 2479 0005 bd48 moveal 5bd48 ,%a2 rtems_per_filesystem_mount_routine routine, void *routine_arg ) { rtems_chain_node *node = NULL; bool stop = false; 42ec8: 4200 clrb %d0 rtems_libio_lock(); for ( 42eca: 600a bras 42ed6 node = rtems_chain_next( node ) ) { const rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) node; stop = (*routine)( mt_entry, routine_arg ); 42ecc: 2f02 movel %d2,%sp@- 42ece: 2f0a movel %a2,%sp@- 42ed0: 4e93 jsr %a3@ } rtems_libio_unlock(); return stop; } 42ed2: 2452 moveal %a2@,%a2 rtems_libio_lock(); for ( node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; node = rtems_chain_next( node ) 42ed4: 508f addql #8,%sp { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 42ed6: b5fc 0005 bd4c cmpal #376140,%a2 42edc: 6704 beqs 42ee2 node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; 42ede: 4a00 tstb %d0 42ee0: 67ea beqs 42ecc <== ALWAYS TAKEN const rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) node; stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); 42ee2: 2d40 fffc movel %d0,%fp@(-4) 42ee6: 4eba ffb0 jsr %pc@(42e98 ) return stop; } 42eea: 202e fffc movel %fp@(-4),%d0 42eee: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 42ef4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004299a : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 4299a: 4e56 fff0 linkw %fp,#-16 4299e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 429a2: 262e 000c movel %fp@(12),%d3 /* * Eat any separators at start of the path. */ int stripped = 0; 429a6: 4282 clrl %d2 while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 429a8: 47f9 0004 3728 lea 43728 ,%a3 ) { /* * Eat any separators at start of the path. */ int stripped = 0; 429ae: 246e 0008 moveal %fp@(8),%a2 while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 429b2: 6002 bras 429b6 { pathname++; pathnamelen--; stripped++; 429b4: 5282 addql #1,%d2 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 429b6: 101a moveb %a2@+,%d0 429b8: 6710 beqs 429ca <== NEVER TAKEN 429ba: b483 cmpl %d3,%d2 429bc: 670c beqs 429ca <== NEVER TAKEN 429be: 49c0 extbl %d0 429c0: 2f00 movel %d0,%sp@- 429c2: 4e93 jsr %a3@ 429c4: 588f addql #4,%sp 429c6: 4a80 tstl %d0 429c8: 66ea bnes 429b4 pathname++; pathnamelen--; stripped++; } return stripped; } 429ca: 2002 movel %d2,%d0 429cc: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 429d2: 4e5e unlk %fp ... =============================================================================== 000432a6 : int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { 432a6: 4e56 0000 linkw %fp,#0 432aa: 2f0a movel %a2,%sp@- 432ac: 2f02 movel %d2,%sp@- * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); 432ae: 4878 0008 pea 8 } return 0; } int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { 432b2: 242e 000c movel %fp@(12),%d2 * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); 432b6: 4eb9 0004 368c jsr 4368c *key = new_key; 432bc: 206e 0008 moveal %fp@(8),%a0 * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); 432c0: 2440 moveal %d0,%a2 *key = new_key; 432c2: 2080 movel %d0,%a0@ "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); 432c4: 2f02 movel %d2,%sp@- 432c6: 2f00 movel %d0,%sp@- * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); *key = new_key; new_key->val = NULL; 432c8: 4292 clrl %a2@ "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); 432ca: 42a7 clrl %sp@- */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); *key = new_key; new_key->val = NULL; new_key->dtor = dtor; 432cc: 2542 0004 movel %d2,%a2@(4) "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); 432d0: 4eb9 0004 67cc jsr 467cc if ( status == RTEMS_SUCCESSFUL ) 432d6: 4fef 0010 lea %sp@(16),%sp 432da: 4a80 tstl %d0 432dc: 670e beqs 432ec <== ALWAYS TAKEN return 0; free( new_key ); 432de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 432e0: 4eb9 0004 313c jsr 4313c <== NOT EXECUTED return -1; 432e6: 588f addql #4,%sp <== NOT EXECUTED 432e8: 70ff moveq #-1,%d0 <== NOT EXECUTED 432ea: 6002 bras 432ee <== NOT EXECUTED #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); if ( status == RTEMS_SUCCESSFUL ) return 0; 432ec: 4280 clrl %d0 free( new_key ); return -1; } 432ee: 242e fff8 movel %fp@(-8),%d2 432f2: 246e fffc moveal %fp@(-4),%a2 432f6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004330a : int rtems_gxx_key_delete (__gthread_key_t key) { 4330a: 4e56 0000 linkw %fp,#0 4330e: 2f0a movel %a2,%sp@- 43310: 246e 0008 moveal %fp@(8),%a2 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: delete key=%x\n", key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_delete( RTEMS_SELF, (void **)key ); 43314: 2f0a movel %a2,%sp@- 43316: 42a7 clrl %sp@- 43318: 4eb9 0004 6860 jsr 46860 if ( status == RTEMS_SUCCESSFUL ) { 4331e: 508f addql #8,%sp 43320: 4a80 tstl %d0 43322: 660e bnes 43332 <== NEVER TAKEN /* Hmm - hopefully all tasks using this key have gone away... */ if ( key ) free( *(void **)key ); 43324: 4a8a tstl %a2 43326: 670a beqs 43332 <== NEVER TAKEN 43328: 2f12 movel %a2@,%sp@- 4332a: 4eb9 0004 313c jsr 4313c 43330: 588f addql #4,%sp return 0; } key = NULL; return 0; } 43332: 246e fffc moveal %fp@(-4),%a2 43336: 4280 clrl %d0 43338: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043248 : /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { 43248: 4e56 fffc linkw %fp,#-4 4324c: 2f0a movel %a2,%sp@- 4324e: 246e 0008 moveal %fp@(8),%a2 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { 43252: 2012 movel %a2@,%d0 /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { 43254: 2f02 movel %d2,%sp@- #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { 43256: 4a80 tstl %d0 43258: 663e bnes 43298 rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 4325a: 486e fffc pea %fp@(-4) 4325e: 4878 0100 pea 100 43262: 4878 0100 pea 100 43266: 4eb9 0004 65f4 jsr 465f4 if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { 4326c: 2412 movel %a2@,%d2 4326e: 4fef 000c lea %sp@(12),%sp 43272: 6604 bnes 43278 <== NEVER TAKEN *(volatile __gthread_once_t *)once = 1; 43274: 7001 moveq #1,%d0 43276: 2480 movel %d0,%a2@ } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 43278: 486e fffc pea %fp@(-4) 4327c: 4878 0100 pea 100 43280: 2f2e fffc movel %fp@(-4),%sp@- 43284: 4eb9 0004 65f4 jsr 465f4 if ( o == 0 ) 4328a: 4fef 000c lea %sp@(12),%sp 4328e: 4a82 tstl %d2 43290: 6606 bnes 43298 <== NEVER TAKEN (*func)(); 43292: 206e 000c moveal %fp@(12),%a0 43296: 4e90 jsr %a0@ } return 0; } 43298: 242e fff4 movel %fp@(-12),%d2 4329c: 4280 clrl %d0 4329e: 246e fff8 moveal %fp@(-8),%a2 432a2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043398 : int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { 43398: 4e56 0000 linkw %fp,#0 4339c: 2f0a movel %a2,%sp@- 4339e: 246e 0008 moveal %fp@(8),%a2 rtems_task_self() ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); 433a2: 2f2a 0004 movel %a2@(4),%sp@- 433a6: 2f0a movel %a2,%sp@- 433a8: 42a7 clrl %sp@- 433aa: 4eb9 0004 67cc jsr 467cc if ( status == RTEMS_SUCCESSFUL ) { 433b0: 4fef 000c lea %sp@(12),%sp 433b4: 4a80 tstl %d0 433b6: 6606 bnes 433be <== NEVER TAKEN /* now let's set the proper value */ key->val = (void *)ptr; 433b8: 24ae 000c movel %fp@(12),%a2@ return 0; 433bc: 6002 bras 433c0 } return -1; 433be: 70ff moveq #-1,%d0 <== NOT EXECUTED } 433c0: 246e fffc moveal %fp@(-4),%a2 433c4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046f24 : size_t size, uintptr_t alignment, uintptr_t boundary ) { if ( 46f24: 7003 moveq #3,%d0 void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { 46f26: 4e56 0000 linkw %fp,#0 if ( 46f2a: b0b9 0006 2f6c cmpl 62f6c <_System_state_Current>,%d0 46f30: 660a bnes 46f3c <== NEVER TAKEN _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() 46f32: 4eb9 0004 6054 jsr 46054 46f38: 4a00 tstb %d0 46f3a: 6724 beqs 46f60 ) { return NULL; } malloc_deferred_frees_process(); 46f3c: 4eb9 0004 6092 jsr 46092 /* FIXME: Statistics, boundary checks */ return _Protected_heap_Allocate_aligned_with_boundary( 46f42: 2f2e 0010 movel %fp@(16),%sp@- 46f46: 2f2e 000c movel %fp@(12),%sp@- 46f4a: 2f2e 0008 movel %fp@(8),%sp@- 46f4e: 2f39 0006 0c30 movel 60c30 ,%sp@- 46f54: 4eb9 0004 b468 jsr 4b468 <_Protected_heap_Allocate_aligned_with_boundary> 46f5a: 4fef 0010 lea %sp@(16),%sp 46f5e: 6002 bras 46f62 { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() ) { return NULL; 46f60: 4280 clrl %d0 RTEMS_Malloc_Heap, size, alignment, boundary ); } 46f62: 4e5e unlk %fp ... =============================================================================== 00045e7a : 45e7a: 7002 moveq #2,%d0 } void rtems_initialize_start_multitasking(void) { 45e7c: 4e56 0000 linkw %fp,#0 ****** APPLICATION RUNS HERE ****** ****** RETURNS WHEN SYSTEM IS SHUT DOWN ****** ******************************************************************* ******************************************************************* *******************************************************************/ } 45e80: 4e5e unlk %fp 45e82: 23c0 0005 d6a0 movel %d0,5d6a0 <_System_state_Current> void rtems_initialize_start_multitasking(void) { _System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING ); _Thread_Start_multitasking(); 45e88: 4ef9 0004 8294 jmp 48294 <_Thread_Start_multitasking> ... =============================================================================== 000424d0 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 424d0: 4e56 ffd4 linkw %fp,#-44 424d4: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 424d8: 242e 0008 movel %fp@(8),%d2 IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( 424dc: 49f9 0004 d0f8 lea 4d0f8 ,%a4 424e2: 260e movel %fp,%d3 424e4: 0683 ffff ffec addil #-20,%d3 424ea: 2f02 movel %d2,%sp@- rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 424ec: 246e 000c moveal %fp@(12),%a2 IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( 424f0: 4e94 jsr %a4@ 424f2: 7201 moveq #1,%d1 424f4: 2e81 movel %d1,%sp@ 424f6: 2f03 movel %d3,%sp@- 424f8: 42a7 clrl %sp@- 424fa: 2f00 movel %d0,%sp@- 424fc: 2f02 movel %d2,%sp@- 424fe: 4eb9 0004 290c jsr 4290c name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; node_type = (*loc.ops->node_type_h)( &loc ); 42504: 206e fff8 moveal %fp@(-8),%a0 IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( 42508: 2800 movel %d0,%d4 name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; node_type = (*loc.ops->node_type_h)( &loc ); 4250a: 2f03 movel %d3,%sp@- int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; 4250c: 266e ffec moveal %fp@(-20),%a3 node_type = (*loc.ops->node_type_h)( &loc ); 42510: 2068 0010 moveal %a0@(16),%a0 42514: 4e90 jsr %a0@ if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 42516: 4fef 0018 lea %sp@(24),%sp 4251a: 4a84 tstl %d4 4251c: 6606 bnes 42524 <== NEVER TAKEN 4251e: 7202 moveq #2,%d1 42520: b280 cmpl %d0,%d1 42522: 6710 beqs 42534 rtems_filesystem_freenode( &loc ); 42524: 486e ffec pea %fp@(-20) 42528: 4eb9 0004 29d8 jsr 429d8 return RTEMS_UNSATISFIED; 4252e: 588f addql #4,%sp 42530: 700d moveq #13,%d0 42532: 6022 bras 42556 } device_info->device_name = (char *) name; 42534: 2482 movel %d2,%a2@ device_info->device_name_length = strlen( name ); 42536: 2f02 movel %d2,%sp@- 42538: 4e94 jsr %a4@ 4253a: 2540 0004 movel %d0,%a2@(4) device_info->major = the_jnode->info.device.major; 4253e: 256b 004c 0008 movel %a3@(76),%a2@(8) device_info->minor = the_jnode->info.device.minor; 42544: 256b 0050 000c movel %a3@(80),%a2@(12) rtems_filesystem_freenode( &loc ); 4254a: 2e83 movel %d3,%sp@ 4254c: 4eb9 0004 29d8 jsr 429d8 return RTEMS_SUCCESSFUL; 42552: 588f addql #4,%sp 42554: 4280 clrl %d0 } 42556: 4cee 1c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a4 4255c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047d70 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 47d70: 4e56 fff0 linkw %fp,#-16 47d74: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 47d78: 286e 0008 moveal %fp@(8),%a4 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 47d7c: 4a8c tstl %a4 47d7e: 673c beqs 47dbc <== NEVER TAKEN 47d80: 45f9 0005 f988 lea 5f988 <_Objects_Information_table+0x4>,%a2 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) 47d86: 205a moveal %a2@+,%a0 47d88: 4a88 tstl %a0 47d8a: 6728 beqs 47db4 continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 47d8c: 2668 0004 moveal %a0@(4),%a3 if ( !information ) 47d90: 4a8b tstl %a3 47d92: 6720 beqs 47db4 47d94: 7401 moveq #1,%d2 47d96: 6012 bras 47daa continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 47d98: 206b 0018 moveal %a3@(24),%a0 47d9c: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !the_thread ) 47da0: 6706 beqs 47da8 <== NEVER TAKEN continue; (*routine)(the_thread); 47da2: 2f00 movel %d0,%sp@- 47da4: 4e94 jsr %a4@ 47da6: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 47da8: 5282 addql #1,%d2 47daa: 4280 clrl %d0 47dac: 302b 000e movew %a3@(14),%d0 47db0: b082 cmpl %d2,%d0 47db2: 64e4 bccs 47d98 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 47db4: b5fc 0005 f994 cmpal #391572,%a2 47dba: 66ca bnes 47d86 (*routine)(the_thread); } } } 47dbc: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 47dc2: 4e5e unlk %fp ... =============================================================================== 00049a7a : */ void rtems_libio_free( rtems_libio_t *iop ) { 49a7a: 4e56 0000 linkw %fp,#0 49a7e: 2f0a movel %a2,%sp@- 49a80: 246e 0008 moveal %fp@(8),%a2 rtems_libio_lock(); 49a84: 4eba fea2 jsr %pc@(49928 ) if (iop->sem) 49a88: 202a 002c movel %a2@(44),%d0 49a8c: 670a beqs 49a98 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 49a8e: 2f00 movel %d0,%sp@- 49a90: 4eb9 0004 57b8 jsr 457b8 49a96: 588f addql #4,%sp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 49a98: 41f9 0005 d40c lea 5d40c ,%a0 rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 49a9e: 203c ffff feff movel #-257,%d0 iop->data1 = rtems_libio_iop_freelist; 49aa4: 2550 0034 movel %a0@,%a2@(52) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 49aa8: c1aa 0014 andl %d0,%a2@(20) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 49aac: 23ca 0005 d40c movel %a2,5d40c rtems_libio_unlock(); } 49ab2: 246e fffc moveal %fp@(-4),%a2 49ab6: 4e5e unlk %fp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; rtems_libio_unlock(); 49ab8: 6000 fe8a braw 49944 =============================================================================== 00042af8 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 42af8: 4e56 0000 linkw %fp,#0 42afc: 2f02 movel %d2,%sp@- rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 42afe: 2439 0005 bc14 movel 5bc14 ,%d2 42b04: 6744 beqs 42b4a <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 42b06: 4878 0038 pea 38 42b0a: 2f02 movel %d2,%sp@- 42b0c: 4eb9 0004 2654 jsr 42654 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42b12: 508f addql #8,%sp uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 42b14: 23c0 0005 d408 movel %d0,5d408 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42b1a: 6606 bnes 42b22 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 42b1c: 4878 001a pea 1a 42b20: 604e bras 42b70 iop = rtems_libio_iop_freelist = rtems_libio_iops; 42b22: 23c0 0005 d40c movel %d0,5d40c 42b28: 2040 moveal %d0,%a0 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42b2a: 4281 clrl %d1 42b2c: 6004 bras 42b32 iop->data1 = iop + 1; 42b2e: 2148 fffc movel %a0,%a0@(-4) sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42b32: 5281 addql #1,%d1 42b34: 41e8 0038 lea %a0@(56),%a0 42b38: b481 cmpl %d1,%d2 42b3a: 62f2 bhis 42b2e iop->data1 = iop + 1; iop->data1 = NULL; 42b3c: 2202 movel %d2,%d1 42b3e: 2040 moveal %d0,%a0 42b40: e789 lsll #3,%d1 42b42: ed8a lsll #6,%d2 42b44: 9481 subl %d1,%d2 42b46: 42b0 28fc clrl %a0@(fffffffc,%d2:l) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 42b4a: 4879 0005 d410 pea 5d410 42b50: 42a7 clrl %sp@- 42b52: 4878 0054 pea 54 42b56: 4878 0001 pea 1 42b5a: 2f3c 4c42 494f movel #1279412559,%sp@- 42b60: 4eb9 0004 561c jsr 4561c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 42b66: 4fef 0014 lea %sp@(20),%sp 42b6a: 4a80 tstl %d0 42b6c: 6708 beqs 42b76 <== ALWAYS TAKEN rtems_fatal_error_occurred( rc ); 42b6e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42b70: 4eb9 0004 5ef8 jsr 45ef8 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 42b76: 2279 0005 bc10 moveal 5bc10 ,%a1 42b7c: 4a89 tstl %a1 42b7e: 6708 beqs 42b88 <== NEVER TAKEN (* rtems_fs_init_helper)(); } 42b80: 242e fffc movel %fp@(-4),%d2 42b84: 4e5e unlk %fp /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 42b86: 4ed1 jmp %a1@ } 42b88: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 42b8c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043eb0 : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 43eb0: 4e56 fff8 linkw %fp,#-8 43eb4: 2f03 movel %d3,%sp@- 43eb6: 262e 0008 movel %fp@(8),%d3 43eba: 2f02 movel %d2,%sp@- rtems_id current_task_id; /* * get current task id */ current_task_id = rtems_task_self(); 43ebc: 4eb9 0004 6534 jsr 46534 43ec2: 2400 movel %d0,%d2 /* * If this was an attempt to share the task with self, * if somebody wanted to do it... Lets tell them, its shared */ if( task_id == current_task_id ) 43ec4: b083 cmpl %d3,%d0 43ec6: 6740 beqs 43f08 <== NEVER TAKEN return RTEMS_SUCCESSFUL; /* * Try to get the requested user environment */ sc = rtems_task_variable_get( 43ec8: 486e fffc pea %fp@(-4) 43ecc: 4879 0005 c65c pea 5c65c 43ed2: 2f03 movel %d3,%sp@- 43ed4: 4eb9 0004 6688 jsr 46688 (void*)&shared_user_env ); /* * If it was not successful, return the error code */ if (sc != RTEMS_SUCCESSFUL) 43eda: 4fef 000c lea %sp@(12),%sp 43ede: 4a80 tstl %d0 43ee0: 6628 bnes 43f0a <== NEVER TAKEN * If we have a current environment in place, we need to * free it, since we will be sharing the variable with the * shared_user_env */ if (rtems_current_user_env->task_id==current_task_id) { 43ee2: 2079 0005 c65c moveal 5c65c ,%a0 43ee8: b490 cmpl %a0@,%d2 43eea: 6610 bnes 43efc <== NEVER TAKEN rtems_user_env_t *tmp = rtems_current_user_env; free_user_env( tmp ); 43eec: 2f08 movel %a0,%sp@- 43eee: 2d40 fff8 movel %d0,%fp@(-8) 43ef2: 4eba fe70 jsr %pc@(43d64 ) 43ef6: 202e fff8 movel %fp@(-8),%d0 43efa: 588f addql #4,%sp } /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 43efc: 41ee fffc lea %fp@(-4),%a0 43f00: 23d0 0005 c65c movel %a0@,5c65c /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 43f06: 6002 bras 43f0a * If this was an attempt to share the task with self, * if somebody wanted to do it... Lets tell them, its shared */ if( task_id == current_task_id ) return RTEMS_SUCCESSFUL; 43f08: 4280 clrl %d0 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; } 43f0a: 242e fff0 movel %fp@(-16),%d2 43f0e: 262e fff4 movel %fp@(-12),%d3 43f12: 4e5e unlk %fp ... =============================================================================== 0004999a : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4999a: 7006 moveq #6,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4999c: 4e56 0000 linkw %fp,#0 499a0: 222e 0008 movel %fp@(8),%d1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 499a4: c081 andl %d1,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 499a6: 2f02 movel %d2,%sp@- uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 499a8: 7406 moveq #6,%d2 499aa: b480 cmpl %d0,%d2 499ac: 6710 beqs 499be <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 499ae: 0801 0001 btst #1,%d1 499b2: 660e bnes 499c2 <== ALWAYS TAKEN ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 499b4: 44c1 movew %d1,%ccr <== NOT EXECUTED 499b6: 57c0 seq %d0 <== NOT EXECUTED 499b8: 49c0 extbl %d0 <== NOT EXECUTED 499ba: 4480 negl %d0 <== NOT EXECUTED 499bc: 6006 bras 499c4 <== NOT EXECUTED 499be: 7002 moveq #2,%d0 <== NOT EXECUTED 499c0: 6002 bras 499c4 <== NOT EXECUTED } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { fcntl_flags |= O_RDONLY; 499c2: 4280 clrl %d0 } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 499c4: 0801 0000 btst #0,%d1 499c8: 6704 beqs 499ce fcntl_flags |= O_NONBLOCK; 499ca: 08c0 000e bset #14,%d0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 499ce: 0801 0009 btst #9,%d1 499d2: 6704 beqs 499d8 fcntl_flags |= O_APPEND; 499d4: 7408 moveq #8,%d2 499d6: 8082 orl %d2,%d0 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 499d8: 0801 000a btst #10,%d1 499dc: 6704 beqs 499e2 fcntl_flags |= O_CREAT; 499de: 08c0 0009 bset #9,%d0 } return fcntl_flags; } 499e2: 241f movel %sp@+,%d2 499e4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000463a4 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 463a4: 4e56 fffc linkw %fp,#-4 463a8: 2f03 movel %d3,%sp@- 463aa: 2f02 movel %d2,%sp@- uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 463ac: 486e fffc pea %fp@(-4) 463b0: 2f2e 0008 movel %fp@(8),%sp@- 463b4: 2f39 0006 0c30 movel 60c30 ,%sp@- 463ba: 4eb9 0004 b520 jsr 4b520 <_Protected_heap_Get_block_size> 463c0: 4fef 000c lea %sp@(12),%sp 463c4: 4a00 tstb %d0 463c6: 671a beqs 463e2 <== NEVER TAKEN MSBUMP(lifetime_freed, size); 463c8: 262e fffc movel %fp@(-4),%d3 463cc: 4282 clrl %d2 463ce: d7b9 0006 2d14 addl %d3,62d14 463d4: 2039 0006 2d10 movel 62d10 ,%d0 463da: d182 addxl %d2,%d0 463dc: 23c0 0006 2d10 movel %d0,62d10 } } 463e2: 242e fff4 movel %fp@(-12),%d2 463e6: 262e fff8 movel %fp@(-8),%d3 463ea: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000463ee : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 463ee: 4e56 fffc linkw %fp,#-4 463f2: 202e 0008 movel %fp@(8),%d0 463f6: 2f03 movel %d3,%sp@- uintptr_t actual_size = 0; 463f8: 42ae fffc clrl %fp@(-4) } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 463fc: 2f02 movel %d2,%sp@- uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 463fe: 4a80 tstl %d0 46400: 674c beqs 4644e <== NEVER TAKEN return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 46402: 486e fffc pea %fp@(-4) MSBUMP(lifetime_allocated, actual_size); 46406: 4282 clrl %d2 rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 46408: 2f00 movel %d0,%sp@- 4640a: 2f39 0006 0c30 movel 60c30 ,%sp@- 46410: 4eb9 0004 b520 jsr 4b520 <_Protected_heap_Get_block_size> MSBUMP(lifetime_allocated, actual_size); 46416: 262e fffc movel %fp@(-4),%d3 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 4641a: 4fef 000c lea %sp@(12),%sp if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 4641e: 2039 0006 2d08 movel 62d08 ,%d0 46424: d6b9 0006 2d0c addl 62d0c ,%d3 4642a: d580 addxl %d0,%d2 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 4642c: 2003 movel %d3,%d0 4642e: 90b9 0006 2d14 subl 62d14 ,%d0 if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 46434: 23c2 0006 2d08 movel %d2,62d08 4643a: 23c3 0006 2d0c movel %d3,62d0c current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 46440: b0b9 0006 2d04 cmpl 62d04 ,%d0 46446: 6306 blss 4644e s->max_depth = current_depth; 46448: 23c0 0006 2d04 movel %d0,62d04 } 4644e: 242e fff4 movel %fp@(-12),%d2 46452: 262e fff8 movel %fp@(-8),%d3 46456: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d2d8 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 4d2d8: 4e56 0000 linkw %fp,#0 4d2dc: 2f0a movel %a2,%sp@- 4d2de: 246e 0008 moveal %fp@(8),%a2 4d2e2: 2f02 movel %d2,%sp@- void *return_this; /* * Parameter error checks */ if ( !pointer ) 4d2e4: 4a8a tstl %a2 4d2e6: 6754 beqs 4d33c return EINVAL; *pointer = NULL; 4d2e8: 4292 clrl %a2@ /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4d2ea: 7003 moveq #3,%d0 4d2ec: b0b9 0006 0cc8 cmpl 60cc8 <_System_state_Current>,%d0 4d2f2: 660a bnes 4d2fe <== NEVER TAKEN !malloc_is_system_state_OK() ) 4d2f4: 4eb9 0004 3840 jsr 43840 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4d2fa: 4a00 tstb %d0 4d2fc: 673e beqs 4d33c <== NEVER TAKEN return EINVAL; /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4d2fe: 4eb9 0004 387e jsr 4387e Heap_Control *heap, uintptr_t size, uintptr_t alignment ) { return 4d304: 42a7 clrl %sp@- 4d306: 2f2e 000c movel %fp@(12),%sp@- 4d30a: 2f2e 0010 movel %fp@(16),%sp@- 4d30e: 2f39 0005 f1c0 movel 5f1c0 ,%sp@- 4d314: 4eb9 0004 80c0 jsr 480c0 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 4d31a: 4fef 0010 lea %sp@(16),%sp 4d31e: 2400 movel %d0,%d2 4d320: 671e beqs 4d340 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 4d322: 2079 0005 f966 moveal 5f966 ,%a0 4d328: 4a88 tstl %a0 4d32a: 670a beqs 4d336 (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 4d32c: 2f0a movel %a2,%sp@- 4d32e: 2068 0004 moveal %a0@(4),%a0 4d332: 4e90 jsr %a0@ 4d334: 588f addql #4,%sp *pointer = return_this; 4d336: 2482 movel %d2,%a2@ return 0; 4d338: 4280 clrl %d0 4d33a: 6006 bras 4d342 /* * 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() ) return EINVAL; 4d33c: 7016 moveq #22,%d0 4d33e: 6002 bras 4d342 RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) return ENOMEM; 4d340: 700c moveq #12,%d0 if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(pointer); *pointer = return_this; return 0; } 4d342: 242e fff8 movel %fp@(-8),%d2 4d346: 246e fffc moveal %fp@(-4),%a2 4d34a: 4e5e unlk %fp ... =============================================================================== 0004baf4 : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { 4baf4: 4e56 ff90 linkw %fp,#-112 4baf8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ int success = 0; char *dup_path = strdup(path); 4bafc: 2f2e 0008 movel %fp@(8),%sp@- 4bb00: 4eb9 0004 e040 jsr 4e040 if (dup_path != NULL) { 4bb06: 588f addql #4,%sp int rtems_mkdir(const char *path, mode_t mode) { int success = 0; char *dup_path = strdup(path); 4bb08: 2440 moveal %d0,%a2 if (dup_path != NULL) { 4bb0a: 4a80 tstl %d0 4bb0c: 6700 0122 beqw 4bc30 char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 4bb10: 722f moveq #47,%d1 4bb12: 1012 moveb %a2@,%d0 4bb14: 49c0 extbl %d0 4bb16: b280 cmpl %d0,%d1 4bb18: 6606 bnes 4bb20 ++p; 4bb1a: 47ea 0001 lea %a2@(1),%a3 4bb1e: 6002 bras 4bb22 char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 4bb20: 264a moveal %a2,%a3 } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { if (errno == EEXIST || errno == EISDIR) { if (stat(path, &sb) < 0) { 4bb22: 2c0e movel %fp,%d6 p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; 4bb24: 2a4b moveal %a3,%a5 char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 4bb26: 4283 clrl %d3 4bb28: 7001 moveq #1,%d0 (void)umask(numask); first = 0; } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 4bb2a: 2e3c 0004 3eb0 movel #278192,%d7 if (errno == EEXIST || errno == EISDIR) { 4bb30: 283c 0004 d090 movel #315536,%d4 if (stat(path, &sb) < 0) { 4bb36: 0686 ffff ffba addil #-70,%d6 4bb3c: 2a3c 0004 bc4c movel #310348,%d5 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) (void)umask(oumask); 4bb42: 49f9 0004 bcf0 lea 4bcf0 ,%a4 oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') 4bb48: 121d moveb %a5@+,%d1 4bb4a: 670e beqs 4bb5a last = 1; else if (p[0] != '/') 4bb4c: 49c1 extbl %d1 4bb4e: 742f moveq #47,%d2 4bb50: b481 cmpl %d1,%d2 4bb52: 6600 00b8 bnew 4bc0c 4bb56: 4281 clrl %d1 4bb58: 6002 bras 4bb5c retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; 4bb5a: 7201 moveq #1,%d1 else if (p[0] != '/') continue; *p = '\0'; 4bb5c: 4213 clrb %a3@ if (!last && p[1] == '\0') 4bb5e: 4a81 tstl %d1 4bb60: 660a bnes 4bb6c 4bb62: 4a15 tstb %a5@ 4bb64: 57c2 seq %d2 4bb66: 49c2 extbl %d2 4bb68: 4482 negl %d2 4bb6a: 6002 bras 4bb6e 4bb6c: 7401 moveq #1,%d2 last = 1; if (first) { 4bb6e: 4a80 tstl %d0 4bb70: 6712 beqs 4bb84 * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); 4bb72: 42a7 clrl %sp@- 4bb74: 4e94 jsr %a4@ 4bb76: 2600 movel %d0,%d3 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); 4bb78: 0280 ffff ff3f andil #-193,%d0 4bb7e: 2f00 movel %d0,%sp@- 4bb80: 4e94 jsr %a4@ 4bb82: 508f addql #8,%sp first = 0; } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 4bb84: 203c 0000 01ff movel #511,%d0 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) 4bb8a: 4a82 tstl %d2 4bb8c: 670a beqs 4bb98 (void)umask(oumask); 4bb8e: 2f03 movel %d3,%sp@- 4bb90: 4e94 jsr %a4@ if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 4bb92: 202e 000c movel %fp@(12),%d0 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) (void)umask(oumask); 4bb96: 588f addql #4,%sp if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 4bb98: 2f00 movel %d0,%sp@- 4bb9a: 2047 moveal %d7,%a0 4bb9c: 2f0a movel %a2,%sp@- 4bb9e: 4e90 jsr %a0@ 4bba0: 508f addql #8,%sp 4bba2: 4a80 tstl %d0 4bba4: 6c5c bges 4bc02 if (errno == EEXIST || errno == EISDIR) { 4bba6: 2044 moveal %d4,%a0 4bba8: 4e90 jsr %a0@ 4bbaa: 7211 moveq #17,%d1 4bbac: 2040 moveal %d0,%a0 4bbae: b290 cmpl %a0@,%d1 4bbb0: 670c beqs 4bbbe 4bbb2: 2044 moveal %d4,%a0 4bbb4: 4e90 jsr %a0@ 4bbb6: 7215 moveq #21,%d1 4bbb8: 2040 moveal %d0,%a0 4bbba: b290 cmpl %a0@,%d1 4bbbc: 667e bnes 4bc3c <== ALWAYS TAKEN if (stat(path, &sb) < 0) { 4bbbe: 2f06 movel %d6,%sp@- 4bbc0: 2045 moveal %d5,%a0 4bbc2: 2f0a movel %a2,%sp@- 4bbc4: 4e90 jsr %a0@ 4bbc6: 508f addql #8,%sp 4bbc8: 4a80 tstl %d0 4bbca: 6d70 blts 4bc3c <== NEVER TAKEN retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { 4bbcc: 202e ffc6 movel %fp@(-58),%d0 4bbd0: 0280 0000 f000 andil #61440,%d0 4bbd6: 0c80 0000 4000 cmpil #16384,%d0 4bbdc: 671e beqs 4bbfc 4bbde: 41f9 0004 d090 lea 4d090 <__errno>,%a0 if (last) 4bbe4: 4a82 tstl %d2 4bbe6: 670a beqs 4bbf2 errno = EEXIST; 4bbe8: 4e90 jsr %a0@ 4bbea: 7211 moveq #17,%d1 4bbec: 2040 moveal %d0,%a0 4bbee: 2081 movel %d1,%a0@ 4bbf0: 602a bras 4bc1c else errno = ENOTDIR; 4bbf2: 4e90 jsr %a0@ 4bbf4: 2040 moveal %d0,%a0 4bbf6: 7014 moveq #20,%d0 4bbf8: 2080 movel %d0,%a0@ 4bbfa: 6016 bras 4bc12 retval = 0; break; } if (last) 4bbfc: 4a82 tstl %d2 4bbfe: 6642 bnes 4bc42 4bc00: 6004 bras 4bc06 } else { retval = 0; break; } } if (!last) 4bc02: 4a82 tstl %d2 4bc04: 6640 bnes 4bc46 *p = '/'; 4bc06: 4280 clrl %d0 4bc08: 16bc 002f moveb #47,%a3@ p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { 4bc0c: 528b addql #1,%a3 4bc0e: 6000 ff38 braw 4bb48 } if (!last) *p = '/'; } if (!first && !last) (void)umask(oumask); 4bc12: 2f03 movel %d3,%sp@- 4bc14: 4eb9 0004 bcf0 jsr 4bcf0 4bc1a: 588f addql #4,%sp 4bc1c: 4282 clrl %d2 int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); 4bc1e: 2f0a movel %a2,%sp@- 4bc20: 4eb9 0004 38c0 jsr 438c0 } return success != 0 ? 0 : -1; 4bc26: 588f addql #4,%sp 4bc28: 4a82 tstl %d2 4bc2a: 57c0 seq %d0 4bc2c: 49c0 extbl %d0 4bc2e: 6002 bras 4bc32 4bc30: 70ff moveq #-1,%d0 <== NOT EXECUTED } 4bc32: 4cee 3cfc ff90 moveml %fp@(-112),%d2-%d7/%a2-%a5 4bc38: 4e5e unlk %fp 4bc3a: 4e75 rts } } if (!last) *p = '/'; } if (!first && !last) 4bc3c: 4a82 tstl %d2 4bc3e: 67d2 beqs 4bc12 <== NEVER TAKEN 4bc40: 60da bras 4bc1c errno = ENOTDIR; retval = 0; break; } if (last) retval = 2; 4bc42: 7402 moveq #2,%d2 4bc44: 60d8 bras 4bc1e } else { retval = 0; break; } } if (!last) 4bc46: 7401 moveq #1,%d2 4bc48: 60d4 bras 4bc1e ... =============================================================================== 0004642c : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 4642c: 4e56 fffc linkw %fp,#-4 46430: 2f0a movel %a2,%sp@- 46432: 246e 000c moveal %fp@(12),%a2 Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 46436: 4a8a tstl %a2 46438: 6720 beqs 4645a <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 4643a: 486e fffc pea %fp@(-4) 4643e: 2f2e 0008 movel %fp@(8),%sp@- 46442: 4eb9 0004 7dec jsr 47dec <_Objects_Id_to_name> *name = name_u.name_u32; 46448: 24ae fffc movel %fp@(-4),%a2@ return _Status_Object_name_errors_to_status[ status ]; 4644c: 41f9 0005 c45e lea 5c45e <_Status_Object_name_errors_to_status>,%a0 46452: 508f addql #8,%sp 46454: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 46458: 6002 bras 4645c { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) return RTEMS_INVALID_ADDRESS; 4645a: 7009 moveq #9,%d0 status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; } 4645c: 246e fff8 moveal %fp@(-8),%a2 46460: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042866 : void rtems_panic( const char *printf_format, ... ) { 42866: 4e56 0000 linkw %fp,#0 va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 4286a: 486e 000c pea %fp@(12) 4286e: 2f2e 0008 movel %fp@(8),%sp@- 42872: 2f3c 2000 0000 movel #536870912,%sp@- 42878: 4eba fe3e jsr %pc@(426b8 ) va_end(arglist); rtems_error(0, "fatal error, exiting"); 4287c: 4879 0005 aa14 pea 5aa14 42882: 42a7 clrl %sp@- 42884: 4eb9 0004 2804 jsr 42804 _exit(errno); 4288a: 4eb9 0004 bca0 jsr 4bca0 <__errno> 42890: 2040 moveal %d0,%a0 42892: 2f10 movel %a0@,%sp@- 42894: 4eb9 0004 31b8 jsr 431b8 <_exit> ... =============================================================================== 00050188 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 50188: 4e56 fffc linkw %fp,#-4 5018c: 2f0a movel %a2,%sp@- 5018e: 2f02 movel %d2,%sp@- Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 50190: 486e fffc pea %fp@(-4) 50194: 2f2e 0008 movel %fp@(8),%sp@- 50198: 4879 0007 5df4 pea 75df4 <_Partition_Information> 5019e: 242e 000c movel %fp@(12),%d2 501a2: 4eb9 0005 45ac jsr 545ac <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 501a8: 4fef 000c lea %sp@(12),%sp 501ac: 2440 moveal %d0,%a2 501ae: 4aae fffc tstl %fp@(-4) 501b2: 663e bnes 501f2 ) { void *starting; void *ending; starting = the_partition->starting_address; 501b4: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 501b8: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 501bc: b082 cmpl %d2,%d0 501be: 6240 bhis 50200 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 501c0: d280 addl %d0,%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 501c2: b282 cmpl %d2,%d1 501c4: 653a bcss 50200 <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 501c6: 2202 movel %d2,%d1 501c8: 9280 subl %d0,%d1 501ca: 2001 movel %d1,%d0 offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 501cc: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && 501d2: 4a81 tstl %d1 501d4: 662a bnes 50200 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 501d6: 2f02 movel %d2,%sp@- 501d8: 486a 0024 pea %a2@(36) 501dc: 4eb9 0005 2ccc jsr 52ccc <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 501e2: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 501e6: 4eb9 0005 5122 jsr 55122 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 501ec: 508f addql #8,%sp 501ee: 4280 clrl %d0 501f0: 6002 bras 501f4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 501f2: 7004 moveq #4,%d0 } 501f4: 242e fff4 movel %fp@(-12),%d2 501f8: 246e fff8 moveal %fp@(-8),%a2 501fc: 4e5e unlk %fp 501fe: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 50200: 4eb9 0005 5122 jsr 55122 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 50206: 7009 moveq #9,%d0 50208: 60ea bras 501f4 ... =============================================================================== 0004f7ac : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 4f7ac: 4e56 fffc linkw %fp,#-4 4f7b0: 2f0a movel %a2,%sp@- 4f7b2: 246e 0010 moveal %fp@(16),%a2 4f7b6: 2f02 movel %d2,%sp@- 4f7b8: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 4f7bc: 4a8a tstl %a2 4f7be: 6740 beqs 4f800 <== NEVER TAKEN 4f7c0: 486e fffc pea %fp@(-4) 4f7c4: 2f2e 0008 movel %fp@(8),%sp@- 4f7c8: 4879 0007 5dbc pea 75dbc <_Dual_ported_memory_Information> 4f7ce: 4eb9 0005 45ac jsr 545ac <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4f7d4: 4fef 000c lea %sp@(12),%sp 4f7d8: 2040 moveal %d0,%a0 4f7da: 4aae fffc tstl %fp@(-4) 4f7de: 6624 bnes 4f804 <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 4f7e0: 2002 movel %d2,%d0 4f7e2: 90a8 0010 subl %a0@(16),%d0 case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) 4f7e6: b0a8 0018 cmpl %a0@(24),%d0 4f7ea: 6304 blss 4f7f0 *external = internal; 4f7ec: 2482 movel %d2,%a2@ 4f7ee: 6006 bras 4f7f6 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 4f7f0: d0a8 0014 addl %a0@(20),%d0 4f7f4: 2480 movel %d0,%a2@ else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 4f7f6: 4eb9 0005 5122 jsr 55122 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4f7fc: 4280 clrl %d0 4f7fe: 6006 bras 4f806 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 4f800: 7009 moveq #9,%d0 4f802: 6002 bras 4f806 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4f804: 7004 moveq #4,%d0 } 4f806: 242e fff4 movel %fp@(-12),%d2 4f80a: 246e fff8 moveal %fp@(-8),%a2 4f80e: 4e5e unlk %fp ... =============================================================================== 00046586 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 46586: 4e56 ffec linkw %fp,#-20 4658a: 48d7 041c moveml %d2-%d4/%a2,%sp@ Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 4658e: 486e fffc pea %fp@(-4) 46592: 262e 0008 movel %fp@(8),%d3 46596: 2f03 movel %d3,%sp@- 46598: 4879 0005 f060 pea 5f060 <_Rate_monotonic_Information> 4659e: 242e 000c movel %fp@(12),%d2 465a2: 4eb9 0004 84cc jsr 484cc <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 465a8: 4fef 000c lea %sp@(12),%sp 465ac: 2440 moveal %d0,%a2 465ae: 4aae fffc tstl %fp@(-4) 465b2: 6600 0148 bnew 466fc case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 465b6: 2039 0005 f2ec movel 5f2ec <_Per_CPU_Information+0xc>,%d0 465bc: b0aa 0040 cmpl %a2@(64),%d0 465c0: 670c beqs 465ce _Thread_Enable_dispatch(); 465c2: 4eb9 0004 9042 jsr 49042 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 465c8: 7417 moveq #23,%d2 465ca: 6000 0132 braw 466fe } if ( length == RTEMS_PERIOD_STATUS ) { 465ce: 4a82 tstl %d2 465d0: 6622 bnes 465f4 switch ( the_period->state ) { 465d2: 202a 0038 movel %a2@(56),%d0 465d6: 7204 moveq #4,%d1 465d8: b280 cmpl %d0,%d1 465da: 650c bcss 465e8 <== NEVER TAKEN 465dc: 41f9 0005 c906 lea 5c906 ,%a0 465e2: 2430 0c00 movel %a0@(00000000,%d0:l:4),%d2 465e6: 6002 bras 465ea 465e8: 4282 clrl %d2 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 465ea: 4eb9 0004 9042 jsr 49042 <_Thread_Enable_dispatch> return( return_value ); 465f0: 6000 010c braw 466fe } _ISR_Disable( level ); 465f4: 203c 0000 0700 movel #1792,%d0 465fa: 40c4 movew %sr,%d4 465fc: 8084 orl %d4,%d0 465fe: 46c0 movew %d0,%sr if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 46600: 202a 0038 movel %a2@(56),%d0 46604: 664a bnes 46650 _ISR_Enable( level ); 46606: 46c4 movew %d4,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 46608: 2f0a movel %a2,%sp@- 4660a: 4eb9 0004 641a jsr 4641a <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 46610: 7002 moveq #2,%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46612: 223c 0004 6948 movel #289096,%d1 46618: 2540 0038 movel %d0,%a2@(56) 4661c: 2541 002c movel %d1,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46620: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; 46624: 2543 0030 movel %d3,%a2@(48) the_watchdog->user_data = user_data; 46628: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 4662c: 2542 003c movel %d2,%a2@(60) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46630: 2542 001c movel %d2,%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 46634: 486a 0010 pea %a2@(16) 46638: 4879 0005 f210 pea 5f210 <_Watchdog_Ticks_chain> 4663e: 4eb9 0004 9d68 jsr 49d68 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 46644: 4eb9 0004 9042 jsr 49042 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4664a: 4fef 000c lea %sp@(12),%sp 4664e: 606c bras 466bc } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 46650: 7202 moveq #2,%d1 46652: b280 cmpl %d0,%d1 46654: 666a bnes 466c0 /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 46656: 2f0a movel %a2,%sp@- 46658: 4eb9 0004 6492 jsr 46492 <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 4665e: 7001 moveq #1,%d0 the_period->next_length = length; 46660: 2542 003c movel %d2,%a2@(60) /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 46664: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 46668: 46c4 movew %d4,%sr _Thread_Executing->Wait.id = the_period->Object.id; 4666a: 2079 0005 f2ec moveal 5f2ec <_Per_CPU_Information+0xc>,%a0 46670: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 46676: 4878 4000 pea 4000 4667a: 2f08 movel %a0,%sp@- 4667c: 4eb9 0004 97a8 jsr 497a8 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 46682: 203c 0000 0700 movel #1792,%d0 46688: 40c1 movew %sr,%d1 4668a: 8081 orl %d1,%d0 4668c: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 4668e: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 46690: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 46694: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 46698: 46c1 movew %d1,%sr /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 4669a: 7203 moveq #3,%d1 4669c: 4fef 000c lea %sp@(12),%sp 466a0: b280 cmpl %d0,%d1 466a2: 6612 bnes 466b6 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 466a4: 4878 4000 pea 4000 466a8: 2f39 0005 f2ec movel 5f2ec <_Per_CPU_Information+0xc>,%sp@- 466ae: 4eb9 0004 8d00 jsr 48d00 <_Thread_Clear_state> 466b4: 508f addql #8,%sp _Thread_Enable_dispatch(); 466b6: 4eb9 0004 9042 jsr 49042 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 466bc: 4282 clrl %d2 466be: 603e bras 466fe } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 466c0: 7204 moveq #4,%d1 466c2: b280 cmpl %d0,%d1 466c4: 6636 bnes 466fc <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 466c6: 2f0a movel %a2,%sp@- 466c8: 4eb9 0004 6492 jsr 46492 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 466ce: 46c4 movew %d4,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 466d0: 7002 moveq #2,%d0 the_period->next_length = length; 466d2: 2542 003c movel %d2,%a2@(60) */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 466d6: 2540 0038 movel %d0,%a2@(56) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 466da: 2542 001c movel %d2,%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 466de: 486a 0010 pea %a2@(16) the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 466e2: 7406 moveq #6,%d2 466e4: 4879 0005 f210 pea 5f210 <_Watchdog_Ticks_chain> 466ea: 4eb9 0004 9d68 jsr 49d68 <_Watchdog_Insert> the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 466f0: 4eb9 0004 9042 jsr 49042 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 466f6: 4fef 000c lea %sp@(12),%sp 466fa: 6002 bras 466fe #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 466fc: 7404 moveq #4,%d2 } 466fe: 2002 movel %d2,%d0 46700: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 46706: 4e5e unlk %fp ... =============================================================================== 00050d70 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 50d70: 4e56 fffc linkw %fp,#-4 50d74: 2f03 movel %d3,%sp@- 50d76: 262e 0010 movel %fp@(16),%d3 50d7a: 2f02 movel %d2,%sp@- 50d7c: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 50d80: 6768 beqs 50dea return RTEMS_INVALID_ADDRESS; if ( !size ) 50d82: 4a83 tstl %d3 50d84: 6764 beqs 50dea return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 50d86: 2f39 0007 5ff4 movel 75ff4 <_RTEMS_Allocator_Mutex>,%sp@- 50d8c: 4eb9 0005 2c38 jsr 52c38 <_API_Mutex_Lock> 50d92: 486e fffc pea %fp@(-4) 50d96: 2f2e 0008 movel %fp@(8),%sp@- 50d9a: 4879 0007 5e64 pea 75e64 <_Region_Information> 50da0: 4eb9 0005 4574 jsr 54574 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 50da6: 222e fffc movel %fp@(-4),%d1 50daa: 4fef 0010 lea %sp@(16),%sp 50dae: 6708 beqs 50db8 50db0: 7001 moveq #1,%d0 50db2: b081 cmpl %d1,%d0 50db4: 661a bnes 50dd0 <== NEVER TAKEN 50db6: 601c bras 50dd4 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 50db8: 2f03 movel %d3,%sp@- 50dba: 2040 moveal %d0,%a0 50dbc: 2f02 movel %d2,%sp@- 50dbe: 4868 0068 pea %a0@(104) 50dc2: 4eb9 0005 3fec jsr 53fec <_Heap_Size_of_alloc_area> 50dc8: 4fef 000c lea %sp@(12),%sp 50dcc: 4a00 tstb %d0 50dce: 6708 beqs 50dd8 <== NEVER TAKEN void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 50dd0: 4282 clrl %d2 50dd2: 6006 bras 50dda case OBJECTS_REMOTE: /* this error cannot be returned */ break; #endif case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; 50dd4: 7404 moveq #4,%d2 50dd6: 6002 bras 50dda the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) return_status = RTEMS_INVALID_ADDRESS; 50dd8: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 50dda: 2f39 0007 5ff4 movel 75ff4 <_RTEMS_Allocator_Mutex>,%sp@- 50de0: 4eb9 0005 2c98 jsr 52c98 <_API_Mutex_Unlock> return return_status; 50de6: 588f addql #4,%sp 50de8: 6002 bras 50dec if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 50dea: 7409 moveq #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 50dec: 2002 movel %d2,%d0 50dee: 242e fff4 movel %fp@(-12),%d2 50df2: 262e fff8 movel %fp@(-8),%d3 50df6: 4e5e unlk %fp ... =============================================================================== 00045e90 : void rtems_shutdown_executive( uint32_t result ) { if ( _System_state_Is_up( _System_state_Get() ) ) { 45e90: 7003 moveq #3,%d0 */ void rtems_shutdown_executive( uint32_t result ) { 45e92: 4e56 0000 linkw %fp,#0 if ( _System_state_Is_up( _System_state_Get() ) ) { 45e96: b0b9 0005 d6a0 cmpl 5d6a0 <_System_state_Current>,%d0 45e9c: 6618 bnes 45eb6 45e9e: 103c 0004 moveb #4,%d0 * if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context ); 45ea2: 4879 0005 d524 pea 5d524 <_Thread_BSP_context> 45ea8: 23c0 0005 d6a0 movel %d0,5d6a0 <_System_state_Current> 45eae: 4eb9 0004 896e jsr 4896e <_CPU_Context_Restart_self> 45eb4: 588f addql #4,%sp <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } _Internal_error_Occurred( 45eb6: 4878 0014 pea 14 45eba: 4878 0001 pea 1 45ebe: 42a7 clrl %sp@- 45ec0: 4eb9 0004 69b0 jsr 469b0 <_Internal_error_Occurred> ... =============================================================================== 000513d0 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 513d0: 4e56 fffc linkw %fp,#-4 513d4: 2f03 movel %d3,%sp@- 513d6: 2f02 movel %d2,%sp@- 513d8: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 513dc: 677a beqs 51458 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 513de: 486e fffc pea %fp@(-4) 513e2: 2f2e 0008 movel %fp@(8),%sp@- 513e6: 4eb9 0005 5148 jsr 55148 <_Thread_Get> switch ( location ) { 513ec: 508f addql #8,%sp 513ee: 4aae fffc tstl %fp@(-4) 513f2: 6668 bnes 5145c <== NEVER TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 513f4: 2240 moveal %d0,%a1 513f6: 2069 00fc moveal %a1@(252),%a0 asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 513fa: 4aa8 000a tstl %a0@(10) 513fe: 674e beqs 5144e if ( asr->is_enabled ) { 51400: 4a28 0008 tstb %a0@(8) 51404: 672c beqs 51432 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 51406: 223c 0000 0700 movel #1792,%d1 5140c: 40c3 movew %sr,%d3 5140e: 8283 orl %d3,%d1 51410: 46c1 movew %d1,%sr *signal_set |= signals; 51412: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 51416: 46c3 movew %d3,%sr _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 51418: 4ab9 0007 60f4 tstl 760f4 <_Per_CPU_Information+0x8> 5141e: 6724 beqs 51444 51420: b0b9 0007 60f8 cmpl 760f8 <_Per_CPU_Information+0xc>,%d0 51426: 661c bnes 51444 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 51428: 7001 moveq #1,%d0 5142a: 13c0 0007 6104 moveb %d0,76104 <_Per_CPU_Information+0x18> 51430: 6012 bras 51444 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 51432: 203c 0000 0700 movel #1792,%d0 51438: 40c1 movew %sr,%d1 5143a: 8081 orl %d1,%d0 5143c: 46c0 movew %d0,%sr *signal_set |= signals; 5143e: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 51442: 46c1 movew %d1,%sr } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 51444: 4eb9 0005 5122 jsr 55122 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5144a: 4280 clrl %d0 5144c: 6010 bras 5145e } _Thread_Enable_dispatch(); 5144e: 4eb9 0005 5122 jsr 55122 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 51454: 700b moveq #11,%d0 51456: 6006 bras 5145e Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; 51458: 700a moveq #10,%d0 5145a: 6002 bras 5145e case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 5145c: 7004 moveq #4,%d0 } 5145e: 242e fff4 movel %fp@(-12),%d2 51462: 262e fff8 movel %fp@(-8),%d3 51466: 4e5e unlk %fp ... =============================================================================== 0004212e : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 4212e: 4e56 0000 linkw %fp,#0 42132: 206e 0008 moveal %fp@(8),%a0 Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 42136: 4aa8 0008 tstl %a0@(8) 4213a: 671c beqs 42158 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 4213c: 4878 0010 pea 10 42140: 4879 0005 d9b0 pea 5d9b0 42146: 2068 00b4 moveal %a0@(180),%a0 4214a: 5088 addql #8,%a0 4214c: 2f08 movel %a0,%sp@- 4214e: 4eb9 0004 ca24 jsr 4ca24 42154: 4fef 000c lea %sp@(12),%sp } 42158: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000420fa : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 420fa: 4e56 0000 linkw %fp,#0 420fe: 2f0a movel %a2,%sp@- 42100: 246e 000c moveal %fp@(12),%a2 Stack_check_Initialize(); 42104: 4eb9 0004 2082 jsr 42082 if (the_thread) 4210a: 4a8a tstl %a2 4210c: 6716 beqs 42124 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 4210e: 2f2a 00b0 movel %a2@(176),%sp@- 42112: 4878 00a5 pea a5 42116: 2f2a 00b4 movel %a2@(180),%sp@- 4211a: 4eb9 0004 ca94 jsr 4ca94 42120: 4fef 000c lea %sp@(12),%sp return true; } 42124: 246e fffc moveal %fp@(-4),%a2 42128: 4e5e unlk %fp 4212a: 7001 moveq #1,%d0 <== NOT EXECUTED =============================================================================== 0004226a : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 4226a: 4e56 0000 linkw %fp,#0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 4226e: 2279 0005 dcb8 moveal 5dcb8 <_Per_CPU_Information+0xc>,%a1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 42274: 2069 00b4 moveal %a1@(180),%a0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 42278: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 4227a: b1ce cmpal %fp,%a0 4227c: 620e bhis 4228c <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 4227e: 2008 movel %a0,%d0 42280: d0a9 00b0 addl %a1@(176),%d0 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 42284: b08e cmpl %fp,%d0 42286: 54c2 scc %d2 42288: 4482 negl %d2 4228a: 6002 bras 4228e { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; 4228c: 4202 clrb %d2 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 4228e: 4ab9 0005 d1b0 tstl 5d1b0 42294: 6720 beqs 422b6 <== NEVER TAKEN pattern_ok = (!memcmp( 42296: 4878 0010 pea 10 4229a: 4879 0005 d9b0 pea 5d9b0 422a0: 4868 0008 pea %a0@(8) 422a4: 4eb9 0004 c9a4 jsr 4c9a4 422aa: 4fef 000c lea %sp@(12),%sp 422ae: 4a80 tstl %d0 422b0: 57c0 seq %d0 422b2: 4480 negl %d0 422b4: 6002 bras 422b8 */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; bool sp_ok; bool pattern_ok = true; 422b6: 7001 moveq #1,%d0 <== NOT EXECUTED /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { 422b8: 4a02 tstb %d2 422ba: 6704 beqs 422c0 <== NEVER TAKEN 422bc: 4a00 tstb %d0 422be: 6614 bnes 422d4 <== ALWAYS TAKEN Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 422c0: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 422c6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 422c8: 2f39 0005 dcb8 movel 5dcb8 <_Per_CPU_Information+0xc>,%sp@-<== NOT EXECUTED 422ce: 4eb9 0004 215c jsr 4215c <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 422d4: 242e fffc movel %fp@(-4),%d2 422d8: 4e5e unlk %fp 422da: 4200 clrb %d0 <== NOT EXECUTED =============================================================================== 00042344 : void rtems_stack_checker_report_usage( void ) { 42344: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 42348: 4879 0004 3a94 pea 43a94 <== NOT EXECUTED 4234e: 42a7 clrl %sp@- <== NOT EXECUTED 42350: 4eb9 0004 22de jsr 422de <== NOT EXECUTED 42356: 508f addql #8,%sp <== NOT EXECUTED } 42358: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000422de : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 422de: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 422e2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 422e4: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 422e8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 422ea: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED if ( !print ) 422ee: 4a8a tstl %a2 <== NOT EXECUTED 422f0: 6746 beqs 42338 <== NOT EXECUTED return; print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 422f2: 4879 0005 aec6 pea 5aec6 <== NOT EXECUTED ) { if ( !print ) return; print_context = context; 422f8: 23c2 0005 d1a8 movel %d2,5d1a8 <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 422fe: 2f02 movel %d2,%sp@- <== NOT EXECUTED { if ( !print ) return; print_context = context; print_handler = print; 42300: 23ca 0005 d1ac movel %a2,5d1ac <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 42306: 4e92 jsr %a2@ <== NOT EXECUTED (*print)( context, 42308: 4879 0005 aedd pea 5aedd <== NOT EXECUTED 4230e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42310: 4e92 jsr %a2@ <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 42312: 4879 0004 1f60 pea 41f60 <== NOT EXECUTED 42318: 4eb9 0004 6e14 jsr 46e14 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 4231e: 4878 ffff pea ffffffff <== NOT EXECUTED 42322: 4eb9 0004 1f60 jsr 41f60 <== NOT EXECUTED #endif print_context = NULL; print_handler = NULL; 42328: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); #endif print_context = NULL; 4232c: 42b9 0005 d1a8 clrl 5d1a8 <== NOT EXECUTED print_handler = NULL; 42332: 42b9 0005 d1ac clrl 5d1ac <== NOT EXECUTED } 42338: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4233c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 42340: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042202 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 42202: 4e56 0000 linkw %fp,#0 42206: 2f0a movel %a2,%sp@- 42208: 246e 0008 moveal %fp@(8),%a2 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = Stack_check_Get_pattern_area(the_stack); 4220c: 222a 00b4 movel %a2@(180),%d1 42210: 5081 addql #8,%d1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 42212: 202a 00b4 movel %a2@(180),%d0 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 42216: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 42218: b08e cmpl %fp,%d0 4221a: 620c bhis 42228 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 4221c: d0aa 00b0 addl %a2@(176),%d0 } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 42220: b08e cmpl %fp,%d0 42222: 54c2 scc %d2 42224: 4482 negl %d2 42226: 6002 bras 4222a { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; 42228: 4202 clrb %d2 <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 4222a: 4878 0010 pea 10 4222e: 4879 0005 d9b0 pea 5d9b0 42234: 2f01 movel %d1,%sp@- 42236: 4eb9 0004 c9a4 jsr 4c9a4 4223c: 4fef 000c lea %sp@(12),%sp 42240: 4a80 tstl %d0 42242: 57c0 seq %d0 42244: 4480 negl %d0 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 42246: 4a02 tstb %d2 42248: 6704 beqs 4224e <== NEVER TAKEN 4224a: 4a00 tstb %d0 4224c: 6610 bnes 4225e <== ALWAYS TAKEN Stack_check_report_blown_task( running, pattern_ok ); 4224e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 42254: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42256: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42258: 4eb9 0004 215c jsr 4215c <== NOT EXECUTED } } 4225e: 242e fff8 movel %fp@(-8),%d2 42262: 246e fffc moveal %fp@(-4),%a2 42266: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b83c : rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { 4b83c: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4b840: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 4b844: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED 4b848: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4b84c: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED double result; char *end; if ( !n ) 4b850: 4a8a tstl %a2 <== NOT EXECUTED 4b852: 6700 009c beqw 4b8f0 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 4b856: 4eb9 0004 d90c jsr 4d90c <__errno> <== NOT EXECUTED *n = 0; 4b85c: 4281 clrl %d1 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b85e: 2040 moveal %d0,%a0 <== NOT EXECUTED *n = 0; 4b860: 4280 clrl %d0 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b862: 4290 clrl %a0@ <== NOT EXECUTED *n = 0; 4b864: 2480 movel %d0,%a2@ <== NOT EXECUTED 4b866: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED result = strtod( s, &end ); 4b86a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b86e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4b870: 4eb9 0005 022e jsr 5022e <== NOT EXECUTED if ( endptr ) 4b876: 508f addql #8,%sp <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtod( s, &end ); 4b878: 2400 movel %d0,%d2 <== NOT EXECUTED 4b87a: 2601 movel %d1,%d3 <== NOT EXECUTED if ( endptr ) 4b87c: 4a8b tstl %a3 <== NOT EXECUTED 4b87e: 6704 beqs 4b884 <== NOT EXECUTED *endptr = end; 4b880: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED if ( end == s ) 4b884: b8ae fffc cmpl %fp@(-4),%d4 <== NOT EXECUTED 4b888: 676a beqs 4b8f4 <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4b88a: 4eb9 0004 d90c jsr 4d90c <__errno> <== NOT EXECUTED 4b890: 7222 moveq #34,%d1 <== NOT EXECUTED 4b892: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b894: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b896: 664e bnes 4b8e6 <== NOT EXECUTED 4b898: 42a7 clrl %sp@- <== NOT EXECUTED 4b89a: 42a7 clrl %sp@- <== NOT EXECUTED 4b89c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b89e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b8a0: 4eb9 0004 24c8 jsr 424c8 <__eqdf2> <== NOT EXECUTED 4b8a6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b8aa: 4a80 tstl %d0 <== NOT EXECUTED 4b8ac: 674a beqs 4b8f8 <== NOT EXECUTED (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) 4b8ae: 4878 ffff pea ffffffff <== NOT EXECUTED 4b8b2: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4b8b8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b8ba: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b8bc: 4eb9 0005 bd60 jsr 5bd60 <__gtdf2> <== NOT EXECUTED 4b8c2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b8c6: 4a80 tstl %d0 <== NOT EXECUTED 4b8c8: 6e2e bgts 4b8f8 <== NOT EXECUTED 4b8ca: 4878 ffff pea ffffffff <== NOT EXECUTED 4b8ce: 2f3c ffef ffff movel #-1048577,%sp@- <== NOT EXECUTED 4b8d4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b8d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b8d8: 4eb9 0005 bda8 jsr 5bda8 <__ltdf2> <== NOT EXECUTED 4b8de: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b8e2: 4a80 tstl %d0 <== NOT EXECUTED 4b8e4: 6d12 blts 4b8f8 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; *n = result; 4b8e6: 2482 movel %d2,%a2@ <== NOT EXECUTED return RTEMS_SUCCESSFUL; 4b8e8: 4280 clrl %d0 <== NOT EXECUTED if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; *n = result; 4b8ea: 2543 0004 movel %d3,%a2@(4) <== NOT EXECUTED return RTEMS_SUCCESSFUL; 4b8ee: 600a bras 4b8fa <== NOT EXECUTED { double result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4b8f0: 7009 moveq #9,%d0 <== NOT EXECUTED 4b8f2: 6006 bras 4b8fa <== NOT EXECUTED if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 4b8f4: 700b moveq #11,%d0 <== NOT EXECUTED 4b8f6: 6002 bras 4b8fa <== NOT EXECUTED if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; 4b8f8: 700a moveq #10,%d0 <== NOT EXECUTED *n = result; return RTEMS_SUCCESSFUL; } 4b8fa: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4b900: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b904 : rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { 4b904: 4e56 ffec linkw %fp,#-20 4b908: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b90c: 262e 0008 movel %fp@(8),%d3 4b910: 246e 000c moveal %fp@(12),%a2 4b914: 266e 0010 moveal %fp@(16),%a3 float result; char *end; if ( !n ) 4b918: 4a8a tstl %a2 4b91a: 677e beqs 4b99a return RTEMS_INVALID_ADDRESS; errno = 0; 4b91c: 4eb9 0004 d90c jsr 4d90c <__errno> 4b922: 2040 moveal %d0,%a0 4b924: 4290 clrl %a0@ *n = 0; 4b926: 24bc 0000 0000 movel #0,%a2@ result = strtof( s, &end ); 4b92c: 486e fffc pea %fp@(-4) 4b930: 2f03 movel %d3,%sp@- 4b932: 4eb9 0005 024e jsr 5024e if ( endptr ) 4b938: 508f addql #8,%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtof( s, &end ); 4b93a: 2400 movel %d0,%d2 if ( endptr ) 4b93c: 4a8b tstl %a3 4b93e: 6704 beqs 4b944 *endptr = end; 4b940: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4b944: b6ae fffc cmpl %fp@(-4),%d3 4b948: 6754 beqs 4b99e return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4b94a: 4eb9 0004 d90c jsr 4d90c <__errno> 4b950: 7222 moveq #34,%d1 4b952: 2040 moveal %d0,%a0 4b954: b290 cmpl %a0@,%d1 4b956: 663c bnes 4b994 4b958: 2f3c 0000 0000 movel #0,%sp@- 4b95e: 2f02 movel %d2,%sp@- 4b960: 4eb9 0004 24ec jsr 424ec <__eqsf2> 4b966: 508f addql #8,%sp 4b968: 4a80 tstl %d0 4b96a: 6736 beqs 4b9a2 <== NEVER TAKEN (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) 4b96c: 2f3c 7f7f ffff movel #2139095039,%sp@- 4b972: 2f02 movel %d2,%sp@- 4b974: 4eb9 0005 bdf0 jsr 5bdf0 <__gtsf2> 4b97a: 508f addql #8,%sp 4b97c: 4a80 tstl %d0 4b97e: 6e22 bgts 4b9a2 <== NEVER TAKEN 4b980: 2f3c ff7f ffff movel #-8388609,%sp@- 4b986: 2f02 movel %d2,%sp@- 4b988: 4eb9 0005 be0c jsr 5be0c <__ltsf2> 4b98e: 508f addql #8,%sp 4b990: 4a80 tstl %d0 4b992: 6d0e blts 4b9a2 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; *n = result; 4b994: 2482 movel %d2,%a2@ return RTEMS_SUCCESSFUL; 4b996: 4280 clrl %d0 4b998: 600a bras 4b9a4 { float result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4b99a: 7009 moveq #9,%d0 4b99c: 6006 bras 4b9a4 if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 4b99e: 700b moveq #11,%d0 4b9a0: 6002 bras 4b9a4 if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; 4b9a2: 700a moveq #10,%d0 <== NOT EXECUTED *n = result; return RTEMS_SUCCESSFUL; } 4b9a4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b9aa: 4e5e unlk %fp ... =============================================================================== 0004b9b0 : const char *s, int *n, char **endptr, int base ) { 4b9b0: 4e56 ffec linkw %fp,#-20 4b9b4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b9b8: 262e 0008 movel %fp@(8),%d3 4b9bc: 246e 000c moveal %fp@(12),%a2 4b9c0: 266e 0010 moveal %fp@(16),%a3 long result; char *end; if ( !n ) 4b9c4: 4a8a tstl %a2 4b9c6: 6758 beqs 4ba20 return RTEMS_INVALID_ADDRESS; errno = 0; 4b9c8: 4eb9 0004 d90c jsr 4d90c <__errno> 4b9ce: 2040 moveal %d0,%a0 4b9d0: 4290 clrl %a0@ *n = 0; 4b9d2: 4292 clrl %a2@ result = strtol( s, &end, base ); 4b9d4: 2f2e 0014 movel %fp@(20),%sp@- 4b9d8: 486e fffc pea %fp@(-4) 4b9dc: 2f03 movel %d3,%sp@- 4b9de: 4eb9 0005 040a jsr 5040a if ( endptr ) 4b9e4: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtol( s, &end, base ); 4b9e8: 2400 movel %d0,%d2 if ( endptr ) 4b9ea: 4a8b tstl %a3 4b9ec: 6704 beqs 4b9f2 *endptr = end; 4b9ee: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4b9f2: b6ae fffc cmpl %fp@(-4),%d3 4b9f6: 672c beqs 4ba24 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4b9f8: 4eb9 0004 d90c jsr 4d90c <__errno> 4b9fe: 7222 moveq #34,%d1 4ba00: 2040 moveal %d0,%a0 4ba02: b290 cmpl %a0@,%d1 4ba04: 6614 bnes 4ba1a 4ba06: 4a82 tstl %d2 4ba08: 671e beqs 4ba28 <== NEVER TAKEN (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) 4ba0a: 0c82 7fff ffff cmpil #2147483647,%d2 4ba10: 6716 beqs 4ba28 <== ALWAYS TAKEN 4ba12: 0c82 8000 0000 cmpil #-2147483648,%d2 <== NOT EXECUTED 4ba18: 670e beqs 4ba28 <== NOT EXECUTED errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 4ba1a: 2482 movel %d2,%a2@ return RTEMS_SUCCESSFUL; 4ba1c: 4280 clrl %d0 4ba1e: 600a bras 4ba2a { long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4ba20: 7009 moveq #9,%d0 4ba22: 6006 bras 4ba2a if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 4ba24: 700b moveq #11,%d0 4ba26: 6002 bras 4ba2a if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; 4ba28: 700a moveq #10,%d0 #endif *n = result; return RTEMS_SUCCESSFUL; } 4ba2a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4ba30: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bad4 : const char *s, long *n, char **endptr, int base ) { 4bad4: 4e56 ffec linkw %fp,#-20 4bad8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4badc: 262e 0008 movel %fp@(8),%d3 4bae0: 246e 000c moveal %fp@(12),%a2 4bae4: 266e 0010 moveal %fp@(16),%a3 long result; char *end; if ( !n ) 4bae8: 4a8a tstl %a2 4baea: 6758 beqs 4bb44 return RTEMS_INVALID_ADDRESS; errno = 0; 4baec: 4eb9 0004 d90c jsr 4d90c <__errno> 4baf2: 2040 moveal %d0,%a0 4baf4: 4290 clrl %a0@ *n = 0; 4baf6: 4292 clrl %a2@ result = strtol( s, &end, base ); 4baf8: 2f2e 0014 movel %fp@(20),%sp@- 4bafc: 486e fffc pea %fp@(-4) 4bb00: 2f03 movel %d3,%sp@- 4bb02: 4eb9 0005 040a jsr 5040a if ( endptr ) 4bb08: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtol( s, &end, base ); 4bb0c: 2400 movel %d0,%d2 if ( endptr ) 4bb0e: 4a8b tstl %a3 4bb10: 6704 beqs 4bb16 *endptr = end; 4bb12: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4bb16: b6ae fffc cmpl %fp@(-4),%d3 4bb1a: 672c beqs 4bb48 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4bb1c: 4eb9 0004 d90c jsr 4d90c <__errno> 4bb22: 7222 moveq #34,%d1 4bb24: 2040 moveal %d0,%a0 4bb26: b290 cmpl %a0@,%d1 4bb28: 6614 bnes 4bb3e 4bb2a: 4a82 tstl %d2 4bb2c: 671e beqs 4bb4c <== NEVER TAKEN (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) 4bb2e: 0c82 7fff ffff cmpil #2147483647,%d2 4bb34: 6716 beqs 4bb4c 4bb36: 0c82 8000 0000 cmpil #-2147483648,%d2 4bb3c: 670e beqs 4bb4c <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; *n = result; 4bb3e: 2482 movel %d2,%a2@ return RTEMS_SUCCESSFUL; 4bb40: 4280 clrl %d0 4bb42: 600a bras 4bb4e { long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4bb44: 7009 moveq #9,%d0 4bb46: 6006 bras 4bb4e if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 4bb48: 700b moveq #11,%d0 4bb4a: 6002 bras 4bb4e if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; 4bb4c: 700a moveq #10,%d0 *n = result; return RTEMS_SUCCESSFUL; } 4bb4e: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4bb54: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ba34 : const char *s, long long *n, char **endptr, int base ) { 4ba34: 4e56 ffe8 linkw %fp,#-24 4ba38: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4ba3c: 282e 0008 movel %fp@(8),%d4 4ba40: 246e 000c moveal %fp@(12),%a2 4ba44: 266e 0010 moveal %fp@(16),%a3 long long result; char *end; if ( !n ) 4ba48: 4a8a tstl %a2 4ba4a: 6774 beqs 4bac0 return RTEMS_INVALID_ADDRESS; errno = 0; 4ba4c: 4eb9 0004 d90c jsr 4d90c <__errno> 4ba52: 2040 moveal %d0,%a0 *n = 0; 4ba54: 4280 clrl %d0 4ba56: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4ba58: 4290 clrl %a0@ *n = 0; 4ba5a: 2480 movel %d0,%a2@ 4ba5c: 2541 0004 movel %d1,%a2@(4) result = strtoll( s, &end, base ); 4ba60: 2f2e 0014 movel %fp@(20),%sp@- 4ba64: 486e fffc pea %fp@(-4) 4ba68: 2f04 movel %d4,%sp@- 4ba6a: 4eb9 0005 042c jsr 5042c if ( endptr ) 4ba70: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoll( s, &end, base ); 4ba74: 2400 movel %d0,%d2 4ba76: 2601 movel %d1,%d3 if ( endptr ) 4ba78: 4a8b tstl %a3 4ba7a: 6704 beqs 4ba80 *endptr = end; 4ba7c: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4ba80: b8ae fffc cmpl %fp@(-4),%d4 4ba84: 673e beqs 4bac4 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4ba86: 4eb9 0004 d90c jsr 4d90c <__errno> 4ba8c: 7222 moveq #34,%d1 4ba8e: 2040 moveal %d0,%a0 4ba90: b290 cmpl %a0@,%d1 4ba92: 6622 bnes 4bab6 4ba94: 2002 movel %d2,%d0 4ba96: 8083 orl %d3,%d0 4ba98: 672e beqs 4bac8 <== NEVER TAKEN (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) 4ba9a: 203c 7fff ffff movel #2147483647,%d0 4baa0: 72ff moveq #-1,%d1 4baa2: 9283 subl %d3,%d1 4baa4: 9182 subxl %d2,%d0 4baa6: 6720 beqs 4bac8 4baa8: 203c 8000 0000 movel #-2147483648,%d0 4baae: 4281 clrl %d1 4bab0: 9283 subl %d3,%d1 4bab2: 9182 subxl %d2,%d0 4bab4: 6712 beqs 4bac8 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 4bab6: 4280 clrl %d0 if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 4bab8: 2482 movel %d2,%a2@ 4baba: 2543 0004 movel %d3,%a2@(4) return RTEMS_SUCCESSFUL; 4babe: 600a bras 4baca { long long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4bac0: 7009 moveq #9,%d0 4bac2: 6006 bras 4baca if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 4bac4: 700b moveq #11,%d0 4bac6: 6002 bras 4baca if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; 4bac8: 700a moveq #10,%d0 *n = result; return RTEMS_SUCCESSFUL; } 4baca: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 4bad0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bb74 : const char *s, unsigned char *n, char **endptr, int base ) { 4bb74: 4e56 ffec linkw %fp,#-20 4bb78: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4bb7c: 262e 0008 movel %fp@(8),%d3 4bb80: 246e 000c moveal %fp@(12),%a2 4bb84: 266e 0010 moveal %fp@(16),%a3 unsigned long result; char *end; if ( !n ) 4bb88: 4a8a tstl %a2 4bb8a: 6764 beqs 4bbf0 return RTEMS_INVALID_ADDRESS; errno = 0; 4bb8c: 4eb9 0004 d90c jsr 4d90c <__errno> 4bb92: 2040 moveal %d0,%a0 4bb94: 4290 clrl %a0@ *n = 0; 4bb96: 4212 clrb %a2@ result = strtoul( s, &end, base ); 4bb98: 2f2e 0014 movel %fp@(20),%sp@- 4bb9c: 486e fffc pea %fp@(-4) 4bba0: 2f03 movel %d3,%sp@- 4bba2: 4eb9 0005 084e jsr 5084e if ( endptr ) 4bba8: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); 4bbac: 2400 movel %d0,%d2 if ( endptr ) 4bbae: 4a8b tstl %a3 4bbb0: 6704 beqs 4bbb6 *endptr = end; 4bbb2: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4bbb6: b6ae fffc cmpl %fp@(-4),%d3 4bbba: 6738 beqs 4bbf4 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4bbbc: 4eb9 0004 d90c jsr 4d90c <__errno> 4bbc2: 7222 moveq #34,%d1 4bbc4: 2040 moveal %d0,%a0 4bbc6: b290 cmpl %a0@,%d1 4bbc8: 660a bnes 4bbd4 <== ALWAYS TAKEN (( result == 0 ) || ( result == ULONG_MAX ))) 4bbca: 2002 movel %d2,%d0 <== NOT EXECUTED 4bbcc: 5380 subql #1,%d0 <== NOT EXECUTED *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4bbce: 72fd moveq #-3,%d1 <== NOT EXECUTED 4bbd0: b280 cmpl %d0,%d1 <== NOT EXECUTED 4bbd2: 6524 bcss 4bbf8 <== NOT EXECUTED (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { 4bbd4: 0c82 0000 00ff cmpil #255,%d2 4bbda: 630e blss 4bbea <== ALWAYS TAKEN errno = ERANGE; 4bbdc: 4eb9 0004 d90c jsr 4d90c <__errno> <== NOT EXECUTED 4bbe2: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bbe4: 7022 moveq #34,%d0 <== NOT EXECUTED 4bbe6: 2080 movel %d0,%a0@ <== NOT EXECUTED 4bbe8: 600e bras 4bbf8 <== NOT EXECUTED } #endif *n = result; return RTEMS_SUCCESSFUL; 4bbea: 4280 clrl %d0 errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 4bbec: 1482 moveb %d2,%a2@ return RTEMS_SUCCESSFUL; 4bbee: 600a bras 4bbfa { unsigned long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4bbf0: 7009 moveq #9,%d0 4bbf2: 6006 bras 4bbfa if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 4bbf4: 700b moveq #11,%d0 4bbf6: 6002 bras 4bbfa if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; 4bbf8: 700a moveq #10,%d0 <== NOT EXECUTED #endif *n = result; return RTEMS_SUCCESSFUL; } 4bbfa: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4bc00: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bc04 : const char *s, unsigned int *n, char **endptr, int base ) { 4bc04: 4e56 ffec linkw %fp,#-20 4bc08: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4bc0c: 262e 0008 movel %fp@(8),%d3 4bc10: 246e 000c moveal %fp@(12),%a2 4bc14: 266e 0010 moveal %fp@(16),%a3 unsigned long result; char *end; if ( !n ) 4bc18: 4a8a tstl %a2 4bc1a: 674e beqs 4bc6a return RTEMS_INVALID_ADDRESS; errno = 0; 4bc1c: 4eb9 0004 d90c jsr 4d90c <__errno> 4bc22: 2040 moveal %d0,%a0 4bc24: 4290 clrl %a0@ *n = 0; 4bc26: 4292 clrl %a2@ result = strtoul( s, &end, base ); 4bc28: 2f2e 0014 movel %fp@(20),%sp@- 4bc2c: 486e fffc pea %fp@(-4) 4bc30: 2f03 movel %d3,%sp@- 4bc32: 4eb9 0005 084e jsr 5084e if ( endptr ) 4bc38: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); 4bc3c: 2400 movel %d0,%d2 if ( endptr ) 4bc3e: 4a8b tstl %a3 4bc40: 6704 beqs 4bc46 *endptr = end; 4bc42: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4bc46: b6ae fffc cmpl %fp@(-4),%d3 4bc4a: 6722 beqs 4bc6e return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4bc4c: 4eb9 0004 d90c jsr 4d90c <__errno> 4bc52: 7222 moveq #34,%d1 4bc54: 2040 moveal %d0,%a0 4bc56: b290 cmpl %a0@,%d1 4bc58: 660a bnes 4bc64 (( result == 0 ) || ( result == ULONG_MAX ))) 4bc5a: 2002 movel %d2,%d0 4bc5c: 5380 subql #1,%d0 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4bc5e: 72fd moveq #-3,%d1 4bc60: b280 cmpl %d0,%d1 4bc62: 650e bcss 4bc72 <== ALWAYS TAKEN errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 4bc64: 2482 movel %d2,%a2@ return RTEMS_SUCCESSFUL; 4bc66: 4280 clrl %d0 4bc68: 600a bras 4bc74 { unsigned long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4bc6a: 7009 moveq #9,%d0 4bc6c: 6006 bras 4bc74 if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 4bc6e: 700b moveq #11,%d0 4bc70: 6002 bras 4bc74 if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; 4bc72: 700a moveq #10,%d0 #endif *n = result; return RTEMS_SUCCESSFUL; } 4bc74: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4bc7a: 4e5e unlk %fp ... =============================================================================== 0004bd10 : const char *s, unsigned long *n, char **endptr, int base ) { 4bd10: 4e56 ffec linkw %fp,#-20 4bd14: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4bd18: 262e 0008 movel %fp@(8),%d3 4bd1c: 246e 000c moveal %fp@(12),%a2 4bd20: 266e 0010 moveal %fp@(16),%a3 unsigned long result; char *end; if ( !n ) 4bd24: 4a8a tstl %a2 4bd26: 674e beqs 4bd76 return RTEMS_INVALID_ADDRESS; errno = 0; 4bd28: 4eb9 0004 d90c jsr 4d90c <__errno> 4bd2e: 2040 moveal %d0,%a0 4bd30: 4290 clrl %a0@ *n = 0; 4bd32: 4292 clrl %a2@ result = strtoul( s, &end, base ); 4bd34: 2f2e 0014 movel %fp@(20),%sp@- 4bd38: 486e fffc pea %fp@(-4) 4bd3c: 2f03 movel %d3,%sp@- 4bd3e: 4eb9 0005 084e jsr 5084e if ( endptr ) 4bd44: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); 4bd48: 2400 movel %d0,%d2 if ( endptr ) 4bd4a: 4a8b tstl %a3 4bd4c: 6704 beqs 4bd52 *endptr = end; 4bd4e: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4bd52: b6ae fffc cmpl %fp@(-4),%d3 4bd56: 6722 beqs 4bd7a return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4bd58: 4eb9 0004 d90c jsr 4d90c <__errno> 4bd5e: 7222 moveq #34,%d1 4bd60: 2040 moveal %d0,%a0 4bd62: b290 cmpl %a0@,%d1 4bd64: 660a bnes 4bd70 (( result == 0 ) || ( result == ULONG_MAX ))) 4bd66: 2002 movel %d2,%d0 4bd68: 5380 subql #1,%d0 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4bd6a: 72fd moveq #-3,%d1 4bd6c: b280 cmpl %d0,%d1 4bd6e: 650e bcss 4bd7e <== ALWAYS TAKEN (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 4bd70: 2482 movel %d2,%a2@ return RTEMS_SUCCESSFUL; 4bd72: 4280 clrl %d0 4bd74: 600a bras 4bd80 { unsigned long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4bd76: 7009 moveq #9,%d0 4bd78: 6006 bras 4bd80 if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 4bd7a: 700b moveq #11,%d0 4bd7c: 6002 bras 4bd80 if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; 4bd7e: 700a moveq #10,%d0 *n = result; return RTEMS_SUCCESSFUL; } 4bd80: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4bd86: 4e5e unlk %fp ... =============================================================================== 0004bc80 : const char *s, unsigned long long *n, char **endptr, int base ) { 4bc80: 4e56 ffe4 linkw %fp,#-28 4bc84: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4bc88: 282e 0008 movel %fp@(8),%d4 4bc8c: 246e 000c moveal %fp@(12),%a2 4bc90: 266e 0010 moveal %fp@(16),%a3 unsigned long long result; char *end; if ( !n ) 4bc94: 4a8a tstl %a2 4bc96: 6764 beqs 4bcfc return RTEMS_INVALID_ADDRESS; errno = 0; 4bc98: 4eb9 0004 d90c jsr 4d90c <__errno> 4bc9e: 2040 moveal %d0,%a0 *n = 0; 4bca0: 4280 clrl %d0 4bca2: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4bca4: 4290 clrl %a0@ *n = 0; 4bca6: 2480 movel %d0,%a2@ 4bca8: 2541 0004 movel %d1,%a2@(4) result = strtoull( s, &end, base ); 4bcac: 2f2e 0014 movel %fp@(20),%sp@- 4bcb0: 486e fffc pea %fp@(-4) 4bcb4: 2f04 movel %d4,%sp@- 4bcb6: 4eb9 0005 0870 jsr 50870 if ( endptr ) 4bcbc: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoull( s, &end, base ); 4bcc0: 2400 movel %d0,%d2 4bcc2: 2601 movel %d1,%d3 if ( endptr ) 4bcc4: 4a8b tstl %a3 4bcc6: 6704 beqs 4bccc *endptr = end; 4bcc8: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4bccc: b8ae fffc cmpl %fp@(-4),%d4 4bcd0: 672e beqs 4bd00 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4bcd2: 4eb9 0004 d90c jsr 4d90c <__errno> 4bcd8: 7222 moveq #34,%d1 4bcda: 2040 moveal %d0,%a0 4bcdc: b290 cmpl %a0@,%d1 4bcde: 6612 bnes 4bcf2 (( result == 0 ) || ( result == ULONG_LONG_MAX ))) 4bce0: 70ff moveq #-1,%d0 4bce2: 72ff moveq #-1,%d1 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4bce4: 78ff moveq #-1,%d4 4bce6: 7afd moveq #-3,%d5 (( result == 0 ) || ( result == ULONG_LONG_MAX ))) 4bce8: d283 addl %d3,%d1 4bcea: d182 addxl %d2,%d0 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4bcec: 9a81 subl %d1,%d5 4bcee: 9980 subxl %d0,%d4 4bcf0: 6512 bcss 4bd04 <== ALWAYS TAKEN (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 4bcf2: 4280 clrl %d0 if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 4bcf4: 2482 movel %d2,%a2@ 4bcf6: 2543 0004 movel %d3,%a2@(4) return RTEMS_SUCCESSFUL; 4bcfa: 600a bras 4bd06 { unsigned long long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4bcfc: 7009 moveq #9,%d0 4bcfe: 6006 bras 4bd06 if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; 4bd00: 700b moveq #11,%d0 4bd02: 6002 bras 4bd06 if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; 4bd04: 700a moveq #10,%d0 *n = result; return RTEMS_SUCCESSFUL; } 4bd06: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 4bd0c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004258c : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 4258c: 4e56 fe3c linkw %fp,#-452 42590: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 42594: 2e2e 0008 movel %fp@(8),%d7 int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 42598: 2f07 movel %d7,%sp@- 4259a: 4eb9 0004 fddc jsr 4fddc 425a0: 4297 clrl %sp@ 425a2: 486e ffe8 pea %fp@(-24) 425a6: 42a7 clrl %sp@- 425a8: 2f00 movel %d0,%sp@- 425aa: 2f07 movel %d7,%sp@- 425ac: 4eb9 0004 2fcc jsr 42fcc strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 425b2: 4fef 0014 lea %sp@(20),%sp int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 425b6: 2800 movel %d0,%d4 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 425b8: 6600 01a8 bnew 42762 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 425bc: 202e fff4 movel %fp@(-12),%d0 425c0: 0c80 0005 f830 cmpil #391216,%d0 425c6: 6710 beqs 425d8 425c8: 0c80 0006 0080 cmpil #393344,%d0 425ce: 6600 0192 bnew 42762 425d2: 6004 bras 425d8 <== NOT EXECUTED 425d4: 2443 moveal %d3,%a2 425d6: 602e bras 42606 hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 425d8: 2c0e movel %fp,%d6 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 425da: 2a0e movel %fp,%d5 * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { strcpy(full_filename, mountpoint); 425dc: 240e movel %fp,%d2 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 425de: 95ca subal %a2,%a2 hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 425e0: 0686 ffff ff70 addil #-144,%d6 425e6: 4bf9 0004 fee4 lea 4fee4 ,%a5 filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 425ec: 47f9 0004 94e8 lea 494e8 <_rtems_octal2ulong>,%a3 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 425f2: 0685 ffff ffd4 addil #-44,%d5 * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { strcpy(full_filename, mountpoint); 425f8: 0682 ffff fe70 addil #-400,%d2 425fe: 2d44 fe6c movel %d4,%fp@(-404) 42602: 2d47 fe66 movel %d7,%fp@(-410) /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 42606: 260a movel %a2,%d3 42608: 0683 0000 0200 addil #512,%d3 4260e: b6ae 0010 cmpl %fp@(16),%d3 42612: 6200 0152 bhiw 42766 /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) 42616: 4878 0005 pea 5 break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 4261a: d5ee 000c addal %fp@(12),%a2 offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) 4261e: 4879 0005 f878 pea 5f878 42624: 486a 0101 pea %a2@(257) 42628: 4eb9 0004 fdf4 jsr 4fdf4 4262e: 4fef 000c lea %sp@(12),%sp 42632: 4a80 tstl %d0 42634: 6600 0130 bnew 42766 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 42638: 4878 0063 pea 63 4263c: 2f0a movel %a2,%sp@- 4263e: 2f06 movel %d6,%sp@- 42640: 4e95 jsr %a5@ filename[MAX_NAME_FIELD_SIZE] = '\0'; 42642: 4200 clrb %d0 42644: 1d40 ffd3 moveb %d0,%fp@(-45) linkflag = hdr_ptr[156]; 42648: 122a 009c moveb %a2@(156),%d1 file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 4264c: 4878 0008 pea 8 42650: 486a 0064 pea %a2@(100) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; 42654: 1d41 fe6b moveb %d1,%fp@(-405) file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 42658: 4e93 jsr %a3@ file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 4265a: 4878 000c pea c strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 4265e: 2800 movel %d0,%d4 file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 42660: 486a 007c pea %a2@(124) 42664: 4e93 jsr %a3@ hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 42666: 4878 0008 pea 8 strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 4266a: 2840 moveal %d0,%a4 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 4266c: 486a 0094 pea %a2@(148) 42670: 4e93 jsr %a3@ if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 42672: 4fef 0020 lea %sp@(32),%sp filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 42676: 2e00 movel %d0,%d7 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 42678: 2e8a movel %a2,%sp@ 4267a: 4eb9 0004 952e jsr 4952e <_rtems_tar_header_checksum> 42680: 588f addql #4,%sp 42682: be80 cmpl %d0,%d7 42684: 6600 00e0 bnew 42766 * Generate an IMFS node depending on the file type. * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { 42688: 4280 clrl %d0 4268a: 102e fe6b moveb %fp@(-405),%d0 4268e: 7235 moveq #53,%d1 42690: b280 cmpl %d0,%d1 42692: 6656 bnes 426ea strcpy(full_filename, mountpoint); 42694: 2f2e fe66 movel %fp@(-410),%sp@- 42698: 2f02 movel %d2,%sp@- 4269a: 4eb9 0004 f930 jsr 4f930 if (full_filename[strlen(full_filename)-1] != '/') 426a0: 2f02 movel %d2,%sp@- 426a2: 4eb9 0004 fddc jsr 4fddc 426a8: 4fef 000c lea %sp@(12),%sp 426ac: 722f moveq #47,%d1 426ae: 41f6 0800 lea %fp@(00000000,%d0:l),%a0 426b2: 1028 fe6f moveb %a0@(-401),%d0 426b6: 49c0 extbl %d0 426b8: b280 cmpl %d0,%d1 426ba: 6710 beqs 426cc <== ALWAYS TAKEN strcat(full_filename, "/"); 426bc: 4879 0005 c7a9 pea 5c7a9 <_rodata_start+0x19> <== NOT EXECUTED 426c2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 426c4: 4eb9 0004 f818 jsr 4f818 <== NOT EXECUTED 426ca: 508f addql #8,%sp <== NOT EXECUTED strcat(full_filename, filename); 426cc: 2f06 movel %d6,%sp@- 426ce: 2f02 movel %d2,%sp@- 426d0: 4eb9 0004 f818 jsr 4f818 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 426d6: 4878 01ff pea 1ff 426da: 2f02 movel %d2,%sp@- 426dc: 4eb9 0004 3784 jsr 43784 426e2: 4fef 0010 lea %sp@(16),%sp 426e6: 6000 feec braw 425d4 * IMFS_create_node 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. */ else if (linkflag == REGTYPE) { 426ea: 7230 moveq #48,%d1 426ec: b280 cmpl %d0,%d1 426ee: 6600 fee4 bnew 425d4 const char *name; loc = root_loc; 426f2: 4878 0014 pea 14 426f6: 486e ffe8 pea %fp@(-24) 426fa: 2f05 movel %d5,%sp@- 426fc: 4eb9 0004 eda4 jsr 4eda4 if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 42702: 486e fffc pea %fp@(-4) 42706: 2f05 movel %d5,%sp@- 42708: 2f06 movel %d6,%sp@- 4270a: 4eb9 0004 9faa jsr 49faa 42710: 4fef 0018 lea %sp@(24),%sp 42714: 4a80 tstl %d0 42716: 6636 bnes 4274e <== NEVER TAKEN node = IMFS_create_node( 42718: 42a7 clrl %sp@- &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 4271a: 0284 0000 01ff andil #511,%d4 else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( 42720: 08c4 000f bset #15,%d4 42724: 2f04 movel %d4,%sp@- 42726: 2f2e fffc movel %fp@(-4),%sp@- 4272a: 4878 0006 pea 6 4272e: 2f05 movel %d5,%sp@- 42730: 4eb9 0004 9a64 jsr 49a64 IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; 42736: 4fef 0014 lea %sp@(20),%sp else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( 4273a: 2040 moveal %d0,%a0 IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; 4273c: 202e 000c movel %fp@(12),%d0 42740: d083 addl %d3,%d0 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; 42742: 214c 0050 movel %a4,%a0@(80) 42746: 42a8 004c clrl %a0@(76) node->info.linearfile.direct = &tar_image[offset]; 4274a: 2140 0054 movel %d0,%a0@(84) } nblocks = (((file_size) + 511) & ~511) / 512; 4274e: 200c movel %a4,%d0 42750: 0680 0000 01ff addil #511,%d0 offset += 512 * nblocks; 42756: 0280 ffff fe00 andil #-512,%d0 4275c: d680 addl %d0,%d3 4275e: 6000 fe74 braw 425d4 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; 42762: 78ff moveq #-1,%d4 42764: 6004 bras 4276a 42766: 282e fe6c movel %fp@(-404),%d4 nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 4276a: 2004 movel %d4,%d0 4276c: 4cee 3cfc fe3c moveml %fp@(-452),%d2-%d7/%a2-%a5 42772: 4e5e unlk %fp ... =============================================================================== 0004b8a0 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4b8a0: 4e56 ffe4 linkw %fp,#-28 4b8a4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4b8a8: 262e 0008 movel %fp@(8),%d3 4b8ac: 282e 000c movel %fp@(12),%d4 4b8b0: 286e 0010 moveal %fp@(16),%a4 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 4b8b4: 4a8c tstl %a4 4b8b6: 6700 0104 beqw 4b9bc return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4b8ba: 2679 0005 d6f4 moveal 5d6f4 <_Per_CPU_Information+0xc>,%a3 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4b8c0: 4a2b 0074 tstb %a3@(116) 4b8c4: 57c2 seq %d2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4b8c6: 246b 00fc moveal %a3@(252),%a2 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4b8ca: 49c2 extbl %d2 4b8cc: 0282 0000 0100 andil #256,%d2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4b8d2: 4aab 007a tstl %a3@(122) 4b8d6: 6704 beqs 4b8dc old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4b8d8: 08c2 0009 bset #9,%d2 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4b8dc: 4a2a 0008 tstb %a2@(8) 4b8e0: 57c5 seq %d5 old_mode |= _ISR_Get_level(); 4b8e2: 4eb9 0004 8a14 jsr 48a14 <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4b8e8: 49c5 extbl %d5 4b8ea: 0285 0000 0400 andil #1024,%d5 4b8f0: 8085 orl %d5,%d0 old_mode |= _ISR_Get_level(); 4b8f2: 8082 orl %d2,%d0 4b8f4: 2880 movel %d0,%a4@ *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4b8f6: 0804 0008 btst #8,%d4 4b8fa: 670c beqs 4b908 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4b8fc: 0803 0008 btst #8,%d3 4b900: 57c0 seq %d0 4b902: 4480 negl %d0 4b904: 1740 0074 moveb %d0,%a3@(116) if ( mask & RTEMS_TIMESLICE_MASK ) { 4b908: 0804 0009 btst #9,%d4 4b90c: 671c beqs 4b92a if ( _Modes_Is_timeslice(mode_set) ) { 4b90e: 0803 0009 btst #9,%d3 4b912: 6712 beqs 4b926 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4b914: 41f9 0005 d510 lea 5d510 <_Thread_Ticks_per_timeslice>,%a0 if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4b91a: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4b91c: 2750 0076 movel %a0@,%a3@(118) if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4b920: 2740 007a movel %d0,%a3@(122) 4b924: 6004 bras 4b92a executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4b926: 42ab 007a clrl %a3@(122) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4b92a: 7007 moveq #7,%d0 4b92c: c084 andl %d4,%d0 4b92e: 6712 beqs 4b942 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4b930: 40c0 movew %sr,%d0 */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 4b932: 7207 moveq #7,%d1 4b934: c283 andl %d3,%d1 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4b936: 0280 0000 f8ff andil #63743,%d0 4b93c: e189 lsll #8,%d1 4b93e: 8081 orl %d1,%d0 4b940: 46c0 movew %d0,%sr * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4b942: 0804 000a btst #10,%d4 4b946: 6740 beqs 4b988 is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 4b948: 4281 clrl %d1 4b94a: 122a 0008 moveb %a2@(8),%d1 4b94e: 4282 clrl %d2 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4b950: 0803 000a btst #10,%d3 4b954: 57c0 seq %d0 4b956: 4480 negl %d0 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 4b958: 1400 moveb %d0,%d2 4b95a: b282 cmpl %d2,%d1 4b95c: 672a beqs 4b988 asr->is_enabled = is_asr_enabled; 4b95e: 1540 0008 moveb %d0,%a2@(8) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4b962: 203c 0000 0700 movel #1792,%d0 4b968: 40c1 movew %sr,%d1 4b96a: 8081 orl %d1,%d0 4b96c: 46c0 movew %d0,%sr _signals = information->signals_pending; 4b96e: 202a 0016 movel %a2@(22),%d0 information->signals_pending = information->signals_posted; 4b972: 256a 0012 0016 movel %a2@(18),%a2@(22) information->signals_posted = _signals; 4b978: 2540 0012 movel %d0,%a2@(18) _ISR_Enable( _level ); 4b97c: 46c1 movew %d1,%sr /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 4b97e: 4aaa 0012 tstl %a2@(18) 4b982: 56c0 sne %d0 4b984: 4480 negl %d0 4b986: 6002 bras 4b98a 4b988: 4200 clrb %d0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 4b98a: 7203 moveq #3,%d1 4b98c: b2b9 0005 d6a0 cmpl 5d6a0 <_System_state_Current>,%d1 4b992: 662c bnes 4b9c0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 4b994: 2079 0005 d6f4 moveal 5d6f4 <_Per_CPU_Information+0xc>,%a0 if ( are_signals_pending || 4b99a: 4a00 tstb %d0 4b99c: 660e bnes 4b9ac 4b99e: b1f9 0005 d6f8 cmpal 5d6f8 <_Per_CPU_Information+0x10>,%a0 4b9a4: 671a beqs 4b9c0 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 4b9a6: 4a28 0074 tstb %a0@(116) 4b9aa: 6714 beqs 4b9c0 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 4b9ac: 7001 moveq #1,%d0 4b9ae: 13c0 0005 d700 moveb %d0,5d700 <_Per_CPU_Information+0x18> if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 4b9b4: 4eb9 0004 78f8 jsr 478f8 <_Thread_Dispatch> 4b9ba: 6004 bras 4b9c0 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 4b9bc: 7009 moveq #9,%d0 4b9be: 6002 bras 4b9c2 if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 4b9c0: 4280 clrl %d0 } 4b9c2: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4b9c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004952c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4952c: 4e56 fffc linkw %fp,#-4 49530: 2f0a movel %a2,%sp@- 49532: 246e 0010 moveal %fp@(16),%a2 49536: 2f02 movel %d2,%sp@- 49538: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4953c: 670c beqs 4954a RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 4953e: 4280 clrl %d0 49540: 1039 0005 f572 moveb 5f572 ,%d0 49546: b082 cmpl %d2,%d0 49548: 654e bcss 49598 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4954a: 4a8a tstl %a2 4954c: 674e beqs 4959c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4954e: 486e fffc pea %fp@(-4) 49552: 2f2e 0008 movel %fp@(8),%sp@- 49556: 4eb9 0004 b4f4 jsr 4b4f4 <_Thread_Get> switch ( location ) { 4955c: 508f addql #8,%sp return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4955e: 2040 moveal %d0,%a0 switch ( location ) { 49560: 4aae fffc tstl %fp@(-4) 49564: 663a bnes 495a0 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 49566: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4956a: 4a82 tstl %d2 4956c: 6720 beqs 4958e the_thread->real_priority = new_priority; 4956e: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 49572: 4aa8 001c tstl %a0@(28) 49576: 6706 beqs 4957e 49578: b4a8 0014 cmpl %a0@(20),%d2 4957c: 6410 bccs 4958e <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 4957e: 42a7 clrl %sp@- 49580: 2f02 movel %d2,%sp@- 49582: 2f08 movel %a0,%sp@- 49584: 4eb9 0004 b0b0 jsr 4b0b0 <_Thread_Change_priority> 4958a: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 4958e: 4eb9 0004 b4ce jsr 4b4ce <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 49594: 4280 clrl %d0 49596: 600a bras 495a2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 49598: 7013 moveq #19,%d0 4959a: 6006 bras 495a2 if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 4959c: 7009 moveq #9,%d0 4959e: 6002 bras 495a2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 495a0: 7004 moveq #4,%d0 } 495a2: 242e fff4 movel %fp@(-12),%d2 495a6: 246e fff8 moveal %fp@(-8),%a2 495aa: 4e5e unlk %fp ... =============================================================================== 000468d4 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 468d4: 4e56 fffc linkw %fp,#-4 468d8: 2f0a movel %a2,%sp@- 468da: 246e 0010 moveal %fp@(16),%a2 468de: 2f02 movel %d2,%sp@- 468e0: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 468e4: 6742 beqs 46928 return RTEMS_INVALID_ADDRESS; if ( !result ) 468e6: 4a8a tstl %a2 468e8: 673e beqs 46928 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 468ea: 486e fffc pea %fp@(-4) 468ee: 2f2e 0008 movel %fp@(8),%sp@- 468f2: 4eb9 0004 8634 jsr 48634 <_Thread_Get> switch (location) { 468f8: 508f addql #8,%sp 468fa: 4aae fffc tstl %fp@(-4) 468fe: 662c bnes 4692c case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 46900: 2240 moveal %d0,%a1 46902: 2069 0108 moveal %a1@(264),%a0 while (tvp) { 46906: 6016 bras 4691e if (tvp->ptr == ptr) { 46908: b4a8 0004 cmpl %a0@(4),%d2 4690c: 660e bnes 4691c /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 4690e: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 46912: 4eb9 0004 860e jsr 4860e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 46918: 4280 clrl %d0 4691a: 6012 bras 4692e } tvp = (rtems_task_variable_t *)tvp->next; 4691c: 2050 moveal %a0@,%a0 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 4691e: 4a88 tstl %a0 46920: 66e6 bnes 46908 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 46922: 4eb9 0004 860e jsr 4860e <_Thread_Enable_dispatch> if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 46928: 7009 moveq #9,%d0 4692a: 6002 bras 4692e #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4692c: 7004 moveq #4,%d0 } 4692e: 242e fff4 movel %fp@(-12),%d2 46932: 246e fff8 moveal %fp@(-8),%a2 46936: 4e5e unlk %fp ... =============================================================================== 0004692c : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 4692c: 4e56 0000 linkw %fp,#0 46930: 2f0a movel %a2,%sp@- 46932: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval seconds; if ( !_TOD_Is_set ) 46936: 4a39 0005 eb20 tstb 5eb20 <_TOD_Is_set> 4693c: 6700 0096 beqw 469d4 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 46940: 4a8a tstl %a2 46942: 6700 0094 beqw 469d8 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 46946: 42aa 0018 clrl %a2@(24) if ( !_TOD_Validate( time_buffer ) ) 4694a: 2f0a movel %a2,%sp@- 4694c: 4eb9 0004 5de0 jsr 45de0 <_TOD_Validate> 46952: 588f addql #4,%sp 46954: 4a00 tstb %d0 46956: 6700 0084 beqw 469dc return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 4695a: 2f0a movel %a2,%sp@- 4695c: 4eb9 0004 5d44 jsr 45d44 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 46962: 588f addql #4,%sp time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 46964: 2440 moveal %d0,%a2 if ( seconds <= _TOD_Seconds_since_epoch() ) 46966: b0b9 0005 eb9a cmpl 5eb9a <_TOD_Now>,%d0 4696c: 636e blss 469dc <== NEVER TAKEN 4696e: 2039 0005 eb10 movel 5eb10 <_Thread_Dispatch_disable_level>,%d0 46974: 5280 addql #1,%d0 46976: 23c0 0005 eb10 movel %d0,5eb10 <_Thread_Dispatch_disable_level> return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 4697c: 4878 0010 pea 10 46980: 2f39 0005 ecac movel 5ecac <_Per_CPU_Information+0xc>,%sp@- 46986: 4eb9 0004 8dc4 jsr 48dc4 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 4698c: 2079 0005 ecac moveal 5ecac <_Per_CPU_Information+0xc>,%a0 NULL ); _Watchdog_Insert_seconds( 46992: 95f9 0005 eb9a subal 5eb9a <_TOD_Now>,%a2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46998: 223c 0004 84e4 movel #296164,%d1 if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( 4699e: 2028 0008 movel %a0@(8),%d0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 469a2: 42a8 0050 clrl %a0@(80) the_watchdog->routine = routine; the_watchdog->id = id; 469a6: 2140 0068 movel %d0,%a0@(104) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 469aa: 2141 0064 movel %d1,%a0@(100) the_watchdog->id = id; the_watchdog->user_data = user_data; 469ae: 42a8 006c clrl %a0@(108) &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_seconds( 469b2: 214a 0054 movel %a2,%a0@(84) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 469b6: 4868 0048 pea %a0@(72) 469ba: 4879 0005 ebc4 pea 5ebc4 <_Watchdog_Seconds_chain> 469c0: 4eb9 0004 9314 jsr 49314 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 469c6: 4eb9 0004 865e jsr 4865e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 469cc: 4fef 0010 lea %sp@(16),%sp 469d0: 4280 clrl %d0 469d2: 600a bras 469de ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 469d4: 700b moveq #11,%d0 469d6: 6006 bras 469de if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 469d8: 7009 moveq #9,%d0 469da: 6002 bras 469de return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 469dc: 7014 moveq #20,%d0 &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 469de: 246e fffc moveal %fp@(-4),%a2 469e2: 4e5e unlk %fp ... =============================================================================== 00044f00 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44f00: 7209 moveq #9,%d1 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 44f02: 4e56 0000 linkw %fp,#0 44f06: 202e 0008 movel %fp@(8),%d0 int baud_index; switch (termios_baud) { 44f0a: b280 cmpl %d0,%d1 44f0c: 6700 00c4 beqw 44fd2 44f10: 6d50 blts 44f62 44f12: 123c 0004 moveb #4,%d1 44f16: b280 cmpl %d0,%d1 44f18: 6700 00a4 beqw 44fbe 44f1c: 6d28 blts 44f46 44f1e: 123c 0001 moveb #1,%d1 44f22: b280 cmpl %d0,%d1 44f24: 6700 00dc beqw 45002 44f28: 6d0a blts 44f34 44f2a: 4a80 tstl %d0 44f2c: 6700 0084 beqw 44fb2 44f30: 6000 00cc braw 44ffe 44f34: 7202 moveq #2,%d1 44f36: b280 cmpl %d0,%d1 44f38: 677c beqs 44fb6 44f3a: 123c 0003 moveb #3,%d1 44f3e: b280 cmpl %d0,%d1 44f40: 6600 00bc bnew 44ffe 44f44: 6074 bras 44fba 44f46: 7206 moveq #6,%d1 44f48: b280 cmpl %d0,%d1 44f4a: 677a beqs 44fc6 44f4c: 6e74 bgts 44fc2 44f4e: 123c 0007 moveb #7,%d1 44f52: b280 cmpl %d0,%d1 44f54: 6774 beqs 44fca 44f56: 123c 0008 moveb #8,%d1 44f5a: b280 cmpl %d0,%d1 44f5c: 6600 00a0 bnew 44ffe 44f60: 606c bras 44fce 44f62: 720e moveq #14,%d1 44f64: b280 cmpl %d0,%d1 44f66: 677e beqs 44fe6 44f68: 6d1c blts 44f86 44f6a: 123c 000b moveb #11,%d1 44f6e: b280 cmpl %d0,%d1 44f70: 6768 beqs 44fda 44f72: 6e62 bgts 44fd6 44f74: 123c 000c moveb #12,%d1 44f78: b280 cmpl %d0,%d1 44f7a: 6762 beqs 44fde 44f7c: 123c 000d moveb #13,%d1 44f80: b280 cmpl %d0,%d1 44f82: 667a bnes 44ffe <== NEVER TAKEN 44f84: 605c bras 44fe2 44f86: 0c80 0000 1002 cmpil #4098,%d0 44f8c: 6764 beqs 44ff2 44f8e: 6e10 bgts 44fa0 44f90: 720f moveq #15,%d1 44f92: b280 cmpl %d0,%d1 44f94: 6754 beqs 44fea 44f96: 0c80 0000 1001 cmpil #4097,%d0 44f9c: 6660 bnes 44ffe <== NEVER TAKEN 44f9e: 604e bras 44fee 44fa0: 0c80 0000 1003 cmpil #4099,%d0 44fa6: 674e beqs 44ff6 44fa8: 0c80 0000 1004 cmpil #4100,%d0 44fae: 664e bnes 44ffe <== NEVER TAKEN 44fb0: 6048 bras 44ffa case B0: baud_index = 0; break; 44fb2: 4280 clrl %d0 44fb4: 604e bras 45004 case B50: baud_index = 1; break; case B75: baud_index = 2; break; 44fb6: 7002 moveq #2,%d0 44fb8: 604a bras 45004 case B110: baud_index = 3; break; 44fba: 7003 moveq #3,%d0 44fbc: 6046 bras 45004 case B134: baud_index = 4; break; 44fbe: 7004 moveq #4,%d0 44fc0: 6042 bras 45004 case B150: baud_index = 5; break; 44fc2: 7005 moveq #5,%d0 44fc4: 603e bras 45004 case B200: baud_index = 6; break; 44fc6: 7006 moveq #6,%d0 44fc8: 603a bras 45004 case B300: baud_index = 7; break; 44fca: 7007 moveq #7,%d0 44fcc: 6036 bras 45004 case B600: baud_index = 8; break; 44fce: 7008 moveq #8,%d0 44fd0: 6032 bras 45004 case B1200: baud_index = 9; break; 44fd2: 7009 moveq #9,%d0 44fd4: 602e bras 45004 case B1800: baud_index = 10; break; 44fd6: 700a moveq #10,%d0 44fd8: 602a bras 45004 case B2400: baud_index = 11; break; 44fda: 700b moveq #11,%d0 44fdc: 6026 bras 45004 case B4800: baud_index = 12; break; 44fde: 700c moveq #12,%d0 44fe0: 6022 bras 45004 case B9600: baud_index = 13; break; 44fe2: 700d moveq #13,%d0 44fe4: 601e bras 45004 case B19200: baud_index = 14; break; 44fe6: 700e moveq #14,%d0 44fe8: 601a bras 45004 case B38400: baud_index = 15; break; 44fea: 700f moveq #15,%d0 44fec: 6016 bras 45004 case B57600: baud_index = 16; break; 44fee: 7010 moveq #16,%d0 44ff0: 6012 bras 45004 case B115200: baud_index = 17; break; 44ff2: 7011 moveq #17,%d0 44ff4: 600e bras 45004 case B230400: baud_index = 18; break; 44ff6: 7012 moveq #18,%d0 44ff8: 600a bras 45004 case B460800: baud_index = 19; break; 44ffa: 7013 moveq #19,%d0 44ffc: 6006 bras 45004 default: baud_index = -1; break; 44ffe: 70ff moveq #-1,%d0 45000: 6002 bras 45004 { int baud_index; switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; 45002: 7001 moveq #1,%d0 case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 45004: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043c0c : } } rtems_status_code rtems_termios_close (void *arg) { 43c0c: 4e56 fff4 linkw %fp,#-12 43c10: 48d7 1c00 moveml %a2-%a4,%sp@ 43c14: 266e 0008 moveal %fp@(8),%a3 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain( 43c18: 49f9 0004 5854 lea 45854 ,%a4 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 43c1e: 2053 moveal %a3@,%a0 43c20: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain( 43c24: 42a7 clrl %sp@- 43c26: 42a7 clrl %sp@- 43c28: 2f39 0005 d44c movel 5d44c ,%sp@- 43c2e: 4e94 jsr %a4@ rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43c30: 4fef 000c lea %sp@(12),%sp 43c34: 4a80 tstl %d0 43c36: 667c bnes 43cb4 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 43c38: 202a 0008 movel %a2@(8),%d0 43c3c: 5380 subql #1,%d0 43c3e: 2540 0008 movel %d0,%a2@(8) 43c42: 6600 011c bnew 43d60 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 43c46: 202a 00cc movel %a2@(204),%d0 43c4a: eb88 lsll #5,%d0 43c4c: 0680 0005 cc14 addil #379924,%d0 43c52: 2240 moveal %d0,%a1 43c54: 2051 moveal %a1@,%a0 43c56: 4a88 tstl %a0 43c58: 6708 beqs 43c62 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 43c5a: 2f0a movel %a2,%sp@- 43c5c: 4e90 jsr %a0@ 43c5e: 588f addql #4,%sp 43c60: 6024 bras 43c86 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43c62: 42a7 clrl %sp@- 43c64: 42a7 clrl %sp@- 43c66: 2f2a 0018 movel %a2@(24),%sp@- 43c6a: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) { 43c6c: 4fef 000c lea %sp@(12),%sp 43c70: 4a80 tstl %d0 43c72: 6640 bnes 43cb4 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 43c74: 2f0a movel %a2,%sp@- 43c76: 4eba fb48 jsr %pc@(437c0 ) rtems_semaphore_release (tty->osem); 43c7a: 2f2a 0018 movel %a2@(24),%sp@- 43c7e: 4eb9 0004 595c jsr 4595c 43c84: 508f addql #8,%sp } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 43c86: 7002 moveq #2,%d0 43c88: b0aa 00b4 cmpl %a2@(180),%d0 43c8c: 662e bnes 43cbc /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 43c8e: 4878 0001 pea 1 43c92: 49f9 0004 5404 lea 45404 ,%a4 43c98: 2f2a 00c4 movel %a2@(196),%sp@- 43c9c: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 43c9e: 508f addql #8,%sp 43ca0: 4a80 tstl %d0 43ca2: 6610 bnes 43cb4 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 43ca4: 4878 0001 pea 1 43ca8: 2f2a 00c8 movel %a2@(200),%sp@- 43cac: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 43cae: 508f addql #8,%sp 43cb0: 4a80 tstl %d0 43cb2: 6708 beqs 43cbc <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 43cb4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43cb6: 4eb9 0004 5ef8 jsr 45ef8 <== NOT EXECUTED } if (tty->device.lastClose) 43cbc: 206a 009c moveal %a2@(156),%a0 43cc0: 4a88 tstl %a0 43cc2: 6710 beqs 43cd4 (*tty->device.lastClose)(tty->major, tty->minor, arg); 43cc4: 2f0b movel %a3,%sp@- 43cc6: 2f2a 0010 movel %a2@(16),%sp@- 43cca: 2f2a 000c movel %a2@(12),%sp@- 43cce: 4e90 jsr %a0@ 43cd0: 4fef 000c lea %sp@(12),%sp if (tty->forw == NULL) { 43cd4: 2052 moveal %a2@,%a0 43cd6: 4a88 tstl %a0 43cd8: 6610 bnes 43cea rtems_termios_ttyTail = tty->back; 43cda: 206a 0004 moveal %a2@(4),%a0 43cde: 23c8 0005 d450 movel %a0,5d450 if ( rtems_termios_ttyTail != NULL ) { 43ce4: 670a beqs 43cf0 rtems_termios_ttyTail->forw = NULL; 43ce6: 4290 clrl %a0@ 43ce8: 6006 bras 43cf0 } } else { tty->forw->back = tty->back; 43cea: 216a 0004 0004 movel %a2@(4),%a0@(4) } if (tty->back == NULL) { 43cf0: 206a 0004 moveal %a2@(4),%a0 43cf4: 4a88 tstl %a0 43cf6: 6610 bnes 43d08 rtems_termios_ttyHead = tty->forw; 43cf8: 2052 moveal %a2@,%a0 43cfa: 23c8 0005 d454 movel %a0,5d454 if ( rtems_termios_ttyHead != NULL ) { 43d00: 6708 beqs 43d0a rtems_termios_ttyHead->back = NULL; 43d02: 42a8 0004 clrl %a0@(4) 43d06: 6002 bras 43d0a } } else { tty->back->forw = tty->forw; 43d08: 2092 movel %a2@,%a0@ } rtems_semaphore_delete (tty->isem); 43d0a: 2f2a 0014 movel %a2@(20),%sp@- 43d0e: 47f9 0004 57b8 lea 457b8 ,%a3 43d14: 4e93 jsr %a3@ rtems_semaphore_delete (tty->osem); 43d16: 2f2a 0018 movel %a2@(24),%sp@- 43d1a: 4e93 jsr %a3@ rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 43d1c: 2f2a 008c movel %a2@(140),%sp@- 43d20: 4e93 jsr %a3@ if ((tty->device.pollRead == NULL) || 43d22: 4fef 000c lea %sp@(12),%sp 43d26: 4aaa 00a0 tstl %a2@(160) 43d2a: 6708 beqs 43d34 43d2c: 7002 moveq #2,%d0 43d2e: b0aa 00b4 cmpl %a2@(180),%d0 43d32: 660c bnes 43d40 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 43d34: 2f2a 0068 movel %a2@(104),%sp@- 43d38: 4eb9 0004 57b8 jsr 457b8 43d3e: 588f addql #4,%sp free (tty->rawInBuf.theBuf); 43d40: 2f2a 0058 movel %a2@(88),%sp@- 43d44: 47f9 0004 29ec lea 429ec ,%a3 43d4a: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 43d4c: 2f2a 007c movel %a2@(124),%sp@- 43d50: 4e93 jsr %a3@ free (tty->cbuf); 43d52: 2f2a 001c movel %a2@(28),%sp@- 43d56: 4e93 jsr %a3@ free (tty); 43d58: 2f0a movel %a2,%sp@- 43d5a: 4e93 jsr %a3@ 43d5c: 4fef 0010 lea %sp@(16),%sp } rtems_semaphore_release (rtems_termios_ttyMutex); 43d60: 2f39 0005 d44c movel 5d44c ,%sp@- 43d66: 4eb9 0004 595c jsr 4595c return RTEMS_SUCCESSFUL; } 43d6c: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 43d72: 4280 clrl %d0 43d74: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044f64 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 44f64: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 44f68: 202e 000c movel %fp@(12),%d0 * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 44f6c: 206e 0008 moveal %fp@(8),%a0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 44f70: d1a8 0090 addl %d0,%a0@(144) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44f74: 7002 moveq #2,%d0 44f76: b0a8 00b4 cmpl %a0@(180),%d0 44f7a: 661c bnes 44f98 /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 44f7c: 4878 0002 pea 2 44f80: 2f28 00c8 movel %a0@(200),%sp@- 44f84: 4eb9 0004 5404 jsr 45404 if (sc != RTEMS_SUCCESSFUL) 44f8a: 508f addql #8,%sp 44f8c: 4a80 tstl %d0 44f8e: 672e beqs 44fbe <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 44f90: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44f92: 4eb9 0004 5ef8 jsr 45ef8 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 44f98: 7005 moveq #5,%d0 44f9a: b0a8 00cc cmpl %a0@(204),%d0 44f9e: 6612 bnes 44fb2 /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 44fa0: 2279 0005 ccc4 moveal 5ccc4 ,%a1 44fa6: 4a89 tstl %a1 44fa8: 6714 beqs 44fbe <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 44faa: 2f08 movel %a0,%sp@- 44fac: 4e91 jsr %a1@ 44fae: 588f addql #4,%sp 44fb0: 600c bras 44fbe } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 44fb2: 2d48 0008 movel %a0,%fp@(8) } 44fb6: 4e5e unlk %fp rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 44fb8: 4ef9 0004 4d48 jmp 44d48 } 44fbe: 4280 clrl %d0 44fc0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044a88 : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 44a88: 4e56 ffd0 linkw %fp,#-48 44a8c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 44a90: 246e 0008 moveal %fp@(8),%a2 char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 44a94: 202a 00cc movel %a2@(204),%d0 44a98: eb88 lsll #5,%d0 * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 44a9a: 266e 000c moveal %fp@(12),%a3 char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 44a9e: 0680 0005 cc20 addil #379936,%d0 44aa4: 2040 moveal %d0,%a0 * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 44aa6: 242e 0010 movel %fp@(16),%d2 char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 44aaa: 4a90 tstl %a0@ 44aac: 6630 bnes 44ade 44aae: 2802 movel %d2,%d4 44ab0: 4282 clrl %d2 /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 44ab2: 4bea 0030 lea %a2@(48),%a5 if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 44ab6: 49ea 004a lea %a2@(74),%a4 char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 44aba: 4206 clrb %d6 44abc: 6000 01f4 braw 44cb2 while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 44ac0: 202a 00cc movel %a2@(204),%d0 44ac4: 5382 subql #1,%d2 44ac6: 2f0a movel %a2,%sp@- 44ac8: 121b moveb %a3@+,%d1 44aca: eb88 lsll #5,%d0 44acc: 49c1 extbl %d1 44ace: 0680 0005 cc20 addil #379936,%d0 44ad4: 2240 moveal %d0,%a1 44ad6: 2f01 movel %d1,%sp@- 44ad8: 2051 moveal %a1@,%a0 44ada: 4e90 jsr %a0@ 44adc: 508f addql #8,%sp int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 44ade: 4a82 tstl %d2 44ae0: 66de bnes 44ac0 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 44ae2: 4aaa 00e4 tstl %a2@(228) 44ae6: 6600 01e2 bnew 44cca 44aea: 206a 00dc moveal %a2@(220),%a0 44aee: 4a88 tstl %a0 44af0: 6700 01d8 beqw 44cca (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 44af4: 2f2a 00e0 movel %a2@(224),%sp@- 44af8: 486a 0030 pea %a2@(48) 44afc: 4e90 jsr %a0@ tty->tty_rcvwakeup = 1; 44afe: 508f addql #8,%sp 44b00: 7001 moveq #1,%d0 44b02: 2540 00e4 movel %d0,%a2@(228) 44b06: 6000 01c4 braw 44ccc while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 44b0a: 202a 00b8 movel %a2@(184),%d0 } return 0; } while (len--) { c = *buf++; 44b0e: 1e1b moveb %a3@+,%d7 /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 44b10: 0800 0009 btst #9,%d0 44b14: 6740 beqs 44b56 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 44b16: 4283 clrl %d3 44b18: 162a 004a moveb %a2@(74),%d3 44b1c: 4281 clrl %d1 44b1e: 122a 0049 moveb %a2@(73),%d1 44b22: 1007 moveb %d7,%d0 44b24: 49c0 extbl %d0 44b26: b680 cmpl %d0,%d3 44b28: 661e bnes 44b48 if (c == tty->termios.c_cc[VSTART]) { 44b2a: b280 cmpl %d0,%d1 44b2c: 660a bnes 44b38 <== ALWAYS TAKEN /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 44b2e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44b32: 7210 moveq #16,%d1 <== NOT EXECUTED 44b34: b380 eorl %d1,%d0 <== NOT EXECUTED 44b36: 6008 bras 44b40 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 44b38: 202a 00b8 movel %a2@(184),%d0 44b3c: 7a10 moveq #16,%d5 44b3e: 8085 orl %d5,%d0 44b40: 2540 00b8 movel %d0,%a2@(184) * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 44b44: 7c01 moveq #1,%d6 44b46: 6012 bras 44b5a /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 44b48: b280 cmpl %d0,%d1 44b4a: 660a bnes 44b56 <== ALWAYS TAKEN /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 44b4c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44b50: 72ef moveq #-17,%d1 <== NOT EXECUTED 44b52: c081 andl %d1,%d0 <== NOT EXECUTED 44b54: 60ea bras 44b40 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 44b56: 4a06 tstb %d6 44b58: 6750 beqs 44baa <== ALWAYS TAKEN /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 44b5a: 202a 00b8 movel %a2@(184),%d0 44b5e: 7a30 moveq #48,%d5 44b60: 7220 moveq #32,%d1 44b62: c085 andl %d5,%d0 44b64: b280 cmpl %d0,%d1 44b66: 6600 0148 bnew 44cb0 /* disable interrupts */ rtems_interrupt_disable(level); 44b6a: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 44b70: 40c3 movew %sr,%d3 <== NOT EXECUTED 44b72: 8083 orl %d3,%d0 <== NOT EXECUTED 44b74: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 44b76: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44b7a: 7adf moveq #-33,%d5 <== NOT EXECUTED 44b7c: c085 andl %d5,%d0 <== NOT EXECUTED 44b7e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 44b82: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 44b86: 671c beqs 44ba4 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 44b88: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( 44b8c: 4878 0001 pea 1 <== NOT EXECUTED 44b90: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 44b94: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44b96: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44b9a: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44b9e: 4e90 jsr %a0@ <== NOT EXECUTED 44ba0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 44ba4: 46c3 movew %d3,%sr <== NOT EXECUTED 44ba6: 6000 0108 braw 44cb0 <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 44baa: 222a 0060 movel %a2@(96),%d1 44bae: 5281 addql #1,%d1 44bb0: 202a 0064 movel %a2@(100),%d0 44bb4: 4c40 1003 remul %d0,%d3,%d1 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 44bb8: 203c 0000 0700 movel #1792,%d0 44bbe: 40c1 movew %sr,%d1 44bc0: 8081 orl %d1,%d0 44bc2: 46c0 movew %d0,%sr 44bc4: 2d41 fffc movel %d1,%fp@(-4) if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 44bc8: 206a 005c moveal %a2@(92),%a0 44bcc: 202a 0064 movel %a2@(100),%d0 44bd0: 9088 subl %a0,%d0 44bd2: 2240 moveal %d0,%a1 44bd4: d3c3 addal %d3,%a1 % tty->rawInBuf.Size) > tty->highwater) && 44bd6: 2009 movel %a1,%d0 44bd8: 2a2a 0064 movel %a2@(100),%d5 44bdc: 4c45 0001 remul %d5,%d1,%d0 44be0: 2d45 fff8 movel %d5,%fp@(-8) } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 44be4: b2aa 00c0 cmpl %a2@(192),%d1 44be8: 6300 008a blsw 44c74 % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 44bec: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) % tty->rawInBuf.Size) > tty->highwater) && 44bf0: 0800 0000 btst #0,%d0 <== NOT EXECUTED 44bf4: 667e bnes 44c74 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 44bf6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44bfa: 7a01 moveq #1,%d5 <== NOT EXECUTED 44bfc: 8085 orl %d5,%d0 <== NOT EXECUTED 44bfe: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 44c02: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44c06: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 44c0c: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 44c12: 6632 bnes 44c46 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || 44c14: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44c18: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44c1c: 6606 bnes 44c24 <== NOT EXECUTED 44c1e: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 44c22: 6650 bnes 44c74 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 44c24: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44c28: 7202 moveq #2,%d1 <== NOT EXECUTED 44c2a: 8081 orl %d1,%d0 <== NOT EXECUTED 44c2c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 44c30: 4878 0001 pea 1 <== NOT EXECUTED 44c34: 2f0c movel %a4,%sp@- <== NOT EXECUTED 44c36: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44c3a: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44c3e: 4e90 jsr %a0@ <== NOT EXECUTED 44c40: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44c44: 602e bras 44c74 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 44c46: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44c4a: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 44c50: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 44c56: 661c bnes 44c74 <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; 44c58: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44c5c: 7a04 moveq #4,%d5 <== NOT EXECUTED 44c5e: 8085 orl %d5,%d0 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 44c60: 206a 00ac moveal %a2@(172),%a0 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { tty->flow_ctrl |= FL_IRTSOFF; 44c64: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 44c68: 4a88 tstl %a0 <== NOT EXECUTED 44c6a: 6708 beqs 44c74 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 44c6c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44c70: 4e90 jsr %a0@ <== NOT EXECUTED 44c72: 588f addql #4,%sp <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 44c74: 202e fffc movel %fp@(-4),%d0 44c78: 46c0 movew %d0,%sr if (newTail == tty->rawInBuf.Head) { 44c7a: 202a 005c movel %a2@(92),%d0 44c7e: b083 cmpl %d3,%d0 44c80: 6604 bnes 44c86 <== ALWAYS TAKEN dropped++; 44c82: 5282 addql #1,%d2 <== NOT EXECUTED 44c84: 602a bras 44cb0 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 44c86: 206a 0058 moveal %a2@(88),%a0 44c8a: 1187 3800 moveb %d7,%a0@(00000000,%d3:l) tty->rawInBuf.Tail = newTail; 44c8e: 2543 0060 movel %d3,%a2@(96) /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 44c92: 4aaa 00e4 tstl %a2@(228) 44c96: 6618 bnes 44cb0 <== NEVER TAKEN 44c98: 206a 00dc moveal %a2@(220),%a0 44c9c: 4a88 tstl %a0 44c9e: 6710 beqs 44cb0 <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 44ca0: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED 44ca4: 2f0d movel %a5,%sp@- <== NOT EXECUTED 44ca6: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 44ca8: 508f addql #8,%sp <== NOT EXECUTED 44caa: 7201 moveq #1,%d1 <== NOT EXECUTED 44cac: 2541 00e4 movel %d1,%a2@(228) <== NOT EXECUTED 44cb0: 5384 subql #1,%d4 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 44cb2: 4a84 tstl %d4 44cb4: 6600 fe54 bnew 44b0a } } } } tty->rawInBufDropped += dropped; 44cb8: d5aa 0078 addl %d2,%a2@(120) rtems_semaphore_release (tty->rawInBuf.Semaphore); 44cbc: 2f2a 0068 movel %a2@(104),%sp@- 44cc0: 4eb9 0004 595c jsr 4595c return dropped; 44cc6: 588f addql #4,%sp 44cc8: 6002 bras 44ccc */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; } return 0; 44cca: 4282 clrl %d2 <== NOT EXECUTED } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 44ccc: 2002 movel %d2,%d0 44cce: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 44cd4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043da0 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 43da0: 4e56 ffec linkw %fp,#-20 43da4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 43da8: 266e 0008 moveal %fp@(8),%a3 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 43dac: 2053 moveal %a3@,%a0 43dae: 2468 0034 moveal %a0@(52),%a2 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 43db2: 286b 0008 moveal %a3@(8),%a4 rtems_status_code sc; args->ioctl_return = 0; 43db6: 42ab 000c clrl %a3@(12) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43dba: 42a7 clrl %sp@- 43dbc: 42a7 clrl %sp@- 43dbe: 2f2a 0018 movel %a2@(24),%sp@- 43dc2: 4eb9 0004 5854 jsr 45854 if (sc != RTEMS_SUCCESSFUL) { 43dc8: 4fef 000c lea %sp@(12),%sp struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43dcc: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 43dce: 6708 beqs 43dd8 <== ALWAYS TAKEN args->ioctl_return = sc; 43dd0: 2740 000c movel %d0,%a3@(12) <== NOT EXECUTED return sc; 43dd4: 6000 02d0 braw 440a6 <== NOT EXECUTED } switch (args->command) { 43dd8: 202b 0004 movel %a3@(4),%d0 43ddc: 7204 moveq #4,%d1 43dde: b280 cmpl %d0,%d1 43de0: 6700 0230 beqw 44012 43de4: 6514 bcss 43dfa 43de6: 7602 moveq #2,%d3 43de8: b680 cmpl %d0,%d3 43dea: 6774 beqs 43e60 43dec: 6500 020a bcsw 43ff8 43df0: 123c 0001 moveb #1,%d1 43df4: b280 cmpl %d0,%d1 43df6: 662c bnes 43e24 <== NEVER TAKEN 43df8: 604c bras 43e46 43dfa: 0c80 4004 667f cmpil #1074030207,%d0 43e00: 6700 026e beqw 44070 43e04: 620a bhis 43e10 43e06: 7605 moveq #5,%d3 43e08: b680 cmpl %d0,%d3 43e0a: 6618 bnes 43e24 43e0c: 6000 01f2 braw 44000 43e10: 0c80 4004 741a cmpil #1074033690,%d0 43e16: 6700 024e beqw 44066 43e1a: 0c80 8004 741b cmpil #-2147191781,%d0 43e20: 6700 0200 beqw 44022 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 43e24: 202a 00cc movel %a2@(204),%d0 43e28: eb88 lsll #5,%d0 43e2a: 0680 0005 cc28 addil #379944,%d0 43e30: 2240 moveal %d0,%a1 43e32: 2051 moveal %a1@,%a0 43e34: 4a88 tstl %a0 43e36: 6700 025c beqw 44094 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 43e3a: 2f0b movel %a3,%sp@- 43e3c: 2f0a movel %a2,%sp@- 43e3e: 4e90 jsr %a0@ 43e40: 2400 movel %d0,%d2 43e42: 6000 01ae braw 43ff2 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 43e46: 4878 0024 pea 24 43e4a: 486a 0030 pea %a2@(48) 43e4e: 2f2b 0008 movel %a3@(8),%sp@- 43e52: 4eb9 0004 c54c jsr 4c54c break; 43e58: 4fef 000c lea %sp@(12),%sp 43e5c: 6000 0238 braw 44096 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 43e60: 4878 0024 pea 24 43e64: 2f2b 0008 movel %a3@(8),%sp@- 43e68: 486a 0030 pea %a2@(48) 43e6c: 4eb9 0004 c54c jsr 4c54c /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 43e72: 202a 00b8 movel %a2@(184),%d0 43e76: 4fef 000c lea %sp@(12),%sp 43e7a: 0800 0009 btst #9,%d0 43e7e: 6760 beqs 43ee0 !(tty->termios.c_iflag & IXON)) { 43e80: 202a 0030 movel %a2@(48),%d0 43e84: 0280 0000 0400 andil #1024,%d0 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 43e8a: 6654 bnes 43ee0 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 43e8c: 202a 00b8 movel %a2@(184),%d0 43e90: 0280 ffff fdef andil #-529,%d0 43e96: 2540 00b8 movel %d0,%a2@(184) /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 43e9a: 202a 00b8 movel %a2@(184),%d0 43e9e: 0800 0005 btst #5,%d0 43ea2: 673c beqs 43ee0 <== ALWAYS TAKEN /* disable interrupts */ rtems_interrupt_disable(level); 43ea4: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 43eaa: 40c3 movew %sr,%d3 <== NOT EXECUTED 43eac: 8083 orl %d3,%d0 <== NOT EXECUTED 43eae: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 43eb0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43eb4: 72df moveq #-33,%d1 <== NOT EXECUTED 43eb6: c081 andl %d1,%d0 <== NOT EXECUTED 43eb8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 43ebc: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43ec0: 671c beqs 43ede <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 43ec2: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( 43ec6: 4878 0001 pea 1 <== NOT EXECUTED 43eca: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43ece: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43ed0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43ed4: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43ed8: 4e90 jsr %a0@ <== NOT EXECUTED 43eda: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43ede: 46c3 movew %d3,%sr <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { 43ee0: 202a 00b8 movel %a2@(184),%d0 43ee4: 0800 000a btst #10,%d0 43ee8: 6724 beqs 43f0e 43eea: 202a 0030 movel %a2@(48),%d0 43eee: 0280 0000 1000 andil #4096,%d0 43ef4: 6618 bnes 43f0e <== NEVER TAKEN /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 43ef6: 202a 00b8 movel %a2@(184),%d0 /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 43efa: 76fd moveq #-3,%d3 } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 43efc: 0880 000a bclr #10,%d0 43f00: 2540 00b8 movel %d0,%a2@(184) /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 43f04: 202a 00b8 movel %a2@(184),%d0 43f08: c083 andl %d3,%d0 43f0a: 2540 00b8 movel %d0,%a2@(184) } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 43f0e: 202a 00b8 movel %a2@(184),%d0 43f12: 0800 0008 btst #8,%d0 43f16: 6736 beqs 43f4e <== ALWAYS TAKEN 43f18: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED 43f1c: 6d30 blts 43f4e <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 43f1e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f22: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 43f26: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) { 43f2a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f2e: 44c0 movew %d0,%ccr <== NOT EXECUTED 43f30: 6610 bnes 43f42 <== NOT EXECUTED 43f32: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED 43f36: 4a88 tstl %a0 <== NOT EXECUTED 43f38: 6708 beqs 43f42 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 43f3a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43f3e: 4e90 jsr %a0@ <== NOT EXECUTED 43f40: 588f addql #4,%sp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 43f42: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f46: 72fb moveq #-5,%d1 <== NOT EXECUTED 43f48: c081 andl %d1,%d0 <== NOT EXECUTED 43f4a: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 43f4e: 4aaa 0038 tstl %a2@(56) 43f52: 6c0c bges 43f60 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDRTS; 43f54: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f58: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 43f5c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 43f60: 222a 0030 movel %a2@(48),%d1 43f64: 0801 000c btst #12,%d1 43f68: 670c beqs 43f76 tty->flow_ctrl |= FL_MDXOF; 43f6a: 202a 00b8 movel %a2@(184),%d0 43f6e: 08c0 000a bset #10,%d0 43f72: 2540 00b8 movel %d0,%a2@(184) } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 43f76: 0801 000a btst #10,%d1 43f7a: 670c beqs 43f88 tty->flow_ctrl |= FL_MDXON; 43f7c: 202a 00b8 movel %a2@(184),%d0 43f80: 08c0 0009 bset #9,%d0 43f84: 2540 00b8 movel %d0,%a2@(184) tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 43f88: 7002 moveq #2,%d0 43f8a: c0aa 003c andl %a2@(60),%d0 43f8e: 663a bnes 43fca tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 43f90: 4283 clrl %d3 43f92: 162a 0046 moveb %a2@(70),%d3 rtems_clock_get_ticks_per_second() / 10; 43f96: 4eb9 0004 5220 jsr 45220 if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 43f9c: 4c03 0800 mulsl %d3,%d0 rtems_clock_get_ticks_per_second() / 10; 43fa0: 760a moveq #10,%d3 43fa2: 4c43 0000 remul %d3,%d0,%d0 if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 43fa6: 2540 0054 movel %d0,%a2@(84) rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 43faa: 4a2a 0046 tstb %a2@(70) 43fae: 6714 beqs 43fc4 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 43fb0: 42aa 006c clrl %a2@(108) tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 43fb4: 2540 0070 movel %d0,%a2@(112) if (tty->termios.c_cc[VMIN]) 43fb8: 4a2a 0047 tstb %a2@(71) 43fbc: 6614 bnes 43fd2 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 43fbe: 2540 0074 movel %d0,%a2@(116) 43fc2: 601a bras 43fde } else { if (tty->termios.c_cc[VMIN]) { 43fc4: 4a2a 0047 tstb %a2@(71) 43fc8: 670e beqs 43fd8 <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 43fca: 42aa 006c clrl %a2@(108) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 43fce: 42aa 0070 clrl %a2@(112) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 43fd2: 42aa 0074 clrl %a2@(116) 43fd6: 6006 bras 43fde } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 43fd8: 7001 moveq #1,%d0 43fda: 2540 006c movel %d0,%a2@(108) } } } if (tty->device.setAttributes) 43fde: 206a 00a8 moveal %a2@(168),%a0 43fe2: 4a88 tstl %a0 43fe4: 6700 00b0 beqw 44096 (*tty->device.setAttributes)(tty->minor, &tty->termios); 43fe8: 486a 0030 pea %a2@(48) 43fec: 2f2a 0010 movel %a2@(16),%sp@- 43ff0: 4e90 jsr %a0@ 43ff2: 508f addql #8,%sp 43ff4: 6000 00a0 braw 44096 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 43ff8: 2f0a movel %a2,%sp@- 43ffa: 4eba f7c4 jsr %pc@(437c0 ) 43ffe: 6062 bras 44062 break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 44000: 2014 movel %a4@,%d0 44002: 222c 0004 movel %a4@(4),%d1 44006: 2540 00d4 movel %d0,%a2@(212) 4400a: 2541 00d8 movel %d1,%a2@(216) break; 4400e: 6000 0086 braw 44096 case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 44012: 2014 movel %a4@,%d0 44014: 222c 0004 movel %a4@(4),%d1 44018: 2540 00dc movel %d0,%a2@(220) 4401c: 2541 00e0 movel %d1,%a2@(224) break; 44020: 6074 bras 44096 #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 44022: 202a 00cc movel %a2@(204),%d0 44026: eb88 lsll #5,%d0 44028: 0680 0005 cc14 addil #379924,%d0 4402e: 2240 moveal %d0,%a1 44030: 2051 moveal %a1@,%a0 44032: 4a88 tstl %a0 44034: 6708 beqs 4403e sc = rtems_termios_linesw[tty->t_line].l_close(tty); 44036: 2f0a movel %a2,%sp@- 44038: 4e90 jsr %a0@ 4403a: 588f addql #4,%sp 4403c: 2400 movel %d0,%d2 } tty->t_line=*(int*)(args->buffer); 4403e: 206b 0008 moveal %a3@(8),%a0 44042: 2010 movel %a0@,%d0 tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 44044: 41f9 0005 cc10 lea 5cc10 ,%a0 * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 4404a: 2540 00cc movel %d0,%a2@(204) tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 4404e: eb88 lsll #5,%d0 */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 44050: 42aa 00d0 clrl %a2@(208) /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 44054: 2070 0800 moveal %a0@(00000000,%d0:l),%a0 44058: 4a88 tstl %a0 4405a: 673a beqs 44096 sc = rtems_termios_linesw[tty->t_line].l_open(tty); 4405c: 2f0a movel %a2,%sp@- 4405e: 4e90 jsr %a0@ 44060: 2400 movel %d0,%d2 44062: 588f addql #4,%sp 44064: 6030 bras 44096 } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 44066: 206b 0008 moveal %a3@(8),%a0 4406a: 20aa 00cc movel %a2@(204),%a0@ break; 4406e: 6026 bras 44096 #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 44070: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44074: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 44078: 9081 subl %d1,%d0 <== NOT EXECUTED if ( rawnc < 0 ) 4407a: 6a06 bpls 44082 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 4407c: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 44080: d081 addl %d1,%d0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 44082: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44086: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 4408a: d280 addl %d0,%d1 <== NOT EXECUTED 4408c: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44090: 2081 movel %d1,%a0@ <== NOT EXECUTED } break; 44092: 6002 bras 44096 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; 44094: 740a moveq #10,%d2 <== NOT EXECUTED *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44096: 2f2a 0018 movel %a2@(24),%sp@- 4409a: 4eb9 0004 595c jsr 4595c args->ioctl_return = sc; return sc; 440a0: 588f addql #4,%sp } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 440a2: 2742 000c movel %d2,%a3@(12) return sc; } 440a6: 2002 movel %d2,%d0 440a8: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 440ae: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004382a : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 4382a: 4e56 ffd8 linkw %fp,#-40 4382e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 43832: 42a7 clrl %sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 43834: 282e 0008 movel %fp@(8),%d4 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 43838: 42a7 clrl %sp@- 4383a: 2f39 0005 d44c movel 5d44c ,%sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 43840: 2a2e 000c movel %fp@(12),%d5 43844: 2e2e 0010 movel %fp@(16),%d7 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 43848: 4eb9 0004 5854 jsr 45854 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 4384e: 4fef 000c lea %sp@(12),%sp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 43852: 2400 movel %d0,%d2 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43854: 6600 038c bnew 43be2 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 43858: 2879 0005 d454 moveal 5d454 ,%a4 4385e: 264c moveal %a4,%a3 43860: 6010 bras 43872 if ((tty->major == major) && (tty->minor == minor)) 43862: b8ab 000c cmpl %a3@(12),%d4 43866: 6608 bnes 43870 43868: baab 0010 cmpl %a3@(16),%d5 4386c: 6700 02fc beqw 43b6a sc = rtems_semaphore_obtain( rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 43870: 2653 moveal %a3@,%a3 43872: 4a8b tstl %a3 43874: 66ec bnes 43862 43876: 6000 0376 braw 43bee /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 4387a: 2f39 0005 d44c movel 5d44c ,%sp@- 43880: 4eb9 0004 595c jsr 4595c return RTEMS_NO_MEMORY; 43886: 588f addql #4,%sp 43888: 6038 bras 438c2 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 4388a: 41f9 0005 be58 lea 5be58 ,%a0 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 43890: 4bf9 0004 2cd4 lea 42cd4 ,%a5 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 43896: 2750 0064 movel %a0@,%a3@(100) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 4389a: 202b 0064 movel %a3@(100),%d0 4389e: 2f00 movel %d0,%sp@- 438a0: 4e95 jsr %a5@ if (tty->rawInBuf.theBuf == NULL) { 438a2: 588f addql #4,%sp } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 438a4: 2600 movel %d0,%d3 438a6: 2740 0058 movel %d0,%a3@(88) if (tty->rawInBuf.theBuf == NULL) { 438aa: 661c bnes 438c8 free(tty); 438ac: 2f0b movel %a3,%sp@- 438ae: 4eb9 0004 29ec jsr 429ec rtems_semaphore_release (rtems_termios_ttyMutex); 438b4: 2f39 0005 d44c movel 5d44c ,%sp@- 438ba: 4eb9 0004 595c jsr 4595c return RTEMS_NO_MEMORY; 438c0: 508f addql #8,%sp 438c2: 741a moveq #26,%d2 438c4: 6000 031c braw 43be2 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 438c8: 43f9 0005 be5c lea 5be5c ,%a1 438ce: 2751 0088 movel %a1@,%a3@(136) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 438d2: 202b 0088 movel %a3@(136),%d0 438d6: 2f00 movel %d0,%sp@- 438d8: 4e95 jsr %a5@ if (tty->rawOutBuf.theBuf == NULL) { 438da: 588f addql #4,%sp } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 438dc: 2c00 movel %d0,%d6 438de: 2740 007c movel %d0,%a3@(124) if (tty->rawOutBuf.theBuf == NULL) { 438e2: 6620 bnes 43904 <== ALWAYS TAKEN free((void *)(tty->rawInBuf.theBuf)); 438e4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 438e6: 45f9 0004 29ec lea 429ec ,%a2 <== NOT EXECUTED 438ec: 4e92 jsr %a2@ <== NOT EXECUTED free(tty); 438ee: 2f0b movel %a3,%sp@- <== NOT EXECUTED 438f0: 4e92 jsr %a2@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 438f2: 2f39 0005 d44c movel 5d44c ,%sp@- <== NOT EXECUTED 438f8: 4eb9 0004 595c jsr 4595c <== NOT EXECUTED return RTEMS_NO_MEMORY; 438fe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43902: 60be bras 438c2 <== NOT EXECUTED } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 43904: 2f39 0005 be54 movel 5be54 ,%sp@- 4390a: 4e95 jsr %a5@ if (tty->cbuf == NULL) { 4390c: 588f addql #4,%sp return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 4390e: 2740 001c movel %d0,%a3@(28) if (tty->cbuf == NULL) { 43912: 6624 bnes 43938 free((void *)(tty->rawOutBuf.theBuf)); 43914: 2f06 movel %d6,%sp@- 43916: 45f9 0004 29ec lea 429ec ,%a2 4391c: 4e92 jsr %a2@ free((void *)(tty->rawInBuf.theBuf)); 4391e: 2f03 movel %d3,%sp@- 43920: 4e92 jsr %a2@ free(tty); 43922: 2f0b movel %a3,%sp@- 43924: 4e92 jsr %a2@ rtems_semaphore_release (rtems_termios_ttyMutex); 43926: 2f39 0005 d44c movel 5d44c ,%sp@- 4392c: 4eb9 0004 595c jsr 4595c return RTEMS_NO_MEMORY; 43932: 4fef 0010 lea %sp@(16),%sp 43936: 608a bras 438c2 } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 43938: 42ab 00d4 clrl %a3@(212) tty->tty_snd.sw_arg = NULL; 4393c: 42ab 00d8 clrl %a3@(216) tty->tty_rcv.sw_pfn = NULL; 43940: 42ab 00dc clrl %a3@(220) tty->tty_rcv.sw_arg = NULL; 43944: 42ab 00e0 clrl %a3@(224) tty->tty_rcvwakeup = 0; 43948: 42ab 00e4 clrl %a3@(228) /* * link tty */ tty->forw = rtems_termios_ttyHead; 4394c: 268c movel %a4,%a3@ tty->back = NULL; 4394e: 42ab 0004 clrl %a3@(4) if (rtems_termios_ttyHead != NULL) 43952: 4a8c tstl %a4 43954: 6704 beqs 4395a rtems_termios_ttyHead->back = tty; 43956: 294b 0004 movel %a3,%a4@(4) rtems_termios_ttyHead = tty; 4395a: 23ca 0005 d454 movel %a2,5d454 if (rtems_termios_ttyTail == NULL) 43960: 4ab9 0005 d450 tstl 5d450 43966: 6606 bnes 4396e rtems_termios_ttyTail = tty; 43968: 23ca 0005 d450 movel %a2,5d450 tty->minor = minor; 4396e: 2545 0010 movel %d5,%a2@(16) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 43972: 49f9 0004 561c lea 4561c ,%a4 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; 43978: 2544 000c movel %d4,%a2@(12) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 4397c: 486a 0014 pea %a2@(20) rtems_build_name ('T', 'R', 'i', c), 43980: 1039 0005 be60 moveb 5be60 ,%d0 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 43986: 42a7 clrl %sp@- 43988: 4878 0054 pea 54 rtems_build_name ('T', 'R', 'i', c), 4398c: 49c0 extbl %d0 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 4398e: 4878 0001 pea 1 43992: 0080 5452 6900 oril #1414686976,%d0 43998: 2f00 movel %d0,%sp@- 4399a: 4e94 jsr %a4@ rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 4399c: 4fef 0014 lea %sp@(20),%sp 439a0: 4a80 tstl %d0 439a2: 6600 0228 bnew 43bcc rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 439a6: 486a 0018 pea %a2@(24) rtems_build_name ('T', 'R', 'o', c), 439aa: 1039 0005 be60 moveb 5be60 ,%d0 RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 439b0: 42a7 clrl %sp@- 439b2: 4878 0054 pea 54 rtems_build_name ('T', 'R', 'o', c), 439b6: 49c0 extbl %d0 RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 439b8: 4878 0001 pea 1 439bc: 0080 5452 6f00 oril #1414688512,%d0 439c2: 2f00 movel %d0,%sp@- 439c4: 4e94 jsr %a4@ rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 439c6: 4fef 0014 lea %sp@(20),%sp 439ca: 4a80 tstl %d0 439cc: 6600 01fe bnew 43bcc rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 439d0: 486a 008c pea %a2@(140) rtems_build_name ('T', 'R', 'x', c), 439d4: 1039 0005 be60 moveb 5be60 ,%d0 RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 439da: 42a7 clrl %sp@- 439dc: 4878 0020 pea 20 rtems_build_name ('T', 'R', 'x', c), 439e0: 49c0 extbl %d0 RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 439e2: 0080 5452 7800 oril #1414690816,%d0 439e8: 42a7 clrl %sp@- 439ea: 2f00 movel %d0,%sp@- 439ec: 4e94 jsr %a4@ rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 439ee: 4fef 0014 lea %sp@(20),%sp 439f2: 4a80 tstl %d0 439f4: 6600 01d6 bnew 43bcc rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 439f8: 42aa 0094 clrl %a2@(148) /* * Set callbacks */ tty->device = *callbacks; 439fc: 4878 0020 pea 20 43a00: 2f2e 0014 movel %fp@(20),%sp@- 43a04: 486a 0098 pea %a2@(152) 43a08: 4eb9 0004 c54c jsr 4c54c /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 43a0e: 4fef 000c lea %sp@(12),%sp 43a12: 7002 moveq #2,%d0 43a14: b0aa 00b4 cmpl %a2@(180),%d0 43a18: 6662 bnes 43a7c sc = rtems_task_create ( 43a1a: 486a 00c8 pea %a2@(200) 43a1e: 49f9 0004 5a0c lea 45a0c ,%a4 rtems_build_name ('T', 'x', 'T', c), 43a24: 1039 0005 be60 moveb 5be60 ,%d0 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 43a2a: 42a7 clrl %sp@- 43a2c: 4878 0500 pea 500 rtems_build_name ('T', 'x', 'T', c), 43a30: 49c0 extbl %d0 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 43a32: 4878 0400 pea 400 43a36: 4878 000a pea a 43a3a: 0080 5478 5400 oril #1417171968,%d0 43a40: 2f00 movel %d0,%sp@- 43a42: 4e94 jsr %a4@ TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 43a44: 4fef 0018 lea %sp@(24),%sp 43a48: 4a80 tstl %d0 43a4a: 6600 0180 bnew 43bcc rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 43a4e: 486a 00c4 pea %a2@(196) rtems_build_name ('R', 'x', 'T', c), 43a52: 1039 0005 be60 moveb 5be60 ,%d0 RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 43a58: 42a7 clrl %sp@- 43a5a: 4878 0500 pea 500 rtems_build_name ('R', 'x', 'T', c), 43a5e: 49c0 extbl %d0 RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 43a60: 4878 0400 pea 400 43a64: 4878 0009 pea 9 43a68: 0080 5278 5400 oril #1383617536,%d0 43a6e: 2f00 movel %d0,%sp@- 43a70: 4e94 jsr %a4@ TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 43a72: 4fef 0018 lea %sp@(24),%sp 43a76: 4a80 tstl %d0 43a78: 6600 0152 bnew 43bcc rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 43a7c: 4aaa 00a0 tstl %a2@(160) 43a80: 6708 beqs 43a8a 43a82: 7202 moveq #2,%d1 43a84: b2aa 00b4 cmpl %a2@(180),%d1 43a88: 662c bnes 43ab6 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 43a8a: 486a 0068 pea %a2@(104) rtems_build_name ('T', 'R', 'r', c), 43a8e: 1039 0005 be60 moveb 5be60 ,%d0 rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 43a94: 42a7 clrl %sp@- 43a96: 4878 0024 pea 24 rtems_build_name ('T', 'R', 'r', c), 43a9a: 49c0 extbl %d0 rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 43a9c: 0080 5452 7200 oril #1414689280,%d0 43aa2: 42a7 clrl %sp@- 43aa4: 2f00 movel %d0,%sp@- 43aa6: 4eb9 0004 561c jsr 4561c rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 43aac: 4fef 0014 lea %sp@(20),%sp 43ab0: 4a80 tstl %d0 43ab2: 6600 0118 bnew 43bcc /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 43ab6: 203c 0000 08bd movel #2237,%d0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 43abc: 307c 2502 moveaw #9474,%a0 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 43ac0: 327c 1805 moveaw #6149,%a1 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 43ac4: 2540 0038 movel %d0,%a2@(56) tty->termios.c_lflag = 43ac8: 223c 0000 823b movel #33339,%d1 ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 43ace: 7003 moveq #3,%d0 * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = 43ad0: 2541 003c movel %d1,%a2@(60) ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 43ad4: 1540 0041 moveb %d0,%a2@(65) tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; 43ad8: 707f moveq #127,%d0 tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 43ada: 42aa 00b8 clrl %a2@(184) tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; 43ade: 1540 0043 moveb %d0,%a2@(67) tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; 43ae2: 7004 moveq #4,%d0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 43ae4: 2548 0030 movel %a0,%a2@(48) tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; 43ae8: 1540 0045 moveb %d0,%a2@(69) tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 43aec: 7011 moveq #17,%d0 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 43aee: 2549 0034 movel %a1,%a2@(52) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 43af2: 721c moveq #28,%d1 tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 43af4: 1540 0049 moveb %d0,%a2@(73) tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 43af8: 701a moveq #26,%d0 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 43afa: 1541 0042 moveb %d1,%a2@(66) tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; 43afe: 7215 moveq #21,%d1 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 43b00: 1540 004b moveb %d0,%a2@(75) tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 43b04: 700f moveq #15,%d0 ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; 43b06: 1541 0044 moveb %d1,%a2@(68) tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 43b0a: 4201 clrb %d1 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 43b0c: 1540 004e moveb %d0,%a2@(78) tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 43b10: 7016 moveq #22,%d0 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 43b12: 1541 004c moveb %d1,%a2@(76) tty->termios.c_cc[VEOL2] = '\000'; 43b16: 1541 0051 moveb %d1,%a2@(81) tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 43b1a: 7213 moveq #19,%d1 tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 43b1c: 1540 0050 moveb %d0,%a2@(80) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 43b20: 202a 0064 movel %a2@(100),%d0 43b24: e288 lsrl #1,%d0 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 43b26: 1541 004a moveb %d1,%a2@(74) tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 43b2a: 7212 moveq #18,%d1 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 43b2c: 206a 0064 moveal %a2@(100),%a0 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 43b30: 1541 004d moveb %d1,%a2@(77) tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 43b34: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0 tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 43b38: 7217 moveq #23,%d1 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 43b3a: 2540 00bc movel %d0,%a2@(188) tty->highwater = tty->rawInBuf.Size * 3/4; 43b3e: 2008 movel %a0,%d0 tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 43b40: 1541 004f moveb %d1,%a2@(79) tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 43b44: e488 lsrl #2,%d0 43b46: 2540 00c0 movel %d0,%a2@(192) /* * Bump name characer */ if (c++ == 'z') 43b4a: 1039 0005 be60 moveb 5be60 ,%d0 43b50: 49c0 extbl %d0 43b52: 2200 movel %d0,%d1 43b54: 5281 addql #1,%d1 43b56: 13c1 0005 be60 moveb %d1,5be60 43b5c: 727a moveq #122,%d1 43b5e: b280 cmpl %d0,%d1 43b60: 6608 bnes 43b6a c = 'a'; 43b62: 7061 moveq #97,%d0 43b64: 13c0 0005 be60 moveb %d0,5be60 } args->iop->data1 = tty; 43b6a: 2247 moveal %d7,%a1 43b6c: 2051 moveal %a1@,%a0 if (!tty->refcount++) { 43b6e: 202b 0008 movel %a3@(8),%d0 43b72: 2200 movel %d0,%d1 43b74: 5281 addql #1,%d1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 43b76: 214b 0034 movel %a3,%a0@(52) if (!tty->refcount++) { 43b7a: 2741 0008 movel %d1,%a3@(8) 43b7e: 4a80 tstl %d0 43b80: 6652 bnes 43bd4 if (tty->device.firstOpen) 43b82: 206b 0098 moveal %a3@(152),%a0 43b86: 4a88 tstl %a0 43b88: 670c beqs 43b96 (*tty->device.firstOpen)(major, minor, arg); 43b8a: 2f07 movel %d7,%sp@- 43b8c: 2f05 movel %d5,%sp@- 43b8e: 2f04 movel %d4,%sp@- 43b90: 4e90 jsr %a0@ 43b92: 4fef 000c lea %sp@(12),%sp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 43b96: 7002 moveq #2,%d0 43b98: b0ab 00b4 cmpl %a3@(180),%d0 43b9c: 6636 bnes 43bd4 sc = rtems_task_start( 43b9e: 2f0b movel %a3,%sp@- 43ba0: 487a 1136 pea %pc@(44cd8 ) 43ba4: 45f9 0004 5c88 lea 45c88 ,%a2 43baa: 2f2b 00c4 movel %a3@(196),%sp@- 43bae: 4e92 jsr %a2@ tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 43bb0: 4fef 000c lea %sp@(12),%sp 43bb4: 4a80 tstl %d0 43bb6: 6614 bnes 43bcc <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_start( 43bb8: 2f0b movel %a3,%sp@- 43bba: 487a 1340 pea %pc@(44efc ) 43bbe: 2f2b 00c8 movel %a3@(200),%sp@- 43bc2: 4e92 jsr %a2@ tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 43bc4: 4fef 000c lea %sp@(12),%sp 43bc8: 4a80 tstl %d0 43bca: 6708 beqs 43bd4 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 43bcc: 2f00 movel %d0,%sp@- 43bce: 4eb9 0004 5ef8 jsr 45ef8 } } rtems_semaphore_release (rtems_termios_ttyMutex); 43bd4: 2f39 0005 d44c movel 5d44c ,%sp@- 43bda: 4eb9 0004 595c jsr 4595c return RTEMS_SUCCESSFUL; 43be0: 588f addql #4,%sp } 43be2: 2002 movel %d2,%d0 43be4: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 43bea: 4e5e unlk %fp 43bec: 4e75 rts static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 43bee: 4878 00e8 pea e8 43bf2: 4878 0001 pea 1 43bf6: 4eb9 0004 2654 jsr 42654 if (tty == NULL) { 43bfc: 508f addql #8,%sp static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 43bfe: 2640 moveal %d0,%a3 43c00: 2440 moveal %d0,%a2 if (tty == NULL) { 43c02: 4a80 tstl %d0 43c04: 6600 fc84 bnew 4388a 43c08: 6000 fc70 braw 4387a =============================================================================== 000440b2 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 440b2: 4e56 ffe0 linkw %fp,#-32 440b6: 202e 0008 movel %fp@(8),%d0 440ba: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 440be: 242e 000c movel %fp@(12),%d2 const unsigned char *buf = _buf; 440c2: 2640 moveal %d0,%a3 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 440c4: 246e 0010 moveal %fp@(16),%a2 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 440c8: 4aaa 00b4 tstl %a2@(180) 440cc: 661c bnes 440ea (*tty->device.write)(tty->minor, (void *)buf, len); 440ce: 2d42 0010 movel %d2,%fp@(16) 440d2: 2d40 000c movel %d0,%fp@(12) 440d6: 2d6a 0010 0008 movel %a2@(16),%fp@(8) 440dc: 226a 00a4 moveal %a2@(164),%a1 tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 440e0: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 440e6: 4e5e unlk %fp unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 440e8: 4ed1 jmp %a1@ return; } newHead = tty->rawOutBuf.Head; 440ea: 2c2a 0080 movel %a2@(128),%d6 * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); 440ee: 2a3c 0000 0700 movel #1792,%d5 while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 440f4: 49f9 0004 5854 lea 45854 ,%a4 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 440fa: 6000 009e braw 4419a * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 440fe: 202a 0088 movel %a2@(136),%d0 44102: 5286 addql #1,%d6 44104: 4c40 6004 remul %d0,%d4,%d6 rtems_interrupt_disable (level); 44108: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 4410a: 2c04 movel %d4,%d6 rtems_interrupt_disable (level); 4410c: 40c3 movew %sr,%d3 4410e: 8083 orl %d3,%d0 44110: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 44112: 602a bras 4413e tty->rawOutBufState = rob_wait; 44114: 7002 moveq #2,%d0 44116: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 4411a: 46c3 movew %d3,%sr sc = rtems_semaphore_obtain( 4411c: 42a7 clrl %sp@- 4411e: 42a7 clrl %sp@- 44120: 2f2a 008c movel %a2@(140),%sp@- 44124: 4e94 jsr %a4@ tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44126: 4fef 000c lea %sp@(12),%sp 4412a: 4a80 tstl %d0 4412c: 6708 beqs 44136 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 4412e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44130: 4eb9 0004 5ef8 jsr 45ef8 <== NOT EXECUTED rtems_interrupt_disable (level); 44136: 2005 movel %d5,%d0 44138: 40c3 movew %sr,%d3 4413a: 8083 orl %d3,%d0 4413c: 46c0 movew %d0,%sr * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 4413e: 202a 0084 movel %a2@(132),%d0 44142: b084 cmpl %d4,%d0 44144: 67ce beqs 44114 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 44146: 202a 0080 movel %a2@(128),%d0 4414a: 206a 007c moveal %a2@(124),%a0 4414e: 119b 0800 moveb %a3@+,%a0@(00000000,%d0:l) tty->rawOutBuf.Head = newHead; 44152: 2544 0080 movel %d4,%a2@(128) if (tty->rawOutBufState == rob_idle) { 44156: 4aaa 0094 tstl %a2@(148) 4415a: 663a bnes 44196 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 4415c: 202a 00b8 movel %a2@(184),%d0 44160: 0800 0004 btst #4,%d0 44164: 661e bnes 44184 <== NEVER TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 44166: 202a 0084 movel %a2@(132),%d0 tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 4416a: 4878 0001 pea 1 4416e: d0aa 007c addl %a2@(124),%d0 44172: 2f00 movel %d0,%sp@- 44174: 2f2a 0010 movel %a2@(16),%sp@- 44178: 206a 00a4 moveal %a2@(164),%a0 4417c: 4e90 jsr %a0@ 4417e: 4fef 000c lea %sp@(12),%sp 44182: 600c bras 44190 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 44184: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44188: 7220 moveq #32,%d1 <== NOT EXECUTED 4418a: 8081 orl %d1,%d0 <== NOT EXECUTED 4418c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 44190: 7001 moveq #1,%d0 44192: 2540 0094 movel %d0,%a2@(148) } rtems_interrupt_enable (level); 44196: 46c3 movew %d3,%sr len--; 44198: 5382 subql #1,%d2 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 4419a: 4a82 tstl %d2 4419c: 6600 ff60 bnew 440fe tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 441a0: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 441a6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044796 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 44796: 4e56 ffd4 linkw %fp,#-44 4479a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4479e: 266e 0008 moveal %fp@(8),%a3 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 447a2: 2053 moveal %a3@,%a0 uint32_t count = args->count; 447a4: 262b 0010 movel %a3@(16),%d3 rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 447a8: 2468 0034 moveal %a0@(52),%a2 uint32_t count = args->count; char *buffer = args->buffer; 447ac: 2a6b 000c moveal %a3@(12),%a5 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 447b0: 42a7 clrl %sp@- 447b2: 42a7 clrl %sp@- 447b4: 2f2a 0014 movel %a2@(20),%sp@- 447b8: 4eb9 0004 5854 jsr 45854 if (sc != RTEMS_SUCCESSFUL) 447be: 4fef 000c lea %sp@(12),%sp struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 447c2: 2800 movel %d0,%d4 if (sc != RTEMS_SUCCESSFUL) 447c4: 6600 029a bnew 44a60 return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 447c8: 202a 00cc movel %a2@(204),%d0 447cc: eb88 lsll #5,%d0 447ce: 0680 0005 cc18 addil #379928,%d0 447d4: 2240 moveal %d0,%a1 447d6: 2051 moveal %a1@,%a0 447d8: 4a88 tstl %a0 447da: 671e beqs 447fa sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 447dc: 2f0b movel %a3,%sp@- 447de: 2f0a movel %a2,%sp@- 447e0: 4e90 jsr %a0@ 447e2: 2800 movel %d0,%d4 tty->tty_rcvwakeup = 0; 447e4: 42aa 00e4 clrl %a2@(228) rtems_semaphore_release (tty->isem); 447e8: 2f2a 0014 movel %a2@(20),%sp@- 447ec: 4eb9 0004 595c jsr 4595c return sc; 447f2: 4fef 000c lea %sp@(12),%sp 447f6: 6000 0268 braw 44a60 } if (tty->cindex == tty->ccount) { 447fa: 202a 0020 movel %a2@(32),%d0 447fe: b0aa 0024 cmpl %a2@(36),%d0 44802: 6600 0234 bnew 44a38 tty->cindex = tty->ccount = 0; 44806: 42aa 0020 clrl %a2@(32) tty->read_start_column = tty->column; 4480a: 256a 0028 002c movel %a2@(40),%a2@(44) rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 44810: 42aa 0024 clrl %a2@(36) tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && 44814: 4aaa 00a0 tstl %a2@(160) 44818: 6700 00da beqw 448f4 4481c: 4aaa 00b4 tstl %a2@(180) 44820: 6600 00d2 bnew 448f4 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 44824: 7002 moveq #2,%d0 44826: c0aa 003c andl %a2@(60),%d0 4482a: 673e beqs 4486a for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 4482c: 49f9 0004 5d34 lea 45d34 ,%a4 } else { if (siproc (n, tty)) 44832: 243c 0004 4676 movel #280182,%d2 { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 44838: 2f2a 0010 movel %a2@(16),%sp@- 4483c: 206a 00a0 moveal %a2@(160),%a0 44840: 4e90 jsr %a0@ if (n < 0) { 44842: 588f addql #4,%sp 44844: 4a80 tstl %d0 44846: 6c0a bges 44852 rtems_task_wake_after (1); 44848: 4878 0001 pea 1 4484c: 4e94 jsr %a4@ 4484e: 588f addql #4,%sp 44850: 60e6 bras 44838 } else { if (siproc (n, tty)) 44852: 2f0a movel %a2,%sp@- 44854: 2042 moveal %d2,%a0 44856: 0280 0000 00ff andil #255,%d0 4485c: 2f00 movel %d0,%sp@- 4485e: 4e90 jsr %a0@ 44860: 508f addql #8,%sp 44862: 4a80 tstl %d0 44864: 67d2 beqs 44838 44866: 6000 01d0 braw 44a38 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 4486a: 49f9 0004 5238 lea 45238 ,%a4 44870: 4e94 jsr %a4@ now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 44872: 2c3c 0004 5d34 movel #286004,%d6 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 44878: 2400 movel %d0,%d2 break; } } rtems_task_wake_after (1); } else { siproc (n, tty); 4487a: 2a3c 0004 4676 movel #280182,%d5 } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 44880: 2f2a 0010 movel %a2@(16),%sp@- 44884: 206a 00a0 moveal %a2@(160),%a0 44888: 4e90 jsr %a0@ if (n < 0) { 4488a: 588f addql #4,%sp 4488c: 4a80 tstl %d0 4488e: 6c34 bges 448c4 if (tty->termios.c_cc[VMIN]) { 44890: 4a2a 0047 tstb %a2@(71) 44894: 670e beqs 448a4 <== NEVER TAKEN if (tty->termios.c_cc[VTIME] && tty->ccount) { 44896: 4a2a 0046 tstb %a2@(70) 4489a: 671c beqs 448b8 <== NEVER TAKEN 4489c: 4aaa 0020 tstl %a2@(32) 448a0: 6716 beqs 448b8 448a2: 6008 bras 448ac if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 448a4: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 448a8: 6700 018e beqw 44a38 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 448ac: 4e94 jsr %a4@ if ((now - then) > tty->vtimeTicks) { 448ae: 9082 subl %d2,%d0 448b0: b0aa 0054 cmpl %a2@(84),%d0 448b4: 6200 0182 bhiw 44a38 break; } } rtems_task_wake_after (1); 448b8: 4878 0001 pea 1 448bc: 2246 moveal %d6,%a1 448be: 4e91 jsr %a1@ 448c0: 588f addql #4,%sp 448c2: 60bc bras 44880 } else { siproc (n, tty); 448c4: 2f0a movel %a2,%sp@- 448c6: 2045 moveal %d5,%a0 448c8: 0280 0000 00ff andil #255,%d0 448ce: 2f00 movel %d0,%sp@- 448d0: 4e90 jsr %a0@ if (tty->ccount >= tty->termios.c_cc[VMIN]) 448d2: 508f addql #8,%sp 448d4: 4281 clrl %d1 448d6: 102a 0047 moveb %a2@(71),%d0 448da: 1200 moveb %d0,%d1 448dc: b2aa 0020 cmpl %a2@(32),%d1 448e0: 6f00 0156 blew 44a38 break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 448e4: 4a00 tstb %d0 448e6: 6798 beqs 44880 <== NEVER TAKEN 448e8: 4a2a 0046 tstb %a2@(70) 448ec: 6792 beqs 44880 <== NEVER TAKEN then = rtems_clock_get_ticks_since_boot(); 448ee: 4e94 jsr %a4@ 448f0: 2400 movel %d0,%d2 448f2: 608c bras 44880 if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( 448f4: 2e0a movel %a2,%d7 static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; 448f6: 7401 moveq #1,%d2 448f8: 49fa fd7c lea %pc@(44676 ),%a4 if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( 448fc: 0687 0000 0049 addil #73,%d7 /* * Wait for characters */ if ( wait ) { sc = rtems_semaphore_obtain( 44902: 2c3c 0004 5854 movel #284756,%d6 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 44908: 2a2a 0074 movel %a2@(116),%d5 4490c: 6000 00e2 braw 449f0 while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 44910: 2a2a 005c movel %a2@(92),%d5 44914: 5285 addql #1,%d5 44916: 202a 0064 movel %a2@(100),%d0 c = tty->rawInBuf.theBuf[newHead]; 4491a: 206a 0058 moveal %a2@(88),%a0 while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 4491e: 4c40 5001 remul %d0,%d1,%d5 c = tty->rawInBuf.theBuf[newHead]; 44922: 1030 1800 moveb %a0@(00000000,%d1:l),%d0 tty->rawInBuf.Head = newHead; 44926: 2541 005c movel %d1,%a2@(92) (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; 4492a: 1d40 ffff moveb %d0,%fp@(-1) tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 4492e: 202a 0060 movel %a2@(96),%d0 44932: 226a 0064 moveal %a2@(100),%a1 44936: 43f1 0800 lea %a1@(00000000,%d0:l),%a1 4493a: 93c1 subal %d1,%a1 % tty->rawInBuf.Size) 4493c: 2a09 movel %a1,%d5 4493e: 206a 0064 moveal %a2@(100),%a0 44942: 2008 movel %a0,%d0 44944: 4c40 5001 remul %d0,%d1,%d5 unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 44948: b2aa 00bc cmpl %a2@(188),%d1 4494c: 646a bccs 449b8 <== NEVER TAKEN % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 4494e: 202a 00b8 movel %a2@(184),%d0 44952: 72fe moveq #-2,%d1 44954: c081 andl %d1,%d0 44956: 2540 00b8 movel %d0,%a2@(184) /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 4495a: 202a 00b8 movel %a2@(184),%d0 4495e: 0280 0000 0202 andil #514,%d0 44964: 0c80 0000 0202 cmpil #514,%d0 4496a: 6626 bnes 44992 <== ALWAYS TAKEN == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) 4496c: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 44970: 670a beqs 4497c <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 44972: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44976: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4497a: 6716 beqs 44992 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 4497c: 4878 0001 pea 1 <== NOT EXECUTED 44980: 2f07 movel %d7,%sp@- <== NOT EXECUTED 44982: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44986: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4498a: 4e90 jsr %a0@ <== NOT EXECUTED 4498c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44990: 6026 bras 449b8 <== NOT EXECUTED tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 44992: 202a 00b8 movel %a2@(184),%d0 44996: 0800 0008 btst #8,%d0 4499a: 671c beqs 449b8 <== ALWAYS TAKEN tty->flow_ctrl &= ~FL_IRTSOFF; 4499c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 449a0: 7afb moveq #-5,%d5 <== NOT EXECUTED 449a2: c085 andl %d5,%d0 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 449a4: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 449a8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 449ac: 4a88 tstl %a0 <== NOT EXECUTED 449ae: 6708 beqs 449b8 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 449b0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 449b4: 4e90 jsr %a0@ <== NOT EXECUTED 449b6: 588f addql #4,%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 449b8: 7002 moveq #2,%d0 449ba: 4285 clrl %d5 449bc: 1a2e ffff moveb %fp@(-1),%d5 449c0: c0aa 003c andl %a2@(60),%d0 449c4: 670e beqs 449d4 <== NEVER TAKEN if (siproc (c, tty)) 449c6: 2f0a movel %a2,%sp@- 449c8: 2f05 movel %d5,%sp@- 449ca: 4e94 jsr %a4@ 449cc: 508f addql #8,%sp wait = 0; 449ce: 4a80 tstl %d0 449d0: 57c0 seq %d0 449d2: 6014 bras 449e8 } else { siproc (c, tty); 449d4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 449d6: 2f05 movel %d5,%sp@- <== NOT EXECUTED 449d8: 4e94 jsr %a4@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 449da: 508f addql #8,%sp <== NOT EXECUTED 449dc: 4280 clrl %d0 <== NOT EXECUTED 449de: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED wait = 0; 449e2: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 449e6: 5ec0 sgt %d0 <== NOT EXECUTED 449e8: 49c0 extbl %d0 449ea: c480 andl %d0,%d2 } timeout = tty->rawInBufSemaphoreTimeout; 449ec: 2a2a 0070 movel %a2@(112),%d5 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 449f0: 222a 005c movel %a2@(92),%d1 449f4: 202a 0060 movel %a2@(96),%d0 449f8: b081 cmpl %d1,%d0 449fa: 6710 beqs 44a0c (tty->ccount < (CBUFSIZE-1))) { 449fc: 2039 0005 be54 movel 5be54 ,%d0 44a02: 5380 subql #1,%d0 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 44a04: b0aa 0020 cmpl %a2@(32),%d0 44a08: 6e00 ff06 bgtw 44910 } /* * Wait for characters */ if ( wait ) { 44a0c: 4a82 tstl %d2 44a0e: 6728 beqs 44a38 sc = rtems_semaphore_obtain( 44a10: 2f05 movel %d5,%sp@- 44a12: 2f2a 006c movel %a2@(108),%sp@- 44a16: 2046 moveal %d6,%a0 44a18: 2f2a 0068 movel %a2@(104),%sp@- 44a1c: 4e90 jsr %a0@ tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 44a1e: 4fef 000c lea %sp@(12),%sp 44a22: 4a80 tstl %d0 44a24: 67ca beqs 449f0 <== ALWAYS TAKEN 44a26: 6010 bras 44a38 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 44a28: 206a 001c moveal %a2@(28),%a0 count--; 44a2c: 5383 subql #1,%d3 if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 44a2e: 1af0 0800 moveb %a0@(00000000,%d0:l),%a5@+ 44a32: 5280 addql #1,%d0 44a34: 2540 0024 movel %d0,%a2@(36) sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 44a38: 4a83 tstl %d3 44a3a: 670a beqs 44a46 44a3c: 202a 0024 movel %a2@(36),%d0 44a40: b0aa 0020 cmpl %a2@(32),%d0 44a44: 6de2 blts 44a28 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 44a46: 202b 0010 movel %a3@(16),%d0 44a4a: 9083 subl %d3,%d0 44a4c: 2740 0018 movel %d0,%a3@(24) tty->tty_rcvwakeup = 0; 44a50: 42aa 00e4 clrl %a2@(228) rtems_semaphore_release (tty->isem); 44a54: 2f2a 0014 movel %a2@(20),%sp@- 44a58: 4eb9 0004 595c jsr 4595c return sc; 44a5e: 588f addql #4,%sp } 44a60: 2004 movel %d4,%d0 44a62: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 44a68: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044d48 : * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 44d48: 4e56 fff4 linkw %fp,#-12 44d4c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 44d50: 246e 0008 moveal %fp@(8),%a2 int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 44d54: 202a 00b8 movel %a2@(184),%d0 44d58: 0280 0000 0403 andil #1027,%d0 44d5e: 0c80 0000 0401 cmpil #1025,%d0 44d64: 663c bnes 44da2 <== ALWAYS TAKEN == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); 44d66: 4878 0001 pea 1 <== NOT EXECUTED 44d6a: 486a 004a pea %a2@(74) <== NOT EXECUTED 44d6e: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44d72: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44d76: 4e90 jsr %a0@ <== NOT EXECUTED rtems_interrupt_disable(level); 44d78: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 44d7e: 40c1 movew %sr,%d1 <== NOT EXECUTED 44d80: 8081 orl %d1,%d0 <== NOT EXECUTED 44d82: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; 44d84: 7402 moveq #2,%d2 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 44d86: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 44d8a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44d8e: 8082 orl %d2,%d0 <== NOT EXECUTED 44d90: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 44d94: 46c1 movew %d1,%sr <== NOT EXECUTED 44d96: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED nToSend = 1; 44d9a: 143c 0001 moveb #1,%d2 <== NOT EXECUTED 44d9e: 6000 0150 braw 44ef0 <== NOT EXECUTED } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 44da2: 202a 00b8 movel %a2@(184),%d0 44da6: 7203 moveq #3,%d1 44da8: 7402 moveq #2,%d2 44daa: c081 andl %d1,%d0 44dac: b480 cmpl %d0,%d2 44dae: 663a bnes 44dea <== ALWAYS TAKEN * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); 44db0: 4878 0001 pea 1 <== NOT EXECUTED 44db4: 486a 0049 pea %a2@(73) <== NOT EXECUTED 44db8: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44dbc: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44dc0: 4e90 jsr %a0@ <== NOT EXECUTED rtems_interrupt_disable(level); 44dc2: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 44dc8: 40c1 movew %sr,%d1 <== NOT EXECUTED 44dca: 8081 orl %d1,%d0 <== NOT EXECUTED 44dcc: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; 44dce: 74fd moveq #-3,%d2 <== NOT EXECUTED * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 44dd0: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 44dd4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44dd8: c082 andl %d2,%d0 <== NOT EXECUTED 44dda: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 44dde: 46c1 movew %d1,%sr <== NOT EXECUTED nToSend = 1; 44de0: 7401 moveq #1,%d2 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); 44de2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44de6: 6000 0108 braw 44ef0 <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 44dea: 222a 0080 movel %a2@(128),%d1 44dee: 202a 0084 movel %a2@(132),%d0 44df2: b081 cmpl %d1,%d0 44df4: 661a bnes 44e10 /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 44df6: 7002 moveq #2,%d0 44df8: b0aa 0094 cmpl %a2@(148),%d0 44dfc: 6600 00f0 bnew 44eee /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 44e00: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 44e04: 4eb9 0004 595c jsr 4595c <== NOT EXECUTED 44e0a: 588f addql #4,%sp <== NOT EXECUTED 44e0c: 6000 00e0 braw 44eee <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 44e10: 203c 0000 0700 movel #1792,%d0 44e16: 40c1 movew %sr,%d1 44e18: 8081 orl %d1,%d0 44e1a: 46c0 movew %d0,%sr len = tty->t_dqlen; 44e1c: 206a 0090 moveal %a2@(144),%a0 tty->t_dqlen = 0; 44e20: 42aa 0090 clrl %a2@(144) rtems_interrupt_enable(level); 44e24: 46c1 movew %d1,%sr newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 44e26: 222a 0084 movel %a2@(132),%d1 44e2a: d288 addl %a0,%d1 44e2c: 202a 0088 movel %a2@(136),%d0 44e30: 4c40 1003 remul %d0,%d3,%d1 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 44e34: 7202 moveq #2,%d1 len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 44e36: 2543 0084 movel %d3,%a2@(132) if (tty->rawOutBufState == rob_wait) { 44e3a: b2aa 0094 cmpl %a2@(148),%d1 44e3e: 660c bnes 44e4c /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 44e40: 2f2a 008c movel %a2@(140),%sp@- 44e44: 4eb9 0004 595c jsr 4595c 44e4a: 588f addql #4,%sp } if (newTail == tty->rawOutBuf.Head) { 44e4c: 202a 0080 movel %a2@(128),%d0 44e50: b083 cmpl %d3,%d0 44e52: 661c bnes 44e70 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 44e54: 206a 00d4 moveal %a2@(212),%a0 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 44e58: 42aa 0094 clrl %a2@(148) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 44e5c: 4a88 tstl %a0 44e5e: 6700 0086 beqw 44ee6 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 44e62: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED 44e66: 486a 0030 pea %a2@(48) <== NOT EXECUTED 44e6a: 4e90 jsr %a0@ <== NOT EXECUTED 44e6c: 508f addql #8,%sp <== NOT EXECUTED 44e6e: 6076 bras 44ee6 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 44e70: 202a 00b8 movel %a2@(184),%d0 44e74: 0280 0000 0210 andil #528,%d0 44e7a: 0c80 0000 0210 cmpil #528,%d0 44e80: 6622 bnes 44ea4 <== ALWAYS TAKEN == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 44e82: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 44e86: 40c1 movew %sr,%d1 <== NOT EXECUTED 44e88: 8081 orl %d1,%d0 <== NOT EXECUTED 44e8a: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 44e8c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44e90: 7420 moveq #32,%d2 <== NOT EXECUTED 44e92: 8082 orl %d2,%d0 <== NOT EXECUTED 44e94: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 44e98: 7001 moveq #1,%d0 <== NOT EXECUTED 44e9a: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED rtems_interrupt_enable(level); 44e9e: 46c1 movew %d1,%sr <== NOT EXECUTED nToSend = 0; 44ea0: 4202 clrb %d2 <== NOT EXECUTED 44ea2: 6044 bras 44ee8 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 44ea4: 202a 0080 movel %a2@(128),%d0 44ea8: b083 cmpl %d3,%d0 44eaa: 6406 bccs 44eb2 nToSend = tty->rawOutBuf.Size - newTail; 44eac: 242a 0088 movel %a2@(136),%d2 44eb0: 6004 bras 44eb6 else nToSend = tty->rawOutBuf.Head - newTail; 44eb2: 242a 0080 movel %a2@(128),%d2 /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 44eb6: 202a 00b8 movel %a2@(184),%d0 * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 44eba: 9483 subl %d3,%d2 /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 44ebc: 0280 0000 0600 andil #1536,%d0 44ec2: 6702 beqs 44ec6 nToSend = 1; 44ec4: 7401 moveq #1,%d2 } tty->rawOutBufState = rob_busy; /*apm*/ 44ec6: 7201 moveq #1,%d1 44ec8: 2541 0094 movel %d1,%a2@(148) (*tty->device.write)( 44ecc: 2f02 movel %d2,%sp@- 44ece: 202a 007c movel %a2@(124),%d0 44ed2: d083 addl %d3,%d0 44ed4: 2f00 movel %d0,%sp@- 44ed6: 2f2a 0010 movel %a2@(16),%sp@- 44eda: 206a 00a4 moveal %a2@(164),%a0 44ede: 4e90 jsr %a0@ 44ee0: 4fef 000c lea %sp@(12),%sp 44ee4: 6002 bras 44ee8 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; 44ee6: 4282 clrl %d2 } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 44ee8: 2543 0084 movel %d3,%a2@(132) 44eec: 6002 bras 44ef0 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 44eee: 4282 clrl %d2 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 44ef0: 2002 movel %d2,%d0 44ef2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 44ef8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044cd8 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 44cd8: 4e56 ffe0 linkw %fp,#-32 44cdc: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ while (1) { /* * wait for rtems event */ rtems_event_receive( 44ce0: 260e movel %fp,%d3 if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 44ce2: 240e movel %fp,%d2 while (1) { /* * wait for rtems event */ rtems_event_receive( 44ce4: 5d83 subql #6,%d3 44ce6: 4bf9 0004 52a0 lea 452a0 ,%a5 RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { tty->rxTaskId = 0; rtems_task_delete(RTEMS_SELF); 44cec: 49f9 0004 5b30 lea 45b30 ,%a4 if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 44cf2: 5382 subql #1,%d2 44cf4: 47f9 0004 4a88 lea 44a88 ,%a3 /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 44cfa: 246e 0008 moveal %fp@(8),%a2 while (1) { /* * wait for rtems event */ rtems_event_receive( 44cfe: 2f03 movel %d3,%sp@- 44d00: 42a7 clrl %sp@- 44d02: 4878 0002 pea 2 44d06: 4878 0003 pea 3 44d0a: 4e95 jsr %a5@ (TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 44d0c: 4fef 0010 lea %sp@(16),%sp 44d10: 7001 moveq #1,%d0 44d12: c0ae fffa andl %fp@(-6),%d0 44d16: 670a beqs 44d22 <== ALWAYS TAKEN tty->rxTaskId = 0; 44d18: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 44d1c: 42a7 clrl %sp@- <== NOT EXECUTED 44d1e: 4e94 jsr %a4@ <== NOT EXECUTED 44d20: 588f addql #4,%sp <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); 44d22: 2f2a 0010 movel %a2@(16),%sp@- 44d26: 206a 00a0 moveal %a2@(160),%a0 44d2a: 4e90 jsr %a0@ if (c != EOF) { 44d2c: 588f addql #4,%sp 44d2e: 72ff moveq #-1,%d1 44d30: b280 cmpl %d0,%d1 44d32: 67ca beqs 44cfe /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 44d34: 4878 0001 pea 1 c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 44d38: 1d40 ffff moveb %d0,%fp@(-1) rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 44d3c: 2f02 movel %d2,%sp@- 44d3e: 2f0a movel %a2,%sp@- 44d40: 4e93 jsr %a3@ 44d42: 4fef 000c lea %sp@(12),%sp 44d46: 60b6 bras 44cfe =============================================================================== 00044efc : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 44efc: 4e56 ffe8 linkw %fp,#-24 44f00: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ while (1) { /* * wait for rtems event */ rtems_event_receive( 44f04: 240e movel %fp,%d2 44f06: 5982 subql #4,%d2 44f08: 4bf9 0004 52a0 lea 452a0 ,%a5 RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; rtems_task_delete(RTEMS_SELF); 44f0e: 49f9 0004 5b30 lea 45b30 ,%a4 } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 44f14: 47f9 0004 4d48 lea 44d48 ,%a3 /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 44f1a: 246e 0008 moveal %fp@(8),%a2 while (1) { /* * wait for rtems event */ rtems_event_receive( 44f1e: 2f02 movel %d2,%sp@- 44f20: 42a7 clrl %sp@- 44f22: 4878 0002 pea 2 44f26: 4878 0003 pea 3 44f2a: 4e95 jsr %a5@ (TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 44f2c: 4fef 0010 lea %sp@(16),%sp 44f30: 7001 moveq #1,%d0 44f32: c0ae fffc andl %fp@(-4),%d0 44f36: 670a beqs 44f42 <== ALWAYS TAKEN tty->txTaskId = 0; 44f38: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 44f3c: 42a7 clrl %sp@- <== NOT EXECUTED 44f3e: 4e94 jsr %a4@ <== NOT EXECUTED 44f40: 588f addql #4,%sp <== NOT EXECUTED } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 44f42: 202a 00cc movel %a2@(204),%d0 44f46: eb88 lsll #5,%d0 44f48: 0680 0005 cc24 addil #379940,%d0 44f4e: 2240 moveal %d0,%a1 44f50: 2051 moveal %a1@,%a0 44f52: 4a88 tstl %a0 44f54: 6706 beqs 44f5c <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 44f56: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44f58: 4e90 jsr %a0@ <== NOT EXECUTED 44f5a: 588f addql #4,%sp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 44f5c: 2f0a movel %a2,%sp@- 44f5e: 4e93 jsr %a3@ } 44f60: 588f addql #4,%sp 44f62: 60ba bras 44f1e =============================================================================== 000446de : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 446de: 4e56 ffe8 linkw %fp,#-24 446e2: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 446e6: 246e 0008 moveal %fp@(8),%a2 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 446ea: 2052 moveal %a2@,%a0 446ec: 2668 0034 moveal %a0@(52),%a3 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 446f0: 42a7 clrl %sp@- 446f2: 42a7 clrl %sp@- 446f4: 2f2b 0018 movel %a3@(24),%sp@- 446f8: 4eb9 0004 5854 jsr 45854 if (sc != RTEMS_SUCCESSFUL) 446fe: 4fef 000c lea %sp@(12),%sp { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44702: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) 44704: 6600 0084 bnew 4478a return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 44708: 202b 00cc movel %a3@(204),%d0 4470c: eb88 lsll #5,%d0 4470e: 0680 0005 cc1c addil #379932,%d0 44714: 2240 moveal %d0,%a1 44716: 2051 moveal %a1@,%a0 44718: 4a88 tstl %a0 4471a: 6718 beqs 44734 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 4471c: 2f0a movel %a2,%sp@- 4471e: 2f0b movel %a3,%sp@- 44720: 4e90 jsr %a0@ rtems_semaphore_release (tty->osem); 44722: 2f2b 0018 movel %a3@(24),%sp@- sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 44726: 2400 movel %d0,%d2 rtems_semaphore_release (tty->osem); 44728: 4eb9 0004 595c jsr 4595c return sc; 4472e: 4fef 000c lea %sp@(12),%sp 44732: 6056 bras 4478a } if (tty->termios.c_oflag & OPOST) { 44734: 7001 moveq #1,%d0 44736: c0ab 0034 andl %a3@(52),%d0 4473a: 6728 beqs 44764 <== NEVER TAKEN uint32_t count = args->count; 4473c: 262a 0010 movel %a2@(16),%d3 char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 44740: 4bfa fa68 lea %pc@(441aa ),%a5 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; 44744: 286a 000c moveal %a2@(12),%a4 while (count--) 44748: 600e bras 44758 oproc (*buffer++, tty); 4474a: 4280 clrl %d0 4474c: 101c moveb %a4@+,%d0 4474e: 5383 subql #1,%d3 44750: 2f0b movel %a3,%sp@- 44752: 2f00 movel %d0,%sp@- 44754: 4e95 jsr %a5@ 44756: 508f addql #8,%sp return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 44758: 4a83 tstl %d3 4475a: 66ee bnes 4474a oproc (*buffer++, tty); args->bytes_moved = args->count; 4475c: 256a 0010 0018 movel %a2@(16),%a2@(24) 44762: 601a bras 4477e } else { rtems_termios_puts (args->buffer, args->count, tty); 44764: 2f0b movel %a3,%sp@- <== NOT EXECUTED 44766: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4476a: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 4476e: 4eb9 0004 40b2 jsr 440b2 <== NOT EXECUTED args->bytes_moved = args->count; 44774: 256a 0010 0018 movel %a2@(16),%a2@(24) <== NOT EXECUTED 4477a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 4477e: 2f2b 0018 movel %a3@(24),%sp@- 44782: 4eb9 0004 595c jsr 4595c return sc; 44788: 588f addql #4,%sp } 4478a: 2002 movel %d2,%d0 4478c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 44792: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051c5c : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 51c5c: 4e56 fffc linkw %fp,#-4 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 51c60: 486e fffc pea %fp@(-4) 51c64: 2f2e 0008 movel %fp@(8),%sp@- 51c68: 4879 0007 6168 pea 76168 <_Timer_Information> 51c6e: 4eb9 0005 45ac jsr 545ac <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 51c74: 4fef 000c lea %sp@(12),%sp 51c78: 4aae fffc tstl %fp@(-4) 51c7c: 6620 bnes 51c9e case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 51c7e: 7204 moveq #4,%d1 51c80: 2040 moveal %d0,%a0 51c82: b2a8 0038 cmpl %a0@(56),%d1 51c86: 670c beqs 51c94 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 51c88: 4868 0010 pea %a0@(16) 51c8c: 4eb9 0005 60b4 jsr 560b4 <_Watchdog_Remove> 51c92: 588f addql #4,%sp _Thread_Enable_dispatch(); 51c94: 4eb9 0005 5122 jsr 55122 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 51c9a: 4280 clrl %d0 51c9c: 6002 bras 51ca0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 51c9e: 7004 moveq #4,%d0 } 51ca0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051f98 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 51f98: 4e56 fffc linkw %fp,#-4 51f9c: 2f0b movel %a3,%sp@- 51f9e: 2f0a movel %a2,%sp@- 51fa0: 486e fffc pea %fp@(-4) 51fa4: 2f2e 0008 movel %fp@(8),%sp@- 51fa8: 4879 0007 6168 pea 76168 <_Timer_Information> 51fae: 4eb9 0005 45ac jsr 545ac <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 51fb4: 4fef 000c lea %sp@(12),%sp 51fb8: 2440 moveal %d0,%a2 51fba: 4aae fffc tstl %fp@(-4) 51fbe: 6656 bnes 52016 <== NEVER TAKEN case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 51fc0: 202a 0038 movel %a2@(56),%d0 51fc4: 661c bnes 51fe2 _Watchdog_Remove( &the_timer->Ticker ); 51fc6: 45ea 0010 lea %a2@(16),%a2 51fca: 2f0a movel %a2,%sp@- 51fcc: 4eb9 0005 60b4 jsr 560b4 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 51fd2: 2f0a movel %a2,%sp@- 51fd4: 4879 0007 6014 pea 76014 <_Watchdog_Ticks_chain> 51fda: 4eb9 0005 5f8c jsr 55f8c <_Watchdog_Insert> 51fe0: 6020 bras 52002 } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 51fe2: 7201 moveq #1,%d1 51fe4: b280 cmpl %d0,%d1 51fe6: 6622 bnes 5200a <== NEVER TAKEN if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 51fe8: 486a 0010 pea %a2@(16) case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 51fec: 2679 0007 61a0 moveal 761a0 <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 51ff2: 4eb9 0005 60b4 jsr 560b4 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 51ff8: 2f0a movel %a2,%sp@- 51ffa: 2f0b movel %a3,%sp@- 51ffc: 206b 0004 moveal %a3@(4),%a0 52000: 4e90 jsr %a0@ 52002: 4fef 000c lea %sp@(12),%sp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 52006: 95ca subal %a2,%a2 52008: 6004 bras 5200e /* * Must be dormant or time of day timer (e.g. TIMER_DORMANT, * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; 5200a: 347c 000b moveaw #11,%a2 } _Thread_Enable_dispatch(); 5200e: 4eb9 0005 5122 jsr 55122 <_Thread_Enable_dispatch> return status; 52014: 6004 bras 5201a #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 52016: 347c 0004 moveaw #4,%a2 } 5201a: 200a movel %a2,%d0 5201c: 246e fff4 moveal %fp@(-12),%a2 52020: 266e fff8 moveal %fp@(-8),%a3 52024: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000520e4 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 520e4: 4e56 ffe8 linkw %fp,#-24 520e8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 520ec: 262e 0008 movel %fp@(8),%d3 520f0: 242e 000c movel %fp@(12),%d2 520f4: 282e 0010 movel %fp@(16),%d4 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 520f8: 2679 0007 61a0 moveal 761a0 <_Timer_server>,%a3 if ( !timer_server ) 520fe: 4a8b tstl %a3 52100: 6700 0098 beqw 5219a return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 52104: 4a39 0007 5f64 tstb 75f64 <_TOD_Is_set> 5210a: 6700 0092 beqw 5219e return RTEMS_NOT_DEFINED; if ( !routine ) 5210e: 4a84 tstl %d4 52110: 6700 0090 beqw 521a2 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 52114: 2f02 movel %d2,%sp@- 52116: 4eb9 0004 f5a4 jsr 4f5a4 <_TOD_Validate> 5211c: 588f addql #4,%sp 5211e: 4a00 tstb %d0 52120: 6700 0084 beqw 521a6 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 52124: 2f02 movel %d2,%sp@- 52126: 4eb9 0004 f508 jsr 4f508 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 5212c: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 5212e: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 52130: b0b9 0007 5fde cmpl 75fde <_TOD_Now>,%d0 52136: 636e blss 521a6 52138: 486e fffc pea %fp@(-4) 5213c: 2f03 movel %d3,%sp@- 5213e: 4879 0007 6168 pea 76168 <_Timer_Information> 52144: 4eb9 0005 45ac jsr 545ac <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5214a: 4fef 000c lea %sp@(12),%sp 5214e: 2440 moveal %d0,%a2 52150: 4aae fffc tstl %fp@(-4) 52154: 6654 bnes 521aa case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 52156: 486a 0010 pea %a2@(16) 5215a: 4eb9 0005 60b4 jsr 560b4 <_Watchdog_Remove> the_watchdog->user_data = user_data; 52160: 256e 0014 0034 movel %fp@(20),%a2@(52) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 52166: 94b9 0007 5fde subl 75fde <_TOD_Now>,%d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 5216c: 7003 moveq #3,%d0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5216e: 42aa 0018 clrl %a2@(24) 52172: 2540 0038 movel %d0,%a2@(56) the_watchdog->routine = routine; 52176: 2544 002c movel %d4,%a2@(44) the_watchdog->id = id; 5217a: 2543 0030 movel %d3,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 5217e: 2542 001c movel %d2,%a2@(28) (*timer_server->schedule_operation)( timer_server, the_timer ); 52182: 2f0a movel %a2,%sp@- 52184: 2f0b movel %a3,%sp@- 52186: 206b 0004 moveal %a3@(4),%a0 5218a: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 5218c: 4eb9 0005 5122 jsr 55122 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 52192: 4fef 000c lea %sp@(12),%sp 52196: 4280 clrl %d0 52198: 6012 bras 521ac Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 5219a: 700e moveq #14,%d0 5219c: 600e bras 521ac if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 5219e: 700b moveq #11,%d0 <== NOT EXECUTED 521a0: 600a bras 521ac <== NOT EXECUTED if ( !routine ) return RTEMS_INVALID_ADDRESS; 521a2: 7009 moveq #9,%d0 521a4: 6006 bras 521ac if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 521a6: 7014 moveq #20,%d0 521a8: 6002 bras 521ac #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 521aa: 7004 moveq #4,%d0 } 521ac: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 521b2: 4e5e unlk %fp ... =============================================================================== 000426b8 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 426b8: 4e56 fff0 linkw %fp,#-16 426bc: 48d7 041c moveml %d2-%d4/%a2,%sp@ 426c0: 242e 0008 movel %fp@(8),%d2 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 426c4: 0802 001d btst #29,%d2 426c8: 672e beqs 426f8 if (rtems_panic_in_progress++) 426ca: 2039 0005 d404 movel 5d404 ,%d0 426d0: 2200 movel %d0,%d1 426d2: 5281 addql #1,%d1 426d4: 23c1 0005 d404 movel %d1,5d404 426da: 4a80 tstl %d0 426dc: 670e beqs 426ec <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 426de: 2039 0005 d558 movel 5d558 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 426e4: 5280 addql #1,%d0 <== NOT EXECUTED 426e6: 23c0 0005 d558 movel %d0,5d558 <_Thread_Dispatch_disable_level><== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 426ec: 7002 moveq #2,%d0 426ee: b0b9 0005 d404 cmpl 5d404 ,%d0 426f4: 6d00 0100 bltw 427f6 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 426f8: 2079 0005 bee8 moveal 5bee8 <_impure_ptr>,%a0 status = error_flag & ~RTEMS_ERROR_MASK; 426fe: 2802 movel %d2,%d4 /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 42700: 2f28 0008 movel %a0@(8),%sp@- status = error_flag & ~RTEMS_ERROR_MASK; 42704: 0284 8fff ffff andil #-1879048193,%d4 /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 4270a: 4eb9 0004 c00a jsr 4c00a status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 42710: 588f addql #4,%sp 42712: 0802 001e btst #30,%d2 42716: 670c beqs 42724 local_errno = errno; 42718: 4eb9 0004 bca0 jsr 4bca0 <__errno> 4271e: 2040 moveal %d0,%a0 42720: 2610 movel %a0@,%d3 42722: 6002 bras 42726 rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { int local_errno = 0; 42724: 4283 clrl %d3 #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 42726: 2f2e 0010 movel %fp@(16),%sp@- 4272a: 2079 0005 bee8 moveal 5bee8 <_impure_ptr>,%a0 42730: 2f2e 000c movel %fp@(12),%sp@- 42734: 2f28 000c movel %a0@(12),%sp@- 42738: 4eb9 0005 30aa jsr 530aa if (status) 4273e: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 42742: 2400 movel %d0,%d2 if (status) 42744: 4a84 tstl %d4 42746: 6726 beqs 4276e chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 42748: 2f04 movel %d4,%sp@- 4274a: 4eb9 0004 26a0 jsr 426a0 42750: 2079 0005 bee8 moveal 5bee8 <_impure_ptr>,%a0 42756: 2f00 movel %d0,%sp@- 42758: 4879 0005 a9e5 pea 5a9e5 4275e: 2f28 000c movel %a0@(12),%sp@- 42762: 4eb9 0004 c432 jsr 4c432 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 42768: 4fef 0010 lea %sp@(16),%sp 4276c: d480 addl %d0,%d2 fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 4276e: 4a83 tstl %d3 42770: 6756 beqs 427c8 if ((local_errno > 0) && *strerror(local_errno)) 42772: 6f36 bles 427aa 42774: 2f03 movel %d3,%sp@- 42776: 45f9 0004 ccc8 lea 4ccc8 ,%a2 4277c: 4e92 jsr %a2@ 4277e: 588f addql #4,%sp 42780: 2040 moveal %d0,%a0 42782: 4a10 tstb %a0@ 42784: 6724 beqs 427aa <== NEVER TAKEN chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 42786: 2f03 movel %d3,%sp@- 42788: 4e92 jsr %a2@ 4278a: 2079 0005 bee8 moveal 5bee8 <_impure_ptr>,%a0 42790: 2f00 movel %d0,%sp@- 42792: 4879 0005 a9f3 pea 5a9f3 42798: 2f28 000c movel %a0@(12),%sp@- 4279c: 4eb9 0004 c432 jsr 4c432 427a2: 4fef 0010 lea %sp@(16),%sp 427a6: d480 addl %d0,%d2 427a8: 601e bras 427c8 else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 427aa: 2f03 movel %d3,%sp@- 427ac: 4879 0005 aa00 pea 5aa00 427b2: 2079 0005 bee8 moveal 5bee8 <_impure_ptr>,%a0 427b8: 2f28 000c movel %a0@(12),%sp@- 427bc: 4eb9 0004 c432 jsr 4c432 427c2: 4fef 000c lea %sp@(12),%sp 427c6: d480 addl %d0,%d2 } chars_written += fprintf(stderr, "\n"); 427c8: 4879 0005 a627 pea 5a627 427ce: 2079 0005 bee8 moveal 5bee8 <_impure_ptr>,%a0 427d4: 2f28 000c movel %a0@(12),%sp@- 427d8: 4eb9 0004 c432 jsr 4c432 (void) fflush(stderr); 427de: 2079 0005 bee8 moveal 5bee8 <_impure_ptr>,%a0 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 427e4: d480 addl %d0,%d2 (void) fflush(stderr); 427e6: 2f28 000c movel %a0@(12),%sp@- 427ea: 4eb9 0004 c00a jsr 4c00a return chars_written; 427f0: 4fef 000c lea %sp@(12),%sp 427f4: 6002 bras 427f8 if (rtems_panic_in_progress++) _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; 427f6: 4282 clrl %d2 <== NOT EXECUTED chars_written += fprintf(stderr, "\n"); (void) fflush(stderr); return chars_written; } 427f8: 2002 movel %d2,%d0 427fa: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42800: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043030 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 43030: 4e56 ffe4 linkw %fp,#-28 43034: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 43038: 246e 0008 moveal %fp@(8),%a2 int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; 4303c: 4283 clrl %d3 static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; unsigned int limit = INT_MAX; 4303e: 283c 7fff ffff movel #2147483647,%d4 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 43044: 4282 clrl %d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 43046: 47f9 0004 e5f8 lea 4e5f8 <__srget_r>,%a3 4304c: 202a 0004 movel %a2@(4),%d0 43050: 5380 subql #1,%d0 43052: 2540 0004 movel %d0,%a2@(4) 43056: 6c0e bges 43066 <== ALWAYS TAKEN 43058: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4305a: 2f39 0005 d818 movel 5d818 <_impure_ptr>,%sp@- <== NOT EXECUTED 43060: 4e93 jsr %a3@ <== NOT EXECUTED 43062: 508f addql #8,%sp <== NOT EXECUTED 43064: 600a bras 43070 <== NOT EXECUTED 43066: 2052 moveal %a2@,%a0 43068: 4280 clrl %d0 4306a: 1010 moveb %a0@,%d0 4306c: 5288 addql #1,%a0 4306e: 2488 movel %a0,%a2@ if (c == ':') 43070: 723a moveq #58,%d1 43072: b280 cmpl %d0,%d1 43074: 6750 beqs 430c6 break; if (sign == 0) { 43076: 4a83 tstl %d3 43078: 660e bnes 43088 if (c == '-') { 4307a: 7c2d moveq #45,%d6 4307c: bc80 cmpl %d0,%d6 4307e: 6606 bnes 43086 sign = -1; limit++; 43080: 5284 addql #1,%d4 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 43082: 76ff moveq #-1,%d3 limit++; continue; 43084: 60c6 bras 4304c } sign = 1; 43086: 7601 moveq #1,%d3 } if (!isdigit(c)) 43088: 2079 0005 d814 moveal 5d814 <__ctype_ptr__>,%a0 4308e: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 43092: 49c1 extbl %d1 43094: 44c1 movew %d1,%ccr 43096: 6640 bnes 430d8 return 0; d = c - '0'; if ((i > (limit / 10)) 43098: 2204 movel %d4,%d1 4309a: 7c0a moveq #10,%d6 4309c: 4c46 1005 remul %d6,%d5,%d1 430a0: 4c46 1001 remul %d6,%d1,%d1 430a4: b282 cmpl %d2,%d1 430a6: 6530 bcss 430d8 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 430a8: 0680 ffff ffd0 addil #-48,%d0 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 430ae: b282 cmpl %d2,%d1 430b0: 6604 bnes 430b6 430b2: ba80 cmpl %d0,%d5 430b4: 6522 bcss 430d8 <== ALWAYS TAKEN return 0; i = i * 10 + d; 430b6: 2202 movel %d2,%d1 430b8: e789 lsll #3,%d1 430ba: 2241 moveal %d1,%a1 430bc: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 430c0: 2400 movel %d0,%d2 430c2: d488 addl %a0,%d2 430c4: 6086 bras 4304c } if (sign == 0) 430c6: 4a83 tstl %d3 430c8: 670e beqs 430d8 <== NEVER TAKEN return 0; *val = i * sign; 430ca: 4c02 3800 mulsl %d2,%d3 return 1; 430ce: 7001 moveq #1,%d0 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; 430d0: 206e 000c moveal %fp@(12),%a0 430d4: 2083 movel %d3,%a0@ return 1; 430d6: 6002 bras 430da || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) return 0; 430d8: 4280 clrl %d0 *val = i * sign; return 1; } 430da: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 430e0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043172 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 43172: 4e56 ffe4 linkw %fp,#-28 43176: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4317a: 42a7 clrl %sp@- 4317c: 280e movel %fp,%d4 4317e: 0684 0000 0014 addil #20,%d4 43184: 260e movel %fp,%d3 43186: 0683 0000 0010 addil #16,%d3 4318c: 47fa ff56 lea %pc@(430e4 ),%a3 43190: 2f04 movel %d4,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 43192: 246e 000c moveal %fp@(12),%a2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 43196: 2f03 movel %d3,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 43198: 242e 0008 movel %fp@(8),%d2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4319c: 2f0a movel %a2,%sp@- 4319e: 2f02 movel %d2,%sp@- 431a0: 4e93 jsr %a3@ 431a2: 4fef 0014 lea %sp@(20),%sp 431a6: 4a80 tstl %d0 431a8: 6700 00b6 beqw 43260 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 431ac: 42a7 clrl %sp@- 431ae: 2f04 movel %d4,%sp@- 431b0: 2f03 movel %d3,%sp@- 431b2: 486a 0004 pea %a2@(4) 431b6: 2f02 movel %d2,%sp@- 431b8: 4e93 jsr %a3@ 431ba: 4fef 0014 lea %sp@(20),%sp 431be: 4a80 tstl %d0 431c0: 6700 009e beqw 43260 || !scanInt(fp, &grgid) 431c4: 486e fffc pea %fp@(-4) 431c8: 2f02 movel %d2,%sp@- 431ca: 4eba fe64 jsr %pc@(43030 ) 431ce: 508f addql #8,%sp 431d0: 4a80 tstl %d0 431d2: 6700 008c beqw 43260 || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 431d6: 4878 0001 pea 1 431da: 2f04 movel %d4,%sp@- 431dc: 2f03 movel %d3,%sp@- 431de: 486e fff8 pea %fp@(-8) 431e2: 2f02 movel %d2,%sp@- 431e4: 4e93 jsr %a3@ 431e6: 4fef 0014 lea %sp@(20),%sp 431ea: 4a80 tstl %d0 431ec: 6772 beqs 43260 <== NEVER TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 431ee: 222e fff8 movel %fp@(-8),%d1 431f2: 7001 moveq #1,%d0 431f4: 2041 moveal %d1,%a0 if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 431f6: 356e fffe 0008 movew %fp@(-2),%a2@(8) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 431fc: 600a bras 43208 if(*cp == ',') 431fe: 49c2 extbl %d2 43200: 762c moveq #44,%d3 43202: b682 cmpl %d2,%d3 43204: 6602 bnes 43208 memcount++; 43206: 5280 addql #1,%d0 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 43208: 1418 moveb %a0@+,%d2 4320a: 66f2 bnes 431fe } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 4320c: e588 lsll #2,%d0 4320e: 0680 0000 0013 addil #19,%d0 43214: b0ae 0014 cmpl %fp@(20),%d0 43218: 6246 bhis 43260 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 4321a: 202e 0010 movel %fp@(16),%d0 4321e: 74f0 moveq #-16,%d2 43220: 0680 0000 000f addil #15,%d0 43226: c082 andl %d2,%d0 43228: 2540 000a movel %d0,%a2@(10) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 4322c: 2040 moveal %d0,%a0 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4322e: 7001 moveq #1,%d0 grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 43230: 2081 movel %d1,%a0@ 43232: 206e fff8 moveal %fp@(-8),%a0 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 43236: 6018 bras 43250 if(*cp == ',') { 43238: 49c1 extbl %d1 4323a: 742c moveq #44,%d2 4323c: b481 cmpl %d1,%d2 4323e: 6610 bnes 43250 *cp = '\0'; 43240: 4203 clrb %d3 43242: 1143 ffff moveb %d3,%a0@(-1) grp->gr_mem[memcount++] = cp + 1; 43246: 226a 000a moveal %a2@(10),%a1 4324a: 2388 0c00 movel %a0,%a1@(00000000,%d0:l:4) 4324e: 5280 addql #1,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 43250: 1218 moveb %a0@+,%d1 43252: 66e4 bnes 43238 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 43254: 206a 000a moveal %a2@(10),%a0 43258: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) return 1; 4325c: 7001 moveq #1,%d0 4325e: 6002 bras 43262 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; 43260: 4280 clrl %d0 grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 43262: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 43268: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004326c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4326c: 4e56 ffe0 linkw %fp,#-32 43270: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 43274: 42a7 clrl %sp@- 43276: 280e movel %fp,%d4 43278: 0684 0000 0014 addil #20,%d4 4327e: 260e movel %fp,%d3 43280: 0683 0000 0010 addil #16,%d3 43286: 47fa fe5c lea %pc@(430e4 ),%a3 4328a: 2f04 movel %d4,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4328c: 246e 000c moveal %fp@(12),%a2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 43290: 2f03 movel %d3,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 43292: 242e 0008 movel %fp@(8),%d2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 43296: 2f0a movel %a2,%sp@- 43298: 2f02 movel %d2,%sp@- 4329a: 4e93 jsr %a3@ 4329c: 4fef 0014 lea %sp@(20),%sp 432a0: 4a80 tstl %d0 432a2: 6700 00a4 beqw 43348 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 432a6: 42a7 clrl %sp@- 432a8: 2f04 movel %d4,%sp@- 432aa: 2f03 movel %d3,%sp@- 432ac: 486a 0004 pea %a2@(4) 432b0: 2f02 movel %d2,%sp@- 432b2: 4e93 jsr %a3@ 432b4: 4fef 0014 lea %sp@(20),%sp 432b8: 4a80 tstl %d0 432ba: 6700 008c beqw 43348 || !scanInt(fp, &pwuid) 432be: 486e fffc pea %fp@(-4) 432c2: 49fa fd6c lea %pc@(43030 ),%a4 432c6: 2f02 movel %d2,%sp@- 432c8: 4e94 jsr %a4@ 432ca: 508f addql #8,%sp 432cc: 4a80 tstl %d0 432ce: 6778 beqs 43348 || !scanInt(fp, &pwgid) 432d0: 486e fff8 pea %fp@(-8) 432d4: 2f02 movel %d2,%sp@- 432d6: 4e94 jsr %a4@ 432d8: 508f addql #8,%sp 432da: 4a80 tstl %d0 432dc: 676a beqs 43348 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 432de: 42a7 clrl %sp@- 432e0: 2f04 movel %d4,%sp@- 432e2: 2f03 movel %d3,%sp@- 432e4: 486a 000c pea %a2@(12) 432e8: 2f02 movel %d2,%sp@- 432ea: 4e93 jsr %a3@ 432ec: 4fef 0014 lea %sp@(20),%sp 432f0: 4a80 tstl %d0 432f2: 6754 beqs 43348 <== NEVER TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 432f4: 42a7 clrl %sp@- 432f6: 2f04 movel %d4,%sp@- 432f8: 2f03 movel %d3,%sp@- 432fa: 486a 0010 pea %a2@(16) 432fe: 2f02 movel %d2,%sp@- 43300: 4e93 jsr %a3@ 43302: 4fef 0014 lea %sp@(20),%sp 43306: 4a80 tstl %d0 43308: 673e beqs 43348 <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 4330a: 42a7 clrl %sp@- 4330c: 2f04 movel %d4,%sp@- 4330e: 2f03 movel %d3,%sp@- 43310: 486a 0014 pea %a2@(20) 43314: 2f02 movel %d2,%sp@- 43316: 4e93 jsr %a3@ 43318: 4fef 0014 lea %sp@(20),%sp 4331c: 4a80 tstl %d0 4331e: 6728 beqs 43348 <== NEVER TAKEN || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 43320: 4878 0001 pea 1 43324: 2f04 movel %d4,%sp@- 43326: 2f03 movel %d3,%sp@- 43328: 486a 0018 pea %a2@(24) 4332c: 2f02 movel %d2,%sp@- 4332e: 4e93 jsr %a3@ 43330: 4fef 0014 lea %sp@(20),%sp 43334: 4a80 tstl %d0 43336: 6710 beqs 43348 return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; 43338: 7001 moveq #1,%d0 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 4333a: 356e fffe 0008 movew %fp@(-2),%a2@(8) pwd->pw_gid = pwgid; 43340: 356e fffa 000a movew %fp@(-6),%a2@(10) return 1; 43346: 6002 bras 4334a || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; 43348: 4280 clrl %d0 pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } 4334a: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 43350: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044676 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 44676: 4e56 0000 linkw %fp,#0 4467a: 2f0a movel %a2,%sp@- 4467c: 246e 000c moveal %fp@(12),%a2 int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 44680: 202a 003c movel %a2@(60),%d0 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 44684: 2f02 movel %d2,%sp@- 44686: 4282 clrl %d2 44688: 142e 000b moveb %fp@(11),%d2 int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 4468c: 0280 0000 0e78 andil #3704,%d0 44692: 6734 beqs 446c8 <== NEVER TAKEN rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44694: 42a7 clrl %sp@- 44696: 42a7 clrl %sp@- 44698: 2f2a 0018 movel %a2@(24),%sp@- 4469c: 4eb9 0004 5854 jsr 45854 i = iproc (c, tty); 446a2: 2f0a movel %a2,%sp@- 446a4: 2f02 movel %d2,%sp@- 446a6: 4eba fe66 jsr %pc@(4450e ) rtems_semaphore_release (tty->osem); 446aa: 2f2a 0018 movel %a2@(24),%sp@- /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); 446ae: 2400 movel %d0,%d2 rtems_semaphore_release (tty->osem); 446b0: 4eb9 0004 595c jsr 4595c } else { i = iproc (c, tty); } return i; } 446b6: 246e fffc moveal %fp@(-4),%a2 446ba: 2002 movel %d2,%d0 * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); 446bc: 4fef 0018 lea %sp@(24),%sp } else { i = iproc (c, tty); } return i; } 446c0: 242e fff8 movel %fp@(-8),%d2 446c4: 4e5e unlk %fp 446c6: 4e75 rts rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 446c8: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } return i; } 446cc: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 446d0: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } return i; } 446d4: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 446d8: 4e5e unlk %fp <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 446da: 6000 fe32 braw 4450e <== NOT EXECUTED =============================================================================== 0004596c : #include int statvfs (const char *path, struct statvfs *sb) { 4596c: 4e56 ffdc linkw %fp,#-36 45970: 48d7 040c moveml %d2-%d3/%a2,%sp@ 45974: 246e 0008 moveal %fp@(8),%a2 * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 45978: 240e movel %fp,%d2 4597a: 0682 ffff ffec addil #-20,%d2 45980: 2f0a movel %a2,%sp@- #include int statvfs (const char *path, struct statvfs *sb) { 45982: 262e 000c movel %fp@(12),%d3 * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 45986: 4eb9 0005 008c jsr 5008c 4598c: 7201 moveq #1,%d1 4598e: 2e81 movel %d1,%sp@ 45990: 2f02 movel %d2,%sp@- 45992: 42a7 clrl %sp@- 45994: 2f00 movel %d0,%sp@- 45996: 2f0a movel %a2,%sp@- 45998: 4eb9 0004 46bc jsr 446bc 4599e: 4fef 0014 lea %sp@(20),%sp 459a2: 4a80 tstl %d0 459a4: 6638 bnes 459de <== NEVER TAKEN return -1; mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); 459a6: 4878 0038 pea 38 */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; 459aa: 246e fffc moveal %fp@(-4),%a2 fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); 459ae: 42a7 clrl %sp@- 459b0: 2f03 movel %d3,%sp@- 459b2: 4eb9 0004 eebc jsr 4eebc result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 459b8: 206a 0028 moveal %a2@(40),%a0 459bc: 2f03 movel %d3,%sp@- 459be: 486a 001c pea %a2@(28) 459c2: 2068 0044 moveal %a0@(68),%a0 459c6: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 459c8: 2f02 movel %d2,%sp@- 459ca: 2d40 ffe8 movel %d0,%fp@(-24) 459ce: 4eb9 0004 4788 jsr 44788 return result; 459d4: 202e ffe8 movel %fp@(-24),%d0 459d8: 4fef 0018 lea %sp@(24),%sp 459dc: 6002 bras 459e0 * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; 459de: 70ff moveq #-1,%d0 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 459e0: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 459e6: 4e5e unlk %fp ... =============================================================================== 0004488c : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 4488c: 4e56 0000 linkw %fp,#0 44890: 206e 0008 moveal %fp@(8),%a0 /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; 44894: 2028 00f8 movel %a0@(248),%d0 fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 44898: 2f02 movel %d2,%sp@- /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; if ( this_reent ) { 4489a: 4a80 tstl %d0 4489c: 6728 beqs 448c6 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 4489e: 2279 0005 f154 moveal 5f154 <_Per_CPU_Information+0xc>,%a1 448a4: 2429 00f8 movel %a1@(248),%d2 _Thread_Executing->libc_reent = this_reent; 448a8: 2340 00f8 movel %d0,%a1@(248) _fwalk (t->libc_reent, sync_wrapper); 448ac: 487a 0020 pea %pc@(448ce ) 448b0: 2f28 00f8 movel %a0@(248),%sp@- 448b4: 4eb9 0004 db28 jsr 4db28 <_fwalk> _Thread_Executing->libc_reent = current_reent; 448ba: 2079 0005 f154 moveal 5f154 <_Per_CPU_Information+0xc>,%a0 448c0: 508f addql #8,%sp 448c2: 2142 00f8 movel %d2,%a0@(248) } } 448c6: 242e fffc movel %fp@(-4),%d2 448ca: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ab1c : int tcsetattr( int fd, int opt, struct termios *tp ) { 4ab1c: 4e56 0000 linkw %fp,#0 4ab20: 202e 000c movel %fp@(12),%d0 4ab24: 2f03 movel %d3,%sp@- 4ab26: 262e 0010 movel %fp@(16),%d3 4ab2a: 2f02 movel %d2,%sp@- 4ab2c: 242e 0008 movel %fp@(8),%d2 switch (opt) { 4ab30: 4a80 tstl %d0 4ab32: 672c beqs 4ab60 4ab34: 7201 moveq #1,%d1 4ab36: b280 cmpl %d0,%d1 4ab38: 6710 beqs 4ab4a default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4ab3a: 4eb9 0004 d418 jsr 4d418 <__errno> 4ab40: 2040 moveal %d0,%a0 4ab42: 20bc 0000 0086 movel #134,%a0@ 4ab48: 6034 bras 4ab7e case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 4ab4a: 42a7 clrl %sp@- 4ab4c: 4878 0003 pea 3 4ab50: 2f02 movel %d2,%sp@- 4ab52: 4eb9 0004 a820 jsr 4a820 4ab58: 4fef 000c lea %sp@(12),%sp 4ab5c: 4a80 tstl %d0 4ab5e: 6d1e blts 4ab7e <== NEVER TAKEN return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4ab60: 2d43 0010 movel %d3,%fp@(16) 4ab64: 7002 moveq #2,%d0 4ab66: 2d42 0008 movel %d2,%fp@(8) } } 4ab6a: 242e fff8 movel %fp@(-8),%d2 4ab6e: 262e fffc movel %fp@(-4),%d3 return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4ab72: 2d40 000c movel %d0,%fp@(12) } } 4ab76: 4e5e unlk %fp return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4ab78: 4ef9 0004 a820 jmp 4a820 } } 4ab7e: 242e fff8 movel %fp@(-8),%d2 4ab82: 70ff moveq #-1,%d0 4ab84: 262e fffc movel %fp@(-4),%d3 4ab88: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045d54 : #include int unlink( const char *path ) { 45d54: 4e56 ffbc linkw %fp,#-68 45d58: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 45d5c: 246e 0008 moveal %fp@(8),%a2 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 45d60: 2f0a movel %a2,%sp@- 45d62: 4eb9 0004 3608 jsr 43608 if ( parentpathlen == 0 ) 45d68: 588f addql #4,%sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 45d6a: 2a00 movel %d0,%d5 45d6c: 200e movel %fp,%d0 45d6e: 0680 ffff ffe8 addil #-24,%d0 if ( parentpathlen == 0 ) 45d74: 4a85 tstl %d5 45d76: 6616 bnes 45d8e rtems_filesystem_get_start_loc( path, &i, &parentloc ); 45d78: 2f00 movel %d0,%sp@- 45d7a: 486e fffc pea %fp@(-4) const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 45d7e: 4204 clrb %d4 */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); 45d80: 2f0a movel %a2,%sp@- 45d82: 4eb9 0004 4454 jsr 44454 45d88: 4fef 000c lea %sp@(12),%sp 45d8c: 601e bras 45dac else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 45d8e: 42a7 clrl %sp@- 45d90: 2f00 movel %d0,%sp@- 45d92: 4878 0002 pea 2 45d96: 2f05 movel %d5,%sp@- 45d98: 2f0a movel %a2,%sp@- 45d9a: 4eb9 0004 35bc jsr 435bc RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 45da0: 4fef 0014 lea %sp@(20),%sp 45da4: 4a80 tstl %d0 45da6: 6600 00c2 bnew 45e6a return -1; free_parentloc = true; 45daa: 7801 moveq #1,%d4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 45dac: 4878 0014 pea 14 45db0: 260e movel %fp,%d3 45db2: 0683 ffff ffe8 addil #-24,%d3 45db8: 240e movel %fp,%d2 45dba: 0682 ffff ffd4 addil #-44,%d2 name = path + parentpathlen; 45dc0: d5c5 addal %d5,%a2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 45dc2: 47f9 0005 0804 lea 50804 ,%a3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 45dc8: 2f03 movel %d3,%sp@- 45dca: 2f02 movel %d2,%sp@- 45dcc: 4eb9 0004 fd0c jsr 4fd0c name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 45dd2: 2f0a movel %a2,%sp@- 45dd4: 4e93 jsr %a3@ 45dd6: 2e80 movel %d0,%sp@ 45dd8: 2f0a movel %a2,%sp@- 45dda: 4eb9 0004 364a jsr 4364a 45de0: d5c0 addal %d0,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 45de2: 2f0a movel %a2,%sp@- 45de4: 4e93 jsr %a3@ 45de6: 4297 clrl %sp@ 45de8: 2f02 movel %d2,%sp@- 45dea: 42a7 clrl %sp@- 45dec: 2f00 movel %d0,%sp@- 45dee: 2f0a movel %a2,%sp@- 45df0: 4eb9 0004 354c jsr 4354c 0, &loc, false ); if ( result != 0 ) { 45df6: 4fef 0028 lea %sp@(40),%sp 45dfa: 4a80 tstl %d0 45dfc: 6710 beqs 45e0e if ( free_parentloc ) 45dfe: 4a04 tstb %d4 45e00: 6768 beqs 45e6a <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 45e02: 2f03 movel %d3,%sp@- 45e04: 4eb9 0004 3688 jsr 43688 45e0a: 588f addql #4,%sp 45e0c: 605c bras 45e6a return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 45e0e: 206e ffe0 moveal %fp@(-32),%a0 45e12: 45f9 0004 3688 lea 43688 ,%a2 45e18: 2f02 movel %d2,%sp@- 45e1a: 2068 0010 moveal %a0@(16),%a0 45e1e: 4e90 jsr %a0@ 45e20: 588f addql #4,%sp 45e22: 7201 moveq #1,%d1 45e24: b280 cmpl %d0,%d1 45e26: 661e bnes 45e46 rtems_filesystem_freenode( &loc ); 45e28: 2f02 movel %d2,%sp@- 45e2a: 4e92 jsr %a2@ if ( free_parentloc ) 45e2c: 588f addql #4,%sp 45e2e: 4a04 tstb %d4 45e30: 6706 beqs 45e38 rtems_filesystem_freenode( &parentloc ); 45e32: 2f03 movel %d3,%sp@- 45e34: 4e92 jsr %a2@ 45e36: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EISDIR ); 45e38: 4eb9 0004 f460 jsr 4f460 <__errno> 45e3e: 2040 moveal %d0,%a0 45e40: 7015 moveq #21,%d0 45e42: 2080 movel %d0,%a0@ 45e44: 6024 bras 45e6a } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 45e46: 2f02 movel %d2,%sp@- 45e48: 206e ffe0 moveal %fp@(-32),%a0 45e4c: 2f03 movel %d3,%sp@- 45e4e: 2068 000c moveal %a0@(12),%a0 45e52: 4e90 jsr %a0@ 45e54: 2a00 movel %d0,%d5 rtems_filesystem_freenode( &loc ); 45e56: 2f02 movel %d2,%sp@- 45e58: 4e92 jsr %a2@ if ( free_parentloc ) 45e5a: 4fef 000c lea %sp@(12),%sp 45e5e: 4a04 tstb %d4 45e60: 670a beqs 45e6c rtems_filesystem_freenode( &parentloc ); 45e62: 2f03 movel %d3,%sp@- 45e64: 4e92 jsr %a2@ 45e66: 588f addql #4,%sp 45e68: 6002 bras 45e6c result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; 45e6a: 7aff moveq #-1,%d5 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 45e6c: 2005 movel %d5,%d0 45e6e: 4cee 0c3c ffbc moveml %fp@(-68),%d2-%d5/%a2-%a3 45e74: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000460c8 : */ int unmount( const char *path ) { 460c8: 4e56 ffe0 linkw %fp,#-32 460cc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 460d0: 246e 0008 moveal %fp@(8),%a2 * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 460d4: 7401 moveq #1,%d2 460d6: 2f0a movel %a2,%sp@- 460d8: 4eb9 0004 e09c jsr 4e09c 460de: 2e82 movel %d2,%sp@ 460e0: 240e movel %fp,%d2 460e2: 0682 ffff ffec addil #-20,%d2 460e8: 2f02 movel %d2,%sp@- 460ea: 42a7 clrl %sp@- 460ec: 2f00 movel %d0,%sp@- 460ee: 2f0a movel %a2,%sp@- 460f0: 4eb9 0004 35a8 jsr 435a8 460f6: 4fef 0014 lea %sp@(20),%sp 460fa: 4a80 tstl %d0 460fc: 6600 00e8 bnew 461e6 return -1; mt_entry = loc.mt_entry; 46100: 246e fffc moveal %fp@(-4),%a2 46104: 47f9 0004 3674 lea 43674 ,%a3 /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ 4610a: 202e ffec movel %fp@(-20),%d0 4610e: b0aa 001c cmpl %a2@(28),%d0 46112: 6716 beqs 4612a rtems_filesystem_freenode( &loc ); 46114: 2f02 movel %d2,%sp@- 46116: 4e93 jsr %a3@ rtems_set_errno_and_return_minus_one( EACCES ); 46118: 4eb9 0004 cba8 jsr 4cba8 <__errno> 4611e: 588f addql #4,%sp 46120: 720d moveq #13,%d1 46122: 2040 moveal %d0,%a0 46124: 2081 movel %d1,%a0@ 46126: 6000 00be braw 461e6 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 4612a: 2f02 movel %d2,%sp@- 4612c: 4e93 jsr %a3@ * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 4612e: 2079 0005 de68 moveal 5de68 ,%a0 46134: 588f addql #4,%sp 46136: b5e8 0014 cmpal %a0@(20),%a2 4613a: 6724 beqs 46160 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 4613c: 2f2a 002c movel %a2@(44),%sp@- 46140: 487a ff6e pea %pc@(460b0 ) 46144: 4eb9 0004 3e7e jsr 43e7e 4614a: 508f addql #8,%sp 4614c: 4a00 tstb %d0 4614e: 6610 bnes 46160 * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 46150: 2f0a movel %a2,%sp@- 46152: 4eb9 0004 39c0 jsr 439c0 46158: 588f addql #4,%sp 4615a: 7201 moveq #1,%d1 4615c: b280 cmpl %d0,%d1 4615e: 660e bnes 4616e rtems_set_errno_and_return_minus_one( EBUSY ); 46160: 4eb9 0004 cba8 jsr 4cba8 <__errno> 46166: 2040 moveal %d0,%a0 46168: 7010 moveq #16,%d0 4616a: 2080 movel %d0,%a0@ 4616c: 6078 bras 461e6 * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) 4616e: 206a 0014 moveal %a2@(20),%a0 46172: 2f0a movel %a2,%sp@- 46174: 2068 0028 moveal %a0@(40),%a0 46178: 4e90 jsr %a0@ 4617a: 588f addql #4,%sp 4617c: 4a80 tstl %d0 4617e: 6666 bnes 461e6 <== NEVER TAKEN * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 46180: 206a 0028 moveal %a2@(40),%a0 46184: 2f0a movel %a2,%sp@- 46186: 2068 002c moveal %a0@(44),%a0 4618a: 4e90 jsr %a0@ 4618c: 588f addql #4,%sp 4618e: 4a80 tstl %d0 46190: 671a beqs 461ac <== ALWAYS TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 46192: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 46196: 2f0a movel %a2,%sp@- <== NOT EXECUTED 46198: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED 4619c: 4e90 jsr %a0@ <== NOT EXECUTED 4619e: 588f addql #4,%sp <== NOT EXECUTED 461a0: 4a80 tstl %d0 <== NOT EXECUTED 461a2: 6742 beqs 461e6 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 461a4: 42a7 clrl %sp@- <== NOT EXECUTED 461a6: 4eb9 0004 70dc jsr 470dc <== NOT EXECUTED 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 ); 461ac: 42a7 clrl %sp@- 461ae: 42a7 clrl %sp@- 461b0: 2f39 0005 f4b0 movel 5f4b0 ,%sp@- 461b6: 4eb9 0004 6a84 jsr 46a84 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 461bc: 2f0a movel %a2,%sp@- 461be: 4eb9 0004 73cc jsr 473cc <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 461c4: 2f39 0005 f4b0 movel 5f4b0 ,%sp@- 461ca: 4eb9 0004 6b8c jsr 46b8c /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 461d0: 486a 0008 pea %a2@(8) 461d4: 4e93 jsr %a3@ free( mt_entry ); 461d6: 2f0a movel %a2,%sp@- 461d8: 4eb9 0004 3688 jsr 43688 return 0; 461de: 4fef 001c lea %sp@(28),%sp 461e2: 4280 clrl %d0 461e4: 6002 bras 461e8 */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) rtems_fatal_error_occurred( 0 ); return -1; 461e6: 70ff moveq #-1,%d0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 461e8: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 461ee: 4e5e unlk %fp ... =============================================================================== 00059d6c : ssize_t write( int fd, const void *buffer, size_t count ) { 59d6c: 4e56 fff4 linkw %fp,#-12 59d70: 202e 0008 movel %fp@(8),%d0 59d74: 222e 000c movel %fp@(12),%d1 59d78: 206e 0010 moveal %fp@(16),%a0 59d7c: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 59d80: b0b9 0005 bc14 cmpl 5bc14 ,%d0 59d86: 641a bccs 59da2 iop = rtems_libio_iop( fd ); 59d88: 2400 movel %d0,%d2 59d8a: ed88 lsll #6,%d0 59d8c: e78a lsll #3,%d2 59d8e: 2479 0005 d408 moveal 5d408 ,%a2 59d94: 9082 subl %d2,%d0 59d96: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 59d98: 202a 0014 movel %a2@(20),%d0 59d9c: 0800 0008 btst #8,%d0 59da0: 660e bnes 59db0 59da2: 4eb9 0004 bca0 jsr 4bca0 <__errno> 59da8: 7209 moveq #9,%d1 59daa: 2040 moveal %d0,%a0 59dac: 2081 movel %d1,%a0@ 59dae: 6018 bras 59dc8 rtems_libio_check_buffer( buffer ); 59db0: 4a81 tstl %d1 59db2: 6708 beqs 59dbc <== NEVER TAKEN rtems_libio_check_count( count ); 59db4: 4a88 tstl %a0 59db6: 6742 beqs 59dfa rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 59db8: 44c0 movew %d0,%ccr 59dba: 6710 beqs 59dcc 59dbc: 4eb9 0004 bca0 jsr 4bca0 <__errno> 59dc2: 2040 moveal %d0,%a0 59dc4: 7016 moveq #22,%d0 59dc6: 2080 movel %d0,%a0@ 59dc8: 70ff moveq #-1,%d0 59dca: 6030 bras 59dfc /* * Now process the write() request. */ rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count ); 59dcc: 226a 0020 moveal %a2@(32),%a1 59dd0: 2f08 movel %a0,%sp@- 59dd2: 2f01 movel %d1,%sp@- 59dd4: 2f0a movel %a2,%sp@- 59dd6: 2069 000c moveal %a1@(12),%a0 59dda: 4e90 jsr %a0@ if ( rc > 0 ) 59ddc: 4fef 000c lea %sp@(12),%sp 59de0: 4a80 tstl %d0 59de2: 6f18 bles 59dfc iop->offset += rc; 59de4: 2400 movel %d0,%d2 59de6: 5bc1 smi %d1 59de8: 49c1 extbl %d1 59dea: d5aa 0010 addl %d2,%a2@(16) 59dee: 262a 000c movel %a2@(12),%d3 59df2: d781 addxl %d1,%d3 59df4: 2543 000c movel %d3,%a2@(12) 59df8: 6002 bras 59dfc rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 59dfa: 4280 clrl %d0 if ( rc > 0 ) iop->offset += rc; return rc; } 59dfc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 59e02: 4e5e unlk %fp ... =============================================================================== 000461e0 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 461e0: 4e56 ffe4 linkw %fp,#-28 461e4: 202e 0008 movel %fp@(8),%d0 461e8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 461ec: 246e 000c moveal %fp@(12),%a2 461f0: 262e 0010 movel %fp@(16),%d3 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 461f4: b0b9 0005 c684 cmpl 5c684 ,%d0 461fa: 641a bccs 46216 iop = rtems_libio_iop( fd ); 461fc: 2200 movel %d0,%d1 461fe: ed88 lsll #6,%d0 46200: e789 lsll #3,%d1 46202: 2679 0005 de78 moveal 5de78 ,%a3 46208: 9081 subl %d1,%d0 4620a: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 4620c: 202b 0014 movel %a3@(20),%d0 46210: 0800 0008 btst #8,%d0 46214: 6610 bnes 46226 46216: 4eb9 0004 c91c jsr 4c91c <__errno> 4621c: 7209 moveq #9,%d1 4621e: 2040 moveal %d0,%a0 46220: 2081 movel %d1,%a0@ 46222: 6000 00a4 braw 462c8 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 46226: 44c0 movew %d0,%ccr 46228: 6636 bnes 46260 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 4622a: 4a8a tstl %a2 4622c: 6732 beqs 46260 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 4622e: 4a83 tstl %d3 46230: 6f2e bles 46260 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 46232: 0c83 0000 0400 cmpil #1024,%d3 46238: 6e26 bgts 46260 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4623a: 204a moveal %a2,%a0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 4623c: 93c9 subal %a1,%a1 4623e: 4281 clrl %d1 46240: 7001 moveq #1,%d0 46242: 6002 bras 46246 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 46244: 2202 movel %d2,%d1 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) 46246: 4a90 tstl %a0@ 46248: 6716 beqs 46260 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 4624a: 2428 0004 movel %a0@(4),%d2 all_zeros = false; 4624e: 57c4 seq %d4 /* check for wrap */ old = total; total += iov[v].iov_len; 46250: d481 addl %d1,%d2 */ if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; 46252: c084 andl %d4,%d0 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 46254: b282 cmpl %d2,%d1 46256: 6e08 bgts 46260 46258: 0c82 0000 7fff cmpil #32767,%d2 4625e: 6f0e bles 4626e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 46260: 4eb9 0004 c91c jsr 4c91c <__errno> 46266: 2040 moveal %d0,%a0 46268: 7016 moveq #22,%d0 4626a: 2080 movel %d0,%a0@ 4626c: 605a bras 462c8 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 4626e: 5289 addql #1,%a1 46270: 5088 addql #8,%a0 46272: b689 cmpl %a1,%d3 46274: 6ece bgts 46244 <== NEVER TAKEN } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 46276: 4a00 tstb %d0 46278: 664a bnes 462c4 #include #include #include ssize_t writev( 4627a: 588a addql #4,%a2 4627c: 4284 clrl %d4 4627e: 4282 clrl %d2 /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 46280: 2012 movel %a2@,%d0 46282: 6736 beqs 462ba <== NEVER TAKEN continue; bytes = (*iop->pathinfo.handlers->write_h)( 46284: 206b 0020 moveal %a3@(32),%a0 46288: 2f00 movel %d0,%sp@- 4628a: 2f2a fffc movel %a2@(-4),%sp@- 4628e: 2f0b movel %a3,%sp@- 46290: 2068 000c moveal %a0@(12),%a0 46294: 4e90 jsr %a0@ iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 46296: 4fef 000c lea %sp@(12),%sp 4629a: 4a80 tstl %d0 4629c: 6d2a blts 462c8 <== NEVER TAKEN return -1; if ( bytes > 0 ) { 4629e: 6716 beqs 462b6 <== NEVER TAKEN iop->offset += bytes; total += bytes; 462a0: d480 addl %d0,%d2 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 462a2: 2c00 movel %d0,%d6 462a4: 5bc5 smi %d5 462a6: 49c5 extbl %d5 462a8: ddab 0010 addl %d6,%a3@(16) 462ac: 222b 000c movel %a3@(12),%d1 462b0: d385 addxl %d5,%d1 462b2: 2741 000c movel %d1,%a3@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 462b6: b092 cmpl %a2@,%d0 462b8: 6610 bnes 462ca <== NEVER TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 462ba: 5284 addql #1,%d4 462bc: 508a addql #8,%a2 462be: b684 cmpl %d4,%d3 462c0: 6ebe bgts 46280 462c2: 6006 bras 462ca /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { return 0; 462c4: 4282 clrl %d2 462c6: 6002 bras 462ca iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; 462c8: 74ff moveq #-1,%d2 if (bytes != iov[ v ].iov_len) break; } return total; } 462ca: 2002 movel %d2,%d0 462cc: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 462d2: 4e5e unlk %fp ...