=============================================================================== 00048c3c : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 48c3c: 7206 moveq #6,%d1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 48c3e: 4e56 0000 linkw %fp,#0 48c42: 206e 0008 moveal %fp@(8),%a0 48c46: 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 ) { 48c48: 2450 moveal %a0@,%a2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 48c4a: 2268 0010 moveal %a0@(16),%a1 switch( node->type ) { 48c4e: 202a 0048 movel %a2@(72),%d0 48c52: 5380 subql #1,%d0 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 48c54: 2269 0034 moveal %a1@(52),%a1 switch( node->type ) { 48c58: b280 cmpl %d0,%d1 48c5a: 6546 bcss 48ca2 <== NEVER TAKEN 48c5c: 303b 0a08 movew %pc@(48c66 ,%d0:l:2),%d0 48c60: 48c0 extl %d0 48c62: 4efb 0802 jmp %pc@(48c66 ,%d0:l) 48c66: 000e 016 <== NOT EXECUTED 48c68: 0016 026 <== NOT EXECUTED 48c6a: 0022 042 <== NOT EXECUTED 48c6c: 0022 042 <== NOT EXECUTED 48c6e: 002e 056 <== NOT EXECUTED 48c70: 002e 056 <== NOT EXECUTED 48c72: 0036 066 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 48c74: 2169 000c 0008 movel %a1@(12),%a0@(8) break; 48c7a: 6026 bras 48ca2 case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 48c7c: 203c 0005 a2e4 movel #369380,%d0 48c82: 2140 0008 movel %d0,%a0@(8) break; 48c86: 601a bras 48ca2 case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 48c88: 223c 0005 a354 movel #369492,%d1 48c8e: 2141 0008 movel %d1,%a0@(8) break; 48c92: 600e bras 48ca2 case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 48c94: 2169 0008 0008 movel %a1@(8),%a0@(8) break; 48c9a: 6006 bras 48ca2 case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 48c9c: 2169 0010 0008 movel %a1@(16),%a0@(8) break; } return 0; } 48ca2: 245f moveal %sp@+,%a2 48ca4: 4280 clrl %d0 48ca6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048af8 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 48af8: 4e56 ffec linkw %fp,#-20 48afc: 206e 0008 moveal %fp@(8),%a0 48b00: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 48b04: 242e 000c movel %fp@(12),%d2 48b08: 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 ) 48b0c: 4a88 tstl %a0 48b0e: 6700 00e2 beqw 48bf2 return NULL; parent = parent_loc->node_access; 48b12: 2850 moveal %a0@,%a4 fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 48b14: 7007 moveq #7,%d0 */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 48b16: 2068 0010 moveal %a0@(16),%a0 48b1a: 2668 0034 moveal %a0@(52),%a3 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 48b1e: b082 cmpl %d2,%d0 48b20: 660e bnes 48b30 48b22: 223c 0005 a274 movel #369268,%d1 48b28: b2ab 0010 cmpl %a3@(16),%d1 48b2c: 6700 00c4 beqw 48bf2 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 48b30: 2079 0005 af00 moveal 5af00 ,%a0 48b36: 2028 002c movel %a0@(44),%d0 48b3a: 4680 notl %d0 48b3c: c0ae 0014 andl %fp@(20),%d0 48b40: 2f00 movel %d0,%sp@- 48b42: 2f2e 0010 movel %fp@(16),%sp@- 48b46: 2f02 movel %d2,%sp@- 48b48: 4eb9 0004 8a84 jsr 48a84 if ( !node ) 48b4e: 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 ); 48b52: 2a40 moveal %d0,%a5 if ( !node ) 48b54: 4a80 tstl %d0 48b56: 6700 009c beqw 48bf4 return NULL; /* * Set the type specific information */ switch (type) { 48b5a: 5382 subql #1,%d2 48b5c: 7006 moveq #6,%d0 48b5e: b082 cmpl %d2,%d0 48b60: 656e bcss 48bd0 <== NEVER TAKEN 48b62: 303b 2a08 movew %pc@(48b6c ,%d2:l:2),%d0 48b66: 48c0 extl %d0 48b68: 4efb 0802 jmp %pc@(48b6c ,%d0:l) 48b6c: 000e 016 <== NOT EXECUTED 48b6e: 002a 052 <== NOT EXECUTED 48b70: 0024 044 <== NOT EXECUTED 48b72: 0024 044 <== NOT EXECUTED 48b74: 0046 0106 <== NOT EXECUTED 48b76: 0036 066 <== NOT EXECUTED 48b78: 0060 0140 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 48b7a: 41ed 0050 lea %a5@(80),%a0 48b7e: 2b48 004c movel %a0,%a5@(76) case IMFS_DIRECTORY: rtems_chain_initialize_empty(&node->info.directory.Entries); 48b82: 41ed 004c lea %a5@(76),%a0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 48b86: 42ad 0050 clrl %a5@(80) 48b8a: 2b48 0054 movel %a0,%a5@(84) 48b8e: 6040 bras 48bd0 case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 48b90: 2b52 004c movel %a2@,%a5@(76) break; 48b94: 603a bras 48bd0 case IMFS_DEVICE: node->info.device.major = info->device.major; 48b96: 2b52 004c movel %a2@,%a5@(76) node->info.device.minor = info->device.minor; 48b9a: 2b6a 0004 0050 movel %a2@(4),%a5@(80) break; 48ba0: 602e bras 48bd0 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 48ba2: 42ad 0054 clrl %a5@(84) node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 48ba6: 4280 clrl %d0 48ba8: 4281 clrl %d1 48baa: 2b40 004c movel %d0,%a5@(76) 48bae: 2b41 0050 movel %d1,%a5@(80) node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; 48bb2: 42ad 0054 clrl %a5@(84) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 48bb6: 4280 clrl %d0 48bb8: 4281 clrl %d1 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 48bba: 42ad 0058 clrl %a5@(88) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 48bbe: 2b40 004c movel %d0,%a5@(76) 48bc2: 2b41 0050 movel %d1,%a5@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 48bc6: 42ad 005c clrl %a5@(92) break; 48bca: 6004 bras 48bd0 case IMFS_FIFO: node->info.fifo.pipe = NULL; 48bcc: 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; 48bd0: 202b 0004 movel %a3@(4),%d0 48bd4: 5280 addql #1,%d0 /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 48bd6: 2b4c 0008 movel %a4,%a5@(8) node->st_ino = ++fs_info->ino_count; 48bda: 2740 0004 movel %d0,%a3@(4) 48bde: 2b40 0034 movel %d0,%a5@(52) 48be2: 2f0d movel %a5,%sp@- 48be4: 486c 004c pea %a4@(76) 48be8: 4eb9 0004 60b8 jsr 460b8 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 48bee: 508f addql #8,%sp 48bf0: 6002 bras 48bf4 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 48bf2: 9bcd subal %a5,%a5 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 48bf4: 200d movel %a5,%d0 48bf6: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 48bfc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048c00 : return node; } IMFS_jnode_t *IMFS_create_root_node(void) { 48c00: 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) ); 48c04: 4878 41ed pea 41ed 48c08: 4879 0005 a0c4 pea 5a0c4 48c0e: 4878 0001 pea 1 48c12: 4eb9 0004 8a84 jsr 48a84 if ( !node ) 48c18: 4fef 000c lea %sp@(12),%sp 48c1c: 4a80 tstl %d0 48c1e: 6716 beqs 48c36 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 48c20: 2240 moveal %d0,%a1 48c22: 2040 moveal %d0,%a0 48c24: 43e9 0050 lea %a1@(80),%a1 48c28: 2149 004c movel %a1,%a0@(76) /* * Set the type specific information * * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); 48c2c: 5989 subql #4,%a1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 48c2e: 42a8 0050 clrl %a0@(80) 48c32: 2149 0054 movel %a1,%a0@(84) return node; } 48c36: 4e5e unlk %fp ... =============================================================================== 00048d26 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48d26: 4e56 ff9c linkw %fp,#-100 48d2a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 48d2e: 246e 0014 moveal %fp@(20),%a2 * 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 ); 48d32: 2e0e movel %fp,%d7 size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; 48d34: 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 ); 48d36: 0687 ffff ffc7 addil #-57,%d7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48d3c: 2a2e 0008 movel %fp@(8),%d5 48d40: 2a6e 000c moveal %fp@(12),%a5 48d44: 282e 0010 movel %fp@(16),%d4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 48d48: 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 ); 48d4a: 486e fffc pea %fp@(-4) 48d4e: 2045 moveal %d5,%a0 48d50: 2f07 movel %d7,%sp@- 48d52: 2f0d movel %a5,%sp@- 48d54: 4870 2800 pea %a0@(00000000,%d2:l) 48d58: 4eb9 0004 93e0 jsr 493e0 pathnamelen -= len; 48d5e: 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 ); 48d62: 2600 movel %d0,%d3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 48d64: 4fef 0010 lea %sp@(16),%sp 48d68: 2852 moveal %a2@,%a4 48d6a: 4a8c tstl %a4 48d6c: 6700 012e beqw 48e9c rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 48d70: 4a80 tstl %d0 48d72: 672c beqs 48da0 if ( node->type == IMFS_DIRECTORY ) 48d74: 7001 moveq #1,%d0 48d76: b0ab 0048 cmpl %a3@(72),%d0 48d7a: 6624 bnes 48da0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 48d7c: 4878 0001 pea 1 48d80: 2f0a movel %a2,%sp@- 48d82: 4eb9 0004 8caa jsr 48caa 48d88: 508f addql #8,%sp 48d8a: 4a80 tstl %d0 48d8c: 6612 bnes 48da0 rtems_set_errno_and_return_minus_one( EACCES ); 48d8e: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 48d94: 7c0d moveq #13,%d6 48d96: 2040 moveal %d0,%a0 48d98: 2086 movel %d6,%a0@ 48d9a: 76ff moveq #-1,%d3 48d9c: 6000 01b4 braw 48f52 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 48da0: 9bc6 subal %d6,%a5 i += len; 48da2: d486 addl %d6,%d2 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 48da4: 264c moveal %a4,%a3 switch( type ) { 48da6: 7003 moveq #3,%d0 48da8: b083 cmpl %d3,%d0 48daa: 6700 0084 beqw 48e30 48dae: 7204 moveq #4,%d1 48db0: b283 cmpl %d3,%d1 48db2: 6700 00fe beqw 48eb2 48db6: 103c 0002 moveb #2,%d0 48dba: b083 cmpl %d3,%d0 48dbc: 6600 0104 bnew 48ec2 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 48dc0: 2079 0005 af00 moveal 5af00 ,%a0 48dc6: b9e8 0018 cmpal %a0@(24),%a4 48dca: 6700 ff7e beqw 48d4a /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 48dce: 206a 0010 moveal %a2@(16),%a0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 48dd2: b9e8 001c cmpal %a0@(28),%a4 48dd6: 663e bnes 48e16 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 48dd8: 4878 0014 pea 14 48ddc: 260e movel %fp,%d3 48dde: 4868 0008 pea %a0@(8) 48de2: 0683 ffff ffe8 addil #-24,%d3 48de8: 47f9 0004 c5a4 lea 4c5a4 ,%a3 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 48dee: 9486 subl %d6,%d2 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 48df0: 2f03 movel %d3,%sp@- 48df2: 4e93 jsr %a3@ *pathloc = newloc; 48df4: 4878 0014 pea 14 48df8: 2f03 movel %d3,%sp@- 48dfa: 2f0a movel %a2,%sp@- 48dfc: 4e93 jsr %a3@ return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 48dfe: 206a 000c moveal %a2@(12),%a0 48e02: 2245 moveal %d5,%a1 48e04: 2f0a movel %a2,%sp@- 48e06: 2f04 movel %d4,%sp@- 48e08: 4875 6800 pea %a5@(00000000,%d6:l) 48e0c: 4871 2800 pea %a1@(00000000,%d2:l) 48e10: 2050 moveal %a0@,%a0 48e12: 6000 0108 braw 48f1c pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 48e16: 266c 0008 moveal %a4@(8),%a3 48e1a: 4a8b tstl %a3 48e1c: 6600 008e bnew 48eac rtems_set_errno_and_return_minus_one( ENOENT ); 48e20: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 48e26: 7a02 moveq #2,%d5 48e28: 2040 moveal %d0,%a0 48e2a: 2085 movel %d5,%a0@ 48e2c: 6000 ff6c braw 48d9a case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 48e30: 202c 0048 movel %a4@(72),%d0 48e34: 7203 moveq #3,%d1 48e36: b280 cmpl %d0,%d1 48e38: 6614 bnes 48e4e IMFS_evaluate_hard_link( pathloc, 0 ); 48e3a: 42a7 clrl %sp@- 48e3c: 2f0a movel %a2,%sp@- 48e3e: 4eb9 0004 8ccc jsr 48ccc node = pathloc->node_access; 48e44: 2652 moveal %a2@,%a3 if ( !node ) 48e46: 508f addql #8,%sp 48e48: 4a8b tstl %a3 48e4a: 661e bnes 48e6a <== ALWAYS TAKEN 48e4c: 6024 bras 48e72 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 48e4e: 7204 moveq #4,%d1 48e50: b280 cmpl %d0,%d1 48e52: 6616 bnes 48e6a result = IMFS_evaluate_sym_link( pathloc, 0 ); 48e54: 42a7 clrl %sp@- 48e56: 2f0a movel %a2,%sp@- 48e58: 4eb9 0004 8f5e jsr 48f5e node = pathloc->node_access; 48e5e: 2652 moveal %a2@,%a3 if ( result == -1 ) 48e60: 508f addql #8,%sp 48e62: 72ff moveq #-1,%d1 48e64: b280 cmpl %d0,%d1 48e66: 6700 00e8 beqw 48f50 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 48e6a: 7001 moveq #1,%d0 48e6c: b0ab 0048 cmpl %a3@(72),%d0 48e70: 6710 beqs 48e82 rtems_set_errno_and_return_minus_one( ENOTDIR ); 48e72: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 48e78: 7814 moveq #20,%d4 48e7a: 2040 moveal %d0,%a0 48e7c: 2084 movel %d4,%a0@ 48e7e: 6000 ff1a braw 48d9a /* * 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 ) { 48e82: 206b 0058 moveal %a3@(88),%a0 48e86: 4a88 tstl %a0 48e88: 6654 bnes 48ede /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 48e8a: 2f07 movel %d7,%sp@- 48e8c: 2f0b movel %a3,%sp@- 48e8e: 4eb9 0004 936c jsr 4936c if ( !node ) 48e94: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 48e96: 2640 moveal %d0,%a3 if ( !node ) 48e98: 4a80 tstl %d0 48e9a: 6610 bnes 48eac rtems_set_errno_and_return_minus_one( ENOENT ); 48e9c: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 48ea2: 7602 moveq #2,%d3 48ea4: 2240 moveal %d0,%a1 48ea6: 2283 movel %d3,%a1@ 48ea8: 6000 fef0 braw 48d9a /* * Set the node access to the point we have found. */ pathloc->node_access = node; 48eac: 248b movel %a3,%a2@ 48eae: 6000 fe9a braw 48d4a case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 48eb2: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 48eb8: 745b moveq #91,%d2 48eba: 2040 moveal %d0,%a0 48ebc: 2082 movel %d2,%a0@ 48ebe: 6000 feda braw 48d9a /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 48ec2: 4a83 tstl %d3 48ec4: 6708 beqs 48ece 48ec6: 7004 moveq #4,%d0 48ec8: b083 cmpl %d3,%d0 48eca: 6600 fe7e bnew 48d4a * 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 ) { 48ece: 7201 moveq #1,%d1 48ed0: b2ac 0048 cmpl %a4@(72),%d1 48ed4: 6650 bnes 48f26 if ( node->info.directory.mt_fs != NULL ) { 48ed6: 206c 0058 moveal %a4@(88),%a0 48eda: 4a88 tstl %a0 48edc: 6748 beqs 48f26 newloc = node->info.directory.mt_fs->mt_fs_root; 48ede: 4878 0014 pea 14 48ee2: 260e movel %fp,%d3 48ee4: 4868 001c pea %a0@(28) 48ee8: 0683 ffff ffe8 addil #-24,%d3 48eee: 47f9 0004 c5a4 lea 4c5a4 ,%a3 48ef4: 2f03 movel %d3,%sp@- 48ef6: 4e93 jsr %a3@ *pathloc = newloc; 48ef8: 4878 0014 pea 14 48efc: 2f03 movel %d3,%sp@- 48efe: 2f0a movel %a2,%sp@- 48f00: 4e93 jsr %a3@ return (*pathloc->ops->evalpath_h)( &pathname[i-len], 48f02: 226a 000c moveal %a2@(12),%a1 48f06: 2f0a movel %a2,%sp@- 48f08: 206e fffc moveal %fp@(-4),%a0 48f0c: 9488 subl %a0,%d2 48f0e: 2f04 movel %d4,%sp@- 48f10: 4875 8800 pea %a5@(00000000,%a0:l) 48f14: 2045 moveal %d5,%a0 48f16: 4870 2800 pea %a0@(00000000,%d2:l) 48f1a: 2051 moveal %a1@,%a0 48f1c: 4e90 jsr %a0@ 48f1e: 4fef 0028 lea %sp@(40),%sp 48f22: 2600 movel %d0,%d3 48f24: 602c bras 48f52 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 48f26: 2f0a movel %a2,%sp@- 48f28: 4eb9 0004 8c3c jsr 48c3c 48f2e: 2600 movel %d0,%d3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 48f30: 2e84 movel %d4,%sp@ 48f32: 2f0a movel %a2,%sp@- 48f34: 4eb9 0004 8caa jsr 48caa 48f3a: 508f addql #8,%sp 48f3c: 4a80 tstl %d0 48f3e: 6612 bnes 48f52 rtems_set_errno_and_return_minus_one( EACCES ); 48f40: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 48f46: 720d moveq #13,%d1 48f48: 2240 moveal %d0,%a1 48f4a: 2281 movel %d1,%a1@ 48f4c: 6000 fe4c braw 48d9a 48f50: 2600 movel %d0,%d3 <== NOT EXECUTED return result; } 48f52: 2003 movel %d3,%d0 48f54: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 48f5a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049092 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 49092: 4e56 ff9c linkw %fp,#-100 49096: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4909a: 246e 000c moveal %fp@(12),%a2 int i = 0; 4909e: 4282 clrl %d2 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 490a0: 2e3c 0004 8ffa movel #299002,%d7 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 490a6: 286e 0008 moveal %fp@(8),%a4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 490aa: 2652 moveal %a2@,%a3 /* * Get the path length. */ pathlen = strlen( path ); 490ac: 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 */ ) { 490ae: 282e 0010 movel %fp@(16),%d4 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 490b2: 4eb9 0004 d150 jsr 4d150 490b8: 588f addql #4,%sp 490ba: 2c00 movel %d0,%d6 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 490bc: 486e fffc pea %fp@(-4) 490c0: 486e ffc7 pea %fp@(-57) 490c4: 2f06 movel %d6,%sp@- 490c6: 4874 2800 pea %a4@(00000000,%d2:l) 490ca: 4eb9 0004 93e0 jsr 493e0 pathlen -= len; 490d0: 2a2e fffc movel %fp@(-4),%d5 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 490d4: 2600 movel %d0,%d3 pathlen -= len; 490d6: 9c85 subl %d5,%d6 i += len; if ( !pathloc->node_access ) 490d8: 4fef 0010 lea %sp@(16),%sp 490dc: 2a52 moveal %a2@,%a5 490de: 4a8d tstl %a5 490e0: 6700 0188 beqw 4926a /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 490e4: 4a80 tstl %d0 490e6: 672c beqs 49114 if ( node->type == IMFS_DIRECTORY ) 490e8: 7001 moveq #1,%d0 490ea: b0ab 0048 cmpl %a3@(72),%d0 490ee: 6624 bnes 49114 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 490f0: 4878 0001 pea 1 490f4: 2f0a movel %a2,%sp@- 490f6: 4eb9 0004 8caa jsr 48caa 490fc: 508f addql #8,%sp 490fe: 4a80 tstl %d0 49100: 6612 bnes 49114 rtems_set_errno_and_return_minus_one( EACCES ); 49102: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 49108: 7c0d moveq #13,%d6 4910a: 2040 moveal %d0,%a0 4910c: 2086 movel %d6,%a0@ 4910e: 76ff moveq #-1,%d3 49110: 6000 01aa braw 492bc while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 49114: d485 addl %d5,%d2 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 49116: 264d moveal %a5,%a3 switch( type ) { 49118: 7002 moveq #2,%d0 4911a: b083 cmpl %d3,%d0 4911c: 671a beqs 49138 4911e: 6508 bcss 49128 49120: 4a83 tstl %d3 49122: 6700 0104 beqw 49228 49126: 6094 bras 490bc 49128: 7203 moveq #3,%d1 4912a: b283 cmpl %d3,%d1 4912c: 6760 beqs 4918e 4912e: 7004 moveq #4,%d0 49130: b083 cmpl %d3,%d0 49132: 6688 bnes 490bc <== NEVER TAKEN 49134: 6000 0102 braw 49238 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 49138: 2079 0005 af00 moveal 5af00 ,%a0 4913e: bbe8 0018 cmpal %a0@(24),%a5 49142: 6700 ff78 beqw 490bc /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 49146: 206a 0010 moveal %a2@(16),%a0 4914a: bbe8 001c cmpal %a0@(28),%a5 4914e: 6630 bnes 49180 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 49150: 4878 0014 pea 14 49154: 260e movel %fp,%d3 49156: 4868 0008 pea %a0@(8) 4915a: 0683 ffff ffe8 addil #-24,%d3 49160: 47f9 0004 c5a4 lea 4c5a4 ,%a3 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49166: 9485 subl %d5,%d2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 49168: 2f03 movel %d3,%sp@- 4916a: 4e93 jsr %a3@ *pathloc = newloc; 4916c: 4878 0014 pea 14 49170: 2f03 movel %d3,%sp@- 49172: 2f0a movel %a2,%sp@- 49174: 4e93 jsr %a3@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49176: 206a 000c moveal %a2@(12),%a0 4917a: 2f04 movel %d4,%sp@- 4917c: 2f0a movel %a2,%sp@- 4917e: 607a bras 491fa } } else { if ( !node->Parent ) 49180: 266d 0008 moveal %a5@(8),%a3 49184: 4a8b tstl %a3 49186: 6600 009a bnew 49222 4918a: 6000 00de braw 4926a pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4918e: 202d 0048 movel %a5@(72),%d0 49192: 7203 moveq #3,%d1 49194: b280 cmpl %d0,%d1 49196: 6706 beqs 4919e result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 49198: 7204 moveq #4,%d1 4919a: b280 cmpl %d0,%d1 4919c: 6612 bnes 491b0 result = IMFS_evaluate_link( pathloc, 0 ); 4919e: 42a7 clrl %sp@- 491a0: 2047 moveal %d7,%a0 491a2: 2f0a movel %a2,%sp@- 491a4: 4e90 jsr %a0@ if ( result == -1 ) 491a6: 508f addql #8,%sp 491a8: 72ff moveq #-1,%d1 491aa: b280 cmpl %d0,%d1 491ac: 6700 010c beqw 492ba return -1; } node = pathloc->node_access; 491b0: 2052 moveal %a2@,%a0 if ( !node ) 491b2: 4a88 tstl %a0 491b4: 6700 00de beqw 49294 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 491b8: 7001 moveq #1,%d0 491ba: b0a8 0048 cmpl %a0@(72),%d0 491be: 6600 00d4 bnew 49294 /* * 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 ) { 491c2: 2268 0058 moveal %a0@(88),%a1 491c6: 4a89 tstl %a1 491c8: 6744 beqs 4920e newloc = node->info.directory.mt_fs->mt_fs_root; 491ca: 4878 0014 pea 14 491ce: 260e movel %fp,%d3 491d0: 4869 001c pea %a1@(28) 491d4: 0683 ffff ffe8 addil #-24,%d3 491da: 47f9 0004 c5a4 lea 4c5a4 ,%a3 491e0: 2f03 movel %d3,%sp@- 491e2: 4e93 jsr %a3@ *pathloc = newloc; 491e4: 4878 0014 pea 14 491e8: 2f03 movel %d3,%sp@- 491ea: 2f0a movel %a2,%sp@- 491ec: 4e93 jsr %a3@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 491ee: 206a 000c moveal %a2@(12),%a0 491f2: 94ae fffc subl %fp@(-4),%d2 491f6: 2f04 movel %d4,%sp@- 491f8: 2f0a movel %a2,%sp@- 491fa: 4874 2800 pea %a4@(00000000,%d2:l) 491fe: 2068 0004 moveal %a0@(4),%a0 49202: 4e90 jsr %a0@ 49204: 4fef 0024 lea %sp@(36),%sp 49208: 2600 movel %d0,%d3 4920a: 6000 00b0 braw 492bc /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4920e: 486e ffc7 pea %fp@(-57) 49212: 2f08 movel %a0,%sp@- 49214: 4eb9 0004 936c jsr 4936c /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4921a: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4921c: 2640 moveal %d0,%a3 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4921e: 4a80 tstl %d0 49220: 6726 beqs 49248 done = true; else pathloc->node_access = node; 49222: 248b movel %a3,%a2@ 49224: 6000 fe96 braw 490bc break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 49228: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 4922e: 7a11 moveq #17,%d5 49230: 2040 moveal %d0,%a0 49232: 2085 movel %d5,%a0@ 49234: 6000 fed8 braw 4910e break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 49238: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 4923e: 785b moveq #91,%d4 49240: 2040 moveal %d0,%a0 49242: 2084 movel %d4,%a0@ 49244: 6000 fec8 braw 4910e case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 49248: 2002 movel %d2,%d0 4924a: 90ae fffc subl %fp@(-4),%d0 4924e: 2044 moveal %d4,%a0 49250: 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( 49252: d9c2 addal %d2,%a4 * 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 ] ) ) 49254: 47f9 0004 3558 lea 43558 ,%a3 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4925a: 2080 movel %d0,%a0@ /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 4925c: 601c bras 4927a if ( !IMFS_is_separator( path[ i ] ) ) 4925e: 49c0 extbl %d0 49260: 2f00 movel %d0,%sp@- 49262: 4e93 jsr %a3@ 49264: 588f addql #4,%sp 49266: 4a80 tstl %d0 49268: 6610 bnes 4927a rtems_set_errno_and_return_minus_one( ENOENT ); 4926a: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 49270: 7602 moveq #2,%d3 49272: 2040 moveal %d0,%a0 49274: 2083 movel %d3,%a0@ 49276: 6000 fe96 braw 4910e /* * 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++) { 4927a: 101c moveb %a4@+,%d0 4927c: 66e0 bnes 4925e /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4927e: 2f0a movel %a2,%sp@- 49280: 4eb9 0004 8c3c jsr 48c3c /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 49286: 2052 moveal %a2@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 49288: 2600 movel %d0,%d3 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 4928a: 588f addql #4,%sp 4928c: 7001 moveq #1,%d0 4928e: b0a8 0048 cmpl %a0@(72),%d0 49292: 6710 beqs 492a4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 49294: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 4929a: 7414 moveq #20,%d2 4929c: 2040 moveal %d0,%a0 4929e: 2082 movel %d2,%a0@ 492a0: 6000 fe6c braw 4910e /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 492a4: 4878 0003 pea 3 492a8: 2f0a movel %a2,%sp@- 492aa: 4eb9 0004 8caa jsr 48caa 492b0: 508f addql #8,%sp 492b2: 4a80 tstl %d0 492b4: 6606 bnes 492bc 492b6: 6000 fe4a braw 49102 492ba: 2600 movel %d0,%d3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); return result; } 492bc: 2003 movel %d3,%d0 492be: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 492c4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048ccc : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 48ccc: 7003 moveq #3,%d0 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 48cce: 4e56 0000 linkw %fp,#0 48cd2: 2f0a movel %a2,%sp@- 48cd4: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *jnode = node->node_access; 48cd8: 2052 moveal %a2@,%a0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 48cda: b0a8 0048 cmpl %a0@(72),%d0 48cde: 670c beqs 48cec <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 48ce0: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 48ce6: 4eb9 0004 5df8 jsr 45df8 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 48cec: 24a8 004c movel %a0@(76),%a2@ IMFS_Set_handlers( node ); 48cf0: 2f0a movel %a2,%sp@- 48cf2: 4eb9 0004 8c3c jsr 48c3c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 48cf8: 2f2e 000c movel %fp@(12),%sp@- 48cfc: 2f0a movel %a2,%sp@- 48cfe: 4eb9 0004 8caa jsr 48caa 48d04: 4fef 000c lea %sp@(12),%sp 48d08: 4a80 tstl %d0 48d0a: 6610 bnes 48d1c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 48d0c: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 48d12: 2040 moveal %d0,%a0 <== NOT EXECUTED 48d14: 700d moveq #13,%d0 <== NOT EXECUTED 48d16: 2080 movel %d0,%a0@ <== NOT EXECUTED 48d18: 70ff moveq #-1,%d0 <== NOT EXECUTED 48d1a: 6002 bras 48d1e <== NOT EXECUTED return result; 48d1c: 4280 clrl %d0 } 48d1e: 246e fffc moveal %fp@(-4),%a2 48d22: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048f5e : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 48f5e: 7004 moveq #4,%d0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 48f60: 4e56 ffec linkw %fp,#-20 48f64: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 48f68: 246e 0008 moveal %fp@(8),%a2 48f6c: 262e 000c movel %fp@(12),%d3 IMFS_jnode_t *jnode = node->node_access; 48f70: 2652 moveal %a2@,%a3 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 48f72: b0ab 0048 cmpl %a3@(72),%d0 48f76: 6708 beqs 48f80 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 48f78: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 48f7e: 600c bras 48f8c <== NOT EXECUTED if ( !jnode->Parent ) 48f80: 202b 0008 movel %a3@(8),%d0 48f84: 660c bnes 48f92 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 48f86: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 48f8c: 4eb9 0004 5df8 jsr 45df8 <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 48f92: 2480 movel %d0,%a2@ rtems_filesystem_get_sym_start_loc( 48f94: 2f0a movel %a2,%sp@- 48f96: 486e fffc pea %fp@(-4) 48f9a: 2f2b 004c movel %a3@(76),%sp@- 48f9e: 4eb9 0004 9c48 jsr 49c48 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 48fa4: 242b 004c movel %a3@(76),%d2 48fa8: d4ae fffc addl %fp@(-4),%d2 48fac: 2f02 movel %d2,%sp@- 48fae: 4eb9 0004 d150 jsr 4d150 48fb4: 2e8a movel %a2,%sp@ 48fb6: 2f03 movel %d3,%sp@- 48fb8: 2f00 movel %d0,%sp@- 48fba: 2f02 movel %d2,%sp@- 48fbc: 4eb9 0004 8d26 jsr 48d26 48fc2: 2400 movel %d0,%d2 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 48fc4: 2f0a movel %a2,%sp@- 48fc6: 4eb9 0004 8c3c jsr 48c3c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 48fcc: 4fef 001c lea %sp@(28),%sp 48fd0: 2e83 movel %d3,%sp@ 48fd2: 2f0a movel %a2,%sp@- 48fd4: 4eb9 0004 8caa jsr 48caa 48fda: 508f addql #8,%sp 48fdc: 4a80 tstl %d0 48fde: 660e bnes 48fee <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 48fe0: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 48fe6: 74ff moveq #-1,%d2 <== NOT EXECUTED 48fe8: 2040 moveal %d0,%a0 <== NOT EXECUTED 48fea: 700d moveq #13,%d0 <== NOT EXECUTED 48fec: 2080 movel %d0,%a0@ <== NOT EXECUTED return result; } 48fee: 2002 movel %d2,%d0 48ff0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 48ff6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042896 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 42896: 4e56 fff4 linkw %fp,#-12 4289a: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4289e: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *jnode = iop->pathinfo.node_access; 428a2: 266a 0018 moveal %a2@(24),%a3 int err = pipe_release(&JNODE2PIPE(jnode), iop); 428a6: 2f0a movel %a2,%sp@- 428a8: 486b 004c pea %a3@(76) 428ac: 4eb9 0004 ab5a jsr 4ab5a if (err == 0) { 428b2: 508f addql #8,%sp rtems_libio_t *iop ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_release(&JNODE2PIPE(jnode), iop); 428b4: 2400 movel %d0,%d2 if (err == 0) { 428b6: 6616 bnes 428ce <== NEVER TAKEN iop->flags &= ~LIBIO_FLAGS_OPEN; 428b8: 203c ffff feff movel #-257,%d0 428be: c1aa 0014 andl %d0,%a2@(20) IMFS_check_node_remove(jnode); 428c2: 2f0b movel %a3,%sp@- 428c4: 4eb9 0004 2e7c jsr 42e7c 428ca: 588f addql #4,%sp 428cc: 6012 bras 428e0 } IMFS_FIFO_RETURN(err); 428ce: 4a80 tstl %d0 <== NOT EXECUTED 428d0: 6c0e bges 428e0 <== NOT EXECUTED 428d2: 4eb9 0004 d134 jsr 4d134 <__errno> <== NOT EXECUTED 428d8: 4482 negl %d2 <== NOT EXECUTED 428da: 2040 moveal %d0,%a0 <== NOT EXECUTED 428dc: 2082 movel %d2,%a0@ <== NOT EXECUTED 428de: 74ff moveq #-1,%d2 <== NOT EXECUTED } 428e0: 2002 movel %d2,%d0 428e2: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 428e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042760 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 42760: 4e56 0000 linkw %fp,#0 42764: 206e 0008 moveal %fp@(8),%a0 42768: 202e 000c movel %fp@(12),%d0 4276c: 226e 0010 moveal %fp@(16),%a1 42770: 2f02 movel %d2,%sp@- int err; if (command == FIONBIO) { 42772: 0c80 8004 667e cmpil #-2147195266,%d0 42778: 661a bnes 42794 if (buffer == NULL) 4277a: 4a89 tstl %a1 4277c: 6734 beqs 427b2 <== NEVER TAKEN err = -EFAULT; else { if (*(int *)buffer) 4277e: 4a91 tstl %a1@ 42780: 6708 beqs 4278a iop->flags |= LIBIO_FLAGS_NO_DELAY; 42782: 7001 moveq #1,%d0 42784: 81a8 0014 orl %d0,%a0@(20) 42788: 6006 bras 42790 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4278a: 70fe moveq #-2,%d0 4278c: c1a8 0014 andl %d0,%a0@(20) return 0; 42790: 4282 clrl %d2 42792: 602e bras 427c2 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 42794: 2f08 movel %a0,%sp@- 42796: 2f09 movel %a1,%sp@- 42798: 2f00 movel %d0,%sp@- 4279a: 2068 0018 moveal %a0@(24),%a0 4279e: 2f28 004c movel %a0@(76),%sp@- 427a2: 4eb9 0004 b1f4 jsr 4b1f4 IMFS_FIFO_RETURN(err); 427a8: 4fef 0010 lea %sp@(16),%sp iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 427ac: 2400 movel %d0,%d2 IMFS_FIFO_RETURN(err); 427ae: 6c12 bges 427c2 427b0: 6002 bras 427b4 { int err; if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; 427b2: 74f2 moveq #-14,%d2 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 427b4: 4eb9 0004 d134 jsr 4d134 <__errno> 427ba: 4482 negl %d2 427bc: 2040 moveal %d0,%a0 427be: 2082 movel %d2,%a0@ 427c0: 74ff moveq #-1,%d2 } 427c2: 2002 movel %d2,%d0 427c4: 242e fffc movel %fp@(-4),%d2 427c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042708 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 42708: 4e56 0000 linkw %fp,#0 4270c: 206e 0008 moveal %fp@(8),%a0 42710: 2f03 movel %d3,%sp@- 42712: 2f02 movel %d2,%sp@- off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 42714: 2f08 movel %a0,%sp@- 42716: 2f2e 0014 movel %fp@(20),%sp@- 4271a: 2f2e 0010 movel %fp@(16),%sp@- 4271e: 2f2e 000c movel %fp@(12),%sp@- 42722: 2068 0018 moveal %a0@(24),%a0 42726: 2f28 004c movel %a0@(76),%sp@- 4272a: 4eb9 0004 b254 jsr 4b254 IMFS_FIFO_RETURN(err); 42730: 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); 42734: 2600 movel %d0,%d3 42736: 2400 movel %d0,%d2 42738: 5bc1 smi %d1 4273a: 49c1 extbl %d1 IMFS_FIFO_RETURN(err); 4273c: 4a81 tstl %d1 4273e: 6a10 bpls 42750 <== NEVER TAKEN 42740: 4eb9 0004 d134 jsr 4d134 <__errno> 42746: 4483 negl %d3 42748: 2040 moveal %d0,%a0 4274a: 72ff moveq #-1,%d1 4274c: 74ff moveq #-1,%d2 4274e: 2083 movel %d3,%a0@ } 42750: 2001 movel %d1,%d0 42752: 2202 movel %d2,%d1 42754: 242e fff8 movel %fp@(-8),%d2 42758: 262e fffc movel %fp@(-4),%d3 4275c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000427cc : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 427cc: 4e56 fff8 linkw %fp,#-8 427d0: 206e 0008 moveal %fp@(8),%a0 427d4: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; 427d6: 2468 0018 moveal %a0@(24),%a2 ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 427da: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 427dc: 2f08 movel %a0,%sp@- 427de: 2f2e 0010 movel %fp@(16),%sp@- 427e2: 2f2e 000c movel %fp@(12),%sp@- 427e6: 2f2a 004c movel %a2@(76),%sp@- 427ea: 4eb9 0004 b07c jsr 4b07c if (err > 0) { 427f0: 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); 427f4: 2400 movel %d0,%d2 if (err > 0) { 427f6: 6f1c bles 42814 <== NEVER TAKEN IMFS_mtime_ctime_update(jnode); 427f8: 42a7 clrl %sp@- 427fa: 486e fff8 pea %fp@(-8) 427fe: 4eb9 0004 3844 jsr 43844 42804: 202e fff8 movel %fp@(-8),%d0 42808: 508f addql #8,%sp 4280a: 2540 0040 movel %d0,%a2@(64) 4280e: 2540 0044 movel %d0,%a2@(68) 42812: 6012 bras 42826 } IMFS_FIFO_RETURN(err); 42814: 4a80 tstl %d0 42816: 670e beqs 42826 <== NEVER TAKEN 42818: 4eb9 0004 d134 jsr 4d134 <__errno> 4281e: 4482 negl %d2 42820: 2040 moveal %d0,%a0 42822: 2082 movel %d2,%a0@ 42824: 74ff moveq #-1,%d2 } 42826: 2002 movel %d2,%d0 42828: 242e fff0 movel %fp@(-16),%d2 4282c: 246e fff4 moveal %fp@(-12),%a2 42830: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004936c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4936c: 4e56 fff0 linkw %fp,#-16 49370: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49374: 246e 0008 moveal %fp@(8),%a2 49378: 242e 000c movel %fp@(12),%d2 #if defined(RTEMS_DEBUG) assert( directory ); assert( name ); #endif if ( !name ) 4937c: 674e beqs 493cc <== NEVER TAKEN return 0; if ( !directory ) 4937e: 4a8a tstl %a2 49380: 6750 beqs 493d2 <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 49382: 4879 0005 a2dc pea 5a2dc 49388: 49f9 0004 cbf8 lea 4cbf8 ,%a4 4938e: 2f02 movel %d2,%sp@- 49390: 4e94 jsr %a4@ 49392: 508f addql #8,%sp 49394: 4a80 tstl %d0 49396: 673a beqs 493d2 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 49398: 4879 0005 a2de pea 5a2de 4939e: 2f02 movel %d2,%sp@- 493a0: 4e94 jsr %a4@ 493a2: 508f addql #8,%sp 493a4: 4a80 tstl %d0 493a6: 6606 bnes 493ae <== ALWAYS TAKEN return directory->Parent; 493a8: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED 493ac: 6024 bras 493d2 <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 493ae: 266a 004c moveal %a2@(76),%a3 493b2: 45ea 0050 lea %a2@(80),%a2 493b6: 6010 bras 493c8 !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 ) ) 493b8: 486b 000c pea %a3@(12) 493bc: 2f02 movel %d2,%sp@- 493be: 4e94 jsr %a4@ 493c0: 508f addql #8,%sp 493c2: 4a80 tstl %d0 493c4: 670a beqs 493d0 the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 493c6: 2653 moveal %a3@,%a3 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 493c8: b5cb cmpal %a3,%a2 493ca: 66ec bnes 493b8 #if defined(RTEMS_DEBUG) assert( directory ); assert( name ); #endif if ( !name ) return 0; 493cc: 95ca subal %a2,%a2 493ce: 6002 bras 493d2 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 493d0: 244b moveal %a3,%a2 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 493d2: 200a movel %a2,%d0 493d4: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 493da: 4e5e unlk %fp ... =============================================================================== 000492c8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 492c8: 4e56 ffd8 linkw %fp,#-40 492cc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 492d0: 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; 492d4: 240e movel %fp,%d2 492d6: 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 ); 492dc: 49f9 0004 8c3c lea 48c3c ,%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; 492e2: 246b 001c moveal %a3@(28),%a2 loc = temp_mt_entry->mt_fs_root; 492e6: 4878 0014 pea 14 492ea: 486b 001c pea %a3@(28) 492ee: 2f02 movel %d2,%sp@- 492f0: 4eb9 0004 c5a4 jsr 4c5a4 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 492f6: 4fef 000c lea %sp@(12),%sp 492fa: 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 ); 492fe: 47f9 0004 2160 lea 42160 ,%a3 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 49304: 262a 0008 movel %a2@(8),%d3 loc.node_access = (void *)jnode; 49308: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4930c: 2f02 movel %d2,%sp@- 4930e: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 49310: 588f addql #4,%sp 49312: 7001 moveq #1,%d0 49314: b0aa 0048 cmpl %a2@(72),%d0 49318: 660e bnes 49328 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4931a: 200a movel %a2,%d0 4931c: 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 ) ) { 49322: b0aa 004c cmpl %a2@(76),%d0 49326: 660e bnes 49336 result = IMFS_unlink( NULL, &loc ); 49328: 2f02 movel %d2,%sp@- 4932a: 42a7 clrl %sp@- 4932c: 4e93 jsr %a3@ if (result != 0) 4932e: 508f addql #8,%sp 49330: 4a80 tstl %d0 49332: 6626 bnes 4935a <== NEVER TAKEN return -1; jnode = next; 49334: 2443 moveal %d3,%a2 } if ( jnode != NULL ) { 49336: 4a8a tstl %a2 49338: 6724 beqs 4935e if ( jnode->type == IMFS_DIRECTORY ) { 4933a: 7001 moveq #1,%d0 4933c: b0aa 0048 cmpl %a2@(72),%d0 49340: 66c2 bnes 49304 <== NEVER TAKEN 49342: 200a movel %a2,%d0 49344: 0680 0000 0050 addil #80,%d0 if ( jnode_has_children( jnode ) ) 4934a: b0aa 004c cmpl %a2@(76),%d0 4934e: 67b4 beqs 49304 jnode = jnode_get_first_child( jnode ); 49350: 246a 004c moveal %a2@(76),%a2 } } } while (jnode != NULL); 49354: 4a8a tstl %a2 49356: 66ac bnes 49304 <== ALWAYS TAKEN 49358: 6004 bras 4935e <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 4935a: 70ff moveq #-1,%d0 <== NOT EXECUTED 4935c: 6002 bras 49360 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 4935e: 4280 clrl %d0 } 49360: 4cee 1c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a4 49366: 4e5e unlk %fp ... =============================================================================== 000493e0 : const char *path, int pathlen, char *token, int *token_len ) { 493e0: 4e56 ffe4 linkw %fp,#-28 493e4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 493e8: 246e 0010 moveal %fp@(16),%a2 register int i = 0; 493ec: 4283 clrl %d3 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 493ee: 284a moveal %a2,%a4 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 493f0: 4bf9 0004 3558 lea 43558 ,%a5 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 493f6: 266e 0008 moveal %fp@(8),%a3 const char *path, int pathlen, char *token, int *token_len ) { 493fa: 282e 000c movel %fp@(12),%d4 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 493fe: 141b moveb %a3@+,%d2 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49400: 600c bras 4940e token[i] = c; if ( i == IMFS_NAME_MAX ) 49402: 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; 49404: 18c2 moveb %d2,%a4@+ if ( i == IMFS_NAME_MAX ) 49406: b083 cmpl %d3,%d0 49408: 6772 beqs 4947c return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4940a: 5283 addql #1,%d3 4940c: 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) ) { 4940e: 1002 moveb %d2,%d0 49410: 49c0 extbl %d0 49412: 2f00 movel %d0,%sp@- 49414: 4e95 jsr %a5@ 49416: 588f addql #4,%sp 49418: 4a80 tstl %d0 4941a: 6604 bnes 49420 4941c: b883 cmpl %d3,%d4 4941e: 6ee2 bgts 49402 /* * Copy a seperator into token. */ if ( i == 0 ) { 49420: 4a83 tstl %d3 49422: 660a bnes 4942e token[i] = c; 49424: 1482 moveb %d2,%a2@ if ( (token[i] != '\0') && pathlen ) { 49426: 6714 beqs 4943c 49428: 4a84 tstl %d4 4942a: 6614 bnes 49440 4942c: 600e bras 4943c i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4942e: 4a32 38ff tstb %a2@(ffffffff,%d3:l) 49432: 6712 beqs 49446 <== NEVER TAKEN token[i] = '\0'; 49434: 4200 clrb %d0 49436: 1580 3800 moveb %d0,%a2@(00000000,%d3:l) 4943a: 600a bras 49446 if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 4943c: 4282 clrl %d2 4943e: 6008 bras 49448 if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; 49440: 7401 moveq #1,%d2 if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; 49442: 7601 moveq #1,%d3 49444: 6002 bras 49448 char *token, int *token_len ) { register int i = 0; IMFS_token_types type = IMFS_NAME; 49446: 7403 moveq #3,%d2 /* * Set token_len to the number of characters copied. */ *token_len = i; 49448: 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 ) { 4944c: 7003 moveq #3,%d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 4944e: 2083 movel %d3,%a0@ /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 49450: b082 cmpl %d2,%d0 49452: 6632 bnes 49486 if ( strcmp( token, "..") == 0 ) 49454: 4879 0005 a2e1 pea 5a2e1 4945a: 47f9 0004 cbf8 lea 4cbf8 ,%a3 49460: 2f0a movel %a2,%sp@- 49462: 4e93 jsr %a3@ 49464: 508f addql #8,%sp 49466: 4a80 tstl %d0 49468: 6716 beqs 49480 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4946a: 4879 0005 a2e2 pea 5a2e2 49470: 2f0a movel %a2,%sp@- 49472: 4e93 jsr %a3@ 49474: 508f addql #8,%sp 49476: 4a80 tstl %d0 49478: 670a beqs 49484 4947a: 600a bras 49486 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; 4947c: 7404 moveq #4,%d2 4947e: 6006 bras 49486 * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; 49480: 7402 moveq #2,%d2 49482: 6002 bras 49486 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; 49484: 7401 moveq #1,%d2 } return type; } 49486: 2002 movel %d2,%d0 49488: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4948e: 4e5e unlk %fp ... =============================================================================== 00041d80 : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 41d80: 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) { 41d84: 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 ) { 41d86: 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, 41d8a: 2039 0005 ade8 movel 5ade8 ,%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 ) { 41d90: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 41d94: 246e 0008 moveal %fp@(8),%a2 41d98: 242e 0014 movel %fp@(20),%d2 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 41d9c: b081 cmpl %d1,%d0 41d9e: 670e beqs 41dae 41da0: 5388 subql #1,%a0 41da2: d281 addl %d1,%d1 41da4: 4a88 tstl %a0 41da6: 66f4 bnes 41d9c <== ALWAYS TAKEN is_valid = true; } } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 41da8: 203c 0000 0080 movel #128,%d0 <== NOT EXECUTED for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 41dae: 23c0 0005 bc68 movel %d0,5bc68 /* * 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(); 41db4: 4eb9 0004 8c00 jsr 48c00 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 41dba: 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(); 41dc0: 2640 moveal %d0,%a3 41dc2: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 41dc6: 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; 41dca: 4878 0030 pea 30 41dce: 4879 0005 a2ac pea 5a2ac 41dd4: 486a 0038 pea %a2@(56) 41dd8: 4eb9 0004 c5a4 jsr 4c5a4 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 41dde: 4878 0014 pea 14 41de2: 4878 0001 pea 1 41de6: 4eb9 0004 2444 jsr 42444 if ( !fs_info ) { 41dec: 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 ) ); 41df0: 2040 moveal %d0,%a0 if ( !fs_info ) { 41df2: 4a80 tstl %d0 41df4: 661a bnes 41e10 <== ALWAYS TAKEN free(temp_mt_entry->mt_fs_root.node_access); 41df6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 41df8: 4eb9 0004 2830 jsr 42830 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 41dfe: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 41e04: 588f addql #4,%sp <== NOT EXECUTED 41e06: 2040 moveal %d0,%a0 <== NOT EXECUTED 41e08: 700c moveq #12,%d0 <== NOT EXECUTED 41e0a: 2080 movel %d0,%a0@ <== NOT EXECUTED 41e0c: 70ff moveq #-1,%d0 <== NOT EXECUTED 41e0e: 6030 bras 41e40 <== NOT EXECUTED } temp_mt_entry->fs_info = fs_info; 41e10: 2540 0034 movel %d0,%a2@(52) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 41e14: 2039 0005 bc6c movel 5bc6c ,%d0 41e1a: 2080 movel %d0,%a0@ 41e1c: 5280 addql #1,%d0 41e1e: 23c0 0005 bc6c movel %d0,5bc6c fs_info->ino_count = 1; 41e24: 7001 moveq #1,%d0 fs_info->memfile_handlers = memfile_handlers; 41e26: 216e 0010 0008 movel %fp@(16),%a0@(8) fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; 41e2c: 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; 41e32: 2140 0004 movel %d0,%a0@(4) fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 41e36: 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; 41e3a: 2740 0034 movel %d0,%a3@(52) return 0; 41e3e: 4200 clrb %d0 } 41e40: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 41e46: 4e5e unlk %fp ... =============================================================================== 00041e4c : /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 41e4c: 4280 clrl %d0 41e4e: 7207 moveq #7,%d1 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 41e50: 4e56 ffbc linkw %fp,#-68 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 41e54: 206e 0008 moveal %fp@(8),%a0 41e58: 2050 moveal %a0@,%a0 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 41e5a: 2f03 movel %d3,%sp@- 41e5c: 262e 0010 movel %fp@(16),%d3 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 41e60: 3028 0032 movew %a0@(50),%d0 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 41e64: 2f02 movel %d2,%sp@- int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 41e66: 2d48 ffe0 movel %a0,%fp@(-32) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 41e6a: b280 cmpl %d0,%d1 41e6c: 640e bccs 41e7c rtems_set_errno_and_return_minus_one( EMLINK ); 41e6e: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 41e74: 721f moveq #31,%d1 41e76: 2040 moveal %d0,%a0 41e78: 2081 movel %d1,%a0@ 41e7a: 6050 bras 41ecc /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 41e7c: 2f03 movel %d3,%sp@- 41e7e: 240e movel %fp,%d2 41e80: 0682 ffff ffbf addil #-65,%d2 41e86: 4eb9 0004 d150 jsr 4d150 41e8c: 588f addql #4,%sp 41e8e: 486e fffc pea %fp@(-4) 41e92: 2f02 movel %d2,%sp@- 41e94: 2f00 movel %d0,%sp@- 41e96: 2f03 movel %d3,%sp@- 41e98: 4eb9 0004 93e0 jsr 493e0 * 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( 41e9e: 486e ffe0 pea %fp@(-32) 41ea2: 2f3c 0000 a1ff movel #41471,%sp@- 41ea8: 2f02 movel %d2,%sp@- 41eaa: 4878 0003 pea 3 41eae: 2f2e 000c movel %fp@(12),%sp@- 41eb2: 4eb9 0004 8af8 jsr 48af8 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 41eb8: 4fef 0024 lea %sp@(36),%sp 41ebc: 4a80 tstl %d0 41ebe: 6610 bnes 41ed0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 41ec0: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 41ec6: 2040 moveal %d0,%a0 <== NOT EXECUTED 41ec8: 700c moveq #12,%d0 <== NOT EXECUTED 41eca: 2080 movel %d0,%a0@ <== NOT EXECUTED 41ecc: 70ff moveq #-1,%d0 41ece: 6028 bras 41ef8 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 41ed0: 206e ffe0 moveal %fp@(-32),%a0 41ed4: 3028 0032 movew %a0@(50),%d0 41ed8: 5280 addql #1,%d0 41eda: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( info.hard_link.link_node ); 41ede: 42a7 clrl %sp@- 41ee0: 486e fff4 pea %fp@(-12) 41ee4: 4eb9 0004 28b8 jsr 428b8 41eea: 206e ffe0 moveal %fp@(-32),%a0 return 0; 41eee: 508f addql #8,%sp 41ef0: 4280 clrl %d0 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); 41ef2: 216e fff4 0044 movel %fp@(-12),%a0@(68) return 0; } 41ef8: 242e ffb4 movel %fp@(-76),%d2 41efc: 262e ffb8 movel %fp@(-72),%d3 41f00: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004acd6 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4acd6: 4e56 0000 linkw %fp,#0 4acda: 2f0a movel %a2,%sp@- #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4acdc: 4878 0001 pea 1 4ace0: 2f2e 000c movel %fp@(12),%sp@- 4ace4: 2f2e 0008 movel %fp@(8),%sp@- 4ace8: 4eb9 0004 a994 jsr 4a994 if ( *block_entry_ptr ) 4acee: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4acf2: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 4acf4: 4a92 tstl %a2@ 4acf6: 660c bnes 4ad04 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 4acf8: 4eb9 0004 a970 jsr 4a970 if ( !memory ) 4acfe: 4a80 tstl %d0 4ad00: 6706 beqs 4ad08 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 4ad02: 2480 movel %d0,%a2@ assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); if ( *block_entry_ptr ) return 0; 4ad04: 4280 clrl %d0 4ad06: 6002 bras 4ad0a fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) return 1; 4ad08: 7001 moveq #1,%d0 <== NOT EXECUTED *block_entry_ptr = memory; return 0; } 4ad0a: 246e fffc moveal %fp@(-4),%a2 4ad0e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ae88 : #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4ae88: 4280 clrl %d0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4ae8a: 4e56 ffdc linkw %fp,#-36 4ae8e: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4ae92: 2c39 0005 bc68 movel 5bc68 ,%d6 4ae98: 2a06 movel %d6,%d5 4ae9a: e48d lsrl #2,%d5 4ae9c: 2805 movel %d5,%d4 4ae9e: 5284 addql #1,%d4 4aea0: 4c05 4800 mulsl %d5,%d4 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4aea4: 242e 000c movel %fp@(12),%d2 4aea8: 262e 0010 movel %fp@(16),%d3 4aeac: 246e 0008 moveal %fp@(8),%a2 #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4aeb0: 5284 addql #1,%d4 4aeb2: 4c05 4800 mulsl %d5,%d4 4aeb6: 5384 subql #1,%d4 4aeb8: 4c06 4800 mulsl %d6,%d4 4aebc: 2204 movel %d4,%d1 4aebe: 2802 movel %d2,%d4 4aec0: 2a03 movel %d3,%d5 4aec2: 9a81 subl %d1,%d5 4aec4: 9980 subxl %d0,%d4 4aec6: 6d0e blts 4aed6 rtems_set_errno_and_return_minus_one( EINVAL ); 4aec8: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 4aece: 7416 moveq #22,%d2 4aed0: 2040 moveal %d0,%a0 4aed2: 2082 movel %d2,%a0@ 4aed4: 6078 bras 4af4e if ( new_length <= the_jnode->info.file.size ) 4aed6: 282a 004c movel %a2@(76),%d4 4aeda: 2a2a 0050 movel %a2@(80),%d5 4aede: 2002 movel %d2,%d0 4aee0: 2203 movel %d3,%d1 4aee2: 9285 subl %d5,%d1 4aee4: 9184 subxl %d4,%d0 4aee6: 6f78 bles 4af60 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4aee8: 47f9 0005 7a8c lea 57a8c <__divdi3>,%a3 4aeee: 2e06 movel %d6,%d7 4aef0: 5bc6 smi %d6 4aef2: 49c6 extbl %d6 4aef4: 2f07 movel %d7,%sp@- 4aef6: 2f06 movel %d6,%sp@- 4aef8: 2f03 movel %d3,%sp@- 4aefa: 2f02 movel %d2,%sp@- 4aefc: 4e93 jsr %a3@ 4aefe: 4fef 0010 lea %sp@(16),%sp 4af02: 2841 moveal %d1,%a4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4af04: 2f07 movel %d7,%sp@- 4af06: 2f06 movel %d6,%sp@- 4af08: 2f05 movel %d5,%sp@- 4af0a: 2f04 movel %d4,%sp@- 4af0c: 4e93 jsr %a3@ 4af0e: 4fef 0010 lea %sp@(16),%sp /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4af12: 47f9 0004 acd6 lea 4acd6 ,%a3 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4af18: 2c01 movel %d1,%d6 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4af1a: 2801 movel %d1,%d4 4af1c: 6036 bras 4af54 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4af1e: 2f04 movel %d4,%sp@- 4af20: 2f0a movel %a2,%sp@- 4af22: 4e93 jsr %a3@ 4af24: 508f addql #8,%sp 4af26: 4a80 tstl %d0 4af28: 6728 beqs 4af52 <== ALWAYS TAKEN 4af2a: 600c bras 4af38 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 4af2c: 2f04 movel %d4,%sp@- <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4af2e: 5384 subql #1,%d4 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4af30: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4af32: 4e93 jsr %a3@ <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4af34: 508f addql #8,%sp <== NOT EXECUTED 4af36: 6006 bras 4af3e <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4af38: 47f9 0004 ae56 lea 4ae56 ,%a3 <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4af3e: bc84 cmpl %d4,%d6 <== NOT EXECUTED 4af40: 63ea blss 4af2c <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4af42: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 4af48: 721c moveq #28,%d1 <== NOT EXECUTED 4af4a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4af4c: 2081 movel %d1,%a0@ <== NOT EXECUTED 4af4e: 70ff moveq #-1,%d0 4af50: 6010 bras 4af62 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4af52: 5284 addql #1,%d4 4af54: b9c4 cmpal %d4,%a4 4af56: 64c6 bccs 4af1e /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4af58: 2542 004c movel %d2,%a2@(76) 4af5c: 2543 0050 movel %d3,%a2@(80) if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) return 0; 4af60: 4280 clrl %d0 * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 4af62: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 4af68: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a994 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4a994: 4e56 fff0 linkw %fp,#-16 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4a998: 2039 0005 bc68 movel 5bc68 ,%d0 4a99e: e488 lsrl #2,%d0 4a9a0: 2200 movel %d0,%d1 4a9a2: 5381 subql #1,%d1 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4a9a4: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4a9a8: 246e 0008 moveal %fp@(8),%a2 4a9ac: 242e 000c movel %fp@(12),%d2 4a9b0: 206e 0010 moveal %fp@(16),%a0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4a9b4: b282 cmpl %d2,%d1 4a9b6: 6536 bcss 4a9ee p = info->indirect; 4a9b8: 226a 0054 moveal %a2@(84),%a1 if ( malloc_it ) { 4a9bc: 4a88 tstl %a0 4a9be: 6720 beqs 4a9e0 if ( !p ) { 4a9c0: 4a89 tstl %a1 4a9c2: 6610 bnes 4a9d4 p = memfile_alloc_block(); 4a9c4: 4eb9 0004 a970 jsr 4a970 if ( !p ) 4a9ca: 4a80 tstl %d0 4a9cc: 6700 0118 beqw 4aae6 return 0; info->indirect = p; 4a9d0: 2540 0054 movel %d0,%a2@(84) } return &info->indirect[ my_block ]; 4a9d4: 206a 0054 moveal %a2@(84),%a0 4a9d8: e58a lsll #2,%d2 4a9da: d1c2 addal %d2,%a0 4a9dc: 6000 010a braw 4aae8 } if ( !p ) 4a9e0: 4a89 tstl %a1 4a9e2: 6700 0102 beqw 4aae6 return 0; return &info->indirect[ my_block ]; 4a9e6: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 4a9ea: 6000 00fc braw 4aae8 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4a9ee: 2200 movel %d0,%d1 4a9f0: 5281 addql #1,%d1 4a9f2: 4c00 1800 mulsl %d0,%d1 4a9f6: 2241 moveal %d1,%a1 4a9f8: 5389 subql #1,%a1 4a9fa: b3c2 cmpal %d2,%a1 4a9fc: 6562 bcss 4aa60 #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 4a9fe: 9480 subl %d0,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4aa00: 4c40 2003 remul %d0,%d3,%d2 4aa04: 4c40 2002 remul %d0,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4aa08: 202a 0058 movel %a2@(88),%d0 if ( malloc_it ) { 4aa0c: 4a88 tstl %a0 4aa0e: 6736 beqs 4aa46 if ( !p ) { 4aa10: 4a80 tstl %d0 4aa12: 6610 bnes 4aa24 p = memfile_alloc_block(); 4aa14: 4eb9 0004 a970 jsr 4a970 if ( !p ) 4aa1a: 4a80 tstl %d0 4aa1c: 6700 00c8 beqw 4aae6 return 0; info->doubly_indirect = p; 4aa20: 2540 0058 movel %d0,%a2@(88) } p1 = (block_p *)p[ doubly ]; 4aa24: 2040 moveal %d0,%a0 4aa26: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4aa2a: 2012 movel %a2@,%d0 if ( !p1 ) { 4aa2c: 660e bnes 4aa3c p1 = memfile_alloc_block(); 4aa2e: 4eb9 0004 a970 jsr 4a970 if ( !p1 ) 4aa34: 4a80 tstl %d0 4aa36: 6700 00ae beqw 4aae6 return 0; p[ doubly ] = (block_p) p1; 4aa3a: 2480 movel %d0,%a2@ } return (block_p *)&p1[ singly ]; 4aa3c: 2240 moveal %d0,%a1 4aa3e: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 4aa42: 6000 00a4 braw 4aae8 } if ( !p ) 4aa46: 4a80 tstl %d0 4aa48: 6700 009c beqw 4aae6 return 0; p = (block_p *)p[ doubly ]; 4aa4c: 2240 moveal %d0,%a1 4aa4e: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 if ( !p ) 4aa52: 4a88 tstl %a0 4aa54: 6700 0090 beqw 4aae6 #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 4aa58: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4aa5c: 6000 008a braw 4aae8 #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4aa60: 2601 movel %d1,%d3 4aa62: 5283 addql #1,%d3 4aa64: 4c00 3800 mulsl %d0,%d3 4aa68: 5383 subql #1,%d3 4aa6a: b682 cmpl %d2,%d3 4aa6c: 6578 bcss 4aae6 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 4aa6e: 9481 subl %d1,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4aa70: 4c40 2004 remul %d0,%d4,%d2 4aa74: 4c40 2002 remul %d0,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 4aa78: 4c40 2003 remul %d0,%d3,%d2 4aa7c: 4c40 2002 remul %d0,%d2,%d2 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 4aa80: 202a 005c movel %a2@(92),%d0 if ( malloc_it ) { 4aa84: 4a88 tstl %a0 4aa86: 6746 beqs 4aace if ( !p ) { 4aa88: 4a80 tstl %d0 4aa8a: 660e bnes 4aa9a p = memfile_alloc_block(); 4aa8c: 4eb9 0004 a970 jsr 4a970 if ( !p ) 4aa92: 4a80 tstl %d0 4aa94: 6750 beqs 4aae6 <== NEVER TAKEN return 0; info->triply_indirect = p; 4aa96: 2540 005c movel %d0,%a2@(92) } p1 = (block_p *) p[ triply ]; 4aa9a: 2040 moveal %d0,%a0 4aa9c: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4aaa0: 2012 movel %a2@,%d0 if ( !p1 ) { 4aaa2: 660c bnes 4aab0 p1 = memfile_alloc_block(); 4aaa4: 4eb9 0004 a970 jsr 4a970 if ( !p1 ) 4aaaa: 4a80 tstl %d0 4aaac: 6738 beqs 4aae6 <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; 4aaae: 2480 movel %d0,%a2@ } p2 = (block_p *)p1[ doubly ]; 4aab0: 2240 moveal %d0,%a1 4aab2: 45f1 3c00 lea %a1@(00000000,%d3:l:4),%a2 4aab6: 2012 movel %a2@,%d0 if ( !p2 ) { 4aab8: 660c bnes 4aac6 p2 = memfile_alloc_block(); 4aaba: 4eb9 0004 a970 jsr 4a970 if ( !p2 ) 4aac0: 4a80 tstl %d0 4aac2: 6722 beqs 4aae6 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 4aac4: 2480 movel %d0,%a2@ } return (block_p *)&p2[ singly ]; 4aac6: 2240 moveal %d0,%a1 4aac8: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0 4aacc: 601a bras 4aae8 } if ( !p ) 4aace: 4a80 tstl %d0 4aad0: 6714 beqs 4aae6 <== NEVER TAKEN #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 4aad2: 2040 moveal %d0,%a0 4aad4: 2270 2c00 moveal %a0@(00000000,%d2:l:4),%a1 if ( !p1 ) 4aad8: 4a89 tstl %a1 4aada: 670a beqs 4aae6 <== NEVER TAKEN p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 4aadc: 2071 3c00 moveal %a1@(00000000,%d3:l:4),%a0 4aae0: e58c lsll #2,%d4 4aae2: d1c4 addal %d4,%a0 4aae4: 6002 bras 4aae8 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; 4aae6: 91c8 subal %a0,%a0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4aae8: 2008 movel %a0,%d0 4aaea: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4aaf0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004aaf4 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4aaf4: 4e56 ffc8 linkw %fp,#-56 4aaf8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4aafc: 246e 0008 moveal %fp@(8),%a2 4ab00: 2e2e 0014 movel %fp@(20),%d7 4ab04: 2c2e 0018 movel %fp@(24),%d6 4ab08: 242e 000c movel %fp@(12),%d2 4ab0c: 262e 0010 movel %fp@(16),%d3 /* * Error checks on arguments */ if ( !dest ) 4ab10: 4a87 tstl %d7 4ab12: 6704 beqs 4ab18 <== NEVER TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 4ab14: 4a86 tstl %d6 4ab16: 6612 bnes 4ab2a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4ab18: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 4ab1e: 74ff moveq #-1,%d2 <== NOT EXECUTED 4ab20: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ab22: 7016 moveq #22,%d0 <== NOT EXECUTED 4ab24: 2080 movel %d0,%a0@ <== NOT EXECUTED 4ab26: 6000 017c braw 4aca4 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 4ab2a: 7006 moveq #6,%d0 4ab2c: b0aa 0048 cmpl %a2@(72),%d0 4ab30: 6656 bnes 4ab88 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4ab32: 2246 moveal %d6,%a1 4ab34: 91c8 subal %a0,%a0 4ab36: 282a 004c movel %a2@(76),%d4 4ab3a: 2a2a 0050 movel %a2@(80),%d5 * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 4ab3e: 266a 0054 moveal %a2@(84),%a3 if (my_length > (the_jnode->info.linearfile.size - start)) 4ab42: 2d44 fff0 movel %d4,%fp@(-16) 4ab46: 2d45 fff4 movel %d5,%fp@(-12) 4ab4a: 9a83 subl %d3,%d5 4ab4c: 9982 subxl %d2,%d4 4ab4e: 2008 movel %a0,%d0 4ab50: 2209 movel %a1,%d1 4ab52: 9285 subl %d5,%d1 4ab54: 9184 subxl %d4,%d0 4ab56: 6f06 bles 4ab5e <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 4ab58: 2c2e fff4 movel %fp@(-12),%d6 4ab5c: 9c83 subl %d3,%d6 memcpy(dest, &file_ptr[start], my_length); 4ab5e: 2f06 movel %d6,%sp@- 4ab60: 4873 3800 pea %a3@(00000000,%d3:l) IMFS_update_atime( the_jnode ); return my_length; 4ab64: 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); 4ab66: 2f07 movel %d7,%sp@- 4ab68: 4eb9 0004 c5a4 jsr 4c5a4 IMFS_update_atime( the_jnode ); 4ab6e: 42a7 clrl %sp@- 4ab70: 486e fff8 pea %fp@(-8) 4ab74: 4eb9 0004 28b8 jsr 428b8 4ab7a: 256e fff8 003c movel %fp@(-8),%a2@(60) return my_length; 4ab80: 4fef 0014 lea %sp@(20),%sp 4ab84: 6000 011e braw 4aca4 /* * 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; 4ab88: 2043 moveal %d3,%a0 4ab8a: 43f0 6800 lea %a0@(00000000,%d6:l),%a1 if ( last_byte > the_jnode->info.file.size ) 4ab8e: 97cb subal %a3,%a3 4ab90: 2849 moveal %a1,%a4 4ab92: 202a 004c movel %a2@(76),%d0 4ab96: 222a 0050 movel %a2@(80),%d1 4ab9a: 280b movel %a3,%d4 4ab9c: 2a0c movel %a4,%d5 4ab9e: 9a81 subl %d1,%d5 4aba0: 9980 subxl %d0,%d4 4aba2: 6f04 bles 4aba8 my_length = the_jnode->info.file.size - start; 4aba4: 2c01 movel %d1,%d6 4aba6: 9c83 subl %d3,%d6 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4aba8: 2879 0005 bc68 moveal 5bc68 ,%a4 4abae: 2a0c movel %a4,%d5 4abb0: 5bc4 smi %d4 4abb2: 49c4 extbl %d4 4abb4: 2f05 movel %d5,%sp@- 4abb6: 2f04 movel %d4,%sp@- 4abb8: 2f03 movel %d3,%sp@- 4abba: 2f02 movel %d2,%sp@- 4abbc: 4eb9 0005 7e58 jsr 57e58 <__moddi3> 4abc2: 4fef 0010 lea %sp@(16),%sp 4abc6: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4abc8: 2f05 movel %d5,%sp@- 4abca: 2f04 movel %d4,%sp@- 4abcc: 2f03 movel %d3,%sp@- 4abce: 2f02 movel %d2,%sp@- 4abd0: 4eb9 0005 7a8c jsr 57a8c <__divdi3> 4abd6: 4fef 0010 lea %sp@(16),%sp 4abda: 2801 movel %d1,%d4 if ( start_offset ) { 4abdc: 4a8b tstl %a3 4abde: 673c beqs 4ac1c 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 ); 4abe0: 42a7 clrl %sp@- 4abe2: 2f01 movel %d1,%sp@- 4abe4: 2f0a movel %a2,%sp@- 4abe6: 4eb9 0004 a994 jsr 4a994 if ( !block_ptr ) 4abec: 4fef 000c lea %sp@(12),%sp 4abf0: 4a80 tstl %d0 4abf2: 6700 00ae beqw 4aca2 */ 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; 4abf6: 99cb subal %a3,%a4 4abf8: 2406 movel %d6,%d2 4abfa: b9c6 cmpal %d6,%a4 4abfc: 6402 bccs 4ac00 4abfe: 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 ); 4ac00: 2f02 movel %d2,%sp@- 4ac02: 2040 moveal %d0,%a0 4ac04: d7d0 addal %a0@,%a3 dest += to_copy; block++; 4ac06: 5284 addql #1,%d4 my_length -= to_copy; 4ac08: 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 ); 4ac0a: 2f0b movel %a3,%sp@- 4ac0c: 2f07 movel %d7,%sp@- dest += to_copy; 4ac0e: 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 ); 4ac10: 4eb9 0004 c5a4 jsr 4c5a4 dest += to_copy; block++; my_length -= to_copy; 4ac16: 4fef 000c lea %sp@(12),%sp 4ac1a: 6002 bras 4ac1e last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 4ac1c: 4282 clrl %d2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4ac1e: 2679 0005 bc68 moveal 5bc68 ,%a3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4ac24: 4bf9 0004 a994 lea 4a994 ,%a5 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4ac2a: 49f9 0004 c5a4 lea 4c5a4 ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4ac30: 6026 bras 4ac58 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4ac32: 42a7 clrl %sp@- 4ac34: 2f04 movel %d4,%sp@- 4ac36: 2f0a movel %a2,%sp@- 4ac38: 4e95 jsr %a5@ if ( !block_ptr ) 4ac3a: 4fef 000c lea %sp@(12),%sp 4ac3e: 4a80 tstl %d0 4ac40: 6762 beqs 4aca4 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4ac42: 2040 moveal %d0,%a0 dest += to_copy; block++; 4ac44: 5284 addql #1,%d4 my_length -= to_copy; 4ac46: 9c8b subl %a3,%d6 copied += to_copy; 4ac48: 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 ); 4ac4a: 2f0b movel %a3,%sp@- 4ac4c: 2f10 movel %a0@,%sp@- 4ac4e: 2f07 movel %d7,%sp@- dest += to_copy; 4ac50: 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 ); 4ac52: 4e94 jsr %a4@ dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 4ac54: 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 ) { 4ac58: bcb9 0005 bc68 cmpl 5bc68 ,%d6 4ac5e: 64d2 bccs 4ac32 #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif if ( my_length ) { 4ac60: 4a86 tstl %d6 4ac62: 6728 beqs 4ac8c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4ac64: 42a7 clrl %sp@- 4ac66: 2f04 movel %d4,%sp@- 4ac68: 2f0a movel %a2,%sp@- 4ac6a: 4eb9 0004 a994 jsr 4a994 if ( !block_ptr ) 4ac70: 4fef 000c lea %sp@(12),%sp 4ac74: 4a80 tstl %d0 4ac76: 672c beqs 4aca4 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4ac78: 2040 moveal %d0,%a0 copied += my_length; 4ac7a: 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 ); 4ac7c: 2f06 movel %d6,%sp@- 4ac7e: 2f10 movel %a0@,%sp@- 4ac80: 2f07 movel %d7,%sp@- 4ac82: 4eb9 0004 c5a4 jsr 4c5a4 copied += my_length; 4ac88: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 4ac8c: 42a7 clrl %sp@- 4ac8e: 486e fff8 pea %fp@(-8) 4ac92: 4eb9 0004 28b8 jsr 428b8 4ac98: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 4ac9e: 508f addql #8,%sp 4aca0: 6002 bras 4aca4 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; 4aca2: 4282 clrl %d2 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4aca4: 2002 movel %d2,%d0 4aca6: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4acac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ad76 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4ad76: 4e56 ffe4 linkw %fp,#-28 4ad7a: 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; 4ad7e: 2439 0005 bc68 movel 5bc68 ,%d2 4ad84: e48a lsrl #2,%d2 */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4ad86: 246e 0008 moveal %fp@(8),%a2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4ad8a: 4aaa 0054 tstl %a2@(84) 4ad8e: 670e beqs 4ad9e memfile_free_blocks_in_table( &info->indirect, to_free ); 4ad90: 2f02 movel %d2,%sp@- 4ad92: 486a 0054 pea %a2@(84) 4ad96: 4eb9 0004 ad2c jsr 4ad2c 4ad9c: 508f addql #8,%sp } if ( info->doubly_indirect ) { 4ad9e: 4aaa 0058 tstl %a2@(88) 4ada2: 673e beqs 4ade2 <== ALWAYS TAKEN 4ada4: 4283 clrl %d3 <== NOT EXECUTED for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( 4ada6: 47f9 0004 ad2c lea 4ad2c ,%a3<== NOT EXECUTED 4adac: 601a bras 4adc8 <== NOT EXECUTED } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 4adae: 2003 movel %d3,%d0 <== NOT EXECUTED 4adb0: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4adb4: e588 lsll #2,%d0 <== NOT EXECUTED 4adb6: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 4adba: 670a beqs 4adc6 <== NOT EXECUTED memfile_free_blocks_in_table( 4adbc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4adbe: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4adc2: 4e93 jsr %a3@ <== NOT EXECUTED 4adc4: 508f addql #8,%sp <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i,%d0<== NOT EXECUTED 4adce: e488 lsrl #2,%d0 <== NOT EXECUTED 4add0: b083 cmpl %d3,%d0 <== NOT EXECUTED 4add2: 62da bhis 4adae <== NOT EXECUTED 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 ); 4add4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4add6: 486a 0058 pea %a2@(88) <== NOT EXECUTED 4adda: 4eb9 0004 ad2c jsr 4ad2c <== NOT EXECUTED 4ade0: 508f addql #8,%sp <== NOT EXECUTED } if ( info->triply_indirect ) { 4ade2: 4aaa 005c tstl %a2@(92) 4ade6: 6762 beqs 4ae4a <== ALWAYS TAKEN 4ade8: 4283 clrl %d3 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j,%a4<== NOT EXECUTED 4adf0: 603e bras 4ae30 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 4adf2: 2a03 movel %d3,%d5 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; 4adf4: 206a 005c moveal %a2@(92),%a0 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 4adf8: e58d lsll #2,%d5 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; 4adfa: 2670 5800 moveal %a0@(00000000,%d5:l),%a3 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4adfe: 4a8b tstl %a3 <== NOT EXECUTED 4ae00: 673a beqs 4ae3c <== NOT EXECUTED 4ae02: 4284 clrl %d4 <== NOT EXECUTED 4ae04: 6010 bras 4ae16 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4ae0a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4ae0c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4ae0e: 4e94 jsr %a4@ <== NOT EXECUTED 4ae10: 508f addql #8,%sp <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j,%d0<== NOT EXECUTED 4ae1c: e488 lsrl #2,%d0 <== NOT EXECUTED 4ae1e: b084 cmpl %d4,%d0 <== NOT EXECUTED 4ae20: 62e4 bhis 4ae06 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4ae22: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4ae24: daaa 005c addl %a2@(92),%d5 <== NOT EXECUTED 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<== NOT EXECUTED 4ae36: e488 lsrl #2,%d0 <== NOT EXECUTED 4ae38: b083 cmpl %d3,%d0 <== NOT EXECUTED 4ae3a: 62b6 bhis 4adf2 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4ae3c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4ae3e: 486a 005c pea %a2@(92) <== NOT EXECUTED 4ae42: 4eb9 0004 ad2c jsr 4ad2c <== NOT EXECUTED 4ae48: 508f addql #8,%sp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 4ae4a: 4280 clrl %d0 4ae4c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ae52: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ae56 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4ae56: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4ae5a: 42a7 clrl %sp@- <== NOT EXECUTED 4ae5c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4ae60: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4ae64: 4eb9 0004 a994 jsr 4a994 <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( block_ptr ); #endif if ( block_ptr ) { 4ae6a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ae6e: 4a80 tstl %d0 <== NOT EXECUTED 4ae70: 6710 beqs 4ae82 <== NOT EXECUTED ptr = *block_ptr; 4ae72: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ae74: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 4ae76: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 4ae78: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ae7a: 4eb9 0004 ad12 jsr 4ad12 <== NOT EXECUTED 4ae80: 588f addql #4,%sp <== NOT EXECUTED } return 1; } 4ae82: 7001 moveq #1,%d0 <== NOT EXECUTED 4ae84: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004af6c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4af6c: 4e56 ffd0 linkw %fp,#-48 4af70: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4af74: 246e 0008 moveal %fp@(8),%a2 4af78: 2e2e 0014 movel %fp@(20),%d7 4af7c: 2c2e 0018 movel %fp@(24),%d6 4af80: 242e 000c movel %fp@(12),%d2 4af84: 262e 0010 movel %fp@(16),%d3 /* * Error check arguments */ if ( !source ) 4af88: 4a87 tstl %d7 4af8a: 6704 beqs 4af90 <== NEVER TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 4af8c: 4a86 tstl %d6 4af8e: 660e bnes 4af9e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4af90: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 4af96: 7816 moveq #22,%d4 <== NOT EXECUTED 4af98: 2040 moveal %d0,%a0 <== NOT EXECUTED 4af9a: 2084 movel %d4,%a0@ <== NOT EXECUTED 4af9c: 6036 bras 4afd4 <== NOT EXECUTED /* * 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 + length; 4af9e: 2046 moveal %d6,%a0 4afa0: d1c3 addal %d3,%a0 if ( last_byte > the_jnode->info.file.size ) { 4afa2: 2208 movel %a0,%d1 4afa4: 4280 clrl %d0 4afa6: 282a 004c movel %a2@(76),%d4 4afaa: 2a2a 0050 movel %a2@(80),%d5 4afae: 9a81 subl %d1,%d5 4afb0: 9980 subxl %d0,%d4 4afb2: 6c28 bges 4afdc <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 4afb4: 2f08 movel %a0,%sp@- 4afb6: 2f00 movel %d0,%sp@- 4afb8: 2f0a movel %a2,%sp@- 4afba: 4eb9 0004 ae88 jsr 4ae88 if ( status ) 4afc0: 4fef 000c lea %sp@(12),%sp 4afc4: 4a80 tstl %d0 4afc6: 6714 beqs 4afdc rtems_set_errno_and_return_minus_one( ENOSPC ); 4afc8: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 4afce: 761c moveq #28,%d3 4afd0: 2040 moveal %d0,%a0 4afd2: 2083 movel %d3,%a0@ 4afd4: 387c ffff moveaw #-1,%a4 4afd8: 6000 0102 braw 4b0dc /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4afdc: 2879 0005 bc68 moveal 5bc68 ,%a4 4afe2: 2a0c movel %a4,%d5 4afe4: 5bc4 smi %d4 4afe6: 49c4 extbl %d4 4afe8: 2f05 movel %d5,%sp@- 4afea: 2f04 movel %d4,%sp@- 4afec: 2f03 movel %d3,%sp@- 4afee: 2f02 movel %d2,%sp@- 4aff0: 4eb9 0005 7e58 jsr 57e58 <__moddi3> 4aff6: 4fef 0010 lea %sp@(16),%sp 4affa: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4affc: 2f05 movel %d5,%sp@- 4affe: 2f04 movel %d4,%sp@- 4b000: 2f03 movel %d3,%sp@- 4b002: 2f02 movel %d2,%sp@- 4b004: 4eb9 0005 7a8c jsr 57a8c <__divdi3> 4b00a: 4fef 0010 lea %sp@(16),%sp 4b00e: 2401 movel %d1,%d2 if ( start_offset ) { 4b010: 4a8b tstl %a3 4b012: 673a beqs 4b04e 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 ); 4b014: 42a7 clrl %sp@- 4b016: 2f01 movel %d1,%sp@- 4b018: 2f0a movel %a2,%sp@- 4b01a: 4eb9 0004 a994 jsr 4a994 if ( !block_ptr ) 4b020: 4fef 000c lea %sp@(12),%sp 4b024: 4a80 tstl %d0 4b026: 6700 00b2 beqw 4b0da */ 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; 4b02a: 99cb subal %a3,%a4 4b02c: bc8c cmpl %a4,%d6 4b02e: 6402 bccs 4b032 <== ALWAYS TAKEN 4b030: 2846 moveal %d6,%a4 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4b032: 2f0c movel %a4,%sp@- 4b034: 2040 moveal %d0,%a0 src += to_copy; block++; 4b036: 5282 addql #1,%d2 my_length -= to_copy; 4b038: 9c8c subl %a4,%d6 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4b03a: 2f07 movel %d7,%sp@- 4b03c: d7d0 addal %a0@,%a3 src += to_copy; 4b03e: de8c addl %a4,%d7 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4b040: 2f0b movel %a3,%sp@- 4b042: 4eb9 0004 c5a4 jsr 4c5a4 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4b048: 4fef 000c lea %sp@(12),%sp 4b04c: 6002 bras 4b050 status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; 4b04e: 99cc subal %a4,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4b050: 2839 0005 bc68 movel 5bc68 ,%d4 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b056: 4bf9 0004 a994 lea 4a994 ,%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 ); 4b05c: 47f9 0004 c5a4 lea 4c5a4 ,%a3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4b062: 6026 bras 4b08a block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b064: 42a7 clrl %sp@- 4b066: 2f02 movel %d2,%sp@- 4b068: 2f0a movel %a2,%sp@- 4b06a: 4e95 jsr %a5@ if ( !block_ptr ) 4b06c: 4fef 000c lea %sp@(12),%sp 4b070: 4a80 tstl %d0 4b072: 6768 beqs 4b0dc <== 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 ); 4b074: 2f04 movel %d4,%sp@- 4b076: 2040 moveal %d0,%a0 src += to_copy; block++; 4b078: 5282 addql #1,%d2 my_length -= to_copy; 4b07a: 9c84 subl %d4,%d6 * * 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( 4b07c: 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 ); 4b07e: 2f07 movel %d7,%sp@- 4b080: 2f10 movel %a0@,%sp@- src += to_copy; 4b082: 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 ); 4b084: 4e93 jsr %a3@ * * 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( 4b086: 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 ) { 4b08a: bcb9 0005 bc68 cmpl 5bc68 ,%d6 4b090: 64d2 bccs 4b064 #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif to_copy = my_length; if ( my_length ) { 4b092: 4a86 tstl %d6 4b094: 6728 beqs 4b0be block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b096: 42a7 clrl %sp@- 4b098: 2f02 movel %d2,%sp@- 4b09a: 2f0a movel %a2,%sp@- 4b09c: 4eb9 0004 a994 jsr 4a994 if ( !block_ptr ) 4b0a2: 4fef 000c lea %sp@(12),%sp 4b0a6: 4a80 tstl %d0 4b0a8: 6732 beqs 4b0dc <== 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 ); 4b0aa: 2f06 movel %d6,%sp@- 4b0ac: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4b0ae: 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 ); 4b0b0: 2f07 movel %d7,%sp@- 4b0b2: 2f10 movel %a0@,%sp@- 4b0b4: 4eb9 0004 c5a4 jsr 4c5a4 my_length = 0; copied += to_copy; 4b0ba: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4b0be: 42a7 clrl %sp@- 4b0c0: 486e fff8 pea %fp@(-8) 4b0c4: 4eb9 0004 28b8 jsr 428b8 4b0ca: 202e fff8 movel %fp@(-8),%d0 return copied; 4b0ce: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4b0d0: 2540 0040 movel %d0,%a2@(64) 4b0d4: 2540 0044 movel %d0,%a2@(68) return copied; 4b0d8: 6002 bras 4b0dc 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; 4b0da: 99cc subal %a4,%a4 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4b0dc: 200c movel %a4,%d0 4b0de: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4b0e4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041f04 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 41f04: 4e56 ffb4 linkw %fp,#-76 41f08: 48d7 003c moveml %d2-%d5,%sp@ 41f0c: 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 ); 41f10: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 41f12: 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 ); 41f16: 4eb9 0004 d150 jsr 4d150 41f1c: 588f addql #4,%sp 41f1e: 486e fffc pea %fp@(-4) 41f22: 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 */ ) { 41f26: 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 ); 41f2a: 2f00 movel %d0,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 41f2c: 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 ); 41f30: 2f03 movel %d3,%sp@- 41f32: 4eb9 0004 93e0 jsr 493e0 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 41f38: 4fef 0010 lea %sp@(16),%sp 41f3c: 2002 movel %d2,%d0 41f3e: 0280 0000 f000 andil #61440,%d0 41f44: 0c80 0000 4000 cmpil #16384,%d0 41f4a: 673a beqs 41f86 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 41f4c: 0c80 0000 8000 cmpil #32768,%d0 41f52: 6736 beqs 41f8a type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 41f54: 0c80 0000 6000 cmpil #24576,%d0 41f5a: 6708 beqs 41f64 41f5c: 0c80 0000 2000 cmpil #8192,%d0 41f62: 660c bnes 41f70 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 41f64: 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; 41f68: 7002 moveq #2,%d0 rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 41f6a: 2d44 ffec movel %d4,%fp@(-20) 41f6e: 6020 bras 41f90 } else if (S_ISFIFO(mode)) 41f70: 0c80 0000 1000 cmpil #4096,%d0 41f76: 6716 beqs 41f8e <== ALWAYS TAKEN type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 41f78: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 41f7e: 7216 moveq #22,%d1 <== NOT EXECUTED 41f80: 2040 moveal %d0,%a0 <== NOT EXECUTED 41f82: 2081 movel %d1,%a0@ <== NOT EXECUTED 41f84: 6034 bras 41fba <== NOT EXECUTED /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 41f86: 7001 moveq #1,%d0 41f88: 6006 bras 41f90 else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; 41f8a: 7005 moveq #5,%d0 41f8c: 6002 bras 41f90 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; 41f8e: 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( 41f90: 486e ffe8 pea %fp@(-24) 41f94: 2f02 movel %d2,%sp@- 41f96: 486e ffc7 pea %fp@(-57) 41f9a: 2f00 movel %d0,%sp@- 41f9c: 2f2e 0018 movel %fp@(24),%sp@- 41fa0: 4eb9 0004 8af8 jsr 48af8 new_name, mode, &info ); if ( !new_node ) 41fa6: 4fef 0014 lea %sp@(20),%sp 41faa: 4a80 tstl %d0 41fac: 6610 bnes 41fbe rtems_set_errno_and_return_minus_one( ENOMEM ); 41fae: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 41fb4: 2040 moveal %d0,%a0 41fb6: 700c moveq #12,%d0 41fb8: 2080 movel %d0,%a0@ 41fba: 70ff moveq #-1,%d0 41fbc: 6002 bras 41fc0 return 0; 41fbe: 4280 clrl %d0 } 41fc0: 4cee 003c ffb4 moveml %fp@(-76),%d2-%d5 41fc6: 4e5e unlk %fp ... =============================================================================== 00041fcc : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 41fcc: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 41fce: 4e56 0000 linkw %fp,#0 41fd2: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 41fd6: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 41fda: b0a8 0048 cmpl %a0@(72),%d0 41fde: 6710 beqs 41ff0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 41fe0: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 41fe6: 2040 moveal %d0,%a0 <== NOT EXECUTED 41fe8: 7014 moveq #20,%d0 <== NOT EXECUTED 41fea: 2080 movel %d0,%a0@ <== NOT EXECUTED 41fec: 70ff moveq #-1,%d0 <== NOT EXECUTED 41fee: 6006 bras 41ff6 <== 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; 41ff0: 2149 0058 movel %a1,%a0@(88) return 0; 41ff4: 4280 clrl %d0 } 41ff6: 4e5e unlk %fp ... =============================================================================== 00043938 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 43938: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); 4393c: 2079 0005 fa30 moveal 5fa30 <_impure_ptr>,%a0 */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 43942: 2f0a movel %a2,%sp@- 43944: 246e 0008 moveal %fp@(8),%a2 43948: 2f02 movel %d2,%sp@- #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); 4394a: 2f28 0008 movel %a0@(8),%sp@- switch( the_jnode->type ) { 4394e: 7406 moveq #6,%d2 { #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); 43950: 486a 000c pea %a2@(12) 43954: 4eb9 0004 f16c jsr 4f16c switch( the_jnode->type ) { 4395a: 202a 0048 movel %a2@(72),%d0 4395e: 2200 movel %d0,%d1 43960: 508f addql #8,%sp 43962: 5381 subql #1,%d1 43964: b481 cmpl %d1,%d2 43966: 6500 009c bcsw 43a04 4396a: 2079 0005 fa30 moveal 5fa30 <_impure_ptr>,%a0 43970: 303b 1a08 movew %pc@(4397a ,%d1:l:2),%d0 43974: 48c0 extl %d0 43976: 4efb 0802 jmp %pc@(4397a ,%d0:l) 4397a: 000e 016 <== NOT EXECUTED 4397c: 0022 042 <== NOT EXECUTED 4397e: 006a 0152 <== NOT EXECUTED 43980: 006a 0152 <== NOT EXECUTED 43982: 0050 0120 <== NOT EXECUTED 43984: 0032 062 <== NOT EXECUTED 43986: 0076 0166 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 43988: 2f28 0008 movel %a0@(8),%sp@- 4398c: 4878 002f pea 2f 43990: 4eb9 0004 f09c jsr 4f09c break; 43996: 508f addql #8,%sp 43998: 6000 0088 braw 43a22 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 4399c: 2f2a 0050 movel %a2@(80),%sp@- 439a0: 2f2a 004c movel %a2@(76),%sp@- 439a4: 4879 0005 e402 pea 5e402 439aa: 600e bras 439ba the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 439ac: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 439b0: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 439b4: 4879 0005 e415 pea 5e415 <== NOT EXECUTED 439ba: 2f28 0008 movel %a0@(8),%sp@- 439be: 4eb9 0004 f01e jsr 4f01e (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 439c4: 4fef 0010 lea %sp@(16),%sp 439c8: 6058 bras 43a22 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 439ca: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 439ce: 4879 0005 e424 pea 5e424 <== NOT EXECUTED 439d4: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 439d8: 4eb9 0004 f01e jsr 4f01e <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; 439de: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 439e2: 603e bras 43a22 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 439e4: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 439e8: 4879 0005 e430 pea 5e430 <== NOT EXECUTED 439ee: 600a bras 439fa <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 439f0: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 439f4: 4879 0005 e444 pea 5e444 <== NOT EXECUTED 439fa: 4eb9 0004 f16c jsr 4f16c <== NOT EXECUTED return; 43a00: 508f addql #8,%sp <== NOT EXECUTED 43a02: 6038 bras 43a3c <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 43a04: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43a06: 4879 0005 e457 pea 5e457 <== NOT EXECUTED 43a0c: 2079 0005 fa30 moveal 5fa30 <_impure_ptr>,%a0 <== NOT EXECUTED 43a12: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43a16: 4eb9 0004 f01e jsr 4f01e <== NOT EXECUTED return; 43a1c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43a20: 601a bras 43a3c <== NOT EXECUTED } puts(""); } 43a22: 242e fff8 movel %fp@(-8),%d2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 43a26: 203c 0005 ea98 movel #387736,%d0 } 43a2c: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 43a30: 2d40 0008 movel %d0,%fp@(8) } 43a34: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 43a36: 4ef9 0005 0982 jmp 50982 } 43a3c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 43a40: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43a44: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042010 : IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 42010: 7004 moveq #4,%d0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42012: 4e56 0000 linkw %fp,#0 IMFS_jnode_t *node; int i; node = loc->node_access; 42016: 206e 0008 moveal %fp@(8),%a0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 4201a: 2f0a movel %a2,%sp@- IMFS_jnode_t *node; int i; node = loc->node_access; 4201c: 2250 moveal %a0@,%a1 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 4201e: 2f02 movel %d2,%sp@- 42020: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 42024: b0a9 0048 cmpl %a1@(72),%d0 42028: 6608 bnes 42032 <== NEVER TAKEN 4202a: 206e 000c moveal %fp@(12),%a0 4202e: 4200 clrb %d0 42030: 6014 bras 42046 rtems_set_errno_and_return_minus_one( EINVAL ); 42032: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 42038: 2040 moveal %d0,%a0 <== NOT EXECUTED 4203a: 7016 moveq #22,%d0 <== NOT EXECUTED 4203c: 2080 movel %d0,%a0@ <== NOT EXECUTED 4203e: 70ff moveq #-1,%d0 <== NOT EXECUTED 42040: 6012 bras 42054 <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42042: 5280 addql #1,%d0 buf[i] = node->info.sym_link.name[i]; 42044: 10c1 moveb %d1,%a0@+ node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42046: b480 cmpl %d0,%d2 42048: 630a blss 42054 4204a: 2469 004c moveal %a1@(76),%a2 4204e: 1232 0800 moveb %a2@(00000000,%d0:l),%d1 42052: 66ee bnes 42042 buf[i] = node->info.sym_link.name[i]; return i; } 42054: 242e fff8 movel %fp@(-8),%d2 42058: 246e fffc moveal %fp@(-4),%a2 4205c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042060 : 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 */ ) { 42060: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42064: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 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 */ ) { 42068: 2f0a movel %a2,%sp@- <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 4206a: 2450 moveal %a0@,%a2 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 4206c: 4878 0020 pea 20 <== NOT EXECUTED 42070: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 42074: 486a 000c pea %a2@(12) <== NOT EXECUTED 42078: 4eb9 0004 d168 jsr 4d168 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 4207e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42082: 4aaa 0008 tstl %a2@(8) <== NOT EXECUTED 42086: 670a beqs 42092 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 42088: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4208a: 4eb9 0004 60f0 jsr 460f0 <_Chain_Extract> <== NOT EXECUTED 42090: 588f addql #4,%sp <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 42092: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 42096: 2050 moveal %a0@,%a0 <== NOT EXECUTED the_jnode->Parent = new_parent; 42098: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 4209c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4209e: 4868 004c pea %a0@(76) <== NOT EXECUTED 420a2: 4eb9 0004 60b8 jsr 460b8 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 420a8: 42a7 clrl %sp@- <== NOT EXECUTED 420aa: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 420ae: 4eb9 0004 28b8 jsr 428b8 <== NOT EXECUTED 420b4: 256e fff8 0044 movel %fp@(-8),%a2@(68) <== NOT EXECUTED return 0; } 420ba: 4280 clrl %d0 <== NOT EXECUTED 420bc: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 420c0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004956c : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4956c: 7205 moveq #5,%d1 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4956e: 4e56 0000 linkw %fp,#0 49572: 206e 000c moveal %fp@(12),%a0 49576: 2f0a movel %a2,%sp@- 49578: 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; 4957c: 2252 moveal %a2@,%a1 switch ( the_jnode->type ) { 4957e: 2029 0048 movel %a1@(72),%d0 49582: 5580 subql #2,%d0 49584: b280 cmpl %d0,%d1 49586: 653e bcss 495c6 <== NEVER TAKEN 49588: 303b 0a08 movew %pc@(49592 ,%d0:l:2),%d0 4958c: 48c0 extl %d0 4958e: 4efb 0802 jmp %pc@(49592 ,%d0:l) 49592: 000c 014 <== NOT EXECUTED 49594: 0034 064 <== NOT EXECUTED 49596: 0026 046 <== NOT EXECUTED 49598: 001c 034 <== NOT EXECUTED 4959a: 001c 034 <== NOT EXECUTED 4959c: 0026 046 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4959e: 2029 0050 movel %a1@(80),%d0 495a2: 2169 004c 0016 movel %a1@(76),%a0@(22) 495a8: 2140 001a movel %d0,%a0@(26) break; 495ac: 602a bras 495d8 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 495ae: 2029 004c movel %a1@(76),%d0 495b2: 2229 0050 movel %a1@(80),%d1 495b6: 6004 bras 495bc case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 495b8: 4280 clrl %d0 495ba: 4281 clrl %d1 495bc: 2140 001e movel %d0,%a0@(30) 495c0: 2141 0022 movel %d1,%a0@(34) break; 495c4: 6012 bras 495d8 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 495c6: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 495cc: 2040 moveal %d0,%a0 <== NOT EXECUTED 495ce: 70ff moveq #-1,%d0 <== NOT EXECUTED 495d0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 495d6: 6046 bras 4961e <== NOT EXECUTED /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 495d8: 246a 0010 moveal %a2@(16),%a2 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 495dc: 246a 0034 moveal %a2@(52),%a2 495e0: 2012 movel %a2@,%d0 buf->st_mode = the_jnode->st_mode; 495e2: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; 495e8: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; 495ee: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; 495f4: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 495fa: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; 49600: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 49606: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 4960c: 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 = 49612: 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; 49616: 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 = 49618: 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; } 4961e: 246e fffc moveal %fp@(-4),%a2 49622: 4e5e unlk %fp ... =============================================================================== 000420c4 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 420c4: 4e56 ffc4 linkw %fp,#-60 420c8: 2f03 movel %d3,%sp@- 420ca: 262e 0010 movel %fp@(16),%d3 420ce: 2f02 movel %d2,%sp@- int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 420d0: 240e movel %fp,%d2 420d2: 0682 ffff ffc7 addil #-57,%d2 420d8: 2f03 movel %d3,%sp@- 420da: 4eb9 0004 d150 jsr 4d150 420e0: 588f addql #4,%sp 420e2: 486e fffc pea %fp@(-4) 420e6: 2f02 movel %d2,%sp@- 420e8: 2f00 movel %d0,%sp@- 420ea: 2f03 movel %d3,%sp@- 420ec: 4eb9 0004 93e0 jsr 493e0 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 420f2: 2f2e 000c movel %fp@(12),%sp@- 420f6: 4eb9 0004 ccc0 jsr 4ccc0 if (info.sym_link.name == NULL) { 420fc: 4fef 0014 lea %sp@(20),%sp IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 42100: 2d40 ffe8 movel %d0,%fp@(-24) if (info.sym_link.name == NULL) { 42104: 660e bnes 42114 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 42106: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 4210c: 720c moveq #12,%d1 <== NOT EXECUTED 4210e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42110: 2081 movel %d1,%a0@ <== NOT EXECUTED 42112: 603a bras 4214e <== NOT EXECUTED * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 42114: 486e ffe8 pea %fp@(-24) 42118: 2f3c 0000 a1ff movel #41471,%sp@- 4211e: 2f02 movel %d2,%sp@- 42120: 4878 0004 pea 4 42124: 2f2e 0008 movel %fp@(8),%sp@- 42128: 4eb9 0004 8af8 jsr 48af8 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 4212e: 4fef 0014 lea %sp@(20),%sp 42132: 4a80 tstl %d0 42134: 661c bnes 42152 <== ALWAYS TAKEN free(info.sym_link.name); 42136: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 4213a: 4eb9 0004 2830 jsr 42830 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 42140: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 42146: 588f addql #4,%sp <== NOT EXECUTED 42148: 2040 moveal %d0,%a0 <== NOT EXECUTED 4214a: 700c moveq #12,%d0 <== NOT EXECUTED 4214c: 2080 movel %d0,%a0@ <== NOT EXECUTED 4214e: 70ff moveq #-1,%d0 <== NOT EXECUTED 42150: 6002 bras 42154 <== NOT EXECUTED } return 0; 42152: 4280 clrl %d0 } 42154: 242e ffbc movel %fp@(-68),%d2 42158: 262e ffc0 movel %fp@(-64),%d3 4215c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042160 : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42160: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 42162: 4e56 ffd0 linkw %fp,#-48 42166: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4216a: 246e 000c moveal %fp@(12),%a2 4216e: 262e 0008 movel %fp@(8),%d3 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 42172: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42174: b0ab 0048 cmpl %a3@(72),%d0 42178: 6600 0082 bnew 421fc if ( !node->info.hard_link.link_node ) 4217c: 282b 004c movel %a3@(76),%d4 42180: 660e bnes 42190 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42182: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 42188: 2040 moveal %d0,%a0 <== NOT EXECUTED 4218a: 7016 moveq #22,%d0 <== NOT EXECUTED 4218c: 2080 movel %d0,%a0@ <== NOT EXECUTED 4218e: 607e bras 4220e <== NOT EXECUTED the_link = *loc; 42190: 4878 0014 pea 14 42194: 240e movel %fp,%d2 42196: 0682 ffff ffe4 addil #-28,%d2 4219c: 2f0a movel %a2,%sp@- 4219e: 2f02 movel %d2,%sp@- 421a0: 4eb9 0004 c5a4 jsr 4c5a4 the_link.node_access = node->info.hard_link.link_node; 421a6: 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) 421aa: 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 ); 421ac: 2f02 movel %d2,%sp@- 421ae: 4eb9 0004 8c3c jsr 48c3c /* * 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) 421b4: 206b 004c moveal %a3@(76),%a0 421b8: 4281 clrl %d1 421ba: 4fef 0010 lea %sp@(16),%sp 421be: 3028 0032 movew %a0@(50),%d0 421c2: 3200 movew %d0,%d1 421c4: b881 cmpl %d1,%d4 421c6: 6616 bnes 421de { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 421c8: 2f02 movel %d2,%sp@- 421ca: 206e ffec moveal %fp@(-20),%a0 421ce: 2f03 movel %d3,%sp@- 421d0: 2068 0034 moveal %a0@(52),%a0 421d4: 4e90 jsr %a0@ if ( result != 0 ) 421d6: 508f addql #8,%sp 421d8: 4a80 tstl %d0 421da: 6720 beqs 421fc 421dc: 6030 bras 4220e return -1; } else { node->info.hard_link.link_node->st_nlink --; 421de: 5380 subql #1,%d0 421e0: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 421e4: 42a7 clrl %sp@- 421e6: 486e fff8 pea %fp@(-8) 421ea: 4eb9 0004 28b8 jsr 428b8 421f0: 206b 004c moveal %a3@(76),%a0 421f4: 508f addql #8,%sp 421f6: 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 ); 421fc: 206a 0008 moveal %a2@(8),%a0 42200: 2f0a movel %a2,%sp@- 42202: 2f03 movel %d3,%sp@- 42204: 2068 0034 moveal %a0@(52),%a0 42208: 4e90 jsr %a0@ return result; 4220a: 508f addql #8,%sp 4220c: 6002 bras 42210 if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; 4220e: 70ff moveq #-1,%d0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 42210: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 42216: 4e5e unlk %fp ... =============================================================================== 0004221c : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 4221c: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 4221e: 4e56 0000 linkw %fp,#0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42222: 206e 0008 moveal %fp@(8),%a0 42226: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 4222a: b0a8 0048 cmpl %a0@(72),%d0 4222e: 670e beqs 4223e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 42230: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 42236: 7214 moveq #20,%d1 <== NOT EXECUTED 42238: 2040 moveal %d0,%a0 <== NOT EXECUTED 4223a: 2081 movel %d1,%a0@ <== NOT EXECUTED 4223c: 6012 bras 42250 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 4223e: 4aa8 0058 tstl %a0@(88) 42242: 6610 bnes 42254 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 42244: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 4224a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4224c: 7016 moveq #22,%d0 <== NOT EXECUTED 4224e: 2080 movel %d0,%a0@ <== NOT EXECUTED 42250: 70ff moveq #-1,%d0 <== NOT EXECUTED 42252: 6006 bras 4225a <== 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; 42254: 42a8 0058 clrl %a0@(88) return 0; 42258: 4280 clrl %d0 } 4225a: 4e5e unlk %fp ... =============================================================================== 00041d28 : /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 41d28: 70ff moveq #-1,%d0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 41d2a: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED 41d2e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 41d32: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 41d36: b08a cmpl %a2,%d0 <== NOT EXECUTED 41d38: 660c bnes 41d46 <== NOT EXECUTED if (!Stack_check_Interrupt_stack.area) 41d3a: 4ab9 0005 c900 tstl 5c900 <== NOT EXECUTED 41d40: 6700 00a0 beqw 41de2 <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; the_thread = 0; 41d44: 95ca subal %a2,%a2 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } #endif low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 41d46: 2439 0005 c8fc movel 5c8fc ,%d2<== NOT EXECUTED 41d4c: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED 41d52: 2679 0005 c0ec moveal 5c0ec ,%a3 <== NOT EXECUTED if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 41d58: 4a8a tstl %a2 <== NOT EXECUTED 41d5a: 672c beqs 41d88 <== NOT EXECUTED (*print_handler)( 41d5c: 486e fffb pea %fp@(-5) <== NOT EXECUTED 41d60: 4878 0005 pea 5 <== NOT EXECUTED 41d64: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 41d68: 4eb9 0004 5804 jsr 45804 <== NOT EXECUTED 41d6e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41d70: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 41d74: 4879 0005 9e8c pea 59e8c <== NOT EXECUTED 41d7a: 2f39 0005 c0e8 movel 5c0e8 ,%sp@- <== NOT EXECUTED 41d80: 4e93 jsr %a3@ <== NOT EXECUTED 41d82: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 41d86: 6016 bras 41d9e <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 41d88: 4878 ffff pea ffffffff <== NOT EXECUTED 41d8c: 4879 0005 9e99 pea 59e99 <== NOT EXECUTED 41d92: 2f39 0005 c0e8 movel 5c0e8 ,%sp@- <== NOT EXECUTED 41d98: 4e93 jsr %a3@ <== NOT EXECUTED 41d9a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } (*print_handler)( 41d9e: 2f02 movel %d2,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 41da0: 2039 0005 c8fc movel 5c8fc ,%d0<== NOT EXECUTED 41da6: 5380 subql #1,%d0 <== NOT EXECUTED 41da8: 2079 0005 c900 moveal 5c900 ,%a0<== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 41dae: 42a7 clrl %sp@- <== NOT EXECUTED 41db0: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 41db4: 2f08 movel %a0,%sp@- <== NOT EXECUTED 41db6: 4879 0005 9ea7 pea 59ea7 <== NOT EXECUTED 41dbc: 2f39 0005 c0e8 movel 5c0e8 ,%sp@- <== NOT EXECUTED 41dc2: 2079 0005 c0ec moveal 5c0ec ,%a0 <== NOT EXECUTED 41dc8: 4e90 jsr %a0@ <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 41dca: 4879 0005 9ec5 pea 59ec5 <== NOT EXECUTED 41dd0: 2f39 0005 c0e8 movel 5c0e8 ,%sp@- <== NOT EXECUTED 41dd6: 2079 0005 c0ec moveal 5c0ec ,%a0 <== NOT EXECUTED 41ddc: 4e90 jsr %a0@ <== NOT EXECUTED 41dde: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 41de2: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 <== NOT EXECUTED 41de8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041dec : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 41dec: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED Stack_check_Dope_stack(&Stack_check_Interrupt_stack); } #endif Stack_check_Initialized = 1; } 41df0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041e4a : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 41e4a: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 41e4e: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED 41e52: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); 41e56: 45f9 0004 3790 lea 43790 ,%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_area(stack); 41e5c: 286b 00c0 moveal %a3@(192),%a4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 41e60: 4879 0005 9ed2 pea 59ed2 <== 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) { 41e66: 142e 000f moveb %fp@(15),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); 41e6a: 4e92 jsr %a2@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 41e6c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 41e6e: 4879 0005 9ee2 pea 59ee2 <== NOT EXECUTED 41e74: 4e92 jsr %a2@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 41e76: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 41e7a: 4879 0005 9eff pea 59eff <== NOT EXECUTED 41e80: 4e92 jsr %a2@ <== NOT EXECUTED printk( 41e82: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 41e86: 4879 0005 9f11 pea 59f11 <== NOT EXECUTED 41e8c: 4e92 jsr %a2@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 41e8e: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 41e92: 4878 0020 pea 20 <== NOT EXECUTED 41e96: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 41e9a: 4eb9 0004 5804 jsr 45804 <== NOT EXECUTED 41ea0: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 41ea4: 2e80 movel %d0,%sp@ <== NOT EXECUTED 41ea6: 4879 0005 9f25 pea 59f25 <== NOT EXECUTED 41eac: 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) 41eae: 206b 00c0 moveal %a3@(192),%a0 <== NOT EXECUTED 41eb2: 202b 00bc movel %a3@(188),%d0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 41eb6: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 41eba: 2f08 movel %a0,%sp@- <== NOT EXECUTED 41ebc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41ebe: 4879 0005 9f3b pea 59f3b <== NOT EXECUTED 41ec4: 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) { 41ec6: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 41eca: 4a02 tstb %d2 <== NOT EXECUTED 41ecc: 6618 bnes 41ee6 <== NOT EXECUTED printk( 41ece: 486c 0018 pea %a4@(24) <== NOT EXECUTED 41ed2: 486c 0008 pea %a4@(8) <== NOT EXECUTED 41ed6: 4878 0010 pea 10 <== NOT EXECUTED 41eda: 4879 0005 9f6c pea 59f6c <== NOT EXECUTED 41ee0: 4e92 jsr %a2@ <== NOT EXECUTED 41ee2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 41ee6: 4878 0081 pea 81 <== NOT EXECUTED 41eea: 4eb9 0004 6084 jsr 46084 <== NOT EXECUTED =============================================================================== 00046084 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 46084: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46088: 2039 0005 c5bc movel 5c5bc <_Thread_Dispatch_disable_level>,%d0 4608e: 5280 addql #1,%d0 46090: 206e 0008 moveal %fp@(8),%a0 46094: 23c0 0005 c5bc movel %d0,5c5bc <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 4609a: 42a7 clrl %sp@- 4609c: 2f28 0008 movel %a0@(8),%sp@- 460a0: 4868 0010 pea %a0@(16) 460a4: 4eb9 0004 6308 jsr 46308 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 460aa: 4fef 000c lea %sp@(12),%sp } 460ae: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 460b0: 4ef9 0004 7612 jmp 47612 <_Thread_Enable_dispatch> ... =============================================================================== 0004c594 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4c594: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4c59a: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4c59e: 2279 0005 dcf8 moveal 5dcf8 <_Per_CPU_Information+0xc>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4c5a4: 48d7 001c moveml %d2-%d4,%sp@ 4c5a8: 206e 0008 moveal %fp@(8),%a0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4c5ac: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4c5b0: 242e 000c movel %fp@(12),%d2 4c5b4: 262e 0014 movel %fp@(20),%d3 4c5b8: 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 ); 4c5bc: 40c1 movew %sr,%d1 4c5be: 8081 orl %d1,%d0 4c5c0: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4c5c2: 2028 0048 movel %a0@(72),%d0 4c5c6: 5280 addql #1,%d0 4c5c8: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4c5cc: 4aa8 0040 tstl %a0@(64) 4c5d0: 6626 bnes 4c5f8 <_CORE_barrier_Wait+0x64> if ( the_barrier->number_of_waiting_threads == 4c5d2: b0a8 0044 cmpl %a0@(68),%d0 4c5d6: 6620 bnes 4c5f8 <_CORE_barrier_Wait+0x64> the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4c5d8: 7001 moveq #1,%d0 4c5da: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4c5de: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4c5e0: 2d44 0010 movel %d4,%fp@(16) 4c5e4: 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 ); } 4c5e8: 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 ); 4c5ec: 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 ); } 4c5f0: 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 ); 4c5f2: 4ef9 0004 c560 jmp 4c560 <_CORE_barrier_Release> 4c5f8: 7001 moveq #1,%d0 4c5fa: 2140 0030 movel %d0,%a0@(48) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4c5fe: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 4c602: 2342 0020 movel %d2,%a1@(32) _ISR_Enable( level ); 4c606: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4c608: 2d43 000c movel %d3,%fp@(12) 4c60c: 203c 0004 90a0 movel #299168,%d0 4c612: 2d48 0008 movel %a0,%fp@(8) } 4c616: 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 ); 4c61a: 2d40 0010 movel %d0,%fp@(16) } 4c61e: 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 ); 4c620: 4ef9 0004 8d90 jmp 48d90 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 00052cdc <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 52cdc: 4e56 ffe0 linkw %fp,#-32 52ce0: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 52ce4: 246e 0008 moveal %fp@(8),%a2 52ce8: 2a2e 000c movel %fp@(12),%d5 52cec: 262e 0010 movel %fp@(16),%d3 52cf0: 286e 001c moveal %fp@(28),%a4 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 52cf4: b6aa 004c cmpl %a2@(76),%d3 52cf8: 6244 bhis 52d3e <_CORE_message_queue_Broadcast+0x62><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 52cfa: 4aaa 0048 tstl %a2@(72) 52cfe: 6610 bnes 52d10 <_CORE_message_queue_Broadcast+0x34> 52d00: 4282 clrl %d2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 52d02: 283c 0005 5044 movel #348228,%d4 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 52d08: 4bf9 0005 9b4c lea 59b4c ,%a5 52d0e: 601a bras 52d2a <_CORE_message_queue_Broadcast+0x4e> * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 52d10: 4294 clrl %a4@ 52d12: 6026 bras 52d3a <_CORE_message_queue_Broadcast+0x5e> 52d14: 2f03 movel %d3,%sp@- */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 52d16: 5282 addql #1,%d2 52d18: 2f05 movel %d5,%sp@- 52d1a: 2f2b 002c movel %a3@(44),%sp@- 52d1e: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 52d20: 206b 0028 moveal %a3@(40),%a0 52d24: 4fef 000c lea %sp@(12),%sp 52d28: 2083 movel %d3,%a0@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 52d2a: 2f0a movel %a2,%sp@- 52d2c: 2044 moveal %d4,%a0 52d2e: 4e90 jsr %a0@ 52d30: 588f addql #4,%sp 52d32: 2640 moveal %d0,%a3 52d34: 4a80 tstl %d0 52d36: 66dc bnes 52d14 <_CORE_message_queue_Broadcast+0x38> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 52d38: 2882 movel %d2,%a4@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 52d3a: 4280 clrl %d0 52d3c: 6002 bras 52d40 <_CORE_message_queue_Broadcast+0x64> Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 52d3e: 7001 moveq #1,%d0 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 52d40: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 52d46: 4e5e unlk %fp ... =============================================================================== 0004df50 <_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)) { 4df50: 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 ) { 4df52: 4e56 fff4 linkw %fp,#-12 4df56: 222e 0014 movel %fp@(20),%d1 4df5a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4df5e: 246e 0008 moveal %fp@(8),%a2 4df62: 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)) { 4df66: c081 andl %d1,%d0 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4df68: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4df6c: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4df70: 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)) { 4df74: 4a80 tstl %d0 4df76: 670e beqs 4df86 <_CORE_message_queue_Initialize+0x36> allocated_message_size += sizeof(uint32_t); 4df78: 2001 movel %d1,%d0 4df7a: 5880 addql #4,%d0 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4df7c: 76fc moveq #-4,%d3 4df7e: c083 andl %d3,%d0 } if (allocated_message_size < maximum_message_size) 4df80: b280 cmpl %d0,%d1 4df82: 6272 bhis 4dff6 <_CORE_message_queue_Initialize+0xa6><== NEVER TAKEN 4df84: 6002 bras 4df88 <_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)) { 4df86: 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)); 4df88: 2600 movel %d0,%d3 4df8a: 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 * 4df90: 2203 movel %d3,%d1 4df92: 4c02 1800 mulsl %d2,%d1 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4df96: b081 cmpl %d1,%d0 4df98: 625c bhis 4dff6 <_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 ); 4df9a: 2f01 movel %d1,%sp@- 4df9c: 4eb9 0005 086c jsr 5086c <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) 4dfa2: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4dfa4: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4dfa8: 674c beqs 4dff6 <_CORE_message_queue_Initialize+0xa6> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4dfaa: 2f03 movel %d3,%sp@- 4dfac: 2f02 movel %d2,%sp@- 4dfae: 2f00 movel %d0,%sp@- 4dfb0: 486a 0060 pea %a2@(96) 4dfb4: 4eb9 0005 21cc jsr 521cc <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4dfba: 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( 4dfbe: 7001 moveq #1,%d0 4dfc0: 2548 0050 movel %a0,%a2@(80) the_message_queue->message_buffers, (size_t) maximum_pending_messages, allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); 4dfc4: 41ea 0050 lea %a2@(80),%a0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4dfc8: 42aa 0054 clrl %a2@(84) 4dfcc: 2548 0058 movel %a0,%a2@(88) _Thread_queue_Initialize( 4dfd0: 4878 0006 pea 6 4dfd4: 206e 000c moveal %fp@(12),%a0 4dfd8: 4878 0080 pea 80 4dfdc: b090 cmpl %a0@,%d0 4dfde: 57c0 seq %d0 4dfe0: 49c0 extbl %d0 4dfe2: 4480 negl %d0 4dfe4: 2f00 movel %d0,%sp@- 4dfe6: 2f0a movel %a2,%sp@- 4dfe8: 4eb9 0004 fd74 jsr 4fd74 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4dfee: 4fef 0020 lea %sp@(32),%sp 4dff2: 7001 moveq #1,%d0 4dff4: 6002 bras 4dff8 <_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; 4dff6: 4200 clrb %d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 4dff8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4dffe: 4e5e unlk %fp ... =============================================================================== 0004e004 <_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 ); 4e004: 223c 0000 0700 movel #1792,%d1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4e00a: 4e56 ffe0 linkw %fp,#-32 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4e00e: 2079 0006 52a8 moveal 652a8 <_Per_CPU_Information+0xc>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4e014: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4e018: 246e 0008 moveal %fp@(8),%a2 4e01c: 282e 000c movel %fp@(12),%d4 4e020: 242e 0010 movel %fp@(16),%d2 4e024: 226e 0014 moveal %fp@(20),%a1 4e028: 262e 001c movel %fp@(28),%d3 4e02c: 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; 4e030: 42a8 0034 clrl %a0@(52) _ISR_Disable( level ); 4e034: 40c0 movew %sr,%d0 4e036: 8280 orl %d0,%d1 4e038: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4e03a: 220a movel %a2,%d1 4e03c: 0681 0000 0054 addil #84,%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4e042: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 4e046: b28b cmpl %a3,%d1 4e048: 6752 beqs 4e09c <_CORE_message_queue_Seize+0x98> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4e04a: 2853 moveal %a3@,%a4 CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get_unprotected( &the_message_queue->Pending_messages ); 4e04c: 4bea 0050 lea %a2@(80),%a5 the_chain->first = new_first; 4e050: 254c 0050 movel %a4,%a2@(80) 4e054: 294d 0004 movel %a5,%a4@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 4e058: 4a8b tstl %a3 4e05a: 6740 beqs 4e09c <_CORE_message_queue_Seize+0x98> <== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 4e05c: 53aa 0048 subql #1,%a2@(72) _ISR_Enable( level ); 4e060: 46c0 movew %d0,%sr *size_p = the_message->Contents.size; 4e062: 22ab 0008 movel %a3@(8),%a1@ _Thread_Executing->Wait.count = 4e066: 2079 0006 52a8 moveal 652a8 <_Per_CPU_Information+0xc>,%a0 4e06c: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4e070: 2f11 movel %a1@,%sp@- 4e072: 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 ); 4e076: 45ea 0060 lea %a2@(96),%a2 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4e07a: 2f02 movel %d2,%sp@- 4e07c: 4eb9 0005 46b8 jsr 546b8 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 ); 4e082: 4fef 000c lea %sp@(12),%sp 4e086: 2d4b 000c movel %a3,%fp@(12) 4e08a: 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 ); } 4e08e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4e094: 4e5e unlk %fp 4e096: 4ef9 0004 de8c jmp 4de8c <_Chain_Append> return; } #endif } if ( !wait ) { 4e09c: 4a05 tstb %d5 4e09e: 6612 bnes 4e0b2 <_CORE_message_queue_Seize+0xae> _ISR_Enable( level ); 4e0a0: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4e0a2: 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 ); } 4e0a4: 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; 4e0aa: 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 ); } 4e0ae: 4e5e unlk %fp 4e0b0: 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; 4e0b2: 7201 moveq #1,%d1 4e0b4: 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; 4e0b8: 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; 4e0bc: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; 4e0c0: 2144 0020 movel %d4,%a0@(32) executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 4e0c4: 2149 0028 movel %a1,%a0@(40) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 4e0c8: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4e0ca: 4bf9 0004 fe44 lea 4fe44 <_Thread_queue_Timeout>,%a5 4e0d0: 2d43 000c movel %d3,%fp@(12) 4e0d4: 2d4d 0010 movel %a5,%fp@(16) 4e0d8: 2d4a 0008 movel %a2,%fp@(8) } 4e0dc: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4e0e2: 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 ); 4e0e4: 4ef9 0004 fb34 jmp 4fb34 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 00046264 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 46264: 4e56 0000 linkw %fp,#0 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 46268: 2039 0005 c5bc movel 5c5bc <_Thread_Dispatch_disable_level>,%d0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 4626e: 2f0a movel %a2,%sp@- 46270: 246e 0008 moveal %fp@(8),%a2 46274: 2f02 movel %d2,%sp@- 46276: 142e 0013 moveb %fp@(19),%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 4627a: 4a80 tstl %d0 4627c: 671c beqs 4629a <_CORE_mutex_Seize+0x36> 4627e: 4a02 tstb %d2 46280: 6718 beqs 4629a <_CORE_mutex_Seize+0x36> <== NEVER TAKEN 46282: 7001 moveq #1,%d0 46284: b0b9 0005 c728 cmpl 5c728 <_System_state_Current>,%d0 4628a: 640e bccs 4629a <_CORE_mutex_Seize+0x36> 4628c: 4878 0012 pea 12 46290: 42a7 clrl %sp@- 46292: 42a7 clrl %sp@- 46294: 4eb9 0004 68cc jsr 468cc <_Internal_error_Occurred> 4629a: 486e 0018 pea %fp@(24) 4629e: 2f0a movel %a2,%sp@- 462a0: 4eb9 0004 a130 jsr 4a130 <_CORE_mutex_Seize_interrupt_trylock> 462a6: 508f addql #8,%sp 462a8: 4a80 tstl %d0 462aa: 6750 beqs 462fc <_CORE_mutex_Seize+0x98> 462ac: 4a02 tstb %d2 462ae: 6614 bnes 462c4 <_CORE_mutex_Seize+0x60> 462b0: 202e 0018 movel %fp@(24),%d0 462b4: 46c0 movew %d0,%sr 462b6: 2079 0005 c780 moveal 5c780 <_Per_CPU_Information+0xc>,%a0 462bc: 7001 moveq #1,%d0 462be: 2140 0034 movel %d0,%a0@(52) 462c2: 6038 bras 462fc <_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; 462c4: 7001 moveq #1,%d0 462c6: 2079 0005 c780 moveal 5c780 <_Per_CPU_Information+0xc>,%a0 462cc: 2540 0030 movel %d0,%a2@(48) 462d0: 2039 0005 c5bc movel 5c5bc <_Thread_Dispatch_disable_level>,%d0 462d6: 5280 addql #1,%d0 462d8: 216e 000c 0020 movel %fp@(12),%a0@(32) 462de: 214a 0044 movel %a2,%a0@(68) 462e2: 23c0 0005 c5bc movel %d0,5c5bc <_Thread_Dispatch_disable_level> 462e8: 202e 0018 movel %fp@(24),%d0 462ec: 46c0 movew %d0,%sr 462ee: 2f2e 0014 movel %fp@(20),%sp@- 462f2: 2f0a movel %a2,%sp@- 462f4: 4eb9 0004 6200 jsr 46200 <_CORE_mutex_Seize_interrupt_blocking> 462fa: 508f addql #8,%sp } 462fc: 242e fff8 movel %fp@(-8),%d2 46300: 246e fffc moveal %fp@(-4),%a2 46304: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a130 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 4a130: 4e56 fff4 linkw %fp,#-12 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4a134: 2279 0005 c780 moveal 5c780 <_Per_CPU_Information+0xc>,%a1 4a13a: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4a13e: 206e 0008 moveal %fp@(8),%a0 4a142: 246e 000c moveal %fp@(12),%a2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4a146: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4a14a: 4aa8 004e tstl %a0@(78) 4a14e: 6700 009e beqw 4a1ee <_CORE_mutex_Seize_interrupt_trylock+0xbe> the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4a152: 7001 moveq #1,%d0 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4a154: 7202 moveq #2,%d1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4a156: 2169 0008 005e movel %a1@(8),%a0@(94) the_mutex->nest_count = 1; 4a15c: 2140 0052 movel %d0,%a0@(82) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4a160: 2028 0046 movel %a0@(70),%d0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; 4a164: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; 4a168: 2149 005a movel %a1,%a0@(90) the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4a16c: b280 cmpl %d0,%d1 4a16e: 6706 beqs 4a176 <_CORE_mutex_Seize_interrupt_trylock+0x46> 4a170: 7403 moveq #3,%d2 4a172: b480 cmpl %d0,%d2 4a174: 6612 bnes 4a188 <_CORE_mutex_Seize_interrupt_trylock+0x58> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4a176: 2229 001c movel %a1@(28),%d1 4a17a: 2401 movel %d1,%d2 4a17c: 5282 addql #1,%d2 4a17e: 2342 001c movel %d2,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4a182: 7403 moveq #3,%d2 4a184: b480 cmpl %d0,%d2 4a186: 6708 beqs 4a190 <_CORE_mutex_Seize_interrupt_trylock+0x60> _ISR_Enable( *level_p ); 4a188: 2012 movel %a2@,%d0 4a18a: 46c0 movew %d0,%sr 4a18c: 6000 008a braw 4a218 <_CORE_mutex_Seize_interrupt_trylock+0xe8> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4a190: 2028 004a movel %a0@(74),%d0 current = executing->current_priority; 4a194: 2669 0014 moveal %a1@(20),%a3 if ( current == ceiling ) { 4a198: b08b cmpl %a3,%d0 4a19a: 6606 bnes 4a1a2 <_CORE_mutex_Seize_interrupt_trylock+0x72> _ISR_Enable( *level_p ); 4a19c: 2012 movel %a2@,%d0 4a19e: 46c0 movew %d0,%sr 4a1a0: 6076 bras 4a218 <_CORE_mutex_Seize_interrupt_trylock+0xe8> return 0; } if ( current > ceiling ) { 4a1a2: b08b cmpl %a3,%d0 4a1a4: 642e bccs 4a1d4 <_CORE_mutex_Seize_interrupt_trylock+0xa4> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4a1a6: 2039 0005 c5bc movel 5c5bc <_Thread_Dispatch_disable_level>,%d0 4a1ac: 5280 addql #1,%d0 4a1ae: 23c0 0005 c5bc movel %d0,5c5bc <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4a1b4: 2012 movel %a2@,%d0 4a1b6: 46c0 movew %d0,%sr _Thread_Change_priority( 4a1b8: 42a7 clrl %sp@- 4a1ba: 2f28 004a movel %a0@(74),%sp@- 4a1be: 2f28 005a movel %a0@(90),%sp@- 4a1c2: 4eb9 0004 712c jsr 4712c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4a1c8: 4eb9 0004 7612 jsr 47612 <_Thread_Enable_dispatch> 4a1ce: 4fef 000c lea %sp@(12),%sp 4a1d2: 6044 bras 4a218 <_CORE_mutex_Seize_interrupt_trylock+0xe8> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4a1d4: 7006 moveq #6,%d0 the_mutex->lock = CORE_MUTEX_UNLOCKED; 4a1d6: 7401 moveq #1,%d2 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4a1d8: 2340 0034 movel %d0,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; 4a1dc: 2142 004e movel %d2,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ 4a1e0: 42a8 0052 clrl %a0@(82) executing->resource_count--; /* undo locking above */ 4a1e4: 2341 001c movel %d1,%a1@(28) _ISR_Enable( *level_p ); 4a1e8: 2012 movel %a2@,%d0 4a1ea: 46c0 movew %d0,%sr 4a1ec: 602a bras 4a218 <_CORE_mutex_Seize_interrupt_trylock+0xe8> /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4a1ee: 2668 005a moveal %a0@(90),%a3 4a1f2: b3cb cmpal %a3,%a1 4a1f4: 6626 bnes 4a21c <_CORE_mutex_Seize_interrupt_trylock+0xec> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4a1f6: 2028 0040 movel %a0@(64),%d0 4a1fa: 6708 beqs 4a204 <_CORE_mutex_Seize_interrupt_trylock+0xd4> 4a1fc: 7201 moveq #1,%d1 4a1fe: b280 cmpl %d0,%d1 4a200: 661a bnes 4a21c <_CORE_mutex_Seize_interrupt_trylock+0xec><== ALWAYS TAKEN 4a202: 600a bras 4a20e <_CORE_mutex_Seize_interrupt_trylock+0xde><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4a204: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 4a208: 2012 movel %a2@,%d0 4a20a: 46c0 movew %d0,%sr 4a20c: 600a bras 4a218 <_CORE_mutex_Seize_interrupt_trylock+0xe8> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4a20e: 7402 moveq #2,%d2 <== NOT EXECUTED 4a210: 2742 0034 movel %d2,%a3@(52) <== NOT EXECUTED _ISR_Enable( *level_p ); 4a214: 2012 movel %a2@,%d0 <== NOT EXECUTED 4a216: 46c0 movew %d0,%sr <== NOT EXECUTED return 0; 4a218: 4280 clrl %d0 4a21a: 6002 bras 4a21e <_CORE_mutex_Seize_interrupt_trylock+0xee> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 4a21c: 7001 moveq #1,%d0 4a21e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4a224: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046440 <_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 ) { 46440: 4e56 0000 linkw %fp,#0 46444: 2f0a movel %a2,%sp@- 46446: 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)) ) { 4644a: 2f0a movel %a2,%sp@- 4644c: 4eb9 0004 7930 jsr 47930 <_Thread_queue_Dequeue> 46452: 588f addql #4,%sp 46454: 4a80 tstl %d0 46456: 6624 bnes 4647c <_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 ); 46458: 303c 0700 movew #1792,%d0 4645c: 40c1 movew %sr,%d1 4645e: 8081 orl %d1,%d0 46460: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46462: 202a 0048 movel %a2@(72),%d0 46466: b0aa 0040 cmpl %a2@(64),%d0 4646a: 640a bccs 46476 <_CORE_semaphore_Surrender+0x36> <== NEVER TAKEN the_semaphore->count += 1; 4646c: 5280 addql #1,%d0 4646e: 2540 0048 movel %d0,%a2@(72) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 46472: 4280 clrl %d0 46474: 6002 bras 46478 <_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; 46476: 7004 moveq #4,%d0 <== NOT EXECUTED _ISR_Enable( level ); 46478: 46c1 movew %d1,%sr 4647a: 6002 bras 4647e <_CORE_semaphore_Surrender+0x3e> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 4647c: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 4647e: 246e fffc moveal %fp@(-4),%a2 46482: 4e5e unlk %fp ... =============================================================================== 0004521c <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 4521c: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 45222: 4e56 ffec linkw %fp,#-20 45226: 226e 0010 moveal %fp@(16),%a1 4522a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 4522e: 2479 0005 c780 moveal 5c780 <_Per_CPU_Information+0xc>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 45234: 242e 0008 movel %fp@(8),%d2 45238: 262e 000c movel %fp@(12),%d3 4523c: 206e 0014 moveal %fp@(20),%a0 ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; 45240: 42aa 0034 clrl %a2@(52) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 45244: 266a 0108 moveal %a2@(264),%a3 _ISR_Disable( level ); 45248: 40c1 movew %sr,%d1 4524a: 8081 orl %d1,%d0 4524c: 46c0 movew %d0,%sr pending_events = api->pending_events; 4524e: 2813 movel %a3@,%d4 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 ); 45250: 2002 movel %d2,%d0 45252: c084 andl %d4,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 45254: 6716 beqs 4526c <_Event_Seize+0x50> 45256: b480 cmpl %d0,%d2 45258: 6706 beqs 45260 <_Event_Seize+0x44> (seized_events == event_in || _Options_Is_any( option_set )) ) { 4525a: 0803 0001 btst #1,%d3 4525e: 670c beqs 4526c <_Event_Seize+0x50> <== 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) ); 45260: 2400 movel %d0,%d2 45262: 4682 notl %d2 45264: c484 andl %d4,%d2 45266: 2682 movel %d2,%a3@ api->pending_events = _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 45268: 46c1 movew %d1,%sr 4526a: 600e bras 4527a <_Event_Seize+0x5e> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 4526c: 0803 0000 btst #0,%d3 45270: 670e beqs 45280 <_Event_Seize+0x64> _ISR_Enable( level ); 45272: 46c1 movew %d1,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 45274: 720d moveq #13,%d1 45276: 2541 0034 movel %d1,%a2@(52) *event_out = seized_events; 4527a: 2080 movel %d0,%a0@ return; 4527c: 6000 0096 braw 45314 <_Event_Seize+0xf8> * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; 45280: 2542 0024 movel %d2,%a2@(36) executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 45284: 7401 moveq #1,%d2 * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 45286: 2543 0030 movel %d3,%a2@(48) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; 4528a: 2548 0028 movel %a0,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4528e: 23c2 0005 c78e movel %d2,5c78e <_Event_Sync_state> _ISR_Enable( level ); 45294: 46c1 movew %d1,%sr if ( ticks ) { 45296: 4a89 tstl %a1 45298: 6730 beqs 452ca <_Event_Seize+0xae> _Watchdog_Initialize( 4529a: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4529e: 223c 0004 5478 movel #283768,%d1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 452a4: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 452a8: 2541 0064 movel %d1,%a2@(100) the_watchdog->id = id; 452ac: 2540 0068 movel %d0,%a2@(104) the_watchdog->user_data = user_data; 452b0: 42aa 006c clrl %a2@(108) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 452b4: 2549 0054 movel %a1,%a2@(84) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 452b8: 486a 0048 pea %a2@(72) 452bc: 4879 0005 c67e pea 5c67e <_Watchdog_Ticks_chain> 452c2: 4eb9 0004 8530 jsr 48530 <_Watchdog_Insert> 452c8: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 452ca: 4878 0100 pea 100 452ce: 2f0a movel %a2,%sp@- 452d0: 4eb9 0004 7e24 jsr 47e24 <_Thread_Set_state> _ISR_Disable( level ); 452d6: 203c 0000 0700 movel #1792,%d0 452dc: 40c1 movew %sr,%d1 452de: 8081 orl %d1,%d0 452e0: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 452e2: 7401 moveq #1,%d2 452e4: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 452e6: 2039 0005 c78e movel 5c78e <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 452ec: 42b9 0005 c78e clrl 5c78e <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 452f2: b480 cmpl %d0,%d2 452f4: 6604 bnes 452fa <_Event_Seize+0xde> _ISR_Enable( level ); 452f6: 46c1 movew %d1,%sr 452f8: 601a bras 45314 <_Event_Seize+0xf8> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 452fa: 2d4a 000c movel %a2,%fp@(12) 452fe: 2d41 0010 movel %d1,%fp@(16) } 45302: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45308: 2d40 0008 movel %d0,%fp@(8) } 4530c: 4e5e unlk %fp * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 4530e: 4ef9 0004 70dc jmp 470dc <_Thread_blocking_operation_Cancel> } 45314: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4531a: 4e5e unlk %fp ... =============================================================================== 00045374 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 45374: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 4537a: 4e56 ffe8 linkw %fp,#-24 4537e: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 45382: 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 ]; 45386: 206a 0108 moveal %a2@(264),%a0 option_set = (rtems_option) the_thread->Wait.option; 4538a: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 4538e: 40c1 movew %sr,%d1 45390: 8081 orl %d1,%d0 45392: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 45394: 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 ); 45398: 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; 4539a: 2410 movel %a0@,%d2 4539c: 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 ) ) { 4539e: 6606 bnes 453a6 <_Event_Surrender+0x32> _ISR_Enable( level ); 453a0: 46c1 movew %d1,%sr return; 453a2: 6000 00ca braw 4546e <_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() && 453a6: 4ab9 0005 c77c tstl 5c77c <_Per_CPU_Information+0x8> 453ac: 674a beqs 453f8 <_Event_Surrender+0x84> 453ae: b5f9 0005 c780 cmpal 5c780 <_Per_CPU_Information+0xc>,%a2 453b4: 6642 bnes 453f8 <_Event_Surrender+0x84> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 453b6: 2279 0005 c78e moveal 5c78e <_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 ) && 453bc: 7a02 moveq #2,%d5 453be: ba89 cmpl %a1,%d5 453c0: 670e beqs 453d0 <_Event_Surrender+0x5c> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 453c2: 2279 0005 c78e moveal 5c78e <_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) || 453c8: 1a3c 0001 moveb #1,%d5 453cc: ba89 cmpl %a1,%d5 453ce: 6628 bnes 453f8 <_Event_Surrender+0x84> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 453d0: b680 cmpl %d0,%d3 453d2: 6706 beqs 453da <_Event_Surrender+0x66> 453d4: 0804 0001 btst #1,%d4 453d8: 671a beqs 453f4 <_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) ); 453da: 2600 movel %d0,%d3 453dc: 4683 notl %d3 453de: c682 andl %d2,%d3 453e0: 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; 453e2: 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; 453e6: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 453ea: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 453ec: 7003 moveq #3,%d0 453ee: 23c0 0005 c78e movel %d0,5c78e <_Event_Sync_state> } _ISR_Enable( level ); 453f4: 46c1 movew %d1,%sr return; 453f6: 6076 bras 4546e <_Event_Surrender+0xfa> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); 453f8: 2a2a 0010 movel %a2@(16),%d5 453fc: 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 ) ) { 45402: 6768 beqs 4546c <_Event_Surrender+0xf8> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 45404: b680 cmpl %d0,%d3 45406: 6706 beqs 4540e <_Event_Surrender+0x9a> 45408: 0804 0001 btst #1,%d4 4540c: 675e beqs 4546c <_Event_Surrender+0xf8> <== NEVER TAKEN 4540e: 2600 movel %d0,%d3 45410: 4683 notl %d3 45412: c682 andl %d2,%d3 45414: 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; 45416: 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; 4541a: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4541e: 2080 movel %d0,%a0@ _ISR_Flash( level ); 45420: 203c 0000 0700 movel #1792,%d0 45426: 46c1 movew %d1,%sr 45428: 8081 orl %d1,%d0 4542a: 46c0 movew %d0,%sr 4542c: 47f9 0004 726c lea 4726c <_Thread_Clear_state>,%a3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 45432: 7a02 moveq #2,%d5 45434: baaa 0050 cmpl %a2@(80),%d5 45438: 6710 beqs 4544a <_Event_Surrender+0xd6> _ISR_Enable( level ); 4543a: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4543c: 2f3c 1003 fff8 movel #268697592,%sp@- 45442: 2f0a movel %a2,%sp@- 45444: 4e93 jsr %a3@ 45446: 508f addql #8,%sp 45448: 6024 bras 4546e <_Event_Surrender+0xfa> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4544a: 7003 moveq #3,%d0 4544c: 2540 0050 movel %d0,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 45450: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 45452: 486a 0048 pea %a2@(72) 45456: 4eb9 0004 864c jsr 4864c <_Watchdog_Remove> 4545c: 2f3c 1003 fff8 movel #268697592,%sp@- 45462: 2f0a movel %a2,%sp@- 45464: 4e93 jsr %a3@ 45466: 4fef 000c lea %sp@(12),%sp 4546a: 6002 bras 4546e <_Event_Surrender+0xfa> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 4546c: 46c1 movew %d1,%sr } 4546e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 45474: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045478 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 45478: 4e56 fffc linkw %fp,#-4 4547c: 2f03 movel %d3,%sp@- 4547e: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 45480: 486e fffc pea %fp@(-4) 45484: 2f2e 0008 movel %fp@(8),%sp@- 45488: 4eb9 0004 7638 jsr 47638 <_Thread_Get> switch ( location ) { 4548e: 508f addql #8,%sp 45490: 4aae fffc tstl %fp@(-4) 45494: 6656 bnes 454ec <_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 ); 45496: 223c 0000 0700 movel #1792,%d1 4549c: 40c2 movew %sr,%d2 4549e: 8282 orl %d2,%d1 454a0: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 454a2: 2040 moveal %d0,%a0 454a4: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 454a8: b0b9 0005 c780 cmpl 5c780 <_Per_CPU_Information+0xc>,%d0 454ae: 6614 bnes 454c4 <_Event_Timeout+0x4c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 454b0: 2239 0005 c78e movel 5c78e <_Event_Sync_state>,%d1 454b6: 7601 moveq #1,%d3 454b8: b681 cmpl %d1,%d3 454ba: 6608 bnes 454c4 <_Event_Timeout+0x4c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 454bc: 7202 moveq #2,%d1 454be: 23c1 0005 c78e movel %d1,5c78e <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; 454c4: 7606 moveq #6,%d3 454c6: 2040 moveal %d0,%a0 454c8: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 454cc: 46c2 movew %d2,%sr 454ce: 2f3c 1003 fff8 movel #268697592,%sp@- 454d4: 2f00 movel %d0,%sp@- 454d6: 4eb9 0004 726c jsr 4726c <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 454dc: 508f addql #8,%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 454de: 2039 0005 c5bc movel 5c5bc <_Thread_Dispatch_disable_level>,%d0 454e4: 5380 subql #1,%d0 454e6: 23c0 0005 c5bc movel %d0,5c5bc <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 454ec: 242e fff4 movel %fp@(-12),%d2 454f0: 262e fff8 movel %fp@(-8),%d3 454f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a294 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4a294: 4e56 ffbc linkw %fp,#-68 4a298: 202e 000c movel %fp@(12),%d0 4a29c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4a2a0: 246e 0008 moveal %fp@(8),%a2 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 4a2a4: 2e00 movel %d0,%d7 4a2a6: 5887 addql #4,%d7 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4a2a8: 222e 0010 movel %fp@(16),%d1 4a2ac: 2a2e 0014 movel %fp@(20),%d5 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4a2b0: 206a 0008 moveal %a2@(8),%a0 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 4a2b4: 2c2a 0010 movel %a2@(16),%d6 uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4a2b8: b087 cmpl %d7,%d0 4a2ba: 6200 013e bhiw 4a3fa <_Heap_Allocate_aligned_with_boundary+0x166> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4a2be: 4a85 tstl %d5 4a2c0: 670c beqs 4a2ce <_Heap_Allocate_aligned_with_boundary+0x3a> if ( boundary < alloc_size ) { 4a2c2: b085 cmpl %d5,%d0 4a2c4: 6200 0134 bhiw 4a3fa <_Heap_Allocate_aligned_with_boundary+0x166> return NULL; } if ( alignment == 0 ) { 4a2c8: 4a81 tstl %d1 4a2ca: 6602 bnes 4a2ce <_Heap_Allocate_aligned_with_boundary+0x3a> alignment = page_size; 4a2cc: 2206 movel %d6,%d1 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4a2ce: 2406 movel %d6,%d2 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; 4a2d0: 7804 moveq #4,%d4 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4a2d2: 5e82 addql #7,%d2 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; 4a2d4: 9880 subl %d0,%d4 if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { alignment = page_size; 4a2d6: 4283 clrl %d3 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4a2d8: 2d42 fff8 movel %d2,%fp@(-8) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; 4a2dc: 2d44 fff4 movel %d4,%fp@(-12) 4a2e0: 2d47 ffe4 movel %d7,%fp@(-28) 4a2e4: 2d46 ffec movel %d6,%fp@(-20) 4a2e8: 6000 00fa braw 4a3e4 <_Heap_Allocate_aligned_with_boundary+0x150> /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4a2ec: 2428 0004 movel %a0@(4),%d2 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4a2f0: 5283 addql #1,%d3 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4a2f2: b4ae ffe4 cmpl %fp@(-28),%d2 4a2f6: 6300 00e8 blsw 4a3e0 <_Heap_Allocate_aligned_with_boundary+0x14c> 4a2fa: 43e8 0008 lea %a0@(8),%a1 if ( alignment == 0 ) { 4a2fe: 4a81 tstl %d1 4a300: 6606 bnes 4a308 <_Heap_Allocate_aligned_with_boundary+0x74> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4a302: 2409 movel %a1,%d2 4a304: 6000 00b6 braw 4a3bc <_Heap_Allocate_aligned_with_boundary+0x128> - 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; 4a308: 7cfe moveq #-2,%d6 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4a30a: 266a 0014 moveal %a2@(20),%a3 4a30e: c486 andl %d6,%d2 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4a310: 282e fff8 movel %fp@(-8),%d4 4a314: 988b subl %a3,%d4 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4a316: d488 addl %a0,%d2 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4a318: 2c04 movel %d4,%d6 4a31a: dc82 addl %d2,%d6 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4a31c: d4ae fff4 addl %fp@(-12),%d2 4a320: 2d42 fffc movel %d2,%fp@(-4) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4a324: 4c41 2007 remul %d1,%d7,%d2 4a328: 242e fffc movel %fp@(-4),%d2 4a32c: 9487 subl %d7,%d2 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4a32e: bc82 cmpl %d2,%d6 4a330: 640a bccs 4a33c <_Heap_Allocate_aligned_with_boundary+0xa8> 4a332: 2806 movel %d6,%d4 4a334: 4c41 4002 remul %d1,%d2,%d4 4a338: 9c82 subl %d2,%d6 4a33a: 2406 movel %d6,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4a33c: 4a85 tstl %d5 4a33e: 675c beqs 4a39c <_Heap_Allocate_aligned_with_boundary+0x108> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4a340: 2c02 movel %d2,%d6 4a342: dc80 addl %d0,%d6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4a344: 49f1 0800 lea %a1@(00000000,%d0:l),%a4 /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4a348: 2d46 fff0 movel %d6,%fp@(-16) 4a34c: 2a6e fff0 moveal %fp@(-16),%a5 4a350: 4c45 6004 remul %d5,%d4,%d6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4a354: 2d4c fffc movel %a4,%fp@(-4) 4a358: 2e2e ffe4 movel %fp@(-28),%d7 4a35c: 9bc4 subal %d4,%a5 4a35e: 284d moveal %a5,%a4 4a360: 2d43 ffe8 movel %d3,%fp@(-24) 4a364: 282e fff0 movel %fp@(-16),%d4 4a368: 6022 bras 4a38c <_Heap_Allocate_aligned_with_boundary+0xf8> uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4a36a: b9ee fffc cmpal %fp@(-4),%a4 4a36e: 6568 bcss 4a3d8 <_Heap_Allocate_aligned_with_boundary+0x144> return 0; } alloc_begin = boundary_line - alloc_size; 4a370: 240c movel %a4,%d2 4a372: 9480 subl %d0,%d2 4a374: 2802 movel %d2,%d4 4a376: 4c41 4003 remul %d1,%d3,%d4 4a37a: 9483 subl %d3,%d2 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4a37c: 2802 movel %d2,%d4 4a37e: d880 addl %d0,%d4 4a380: 2c04 movel %d4,%d6 4a382: 2a44 moveal %d4,%a5 4a384: 4c45 6003 remul %d5,%d3,%d6 4a388: 9bc3 subal %d3,%a5 4a38a: 284d moveal %a5,%a4 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4a38c: b9c2 cmpal %d2,%a4 4a38e: 6304 blss 4a394 <_Heap_Allocate_aligned_with_boundary+0x100> 4a390: b88c cmpl %a4,%d4 4a392: 62d6 bhis 4a36a <_Heap_Allocate_aligned_with_boundary+0xd6> 4a394: 262e ffe8 movel %fp@(-24),%d3 4a398: 2d47 ffe4 movel %d7,%fp@(-28) boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 4a39c: b3c2 cmpal %d2,%a1 4a39e: 6240 bhis 4a3e0 <_Heap_Allocate_aligned_with_boundary+0x14c> 4a3a0: 2c2e ffec movel %fp@(-20),%d6 4a3a4: 2802 movel %d2,%d4 4a3a6: 327c fff8 moveaw #-8,%a1 4a3aa: 93c8 subal %a0,%a1 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4a3ac: d3c2 addal %d2,%a1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4a3ae: 4c46 4007 remul %d6,%d7,%d4 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 4a3b2: 93c7 subal %d7,%a1 if ( free_size >= min_block_size || free_size == 0 ) { 4a3b4: b7c9 cmpal %a1,%a3 4a3b6: 6304 blss 4a3bc <_Heap_Allocate_aligned_with_boundary+0x128> 4a3b8: 4a89 tstl %a1 4a3ba: 6624 bnes 4a3e0 <_Heap_Allocate_aligned_with_boundary+0x14c> boundary ); } } if ( alloc_begin != 0 ) { 4a3bc: 4a82 tstl %d2 4a3be: 6720 beqs 4a3e0 <_Heap_Allocate_aligned_with_boundary+0x14c><== NEVER TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4a3c0: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4a3c4: 2f00 movel %d0,%sp@- 4a3c6: 2f02 movel %d2,%sp@- 4a3c8: 2f08 movel %a0,%sp@- 4a3ca: 2f0a movel %a2,%sp@- 4a3cc: 4eb9 0004 67d8 jsr 467d8 <_Heap_Block_allocate> 4a3d2: 4fef 0010 lea %sp@(16),%sp 4a3d6: 6014 bras 4a3ec <_Heap_Allocate_aligned_with_boundary+0x158> 4a3d8: 262e ffe8 movel %fp@(-24),%d3 4a3dc: 2d47 ffe4 movel %d7,%fp@(-28) if ( alloc_begin != 0 ) { break; } block = block->next; 4a3e0: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4a3e4: b5c8 cmpal %a0,%a2 4a3e6: 6600 ff04 bnew 4a2ec <_Heap_Allocate_aligned_with_boundary+0x58> 4a3ea: 4282 clrl %d2 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 4a3ec: b6aa 0044 cmpl %a2@(68),%d3 4a3f0: 6304 blss 4a3f6 <_Heap_Allocate_aligned_with_boundary+0x162> stats->max_search = search_count; 4a3f2: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; 4a3f6: 2002 movel %d2,%d0 4a3f8: 6002 bras 4a3fc <_Heap_Allocate_aligned_with_boundary+0x168> return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; 4a3fa: 4280 clrl %d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4a3fc: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 4a402: 4e5e unlk %fp ... =============================================================================== 0004a6ec <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 4a6ec: 4e56 ffcc linkw %fp,#-52 4a6f0: 202e 0010 movel %fp@(16),%d0 4a6f4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4a6f8: 246e 0008 moveal %fp@(8),%a2 4a6fc: 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; 4a700: 2403 movel %d3,%d2 4a702: d480 addl %d0,%d2 uintptr_t const free_size = stats->free_size; 4a704: 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; 4a708: 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; 4a70c: 2a2a 0010 movel %a2@(16),%d5 uintptr_t const min_block_size = heap->min_block_size; 4a710: 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; 4a714: 42ae fffc clrl %fp@(-4) Heap_Block *extend_last_block = NULL; 4a718: 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; 4a71c: 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 ) { 4a720: b682 cmpl %d2,%d3 4a722: 6200 01aa bhiw 4a8ce <_Heap_Extend+0x1e2> return false; } extend_area_ok = _Heap_Get_first_and_last_block( 4a726: 486e fff8 pea %fp@(-8) 4a72a: 486e fffc pea %fp@(-4) 4a72e: 2f01 movel %d1,%sp@- 4a730: 2f05 movel %d5,%sp@- 4a732: 2f00 movel %d0,%sp@- 4a734: 2f03 movel %d3,%sp@- 4a736: 4eb9 0004 6898 jsr 46898 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 4a73c: 4fef 0018 lea %sp@(24),%sp 4a740: 4a00 tstb %d0 4a742: 6700 018a beqw 4a8ce <_Heap_Extend+0x1e2> 4a746: 2044 moveal %d4,%a0 4a748: 9bcd subal %a5,%a5 4a74a: 4281 clrl %d1 4a74c: 97cb subal %a3,%a3 4a74e: 99cc subal %a4,%a4 return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4a750: b888 cmpl %a0,%d4 4a752: 6704 beqs 4a758 <_Heap_Extend+0x6c> 4a754: 2248 moveal %a0,%a1 4a756: 6004 bras 4a75c <_Heap_Extend+0x70> 4a758: 226a 0018 moveal %a2@(24),%a1 uintptr_t const sub_area_end = start_block->prev_size; 4a75c: 2010 movel %a0@,%d0 Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 4a75e: b680 cmpl %d0,%d3 4a760: 6406 bccs 4a768 <_Heap_Extend+0x7c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 4a762: b3c2 cmpal %d2,%a1 4a764: 6500 0168 bcsw 4a8ce <_Heap_Extend+0x1e2> ) { return false; } if ( extend_area_end == sub_area_begin ) { 4a768: b3c2 cmpal %d2,%a1 4a76a: 6706 beqs 4a772 <_Heap_Extend+0x86> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4a76c: b082 cmpl %d2,%d0 4a76e: 6206 bhis 4a776 <_Heap_Extend+0x8a> 4a770: 6006 bras 4a778 <_Heap_Extend+0x8c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 4a772: 2848 moveal %a0,%a4 4a774: 6002 bras 4a778 <_Heap_Extend+0x8c> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4a776: 2208 movel %a0,%d1 4a778: 2e00 movel %d0,%d7 4a77a: 2240 moveal %d0,%a1 4a77c: 5189 subql #8,%a1 4a77e: 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); 4a782: 93c6 subal %d6,%a1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 4a784: b680 cmpl %d0,%d3 4a786: 6606 bnes 4a78e <_Heap_Extend+0xa2> start_block->prev_size = extend_area_end; 4a788: 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 ) 4a78a: 2649 moveal %a1,%a3 4a78c: 6006 bras 4a794 <_Heap_Extend+0xa8> merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 4a78e: b680 cmpl %d0,%d3 4a790: 6302 blss 4a794 <_Heap_Extend+0xa8> 4a792: 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; 4a794: 70fe moveq #-2,%d0 4a796: 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); 4a79a: 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 ); 4a79e: b888 cmpl %a0,%d4 4a7a0: 66ae bnes 4a750 <_Heap_Extend+0x64> <== NEVER TAKEN if ( extend_area_begin < heap->area_begin ) { 4a7a2: b6aa 0018 cmpl %a2@(24),%d3 4a7a6: 6406 bccs 4a7ae <_Heap_Extend+0xc2> heap->area_begin = extend_area_begin; 4a7a8: 2543 0018 movel %d3,%a2@(24) 4a7ac: 600a bras 4a7b8 <_Heap_Extend+0xcc> } else if ( heap->area_end < extend_area_end ) { 4a7ae: b4aa 001c cmpl %a2@(28),%d2 4a7b2: 6304 blss 4a7b8 <_Heap_Extend+0xcc> heap->area_end = extend_area_end; 4a7b4: 2542 001c movel %d2,%a2@(28) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4a7b8: 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 = 4a7bc: 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; 4a7be: 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; 4a7c0: 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 = 4a7c4: 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; 4a7c6: 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; 4a7c8: 2282 movel %d2,%a1@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4a7ca: 2344 0004 movel %d4,%a1@(4) extend_last_block->prev_size = extend_first_block_size; 4a7ce: 2080 movel %d0,%a0@ extend_last_block->size_and_flag = 0; 4a7d0: 42a8 0004 clrl %a0@(4) if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4a7d4: b3ea 0020 cmpal %a2@(32),%a1 4a7d8: 6406 bccs 4a7e0 <_Heap_Extend+0xf4> heap->first_block = extend_first_block; 4a7da: 2549 0020 movel %a1,%a2@(32) 4a7de: 600a bras 4a7ea <_Heap_Extend+0xfe> } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 4a7e0: b1ea 0024 cmpal %a2@(36),%a0 4a7e4: 6304 blss 4a7ea <_Heap_Extend+0xfe> heap->last_block = extend_last_block; 4a7e6: 2548 0024 movel %a0,%a2@(36) } if ( merge_below_block != NULL ) { 4a7ea: 4a8c tstl %a4 4a7ec: 6732 beqs 4a820 <_Heap_Extend+0x134> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 4a7ee: 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 ); 4a7f2: 5083 addql #8,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 4a7f4: 2803 movel %d3,%d4 4a7f6: 4c40 4001 remul %d0,%d1,%d4 if ( remainder != 0 ) { 4a7fa: 4a81 tstl %d1 4a7fc: 6704 beqs 4a802 <_Heap_Extend+0x116> <== ALWAYS TAKEN return value - remainder + alignment; 4a7fe: d680 addl %d0,%d3 <== NOT EXECUTED 4a800: 9681 subl %d1,%d3 <== NOT EXECUTED uintptr_t const new_first_block_begin = 4a802: 2043 moveal %d3,%a0 4a804: 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 = 4a806: 200c movel %a4,%d0 4a808: 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; 4a80a: 7201 moveq #1,%d1 4a80c: 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; 4a80e: 2094 movel %a4@,%a0@ new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4a810: 2141 0004 movel %d1,%a0@(4) _Heap_Free_block( heap, new_first_block ); 4a814: 2f08 movel %a0,%sp@- 4a816: 2f0a movel %a2,%sp@- 4a818: 4eba feb6 jsr %pc@(4a6d0 <_Heap_Free_block>) 4a81c: 508f addql #8,%sp 4a81e: 6012 bras 4a832 <_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 ) { 4a820: 4a81 tstl %d1 4a822: 670e beqs 4a832 <_Heap_Extend+0x146> _Heap_Link_below( 4a824: 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; 4a828: 7801 moveq #1,%d4 4a82a: 9288 subl %a0,%d1 4a82c: 8881 orl %d1,%d4 4a82e: 2144 0004 movel %d4,%a0@(4) link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 4a832: 4a8b tstl %a3 4a834: 6734 beqs 4a86a <_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, 4a836: 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( 4a838: 948b subl %a3,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4a83a: 2202 movel %d2,%d1 4a83c: 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; 4a842: 7201 moveq #1,%d1 4a844: 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) 4a846: 202b 0004 movel %a3@(4),%d0 4a84a: 9082 subl %d2,%d0 | HEAP_PREV_BLOCK_USED; 4a84c: 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; 4a84e: 7001 moveq #1,%d0 4a850: 2781 2804 movel %d1,%a3@(00000004,%d2:l) 4a854: c0ab 0004 andl %a3@(4),%d0 block->size_and_flag = size | flag; 4a858: 8480 orl %d0,%d2 4a85a: 2742 0004 movel %d2,%a3@(4) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 4a85e: 2f0b movel %a3,%sp@- 4a860: 2f0a movel %a2,%sp@- 4a862: 4eba fe6c jsr %pc@(4a6d0 <_Heap_Free_block>) 4a866: 508f addql #8,%sp 4a868: 6020 bras 4a88a <_Heap_Extend+0x19e> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 4a86a: 4a8d tstl %a5 4a86c: 671c beqs 4a88a <_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; 4a86e: 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; 4a870: 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 ); 4a872: 222e fffc movel %fp@(-4),%d1 4a876: 928d subl %a5,%d1 4a878: 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( 4a87c: 206e fff8 moveal %fp@(-8),%a0 block->size_and_flag = size | flag; 4a880: 8280 orl %d0,%d1 4a882: 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; 4a886: 89a8 0004 orl %d4,%a0@(4) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4a88a: 4a8c tstl %a4 4a88c: 6610 bnes 4a89e <_Heap_Extend+0x1b2> 4a88e: 4a8b tstl %a3 4a890: 660c bnes 4a89e <_Heap_Extend+0x1b2> _Heap_Free_block( heap, extend_first_block ); 4a892: 2f2e fffc movel %fp@(-4),%sp@- 4a896: 2f0a movel %a2,%sp@- 4a898: 4eba fe36 jsr %pc@(4a6d0 <_Heap_Free_block>) 4a89c: 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 4a89e: 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; 4a8a2: 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( 4a8a4: 222a 0020 movel %a2@(32),%d1 4a8a8: 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; 4a8aa: c0a8 0004 andl %a0@(4),%d0 block->size_and_flag = size | flag; 4a8ae: 8280 orl %d0,%d1 } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 4a8b0: 202a 0030 movel %a2@(48),%d0 4a8b4: 90ae fff4 subl %fp@(-12),%d0 4a8b8: 2141 0004 movel %d1,%a0@(4) /* Statistics */ stats->size += extended_size; 4a8bc: d1aa 002c addl %d0,%a2@(44) if ( extended_size_ptr != NULL ) 4a8c0: 4aae 0014 tstl %fp@(20) 4a8c4: 670c beqs 4a8d2 <_Heap_Extend+0x1e6> <== NEVER TAKEN *extended_size_ptr = extended_size; 4a8c6: 206e 0014 moveal %fp@(20),%a0 4a8ca: 2080 movel %d0,%a0@ 4a8cc: 6004 bras 4a8d2 <_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; 4a8ce: 4200 clrb %d0 4a8d0: 6002 bras 4a8d4 <_Heap_Extend+0x1e8> stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 4a8d2: 7001 moveq #1,%d0 } 4a8d4: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4a8da: 4e5e unlk %fp ... =============================================================================== 0004a408 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4a408: 4e56 ffe8 linkw %fp,#-24 4a40c: 202e 000c movel %fp@(12),%d0 4a410: 2240 moveal %d0,%a1 4a412: 5189 subql #8,%a1 4a414: 206e 0008 moveal %fp@(8),%a0 4a418: 4c68 0001 0010 remul %a0@(16),%d1,%d0 4a41e: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 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 4a422: 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); 4a426: 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; 4a428: b889 cmpl %a1,%d4 4a42a: 620c bhis 4a438 <_Heap_Free+0x30> 4a42c: b3e8 0024 cmpal %a0@(36),%a1 4a430: 53c0 sls %d0 4a432: 49c0 extbl %d0 4a434: 4480 negl %d0 4a436: 6002 bras 4a43a <_Heap_Free+0x32> 4a438: 4280 clrl %d0 Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 4a43a: 4a00 tstb %d0 4a43c: 6700 012c beqw 4a56a <_Heap_Free+0x162> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4a440: 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; 4a444: 70fe moveq #-2,%d0 4a446: 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); 4a448: 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; 4a44c: b88a cmpl %a2,%d4 4a44e: 620c bhis 4a45c <_Heap_Free+0x54> <== NEVER TAKEN 4a450: b5e8 0024 cmpal %a0@(36),%a2 4a454: 53c1 sls %d1 4a456: 49c1 extbl %d1 4a458: 4481 negl %d1 4a45a: 6002 bras 4a45e <_Heap_Free+0x56> 4a45c: 4281 clrl %d1 <== NOT EXECUTED } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 4a45e: 4a01 tstb %d1 4a460: 6700 0108 beqw 4a56a <_Heap_Free+0x162> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4a464: 242a 0004 movel %a2@(4),%d2 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4a468: 0802 0000 btst #0,%d2 4a46c: 6700 00fc beqw 4a56a <_Heap_Free+0x162> - 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; 4a470: 72fe moveq #-2,%d1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4a472: 2668 0024 moveal %a0@(36),%a3 4a476: c481 andl %d1,%d2 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4a478: b7ca cmpal %a2,%a3 4a47a: 670c beqs 4a488 <_Heap_Free+0x80> 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; 4a47c: 7201 moveq #1,%d1 4a47e: c2b2 2804 andl %a2@(00000004,%d2:l),%d1 #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4a482: 5381 subql #1,%d1 4a484: 4481 negl %d1 4a486: 6002 bras 4a48a <_Heap_Free+0x82> return false; } 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 )); 4a488: 4281 clrl %d1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4a48a: 1a01 moveb %d1,%d5 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4a48c: 0803 0000 btst #0,%d3 4a490: 6662 bnes 4a4f4 <_Heap_Free+0xec> uintptr_t const prev_size = block->prev_size; 4a492: 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); 4a494: 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; 4a496: b889 cmpl %a1,%d4 4a498: 620a bhis 4a4a4 <_Heap_Free+0x9c> <== NEVER TAKEN 4a49a: b3cb cmpal %a3,%a1 4a49c: 53c1 sls %d1 4a49e: 49c1 extbl %d1 4a4a0: 4481 negl %d1 4a4a2: 6002 bras 4a4a6 <_Heap_Free+0x9e> 4a4a4: 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 ) ) { 4a4a6: 4a01 tstb %d1 4a4a8: 6700 00c0 beqw 4a56a <_Heap_Free+0x162> 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; 4a4ac: 7201 moveq #1,%d1 4a4ae: 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) ) { 4a4b2: 6700 00b6 beqw 4a56a <_Heap_Free+0x162> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4a4b6: 4a05 tstb %d5 4a4b8: 6726 beqs 4a4e0 <_Heap_Free+0xd8> return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4a4ba: 266a 0008 moveal %a2@(8),%a3 uintptr_t const size = block_size + prev_size + next_block_size; 4a4be: d480 addl %d0,%d2 4a4c0: d682 addl %d2,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a4c2: 7401 moveq #1,%d2 Heap_Block *prev = block->prev; 4a4c4: 246a 000c moveal %a2@(12),%a2 prev->next = next; 4a4c8: 254b 0008 movel %a3,%a2@(8) 4a4cc: 8483 orl %d3,%d2 next->prev = prev; 4a4ce: 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; 4a4d2: 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; 4a4d6: 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; 4a4da: 2342 0004 movel %d2,%a1@(4) 4a4de: 607a bras 4a55a <_Heap_Free+0x152> 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; 4a4e0: d680 addl %d0,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a4e2: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a4e4: 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; 4a4e6: 8283 orl %d3,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4a4e8: 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; 4a4ea: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a4ee: c5aa 0004 andl %d2,%a2@(4) 4a4f2: 6066 bras 4a55a <_Heap_Free+0x152> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4a4f4: 4a01 tstb %d1 4a4f6: 672a beqs 4a522 <_Heap_Free+0x11a> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4a4f8: 266a 0008 moveal %a2@(8),%a3 uintptr_t const size = block_size + next_block_size; 4a4fc: 2202 movel %d2,%d1 4a4fe: d280 addl %d0,%d1 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a500: 7401 moveq #1,%d2 Heap_Block *prev = old_block->prev; 4a502: 246a 000c moveal %a2@(12),%a2 new_block->next = next; 4a506: 234b 0008 movel %a3,%a1@(8) 4a50a: 8481 orl %d1,%d2 new_block->prev = prev; 4a50c: 234a 000c movel %a2,%a1@(12) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4a510: 2381 1800 movel %d1,%a1@(00000000,%d1:l) next->prev = new_block; 4a514: 2749 000c movel %a1,%a3@(12) prev->next = new_block; 4a518: 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; 4a51c: 2342 0004 movel %d2,%a1@(4) 4a520: 6038 bras 4a55a <_Heap_Free+0x152> 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; 4a522: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a524: 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; 4a526: 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; 4a528: 2668 0008 moveal %a0@(8),%a3 new_block->next = next; new_block->prev = block_before; 4a52c: 2348 000c movel %a0,%a1@(12) 4a530: 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; 4a534: 2228 0038 movel %a0@(56),%d1 4a538: 5281 addql #1,%d1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 4a53a: 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; 4a53e: c5aa 0004 andl %d2,%a2@(4) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 4a542: 2749 000c movel %a1,%a3@(12) next_block->prev_size = block_size; 4a546: 2480 movel %d0,%a2@ { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4a548: 2149 0008 movel %a1,%a0@(8) /* Statistics */ ++stats->free_blocks; 4a54c: 2141 0038 movel %d1,%a0@(56) if ( stats->max_free_blocks < stats->free_blocks ) { 4a550: b2a8 003c cmpl %a0@(60),%d1 4a554: 6304 blss 4a55a <_Heap_Free+0x152> stats->max_free_blocks = stats->free_blocks; 4a556: 2141 003c movel %d1,%a0@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4a55a: d1a8 0030 addl %d0,%a0@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4a55e: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4a562: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; return( true ); 4a566: 7001 moveq #1,%d0 4a568: 6002 bras 4a56c <_Heap_Free+0x164> /* 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 ); 4a56a: 4200 clrb %d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4a56c: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4a570: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005945c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5945c: 4e56 0000 linkw %fp,#0 59460: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 59464: 2040 moveal %d0,%a0 59466: 5188 subql #8,%a0 59468: 226e 0008 moveal %fp@(8),%a1 5946c: 2f02 movel %d2,%sp@- 5946e: 2400 movel %d0,%d2 59470: 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 59476: 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); 5947a: 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; 5947c: b488 cmpl %a0,%d2 5947e: 620c bhis 5948c <_Heap_Size_of_alloc_area+0x30> 59480: b1e9 0024 cmpal %a1@(36),%a0 59484: 53c1 sls %d1 59486: 49c1 extbl %d1 59488: 4481 negl %d1 5948a: 6002 bras 5948e <_Heap_Size_of_alloc_area+0x32> 5948c: 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 ) ) { 5948e: 4a01 tstb %d1 59490: 6738 beqs 594ca <_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; 59492: 72fe moveq #-2,%d1 59494: 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); 59498: 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; 5949a: b488 cmpl %a0,%d2 5949c: 620c bhis 594aa <_Heap_Size_of_alloc_area+0x4e> <== NEVER TAKEN 5949e: b1e9 0024 cmpal %a1@(36),%a0 594a2: 53c1 sls %d1 594a4: 49c1 extbl %d1 594a6: 4481 negl %d1 594a8: 6002 bras 594ac <_Heap_Size_of_alloc_area+0x50> 594aa: 4281 clrl %d1 <== NOT EXECUTED } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 594ac: 4a01 tstb %d1 594ae: 671a beqs 594ca <_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; 594b0: 7201 moveq #1,%d1 594b2: c2a8 0004 andl %a0@(4),%d1 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 594b6: 6712 beqs 594ca <_Heap_Size_of_alloc_area+0x6e> <== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 594b8: 7204 moveq #4,%d1 594ba: 9280 subl %d0,%d1 594bc: 2001 movel %d1,%d0 594be: d088 addl %a0,%d0 594c0: 226e 0010 moveal %fp@(16),%a1 594c4: 2280 movel %d0,%a1@ return true; 594c6: 7001 moveq #1,%d0 594c8: 6002 bras 594cc <_Heap_Size_of_alloc_area+0x70> if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 594ca: 4200 clrb %d0 } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; } 594cc: 241f movel %sp@+,%d2 594ce: 4e5e unlk %fp ... =============================================================================== 000472ae <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 472ae: 4e56 ffd0 linkw %fp,#-48 472b2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 472b6: 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; 472ba: 45fa ffac lea %pc@(47268 <_Heap_Walk_print_nothing>),%a2 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 472be: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 472c2: 282b 0010 movel %a3@(16),%d4 uintptr_t const min_block_size = heap->min_block_size; 472c6: 2a2b 0014 movel %a3@(20),%d5 Heap_Block *const first_block = heap->first_block; 472ca: 2c2b 0020 movel %a3@(32),%d6 Heap_Block *const last_block = heap->last_block; 472ce: 2e2b 0024 movel %a3@(36),%d7 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 472d2: 4a2e 0013 tstb %fp@(19) 472d6: 6704 beqs 472dc <_Heap_Walk+0x2e> 472d8: 45fa ff96 lea %pc@(47270 <_Heap_Walk_print>),%a2 if ( !_System_state_Is_up( _System_state_Get() ) ) { 472dc: 7003 moveq #3,%d0 472de: b0b9 0005 ea70 cmpl 5ea70 <_System_state_Current>,%d0 472e4: 6600 02fc bnew 475e2 <_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)( 472e8: 2f2b 000c movel %a3@(12),%sp@- 472ec: 2f2b 0008 movel %a3@(8),%sp@- 472f0: 2f07 movel %d7,%sp@- 472f2: 2f06 movel %d6,%sp@- 472f4: 2f2b 001c movel %a3@(28),%sp@- 472f8: 2f2b 0018 movel %a3@(24),%sp@- 472fc: 2f05 movel %d5,%sp@- 472fe: 2f04 movel %d4,%sp@- 47300: 4879 0005 b05d pea 5b05d 47306: 42a7 clrl %sp@- 47308: 2f02 movel %d2,%sp@- 4730a: 4e92 jsr %a2@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 4730c: 4fef 002c lea %sp@(44),%sp 47310: 4a84 tstl %d4 47312: 6608 bnes 4731c <_Heap_Walk+0x6e> (*printer)( source, true, "page size is zero\n" ); 47314: 4879 0005 b0ee pea 5b0ee 4731a: 6050 bras 4736c <_Heap_Walk+0xbe> ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 4731c: 7003 moveq #3,%d0 4731e: c084 andl %d4,%d0 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 47320: 670c beqs 4732e <_Heap_Walk+0x80> (*printer)( 47322: 2f04 movel %d4,%sp@- 47324: 4879 0005 b101 pea 5b101 4732a: 6000 02ca braw 475f6 <_Heap_Walk+0x348> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4732e: 2205 movel %d5,%d1 47330: 4c44 1000 remul %d4,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 47334: 4a80 tstl %d0 47336: 670c beqs 47344 <_Heap_Walk+0x96> (*printer)( 47338: 2f05 movel %d5,%sp@- 4733a: 4879 0005 b11f pea 5b11f 47340: 6000 02b4 braw 475f6 <_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; 47344: 2006 movel %d6,%d0 47346: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 47348: 4c44 0001 remul %d4,%d1,%d0 ); return false; } if ( 4734c: 4a81 tstl %d1 4734e: 670c beqs 4735c <_Heap_Walk+0xae> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 47350: 2f06 movel %d6,%sp@- 47352: 4879 0005 b143 pea 5b143 47358: 6000 029c braw 475f6 <_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; 4735c: 7001 moveq #1,%d0 4735e: 2046 moveal %d6,%a0 47360: c0a8 0004 andl %a0@(4),%d0 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 47364: 6616 bnes 4737c <_Heap_Walk+0xce> (*printer)( 47366: 4879 0005 b174 pea 5b174 4736c: 4878 0001 pea 1 47370: 2f02 movel %d2,%sp@- 47372: 4e92 jsr %a2@ 47374: 4fef 000c lea %sp@(12),%sp 47378: 6000 00ba braw 47434 <_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; 4737c: 70fe moveq #-2,%d0 4737e: 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); 47380: 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; 47382: 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); 47386: 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; 47388: 7001 moveq #1,%d0 4738a: c0ac 0004 andl %a4@(4),%d0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 4738e: 6608 bnes 47398 <_Heap_Walk+0xea> (*printer)( 47390: 4879 0005 b1a2 pea 5b1a2 47396: 60d4 bras 4736c <_Heap_Walk+0xbe> ); return false; } if ( 47398: bc8c cmpl %a4,%d6 4739a: 6708 beqs 473a4 <_Heap_Walk+0xf6> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 4739c: 4879 0005 b1b7 pea 5b1b7 <== NOT EXECUTED 473a2: 60c8 bras 4736c <_Heap_Walk+0xbe> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 473a4: 262b 0010 movel %a3@(16),%d3 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 473a8: 220b movel %a3,%d1 block = next_block; } while ( block != first_block ); return true; } 473aa: 206b 0008 moveal %a3@(8),%a0 473ae: 2d44 fff8 movel %d4,%fp@(-8) 473b2: 2d43 fffc movel %d3,%fp@(-4) 473b6: 6000 0088 braw 47440 <_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; 473ba: b1eb 0020 cmpal %a3@(32),%a0 473be: 650c bcss 473cc <_Heap_Walk+0x11e> 473c0: b1eb 0024 cmpal %a3@(36),%a0 473c4: 53c0 sls %d0 473c6: 49c0 extbl %d0 473c8: 4480 negl %d0 473ca: 6002 bras 473ce <_Heap_Walk+0x120> 473cc: 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 ) ) { 473ce: 4a00 tstb %d0 473d0: 660c bnes 473de <_Heap_Walk+0x130> (*printer)( 473d2: 2f08 movel %a0,%sp@- 473d4: 4879 0005 b1e6 pea 5b1e6 473da: 6000 021a braw 475f6 <_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; 473de: 4be8 0008 lea %a0@(8),%a5 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 473e2: 200d movel %a5,%d0 473e4: 262e fffc movel %fp@(-4),%d3 473e8: 4c43 0004 remul %d3,%d4,%d0 ); return false; } if ( 473ec: 4a84 tstl %d4 473ee: 670c beqs 473fc <_Heap_Walk+0x14e> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 473f0: 2f08 movel %a0,%sp@- 473f2: 4879 0005 b206 pea 5b206 473f8: 6000 01fc braw 475f6 <_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; 473fc: 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; 473fe: 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; 47400: 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; 47404: c6b0 0804 andl %a0@(00000004,%d0:l),%d3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 47408: 670c beqs 47416 <_Heap_Walk+0x168> (*printer)( 4740a: 2f08 movel %a0,%sp@- 4740c: 4879 0005 b236 pea 5b236 47412: 6000 01e2 braw 475f6 <_Heap_Walk+0x348> ); return false; } if ( free_block->prev != prev_block ) { 47416: 2028 000c movel %a0@(12),%d0 4741a: b280 cmpl %d0,%d1 4741c: 671c beqs 4743a <_Heap_Walk+0x18c> (*printer)( 4741e: 2f00 movel %d0,%sp@- 47420: 2f08 movel %a0,%sp@- 47422: 4879 0005 b252 pea 5b252 47428: 4878 0001 pea 1 4742c: 2f02 movel %d2,%sp@- 4742e: 4e92 jsr %a2@ 47430: 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; 47434: 4200 clrb %d0 47436: 6000 01ac braw 475e4 <_Heap_Walk+0x336> return false; } prev_block = free_block; free_block = free_block->next; 4743a: 2208 movel %a0,%d1 4743c: 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 ) { 47440: b7c8 cmpal %a0,%a3 47442: 6600 ff76 bnew 473ba <_Heap_Walk+0x10c> 47446: 282e fff8 movel %fp@(-8),%d4 4744a: 6002 bras 4744e <_Heap_Walk+0x1a0> block->prev_size ); } block = next_block; } while ( block != first_block ); 4744c: 284d moveal %a5,%a4 return true; } 4744e: 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; 47452: 76fe moveq #-2,%d3 47454: c680 andl %d0,%d3 47456: 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); 4745a: 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; 4745e: bbeb 0020 cmpal %a3@(32),%a5 47462: 650c bcss 47470 <_Heap_Walk+0x1c2> <== NEVER TAKEN 47464: bbeb 0024 cmpal %a3@(36),%a5 47468: 53c0 sls %d0 4746a: 49c0 extbl %d0 4746c: 4480 negl %d0 4746e: 6002 bras 47472 <_Heap_Walk+0x1c4> 47470: 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 ) ) { 47472: 4a00 tstb %d0 47474: 660c bnes 47482 <_Heap_Walk+0x1d4> (*printer)( 47476: 2f0d movel %a5,%sp@- 47478: 2f0c movel %a4,%sp@- 4747a: 4879 0005 b284 pea 5b284 47480: 60a6 bras 47428 <_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; 47482: be8c cmpl %a4,%d7 47484: 56c0 sne %d0 47486: 2200 movel %d0,%d1 47488: 4481 negl %d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4748a: 2003 movel %d3,%d0 4748c: 1d41 fffb moveb %d1,%fp@(-5) 47490: 4c44 0001 remul %d4,%d1,%d0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 47494: 4a81 tstl %d1 47496: 6714 beqs 474ac <_Heap_Walk+0x1fe> 47498: 4a2e fffb tstb %fp@(-5) 4749c: 670e beqs 474ac <_Heap_Walk+0x1fe> (*printer)( 4749e: 2f03 movel %d3,%sp@- 474a0: 2f0c movel %a4,%sp@- 474a2: 4879 0005 b2b1 pea 5b2b1 474a8: 6000 ff7e braw 47428 <_Heap_Walk+0x17a> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 474ac: ba83 cmpl %d3,%d5 474ae: 6322 blss 474d2 <_Heap_Walk+0x224> 474b0: 4a2e fffb tstb %fp@(-5) 474b4: 671c beqs 474d2 <_Heap_Walk+0x224> <== NEVER TAKEN (*printer)( 474b6: 2f05 movel %d5,%sp@- 474b8: 2f03 movel %d3,%sp@- 474ba: 2f0c movel %a4,%sp@- 474bc: 4879 0005 b2df pea 5b2df 474c2: 4878 0001 pea 1 474c6: 2f02 movel %d2,%sp@- 474c8: 4e92 jsr %a2@ block, block_size, min_block_size ); return false; 474ca: 4fef 0018 lea %sp@(24),%sp 474ce: 6000 ff64 braw 47434 <_Heap_Walk+0x186> } if ( next_block_begin <= block_begin && is_not_last_block ) { 474d2: b9cd cmpal %a5,%a4 474d4: 6514 bcss 474ea <_Heap_Walk+0x23c> 474d6: 4a2e fffb tstb %fp@(-5) 474da: 670e beqs 474ea <_Heap_Walk+0x23c> (*printer)( 474dc: 2f0d movel %a5,%sp@- 474de: 2f0c movel %a4,%sp@- 474e0: 4879 0005 b30a pea 5b30a 474e6: 6000 ff40 braw 47428 <_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; 474ea: 7001 moveq #1,%d0 474ec: c0ae fffc andl %fp@(-4),%d0 474f0: 2d40 fffc movel %d0,%fp@(-4) 474f4: 7001 moveq #1,%d0 474f6: c0ad 0004 andl %a5@(4),%d0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 474fa: 6600 00ae bnew 475aa <_Heap_Walk+0x2fc> block = next_block; } while ( block != first_block ); return true; } 474fe: 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)( 47502: 43f9 0005 b02a lea 5b02a ,%a1 block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 47508: 206c 0008 moveal %a4@(8),%a0 block = next_block; } while ( block != first_block ); return true; } 4750c: 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)( 47510: b1eb 000c cmpal %a3@(12),%a0 47514: 6710 beqs 47526 <_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)" : "") 47516: 43f9 0005 af64 lea 5af64 ,%a1 4751c: b7c8 cmpal %a0,%a3 4751e: 6606 bnes 47526 <_Heap_Walk+0x278> 47520: 43f9 0005 b039 lea 5b039 ,%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 ? 47526: 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)( 4752a: 223c 0005 b043 movel #372803,%d1 47530: b0ae fff8 cmpl %fp@(-8),%d0 47534: 6710 beqs 47546 <_Heap_Walk+0x298> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 47536: 223c 0005 af64 movel #372580,%d1 4753c: b7c0 cmpal %d0,%a3 4753e: 6606 bnes 47546 <_Heap_Walk+0x298> 47540: 223c 0005 b053 movel #372819,%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)( 47546: 2f09 movel %a1,%sp@- 47548: 2f08 movel %a0,%sp@- 4754a: 2f01 movel %d1,%sp@- 4754c: 2f00 movel %d0,%sp@- 4754e: 2f03 movel %d3,%sp@- 47550: 2f0c movel %a4,%sp@- 47552: 4879 0005 b33e pea 5b33e 47558: 42a7 clrl %sp@- 4755a: 2f02 movel %d2,%sp@- 4755c: 4e92 jsr %a2@ block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 4755e: 2015 movel %a5@,%d0 47560: 4fef 0024 lea %sp@(36),%sp 47564: b083 cmpl %d3,%d0 47566: 671e beqs 47586 <_Heap_Walk+0x2d8> (*printer)( 47568: 2f0d movel %a5,%sp@- 4756a: 2f00 movel %d0,%sp@- 4756c: 2f03 movel %d3,%sp@- 4756e: 2f0c movel %a4,%sp@- 47570: 4879 0005 b373 pea 5b373 47576: 4878 0001 pea 1 4757a: 2f02 movel %d2,%sp@- 4757c: 4e92 jsr %a2@ 4757e: 4fef 001c lea %sp@(28),%sp 47582: 6000 feb0 braw 47434 <_Heap_Walk+0x186> ); return false; } if ( !prev_used ) { 47586: 4aae fffc tstl %fp@(-4) 4758a: 660a bnes 47596 <_Heap_Walk+0x2e8> (*printer)( 4758c: 2f0c movel %a4,%sp@- 4758e: 4879 0005 b3ac pea 5b3ac 47594: 6060 bras 475f6 <_Heap_Walk+0x348> block = next_block; } while ( block != first_block ); return true; } 47596: 206b 0008 moveal %a3@(8),%a0 4759a: 6008 bras 475a4 <_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 ) { 4759c: b9c8 cmpal %a0,%a4 4759e: 673c beqs 475dc <_Heap_Walk+0x32e> return true; } free_block = free_block->next; 475a0: 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 ) { 475a4: b7c8 cmpal %a0,%a3 475a6: 66f4 bnes 4759c <_Heap_Walk+0x2ee> 475a8: 6044 bras 475ee <_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) { 475aa: 4aae fffc tstl %fp@(-4) 475ae: 6716 beqs 475c6 <_Heap_Walk+0x318> (*printer)( 475b0: 2f03 movel %d3,%sp@- 475b2: 2f0c movel %a4,%sp@- 475b4: 4879 0005 b3db pea 5b3db 475ba: 42a7 clrl %sp@- 475bc: 2f02 movel %d2,%sp@- 475be: 4e92 jsr %a2@ 475c0: 4fef 0014 lea %sp@(20),%sp 475c4: 6016 bras 475dc <_Heap_Walk+0x32e> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 475c6: 2f14 movel %a4@,%sp@- 475c8: 2f03 movel %d3,%sp@- 475ca: 2f0c movel %a4,%sp@- 475cc: 4879 0005 b3f2 pea 5b3f2 475d2: 42a7 clrl %sp@- 475d4: 2f02 movel %d2,%sp@- 475d6: 4e92 jsr %a2@ 475d8: 4fef 0018 lea %sp@(24),%sp block->prev_size ); } block = next_block; } while ( block != first_block ); 475dc: bc8d cmpl %a5,%d6 475de: 6600 fe6c bnew 4744c <_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; 475e2: 7001 moveq #1,%d0 block = next_block; } while ( block != first_block ); return true; } 475e4: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 475ea: 4e5e unlk %fp 475ec: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 475ee: 2f0c movel %a4,%sp@- 475f0: 4879 0005 b417 pea 5b417 475f6: 4878 0001 pea 1 475fa: 2f02 movel %d2,%sp@- 475fc: 4e92 jsr %a2@ 475fe: 4fef 0010 lea %sp@(16),%sp 47602: 6000 fe30 braw 47434 <_Heap_Walk+0x186> ... =============================================================================== 000468cc <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 468cc: 4e56 0000 linkw %fp,#0 468d0: 222e 000c movel %fp@(12),%d1 468d4: 2f02 movel %d2,%sp@- 468d6: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 468da: 13c1 0005 c656 moveb %d1,5c656 <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 468e0: 2f02 movel %d2,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 468e2: 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 ); 468e6: 0281 0000 00ff andil #255,%d1 bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 468ec: 23c0 0005 c652 movel %d0,5c652 <_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 ); 468f2: 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; 468f4: 23c2 0005 c658 movel %d2,5c658 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 468fa: 2f00 movel %d0,%sp@- 468fc: 4eb9 0004 83e6 jsr 483e6 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46902: 7005 moveq #5,%d0 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46904: 2042 moveal %d2,%a0 <== NOT EXECUTED 46906: 243c 0000 0700 movel #1792,%d2 <== NOT EXECUTED 4690c: 23c0 0005 c728 movel %d0,5c728 <_System_state_Current> <== NOT EXECUTED 46912: 40c0 movew %sr,%d0 <== NOT EXECUTED 46914: 8082 orl %d2,%d0 <== NOT EXECUTED 46916: 46c0 movew %d0,%sr <== NOT EXECUTED 46918: 2008 movel %a0,%d0 <== NOT EXECUTED 4691a: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46920: 4ac8 halt <== NOT EXECUTED 46922: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 46926: 60fe bras 46926 <_Internal_error_Occurred+0x5a> <== NOT EXECUTED =============================================================================== 00046988 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 46988: 4e56 fff0 linkw %fp,#-16 4698c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46990: 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 ) 46994: 4aaa 0014 tstl %a2@(20) 46998: 675e beqs 469f8 <_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 ); 4699a: 240a movel %a2,%d2 4699c: 0682 0000 001c addil #28,%d2 469a2: 47f9 0004 6118 lea 46118 <_Chain_Get>,%a3 469a8: 2f02 movel %d2,%sp@- 469aa: 4e93 jsr %a3@ if ( information->auto_extend ) { 469ac: 588f addql #4,%sp 469ae: 4a2a 0010 tstb %a2@(16) 469b2: 6746 beqs 469fa <_Objects_Allocate+0x72> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 469b4: 4a80 tstl %d0 469b6: 6612 bnes 469ca <_Objects_Allocate+0x42> _Objects_Extend_information( information ); 469b8: 2f0a movel %a2,%sp@- 469ba: 4eb9 0004 6a30 jsr 46a30 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 469c0: 2f02 movel %d2,%sp@- 469c2: 4e93 jsr %a3@ } if ( the_object ) { 469c4: 508f addql #8,%sp 469c6: 4a80 tstl %d0 469c8: 6730 beqs 469fa <_Objects_Allocate+0x72> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 469ca: 2040 moveal %d0,%a0 469cc: 4281 clrl %d1 469ce: 4282 clrl %d2 469d0: 3228 000a movew %a0@(10),%d1 469d4: 342a 0008 movew %a2@(8),%d2 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 469d8: 206a 002a moveal %a2@(42),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 469dc: 9282 subl %d2,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 469de: 342a 0012 movew %a2@(18),%d2 469e2: 4c42 1001 remul %d2,%d1,%d1 information->inactive_per_block[ block ]--; 469e6: e589 lsll #2,%d1 469e8: d1c1 addal %d1,%a0 469ea: 5390 subql #1,%a0@ information->inactive--; 469ec: 322a 0028 movew %a2@(40),%d1 469f0: 5381 subql #1,%d1 469f2: 3541 0028 movew %d1,%a2@(40) 469f6: 6002 bras 469fa <_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; 469f8: 4280 clrl %d0 <== NOT EXECUTED ); } #endif return the_object; } 469fa: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 46a00: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046a04 <_Objects_Close>: RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 46a04: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 46a06: 4e56 0000 linkw %fp,#0 46a0a: 226e 000c moveal %fp@(12),%a1 46a0e: 206e 0008 moveal %fp@(8),%a0 46a12: 2f0a movel %a2,%sp@- #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46a14: 2468 0018 moveal %a0@(24),%a2 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 46a18: 3029 000a movew %a1@(10),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46a1c: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); } 46a20: 245f moveal %sp@+,%a2 Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 46a22: 2d49 000c movel %a1,%fp@(12) } 46a26: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 46a28: 4ef9 0004 6f28 jmp 46f28 <_Objects_Namespace_remove> ... =============================================================================== 00046d2c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 46d2c: 4e56 0000 linkw %fp,#0 46d30: 2f03 movel %d3,%sp@- 46d32: 262e 0008 movel %fp@(8),%d3 46d36: 2f02 movel %d2,%sp@- 46d38: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 46d3c: 6734 beqs 46d72 <_Objects_Get_information+0x46> /* * 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 ); 46d3e: 2f03 movel %d3,%sp@- 46d40: 4eb9 0004 a574 jsr 4a574 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 46d46: 588f addql #4,%sp 46d48: 4a80 tstl %d0 46d4a: 6726 beqs 46d72 <_Objects_Get_information+0x46> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 46d4c: b082 cmpl %d2,%d0 46d4e: 6522 bcss 46d72 <_Objects_Get_information+0x46> return NULL; if ( !_Objects_Information_table[ the_api ] ) 46d50: 41f9 0005 c578 lea 5c578 <_Objects_Information_table>,%a0 46d56: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 46d5a: 4a88 tstl %a0 46d5c: 6714 beqs 46d72 <_Objects_Get_information+0x46> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 46d5e: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 46d62: 6710 beqs 46d74 <_Objects_Get_information+0x48> <== 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; 46d64: 2040 moveal %d0,%a0 46d66: 4a68 000e tstw %a0@(14) 46d6a: 56c1 sne %d1 46d6c: 49c1 extbl %d1 46d6e: c081 andl %d1,%d0 46d70: 6002 bras 46d74 <_Objects_Get_information+0x48> if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) return NULL; 46d72: 4280 clrl %d0 if ( info->maximum == 0 ) return NULL; #endif return info; } 46d74: 242e fff8 movel %fp@(-8),%d2 46d78: 262e fffc movel %fp@(-4),%d3 46d7c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000544b4 <_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; 544b4: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 544b6: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 544b8: 4e56 0000 linkw %fp,#0 544bc: 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; 544c0: 90a8 0006 subl %a0@(6),%d0 544c4: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 544c8: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 544cc: 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 ) { 544d0: b081 cmpl %d1,%d0 544d2: 620e bhis 544e2 <_Objects_Get_no_protection+0x2e> if ( (the_object = information->local_table[ index ]) != NULL ) { 544d4: 2068 0018 moveal %a0@(24),%a0 544d8: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 544dc: 6704 beqs 544e2 <_Objects_Get_no_protection+0x2e><== NEVER TAKEN *location = OBJECTS_LOCAL; 544de: 4291 clrl %a1@ return the_object; 544e0: 6006 bras 544e8 <_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; 544e2: 7001 moveq #1,%d0 544e4: 2280 movel %d0,%a1@ return NULL; 544e6: 4280 clrl %d0 } 544e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047d04 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 47d04: 4e56 fffc linkw %fp,#-4 47d08: 222e 0008 movel %fp@(8),%d1 47d0c: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 47d0e: 4a81 tstl %d1 47d10: 660a bnes 47d1c <_Objects_Id_to_name+0x18> 47d12: 2079 0005 dc38 moveal 5dc38 <_Per_CPU_Information+0xc>,%a0 47d18: 2228 0008 movel %a0@(8),%d1 47d1c: 7418 moveq #24,%d2 47d1e: 2001 movel %d1,%d0 47d20: e4a8 lsrl %d2,%d0 47d22: 143c 0007 moveb #7,%d2 47d26: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 47d28: 143c 0002 moveb #2,%d2 47d2c: 2040 moveal %d0,%a0 47d2e: 5388 subql #1,%a0 47d30: b488 cmpl %a0,%d2 47d32: 6538 bcss 47d6c <_Objects_Id_to_name+0x68> 47d34: 6040 bras 47d76 <_Objects_Id_to_name+0x72> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 47d36: 2001 movel %d1,%d0 47d38: 741b moveq #27,%d2 47d3a: 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 ]; 47d3c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 47d40: 672a beqs 47d6c <_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 ); 47d42: 486e fffc pea %fp@(-4) 47d46: 2f01 movel %d1,%sp@- 47d48: 2f00 movel %d0,%sp@- 47d4a: 4eb9 0004 7ca4 jsr 47ca4 <_Objects_Get> if ( !the_object ) 47d50: 4fef 000c lea %sp@(12),%sp 47d54: 4a80 tstl %d0 47d56: 6714 beqs 47d6c <_Objects_Id_to_name+0x68> return OBJECTS_INVALID_ID; *name = the_object->name; 47d58: 206e 000c moveal %fp@(12),%a0 47d5c: 2240 moveal %d0,%a1 47d5e: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 47d62: 4eb9 0004 8562 jsr 48562 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 47d68: 4280 clrl %d0 47d6a: 6002 bras 47d6e <_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; 47d6c: 7003 moveq #3,%d0 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 47d6e: 242e fff8 movel %fp@(-8),%d2 47d72: 4e5e unlk %fp 47d74: 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 ] ) 47d76: 41f9 0005 da30 lea 5da30 <_Objects_Information_table>,%a0 47d7c: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47d80: 4a88 tstl %a0 47d82: 66b2 bnes 47d36 <_Objects_Id_to_name+0x32> <== ALWAYS TAKEN 47d84: 60e6 bras 47d6c <_Objects_Id_to_name+0x68> <== NOT EXECUTED ... =============================================================================== 00046e38 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46e38: 4e56 fff4 linkw %fp,#-12 46e3c: 206e 0008 moveal %fp@(8),%a0 46e40: 48d7 001c moveml %d2-%d4,%sp@ 46e44: 4284 clrl %d4 46e46: 382e 001a movew %fp@(26),%d4 46e4a: 202e 000c movel %fp@(12),%d0 46e4e: 2244 moveal %d4,%a1 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 46e50: 4244 clrw %d4 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 46e52: 2149 0014 movel %a1,%a0@(20) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 46e56: 43f9 0005 c578 lea 5c578 <_Objects_Information_table>,%a1 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46e5c: 222e 0014 movel %fp@(20),%d1 46e60: 262e 0010 movel %fp@(16),%d3 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 46e64: 3144 0028 movew %d4,%a0@(40) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 46e68: 3144 000e movew %d4,%a0@(14) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 46e6c: 2271 0c00 moveal %a1@(00000000,%d0:l:4),%a1 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 46e70: 2801 movel %d1,%d4 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46e72: 242e 0020 movel %fp@(32),%d2 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 46e76: 2080 movel %d0,%a0@ information->the_class = the_class; 46e78: 3143 0004 movew %d3,%a0@(4) information->size = size; information->local_table = 0; 46e7c: 42a8 0018 clrl %a0@(24) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 46e80: d884 addl %d4,%d4 46e82: 9984 subxl %d4,%d4 46e84: 4484 negl %d4 information->the_api = the_api; information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; 46e86: 42a8 002a clrl %a0@(42) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 46e8a: 0881 001f bclr #31,%d1 information->the_api = the_api; information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; 46e8e: 42a8 002e clrl %a0@(46) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 46e92: 2388 3c00 movel %a0,%a1@(00000000,%d3:l:4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 46e96: 1144 0010 moveb %d4,%a0@(16) maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 46e9a: 4a84 tstl %d4 46e9c: 6714 beqs 46eb2 <_Objects_Initialize_information+0x7a> 46e9e: 4a81 tstl %d1 46ea0: 6610 bnes 46eb2 <_Objects_Initialize_information+0x7a> _Internal_error_Occurred( 46ea2: 4878 0013 pea 13 46ea6: 4878 0001 pea 1 46eaa: 42a7 clrl %sp@- 46eac: 4eb9 0004 68cc jsr 468cc <_Internal_error_Occurred> uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 46eb2: 7818 moveq #24,%d4 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 46eb4: 43f9 0005 bd74 lea 5bd74 ,%a1 46eba: e9a8 lsll %d4,%d0 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 46ebc: 183c 001b moveb #27,%d4 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 46ec0: 08c0 0010 bset #16,%d0 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 46ec4: e9ab lsll %d4,%d3 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 46ec6: 3141 0012 movew %d1,%a0@(18) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 46eca: 2149 0018 movel %a1,%a0@(24) 46ece: 8083 orl %d3,%d0 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 46ed0: 4a81 tstl %d1 46ed2: 56c3 sne %d3 46ed4: 49c3 extbl %d3 46ed6: 4483 negl %d3 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 46ed8: 8083 orl %d3,%d0 46eda: 2140 0006 movel %d0,%a0@(6) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 46ede: 7003 moveq #3,%d0 46ee0: c082 andl %d2,%d0 46ee2: 670a beqs 46eee <_Objects_Initialize_information+0xb6><== ALWAYS TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 46ee4: 2002 movel %d2,%d0 <== NOT EXECUTED 46ee6: 5880 addql #4,%d0 <== NOT EXECUTED 46ee8: 74fc moveq #-4,%d2 <== NOT EXECUTED 46eea: c082 andl %d2,%d0 <== NOT EXECUTED 46eec: 6002 bras 46ef0 <_Objects_Initialize_information+0xb8><== NOT EXECUTED /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 46eee: 2002 movel %d2,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 46ef0: 43e8 0020 lea %a0@(32),%a1 46ef4: 2149 001c movel %a1,%a0@(28) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; _Chain_Initialize_empty( &information->Inactive ); 46ef8: 43e8 001c lea %a0@(28),%a1 if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 46efc: 3140 0032 movew %d0,%a0@(50) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 46f00: 42a8 0020 clrl %a0@(32) _Chain_Initialize_empty( &information->Inactive ); 46f04: 2149 0024 movel %a1,%a0@(36) /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 46f08: 4a81 tstl %d1 46f0a: 6712 beqs 46f1e <_Objects_Initialize_information+0xe6> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 46f0c: 2d48 0008 movel %a0,%fp@(8) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 46f10: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 46f16: 4e5e unlk %fp /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 46f18: 4ef9 0004 6a30 jmp 46a30 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 46f1e: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 46f24: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b3e8 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 4b3e8: 4e56 0000 linkw %fp,#0 4b3ec: 2f03 movel %d3,%sp@- 4b3ee: 262e 000c movel %fp@(12),%d3 4b3f2: 2f02 movel %d2,%sp@- 4b3f4: 242e 0008 movel %fp@(8),%d2 if ( !the_heap ) 4b3f8: 672e beqs 4b428 <_Protected_heap_Get_information+0x40><== NEVER TAKEN return false; if ( !the_info ) 4b3fa: 4a83 tstl %d3 4b3fc: 672a beqs 4b428 <_Protected_heap_Get_information+0x40><== NEVER TAKEN return false; _RTEMS_Lock_allocator(); 4b3fe: 2f39 0006 1f1a movel 61f1a <_RTEMS_Allocator_Mutex>,%sp@- 4b404: 4eb9 0004 9ad4 jsr 49ad4 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 4b40a: 2f03 movel %d3,%sp@- 4b40c: 2f02 movel %d2,%sp@- 4b40e: 4eb9 0004 e994 jsr 4e994 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 4b414: 2f39 0006 1f1a movel 61f1a <_RTEMS_Allocator_Mutex>,%sp@- 4b41a: 4eb9 0004 9b34 jsr 49b34 <_API_Mutex_Unlock> return true; 4b420: 4fef 0010 lea %sp@(16),%sp 4b424: 7001 moveq #1,%d0 4b426: 6002 bras 4b42a <_Protected_heap_Get_information+0x42> { if ( !the_heap ) return false; if ( !the_info ) return false; 4b428: 4200 clrb %d0 _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } 4b42a: 242e fff8 movel %fp@(-8),%d2 4b42e: 262e fffc movel %fp@(-4),%d3 4b432: 4e5e unlk %fp ... =============================================================================== 00049ea0 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 49ea0: 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 ]; 49ea4: 206e 0008 moveal %fp@(8),%a0 */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 49ea8: 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 ]; 49eac: 2468 0108 moveal %a0@(264),%a2 if ( !api ) 49eb0: 4a8a tstl %a2 49eb2: 6754 beqs 49f08 <_RTEMS_tasks_Post_switch_extension+0x68><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 49eb4: 203c 0000 0700 movel #1792,%d0 49eba: 40c1 movew %sr,%d1 49ebc: 8081 orl %d1,%d0 49ebe: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 49ec0: 262a 0012 movel %a2@(18),%d3 asr->signals_posted = 0; 49ec4: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 49ec8: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 49eca: 4a83 tstl %d3 49ecc: 673a beqs 49f08 <_RTEMS_tasks_Post_switch_extension+0x68> return; asr->nest_level += 1; 49ece: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 49ed2: 240e movel %fp,%d2 49ed4: 5982 subql #4,%d2 49ed6: 47f9 0004 b8f0 lea 4b8f0 ,%a3 49edc: 2f02 movel %d2,%sp@- 49ede: 2f3c 0000 ffff movel #65535,%sp@- 49ee4: 2f2a 000e movel %a2@(14),%sp@- 49ee8: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 49eea: 2f03 movel %d3,%sp@- 49eec: 206a 000a moveal %a2@(10),%a0 49ef0: 4e90 jsr %a0@ asr->nest_level -= 1; 49ef2: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 49ef6: 2f02 movel %d2,%sp@- 49ef8: 2f3c 0000 ffff movel #65535,%sp@- 49efe: 2f2e fffc movel %fp@(-4),%sp@- 49f02: 4e93 jsr %a3@ 49f04: 4fef 001c lea %sp@(28),%sp } 49f08: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 49f0e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000577cc <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 577cc: 4e56 ffe4 linkw %fp,#-28 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 577d0: 2039 0007 5048 movel 75048 <_Thread_Dispatch_disable_level>,%d0 577d6: 5280 addql #1,%d0 577d8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 577dc: 266e 0008 moveal %fp@(8),%a3 577e0: 23c0 0007 5048 movel %d0,75048 <_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(); 577e6: 2f39 0007 50ea movel 750ea <_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 ); 577ec: 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 ); 577ee: 260b movel %a3,%d3 577f0: 0682 0000 0010 addil #16,%d2 577f6: 0683 0000 0068 addil #104,%d3 577fc: 4bf9 0005 358c lea 5358c <_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 ); 57802: 49f9 0005 7dbc lea 57dbc <_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(); 57808: 4eb9 0005 2bd4 jsr 52bd4 <_API_Mutex_Unlock> 5780e: 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 ); 57810: 283c 0005 7ebc movel #360124,%d4 57816: 2f02 movel %d2,%sp@- 57818: 2044 moveal %d4,%a0 5781a: 4e90 jsr %a0@ if ( the_thread == NULL ) 5781c: 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 ); 5781e: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 57820: 4a80 tstl %d0 57822: 672c beqs 57850 <_Region_Process_queue+0x84> 57824: 42a7 clrl %sp@- 57826: 42a7 clrl %sp@- 57828: 2f2a 0024 movel %a2@(36),%sp@- 5782c: 2f03 movel %d3,%sp@- 5782e: 4e95 jsr %a5@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 57830: 4fef 0010 lea %sp@(16),%sp 57834: 4a80 tstl %d0 57836: 6718 beqs 57850 <_Region_Process_queue+0x84> break; *(void **)the_thread->Wait.return_argument = the_segment; 57838: 206a 0028 moveal %a2@(40),%a0 5783c: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; 5783e: 52ab 0064 addql #1,%a3@(100) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 57842: 2f0a movel %a2,%sp@- 57844: 2f02 movel %d2,%sp@- 57846: 4e94 jsr %a4@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 57848: 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; 5784a: 42aa 0034 clrl %a2@(52) } 5784e: 60c6 bras 57816 <_Region_Process_queue+0x4a> _Thread_Enable_dispatch(); } 57850: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 57856: 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(); 57858: 4ef9 0005 4d26 jmp 54d26 <_Thread_Enable_dispatch> ... =============================================================================== 00046178 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46178: 4e56 0000 linkw %fp,#0 4617c: 206e 0008 moveal %fp@(8),%a0 46180: 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(); 46182: 2039 0005 d030 movel 5d030 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46188: 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) || 4618a: 4a88 tstl %a0 4618c: 6762 beqs 461f0 <_TOD_Validate+0x78> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 4618e: 243c 000f 4240 movel #1000000,%d2 46194: 4c40 2002 remul %d0,%d2,%d2 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 46198: b4a8 0018 cmpl %a0@(24),%d2 4619c: 6352 blss 461f0 <_TOD_Validate+0x78> (the_tod->ticks >= ticks_per_second) || 4619e: 763b moveq #59,%d3 461a0: b6a8 0014 cmpl %a0@(20),%d3 461a4: 654a bcss 461f0 <_TOD_Validate+0x78> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 461a6: b6a8 0010 cmpl %a0@(16),%d3 461aa: 6544 bcss 461f0 <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 461ac: 7017 moveq #23,%d0 461ae: b0a8 000c cmpl %a0@(12),%d0 461b2: 653c bcss 461f0 <_TOD_Validate+0x78> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 461b4: 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) || 461b8: 6736 beqs 461f0 <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->month == 0) || 461ba: 720c moveq #12,%d1 461bc: b280 cmpl %d0,%d1 461be: 6530 bcss 461f0 <_TOD_Validate+0x78> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 461c0: 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) || 461c2: 0c82 0000 07c3 cmpil #1987,%d2 461c8: 6326 blss 461f0 <_TOD_Validate+0x78> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 461ca: 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) || 461ce: 6720 beqs 461f0 <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 461d0: 163c 0003 moveb #3,%d3 461d4: 41f9 0005 c19a lea 5c19a <_TOD_Days_per_month>,%a0 461da: c483 andl %d3,%d2 461dc: 6606 bnes 461e4 <_TOD_Validate+0x6c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 461de: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0 461e2: 6004 bras 461e8 <_TOD_Validate+0x70> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 461e4: 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( 461e8: b081 cmpl %d1,%d0 461ea: 54c0 scc %d0 461ec: 4480 negl %d0 461ee: 6002 bras 461f2 <_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; 461f0: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 461f2: 241f movel %sp@+,%d2 461f4: 261f movel %sp@+,%d3 461f6: 4e5e unlk %fp ... =============================================================================== 0004712c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4712c: 4e56 fff0 linkw %fp,#-16 47130: 48d7 041c moveml %d2-%d4/%a2,%sp@ 47134: 246e 0008 moveal %fp@(8),%a2 */ /* * Save original state */ original_state = the_thread->current_state; 47138: 242a 0010 movel %a2@(16),%d2 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4713c: 262e 000c movel %fp@(12),%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 ); 47140: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47142: 182e 0013 moveb %fp@(19),%d4 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 47146: 4eb9 0004 7f0c jsr 47f0c <_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 ) 4714c: 588f addql #4,%sp 4714e: b6aa 0014 cmpl %a2@(20),%d3 47152: 670c beqs 47160 <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 47154: 2f03 movel %d3,%sp@- 47156: 2f0a movel %a2,%sp@- 47158: 4eb9 0004 7db4 jsr 47db4 <_Thread_Set_priority> 4715e: 508f addql #8,%sp _ISR_Disable( level ); 47160: 223c 0000 0700 movel #1792,%d1 47166: 40c0 movew %sr,%d0 47168: 8280 orl %d0,%d1 4716a: 46c1 movew %d1,%sr 4716c: 7604 moveq #4,%d3 /* * 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; 4716e: 222a 0010 movel %a2@(16),%d1 47172: c483 andl %d3,%d2 if ( state != STATES_TRANSIENT ) { 47174: b681 cmpl %d1,%d3 47176: 6730 beqs 471a8 <_Thread_Change_priority+0x7c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 47178: 4a82 tstl %d2 4717a: 6608 bnes 47184 <_Thread_Change_priority+0x58> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4717c: 74fb moveq #-5,%d2 4717e: c481 andl %d1,%d2 47180: 2542 0010 movel %d2,%a2@(16) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 47184: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 47186: 0281 0003 bee0 andil #245472,%d1 if ( _States_Is_waiting_on_thread_queue( state ) ) { 4718c: 6700 00d2 beqw 47260 <_Thread_Change_priority+0x134> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 47190: 2d4a 000c movel %a2,%fp@(12) 47194: 2d6a 0044 0008 movel %a2@(68),%fp@(8) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 4719a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 471a0: 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 ); 471a2: 4ef9 0004 7d18 jmp 47d18 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 471a8: 4a82 tstl %d2 471aa: 6650 bnes 471fc <_Thread_Change_priority+0xd0> <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 471ac: 206a 008e moveal %a2@(142),%a0 471b0: 322a 0094 movew %a2@(148),%d1 471b4: 3410 movew %a0@,%d2 * 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 ); 471b6: 42aa 0010 clrl %a2@(16) 471ba: 8282 orl %d2,%d1 471bc: 3081 movew %d1,%a0@ 471be: 206a 008a moveal %a2@(138),%a0 _Priority_Major_bit_map |= the_priority_map->ready_major; 471c2: 3239 0005 c65c movew 5c65c <_Priority_Major_bit_map>,%d1 471c8: 342a 0092 movew %a2@(146),%d2 471cc: 8282 orl %d2,%d1 471ce: 33c1 0005 c65c movew %d1,5c65c <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 471d4: 4a04 tstb %d4 471d6: 6710 beqs 471e8 <_Thread_Change_priority+0xbc> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 471d8: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 471da: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 471de: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 471e0: 234a 0004 movel %a2,%a1@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 471e4: 2489 movel %a1,%a2@ 471e6: 6014 bras 471fc <_Thread_Change_priority+0xd0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 471e8: 2608 movel %a0,%d3 471ea: 5883 addql #4,%d3 ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 471ec: 2268 0008 moveal %a0@(8),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 471f0: 2483 movel %d3,%a2@ { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 471f2: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; 471f6: 228a movel %a2,%a1@ the_node->previous = old_last_node; 471f8: 2549 0004 movel %a1,%a2@(4) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 471fc: 223c 0000 0700 movel #1792,%d1 47202: 46c0 movew %d0,%sr 47204: 8280 orl %d0,%d1 47206: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 47208: 3239 0005 c65c movew 5c65c <_Priority_Major_bit_map>,%d1 4720e: 4841 swap %d1 47210: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 47212: 4282 clrl %d2 47214: 41f9 0005 c6c4 lea 5c6c4 <_Priority_Bit_map>,%a0 4721a: 3401 movew %d1,%d2 4721c: 3230 2a00 movew %a0@(00000000,%d2:l:2),%d1 47220: 4841 swap %d1 47222: 04c1 ff1 %d1 return (_Priority_Bits_index( major ) << 4) + 47224: 4283 clrl %d3 47226: e98a lsll #4,%d2 47228: 3601 movew %d1,%d3 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 4722a: 2079 0005 c570 moveal 5c570 <_Thread_Ready_chain>,%a0 47230: 2202 movel %d2,%d1 47232: d283 addl %d3,%d1 47234: 2401 movel %d1,%d2 47236: e58a lsll #2,%d2 47238: e989 lsll #4,%d1 4723a: 91c2 subal %d2,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4723c: 2230 1800 movel %a0@(00000000,%d1:l),%d1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 47240: 2079 0005 c780 moveal 5c780 <_Per_CPU_Information+0xc>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 47246: 23c1 0005 c784 movel %d1,5c784 <_Per_CPU_Information+0x10> * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 4724c: b288 cmpl %a0,%d1 4724e: 670e beqs 4725e <_Thread_Change_priority+0x132> 47250: 4a28 0074 tstb %a0@(116) 47254: 6708 beqs 4725e <_Thread_Change_priority+0x132> _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; 47256: 7201 moveq #1,%d1 47258: 13c1 0005 c78c moveb %d1,5c78c <_Per_CPU_Information+0x18> _ISR_Enable( level ); 4725e: 46c0 movew %d0,%sr } 47260: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47266: 4e5e unlk %fp ... =============================================================================== 0004726c <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 4726c: 4e56 fff0 linkw %fp,#-16 47270: 206e 0008 moveal %fp@(8),%a0 47274: 48d7 041c moveml %d2-%d4/%a2,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 47278: 263c 0000 0700 movel #1792,%d3 4727e: 2203 movel %d3,%d1 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 47280: 202e 000c movel %fp@(12),%d0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 47284: 40c2 movew %sr,%d2 47286: 8282 orl %d2,%d1 47288: 46c1 movew %d1,%sr current_state = the_thread->current_state; 4728a: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 4728e: 2800 movel %d0,%d4 47290: c881 andl %d1,%d4 47292: 6778 beqs 4730c <_Thread_Clear_state+0xa0> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 47294: 4680 notl %d0 47296: c081 andl %d1,%d0 current_state = the_thread->current_state = _States_Clear( state, current_state ); 47298: 2140 0010 movel %d0,%a0@(16) if ( _States_Is_ready( current_state ) ) { 4729c: 666e bnes 4730c <_Thread_Clear_state+0xa0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4729e: 2268 008e moveal %a0@(142),%a1 472a2: 3028 0094 movew %a0@(148),%d0 472a6: 3211 movew %a1@,%d1 472a8: 8081 orl %d1,%d0 472aa: 3280 movew %d0,%a1@ _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 472ac: 2268 008a moveal %a0@(138),%a1 _Priority_Major_bit_map |= the_priority_map->ready_major; 472b0: 3039 0005 c65c movew 5c65c <_Priority_Major_bit_map>,%d0 472b6: 3228 0092 movew %a0@(146),%d1 ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 472ba: 2469 0008 moveal %a1@(8),%a2 472be: 8081 orl %d1,%d0 472c0: 33c0 0005 c65c movew %d0,5c65c <_Priority_Major_bit_map> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 472c6: 2009 movel %a1,%d0 472c8: 5880 addql #4,%d0 472ca: 2080 movel %d0,%a0@ { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 472cc: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; 472d0: 2488 movel %a0,%a2@ the_node->previous = old_last_node; 472d2: 214a 0004 movel %a2,%a0@(4) _ISR_Flash( level ); 472d6: 2003 movel %d3,%d0 472d8: 46c2 movew %d2,%sr 472da: 8082 orl %d2,%d0 472dc: 46c0 movew %d0,%sr * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 472de: 2028 0014 movel %a0@(20),%d0 472e2: 2279 0005 c784 moveal 5c784 <_Per_CPU_Information+0x10>,%a1 472e8: b0a9 0014 cmpl %a1@(20),%d0 472ec: 641e bccs 4730c <_Thread_Clear_state+0xa0> _Thread_Heir = the_thread; 472ee: 23c8 0005 c784 movel %a0,5c784 <_Per_CPU_Information+0x10> if ( _Thread_Executing->is_preemptible || 472f4: 2079 0005 c780 moveal 5c780 <_Per_CPU_Information+0xc>,%a0 472fa: 4a28 0074 tstb %a0@(116) 472fe: 6604 bnes 47304 <_Thread_Clear_state+0x98> 47300: 4a80 tstl %d0 47302: 6608 bnes 4730c <_Thread_Clear_state+0xa0> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47304: 7001 moveq #1,%d0 47306: 13c0 0005 c78c moveb %d0,5c78c <_Per_CPU_Information+0x18> } } } _ISR_Enable( level ); 4730c: 46c2 movew %d2,%sr } 4730e: 4cd7 041c moveml %sp@,%d2-%d4/%a2 47312: 4e5e unlk %fp ... =============================================================================== 00047498 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 47498: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 4749c: 486e fffc pea %fp@(-4) 474a0: 2f2e 0008 movel %fp@(8),%sp@- 474a4: 4eb9 0004 7638 jsr 47638 <_Thread_Get> switch ( location ) { 474aa: 508f addql #8,%sp 474ac: 4aae fffc tstl %fp@(-4) 474b0: 661e bnes 474d0 <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 474b2: 2f3c 1000 0018 movel #268435480,%sp@- 474b8: 2f00 movel %d0,%sp@- 474ba: 4eb9 0004 726c jsr 4726c <_Thread_Clear_state> 474c0: 508f addql #8,%sp 474c2: 2039 0005 c5bc movel 5c5bc <_Thread_Dispatch_disable_level>,%d0 474c8: 5380 subql #1,%d0 474ca: 23c0 0005 c5bc movel %d0,5c5bc <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 474d0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000474d4 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 474d4: 4e56 ffc8 linkw %fp,#-56 474d8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 474dc: 283c 0000 0700 movel #1792,%d4 474e2: 2204 movel %d4,%d1 { Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 474e4: 2479 0005 c780 moveal 5c780 <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 474ea: 40c0 movew %sr,%d0 474ec: 8280 orl %d0,%d1 474ee: 46c1 movew %d1,%sr _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 474f0: 260e movel %fp,%d3 _Timestamp_Subtract( 474f2: 240e movel %fp,%d2 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 474f4: 5183 subql #8,%d3 _Timestamp_Subtract( 474f6: 0682 ffff fff0 addil #-16,%d2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 474fc: 2e3c 0004 8244 movel #295492,%d7 if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 47502: 2c3c 0004 84f8 movel #296184,%d6 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 47508: 2a3c 0004 880c movel #296972,%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 ); 4750e: 4bf9 0004 8974 lea 48974 <_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 ); 47514: 49f9 0004 8952 lea 48952 <_CPU_Context_save_fp>,%a4 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 4751a: 6000 00d4 braw 475f0 <_Thread_Dispatch+0x11c> heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 4751e: 7201 moveq #1,%d1 47520: 23c1 0005 c5bc movel %d1,5c5bc <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 47526: 2679 0005 c784 moveal 5c784 <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 4752c: 4201 clrb %d1 _Thread_Executing = heir; 4752e: 23cb 0005 c780 movel %a3,5c780 <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 47534: 13c1 0005 c78c moveb %d1,5c78c <_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 ) 4753a: b5cb cmpal %a3,%a2 4753c: 6700 00bc beqw 475fa <_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 ) 47540: 7201 moveq #1,%d1 47542: b2ab 007a cmpl %a3@(122),%d1 47546: 660a bnes 47552 <_Thread_Dispatch+0x7e> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 47548: 41f9 0005 c574 lea 5c574 <_Thread_Ticks_per_timeslice>,%a0 4754e: 2750 0076 movel %a0@,%a3@(118) _ISR_Enable( level ); 47552: 46c0 movew %d0,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47554: 2f03 movel %d3,%sp@- 47556: 4eb9 0004 a228 jsr 4a228 <_TOD_Get_uptime> _Timestamp_Subtract( 4755c: 2f02 movel %d2,%sp@- 4755e: 2f03 movel %d3,%sp@- 47560: 4879 0005 c66a pea 5c66a <_Thread_Time_of_last_context_switch> 47566: 4eb9 0004 827c jsr 4827c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 4756c: 2047 moveal %d7,%a0 4756e: 2f02 movel %d2,%sp@- 47570: 486a 0082 pea %a2@(130) 47574: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47576: 2079 0005 c642 moveal 5c642 <_Thread_libc_reent>,%a0 4757c: 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; 47580: 202e fff8 movel %fp@(-8),%d0 47584: 222e fffc movel %fp@(-4),%d1 47588: 23c0 0005 c66a movel %d0,5c66a <_Thread_Time_of_last_context_switch> 4758e: 23c1 0005 c66e movel %d1,5c66e <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47594: 4a88 tstl %a0 47596: 6708 beqs 475a0 <_Thread_Dispatch+0xcc> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 47598: 2550 0104 movel %a0@,%a2@(260) *_Thread_libc_reent = heir->libc_reent; 4759c: 20ab 0104 movel %a3@(260),%a0@ } _User_extensions_Thread_switch( executing, heir ); 475a0: 2f0b movel %a3,%sp@- 475a2: 2046 moveal %d6,%a0 475a4: 2f0a movel %a2,%sp@- 475a6: 4e90 jsr %a0@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 475a8: 486b 00cc pea %a3@(204) 475ac: 2045 moveal %d5,%a0 475ae: 486a 00cc pea %a2@(204) 475b2: 4e90 jsr %a0@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 475b4: 4fef 0010 lea %sp@(16),%sp 475b8: 4aaa 0100 tstl %a2@(256) 475bc: 6724 beqs 475e2 <_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 ); 475be: 2079 0005 c63e moveal 5c63e <_Thread_Allocated_fp>,%a0 475c4: b1ca cmpal %a2,%a0 475c6: 671a beqs 475e2 <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 475c8: 4a88 tstl %a0 475ca: 6708 beqs 475d4 <_Thread_Dispatch+0x100> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 475cc: 4868 0100 pea %a0@(256) 475d0: 4e94 jsr %a4@ 475d2: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 475d4: 486a 0100 pea %a2@(256) 475d8: 4e95 jsr %a5@ _Thread_Allocated_fp = executing; 475da: 588f addql #4,%sp 475dc: 23ca 0005 c63e movel %a2,5c63e <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 475e2: 2479 0005 c780 moveal 5c780 <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 475e8: 2204 movel %d4,%d1 475ea: 40c0 movew %sr,%d0 475ec: 8280 orl %d0,%d1 475ee: 46c1 movew %d1,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 475f0: 1239 0005 c78c moveb 5c78c <_Per_CPU_Information+0x18>,%d1 475f6: 6600 ff26 bnew 4751e <_Thread_Dispatch+0x4a> _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 475fa: 42b9 0005 c5bc clrl 5c5bc <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 47600: 46c0 movew %d0,%sr _API_extensions_Run_postswitch(); 47602: 4eb9 0004 5f88 jsr 45f88 <_API_extensions_Run_postswitch> } 47608: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4760e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047638 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 47638: 4e56 0000 linkw %fp,#0 4763c: 202e 0008 movel %fp@(8),%d0 47640: 2f03 movel %d3,%sp@- 47642: 206e 000c moveal %fp@(12),%a0 47646: 2f02 movel %d2,%sp@- uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 47648: 4a80 tstl %d0 4764a: 6618 bnes 47664 <_Thread_Get+0x2c> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4764c: 2039 0005 c5bc movel 5c5bc <_Thread_Dispatch_disable_level>,%d0 47652: 5280 addql #1,%d0 47654: 23c0 0005 c5bc movel %d0,5c5bc <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4765a: 4290 clrl %a0@ tp = _Thread_Executing; 4765c: 2039 0005 c780 movel 5c780 <_Per_CPU_Information+0xc>,%d0 goto done; 47662: 6044 bras 476a8 <_Thread_Get+0x70> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 47664: 7418 moveq #24,%d2 47666: 2200 movel %d0,%d1 47668: e4a9 lsrl %d2,%d1 4766a: 7607 moveq #7,%d3 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 4766c: 143c 0002 moveb #2,%d2 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 47670: c283 andl %d3,%d1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 47672: 2241 moveal %d1,%a1 47674: 5389 subql #1,%a1 47676: b489 cmpl %a1,%d2 47678: 643a bccs 476b4 <_Thread_Get+0x7c> 4767a: 6014 bras 47690 <_Thread_Get+0x58> if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 4767c: 43f9 0005 c578 lea 5c578 <_Objects_Information_table>,%a1 47682: 2271 1c00 moveal %a1@(00000000,%d1:l:4),%a1 if ( !api_information ) { 47686: 4a89 tstl %a1 47688: 6706 beqs 47690 <_Thread_Get+0x58> <== NEVER TAKEN *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 4768a: 2229 0004 movel %a1@(4),%d1 if ( !information ) { 4768e: 6608 bnes 47698 <_Thread_Get+0x60> *location = OBJECTS_ERROR; 47690: 7001 moveq #1,%d0 47692: 2080 movel %d0,%a0@ { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; 47694: 4280 clrl %d0 } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; goto done; 47696: 6010 bras 476a8 <_Thread_Get+0x70> } tp = (Thread_Control *) _Objects_Get( information, id, location ); 47698: 2f08 movel %a0,%sp@- 4769a: 2f00 movel %d0,%sp@- 4769c: 2f01 movel %d1,%sp@- 4769e: 4eb9 0004 6dd8 jsr 46dd8 <_Objects_Get> 476a4: 4fef 000c lea %sp@(12),%sp done: return tp; } 476a8: 242e fff8 movel %fp@(-8),%d2 476ac: 262e fffc movel %fp@(-4),%d3 476b0: 4e5e unlk %fp 476b2: 4e75 rts */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 476b4: 761b moveq #27,%d3 476b6: 2400 movel %d0,%d2 476b8: e6aa lsrl %d3,%d2 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 476ba: 163c 0001 moveb #1,%d3 476be: b682 cmpl %d2,%d3 476c0: 67ba beqs 4767c <_Thread_Get+0x44> 476c2: 60cc bras 47690 <_Thread_Get+0x58> =============================================================================== 0004bb78 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4bb78: 4e56 0000 linkw %fp,#0 4bb7c: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4bb7e: 2479 0005 c780 moveal 5c780 <_Per_CPU_Information+0xc>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4bb84: 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; 4bb86: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4bb8a: 40c0 movew %sr,%d0 4bb8c: e189 lsll #8,%d1 4bb8e: 0280 0000 f8ff andil #63743,%d0 4bb94: 8081 orl %d1,%d0 4bb96: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4bb98: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4bb9a: 1439 0005 bd7c moveb 5bd7c ,%d2 doneConstructors = 1; 4bba0: 13c0 0005 bd7c moveb %d0,5bd7c #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4bba6: 4aaa 0100 tstl %a2@(256) 4bbaa: 6720 beqs 4bbcc <_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 ); 4bbac: 2079 0005 c63e moveal 5c63e <_Thread_Allocated_fp>,%a0 4bbb2: b1ca cmpal %a2,%a0 4bbb4: 6716 beqs 4bbcc <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4bbb6: 4a88 tstl %a0 4bbb8: 670c beqs 4bbc6 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4bbba: 4868 0100 pea %a0@(256) 4bbbe: 4eb9 0004 8952 jsr 48952 <_CPU_Context_save_fp> 4bbc4: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4bbc6: 23ca 0005 c63e movel %a2,5c63e <_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 ); 4bbcc: 2f0a movel %a2,%sp@- 4bbce: 4eb9 0004 8374 jsr 48374 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4bbd4: 4eb9 0004 7612 jsr 47612 <_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) */ { 4bbda: 588f addql #4,%sp 4bbdc: 4a02 tstb %d2 4bbde: 6606 bnes 4bbe6 <_Thread_Handler+0x6e> INIT_NAME (); 4bbe0: 4eb9 0005 9568 jsr 59568 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4bbe6: 4aaa 009e tstl %a2@(158) 4bbea: 6610 bnes 4bbfc <_Thread_Handler+0x84> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4bbec: 2f2a 00a6 movel %a2@(166),%sp@- 4bbf0: 206a 009a moveal %a2@(154),%a0 4bbf4: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4bbf6: 588f addql #4,%sp 4bbf8: 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 ); 4bbfc: 2f0a movel %a2,%sp@- 4bbfe: 4eb9 0004 83ac jsr 483ac <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4bc04: 4878 0005 pea 5 4bc08: 4878 0001 pea 1 4bc0c: 42a7 clrl %sp@- 4bc0e: 4eb9 0004 68cc jsr 468cc <_Internal_error_Occurred> =============================================================================== 000476c4 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 476c4: 4e56 ffec linkw %fp,#-20 476c8: 48d7 043c moveml %d2-%d5/%a2,%sp@ 476cc: 246e 000c moveal %fp@(12),%a2 476d0: 242e 0014 movel %fp@(20),%d2 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 476d4: 42aa 0108 clrl %a2@(264) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 476d8: 282e 001c movel %fp@(28),%d4 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 476dc: 42aa 010c clrl %a2@(268) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 476e0: 162e 001b moveb %fp@(27),%d3 */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; the_thread->libc_reent = NULL; 476e4: 42aa 0104 clrl %a2@(260) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 476e8: 1a2e 0023 moveb %fp@(35),%d5 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 476ec: 2f02 movel %d2,%sp@- 476ee: 2f0a movel %a2,%sp@- 476f0: 4eb9 0004 7f84 jsr 47f84 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 476f6: 508f addql #8,%sp 476f8: 4a80 tstl %d0 476fa: 6700 0142 beqw 4783e <_Thread_Initialize+0x17a> 476fe: b480 cmpl %d0,%d2 47700: 6200 013c bhiw 4783e <_Thread_Initialize+0x17a> void *starting_address, size_t size ) { the_stack->area = starting_address; the_stack->size = size; 47704: 2540 00bc movel %d0,%a2@(188) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 47708: 256a 00c8 00c0 movel %a2@(200),%a2@(192) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 4770e: 4a03 tstb %d3 47710: 6714 beqs 47726 <_Thread_Initialize+0x62> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 47712: 4878 001c pea 1c 47716: 4eb9 0004 87a4 jsr 487a4 <_Workspace_Allocate> if ( !fp_area ) 4771c: 588f addql #4,%sp /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 4771e: 2600 movel %d0,%d3 if ( !fp_area ) 47720: 6606 bnes 47728 <_Thread_Initialize+0x64> 47722: 6000 00c2 braw 477e6 <_Thread_Initialize+0x122> extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 47726: 4283 clrl %d3 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47728: 2039 0005 c64e movel 5c64e <_Thread_Maximum_extensions>,%d0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 4772e: 2543 0100 movel %d3,%a2@(256) the_thread->Start.fp_context = fp_area; 47732: 2543 00c4 movel %d3,%a2@(196) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47736: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 4773a: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 4773e: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 47742: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47746: 4a80 tstl %d0 47748: 6718 beqs 47762 <_Thread_Initialize+0x9e> extensions_area = _Workspace_Allocate( 4774a: e588 lsll #2,%d0 4774c: 2040 moveal %d0,%a0 4774e: 4868 0004 pea %a0@(4) 47752: 4eb9 0004 87a4 jsr 487a4 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 47758: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 4775a: 2400 movel %d0,%d2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 4775c: 6606 bnes 47764 <_Thread_Initialize+0xa0> 4775e: 6000 0088 braw 477e8 <_Thread_Initialize+0x124> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 47762: 4282 clrl %d2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 47764: 2542 0110 movel %d2,%a2@(272) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 47768: 6714 beqs 4777e <_Thread_Initialize+0xba> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 4776a: 2239 0005 c64e movel 5c64e <_Thread_Maximum_extensions>,%d1 47770: 2042 moveal %d2,%a0 47772: 4280 clrl %d0 47774: 6004 bras 4777a <_Thread_Initialize+0xb6> the_thread->extensions[i] = NULL; 47776: 4298 clrl %a0@+ * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 47778: 5280 addql #1,%d0 4777a: b280 cmpl %d0,%d1 4777c: 64f8 bccs 47776 <_Thread_Initialize+0xb2> #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 4777e: 7001 moveq #1,%d0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 47780: 256e 0024 00ac movel %fp@(36),%a2@(172) the_thread->Start.budget_callout = budget_callout; 47786: 256e 0028 00b0 movel %fp@(40),%a2@(176) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 4778c: 256e 002c 00b4 movel %fp@(44),%a2@(180) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 47792: 1545 00aa moveb %d5,%a2@(170) #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 47796: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 4779a: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 4779e: 42aa 001c clrl %a2@(28) the_thread->real_priority = priority; 477a2: 2544 0018 movel %d4,%a2@(24) the_thread->Start.initial_priority = priority; 477a6: 2544 00b8 movel %d4,%a2@(184) _Thread_Set_priority( the_thread, priority ); 477aa: 2f04 movel %d4,%sp@- 477ac: 2f0a movel %a2,%sp@- 477ae: 4eb9 0004 7db4 jsr 47db4 <_Thread_Set_priority> _Thread_Stack_Free( the_thread ); return false; } 477b4: 206e 0008 moveal %fp@(8),%a0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 477b8: 4280 clrl %d0 477ba: 2068 0018 moveal %a0@(24),%a0 477be: 302a 000a movew %a2@(10),%d0 /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 477c2: 42aa 0082 clrl %a2@(130) 477c6: 42aa 0086 clrl %a2@(134) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 477ca: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 477ce: 256e 0030 000c movel %fp@(48),%a2@(12) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 477d4: 2f0a movel %a2,%sp@- 477d6: 4eb9 0004 8430 jsr 48430 <_User_extensions_Thread_create> if ( extension_status ) 477dc: 4fef 000c lea %sp@(12),%sp 477e0: 4a00 tstb %d0 477e2: 6704 beqs 477e8 <_Thread_Initialize+0x124> 477e4: 605c bras 47842 <_Thread_Initialize+0x17e> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 477e6: 4282 clrl %d2 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 477e8: 202a 0104 movel %a2@(260),%d0 477ec: 670a beqs 477f8 <_Thread_Initialize+0x134> _Workspace_Free( the_thread->libc_reent ); 477ee: 2f00 movel %d0,%sp@- 477f0: 4eb9 0004 87c0 jsr 487c0 <_Workspace_Free> 477f6: 588f addql #4,%sp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 477f8: 202a 0108 movel %a2@(264),%d0 477fc: 670a beqs 47808 <_Thread_Initialize+0x144> _Workspace_Free( the_thread->API_Extensions[i] ); 477fe: 2f00 movel %d0,%sp@- 47800: 4eb9 0004 87c0 jsr 487c0 <_Workspace_Free> 47806: 588f addql #4,%sp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 47808: 202a 010c movel %a2@(268),%d0 4780c: 670a beqs 47818 <_Thread_Initialize+0x154> <== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 4780e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 47810: 4eb9 0004 87c0 jsr 487c0 <_Workspace_Free> <== NOT EXECUTED 47816: 588f addql #4,%sp <== NOT EXECUTED if ( extensions_area ) 47818: 4a82 tstl %d2 4781a: 670a beqs 47826 <_Thread_Initialize+0x162> (void) _Workspace_Free( extensions_area ); 4781c: 2f02 movel %d2,%sp@- 4781e: 4eb9 0004 87c0 jsr 487c0 <_Workspace_Free> 47824: 588f addql #4,%sp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 47826: 4a83 tstl %d3 47828: 670a beqs 47834 <_Thread_Initialize+0x170> (void) _Workspace_Free( fp_area ); 4782a: 2f03 movel %d3,%sp@- 4782c: 4eb9 0004 87c0 jsr 487c0 <_Workspace_Free> 47832: 588f addql #4,%sp #endif _Thread_Stack_Free( the_thread ); 47834: 2f0a movel %a2,%sp@- 47836: 4eb9 0004 7fd0 jsr 47fd0 <_Thread_Stack_Free> return false; 4783c: 588f addql #4,%sp * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 4783e: 4200 clrb %d0 47840: 6002 bras 47844 <_Thread_Initialize+0x180> * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; 47842: 7001 moveq #1,%d0 _Thread_Stack_Free( the_thread ); return false; } 47844: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4784a: 4e5e unlk %fp ... =============================================================================== 0004856c <_Thread_Restart>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 4856c: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4856e: 4e56 0000 linkw %fp,#0 48572: 2f0a movel %a2,%sp@- 48574: 246e 0008 moveal %fp@(8),%a2 48578: c0aa 0010 andl %a2@(16),%d0 if ( !_States_Is_dormant( the_thread->current_state ) ) { 4857c: 6664 bnes 485e2 <_Thread_Restart+0x76> _Thread_Set_transient( the_thread ); 4857e: 2f0a movel %a2,%sp@- 48580: 4eb9 0004 8748 jsr 48748 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 48586: 2f2e 0010 movel %fp@(16),%sp@- 4858a: 2f2e 000c movel %fp@(12),%sp@- 4858e: 2f0a movel %a2,%sp@- 48590: 4eb9 0004 b168 jsr 4b168 <_Thread_Reset> _Thread_Load_environment( the_thread ); 48596: 2f0a movel %a2,%sp@- 48598: 4eb9 0004 ae14 jsr 4ae14 <_Thread_Load_environment> _Thread_Ready( the_thread ); 4859e: 2f0a movel %a2,%sp@- 485a0: 4eb9 0004 b0a8 jsr 4b0a8 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 485a6: 2f0a movel %a2,%sp@- 485a8: 4eb9 0004 8cf4 jsr 48cf4 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 485ae: 4fef 001c lea %sp@(28),%sp 485b2: b5f9 0005 d2a8 cmpal 5d2a8 <_Per_CPU_Information+0xc>,%a2 485b8: 662c bnes 485e6 <_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 ) 485ba: 4aaa 0100 tstl %a2@(256) 485be: 670c beqs 485cc <_Thread_Restart+0x60> _Context_Restore_fp( &_Thread_Executing->fp_context ); 485c0: 486a 0100 pea %a2@(256) 485c4: 4eb9 0004 91f0 jsr 491f0 <_CPU_Context_restore_fp> 485ca: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 485cc: 2079 0005 d2a8 moveal 5d2a8 <_Per_CPU_Information+0xc>,%a0 485d2: 41e8 00cc lea %a0@(204),%a0 485d6: 2f08 movel %a0,%sp@- 485d8: 4eb9 0004 909e jsr 4909e <_CPU_Context_Restart_self> 485de: 588f addql #4,%sp <== NOT EXECUTED 485e0: 6004 bras 485e6 <_Thread_Restart+0x7a> <== NOT EXECUTED _Thread_Restart_self(); return true; } return false; 485e2: 4200 clrb %d0 485e4: 6002 bras 485e8 <_Thread_Restart+0x7c> _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 485e6: 7001 moveq #1,%d0 } return false; } 485e8: 246e fffc moveal %fp@(-4),%a2 485ec: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004abe4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4abe4: 4e56 fff4 linkw %fp,#-12 4abe8: 206e 0008 moveal %fp@(8),%a0 4abec: 48d7 040c moveml %d2-%d3/%a2,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4abf0: 243c 0000 0700 movel #1792,%d2 4abf6: 2002 movel %d2,%d0 4abf8: 40c1 movew %sr,%d1 4abfa: 8081 orl %d1,%d0 4abfc: 46c0 movew %d0,%sr current_state = the_thread->current_state; 4abfe: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4ac02: 0800 0001 btst #1,%d0 4ac06: 6778 beqs 4ac80 <_Thread_Resume+0x9c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4ac08: 76fd moveq #-3,%d3 4ac0a: c083 andl %d3,%d0 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 4ac0c: 2140 0010 movel %d0,%a0@(16) if ( _States_Is_ready( current_state ) ) { 4ac10: 666e bnes 4ac80 <_Thread_Resume+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4ac12: 2268 008e moveal %a0@(142),%a1 4ac16: 3028 0094 movew %a0@(148),%d0 4ac1a: 3611 movew %a1@,%d3 4ac1c: 8083 orl %d3,%d0 4ac1e: 3280 movew %d0,%a1@ _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4ac20: 2268 008a moveal %a0@(138),%a1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4ac24: 3039 0005 faa4 movew 5faa4 <_Priority_Major_bit_map>,%d0 4ac2a: 3628 0092 movew %a0@(146),%d3 ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 4ac2e: 2469 0008 moveal %a1@(8),%a2 4ac32: 8083 orl %d3,%d0 4ac34: 33c0 0005 faa4 movew %d0,5faa4 <_Priority_Major_bit_map> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4ac3a: 2009 movel %a1,%d0 4ac3c: 5880 addql #4,%d0 4ac3e: 2080 movel %d0,%a0@ { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 4ac40: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; 4ac44: 2488 movel %a0,%a2@ the_node->previous = old_last_node; 4ac46: 214a 0004 movel %a2,%a0@(4) _ISR_Flash( level ); 4ac4a: 2002 movel %d2,%d0 4ac4c: 46c1 movew %d1,%sr 4ac4e: 8081 orl %d1,%d0 4ac50: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4ac52: 2028 0014 movel %a0@(20),%d0 4ac56: 2279 0005 fbcc moveal 5fbcc <_Per_CPU_Information+0x10>,%a1 4ac5c: b0a9 0014 cmpl %a1@(20),%d0 4ac60: 641e bccs 4ac80 <_Thread_Resume+0x9c> _Thread_Heir = the_thread; 4ac62: 23c8 0005 fbcc movel %a0,5fbcc <_Per_CPU_Information+0x10> if ( _Thread_Executing->is_preemptible || 4ac68: 2079 0005 fbc8 moveal 5fbc8 <_Per_CPU_Information+0xc>,%a0 4ac6e: 4a28 0074 tstb %a0@(116) 4ac72: 6604 bnes 4ac78 <_Thread_Resume+0x94> 4ac74: 4a80 tstl %d0 4ac76: 6608 bnes 4ac80 <_Thread_Resume+0x9c> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4ac78: 7601 moveq #1,%d3 4ac7a: 13c3 0005 fbd4 moveb %d3,5fbd4 <_Per_CPU_Information+0x18> } } } _ISR_Enable( level ); 4ac80: 46c1 movew %d1,%sr } 4ac82: 4cd7 040c moveml %sp@,%d2-%d3/%a2 4ac86: 4e5e unlk %fp ... =============================================================================== 00047fd0 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 47fd0: 4e56 0000 linkw %fp,#0 47fd4: 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 ) 47fd8: 2279 0005 aeb8 moveal 5aeb8 ,%a1 47fde: 4a89 tstl %a1 47fe0: 670a beqs 47fec <_Thread_Stack_Free+0x1c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 47fe2: 2d68 00c0 0008 movel %a0@(192),%fp@(8) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 47fe8: 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 ); 47fea: 4ed1 jmp %a1@ else _Workspace_Free( the_thread->Start.Initial_stack.area ); 47fec: 2d68 00c0 0008 movel %a0@(192),%fp@(8) } 47ff2: 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 ); 47ff4: 4ef9 0004 87c0 jmp 487c0 <_Workspace_Free> ... =============================================================================== 000481cc <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 481cc: 4e56 fff0 linkw %fp,#-16 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 481d0: 2079 0005 c780 moveal 5c780 <_Per_CPU_Information+0xc>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 481d6: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 481da: 243c 0000 0700 movel #1792,%d2 481e0: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 481e2: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 481e6: 40c1 movew %sr,%d1 481e8: 8081 orl %d1,%d0 481ea: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Has_only_one_node( const Chain_Control *the_chain ) { return (the_chain->first == the_chain->last); 481ec: 2469 0008 moveal %a1@(8),%a2 if ( !_Chain_Has_only_one_node( ready ) ) { 481f0: b5d1 cmpal %a1@,%a2 481f2: 6734 beqs 48228 <_Thread_Yield_processor+0x5c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 481f4: 2850 moveal %a0@,%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 481f6: 2009 movel %a1,%d0 481f8: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 481fa: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 481fe: 268c movel %a4,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48200: 294b 0004 movel %a3,%a4@(4) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 48204: 2080 movel %d0,%a0@ { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 48206: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; 4820a: 2488 movel %a0,%a2@ the_node->previous = old_last_node; 4820c: 214a 0004 movel %a2,%a0@(4) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 48210: 2002 movel %d2,%d0 48212: 46c1 movew %d1,%sr 48214: 8081 orl %d1,%d0 48216: 46c0 movew %d0,%sr if ( _Thread_Is_heir( executing ) ) 48218: b1f9 0005 c784 cmpal 5c784 <_Per_CPU_Information+0x10>,%a0 4821e: 6610 bnes 48230 <_Thread_Yield_processor+0x64> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 48220: 23d1 0005 c784 movel %a1@,5c784 <_Per_CPU_Information+0x10> 48226: 6008 bras 48230 <_Thread_Yield_processor+0x64> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 48228: b1f9 0005 c784 cmpal 5c784 <_Per_CPU_Information+0x10>,%a0 4822e: 6708 beqs 48238 <_Thread_Yield_processor+0x6c> <== ALWAYS TAKEN _Context_Switch_necessary = true; 48230: 7001 moveq #1,%d0 48232: 13c0 0005 c78c moveb %d0,5c78c <_Per_CPU_Information+0x18> _ISR_Enable( level ); 48238: 46c1 movew %d1,%sr } 4823a: 4cd7 1c04 moveml %sp@,%d2/%a2-%a4 4823e: 4e5e unlk %fp ... =============================================================================== 000470dc <_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 ) ) { 470dc: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 470de: 4e56 0000 linkw %fp,#0 470e2: 202e 0010 movel %fp@(16),%d0 470e6: 2f0a movel %a2,%sp@- 470e8: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 470ec: 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 ) ) { 470f0: b2aa 0050 cmpl %a2@(80),%d1 470f4: 6618 bnes 4710e <_Thread_blocking_operation_Cancel+0x32> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 470f6: 123c 0003 moveb #3,%d1 470fa: 2541 0050 movel %d1,%a2@(80) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 470fe: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 47100: 486a 0048 pea %a2@(72) 47104: 4eb9 0004 864c jsr 4864c <_Watchdog_Remove> 4710a: 588f addql #4,%sp 4710c: 6002 bras 47110 <_Thread_blocking_operation_Cancel+0x34> } else _ISR_Enable( level ); 4710e: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47110: 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 } 47114: 246e fffc moveal %fp@(-4),%a2 47118: 203c 1003 fff8 movel #268697592,%d0 4711e: 2d40 000c movel %d0,%fp@(12) 47122: 4e5e unlk %fp 47124: 4ef9 0004 726c jmp 4726c <_Thread_Clear_state> ... =============================================================================== 00047b04 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 47b04: 4e56 ffe0 linkw %fp,#-32 47b08: 206e 000c moveal %fp@(12),%a0 47b0c: 43e8 003c lea %a0@(60),%a1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 47b10: 2028 0014 movel %a0@(20),%d0 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 47b14: 2200 movel %d0,%d1 47b16: ec89 lsrl #6,%d1 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 47b18: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 47b1c: 2401 movel %d1,%d2 47b1e: e989 lsll #4,%d1 47b20: e58a lsll #2,%d2 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 47b22: 246e 0008 moveal %fp@(8),%a2 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 47b26: 9282 subl %d2,%d1 47b28: 47f2 1800 lea %a2@(00000000,%d1:l),%a3 47b2c: 2149 0038 movel %a1,%a0@(56) Chain_Node *previous_node; Chain_Node *search_node; Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); 47b30: 43e8 0038 lea %a0@(56),%a1 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 47b34: 282a 0038 movel %a2@(56),%d4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47b38: 42a8 003c clrl %a0@(60) Chain_Node *previous_node; Chain_Node *search_node; Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); 47b3c: 2149 0040 movel %a1,%a0@(64) priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 47b40: 0800 0005 btst #5,%d0 47b44: 666a bnes 47bb0 <_Thread_queue_Enqueue_priority+0xac> goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 47b46: 367c 0700 moveaw #1792,%a3 search_thread = (Thread_Control *) header->first; 47b4a: 2a01 movel %d1,%d5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 47b4c: 49f2 1804 lea %a2@(00000004,%d1:l),%a4 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 47b50: 240b movel %a3,%d2 47b52: 40c1 movew %sr,%d1 47b54: 8481 orl %d1,%d2 47b56: 46c2 movew %d2,%sr 47b58: 2401 movel %d1,%d2 search_thread = (Thread_Control *) header->first; 47b5a: 2272 5800 moveal %a2@(00000000,%d5:l),%a1 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 47b5e: 76ff moveq #-1,%d3 _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 47b60: 601e bras 47b80 <_Thread_queue_Enqueue_priority+0x7c> search_priority = search_thread->current_priority; 47b62: 2629 0014 movel %a1@(20),%d3 if ( priority <= search_priority ) 47b66: b680 cmpl %d0,%d3 47b68: 641a bccs 47b84 <_Thread_queue_Enqueue_priority+0x80> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 47b6a: 2c0b movel %a3,%d6 47b6c: 46c1 movew %d1,%sr 47b6e: 8c81 orl %d1,%d6 47b70: 46c6 movew %d6,%sr RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 47b72: 2c04 movel %d4,%d6 47b74: cca9 0010 andl %a1@(16),%d6 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 47b78: 6604 bnes 47b7e <_Thread_queue_Enqueue_priority+0x7a><== ALWAYS TAKEN _ISR_Enable( level ); 47b7a: 46c1 movew %d1,%sr <== NOT EXECUTED goto restart_forward_search; 47b7c: 60d2 bras 47b50 <_Thread_queue_Enqueue_priority+0x4c><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 47b7e: 2251 moveal %a1@,%a1 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 47b80: b9c9 cmpal %a1,%a4 47b82: 66de bnes 47b62 <_Thread_queue_Enqueue_priority+0x5e> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 47b84: 7801 moveq #1,%d4 47b86: b8aa 0030 cmpl %a2@(48),%d4 47b8a: 6600 00ae bnew 47c3a <_Thread_queue_Enqueue_priority+0x136> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 47b8e: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 47b92: b680 cmpl %d0,%d3 47b94: 6700 0088 beqw 47c1e <_Thread_queue_Enqueue_priority+0x11a> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 47b98: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 47b9c: 2089 movel %a1,%a0@ the_node->previous = previous_node; 47b9e: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; 47ba2: 2688 movel %a0,%a3@ search_node->previous = the_node; 47ba4: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; 47ba8: 214a 0044 movel %a2,%a0@(68) _ISR_Enable( level ); 47bac: 46c1 movew %d1,%sr 47bae: 606a bras 47c1a <_Thread_queue_Enqueue_priority+0x116> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 47bb0: 2a3c 0000 0700 movel #1792,%d5 search_thread = (Thread_Control *) header->last; 47bb6: 49eb 0008 lea %a3@(8),%a4 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 47bba: 4283 clrl %d3 47bbc: 1639 0005 ae92 moveb 5ae92 ,%d3 _ISR_Disable( level ); 47bc2: 2405 movel %d5,%d2 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 47bc4: 5283 addql #1,%d3 _ISR_Disable( level ); 47bc6: 40c1 movew %sr,%d1 47bc8: 8481 orl %d1,%d2 47bca: 46c2 movew %d2,%sr 47bcc: 2401 movel %d1,%d2 search_thread = (Thread_Control *) header->last; 47bce: 2254 moveal %a4@,%a1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 47bd0: 6020 bras 47bf2 <_Thread_queue_Enqueue_priority+0xee> search_priority = search_thread->current_priority; 47bd2: 2629 0014 movel %a1@(20),%d3 if ( priority >= search_priority ) 47bd6: b680 cmpl %d0,%d3 47bd8: 631c blss 47bf6 <_Thread_queue_Enqueue_priority+0xf2> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 47bda: 2c05 movel %d5,%d6 47bdc: 46c1 movew %d1,%sr 47bde: 8c81 orl %d1,%d6 47be0: 46c6 movew %d6,%sr 47be2: 2c04 movel %d4,%d6 47be4: cca9 0010 andl %a1@(16),%d6 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 47be8: 6604 bnes 47bee <_Thread_queue_Enqueue_priority+0xea> _ISR_Enable( level ); 47bea: 46c1 movew %d1,%sr goto restart_reverse_search; 47bec: 60cc bras 47bba <_Thread_queue_Enqueue_priority+0xb6> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 47bee: 2269 0004 moveal %a1@(4),%a1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 47bf2: b7c9 cmpal %a1,%a3 47bf4: 66dc bnes 47bd2 <_Thread_queue_Enqueue_priority+0xce> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 47bf6: 7801 moveq #1,%d4 47bf8: b8aa 0030 cmpl %a2@(48),%d4 47bfc: 663c bnes 47c3a <_Thread_queue_Enqueue_priority+0x136> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 47bfe: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 47c02: b680 cmpl %d0,%d3 47c04: 6718 beqs 47c1e <_Thread_queue_Enqueue_priority+0x11a> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 47c06: 2651 moveal %a1@,%a3 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 47c08: 2149 0004 movel %a1,%a0@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 47c0c: 208b movel %a3,%a0@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 47c0e: 2748 0004 movel %a0,%a3@(4) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 47c12: 2288 movel %a0,%a1@ next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47c14: 214a 0044 movel %a2,%a0@(68) _ISR_Enable( level ); 47c18: 46c1 movew %d1,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 47c1a: 7001 moveq #1,%d0 47c1c: 6026 bras 47c44 <_Thread_queue_Enqueue_priority+0x140> 47c1e: 43e9 003c lea %a1@(60),%a1 equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 47c22: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 47c26: 2089 movel %a1,%a0@ the_node->previous = previous_node; 47c28: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; 47c2c: 2688 movel %a0,%a3@ search_node->previous = the_node; 47c2e: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; 47c32: 214a 0044 movel %a2,%a0@(68) _ISR_Enable( level ); 47c36: 46c2 movew %d2,%sr 47c38: 60e0 bras 47c1a <_Thread_queue_Enqueue_priority+0x116> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 47c3a: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 47c3e: 202a 0030 movel %a2@(48),%d0 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 47c42: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 47c44: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 47c48: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bc14 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4bc14: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4bc1a: 4e56 0000 linkw %fp,#0 4bc1e: 2f0a movel %a2,%sp@- 4bc20: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4bc24: 40c0 movew %sr,%d0 4bc26: 8280 orl %d0,%d1 4bc28: 46c1 movew %d1,%sr 4bc2a: 222a 0010 movel %a2@(16),%d1 4bc2e: 0281 0003 bee0 andil #245472,%d1 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4bc34: 660a bnes 4bc40 <_Thread_queue_Extract_fifo+0x2c> _ISR_Enable( level ); 4bc36: 46c0 movew %d0,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4bc38: 246e fffc moveal %fp@(-4),%a2 4bc3c: 4e5e unlk %fp 4bc3e: 4e75 rts ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4bc40: 2252 moveal %a2@,%a1 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4bc42: 7202 moveq #2,%d1 previous = the_node->previous; 4bc44: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4bc48: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4bc4c: 2089 movel %a1,%a0@ return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4bc4e: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4bc52: b2aa 0050 cmpl %a2@(80),%d1 4bc56: 6704 beqs 4bc5c <_Thread_queue_Extract_fifo+0x48> _ISR_Enable( level ); 4bc58: 46c0 movew %d0,%sr 4bc5a: 6014 bras 4bc70 <_Thread_queue_Extract_fifo+0x5c> 4bc5c: 7203 moveq #3,%d1 4bc5e: 2541 0050 movel %d1,%a2@(80) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4bc62: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4bc64: 486a 0048 pea %a2@(72) 4bc68: 4eb9 0004 864c jsr 4864c <_Watchdog_Remove> 4bc6e: 588f addql #4,%sp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4bc70: 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 } 4bc74: 246e fffc moveal %fp@(-4),%a2 4bc78: 203c 1003 fff8 movel #268697592,%d0 4bc7e: 2d40 000c movel %d0,%fp@(12) 4bc82: 4e5e unlk %fp 4bc84: 4ef9 0004 726c jmp 4726c <_Thread_Clear_state> ... =============================================================================== 0004a720 <_Thread_queue_Extract_priority_helper>: Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4a720: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 4a726: 4e56 ffec linkw %fp,#-20 4a72a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4a72e: 246e 000c moveal %fp@(12),%a2 4a732: 142e 0013 moveb %fp@(19),%d2 Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4a736: 40c0 movew %sr,%d0 4a738: 8280 orl %d0,%d1 4a73a: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 4a73c: 222a 0010 movel %a2@(16),%d1 4a740: 0281 0003 bee0 andil #245472,%d1 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4a746: 6606 bnes 4a74e <_Thread_queue_Extract_priority_helper+0x2e> _ISR_Enable( level ); 4a748: 46c0 movew %d0,%sr return; 4a74a: 6000 0090 braw 4a7dc <_Thread_queue_Extract_priority_helper+0xbc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4a74e: 220a movel %a2,%d1 4a750: 0681 0000 003c addil #60,%d1 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4a756: 2252 moveal %a2@,%a1 previous_node = the_node->previous; 4a758: 266a 0004 moveal %a2@(4),%a3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4a75c: 206a 0038 moveal %a2@(56),%a0 if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4a760: b288 cmpl %a0,%d1 4a762: 672e beqs 4a792 <_Thread_queue_Extract_priority_helper+0x72> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 4a764: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 4a768: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4a76a: 2348 0004 movel %a0,%a1@(4) new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 4a76e: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4a770: 214b 0004 movel %a3,%a0@(4) last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4a774: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4a776: b9c8 cmpal %a0,%a4 4a778: 671e beqs 4a798 <_Thread_queue_Extract_priority_helper+0x78> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 4a77a: 43e8 0038 lea %a0@(56),%a1 4a77e: 2b49 0004 movel %a1,%a5@(4) new_first_thread->Wait.Block2n.first = new_second_node; 4a782: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4a786: 214c 0040 movel %a4,%a0@(64) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4a78a: 41e8 003c lea %a0@(60),%a0 4a78e: 2888 movel %a0,%a4@ 4a790: 6006 bras 4a798 <_Thread_queue_Extract_priority_helper+0x78> last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 4a792: 2689 movel %a1,%a3@ next_node->previous = previous_node; 4a794: 234b 0004 movel %a3,%a1@(4) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4a798: 4a02 tstb %d2 4a79a: 6704 beqs 4a7a0 <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); 4a79c: 46c0 movew %d0,%sr 4a79e: 603c bras 4a7dc <_Thread_queue_Extract_priority_helper+0xbc> return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4a7a0: 7202 moveq #2,%d1 4a7a2: b2aa 0050 cmpl %a2@(80),%d1 4a7a6: 6704 beqs 4a7ac <_Thread_queue_Extract_priority_helper+0x8c><== NEVER TAKEN _ISR_Enable( level ); 4a7a8: 46c0 movew %d0,%sr 4a7aa: 6014 bras 4a7c0 <_Thread_queue_Extract_priority_helper+0xa0> 4a7ac: 7203 moveq #3,%d1 <== NOT EXECUTED 4a7ae: 2541 0050 movel %d1,%a2@(80) <== NOT EXECUTED } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4a7b2: 46c0 movew %d0,%sr <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4a7b4: 486a 0048 pea %a2@(72) <== NOT EXECUTED 4a7b8: 4eb9 0004 864c jsr 4864c <_Watchdog_Remove> <== NOT EXECUTED 4a7be: 588f addql #4,%sp <== NOT EXECUTED 4a7c0: 2d4a 0008 movel %a2,%fp@(8) 4a7c4: 227c 1003 fff8 moveal #268697592,%a1 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4a7ca: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a7d0: 2d49 000c movel %a1,%fp@(12) 4a7d4: 4e5e unlk %fp 4a7d6: 4ef9 0004 726c jmp 4726c <_Thread_Clear_state> 4a7dc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a7e2: 4e5e unlk %fp ... =============================================================================== 0004a7e8 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4a7e8: 4e56 0000 linkw %fp,#0 4a7ec: 226e 0008 moveal %fp@(8),%a1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4a7f0: 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 && 4a7f4: 2028 0030 movel %a0@(48),%d0 4a7f8: 671c beqs 4a816 <_Thread_queue_Process_timeout+0x2e> 4a7fa: b3f9 0005 c780 cmpal 5c780 <_Per_CPU_Information+0xc>,%a1 4a800: 6614 bnes 4a816 <_Thread_queue_Process_timeout+0x2e><== NEVER TAKEN _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4a802: 7203 moveq #3,%d1 4a804: b280 cmpl %d0,%d1 4a806: 6720 beqs 4a828 <_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; 4a808: 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; 4a80a: 2368 003c 0034 movel %a0@(60),%a1@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4a810: 2140 0030 movel %d0,%a0@(48) 4a814: 6012 bras 4a828 <_Thread_queue_Process_timeout+0x40> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4a816: 2368 003c 0034 movel %a0@(60),%a1@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4a81c: 2f09 movel %a1,%sp@- 4a81e: 2f08 movel %a0,%sp@- 4a820: 4eb9 0004 a6e8 jsr 4a6e8 <_Thread_queue_Extract> 4a826: 508f addql #8,%sp } } 4a828: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047d18 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 47d18: 4e56 fff0 linkw %fp,#-16 47d1c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 47d20: 246e 0008 moveal %fp@(8),%a2 47d24: 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 ) 47d28: 4a8a tstl %a2 47d2a: 6746 beqs 47d72 <_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 ) { 47d2c: 7001 moveq #1,%d0 47d2e: b0aa 0034 cmpl %a2@(52),%d0 47d32: 663e bnes 47d72 <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 47d34: 303c 0700 movew #1792,%d0 47d38: 40c2 movew %sr,%d2 47d3a: 8082 orl %d2,%d0 47d3c: 46c0 movew %d0,%sr 47d3e: 202b 0010 movel %a3@(16),%d0 47d42: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 47d48: 6726 beqs 47d70 <_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; 47d4a: 7001 moveq #1,%d0 47d4c: 2540 0030 movel %d0,%a2@(48) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 47d50: 4878 0001 pea 1 47d54: 2f0b movel %a3,%sp@- 47d56: 2f0a movel %a2,%sp@- 47d58: 4eb9 0004 a720 jsr 4a720 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 47d5e: 486e fffc pea %fp@(-4) 47d62: 2f0b movel %a3,%sp@- 47d64: 2f0a movel %a2,%sp@- 47d66: 4eb9 0004 7b04 jsr 47b04 <_Thread_queue_Enqueue_priority> 47d6c: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 47d70: 46c2 movew %d2,%sr } } 47d72: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 47d78: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047d7c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 47d7c: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 47d80: 486e fffc pea %fp@(-4) 47d84: 2f2e 0008 movel %fp@(8),%sp@- 47d88: 4eb9 0004 7638 jsr 47638 <_Thread_Get> switch ( location ) { 47d8e: 508f addql #8,%sp 47d90: 4aae fffc tstl %fp@(-4) 47d94: 6618 bnes 47dae <_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 ); 47d96: 2f00 movel %d0,%sp@- 47d98: 4eb9 0004 a7e8 jsr 4a7e8 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47d9e: 588f addql #4,%sp 47da0: 2039 0005 c5bc movel 5c5bc <_Thread_Dispatch_disable_level>,%d0 47da6: 5380 subql #1,%d0 47da8: 23c0 0005 c5bc movel %d0,5c5bc <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 47dae: 4e5e unlk %fp ... =============================================================================== 000521d2 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 521d2: 4e56 ffb4 linkw %fp,#-76 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 521d6: 200e movel %fp,%d0 521d8: 0680 ffff fff4 addil #-12,%d0 521de: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 521e2: 246e 0008 moveal %fp@(8),%a2 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 521e6: 41ea 0008 lea %a2@(8),%a0 521ea: 2e0e movel %fp,%d7 521ec: 260e movel %fp,%d3 521ee: 280e movel %fp,%d4 521f0: 5187 subql #8,%d7 521f2: 0683 ffff ffe8 addil #-24,%d3 521f8: 0684 ffff ffec addil #-20,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 521fe: 2c0a movel %a2,%d6 /* * 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 ); 52200: 240a movel %a2,%d2 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 52202: 0686 0000 0030 addil #48,%d6 52208: 49f9 0005 5e90 lea 55e90 <_Watchdog_Adjust_to_chain>,%a4 /* * 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 ); 5220e: 0682 0000 0068 addil #104,%d2 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 52214: 4bf9 0005 2c68 lea 52c68 <_Chain_Get>,%a5 ) { 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 ); 5221a: 47f9 0005 5f20 lea 55f20 <_Watchdog_Insert>,%a3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 52220: 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 ); 52224: 41ea 0040 lea %a2@(64),%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 52228: 2d47 fff4 movel %d7,%fp@(-12) the_chain->permanent_null = NULL; 5222c: 42ae fff8 clrl %fp@(-8) { Timer_server_Control *ts = (Timer_server_Control *) arg; Chain_Control insert_chain; Chain_Control fire_chain; _Chain_Initialize_empty( &insert_chain ); 52230: 2d40 fffc movel %d0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 52234: 2d44 ffe8 movel %d4,%fp@(-24) the_chain->permanent_null = NULL; 52238: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 5223c: 2d43 fff0 movel %d3,%fp@(-16) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 52240: 2d48 ffe0 movel %a0,%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; 52244: 41ee fff4 lea %fp@(-12),%a0 52248: 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; 5224c: 2039 0007 5174 movel 75174 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 52252: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 52256: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5225a: 486e ffe8 pea %fp@(-24) 5225e: 9081 subl %d1,%d0 52260: 2f00 movel %d0,%sp@- 52262: 2f06 movel %d6,%sp@- 52264: 4e94 jsr %a4@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 52266: 2039 0007 50d2 movel 750d2 <_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 ) { 5226c: 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; 52270: 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 ) { 52274: b280 cmpl %d0,%d1 52276: 6414 bccs 5228c <_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 ); 52278: 486e ffe8 pea %fp@(-24) 5227c: 2a00 movel %d0,%d5 5227e: 9a81 subl %d1,%d5 52280: 2f05 movel %d5,%sp@- 52282: 2d40 ffdc movel %d0,%fp@(-36) 52286: 2f02 movel %d2,%sp@- 52288: 4e94 jsr %a4@ 5228a: 6018 bras 522a4 <_Timer_server_Body+0xd2> } else if ( snapshot < last_snapshot ) { 5228c: b280 cmpl %d0,%d1 5228e: 631c blss 522ac <_Timer_server_Body+0xda> <== ALWAYS TAKEN /* * 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 ); 52290: 9280 subl %d0,%d1 <== NOT EXECUTED 52292: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52294: 4878 0001 pea 1 <== NOT EXECUTED 52298: 2d40 ffdc movel %d0,%fp@(-36) <== NOT EXECUTED 5229c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5229e: 4eb9 0005 5e10 jsr 55e10 <_Watchdog_Adjust> <== NOT EXECUTED 522a4: 202e ffdc movel %fp@(-36),%d0 522a8: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 522ac: 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 ); 522b0: 202a 0078 movel %a2@(120),%d0 522b4: 2f00 movel %d0,%sp@- 522b6: 4e95 jsr %a5@ if ( timer == NULL ) { 522b8: 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 ); 522ba: 2040 moveal %d0,%a0 if ( timer == NULL ) { 522bc: 4a80 tstl %d0 522be: 6724 beqs 522e4 <_Timer_server_Body+0x112> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 522c0: 2028 0038 movel %a0@(56),%d0 <== NOT EXECUTED 522c4: 7201 moveq #1,%d1 <== NOT EXECUTED 522c6: b280 cmpl %d0,%d1 <== NOT EXECUTED 522c8: 6608 bnes 522d2 <_Timer_server_Body+0x100> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 522ca: 4868 0010 pea %a0@(16) <== NOT EXECUTED 522ce: 2f06 movel %d6,%sp@- <== NOT EXECUTED 522d0: 600c bras 522de <_Timer_server_Body+0x10c> <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 522d2: 7a03 moveq #3,%d5 <== NOT EXECUTED 522d4: ba80 cmpl %d0,%d5 <== NOT EXECUTED 522d6: 66d8 bnes 522b0 <_Timer_server_Body+0xde> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 522d8: 4868 0010 pea %a0@(16) <== NOT EXECUTED 522dc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 522de: 4e93 jsr %a3@ <== NOT EXECUTED 522e0: 508f addql #8,%sp <== NOT EXECUTED 522e2: 60cc bras 522b0 <_Timer_server_Body+0xde> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 522e4: 203c 0000 0700 movel #1792,%d0 522ea: 40c1 movew %sr,%d1 522ec: 8081 orl %d1,%d0 522ee: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 522f0: beae fff4 cmpl %fp@(-12),%d7 522f4: 6614 bnes 5230a <_Timer_server_Body+0x138> <== NEVER TAKEN ts->insert_chain = NULL; 522f6: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 522fa: 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 ); 522fc: 2a3c 0000 0700 movel #1792,%d5 _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 ) ) { 52302: b8ae ffe8 cmpl %fp@(-24),%d4 52306: 6608 bnes 52310 <_Timer_server_Body+0x13e> 52308: 6042 bras 5234c <_Timer_server_Body+0x17a> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 5230a: 46c1 movew %d1,%sr <== NOT EXECUTED 5230c: 6000 ff3e braw 5224c <_Timer_server_Body+0x7a> <== 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 ); 52310: 2205 movel %d5,%d1 52312: 40c0 movew %sr,%d0 52314: 8280 orl %d0,%d1 52316: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 52318: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 5231c: b888 cmpl %a0,%d4 5231e: 6726 beqs 52346 <_Timer_server_Body+0x174> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 52320: 2250 moveal %a0@,%a1 the_chain->first = new_first; 52322: 2d49 ffe8 movel %a1,%fp@(-24) new_first->previous = _Chain_Head(the_chain); 52326: 2343 0004 movel %d3,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 5232a: 4a88 tstl %a0 5232c: 6718 beqs 52346 <_Timer_server_Body+0x174> <== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 5232e: 42a8 0008 clrl %a0@(8) _ISR_Enable( level ); 52332: 46c0 movew %d0,%sr /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 52334: 2f28 0024 movel %a0@(36),%sp@- 52338: 2f28 0020 movel %a0@(32),%sp@- 5233c: 2068 001c moveal %a0@(28),%a0 52340: 4e90 jsr %a0@ } 52342: 508f addql #8,%sp 52344: 60ca bras 52310 <_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 ); 52346: 46c0 movew %d0,%sr 52348: 6000 fefa braw 52244 <_Timer_server_Body+0x72> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 5234c: 4200 clrb %d0 5234e: 1540 007c moveb %d0,%a2@(124) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 52352: 4eba fda4 jsr %pc@(520f8 <_Thread_Disable_dispatch>) _Thread_Set_state( ts->thread, STATES_DELAYING ); 52356: 4878 0008 pea 8 5235a: 2f12 movel %a2@,%sp@- 5235c: 4eb9 0005 5664 jsr 55664 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 52362: 2f0a movel %a2,%sp@- 52364: 4eba fda8 jsr %pc@(5210e <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 52368: 2f0a movel %a2,%sp@- 5236a: 4eba fe02 jsr %pc@(5216e <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 5236e: 4eb9 0005 4d26 jsr 54d26 <_Thread_Enable_dispatch> ts->active = true; 52374: 7201 moveq #1,%d1 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 52376: 41f9 0005 603c lea 5603c <_Watchdog_Remove>,%a0 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 5237c: 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 ); 52380: 2f2e ffe4 movel %fp@(-28),%sp@- 52384: 2d48 ffdc movel %a0,%fp@(-36) 52388: 4e90 jsr %a0@ static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 5238a: 2f2e ffe0 movel %fp@(-32),%sp@- 5238e: 206e ffdc moveal %fp@(-36),%a0 52392: 4e90 jsr %a0@ 52394: 4fef 0018 lea %sp@(24),%sp 52398: 6000 feaa braw 52244 <_Timer_server_Body+0x72> =============================================================================== 0005239c <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 5239c: 4e56 fff0 linkw %fp,#-16 523a0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 523a4: 246e 0008 moveal %fp@(8),%a2 523a8: 266e 000c moveal %fp@(12),%a3 if ( ts->insert_chain == NULL ) { 523ac: 202a 0078 movel %a2@(120),%d0 523b0: 6600 00ea bnew 5249c <_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(); 523b4: 4eba fd42 jsr %pc@(520f8 <_Thread_Disable_dispatch>) if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 523b8: 202b 0038 movel %a3@(56),%d0 523bc: 7201 moveq #1,%d1 523be: b280 cmpl %d0,%d1 523c0: 665c bnes 5241e <_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 ); 523c2: 203c 0000 0700 movel #1792,%d0 523c8: 40c2 movew %sr,%d2 523ca: 8082 orl %d2,%d0 523cc: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 523ce: 2039 0007 5174 movel 75174 <_Watchdog_Ticks_since_boot>,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 523d4: 43ea 0034 lea %a2@(52),%a1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 523d8: 222a 003c movel %a2@(60),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 523dc: 206a 0030 moveal %a2@(48),%a0 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 523e0: b3c8 cmpal %a0,%a1 523e2: 6716 beqs 523fa <_Timer_server_Schedule_operation_method+0x5e> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 523e4: 2240 moveal %d0,%a1 523e6: 93c1 subal %d1,%a1 delta_interval = first_watchdog->delta_interval; 523e8: 2228 0010 movel %a0@(16),%d1 if (delta_interval > delta) { 523ec: b3c1 cmpal %d1,%a1 523ee: 6404 bccs 523f4 <_Timer_server_Schedule_operation_method+0x58> delta_interval -= delta; 523f0: 9289 subl %a1,%d1 523f2: 6002 bras 523f6 <_Timer_server_Schedule_operation_method+0x5a> } else { delta_interval = 0; 523f4: 4281 clrl %d1 } first_watchdog->delta_interval = delta_interval; 523f6: 2141 0010 movel %d1,%a0@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 523fa: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 523fe: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 52400: 486b 0010 pea %a3@(16) 52404: 486a 0030 pea %a2@(48) 52408: 4eb9 0005 5f20 jsr 55f20 <_Watchdog_Insert> if ( !ts->active ) { 5240e: 508f addql #8,%sp 52410: 102a 007c moveb %a2@(124),%d0 52414: 6678 bnes 5248e <_Timer_server_Schedule_operation_method+0xf2> _Timer_server_Reset_interval_system_watchdog( ts ); 52416: 2f0a movel %a2,%sp@- 52418: 4eba fcf4 jsr %pc@(5210e <_Timer_server_Reset_interval_system_watchdog>) 5241c: 606e bras 5248c <_Timer_server_Schedule_operation_method+0xf0> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 5241e: 7203 moveq #3,%d1 52420: b280 cmpl %d0,%d1 52422: 666a bnes 5248e <_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 ); 52424: 203c 0000 0700 movel #1792,%d0 5242a: 40c2 movew %sr,%d2 5242c: 8082 orl %d2,%d0 5242e: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 52430: 200a movel %a2,%d0 52432: 0680 0000 006c addil #108,%d0 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 52438: 2239 0007 50d2 movel 750d2 <_TOD_Now>,%d1 last_snapshot = ts->TOD_watchdogs.last_snapshot; 5243e: 226a 0074 moveal %a2@(116),%a1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 52442: 206a 0068 moveal %a2@(104),%a0 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 52446: b088 cmpl %a0,%d0 52448: 6720 beqs 5246a <_Timer_server_Schedule_operation_method+0xce><== ALWAYS TAKEN first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 5244a: 2028 0010 movel %a0@(16),%d0 <== NOT EXECUTED if ( snapshot > last_snapshot ) { 5244e: b3c1 cmpal %d1,%a1 <== NOT EXECUTED 52450: 640c bccs 5245e <_Timer_server_Schedule_operation_method+0xc2><== NOT EXECUTED /* * We advanced in time. */ delta = snapshot - last_snapshot; 52452: 2841 moveal %d1,%a4 <== NOT EXECUTED 52454: 99c9 subal %a1,%a4 <== NOT EXECUTED if (delta_interval > delta) { 52456: b9c0 cmpal %d0,%a4 <== NOT EXECUTED 52458: 640a bccs 52464 <_Timer_server_Schedule_operation_method+0xc8><== NOT EXECUTED delta_interval -= delta; 5245a: 908c subl %a4,%d0 <== NOT EXECUTED 5245c: 6008 bras 52466 <_Timer_server_Schedule_operation_method+0xca><== NOT EXECUTED } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 5245e: d089 addl %a1,%d0 <== NOT EXECUTED delta_interval += delta; 52460: 9081 subl %d1,%d0 <== NOT EXECUTED 52462: 6002 bras 52466 <_Timer_server_Schedule_operation_method+0xca><== NOT EXECUTED */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 52464: 4280 clrl %d0 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 52466: 2140 0010 movel %d0,%a0@(16) <== NOT EXECUTED } ts->TOD_watchdogs.last_snapshot = snapshot; 5246a: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 5246e: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 52470: 486b 0010 pea %a3@(16) 52474: 486a 0068 pea %a2@(104) 52478: 4eb9 0005 5f20 jsr 55f20 <_Watchdog_Insert> if ( !ts->active ) { 5247e: 508f addql #8,%sp 52480: 102a 007c moveb %a2@(124),%d0 52484: 6608 bnes 5248e <_Timer_server_Schedule_operation_method+0xf2> _Timer_server_Reset_tod_system_watchdog( ts ); 52486: 2f0a movel %a2,%sp@- 52488: 4eba fce4 jsr %pc@(5216e <_Timer_server_Reset_tod_system_watchdog>) 5248c: 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 ); } } 5248e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 52494: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 52496: 4ef9 0005 4d26 jmp 54d26 <_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 ); 5249c: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 524a0: 2d4b 000c movel %a3,%fp@(12) <== NOT EXECUTED } } 524a4: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 524aa: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 524ae: 4e5e unlk %fp <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 524b0: 4ef9 0005 2c08 jmp 52c08 <_Chain_Append> <== NOT EXECUTED =============================================================================== 00049934 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 49934: 4e56 0000 linkw %fp,#0 49938: 226e 0008 moveal %fp@(8),%a1 4993c: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec > rhs->tv_sec ) 49940: 2211 movel %a1@,%d1 49942: 2010 movel %a0@,%d0 49944: b081 cmpl %d1,%d0 49946: 6d10 blts 49958 <_Timespec_Greater_than+0x24> return true; if ( lhs->tv_sec < rhs->tv_sec ) 49948: 6e12 bgts 4995c <_Timespec_Greater_than+0x28> <== NEVER TAKEN #include #include #include bool _Timespec_Greater_than( 4994a: 2068 0004 moveal %a0@(4),%a0 4994e: b1e9 0004 cmpal %a1@(4),%a0 49952: 5dc0 slt %d0 49954: 4480 negl %d0 49956: 6006 bras 4995e <_Timespec_Greater_than+0x2a> const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; 49958: 7001 moveq #1,%d0 4995a: 6002 bras 4995e <_Timespec_Greater_than+0x2a> if ( lhs->tv_sec < rhs->tv_sec ) return false; 4995c: 4200 clrb %d0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 4995e: 4e5e unlk %fp ... =============================================================================== 000483e6 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 483e6: 4e56 fff0 linkw %fp,#-16 483ea: 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 ); 483ee: 4282 clrl %d2 483f0: 142e 000f moveb %fp@(15),%d2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 483f4: 282e 0008 movel %fp@(8),%d4 483f8: 262e 0010 movel %fp@(16),%d3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 483fc: 2479 0005 c738 moveal 5c738 <_User_extensions_List+0x8>,%a2 48402: 6018 bras 4841c <_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 ) 48404: 206a 0030 moveal %a2@(48),%a0 48408: 4a88 tstl %a0 4840a: 670c beqs 48418 <_User_extensions_Fatal+0x32> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 4840c: 2f03 movel %d3,%sp@- 4840e: 2f02 movel %d2,%sp@- 48410: 2f04 movel %d4,%sp@- 48412: 4e90 jsr %a0@ 48414: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 48418: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 4841c: b5fc 0005 c730 cmpal #378672,%a2 48422: 66e0 bnes 48404 <_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 ); } } 48424: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 4842a: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 000482c0 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 482c0: 4e56 ffe8 linkw %fp,#-24 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 482c4: 203c 0005 c734 movel #378676,%d0 482ca: 23c0 0005 c730 movel %d0,5c730 <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 482d0: 203c 0005 c730 movel #378672,%d0 482d6: 23c0 0005 c738 movel %d0,5c738 <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 482dc: 203c 0005 c5c4 movel #378308,%d0 482e2: 23c0 0005 c5c0 movel %d0,5c5c0 <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 482e8: 203c 0005 c5c0 movel #378304,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 482ee: 42b9 0005 c734 clrl 5c734 <_User_extensions_List+0x4> 482f4: 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; 482f8: 2839 0005 aeca movel 5aeca ,%d4 initial_extensions = Configuration.User_extension_table; 482fe: 2639 0005 aece movel 5aece ,%d3 48304: 42b9 0005 c5c4 clrl 5c5c4 <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 4830a: 23c0 0005 c5c8 movel %d0,5c5c8 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 48310: 4a83 tstl %d3 48312: 6754 beqs 48368 <_User_extensions_Handler_initialization+0xa8><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 48314: 7434 moveq #52,%d2 48316: 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; 4831a: 49f9 0004 c5a4 lea 4c5a4 ,%a4 _User_extensions_Add_set( extension ); 48320: 47f9 0004 a8ec lea 4a8ec <_User_extensions_Add_set>,%a3 48326: 2f02 movel %d2,%sp@- 48328: 4eb9 0004 87d8 jsr 487d8 <_Workspace_Allocate_or_fatal_error> 4832e: 2440 moveal %d0,%a2 number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 48330: 2f02 movel %d2,%sp@- extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48332: 4282 clrl %d2 extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 48334: 42a7 clrl %sp@- 48336: 2f00 movel %d0,%sp@- 48338: 4eb9 0004 c614 jsr 4c614 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 4833e: 4fef 0010 lea %sp@(16),%sp 48342: 6020 bras 48364 <_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; 48344: 4878 0020 pea 20 48348: 5282 addql #1,%d2 4834a: 2f03 movel %d3,%sp@- 4834c: 486a 0014 pea %a2@(20) 48350: 0683 0000 0020 addil #32,%d3 48356: 4e94 jsr %a4@ _User_extensions_Add_set( extension ); 48358: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 4835a: 45ea 0034 lea %a2@(52),%a2 4835e: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48360: 4fef 0010 lea %sp@(16),%sp 48364: b882 cmpl %d2,%d4 48366: 62dc bhis 48344 <_User_extensions_Handler_initialization+0x84> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 48368: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4836e: 4e5e unlk %fp ... =============================================================================== 000483ac <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 483ac: 4e56 0000 linkw %fp,#0 483b0: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 483b2: 2479 0005 c738 moveal 5c738 <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 483b8: 2f02 movel %d2,%sp@- 483ba: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 483be: 6012 bras 483d2 <_User_extensions_Thread_exitted+0x26> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 483c0: 206a 002c moveal %a2@(44),%a0 483c4: 4a88 tstl %a0 483c6: 6706 beqs 483ce <_User_extensions_Thread_exitted+0x22> (*the_extension->Callouts.thread_exitted)( executing ); 483c8: 2f02 movel %d2,%sp@- 483ca: 4e90 jsr %a0@ 483cc: 588f addql #4,%sp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 483ce: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 483d2: b5fc 0005 c730 cmpal #378672,%a2 483d8: 66e6 bnes 483c0 <_User_extensions_Thread_exitted+0x14> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 483da: 242e fff8 movel %fp@(-8),%d2 483de: 246e fffc moveal %fp@(-4),%a2 483e2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049a94 <_Watchdog_Adjust>: Watchdog_Interval units ) { ISR_Level level; _ISR_Disable( level ); 49a94: 327c 0700 moveaw #1792,%a1 49a98: 2209 movel %a1,%d1 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 49a9a: 4e56 ffe8 linkw %fp,#-24 49a9e: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 49aa2: 266e 0008 moveal %fp@(8),%a3 49aa6: 262e 000c movel %fp@(12),%d3 49aaa: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 49aae: 40c0 movew %sr,%d0 49ab0: 8280 orl %d0,%d1 49ab2: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 49ab4: 244b moveal %a3,%a2 49ab6: 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 ) ) { 49ab8: b5c8 cmpal %a0,%a2 49aba: 674c beqs 49b08 <_Watchdog_Adjust+0x74> switch ( direction ) { 49abc: 4a83 tstl %d3 49abe: 673c beqs 49afc <_Watchdog_Adjust+0x68> 49ac0: 7201 moveq #1,%d1 49ac2: b283 cmpl %d3,%d1 49ac4: 6642 bnes 49b08 <_Watchdog_Adjust+0x74> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 49ac6: d5a8 0010 addl %d2,%a0@(16) break; 49aca: 603c bras 49b08 <_Watchdog_Adjust+0x74> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 49acc: 2053 moveal %a3@,%a0 case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 49ace: 2628 0010 movel %a0@(16),%d3 49ad2: b682 cmpl %d2,%d3 49ad4: 6308 blss 49ade <_Watchdog_Adjust+0x4a> _Watchdog_First( header )->delta_interval -= units; 49ad6: 9682 subl %d2,%d3 49ad8: 2143 0010 movel %d3,%a0@(16) break; 49adc: 602a bras 49b08 <_Watchdog_Adjust+0x74> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 49ade: 7201 moveq #1,%d1 49ae0: 2141 0010 movel %d1,%a0@(16) _ISR_Enable( level ); 49ae4: 46c0 movew %d0,%sr _Watchdog_Tickle( header ); 49ae6: 2f0b movel %a3,%sp@- 49ae8: 4e94 jsr %a4@ _ISR_Disable( level ); 49aea: 2204 movel %d4,%d1 49aec: 40c0 movew %sr,%d0 49aee: 8280 orl %d0,%d1 49af0: 46c1 movew %d1,%sr if ( _Chain_Is_empty( header ) ) 49af2: 588f addql #4,%sp 49af4: b5d3 cmpal %a3@,%a2 49af6: 6710 beqs 49b08 <_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; 49af8: 9483 subl %d3,%d2 49afa: 6008 bras 49b04 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); _Watchdog_Tickle( header ); 49afc: 49f9 0004 9cac lea 49cac <_Watchdog_Tickle>,%a4 _ISR_Disable( level ); 49b02: 2809 movel %a1,%d4 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 49b04: 4a82 tstl %d2 49b06: 66c4 bnes 49acc <_Watchdog_Adjust+0x38> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 49b08: 46c0 movew %d0,%sr } 49b0a: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 49b10: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004864c <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4864c: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 48652: 4e56 0000 linkw %fp,#0 48656: 206e 0008 moveal %fp@(8),%a0 4865a: 2f0a movel %a2,%sp@- 4865c: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4865e: 40c1 movew %sr,%d1 48660: 8081 orl %d1,%d0 48662: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 48664: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 48668: 7401 moveq #1,%d2 4866a: b480 cmpl %d0,%d2 4866c: 670c beqs 4867a <_Watchdog_Remove+0x2e> 4866e: 6242 bhis 486b2 <_Watchdog_Remove+0x66> 48670: 143c 0003 moveb #3,%d2 48674: b480 cmpl %d0,%d2 48676: 653a bcss 486b2 <_Watchdog_Remove+0x66> <== NEVER TAKEN 48678: 6006 bras 48680 <_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; 4867a: 42a8 0008 clrl %a0@(8) break; 4867e: 6032 bras 486b2 <_Watchdog_Remove+0x66> } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 48680: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 48682: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 48686: 4a91 tstl %a1@ 48688: 6708 beqs 48692 <_Watchdog_Remove+0x46> next_watchdog->delta_interval += the_watchdog->delta_interval; 4868a: 2428 0010 movel %a0@(16),%d2 4868e: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 48692: 2479 0005 c6e4 moveal 5c6e4 <_Watchdog_Sync_count>,%a2 48698: 4a8a tstl %a2 4869a: 670c beqs 486a8 <_Watchdog_Remove+0x5c> _Watchdog_Sync_level = _ISR_Nest_level; 4869c: 45f9 0005 c77c lea 5c77c <_Per_CPU_Information+0x8>,%a2 486a2: 23d2 0005 c662 movel %a2@,5c662 <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 486a8: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; 486ac: 234a 0004 movel %a2,%a1@(4) previous->next = next; 486b0: 2489 movel %a1,%a2@ _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 486b2: 2279 0005 c6e8 moveal 5c6e8 <_Watchdog_Ticks_since_boot>,%a1 486b8: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 486bc: 46c1 movew %d1,%sr return( previous_state ); } 486be: 241f movel %sp@+,%d2 486c0: 245f moveal %sp@+,%a2 486c2: 4e5e unlk %fp ... =============================================================================== 000496a4 <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 496a4: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 496aa: 4e56 ffec linkw %fp,#-20 496ae: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 496b2: 242e 0008 movel %fp@(8),%d2 496b6: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 496ba: 40c3 movew %sr,%d3 496bc: 8083 orl %d3,%d0 496be: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 496c0: 2f0b movel %a3,%sp@- 496c2: 49f9 0004 3e7c lea 43e7c ,%a4 496c8: 2f02 movel %d2,%sp@- 496ca: 4879 0005 bd4a pea 5bd4a 496d0: 4e94 jsr %a4@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 496d2: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 496d4: 4fef 000c lea %sp@(12),%sp 496d8: b7ca cmpal %a2,%a3 496da: 6726 beqs 49702 <_Watchdog_Report_chain+0x5e> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 496dc: 49f9 0004 9718 lea 49718 <_Watchdog_Report>,%a4 496e2: 2f0a movel %a2,%sp@- 496e4: 42a7 clrl %sp@- 496e6: 4e94 jsr %a4@ _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 496e8: 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 = header->first ; 496ea: 508f addql #8,%sp 496ec: b7ca cmpal %a2,%a3 496ee: 66f2 bnes 496e2 <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 496f0: 2f02 movel %d2,%sp@- 496f2: 4879 0005 bd61 pea 5bd61 496f8: 4eb9 0004 3e7c jsr 43e7c 496fe: 508f addql #8,%sp 49700: 600a bras 4970c <_Watchdog_Report_chain+0x68> } else { printk( "Chain is empty\n" ); 49702: 4879 0005 bd70 pea 5bd70 49708: 4e94 jsr %a4@ 4970a: 588f addql #4,%sp } _ISR_Enable( level ); 4970c: 46c3 movew %d3,%sr } 4970e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49714: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000486c8 <_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 ); 486c8: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 486ce: 4e56 ffe8 linkw %fp,#-24 486d2: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 486d6: 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 ); 486da: 40c2 movew %sr,%d2 486dc: 8082 orl %d2,%d0 486de: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 486e0: 264c moveal %a4,%a3 486e2: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 486e4: b7ca cmpal %a2,%a3 486e6: 674c beqs 48734 <_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) { 486e8: 202a 0010 movel %a2@(16),%d0 486ec: 6708 beqs 486f6 <_Watchdog_Tickle+0x2e> the_watchdog->delta_interval--; 486ee: 5380 subql #1,%d0 486f0: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 486f4: 663e bnes 48734 <_Watchdog_Tickle+0x6c> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 486f6: 4bf9 0004 864c lea 4864c <_Watchdog_Remove>,%a5 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 486fc: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 48702: 2f0a movel %a2,%sp@- 48704: 4e95 jsr %a5@ _ISR_Enable( level ); 48706: 46c2 movew %d2,%sr switch( watchdog_state ) { 48708: 7202 moveq #2,%d1 4870a: 588f addql #4,%sp 4870c: b280 cmpl %d0,%d1 4870e: 6610 bnes 48720 <_Watchdog_Tickle+0x58> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 48710: 2f2a 0024 movel %a2@(36),%sp@- 48714: 2f2a 0020 movel %a2@(32),%sp@- 48718: 206a 001c moveal %a2@(28),%a0 4871c: 4e90 jsr %a0@ the_watchdog->id, the_watchdog->user_data ); break; 4871e: 508f addql #8,%sp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 48720: 2003 movel %d3,%d0 48722: 40c2 movew %sr,%d2 48724: 8082 orl %d2,%d0 48726: 46c0 movew %d0,%sr } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 48728: 2454 moveal %a4@,%a2 _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 4872a: b7ca cmpal %a2,%a3 4872c: 6706 beqs 48734 <_Watchdog_Tickle+0x6c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 4872e: 4aaa 0010 tstl %a2@(16) 48732: 67ce beqs 48702 <_Watchdog_Tickle+0x3a> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 48734: 46c2 movew %d2,%sr } 48736: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4873c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00058f5c <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 58f5c: 4280 clrl %d0 <== NOT EXECUTED return 0; } #endif int __kill( pid_t pid, int sig ) { 58f5e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 58f62: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00058e44 <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 58e44: 4e56 0000 linkw %fp,#0 58e48: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 58e4c: 2d6e 0010 000c movel %fp@(16),%fp@(12) 58e52: 2d40 0008 movel %d0,%fp@(8) } 58e56: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 58e58: 4ef9 0004 2444 jmp 42444 ... =============================================================================== 00049720 <_close_r>: int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { 49720: 4e56 0000 linkw %fp,#0 return close( fd ); 49724: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 4972a: 4e5e unlk %fp int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { return close( fd ); 4972c: 4ef9 0004 96b0 jmp 496b0 ... =============================================================================== 00042fe4 <_exit>: extern void FINI_SYMBOL( void ); #endif void EXIT_SYMBOL(int status) { 42fe4: 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(); 42fe8: 4eb9 0005 957c jsr 5957c <_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(); 42fee: 4eb9 0004 2f80 jsr 42f80 rtems_shutdown_executive(status); 42ff4: 2f2e 0008 movel %fp@(8),%sp@- 42ff8: 4eb9 0004 5d9c jsr 45d9c 42ffe: 588f addql #4,%sp <== NOT EXECUTED 43000: 60fe bras 43000 <_exit+0x1c> <== NOT EXECUTED ... =============================================================================== 00058e60 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 58e60: 4e56 0000 linkw %fp,#0 free( ptr ); 58e64: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 58e6a: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 58e6c: 4ef9 0004 2830 jmp 42830 ... =============================================================================== 00042930 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 42930: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 42934: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 42936: 4ef9 0004 28b8 jmp 428b8 <== NOT EXECUTED =============================================================================== 00058f34 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 58f34: 4e56 0000 linkw %fp,#0 return isatty( fd ); 58f38: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 58f3e: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 58f40: 4ef9 0005 94d4 jmp 594d4 ... =============================================================================== 00044c1c <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 44c1c: 4e56 0000 linkw %fp,#0 44c20: 202e 000c movel %fp@(12),%d0 return link( existing, new ); 44c24: 2d6e 0010 000c movel %fp@(16),%fp@(12) 44c2a: 2d40 0008 movel %d0,%fp@(8) } 44c2e: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 44c30: 4ef9 0004 4b44 jmp 44b44 ... =============================================================================== 00059040 <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 59040: 4e56 0000 linkw %fp,#0 59044: 206e 000c moveal %fp@(12),%a0 59048: 202e 0010 movel %fp@(16),%d0 5904c: 222e 0014 movel %fp@(20),%d1 return lseek( fd, offset, whence ); 59050: 2d6e 0018 0014 movel %fp@(24),%fp@(20) 59056: 2d40 000c movel %d0,%fp@(12) 5905a: 2d41 0010 movel %d1,%fp@(16) 5905e: 2d48 0008 movel %a0,%fp@(8) } 59062: 4e5e unlk %fp int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 59064: 4ef9 0005 8f68 jmp 58f68 ... =============================================================================== 0005906c <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 5906c: 4e56 0000 linkw %fp,#0 return malloc( size ); 59070: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59076: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 59078: 4ef9 0004 2b18 jmp 42b18 ... =============================================================================== 0005911c <_read_r>: struct _reent *ptr __attribute__((unused)), int fd, void *buf, size_t nbytes ) { 5911c: 4e56 0000 linkw %fp,#0 59120: 222e 0010 movel %fp@(16),%d1 59124: 202e 000c movel %fp@(12),%d0 return read( fd, buf, nbytes ); 59128: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5912e: 2d41 000c movel %d1,%fp@(12) 59132: 2d40 0008 movel %d0,%fp@(8) } 59136: 4e5e unlk %fp int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 59138: 4ef9 0005 9080 jmp 59080 ... =============================================================================== 00059140 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 59140: 4e56 0000 linkw %fp,#0 59144: 202e 000c movel %fp@(12),%d0 return realloc( ptr, size ); 59148: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5914e: 2d40 0008 movel %d0,%fp@(8) } 59152: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 59154: 4ef9 0005 9180 jmp 59180 ... =============================================================================== 0004593c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 4593c: 4e56 ffa4 linkw %fp,#-92 <== NOT EXECUTED 45940: 48d7 047c moveml %d2-%d6/%a2,%sp@ <== NOT EXECUTED 45944: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED 45948: 2c2e 0010 movel %fp@(16),%d6 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 4594c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4594e: 4eb9 0004 46ce jsr 446ce <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 45954: 588f addql #4,%sp <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 45956: 2440 moveal %d0,%a2 <== NOT EXECUTED 45958: 200e movel %fp,%d0 <== NOT EXECUTED 4595a: 0680 ffff ffd0 addil #-48,%d0 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 45960: 4a8a tstl %a2 <== NOT EXECUTED 45962: 6616 bnes 4597a <_rename_r+0x3e> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 45964: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45966: 486e fffc pea %fp@(-4) <== NOT EXECUTED 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; 4596a: 4204 clrb %d4 <== NOT EXECUTED */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 4596c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4596e: 4eb9 0004 5c98 jsr 45c98 <== NOT EXECUTED 45974: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45978: 601e bras 45998 <_rename_r+0x5c> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 4597a: 42a7 clrl %sp@- <== NOT EXECUTED 4597c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4597e: 4878 0002 pea 2 <== NOT EXECUTED 45982: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45984: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45986: 4eb9 0004 4656 jsr 44656 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 4598c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 45990: 4a80 tstl %d0 <== NOT EXECUTED 45992: 6600 012e bnew 45ac2 <_rename_r+0x186> <== NOT EXECUTED return -1; free_old_parentloc = true; 45996: 7801 moveq #1,%d4 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 45998: 4878 0014 pea 14 <== NOT EXECUTED 4599c: 240e movel %fp,%d2 <== NOT EXECUTED 4599e: 0682 ffff ffd0 addil #-48,%d2 <== NOT EXECUTED 459a4: 2a0e movel %fp,%d5 <== NOT EXECUTED 459a6: 0685 ffff ffe4 addil #-28,%d5 <== NOT EXECUTED name = old + old_parent_pathlen; 459ac: d68a addl %a2,%d3 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 459ae: 45f9 0005 1600 lea 51600 ,%a2 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 459b4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 459b6: 2f05 movel %d5,%sp@- <== NOT EXECUTED 459b8: 4eb9 0004 fedc jsr 4fedc <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 459be: 2f03 movel %d3,%sp@- <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 459c0: 2d43 fff8 movel %d3,%fp@(-8) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 459c4: 4e92 jsr %a2@ <== NOT EXECUTED 459c6: 2e80 movel %d0,%sp@ <== NOT EXECUTED 459c8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 459ca: 4eb9 0004 4710 jsr 44710 <== NOT EXECUTED 459d0: d680 addl %d0,%d3 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 459d2: 2f03 movel %d3,%sp@- <== NOT EXECUTED * 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 ) ); 459d4: 2d43 fff8 movel %d3,%fp@(-8) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 459d8: 4e92 jsr %a2@ <== NOT EXECUTED 459da: 4297 clrl %sp@ <== NOT EXECUTED 459dc: 2f05 movel %d5,%sp@- <== NOT EXECUTED 459de: 42a7 clrl %sp@- <== NOT EXECUTED 459e0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 459e2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 459e4: 4eb9 0004 45bc jsr 445bc <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 459ea: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED 459ee: 4a80 tstl %d0 <== NOT EXECUTED 459f0: 670a beqs 459fc <_rename_r+0xc0> <== NOT EXECUTED if ( free_old_parentloc ) 459f2: 4a04 tstb %d4 <== NOT EXECUTED 459f4: 6700 00cc beqw 45ac2 <_rename_r+0x186> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 459f8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 459fa: 604e bras 45a4a <_rename_r+0x10e> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 459fc: 260e movel %fp,%d3 <== NOT EXECUTED 459fe: 0683 ffff ffbc addil #-68,%d3 <== NOT EXECUTED 45a04: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45a06: 486e fffc pea %fp@(-4) <== NOT EXECUTED 45a0a: 2f06 movel %d6,%sp@- <== NOT EXECUTED 45a0c: 4eb9 0004 5c98 jsr 45c98 <== NOT EXECUTED result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 45a12: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 45a16: dcae fffc addl %fp@(-4),%d6 <== NOT EXECUTED 45a1a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45a1c: 206e ffc8 moveal %fp@(-56),%a0 <== NOT EXECUTED 45a20: 2f06 movel %d6,%sp@- <== NOT EXECUTED 45a22: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 45a26: 4e90 jsr %a0@ <== NOT EXECUTED if ( result != 0 ) { 45a28: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45a2c: 4a80 tstl %d0 <== NOT EXECUTED 45a2e: 6722 beqs 45a52 <_rename_r+0x116> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 45a30: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45a32: 45f9 0004 474c lea 4474c ,%a2 <== NOT EXECUTED 45a38: 4e92 jsr %a2@ <== NOT EXECUTED if ( free_old_parentloc ) 45a3a: 588f addql #4,%sp <== NOT EXECUTED 45a3c: 4a04 tstb %d4 <== NOT EXECUTED 45a3e: 6706 beqs 45a46 <_rename_r+0x10a> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 45a40: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45a42: 4e92 jsr %a2@ <== NOT EXECUTED 45a44: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 45a46: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED 45a4a: 4eb9 0004 474c jsr 4474c <== NOT EXECUTED 45a50: 6036 bras 45a88 <_rename_r+0x14c> <== NOT EXECUTED /* * 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 ) { 45a52: 202e ffcc movel %fp@(-52),%d0 <== NOT EXECUTED 45a56: 45f9 0004 474c lea 4474c ,%a2 <== NOT EXECUTED 45a5c: b0ae ffe0 cmpl %fp@(-32),%d0 <== NOT EXECUTED 45a60: 672a beqs 45a8c <_rename_r+0x150> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 45a62: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45a64: 4e92 jsr %a2@ <== NOT EXECUTED if ( free_old_parentloc ) 45a66: 588f addql #4,%sp <== NOT EXECUTED 45a68: 4a04 tstb %d4 <== NOT EXECUTED 45a6a: 6706 beqs 45a72 <_rename_r+0x136> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 45a6c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45a6e: 4e92 jsr %a2@ <== NOT EXECUTED 45a70: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 45a72: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED 45a76: 4eb9 0004 474c jsr 4474c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 45a7c: 4eb9 0004 e648 jsr 4e648 <__errno> <== NOT EXECUTED 45a82: 2040 moveal %d0,%a0 <== NOT EXECUTED 45a84: 7012 moveq #18,%d0 <== NOT EXECUTED 45a86: 2080 movel %d0,%a0@ <== NOT EXECUTED 45a88: 588f addql #4,%sp <== NOT EXECUTED 45a8a: 6036 bras 45ac2 <_rename_r+0x186> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 45a8c: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 45a90: 206e ffc8 moveal %fp@(-56),%a0 <== NOT EXECUTED 45a94: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45a96: 2f05 movel %d5,%sp@- <== NOT EXECUTED 45a98: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45a9a: 2068 0040 moveal %a0@(64),%a0 <== NOT EXECUTED 45a9e: 4e90 jsr %a0@ <== NOT EXECUTED 45aa0: 2a00 movel %d0,%d5 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 45aa2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45aa4: 4e92 jsr %a2@ <== NOT EXECUTED if ( free_old_parentloc ) 45aa6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 45aaa: 4a04 tstb %d4 <== NOT EXECUTED 45aac: 6706 beqs 45ab4 <_rename_r+0x178> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 45aae: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45ab0: 4e92 jsr %a2@ <== NOT EXECUTED 45ab2: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 45ab4: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED 45ab8: 4eb9 0004 474c jsr 4474c <== NOT EXECUTED return result; 45abe: 588f addql #4,%sp <== NOT EXECUTED 45ac0: 6002 bras 45ac4 <_rename_r+0x188> <== NOT EXECUTED 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; 45ac2: 7aff moveq #-1,%d5 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 45ac4: 2005 movel %d5,%d0 <== NOT EXECUTED 45ac6: 4cee 047c ffa4 moveml %fp@(-92),%d2-%d6/%a2 <== NOT EXECUTED 45acc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004459c <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 4459c: 4e56 0000 linkw %fp,#0 445a0: 202e 000c movel %fp@(12),%d0 return _STAT_NAME( path, buf ); 445a4: 2d6e 0010 000c movel %fp@(16),%fp@(12) 445aa: 2d40 0008 movel %d0,%fp@(8) } 445ae: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 445b0: 4ef9 0004 4514 jmp 44514 ... =============================================================================== 0004513c <_times_r>: clock_t _times_r( struct _reent *ptr __attribute__((unused)), struct tms *ptms ) { 4513c: 4e56 0000 linkw %fp,#0 return _times( ptms ); 45140: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 45146: 4e5e unlk %fp clock_t _times_r( struct _reent *ptr __attribute__((unused)), struct tms *ptms ) { return _times( ptms ); 45148: 4ef9 0004 5098 jmp 45098 <_times> ... =============================================================================== 00045d98 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 45d98: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return unlink( path ); 45d9c: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED } 45da2: 4e5e unlk %fp <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 45da4: 4ef9 0004 5c74 jmp 45c74 <== NOT EXECUTED ... =============================================================================== 0005915c <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5915c: 4e56 0000 linkw %fp,#0 59160: 222e 0010 movel %fp@(16),%d1 59164: 202e 000c movel %fp@(12),%d0 return write( fd, buf, nbytes ); 59168: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5916e: 2d41 000c movel %d1,%fp@(12) 59172: 2d40 0008 movel %d0,%fp@(8) } 59176: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 59178: 4ef9 0005 9260 jmp 59260 ... =============================================================================== 00043628 : speed_t cfgetispeed( const struct termios *tp ) { return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD; 43628: 4280 clrl %d0 <== NOT EXECUTED #include speed_t cfgetispeed( const struct termios *tp ) { 4362a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD; 4362e: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED } 43632: 4e5e unlk %fp <== NOT EXECUTED speed_t cfgetispeed( const struct termios *tp ) { return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD; 43634: 3028 0008 movew %a0@(8),%d0 <== NOT EXECUTED } 43638: 0280 0000 100f andil #4111,%d0 <== NOT EXECUTED =============================================================================== 00043640 : #include speed_t cfgetospeed( const struct termios *tp ) { 43640: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return tp->c_cflag & CBAUD; } 43644: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 43648: 4e5e unlk %fp <== NOT EXECUTED 4364a: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED 4364e: 0280 0000 100f andil #4111,%d0 <== NOT EXECUTED ... =============================================================================== 00043658 : int cfsetispeed( struct termios *tp, speed_t speed ) { 43658: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4365c: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED if ( speed & ~CBAUD ) 43660: 2200 movel %d0,%d1 <== NOT EXECUTED 43662: 0281 ffff eff0 andil #-4112,%d1 <== NOT EXECUTED int cfsetispeed( struct termios *tp, speed_t speed ) { 43668: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED if ( speed & ~CBAUD ) 4366c: 6710 beqs 4367e <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 4366e: 4eb9 0004 d308 jsr 4d308 <__errno> <== NOT EXECUTED 43674: 2040 moveal %d0,%a0 <== NOT EXECUTED 43676: 7016 moveq #22,%d0 <== NOT EXECUTED 43678: 2080 movel %d0,%a0@ <== NOT EXECUTED 4367a: 70ff moveq #-1,%d0 <== NOT EXECUTED 4367c: 6016 bras 43694 <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); 4367e: 2228 0008 movel %a0@(8),%d1 <== NOT EXECUTED 43682: 4840 swap %d0 <== NOT EXECUTED 43684: 4240 clrw %d0 <== NOT EXECUTED 43686: 0281 eff0 ffff andil #-269418497,%d1 <== NOT EXECUTED 4368c: 8081 orl %d1,%d0 <== NOT EXECUTED 4368e: 2140 0008 movel %d0,%a0@(8) <== NOT EXECUTED return 0; 43692: 4280 clrl %d0 <== NOT EXECUTED } 43694: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043698 : int cfsetospeed( struct termios *tp, speed_t speed ) { 43698: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4369c: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED if ( speed & ~CBAUD ) 436a0: 2200 movel %d0,%d1 <== NOT EXECUTED 436a2: 0281 ffff eff0 andil #-4112,%d1 <== NOT EXECUTED int cfsetospeed( struct termios *tp, speed_t speed ) { 436a8: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED if ( speed & ~CBAUD ) 436ac: 6710 beqs 436be <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 436ae: 4eb9 0004 d308 jsr 4d308 <__errno> <== NOT EXECUTED 436b4: 2040 moveal %d0,%a0 <== NOT EXECUTED 436b6: 7016 moveq #22,%d0 <== NOT EXECUTED 436b8: 2080 movel %d0,%a0@ <== NOT EXECUTED 436ba: 70ff moveq #-1,%d0 <== NOT EXECUTED 436bc: 6012 bras 436d0 <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; 436be: 2228 0008 movel %a0@(8),%d1 <== NOT EXECUTED 436c2: 0281 ffff eff0 andil #-4112,%d1 <== NOT EXECUTED 436c8: 8081 orl %d1,%d0 <== NOT EXECUTED 436ca: 2140 0008 movel %d0,%a0@(8) <== NOT EXECUTED return 0; 436ce: 4280 clrl %d0 <== NOT EXECUTED } 436d0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042698 : #include int chroot( const char *pathname ) { 42698: 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) { 4269c: 203c 0005 cbd8 movel #379864,%d0 #include int chroot( const char *pathname ) { 426a2: 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) { 426a6: b0b9 0005 b618 cmpl 5b618 ,%d0 426ac: 6624 bnes 426d2 <== NEVER TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 426ae: 4eb9 0004 3ac8 jsr 43ac8 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 426b4: 41f9 0005 cbd8 lea 5cbd8 ,%a0 426ba: b1f9 0005 b618 cmpal 5b618 ,%a0 426c0: 6610 bnes 426d2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 426c2: 4eb9 0004 c474 jsr 4c474 <__errno> <== NOT EXECUTED 426c8: 2040 moveal %d0,%a0 <== NOT EXECUTED 426ca: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 426d0: 6020 bras 426f2 <== NOT EXECUTED } result = chdir(pathname); 426d2: 2f2e 0008 movel %fp@(8),%sp@- 426d6: 4eb9 0004 a138 jsr 4a138 if (result) { 426dc: 588f addql #4,%sp 426de: 4a80 tstl %d0 426e0: 6714 beqs 426f6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); 426e2: 45f9 0004 c474 lea 4c474 <__errno>,%a2 <== NOT EXECUTED 426e8: 4e92 jsr %a2@ <== NOT EXECUTED 426ea: 2640 moveal %d0,%a3 <== NOT EXECUTED 426ec: 4e92 jsr %a2@ <== NOT EXECUTED 426ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 426f0: 2690 movel %a0@,%a3@ <== NOT EXECUTED 426f2: 70ff moveq #-1,%d0 <== NOT EXECUTED 426f4: 6056 bras 4274c <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 426f6: 42a7 clrl %sp@- 426f8: 240e movel %fp,%d2 426fa: 0682 ffff ffec addil #-20,%d2 42700: 2f02 movel %d2,%sp@- 42702: 42a7 clrl %sp@- 42704: 4878 0001 pea 1 42708: 4879 0005 aa9c pea 5aa9c 4270e: 4eb9 0004 2a72 jsr 42a72 42714: 4fef 0014 lea %sp@(20),%sp 42718: 4a80 tstl %d0 4271a: 66c6 bnes 426e2 <== 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); 4271c: 2079 0005 b618 moveal 5b618 ,%a0 42722: 41e8 0018 lea %a0@(24),%a0 42726: 2f08 movel %a0,%sp@- 42728: 4eb9 0004 2b68 jsr 42b68 rtems_filesystem_root = loc; 4272e: 4878 0014 pea 14 42732: 2079 0005 b618 moveal 5b618 ,%a0 42738: 41e8 0018 lea %a0@(24),%a0 4273c: 2f02 movel %d2,%sp@- 4273e: 2f08 movel %a0,%sp@- 42740: 4eb9 0004 cd20 jsr 4cd20 return 0; 42746: 4fef 0010 lea %sp@(16),%sp 4274a: 4280 clrl %d0 } 4274c: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 42752: 4e5e unlk %fp ... =============================================================================== 00048708 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 48708: 4e56 ffe4 linkw %fp,#-28 4870c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 48710: 246e 0014 moveal %fp@(20),%a2 48714: 282e 0008 movel %fp@(8),%d4 48718: 262e 000c movel %fp@(12),%d3 assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 4871c: 2652 moveal %a2@,%a3 if (!device_name_table) 4871e: 4a8b tstl %a3 48720: 670a beqs 4872c <== NEVER TAKEN 48722: 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) 48724: 4bf9 0004 b46c lea 4b46c ,%a5 4872a: 6056 bras 48782 } /* 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 ); 4872c: 4eb9 0004 a110 jsr 4a110 <__errno> <== NOT EXECUTED 48732: 720e moveq #14,%d1 <== NOT EXECUTED 48734: 2040 moveal %d0,%a0 <== NOT EXECUTED 48736: 2081 movel %d1,%a0@ <== NOT EXECUTED 48738: 605c bras 48796 <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 4873a: 2853 moveal %a3@,%a4 4873c: 4a8c tstl %a4 4873e: 673c beqs 4877c continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 48740: 2f03 movel %d3,%sp@- 48742: 2f0c movel %a4,%sp@- 48744: 2f04 movel %d4,%sp@- 48746: 4e95 jsr %a5@ 48748: 4fef 000c lea %sp@(12),%sp 4874c: 4a80 tstl %d0 4874e: 662c bnes 4877c continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 48750: 4a34 3800 tstb %a4@(00000000,%d3:l) 48754: 6626 bnes 4877c <== 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; 48756: 41f9 0005 8840 lea 58840 ,%a0 4875c: 2548 000c movel %a0,%a2@(12) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 48760: 2079 0005 88e0 moveal 588e0 ,%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; 48766: 203c 0005 8888 movel #362632,%d0 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4876c: 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; 48772: 2540 0008 movel %d0,%a2@(8) pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 48776: 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]; 48778: 248b movel %a3,%a2@ pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 4877a: 601c bras 48798 /* 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++) { 4877c: 5282 addql #1,%d2 4877e: 47eb 0014 lea %a3@(20),%a3 48782: b4b9 0005 8748 cmpl 58748 ,%d2 48788: 65b0 bcss 4873a pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 4878a: 4eb9 0004 a110 jsr 4a110 <__errno> 48790: 2040 moveal %d0,%a0 48792: 7002 moveq #2,%d0 48794: 2080 movel %d0,%a0@ 48796: 70ff moveq #-1,%d0 } 48798: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4879e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041df0 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 41df0: 4e56 0000 linkw %fp,#0 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41df4: 2039 0005 8748 movel 58748 ,%d0 41dfa: 2200 movel %d0,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 41dfc: 2f0a movel %a2,%sp@- 41dfe: 246e 0008 moveal %fp@(8),%a2 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41e02: e989 lsll #4,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 41e04: 2f02 movel %d2,%sp@- rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41e06: 2041 moveal %d1,%a0 41e08: 4870 0c00 pea %a0@(00000000,%d0:l:4) 41e0c: 4eb9 0004 8310 jsr 48310 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 41e12: 588f addql #4,%sp ) { rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41e14: 2400 movel %d0,%d2 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 41e16: 6610 bnes 41e28 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 41e18: 4eb9 0004 a110 jsr 4a110 <__errno> <== NOT EXECUTED 41e1e: 2040 moveal %d0,%a0 <== NOT EXECUTED 41e20: 700c moveq #12,%d0 <== NOT EXECUTED 41e22: 2080 movel %d0,%a0@ <== NOT EXECUTED 41e24: 70ff moveq #-1,%d0 <== NOT EXECUTED 41e26: 6038 bras 41e60 <== NOT EXECUTED memset( 41e28: 2039 0005 8748 movel 58748 ,%d0 41e2e: 2200 movel %d0,%d1 41e30: e989 lsll #4,%d1 41e32: 2041 moveal %d1,%a0 41e34: 4870 0c00 pea %a0@(00000000,%d0:l:4) 41e38: 42a7 clrl %sp@- 41e3a: 2f02 movel %d2,%sp@- 41e3c: 4eb9 0004 aa2c jsr 4aa2c temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; 41e42: 4fef 000c lea %sp@(12),%sp device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 41e46: 203c 0005 8888 movel #362632,%d0 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 41e4c: 41f9 0005 8840 lea 58840 ,%a0 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 41e52: 2540 0024 movel %d0,%a2@(36) temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; 41e56: 4280 clrl %d0 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; temp_mt_entry->mt_fs_root.ops = &devFS_ops; 41e58: 2548 0028 movel %a0,%a2@(40) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 41e5c: 2542 001c movel %d2,%a2@(28) return 0; } 41e60: 242e fff8 movel %fp@(-8),%d2 41e64: 246e fffc moveal %fp@(-4),%a2 41e68: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041ff4 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 41ff4: 4e56 fff0 linkw %fp,#-16 41ff8: 226e 0008 moveal %fp@(8),%a1 rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 41ffc: 2069 0018 moveal %a1@(24),%a0 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 42000: 486e fff0 pea %fp@(-16) 42004: 2f28 000c movel %a0@(12),%sp@- rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.command = command; 42008: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; status = rtems_io_control( 4200e: 2f28 0008 movel %a0@(8),%sp@- np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.command = command; args.buffer = buffer; 42012: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; 42018: 2d49 fff0 movel %a1,%fp@(-16) args.command = command; args.buffer = buffer; status = rtems_io_control( 4201c: 4eb9 0004 5a1c jsr 45a1c np->major, np->minor, (void *) &args ); if ( status ) 42022: 4fef 000c lea %sp@(12),%sp 42026: 4a80 tstl %d0 42028: 670c beqs 42036 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4202a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4202c: 4eb9 0004 87b4 jsr 487b4 <== NOT EXECUTED 42032: 588f addql #4,%sp <== NOT EXECUTED 42034: 6004 bras 4203a <== NOT EXECUTED return args.ioctl_return; 42036: 202e fffc movel %fp@(-4),%d0 } 4203a: 4e5e unlk %fp ... =============================================================================== 00041e6c : * 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') && 41e6c: 7264 moveq #100,%d1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41e6e: 4e56 ffdc linkw %fp,#-36 41e72: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 41e76: 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') && 41e7a: 1012 moveb %a2@,%d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41e7c: 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') && 41e80: 49c0 extbl %d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41e82: 2c2e 0010 movel %fp@(16),%d6 41e86: 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') && 41e8a: b280 cmpl %d0,%d1 41e8c: 6624 bnes 41eb2 <== NEVER TAKEN 41e8e: 123c 0065 moveb #101,%d1 41e92: 102a 0001 moveb %a2@(1),%d0 41e96: 49c0 extbl %d0 41e98: b280 cmpl %d0,%d1 41e9a: 6616 bnes 41eb2 <== NEVER TAKEN 41e9c: 123c 0076 moveb #118,%d1 41ea0: 102a 0002 moveb %a2@(2),%d0 41ea4: 49c0 extbl %d0 41ea6: b280 cmpl %d0,%d1 41ea8: 6608 bnes 41eb2 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 41eaa: 4a2a 0003 tstb %a2@(3) 41eae: 6700 00c8 beqw 41f78 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 41eb2: 2004 movel %d4,%d0 41eb4: 0280 0000 f000 andil #61440,%d0 41eba: 0c80 0000 6000 cmpil #24576,%d0 41ec0: 6716 beqs 41ed8 <== NEVER TAKEN 41ec2: 0c80 0000 2000 cmpil #8192,%d0 41ec8: 670e beqs 41ed8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 41eca: 4eb9 0004 a110 jsr 4a110 <__errno> <== NOT EXECUTED 41ed0: 7616 moveq #22,%d3 <== NOT EXECUTED 41ed2: 2040 moveal %d0,%a0 <== NOT EXECUTED 41ed4: 2083 movel %d3,%a0@ <== NOT EXECUTED 41ed6: 6066 bras 41f3e <== NOT EXECUTED 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; 41ed8: 206e 0018 moveal %fp@(24),%a0 41edc: 2650 moveal %a0@,%a3 if (!device_name_table) 41ede: 4a8b tstl %a3 41ee0: 670e beqs 41ef0 <== NEVER TAKEN 41ee2: 284b moveal %a3,%a4 41ee4: 74ff moveq #-1,%d2 41ee6: 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) 41ee8: 4bf9 0004 af5c lea 4af5c ,%a5 41eee: 6034 bras 41f24 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 ); 41ef0: 4eb9 0004 a110 jsr 4a110 <__errno> <== NOT EXECUTED 41ef6: 740e moveq #14,%d2 <== NOT EXECUTED 41ef8: 2240 moveal %d0,%a1 <== NOT EXECUTED 41efa: 2282 movel %d2,%a1@ <== NOT EXECUTED 41efc: 6040 bras 41f3e <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 41efe: 2014 movel %a4@,%d0 41f00: 671a beqs 41f1c slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 41f02: 2f00 movel %d0,%sp@- 41f04: 2f0a movel %a2,%sp@- 41f06: 4e95 jsr %a5@ 41f08: 508f addql #8,%sp 41f0a: 4a80 tstl %d0 41f0c: 6610 bnes 41f1e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EEXIST ); 41f0e: 4eb9 0004 a110 jsr 4a110 <__errno> <== NOT EXECUTED 41f14: 7211 moveq #17,%d1 <== NOT EXECUTED 41f16: 2040 moveal %d0,%a0 <== NOT EXECUTED 41f18: 2081 movel %d1,%a0@ <== NOT EXECUTED 41f1a: 6022 bras 41f3e <== NOT EXECUTED 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; 41f1c: 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++){ 41f1e: 5283 addql #1,%d3 41f20: 49ec 0014 lea %a4@(20),%a4 41f24: b6b9 0005 8748 cmpl 58748 ,%d3 41f2a: 65d2 bcss 41efe else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 41f2c: 70ff moveq #-1,%d0 41f2e: b082 cmpl %d2,%d0 41f30: 6610 bnes 41f42 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 41f32: 4eb9 0004 a110 jsr 4a110 <__errno> <== NOT EXECUTED 41f38: 2040 moveal %d0,%a0 <== NOT EXECUTED 41f3a: 700c moveq #12,%d0 <== NOT EXECUTED 41f3c: 2080 movel %d0,%a0@ <== NOT EXECUTED 41f3e: 70ff moveq #-1,%d0 <== NOT EXECUTED 41f40: 6038 bras 41f7a <== NOT EXECUTED _ISR_Disable(level); 41f42: 203c 0000 0700 movel #1792,%d0 41f48: 40c3 movew %sr,%d3 41f4a: 8083 orl %d3,%d0 41f4c: 46c0 movew %d0,%sr device_name_table[slot].device_name = (char *)path; 41f4e: 2002 movel %d2,%d0 41f50: e988 lsll #4,%d0 41f52: 2240 moveal %d0,%a1 41f54: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 41f58: d7c8 addal %a0,%a3 41f5a: 268a movel %a2,%a3@ device_name_table[slot].device_name_length = strlen(path); 41f5c: 2f0a movel %a2,%sp@- 41f5e: 4eb9 0004 b454 jsr 4b454 41f64: 588f addql #4,%sp 41f66: 2740 0004 movel %d0,%a3@(4) device_name_table[slot].major = major; 41f6a: 2746 0008 movel %d6,%a3@(8) device_name_table[slot].minor = minor; 41f6e: 2745 000c movel %d5,%a3@(12) device_name_table[slot].mode = mode; 41f72: 2744 0010 movel %d4,%a3@(16) _ISR_Enable(level); 41f76: 46c3 movew %d3,%sr * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && (path[2] == 'v') && (path[3] == '\0')) return 0; 41f78: 4280 clrl %d0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 41f7a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 41f80: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004207c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4207c: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 42080: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 42084: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 4208a: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4208e: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 42092: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 42096: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED 4209a: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 4209e: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 420a4: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 420a8: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 420ae: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 420b2: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; 420b6: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 420ba: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 420be: 4eb9 0004 5b6c jsr 45b6c <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 420c4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 420c8: 4a80 tstl %d0 <== NOT EXECUTED 420ca: 670c beqs 420d8 <== NOT EXECUTED return rtems_deviceio_errno(status); 420cc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 420ce: 4eb9 0004 87b4 jsr 487b4 <== NOT EXECUTED 420d4: 588f addql #4,%sp <== NOT EXECUTED 420d6: 6004 bras 420dc <== NOT EXECUTED return (ssize_t) args.bytes_moved; 420d8: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 420dc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000420e0 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 420e0: 4e56 0000 linkw %fp,#0 rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 420e4: 206e 0008 moveal %fp@(8),%a0 int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 420e8: 226e 000c moveal %fp@(12),%a1 rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 420ec: 2050 moveal %a0@,%a0 if (!the_dev) 420ee: 4a88 tstl %a0 420f0: 6610 bnes 42102 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 420f2: 4eb9 0004 a110 jsr 4a110 <__errno> <== NOT EXECUTED 420f8: 2040 moveal %d0,%a0 <== NOT EXECUTED 420fa: 700e moveq #14,%d0 <== NOT EXECUTED 420fc: 2080 movel %d0,%a0@ <== NOT EXECUTED 420fe: 70ff moveq #-1,%d0 <== NOT EXECUTED 42100: 6016 bras 42118 <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 42102: 2028 000c movel %a0@(12),%d0 42106: 2368 0008 0016 movel %a0@(8),%a1@(22) buf->st_mode = the_dev->mode; 4210c: 2368 0010 000c movel %a0@(16),%a1@(12) the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 42112: 2340 001a movel %d0,%a1@(26) buf->st_mode = the_dev->mode; return 0; 42116: 4280 clrl %d0 } 42118: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004211c : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4211c: 4e56 ffe4 linkw %fp,#-28 42120: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 42124: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 4212a: 2268 0018 moveal %a0@(24),%a1 args.iop = iop; args.offset = iop->offset; 4212e: 2028 000c movel %a0@(12),%d0 42132: 2228 0010 movel %a0@(16),%d1 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 42136: 486e ffe4 pea %fp@(-28) 4213a: 2f29 000c movel %a1@(12),%sp@- np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4213e: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 42144: 2f29 0008 movel %a1@(8),%sp@- np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 42148: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 4214e: 2d40 ffe8 movel %d0,%fp@(-24) 42152: 2d41 ffec movel %d1,%fp@(-20) rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; 42156: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4215a: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 4215e: 4eb9 0004 5bb0 jsr 45bb0 np->major, np->minor, (void *) &args ); if ( status ) 42164: 4fef 000c lea %sp@(12),%sp 42168: 4a80 tstl %d0 4216a: 670c beqs 42178 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4216c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4216e: 4eb9 0004 87b4 jsr 487b4 <== NOT EXECUTED 42174: 588f addql #4,%sp <== NOT EXECUTED 42176: 6004 bras 4217c <== NOT EXECUTED return (ssize_t) args.bytes_moved; 42178: 202e fffc movel %fp@(-4),%d0 } 4217c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b528 : rtems_libio_t *iop, rtems_off64_t length ) { return 0; } 4b528: 4280 clrl %d0 <== NOT EXECUTED int device_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4b52a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 4b52e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004b4ce : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4b4ce: 4e56 fff0 linkw %fp,#-16 4b4d2: 206e 0008 moveal %fp@(8),%a0 rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4b4d6: 2d48 fff0 movel %a0,%fp@(-16) args.command = command; args.buffer = buffer; the_jnode = iop->pathinfo.node_access; 4b4da: 2068 0018 moveal %a0@(24),%a0 status = rtems_io_control( 4b4de: 486e fff0 pea %fp@(-16) 4b4e2: 2f28 0050 movel %a0@(80),%sp@- rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 4b4e6: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; the_jnode = iop->pathinfo.node_access; status = rtems_io_control( 4b4ec: 2f28 004c movel %a0@(76),%sp@- rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 4b4f0: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) the_jnode = iop->pathinfo.node_access; status = rtems_io_control( 4b4f6: 4eb9 0004 ba68 jsr 4ba68 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4b4fc: 4fef 000c lea %sp@(12),%sp 4b500: 4a80 tstl %d0 4b502: 670c beqs 4b510 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4b504: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b506: 4eb9 0004 bc8c jsr 4bc8c <== NOT EXECUTED 4b50c: 588f addql #4,%sp <== NOT EXECUTED 4b50e: 6004 bras 4b514 <== NOT EXECUTED return args.ioctl_return; 4b510: 202e fffc movel %fp@(-4),%d0 } 4b514: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b406 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4b406: 4e56 ffe4 linkw %fp,#-28 4b40a: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4b40e: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4b414: 2268 0018 moveal %a0@(24),%a1 args.iop = iop; args.offset = iop->offset; 4b418: 2028 000c movel %a0@(12),%d0 4b41c: 2228 0010 movel %a0@(16),%d1 args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 4b420: 486e ffe4 pea %fp@(-28) 4b424: 2f29 0050 movel %a1@(80),%sp@- the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 4b428: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 4b42e: 2f29 004c movel %a1@(76),%sp@- the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 4b432: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 4b438: 2d40 ffe8 movel %d0,%fp@(-24) 4b43c: 2d41 ffec movel %d1,%fp@(-20) rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; 4b440: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4b444: 42ae fffc clrl %fp@(-4) status = rtems_io_read( 4b448: 4eb9 0004 baf0 jsr 4baf0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4b44e: 4fef 000c lea %sp@(12),%sp 4b452: 4a80 tstl %d0 4b454: 670c beqs 4b462 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4b456: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b458: 4eb9 0004 bc8c jsr 4bc8c <== NOT EXECUTED 4b45e: 588f addql #4,%sp <== NOT EXECUTED 4b460: 6004 bras 4b466 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 4b462: 202e fffc movel %fp@(-4),%d0 } 4b466: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b46a : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4b46a: 4e56 ffe4 linkw %fp,#-28 4b46e: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4b472: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4b478: 2268 0018 moveal %a0@(24),%a1 args.iop = iop; args.offset = iop->offset; 4b47c: 2028 000c movel %a0@(12),%d0 4b480: 2228 0010 movel %a0@(16),%d1 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 4b484: 486e ffe4 pea %fp@(-28) 4b488: 2f29 0050 movel %a1@(80),%sp@- the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4b48c: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 4b492: 2f29 004c movel %a1@(76),%sp@- the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 4b496: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 4b49c: 2d40 ffe8 movel %d0,%fp@(-24) 4b4a0: 2d41 ffec movel %d1,%fp@(-20) rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; 4b4a4: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4b4a8: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 4b4ac: 4eb9 0004 bb34 jsr 4bb34 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4b4b2: 4fef 000c lea %sp@(12),%sp 4b4b6: 4a80 tstl %d0 4b4b8: 670c beqs 4b4c6 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4b4ba: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b4bc: 4eb9 0004 bc8c jsr 4bc8c <== NOT EXECUTED 4b4c2: 588f addql #4,%sp <== NOT EXECUTED 4b4c4: 6004 bras 4b4ca <== NOT EXECUTED return (ssize_t) args.bytes_moved; 4b4c6: 202e fffc movel %fp@(-4),%d0 } 4b4ca: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000436e8 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 436e8: 4e56 fff4 linkw %fp,#-12 436ec: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 436f0: 246e 0008 moveal %fp@(8),%a2 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 436f4: 4aaa 00b4 tstl %a2@(180) 436f8: 674e beqs 43748 rtems_interrupt_disable (level); 436fa: 243c 0000 0700 movel #1792,%d2 43700: 2202 movel %d2,%d1 43702: 40c0 movew %sr,%d0 43704: 8280 orl %d0,%d1 43706: 46c1 movew %d1,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 43708: 47f9 0004 5770 lea 45770 ,%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) { 4370e: 602a bras 4373a tty->rawOutBufState = rob_wait; 43710: 7202 moveq #2,%d1 43712: 2541 0094 movel %d1,%a2@(148) rtems_interrupt_enable (level); 43716: 46c0 movew %d0,%sr sc = rtems_semaphore_obtain( 43718: 42a7 clrl %sp@- 4371a: 42a7 clrl %sp@- 4371c: 2f2a 008c movel %a2@(140),%sp@- 43720: 4e93 jsr %a3@ tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43722: 4fef 000c lea %sp@(12),%sp 43726: 4a80 tstl %d0 43728: 6708 beqs 43732 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 4372a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4372c: 4eb9 0004 5df8 jsr 45df8 <== NOT EXECUTED rtems_interrupt_disable (level); 43732: 2202 movel %d2,%d1 43734: 40c0 movew %sr,%d0 43736: 8280 orl %d0,%d1 43738: 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) { 4373a: 206a 0084 moveal %a2@(132),%a0 4373e: 222a 0080 movel %a2@(128),%d1 43742: b288 cmpl %a0,%d1 43744: 66ca bnes 43710 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); 43746: 46c0 movew %d0,%sr } } 43748: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4374e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042cec : int dup2( int fildes, int fildes2 ) { 42cec: 4e56 ffa8 linkw %fp,#-88 42cf0: 48d7 041c moveml %d2-%d4/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42cf4: 280e movel %fp,%d4 42cf6: 0684 ffff ffba addil #-70,%d4 42cfc: 45f9 0004 343c lea 4343c ,%a2 42d02: 2f04 movel %d4,%sp@- int dup2( int fildes, int fildes2 ) { 42d04: 242e 0008 movel %fp@(8),%d2 42d08: 262e 000c movel %fp@(12),%d3 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42d0c: 2f02 movel %d2,%sp@- 42d0e: 4e92 jsr %a2@ if ( status == -1 ) 42d10: 508f addql #8,%sp 42d12: 72ff moveq #-1,%d1 42d14: b280 cmpl %d0,%d1 42d16: 6720 beqs 42d38 <== NEVER TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 42d18: 2f04 movel %d4,%sp@- 42d1a: 2f03 movel %d3,%sp@- 42d1c: 4e92 jsr %a2@ if ( status == -1 ) 42d1e: 508f addql #8,%sp 42d20: 72ff moveq #-1,%d1 42d22: b280 cmpl %d0,%d1 42d24: 6712 beqs 42d38 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 42d26: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42d28: 42a7 clrl %sp@- <== NOT EXECUTED 42d2a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42d2c: 4eb9 0004 30e8 jsr 430e8 <== NOT EXECUTED 42d32: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42d36: 6002 bras 42d3a <== NOT EXECUTED * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); if ( status == -1 ) return -1; 42d38: 70ff moveq #-1,%d0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); } 42d3a: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2 42d40: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044210 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 44210: 4e56 fff0 linkw %fp,#-16 44214: 48d7 040c moveml %d2-%d3/%a2,%sp@ 44218: 246e 000c moveal %fp@(12),%a2 if ((tty->termios.c_lflag & ECHOCTL) && 4421c: 202a 003c movel %a2@(60),%d0 /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 44220: 242e 0008 movel %fp@(8),%d2 if ((tty->termios.c_lflag & ECHOCTL) && 44224: 0280 0000 0200 andil #512,%d0 /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 4422a: 1202 moveb %d2,%d1 if ((tty->termios.c_lflag & ECHOCTL) && 4422c: 4a80 tstl %d0 4422e: 674e beqs 4427e <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 44230: 4280 clrl %d0 44232: 1002 moveb %d2,%d0 44234: 2079 0005 af7c moveal 5af7c <__ctype_ptr__>,%a0 4423a: 1630 0801 moveb %a0@(00000001,%d0:l),%d3 4423e: 49c3 extbl %d3 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 44240: 0803 0005 btst #5,%d3 44244: 6738 beqs 4427e iscntrl(c) && (c != '\t') && (c != '\n')) { 44246: 7609 moveq #9,%d3 44248: b680 cmpl %d0,%d3 4424a: 6732 beqs 4427e 4424c: 163c 000a moveb #10,%d3 44250: b680 cmpl %d0,%d3 44252: 672a beqs 4427e char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 44254: 2f0a movel %a2,%sp@- 44256: 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; 4425a: 163c 0040 moveb #64,%d3 rtems_termios_puts (echobuf, 2, tty); 4425e: 486e fffe pea %fp@(-2) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 44262: 705e moveq #94,%d0 echobuf[1] = c ^ 0x40; 44264: b782 eorl %d3,%d2 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 44266: 1d40 fffe moveb %d0,%fp@(-2) echobuf[1] = c ^ 0x40; 4426a: 1d42 ffff moveb %d2,%fp@(-1) rtems_termios_puts (echobuf, 2, tty); 4426e: 4eb9 0004 3fce jsr 43fce */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 44274: 4fef 000c lea %sp@(12),%sp char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; 44278: 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')) { 4427c: 6010 bras 4428e echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 4427e: 2f0a movel %a2,%sp@- 44280: 0281 0000 00ff andil #255,%d1 44286: 2f01 movel %d1,%sp@- 44288: 4eba fe3c jsr %pc@(440c6 ) 4428c: 508f addql #8,%sp } } 4428e: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 44294: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004367e : void endgrent(void) { 4367e: 4e56 0000 linkw %fp,#0 if (group_fp != NULL) 43682: 2039 0005 d5a4 movel 5d5a4 ,%d0 43688: 670a beqs 43694 <== NEVER TAKEN fclose(group_fp); 4368a: 2f00 movel %d0,%sp@- 4368c: 4eb9 0004 cbca jsr 4cbca 43692: 588f addql #4,%sp } 43694: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043538 : void endpwent(void) { 43538: 4e56 0000 linkw %fp,#0 if (passwd_fp != NULL) 4353c: 2039 0005 d67e movel 5d67e ,%d0 43542: 670a beqs 4354e <== NEVER TAKEN fclose(passwd_fp); 43544: 2f00 movel %d0,%sp@- 43546: 4eb9 0004 cbca jsr 4cbca 4354c: 588f addql #4,%sp } 4354e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044298 : * 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) { 44298: 4e56 ffe4 linkw %fp,#-28 4429c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 442a0: 246e 0008 moveal %fp@(8),%a2 442a4: 262e 000c movel %fp@(12),%d3 if (tty->ccount == 0) 442a8: 4aaa 0020 tstl %a2@(32) 442ac: 6700 0172 beqw 44420 return; if (lineFlag) { 442b0: 4a83 tstl %d3 442b2: 6700 015c beqw 44410 if (!(tty->termios.c_lflag & ECHO)) { 442b6: 202a 003c movel %a2@(60),%d0 442ba: 44c0 movew %d0,%ccr 442bc: 6b08 bmis 442c6 <== ALWAYS TAKEN tty->ccount = 0; 442be: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED return; 442c2: 6000 015c braw 44420 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 442c6: 0800 0004 btst #4,%d0 442ca: 6600 0144 bnew 44410 tty->ccount = 0; 442ce: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 442d2: 4280 clrl %d0 <== NOT EXECUTED 442d4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442d6: 102a 0044 moveb %a2@(68),%d0 <== NOT EXECUTED 442da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 442dc: 4eba ff32 jsr %pc@(44210 ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 442e0: 508f addql #8,%sp <== NOT EXECUTED 442e2: 7020 moveq #32,%d0 <== NOT EXECUTED 442e4: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 442e8: 6700 0136 beqw 44420 <== NOT EXECUTED echo ('\n', tty); 442ec: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 442f0: 700a moveq #10,%d0 <== NOT EXECUTED 442f2: 602c bras 44320 <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 442f4: 5388 subql #1,%a0 442f6: 286a 001c moveal %a2@(28),%a4 if (tty->termios.c_lflag & ECHO) { 442fa: 202a 003c movel %a2@(60),%d0 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 442fe: 2548 0020 movel %a0,%a2@(32) 44302: 1434 8800 moveb %a4@(00000000,%a0:l),%d2 if (tty->termios.c_lflag & ECHO) { 44306: 44c0 movew %d0,%ccr 44308: 6a00 0100 bplw 4440a if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 4430c: 4a83 tstl %d3 4430e: 6620 bnes 44330 44310: 0800 0004 btst #4,%d0 44314: 661a bnes 44330 <== ALWAYS TAKEN echo (tty->termios.c_cc[VERASE], tty); 44316: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 4431a: 4280 clrl %d0 <== NOT EXECUTED 4431c: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED 44320: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 44324: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 4432a: 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); 4432c: 6000 fee2 braw 44210 <== NOT EXECUTED 44330: 2279 0005 af7c moveal 5af7c <__ctype_ptr__>,%a1 } else if (c == '\t') { 44336: 7209 moveq #9,%d1 44338: 0282 0000 00ff andil #255,%d2 4433e: b282 cmpl %d2,%d1 44340: 665a bnes 4439c int col = tty->read_start_column; 44342: 242a 002c movel %a2@(44),%d2 int i = 0; 44346: 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) 44348: 0280 0000 0200 andil #512,%d0 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 4434e: 6028 bras 44378 c = tty->cbuf[i++]; if (c == '\t') { 44350: 4284 clrl %d4 44352: 181c moveb %a4@+,%d4 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 44354: 5281 addql #1,%d1 if (c == '\t') { 44356: 7a09 moveq #9,%d5 44358: ba84 cmpl %d4,%d5 4435a: 6606 bnes 44362 col = (col | 7) + 1; 4435c: 7807 moveq #7,%d4 4435e: 8484 orl %d4,%d2 44360: 6014 bras 44376 } else if (iscntrl (c)) { 44362: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 44366: 49c4 extbl %d4 44368: 0804 0005 btst #5,%d4 4436c: 6708 beqs 44376 <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) 4436e: 4a80 tstl %d0 <== NOT EXECUTED 44370: 6706 beqs 44378 <== NOT EXECUTED col += 2; 44372: 5482 addql #2,%d2 <== NOT EXECUTED 44374: 6002 bras 44378 <== NOT EXECUTED } else { col++; 44376: 5282 addql #1,%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 44378: b1c1 cmpal %d1,%a0 4437a: 66d4 bnes 44350 4437c: 6016 bras 44394 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 4437e: 2f0a movel %a2,%sp@- 44380: 4878 0001 pea 1 44384: 4879 0005 a0c3 pea 5a0c3 4438a: 4e93 jsr %a3@ tty->column--; 4438c: 4fef 000c lea %sp@(12),%sp 44390: 53aa 0028 subql #1,%a2@(40) } /* * Back up over the tab */ while (tty->column > col) { 44394: b4aa 0028 cmpl %a2@(40),%d2 44398: 6de4 blts 4437e 4439a: 606e bras 4440a rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 4439c: 5282 addql #1,%d2 4439e: 1231 2800 moveb %a1@(00000000,%d2:l),%d1 443a2: 49c1 extbl %d1 443a4: 0801 0005 btst #5,%d1 443a8: 6724 beqs 443ce <== ALWAYS TAKEN 443aa: 0800 0009 btst #9,%d0 <== NOT EXECUTED 443ae: 671e beqs 443ce <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 443b0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 443b2: 4878 0003 pea 3 <== NOT EXECUTED 443b6: 4879 0005 a0c1 pea 5a0c1 <== NOT EXECUTED 443bc: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 443be: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 443c2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 443c6: 6706 beqs 443ce <== NOT EXECUTED tty->column--; 443c8: 5380 subql #1,%d0 <== NOT EXECUTED 443ca: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 443ce: 2079 0005 af7c moveal 5af7c <__ctype_ptr__>,%a0 443d4: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 443d8: 49c0 extbl %d0 443da: 0800 0005 btst #5,%d0 443de: 670c beqs 443ec <== ALWAYS TAKEN 443e0: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 443e4: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 443ea: 671e beqs 4440a <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 443ec: 2f0a movel %a2,%sp@- 443ee: 4878 0003 pea 3 443f2: 4879 0005 a0c1 pea 5a0c1 443f8: 4e93 jsr %a3@ if (tty->column) 443fa: 202a 0028 movel %a2@(40),%d0 443fe: 4fef 000c lea %sp@(12),%sp 44402: 6706 beqs 4440a <== NEVER TAKEN tty->column--; 44404: 5380 subql #1,%d0 44406: 2540 0028 movel %d0,%a2@(40) } } } if (!lineFlag) 4440a: 4a83 tstl %d3 4440c: 6608 bnes 44416 4440e: 6010 bras 44420 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); 44410: 47f9 0004 3fce lea 43fce ,%a3 echo ('\n', tty); return; } } while (tty->ccount) { 44416: 206a 0020 moveal %a2@(32),%a0 4441a: 4a88 tstl %a0 4441c: 6600 fed6 bnew 442f4 } } if (!lineFlag) break; } } 44420: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 44426: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000433e4 : int fchmod( int fd, mode_t mode ) { 433e4: 4e56 0000 linkw %fp,#0 433e8: 202e 0008 movel %fp@(8),%d0 433ec: 222e 000c movel %fp@(12),%d1 433f0: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_libio_check_fd( fd ); 433f2: b0b9 0005 c114 cmpl 5c114 ,%d0 433f8: 641a bccs 43414 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 433fa: 2400 movel %d0,%d2 433fc: ed88 lsll #6,%d0 433fe: e78a lsll #3,%d2 43400: 2079 0005 d798 moveal 5d798 ,%a0 43406: 9082 subl %d2,%d0 43408: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 4340a: 2028 0014 movel %a0@(20),%d0 4340e: 0800 0008 btst #8,%d0 43412: 660e bnes 43422 43414: 4eb9 0004 cae0 jsr 4cae0 <__errno> 4341a: 7209 moveq #9,%d1 4341c: 2040 moveal %d0,%a0 4341e: 2081 movel %d1,%a0@ 43420: 602e bras 43450 /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43422: 44c0 movew %d0,%ccr 43424: 670e beqs 43434 43426: 4eb9 0004 cae0 jsr 4cae0 <__errno> 4342c: 2040 moveal %d0,%a0 4342e: 7016 moveq #22,%d0 43430: 2080 movel %d0,%a0@ 43432: 601c bras 43450 return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 43434: 2268 0020 moveal %a0@(32),%a1 43438: 41e8 0018 lea %a0@(24),%a0 } 4343c: 242e fffc movel %fp@(-4),%d2 * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 43440: 2d41 000c movel %d1,%fp@(12) 43444: 2269 001c moveal %a1@(28),%a1 43448: 2d48 0008 movel %a0,%fp@(8) } 4344c: 4e5e unlk %fp * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 4344e: 4ed1 jmp %a1@ } 43450: 242e fffc movel %fp@(-4),%d2 43454: 70ff moveq #-1,%d0 43456: 4e5e unlk %fp ... =============================================================================== 000430e8 : int fcntl( int fd, int cmd, ... ) { 430e8: 4e56 fff0 linkw %fp,#-16 430ec: 202e 0008 movel %fp@(8),%d0 int ret; va_list ap; va_start( ap, cmd ); 430f0: 41ee 0010 lea %fp@(16),%a0 int fcntl( int fd, int cmd, ... ) { 430f4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 430f8: 262e 000c movel %fp@(12),%d3 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 430fc: 2239 0005 c7d4 movel 5c7d4 ,%d1 43102: b280 cmpl %d0,%d1 43104: 631c blss 43122 iop = rtems_libio_iop( fd ); 43106: 2400 movel %d0,%d2 43108: ed88 lsll #6,%d0 4310a: e78a lsll #3,%d2 4310c: 2679 0005 de58 moveal 5de58 ,%a3 43112: 9082 subl %d2,%d0 43114: 45f3 0800 lea %a3@(00000000,%d0:l),%a2 rtems_libio_check_is_open(iop); 43118: 202a 0014 movel %a2@(20),%d0 4311c: 0800 0008 btst #8,%d0 43120: 6610 bnes 43132 43122: 4eb9 0004 cbf8 jsr 4cbf8 <__errno> 43128: 7209 moveq #9,%d1 4312a: 2040 moveal %d0,%a0 4312c: 2081 movel %d1,%a0@ 4312e: 6000 0110 braw 43240 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 43132: 7409 moveq #9,%d2 43134: b483 cmpl %d3,%d2 43136: 6500 00d8 bcsw 43210 4313a: 327b 3a06 moveaw %pc@(43142 ,%d3:l:2),%a1 4313e: 4efb 9802 jmp %pc@(43142 ,%a1:l) 43142: 0014 024 <== NOT EXECUTED 43144: 006c 0154 <== NOT EXECUTED 43146: 0078 0170 <== NOT EXECUTED 43148: 008c 009a 00be oril #10092734,%d4 <== NOT EXECUTED 4314e: 00be 00be 00be oril #12452030,%d6 <== NOT EXECUTED 43154: 00be 2410 6710 oril #605054736,%d6 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 4315a: b282 cmpl %d2,%d1 <== NOT EXECUTED 4315c: 631c blss 4317a <== NOT EXECUTED 4315e: 2002 movel %d2,%d0 <== NOT EXECUTED 43160: ed8a lsll #6,%d2 <== NOT EXECUTED 43162: e788 lsll #3,%d0 <== NOT EXECUTED 43164: 9480 subl %d0,%d2 <== NOT EXECUTED 43166: d7c2 addal %d2,%a3 <== NOT EXECUTED 43168: 6012 bras 4317c <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 4316a: 4eb9 0004 3724 jsr 43724 43170: 2640 moveal %d0,%a3 if ( diop == 0 ) { 43172: 4a80 tstl %d0 43174: 6606 bnes 4317c <== ALWAYS TAKEN 43176: 6000 00c8 braw 43240 <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 4317a: 97cb subal %a3,%a3 <== NOT EXECUTED } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 4317c: 240b movel %a3,%d2 ret = -1; break; } } diop->flags = iop->flags; 4317e: 276a 0014 0014 movel %a2@(20),%a3@(20) diop->pathinfo = iop->pathinfo; 43184: 4878 0014 pea 14 43188: 486a 0018 pea %a2@(24) 4318c: 486b 0018 pea %a3@(24) 43190: 4eb9 0004 de4c jsr 4de4c ret = (int) (diop - rtems_libio_iops); 43196: 4fef 000c lea %sp@(12),%sp 4319a: 94b9 0005 de58 subl 5de58 ,%d2 431a0: 203c b6db 6db7 movel #-1227133513,%d0 431a6: e682 asrl #3,%d2 431a8: 4c00 2800 mulsl %d0,%d2 431ac: 6070 bras 4321e break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 431ae: 0800 000b btst #11,%d0 431b2: 56c2 sne %d2 431b4: 49c2 extbl %d2 431b6: 4482 negl %d2 431b8: 6068 bras 43222 * 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 ) ) 431ba: 4a90 tstl %a0@ 431bc: 6706 beqs 431c4 <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 431be: 08c0 000b bset #11,%d0 431c2: 6004 bras 431c8 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 431c4: 0880 000b bclr #11,%d0 <== NOT EXECUTED 431c8: 2540 0014 movel %d0,%a2@(20) 431cc: 602e bras 431fc break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 431ce: 2f00 movel %d0,%sp@- 431d0: 4eb9 0004 36d6 jsr 436d6 431d6: 588f addql #4,%sp 431d8: 2400 movel %d0,%d2 431da: 6042 bras 4321e break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 431dc: 2f10 movel %a0@,%sp@- 431de: 4eb9 0004 3696 jsr 43696 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 431e4: 222a 0014 movel %a2@(20),%d1 431e8: 588f addql #4,%sp 431ea: 0280 0000 0201 andil #513,%d0 431f0: 0281 ffff fdfe andil #-514,%d1 431f6: 8081 orl %d1,%d0 431f8: 2540 0014 movel %d0,%a2@(20) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 431fc: 4282 clrl %d2 431fe: 6022 bras 43222 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 43200: 4eb9 0004 cbf8 jsr 4cbf8 <__errno> 43206: 2040 moveal %d0,%a0 43208: 20bc 0000 0086 movel #134,%a0@ 4320e: 6030 bras 43240 ret = -1; break; default: errno = EINVAL; 43210: 4eb9 0004 cbf8 jsr 4cbf8 <__errno> 43216: 2040 moveal %d0,%a0 43218: 7016 moveq #22,%d0 4321a: 2080 movel %d0,%a0@ 4321c: 6022 bras 43240 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 4321e: 4a82 tstl %d2 43220: 6d20 blts 43242 <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 43222: 206a 0020 moveal %a2@(32),%a0 43226: 2f0a movel %a2,%sp@- 43228: 2f03 movel %d3,%sp@- 4322a: 2068 0030 moveal %a0@(48),%a0 4322e: 4e90 jsr %a0@ if (err) { 43230: 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 ); 43232: 2600 movel %d0,%d3 if (err) { 43234: 670c beqs 43242 <== ALWAYS TAKEN errno = err; 43236: 4eb9 0004 cbf8 jsr 4cbf8 <__errno> <== NOT EXECUTED 4323c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4323e: 2083 movel %d3,%a0@ <== NOT EXECUTED ret = -1; 43240: 74ff moveq #-1,%d2 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 43242: 2002 movel %d2,%d0 43244: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4324a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ac0e : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4ac0e: 4e56 ffdc linkw %fp,#-36 4ac12: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4ac16: 266e 0008 moveal %fp@(8),%a3 4ac1a: 286e 000c moveal %fp@(12),%a4 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); 4ac1e: 4eba fe44 jsr %pc@(4aa64 ) 4ac22: 2400 movel %d0,%d2 if (err) 4ac24: 6600 02f0 bnew 4af16 return err; pipe = *pipep; 4ac28: 2453 moveal %a3@,%a2 if (pipe == NULL) { 4ac2a: 4a8a tstl %a2 4ac2c: 6600 0114 bnew 4ad42 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4ac30: 4878 0034 pea 34 4ac34: 263c 0004 3ce4 movel #277732,%d3 4ac3a: 2043 moveal %d3,%a0 4ac3c: 4e90 jsr %a0@ if (pipe == NULL) 4ac3e: 588f addql #4,%sp { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4ac40: 2440 moveal %d0,%a2 4ac42: 2a40 moveal %d0,%a5 if (pipe == NULL) 4ac44: 4a80 tstl %d0 4ac46: 6700 00f6 beqw 4ad3e return err; memset(pipe, 0, sizeof(pipe_control_t)); 4ac4a: 4878 0034 pea 34 4ac4e: 42a7 clrl %sp@- 4ac50: 2f00 movel %d0,%sp@- 4ac52: 4eb9 0004 da50 jsr 4da50 pipe->Size = PIPE_BUF; 4ac58: 203c 0000 0200 movel #512,%d0 pipe->Buffer = malloc(pipe->Size); 4ac5e: 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; 4ac60: 2540 0004 movel %d0,%a2@(4) pipe->Buffer = malloc(pipe->Size); 4ac64: 4878 0200 pea 200 4ac68: 4e90 jsr %a0@ if (! pipe->Buffer) 4ac6a: 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); 4ac6e: 2480 movel %d0,%a2@ if (! pipe->Buffer) 4ac70: 6700 00c2 beqw 4ad34 goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4ac74: 486a 002c pea %a2@(44) 4ac78: 263c 0004 bd54 movel #310612,%d3 4ac7e: 2043 moveal %d3,%a0 rtems_build_name ('P', 'I', 'r', c), 4ac80: 1039 0005 c454 moveb 5c454 ,%d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4ac86: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'r', c), 4ac88: 49c0 extbl %d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4ac8a: 42a7 clrl %sp@- 4ac8c: 0080 5049 7200 oril #1346990592,%d0 4ac92: 2f00 movel %d0,%sp@- 4ac94: 4e90 jsr %a0@ 4ac96: 4fef 0010 lea %sp@(16),%sp 4ac9a: 4a80 tstl %d0 4ac9c: 6600 008c bnew 4ad2a rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4aca0: 486a 0030 pea %a2@(48) 4aca4: 2043 moveal %d3,%a0 rtems_build_name ('P', 'I', 'w', c), 4aca6: 1039 0005 c454 moveb 5c454 ,%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( 4acac: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'w', c), 4acae: 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( 4acb0: 42a7 clrl %sp@- 4acb2: 0080 5049 7700 oril #1346991872,%d0 4acb8: 2f00 movel %d0,%sp@- 4acba: 4e90 jsr %a0@ 4acbc: 4fef 0010 lea %sp@(16),%sp 4acc0: 4a80 tstl %d0 4acc2: 665a bnes 4ad1e <== NEVER TAKEN rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4acc4: 486a 0028 pea %a2@(40) rtems_build_name ('P', 'I', 's', c), 1, 4acc8: 1039 0005 c454 moveb 5c454 ,%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( 4acce: 42a7 clrl %sp@- 4acd0: 4878 0010 pea 10 rtems_build_name ('P', 'I', 's', c), 1, 4acd4: 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( 4acd6: 4878 0001 pea 1 4acda: 0080 5049 7300 oril #1346990848,%d0 4ace0: 2f00 movel %d0,%sp@- 4ace2: 4eb9 0004 68b4 jsr 468b4 4ace8: 4fef 0014 lea %sp@(20),%sp 4acec: 4a80 tstl %d0 4acee: 6622 bnes 4ad12 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4acf0: 1039 0005 c454 moveb 5c454 ,%d0 4acf6: 49c0 extbl %d0 4acf8: 2200 movel %d0,%d1 4acfa: 5281 addql #1,%d1 4acfc: 13c1 0005 c454 moveb %d1,5c454 4ad02: 727a moveq #122,%d1 4ad04: b280 cmpl %d0,%d1 4ad06: 663a bnes 4ad42 c = 'a'; 4ad08: 7061 moveq #97,%d0 4ad0a: 13c0 0005 c454 moveb %d0,5c454 4ad10: 6030 bras 4ad42 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4ad12: 2f2a 0030 movel %a2@(48),%sp@- 4ad16: 4eb9 0004 be04 jsr 4be04 4ad1c: 588f addql #4,%sp err_wbar: rtems_barrier_delete(pipe->readBarrier); 4ad1e: 2f2d 002c movel %a5@(44),%sp@- 4ad22: 4eb9 0004 be04 jsr 4be04 4ad28: 588f addql #4,%sp err_rbar: free(pipe->Buffer); 4ad2a: 2f15 movel %a5@,%sp@- 4ad2c: 4eb9 0004 37bc jsr 437bc 4ad32: 588f addql #4,%sp err_buf: free(pipe); 4ad34: 2f0d movel %a5,%sp@- 4ad36: 4eb9 0004 37bc jsr 437bc 4ad3c: 588f addql #4,%sp if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4ad3e: 74f4 moveq #-12,%d2 4ad40: 602c bras 4ad6e err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4ad42: 42a7 clrl %sp@- 4ad44: 42a7 clrl %sp@- 4ad46: 2f2a 0028 movel %a2@(40),%sp@- 4ad4a: 4eb9 0004 6aec jsr 46aec 4ad50: 4fef 000c lea %sp@(12),%sp 4ad54: 4a80 tstl %d0 4ad56: 6702 beqs 4ad5a <== ALWAYS TAKEN err = -EINTR; 4ad58: 74fc moveq #-4,%d2 <== NOT EXECUTED if (*pipep == NULL) { 4ad5a: 4a93 tstl %a3@ 4ad5c: 6610 bnes 4ad6e if (err) 4ad5e: 4a82 tstl %d2 4ad60: 670a beqs 4ad6c <== ALWAYS TAKEN pipe_free(pipe); 4ad62: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ad64: 4eba fd86 jsr %pc@(4aaec ) <== NOT EXECUTED 4ad68: 588f addql #4,%sp <== NOT EXECUTED 4ad6a: 6002 bras 4ad6e <== NOT EXECUTED else *pipep = pipe; 4ad6c: 268a movel %a2,%a3@ } out: pipe_unlock(); 4ad6e: 4eba fdc4 jsr %pc@(4ab34 ) pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 4ad72: 4a82 tstl %d2 4ad74: 6600 01a0 bnew 4af16 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4ad78: 7006 moveq #6,%d0 4ad7a: 7204 moveq #4,%d1 4ad7c: c0ac 0014 andl %a4@(20),%d0 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4ad80: 2453 moveal %a3@,%a2 switch (LIBIO_ACCMODE(iop)) { 4ad82: b280 cmpl %d0,%d1 4ad84: 6700 009c beqw 4ae22 4ad88: 123c 0006 moveb #6,%d1 4ad8c: b280 cmpl %d0,%d1 4ad8e: 6700 0122 beqw 4aeb2 4ad92: 123c 0002 moveb #2,%d1 4ad96: b280 cmpl %d0,%d1 4ad98: 6600 0160 bnew 4aefa case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4ad9c: 202a 0010 movel %a2@(16),%d0 4ada0: 2040 moveal %d0,%a0 4ada2: 5288 addql #1,%a0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4ada4: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4ada8: 2548 0010 movel %a0,%a2@(16) 4adac: 4a80 tstl %d0 4adae: 6610 bnes 4adc0 <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 4adb0: 486e fffc pea %fp@(-4) 4adb4: 2f2a 0030 movel %a2@(48),%sp@- 4adb8: 4eb9 0004 bea0 jsr 4bea0 4adbe: 508f addql #8,%sp if (pipe->Writers == 0) { 4adc0: 4aaa 0014 tstl %a2@(20) 4adc4: 6600 0134 bnew 4aefa /* Not an error */ if (LIBIO_NODELAY(iop)) 4adc8: 7001 moveq #1,%d0 4adca: c0ac 0014 andl %a4@(20),%d0 4adce: 6600 012a bnew 4aefa break; prevCounter = pipe->writerCounter; 4add2: 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)) 4add6: 4bf9 0004 6aec lea 46aec ,%a5 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4addc: 283c 0004 6bf4 movel #289780,%d4 if (! PIPE_READWAIT(pipe)) 4ade2: 263c 0004 bf04 movel #311044,%d3 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4ade8: 2f2a 0028 movel %a2@(40),%sp@- 4adec: 2044 moveal %d4,%a0 4adee: 4e90 jsr %a0@ if (! PIPE_READWAIT(pipe)) 4adf0: 2043 moveal %d3,%a0 4adf2: 42a7 clrl %sp@- 4adf4: 2f2a 002c movel %a2@(44),%sp@- 4adf8: 4e90 jsr %a0@ 4adfa: 4fef 000c lea %sp@(12),%sp 4adfe: 4a80 tstl %d0 4ae00: 6600 0106 bnew 4af08 goto out_error; if (! PIPE_LOCK(pipe)) 4ae04: 42a7 clrl %sp@- 4ae06: 42a7 clrl %sp@- 4ae08: 2f2a 0028 movel %a2@(40),%sp@- 4ae0c: 4e95 jsr %a5@ 4ae0e: 4fef 000c lea %sp@(12),%sp 4ae12: 4a80 tstl %d0 4ae14: 6600 00f2 bnew 4af08 goto out_error; } while (prevCounter == pipe->writerCounter); 4ae18: baaa 0024 cmpl %a2@(36),%d5 4ae1c: 67ca beqs 4ade8 <== NEVER TAKEN 4ae1e: 6000 00da braw 4aefa break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4ae22: 202a 0014 movel %a2@(20),%d0 4ae26: 2200 movel %d0,%d1 4ae28: 5281 addql #1,%d1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 4ae2a: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4ae2e: 2541 0014 movel %d1,%a2@(20) 4ae32: 4a80 tstl %d0 4ae34: 6610 bnes 4ae46 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 4ae36: 486e fffc pea %fp@(-4) 4ae3a: 2f2a 002c movel %a2@(44),%sp@- 4ae3e: 4eb9 0004 bea0 jsr 4bea0 4ae44: 508f addql #8,%sp if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4ae46: 4aaa 0010 tstl %a2@(16) 4ae4a: 6600 00ae bnew 4aefa 4ae4e: 7001 moveq #1,%d0 4ae50: c0ac 0014 andl %a4@(20),%d0 4ae54: 6712 beqs 4ae68 PIPE_UNLOCK(pipe); 4ae56: 2f2a 0028 movel %a2@(40),%sp@- err = -ENXIO; 4ae5a: 74fa moveq #-6,%d2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4ae5c: 4eb9 0004 6bf4 jsr 46bf4 err = -ENXIO; goto out_error; 4ae62: 588f addql #4,%sp 4ae64: 6000 00a4 braw 4af0a } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 4ae68: 2a2a 0020 movel %a2@(32),%d5 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4ae6c: 4bf9 0004 6aec lea 46aec ,%a5 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4ae72: 283c 0004 6bf4 movel #289780,%d4 if (! PIPE_WRITEWAIT(pipe)) 4ae78: 263c 0004 bf04 movel #311044,%d3 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4ae7e: 2f2a 0028 movel %a2@(40),%sp@- 4ae82: 2044 moveal %d4,%a0 4ae84: 4e90 jsr %a0@ if (! PIPE_WRITEWAIT(pipe)) 4ae86: 2043 moveal %d3,%a0 4ae88: 42a7 clrl %sp@- 4ae8a: 2f2a 0030 movel %a2@(48),%sp@- 4ae8e: 4e90 jsr %a0@ 4ae90: 4fef 000c lea %sp@(12),%sp 4ae94: 4a80 tstl %d0 4ae96: 6670 bnes 4af08 <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) 4ae98: 42a7 clrl %sp@- 4ae9a: 42a7 clrl %sp@- 4ae9c: 2f2a 0028 movel %a2@(40),%sp@- 4aea0: 4e95 jsr %a5@ 4aea2: 4fef 000c lea %sp@(12),%sp 4aea6: 4a80 tstl %d0 4aea8: 665e bnes 4af08 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 4aeaa: baaa 0020 cmpl %a2@(32),%d5 4aeae: 67ce beqs 4ae7e <== NEVER TAKEN 4aeb0: 6048 bras 4aefa } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4aeb2: 202a 0010 movel %a2@(16),%d0 4aeb6: 2200 movel %d0,%d1 4aeb8: 5281 addql #1,%d1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4aeba: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4aebe: 2541 0010 movel %d1,%a2@(16) 4aec2: 4a80 tstl %d0 4aec4: 6610 bnes 4aed6 <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 4aec6: 486e fffc pea %fp@(-4) 4aeca: 2f2a 0030 movel %a2@(48),%sp@- 4aece: 4eb9 0004 bea0 jsr 4bea0 4aed4: 508f addql #8,%sp pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4aed6: 202a 0014 movel %a2@(20),%d0 4aeda: 2040 moveal %d0,%a0 4aedc: 5288 addql #1,%a0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4aede: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4aee2: 2548 0014 movel %a0,%a2@(20) 4aee6: 4a80 tstl %d0 4aee8: 6610 bnes 4aefa <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 4aeea: 486e fffc pea %fp@(-4) 4aeee: 2f2a 002c movel %a2@(44),%sp@- 4aef2: 4eb9 0004 bea0 jsr 4bea0 4aef8: 508f addql #8,%sp break; } PIPE_UNLOCK(pipe); 4aefa: 2f2a 0028 movel %a2@(40),%sp@- 4aefe: 4eb9 0004 6bf4 jsr 46bf4 return 0; 4af04: 588f addql #4,%sp 4af06: 600e bras 4af16 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 4af08: 74fc moveq #-4,%d2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4af0a: 2f0c movel %a4,%sp@- 4af0c: 2f0b movel %a3,%sp@- 4af0e: 4eb9 0004 ab5a jsr 4ab5a return err; 4af14: 508f addql #8,%sp } 4af16: 2002 movel %d2,%d0 4af18: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 4af1e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000432d0 : long fpathconf( int fd, int name ) { 432d0: 4e56 0000 linkw %fp,#0 432d4: 202e 0008 movel %fp@(8),%d0 432d8: 222e 000c movel %fp@(12),%d1 432dc: 2f02 movel %d2,%sp@- long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 432de: b0b9 0005 c7d4 cmpl 5c7d4 ,%d0 432e4: 641a bccs 43300 iop = rtems_libio_iop(fd); 432e6: 2400 movel %d0,%d2 432e8: ed88 lsll #6,%d0 432ea: e78a lsll #3,%d2 432ec: 2079 0005 de58 moveal 5de58 ,%a0 432f2: 9082 subl %d2,%d0 432f4: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 432f6: 2028 0014 movel %a0@(20),%d0 432fa: 0800 0008 btst #8,%d0 432fe: 6610 bnes 43310 <== ALWAYS TAKEN 43300: 4eb9 0004 cbf8 jsr 4cbf8 <__errno> 43306: 7209 moveq #9,%d1 43308: 2040 moveal %d0,%a0 4330a: 2081 movel %d1,%a0@ 4330c: 6000 0088 braw 43396 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 43310: 0800 0001 btst #1,%d0 43314: 6774 beqs 4338a <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 43316: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 4331a: 700b moveq #11,%d0 4331c: b081 cmpl %d1,%d0 4331e: 656a bcss 4338a 43320: 303b 1a08 movew %pc@(4332a ,%d1:l:2),%d0 43324: 48c0 extl %d0 43326: 4efb 0802 jmp %pc@(4332a ,%d0:l) 4332a: 0018 030 <== NOT EXECUTED 4332c: 001e 036 <== NOT EXECUTED 4332e: 0024 044 <== NOT EXECUTED 43330: 002a 052 <== NOT EXECUTED 43332: 0030 060 <== NOT EXECUTED 43334: 0036 066 <== NOT EXECUTED 43336: 003c 074 <== NOT EXECUTED 43338: 0042 0102 <== NOT EXECUTED 4333a: 0048 0110 <== NOT EXECUTED 4333c: 004e 0116 <== NOT EXECUTED 4333e: 0054 0124 <== NOT EXECUTED 43340: 005a 0132 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 43342: 2028 0038 movel %a0@(56),%d0 break; 43346: 6050 bras 43398 case _PC_MAX_CANON: return_value = the_limits->max_canon; 43348: 2028 003c movel %a0@(60),%d0 break; 4334c: 604a bras 43398 case _PC_MAX_INPUT: return_value = the_limits->max_input; 4334e: 2028 0040 movel %a0@(64),%d0 break; 43352: 6044 bras 43398 case _PC_NAME_MAX: return_value = the_limits->name_max; 43354: 2028 0044 movel %a0@(68),%d0 break; 43358: 603e bras 43398 case _PC_PATH_MAX: return_value = the_limits->path_max; 4335a: 2028 0048 movel %a0@(72),%d0 break; 4335e: 6038 bras 43398 case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 43360: 2028 004c movel %a0@(76),%d0 break; 43364: 6032 bras 43398 case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 43366: 2028 0054 movel %a0@(84),%d0 break; 4336a: 602c bras 43398 case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 4336c: 2028 0058 movel %a0@(88),%d0 break; 43370: 6026 bras 43398 case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 43372: 2028 0064 movel %a0@(100),%d0 break; 43376: 6020 bras 43398 case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 43378: 2028 0050 movel %a0@(80),%d0 break; 4337c: 601a bras 43398 case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 4337e: 2028 005c movel %a0@(92),%d0 break; 43382: 6014 bras 43398 case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 43384: 2028 0060 movel %a0@(96),%d0 break; 43388: 600e bras 43398 default: rtems_set_errno_and_return_minus_one( EINVAL ); 4338a: 4eb9 0004 cbf8 jsr 4cbf8 <__errno> 43390: 2040 moveal %d0,%a0 43392: 7016 moveq #22,%d0 43394: 2080 movel %d0,%a0@ 43396: 70ff moveq #-1,%d0 break; } return return_value; } 43398: 242e fffc movel %fp@(-4),%d2 4339c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042830 : #include void free( void *ptr ) { 42830: 4e56 0000 linkw %fp,#0 MSBUMP(free_calls, 1); 42834: 52b9 0005 c48c addql #1,5c48c #include void free( void *ptr ) { 4283a: 2f02 movel %d2,%sp@- 4283c: 242e 0008 movel %fp@(8),%d2 MSBUMP(free_calls, 1); if ( !ptr ) 42840: 676c beqs 428ae #endif /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 42842: 7003 moveq #3,%d0 42844: b0b9 0005 c728 cmpl 5c728 <_System_state_Current>,%d0 4284a: 661a bnes 42866 <== NEVER TAKEN !malloc_is_system_state_OK() ) { 4284c: 4eb9 0004 29d4 jsr 429d4 #endif /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 42852: 4a00 tstb %d0 42854: 6610 bnes 42866 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 42856: 2d42 0008 movel %d2,%fp@(8) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4285a: 242e fffc movel %fp@(-4),%d2 4285e: 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); 42860: 4ef9 0004 2a48 jmp 42a48 } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 42866: 2079 0005 b436 moveal 5b436 ,%a0 4286c: 4a88 tstl %a0 4286e: 670a beqs 4287a (*rtems_malloc_statistics_helpers->at_free)(ptr); 42870: 2f02 movel %d2,%sp@- 42872: 2068 0008 moveal %a0@(8),%a0 42876: 4e90 jsr %a0@ 42878: 588f addql #4,%sp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4287a: 2f02 movel %d2,%sp@- 4287c: 2f39 0005 adf0 movel 5adf0 ,%sp@- 42882: 4eb9 0004 7094 jsr 47094 <_Protected_heap_Free> 42888: 508f addql #8,%sp 4288a: 4a00 tstb %d0 4288c: 6620 bnes 428ae printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 4288e: 2079 0005 adf0 moveal 5adf0 ,%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", 42894: 2f28 001c movel %a0@(28),%sp@- 42898: 2f28 0018 movel %a0@(24),%sp@- 4289c: 2f02 movel %d2,%sp@- 4289e: 4879 0005 a04c pea 5a04c 428a4: 4eb9 0004 34dc jsr 434dc 428aa: 4fef 0010 lea %sp@(16),%sp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 428ae: 242e fffc movel %fp@(-4),%d2 428b2: 4e5e unlk %fp ... =============================================================================== 00043a80 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 43a80: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43a84: 2f0b movel %a3,%sp@- <== NOT EXECUTED 43a86: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43a88: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 43a8c: b5fc 0005 cbd8 cmpal #379864,%a2 <== NOT EXECUTED 43a92: 6728 beqs 43abc <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 43a94: 486a 0004 pea %a2@(4) <== NOT EXECUTED 43a98: 47f9 0004 2b68 lea 42b68 ,%a3 <== NOT EXECUTED 43a9e: 4e93 jsr %a3@ <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 43aa0: 486a 0018 pea %a2@(24) <== NOT EXECUTED 43aa4: 4e93 jsr %a3@ <== NOT EXECUTED free(env); } } 43aa6: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 43aaa: 508f addql #8,%sp <== NOT EXECUTED 43aac: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 43ab0: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 43ab4: 4e5e unlk %fp <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 43ab6: 4ef9 0004 2b7c jmp 42b7c <== NOT EXECUTED } } 43abc: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 43ac0: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 43ac4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049734 : int ftruncate( int fd, off_t length ) { 49734: 4e56 ffec linkw %fp,#-20 49738: 202e 0008 movel %fp@(8),%d0 4973c: 2f0a movel %a2,%sp@- 4973e: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 49740: b0b9 0005 ade4 cmpl 5ade4 ,%d0 49746: 641c bccs 49764 iop = rtems_libio_iop( fd ); 49748: 2200 movel %d0,%d1 4974a: ed88 lsll #6,%d0 4974c: e789 lsll #3,%d1 4974e: 2479 0005 c468 moveal 5c468 ,%a2 49754: 9081 subl %d1,%d0 49756: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 49758: 202a 0014 movel %a2@(20),%d0 4975c: 0280 0000 0100 andil #256,%d0 49762: 660e bnes 49772 49764: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 4976a: 7409 moveq #9,%d2 4976c: 2040 moveal %d0,%a0 4976e: 2082 movel %d2,%a0@ 49770: 6050 bras 497c2 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 49772: 4878 0014 pea 14 49776: 240e movel %fp,%d2 49778: 486a 0018 pea %a2@(24) 4977c: 0682 ffff ffec addil #-20,%d2 49782: 2f02 movel %d2,%sp@- 49784: 4eb9 0004 c5a4 jsr 4c5a4 if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4978a: 206e fff8 moveal %fp@(-8),%a0 4978e: 2f02 movel %d2,%sp@- 49790: 2068 0010 moveal %a0@(16),%a0 49794: 4e90 jsr %a0@ 49796: 4fef 0010 lea %sp@(16),%sp 4979a: 7201 moveq #1,%d1 4979c: b280 cmpl %d0,%d1 4979e: 660e bnes 497ae <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EISDIR ); 497a0: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 497a6: 7215 moveq #21,%d1 <== NOT EXECUTED 497a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 497aa: 2081 movel %d1,%a0@ <== NOT EXECUTED 497ac: 6014 bras 497c2 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 497ae: 7004 moveq #4,%d0 497b0: c0aa 0014 andl %a2@(20),%d0 497b4: 6610 bnes 497c6 497b6: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 497bc: 2040 moveal %d0,%a0 497be: 7016 moveq #22,%d0 497c0: 2080 movel %d0,%a0@ 497c2: 70ff moveq #-1,%d0 497c4: 6018 bras 497de return (*iop->pathinfo.handlers->ftruncate_h)( iop, length ); 497c6: 206a 0020 moveal %a2@(32),%a0 497ca: 2f2e 0010 movel %fp@(16),%sp@- 497ce: 2f2e 000c movel %fp@(12),%sp@- 497d2: 2f0a movel %a2,%sp@- 497d4: 2068 0020 moveal %a0@(32),%a0 497d8: 4e90 jsr %a0@ 497da: 4fef 000c lea %sp@(12),%sp } 497de: 242e ffe4 movel %fp@(-28),%d2 497e2: 246e ffe8 moveal %fp@(-24),%a2 497e6: 4e5e unlk %fp ... =============================================================================== 00042a58 : #include #include int getchark(void) { 42a58: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if ( BSP_poll_char ) 42a5c: 2279 0005 bf3c moveal 5bf3c ,%a1 <== NOT EXECUTED 42a62: 4a89 tstl %a1 <== NOT EXECUTED 42a64: 6704 beqs 42a6a <== NOT EXECUTED return (*BSP_poll_char)(); return -1; } 42a66: 4e5e unlk %fp <== NOT EXECUTED #include int getchark(void) { if ( BSP_poll_char ) return (*BSP_poll_char)(); 42a68: 4ed1 jmp %a1@ <== NOT EXECUTED return -1; } 42a6a: 70ff moveq #-1,%d0 <== NOT EXECUTED 42a6c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005a554 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5a554: 4e56 ffec linkw %fp,#-20 5a558: 202e 0008 movel %fp@(8),%d0 5a55c: 2f0a movel %a2,%sp@- 5a55e: 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 ); 5a560: b0b9 0005 cd44 cmpl 5cd44 ,%d0 5a566: 6412 bccs 5a57a <== NEVER TAKEN 5a568: 2200 movel %d0,%d1 5a56a: ed88 lsll #6,%d0 5a56c: e789 lsll #3,%d1 5a56e: 2479 0005 e4e8 moveal 5e4e8 ,%a2 5a574: 9081 subl %d1,%d0 5a576: d5c0 addal %d0,%a2 5a578: 6002 bras 5a57c 5a57a: 95ca subal %a2,%a2 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5a57c: 4878 0014 pea 14 5a580: 240e movel %fp,%d2 5a582: 486a 0018 pea %a2@(24) 5a586: 0682 ffff ffec addil #-20,%d2 5a58c: 2f02 movel %d2,%sp@- 5a58e: 4eb9 0004 d4ac jsr 4d4ac if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5a594: 206e fff8 moveal %fp@(-8),%a0 5a598: 2f02 movel %d2,%sp@- 5a59a: 2068 0010 moveal %a0@(16),%a0 5a59e: 4e90 jsr %a0@ 5a5a0: 4fef 0010 lea %sp@(16),%sp 5a5a4: 7201 moveq #1,%d1 5a5a6: b280 cmpl %d0,%d1 5a5a8: 6710 beqs 5a5ba rtems_set_errno_and_return_minus_one( ENOTDIR ); 5a5aa: 4eb9 0004 cc00 jsr 4cc00 <__errno> 5a5b0: 2040 moveal %d0,%a0 5a5b2: 7014 moveq #20,%d0 5a5b4: 2080 movel %d0,%a0@ 5a5b6: 70ff moveq #-1,%d0 5a5b8: 6018 bras 5a5d2 /* * 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 ); 5a5ba: 206a 0020 moveal %a2@(32),%a0 5a5be: 2f2e 0010 movel %fp@(16),%sp@- 5a5c2: 2f2e 000c movel %fp@(12),%sp@- 5a5c6: 2f0a movel %a2,%sp@- 5a5c8: 2068 0008 moveal %a0@(8),%a0 5a5cc: 4e90 jsr %a0@ 5a5ce: 4fef 000c lea %sp@(12),%sp } 5a5d2: 242e ffe4 movel %fp@(-28),%d2 5a5d6: 246e ffe8 moveal %fp@(-24),%a2 5a5da: 4e5e unlk %fp ... =============================================================================== 000428b8 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 428b8: 4e56 fff8 linkw %fp,#-8 428bc: 2f0a movel %a2,%sp@- 428be: 246e 0008 moveal %fp@(8),%a2 428c2: 2f02 movel %d2,%sp@- /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 428c4: 4a8a tstl %a2 428c6: 6610 bnes 428d8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 428c8: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 428ce: 2040 moveal %d0,%a0 <== NOT EXECUTED 428d0: 700e moveq #14,%d0 <== NOT EXECUTED 428d2: 2080 movel %d0,%a0@ <== NOT EXECUTED 428d4: 70ff moveq #-1,%d0 <== NOT EXECUTED 428d6: 6032 bras 4290a <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 428d8: 203c 0000 0700 movel #1792,%d0 428de: 40c2 movew %sr,%d2 428e0: 8082 orl %d2,%d0 428e2: 46c0 movew %d0,%sr _TOD_Get( &now ); 428e4: 486e fff8 pea %fp@(-8) 428e8: 4eb9 0004 6488 jsr 46488 <_TOD_Get> _ISR_Enable(level); 428ee: 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; 428f0: 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; 428f6: 588f addql #4,%sp _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 428f8: 202e fffc movel %fp@(-4),%d0 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 428fc: 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; 42900: 24ae fff8 movel %fp@(-8),%a2@ time->tv_usec = useconds; 42904: 2540 0004 movel %d0,%a2@(4) 42908: 4280 clrl %d0 } 4290a: 242e fff0 movel %fp@(-16),%d2 4290e: 246e fff4 moveal %fp@(-12),%a2 42912: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b534 : 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 ) 4b534: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4b536: 4e56 0000 linkw %fp,#0 4b53a: 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 ) 4b53e: 2268 0018 moveal %a0@(24),%a1 4b542: b0a9 0048 cmpl %a1@(72),%d0 4b546: 6610 bnes 4b558 <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 4b548: 4280 clrl %d0 4b54a: 4281 clrl %d1 4b54c: 2140 000c movel %d0,%a0@(12) 4b550: 2141 0010 movel %d1,%a0@(16) return 0; 4b554: 4280 clrl %d0 4b556: 6002 bras 4b55a /* 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 */ 4b558: 70ff moveq #-1,%d0 <== NOT EXECUTED iop->offset = 0; return 0; } 4b55a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b766 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4b766: 4e56 0000 linkw %fp,#0 4b76a: 206e 000c moveal %fp@(12),%a0 4b76e: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4b770: 2450 moveal %a0@,%a2 4b772: 200a movel %a2,%d0 4b774: 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 ) ) 4b77a: b0aa 004c cmpl %a2@(76),%d0 4b77e: 670e beqs 4b78e rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4b780: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 4b786: 2040 moveal %d0,%a0 4b788: 705a moveq #90,%d0 4b78a: 2080 movel %d0,%a0@ 4b78c: 6016 bras 4b7a4 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 4b78e: 2068 0010 moveal %a0@(16),%a0 4b792: b5e8 001c cmpal %a0@(28),%a2 4b796: 6610 bnes 4b7a8 rtems_set_errno_and_return_minus_one( EBUSY ); 4b798: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 4b79e: 7210 moveq #16,%d1 4b7a0: 2040 moveal %d0,%a0 4b7a2: 2081 movel %d1,%a0@ 4b7a4: 70ff moveq #-1,%d0 4b7a6: 601a bras 4b7c2 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4b7a8: 4aaa 0058 tstl %a2@(88) 4b7ac: 66ea bnes 4b798 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 4b7ae: 2f0a movel %a2,%sp@- 4b7b0: 4eb9 0004 9494 jsr 49494 IMFS_check_node_remove( the_jnode ); 4b7b6: 2f0a movel %a2,%sp@- 4b7b8: 4eb9 0004 94d8 jsr 494d8 return 0; 4b7be: 508f addql #8,%sp 4b7c0: 4280 clrl %d0 } 4b7c2: 246e fffc moveal %fp@(-4),%a2 4b7c6: 4e5e unlk %fp ... =============================================================================== 000431b4 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 431b4: 4e56 0000 linkw %fp,#0 431b8: 2f0a movel %a2,%sp@- 431ba: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 431bc: 4a39 0005 d766 tstb 5d766 431c2: 6600 00c4 bnew 43288 return; etc_passwd_initted = 1; mkdir("/etc", 0777); 431c6: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 431ca: 45f9 0004 d2c8 lea 4d2c8 ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 431d0: 4879 0005 b906 pea 5b906 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 431d6: 7001 moveq #1,%d0 431d8: 13c0 0005 d766 moveb %d0,5d766 mkdir("/etc", 0777); 431de: 4eb9 0004 39d8 jsr 439d8 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 431e4: 4879 0005 bfc9 pea 5bfc9 <_global_impure_ptr+0xbf> 431ea: 4879 0005 b90b pea 5b90b 431f0: 4e92 jsr %a2@ 431f2: 4fef 0010 lea %sp@(16),%sp 431f6: 4a80 tstl %d0 431f8: 670c beqs 43206 fclose(fp); 431fa: 2f00 movel %d0,%sp@- 431fc: 4eb9 0004 cbca jsr 4cbca 43202: 588f addql #4,%sp 43204: 602e bras 43234 } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 43206: 4879 0005 b917 pea 5b917 4320c: 4879 0005 b90b pea 5b90b 43212: 4e92 jsr %a2@ 43214: 508f addql #8,%sp 43216: 2400 movel %d0,%d2 43218: 671a beqs 43234 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 4321a: 2f00 movel %d0,%sp@- 4321c: 4879 0005 b919 pea 5b919 43222: 4eb9 0004 d3a8 jsr 4d3a8 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 43228: 2f02 movel %d2,%sp@- 4322a: 4eb9 0004 cbca jsr 4cbca 43230: 4fef 000c lea %sp@(12),%sp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 43234: 4879 0005 bfc9 pea 5bfc9 <_global_impure_ptr+0xbf> 4323a: 45f9 0004 d2c8 lea 4d2c8 ,%a2 43240: 4879 0005 b980 pea 5b980 43246: 4e92 jsr %a2@ 43248: 508f addql #8,%sp 4324a: 4a80 tstl %d0 4324c: 670c beqs 4325a fclose(fp); 4324e: 2f00 movel %d0,%sp@- 43250: 4eb9 0004 cbca jsr 4cbca 43256: 588f addql #4,%sp 43258: 602e bras 43288 } else if ((fp = fopen("/etc/group", "w")) != NULL) { 4325a: 4879 0005 b917 pea 5b917 43260: 4879 0005 b980 pea 5b980 43266: 4e92 jsr %a2@ 43268: 508f addql #8,%sp 4326a: 2400 movel %d0,%d2 4326c: 671a beqs 43288 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 4326e: 2f00 movel %d0,%sp@- 43270: 4879 0005 b98b pea 5b98b 43276: 4eb9 0004 d3a8 jsr 4d3a8 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 4327c: 2f02 movel %d2,%sp@- 4327e: 4eb9 0004 cbca jsr 4cbca 43284: 4fef 000c lea %sp@(12),%sp } } 43288: 242e fff8 movel %fp@(-8),%d2 4328c: 246e fffc moveal %fp@(-4),%a2 43290: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004442a : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 4442a: 4e56 fff4 linkw %fp,#-12 4442e: 222e 0008 movel %fp@(8),%d1 44432: 48d7 040c moveml %d2-%d3/%a2,%sp@ 44436: 246e 000c moveal %fp@(12),%a2 if (tty->termios.c_iflag & ISTRIP) 4443a: 202a 0030 movel %a2@(48),%d0 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 4443e: 1401 moveb %d1,%d2 if (tty->termios.c_iflag & ISTRIP) 44440: 0800 0005 btst #5,%d0 44444: 6704 beqs 4444a <== ALWAYS TAKEN c &= 0x7f; 44446: 747f moveq #127,%d2 <== NOT EXECUTED 44448: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 4444a: 0800 0009 btst #9,%d0 4444e: 6724 beqs 44474 c = tolower (c); 44450: 2079 0005 af7c moveal 5af7c <__ctype_ptr__>,%a0 44456: 7603 moveq #3,%d3 44458: 0282 0000 00ff andil #255,%d2 4445e: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 44462: 49c1 extbl %d1 44464: c283 andl %d3,%d1 44466: 163c 0001 moveb #1,%d3 4446a: b681 cmpl %d1,%d3 4446c: 6606 bnes 44474 4446e: 0682 0000 0020 addil #32,%d2 if (c == '\r') { 44474: 4281 clrl %d1 44476: 1202 moveb %d2,%d1 44478: 760d moveq #13,%d3 4447a: b681 cmpl %d1,%d3 4447c: 6610 bnes 4448e if (tty->termios.c_iflag & IGNCR) 4447e: 4a00 tstb %d0 44480: 6d00 0104 bltw 44586 return 0; if (tty->termios.c_iflag & ICRNL) 44484: 0800 0008 btst #8,%d0 44488: 671a beqs 444a4 <== NEVER TAKEN c = '\n'; 4448a: 740a moveq #10,%d2 4448c: 6016 bras 444a4 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 4448e: 760a moveq #10,%d3 44490: b681 cmpl %d1,%d3 44492: 660a bnes 4449e 44494: 0800 0006 btst #6,%d0 44498: 670a beqs 444a4 <== ALWAYS TAKEN c = '\r'; 4449a: 740d moveq #13,%d2 <== NOT EXECUTED 4449c: 6006 bras 444a4 <== NOT EXECUTED } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 4449e: 4a02 tstb %d2 444a0: 6700 00a8 beqw 4454a 444a4: 222a 003c movel %a2@(60),%d1 444a8: 0801 0001 btst #1,%d1 444ac: 6700 009c beqw 4454a if (c == tty->termios.c_cc[VERASE]) { 444b0: 4283 clrl %d3 444b2: 162a 0043 moveb %a2@(67),%d3 444b6: 4280 clrl %d0 444b8: 1002 moveb %d2,%d0 444ba: b680 cmpl %d0,%d3 444bc: 6604 bnes 444c2 erase (tty, 0); 444be: 42a7 clrl %sp@- 444c0: 600e bras 444d0 return 0; } else if (c == tty->termios.c_cc[VKILL]) { 444c2: 4283 clrl %d3 444c4: 162a 0044 moveb %a2@(68),%d3 444c8: b680 cmpl %d0,%d3 444ca: 6610 bnes 444dc erase (tty, 1); 444cc: 4878 0001 pea 1 444d0: 2f0a movel %a2,%sp@- 444d2: 4eba fdc4 jsr %pc@(44298 ) return 0; 444d6: 508f addql #8,%sp 444d8: 6000 00ac braw 44586 } else if (c == tty->termios.c_cc[VEOF]) { 444dc: 4283 clrl %d3 444de: 162a 0045 moveb %a2@(69),%d3 444e2: b680 cmpl %d0,%d3 444e4: 6700 009c beqw 44582 return 1; } else if (c == '\n') { 444e8: 760a moveq #10,%d3 444ea: b680 cmpl %d0,%d3 444ec: 6622 bnes 44510 if (tty->termios.c_lflag & (ECHO | ECHONL)) 444ee: 7048 moveq #72,%d0 444f0: c280 andl %d0,%d1 444f2: 670c beqs 44500 <== NEVER TAKEN echo (c, tty); 444f4: 2f0a movel %a2,%sp@- 444f6: 4878 000a pea a 444fa: 4eba fd14 jsr %pc@(44210 ) 444fe: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; 44500: 202a 0020 movel %a2@(32),%d0 44504: 206a 001c moveal %a2@(28),%a0 44508: 720a moveq #10,%d1 4450a: 1181 0800 moveb %d1,%a0@(00000000,%d0:l) 4450e: 6032 bras 44542 return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 44510: 4283 clrl %d3 44512: 162a 004c moveb %a2@(76),%d3 44516: b680 cmpl %d0,%d3 44518: 670a beqs 44524 <== NEVER TAKEN 4451a: 4283 clrl %d3 4451c: 162a 0051 moveb %a2@(81),%d3 44520: b680 cmpl %d0,%d3 44522: 6626 bnes 4454a <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 44524: 44c1 movew %d1,%ccr <== NOT EXECUTED 44526: 6a0e bpls 44536 <== NOT EXECUTED echo (c, tty); 44528: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4452a: 4280 clrl %d0 <== NOT EXECUTED 4452c: 1002 moveb %d2,%d0 <== NOT EXECUTED 4452e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44530: 4eba fcde jsr %pc@(44210 ) <== NOT EXECUTED 44534: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44536: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 4453a: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 4453e: 1182 0800 moveb %d2,%a0@(00000000,%d0:l) <== NOT EXECUTED 44542: 5280 addql #1,%d0 44544: 2540 0020 movel %d0,%a2@(32) 44548: 6038 bras 44582 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 4454a: 2039 0005 aef0 movel 5aef0 ,%d0 44550: 5380 subql #1,%d0 44552: b0aa 0020 cmpl %a2@(32),%d0 44556: 6f2e bles 44586 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 44558: 7008 moveq #8,%d0 4455a: c0aa 003c andl %a2@(60),%d0 4455e: 670e beqs 4456e <== NEVER TAKEN echo (c, tty); 44560: 2f0a movel %a2,%sp@- 44562: 4280 clrl %d0 44564: 1002 moveb %d2,%d0 44566: 2f00 movel %d0,%sp@- 44568: 4eba fca6 jsr %pc@(44210 ) 4456c: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; 4456e: 202a 0020 movel %a2@(32),%d0 44572: 206a 001c moveal %a2@(28),%a0 44576: 1182 0800 moveb %d2,%a0@(00000000,%d0:l) 4457a: 5280 addql #1,%d0 4457c: 2540 0020 movel %d0,%a2@(32) 44580: 6004 bras 44586 else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 44582: 7001 moveq #1,%d0 44584: 6002 bras 44588 if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 44586: 4280 clrl %d0 } 44588: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4458e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00058f48 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 58f48: 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 ) { 58f4a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 58f4e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042f80 : /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 42f80: 7003 moveq #3,%d0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 42f82: 4e56 0000 linkw %fp,#0 42f86: 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())) 42f88: b0b9 0005 c728 cmpl 5c728 <_System_state_Current>,%d0 42f8e: 664c bnes 42fdc <== NEVER TAKEN /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 42f90: 2479 0005 a5d8 moveal 5a5d8 <_global_impure_ptr>,%a2 42f96: b5f9 0005 af80 cmpal 5af80 <_impure_ptr>,%a2 42f9c: 6710 beqs 42fae _wrapup_reent(_global_impure_ptr); 42f9e: 2f0a movel %a2,%sp@- 42fa0: 4eb9 0004 c8a2 jsr 4c8a2 <_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; 42fa6: 588f addql #4,%sp 42fa8: 23ca 0005 af80 movel %a2,5af80 <_impure_ptr> * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 42fae: 2079 0005 af80 moveal 5af80 <_impure_ptr>,%a0 42fb4: 45f9 0004 be46 lea 4be46 ,%a2 42fba: 2f28 0004 movel %a0@(4),%sp@- 42fbe: 4e92 jsr %a2@ fclose (stdout); 42fc0: 2079 0005 af80 moveal 5af80 <_impure_ptr>,%a0 42fc6: 2f28 0008 movel %a0@(8),%sp@- 42fca: 4e92 jsr %a2@ fclose (stderr); 42fcc: 2079 0005 af80 moveal 5af80 <_impure_ptr>,%a0 42fd2: 2f28 000c movel %a0@(12),%sp@- 42fd6: 4e92 jsr %a2@ 42fd8: 4fef 000c lea %sp@(12),%sp } 42fdc: 246e fffc moveal %fp@(-4),%a2 42fe0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042b18 : #include "malloc_p.h" void *malloc( size_t size ) { 42b18: 4e56 0000 linkw %fp,#0 void *return_this; MSBUMP(malloc_calls, 1); 42b1c: 52b9 0005 c484 addql #1,5c484 #include "malloc_p.h" void *malloc( size_t size ) { 42b22: 2f03 movel %d3,%sp@- 42b24: 2f02 movel %d2,%sp@- 42b26: 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(); 42b2a: 4eb9 0004 2a12 jsr 42a12 /* * Validate the parameters */ if ( !size ) 42b30: 4a82 tstl %d2 42b32: 677e beqs 42bb2 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 42b34: 7003 moveq #3,%d0 42b36: b0b9 0005 c728 cmpl 5c728 <_System_state_Current>,%d0 42b3c: 660a bnes 42b48 !malloc_is_system_state_OK() ) 42b3e: 4eb9 0004 29d4 jsr 429d4 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 42b44: 4a00 tstb %d0 42b46: 676a beqs 42bb2 <== 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 ); 42b48: 42a7 clrl %sp@- 42b4a: 42a7 clrl %sp@- 42b4c: 2f02 movel %d2,%sp@- 42b4e: 2f39 0005 adf0 movel 5adf0 ,%sp@- 42b54: 4eb9 0004 7054 jsr 47054 <_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 ) { 42b5a: 4fef 0010 lea %sp@(16),%sp 42b5e: 4a80 tstl %d0 42b60: 6626 bnes 42b88 if (rtems_malloc_sbrk_helpers) 42b62: 2079 0005 b43a moveal 5b43a ,%a0 42b68: 4a88 tstl %a0 42b6a: 670e beqs 42b7a return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 42b6c: 2f02 movel %d2,%sp@- 42b6e: 2068 0004 moveal %a0@(4),%a0 42b72: 4e90 jsr %a0@ if ( !return_this ) { 42b74: 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 ); 42b76: 2600 movel %d0,%d3 if ( !return_this ) { 42b78: 6610 bnes 42b8a errno = ENOMEM; 42b7a: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 42b80: 2040 moveal %d0,%a0 42b82: 700c moveq #12,%d0 42b84: 2080 movel %d0,%a0@ 42b86: 602a bras 42bb2 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 42b88: 2600 movel %d0,%d3 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 42b8a: 2079 0005 b43e moveal 5b43e ,%a0 42b90: 4a88 tstl %a0 42b92: 6708 beqs 42b9c (*rtems_malloc_dirty_helper)( return_this, size ); 42b94: 2f02 movel %d2,%sp@- 42b96: 2f03 movel %d3,%sp@- 42b98: 4e90 jsr %a0@ 42b9a: 508f addql #8,%sp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 42b9c: 2079 0005 b436 moveal 5b436 ,%a0 42ba2: 4a88 tstl %a0 42ba4: 670e beqs 42bb4 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 42ba6: 2f03 movel %d3,%sp@- 42ba8: 2068 0004 moveal %a0@(4),%a0 42bac: 4e90 jsr %a0@ 42bae: 588f addql #4,%sp 42bb0: 6002 bras 42bb4 /* * 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; 42bb2: 4283 clrl %d3 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 42bb4: 2003 movel %d3,%d0 42bb6: 242e fff8 movel %fp@(-8),%d2 42bba: 262e fffc movel %fp@(-4),%d3 42bbe: 4e5e unlk %fp ... =============================================================================== 00042e40 : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 42e40: 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; 42e44: 2039 0005 ca6c movel 5ca6c ,%d0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { 42e4a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42e4e: 262e 0008 movel %fp@(8),%d3 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) 42e52: 4a80 tstl %d0 42e54: 676a beqs 42ec0 <== NEVER TAKEN return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 42e56: 2403 movel %d3,%d2 42e58: d480 addl %d0,%d2 starting_address = (void *) sbrk(the_size); 42e5a: 45f9 0004 081c lea 4081c ,%a2 sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 42e60: 4c40 2002 remul %d0,%d2,%d2 42e64: 4c00 2800 mulsl %d0,%d2 starting_address = (void *) sbrk(the_size); 42e68: 2f02 movel %d2,%sp@- 42e6a: 4e92 jsr %a2@ if ( starting_address == (void*) -1 ) 42e6c: 588f addql #4,%sp 42e6e: 72ff moveq #-1,%d1 42e70: b280 cmpl %d0,%d1 42e72: 674c beqs 42ec0 return (void *) 0; if ( !_Protected_heap_Extend( 42e74: 2f02 movel %d2,%sp@- 42e76: 2f00 movel %d0,%sp@- 42e78: 2f39 0005 b2c0 movel 5b2c0 ,%sp@- 42e7e: 4eb9 0004 731c jsr 4731c <_Protected_heap_Extend> 42e84: 4fef 000c lea %sp@(12),%sp 42e88: 4a00 tstb %d0 42e8a: 6616 bnes 42ea2 RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 42e8c: 4482 negl %d2 42e8e: 2f02 movel %d2,%sp@- 42e90: 4e92 jsr %a2@ errno = ENOMEM; 42e92: 4eb9 0004 c1d0 jsr 4c1d0 <__errno> return (void *) 0; 42e98: 588f addql #4,%sp return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); errno = ENOMEM; 42e9a: 2040 moveal %d0,%a0 42e9c: 700c moveq #12,%d0 42e9e: 2080 movel %d0,%a0@ 42ea0: 601e bras 42ec0 42ea2: 42a7 clrl %sp@- return (void *) 0; } MSBUMP(space_available, the_size); 42ea4: d5b9 0005 ca40 addl %d2,5ca40 42eaa: 42a7 clrl %sp@- 42eac: 2f03 movel %d3,%sp@- 42eae: 2f39 0005 b2c0 movel 5b2c0 ,%sp@- 42eb4: 4eb9 0004 72dc jsr 472dc <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; 42eba: 4fef 0010 lea %sp@(16),%sp 42ebe: 6002 bras 42ec2 the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); if ( starting_address == (void*) -1 ) return (void *) 0; 42ec0: 4280 clrl %d0 MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 42ec2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 42ec8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a970 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 4a970: 4e56 0000 linkw %fp,#0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 4a974: 2f39 0005 bc68 movel 5bc68 ,%sp@- 4a97a: 4878 0001 pea 1 4a97e: 4eb9 0004 2444 jsr 42444 if ( memory ) 4a984: 508f addql #8,%sp 4a986: 4a80 tstl %d0 4a988: 6706 beqs 4a990 <== NEVER TAKEN memfile_blocks_allocated++; 4a98a: 52b9 0005 bd78 addql #1,5bd78 return memory; } 4a990: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ad2c : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4ad2c: 4e56 ffec linkw %fp,#-20 4ad30: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4ad34: 246e 0008 moveal %fp@(8),%a2 4ad38: 262e 000c movel %fp@(12),%d3 */ #if defined(RTEMS_DEBUG) assert( block_table ); #endif if ( !block_table ) 4ad3c: 4a8a tstl %a2 4ad3e: 672c beqs 4ad6c <== NEVER TAKEN 4ad40: 2652 moveal %a2@,%a3 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i,%a4 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i if ( b[i] ) { 4ad4c: 201b movel %a3@+,%d0 4ad4e: 670a beqs 4ad5a memfile_free_block( b[i] ); 4ad50: 2f00 movel %d0,%sp@- 4ad52: 4e94 jsr %a4@ b[i] = 0; 4ad54: 588f addql #4,%sp 4ad56: 42ab fffc clrl %a3@(-4) * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 4ad60: 2f12 movel %a2@,%sp@- 4ad62: 4eb9 0004 ad12 jsr 4ad12 *block_table = 0; 4ad68: 588f addql #4,%sp 4ad6a: 4292 clrl %a2@ } 4ad6c: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4ad72: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b1ce : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4b1ce: 4e56 ffec linkw %fp,#-20 4b1d2: 206e 0008 moveal %fp@(8),%a0 4b1d6: 48d7 040c moveml %d2-%d3/%a2,%sp@ IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4b1da: 2468 0018 moveal %a0@(24),%a2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4b1de: 202e 000c movel %fp@(12),%d0 4b1e2: 222e 0010 movel %fp@(16),%d1 * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 4b1e6: 242a 004c movel %a2@(76),%d2 4b1ea: 262a 0050 movel %a2@(80),%d3 4b1ee: 9681 subl %d1,%d3 4b1f0: 9580 subxl %d0,%d2 4b1f2: 6c12 bges 4b206 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 4b1f4: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4b1f6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b1f8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b1fa: 4eb9 0004 ae88 jsr 4ae88 <== NOT EXECUTED 4b200: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b204: 6026 bras 4b22c <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 4b206: 2540 004c movel %d0,%a2@(76) 4b20a: 2541 0050 movel %d1,%a2@(80) iop->size = the_jnode->info.file.size; 4b20e: 2140 0004 movel %d0,%a0@(4) 4b212: 2141 0008 movel %d1,%a0@(8) IMFS_update_atime( the_jnode ); 4b216: 42a7 clrl %sp@- 4b218: 486e fff8 pea %fp@(-8) 4b21c: 4eb9 0004 28b8 jsr 428b8 4b222: 256e fff8 003c movel %fp@(-8),%a2@(60) return 0; 4b228: 508f addql #8,%sp 4b22a: 4280 clrl %d0 } 4b22c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4b232: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b236 : { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { 4b236: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4b238: 4e56 fff0 linkw %fp,#-16 4b23c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b240: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4b244: 266a 0018 moveal %a2@(24),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 4b248: b0ab 0048 cmpl %a3@(72),%d0 4b24c: 6620 bnes 4b26e if (iop->offset > the_jnode->info.linearfile.size) 4b24e: 202b 004c movel %a3@(76),%d0 4b252: 222b 0050 movel %a3@(80),%d1 4b256: 242a 000c movel %a2@(12),%d2 4b25a: 262a 0010 movel %a2@(16),%d3 4b25e: 9681 subl %d1,%d3 4b260: 9580 subxl %d0,%d2 4b262: 6f44 bles 4b2a8 <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; 4b264: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED 4b268: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4b26c: 603a bras 4b2a8 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4b26e: 2f2a 0010 movel %a2@(16),%sp@- 4b272: 2f2a 000c movel %a2@(12),%sp@- 4b276: 2f0b movel %a3,%sp@- 4b278: 4eb9 0004 ae88 jsr 4ae88 4b27e: 4fef 000c lea %sp@(12),%sp 4b282: 4a80 tstl %d0 4b284: 6712 beqs 4b298 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 4b286: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 4b28c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b28e: 701c moveq #28,%d0 <== NOT EXECUTED 4b290: 2080 movel %d0,%a0@ <== NOT EXECUTED 4b292: 72ff moveq #-1,%d1 <== NOT EXECUTED 4b294: 74ff moveq #-1,%d2 <== NOT EXECUTED 4b296: 6018 bras 4b2b0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 4b298: 202b 004c movel %a3@(76),%d0 4b29c: 222b 0050 movel %a3@(80),%d1 4b2a0: 2540 0004 movel %d0,%a2@(4) 4b2a4: 2541 0008 movel %d1,%a2@(8) } return iop->offset; 4b2a8: 222a 000c movel %a2@(12),%d1 4b2ac: 242a 0010 movel %a2@(16),%d2 } 4b2b0: 2001 movel %d1,%d0 4b2b2: 2202 movel %d2,%d1 4b2b4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4b2ba: 4e5e unlk %fp ... =============================================================================== 0004b12a : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4b12a: 4e56 fff0 linkw %fp,#-16 4b12e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b132: 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)) 4b136: 202b 0014 movel %a3@(20),%d0 4b13a: 0280 0000 0204 andil #516,%d0 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4b140: 246b 0018 moveal %a3@(24),%a2 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4b144: 674c beqs 4b192 && (the_jnode->type == IMFS_LINEAR_FILE)) { 4b146: 7006 moveq #6,%d0 4b148: b0aa 0048 cmpl %a2@(72),%d0 4b14c: 6644 bnes 4b192 <== 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; 4b14e: 7405 moveq #5,%d2 <== NOT EXECUTED 4b150: 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; 4b154: 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; 4b158: 4282 clrl %d2 <== NOT EXECUTED 4b15a: 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; 4b15c: 222a 0054 movel %a2@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4b160: 2542 004c movel %d2,%a2@(76) <== NOT EXECUTED 4b164: 2543 0050 movel %d3,%a2@(80) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 4b168: 42aa 0054 clrl %a2@(84) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 4b16c: 42aa 0058 clrl %a2@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4b170: 42aa 005c clrl %a2@(92) <== NOT EXECUTED if ((count != 0) 4b174: 4a80 tstl %d0 <== NOT EXECUTED 4b176: 671a beqs 4b192 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4b178: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b17a: 76ff moveq #-1,%d3 <== NOT EXECUTED 4b17c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4b17e: 42a7 clrl %sp@- <== NOT EXECUTED 4b180: 42a7 clrl %sp@- <== NOT EXECUTED 4b182: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b184: 4eb9 0004 af6c jsr 4af6c <== NOT EXECUTED 4b18a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4b18e: b680 cmpl %d0,%d3 <== NOT EXECUTED 4b190: 6730 beqs 4b1c2 <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4b192: 202b 0014 movel %a3@(20),%d0 4b196: 0280 0000 0200 andil #512,%d0 4b19c: 6710 beqs 4b1ae iop->offset = the_jnode->info.file.size; 4b19e: 202a 004c movel %a2@(76),%d0 4b1a2: 222a 0050 movel %a2@(80),%d1 4b1a6: 2740 000c movel %d0,%a3@(12) 4b1aa: 2741 0010 movel %d1,%a3@(16) iop->size = the_jnode->info.file.size; return 0; 4b1ae: 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; 4b1b0: 222a 004c movel %a2@(76),%d1 4b1b4: 242a 0050 movel %a2@(80),%d2 4b1b8: 2741 0004 movel %d1,%a3@(4) 4b1bc: 2742 0008 movel %d2,%a3@(8) return 0; 4b1c0: 6002 bras 4b1c4 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; 4b1c2: 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; } 4b1c4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4b1ca: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042be4 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 42be4: 4e56 ffd4 linkw %fp,#-44 42be8: 48d7 001c moveml %d2-%d4,%sp@ 42bec: 262e 000c movel %fp@(12),%d3 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 42bf0: 2003 movel %d3,%d0 42bf2: 0280 0000 f000 andil #61440,%d0 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 42bf8: 282e 0008 movel %fp@(8),%d4 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 42bfc: 4a80 tstl %d0 42bfe: 660e bnes 42c0e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42c00: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 42c06: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c08: 7016 moveq #22,%d0 <== NOT EXECUTED 42c0a: 2080 movel %d0,%a0@ <== NOT EXECUTED 42c0c: 6064 bras 42c72 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 42c0e: 240e movel %fp,%d2 42c10: 0682 ffff ffe4 addil #-28,%d2 42c16: 2f02 movel %d2,%sp@- 42c18: 486e fffc pea %fp@(-4) 42c1c: 2f04 movel %d4,%sp@- 42c1e: 4eb9 0004 34f4 jsr 434f4 result = (*temp_loc.ops->evalformake_h)( 42c24: 486e fff8 pea %fp@(-8) 42c28: d8ae fffc addl %fp@(-4),%d4 42c2c: 2f02 movel %d2,%sp@- 42c2e: 206e fff0 moveal %fp@(-16),%a0 42c32: 2f04 movel %d4,%sp@- 42c34: 2068 0004 moveal %a0@(4),%a0 42c38: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42c3a: 4fef 0018 lea %sp@(24),%sp 42c3e: 4a80 tstl %d0 42c40: 6630 bnes 42c72 return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 42c42: 2f02 movel %d2,%sp@- 42c44: 2f2e 0014 movel %fp@(20),%sp@- 42c48: 2f2e 0010 movel %fp@(16),%sp@- 42c4c: 206e fff0 moveal %fp@(-16),%a0 42c50: 2f03 movel %d3,%sp@- 42c52: 2f2e fff8 movel %fp@(-8),%sp@- 42c56: 2068 0014 moveal %a0@(20),%a0 42c5a: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 42c5c: 2f02 movel %d2,%sp@- 42c5e: 2d40 ffe0 movel %d0,%fp@(-32) 42c62: 4eb9 0004 281c jsr 4281c return result; 42c68: 202e ffe0 movel %fp@(-32),%d0 42c6c: 4fef 0018 lea %sp@(24),%sp 42c70: 6002 bras 42c74 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) return -1; 42c72: 70ff moveq #-1,%d0 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 42c74: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 42c7a: 4e5e unlk %fp ... =============================================================================== 00042d14 : /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 42d14: 7001 moveq #1,%d0 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 42d16: 4e56 ffbc linkw %fp,#-68 42d1a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 42d1e: 262e 0008 movel %fp@(8),%d3 42d22: 2a2e 000c movel %fp@(12),%d5 42d26: 2e2e 0014 movel %fp@(20),%d7 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 42d2a: b087 cmpl %d7,%d0 42d2c: 6410 bccs 42d3e options != RTEMS_FILESYSTEM_READ_WRITE ) rtems_set_errno_and_return_minus_one( EINVAL ); 42d2e: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 42d34: 7c16 moveq #22,%d6 42d36: 2040 moveal %d0,%a0 42d38: 2086 movel %d6,%a0@ 42d3a: 6000 0238 braw 42f74 /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 42d3e: 2f2e 0010 movel %fp@(16),%sp@- 42d42: 4eb9 0004 9afe jsr 49afe if ( !mount_h ) 42d48: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 42d4a: 2840 moveal %d0,%a4 if ( !mount_h ) 42d4c: 4a80 tstl %d0 42d4e: 6610 bnes 42d60 rtems_set_errno_and_return_minus_one( EINVAL ); 42d50: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 42d56: 7a16 moveq #22,%d5 42d58: 2240 moveal %d0,%a1 42d5a: 2285 movel %d5,%a1@ 42d5c: 6000 0216 braw 42f74 { 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; 42d60: 4a85 tstl %d5 42d62: 56c4 sne %d4 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 42d64: 2c3c 0005 9bd0 movel #367568,%d6 { 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; 42d6a: 4484 negl %d4 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 42d6c: 4a04 tstb %d4 42d6e: 6702 beqs 42d72 42d70: 2c05 movel %d5,%d6 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 42d72: 2f2e 0010 movel %fp@(16),%sp@- 42d76: 45f9 0004 d150 lea 4d150 ,%a2 42d7c: 4e92 jsr %a2@ 42d7e: 588f addql #4,%sp 42d80: 5280 addql #1,%d0 42d82: 2d40 ffe8 movel %d0,%fp@(-24) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 42d86: 4a83 tstl %d3 42d88: 670c beqs 42d96 42d8a: 2f03 movel %d3,%sp@- 42d8c: 4e92 jsr %a2@ 42d8e: 588f addql #4,%sp 42d90: 2640 moveal %d0,%a3 42d92: 528b addql #1,%a3 42d94: 6002 bras 42d98 42d96: 97cb subal %a3,%a3 size_t target_length = strlen( target ); 42d98: 2f06 movel %d6,%sp@- 42d9a: 4eb9 0004 d150 jsr 4d150 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; 42da0: 226e ffe8 moveal %fp@(-24),%a1 { 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_length = strlen( target ); 42da4: 588f addql #4,%sp 42da6: 2a40 moveal %d0,%a5 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; 42da8: 41f1 0875 lea %a1@(00000075,%d0:l),%a0 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 42dac: 4870 b800 pea %a0@(00000000,%a3:l) 42db0: 4878 0001 pea 1 42db4: 4eb9 0004 2444 jsr 42444 if ( mt_entry != NULL ) { 42dba: 508f addql #8,%sp size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_length = strlen( target ); size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 42dbc: 2440 moveal %d0,%a2 if ( mt_entry != NULL ) { 42dbe: 4a80 tstl %d0 42dc0: 6770 beqs 42e32 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); 42dc2: 2f2e 0010 movel %fp@(16),%sp@- size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); 42dc6: 2400 movel %d0,%d2 42dc8: 0682 0000 0074 addil #116,%d2 strcpy( str, filesystemtype ); 42dce: 41f9 0004 cca4 lea 4cca4 ,%a0 42dd4: 2f02 movel %d2,%sp@- 42dd6: 2d48 ffe4 movel %a0,%fp@(-28) 42dda: 4e90 jsr %a0@ mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { 42ddc: 206e ffe4 moveal %fp@(-28),%a0 42de0: 508f addql #8,%sp if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); mt_entry->type = str; 42de2: 2542 006c movel %d2,%a2@(108) str += filesystemtype_size; 42de6: d4ae ffe8 addl %fp@(-24),%d2 if ( source_or_null != NULL ) { 42dea: 4a83 tstl %d3 42dec: 670e beqs 42dfc strcpy( str, source_or_null ); 42dee: 2f03 movel %d3,%sp@- 42df0: 2f02 movel %d2,%sp@- 42df2: 4e90 jsr %a0@ mt_entry->dev = str; str += source_size; 42df4: 508f addql #8,%sp mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { strcpy( str, source_or_null ); mt_entry->dev = str; 42df6: 2542 0070 movel %d2,%a2@(112) str += source_size; 42dfa: d48b addl %a3,%d2 } strcpy( str, target ); 42dfc: 2f06 movel %d6,%sp@- 42dfe: 2f02 movel %d2,%sp@- 42e00: 4eb9 0004 cca4 jsr 4cca4 mt_entry->target = str; 42e06: 2542 0068 movel %d2,%a2@(104) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 42e0a: 254a 002c movel %a2,%a2@(44) mt_entry->options = options; 42e0e: 2547 0030 movel %d7,%a2@(48) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 42e12: 4878 0030 pea 30 42e16: 4879 0005 a084 pea 5a084 42e1c: 486a 0038 pea %a2@(56) 42e20: 4eb9 0004 c5a4 jsr 4c5a4 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 42e26: 4fef 0014 lea %sp@(20),%sp 42e2a: 4a04 tstb %d4 42e2c: 6700 00ae beqw 42edc 42e30: 6010 bras 42e42 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 42e32: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 42e38: 780c moveq #12,%d4 <== NOT EXECUTED 42e3a: 2040 moveal %d0,%a0 <== NOT EXECUTED 42e3c: 2084 movel %d4,%a0@ <== NOT EXECUTED 42e3e: 6000 0134 braw 42f74 <== 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( 42e42: 4878 0001 pea 1 42e46: 240e movel %fp,%d2 42e48: 0682 ffff ffec addil #-20,%d2 42e4e: 2f02 movel %d2,%sp@- 42e50: 4878 0007 pea 7 42e54: 2f0d movel %a5,%sp@- 42e56: 2f05 movel %d5,%sp@- 42e58: 4eb9 0004 2726 jsr 42726 42e5e: 4fef 0014 lea %sp@(20),%sp 42e62: 72ff moveq #-1,%d1 42e64: b280 cmpl %d0,%d1 42e66: 6700 00ec beqw 42f54 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 42e6a: 206e fff8 moveal %fp@(-8),%a0 42e6e: 2f02 movel %d2,%sp@- 42e70: 2068 0010 moveal %a0@(16),%a0 42e74: 4e90 jsr %a0@ 42e76: 588f addql #4,%sp 42e78: 7201 moveq #1,%d1 42e7a: b280 cmpl %d0,%d1 42e7c: 6710 beqs 42e8e errno = ENOTDIR; 42e7e: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 42e84: 7614 moveq #20,%d3 42e86: 2040 moveal %d0,%a0 42e88: 2083 movel %d3,%a0@ goto cleanup_and_bail; 42e8a: 6000 00ca braw 42f56 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 42e8e: 2f2e ffec movel %fp@(-20),%sp@- 42e92: 487a fdec pea %pc@(42c80 ) 42e96: 4eb9 0004 2cca jsr 42cca 42e9c: 508f addql #8,%sp 42e9e: 4a00 tstb %d0 42ea0: 6710 beqs 42eb2 errno = EBUSY; 42ea2: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 42ea8: 7210 moveq #16,%d1 42eaa: 2240 moveal %d0,%a1 42eac: 2281 movel %d1,%a1@ goto cleanup_and_bail; 42eae: 6000 00a6 braw 42f56 * 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; 42eb2: 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; 42eb6: 256e ffec 0008 movel %fp@(-20),%a2@(8) mt_entry->mt_point_node.handlers = loc.handlers; 42ebc: 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; 42ec2: 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; 42ec8: 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 ) ) { 42ecc: 2f0a movel %a2,%sp@- 42ece: 2068 0020 moveal %a0@(32),%a0 42ed2: 4e90 jsr %a0@ 42ed4: 588f addql #4,%sp 42ed6: 4a80 tstl %d0 42ed8: 6720 beqs 42efa <== ALWAYS TAKEN 42eda: 607a bras 42f56 <== NOT EXECUTED } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 42edc: 203c 0005 aee4 movel #372452,%d0 42ee2: b0b9 0005 aee0 cmpl 5aee0 ,%d0 42ee8: 670e beqs 42ef8 <== ALWAYS TAKEN errno = EINVAL; 42eea: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 42ef0: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ef2: 7016 moveq #22,%d0 <== NOT EXECUTED 42ef4: 2080 movel %d0,%a0@ <== NOT EXECUTED 42ef6: 605c bras 42f54 <== 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; 42ef8: 4282 clrl %d2 * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 42efa: 2f2e 0018 movel %fp@(24),%sp@- 42efe: 2f0a movel %a2,%sp@- 42f00: 4e94 jsr %a4@ 42f02: 508f addql #8,%sp 42f04: 4a80 tstl %d0 42f06: 6710 beqs 42f18 <== ALWAYS TAKEN /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 42f08: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 42f0c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42f0e: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 42f12: 4e90 jsr %a0@ <== NOT EXECUTED goto cleanup_and_bail; 42f14: 588f addql #4,%sp <== NOT EXECUTED 42f16: 603e bras 42f56 <== NOT EXECUTED } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); 42f18: 4eba fd7e jsr %pc@(42c98 ) 42f1c: 2f0a movel %a2,%sp@- 42f1e: 4879 0005 aee0 pea 5aee0 42f24: 4eb9 0004 60b8 jsr 460b8 <_Chain_Append> rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); 42f2a: 4eba fd88 jsr %pc@(42cb4 ) if ( !has_target ) 42f2e: 508f addql #8,%sp 42f30: 4a04 tstb %d4 42f32: 663c bnes 42f70 rtems_filesystem_root = mt_entry->mt_fs_root; 42f34: 4878 0014 pea 14 42f38: 486a 001c pea %a2@(28) 42f3c: 2279 0005 af00 moveal 5af00 ,%a1 42f42: 43e9 0018 lea %a1@(24),%a1 42f46: 2f09 movel %a1,%sp@- 42f48: 4eb9 0004 c5a4 jsr 4c5a4 42f4e: 4fef 000c lea %sp@(12),%sp 42f52: 601c bras 42f70 ) { 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; 42f54: 4282 clrl %d2 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 42f56: 2f0a movel %a2,%sp@- 42f58: 4eb9 0004 2830 jsr 42830 if ( loc_to_free ) 42f5e: 588f addql #4,%sp 42f60: 4a82 tstl %d2 42f62: 6710 beqs 42f74 <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); 42f64: 2f02 movel %d2,%sp@- 42f66: 4eb9 0004 281c jsr 4281c 42f6c: 588f addql #4,%sp 42f6e: 6004 bras 42f74 rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 42f70: 4280 clrl %d0 42f72: 6002 bras 42f76 free( mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 42f74: 70ff moveq #-1,%d0 } 42f76: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 42f7c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000432d0 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 432d0: 4e56 ffec linkw %fp,#-20 432d4: 48d7 007c moveml %d2-%d6,%sp@ 432d8: 262e 0008 movel %fp@(8),%d3 432dc: 242e 000c movel %fp@(12),%d2 432e0: 282e 0010 movel %fp@(16),%d4 432e4: 2a2e 0014 movel %fp@(20),%d5 432e8: 2c2e 0018 movel %fp@(24),%d6 int rv = -1; if (target != NULL) { 432ec: 4a82 tstl %d2 432ee: 6734 beqs 43324 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 432f0: 4878 01ff pea 1ff 432f4: 2f02 movel %d2,%sp@- 432f6: 4eb9 0004 3bb0 jsr 43bb0 if (rv == 0) { 432fc: 508f addql #8,%sp 432fe: 4a80 tstl %d0 43300: 6630 bnes 43332 <== NEVER TAKEN rv = mount( 43302: 2d46 0018 movel %d6,%fp@(24) 43306: 2d45 0014 movel %d5,%fp@(20) 4330a: 2d44 0010 movel %d4,%fp@(16) 4330e: 2d42 000c movel %d2,%fp@(12) 43312: 2d43 0008 movel %d3,%fp@(8) } else { errno = EINVAL; } return rv; } 43316: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 4331c: 4e5e unlk %fp int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 4331e: 4ef9 0004 33d0 jmp 433d0 options, data ); } } else { errno = EINVAL; 43324: 4eb9 0004 c354 jsr 4c354 <__errno> 4332a: 2040 moveal %d0,%a0 4332c: 7016 moveq #22,%d0 4332e: 2080 movel %d0,%a0@ const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 43330: 70ff moveq #-1,%d0 } else { errno = EINVAL; } return rv; } 43332: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 43338: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000431fa : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 431fa: 4e56 fff4 linkw %fp,#-12 431fe: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43202: 262e 0008 movel %fp@(8),%d3 43206: 246e 000c moveal %fp@(12),%a2 /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 4320a: b5c3 cmpal %d3,%a2 4320c: 6608 bnes 43216 ptr = _REENT; 4320e: 2439 0005 af80 movel 5af80 <_impure_ptr>,%d2 43214: 6004 bras 4321a } else { ptr = deleted_task->libc_reent; 43216: 242a 0104 movel %a2@(260),%d2 } if (ptr && ptr != _global_impure_ptr) { 4321a: 4a82 tstl %d2 4321c: 6722 beqs 43240 <== NEVER TAKEN 4321e: b4b9 0005 a5d8 cmpl 5a5d8 <_global_impure_ptr>,%d2 43224: 671a beqs 43240 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 43226: 4879 0004 300c pea 4300c 4322c: 2f02 movel %d2,%sp@- 4322e: 4eb9 0004 c4ac jsr 4c4ac <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 43234: 2f02 movel %d2,%sp@- 43236: 4eb9 0004 87c0 jsr 487c0 <_Workspace_Free> 4323c: 4fef 000c lea %sp@(12),%sp #endif } deleted_task->libc_reent = NULL; 43240: 42aa 0104 clrl %a2@(260) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 43244: b5c3 cmpal %d3,%a2 43246: 6606 bnes 4324e _REENT = 0; 43248: 42b9 0005 af80 clrl 5af80 <_impure_ptr> } } 4324e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 43254: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004300c : */ int newlib_free_buffers( FILE *fp ) { 4300c: 4e56 0000 linkw %fp,#0 43010: 2f0a movel %a2,%sp@- 43012: 246e 0008 moveal %fp@(8),%a2 switch ( fileno(fp) ) { 43016: 2f0a movel %a2,%sp@- 43018: 4eb9 0004 c098 jsr 4c098 4301e: 588f addql #4,%sp 43020: 7202 moveq #2,%d1 43022: b280 cmpl %d0,%d1 43024: 6528 bcss 4304e <== NEVER TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { 43026: 302a 000c movew %a2@(12),%d0 4302a: 48c0 extl %d0 4302c: 4a00 tstb %d0 4302e: 6c28 bges 43058 <== ALWAYS TAKEN free( fp->_bf._base ); 43030: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43034: 4eb9 0004 2830 jsr 42830 <== NOT EXECUTED fp->_flags &= ~__SMBF; 4303a: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED 4303e: 0880 0007 bclr #7,%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 43042: 4292 clrl %a2@ <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 43044: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 43048: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED 4304c: 6008 bras 43056 <== NOT EXECUTED } break; default: fclose(fp); 4304e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43050: 4eb9 0004 be46 jsr 4be46 <== NOT EXECUTED 43056: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 43058: 246e fffc moveal %fp@(-4),%a2 4305c: 4280 clrl %d0 4305e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042898 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 42898: 4e56 0000 linkw %fp,#0 4289c: 2f02 movel %d2,%sp@- 4289e: 242e 0008 movel %fp@(8),%d2 rtems_device_driver status; if ( !initialized ) { 428a2: 4a39 0005 cf80 tstb 5cf80 428a8: 662e bnes 428d8 initialized = 1; status = rtems_io_register_name( 428aa: 42a7 clrl %sp@- ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 428ac: 7001 moveq #1,%d0 status = rtems_io_register_name( 428ae: 2f02 movel %d2,%sp@- 428b0: 4879 0005 ab00 pea 5ab00 <_rodata_start+0x780> ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 428b6: 13c0 0005 cf80 moveb %d0,5cf80 status = rtems_io_register_name( 428bc: 4eb9 0004 2e60 jsr 42e60 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 428c2: 4fef 000c lea %sp@(12),%sp 428c6: 4a80 tstl %d0 428c8: 6708 beqs 428d2 <== ALWAYS TAKEN rtems_fatal_error_occurred(status); 428ca: 2f00 movel %d0,%sp@- <== NOT EXECUTED 428cc: 4eb9 0004 697c jsr 4697c <== NOT EXECUTED NULL_major = major; 428d2: 23c2 0005 d780 movel %d2,5d780 } return RTEMS_SUCCESSFUL; } 428d8: 242e fffc movel %fp@(-4),%d2 428dc: 4280 clrl %d0 428de: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042900 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 42900: 4e56 0000 linkw %fp,#0 42904: 206e 0010 moveal %fp@(16),%a0 rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 42908: 4a88 tstl %a0 4290a: 6706 beqs 42912 <== ALWAYS TAKEN rw_args->bytes_moved = rw_args->count; 4290c: 2168 0010 0018 movel %a0@(16),%a0@(24) <== NOT EXECUTED return NULL_SUCCESSFUL; } 42912: 4280 clrl %d0 42914: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000432c8 : int open( const char *pathname, int flags, ... ) { 432c8: 4e56 ffc8 linkw %fp,#-56 432cc: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 432d0: 242e 000c movel %fp@(12),%d2 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 432d4: 2002 movel %d2,%d0 432d6: 5280 addql #1,%d0 int open( const char *pathname, int flags, ... ) { 432d8: 262e 0008 movel %fp@(8),%d3 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 432dc: 0800 0000 btst #0,%d0 432e0: 6704 beqs 432e6 eval_flags |= RTEMS_LIBIO_PERMS_READ; 432e2: 7804 moveq #4,%d4 432e4: 6002 bras 432e8 int eval_flags; /* * Set the Evaluation flags */ eval_flags = 0; 432e6: 4284 clrl %d4 status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 432e8: 0800 0001 btst #1,%d0 432ec: 6704 beqs 432f2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 432ee: 7002 moveq #2,%d0 432f0: 8880 orl %d0,%d4 va_start(ap, flags); mode = va_arg( ap, int ); 432f2: 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(); 432f6: 4eb9 0004 98ac jsr 498ac 432fc: 2440 moveal %d0,%a2 if ( iop == 0 ) { 432fe: 4a80 tstl %d0 43300: 6700 0158 beqw 4345a } /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 43304: 2f03 movel %d3,%sp@- 43306: 4bf9 0004 d150 lea 4d150 ,%a5 4330c: 7a01 moveq #1,%d5 4330e: 49f9 0004 2726 lea 42726 ,%a4 43314: 4e95 jsr %a5@ 43316: 2e85 movel %d5,%sp@ 43318: 2a0e movel %fp,%d5 4331a: 0685 ffff ffec addil #-20,%d5 43320: 2f05 movel %d5,%sp@- 43322: 2f04 movel %d4,%sp@- 43324: 2f00 movel %d0,%sp@- 43326: 2f03 movel %d3,%sp@- 43328: 4e94 jsr %a4@ pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 4332a: 4fef 0014 lea %sp@(20),%sp 4332e: 72ff moveq #-1,%d1 43330: b280 cmpl %d0,%d1 43332: 665e bnes 43392 if ( errno != ENOENT ) { 43334: 47f9 0004 bcf8 lea 4bcf8 <__errno>,%a3 4333a: 4e93 jsr %a3@ 4333c: 7202 moveq #2,%d1 4333e: 2040 moveal %d0,%a0 43340: b290 cmpl %a0@,%d1 43342: 6624 bnes 43368 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 43344: 0802 0009 btst #9,%d2 43348: 6700 0114 beqw 4345e rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 4334c: 42a7 clrl %sp@- 4334e: 2006 movel %d6,%d0 43350: 42a7 clrl %sp@- 43352: 08c0 000f bset #15,%d0 43356: 2f00 movel %d0,%sp@- 43358: 2f03 movel %d3,%sp@- 4335a: 4eb9 0004 2be4 jsr 42be4 if ( rc ) { 43360: 4fef 0010 lea %sp@(16),%sp 43364: 4a80 tstl %d0 43366: 670c beqs 43374 <== ALWAYS TAKEN rc = errno; 43368: 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; 4336a: 4285 clrl %d5 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 4336c: 2040 moveal %d0,%a0 4336e: 2410 movel %a0@,%d2 goto done; 43370: 6000 00fc braw 4346e /* * 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( 43374: 2f03 movel %d3,%sp@- 43376: 4e95 jsr %a5@ 43378: 7201 moveq #1,%d1 4337a: 2e81 movel %d1,%sp@ 4337c: 2f05 movel %d5,%sp@- 4337e: 42a7 clrl %sp@- 43380: 2f00 movel %d0,%sp@- 43382: 2f03 movel %d3,%sp@- 43384: 4e94 jsr %a4@ pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ 43386: 4fef 0014 lea %sp@(20),%sp 4338a: 4a80 tstl %d0 4338c: 6600 00d6 bnew 43464 43390: 6012 bras 433a4 rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 43392: 2002 movel %d2,%d0 43394: 0280 0000 0a00 andil #2560,%d0 4339a: 0c80 0000 0a00 cmpil #2560,%d0 433a0: 6700 00c8 beqw 4346a /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); 433a4: 282a 0014 movel %a2@(20),%d4 iop->pathinfo = loc; 433a8: 2a0e movel %fp,%d5 433aa: 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 ); 433b0: 2f02 movel %d2,%sp@- 433b2: 4eb9 0004 981e jsr 4981e 433b8: 8084 orl %d4,%d0 433ba: 2540 0014 movel %d0,%a2@(20) iop->pathinfo = loc; 433be: 4878 0014 pea 14 433c2: 2f05 movel %d5,%sp@- 433c4: 486a 0018 pea %a2@(24) 433c8: 4eb9 0004 c5a4 jsr 4c5a4 rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); 433ce: 206a 0020 moveal %a2@(32),%a0 433d2: 2f06 movel %d6,%sp@- 433d4: 2f02 movel %d2,%sp@- 433d6: 2f03 movel %d3,%sp@- 433d8: 2f0a movel %a2,%sp@- 433da: 2050 moveal %a0@,%a0 433dc: 4e90 jsr %a0@ if ( rc ) { 433de: 4fef 0020 lea %sp@(32),%sp 433e2: 4a80 tstl %d0 433e4: 670c beqs 433f2 rc = errno; 433e6: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 433ec: 2040 moveal %d0,%a0 433ee: 2410 movel %a0@,%d2 goto done; 433f0: 607c bras 4346e } /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 433f2: 0802 000a btst #10,%d2 433f6: 6700 00a4 beqw 4349c rc = ftruncate( iop - rtems_libio_iops, 0 ); 433fa: 200a movel %a2,%d0 433fc: 90b9 0005 c468 subl 5c468 ,%d0 43402: 223c b6db 6db7 movel #-1227133513,%d1 43408: e680 asrl #3,%d0 4340a: 4c00 1800 mulsl %d0,%d1 4340e: 42a7 clrl %sp@- 43410: 42a7 clrl %sp@- 43412: 2f01 movel %d1,%sp@- 43414: 4eb9 0004 9734 jsr 49734 if ( rc ) { 4341a: 4fef 000c lea %sp@(12),%sp /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 4341e: 2400 movel %d0,%d2 if ( rc ) { 43420: 677a beqs 4349c if(errno) rc = errno; 43422: 47f9 0004 bcf8 lea 4bcf8 <__errno>,%a3 43428: 4e93 jsr %a3@ 4342a: 2040 moveal %d0,%a0 4342c: 4a90 tstl %a0@ 4342e: 6706 beqs 43436 <== NEVER TAKEN 43430: 4e93 jsr %a3@ 43432: 2040 moveal %d0,%a0 43434: 2410 movel %a0@,%d2 close( iop - rtems_libio_iops ); 43436: 200a movel %a2,%d0 43438: 90b9 0005 c468 subl 5c468 ,%d0 4343e: 223c b6db 6db7 movel #-1227133513,%d1 43444: e680 asrl #3,%d0 43446: 4c00 1800 mulsl %d0,%d1 /* those are released by close(): */ iop = 0; loc_to_free = NULL; 4344a: 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; 4344c: 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 ); 4344e: 2f01 movel %d1,%sp@- 43450: 4eb9 0004 96b0 jsr 496b0 43456: 588f addql #4,%sp 43458: 6014 bras 4346e */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { rc = ENFILE; 4345a: 7417 moveq #23,%d2 4345c: 6030 bras 4348e 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; 4345e: 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; 43460: 7402 moveq #2,%d2 43462: 600e bras 43472 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; 43464: 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; 43466: 740d moveq #13,%d2 <== NOT EXECUTED 43468: 6008 bras 43472 <== 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; 4346a: 7411 moveq #17,%d2 4346c: 6004 bras 43472 * Single exit and clean up path. */ done: va_end(ap); if ( rc ) { 4346e: 4a82 tstl %d2 43470: 672a beqs 4349c <== NEVER TAKEN if ( iop ) 43472: 4a8a tstl %a2 43474: 670a beqs 43480 <== NEVER TAKEN rtems_libio_free( iop ); 43476: 2f0a movel %a2,%sp@- 43478: 4eb9 0004 993e jsr 4993e 4347e: 588f addql #4,%sp if ( loc_to_free ) 43480: 4a85 tstl %d5 43482: 670a beqs 4348e rtems_filesystem_freenode( loc_to_free ); 43484: 2f05 movel %d5,%sp@- 43486: 4eb9 0004 281c jsr 4281c 4348c: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( rc ); 4348e: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 43494: 2040 moveal %d0,%a0 43496: 70ff moveq #-1,%d0 43498: 2082 movel %d2,%a0@ 4349a: 6014 bras 434b0 } return iop - rtems_libio_iops; 4349c: 200a movel %a2,%d0 4349e: 90b9 0005 c468 subl 5c468 ,%d0 434a4: 223c b6db 6db7 movel #-1227133513,%d1 434aa: e680 asrl #3,%d0 434ac: 4c01 0800 mulsl %d1,%d0 } 434b0: 4cee 3c7c ffc8 moveml %fp@(-56),%d2-%d6/%a2-%a5 434b6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000440c6 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 440c6: 4e56 fff0 linkw %fp,#-16 440ca: 48d7 040c moveml %d2-%d3/%a2,%sp@ 440ce: 242e 0008 movel %fp@(8),%d2 440d2: 246e 000c moveal %fp@(12),%a2 440d6: 1d42 fffe moveb %d2,%fp@(-2) int i; if (tty->termios.c_oflag & OPOST) { 440da: 202a 0034 movel %a2@(52),%d0 440de: 0800 0000 btst #0,%d0 440e2: 6700 010e beqw 441f2 switch (c) { 440e6: 4281 clrl %d1 440e8: 1202 moveb %d2,%d1 440ea: 7609 moveq #9,%d3 440ec: b681 cmpl %d1,%d3 440ee: 6778 beqs 44168 440f0: 650e bcss 44100 <== ALWAYS TAKEN 440f2: 163c 0008 moveb #8,%d3 <== NOT EXECUTED 440f6: b681 cmpl %d1,%d3 <== NOT EXECUTED 440f8: 6600 00b2 bnew 441ac <== NOT EXECUTED 440fc: 6000 00a0 braw 4419e <== NOT EXECUTED 44100: 760a moveq #10,%d3 44102: b681 cmpl %d1,%d3 44104: 670c beqs 44112 44106: 163c 000d moveb #13,%d3 4410a: b681 cmpl %d1,%d3 4410c: 6600 009e bnew 441ac 44110: 602e bras 44140 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 44112: 0800 0005 btst #5,%d0 44116: 6704 beqs 4411c <== ALWAYS TAKEN tty->column = 0; 44118: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 4411c: 44c0 movew %d0,%ccr 4411e: 6600 00d2 bnew 441f2 rtems_termios_puts ("\r", 1, tty); 44122: 2f0a movel %a2,%sp@- 44124: 4878 0001 pea 1 44128: 4879 0005 a0b6 pea 5a0b6 4412e: 4eb9 0004 3fce jsr 43fce tty->column = 0; 44134: 4fef 000c lea %sp@(12),%sp 44138: 42aa 0028 clrl %a2@(40) 4413c: 6000 00b4 braw 441f2 } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 44140: 0800 0004 btst #4,%d0 <== NOT EXECUTED 44144: 6708 beqs 4414e <== NOT EXECUTED 44146: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 4414a: 6700 00ba beqw 44206 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 4414e: 44c0 movew %d0,%ccr <== NOT EXECUTED 44150: 6a0e bpls 44160 <== NOT EXECUTED c = '\n'; 44152: 720a moveq #10,%d1 <== NOT EXECUTED 44154: 1d41 fffe moveb %d1,%fp@(-2) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 44158: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4415c: 6700 0094 beqw 441f2 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 44160: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED break; 44164: 6000 008c braw 441f2 <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 44168: 222a 0028 movel %a2@(40),%d1 4416c: 7407 moveq #7,%d2 4416e: 307c 0008 moveaw #8,%a0 44172: c481 andl %d1,%d2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 44174: 0280 0000 1800 andil #6144,%d0 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 4417a: 91c2 subal %d2,%a0 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 4417c: 0c80 0000 1800 cmpil #6144,%d0 44182: 6612 bnes 44196 <== NEVER TAKEN tty->column += i; 44184: d288 addl %a0,%d1 44186: 2541 0028 movel %d1,%a2@(40) rtems_termios_puts ( " ", i, tty); 4418a: 2f0a movel %a2,%sp@- 4418c: 2f08 movel %a0,%sp@- 4418e: 4879 0005 a0b8 pea 5a0b8 44194: 6066 bras 441fc return; } tty->column += i; 44196: d1c1 addal %d1,%a0 <== NOT EXECUTED 44198: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED break; 4419c: 6054 bras 441f2 <== NOT EXECUTED case '\b': if (tty->column > 0) 4419e: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 441a2: 6f4e bles 441f2 <== NOT EXECUTED tty->column--; 441a4: 5380 subql #1,%d0 <== NOT EXECUTED 441a6: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 441aa: 6046 bras 441f2 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) 441ac: 0800 0001 btst #1,%d0 441b0: 6724 beqs 441d6 <== ALWAYS TAKEN c = toupper(c); 441b2: 4280 clrl %d0 <== NOT EXECUTED 441b4: 1002 moveb %d2,%d0 <== NOT EXECUTED 441b6: 7403 moveq #3,%d2 <== NOT EXECUTED 441b8: 7602 moveq #2,%d3 <== NOT EXECUTED 441ba: 2079 0005 af7c moveal 5af7c <__ctype_ptr__>,%a0 <== NOT EXECUTED 441c0: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 441c4: 49c1 extbl %d1 <== NOT EXECUTED 441c6: c282 andl %d2,%d1 <== NOT EXECUTED 441c8: b681 cmpl %d1,%d3 <== NOT EXECUTED 441ca: 6606 bnes 441d2 <== NOT EXECUTED 441cc: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 441d2: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED if (!iscntrl(c)) 441d6: 4280 clrl %d0 441d8: 102e fffe moveb %fp@(-2),%d0 441dc: 2079 0005 af7c moveal 5af7c <__ctype_ptr__>,%a0 441e2: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 441e6: 49c0 extbl %d0 441e8: 0800 0005 btst #5,%d0 441ec: 6604 bnes 441f2 <== NEVER TAKEN tty->column++; 441ee: 52aa 0028 addql #1,%a2@(40) break; } } rtems_termios_puts (&c, 1, tty); 441f2: 2f0a movel %a2,%sp@- 441f4: 4878 0001 pea 1 441f8: 486e fffe pea %fp@(-2) 441fc: 4eb9 0004 3fce jsr 43fce 44202: 4fef 000c lea %sp@(12),%sp } 44206: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4420c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a64c : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4a64c: 4e56 ffe4 linkw %fp,#-28 4a650: 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) 4a654: 4878 01ff pea 1ff 4a658: 4879 0005 b92a pea 5b92a <_CPU_m68k_BFFFO_table+0x100> * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4a65e: 246e 0008 moveal %fp@(8),%a2 rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) 4a662: 4eb9 0004 bb40 jsr 4bb40 4a668: 508f addql #8,%sp 4a66a: 4a80 tstl %d0 4a66c: 6600 00e8 bnew 4a756 return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4a670: 4878 000a pea a 4a674: 260e movel %fp,%d3 4a676: 4879 0005 b92f pea 5b92f <_CPU_m68k_BFFFO_table+0x105> 4a67c: 0683 ffff fff1 addil #-15,%d3 4a682: 2f03 movel %d3,%sp@- 4a684: 4eb9 0004 d9e0 jsr 4d9e0 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4a68a: 3039 0005 d2ec movew 5d2ec ,%d0 4a690: 2200 movel %d0,%d1 4a692: 5281 addql #1,%d1 4a694: 3f00 movew %d0,%sp@- 4a696: 33c1 0005 d2ec movew %d1,5d2ec 4a69c: 4267 clrw %sp@- 4a69e: 4879 0005 b93a pea 5b93a <_CPU_m68k_BFFFO_table+0x110> 4a6a4: 486e fffb pea %fp@(-5) 4a6a8: 4eb9 0004 de58 jsr 4de58 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4a6ae: 4878 0180 pea 180 4a6b2: 2f03 movel %d3,%sp@- 4a6b4: 4eb9 0004 b904 jsr 4b904 4a6ba: 4fef 0020 lea %sp@(32),%sp 4a6be: 4a80 tstl %d0 4a6c0: 670a beqs 4a6cc if (errno != EEXIST){ 4a6c2: 4eb9 0004 d134 jsr 4d134 <__errno> 4a6c8: 6000 008c braw 4a756 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); 4a6cc: 4878 4000 pea 4000 4a6d0: 2f03 movel %d3,%sp@- 4a6d2: 4eb9 0004 4494 jsr 44494 if (filsdes[0] < 0) { 4a6d8: 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); 4a6da: 2480 movel %d0,%a2@ if (filsdes[0] < 0) { 4a6dc: 6c0e bges 4a6ec err = errno; 4a6de: 4eb9 0004 d134 jsr 4d134 <__errno> 4a6e4: 2040 moveal %d0,%a0 4a6e6: 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); 4a6e8: 2f03 movel %d3,%sp@- 4a6ea: 6054 bras 4a740 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4a6ec: b0b9 0005 c334 cmpl 5c334 ,%d0 4a6f2: 6412 bccs 4a706 <== NEVER TAKEN 4a6f4: 2200 movel %d0,%d1 4a6f6: ed88 lsll #6,%d0 4a6f8: e789 lsll #3,%d1 4a6fa: 2079 0005 d9e0 moveal 5d9e0 ,%a0 4a700: 9081 subl %d1,%d0 4a702: d1c0 addal %d0,%a0 4a704: 6002 bras 4a708 4a706: 91c8 subal %a0,%a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4a708: 70fe moveq #-2,%d0 4a70a: c1a8 0014 andl %d0,%a0@(20) filsdes[1] = open(fifopath, O_WRONLY); 4a70e: 4878 0001 pea 1 4a712: 486e fff1 pea %fp@(-15) 4a716: 4eb9 0004 4494 jsr 44494 if (filsdes[1] < 0) { 4a71c: 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); 4a71e: 2540 0004 movel %d0,%a2@(4) if (filsdes[1] < 0) { 4a722: 6c16 bges 4a73a err = errno; 4a724: 4eb9 0004 d134 jsr 4d134 <__errno> 4a72a: 2040 moveal %d0,%a0 4a72c: 2410 movel %a0@,%d2 close(filsdes[0]); 4a72e: 2f12 movel %a2@,%sp@- 4a730: 4eb9 0004 3398 jsr 43398 4a736: 588f addql #4,%sp 4a738: 6002 bras 4a73c int pipe_create( int filsdes[2] ) { rtems_libio_t *iop; int err = 0; 4a73a: 4282 clrl %d2 if (filsdes[1] < 0) { err = errno; close(filsdes[0]); } unlink(fifopath); 4a73c: 486e fff1 pea %fp@(-15) 4a740: 4eb9 0004 6124 jsr 46124 4a746: 588f addql #4,%sp } if(err != 0) 4a748: 4a82 tstl %d2 4a74a: 670e beqs 4a75a rtems_set_errno_and_return_minus_one(err); 4a74c: 4eb9 0004 d134 jsr 4d134 <__errno> 4a752: 2040 moveal %d0,%a0 4a754: 2082 movel %d2,%a0@ 4a756: 70ff moveq #-1,%d0 4a758: 6002 bras 4a75c return 0; 4a75a: 4280 clrl %d0 } 4a75c: 4cee 040c ffe4 moveml %fp@(-28),%d2-%d3/%a2 4a762: 4e5e unlk %fp ... =============================================================================== 0004b1f4 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4b1f4: 4e56 0000 linkw %fp,#0 if (cmd == FIONREAD) { 4b1f8: 203c 4004 667f movel #1074030207,%d0 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4b1fe: 2f0b movel %a3,%sp@- 4b200: 266e 0010 moveal %fp@(16),%a3 4b204: 2f0a movel %a2,%sp@- 4b206: 246e 0008 moveal %fp@(8),%a2 if (cmd == FIONREAD) { 4b20a: b0ae 000c cmpl %fp@(12),%d0 4b20e: 662e bnes 4b23e if (buffer == NULL) 4b210: 4a8b tstl %a3 4b212: 672e beqs 4b242 return -EFAULT; if (! PIPE_LOCK(pipe)) 4b214: 42a7 clrl %sp@- 4b216: 42a7 clrl %sp@- 4b218: 2f2a 0028 movel %a2@(40),%sp@- 4b21c: 4eb9 0004 6aec jsr 46aec 4b222: 4fef 000c lea %sp@(12),%sp 4b226: 4a80 tstl %d0 4b228: 661c bnes 4b246 <== NEVER TAKEN return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 4b22a: 26aa 000c movel %a2@(12),%a3@ PIPE_UNLOCK(pipe); 4b22e: 2f2a 0028 movel %a2@(40),%sp@- 4b232: 4eb9 0004 6bf4 jsr 46bf4 return 0; 4b238: 588f addql #4,%sp 4b23a: 4280 clrl %d0 4b23c: 600a bras 4b248 } return -EINVAL; 4b23e: 70ea moveq #-22,%d0 4b240: 6006 bras 4b248 rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; 4b242: 70f2 moveq #-14,%d0 4b244: 6002 bras 4b248 if (! PIPE_LOCK(pipe)) return -EINTR; 4b246: 70fc moveq #-4,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4b248: 246e fff8 moveal %fp@(-8),%a2 4b24c: 266e fffc moveal %fp@(-4),%a3 4b250: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004aa64 : free(pipe->Buffer); free(pipe); } static rtems_status_code pipe_lock(void) { 4aa64: 4e56 0000 linkw %fp,#0 4aa68: 2f02 movel %d2,%sp@- rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4aa6a: 4ab9 0005 d2f0 tstl 5d2f0 4aa70: 6654 bnes 4aac6 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 ); 4aa72: 42a7 clrl %sp@- 4aa74: 42a7 clrl %sp@- 4aa76: 2f39 0005 d9e8 movel 5d9e8 ,%sp@- 4aa7c: 4eb9 0004 6aec jsr 46aec rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 4aa82: 4fef 000c lea %sp@(12),%sp 4aa86: 4ab9 0005 d2f0 tstl 5d2f0 4aa8c: 6624 bnes 4aab2 <== NEVER TAKEN sc = rtems_semaphore_create( 4aa8e: 4879 0005 d2f0 pea 5d2f0 4aa94: 42a7 clrl %sp@- 4aa96: 4878 0054 pea 54 4aa9a: 4878 0001 pea 1 4aa9e: 2f3c 5049 5045 movel #1346981957,%sp@- 4aaa4: 4eb9 0004 68b4 jsr 468b4 4aaaa: 4fef 0014 lea %sp@(20),%sp 4aaae: 2400 movel %d0,%d2 4aab0: 6002 bras 4aab4 free(pipe); } static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; 4aab2: 4282 clrl %d2 <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4aab4: 2f39 0005 d9e8 movel 5d9e8 ,%sp@- 4aaba: 4eb9 0004 6bf4 jsr 46bf4 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4aac0: 588f addql #4,%sp 4aac2: 4a82 tstl %d2 4aac4: 6618 bnes 4aade sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4aac6: 42a7 clrl %sp@- 4aac8: 42a7 clrl %sp@- 4aaca: 2f39 0005 d2f0 movel 5d2f0 ,%sp@- 4aad0: 4eb9 0004 6aec jsr 46aec } if (sc == RTEMS_SUCCESSFUL) { 4aad6: 4fef 000c lea %sp@(12),%sp 4aada: 4a80 tstl %d0 4aadc: 6704 beqs 4aae2 <== ALWAYS TAKEN return 0; } else { return -ENOMEM; 4aade: 70f4 moveq #-12,%d0 4aae0: 6002 bras 4aae4 if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); } if (sc == RTEMS_SUCCESSFUL) { return 0; 4aae2: 4280 clrl %d0 } else { return -ENOMEM; } } 4aae4: 242e fffc movel %fp@(-4),%d2 4aae8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004af22 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4af22: 4e56 ffd4 linkw %fp,#-44 4af26: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4af2a: 42a7 clrl %sp@- pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4af2c: 246e 0008 moveal %fp@(8),%a2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4af30: 2e3c 0004 6aec movel #289516,%d7 4af36: 2047 moveal %d7,%a0 4af38: 42a7 clrl %sp@- 4af3a: 2f2a 0028 movel %a2@(40),%sp@- pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4af3e: 286e 000c moveal %fp@(12),%a4 4af42: 2a2e 0010 movel %fp@(16),%d5 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4af46: 4e90 jsr %a0@ 4af48: 4fef 000c lea %sp@(12),%sp 4af4c: 4a80 tstl %d0 4af4e: 6600 011a bnew 4b06a /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 4af52: 2c0e movel %fp,%d6 rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4af54: 4282 clrl %d2 4af56: 47f9 0004 d9e0 lea 4d9e0 ,%a3 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 4af5c: 5986 subql #4,%d6 4af5e: 4bf9 0004 bea0 lea 4bea0 ,%a5 4af64: 6000 00e2 braw 4b048 return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 4af68: 4aaa 0014 tstl %a2@(20) 4af6c: 6700 00e0 beqw 4b04e goto out_locked; if (LIBIO_NODELAY(iop)) { 4af70: 206e 0014 moveal %fp@(20),%a0 4af74: 7001 moveq #1,%d0 4af76: c0a8 0014 andl %a0@(20),%d0 4af7a: 6600 00d6 bnew 4b052 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 4af7e: 52aa 0018 addql #1,%a2@(24) PIPE_UNLOCK(pipe); 4af82: 2f2a 0028 movel %a2@(40),%sp@- 4af86: 4eb9 0004 6bf4 jsr 46bf4 if (! PIPE_READWAIT(pipe)) 4af8c: 42a7 clrl %sp@- 4af8e: 2f2a 002c movel %a2@(44),%sp@- 4af92: 4eb9 0004 bf04 jsr 4bf04 4af98: 4fef 000c lea %sp@(12),%sp 4af9c: 4a80 tstl %d0 4af9e: 6604 bnes 4afa4 <== NEVER TAKEN 4afa0: 4283 clrl %d3 4afa2: 6002 bras 4afa6 ret = -EINTR; 4afa4: 76fc moveq #-4,%d3 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { 4afa6: 42a7 clrl %sp@- 4afa8: 2047 moveal %d7,%a0 4afaa: 42a7 clrl %sp@- 4afac: 2f2a 0028 movel %a2@(40),%sp@- 4afb0: 4e90 jsr %a0@ 4afb2: 4fef 000c lea %sp@(12),%sp 4afb6: 4a80 tstl %d0 4afb8: 6600 00a8 bnew 4b062 /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4afbc: 53aa 0018 subql #1,%a2@(24) if (ret != 0) 4afc0: 4a83 tstl %d3 4afc2: 6600 0090 bnew 4b054 if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4afc6: 262a 000c movel %a2@(12),%d3 4afca: 679c beqs 4af68 if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4afcc: 2005 movel %d5,%d0 4afce: 9082 subl %d2,%d0 4afd0: b083 cmpl %d3,%d0 4afd2: 6402 bccs 4afd6 4afd4: 2600 movel %d0,%d3 chunk1 = pipe->Size - pipe->Start; 4afd6: 222a 0008 movel %a2@(8),%d1 4afda: 200c movel %a4,%d0 4afdc: d082 addl %d2,%d0 4afde: 282a 0004 movel %a2@(4),%d4 4afe2: 9881 subl %d1,%d4 4afe4: d292 addl %a2@,%d1 if (chunk > chunk1) { 4afe6: b883 cmpl %d3,%d4 4afe8: 6c20 bges 4b00a memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4afea: 2f04 movel %d4,%sp@- 4afec: 2f01 movel %d1,%sp@- 4afee: 2f00 movel %d0,%sp@- 4aff0: 4e93 jsr %a3@ memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4aff2: 2203 movel %d3,%d1 4aff4: 9284 subl %d4,%d1 4aff6: 2002 movel %d2,%d0 4aff8: d084 addl %d4,%d0 4affa: 2f01 movel %d1,%sp@- 4affc: 2f12 movel %a2@,%sp@- 4affe: 4874 0800 pea %a4@(00000000,%d0:l) 4b002: 4e93 jsr %a3@ 4b004: 4fef 0018 lea %sp@(24),%sp 4b008: 600c bras 4b016 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4b00a: 2f03 movel %d3,%sp@- 4b00c: 2f01 movel %d1,%sp@- 4b00e: 2f00 movel %d0,%sp@- 4b010: 4e93 jsr %a3@ 4b012: 4fef 000c lea %sp@(12),%sp pipe->Start += chunk; 4b016: 2003 movel %d3,%d0 4b018: d0aa 0008 addl %a2@(8),%d0 pipe->Start %= pipe->Size; 4b01c: 4c6a 0001 0004 remul %a2@(4),%d1,%d0 pipe->Length -= chunk; 4b022: 202a 000c movel %a2@(12),%d0 4b026: 9083 subl %d3,%d0 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4b028: 2541 0008 movel %d1,%a2@(8) pipe->Length -= chunk; 4b02c: 2540 000c movel %d0,%a2@(12) /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4b030: 6604 bnes 4b036 pipe->Start = 0; 4b032: 42aa 0008 clrl %a2@(8) if (pipe->waitingWriters > 0) 4b036: 4aaa 001c tstl %a2@(28) 4b03a: 670a beqs 4b046 PIPE_WAKEUPWRITERS(pipe); 4b03c: 2f06 movel %d6,%sp@- 4b03e: 2f2a 0030 movel %a2@(48),%sp@- 4b042: 4e95 jsr %a5@ 4b044: 508f addql #8,%sp read += chunk; 4b046: d483 addl %d3,%d2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4b048: ba82 cmpl %d2,%d5 4b04a: 6200 ff7a bhiw 4afc6 while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 4b04e: 4283 clrl %d3 4b050: 6002 bras 4b054 goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 4b052: 76f5 moveq #-11,%d3 PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4b054: 2f2a 0028 movel %a2@(40),%sp@- 4b058: 4eb9 0004 6bf4 jsr 46bf4 4b05e: 588f addql #4,%sp 4b060: 6002 bras 4b064 PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; 4b062: 76fc moveq #-4,%d3 <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 4b064: 4a82 tstl %d2 4b066: 6e08 bgts 4b070 4b068: 6004 bras 4b06e ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; 4b06a: 74fc moveq #-4,%d2 <== NOT EXECUTED 4b06c: 6002 bras 4b070 <== NOT EXECUTED PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; 4b06e: 2403 movel %d3,%d2 } 4b070: 2002 movel %d2,%d0 4b072: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 4b078: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ab5a : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4ab5a: 4e56 fff0 linkw %fp,#-16 4ab5e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4ab62: 266e 0008 moveal %fp@(8),%a3 pipe_control_t *pipe = *pipep; 4ab66: 2453 moveal %a3@,%a2 uint32_t mode; if (pipe_lock()) 4ab68: 4eba fefa jsr %pc@(4aa64 ) 4ab6c: 4a80 tstl %d0 4ab6e: 6616 bnes 4ab86 <== NEVER TAKEN /* WARN pipe not freed and pipep not set to NULL! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); if (!PIPE_LOCK(pipe)) 4ab70: 42a7 clrl %sp@- 4ab72: 42a7 clrl %sp@- 4ab74: 2f2a 0028 movel %a2@(40),%sp@- 4ab78: 4eb9 0004 6aec jsr 46aec 4ab7e: 4fef 000c lea %sp@(12),%sp 4ab82: 4a80 tstl %d0 4ab84: 670c beqs 4ab92 <== ALWAYS TAKEN /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); 4ab86: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 4ab8c: 4eb9 0004 7128 jsr 47128 <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); 4ab92: 206e 000c moveal %fp@(12),%a0 4ab96: 7406 moveq #6,%d2 4ab98: c4a8 0014 andl %a0@(20),%d2 if (mode & LIBIO_FLAGS_READ) 4ab9c: 0802 0001 btst #1,%d2 4aba0: 6704 beqs 4aba6 pipe->Readers --; 4aba2: 53aa 0010 subql #1,%a2@(16) if (mode & LIBIO_FLAGS_WRITE) 4aba6: 44c2 movew %d2,%ccr 4aba8: 6604 bnes 4abae pipe->Writers --; 4abaa: 53aa 0014 subql #1,%a2@(20) PIPE_UNLOCK(pipe); 4abae: 2f2a 0028 movel %a2@(40),%sp@- 4abb2: 4eb9 0004 6bf4 jsr 46bf4 if (pipe->Readers == 0 && pipe->Writers == 0) { 4abb8: 588f addql #4,%sp 4abba: 4aaa 0010 tstl %a2@(16) 4abbe: 6622 bnes 4abe2 4abc0: 4aaa 0014 tstl %a2@(20) 4abc4: 660c bnes 4abd2 #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 4abc6: 2f0a movel %a2,%sp@- 4abc8: 4eba ff22 jsr %pc@(4aaec ) *pipep = NULL; 4abcc: 588f addql #4,%sp 4abce: 4293 clrl %a3@ 4abd0: 602c bras 4abfe } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4abd2: 7004 moveq #4,%d0 4abd4: b082 cmpl %d2,%d0 4abd6: 670a beqs 4abe2 <== NEVER TAKEN /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4abd8: 486e fffc pea %fp@(-4) 4abdc: 2f2a 0030 movel %a2@(48),%sp@- 4abe0: 6014 bras 4abf6 else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4abe2: 4aaa 0014 tstl %a2@(20) 4abe6: 6616 bnes 4abfe <== NEVER TAKEN 4abe8: 7002 moveq #2,%d0 4abea: b082 cmpl %d2,%d0 4abec: 6710 beqs 4abfe <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 4abee: 486e fffc pea %fp@(-4) 4abf2: 2f2a 002c movel %a2@(44),%sp@- 4abf6: 4eb9 0004 bea0 jsr 4bea0 4abfc: 508f addql #8,%sp pipe_unlock(); 4abfe: 4eba ff34 jsr %pc@(4ab34 ) if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4ac02: 4280 clrl %d0 4ac04: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4ac0a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ab34 : return -ENOMEM; } } static void pipe_unlock(void) { 4ab34: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4ab38: 2f39 0005 d2f0 movel 5d2f0 ,%sp@- 4ab3e: 4eb9 0004 6bf4 jsr 46bf4 if (sc != RTEMS_SUCCESSFUL) { 4ab44: 588f addql #4,%sp 4ab46: 4a80 tstl %d0 4ab48: 670c beqs 4ab56 <== ALWAYS TAKEN /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); 4ab4a: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 4ab50: 4eb9 0004 7128 jsr 47128 <== NOT EXECUTED } } 4ab56: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b07c : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4b07c: 4e56 ffd4 linkw %fp,#-44 4b080: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b084: 246e 0008 moveal %fp@(8),%a2 4b088: 286e 000c moveal %fp@(12),%a4 4b08c: 282e 0010 movel %fp@(16),%d4 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4b090: 6700 014c beqw 4b1de return 0; if (! PIPE_LOCK(pipe)) 4b094: 42a7 clrl %sp@- 4b096: 42a7 clrl %sp@- 4b098: 2f2a 0028 movel %a2@(40),%sp@- 4b09c: 4eb9 0004 6aec jsr 46aec 4b0a2: 4fef 000c lea %sp@(12),%sp 4b0a6: 4a80 tstl %d0 4b0a8: 6600 0138 bnew 4b1e2 return -EINTR; if (pipe->Readers == 0) { 4b0ac: 4aaa 0010 tstl %a2@(16) 4b0b0: 6700 010a beqw 4b1bc ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 4b0b4: b8aa 0004 cmpl %a2@(4),%d4 4b0b8: 6204 bhis 4b0be <== NEVER TAKEN 4b0ba: 2a04 movel %d4,%d5 4b0bc: 6002 bras 4b0c0 4b0be: 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; 4b0c0: 4282 clrl %d2 } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4b0c2: 2e3c 0004 bf04 movel #311044,%d7 4b0c8: 47f9 0004 d9e0 lea 4d9e0 ,%a3 else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 4b0ce: 4bf9 0004 bea0 lea 4bea0 ,%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)) { 4b0d4: 2c3c 0004 6aec movel #289516,%d6 4b0da: 6000 00d8 braw 4b1b4 /* 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)) { 4b0de: 206e 0014 moveal %fp@(20),%a0 4b0e2: 7001 moveq #1,%d0 4b0e4: c0a8 0014 andl %a0@(20),%d0 4b0e8: 6600 00d8 bnew 4b1c2 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 4b0ec: 52aa 001c addql #1,%a2@(28) PIPE_UNLOCK(pipe); 4b0f0: 2f2a 0028 movel %a2@(40),%sp@- 4b0f4: 4eb9 0004 6bf4 jsr 46bf4 if (! PIPE_WRITEWAIT(pipe)) 4b0fa: 2047 moveal %d7,%a0 4b0fc: 42a7 clrl %sp@- 4b0fe: 2f2a 0030 movel %a2@(48),%sp@- 4b102: 4e90 jsr %a0@ 4b104: 4fef 000c lea %sp@(12),%sp 4b108: 4a80 tstl %d0 4b10a: 6604 bnes 4b110 <== NEVER TAKEN 4b10c: 4283 clrl %d3 4b10e: 6002 bras 4b112 ret = -EINTR; 4b110: 76fc moveq #-4,%d3 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { 4b112: 42a7 clrl %sp@- 4b114: 2046 moveal %d6,%a0 4b116: 42a7 clrl %sp@- 4b118: 2f2a 0028 movel %a2@(40),%sp@- 4b11c: 4e90 jsr %a0@ 4b11e: 4fef 000c lea %sp@(12),%sp 4b122: 4a80 tstl %d0 4b124: 6600 00b0 bnew 4b1d6 /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4b128: 53aa 001c subql #1,%a2@(28) if (ret != 0) 4b12c: 4a83 tstl %d3 4b12e: 6600 0098 bnew 4b1c8 goto out_locked; if (pipe->Readers == 0) { 4b132: 4aaa 0010 tstl %a2@(16) 4b136: 6700 008e beqw 4b1c6 /* 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) { 4b13a: 202a 0004 movel %a2@(4),%d0 4b13e: 2600 movel %d0,%d3 4b140: 222a 000c movel %a2@(12),%d1 4b144: 9681 subl %d1,%d3 4b146: ba83 cmpl %d3,%d5 4b148: 6294 bhis 4b0de ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4b14a: 2044 moveal %d4,%a0 4b14c: 91c2 subal %d2,%a0 4b14e: b1c3 cmpal %d3,%a0 4b150: 6402 bccs 4b154 4b152: 2608 movel %a0,%d3 chunk1 = pipe->Size - PIPE_WSTART(pipe); 4b154: 2a01 movel %d1,%d5 4b156: daaa 0008 addl %a2@(8),%d5 4b15a: 4c40 5001 remul %d0,%d1,%d5 4b15e: 2a00 movel %d0,%d5 4b160: 9a81 subl %d1,%d5 4b162: 2012 movel %a2@,%d0 4b164: d081 addl %d1,%d0 4b166: 220c movel %a4,%d1 4b168: d282 addl %d2,%d1 if (chunk > chunk1) { 4b16a: ba83 cmpl %d3,%d5 4b16c: 6c20 bges 4b18e memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4b16e: 2f05 movel %d5,%sp@- 4b170: 2f01 movel %d1,%sp@- 4b172: 2f00 movel %d0,%sp@- 4b174: 4e93 jsr %a3@ memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4b176: 2203 movel %d3,%d1 4b178: 9285 subl %d5,%d1 4b17a: 2005 movel %d5,%d0 4b17c: d082 addl %d2,%d0 4b17e: 2f01 movel %d1,%sp@- 4b180: 4874 0800 pea %a4@(00000000,%d0:l) 4b184: 2f12 movel %a2@,%sp@- 4b186: 4e93 jsr %a3@ 4b188: 4fef 0018 lea %sp@(24),%sp 4b18c: 600c bras 4b19a } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4b18e: 2f03 movel %d3,%sp@- 4b190: 2f01 movel %d1,%sp@- 4b192: 2f00 movel %d0,%sp@- 4b194: 4e93 jsr %a3@ 4b196: 4fef 000c lea %sp@(12),%sp pipe->Length += chunk; 4b19a: d7aa 000c addl %d3,%a2@(12) if (pipe->waitingReaders > 0) 4b19e: 4aaa 0018 tstl %a2@(24) 4b1a2: 670c beqs 4b1b0 PIPE_WAKEUPREADERS(pipe); 4b1a4: 486e fffc pea %fp@(-4) 4b1a8: 2f2a 002c movel %a2@(44),%sp@- 4b1ac: 4e95 jsr %a5@ 4b1ae: 508f addql #8,%sp written += chunk; 4b1b0: d483 addl %d3,%d2 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; 4b1b2: 7a01 moveq #1,%d5 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4b1b4: b882 cmpl %d2,%d4 4b1b6: 6282 bhis 4b13a 4b1b8: 4283 clrl %d3 4b1ba: 600c bras 4b1c8 if (! PIPE_LOCK(pipe)) return -EINTR; if (pipe->Readers == 0) { ret = -EPIPE; 4b1bc: 76e0 moveq #-32,%d3 const void *buffer, size_t count, rtems_libio_t *iop ) { int chunk, chunk1, written = 0, ret = 0; 4b1be: 4282 clrl %d2 4b1c0: 6006 bras 4b1c8 chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 4b1c2: 76f5 moveq #-11,%d3 4b1c4: 6002 bras 4b1c8 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; 4b1c6: 76e0 moveq #-32,%d3 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4b1c8: 2f2a 0028 movel %a2@(40),%sp@- 4b1cc: 4eb9 0004 6bf4 jsr 46bf4 4b1d2: 588f addql #4,%sp 4b1d4: 6002 bras 4b1d8 PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; 4b1d6: 76fc moveq #-4,%d3 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 4b1d8: 4a82 tstl %d2 4b1da: 6e0c bgts 4b1e8 4b1dc: 6008 bras 4b1e6 { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; 4b1de: 4282 clrl %d2 <== NOT EXECUTED 4b1e0: 6006 bras 4b1e8 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; 4b1e2: 74fc moveq #-4,%d2 <== NOT EXECUTED 4b1e4: 6002 bras 4b1e8 <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) return written; return ret; 4b1e6: 2403 movel %d3,%d2 } 4b1e8: 2002 movel %d2,%d0 4b1ea: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 4b1f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046b44 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 46b44: 4e56 0000 linkw %fp,#0 46b48: 202e 000c movel %fp@(12),%d0 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 46b4c: 2200 movel %d0,%d1 46b4e: 5381 subql #1,%d1 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); 46b50: 52b9 0006 1d44 addql #1,61d44 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 46b56: c280 andl %d0,%d1 46b58: 6610 bnes 46b6a <== NEVER TAKEN 46b5a: 123c 0003 moveb #3,%d1 46b5e: b280 cmpl %d0,%d1 46b60: 6408 bccs 46b6a /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 46b62: 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 ); 46b64: 4ef9 0004 6ce0 jmp 46ce0 } 46b6a: 7016 moveq #22,%d0 46b6c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000436ac : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 436ac: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 436b0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 436b2: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED const char *p = s; for (p=s ; *p ; p++ ) 436b6: 6008 bras 436c0 <== NOT EXECUTED BSP_output_char(*p); 436b8: 49c0 extbl %d0 <== NOT EXECUTED 436ba: 2f00 movel %d0,%sp@- <== NOT EXECUTED 436bc: 4e91 jsr %a1@ <== NOT EXECUTED 436be: 588f addql #4,%sp <== NOT EXECUTED 436c0: 2279 0005 b19c moveal 5b19c ,%a1 <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 436c6: 101a moveb %a2@+,%d0 <== NOT EXECUTED 436c8: 66ee bnes 436b8 <== NOT EXECUTED BSP_output_char(*p); BSP_output_char('\n'); 436ca: 700a moveq #10,%d0 <== NOT EXECUTED } 436cc: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 436d0: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 436d4: 4e5e unlk %fp <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 436d6: 4ed1 jmp %a1@ <== NOT EXECUTED =============================================================================== 00059080 : ssize_t read( int fd, void *buffer, size_t count ) { 59080: 4e56 fff4 linkw %fp,#-12 59084: 202e 0008 movel %fp@(8),%d0 59088: 222e 000c movel %fp@(12),%d1 5908c: 206e 0010 moveal %fp@(16),%a0 59090: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 59094: b0b9 0005 ade4 cmpl 5ade4 ,%d0 5909a: 641a bccs 590b6 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 5909c: 2400 movel %d0,%d2 5909e: ed88 lsll #6,%d0 590a0: e78a lsll #3,%d2 590a2: 2479 0005 c468 moveal 5c468 ,%a2 590a8: 9082 subl %d2,%d0 590aa: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 590ac: 202a 0014 movel %a2@(20),%d0 590b0: 0800 0008 btst #8,%d0 590b4: 660e bnes 590c4 590b6: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 590bc: 7209 moveq #9,%d1 590be: 2040 moveal %d0,%a0 590c0: 2081 movel %d1,%a0@ 590c2: 601a bras 590de rtems_libio_check_buffer( buffer ); 590c4: 4a81 tstl %d1 590c6: 670a beqs 590d2 <== NEVER TAKEN rtems_libio_check_count( count ); 590c8: 4a88 tstl %a0 590ca: 6744 beqs 59110 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 590cc: 0800 0001 btst #1,%d0 590d0: 6610 bnes 590e2 <== ALWAYS TAKEN 590d2: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 590d8: 2040 moveal %d0,%a0 <== NOT EXECUTED 590da: 7016 moveq #22,%d0 <== NOT EXECUTED 590dc: 2080 movel %d0,%a0@ <== NOT EXECUTED 590de: 70ff moveq #-1,%d0 590e0: 6030 bras 59112 return 0; /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); 590e2: 226a 0020 moveal %a2@(32),%a1 590e6: 2f08 movel %a0,%sp@- 590e8: 2f01 movel %d1,%sp@- 590ea: 2f0a movel %a2,%sp@- 590ec: 2069 0008 moveal %a1@(8),%a0 590f0: 4e90 jsr %a0@ if ( rc > 0 ) 590f2: 4fef 000c lea %sp@(12),%sp 590f6: 4a80 tstl %d0 590f8: 6f18 bles 59112 iop->offset += rc; 590fa: 2400 movel %d0,%d2 590fc: 5bc1 smi %d1 590fe: 49c1 extbl %d1 59100: d5aa 0010 addl %d2,%a2@(16) 59104: 262a 000c movel %a2@(12),%d3 59108: d781 addxl %d1,%d3 5910a: 2543 000c movel %d3,%a2@(12) 5910e: 6002 bras 59112 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 ); 59110: 4280 clrl %d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 59112: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 59118: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000454d8 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 454d8: 4e56 ffdc linkw %fp,#-36 454dc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 454e0: 246e 0008 moveal %fp@(8),%a2 454e4: 262e 000c movel %fp@(12),%d3 rtems_filesystem_location_info_t loc; int result; if (!buf) 454e8: 660e bnes 454f8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 454ea: 4eb9 0004 e550 jsr 4e550 <__errno> <== NOT EXECUTED 454f0: 720e moveq #14,%d1 <== NOT EXECUTED 454f2: 2040 moveal %d0,%a0 <== NOT EXECUTED 454f4: 2081 movel %d1,%a0@ <== NOT EXECUTED 454f6: 607a bras 45572 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 454f8: 2f0a movel %a2,%sp@- 454fa: 240e movel %fp,%d2 454fc: 0682 ffff ffec addil #-20,%d2 45502: 4eb9 0005 00a8 jsr 500a8 45508: 4297 clrl %sp@ 4550a: 2f02 movel %d2,%sp@- 4550c: 42a7 clrl %sp@- 4550e: 2f00 movel %d0,%sp@- 45510: 2f0a movel %a2,%sp@- 45512: 4eb9 0004 447e jsr 4447e 0, &loc, false ); if ( result != 0 ) 45518: 4fef 0014 lea %sp@(20),%sp 4551c: 4a80 tstl %d0 4551e: 6652 bnes 45572 <== NEVER TAKEN return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 45520: 206e fff8 moveal %fp@(-8),%a0 45524: 45f9 0004 4574 lea 44574 ,%a2 4552a: 2f02 movel %d2,%sp@- 4552c: 2068 0010 moveal %a0@(16),%a0 45530: 4e90 jsr %a0@ 45532: 588f addql #4,%sp 45534: 7204 moveq #4,%d1 45536: b280 cmpl %d0,%d1 45538: 6714 beqs 4554e rtems_filesystem_freenode( &loc ); 4553a: 2f02 movel %d2,%sp@- 4553c: 4e92 jsr %a2@ rtems_set_errno_and_return_minus_one( EINVAL ); 4553e: 4eb9 0004 e550 jsr 4e550 <__errno> 45544: 588f addql #4,%sp 45546: 2040 moveal %d0,%a0 45548: 7016 moveq #22,%d0 4554a: 2080 movel %d0,%a0@ 4554c: 6024 bras 45572 } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 4554e: 2f2e 0010 movel %fp@(16),%sp@- 45552: 206e fff8 moveal %fp@(-8),%a0 45556: 2f03 movel %d3,%sp@- 45558: 2f02 movel %d2,%sp@- 4555a: 2068 003c moveal %a0@(60),%a0 4555e: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 45560: 2f02 movel %d2,%sp@- 45562: 2d40 ffe8 movel %d0,%fp@(-24) 45566: 4e92 jsr %a2@ return result; 45568: 202e ffe8 movel %fp@(-24),%d0 4556c: 4fef 0010 lea %sp@(16),%sp 45570: 6002 bras 45574 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) return -1; 45572: 70ff moveq #-1,%d0 result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 45574: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 4557a: 4e5e unlk %fp ... =============================================================================== 00044328 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 44328: 4e56 ffe4 linkw %fp,#-28 4432c: 202e 0008 movel %fp@(8),%d0 44330: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 44334: 246e 000c moveal %fp@(12),%a2 44338: 262e 0010 movel %fp@(16),%d3 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 4433c: b0b9 0005 b844 cmpl 5b844 ,%d0 44342: 641a bccs 4435e iop = rtems_libio_iop( fd ); 44344: 2200 movel %d0,%d1 44346: ed88 lsll #6,%d0 44348: e789 lsll #3,%d1 4434a: 2679 0005 cec8 moveal 5cec8 ,%a3 44350: 9081 subl %d1,%d0 44352: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 44354: 202b 0014 movel %a3@(20),%d0 44358: 0800 0008 btst #8,%d0 4435c: 6610 bnes 4436e 4435e: 4eb9 0004 c974 jsr 4c974 <__errno> 44364: 7209 moveq #9,%d1 44366: 2040 moveal %d0,%a0 44368: 2081 movel %d1,%a0@ 4436a: 6000 009e braw 4440a rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4436e: 0800 0001 btst #1,%d0 44372: 672c beqs 443a0 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 44374: 4a8a tstl %a2 44376: 6728 beqs 443a0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 44378: 4a83 tstl %d3 4437a: 6f24 bles 443a0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 4437c: 0c83 0000 0400 cmpil #1024,%d3 44382: 6e1c bgts 443a0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 44384: 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 ) 44386: 93c9 subal %a1,%a1 44388: 4281 clrl %d1 4438a: 7001 moveq #1,%d0 4438c: 6002 bras 44390 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 4438e: 2204 movel %d4,%d1 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 44390: 4a90 tstl %a0@ 44392: 670c beqs 443a0 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 44394: 2428 0004 movel %a0@(4),%d2 44398: 2801 movel %d1,%d4 4439a: d882 addl %d2,%d4 if ( total < old ) 4439c: b284 cmpl %d4,%d1 4439e: 6f0e bles 443ae rtems_set_errno_and_return_minus_one( EINVAL ); 443a0: 4eb9 0004 c974 jsr 4c974 <__errno> 443a6: 2040 moveal %d0,%a0 443a8: 7016 moveq #22,%d0 443aa: 2080 movel %d0,%a0@ 443ac: 605c bras 4440a if ( iov[v].iov_len ) all_zeros = false; 443ae: 4a82 tstl %d2 443b0: 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++ ) { 443b2: 5289 addql #1,%a1 443b4: 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; 443b6: 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++ ) { 443b8: b689 cmpl %a1,%d3 443ba: 6ed2 bgts 4438e /* * 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 ) { 443bc: 4a00 tstb %d0 443be: 6646 bnes 44406 #include #include #include ssize_t readv( 443c0: 588a addql #4,%a2 443c2: 4284 clrl %d4 443c4: 4282 clrl %d2 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->pathinfo.handlers->read_h)( 443c6: 206b 0020 moveal %a3@(32),%a0 443ca: 2f12 movel %a2@,%sp@- 443cc: 2f2a fffc movel %a2@(-4),%sp@- 443d0: 2f0b movel %a3,%sp@- 443d2: 2068 0008 moveal %a0@(8),%a0 443d6: 4e90 jsr %a0@ iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 443d8: 4fef 000c lea %sp@(12),%sp 443dc: 4a80 tstl %d0 443de: 6d2a blts 4440a <== NEVER TAKEN return -1; if ( bytes > 0 ) { 443e0: 6716 beqs 443f8 <== NEVER TAKEN iop->offset += bytes; total += bytes; 443e2: d480 addl %d0,%d2 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 443e4: 2c00 movel %d0,%d6 443e6: 5bc5 smi %d5 443e8: 49c5 extbl %d5 443ea: ddab 0010 addl %d6,%a3@(16) 443ee: 222b 000c movel %a3@(12),%d1 443f2: d385 addxl %d5,%d1 443f4: 2741 000c movel %d1,%a3@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 443f8: b092 cmpl %a2@,%d0 443fa: 6610 bnes 4440c <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 443fc: 5284 addql #1,%d4 443fe: 508a addql #8,%a2 44400: b684 cmpl %d4,%d3 44402: 6ec2 bgts 443c6 44404: 6006 bras 4440c * 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; 44406: 4282 clrl %d2 44408: 6002 bras 4440c iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; 4440a: 74ff moveq #-1,%d2 if (bytes != iov[ v ].iov_len) break; } return total; } 4440c: 2002 movel %d2,%d0 4440e: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 44414: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059180 : /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 59180: 7003 moveq #3,%d0 void *realloc( void *ptr, size_t size ) { 59182: 4e56 fff0 linkw %fp,#-16 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 59186: 52b9 0005 c490 addql #1,5c490 void *realloc( void *ptr, size_t size ) { 5918c: 48d7 001c moveml %d2-%d4,%sp@ 59190: 242e 0008 movel %fp@(8),%d2 59194: 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())) { 59198: b0b9 0005 c728 cmpl 5c728 <_System_state_Current>,%d0 5919e: 6614 bnes 591b4 <== NEVER TAKEN if (_Thread_Dispatch_disable_level > 0) 591a0: 2039 0005 c5bc movel 5c5bc <_Thread_Dispatch_disable_level>,%d0 591a6: 6600 00aa bnew 59252 return (void *) 0; if (_ISR_Nest_level > 0) 591aa: 4ab9 0005 c77c tstl 5c77c <_Per_CPU_Information+0x8> 591b0: 6600 00a0 bnew 59252 } /* * Continue with realloc(). */ if ( !ptr ) 591b4: 4a82 tstl %d2 591b6: 6610 bnes 591c8 return malloc( size ); 591b8: 2f03 movel %d3,%sp@- 591ba: 4eb9 0004 2b18 jsr 42b18 591c0: 588f addql #4,%sp 591c2: 2400 movel %d0,%d2 591c4: 6000 008e braw 59254 if ( !size ) { 591c8: 4a83 tstl %d3 591ca: 660c bnes 591d8 <== ALWAYS TAKEN free( ptr ); 591cc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 591ce: 4eb9 0004 2830 jsr 42830 <== NOT EXECUTED return (void *) 0; 591d4: 588f addql #4,%sp <== NOT EXECUTED 591d6: 607a bras 59252 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 591d8: 486e fffc pea %fp@(-4) 591dc: 2f02 movel %d2,%sp@- 591de: 2f39 0005 adf0 movel 5adf0 ,%sp@- 591e4: 4eb9 0005 92fc jsr 592fc <_Protected_heap_Get_block_size> 591ea: 4fef 000c lea %sp@(12),%sp 591ee: 4a00 tstb %d0 591f0: 660e bnes 59200 errno = EINVAL; 591f2: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 591f8: 2040 moveal %d0,%a0 591fa: 7016 moveq #22,%d0 591fc: 2080 movel %d0,%a0@ 591fe: 6052 bras 59252 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 59200: 2f03 movel %d3,%sp@- 59202: 2f02 movel %d2,%sp@- 59204: 2f39 0005 adf0 movel 5adf0 ,%sp@- 5920a: 4eb9 0005 9338 jsr 59338 <_Protected_heap_Resize_block> 59210: 4fef 000c lea %sp@(12),%sp 59214: 4a00 tstb %d0 59216: 663c bnes 59254 * 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 ); 59218: 2f03 movel %d3,%sp@- 5921a: 4eb9 0004 2b18 jsr 42b18 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 59220: 588f addql #4,%sp * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 59222: 53b9 0005 c484 subql #1,5c484 * 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 ); 59228: 2800 movel %d0,%d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5922a: 6726 beqs 59252 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 5922c: 202e fffc movel %fp@(-4),%d0 59230: b083 cmpl %d3,%d0 59232: 6402 bccs 59236 <== NEVER TAKEN 59234: 2600 movel %d0,%d3 59236: 2f03 movel %d3,%sp@- 59238: 2f02 movel %d2,%sp@- 5923a: 2f04 movel %d4,%sp@- 5923c: 4eb9 0004 c5a4 jsr 4c5a4 free( ptr ); 59242: 2f02 movel %d2,%sp@- return new_area; 59244: 2404 movel %d4,%d2 if ( !new_area ) { return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); 59246: 4eb9 0004 2830 jsr 42830 return new_area; 5924c: 4fef 0010 lea %sp@(16),%sp 59250: 6002 bras 59254 new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 59252: 4282 clrl %d2 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 59254: 2002 movel %d2,%d0 59256: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5925c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044404 : #include int rmdir( const char *pathname ) { 44404: 4e56 ffbc linkw %fp,#-68 44408: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4440c: 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 ); 44410: 2f0a movel %a2,%sp@- 44412: 4eb9 0004 3252 jsr 43252 if ( parentpathlen == 0 ) 44418: 588f addql #4,%sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 4441a: 2a00 movel %d0,%d5 4441c: 200e movel %fp,%d0 4441e: 0680 ffff ffe8 addil #-24,%d0 if ( parentpathlen == 0 ) 44424: 4a85 tstl %d5 44426: 6616 bnes 4443e rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 44428: 2f00 movel %d0,%sp@- 4442a: 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; 4442e: 4204 clrb %d4 */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 44430: 2f0a movel %a2,%sp@- 44432: 4eb9 0004 4528 jsr 44528 44438: 4fef 000c lea %sp@(12),%sp 4443c: 601e bras 4445c else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 4443e: 42a7 clrl %sp@- 44440: 2f00 movel %d0,%sp@- 44442: 4878 0002 pea 2 44446: 2f05 movel %d5,%sp@- 44448: 2f0a movel %a2,%sp@- 4444a: 4eb9 0004 31da jsr 431da RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 44450: 4fef 0014 lea %sp@(20),%sp 44454: 4a80 tstl %d0 44456: 6600 00c2 bnew 4451a return -1; free_parentloc = true; 4445a: 7801 moveq #1,%d4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4445c: 4878 0014 pea 14 44460: 260e movel %fp,%d3 44462: 0683 ffff ffe8 addil #-24,%d3 44468: 240e movel %fp,%d2 4446a: 0682 ffff ffd4 addil #-44,%d2 name = pathname + parentpathlen; 44470: d5c5 addal %d5,%a2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 44472: 47f9 0004 de84 lea 4de84 ,%a3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 44478: 2f03 movel %d3,%sp@- 4447a: 2f02 movel %d2,%sp@- 4447c: 4eb9 0004 d38c jsr 4d38c name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 44482: 2f0a movel %a2,%sp@- 44484: 4e93 jsr %a3@ 44486: 2e80 movel %d0,%sp@ 44488: 2f0a movel %a2,%sp@- 4448a: 4eb9 0004 3294 jsr 43294 44490: d5c0 addal %d0,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 44492: 2f0a movel %a2,%sp@- 44494: 4e93 jsr %a3@ 44496: 4297 clrl %sp@ 44498: 2f02 movel %d2,%sp@- 4449a: 42a7 clrl %sp@- 4449c: 2f00 movel %d0,%sp@- 4449e: 2f0a movel %a2,%sp@- 444a0: 4eb9 0004 3140 jsr 43140 0, &loc, false ); if ( result != 0 ) { 444a6: 4fef 0028 lea %sp@(40),%sp 444aa: 4a80 tstl %d0 444ac: 6710 beqs 444be if ( free_parentloc ) 444ae: 4a04 tstb %d4 444b0: 6768 beqs 4451a <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 444b2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 444b4: 4eb9 0004 34ec jsr 434ec <== NOT EXECUTED 444ba: 588f addql #4,%sp <== NOT EXECUTED 444bc: 605c bras 4451a <== NOT EXECUTED } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 444be: 206e ffe0 moveal %fp@(-32),%a0 444c2: 45f9 0004 34ec lea 434ec ,%a2 444c8: 2f02 movel %d2,%sp@- 444ca: 2068 0010 moveal %a0@(16),%a0 444ce: 4e90 jsr %a0@ 444d0: 588f addql #4,%sp 444d2: 7201 moveq #1,%d1 444d4: b280 cmpl %d0,%d1 444d6: 671e beqs 444f6 rtems_filesystem_freenode( &loc ); 444d8: 2f02 movel %d2,%sp@- 444da: 4e92 jsr %a2@ if ( free_parentloc ) 444dc: 588f addql #4,%sp 444de: 4a04 tstb %d4 444e0: 6706 beqs 444e8 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 444e2: 2f03 movel %d3,%sp@- 444e4: 4e92 jsr %a2@ 444e6: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 444e8: 4eb9 0004 cae0 jsr 4cae0 <__errno> 444ee: 2040 moveal %d0,%a0 444f0: 7014 moveq #20,%d0 444f2: 2080 movel %d0,%a0@ 444f4: 6024 bras 4451a /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 444f6: 2f02 movel %d2,%sp@- 444f8: 206e ffdc moveal %fp@(-36),%a0 444fc: 2f03 movel %d3,%sp@- 444fe: 2068 0034 moveal %a0@(52),%a0 44502: 4e90 jsr %a0@ 44504: 2a00 movel %d0,%d5 rtems_filesystem_freenode( &loc ); 44506: 2f02 movel %d2,%sp@- 44508: 4e92 jsr %a2@ if ( free_parentloc ) 4450a: 4fef 000c lea %sp@(12),%sp 4450e: 4a04 tstb %d4 44510: 670a beqs 4451c rtems_filesystem_freenode( &parentloc ); 44512: 2f03 movel %d3,%sp@- 44514: 4e92 jsr %a2@ 44516: 588f addql #4,%sp 44518: 6002 bras 4451c result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; 4451a: 7aff moveq #-1,%d5 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4451c: 2005 movel %d5,%d0 4451e: 4cee 0c3c ffbc moveml %fp@(-68),%d2-%d5/%a2-%a3 44524: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bf04 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 4bf04: 4e56 fffc linkw %fp,#-4 4bf08: 2f02 movel %d2,%sp@- 4bf0a: 486e fffc pea %fp@(-4) 4bf0e: 242e 0008 movel %fp@(8),%d2 4bf12: 2f02 movel %d2,%sp@- 4bf14: 4879 0005 dd06 pea 5dd06 <_Barrier_Information> 4bf1a: 4eb9 0004 8170 jsr 48170 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4bf20: 4fef 000c lea %sp@(12),%sp 4bf24: 4aae fffc tstl %fp@(-4) 4bf28: 6634 bnes 4bf5e <== NEVER TAKEN case OBJECTS_LOCAL: _CORE_barrier_Wait( 4bf2a: 42a7 clrl %sp@- 4bf2c: 2f2e 000c movel %fp@(12),%sp@- 4bf30: 2040 moveal %d0,%a0 4bf32: 4878 0001 pea 1 4bf36: 2f02 movel %d2,%sp@- 4bf38: 4868 0014 pea %a0@(20) 4bf3c: 4eb9 0004 c594 jsr 4c594 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 4bf42: 4eb9 0004 8936 jsr 48936 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( _Thread_Executing->Wait.return_code ); 4bf48: 2079 0005 dcf8 moveal 5dcf8 <_Per_CPU_Information+0xc>,%a0 true, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 4bf4e: 2f28 0034 movel %a0@(52),%sp@- 4bf52: 4eb9 0004 ce8c jsr 4ce8c <_Barrier_Translate_core_barrier_return_code> 4bf58: 4fef 0018 lea %sp@(24),%sp 4bf5c: 6002 bras 4bf60 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4bf5e: 7004 moveq #4,%d0 } 4bf60: 242e fff8 movel %fp@(-8),%d2 4bf64: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042188 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 42188: 4e56 ffec linkw %fp,#-20 4218c: 202e 0008 movel %fp@(8),%d0 42190: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 42194: 246e 000c moveal %fp@(12),%a2 42198: 242e 0010 movel %fp@(16),%d2 const char *p; if ( !name ) 4219c: 4a80 tstl %d0 4219e: 674e beqs 421ee return NULL; if ( !value ) 421a0: 4a8a tstl %a2 421a2: 674c beqs 421f0 return NULL; if ( !length ) 421a4: 4a82 tstl %d2 421a6: 6746 beqs 421ee return NULL; value[0] = '\0'; 421a8: 4212 clrb %a2@ p = rtems_bsp_cmdline_get_param_raw( name ); 421aa: 2f00 movel %d0,%sp@- 421ac: 4eb9 0004 21fc jsr 421fc if ( !p ) 421b2: 588f addql #4,%sp 421b4: 4a80 tstl %d0 421b6: 6736 beqs 421ee 421b8: 2240 moveal %d0,%a1 421ba: 204a moveal %a2,%a0 421bc: 4281 clrl %d1 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i if ( *p == '\"' ) { 421c2: 7822 moveq #34,%d4 421c4: 1003 moveb %d3,%d0 421c6: 49c0 extbl %d0 421c8: b880 cmpl %d0,%d4 421ca: 6604 bnes 421d0 quotes++; 421cc: 5281 addql #1,%d1 421ce: 600c bras 421dc } else if ( ((quotes % 2) == 0) && *p == ' ' ) 421d0: 0801 0000 btst #0,%d1 421d4: 6606 bnes 421dc 421d6: 7820 moveq #32,%d4 421d8: b880 cmpl %d0,%d4 421da: 6714 beqs 421f0 break; value[i++] = *p++; 421dc: 10c3 moveb %d3,%a0@+ value[i] = '\0'; 421de: 4210 clrb %a0@ int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 421e4: 2648 moveal %a0,%a3 421e6: 97ca subal %a2,%a3 421e8: b48b cmpl %a3,%d2 421ea: 62d6 bhis 421c2 <== ALWAYS TAKEN 421ec: 6002 bras 421f0 <== NOT EXECUTED value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); if ( !p ) return NULL; 421ee: 95ca subal %a2,%a2 copy_string( p, value, length ); return value; } 421f0: 200a movel %a2,%d0 421f2: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 421f8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042224 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 42224: 4e56 fff4 linkw %fp,#-12 42228: 48d7 001c moveml %d2-%d4,%sp@ const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 4222c: 2f2e 0010 movel %fp@(16),%sp@- const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 42230: 242e 000c movel %fp@(12),%d2 42234: 282e 0008 movel %fp@(8),%d4 const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 42238: 2f02 movel %d2,%sp@- 4223a: 2f04 movel %d4,%sp@- 4223c: 4eb9 0004 2188 jsr 42188 if ( !p ) 42242: 4fef 000c lea %sp@(12),%sp { const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 42246: 2600 movel %d0,%d3 if ( !p ) 42248: 6744 beqs 4228e return NULL; rhs = &p[strlen(name)]; 4224a: 2f04 movel %d4,%sp@- 4224c: 4eb9 0004 d524 jsr 4d524 42252: 588f addql #4,%sp 42254: 2043 moveal %d3,%a0 42256: d1c0 addal %d0,%a0 if ( *rhs != '=' ) 42258: 723d moveq #61,%d1 4225a: 1010 moveb %a0@,%d0 4225c: 49c0 extbl %d0 4225e: b280 cmpl %d0,%d1 42260: 662c bnes 4228e <== NEVER TAKEN return NULL; rhs++; 42262: 5288 addql #1,%a0 if ( *rhs == '\"' ) 42264: 123c 0022 moveb #34,%d1 42268: 1010 moveb %a0@,%d0 4226a: 49c0 extbl %d0 4226c: b280 cmpl %d0,%d1 4226e: 6602 bnes 42272 rhs++; 42270: 5288 addql #1,%a0 const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 42272: 2242 moveal %d2,%a1 42274: 6002 bras 42278 rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) *d++ = *rhs++; 42276: 12c0 moveb %d0,%a1@+ return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 42278: 1018 moveb %a0@+,%d0 4227a: 66fa bnes 42276 *d++ = *rhs++; if ( *(d-1) == '\"' ) 4227c: 2049 moveal %a1,%a0 4227e: 7222 moveq #34,%d1 42280: 1020 moveb %a0@-,%d0 42282: 49c0 extbl %d0 42284: b280 cmpl %d0,%d1 42286: 6702 beqs 4228a 42288: 2049 moveal %a1,%a0 d--; *d = '\0'; 4228a: 4210 clrb %a0@ return value; 4228c: 6002 bras 42290 if ( !p ) return NULL; rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; 4228e: 4282 clrl %d2 if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; } 42290: 2002 movel %d2,%d0 42292: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 42298: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bc8c : [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { 4bc8c: 4e56 0000 linkw %fp,#0 4bc90: 202e 0008 movel %fp@(8),%d0 4bc94: 2f02 movel %d2,%sp@- if (sc == RTEMS_SUCCESSFUL) { 4bc96: 4a80 tstl %d0 4bc98: 6722 beqs 4bcbc <== ALWAYS TAKEN return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { 4bc9a: 721c moveq #28,%d1 <== NOT EXECUTED 4bc9c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4bc9e: 650c bcss 4bcac <== NOT EXECUTED eno = status_code_to_errno [sc]; 4bca0: 41f9 0005 a462 lea 5a462 ,%a0 <== NOT EXECUTED 4bca6: 2430 0c00 movel %a0@(00000000,%d0:l:4),%d2 <== NOT EXECUTED 4bcaa: 6002 bras 4bcae <== NOT EXECUTED int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; 4bcac: 7416 moveq #22,%d2 <== NOT EXECUTED if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { eno = status_code_to_errno [sc]; } errno = eno; 4bcae: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 4bcb4: 2040 moveal %d0,%a0 <== NOT EXECUTED return -1; 4bcb6: 70ff moveq #-1,%d0 <== NOT EXECUTED if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { eno = status_code_to_errno [sc]; } errno = eno; 4bcb8: 2082 movel %d2,%a0@ <== NOT EXECUTED return -1; 4bcba: 6002 bras 4bcbe <== NOT EXECUTED }; int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; 4bcbc: 4280 clrl %d0 errno = eno; return -1; } } 4bcbe: 242e fffc movel %fp@(-4),%d2 4bcc2: 4e5e unlk %fp ... =============================================================================== 00042726 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 42726: 4e56 fffc linkw %fp,#-4 4272a: 2f0a movel %a2,%sp@- 4272c: 246e 0008 moveal %fp@(8),%a2 42730: 2f02 movel %d2,%sp@- 42732: 242e 0014 movel %fp@(20),%d2 int i = 0; 42736: 42ae fffc clrl %fp@(-4) /* * Verify Input parameters. */ if ( !pathname ) 4273a: 4a8a tstl %a2 4273c: 660e bnes 4274c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 4273e: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 42744: 2040 moveal %d0,%a0 <== NOT EXECUTED 42746: 700e moveq #14,%d0 <== NOT EXECUTED 42748: 2080 movel %d0,%a0@ <== NOT EXECUTED 4274a: 6010 bras 4275c <== NOT EXECUTED if ( !pathloc ) 4274c: 4a82 tstl %d2 4274e: 6610 bnes 42760 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 42750: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 42756: 7405 moveq #5,%d2 <== NOT EXECUTED 42758: 2040 moveal %d0,%a0 <== NOT EXECUTED 4275a: 2082 movel %d2,%a0@ <== NOT EXECUTED 4275c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4275e: 6032 bras 42792 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 42760: 2f02 movel %d2,%sp@- 42762: 486e fffc pea %fp@(-4) 42766: 2f0a movel %a2,%sp@- 42768: 4eb9 0004 34f4 jsr 434f4 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 4276e: 2f2e 0018 movel %fp@(24),%sp@- 42772: 2f02 movel %d2,%sp@- 42774: 2f2e 0010 movel %fp@(16),%sp@- 42778: 202e fffc movel %fp@(-4),%d0 4277c: 222e 000c movel %fp@(12),%d1 42780: 9280 subl %d0,%d1 42782: 2f01 movel %d1,%sp@- 42784: 4872 0800 pea %a2@(00000000,%d0:l) 42788: 4eb9 0004 268c jsr 4268c 4278e: 4fef 0020 lea %sp@(32),%sp pathnamelen - i, flags, pathloc, follow_link ); } 42792: 242e fff4 movel %fp@(-12),%d2 42796: 246e fff8 moveal %fp@(-8),%a2 4279a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004268c : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 4268c: 4e56 fff0 linkw %fp,#-16 42690: 202e 0008 movel %fp@(8),%d0 42694: 48d7 041c moveml %d2-%d4/%a2,%sp@ 42698: 222e 000c movel %fp@(12),%d1 4269c: 262e 0010 movel %fp@(16),%d3 426a0: 246e 0014 moveal %fp@(20),%a2 426a4: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 426a8: 4a80 tstl %d0 426aa: 660e bnes 426ba <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 426ac: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 426b2: 720e moveq #14,%d1 <== NOT EXECUTED 426b4: 2040 moveal %d0,%a0 <== NOT EXECUTED 426b6: 2081 movel %d1,%a0@ <== NOT EXECUTED 426b8: 6010 bras 426ca <== NOT EXECUTED if ( !pathloc ) 426ba: 4a8a tstl %a2 426bc: 6610 bnes 426ce <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 426be: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> <== NOT EXECUTED 426c4: 2040 moveal %d0,%a0 <== NOT EXECUTED 426c6: 7005 moveq #5,%d0 <== NOT EXECUTED 426c8: 2080 movel %d0,%a0@ <== NOT EXECUTED 426ca: 74ff moveq #-1,%d2 <== NOT EXECUTED 426cc: 604c bras 4271a <== NOT EXECUTED result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 426ce: 206a 000c moveal %a2@(12),%a0 426d2: 2f0a movel %a2,%sp@- 426d4: 2f03 movel %d3,%sp@- 426d6: 2f01 movel %d1,%sp@- 426d8: 2f00 movel %d0,%sp@- 426da: 2050 moveal %a0@,%a0 426dc: 4e90 jsr %a0@ /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 426de: 4fef 0010 lea %sp@(16),%sp rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 426e2: 2400 movel %d0,%d2 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 426e4: 6634 bnes 4271a 426e6: 4a84 tstl %d4 426e8: 6730 beqs 4271a type = (*pathloc->ops->node_type_h)( pathloc ); 426ea: 206a 000c moveal %a2@(12),%a0 426ee: 2f0a movel %a2,%sp@- 426f0: 2068 0010 moveal %a0@(16),%a0 426f4: 4e90 jsr %a0@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 426f6: 588f addql #4,%sp 426f8: 7201 moveq #1,%d1 426fa: 5780 subql #3,%d0 426fc: b280 cmpl %d0,%d1 426fe: 651a bcss 4271a * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 42700: 206a 000c moveal %a2@(12),%a0 42704: 2d43 000c movel %d3,%fp@(12) 42708: 2d4a 0008 movel %a2,%fp@(8) 4270c: 2268 0034 moveal %a0@(52),%a1 } } return result; } 42710: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42716: 4e5e unlk %fp * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 42718: 4ed1 jmp %a1@ } } return result; } 4271a: 2002 movel %d2,%d0 4271c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42722: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049afe : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 49afe: 4e56 fff8 linkw %fp,#-8 49b02: 202e 0008 movel %fp@(8),%d0 find_arg fa = { 49b06: 42ae fffc clrl %fp@(-4) 49b0a: 2d40 fff8 movel %d0,%fp@(-8) .type = type, .mount_h = NULL }; if ( type != NULL ) { 49b0e: 6710 beqs 49b20 <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 49b10: 486e fff8 pea %fp@(-8) 49b14: 487a ff16 pea %pc@(49a2c ) 49b18: 4eb9 0004 9a96 jsr 49a96 49b1e: 508f addql #8,%sp } return fa.mount_h; } 49b20: 202e fffc movel %fp@(-4),%d0 49b24: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042350 : /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 42350: 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 ) { 42352: 4e56 ffe0 linkw %fp,#-32 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 42356: 2079 0005 af00 moveal 5af00 ,%a0 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 4235c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 42360: 2140 002c movel %d0,%a0@(44) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 42364: 4ab9 0005 981e tstl 5981e 4236a: 6608 bnes 42374 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); 4236c: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 42372: 602c bras 423a0 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 42374: 2079 0005 adec moveal 5adec ,%a0 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 4237a: 42a7 clrl %sp@- 4237c: 2f28 0004 movel %a0@(4),%sp@- 42380: 2f10 movel %a0@,%sp@- 42382: 2f28 000c movel %a0@(12),%sp@- 42386: 2f28 0008 movel %a0@(8),%sp@- 4238a: 4eb9 0004 2d14 jsr 42d14 if ( status == -1 ) 42390: 4fef 0014 lea %sp@(20),%sp 42394: 72ff moveq #-1,%d1 42396: b280 cmpl %d0,%d1 42398: 660c bnes 423a6 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); 4239a: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 423a0: 4eb9 0004 5df8 jsr 45df8 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 423a6: 2079 0005 af00 moveal 5af00 ,%a0 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 423ac: 240e movel %fp,%d2 423ae: 0682 ffff ffec addil #-20,%d2 423b4: 47f9 0004 2726 lea 42726 ,%a3 rtems_filesystem_root = loc; 423ba: 45f9 0004 c5a4 lea 4c5a4 ,%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; 423c0: 4240 clrw %d0 423c2: 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); 423c6: 42a7 clrl %sp@- 423c8: 2f02 movel %d2,%sp@- 423ca: 42a7 clrl %sp@- 423cc: 4878 0001 pea 1 423d0: 4879 0005 9bd0 pea 59bd0 423d6: 4e93 jsr %a3@ rtems_filesystem_root = loc; 423d8: 4878 0014 pea 14 423dc: 2079 0005 af00 moveal 5af00 ,%a0 423e2: 41e8 0018 lea %a0@(24),%a0 423e6: 2f02 movel %d2,%sp@- 423e8: 2f08 movel %a0,%sp@- 423ea: 4e92 jsr %a2@ /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 423ec: 4fef 001c lea %sp@(28),%sp 423f0: 4297 clrl %sp@ 423f2: 2f02 movel %d2,%sp@- 423f4: 42a7 clrl %sp@- 423f6: 4878 0001 pea 1 423fa: 4879 0005 9bd0 pea 59bd0 42400: 4e93 jsr %a3@ rtems_filesystem_current = loc; 42402: 4878 0014 pea 14 42406: 2039 0005 af00 movel 5af00 ,%d0 4240c: 5880 addql #4,%d0 4240e: 2f02 movel %d2,%sp@- 42410: 2f00 movel %d0,%sp@- 42412: 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); 42414: 4fef 0020 lea %sp@(32),%sp 42418: 4878 01ff pea 1ff 4241c: 4879 0005 9bd2 pea 59bd2 42422: 4eb9 0004 2bc4 jsr 42bc4 if ( status != 0 ) 42428: 508f addql #8,%sp 4242a: 4a80 tstl %d0 4242c: 670a beqs 42438 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0003 ); 4242e: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 42434: 6000 ff6a braw 423a0 <== 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. */ } 42438: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 4243e: 4e5e unlk %fp ... =============================================================================== 00049a96 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 49a96: 4e56 fff0 linkw %fp,#-16 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; 49a9a: 4200 clrb %d0 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 49a9c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 49aa0: 266e 0008 moveal %fp@(8),%a3 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; 49aa4: 45f9 0005 97fe lea 597fe ,%a2 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 49aaa: 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 ) { 49aae: 600a bras 49aba stop = (*routine)( table_entry, routine_arg ); 49ab0: 2f02 movel %d2,%sp@- 49ab2: 2f0a movel %a2,%sp@- ++table_entry; 49ab4: 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 ); 49ab6: 4e93 jsr %a3@ ++table_entry; 49ab8: 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 ) { 49aba: 4a92 tstl %a2@ 49abc: 6706 beqs 49ac4 49abe: 4a00 tstb %d0 49ac0: 67ee beqs 49ab0 <== ALWAYS TAKEN 49ac2: 6030 bras 49af4 <== NOT EXECUTED 49ac4: 1600 moveb %d0,%d3 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 49ac6: 662c bnes 49af4 rtems_libio_lock(); 49ac8: 4eba ff9a jsr %pc@(49a64 ) } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 49acc: 2479 0005 af04 moveal 5af04 ,%a2 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 49ad2: 600e bras 49ae2 !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 ); 49ad4: 2f02 movel %d2,%sp@- 49ad6: 486a 0008 pea %a2@(8) 49ada: 4e93 jsr %a3@ } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 49adc: 2452 moveal %a2@,%a2 49ade: 508f addql #8,%sp !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 ); 49ae0: 1600 moveb %d0,%d3 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 49ae2: b5fc 0005 af08 cmpal #372488,%a2 49ae8: 6704 beqs 49aee node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; 49aea: 4a03 tstb %d3 49aec: 67e6 beqs 49ad4 <== ALWAYS TAKEN ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); } rtems_libio_unlock(); 49aee: 4eba ff90 jsr %pc@(49a80 ) 49af2: 1003 moveb %d3,%d0 } return stop; } 49af4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 49afa: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042cca : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 42cca: 4e56 fff0 linkw %fp,#-16 42cce: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42cd2: 266e 0008 moveal %fp@(8),%a3 42cd6: 242e 000c movel %fp@(12),%d2 rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); 42cda: 4eba ffbc jsr %pc@(42c98 ) stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 42cde: 2479 0005 aee0 moveal 5aee0 ,%a2 rtems_per_filesystem_mount_routine routine, void *routine_arg ) { rtems_chain_node *node = NULL; bool stop = false; 42ce4: 4200 clrb %d0 rtems_libio_lock(); for ( 42ce6: 600a bras 42cf2 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 ); 42ce8: 2f02 movel %d2,%sp@- 42cea: 2f0a movel %a2,%sp@- 42cec: 4e93 jsr %a3@ } rtems_libio_unlock(); return stop; } 42cee: 2452 moveal %a2@,%a2 42cf0: 508f addql #8,%sp { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 42cf2: b5fc 0005 aee4 cmpal #372452,%a2 42cf8: 6704 beqs 42cfe node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; 42cfa: 4a00 tstb %d0 42cfc: 67ea beqs 42ce8 <== 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(); 42cfe: 2d40 fffc movel %d0,%fp@(-4) 42d02: 4eba ffb0 jsr %pc@(42cb4 ) return stop; } 42d06: 202e fffc movel %fp@(-4),%d0 42d0a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 42d10: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000427e0 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 427e0: 4e56 fff0 linkw %fp,#-16 427e4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 427e8: 262e 000c movel %fp@(12),%d3 /* * Eat any separators at start of the path. */ int stripped = 0; 427ec: 4282 clrl %d2 while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 427ee: 47f9 0004 3558 lea 43558 ,%a3 ) { /* * Eat any separators at start of the path. */ int stripped = 0; 427f4: 246e 0008 moveal %fp@(8),%a2 while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 427f8: 6002 bras 427fc { pathname++; pathnamelen--; stripped++; 427fa: 5282 addql #1,%d2 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 427fc: 101a moveb %a2@+,%d0 427fe: 6710 beqs 42810 <== NEVER TAKEN 42800: b483 cmpl %d3,%d2 42802: 670c beqs 42810 <== NEVER TAKEN 42804: 49c0 extbl %d0 42806: 2f00 movel %d0,%sp@- 42808: 4e93 jsr %a3@ 4280a: 588f addql #4,%sp 4280c: 4a80 tstl %d0 4280e: 66ea bnes 427fa pathname++; pathnamelen--; stripped++; } return stripped; } 42810: 2002 movel %d2,%d0 42812: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 42818: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042fa8 : void *rtems_gxx_getspecific(__gthread_key_t key) { 42fa8: 4e56 fffc linkw %fp,#-4 rtems_status_code status; void *p= 0; 42fac: 204e moveal %fp,%a0 } return 0; } void *rtems_gxx_getspecific(__gthread_key_t key) { 42fae: 2f0a movel %a2,%sp@- 42fb0: 246e 0008 moveal %fp@(8),%a2 rtems_status_code status; void *p= 0; 42fb4: 42a0 clrl %a0@- /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p ); 42fb6: 2f08 movel %a0,%sp@- 42fb8: 2f0a movel %a2,%sp@- 42fba: 42a7 clrl %sp@- 42fbc: 4eb9 0004 6614 jsr 46614 if ( status == RTEMS_SUCCESSFUL ) { 42fc2: 4fef 000c lea %sp@(12),%sp 42fc6: 4a80 tstl %d0 42fc8: 6606 bnes 42fd0 <== NEVER TAKEN /* We do not have to do this, but what the heck ! */ p= key->val; 42fca: 2d52 fffc movel %a2@,%fp@(-4) 42fce: 6024 bras 42ff4 } else { /* fisrt time, always set to zero, it is unknown the value that the others * threads are using at the moment of this call */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); 42fd0: 2f2a 0004 movel %a2@(4),%sp@- <== NOT EXECUTED 42fd4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42fd6: 42a7 clrl %sp@- <== NOT EXECUTED 42fd8: 4eb9 0004 650c jsr 4650c <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) { 42fde: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42fe2: 4a80 tstl %d0 <== NOT EXECUTED 42fe4: 670c beqs 42ff2 <== NOT EXECUTED rtems_panic ("rtems_gxx_getspecific"); 42fe6: 4879 0005 aaa8 pea 5aaa8 <== NOT EXECUTED 42fec: 4eb9 0004 2be2 jsr 42be2 <== NOT EXECUTED } key->val = (void *)0; 42ff2: 4292 clrl %a2@ <== NOT EXECUTED p, rtems_task_self() ); #endif return p; } 42ff4: 202e fffc movel %fp@(-4),%d0 42ff8: 246e fff8 moveal %fp@(-8),%a2 42ffc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042f76 : int rtems_gxx_key_delete (__gthread_key_t key) { 42f76: 4e56 0000 linkw %fp,#0 42f7a: 2f02 movel %d2,%sp@- 42f7c: 242e 0008 movel %fp@(8),%d2 #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 ); 42f80: 2f02 movel %d2,%sp@- 42f82: 42a7 clrl %sp@- 42f84: 4eb9 0004 65a0 jsr 465a0 if ( status == RTEMS_SUCCESSFUL ) { 42f8a: 508f addql #8,%sp 42f8c: 4a80 tstl %d0 42f8e: 660e bnes 42f9e <== NEVER TAKEN /* Hmm - hopefully all tasks using this key have gone away... */ if ( key ) free( (void *)key ); 42f90: 4a82 tstl %d2 42f92: 670a beqs 42f9e <== NEVER TAKEN 42f94: 2f02 movel %d2,%sp@- 42f96: 4eb9 0004 2dbc jsr 42dbc 42f9c: 588f addql #4,%sp return 0; } return 0; } 42f9e: 242e fffc movel %fp@(-4),%d2 42fa2: 4280 clrl %d0 42fa4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042f66 : printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr ); #endif key->val = 0; return 0; } 42f66: 4280 clrl %d0 <== NOT EXECUTED return 0; return -1; } int rtems_gxx_key_dtor (__gthread_key_t key, void *ptr) { 42f68: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr ); #endif key->val = 0; 42f6c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED return 0; } 42f70: 4e5e unlk %fp <== NOT EXECUTED { #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr ); #endif key->val = 0; 42f72: 4290 clrl %a0@ <== NOT EXECUTED return 0; } =============================================================================== 00043088 : int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex) { 43088: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: destroy mutex=%X\n", *mutex ); #endif status = rtems_semaphore_delete(*(rtems_id *)mutex); 4308c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 43090: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 43092: 4eb9 0004 5eac jsr 45eac <== NOT EXECUTED if ( status == RTEMS_SUCCESSFUL ) 43098: 588f addql #4,%sp <== NOT EXECUTED return 0; return -1; } 4309a: 4e5e unlk %fp <== NOT EXECUTED printk( "gxx_wrappers: destroy mutex=%X\n", *mutex ); #endif status = rtems_semaphore_delete(*(rtems_id *)mutex); if ( status == RTEMS_SUCCESSFUL ) return 0; 4309c: 4a80 tstl %d0 <== NOT EXECUTED 4309e: 56c0 sne %d0 <== NOT EXECUTED 430a0: 49c0 extbl %d0 <== NOT EXECUTED return -1; } =============================================================================== 00043030 : /* * MUTEX support */ void rtems_gxx_mutex_init (__gthread_mutex_t *mutex) { 43030: 4e56 0000 linkw %fp,#0 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init =%X\n", *mutex ); #endif status = rtems_semaphore_create( 43034: 2f2e 0008 movel %fp@(8),%sp@- 43038: 42a7 clrl %sp@- 4303a: 4878 0054 pea 54 4303e: 4878 0001 pea 1 43042: 2f3c 4743 4332 movel #1195590450,%sp@- 43048: 4eb9 0004 5d10 jsr 45d10 RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE| RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL, 0, (rtems_id *)mutex ); if ( status != RTEMS_SUCCESSFUL ) { 4304e: 4fef 0014 lea %sp@(20),%sp 43052: 4a80 tstl %d0 43054: 670c beqs 43062 <== ALWAYS TAKEN "gxx_wrappers: mutex init failed %s (%d)\n", rtems_status_text(status), status ); #endif rtems_panic ("rtems_gxx_mutex_init"); 43056: 4879 0005 aabe pea 5aabe <== NOT EXECUTED 4305c: 4eb9 0004 2be2 jsr 42be2 <== NOT EXECUTED } #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init complete =%X\n", *mutex ); #endif } 43062: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042ec8 : typedef int __gthread_once_t; typedef void *__gthread_mutex_t; typedef void *__gthread_recursive_mutex_t; int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { 42ec8: 4e56 fffc linkw %fp,#-4 42ecc: 2f0a movel %a2,%sp@- 42ece: 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 ) { 42ed2: 2012 movel %a2@,%d0 typedef int __gthread_once_t; typedef void *__gthread_mutex_t; typedef void *__gthread_recursive_mutex_t; int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { 42ed4: 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 ) { 42ed6: 4a80 tstl %d0 42ed8: 663e bnes 42f18 rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 42eda: 486e fffc pea %fp@(-4) 42ede: 4878 0100 pea 100 42ee2: 4878 0100 pea 100 42ee6: 4eb9 0004 6330 jsr 46330 if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { 42eec: 2412 movel %a2@,%d2 42eee: 4fef 000c lea %sp@(12),%sp 42ef2: 6604 bnes 42ef8 <== NEVER TAKEN *(volatile __gthread_once_t *)once = 1; 42ef4: 7001 moveq #1,%d0 42ef6: 2480 movel %d0,%a2@ } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 42ef8: 486e fffc pea %fp@(-4) 42efc: 4878 0100 pea 100 42f00: 2f2e fffc movel %fp@(-4),%sp@- 42f04: 4eb9 0004 6330 jsr 46330 if ( o == 0 ) 42f0a: 4fef 000c lea %sp@(12),%sp 42f0e: 4a82 tstl %d2 42f10: 6606 bnes 42f18 <== NEVER TAKEN (*func)(); 42f12: 206e 000c moveal %fp@(12),%a0 42f16: 4e90 jsr %a0@ } return 0; } 42f18: 242e fff4 movel %fp@(-12),%d2 42f1c: 4280 clrl %d0 42f1e: 246e fff8 moveal %fp@(-8),%a2 42f22: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043000 : int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { 43000: 4e56 0000 linkw %fp,#0 43004: 2f0a movel %a2,%sp@- 43006: 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 ); 4300a: 2f2a 0004 movel %a2@(4),%sp@- 4300e: 2f0a movel %a2,%sp@- 43010: 42a7 clrl %sp@- 43012: 4eb9 0004 650c jsr 4650c if ( status == RTEMS_SUCCESSFUL ) { 43018: 4fef 000c lea %sp@(12),%sp 4301c: 4a80 tstl %d0 4301e: 6606 bnes 43026 <== NEVER TAKEN /* now let's set the proper value */ key->val = (void *)ptr; 43020: 24ae 000c movel %fp@(12),%a2@ return 0; 43024: 6002 bras 43028 } return -1; 43026: 70ff moveq #-1,%d0 <== NOT EXECUTED } 43028: 246e fffc moveal %fp@(-4),%a2 4302c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046c9c : size_t size, uintptr_t alignment, uintptr_t boundary ) { if ( 46c9c: 7003 moveq #3,%d0 void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { 46c9e: 4e56 0000 linkw %fp,#0 if ( 46ca2: b0b9 0006 1fe4 cmpl 61fe4 <_System_state_Current>,%d0 46ca8: 660a bnes 46cb4 <== NEVER TAKEN _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() 46caa: 4eb9 0004 5de0 jsr 45de0 46cb0: 4a00 tstb %d0 46cb2: 6724 beqs 46cd8 ) { return NULL; } malloc_deferred_frees_process(); 46cb4: 4eb9 0004 5e1e jsr 45e1e /* FIXME: Statistics, boundary checks */ return _Protected_heap_Allocate_aligned_with_boundary( 46cba: 2f2e 0010 movel %fp@(16),%sp@- 46cbe: 2f2e 000c movel %fp@(12),%sp@- 46cc2: 2f2e 0008 movel %fp@(8),%sp@- 46cc6: 2f39 0005 fdc0 movel 5fdc0 ,%sp@- 46ccc: 4eb9 0004 b2c4 jsr 4b2c4 <_Protected_heap_Allocate_aligned_with_boundary> 46cd2: 4fef 0010 lea %sp@(16),%sp 46cd6: 6002 bras 46cda { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() ) { return NULL; 46cd8: 4280 clrl %d0 RTEMS_Malloc_Heap, size, alignment, boundary ); } 46cda: 4e5e unlk %fp ... =============================================================================== 000422c0 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 422c0: 4e56 ffd4 linkw %fp,#-44 422c4: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 422c8: 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( 422cc: 49f9 0004 d150 lea 4d150 ,%a4 422d2: 260e movel %fp,%d3 422d4: 0683 ffff ffec addil #-20,%d3 422da: 2f02 movel %d2,%sp@- rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 422dc: 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( 422e0: 4e94 jsr %a4@ 422e2: 7201 moveq #1,%d1 422e4: 2e81 movel %d1,%sp@ 422e6: 2f03 movel %d3,%sp@- 422e8: 42a7 clrl %sp@- 422ea: 2f00 movel %d0,%sp@- 422ec: 2f02 movel %d2,%sp@- 422ee: 4eb9 0004 2726 jsr 42726 name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; node_type = (*loc.ops->node_type_h)( &loc ); 422f4: 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( 422f8: 2800 movel %d0,%d4 name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; node_type = (*loc.ops->node_type_h)( &loc ); 422fa: 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; 422fc: 266e ffec moveal %fp@(-20),%a3 node_type = (*loc.ops->node_type_h)( &loc ); 42300: 2068 0010 moveal %a0@(16),%a0 42304: 4e90 jsr %a0@ if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 42306: 4fef 0018 lea %sp@(24),%sp 4230a: 4a84 tstl %d4 4230c: 6606 bnes 42314 <== NEVER TAKEN 4230e: 7202 moveq #2,%d1 42310: b280 cmpl %d0,%d1 42312: 6710 beqs 42324 rtems_filesystem_freenode( &loc ); 42314: 486e ffec pea %fp@(-20) 42318: 4eb9 0004 281c jsr 4281c return RTEMS_UNSATISFIED; 4231e: 588f addql #4,%sp 42320: 700d moveq #13,%d0 42322: 6022 bras 42346 } device_info->device_name = (char *) name; 42324: 2482 movel %d2,%a2@ device_info->device_name_length = strlen( name ); 42326: 2f02 movel %d2,%sp@- 42328: 4e94 jsr %a4@ device_info->major = the_jnode->info.device.major; 4232a: 256b 004c 0008 movel %a3@(76),%a2@(8) device_info->minor = the_jnode->info.device.minor; 42330: 256b 0050 000c movel %a3@(80),%a2@(12) rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 42336: 2540 0004 movel %d0,%a2@(4) device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 4233a: 2e83 movel %d3,%sp@ 4233c: 4eb9 0004 281c jsr 4281c return RTEMS_SUCCESSFUL; 42342: 588f addql #4,%sp 42344: 4280 clrl %d0 } 42346: 4cee 1c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a4 4234c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042290 : rtems_status_code rtems_io_register_name( const char *device_name, rtems_device_major_number major, rtems_device_minor_number minor ) { 42290: 4e56 0000 linkw %fp,#0 ) { union __rtems_dev_t temp; temp.__overlay.major = _major; temp.__overlay.minor = _minor; 42294: 222e 0010 movel %fp@(16),%d1 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 42298: 202e 000c movel %fp@(12),%d0 int status; dev_t dev; dev = rtems_filesystem_make_dev_t( major, minor ); status = mknod( device_name, 0777 | S_IFCHR, dev ); 4229c: 2f01 movel %d1,%sp@- 4229e: 2f00 movel %d0,%sp@- 422a0: 4878 21ff pea 21ff 422a4: 2f2e 0008 movel %fp@(8),%sp@- 422a8: 4eb9 0004 2be4 jsr 42be4 /* this is the only error returned by the old version */ if ( status ) 422ae: 4fef 0010 lea %sp@(16),%sp 422b2: 4a80 tstl %d0 422b4: 6704 beqs 422ba <== ALWAYS TAKEN return RTEMS_TOO_MANY; 422b6: 7005 moveq #5,%d0 <== NOT EXECUTED 422b8: 6002 bras 422bc <== NOT EXECUTED return RTEMS_SUCCESSFUL; 422ba: 4280 clrl %d0 } 422bc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047c74 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 47c74: 4e56 fff0 linkw %fp,#-16 47c78: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 47c7c: 286e 0008 moveal %fp@(8),%a4 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 47c80: 4a8c tstl %a4 47c82: 673c beqs 47cc0 <== NEVER TAKEN 47c84: 45f9 0006 64dc lea 664dc <_Objects_Information_table+0x4>,%a2 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 47c8a: 205a moveal %a2@+,%a0 47c8c: 4a88 tstl %a0 47c8e: 6728 beqs 47cb8 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 47c90: 2668 0004 moveal %a0@(4),%a3 if ( !information ) 47c94: 4a8b tstl %a3 47c96: 6720 beqs 47cb8 47c98: 7401 moveq #1,%d2 47c9a: 6012 bras 47cae continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 47c9c: 206b 0018 moveal %a3@(24),%a0 47ca0: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !the_thread ) 47ca4: 6706 beqs 47cac <== NEVER TAKEN continue; (*routine)(the_thread); 47ca6: 2f00 movel %d0,%sp@- 47ca8: 4e94 jsr %a4@ 47caa: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 47cac: 5282 addql #1,%d2 47cae: 4280 clrl %d0 47cb0: 302b 000e movew %a3@(14),%d0 47cb4: b082 cmpl %d2,%d0 47cb6: 64e4 bccs 47c9c Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 47cb8: b5fc 0006 64e8 cmpal #419048,%a2 47cbe: 66ca bnes 47c8a (*routine)(the_thread); } } } 47cc0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 47cc6: 4e5e unlk %fp ... =============================================================================== 0004993e : */ void rtems_libio_free( rtems_libio_t *iop ) { 4993e: 4e56 0000 linkw %fp,#0 49942: 2f0a movel %a2,%sp@- 49944: 246e 0008 moveal %fp@(8),%a2 rtems_libio_lock(); 49948: 4eba fea2 jsr %pc@(497ec ) if (iop->sem) 4994c: 202a 002c movel %a2@(44),%d0 49950: 670a beqs 4995c <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 49952: 2f00 movel %d0,%sp@- 49954: 4eb9 0004 56d4 jsr 456d4 4995a: 588f addql #4,%sp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 4995c: 41f9 0005 c46c lea 5c46c ,%a0 rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 49962: 203c ffff feff movel #-257,%d0 iop->data1 = rtems_libio_iop_freelist; 49968: 2550 0034 movel %a0@,%a2@(52) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4996c: c1aa 0014 andl %d0,%a2@(20) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 49970: 23ca 0005 c46c movel %a2,5c46c rtems_libio_unlock(); } 49976: 246e fffc moveal %fp@(-4),%a2 4997a: 4e5e unlk %fp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; rtems_libio_unlock(); 4997c: 6000 fe8a braw 49808 =============================================================================== 0004293c : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 4293c: 4e56 0000 linkw %fp,#0 42940: 2f02 movel %d2,%sp@- rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 42942: 2439 0005 ade4 movel 5ade4 ,%d2 42948: 6744 beqs 4298e <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 4294a: 4878 0038 pea 38 4294e: 2f02 movel %d2,%sp@- 42950: 4eb9 0004 2444 jsr 42444 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42956: 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, 42958: 23c0 0005 c468 movel %d0,5c468 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 4295e: 6606 bnes 42966 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 42960: 4878 001a pea 1a 42964: 604e bras 429b4 iop = rtems_libio_iop_freelist = rtems_libio_iops; 42966: 23c0 0005 c46c movel %d0,5c46c 4296c: 2040 moveal %d0,%a0 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 4296e: 4281 clrl %d1 42970: 6004 bras 42976 iop->data1 = iop + 1; 42972: 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++) 42976: 5281 addql #1,%d1 42978: 41e8 0038 lea %a0@(56),%a0 4297c: b481 cmpl %d1,%d2 4297e: 62f2 bhis 42972 iop->data1 = iop + 1; iop->data1 = NULL; 42980: 2202 movel %d2,%d1 42982: 2040 moveal %d0,%a0 42984: e789 lsll #3,%d1 42986: ed8a lsll #6,%d2 42988: 9481 subl %d1,%d2 4298a: 42b0 28fc clrl %a0@(fffffffc,%d2:l) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 4298e: 4879 0005 c470 pea 5c470 42994: 42a7 clrl %sp@- 42996: 4878 0054 pea 54 4299a: 4878 0001 pea 1 4299e: 2f3c 4c42 494f movel #1279412559,%sp@- 429a4: 4eb9 0004 5538 jsr 45538 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 429aa: 4fef 0014 lea %sp@(20),%sp 429ae: 4a80 tstl %d0 429b0: 6708 beqs 429ba <== ALWAYS TAKEN rtems_fatal_error_occurred( rc ); 429b2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 429b4: 4eb9 0004 5df8 jsr 45df8 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 429ba: 2279 0005 ade0 moveal 5ade0 ,%a1 429c0: 4a89 tstl %a1 429c2: 6708 beqs 429cc <== NEVER TAKEN (* rtems_fs_init_helper)(); } 429c4: 242e fffc movel %fp@(-4),%d2 429c8: 4e5e unlk %fp /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 429ca: 4ed1 jmp %a1@ } 429cc: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 429d0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043ac8 : rtems_status_code rtems_libio_set_private_env(void) { 43ac8: 4e56 ffd8 linkw %fp,#-40 43acc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 43ad0: 486e fffc pea %fp@(-4) 43ad4: 42a7 clrl %sp@- 43ad6: 42a7 clrl %sp@- 43ad8: 4eb9 0004 62f0 jsr 462f0 if (sc != RTEMS_SUCCESSFUL) return sc; 43ade: 4fef 000c lea %sp@(12),%sp { rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 43ae2: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) return sc; 43ae4: 6600 00da bnew 43bc0 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 43ae8: 203c 0005 cbd8 movel #379864,%d0 43aee: b0b9 0005 b618 cmpl 5b618 ,%d0 43af4: 6644 bnes 43b3a rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 43af6: 4878 0048 pea 48 43afa: 4eb9 0004 30a4 jsr 430a4 if (!tmp) 43b00: 588f addql #4,%sp sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 43b02: 2600 movel %d0,%d3 if (!tmp) 43b04: 6700 00b8 beqw 43bbe #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add( 43b08: 487a ff76 pea %pc@(43a80 ) 43b0c: 4879 0005 b618 pea 5b618 43b12: 42a7 clrl %sp@- 43b14: 4eb9 0004 6468 jsr 46468 RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) { 43b1a: 4fef 000c lea %sp@(12),%sp #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add( 43b1e: 2440 moveal %d0,%a2 RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) { 43b20: 4a80 tstl %d0 43b22: 6710 beqs 43b34 <== ALWAYS TAKEN /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 43b24: 2f03 movel %d3,%sp@- <== NOT EXECUTED return sc; 43b26: 240a movel %a2,%d2 <== NOT EXECUTED ); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 43b28: 4eb9 0004 2b7c jsr 42b7c <== NOT EXECUTED return sc; 43b2e: 588f addql #4,%sp <== NOT EXECUTED 43b30: 6000 008e braw 43bc0 <== NOT EXECUTED } rtems_current_user_env = tmp; 43b34: 23c3 0005 b618 movel %d3,5b618 } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 43b3a: 4878 0048 pea 48 43b3e: 45f9 0004 cd20 lea 4cd20 ,%a2 43b44: 4879 0005 cbd8 pea 5cbd8 * what we are trying to do here is forking off * clones. The reason is a pathloc can be allocated by the * file system and needs to be freed when deleting the environment. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 43b4a: 260e movel %fp,%d3 43b4c: 0683 ffff ffe8 addil #-24,%d3 return sc; } rtems_current_user_env = tmp; } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 43b52: 2679 0005 b618 moveal 5b618 ,%a3 43b58: 2f0b movel %a3,%sp@- 43b5a: 4e92 jsr %a2@ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 43b5c: 26ae fffc movel %fp@(-4),%a3@ * what we are trying to do here is forking off * clones. The reason is a pathloc can be allocated by the * file system and needs to be freed when deleting the environment. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 43b60: 47f9 0004 2a72 lea 42a72 ,%a3 43b66: 42a7 clrl %sp@- 43b68: 2f03 movel %d3,%sp@- 43b6a: 42a7 clrl %sp@- 43b6c: 4878 0001 pea 1 43b70: 4879 0005 a302 pea 5a302 43b76: 4e93 jsr %a3@ rtems_filesystem_root = loc; 43b78: 4fef 0020 lea %sp@(32),%sp 43b7c: 4878 0014 pea 14 43b80: 2079 0005 b618 moveal 5b618 ,%a0 43b86: 41e8 0018 lea %a0@(24),%a0 43b8a: 2f03 movel %d3,%sp@- 43b8c: 2f08 movel %a0,%sp@- 43b8e: 4e92 jsr %a2@ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 43b90: 42a7 clrl %sp@- 43b92: 2f03 movel %d3,%sp@- 43b94: 42a7 clrl %sp@- 43b96: 4878 0001 pea 1 43b9a: 4879 0005 a302 pea 5a302 43ba0: 4e93 jsr %a3@ rtems_filesystem_current = loc; 43ba2: 4fef 0020 lea %sp@(32),%sp 43ba6: 4878 0014 pea 14 43baa: 2039 0005 b618 movel 5b618 ,%d0 43bb0: 5880 addql #4,%d0 43bb2: 2f03 movel %d3,%sp@- 43bb4: 2f00 movel %d0,%sp@- 43bb6: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 43bb8: 4fef 000c lea %sp@(12),%sp 43bbc: 6002 bras 43bc0 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); if (!tmp) return RTEMS_NO_MEMORY; 43bbe: 741a moveq #26,%d2 <== NOT EXECUTED rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 43bc0: 2002 movel %d2,%d0 43bc2: 4cee 0c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a3 43bc8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043bcc : * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 43bcc: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 43bd0: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 43bd2: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 43bd6: 42a7 clrl %sp@- <== NOT EXECUTED 43bd8: 42a7 clrl %sp@- <== NOT EXECUTED 43bda: 4eb9 0004 62f0 jsr 462f0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 43be0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43be4: 4a80 tstl %d0 <== NOT EXECUTED 43be6: 667a bnes 43c62 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 43be8: 2479 0005 b618 moveal 5b618 ,%a2 <== NOT EXECUTED 43bee: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 43bf2: b092 cmpl %a2@,%d0 <== NOT EXECUTED 43bf4: 661e bnes 43c14 <== NOT EXECUTED /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 43bf6: 4879 0005 b618 pea 5b618 <== NOT EXECUTED 43bfc: 42a7 clrl %sp@- <== NOT EXECUTED 43bfe: 4eb9 0004 64fc jsr 464fc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 43c04: 508f addql #8,%sp <== NOT EXECUTED 43c06: 4a80 tstl %d0 <== NOT EXECUTED 43c08: 6658 bnes 43c62 <== NOT EXECUTED free_user_env(tmp); 43c0a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43c0c: 4eba fe72 jsr %pc@(43a80 ) <== NOT EXECUTED 43c10: 588f addql #4,%sp <== NOT EXECUTED 43c12: 601c bras 43c30 <== NOT EXECUTED } else { sc = rtems_task_variable_get( 43c14: 486e fffc pea %fp@(-4) <== NOT EXECUTED 43c18: 4879 0005 b618 pea 5b618 <== NOT EXECUTED 43c1e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 43c22: 4eb9 0004 6570 jsr 46570 <== NOT EXECUTED task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 43c28: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43c2c: 4a80 tstl %d0 <== NOT EXECUTED 43c2e: 6626 bnes 43c56 <== NOT EXECUTED goto bailout; } /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_add( 43c30: 487a fe4e pea %pc@(43a80 ) <== NOT EXECUTED 43c34: 4879 0005 b618 pea 5b618 <== NOT EXECUTED 43c3a: 42a7 clrl %sp@- <== NOT EXECUTED 43c3c: 4eb9 0004 6468 jsr 46468 <== NOT EXECUTED RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) 43c42: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43c46: 4a80 tstl %d0 <== NOT EXECUTED 43c48: 660c bnes 43c56 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 43c4a: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED 43c4e: 23d0 0005 b618 movel %a0@,5b618 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 43c54: 600c bras 43c62 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 43c56: 223c 0005 cbd8 movel #379864,%d1 <== NOT EXECUTED 43c5c: 23c1 0005 b618 movel %d1,5b618 <== NOT EXECUTED return sc; } 43c62: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 43c66: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004985e : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4985e: 7006 moveq #6,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 49860: 4e56 0000 linkw %fp,#0 49864: 222e 0008 movel %fp@(8),%d1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 49868: c081 andl %d1,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4986a: 2f02 movel %d2,%sp@- uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4986c: 7406 moveq #6,%d2 4986e: b480 cmpl %d0,%d2 49870: 6710 beqs 49882 <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 49872: 0801 0001 btst #1,%d1 49876: 660e bnes 49886 <== ALWAYS TAKEN ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 49878: 44c1 movew %d1,%ccr <== NOT EXECUTED 4987a: 57c0 seq %d0 <== NOT EXECUTED 4987c: 49c0 extbl %d0 <== NOT EXECUTED 4987e: 4480 negl %d0 <== NOT EXECUTED 49880: 6006 bras 49888 <== NOT EXECUTED 49882: 7002 moveq #2,%d0 <== NOT EXECUTED 49884: 6002 bras 49888 <== NOT EXECUTED } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { fcntl_flags |= O_RDONLY; 49886: 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 ) { 49888: 0801 0000 btst #0,%d1 4988c: 6704 beqs 49892 fcntl_flags |= O_NONBLOCK; 4988e: 08c0 000e bset #14,%d0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 49892: 0801 0009 btst #9,%d1 49896: 6704 beqs 4989c fcntl_flags |= O_APPEND; 49898: 7408 moveq #8,%d2 4989a: 8082 orl %d2,%d0 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 4989c: 0801 000a btst #10,%d1 498a0: 6704 beqs 498a6 fcntl_flags |= O_CREAT; 498a2: 08c0 0009 bset #9,%d0 } return fcntl_flags; } 498a6: 241f movel %sp@+,%d2 498a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046130 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 46130: 4e56 fffc linkw %fp,#-4 46134: 2f03 movel %d3,%sp@- 46136: 2f02 movel %d2,%sp@- uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 46138: 486e fffc pea %fp@(-4) 4613c: 2f2e 0008 movel %fp@(8),%sp@- 46140: 2f39 0005 fdc0 movel 5fdc0 ,%sp@- 46146: 4eb9 0004 b37c jsr 4b37c <_Protected_heap_Get_block_size> 4614c: 4fef 000c lea %sp@(12),%sp 46150: 4a00 tstb %d0 46152: 671a beqs 4616e <== NEVER TAKEN MSBUMP(lifetime_freed, size); 46154: 262e fffc movel %fp@(-4),%d3 46158: 4282 clrl %d2 4615a: d7b9 0006 1d64 addl %d3,61d64 46160: 2039 0006 1d60 movel 61d60 ,%d0 46166: d182 addxl %d2,%d0 46168: 23c0 0006 1d60 movel %d0,61d60 } } 4616e: 242e fff4 movel %fp@(-12),%d2 46172: 262e fff8 movel %fp@(-8),%d3 46176: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004617a : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 4617a: 4e56 fffc linkw %fp,#-4 4617e: 202e 0008 movel %fp@(8),%d0 46182: 2f03 movel %d3,%sp@- uintptr_t actual_size = 0; 46184: 42ae fffc clrl %fp@(-4) } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 46188: 2f02 movel %d2,%sp@- uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 4618a: 4a80 tstl %d0 4618c: 674c beqs 461da <== NEVER TAKEN return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 4618e: 486e fffc pea %fp@(-4) MSBUMP(lifetime_allocated, actual_size); 46192: 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); 46194: 2f00 movel %d0,%sp@- 46196: 2f39 0005 fdc0 movel 5fdc0 ,%sp@- 4619c: 4eb9 0004 b37c jsr 4b37c <_Protected_heap_Get_block_size> MSBUMP(lifetime_allocated, actual_size); 461a2: 262e fffc movel %fp@(-4),%d3 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 461a6: 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); 461aa: 2039 0006 1d58 movel 61d58 ,%d0 461b0: d6b9 0006 1d5c addl 61d5c ,%d3 461b6: d580 addxl %d0,%d2 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 461b8: 2003 movel %d3,%d0 461ba: 90b9 0006 1d64 subl 61d64 ,%d0 if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 461c0: 23c2 0006 1d58 movel %d2,61d58 461c6: 23c3 0006 1d5c movel %d3,61d5c current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 461cc: b0b9 0006 1d54 cmpl 61d54 ,%d0 461d2: 6306 blss 461da s->max_depth = current_depth; 461d4: 23c0 0006 1d54 movel %d0,61d54 } 461da: 242e fff4 movel %fp@(-12),%d2 461de: 262e fff8 movel %fp@(-8),%d3 461e2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d1ac : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 4d1ac: 4e56 0000 linkw %fp,#0 4d1b0: 2f0a movel %a2,%sp@- 4d1b2: 246e 0008 moveal %fp@(8),%a2 4d1b6: 2f02 movel %d2,%sp@- void *return_this; /* * Parameter error checks */ if ( !pointer ) 4d1b8: 4a8a tstl %a2 4d1ba: 6754 beqs 4d210 return EINVAL; *pointer = NULL; 4d1bc: 4292 clrl %a2@ /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4d1be: 7003 moveq #3,%d0 4d1c0: b0b9 0005 fdd0 cmpl 5fdd0 <_System_state_Current>,%d0 4d1c6: 660a bnes 4d1d2 <== NEVER TAKEN !malloc_is_system_state_OK() ) 4d1c8: 4eb9 0004 3688 jsr 43688 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4d1ce: 4a00 tstb %d0 4d1d0: 673e beqs 4d210 <== NEVER TAKEN return EINVAL; /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4d1d2: 4eb9 0004 36c6 jsr 436c6 Heap_Control *heap, uintptr_t size, uintptr_t alignment ) { return 4d1d8: 42a7 clrl %sp@- 4d1da: 2f2e 000c movel %fp@(12),%sp@- 4d1de: 2f2e 0010 movel %fp@(16),%sp@- 4d1e2: 2f39 0005 e3e0 movel 5e3e0 ,%sp@- 4d1e8: 4eb9 0004 7fe8 jsr 47fe8 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 4d1ee: 4fef 0010 lea %sp@(16),%sp 4d1f2: 2400 movel %d0,%d2 4d1f4: 671e beqs 4d214 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 4d1f6: 2079 0005 ea46 moveal 5ea46 ,%a0 4d1fc: 4a88 tstl %a0 4d1fe: 670a beqs 4d20a (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 4d200: 2f0a movel %a2,%sp@- 4d202: 2068 0004 moveal %a0@(4),%a0 4d206: 4e90 jsr %a0@ 4d208: 588f addql #4,%sp *pointer = return_this; 4d20a: 2482 movel %d2,%a2@ return 0; 4d20c: 4280 clrl %d0 4d20e: 6006 bras 4d216 /* * 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; 4d210: 7016 moveq #22,%d0 4d212: 6002 bras 4d216 RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) return ENOMEM; 4d214: 700c moveq #12,%d0 if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(pointer); *pointer = return_this; return 0; } 4d216: 242e fff8 movel %fp@(-8),%d2 4d21a: 246e fffc moveal %fp@(-4),%a2 4d21e: 4e5e unlk %fp ... =============================================================================== 0004bb40 : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { 4bb40: 4e56 ff90 linkw %fp,#-112 4bb44: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ int success = 0; char *dup_path = strdup(path); 4bb48: 2f2e 0008 movel %fp@(8),%sp@- 4bb4c: 4eb9 0004 e0e4 jsr 4e0e4 if (dup_path != NULL) { 4bb52: 588f addql #4,%sp int rtems_mkdir(const char *path, mode_t mode) { int success = 0; char *dup_path = strdup(path); 4bb54: 2440 moveal %d0,%a2 if (dup_path != NULL) { 4bb56: 4a80 tstl %d0 4bb58: 6700 0122 beqw 4bc7c char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 4bb5c: 722f moveq #47,%d1 4bb5e: 1012 moveb %a2@,%d0 4bb60: 49c0 extbl %d0 4bb62: b280 cmpl %d0,%d1 4bb64: 6606 bnes 4bb6c ++p; 4bb66: 47ea 0001 lea %a2@(1),%a3 4bb6a: 6002 bras 4bb6e char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 4bb6c: 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) { 4bb6e: 2c0e movel %fp,%d6 p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; 4bb70: 2a4b moveal %a3,%a5 char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 4bb72: 4283 clrl %d3 4bb74: 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) { 4bb76: 2e3c 0004 3d90 movel #277904,%d7 if (errno == EEXIST || errno == EISDIR) { 4bb7c: 283c 0004 d134 movel #315700,%d4 if (stat(path, &sb) < 0) { 4bb82: 0686 ffff ffba addil #-70,%d6 4bb88: 2a3c 0004 bc98 movel #310424,%d5 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) (void)umask(oumask); 4bb8e: 49f9 0004 bd3c lea 4bd3c ,%a4 oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') 4bb94: 121d moveb %a5@+,%d1 4bb96: 670e beqs 4bba6 last = 1; else if (p[0] != '/') 4bb98: 49c1 extbl %d1 4bb9a: 742f moveq #47,%d2 4bb9c: b481 cmpl %d1,%d2 4bb9e: 6600 00b8 bnew 4bc58 4bba2: 4281 clrl %d1 4bba4: 6002 bras 4bba8 retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; 4bba6: 7201 moveq #1,%d1 else if (p[0] != '/') continue; *p = '\0'; 4bba8: 4213 clrb %a3@ if (!last && p[1] == '\0') 4bbaa: 4a81 tstl %d1 4bbac: 660a bnes 4bbb8 4bbae: 4a15 tstb %a5@ 4bbb0: 57c2 seq %d2 4bbb2: 49c2 extbl %d2 4bbb4: 4482 negl %d2 4bbb6: 6002 bras 4bbba 4bbb8: 7401 moveq #1,%d2 last = 1; if (first) { 4bbba: 4a80 tstl %d0 4bbbc: 6712 beqs 4bbd0 * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); 4bbbe: 42a7 clrl %sp@- 4bbc0: 4e94 jsr %a4@ 4bbc2: 2600 movel %d0,%d3 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); 4bbc4: 0280 ffff ff3f andil #-193,%d0 4bbca: 2f00 movel %d0,%sp@- 4bbcc: 4e94 jsr %a4@ 4bbce: 508f addql #8,%sp first = 0; } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 4bbd0: 203c 0000 01ff movel #511,%d0 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) 4bbd6: 4a82 tstl %d2 4bbd8: 670a beqs 4bbe4 (void)umask(oumask); 4bbda: 2f03 movel %d3,%sp@- 4bbdc: 4e94 jsr %a4@ if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 4bbde: 202e 000c movel %fp@(12),%d0 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) (void)umask(oumask); 4bbe2: 588f addql #4,%sp if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 4bbe4: 2f00 movel %d0,%sp@- 4bbe6: 2047 moveal %d7,%a0 4bbe8: 2f0a movel %a2,%sp@- 4bbea: 4e90 jsr %a0@ 4bbec: 508f addql #8,%sp 4bbee: 4a80 tstl %d0 4bbf0: 6c5c bges 4bc4e if (errno == EEXIST || errno == EISDIR) { 4bbf2: 2044 moveal %d4,%a0 4bbf4: 4e90 jsr %a0@ 4bbf6: 7211 moveq #17,%d1 4bbf8: 2040 moveal %d0,%a0 4bbfa: b290 cmpl %a0@,%d1 4bbfc: 670c beqs 4bc0a <== ALWAYS TAKEN 4bbfe: 2044 moveal %d4,%a0 <== NOT EXECUTED 4bc00: 4e90 jsr %a0@ <== NOT EXECUTED 4bc02: 7215 moveq #21,%d1 <== NOT EXECUTED 4bc04: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bc06: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4bc08: 667e bnes 4bc88 <== NOT EXECUTED if (stat(path, &sb) < 0) { 4bc0a: 2f06 movel %d6,%sp@- 4bc0c: 2045 moveal %d5,%a0 4bc0e: 2f0a movel %a2,%sp@- 4bc10: 4e90 jsr %a0@ 4bc12: 508f addql #8,%sp 4bc14: 4a80 tstl %d0 4bc16: 6d70 blts 4bc88 <== NEVER TAKEN retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { 4bc18: 202e ffc6 movel %fp@(-58),%d0 4bc1c: 0280 0000 f000 andil #61440,%d0 4bc22: 0c80 0000 4000 cmpil #16384,%d0 4bc28: 671e beqs 4bc48 4bc2a: 41f9 0004 d134 lea 4d134 <__errno>,%a0 if (last) 4bc30: 4a82 tstl %d2 4bc32: 670a beqs 4bc3e <== NEVER TAKEN errno = EEXIST; 4bc34: 4e90 jsr %a0@ 4bc36: 7211 moveq #17,%d1 4bc38: 2040 moveal %d0,%a0 4bc3a: 2081 movel %d1,%a0@ 4bc3c: 602a bras 4bc68 else errno = ENOTDIR; 4bc3e: 4e90 jsr %a0@ <== NOT EXECUTED 4bc40: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bc42: 7014 moveq #20,%d0 <== NOT EXECUTED 4bc44: 2080 movel %d0,%a0@ <== NOT EXECUTED 4bc46: 6016 bras 4bc5e <== NOT EXECUTED retval = 0; break; } if (last) 4bc48: 4a82 tstl %d2 4bc4a: 6642 bnes 4bc8e 4bc4c: 6004 bras 4bc52 } else { retval = 0; break; } } if (!last) 4bc4e: 4a82 tstl %d2 4bc50: 6640 bnes 4bc92 *p = '/'; 4bc52: 4280 clrl %d0 4bc54: 16bc 002f moveb #47,%a3@ p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { 4bc58: 528b addql #1,%a3 4bc5a: 6000 ff38 braw 4bb94 } if (!last) *p = '/'; } if (!first && !last) (void)umask(oumask); 4bc5e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4bc60: 4eb9 0004 bd3c jsr 4bd3c <== NOT EXECUTED 4bc66: 588f addql #4,%sp <== NOT EXECUTED 4bc68: 4282 clrl %d2 int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); 4bc6a: 2f0a movel %a2,%sp@- 4bc6c: 4eb9 0004 37bc jsr 437bc } return success != 0 ? 0 : -1; 4bc72: 588f addql #4,%sp 4bc74: 4a82 tstl %d2 4bc76: 57c0 seq %d0 4bc78: 49c0 extbl %d0 4bc7a: 6002 bras 4bc7e 4bc7c: 70ff moveq #-1,%d0 <== NOT EXECUTED } 4bc7e: 4cee 3cfc ff90 moveml %fp@(-112),%d2-%d7/%a2-%a5 4bc84: 4e5e unlk %fp 4bc86: 4e75 rts } } if (!last) *p = '/'; } if (!first && !last) 4bc88: 4a82 tstl %d2 <== NOT EXECUTED 4bc8a: 67d2 beqs 4bc5e <== NOT EXECUTED 4bc8c: 60da bras 4bc68 <== NOT EXECUTED errno = ENOTDIR; retval = 0; break; } if (last) retval = 2; 4bc8e: 7402 moveq #2,%d2 4bc90: 60d8 bras 4bc6a } else { retval = 0; break; } } if (!last) 4bc92: 7401 moveq #1,%d2 4bc94: 60d4 bras 4bc6a ... =============================================================================== 00042656 : void rtems_panic( const char *printf_format, ... ) { 42656: 4e56 0000 linkw %fp,#0 va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 4265a: 486e 000c pea %fp@(12) 4265e: 2f2e 0008 movel %fp@(8),%sp@- 42662: 2f3c 2000 0000 movel #536870912,%sp@- 42668: 4eba fe3e jsr %pc@(424a8 ) va_end(arglist); rtems_error(0, "fatal error, exiting"); 4266c: 4879 0005 9c06 pea 59c06 42672: 42a7 clrl %sp@- 42674: 4eb9 0004 25f4 jsr 425f4 _exit(errno); 4267a: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 42680: 2040 moveal %d0,%a0 42682: 2f10 movel %a0@,%sp@- 42684: 4eb9 0004 2fe4 jsr 42fe4 <_exit> ... =============================================================================== 0004ffb4 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 4ffb4: 4e56 fffc linkw %fp,#-4 4ffb8: 2f0b movel %a3,%sp@- 4ffba: 2f0a movel %a2,%sp@- Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 4ffbc: 486e fffc pea %fp@(-4) 4ffc0: 2f2e 0008 movel %fp@(8),%sp@- 4ffc4: 4879 0007 4ee4 pea 74ee4 <_Partition_Information> 4ffca: 4eb9 0005 44ec jsr 544ec <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4ffd0: 4fef 000c lea %sp@(12),%sp 4ffd4: 2440 moveal %d0,%a2 4ffd6: 4aae fffc tstl %fp@(-4) 4ffda: 6638 bnes 50014 <== NEVER TAKEN 4ffdc: 47f9 0005 4d26 lea 54d26 <_Thread_Enable_dispatch>,%a3 case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 4ffe2: 4aaa 0020 tstl %a2@(32) 4ffe6: 6626 bnes 5000e <== NEVER TAKEN _Objects_Close( &_Partition_Information, &the_partition->Object ); 4ffe8: 2f00 movel %d0,%sp@- 4ffea: 4879 0007 4ee4 pea 74ee4 <_Partition_Information> 4fff0: 4eb9 0005 40e0 jsr 540e0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 4fff6: 2f0a movel %a2,%sp@- 4fff8: 4879 0007 4ee4 pea 74ee4 <_Partition_Information> 4fffe: 4eb9 0005 4358 jsr 54358 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 50004: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 50006: 4fef 0010 lea %sp@(16),%sp 5000a: 4280 clrl %d0 5000c: 6008 bras 50016 } _Thread_Enable_dispatch(); 5000e: 4e93 jsr %a3@ return RTEMS_RESOURCE_IN_USE; 50010: 700c moveq #12,%d0 50012: 6002 bras 50016 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 50014: 7004 moveq #4,%d0 } 50016: 246e fff4 moveal %fp@(-12),%a2 5001a: 266e fff8 moveal %fp@(-8),%a3 5001e: 4e5e unlk %fp ... =============================================================================== 000500b8 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 500b8: 4e56 fffc linkw %fp,#-4 500bc: 2f0a movel %a2,%sp@- 500be: 2f02 movel %d2,%sp@- Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 500c0: 486e fffc pea %fp@(-4) 500c4: 2f2e 0008 movel %fp@(8),%sp@- 500c8: 4879 0007 4ee4 pea 74ee4 <_Partition_Information> 500ce: 242e 000c movel %fp@(12),%d2 500d2: 4eb9 0005 44ec jsr 544ec <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 500d8: 4fef 000c lea %sp@(12),%sp 500dc: 2440 moveal %d0,%a2 500de: 4aae fffc tstl %fp@(-4) 500e2: 663e bnes 50122 ) { void *starting; void *ending; starting = the_partition->starting_address; 500e4: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 500e8: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 500ec: b082 cmpl %d2,%d0 500ee: 6240 bhis 50130 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 500f0: d280 addl %d0,%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 500f2: b282 cmpl %d2,%d1 500f4: 653a bcss 50130 <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 500f6: 2202 movel %d2,%d1 500f8: 9280 subl %d0,%d1 500fa: 2001 movel %d1,%d0 offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 500fc: 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 ) && 50102: 4a81 tstl %d1 50104: 662a bnes 50130 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 50106: 2f02 movel %d2,%sp@- 50108: 486a 0024 pea %a2@(36) 5010c: 4eb9 0005 2c08 jsr 52c08 <_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; 50112: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 50116: 4eb9 0005 4d26 jsr 54d26 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5011c: 508f addql #8,%sp 5011e: 4280 clrl %d0 50120: 6002 bras 50124 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 50122: 7004 moveq #4,%d0 } 50124: 242e fff4 movel %fp@(-12),%d2 50128: 246e fff8 moveal %fp@(-8),%a2 5012c: 4e5e unlk %fp 5012e: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 50130: 4eb9 0005 4d26 jsr 54d26 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 50136: 7009 moveq #9,%d0 50138: 60ea bras 50124 ... =============================================================================== 00042396 : void rtems_print_buffer( const unsigned char *buffer, int length ) { 42396: 4e56 ffec linkw %fp,#-20 4239a: 202e 000c movel %fp@(12),%d0 4239e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 423a2: 246e 0008 moveal %fp@(8),%a2 int i, mod, max; if ( !length ) return; 423a6: 4a80 tstl %d0 423a8: 674e beqs 423f8 mod = length % 16; 423aa: 2400 movel %d0,%d2 423ac: 0282 8000 000f andil #-2147483633,%d2 423b2: 6c08 bges 423bc <== ALWAYS TAKEN 423b4: 5382 subql #1,%d2 <== NOT EXECUTED 423b6: 72f0 moveq #-16,%d1 <== NOT EXECUTED 423b8: 8481 orl %d1,%d2 <== NOT EXECUTED 423ba: 5282 addql #1,%d2 <== NOT EXECUTED max = length - mod; 423bc: 2800 movel %d0,%d4 423be: 9882 subl %d2,%d4 for ( i=0 ; i),%a3 mod = length % 16; max = length - mod; for ( i=0 ; i Dump_Line( &buffer[ i ], 16 ); 423c8: 4878 0010 pea 10 423cc: 4872 3800 pea %a2@(00000000,%d3:l) mod = length % 16; max = length - mod; for ( i=0 ; i Dump_Line( &buffer[ i ], 16 ); if ( mod ) 423de: 4a82 tstl %d2 423e0: 6716 beqs 423f8 Dump_Line( &buffer[ max ], mod ); 423e2: d5c4 addal %d4,%a2 423e4: 2d42 000c movel %d2,%fp@(12) 423e8: 2d4a 0008 movel %a2,%fp@(8) } 423ec: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 423f2: 4e5e unlk %fp for ( i=0 ; i } 423f8: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 423fe: 4e5e unlk %fp ... =============================================================================== 0004b54c : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 4b54c: 4e56 ffec linkw %fp,#-20 4b550: 2f0a movel %a2,%sp@- 4b552: 246e 000c moveal %fp@(12),%a2 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 4b556: 4a8a tstl %a2 4b558: 6700 0092 beqw 4b5ec 4b55c: 486e fffc pea %fp@(-4) 4b560: 2f2e 0008 movel %fp@(8),%sp@- 4b564: 4879 0005 e140 pea 5e140 <_Rate_monotonic_Information> 4b56a: 4eb9 0004 8400 jsr 48400 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4b570: 4fef 000c lea %sp@(12),%sp 4b574: 2040 moveal %d0,%a0 4b576: 4aae fffc tstl %fp@(-4) 4b57a: 6674 bnes 4b5f0 <== NEVER TAKEN case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 4b57c: 2268 0040 moveal %a0@(64),%a1 4b580: 24a9 0008 movel %a1@(8),%a2@ status->state = the_period->state; 4b584: 2028 0038 movel %a0@(56),%d0 4b588: 2540 0004 movel %d0,%a2@(4) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 4b58c: 6612 bnes 4b5a0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 4b58e: 42aa 0008 clrl %a2@(8) 4b592: 42aa 000c clrl %a2@(12) _Timespec_Set_to_zero( &status->executed_since_last_period ); 4b596: 42aa 0010 clrl %a2@(16) 4b59a: 42aa 0014 clrl %a2@(20) 4b59e: 6042 bras 4b5e2 } else { /* * Grab the current status. */ valid_status = 4b5a0: 486e fff4 pea %fp@(-12) 4b5a4: 486e ffec pea %fp@(-20) 4b5a8: 2f08 movel %a0,%sp@- 4b5aa: 4eb9 0004 6298 jsr 46298 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 4b5b0: 4fef 000c lea %sp@(12),%sp 4b5b4: 4a00 tstb %d0 4b5b6: 660a bnes 4b5c2 _Thread_Enable_dispatch(); 4b5b8: 4eb9 0004 8c3a jsr 48c3a <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 4b5be: 700b moveq #11,%d0 4b5c0: 6030 bras 4b5f2 } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 4b5c2: 202e ffec movel %fp@(-20),%d0 4b5c6: 222e fff0 movel %fp@(-16),%d1 4b5ca: 2540 0008 movel %d0,%a2@(8) 4b5ce: 2541 000c movel %d1,%a2@(12) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 4b5d2: 202e fff4 movel %fp@(-12),%d0 4b5d6: 222e fff8 movel %fp@(-8),%d1 4b5da: 2540 0010 movel %d0,%a2@(16) 4b5de: 2541 0014 movel %d1,%a2@(20) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 4b5e2: 4eb9 0004 8c3a jsr 48c3a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4b5e8: 4280 clrl %d0 4b5ea: 6006 bras 4b5f2 Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; 4b5ec: 7009 moveq #9,%d0 4b5ee: 6002 bras 4b5f2 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4b5f0: 7004 moveq #4,%d0 } 4b5f2: 246e ffe8 moveal %fp@(-24),%a2 4b5f6: 4e5e unlk %fp ... =============================================================================== 000464a2 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 464a2: 4e56 ffec linkw %fp,#-20 464a6: 48d7 041c moveml %d2-%d4/%a2,%sp@ Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 464aa: 486e fffc pea %fp@(-4) 464ae: 262e 0008 movel %fp@(8),%d3 464b2: 2f03 movel %d3,%sp@- 464b4: 4879 0005 e140 pea 5e140 <_Rate_monotonic_Information> 464ba: 242e 000c movel %fp@(12),%d2 464be: 4eb9 0004 8400 jsr 48400 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 464c4: 4fef 000c lea %sp@(12),%sp 464c8: 2440 moveal %d0,%a2 464ca: 4aae fffc tstl %fp@(-4) 464ce: 6600 0150 bnew 46620 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 464d2: 2039 0005 e3f8 movel 5e3f8 <_Per_CPU_Information+0xc>,%d0 464d8: b0aa 0040 cmpl %a2@(64),%d0 464dc: 670c beqs 464ea _Thread_Enable_dispatch(); 464de: 4eb9 0004 8c3a jsr 48c3a <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 464e4: 7417 moveq #23,%d2 464e6: 6000 013a braw 46622 } if ( length == RTEMS_PERIOD_STATUS ) { 464ea: 4a82 tstl %d2 464ec: 6622 bnes 46510 switch ( the_period->state ) { 464ee: 202a 0038 movel %a2@(56),%d0 464f2: 7204 moveq #4,%d1 464f4: b280 cmpl %d0,%d1 464f6: 650c bcss 46504 <== NEVER TAKEN 464f8: 41f9 0005 bb0a lea 5bb0a ,%a0 464fe: 2430 0c00 movel %a0@(00000000,%d0:l:4),%d2 46502: 6002 bras 46506 46504: 4282 clrl %d2 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 46506: 4eb9 0004 8c3a jsr 48c3a <_Thread_Enable_dispatch> return( return_value ); 4650c: 6000 0114 braw 46622 } _ISR_Disable( level ); 46510: 203c 0000 0700 movel #1792,%d0 46516: 40c4 movew %sr,%d4 46518: 8084 orl %d4,%d0 4651a: 46c0 movew %d0,%sr switch ( the_period->state ) { 4651c: 202a 0038 movel %a2@(56),%d0 46520: 7202 moveq #2,%d1 46522: b280 cmpl %d0,%d1 46524: 675a beqs 46580 46526: 123c 0004 moveb #4,%d1 4652a: b280 cmpl %d0,%d1 4652c: 6700 00bc beqw 465ea 46530: 4a80 tstl %d0 46532: 6600 00ec bnew 46620 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 46536: 46c4 movew %d4,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 46538: 2f0a movel %a2,%sp@- 4653a: 4eb9 0004 6336 jsr 46336 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 46540: 7002 moveq #2,%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46542: 223c 0004 686c movel #288876,%d1 46548: 2540 0038 movel %d0,%a2@(56) 4654c: 2541 002c movel %d1,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46550: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; 46554: 2543 0030 movel %d3,%a2@(48) the_watchdog->user_data = user_data; 46558: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 4655c: 2542 003c movel %d2,%a2@(60) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46560: 2542 001c movel %d2,%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 46564: 486a 0010 pea %a2@(16) 46568: 4879 0005 e2f6 pea 5e2f6 <_Watchdog_Ticks_chain> 4656e: 4eb9 0004 9c48 jsr 49c48 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 46574: 4eb9 0004 8c3a jsr 48c3a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4657a: 4fef 000c lea %sp@(12),%sp 4657e: 6066 bras 465e6 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 46580: 2f0a movel %a2,%sp@- 46582: 4eb9 0004 63ae jsr 463ae <_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; 46588: 7001 moveq #1,%d0 the_period->next_length = length; 4658a: 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; 4658e: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 46592: 46c4 movew %d4,%sr _Thread_Executing->Wait.id = the_period->Object.id; 46594: 2079 0005 e3f8 moveal 5e3f8 <_Per_CPU_Information+0xc>,%a0 4659a: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 465a0: 4878 4000 pea 4000 465a4: 2f08 movel %a0,%sp@- 465a6: 4eb9 0004 944c jsr 4944c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 465ac: 203c 0000 0700 movel #1792,%d0 465b2: 40c1 movew %sr,%d1 465b4: 8081 orl %d1,%d0 465b6: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 465b8: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 465ba: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 465be: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 465c2: 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 ) 465c4: 7203 moveq #3,%d1 465c6: 4fef 000c lea %sp@(12),%sp 465ca: b280 cmpl %d0,%d1 465cc: 6612 bnes 465e0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 465ce: 4878 4000 pea 4000 465d2: 2f39 0005 e3f8 movel 5e3f8 <_Per_CPU_Information+0xc>,%sp@- 465d8: 4eb9 0004 8894 jsr 48894 <_Thread_Clear_state> 465de: 508f addql #8,%sp _Thread_Enable_dispatch(); 465e0: 4eb9 0004 8c3a jsr 48c3a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 465e6: 4282 clrl %d2 465e8: 6038 bras 46622 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 465ea: 2f0a movel %a2,%sp@- 465ec: 4eb9 0004 63ae jsr 463ae <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 465f2: 46c4 movew %d4,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 465f4: 7002 moveq #2,%d0 the_period->next_length = length; 465f6: 2542 003c movel %d2,%a2@(60) */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 465fa: 2540 0038 movel %d0,%a2@(56) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 465fe: 2542 001c movel %d2,%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 46602: 486a 0010 pea %a2@(16) the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 46606: 7406 moveq #6,%d2 46608: 4879 0005 e2f6 pea 5e2f6 <_Watchdog_Ticks_chain> 4660e: 4eb9 0004 9c48 jsr 49c48 <_Watchdog_Insert> the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 46614: 4eb9 0004 8c3a jsr 48c3a <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 4661a: 4fef 000c lea %sp@(12),%sp 4661e: 6002 bras 46622 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 46620: 7404 moveq #4,%d2 } 46622: 2002 movel %d2,%d0 46624: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4662a: 4e5e unlk %fp ... =============================================================================== 00050cb0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 50cb0: 4e56 fffc linkw %fp,#-4 50cb4: 2f03 movel %d3,%sp@- 50cb6: 262e 0010 movel %fp@(16),%d3 50cba: 2f02 movel %d2,%sp@- 50cbc: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 50cc0: 6768 beqs 50d2a return RTEMS_INVALID_ADDRESS; if ( !size ) 50cc2: 4a83 tstl %d3 50cc4: 6764 beqs 50d2a return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 50cc6: 2f39 0007 50ea movel 750ea <_RTEMS_Allocator_Mutex>,%sp@- 50ccc: 4eb9 0005 2b74 jsr 52b74 <_API_Mutex_Lock> 50cd2: 486e fffc pea %fp@(-4) 50cd6: 2f2e 0008 movel %fp@(8),%sp@- 50cda: 4879 0007 4f54 pea 74f54 <_Region_Information> 50ce0: 4eb9 0005 44b4 jsr 544b4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 50ce6: 222e fffc movel %fp@(-4),%d1 50cea: 4fef 0010 lea %sp@(16),%sp 50cee: 6708 beqs 50cf8 <== NEVER TAKEN 50cf0: 7001 moveq #1,%d0 50cf2: b081 cmpl %d1,%d0 50cf4: 661a bnes 50d10 <== NEVER TAKEN 50cf6: 601c bras 50d14 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 50cf8: 2f03 movel %d3,%sp@- 50cfa: 2040 moveal %d0,%a0 50cfc: 2f02 movel %d2,%sp@- 50cfe: 4868 0068 pea %a0@(104) 50d02: 4eb9 0005 3f30 jsr 53f30 <_Heap_Size_of_alloc_area> 50d08: 4fef 000c lea %sp@(12),%sp 50d0c: 4a00 tstb %d0 50d0e: 6708 beqs 50d18 <== NEVER TAKEN void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 50d10: 4282 clrl %d2 50d12: 6006 bras 50d1a case OBJECTS_REMOTE: /* this error cannot be returned */ break; #endif case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; 50d14: 7404 moveq #4,%d2 50d16: 6002 bras 50d1a 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; 50d18: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 50d1a: 2f39 0007 50ea movel 750ea <_RTEMS_Allocator_Mutex>,%sp@- 50d20: 4eb9 0005 2bd4 jsr 52bd4 <_API_Mutex_Unlock> return return_status; 50d26: 588f addql #4,%sp 50d28: 6002 bras 50d2c if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 50d2a: 7409 moveq #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 50d2c: 2002 movel %d2,%d0 50d2e: 242e fff4 movel %fp@(-12),%d2 50d32: 262e fff8 movel %fp@(-8),%d3 50d36: 4e5e unlk %fp ... =============================================================================== 00051310 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 51310: 4e56 fffc linkw %fp,#-4 51314: 2f03 movel %d3,%sp@- 51316: 2f02 movel %d2,%sp@- 51318: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 5131c: 677a beqs 51398 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 5131e: 486e fffc pea %fp@(-4) 51322: 2f2e 0008 movel %fp@(8),%sp@- 51326: 4eb9 0005 4d4c jsr 54d4c <_Thread_Get> switch ( location ) { 5132c: 508f addql #8,%sp 5132e: 4aae fffc tstl %fp@(-4) 51332: 6668 bnes 5139c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 51334: 2240 moveal %d0,%a1 51336: 2069 0108 moveal %a1@(264),%a0 asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 5133a: 4aa8 000a tstl %a0@(10) 5133e: 674e beqs 5138e if ( asr->is_enabled ) { 51340: 4a28 0008 tstb %a0@(8) 51344: 672c beqs 51372 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 51346: 223c 0000 0700 movel #1792,%d1 5134c: 40c3 movew %sr,%d3 5134e: 8283 orl %d3,%d1 51350: 46c1 movew %d1,%sr *signal_set |= signals; 51352: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 51356: 46c3 movew %d3,%sr _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 51358: 4ab9 0007 5210 tstl 75210 <_Per_CPU_Information+0x8> 5135e: 6724 beqs 51384 51360: b0b9 0007 5214 cmpl 75214 <_Per_CPU_Information+0xc>,%d0 51366: 661c bnes 51384 <== NEVER TAKEN _Context_Switch_necessary = true; 51368: 7001 moveq #1,%d0 5136a: 13c0 0007 5220 moveb %d0,75220 <_Per_CPU_Information+0x18> 51370: 6012 bras 51384 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 51372: 203c 0000 0700 movel #1792,%d0 51378: 40c1 movew %sr,%d1 5137a: 8081 orl %d1,%d0 5137c: 46c0 movew %d0,%sr *signal_set |= signals; 5137e: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 51382: 46c1 movew %d1,%sr } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 51384: 4eb9 0005 4d26 jsr 54d26 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5138a: 4280 clrl %d0 5138c: 6010 bras 5139e } _Thread_Enable_dispatch(); 5138e: 4eb9 0005 4d26 jsr 54d26 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 51394: 700b moveq #11,%d0 51396: 6006 bras 5139e Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; 51398: 700a moveq #10,%d0 5139a: 6002 bras 5139e case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 5139c: 7004 moveq #4,%d0 } 5139e: 242e fff4 movel %fp@(-12),%d2 513a2: 262e fff8 movel %fp@(-8),%d3 513a6: 4e5e unlk %fp ... =============================================================================== 00041e1c : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 41e1c: 4e56 0000 linkw %fp,#0 41e20: 206e 0008 moveal %fp@(8),%a0 Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 41e24: 4aa8 0008 tstl %a0@(8) 41e28: 671c beqs 41e46 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 41e2a: 4878 0010 pea 10 41e2e: 4879 0005 c8ec pea 5c8ec 41e34: 2068 00c0 moveal %a0@(192),%a0 41e38: 5088 addql #8,%a0 41e3a: 2f08 movel %a0,%sp@- 41e3c: 4eb9 0004 c964 jsr 4c964 41e42: 4fef 000c lea %sp@(12),%sp } 41e46: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041df4 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 41df4: 4e56 0000 linkw %fp,#0 41df8: 206e 000c moveal %fp@(12),%a0 Stack_check_Initialize(); if (the_thread) 41dfc: 4a88 tstl %a0 41dfe: 6716 beqs 41e16 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 41e00: 2f28 00bc movel %a0@(188),%sp@- 41e04: 4878 00a5 pea a5 41e08: 2f28 00c0 movel %a0@(192),%sp@- 41e0c: 4eb9 0004 c9d4 jsr 4c9d4 41e12: 4fef 000c lea %sp@(12),%sp return true; } 41e16: 4e5e unlk %fp 41e18: 7001 moveq #1,%d0 <== NOT EXECUTED =============================================================================== 00041f58 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 41f58: 4e56 0000 linkw %fp,#0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 41f5c: 2079 0005 cc20 moveal 5cc20 <_Per_CPU_Information+0xc>,%a0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 41f62: 2028 00c0 movel %a0@(192),%d0 41f66: b08e cmpl %fp,%d0 41f68: 6208 bhis 41f72 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 41f6a: d0a8 00bc addl %a0@(188),%d0 41f6e: b08e cmpl %fp,%d0 41f70: 6410 bccs 41f82 <== ALWAYS TAKEN /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 41f72: 4878 0001 pea 1 <== NOT EXECUTED 41f76: 2f39 0005 cc20 movel 5cc20 <_Per_CPU_Information+0xc>,%sp@-<== NOT EXECUTED 41f7c: 4eb9 0004 1e4a jsr 41e4a <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 41f82: 4e5e unlk %fp 41f84: 4200 clrb %d0 <== NOT EXECUTED =============================================================================== 00041fee : void rtems_stack_checker_report_usage( void ) { 41fee: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 41ff2: 4879 0004 37a8 pea 437a8 <== NOT EXECUTED 41ff8: 42a7 clrl %sp@- <== NOT EXECUTED 41ffa: 4eb9 0004 1f88 jsr 41f88 <== NOT EXECUTED 42000: 508f addql #8,%sp <== NOT EXECUTED } 42002: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00041f88 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 41f88: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 41f8c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 41f8e: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 41f92: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41f94: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED if ( !print ) 41f98: 4a8a tstl %a2 <== NOT EXECUTED 41f9a: 6746 beqs 41fe2 <== NOT EXECUTED return; print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 41f9c: 4879 0005 9fa2 pea 59fa2 <== NOT EXECUTED ) { if ( !print ) return; print_context = context; 41fa2: 23c2 0005 c0e8 movel %d2,5c0e8 <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 41fa8: 2f02 movel %d2,%sp@- <== NOT EXECUTED { if ( !print ) return; print_context = context; print_handler = print; 41faa: 23ca 0005 c0ec movel %a2,5c0ec <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 41fb0: 4e92 jsr %a2@ <== NOT EXECUTED (*print)( context, 41fb2: 4879 0005 9fb9 pea 59fb9 <== NOT EXECUTED 41fb8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41fba: 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 ); 41fbc: 4879 0004 1d28 pea 41d28 <== NOT EXECUTED 41fc2: 4eb9 0004 6c14 jsr 46c14 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 41fc8: 4878 ffff pea ffffffff <== NOT EXECUTED 41fcc: 4eb9 0004 1d28 jsr 41d28 <== NOT EXECUTED #endif print_context = NULL; print_handler = NULL; 41fd2: 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; 41fd6: 42b9 0005 c0e8 clrl 5c0e8 <== NOT EXECUTED print_handler = NULL; 41fdc: 42b9 0005 c0ec clrl 5c0ec <== NOT EXECUTED } 41fe2: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 41fe6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 41fea: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041ef0 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 41ef0: 4e56 0000 linkw %fp,#0 41ef4: 2f0a movel %a2,%sp@- 41ef6: 246e 0008 moveal %fp@(8),%a2 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 41efa: 222a 00c0 movel %a2@(192),%d1 41efe: 5081 addql #8,%d1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 41f00: 202a 00c0 movel %a2@(192),%d0 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 41f04: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 41f06: b08e cmpl %fp,%d0 41f08: 620c bhis 41f16 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 41f0a: d0aa 00bc addl %a2@(188),%d0 } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 41f0e: b08e cmpl %fp,%d0 41f10: 54c2 scc %d2 41f12: 4482 negl %d2 41f14: 6002 bras 41f18 { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; 41f16: 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, 41f18: 4878 0010 pea 10 41f1c: 4879 0005 c8ec pea 5c8ec 41f22: 2f01 movel %d1,%sp@- 41f24: 4eb9 0004 c8e4 jsr 4c8e4 41f2a: 4fef 000c lea %sp@(12),%sp 41f2e: 4a80 tstl %d0 41f30: 57c0 seq %d0 41f32: 4480 negl %d0 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 41f34: 4a02 tstb %d2 41f36: 6704 beqs 41f3c <== NEVER TAKEN 41f38: 4a00 tstb %d0 41f3a: 6610 bnes 41f4c <== ALWAYS TAKEN Stack_check_report_blown_task( running, pattern_ok ); 41f3c: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 41f42: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41f44: 2f0a movel %a2,%sp@- <== NOT EXECUTED 41f46: 4eb9 0004 1e4a jsr 41e4a <== NOT EXECUTED } } 41f4c: 242e fff8 movel %fp@(-8),%d2 41f50: 246e fffc moveal %fp@(-4),%a2 41f54: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b578 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b578: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4b57c: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 4b580: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED 4b584: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4b588: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b58c: 4a8a tstl %a2 <== NOT EXECUTED 4b58e: 6768 beqs 4b5f8 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 4b590: 4eb9 0004 d67c jsr 4d67c <__errno> <== NOT EXECUTED *n = 0; 4b596: 4281 clrl %d1 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b598: 2040 moveal %d0,%a0 <== NOT EXECUTED *n = 0; 4b59a: 4280 clrl %d0 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b59c: 4290 clrl %a0@ <== NOT EXECUTED *n = 0; 4b59e: 2480 movel %d0,%a2@ <== NOT EXECUTED 4b5a0: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b5a4: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b5a8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4b5aa: 4eb9 0005 0072 jsr 50072 <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b5b0: 508f addql #8,%sp <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b5b2: 2400 movel %d0,%d2 <== NOT EXECUTED 4b5b4: 2601 movel %d1,%d3 <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b5b6: 4a8b tstl %a3 <== NOT EXECUTED 4b5b8: 6704 beqs 4b5be <== NOT EXECUTED *endptr = end; 4b5ba: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED /* nothing was converted */ if ( end == s ) 4b5be: b8ae fffc cmpl %fp@(-4),%d4 <== NOT EXECUTED 4b5c2: 6738 beqs 4b5fc <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b5c4: 4878 ffff pea ffffffff <== NOT EXECUTED 4b5c8: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4b5ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b5d0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b5d2: 4eb9 0005 b080 jsr 5b080 <__gtdf2> <== NOT EXECUTED 4b5d8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b5dc: 4a80 tstl %d0 <== NOT EXECUTED 4b5de: 6f0e bles 4b5ee <== NOT EXECUTED 4b5e0: 4eb9 0004 d67c jsr 4d67c <__errno> <== NOT EXECUTED 4b5e6: 7222 moveq #34,%d1 <== NOT EXECUTED 4b5e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b5ea: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b5ec: 6712 beqs 4b600 <== NOT EXECUTED #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b5ee: 2482 movel %d2,%a2@ <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; 4b5f0: 4280 clrl %d0 <== NOT EXECUTED #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b5f2: 2543 0004 movel %d3,%a2@(4) <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; 4b5f6: 600a bras 4b602 <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4b5f8: 7009 moveq #9,%d0 <== NOT EXECUTED 4b5fa: 6006 bras 4b602 <== NOT EXECUTED if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 4b5fc: 700b moveq #11,%d0 <== NOT EXECUTED 4b5fe: 6002 bras 4b602 <== NOT EXECUTED #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; 4b600: 700a moveq #10,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4b602: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4b608: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b60c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b60c: 4e56 ffec linkw %fp,#-20 4b610: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b614: 262e 0008 movel %fp@(8),%d3 4b618: 246e 000c moveal %fp@(12),%a2 4b61c: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b620: 4a8a tstl %a2 4b622: 6756 beqs 4b67a return RTEMS_INVALID_ADDRESS; errno = 0; 4b624: 4eb9 0004 d67c jsr 4d67c <__errno> 4b62a: 2040 moveal %d0,%a0 4b62c: 4290 clrl %a0@ *n = 0; 4b62e: 24bc 0000 0000 movel #0,%a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b634: 486e fffc pea %fp@(-4) 4b638: 2f03 movel %d3,%sp@- 4b63a: 4eb9 0005 0092 jsr 50092 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b640: 508f addql #8,%sp errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b642: 2400 movel %d0,%d2 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b644: 4a8b tstl %a3 4b646: 6704 beqs 4b64c *endptr = end; 4b648: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b64c: b6ae fffc cmpl %fp@(-4),%d3 4b650: 672c beqs 4b67e return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b652: 2f3c 7f7f ffff movel #2139095039,%sp@- 4b658: 2f02 movel %d2,%sp@- 4b65a: 4eb9 0005 b110 jsr 5b110 <__gtsf2> 4b660: 508f addql #8,%sp 4b662: 4a80 tstl %d0 4b664: 6f0e bles 4b674 <== ALWAYS TAKEN 4b666: 4eb9 0004 d67c jsr 4d67c <__errno> <== NOT EXECUTED 4b66c: 7222 moveq #34,%d1 <== NOT EXECUTED 4b66e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b670: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b672: 670e beqs 4b682 <== NOT EXECUTED #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b674: 2482 movel %d2,%a2@ #endif return RTEMS_SUCCESSFUL; 4b676: 4280 clrl %d0 4b678: 600a bras 4b684 { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4b67a: 7009 moveq #9,%d0 4b67c: 6006 bras 4b684 if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 4b67e: 700b moveq #11,%d0 4b680: 6002 bras 4b684 #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; 4b682: 700a moveq #10,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4b684: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b68a: 4e5e unlk %fp ... =============================================================================== 0004b690 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b690: 4e56 ffec linkw %fp,#-20 4b694: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b698: 262e 0008 movel %fp@(8),%d3 4b69c: 246e 000c moveal %fp@(12),%a2 4b6a0: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b6a4: 4a8a tstl %a2 4b6a6: 674c beqs 4b6f4 return RTEMS_INVALID_ADDRESS; errno = 0; 4b6a8: 4eb9 0004 d67c jsr 4d67c <__errno> 4b6ae: 2040 moveal %d0,%a0 4b6b0: 4290 clrl %a0@ *n = 0; 4b6b2: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b6b4: 2f2e 0014 movel %fp@(20),%sp@- 4b6b8: 486e fffc pea %fp@(-4) 4b6bc: 2f03 movel %d3,%sp@- 4b6be: 4eb9 0005 0248 jsr 50248 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b6c4: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b6c8: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b6ca: 4a8b tstl %a3 4b6cc: 6704 beqs 4b6d2 *endptr = end; 4b6ce: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b6d2: b6ae fffc cmpl %fp@(-4),%d3 4b6d6: 6720 beqs 4b6f8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b6d8: 0c82 7fff ffff cmpil #2147483647,%d2 4b6de: 660e bnes 4b6ee 4b6e0: 4eb9 0004 d67c jsr 4d67c <__errno> 4b6e6: 7222 moveq #34,%d1 4b6e8: 2040 moveal %d0,%a0 4b6ea: b290 cmpl %a0@,%d1 4b6ec: 670e beqs 4b6fc <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b6ee: 2482 movel %d2,%a2@ #endif return RTEMS_SUCCESSFUL; 4b6f0: 4280 clrl %d0 4b6f2: 600a bras 4b6fe { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4b6f4: 7009 moveq #9,%d0 4b6f6: 6006 bras 4b6fe if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 4b6f8: 700b moveq #11,%d0 4b6fa: 6002 bras 4b6fe #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; 4b6fc: 700a moveq #10,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4b6fe: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b704: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b7a4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b7a4: 4e56 ffec linkw %fp,#-20 4b7a8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b7ac: 262e 0008 movel %fp@(8),%d3 4b7b0: 246e 000c moveal %fp@(12),%a2 4b7b4: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b7b8: 4a8a tstl %a2 4b7ba: 6754 beqs 4b810 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4b7bc: 4eb9 0004 d67c jsr 4d67c <__errno> 4b7c2: 2040 moveal %d0,%a0 4b7c4: 4290 clrl %a0@ *n = 0; 4b7c6: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b7c8: 2f2e 0014 movel %fp@(20),%sp@- 4b7cc: 486e fffc pea %fp@(-4) 4b7d0: 2f03 movel %d3,%sp@- 4b7d2: 4eb9 0005 0248 jsr 50248 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b7d8: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b7dc: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b7de: 4a8b tstl %a3 4b7e0: 6704 beqs 4b7e6 *endptr = end; 4b7e2: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b7e6: b6ae fffc cmpl %fp@(-4),%d3 4b7ea: 6728 beqs 4b814 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b7ec: 0c82 7fff ffff cmpil #2147483647,%d2 4b7f2: 6708 beqs 4b7fc return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4b7f4: 0c82 8000 0000 cmpil #-2147483648,%d2 4b7fa: 660e bnes 4b80a <== NEVER TAKEN 4b7fc: 4eb9 0004 d67c jsr 4d67c <__errno> 4b802: 7222 moveq #34,%d1 4b804: 2040 moveal %d0,%a0 4b806: b290 cmpl %a0@,%d1 4b808: 670e beqs 4b818 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b80a: 2482 movel %d2,%a2@ #endif return RTEMS_SUCCESSFUL; 4b80c: 4280 clrl %d0 4b80e: 600a bras 4b81a { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4b810: 7009 moveq #9,%d0 4b812: 6006 bras 4b81a if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 4b814: 700b moveq #11,%d0 4b816: 6002 bras 4b81a #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; 4b818: 700a moveq #10,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4b81a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b820: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b708 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b708: 4e56 ffe8 linkw %fp,#-24 4b70c: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4b710: 282e 0008 movel %fp@(8),%d4 4b714: 246e 000c moveal %fp@(12),%a2 4b718: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b71c: 4a8a tstl %a2 4b71e: 676e beqs 4b78e return RTEMS_INVALID_ADDRESS; errno = 0; 4b720: 4eb9 0004 d67c jsr 4d67c <__errno> 4b726: 2040 moveal %d0,%a0 *n = 0; 4b728: 4280 clrl %d0 4b72a: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b72c: 4290 clrl %a0@ *n = 0; 4b72e: 2480 movel %d0,%a2@ 4b730: 2541 0004 movel %d1,%a2@(4) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b734: 2f2e 0014 movel %fp@(20),%sp@- 4b738: 486e fffc pea %fp@(-4) 4b73c: 2f04 movel %d4,%sp@- 4b73e: 4eb9 0005 0268 jsr 50268 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b744: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b748: 2400 movel %d0,%d2 4b74a: 2601 movel %d1,%d3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b74c: 4a8b tstl %a3 4b74e: 6704 beqs 4b754 *endptr = end; 4b750: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b754: b8ae fffc cmpl %fp@(-4),%d4 4b758: 6738 beqs 4b792 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b75a: 203c 7fff ffff movel #2147483647,%d0 4b760: 72ff moveq #-1,%d1 4b762: 9283 subl %d3,%d1 4b764: 9182 subxl %d2,%d0 4b766: 670e beqs 4b776 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4b768: 203c 8000 0000 movel #-2147483648,%d0 4b76e: 4281 clrl %d1 4b770: 9283 subl %d3,%d1 4b772: 9182 subxl %d2,%d0 4b774: 660e bnes 4b784 4b776: 4eb9 0004 d67c jsr 4d67c <__errno> 4b77c: 7222 moveq #34,%d1 4b77e: 2040 moveal %d0,%a0 4b780: b290 cmpl %a0@,%d1 4b782: 6712 beqs 4b796 <== ALWAYS TAKEN #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 4b784: 4280 clrl %d0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b786: 2482 movel %d2,%a2@ 4b788: 2543 0004 movel %d3,%a2@(4) #endif return RTEMS_SUCCESSFUL; 4b78c: 600a bras 4b798 { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4b78e: 7009 moveq #9,%d0 4b790: 6006 bras 4b798 if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 4b792: 700b moveq #11,%d0 4b794: 6002 bras 4b798 #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; 4b796: 700a moveq #10,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4b798: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 4b79e: 4e5e unlk %fp ... =============================================================================== 0004b824 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b824: 4e56 ffec linkw %fp,#-20 4b828: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b82c: 262e 0008 movel %fp@(8),%d3 4b830: 246e 000c moveal %fp@(12),%a2 4b834: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b838: 4a8a tstl %a2 4b83a: 674a beqs 4b886 return RTEMS_INVALID_ADDRESS; errno = 0; 4b83c: 4eb9 0004 d67c jsr 4d67c <__errno> 4b842: 2040 moveal %d0,%a0 4b844: 4290 clrl %a0@ *n = 0; 4b846: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 4b848: 4878 0010 pea 10 4b84c: 486e fffc pea %fp@(-4) 4b850: 2f03 movel %d3,%sp@- 4b852: 4eb9 0005 067c jsr 5067c #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b858: 4fef 000c lea %sp@(12),%sp *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 4b85c: 2400 movel %d0,%d2 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b85e: 4a8b tstl %a3 4b860: 6704 beqs 4b866 *endptr = end; 4b862: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b866: b6ae fffc cmpl %fp@(-4),%d3 4b86a: 671e beqs 4b88a return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b86c: 70ff moveq #-1,%d0 4b86e: b082 cmpl %d2,%d0 4b870: 660e bnes 4b880 <== ALWAYS TAKEN 4b872: 4eb9 0004 d67c jsr 4d67c <__errno> <== NOT EXECUTED 4b878: 7222 moveq #34,%d1 <== NOT EXECUTED 4b87a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b87c: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b87e: 670e beqs 4b88e <== NOT EXECUTED if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; 4b880: 2482 movel %d2,%a2@ #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 4b882: 4280 clrl %d0 4b884: 600a bras 4b890 { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4b886: 7009 moveq #9,%d0 4b888: 6006 bras 4b890 if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 4b88a: 700b moveq #11,%d0 4b88c: 6002 bras 4b890 #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; 4b88e: 700a moveq #10,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4b890: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b896: 4e5e unlk %fp ... =============================================================================== 0004b8f8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b8f8: 4e56 ffec linkw %fp,#-20 4b8fc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b900: 262e 0008 movel %fp@(8),%d3 4b904: 246e 000c moveal %fp@(12),%a2 4b908: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b90c: 4a8a tstl %a2 4b90e: 674a beqs 4b95a return RTEMS_INVALID_ADDRESS; errno = 0; 4b910: 4eb9 0004 d67c jsr 4d67c <__errno> 4b916: 2040 moveal %d0,%a0 4b918: 4290 clrl %a0@ *n = 0; 4b91a: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b91c: 2f2e 0014 movel %fp@(20),%sp@- 4b920: 486e fffc pea %fp@(-4) 4b924: 2f03 movel %d3,%sp@- 4b926: 4eb9 0005 067c jsr 5067c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b92c: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b930: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b932: 4a8b tstl %a3 4b934: 6704 beqs 4b93a *endptr = end; 4b936: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b93a: b6ae fffc cmpl %fp@(-4),%d3 4b93e: 671e beqs 4b95e return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b940: 70ff moveq #-1,%d0 4b942: b082 cmpl %d2,%d0 4b944: 660e bnes 4b954 4b946: 4eb9 0004 d67c jsr 4d67c <__errno> 4b94c: 7222 moveq #34,%d1 4b94e: 2040 moveal %d0,%a0 4b950: b290 cmpl %a0@,%d1 4b952: 670e beqs 4b962 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b954: 2482 movel %d2,%a2@ #endif return RTEMS_SUCCESSFUL; 4b956: 4280 clrl %d0 4b958: 600a bras 4b964 { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4b95a: 7009 moveq #9,%d0 4b95c: 6006 bras 4b964 if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 4b95e: 700b moveq #11,%d0 4b960: 6002 bras 4b964 #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; 4b962: 700a moveq #10,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4b964: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b96a: 4e5e unlk %fp ... =============================================================================== 0004b9f8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b9f8: 4e56 ffec linkw %fp,#-20 4b9fc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4ba00: 262e 0008 movel %fp@(8),%d3 4ba04: 246e 000c moveal %fp@(12),%a2 4ba08: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4ba0c: 4a8a tstl %a2 4ba0e: 674a beqs 4ba5a return RTEMS_INVALID_ADDRESS; errno = 0; 4ba10: 4eb9 0004 d67c jsr 4d67c <__errno> 4ba16: 2040 moveal %d0,%a0 4ba18: 4290 clrl %a0@ *n = 0; 4ba1a: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4ba1c: 2f2e 0014 movel %fp@(20),%sp@- 4ba20: 486e fffc pea %fp@(-4) 4ba24: 2f03 movel %d3,%sp@- 4ba26: 4eb9 0005 067c jsr 5067c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4ba2c: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4ba30: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4ba32: 4a8b tstl %a3 4ba34: 6704 beqs 4ba3a *endptr = end; 4ba36: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4ba3a: b6ae fffc cmpl %fp@(-4),%d3 4ba3e: 671e beqs 4ba5e return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4ba40: 70ff moveq #-1,%d0 4ba42: b082 cmpl %d2,%d0 4ba44: 660e bnes 4ba54 4ba46: 4eb9 0004 d67c jsr 4d67c <__errno> 4ba4c: 7222 moveq #34,%d1 4ba4e: 2040 moveal %d0,%a0 4ba50: b290 cmpl %a0@,%d1 4ba52: 670e beqs 4ba62 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4ba54: 2482 movel %d2,%a2@ #endif return RTEMS_SUCCESSFUL; 4ba56: 4280 clrl %d0 4ba58: 600a bras 4ba64 { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4ba5a: 7009 moveq #9,%d0 4ba5c: 6006 bras 4ba64 if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 4ba5e: 700b moveq #11,%d0 4ba60: 6002 bras 4ba64 #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; 4ba62: 700a moveq #10,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4ba64: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4ba6a: 4e5e unlk %fp ... =============================================================================== 0004b970 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b970: 4e56 ffe8 linkw %fp,#-24 4b974: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4b978: 282e 0008 movel %fp@(8),%d4 4b97c: 246e 000c moveal %fp@(12),%a2 4b980: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b984: 4a8a tstl %a2 4b986: 675c beqs 4b9e4 return RTEMS_INVALID_ADDRESS; errno = 0; 4b988: 4eb9 0004 d67c jsr 4d67c <__errno> 4b98e: 2040 moveal %d0,%a0 *n = 0; 4b990: 4280 clrl %d0 4b992: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b994: 4290 clrl %a0@ *n = 0; 4b996: 2480 movel %d0,%a2@ 4b998: 2541 0004 movel %d1,%a2@(4) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b99c: 2f2e 0014 movel %fp@(20),%sp@- 4b9a0: 486e fffc pea %fp@(-4) 4b9a4: 2f04 movel %d4,%sp@- 4b9a6: 4eb9 0005 069c jsr 5069c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b9ac: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b9b0: 2400 movel %d0,%d2 4b9b2: 2601 movel %d1,%d3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b9b4: 4a8b tstl %a3 4b9b6: 6704 beqs 4b9bc *endptr = end; 4b9b8: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b9bc: b8ae fffc cmpl %fp@(-4),%d4 4b9c0: 6726 beqs 4b9e8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b9c2: 70ff moveq #-1,%d0 4b9c4: 72ff moveq #-1,%d1 4b9c6: 9283 subl %d3,%d1 4b9c8: 9182 subxl %d2,%d0 4b9ca: 660e bnes 4b9da 4b9cc: 4eb9 0004 d67c jsr 4d67c <__errno> 4b9d2: 7222 moveq #34,%d1 4b9d4: 2040 moveal %d0,%a0 4b9d6: b290 cmpl %a0@,%d1 4b9d8: 6712 beqs 4b9ec <== ALWAYS TAKEN #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 4b9da: 4280 clrl %d0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b9dc: 2482 movel %d2,%a2@ 4b9de: 2543 0004 movel %d3,%a2@(4) #endif return RTEMS_SUCCESSFUL; 4b9e2: 600a bras 4b9ee { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 4b9e4: 7009 moveq #9,%d0 4b9e6: 6006 bras 4b9ee if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 4b9e8: 700b moveq #11,%d0 4b9ea: 6002 bras 4b9ee #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; 4b9ec: 700a moveq #10,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4b9ee: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 4b9f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004213c : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 4213c: 4e56 fe3c linkw %fp,#-452 42140: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 42144: 2e2e 0008 movel %fp@(8),%d7 int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 42148: 2f07 movel %d7,%sp@- 4214a: 4eb9 0004 f390 jsr 4f390 42150: 4297 clrl %sp@ 42152: 486e ffe8 pea %fp@(-24) 42156: 42a7 clrl %sp@- 42158: 2f00 movel %d0,%sp@- 4215a: 2f07 movel %d7,%sp@- 4215c: 4eb9 0004 2bce jsr 42bce strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 42162: 4fef 0014 lea %sp@(20),%sp int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 42166: 2800 movel %d0,%d4 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 42168: 6600 01a8 bnew 42312 return -1; if (root_loc.ops != &IMFS_ops 4216c: 202e fff4 movel %fp@(-12),%d0 42170: 0c80 0005 e44a cmpil #386122,%d0 42176: 6710 beqs 42188 <== ALWAYS TAKEN && root_loc.ops != &fifoIMFS_ops) 42178: 0c80 0005 ec3a cmpil #388154,%d0 <== NOT EXECUTED 4217e: 6600 0192 bnew 42312 <== NOT EXECUTED 42182: 6004 bras 42188 <== NOT EXECUTED 42184: 2443 moveal %d3,%a2 42186: 602e bras 421b6 hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 42188: 2c0e movel %fp,%d6 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 4218a: 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); 4218c: 240e movel %fp,%d2 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops 4218e: 95ca subal %a2,%a2 hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 42190: 0686 ffff ff70 addil #-144,%d6 42196: 4bf9 0004 f498 lea 4f498 ,%a5 filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 4219c: 47f9 0004 9184 lea 49184 <_rtems_octal2ulong>,%a3 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 421a2: 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); 421a8: 0682 ffff fe70 addil #-400,%d2 421ae: 2d44 fe6c movel %d4,%fp@(-404) 421b2: 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) 421b6: 260a movel %a2,%d3 421b8: 0683 0000 0200 addil #512,%d3 421be: b6ae 0010 cmpl %fp@(16),%d3 421c2: 6200 0152 bhiw 42316 /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) 421c6: 4878 0007 pea 7 break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 421ca: d5ee 000c addal %fp@(12),%a2 offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) 421ce: 4879 0005 e492 pea 5e492 421d4: 486a 0101 pea %a2@(257) 421d8: 4eb9 0004 f3a8 jsr 4f3a8 421de: 4fef 000c lea %sp@(12),%sp 421e2: 4a80 tstl %d0 421e4: 6600 0130 bnew 42316 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 421e8: 4878 0063 pea 63 421ec: 2f0a movel %a2,%sp@- 421ee: 2f06 movel %d6,%sp@- 421f0: 4e95 jsr %a5@ filename[MAX_NAME_FIELD_SIZE] = '\0'; 421f2: 4200 clrb %d0 421f4: 1d40 ffd3 moveb %d0,%fp@(-45) linkflag = hdr_ptr[156]; 421f8: 122a 009c moveb %a2@(156),%d1 file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 421fc: 4878 0008 pea 8 42200: 486a 0064 pea %a2@(100) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; 42204: 1d41 fe6b moveb %d1,%fp@(-405) file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 42208: 4e93 jsr %a3@ file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 4220a: 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); 4220e: 2800 movel %d0,%d4 file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 42210: 486a 007c pea %a2@(124) 42214: 4e93 jsr %a3@ hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 42216: 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); 4221a: 2840 moveal %d0,%a4 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 4221c: 486a 0094 pea %a2@(148) 42220: 4e93 jsr %a3@ if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 42222: 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); 42226: 2e00 movel %d0,%d7 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 42228: 2e8a movel %a2,%sp@ 4222a: 4eb9 0004 91ca jsr 491ca <_rtems_tar_header_checksum> 42230: 588f addql #4,%sp 42232: be80 cmpl %d0,%d7 42234: 6600 00e0 bnew 42316 * 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) { 42238: 4280 clrl %d0 4223a: 102e fe6b moveb %fp@(-405),%d0 4223e: 7235 moveq #53,%d1 42240: b280 cmpl %d0,%d1 42242: 6656 bnes 4229a strcpy(full_filename, mountpoint); 42244: 2f2e fe66 movel %fp@(-410),%sp@- 42248: 2f02 movel %d2,%sp@- 4224a: 4eb9 0004 eee4 jsr 4eee4 if (full_filename[strlen(full_filename)-1] != '/') 42250: 2f02 movel %d2,%sp@- 42252: 4eb9 0004 f390 jsr 4f390 42258: 4fef 000c lea %sp@(12),%sp 4225c: 722f moveq #47,%d1 4225e: 41f6 0800 lea %fp@(00000000,%d0:l),%a0 42262: 1028 fe6f moveb %a0@(-401),%d0 42266: 49c0 extbl %d0 42268: b280 cmpl %d0,%d1 4226a: 6710 beqs 4227c <== ALWAYS TAKEN strcat(full_filename, "/"); 4226c: 4879 0005 b799 pea 5b799 <_rodata_start+0x19> <== NOT EXECUTED 42272: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42274: 4eb9 0004 edcc jsr 4edcc <== NOT EXECUTED 4227a: 508f addql #8,%sp <== NOT EXECUTED strcat(full_filename, filename); 4227c: 2f06 movel %d6,%sp@- 4227e: 2f02 movel %d2,%sp@- 42280: 4eb9 0004 edcc jsr 4edcc mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 42286: 4878 01ff pea 1ff 4228a: 2f02 movel %d2,%sp@- 4228c: 4eb9 0004 33b0 jsr 433b0 42292: 4fef 0010 lea %sp@(16),%sp 42296: 6000 feec braw 42184 * 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) { 4229a: 7230 moveq #48,%d1 4229c: b280 cmpl %d0,%d1 4229e: 6600 fee4 bnew 42184 const char *name; loc = root_loc; 422a2: 4878 0014 pea 14 422a6: 486e ffe8 pea %fp@(-24) 422aa: 2f05 movel %d5,%sp@- 422ac: 4eb9 0004 e630 jsr 4e630 if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 422b2: 486e fffc pea %fp@(-4) 422b6: 2f05 movel %d5,%sp@- 422b8: 2f06 movel %d6,%sp@- 422ba: 4eb9 0004 9c96 jsr 49c96 422c0: 4fef 0018 lea %sp@(24),%sp 422c4: 4a80 tstl %d0 422c6: 6636 bnes 422fe <== NEVER TAKEN node = IMFS_create_node( 422c8: 42a7 clrl %sp@- &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 422ca: 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( 422d0: 08c4 000f bset #15,%d4 422d4: 2f04 movel %d4,%sp@- 422d6: 2f2e fffc movel %fp@(-4),%sp@- 422da: 4878 0006 pea 6 422de: 2f05 movel %d5,%sp@- 422e0: 4eb9 0004 96fc jsr 496fc 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]; 422e6: 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( 422ea: 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]; 422ec: 202e 000c movel %fp@(12),%d0 422f0: 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; 422f2: 214c 0050 movel %a4,%a0@(80) 422f6: 42a8 004c clrl %a0@(76) node->info.linearfile.direct = &tar_image[offset]; 422fa: 2140 0054 movel %d0,%a0@(84) } nblocks = (((file_size) + 511) & ~511) / 512; 422fe: 200c movel %a4,%d0 42300: 0680 0000 01ff addil #511,%d0 offset += 512 * nblocks; 42306: 0280 ffff fe00 andil #-512,%d0 4230c: d680 addl %d0,%d3 4230e: 6000 fe74 braw 42184 if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; 42312: 78ff moveq #-1,%d4 <== NOT EXECUTED 42314: 6004 bras 4231a <== NOT EXECUTED 42316: 282e fe6c movel %fp@(-404),%d4 nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 4231a: 2004 movel %d4,%d0 4231c: 4cee 3cfc fe3c moveml %fp@(-452),%d2-%d7/%a2-%a5 42322: 4e5e unlk %fp ... =============================================================================== 00047244 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 47244: 4e56 fffc linkw %fp,#-4 47248: 202e 0008 movel %fp@(8),%d0 4724c: 2f0a movel %a2,%sp@- 4724e: 246e 0010 moveal %fp@(16),%a2 47252: 2f02 movel %d2,%sp@- 47254: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 47258: 4a39 0005 d604 tstb 5d604 4725e: 6752 beqs 472b2 <== NEVER TAKEN return RTEMS_NOT_CONFIGURED; if ( !note ) 47260: 4a8a tstl %a2 47262: 6752 beqs 472b6 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 47264: 720f moveq #15,%d1 47266: b282 cmpl %d2,%d1 47268: 6550 bcss 472ba /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 4726a: 4a80 tstl %d0 4726c: 670c beqs 4727a _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 4726e: 2079 0005 f1c8 moveal 5f1c8 <_Per_CPU_Information+0xc>,%a0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 47274: b0a8 0008 cmpl %a0@(8),%d0 47278: 6610 bnes 4728a _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 4727a: 2079 0005 f1c8 moveal 5f1c8 <_Per_CPU_Information+0xc>,%a0 *note = api->Notepads[ notepad ]; 47280: 2068 0108 moveal %a0@(264),%a0 47284: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ 47288: 6024 bras 472ae return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 4728a: 486e fffc pea %fp@(-4) 4728e: 2f00 movel %d0,%sp@- 47290: 4eb9 0004 9068 jsr 49068 <_Thread_Get> switch ( location ) { 47296: 508f addql #8,%sp 47298: 4aae fffc tstl %fp@(-4) 4729c: 6620 bnes 472be case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 4729e: 2240 moveal %d0,%a1 472a0: 2069 0108 moveal %a1@(264),%a0 472a4: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ _Thread_Enable_dispatch(); 472a8: 4eb9 0004 9042 jsr 49042 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 472ae: 4280 clrl %d0 472b0: 600e bras 472c0 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 472b2: 7016 moveq #22,%d0 472b4: 600a bras 472c0 if ( !note ) return RTEMS_INVALID_ADDRESS; 472b6: 7009 moveq #9,%d0 472b8: 6006 bras 472c0 * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) return RTEMS_INVALID_NUMBER; 472ba: 700a moveq #10,%d0 472bc: 6002 bras 472c0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 472be: 7004 moveq #4,%d0 } 472c0: 242e fff4 movel %fp@(-12),%d2 472c4: 246e fff8 moveal %fp@(-8),%a2 472c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b8f0 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4b8f0: 4e56 ffe4 linkw %fp,#-28 4b8f4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4b8f8: 262e 0008 movel %fp@(8),%d3 4b8fc: 282e 000c movel %fp@(12),%d4 4b900: 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 ) 4b904: 4a8c tstl %a4 4b906: 6700 010c beqw 4ba14 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4b90a: 2679 0005 c780 moveal 5c780 <_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; 4b910: 4a2b 0074 tstb %a3@(116) 4b914: 57c2 seq %d2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4b916: 246b 0108 moveal %a3@(264),%a2 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4b91a: 49c2 extbl %d2 4b91c: 0282 0000 0100 andil #256,%d2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4b922: 4aab 007a tstl %a3@(122) 4b926: 6704 beqs 4b92c old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4b928: 08c2 0009 bset #9,%d2 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4b92c: 4a2a 0008 tstb %a2@(8) 4b930: 57c5 seq %d5 old_mode |= _ISR_Get_level(); 4b932: 4eb9 0004 88c8 jsr 488c8 <_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; 4b938: 49c5 extbl %d5 4b93a: 0285 0000 0400 andil #1024,%d5 4b940: 8085 orl %d5,%d0 old_mode |= _ISR_Get_level(); 4b942: 8082 orl %d2,%d0 4b944: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4b946: 0804 0008 btst #8,%d4 4b94a: 670c beqs 4b958 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4b94c: 0803 0008 btst #8,%d3 4b950: 57c0 seq %d0 4b952: 4480 negl %d0 4b954: 1740 0074 moveb %d0,%a3@(116) if ( mask & RTEMS_TIMESLICE_MASK ) { 4b958: 0804 0009 btst #9,%d4 4b95c: 671c beqs 4b97a if ( _Modes_Is_timeslice(mode_set) ) { 4b95e: 0803 0009 btst #9,%d3 4b962: 6712 beqs 4b976 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4b964: 41f9 0005 c574 lea 5c574 <_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; 4b96a: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4b96c: 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; 4b970: 2740 007a movel %d0,%a3@(122) 4b974: 6004 bras 4b97a executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4b976: 42ab 007a clrl %a3@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4b97a: 7007 moveq #7,%d0 4b97c: c084 andl %d4,%d0 4b97e: 6712 beqs 4b992 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4b980: 40c0 movew %sr,%d0 */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 4b982: 7207 moveq #7,%d1 4b984: 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 ) ); 4b986: 0280 0000 f8ff andil #63743,%d0 4b98c: e189 lsll #8,%d1 4b98e: 8081 orl %d1,%d0 4b990: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4b992: 0804 000a btst #10,%d4 4b996: 6740 beqs 4b9d8 is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 4b998: 4281 clrl %d1 4b99a: 122a 0008 moveb %a2@(8),%d1 4b99e: 4282 clrl %d2 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4b9a0: 0803 000a btst #10,%d3 4b9a4: 57c0 seq %d0 4b9a6: 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 ) { 4b9a8: 1400 moveb %d0,%d2 4b9aa: b282 cmpl %d2,%d1 4b9ac: 672a beqs 4b9d8 asr->is_enabled = is_asr_enabled; 4b9ae: 1540 0008 moveb %d0,%a2@(8) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4b9b2: 203c 0000 0700 movel #1792,%d0 4b9b8: 40c1 movew %sr,%d1 4b9ba: 8081 orl %d1,%d0 4b9bc: 46c0 movew %d0,%sr _signals = information->signals_pending; 4b9be: 202a 0016 movel %a2@(22),%d0 information->signals_pending = information->signals_posted; 4b9c2: 256a 0012 0016 movel %a2@(18),%a2@(22) information->signals_posted = _signals; 4b9c8: 2540 0012 movel %d0,%a2@(18) _ISR_Enable( _level ); 4b9cc: 46c1 movew %d1,%sr /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 4b9ce: 4aaa 0012 tstl %a2@(18) 4b9d2: 56c0 sne %d0 4b9d4: 4480 negl %d0 4b9d6: 6002 bras 4b9da 4b9d8: 4200 clrb %d0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4b9da: 7203 moveq #3,%d1 4b9dc: b2b9 0005 c728 cmpl 5c728 <_System_state_Current>,%d1 4b9e2: 6634 bnes 4ba18 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 4b9e4: 2079 0005 c780 moveal 5c780 <_Per_CPU_Information+0xc>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4b9ea: 4aa8 0010 tstl %a0@(16) 4b9ee: 660e bnes 4b9fe <== NEVER TAKEN 4b9f0: b1f9 0005 c784 cmpal 5c784 <_Per_CPU_Information+0x10>,%a0 4b9f6: 6710 beqs 4ba08 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4b9f8: 4a28 0074 tstb %a0@(116) 4b9fc: 670a beqs 4ba08 <== NEVER TAKEN _Context_Switch_necessary = true; 4b9fe: 7001 moveq #1,%d0 4ba00: 13c0 0005 c78c moveb %d0,5c78c <_Per_CPU_Information+0x18> 4ba06: 6004 bras 4ba0c if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4ba08: 4a00 tstb %d0 4ba0a: 670c beqs 4ba18 _Thread_Dispatch(); 4ba0c: 4eb9 0004 74d4 jsr 474d4 <_Thread_Dispatch> 4ba12: 6004 bras 4ba18 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 4ba14: 7009 moveq #9,%d0 4ba16: 6002 bras 4ba1a if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; 4ba18: 4280 clrl %d0 } 4ba1a: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ba20: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049468 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 49468: 4e56 fffc linkw %fp,#-4 4946c: 2f0a movel %a2,%sp@- 4946e: 246e 0010 moveal %fp@(16),%a2 49472: 2f02 movel %d2,%sp@- 49474: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 49478: 670c beqs 49486 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 ) ); 4947a: 4280 clrl %d0 4947c: 1039 0005 e832 moveb 5e832 ,%d0 49482: b082 cmpl %d2,%d0 49484: 654e bcss 494d4 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 49486: 4a8a tstl %a2 49488: 674e beqs 494d8 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4948a: 486e fffc pea %fp@(-4) 4948e: 2f2e 0008 movel %fp@(8),%sp@- 49492: 4eb9 0004 b0f0 jsr 4b0f0 <_Thread_Get> switch ( location ) { 49498: 508f addql #8,%sp return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4949a: 2040 moveal %d0,%a0 switch ( location ) { 4949c: 4aae fffc tstl %fp@(-4) 494a0: 663a bnes 494dc case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 494a2: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 494a6: 4a82 tstl %d2 494a8: 6720 beqs 494ca the_thread->real_priority = new_priority; 494aa: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 494ae: 4aa8 001c tstl %a0@(28) 494b2: 6706 beqs 494ba 494b4: b4a8 0014 cmpl %a0@(20),%d2 494b8: 6410 bccs 494ca <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 494ba: 42a7 clrl %sp@- 494bc: 2f02 movel %d2,%sp@- 494be: 2f08 movel %a0,%sp@- 494c0: 4eb9 0004 abe4 jsr 4abe4 <_Thread_Change_priority> 494c6: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 494ca: 4eb9 0004 b0ca jsr 4b0ca <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 494d0: 4280 clrl %d0 494d2: 600a bras 494de 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; 494d4: 7013 moveq #19,%d0 494d6: 6006 bras 494de if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 494d8: 7009 moveq #9,%d0 494da: 6002 bras 494de case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 494dc: 7004 moveq #4,%d0 } 494de: 242e fff4 movel %fp@(-12),%d2 494e2: 246e fff8 moveal %fp@(-8),%a2 494e6: 4e5e unlk %fp ... =============================================================================== 00044b1c : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44b1c: 7209 moveq #9,%d1 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 44b1e: 4e56 0000 linkw %fp,#0 44b22: 202e 0008 movel %fp@(8),%d0 int baud_index; switch (termios_baud) { 44b26: b280 cmpl %d0,%d1 44b28: 6700 00c4 beqw 44bee 44b2c: 6d50 blts 44b7e 44b2e: 123c 0004 moveb #4,%d1 44b32: b280 cmpl %d0,%d1 44b34: 6700 00a4 beqw 44bda 44b38: 6d28 blts 44b62 44b3a: 123c 0001 moveb #1,%d1 44b3e: b280 cmpl %d0,%d1 44b40: 6700 00dc beqw 44c1e 44b44: 6d0a blts 44b50 44b46: 4a80 tstl %d0 44b48: 6700 0084 beqw 44bce 44b4c: 6000 00cc braw 44c1a 44b50: 7202 moveq #2,%d1 44b52: b280 cmpl %d0,%d1 44b54: 677c beqs 44bd2 44b56: 123c 0003 moveb #3,%d1 44b5a: b280 cmpl %d0,%d1 44b5c: 6600 00bc bnew 44c1a 44b60: 6074 bras 44bd6 44b62: 7206 moveq #6,%d1 44b64: b280 cmpl %d0,%d1 44b66: 677a beqs 44be2 44b68: 6e74 bgts 44bde 44b6a: 123c 0007 moveb #7,%d1 44b6e: b280 cmpl %d0,%d1 44b70: 6774 beqs 44be6 44b72: 123c 0008 moveb #8,%d1 44b76: b280 cmpl %d0,%d1 44b78: 6600 00a0 bnew 44c1a 44b7c: 606c bras 44bea 44b7e: 720e moveq #14,%d1 44b80: b280 cmpl %d0,%d1 44b82: 677e beqs 44c02 <== NEVER TAKEN 44b84: 6d1c blts 44ba2 44b86: 123c 000b moveb #11,%d1 44b8a: b280 cmpl %d0,%d1 44b8c: 6768 beqs 44bf6 44b8e: 6e62 bgts 44bf2 44b90: 123c 000c moveb #12,%d1 44b94: b280 cmpl %d0,%d1 44b96: 6762 beqs 44bfa 44b98: 123c 000d moveb #13,%d1 44b9c: b280 cmpl %d0,%d1 44b9e: 667a bnes 44c1a <== NEVER TAKEN 44ba0: 605c bras 44bfe 44ba2: 0c80 0000 1002 cmpil #4098,%d0 44ba8: 6764 beqs 44c0e <== NEVER TAKEN 44baa: 6e10 bgts 44bbc 44bac: 720f moveq #15,%d1 44bae: b280 cmpl %d0,%d1 44bb0: 6754 beqs 44c06 <== NEVER TAKEN 44bb2: 0c80 0000 1001 cmpil #4097,%d0 44bb8: 6660 bnes 44c1a <== NEVER TAKEN 44bba: 604e bras 44c0a 44bbc: 0c80 0000 1003 cmpil #4099,%d0 44bc2: 674e beqs 44c12 <== NEVER TAKEN 44bc4: 0c80 0000 1004 cmpil #4100,%d0 44bca: 664e bnes 44c1a <== NEVER TAKEN 44bcc: 6048 bras 44c16 case B0: baud_index = 0; break; 44bce: 4280 clrl %d0 44bd0: 604e bras 44c20 case B50: baud_index = 1; break; case B75: baud_index = 2; break; 44bd2: 7002 moveq #2,%d0 44bd4: 604a bras 44c20 case B110: baud_index = 3; break; 44bd6: 7003 moveq #3,%d0 44bd8: 6046 bras 44c20 case B134: baud_index = 4; break; 44bda: 7004 moveq #4,%d0 44bdc: 6042 bras 44c20 case B150: baud_index = 5; break; 44bde: 7005 moveq #5,%d0 44be0: 603e bras 44c20 case B200: baud_index = 6; break; 44be2: 7006 moveq #6,%d0 44be4: 603a bras 44c20 case B300: baud_index = 7; break; 44be6: 7007 moveq #7,%d0 44be8: 6036 bras 44c20 case B600: baud_index = 8; break; 44bea: 7008 moveq #8,%d0 44bec: 6032 bras 44c20 case B1200: baud_index = 9; break; 44bee: 7009 moveq #9,%d0 44bf0: 602e bras 44c20 case B1800: baud_index = 10; break; 44bf2: 700a moveq #10,%d0 44bf4: 602a bras 44c20 case B2400: baud_index = 11; break; 44bf6: 700b moveq #11,%d0 44bf8: 6026 bras 44c20 case B4800: baud_index = 12; break; 44bfa: 700c moveq #12,%d0 44bfc: 6022 bras 44c20 case B9600: baud_index = 13; break; 44bfe: 700d moveq #13,%d0 44c00: 601e bras 44c20 case B19200: baud_index = 14; break; 44c02: 700e moveq #14,%d0 44c04: 601a bras 44c20 case B38400: baud_index = 15; break; 44c06: 700f moveq #15,%d0 44c08: 6016 bras 44c20 case B57600: baud_index = 16; break; 44c0a: 7010 moveq #16,%d0 44c0c: 6012 bras 44c20 case B115200: baud_index = 17; break; 44c0e: 7011 moveq #17,%d0 44c10: 600e bras 44c20 case B230400: baud_index = 18; break; 44c12: 7012 moveq #18,%d0 44c14: 600a bras 44c20 case B460800: baud_index = 19; break; 44c16: 7013 moveq #19,%d0 44c18: 6006 bras 44c20 default: baud_index = -1; break; 44c1a: 70ff moveq #-1,%d0 44c1c: 6002 bras 44c20 { int baud_index; switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; 44c1e: 7001 moveq #1,%d0 case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44c20: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043588 : case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; 43588: 203c 0000 04b0 movel #1200,%d0 #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 4358e: 4e56 0000 linkw %fp,#0 43592: 222e 0008 movel %fp@(8),%d1 43596: 2f02 movel %d2,%sp@- int32_t baud; switch (termios_baud) { 43598: 7409 moveq #9,%d2 4359a: b481 cmpl %d1,%d2 4359c: 6700 0108 beqw 436a6 435a0: 6d6c blts 4360e 435a2: 143c 0004 moveb #4,%d2 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; 435a6: 303c 0086 movew #134,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 435aa: b481 cmpl %d1,%d2 435ac: 6700 00f8 beqw 436a6 435b0: 6d2a blts 435dc 435b2: 103c 0001 moveb #1,%d0 435b6: b081 cmpl %d1,%d0 435b8: 6700 00ea beqw 436a4 435bc: 6d0a blts 435c8 435be: 4a81 tstl %d1 435c0: 6700 00d2 beqw 43694 435c4: 6000 00da braw 436a0 435c8: 7402 moveq #2,%d2 435ca: b481 cmpl %d1,%d2 435cc: 6700 00ca beqw 43698 435d0: 7003 moveq #3,%d0 435d2: b081 cmpl %d1,%d0 435d4: 6600 00ca bnew 436a0 435d8: 6000 00c2 braw 4369c case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; 435dc: 203c 0000 00c8 movel #200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 435e2: 7406 moveq #6,%d2 435e4: b481 cmpl %d1,%d2 435e6: 6700 00be beqw 436a6 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; 435ea: 0680 ffff ffce addil #-50,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 435f0: b481 cmpl %d1,%d2 435f2: 6e00 00b2 bgtw 436a6 435f6: 143c 0007 moveb #7,%d2 case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; 435fa: 303c 012c movew #300,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 435fe: b481 cmpl %d1,%d2 43600: 6700 00a4 beqw 436a6 43604: 143c 0008 moveb #8,%d2 case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; 43608: 303c 0258 movew #600,%d0 4360c: 6038 bras 43646 case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; 4360e: 203c 0000 4b00 movel #19200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43614: 740e moveq #14,%d2 43616: b481 cmpl %d1,%d2 43618: 6700 008c beqw 436a6 4361c: 6d2e blts 4364c 4361e: 143c 000b moveb #11,%d2 case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; 43622: 303c 0960 movew #2400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43626: b481 cmpl %d1,%d2 43628: 677c beqs 436a6 case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; 4362a: 303c 0708 movew #1800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4362e: b481 cmpl %d1,%d2 43630: 6e74 bgts 436a6 43632: 143c 000c moveb #12,%d2 case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; 43636: 303c 12c0 movew #4800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4363a: b481 cmpl %d1,%d2 4363c: 6768 beqs 436a6 4363e: 143c 000d moveb #13,%d2 case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; 43642: 303c 2580 movew #9600,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43646: b481 cmpl %d1,%d2 43648: 6656 bnes 436a0 <== NEVER TAKEN 4364a: 605a bras 436a6 case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; 4364c: 203c 0001 c200 movel #115200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43652: 0c81 0000 1002 cmpil #4098,%d1 43658: 674c beqs 436a6 4365a: 6e1a bgts 43676 4365c: 740f moveq #15,%d2 case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; 4365e: 203c 0000 9600 movel #38400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43664: b481 cmpl %d1,%d2 43666: 673e beqs 436a6 case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; 43668: 303c e100 movew #-7936,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4366c: 0c81 0000 1001 cmpil #4097,%d1 43672: 662c bnes 436a0 <== NEVER TAKEN 43674: 6030 bras 436a6 case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; 43676: 203c 0003 8400 movel #230400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4367c: 0c81 0000 1003 cmpil #4099,%d1 43682: 6722 beqs 436a6 case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 43684: 203c 0007 0800 movel #460800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4368a: 0c81 0000 1004 cmpil #4100,%d1 43690: 660e bnes 436a0 <== NEVER TAKEN 43692: 6012 bras 436a6 case B0: baud = 0; break; 43694: 4280 clrl %d0 43696: 600e bras 436a6 case B50: baud = 50; break; case B75: baud = 75; break; 43698: 704b moveq #75,%d0 4369a: 600a bras 436a6 case B110: baud = 110; break; 4369c: 706e moveq #110,%d0 4369e: 6006 bras 436a6 case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; default: baud = -1; break; 436a0: 70ff moveq #-1,%d0 436a2: 6002 bras 436a6 { int32_t baud; switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; 436a4: 7032 moveq #50,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 436a6: 241f movel %sp@+,%d2 436a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043c94 : { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 43c94: 4280 clrl %d0 <== NOT EXECUTED rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 43c96: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 43c9a: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED 43c9e: 23d0 0005 aef0 movel %a0@,5aef0 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 43ca4: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 43ca8: 23d0 0005 aef4 movel %a0@,5aef4 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 43cae: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 43cb2: 4e5e unlk %fp <== NOT EXECUTED int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; 43cb4: 23d0 0005 aef8 movel %a0@,5aef8 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } =============================================================================== 00043b34 : } } rtems_status_code rtems_termios_close (void *arg) { 43b34: 4e56 fff4 linkw %fp,#-12 43b38: 48d7 1c00 moveml %a2-%a4,%sp@ 43b3c: 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( 43b40: 49f9 0004 5770 lea 45770 ,%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; 43b46: 2053 moveal %a3@,%a0 43b48: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain( 43b4c: 42a7 clrl %sp@- 43b4e: 42a7 clrl %sp@- 43b50: 2f39 0005 c4ac movel 5c4ac ,%sp@- 43b56: 4e94 jsr %a4@ rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43b58: 4fef 000c lea %sp@(12),%sp 43b5c: 4a80 tstl %d0 43b5e: 6670 bnes 43bd0 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 43b60: 202a 0008 movel %a2@(8),%d0 43b64: 5380 subql #1,%d0 43b66: 2540 0008 movel %d0,%a2@(8) 43b6a: 6600 0110 bnew 43c7c if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 43b6e: 202a 00cc movel %a2@(204),%d0 43b72: eb88 lsll #5,%d0 43b74: 0680 0005 bc74 addil #375924,%d0 43b7a: 2240 moveal %d0,%a1 43b7c: 2051 moveal %a1@,%a0 43b7e: 4a88 tstl %a0 43b80: 6706 beqs 43b88 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 43b82: 2f0a movel %a2,%sp@- 43b84: 4e90 jsr %a0@ 43b86: 6018 bras 43ba0 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43b88: 42a7 clrl %sp@- 43b8a: 42a7 clrl %sp@- 43b8c: 2f2a 0018 movel %a2@(24),%sp@- 43b90: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) { 43b92: 4fef 000c lea %sp@(12),%sp 43b96: 4a80 tstl %d0 43b98: 6636 bnes 43bd0 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 43b9a: 2f0a movel %a2,%sp@- 43b9c: 4eba fb4a jsr %pc@(436e8 ) 43ba0: 588f addql #4,%sp } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 43ba2: 7002 moveq #2,%d0 43ba4: b0aa 00b4 cmpl %a2@(180),%d0 43ba8: 662e bnes 43bd8 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 43baa: 4878 0001 pea 1 43bae: 49f9 0004 5320 lea 45320 ,%a4 43bb4: 2f2a 00c4 movel %a2@(196),%sp@- 43bb8: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 43bba: 508f addql #8,%sp 43bbc: 4a80 tstl %d0 43bbe: 6610 bnes 43bd0 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 43bc0: 4878 0001 pea 1 43bc4: 2f2a 00c8 movel %a2@(200),%sp@- 43bc8: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 43bca: 508f addql #8,%sp 43bcc: 4a80 tstl %d0 43bce: 6708 beqs 43bd8 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 43bd0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43bd2: 4eb9 0004 5df8 jsr 45df8 <== NOT EXECUTED } if (tty->device.lastClose) 43bd8: 206a 009c moveal %a2@(156),%a0 43bdc: 4a88 tstl %a0 43bde: 6710 beqs 43bf0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 43be0: 2f0b movel %a3,%sp@- 43be2: 2f2a 0010 movel %a2@(16),%sp@- 43be6: 2f2a 000c movel %a2@(12),%sp@- 43bea: 4e90 jsr %a0@ 43bec: 4fef 000c lea %sp@(12),%sp if (tty->forw == NULL) { 43bf0: 2052 moveal %a2@,%a0 43bf2: 4a88 tstl %a0 43bf4: 6610 bnes 43c06 rtems_termios_ttyTail = tty->back; 43bf6: 206a 0004 moveal %a2@(4),%a0 43bfa: 23c8 0005 c4b0 movel %a0,5c4b0 if ( rtems_termios_ttyTail != NULL ) { 43c00: 670a beqs 43c0c <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; 43c02: 4290 clrl %a0@ <== NOT EXECUTED 43c04: 6006 bras 43c0c <== NOT EXECUTED } } else { tty->forw->back = tty->back; 43c06: 216a 0004 0004 movel %a2@(4),%a0@(4) } if (tty->back == NULL) { 43c0c: 206a 0004 moveal %a2@(4),%a0 43c10: 4a88 tstl %a0 43c12: 6610 bnes 43c24 <== NEVER TAKEN rtems_termios_ttyHead = tty->forw; 43c14: 2052 moveal %a2@,%a0 43c16: 23c8 0005 c4b4 movel %a0,5c4b4 if ( rtems_termios_ttyHead != NULL ) { 43c1c: 6708 beqs 43c26 rtems_termios_ttyHead->back = NULL; 43c1e: 42a8 0004 clrl %a0@(4) 43c22: 6002 bras 43c26 } } else { tty->back->forw = tty->forw; 43c24: 2092 movel %a2@,%a0@ <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 43c26: 2f2a 0014 movel %a2@(20),%sp@- 43c2a: 47f9 0004 56d4 lea 456d4 ,%a3 43c30: 4e93 jsr %a3@ rtems_semaphore_delete (tty->osem); 43c32: 2f2a 0018 movel %a2@(24),%sp@- 43c36: 4e93 jsr %a3@ rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 43c38: 2f2a 008c movel %a2@(140),%sp@- 43c3c: 4e93 jsr %a3@ if ((tty->device.pollRead == NULL) || 43c3e: 4fef 000c lea %sp@(12),%sp 43c42: 4aaa 00a0 tstl %a2@(160) 43c46: 6708 beqs 43c50 43c48: 7002 moveq #2,%d0 43c4a: b0aa 00b4 cmpl %a2@(180),%d0 43c4e: 660c bnes 43c5c (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 43c50: 2f2a 0068 movel %a2@(104),%sp@- 43c54: 4eb9 0004 56d4 jsr 456d4 43c5a: 588f addql #4,%sp free (tty->rawInBuf.theBuf); 43c5c: 2f2a 0058 movel %a2@(88),%sp@- 43c60: 47f9 0004 2830 lea 42830 ,%a3 43c66: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 43c68: 2f2a 007c movel %a2@(124),%sp@- 43c6c: 4e93 jsr %a3@ free (tty->cbuf); 43c6e: 2f2a 001c movel %a2@(28),%sp@- 43c72: 4e93 jsr %a3@ free (tty); 43c74: 2f0a movel %a2,%sp@- 43c76: 4e93 jsr %a3@ 43c78: 4fef 0010 lea %sp@(16),%sp } rtems_semaphore_release (rtems_termios_ttyMutex); 43c7c: 2f39 0005 c4ac movel 5c4ac ,%sp@- 43c82: 4eb9 0004 5878 jsr 45878 return RTEMS_SUCCESSFUL; } 43c88: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 43c8e: 4280 clrl %d0 43c90: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044e80 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 44e80: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 44e84: 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) { 44e88: 206e 0008 moveal %fp@(8),%a0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 44e8c: d1a8 0090 addl %d0,%a0@(144) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44e90: 7002 moveq #2,%d0 44e92: b0a8 00b4 cmpl %a0@(180),%d0 44e96: 661c bnes 44eb4 /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 44e98: 4878 0002 pea 2 44e9c: 2f28 00c8 movel %a0@(200),%sp@- 44ea0: 4eb9 0004 5320 jsr 45320 if (sc != RTEMS_SUCCESSFUL) 44ea6: 508f addql #8,%sp 44ea8: 4a80 tstl %d0 44eaa: 672e beqs 44eda <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 44eac: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44eae: 4eb9 0004 5df8 jsr 45df8 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 44eb4: 7005 moveq #5,%d0 44eb6: b0a8 00cc cmpl %a0@(204),%d0 44eba: 6612 bnes 44ece /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 44ebc: 2279 0005 bd24 moveal 5bd24 ,%a1 44ec2: 4a89 tstl %a1 44ec4: 6714 beqs 44eda <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 44ec6: 2f08 movel %a0,%sp@- 44ec8: 4e91 jsr %a1@ 44eca: 588f addql #4,%sp 44ecc: 600c bras 44eda } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 44ece: 2d48 0008 movel %a0,%fp@(8) } 44ed2: 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); 44ed4: 4ef9 0004 4c64 jmp 44c64 } 44eda: 4280 clrl %d0 44edc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000449a4 : * 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) { 449a4: 4e56 ffd0 linkw %fp,#-48 449a8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 449ac: 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) { 449b0: 202a 00cc movel %a2@(204),%d0 449b4: 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) { 449b6: 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) { 449ba: 0680 0005 bc80 addil #375936,%d0 449c0: 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) { 449c2: 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) { 449c6: 4a90 tstl %a0@ 449c8: 6630 bnes 449fa 449ca: 2802 movel %d2,%d4 449cc: 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); 449ce: 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, 449d2: 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) { 449d6: 4206 clrb %d6 449d8: 6000 01f4 braw 44bce while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 449dc: 202a 00cc movel %a2@(204),%d0 449e0: 5382 subql #1,%d2 449e2: 2f0a movel %a2,%sp@- 449e4: 121b moveb %a3@+,%d1 449e6: eb88 lsll #5,%d0 449e8: 49c1 extbl %d1 449ea: 0680 0005 bc80 addil #375936,%d0 449f0: 2240 moveal %d0,%a1 449f2: 2f01 movel %d1,%sp@- 449f4: 2051 moveal %a1@,%a0 449f6: 4e90 jsr %a0@ 449f8: 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--) { 449fa: 4a82 tstl %d2 449fc: 66de bnes 449dc } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 449fe: 4aaa 00e4 tstl %a2@(228) 44a02: 6600 01e2 bnew 44be6 44a06: 206a 00dc moveal %a2@(220),%a0 44a0a: 4a88 tstl %a0 44a0c: 6700 01d8 beqw 44be6 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 44a10: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED 44a14: 486a 0030 pea %a2@(48) <== NOT EXECUTED 44a18: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 44a1a: 508f addql #8,%sp <== NOT EXECUTED 44a1c: 7001 moveq #1,%d0 <== NOT EXECUTED 44a1e: 2540 00e4 movel %d0,%a2@(228) <== NOT EXECUTED 44a22: 6000 01c4 braw 44be8 <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 44a26: 202a 00b8 movel %a2@(184),%d0 } return 0; } while (len--) { c = *buf++; 44a2a: 1e1b moveb %a3@+,%d7 /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 44a2c: 0800 0009 btst #9,%d0 44a30: 6740 beqs 44a72 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 44a32: 4283 clrl %d3 44a34: 162a 004a moveb %a2@(74),%d3 44a38: 4281 clrl %d1 44a3a: 122a 0049 moveb %a2@(73),%d1 44a3e: 1007 moveb %d7,%d0 44a40: 49c0 extbl %d0 44a42: b680 cmpl %d0,%d3 44a44: 661e bnes 44a64 <== ALWAYS TAKEN if (c == tty->termios.c_cc[VSTART]) { 44a46: b280 cmpl %d0,%d1 <== NOT EXECUTED 44a48: 660a bnes 44a54 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 44a4a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44a4e: 7210 moveq #16,%d1 <== NOT EXECUTED 44a50: b380 eorl %d1,%d0 <== NOT EXECUTED 44a52: 6008 bras 44a5c <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 44a54: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44a58: 7a10 moveq #16,%d5 <== NOT EXECUTED 44a5a: 8085 orl %d5,%d0 <== NOT EXECUTED 44a5c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED * 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) { 44a60: 7c01 moveq #1,%d6 <== NOT EXECUTED 44a62: 6012 bras 44a76 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 44a64: b280 cmpl %d0,%d1 44a66: 660a bnes 44a72 <== ALWAYS TAKEN /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 44a68: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44a6c: 72ef moveq #-17,%d1 <== NOT EXECUTED 44a6e: c081 andl %d1,%d0 <== NOT EXECUTED 44a70: 60ea bras 44a5c <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 44a72: 4a06 tstb %d6 44a74: 6750 beqs 44ac6 <== ALWAYS TAKEN /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 44a76: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44a7a: 7a30 moveq #48,%d5 <== NOT EXECUTED 44a7c: 7220 moveq #32,%d1 <== NOT EXECUTED 44a7e: c085 andl %d5,%d0 <== NOT EXECUTED 44a80: b280 cmpl %d0,%d1 <== NOT EXECUTED 44a82: 6600 0148 bnew 44bcc <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 44a86: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 44a8c: 40c3 movew %sr,%d3 <== NOT EXECUTED 44a8e: 8083 orl %d3,%d0 <== NOT EXECUTED 44a90: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 44a92: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44a96: 7adf moveq #-33,%d5 <== NOT EXECUTED 44a98: c085 andl %d5,%d0 <== NOT EXECUTED 44a9a: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 44a9e: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 44aa2: 671c beqs 44ac0 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 44aa4: 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)( 44aa8: 4878 0001 pea 1 <== NOT EXECUTED 44aac: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 44ab0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44ab2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44ab6: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44aba: 4e90 jsr %a0@ <== NOT EXECUTED 44abc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 44ac0: 46c3 movew %d3,%sr <== NOT EXECUTED 44ac2: 6000 0108 braw 44bcc <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 44ac6: 222a 0060 movel %a2@(96),%d1 44aca: 5281 addql #1,%d1 44acc: 202a 0064 movel %a2@(100),%d0 44ad0: 4c40 1003 remul %d0,%d3,%d1 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 44ad4: 203c 0000 0700 movel #1792,%d0 44ada: 40c1 movew %sr,%d1 44adc: 8081 orl %d1,%d0 44ade: 46c0 movew %d0,%sr 44ae0: 2d41 fffc movel %d1,%fp@(-4) if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 44ae4: 206a 005c moveal %a2@(92),%a0 44ae8: 202a 0064 movel %a2@(100),%d0 44aec: 9088 subl %a0,%d0 44aee: 2240 moveal %d0,%a1 44af0: d3c3 addal %d3,%a1 % tty->rawInBuf.Size) > tty->highwater) && 44af2: 2009 movel %a1,%d0 44af4: 2a2a 0064 movel %a2@(100),%d5 44af8: 4c45 0001 remul %d5,%d1,%d0 44afc: 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) 44b00: b2aa 00c0 cmpl %a2@(192),%d1 44b04: 6300 008a blsw 44b90 % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 44b08: 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) && 44b0c: 0800 0000 btst #0,%d0 <== NOT EXECUTED 44b10: 667e bnes 44b90 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 44b12: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44b16: 7a01 moveq #1,%d5 <== NOT EXECUTED 44b18: 8085 orl %d5,%d0 <== NOT EXECUTED 44b1a: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 44b1e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44b22: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 44b28: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 44b2e: 6632 bnes 44b62 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || 44b30: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44b34: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44b38: 6606 bnes 44b40 <== NOT EXECUTED 44b3a: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 44b3e: 6650 bnes 44b90 <== 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; 44b40: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44b44: 7202 moveq #2,%d1 <== NOT EXECUTED 44b46: 8081 orl %d1,%d0 <== NOT EXECUTED 44b48: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 44b4c: 4878 0001 pea 1 <== NOT EXECUTED 44b50: 2f0c movel %a4,%sp@- <== NOT EXECUTED 44b52: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44b56: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44b5a: 4e90 jsr %a0@ <== NOT EXECUTED 44b5c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44b60: 602e bras 44b90 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 44b62: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44b66: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 44b6c: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 44b72: 661c bnes 44b90 <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; 44b74: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44b78: 7a04 moveq #4,%d5 <== NOT EXECUTED 44b7a: 8085 orl %d5,%d0 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 44b7c: 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; 44b80: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 44b84: 4a88 tstl %a0 <== NOT EXECUTED 44b86: 6708 beqs 44b90 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 44b88: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44b8c: 4e90 jsr %a0@ <== NOT EXECUTED 44b8e: 588f addql #4,%sp <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 44b90: 202e fffc movel %fp@(-4),%d0 44b94: 46c0 movew %d0,%sr if (newTail == tty->rawInBuf.Head) { 44b96: 202a 005c movel %a2@(92),%d0 44b9a: b083 cmpl %d3,%d0 44b9c: 6604 bnes 44ba2 <== ALWAYS TAKEN dropped++; 44b9e: 5282 addql #1,%d2 <== NOT EXECUTED 44ba0: 602a bras 44bcc <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 44ba2: 206a 0058 moveal %a2@(88),%a0 44ba6: 1187 3800 moveb %d7,%a0@(00000000,%d3:l) tty->rawInBuf.Tail = newTail; 44baa: 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 )) { 44bae: 4aaa 00e4 tstl %a2@(228) 44bb2: 6618 bnes 44bcc <== NEVER TAKEN 44bb4: 206a 00dc moveal %a2@(220),%a0 44bb8: 4a88 tstl %a0 44bba: 6710 beqs 44bcc <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 44bbc: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED 44bc0: 2f0d movel %a5,%sp@- <== NOT EXECUTED 44bc2: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 44bc4: 508f addql #8,%sp <== NOT EXECUTED 44bc6: 7201 moveq #1,%d1 <== NOT EXECUTED 44bc8: 2541 00e4 movel %d1,%a2@(228) <== NOT EXECUTED 44bcc: 5384 subql #1,%d4 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 44bce: 4a84 tstl %d4 44bd0: 6600 fe54 bnew 44a26 } } } } tty->rawInBufDropped += dropped; 44bd4: d5aa 0078 addl %d2,%a2@(120) rtems_semaphore_release (tty->rawInBuf.Semaphore); 44bd8: 2f2a 0068 movel %a2@(104),%sp@- 44bdc: 4eb9 0004 5878 jsr 45878 return dropped; 44be2: 588f addql #4,%sp 44be4: 6002 bras 44be8 */ 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; 44be6: 4282 clrl %d2 } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 44be8: 2002 movel %d2,%d0 44bea: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 44bf0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043cbc : } } rtems_status_code rtems_termios_ioctl (void *arg) { 43cbc: 4e56 ffec linkw %fp,#-20 43cc0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 43cc4: 266e 0008 moveal %fp@(8),%a3 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 43cc8: 2053 moveal %a3@,%a0 43cca: 2468 0034 moveal %a0@(52),%a2 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 43cce: 286b 0008 moveal %a3@(8),%a4 rtems_status_code sc; args->ioctl_return = 0; 43cd2: 42ab 000c clrl %a3@(12) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43cd6: 42a7 clrl %sp@- 43cd8: 42a7 clrl %sp@- 43cda: 2f2a 0018 movel %a2@(24),%sp@- 43cde: 4eb9 0004 5770 jsr 45770 if (sc != RTEMS_SUCCESSFUL) { 43ce4: 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); 43ce8: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 43cea: 6708 beqs 43cf4 <== ALWAYS TAKEN args->ioctl_return = sc; 43cec: 2740 000c movel %d0,%a3@(12) <== NOT EXECUTED return sc; 43cf0: 6000 02d0 braw 43fc2 <== NOT EXECUTED } switch (args->command) { 43cf4: 202b 0004 movel %a3@(4),%d0 43cf8: 7204 moveq #4,%d1 43cfa: b280 cmpl %d0,%d1 43cfc: 6700 0230 beqw 43f2e 43d00: 6514 bcss 43d16 43d02: 7602 moveq #2,%d3 43d04: b680 cmpl %d0,%d3 43d06: 6774 beqs 43d7c 43d08: 6500 020a bcsw 43f14 43d0c: 123c 0001 moveb #1,%d1 43d10: b280 cmpl %d0,%d1 43d12: 662c bnes 43d40 <== NEVER TAKEN 43d14: 604c bras 43d62 43d16: 0c80 4004 667f cmpil #1074030207,%d0 43d1c: 6700 026e beqw 43f8c 43d20: 620a bhis 43d2c 43d22: 7605 moveq #5,%d3 43d24: b680 cmpl %d0,%d3 43d26: 6618 bnes 43d40 <== ALWAYS TAKEN 43d28: 6000 01f2 braw 43f1c <== NOT EXECUTED 43d2c: 0c80 4004 741a cmpil #1074033690,%d0 43d32: 6700 024e beqw 43f82 43d36: 0c80 8004 741b cmpil #-2147191781,%d0 43d3c: 6700 0200 beqw 43f3e default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 43d40: 202a 00cc movel %a2@(204),%d0 43d44: eb88 lsll #5,%d0 43d46: 0680 0005 bc88 addil #375944,%d0 43d4c: 2240 moveal %d0,%a1 43d4e: 2051 moveal %a1@,%a0 43d50: 4a88 tstl %a0 43d52: 6700 025c beqw 43fb0 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 43d56: 2f0b movel %a3,%sp@- 43d58: 2f0a movel %a2,%sp@- 43d5a: 4e90 jsr %a0@ 43d5c: 2400 movel %d0,%d2 43d5e: 6000 01ae braw 43f0e sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 43d62: 4878 0024 pea 24 43d66: 486a 0030 pea %a2@(48) 43d6a: 2f2b 0008 movel %a3@(8),%sp@- 43d6e: 4eb9 0004 c5a4 jsr 4c5a4 break; 43d74: 4fef 000c lea %sp@(12),%sp 43d78: 6000 0238 braw 43fb2 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 43d7c: 4878 0024 pea 24 43d80: 2f2b 0008 movel %a3@(8),%sp@- 43d84: 486a 0030 pea %a2@(48) 43d88: 4eb9 0004 c5a4 jsr 4c5a4 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 43d8e: 202a 00b8 movel %a2@(184),%d0 43d92: 4fef 000c lea %sp@(12),%sp 43d96: 0800 0009 btst #9,%d0 43d9a: 6760 beqs 43dfc !(tty->termios.c_iflag & IXON)) { 43d9c: 202a 0030 movel %a2@(48),%d0 43da0: 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) && 43da6: 6654 bnes 43dfc <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 43da8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43dac: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED 43db2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 43db6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43dba: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43dbe: 673c beqs 43dfc <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 43dc0: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 43dc6: 40c3 movew %sr,%d3 <== NOT EXECUTED 43dc8: 8083 orl %d3,%d0 <== NOT EXECUTED 43dca: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 43dcc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43dd0: 72df moveq #-33,%d1 <== NOT EXECUTED 43dd2: c081 andl %d1,%d0 <== NOT EXECUTED 43dd4: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 43dd8: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43ddc: 671c beqs 43dfa <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 43dde: 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)( 43de2: 4878 0001 pea 1 <== NOT EXECUTED 43de6: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43dea: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43dec: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43df0: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43df4: 4e90 jsr %a0@ <== NOT EXECUTED 43df6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43dfa: 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)) { 43dfc: 202a 00b8 movel %a2@(184),%d0 43e00: 0800 000a btst #10,%d0 43e04: 6724 beqs 43e2a <== ALWAYS TAKEN 43e06: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 43e0a: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED 43e10: 6618 bnes 43e2a <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 43e12: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 43e16: 76fd moveq #-3,%d3 <== NOT EXECUTED } } /* 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); 43e18: 0880 000a bclr #10,%d0 <== NOT EXECUTED 43e1c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 43e20: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e24: c083 andl %d3,%d0 <== NOT EXECUTED 43e26: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 43e2a: 202a 00b8 movel %a2@(184),%d0 43e2e: 0800 0008 btst #8,%d0 43e32: 6736 beqs 43e6a <== ALWAYS TAKEN 43e34: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED 43e38: 6d30 blts 43e6a <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 43e3a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e3e: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 43e42: 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)) { 43e46: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e4a: 44c0 movew %d0,%ccr <== NOT EXECUTED 43e4c: 6610 bnes 43e5e <== NOT EXECUTED 43e4e: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED 43e52: 4a88 tstl %a0 <== NOT EXECUTED 43e54: 6708 beqs 43e5e <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 43e56: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43e5a: 4e90 jsr %a0@ <== NOT EXECUTED 43e5c: 588f addql #4,%sp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 43e5e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e62: 72fb moveq #-5,%d1 <== NOT EXECUTED 43e64: c081 andl %d1,%d0 <== NOT EXECUTED 43e66: 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) { 43e6a: 4aaa 0038 tstl %a2@(56) 43e6e: 6c0c bges 43e7c <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDRTS; 43e70: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e74: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 43e78: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 43e7c: 222a 0030 movel %a2@(48),%d1 43e80: 0801 000c btst #12,%d1 43e84: 670c beqs 43e92 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXOF; 43e86: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e8a: 08c0 000a bset #10,%d0 <== NOT EXECUTED 43e8e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 43e92: 0801 000a btst #10,%d1 43e96: 670c beqs 43ea4 tty->flow_ctrl |= FL_MDXON; 43e98: 202a 00b8 movel %a2@(184),%d0 43e9c: 08c0 0009 bset #9,%d0 43ea0: 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) { 43ea4: 7002 moveq #2,%d0 43ea6: c0aa 003c andl %a2@(60),%d0 43eaa: 663a bnes 43ee6 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 43eac: 4283 clrl %d3 43eae: 162a 0046 moveb %a2@(70),%d3 rtems_clock_get_ticks_per_second() / 10; 43eb2: 4eb9 0004 513c jsr 4513c 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] * 43eb8: 4c03 0800 mulsl %d3,%d0 rtems_clock_get_ticks_per_second() / 10; 43ebc: 760a moveq #10,%d3 43ebe: 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] * 43ec2: 2540 0054 movel %d0,%a2@(84) rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 43ec6: 4a2a 0046 tstb %a2@(70) 43eca: 6714 beqs 43ee0 <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 43ecc: 42aa 006c clrl %a2@(108) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 43ed0: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 43ed4: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 43ed8: 6614 bnes 43eee <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 43eda: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED 43ede: 601a bras 43efa <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 43ee0: 4a2a 0047 tstb %a2@(71) 43ee4: 670e beqs 43ef4 <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 43ee6: 42aa 006c clrl %a2@(108) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 43eea: 42aa 0070 clrl %a2@(112) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 43eee: 42aa 0074 clrl %a2@(116) 43ef2: 6006 bras 43efa } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 43ef4: 7001 moveq #1,%d0 43ef6: 2540 006c movel %d0,%a2@(108) } } } if (tty->device.setAttributes) 43efa: 206a 00a8 moveal %a2@(168),%a0 43efe: 4a88 tstl %a0 43f00: 6700 00b0 beqw 43fb2 (*tty->device.setAttributes)(tty->minor, &tty->termios); 43f04: 486a 0030 pea %a2@(48) 43f08: 2f2a 0010 movel %a2@(16),%sp@- 43f0c: 4e90 jsr %a0@ 43f0e: 508f addql #8,%sp 43f10: 6000 00a0 braw 43fb2 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 43f14: 2f0a movel %a2,%sp@- 43f16: 4eba f7d0 jsr %pc@(436e8 ) 43f1a: 6062 bras 43f7e break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 43f1c: 2014 movel %a4@,%d0 <== NOT EXECUTED 43f1e: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 43f22: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED 43f26: 2541 00d8 movel %d1,%a2@(216) <== NOT EXECUTED break; 43f2a: 6000 0086 braw 43fb2 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 43f2e: 2014 movel %a4@,%d0 <== NOT EXECUTED 43f30: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 43f34: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED 43f38: 2541 00e0 movel %d1,%a2@(224) <== NOT EXECUTED break; 43f3c: 6074 bras 43fb2 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 43f3e: 202a 00cc movel %a2@(204),%d0 43f42: eb88 lsll #5,%d0 43f44: 0680 0005 bc74 addil #375924,%d0 43f4a: 2240 moveal %d0,%a1 43f4c: 2051 moveal %a1@,%a0 43f4e: 4a88 tstl %a0 43f50: 6708 beqs 43f5a sc = rtems_termios_linesw[tty->t_line].l_close(tty); 43f52: 2f0a movel %a2,%sp@- 43f54: 4e90 jsr %a0@ 43f56: 588f addql #4,%sp 43f58: 2400 movel %d0,%d2 } tty->t_line=*(int*)(args->buffer); 43f5a: 206b 0008 moveal %a3@(8),%a0 43f5e: 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) { 43f60: 41f9 0005 bc70 lea 5bc70 ,%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); 43f66: 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) { 43f6a: 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 */ 43f6c: 42aa 00d0 clrl %a2@(208) /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 43f70: 2070 0800 moveal %a0@(00000000,%d0:l),%a0 43f74: 4a88 tstl %a0 43f76: 673a beqs 43fb2 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_open(tty); 43f78: 2f0a movel %a2,%sp@- 43f7a: 4e90 jsr %a0@ 43f7c: 2400 movel %d0,%d2 43f7e: 588f addql #4,%sp 43f80: 6030 bras 43fb2 } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 43f82: 206b 0008 moveal %a3@(8),%a0 43f86: 20aa 00cc movel %a2@(204),%a0@ break; 43f8a: 6026 bras 43fb2 #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 43f8c: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 43f90: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 43f94: 9081 subl %d1,%d0 <== NOT EXECUTED if ( rawnc < 0 ) 43f96: 6a06 bpls 43f9e <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 43f98: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 43f9c: d081 addl %d1,%d0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 43f9e: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 43fa2: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 43fa6: d280 addl %d0,%d1 <== NOT EXECUTED 43fa8: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 43fac: 2081 movel %d1,%a0@ <== NOT EXECUTED } break; 43fae: 6002 bras 43fb2 <== 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; 43fb0: 740a moveq #10,%d2 <== NOT EXECUTED *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 43fb2: 2f2a 0018 movel %a2@(24),%sp@- 43fb6: 4eb9 0004 5878 jsr 45878 args->ioctl_return = sc; return sc; 43fbc: 588f addql #4,%sp } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 43fbe: 2742 000c movel %d2,%a3@(12) return sc; } 43fc2: 2002 movel %d2,%d0 43fc4: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 43fca: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044d84 : #include int rtems_termios_number_to_baud( int32_t baud ) { 44d84: 4e56 0000 linkw %fp,#0 44d88: 222e 0008 movel %fp@(8),%d1 int termios_baud; switch (baud) { 44d8c: 0c81 0000 04b0 cmpil #1200,%d1 44d92: 6700 0100 beqw 44e94 44d96: 6e68 bgts 44e00 44d98: 0c81 0000 0086 cmpil #134,%d1 44d9e: 6700 00e0 beqw 44e80 44da2: 6e2a bgts 44dce 44da4: 7032 moveq #50,%d0 44da6: b081 cmpl %d1,%d0 44da8: 6700 010a beqw 44eb4 44dac: 6d0a blts 44db8 44dae: 4a81 tstl %d1 44db0: 6700 00c2 beqw 44e74 44db4: 6000 00fa braw 44eb0 44db8: 704b moveq #75,%d0 44dba: b081 cmpl %d1,%d0 44dbc: 6700 00ba beqw 44e78 44dc0: 103c 006e moveb #110,%d0 44dc4: b081 cmpl %d1,%d0 44dc6: 6600 00e8 bnew 44eb0 44dca: 6000 00b0 braw 44e7c 44dce: 0c81 0000 00c8 cmpil #200,%d1 44dd4: 6700 00b2 beqw 44e88 44dd8: 6e0e bgts 44de8 44dda: 0c81 0000 0096 cmpil #150,%d1 44de0: 6600 00ce bnew 44eb0 44de4: 6000 009e braw 44e84 44de8: 0c81 0000 012c cmpil #300,%d1 44dee: 6700 009c beqw 44e8c 44df2: 0c81 0000 0258 cmpil #600,%d1 44df8: 6600 00b6 bnew 44eb0 44dfc: 6000 0092 braw 44e90 44e00: 0c81 0000 4b00 cmpil #19200,%d1 44e06: 6700 00a0 beqw 44ea8 44e0a: 6e2a bgts 44e36 44e0c: 0c81 0000 0960 cmpil #2400,%d1 44e12: 6700 0088 beqw 44e9c 44e16: 6e0c bgts 44e24 44e18: 0c81 0000 0708 cmpil #1800,%d1 44e1e: 6600 0090 bnew 44eb0 44e22: 6074 bras 44e98 44e24: 0c81 0000 12c0 cmpil #4800,%d1 44e2a: 6774 beqs 44ea0 44e2c: 0c81 0000 2580 cmpil #9600,%d1 44e32: 667c bnes 44eb0 <== NEVER TAKEN 44e34: 606e bras 44ea4 case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; 44e36: 203c 0000 1002 movel #4098,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44e3c: 0c81 0001 c200 cmpil #115200,%d1 44e42: 6772 beqs 44eb6 44e44: 6e14 bgts 44e5a 44e46: 0c81 0000 9600 cmpil #38400,%d1 44e4c: 675e beqs 44eac case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; 44e4e: 5380 subql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44e50: 0c81 0000 e100 cmpil #57600,%d1 44e56: 6658 bnes 44eb0 <== NEVER TAKEN 44e58: 605c bras 44eb6 case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; 44e5a: 203c 0000 1003 movel #4099,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44e60: 0c81 0003 8400 cmpil #230400,%d1 44e66: 674e beqs 44eb6 case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 44e68: 5280 addql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44e6a: 0c81 0007 0800 cmpil #460800,%d1 44e70: 663e bnes 44eb0 <== NEVER TAKEN 44e72: 6042 bras 44eb6 case 0: termios_baud = B0; break; 44e74: 4280 clrl %d0 44e76: 603e bras 44eb6 case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 44e78: 7002 moveq #2,%d0 44e7a: 603a bras 44eb6 case 110: termios_baud = B110; break; 44e7c: 7003 moveq #3,%d0 44e7e: 6036 bras 44eb6 case 134: termios_baud = B134; break; 44e80: 7004 moveq #4,%d0 44e82: 6032 bras 44eb6 case 150: termios_baud = B150; break; 44e84: 7005 moveq #5,%d0 44e86: 602e bras 44eb6 case 200: termios_baud = B200; break; 44e88: 7006 moveq #6,%d0 44e8a: 602a bras 44eb6 case 300: termios_baud = B300; break; 44e8c: 7007 moveq #7,%d0 44e8e: 6026 bras 44eb6 case 600: termios_baud = B600; break; 44e90: 7008 moveq #8,%d0 44e92: 6022 bras 44eb6 case 1200: termios_baud = B1200; break; 44e94: 7009 moveq #9,%d0 44e96: 601e bras 44eb6 case 1800: termios_baud = B1800; break; 44e98: 700a moveq #10,%d0 44e9a: 601a bras 44eb6 case 2400: termios_baud = B2400; break; 44e9c: 700b moveq #11,%d0 44e9e: 6016 bras 44eb6 case 4800: termios_baud = B4800; break; 44ea0: 700c moveq #12,%d0 44ea2: 6012 bras 44eb6 case 9600: termios_baud = B9600; break; 44ea4: 700d moveq #13,%d0 44ea6: 600e bras 44eb6 case 19200: termios_baud = B19200; break; 44ea8: 700e moveq #14,%d0 44eaa: 600a bras 44eb6 case 38400: termios_baud = B38400; break; 44eac: 700f moveq #15,%d0 44eae: 6006 bras 44eb6 case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; 44eb0: 70ff moveq #-1,%d0 44eb2: 6002 bras 44eb6 { int termios_baud; switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; 44eb4: 7001 moveq #1,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44eb6: 4e5e unlk %fp ... =============================================================================== 00043752 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 43752: 4e56 ffd8 linkw %fp,#-40 43756: 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( 4375a: 42a7 clrl %sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 4375c: 282e 0008 movel %fp@(8),%d4 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 43760: 42a7 clrl %sp@- 43762: 2f39 0005 c4ac movel 5c4ac ,%sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 43768: 2a2e 000c movel %fp@(12),%d5 4376c: 2e2e 0010 movel %fp@(16),%d7 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 43770: 4eb9 0004 5770 jsr 45770 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43776: 4fef 000c lea %sp@(12),%sp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 4377a: 2400 movel %d0,%d2 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 4377c: 6600 038c bnew 43b0a return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 43780: 2879 0005 c4b4 moveal 5c4b4 ,%a4 43786: 264c moveal %a4,%a3 43788: 6010 bras 4379a if ((tty->major == major) && (tty->minor == minor)) 4378a: b8ab 000c cmpl %a3@(12),%d4 4378e: 6608 bnes 43798 43790: baab 0010 cmpl %a3@(16),%d5 43794: 6700 02fc beqw 43a92 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) { 43798: 2653 moveal %a3@,%a3 4379a: 4a8b tstl %a3 4379c: 66ec bnes 4378a 4379e: 6000 0376 braw 43b16 /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 437a2: 2f39 0005 c4ac movel 5c4ac ,%sp@- <== NOT EXECUTED 437a8: 4eb9 0004 5878 jsr 45878 <== NOT EXECUTED return RTEMS_NO_MEMORY; 437ae: 588f addql #4,%sp <== NOT EXECUTED 437b0: 6038 bras 437ea <== NOT EXECUTED } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 437b2: 41f9 0005 aef4 lea 5aef4 ,%a0 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 437b8: 4bf9 0004 2b18 lea 42b18 ,%a5 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 437be: 2750 0064 movel %a0@,%a3@(100) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 437c2: 202b 0064 movel %a3@(100),%d0 437c6: 2f00 movel %d0,%sp@- 437c8: 4e95 jsr %a5@ if (tty->rawInBuf.theBuf == NULL) { 437ca: 588f addql #4,%sp } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 437cc: 2600 movel %d0,%d3 437ce: 2740 0058 movel %d0,%a3@(88) if (tty->rawInBuf.theBuf == NULL) { 437d2: 661c bnes 437f0 <== ALWAYS TAKEN free(tty); 437d4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 437d6: 4eb9 0004 2830 jsr 42830 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 437dc: 2f39 0005 c4ac movel 5c4ac ,%sp@- <== NOT EXECUTED 437e2: 4eb9 0004 5878 jsr 45878 <== NOT EXECUTED return RTEMS_NO_MEMORY; 437e8: 508f addql #8,%sp <== NOT EXECUTED 437ea: 741a moveq #26,%d2 <== NOT EXECUTED 437ec: 6000 031c braw 43b0a <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 437f0: 43f9 0005 aef8 lea 5aef8 ,%a1 437f6: 2751 0088 movel %a1@,%a3@(136) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 437fa: 202b 0088 movel %a3@(136),%d0 437fe: 2f00 movel %d0,%sp@- 43800: 4e95 jsr %a5@ if (tty->rawOutBuf.theBuf == NULL) { 43802: 588f addql #4,%sp } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 43804: 2c00 movel %d0,%d6 43806: 2740 007c movel %d0,%a3@(124) if (tty->rawOutBuf.theBuf == NULL) { 4380a: 6620 bnes 4382c <== ALWAYS TAKEN free((void *)(tty->rawInBuf.theBuf)); 4380c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4380e: 45f9 0004 2830 lea 42830 ,%a2 <== NOT EXECUTED 43814: 4e92 jsr %a2@ <== NOT EXECUTED free(tty); 43816: 2f0b movel %a3,%sp@- <== NOT EXECUTED 43818: 4e92 jsr %a2@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 4381a: 2f39 0005 c4ac movel 5c4ac ,%sp@- <== NOT EXECUTED 43820: 4eb9 0004 5878 jsr 45878 <== NOT EXECUTED return RTEMS_NO_MEMORY; 43826: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4382a: 60be bras 437ea <== NOT EXECUTED } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 4382c: 2f39 0005 aef0 movel 5aef0 ,%sp@- 43832: 4e95 jsr %a5@ if (tty->cbuf == NULL) { 43834: 588f addql #4,%sp return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 43836: 2740 001c movel %d0,%a3@(28) if (tty->cbuf == NULL) { 4383a: 6624 bnes 43860 <== ALWAYS TAKEN free((void *)(tty->rawOutBuf.theBuf)); 4383c: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4383e: 45f9 0004 2830 lea 42830 ,%a2 <== NOT EXECUTED 43844: 4e92 jsr %a2@ <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 43846: 2f03 movel %d3,%sp@- <== NOT EXECUTED 43848: 4e92 jsr %a2@ <== NOT EXECUTED free(tty); 4384a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4384c: 4e92 jsr %a2@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 4384e: 2f39 0005 c4ac movel 5c4ac ,%sp@- <== NOT EXECUTED 43854: 4eb9 0004 5878 jsr 45878 <== NOT EXECUTED return RTEMS_NO_MEMORY; 4385a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4385e: 608a bras 437ea <== NOT EXECUTED } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 43860: 42ab 00d4 clrl %a3@(212) tty->tty_snd.sw_arg = NULL; 43864: 42ab 00d8 clrl %a3@(216) tty->tty_rcv.sw_pfn = NULL; 43868: 42ab 00dc clrl %a3@(220) tty->tty_rcv.sw_arg = NULL; 4386c: 42ab 00e0 clrl %a3@(224) tty->tty_rcvwakeup = 0; 43870: 42ab 00e4 clrl %a3@(228) /* * link tty */ tty->forw = rtems_termios_ttyHead; 43874: 268c movel %a4,%a3@ tty->back = NULL; 43876: 42ab 0004 clrl %a3@(4) if (rtems_termios_ttyHead != NULL) 4387a: 4a8c tstl %a4 4387c: 6704 beqs 43882 rtems_termios_ttyHead->back = tty; 4387e: 294b 0004 movel %a3,%a4@(4) rtems_termios_ttyHead = tty; 43882: 23ca 0005 c4b4 movel %a2,5c4b4 if (rtems_termios_ttyTail == NULL) 43888: 4ab9 0005 c4b0 tstl 5c4b0 4388e: 6606 bnes 43896 rtems_termios_ttyTail = tty; 43890: 23ca 0005 c4b0 movel %a2,5c4b0 tty->minor = minor; 43896: 2545 0010 movel %d5,%a2@(16) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 4389a: 49f9 0004 5538 lea 45538 ,%a4 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; 438a0: 2544 000c movel %d4,%a2@(12) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 438a4: 486a 0014 pea %a2@(20) rtems_build_name ('T', 'R', 'i', c), 438a8: 1039 0005 aefc moveb 5aefc ,%d0 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 438ae: 42a7 clrl %sp@- 438b0: 4878 0054 pea 54 rtems_build_name ('T', 'R', 'i', c), 438b4: 49c0 extbl %d0 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 438b6: 4878 0001 pea 1 438ba: 0080 5452 6900 oril #1414686976,%d0 438c0: 2f00 movel %d0,%sp@- 438c2: 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) 438c4: 4fef 0014 lea %sp@(20),%sp 438c8: 4a80 tstl %d0 438ca: 6600 0228 bnew 43af4 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 438ce: 486a 0018 pea %a2@(24) rtems_build_name ('T', 'R', 'o', c), 438d2: 1039 0005 aefc moveb 5aefc ,%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 ( 438d8: 42a7 clrl %sp@- 438da: 4878 0054 pea 54 rtems_build_name ('T', 'R', 'o', c), 438de: 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 ( 438e0: 4878 0001 pea 1 438e4: 0080 5452 6f00 oril #1414688512,%d0 438ea: 2f00 movel %d0,%sp@- 438ec: 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) 438ee: 4fef 0014 lea %sp@(20),%sp 438f2: 4a80 tstl %d0 438f4: 6600 01fe bnew 43af4 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 438f8: 486a 008c pea %a2@(140) rtems_build_name ('T', 'R', 'x', c), 438fc: 1039 0005 aefc moveb 5aefc ,%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 ( 43902: 42a7 clrl %sp@- 43904: 4878 0020 pea 20 rtems_build_name ('T', 'R', 'x', c), 43908: 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 ( 4390a: 0080 5452 7800 oril #1414690816,%d0 43910: 42a7 clrl %sp@- 43912: 2f00 movel %d0,%sp@- 43914: 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) 43916: 4fef 0014 lea %sp@(20),%sp 4391a: 4a80 tstl %d0 4391c: 6600 01d6 bnew 43af4 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 43920: 42aa 0094 clrl %a2@(148) /* * Set callbacks */ tty->device = *callbacks; 43924: 4878 0020 pea 20 43928: 2f2e 0014 movel %fp@(20),%sp@- 4392c: 486a 0098 pea %a2@(152) 43930: 4eb9 0004 c5a4 jsr 4c5a4 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 43936: 4fef 000c lea %sp@(12),%sp 4393a: 7002 moveq #2,%d0 4393c: b0aa 00b4 cmpl %a2@(180),%d0 43940: 6662 bnes 439a4 sc = rtems_task_create ( 43942: 486a 00c8 pea %a2@(200) 43946: 49f9 0004 5928 lea 45928 ,%a4 rtems_build_name ('T', 'x', 'T', c), 4394c: 1039 0005 aefc moveb 5aefc ,%d0 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 43952: 42a7 clrl %sp@- 43954: 4878 0500 pea 500 rtems_build_name ('T', 'x', 'T', c), 43958: 49c0 extbl %d0 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 4395a: 4878 0400 pea 400 4395e: 4878 000a pea a 43962: 0080 5478 5400 oril #1417171968,%d0 43968: 2f00 movel %d0,%sp@- 4396a: 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) 4396c: 4fef 0018 lea %sp@(24),%sp 43970: 4a80 tstl %d0 43972: 6600 0180 bnew 43af4 rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 43976: 486a 00c4 pea %a2@(196) rtems_build_name ('R', 'x', 'T', c), 4397a: 1039 0005 aefc moveb 5aefc ,%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 ( 43980: 42a7 clrl %sp@- 43982: 4878 0500 pea 500 rtems_build_name ('R', 'x', 'T', c), 43986: 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 ( 43988: 4878 0400 pea 400 4398c: 4878 0009 pea 9 43990: 0080 5278 5400 oril #1383617536,%d0 43996: 2f00 movel %d0,%sp@- 43998: 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) 4399a: 4fef 0018 lea %sp@(24),%sp 4399e: 4a80 tstl %d0 439a0: 6600 0152 bnew 43af4 rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 439a4: 4aaa 00a0 tstl %a2@(160) 439a8: 6708 beqs 439b2 439aa: 7202 moveq #2,%d1 439ac: b2aa 00b4 cmpl %a2@(180),%d1 439b0: 662c bnes 439de (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 439b2: 486a 0068 pea %a2@(104) rtems_build_name ('T', 'R', 'r', c), 439b6: 1039 0005 aefc moveb 5aefc ,%d0 rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 439bc: 42a7 clrl %sp@- 439be: 4878 0024 pea 24 rtems_build_name ('T', 'R', 'r', c), 439c2: 49c0 extbl %d0 rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 439c4: 0080 5452 7200 oril #1414689280,%d0 439ca: 42a7 clrl %sp@- 439cc: 2f00 movel %d0,%sp@- 439ce: 4eb9 0004 5538 jsr 45538 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 439d4: 4fef 0014 lea %sp@(20),%sp 439d8: 4a80 tstl %d0 439da: 6600 0118 bnew 43af4 /* * 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; 439de: 203c 0000 08bd movel #2237,%d0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 439e4: 307c 2502 moveaw #9474,%a0 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 439e8: 327c 1805 moveaw #6149,%a1 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 439ec: 2540 0038 movel %d0,%a2@(56) tty->termios.c_lflag = 439f0: 223c 0000 823b movel #33339,%d1 ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 439f6: 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 = 439f8: 2541 003c movel %d1,%a2@(60) ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 439fc: 1540 0041 moveb %d0,%a2@(65) tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; 43a00: 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; 43a02: 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'; 43a06: 1540 0043 moveb %d0,%a2@(67) tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; 43a0a: 7004 moveq #4,%d0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 43a0c: 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'; 43a10: 1540 0045 moveb %d0,%a2@(69) tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 43a14: 7011 moveq #17,%d0 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 43a16: 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'; 43a1a: 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'; 43a1c: 1540 0049 moveb %d0,%a2@(73) tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 43a20: 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'; 43a22: 1541 0042 moveb %d1,%a2@(66) tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; 43a26: 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'; 43a28: 1540 004b moveb %d0,%a2@(75) tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 43a2c: 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'; 43a2e: 1541 0044 moveb %d1,%a2@(68) tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 43a32: 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'; 43a34: 1540 004e moveb %d0,%a2@(78) tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 43a38: 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'; 43a3a: 1541 004c moveb %d1,%a2@(76) tty->termios.c_cc[VEOL2] = '\000'; 43a3e: 1541 0051 moveb %d1,%a2@(81) tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 43a42: 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'; 43a44: 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; 43a48: 202a 0064 movel %a2@(100),%d0 43a4c: 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'; 43a4e: 1541 004a moveb %d1,%a2@(74) tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 43a52: 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; 43a54: 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'; 43a58: 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; 43a5c: 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'; 43a60: 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; 43a62: 2540 00bc movel %d0,%a2@(188) tty->highwater = tty->rawInBuf.Size * 3/4; 43a66: 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'; 43a68: 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; 43a6c: e488 lsrl #2,%d0 43a6e: 2540 00c0 movel %d0,%a2@(192) /* * Bump name characer */ if (c++ == 'z') 43a72: 1039 0005 aefc moveb 5aefc ,%d0 43a78: 49c0 extbl %d0 43a7a: 2200 movel %d0,%d1 43a7c: 5281 addql #1,%d1 43a7e: 13c1 0005 aefc moveb %d1,5aefc 43a84: 727a moveq #122,%d1 43a86: b280 cmpl %d0,%d1 43a88: 6608 bnes 43a92 <== ALWAYS TAKEN c = 'a'; 43a8a: 7061 moveq #97,%d0 <== NOT EXECUTED 43a8c: 13c0 0005 aefc moveb %d0,5aefc <== NOT EXECUTED } args->iop->data1 = tty; 43a92: 2247 moveal %d7,%a1 43a94: 2051 moveal %a1@,%a0 if (!tty->refcount++) { 43a96: 202b 0008 movel %a3@(8),%d0 43a9a: 2200 movel %d0,%d1 43a9c: 5281 addql #1,%d1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 43a9e: 214b 0034 movel %a3,%a0@(52) if (!tty->refcount++) { 43aa2: 2741 0008 movel %d1,%a3@(8) 43aa6: 4a80 tstl %d0 43aa8: 6652 bnes 43afc if (tty->device.firstOpen) 43aaa: 206b 0098 moveal %a3@(152),%a0 43aae: 4a88 tstl %a0 43ab0: 670c beqs 43abe (*tty->device.firstOpen)(major, minor, arg); 43ab2: 2f07 movel %d7,%sp@- 43ab4: 2f05 movel %d5,%sp@- 43ab6: 2f04 movel %d4,%sp@- 43ab8: 4e90 jsr %a0@ 43aba: 4fef 000c lea %sp@(12),%sp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 43abe: 7002 moveq #2,%d0 43ac0: b0ab 00b4 cmpl %a3@(180),%d0 43ac4: 6636 bnes 43afc sc = rtems_task_start( 43ac6: 2f0b movel %a3,%sp@- 43ac8: 487a 112a pea %pc@(44bf4 ) 43acc: 45f9 0004 5ba4 lea 45ba4 ,%a2 43ad2: 2f2b 00c4 movel %a3@(196),%sp@- 43ad6: 4e92 jsr %a2@ tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 43ad8: 4fef 000c lea %sp@(12),%sp 43adc: 4a80 tstl %d0 43ade: 6614 bnes 43af4 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_start( 43ae0: 2f0b movel %a3,%sp@- 43ae2: 487a 1334 pea %pc@(44e18 ) 43ae6: 2f2b 00c8 movel %a3@(200),%sp@- 43aea: 4e92 jsr %a2@ tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 43aec: 4fef 000c lea %sp@(12),%sp 43af0: 4a80 tstl %d0 43af2: 6708 beqs 43afc <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 43af4: 2f00 movel %d0,%sp@- 43af6: 4eb9 0004 5df8 jsr 45df8 } } rtems_semaphore_release (rtems_termios_ttyMutex); 43afc: 2f39 0005 c4ac movel 5c4ac ,%sp@- 43b02: 4eb9 0004 5878 jsr 45878 return RTEMS_SUCCESSFUL; 43b08: 588f addql #4,%sp } 43b0a: 2002 movel %d2,%d0 43b0c: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 43b12: 4e5e unlk %fp 43b14: 4e75 rts static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 43b16: 4878 00e8 pea e8 43b1a: 4878 0001 pea 1 43b1e: 4eb9 0004 2444 jsr 42444 if (tty == NULL) { 43b24: 508f addql #8,%sp static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 43b26: 2640 moveal %d0,%a3 43b28: 2440 moveal %d0,%a2 if (tty == NULL) { 43b2a: 4a80 tstl %d0 43b2c: 6600 fc84 bnew 437b2 43b30: 6000 fc70 braw 437a2 <== NOT EXECUTED =============================================================================== 00043fce : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43fce: 4e56 ffe0 linkw %fp,#-32 43fd2: 202e 0008 movel %fp@(8),%d0 43fd6: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 43fda: 242e 000c movel %fp@(12),%d2 const unsigned char *buf = _buf; 43fde: 2640 moveal %d0,%a3 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43fe0: 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) { 43fe4: 4aaa 00b4 tstl %a2@(180) 43fe8: 661c bnes 44006 (*tty->device.write)(tty->minor, (void *)buf, len); 43fea: 2d42 0010 movel %d2,%fp@(16) 43fee: 2d40 000c movel %d0,%fp@(12) 43ff2: 2d6a 0010 0008 movel %a2@(16),%fp@(8) 43ff8: 226a 00a4 moveal %a2@(164),%a1 tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43ffc: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44002: 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); 44004: 4ed1 jmp %a1@ return; } newHead = tty->rawOutBuf.Head; 44006: 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); 4400a: 2a3c 0000 0700 movel #1792,%d5 while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 44010: 49f9 0004 5770 lea 45770 ,%a4 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 44016: 6000 009e braw 440b6 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 4401a: 202a 0088 movel %a2@(136),%d0 4401e: 5286 addql #1,%d6 44020: 4c40 6004 remul %d0,%d4,%d6 rtems_interrupt_disable (level); 44024: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 44026: 2c04 movel %d4,%d6 rtems_interrupt_disable (level); 44028: 40c3 movew %sr,%d3 4402a: 8083 orl %d3,%d0 4402c: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 4402e: 602a bras 4405a tty->rawOutBufState = rob_wait; 44030: 7002 moveq #2,%d0 44032: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 44036: 46c3 movew %d3,%sr sc = rtems_semaphore_obtain( 44038: 42a7 clrl %sp@- 4403a: 42a7 clrl %sp@- 4403c: 2f2a 008c movel %a2@(140),%sp@- 44040: 4e94 jsr %a4@ tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44042: 4fef 000c lea %sp@(12),%sp 44046: 4a80 tstl %d0 44048: 6708 beqs 44052 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 4404a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4404c: 4eb9 0004 5df8 jsr 45df8 <== NOT EXECUTED rtems_interrupt_disable (level); 44052: 2005 movel %d5,%d0 44054: 40c3 movew %sr,%d3 44056: 8083 orl %d3,%d0 44058: 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) { 4405a: 202a 0084 movel %a2@(132),%d0 4405e: b084 cmpl %d4,%d0 44060: 67ce beqs 44030 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++; 44062: 202a 0080 movel %a2@(128),%d0 44066: 206a 007c moveal %a2@(124),%a0 4406a: 119b 0800 moveb %a3@+,%a0@(00000000,%d0:l) tty->rawOutBuf.Head = newHead; 4406e: 2544 0080 movel %d4,%a2@(128) if (tty->rawOutBufState == rob_idle) { 44072: 4aaa 0094 tstl %a2@(148) 44076: 663a bnes 440b2 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 44078: 202a 00b8 movel %a2@(184),%d0 4407c: 0800 0004 btst #4,%d0 44080: 661e bnes 440a0 <== NEVER TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 44082: 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, 44086: 4878 0001 pea 1 4408a: d0aa 007c addl %a2@(124),%d0 4408e: 2f00 movel %d0,%sp@- 44090: 2f2a 0010 movel %a2@(16),%sp@- 44094: 206a 00a4 moveal %a2@(164),%a0 44098: 4e90 jsr %a0@ 4409a: 4fef 000c lea %sp@(12),%sp 4409e: 600c bras 440ac (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 440a0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 440a4: 7220 moveq #32,%d1 <== NOT EXECUTED 440a6: 8081 orl %d1,%d0 <== NOT EXECUTED 440a8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 440ac: 7001 moveq #1,%d0 440ae: 2540 0094 movel %d0,%a2@(148) } rtems_interrupt_enable (level); 440b2: 46c3 movew %d3,%sr len--; 440b4: 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) { 440b6: 4a82 tstl %d2 440b8: 6600 ff60 bnew 4401a tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 440bc: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 440c2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000446b2 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 446b2: 4e56 ffd4 linkw %fp,#-44 446b6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 446ba: 266e 0008 moveal %fp@(8),%a3 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 446be: 2053 moveal %a3@,%a0 uint32_t count = args->count; 446c0: 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; 446c4: 2468 0034 moveal %a0@(52),%a2 uint32_t count = args->count; char *buffer = args->buffer; 446c8: 2a6b 000c moveal %a3@(12),%a5 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 446cc: 42a7 clrl %sp@- 446ce: 42a7 clrl %sp@- 446d0: 2f2a 0014 movel %a2@(20),%sp@- 446d4: 4eb9 0004 5770 jsr 45770 if (sc != RTEMS_SUCCESSFUL) 446da: 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); 446de: 2800 movel %d0,%d4 if (sc != RTEMS_SUCCESSFUL) 446e0: 6600 029a bnew 4497c return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 446e4: 202a 00cc movel %a2@(204),%d0 446e8: eb88 lsll #5,%d0 446ea: 0680 0005 bc78 addil #375928,%d0 446f0: 2240 moveal %d0,%a1 446f2: 2051 moveal %a1@,%a0 446f4: 4a88 tstl %a0 446f6: 671e beqs 44716 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 446f8: 2f0b movel %a3,%sp@- 446fa: 2f0a movel %a2,%sp@- 446fc: 4e90 jsr %a0@ 446fe: 2800 movel %d0,%d4 tty->tty_rcvwakeup = 0; 44700: 42aa 00e4 clrl %a2@(228) rtems_semaphore_release (tty->isem); 44704: 2f2a 0014 movel %a2@(20),%sp@- 44708: 4eb9 0004 5878 jsr 45878 return sc; 4470e: 4fef 000c lea %sp@(12),%sp 44712: 6000 0268 braw 4497c } if (tty->cindex == tty->ccount) { 44716: 202a 0020 movel %a2@(32),%d0 4471a: b0aa 0024 cmpl %a2@(36),%d0 4471e: 6600 0234 bnew 44954 tty->cindex = tty->ccount = 0; 44722: 42aa 0020 clrl %a2@(32) tty->read_start_column = tty->column; 44726: 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; 4472c: 42aa 0024 clrl %a2@(36) tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && 44730: 4aaa 00a0 tstl %a2@(160) 44734: 6700 00da beqw 44810 44738: 4aaa 00b4 tstl %a2@(180) 4473c: 6600 00d2 bnew 44810 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 44740: 7002 moveq #2,%d0 44742: c0aa 003c andl %a2@(60),%d0 44746: 673e beqs 44786 <== NEVER TAKEN for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 44748: 49f9 0004 5c4c lea 45c4c ,%a4 } else { if (siproc (n, tty)) 4474e: 243c 0004 4592 movel #279954,%d2 { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 44754: 2f2a 0010 movel %a2@(16),%sp@- 44758: 206a 00a0 moveal %a2@(160),%a0 4475c: 4e90 jsr %a0@ if (n < 0) { 4475e: 588f addql #4,%sp 44760: 4a80 tstl %d0 44762: 6c0a bges 4476e rtems_task_wake_after (1); 44764: 4878 0001 pea 1 44768: 4e94 jsr %a4@ 4476a: 588f addql #4,%sp 4476c: 60e6 bras 44754 } else { if (siproc (n, tty)) 4476e: 2f0a movel %a2,%sp@- 44770: 2042 moveal %d2,%a0 44772: 0280 0000 00ff andil #255,%d0 44778: 2f00 movel %d0,%sp@- 4477a: 4e90 jsr %a0@ 4477c: 508f addql #8,%sp 4477e: 4a80 tstl %d0 44780: 67d2 beqs 44754 44782: 6000 01d0 braw 44954 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 44786: 49f9 0004 5154 lea 45154 ,%a4<== NOT EXECUTED 4478c: 4e94 jsr %a4@ <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 4478e: 2c3c 0004 5c4c movel #285772,%d6 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 44794: 2400 movel %d0,%d2 <== NOT EXECUTED break; } } rtems_task_wake_after (1); } else { siproc (n, tty); 44796: 2a3c 0004 4592 movel #279954,%d5 <== NOT EXECUTED } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 4479c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 447a0: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 447a4: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 447a6: 588f addql #4,%sp <== NOT EXECUTED 447a8: 4a80 tstl %d0 <== NOT EXECUTED 447aa: 6c34 bges 447e0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 447ac: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 447b0: 670e beqs 447c0 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 447b2: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 447b6: 671c beqs 447d4 <== NOT EXECUTED 447b8: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 447bc: 6716 beqs 447d4 <== NOT EXECUTED 447be: 6008 bras 447c8 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 447c0: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 447c4: 6700 018e beqw 44954 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 447c8: 4e94 jsr %a4@ <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 447ca: 9082 subl %d2,%d0 <== NOT EXECUTED 447cc: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 447d0: 6200 0182 bhiw 44954 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 447d4: 4878 0001 pea 1 <== NOT EXECUTED 447d8: 2246 moveal %d6,%a1 <== NOT EXECUTED 447da: 4e91 jsr %a1@ <== NOT EXECUTED 447dc: 588f addql #4,%sp <== NOT EXECUTED 447de: 60bc bras 4479c <== NOT EXECUTED } else { siproc (n, tty); 447e0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 447e2: 2045 moveal %d5,%a0 <== NOT EXECUTED 447e4: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 447ea: 2f00 movel %d0,%sp@- <== NOT EXECUTED 447ec: 4e90 jsr %a0@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 447ee: 508f addql #8,%sp <== NOT EXECUTED 447f0: 4281 clrl %d1 <== NOT EXECUTED 447f2: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 447f6: 1200 moveb %d0,%d1 <== NOT EXECUTED 447f8: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED 447fc: 6f00 0156 blew 44954 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 44800: 4a00 tstb %d0 <== NOT EXECUTED 44802: 6798 beqs 4479c <== NOT EXECUTED 44804: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 44808: 6792 beqs 4479c <== NOT EXECUTED then = rtems_clock_get_ticks_since_boot(); 4480a: 4e94 jsr %a4@ <== NOT EXECUTED 4480c: 2400 movel %d0,%d2 <== NOT EXECUTED 4480e: 608c bras 4479c <== NOT EXECUTED 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)( 44810: 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; 44812: 7401 moveq #1,%d2 44814: 49fa fd7c lea %pc@(44592 ),%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)( 44818: 0687 0000 0049 addil #73,%d7 /* * Wait for characters */ if ( wait ) { sc = rtems_semaphore_obtain( 4481e: 2c3c 0004 5770 movel #284528,%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; 44824: 2a2a 0074 movel %a2@(116),%d5 44828: 6000 00e2 braw 4490c 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; 4482c: 2a2a 005c movel %a2@(92),%d5 44830: 5285 addql #1,%d5 44832: 202a 0064 movel %a2@(100),%d0 c = tty->rawInBuf.theBuf[newHead]; 44836: 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; 4483a: 4c40 5001 remul %d0,%d1,%d5 c = tty->rawInBuf.theBuf[newHead]; 4483e: 1030 1800 moveb %a0@(00000000,%d1:l),%d0 tty->rawInBuf.Head = newHead; 44842: 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]; 44846: 1d40 ffff moveb %d0,%fp@(-1) tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 4484a: 202a 0060 movel %a2@(96),%d0 4484e: 226a 0064 moveal %a2@(100),%a1 44852: 43f1 0800 lea %a1@(00000000,%d0:l),%a1 44856: 93c1 subal %d1,%a1 % tty->rawInBuf.Size) 44858: 2a09 movel %a1,%d5 4485a: 206a 0064 moveal %a2@(100),%a0 4485e: 2008 movel %a0,%d0 44860: 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) 44864: b2aa 00bc cmpl %a2@(188),%d1 44868: 646a bccs 448d4 <== NEVER TAKEN % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 4486a: 202a 00b8 movel %a2@(184),%d0 4486e: 72fe moveq #-2,%d1 44870: c081 andl %d1,%d0 44872: 2540 00b8 movel %d0,%a2@(184) /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 44876: 202a 00b8 movel %a2@(184),%d0 4487a: 0280 0000 0202 andil #514,%d0 44880: 0c80 0000 0202 cmpil #514,%d0 44886: 6626 bnes 448ae <== ALWAYS TAKEN == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) 44888: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4488c: 670a beqs 44898 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 4488e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44892: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44896: 6716 beqs 448ae <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 44898: 4878 0001 pea 1 <== NOT EXECUTED 4489c: 2f07 movel %d7,%sp@- <== NOT EXECUTED 4489e: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 448a2: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 448a6: 4e90 jsr %a0@ <== NOT EXECUTED 448a8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 448ac: 6026 bras 448d4 <== NOT EXECUTED tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 448ae: 202a 00b8 movel %a2@(184),%d0 448b2: 0800 0008 btst #8,%d0 448b6: 671c beqs 448d4 <== ALWAYS TAKEN tty->flow_ctrl &= ~FL_IRTSOFF; 448b8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448bc: 7afb moveq #-5,%d5 <== NOT EXECUTED 448be: c085 andl %d5,%d0 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 448c0: 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; 448c4: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 448c8: 4a88 tstl %a0 <== NOT EXECUTED 448ca: 6708 beqs 448d4 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 448cc: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 448d0: 4e90 jsr %a0@ <== NOT EXECUTED 448d2: 588f addql #4,%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 448d4: 7002 moveq #2,%d0 448d6: 4285 clrl %d5 448d8: 1a2e ffff moveb %fp@(-1),%d5 448dc: c0aa 003c andl %a2@(60),%d0 448e0: 670e beqs 448f0 <== NEVER TAKEN if (siproc (c, tty)) 448e2: 2f0a movel %a2,%sp@- 448e4: 2f05 movel %d5,%sp@- 448e6: 4e94 jsr %a4@ 448e8: 508f addql #8,%sp wait = 0; 448ea: 4a80 tstl %d0 448ec: 57c0 seq %d0 448ee: 6014 bras 44904 } else { siproc (c, tty); 448f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 448f2: 2f05 movel %d5,%sp@- <== NOT EXECUTED 448f4: 4e94 jsr %a4@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 448f6: 508f addql #8,%sp <== NOT EXECUTED 448f8: 4280 clrl %d0 <== NOT EXECUTED 448fa: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED wait = 0; 448fe: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44902: 5ec0 sgt %d0 <== NOT EXECUTED 44904: 49c0 extbl %d0 44906: c480 andl %d0,%d2 } timeout = tty->rawInBufSemaphoreTimeout; 44908: 2a2a 0070 movel %a2@(112),%d5 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4490c: 222a 005c movel %a2@(92),%d1 44910: 202a 0060 movel %a2@(96),%d0 44914: b081 cmpl %d1,%d0 44916: 6710 beqs 44928 (tty->ccount < (CBUFSIZE-1))) { 44918: 2039 0005 aef0 movel 5aef0 ,%d0 4491e: 5380 subql #1,%d0 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 44920: b0aa 0020 cmpl %a2@(32),%d0 44924: 6e00 ff06 bgtw 4482c } /* * Wait for characters */ if ( wait ) { 44928: 4a82 tstl %d2 4492a: 6728 beqs 44954 sc = rtems_semaphore_obtain( 4492c: 2f05 movel %d5,%sp@- 4492e: 2f2a 006c movel %a2@(108),%sp@- 44932: 2046 moveal %d6,%a0 44934: 2f2a 0068 movel %a2@(104),%sp@- 44938: 4e90 jsr %a0@ tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 4493a: 4fef 000c lea %sp@(12),%sp 4493e: 4a80 tstl %d0 44940: 67ca beqs 4490c <== ALWAYS TAKEN 44942: 6010 bras 44954 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 44944: 206a 001c moveal %a2@(28),%a0 count--; 44948: 5383 subql #1,%d3 if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 4494a: 1af0 0800 moveb %a0@(00000000,%d0:l),%a5@+ 4494e: 5280 addql #1,%d0 44950: 2540 0024 movel %d0,%a2@(36) sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 44954: 4a83 tstl %d3 44956: 670a beqs 44962 <== NEVER TAKEN 44958: 202a 0024 movel %a2@(36),%d0 4495c: b0aa 0020 cmpl %a2@(32),%d0 44960: 6de2 blts 44944 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 44962: 202b 0010 movel %a3@(16),%d0 44966: 9083 subl %d3,%d0 44968: 2740 0018 movel %d0,%a3@(24) tty->tty_rcvwakeup = 0; 4496c: 42aa 00e4 clrl %a2@(228) rtems_semaphore_release (tty->isem); 44970: 2f2a 0014 movel %a2@(20),%sp@- 44974: 4eb9 0004 5878 jsr 45878 return sc; 4497a: 588f addql #4,%sp } 4497c: 2004 movel %d4,%d0 4497e: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 44984: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044c64 : * 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) { 44c64: 4e56 fff4 linkw %fp,#-12 44c68: 48d7 040c moveml %d2-%d3/%a2,%sp@ 44c6c: 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)) 44c70: 202a 00b8 movel %a2@(184),%d0 44c74: 0280 0000 0403 andil #1027,%d0 44c7a: 0c80 0000 0401 cmpil #1025,%d0 44c80: 663c bnes 44cbe <== ALWAYS TAKEN == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); 44c82: 4878 0001 pea 1 <== NOT EXECUTED 44c86: 486a 004a pea %a2@(74) <== NOT EXECUTED 44c8a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44c8e: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44c92: 4e90 jsr %a0@ <== NOT EXECUTED rtems_interrupt_disable(level); 44c94: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 44c9a: 40c1 movew %sr,%d1 <== NOT EXECUTED 44c9c: 8081 orl %d1,%d0 <== NOT EXECUTED 44c9e: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; 44ca0: 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--; 44ca2: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 44ca6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44caa: 8082 orl %d2,%d0 <== NOT EXECUTED 44cac: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 44cb0: 46c1 movew %d1,%sr <== NOT EXECUTED 44cb2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED nToSend = 1; 44cb6: 143c 0001 moveb #1,%d2 <== NOT EXECUTED 44cba: 6000 0150 braw 44e0c <== NOT EXECUTED } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 44cbe: 202a 00b8 movel %a2@(184),%d0 44cc2: 7203 moveq #3,%d1 44cc4: 7402 moveq #2,%d2 44cc6: c081 andl %d1,%d0 44cc8: b480 cmpl %d0,%d2 44cca: 663a bnes 44d06 <== 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); 44ccc: 4878 0001 pea 1 <== NOT EXECUTED 44cd0: 486a 0049 pea %a2@(73) <== NOT EXECUTED 44cd4: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44cd8: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44cdc: 4e90 jsr %a0@ <== NOT EXECUTED rtems_interrupt_disable(level); 44cde: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 44ce4: 40c1 movew %sr,%d1 <== NOT EXECUTED 44ce6: 8081 orl %d1,%d0 <== NOT EXECUTED 44ce8: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; 44cea: 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--; 44cec: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 44cf0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44cf4: c082 andl %d2,%d0 <== NOT EXECUTED 44cf6: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 44cfa: 46c1 movew %d1,%sr <== NOT EXECUTED nToSend = 1; 44cfc: 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); 44cfe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44d02: 6000 0108 braw 44e0c <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 44d06: 222a 0080 movel %a2@(128),%d1 44d0a: 202a 0084 movel %a2@(132),%d0 44d0e: b081 cmpl %d1,%d0 44d10: 661a bnes 44d2c /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 44d12: 7002 moveq #2,%d0 44d14: b0aa 0094 cmpl %a2@(148),%d0 44d18: 6600 00f0 bnew 44e0a /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 44d1c: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 44d20: 4eb9 0004 5878 jsr 45878 <== NOT EXECUTED 44d26: 588f addql #4,%sp <== NOT EXECUTED 44d28: 6000 00e0 braw 44e0a <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 44d2c: 203c 0000 0700 movel #1792,%d0 44d32: 40c1 movew %sr,%d1 44d34: 8081 orl %d1,%d0 44d36: 46c0 movew %d0,%sr len = tty->t_dqlen; 44d38: 206a 0090 moveal %a2@(144),%a0 tty->t_dqlen = 0; 44d3c: 42aa 0090 clrl %a2@(144) rtems_interrupt_enable(level); 44d40: 46c1 movew %d1,%sr newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 44d42: 222a 0084 movel %a2@(132),%d1 44d46: d288 addl %a0,%d1 44d48: 202a 0088 movel %a2@(136),%d0 44d4c: 4c40 1003 remul %d0,%d3,%d1 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 44d50: 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; 44d52: 2543 0084 movel %d3,%a2@(132) if (tty->rawOutBufState == rob_wait) { 44d56: b2aa 0094 cmpl %a2@(148),%d1 44d5a: 660c bnes 44d68 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 44d5c: 2f2a 008c movel %a2@(140),%sp@- 44d60: 4eb9 0004 5878 jsr 45878 44d66: 588f addql #4,%sp } if (newTail == tty->rawOutBuf.Head) { 44d68: 202a 0080 movel %a2@(128),%d0 44d6c: b083 cmpl %d3,%d0 44d6e: 661c bnes 44d8c nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 44d70: 206a 00d4 moveal %a2@(212),%a0 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 44d74: 42aa 0094 clrl %a2@(148) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 44d78: 4a88 tstl %a0 44d7a: 6700 0086 beqw 44e02 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 44d7e: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED 44d82: 486a 0030 pea %a2@(48) <== NOT EXECUTED 44d86: 4e90 jsr %a0@ <== NOT EXECUTED 44d88: 508f addql #8,%sp <== NOT EXECUTED 44d8a: 6076 bras 44e02 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 44d8c: 202a 00b8 movel %a2@(184),%d0 44d90: 0280 0000 0210 andil #528,%d0 44d96: 0c80 0000 0210 cmpil #528,%d0 44d9c: 6622 bnes 44dc0 <== 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); 44d9e: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 44da2: 40c1 movew %sr,%d1 <== NOT EXECUTED 44da4: 8081 orl %d1,%d0 <== NOT EXECUTED 44da6: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 44da8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44dac: 7420 moveq #32,%d2 <== NOT EXECUTED 44dae: 8082 orl %d2,%d0 <== NOT EXECUTED 44db0: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 44db4: 7001 moveq #1,%d0 <== NOT EXECUTED 44db6: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED rtems_interrupt_enable(level); 44dba: 46c1 movew %d1,%sr <== NOT EXECUTED nToSend = 0; 44dbc: 4202 clrb %d2 <== NOT EXECUTED 44dbe: 6044 bras 44e04 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 44dc0: 202a 0080 movel %a2@(128),%d0 44dc4: b083 cmpl %d3,%d0 44dc6: 6406 bccs 44dce nToSend = tty->rawOutBuf.Size - newTail; 44dc8: 242a 0088 movel %a2@(136),%d2 44dcc: 6004 bras 44dd2 else nToSend = tty->rawOutBuf.Head - newTail; 44dce: 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)) { 44dd2: 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; 44dd6: 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)) { 44dd8: 0280 0000 0600 andil #1536,%d0 44dde: 6702 beqs 44de2 nToSend = 1; 44de0: 7401 moveq #1,%d2 } tty->rawOutBufState = rob_busy; /*apm*/ 44de2: 7201 moveq #1,%d1 44de4: 2541 0094 movel %d1,%a2@(148) (*tty->device.write)( 44de8: 2f02 movel %d2,%sp@- 44dea: 202a 007c movel %a2@(124),%d0 44dee: d083 addl %d3,%d0 44df0: 2f00 movel %d0,%sp@- 44df2: 2f2a 0010 movel %a2@(16),%sp@- 44df6: 206a 00a4 moveal %a2@(164),%a0 44dfa: 4e90 jsr %a0@ 44dfc: 4fef 000c lea %sp@(12),%sp 44e00: 6002 bras 44e04 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; 44e02: 4282 clrl %d2 } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 44e04: 2543 0084 movel %d3,%a2@(132) 44e08: 6002 bras 44e0c /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 44e0a: 4282 clrl %d2 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 44e0c: 2002 movel %d2,%d0 44e0e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 44e14: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044bf4 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 44bf4: 4e56 ffe0 linkw %fp,#-32 44bf8: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ while (1) { /* * wait for rtems event */ rtems_event_receive( 44bfc: 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); 44bfe: 240e movel %fp,%d2 while (1) { /* * wait for rtems event */ rtems_event_receive( 44c00: 5d83 subql #6,%d3 44c02: 4bf9 0004 51bc lea 451bc ,%a5 RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { tty->rxTaskId = 0; rtems_task_delete(RTEMS_SELF); 44c08: 49f9 0004 5a4c lea 45a4c ,%a4 if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 44c0e: 5382 subql #1,%d2 44c10: 47f9 0004 49a4 lea 449a4 ,%a3 /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 44c16: 246e 0008 moveal %fp@(8),%a2 while (1) { /* * wait for rtems event */ rtems_event_receive( 44c1a: 2f03 movel %d3,%sp@- 44c1c: 42a7 clrl %sp@- 44c1e: 4878 0002 pea 2 44c22: 4878 0003 pea 3 44c26: 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) { 44c28: 4fef 0010 lea %sp@(16),%sp 44c2c: 7001 moveq #1,%d0 44c2e: c0ae fffa andl %fp@(-6),%d0 44c32: 670a beqs 44c3e <== ALWAYS TAKEN tty->rxTaskId = 0; 44c34: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 44c38: 42a7 clrl %sp@- <== NOT EXECUTED 44c3a: 4e94 jsr %a4@ <== NOT EXECUTED 44c3c: 588f addql #4,%sp <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); 44c3e: 2f2a 0010 movel %a2@(16),%sp@- 44c42: 206a 00a0 moveal %a2@(160),%a0 44c46: 4e90 jsr %a0@ if (c != EOF) { 44c48: 588f addql #4,%sp 44c4a: 72ff moveq #-1,%d1 44c4c: b280 cmpl %d0,%d1 44c4e: 67ca beqs 44c1a <== NEVER TAKEN /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 44c50: 4878 0001 pea 1 c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 44c54: 1d40 ffff moveb %d0,%fp@(-1) rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 44c58: 2f02 movel %d2,%sp@- 44c5a: 2f0a movel %a2,%sp@- 44c5c: 4e93 jsr %a3@ 44c5e: 4fef 000c lea %sp@(12),%sp 44c62: 60b6 bras 44c1a =============================================================================== 000466b4 : int rtems_termios_set_initial_baud( struct rtems_termios_tty *ttyp, int32_t baud ) { 466b4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 466b8: 2f0a movel %a2,%sp@- <== NOT EXECUTED int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); 466ba: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED int rtems_termios_set_initial_baud( struct rtems_termios_tty *ttyp, int32_t baud ) { 466be: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); 466c2: 4eb9 0004 4d84 jsr 44d84 <== NOT EXECUTED if ( cflags_baud == -1 ) 466c8: 588f addql #4,%sp <== NOT EXECUTED 466ca: 72ff moveq #-1,%d1 <== NOT EXECUTED 466cc: b280 cmpl %d0,%d1 <== NOT EXECUTED 466ce: 6714 beqs 466e4 <== NOT EXECUTED return -1; ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; 466d0: 222a 0038 movel %a2@(56),%d1 <== NOT EXECUTED 466d4: 0281 ffff eff0 andil #-4112,%d1 <== NOT EXECUTED 466da: 8081 orl %d1,%d0 <== NOT EXECUTED 466dc: 2540 0038 movel %d0,%a2@(56) <== NOT EXECUTED return 0; 466e0: 4280 clrl %d0 <== NOT EXECUTED 466e2: 6002 bras 466e6 <== NOT EXECUTED { int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); if ( cflags_baud == -1 ) return -1; 466e4: 70ff moveq #-1,%d0 <== NOT EXECUTED ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; return 0; } 466e6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 466ea: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00044e18 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 44e18: 4e56 ffe8 linkw %fp,#-24 44e1c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ while (1) { /* * wait for rtems event */ rtems_event_receive( 44e20: 240e movel %fp,%d2 44e22: 5982 subql #4,%d2 44e24: 4bf9 0004 51bc lea 451bc ,%a5 RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; rtems_task_delete(RTEMS_SELF); 44e2a: 49f9 0004 5a4c lea 45a4c ,%a4 } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 44e30: 47f9 0004 4c64 lea 44c64 ,%a3 /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 44e36: 246e 0008 moveal %fp@(8),%a2 while (1) { /* * wait for rtems event */ rtems_event_receive( 44e3a: 2f02 movel %d2,%sp@- 44e3c: 42a7 clrl %sp@- 44e3e: 4878 0002 pea 2 44e42: 4878 0003 pea 3 44e46: 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) { 44e48: 4fef 0010 lea %sp@(16),%sp 44e4c: 7001 moveq #1,%d0 44e4e: c0ae fffc andl %fp@(-4),%d0 44e52: 670a beqs 44e5e <== ALWAYS TAKEN tty->txTaskId = 0; 44e54: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 44e58: 42a7 clrl %sp@- <== NOT EXECUTED 44e5a: 4e94 jsr %a4@ <== NOT EXECUTED 44e5c: 588f addql #4,%sp <== NOT EXECUTED } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 44e5e: 202a 00cc movel %a2@(204),%d0 44e62: eb88 lsll #5,%d0 44e64: 0680 0005 bc84 addil #375940,%d0 44e6a: 2240 moveal %d0,%a1 44e6c: 2051 moveal %a1@,%a0 44e6e: 4a88 tstl %a0 44e70: 6706 beqs 44e78 <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 44e72: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44e74: 4e90 jsr %a0@ <== NOT EXECUTED 44e76: 588f addql #4,%sp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 44e78: 2f0a movel %a2,%sp@- 44e7a: 4e93 jsr %a3@ } 44e7c: 588f addql #4,%sp 44e7e: 60ba bras 44e3a =============================================================================== 000445fa : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 445fa: 4e56 ffe8 linkw %fp,#-24 445fe: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 44602: 246e 0008 moveal %fp@(8),%a2 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 44606: 2052 moveal %a2@,%a0 44608: 2668 0034 moveal %a0@(52),%a3 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4460c: 42a7 clrl %sp@- 4460e: 42a7 clrl %sp@- 44610: 2f2b 0018 movel %a3@(24),%sp@- 44614: 4eb9 0004 5770 jsr 45770 if (sc != RTEMS_SUCCESSFUL) 4461a: 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); 4461e: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) 44620: 6600 0084 bnew 446a6 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 44624: 202b 00cc movel %a3@(204),%d0 44628: eb88 lsll #5,%d0 4462a: 0680 0005 bc7c addil #375932,%d0 44630: 2240 moveal %d0,%a1 44632: 2051 moveal %a1@,%a0 44634: 4a88 tstl %a0 44636: 6718 beqs 44650 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 44638: 2f0a movel %a2,%sp@- 4463a: 2f0b movel %a3,%sp@- 4463c: 4e90 jsr %a0@ rtems_semaphore_release (tty->osem); 4463e: 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); 44642: 2400 movel %d0,%d2 rtems_semaphore_release (tty->osem); 44644: 4eb9 0004 5878 jsr 45878 return sc; 4464a: 4fef 000c lea %sp@(12),%sp 4464e: 6056 bras 446a6 } if (tty->termios.c_oflag & OPOST) { 44650: 7001 moveq #1,%d0 44652: c0ab 0034 andl %a3@(52),%d0 44656: 6728 beqs 44680 <== NEVER TAKEN uint32_t count = args->count; 44658: 262a 0010 movel %a2@(16),%d3 char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 4465c: 4bfa fa68 lea %pc@(440c6 ),%a5 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; 44660: 286a 000c moveal %a2@(12),%a4 while (count--) 44664: 600e bras 44674 oproc (*buffer++, tty); 44666: 4280 clrl %d0 44668: 101c moveb %a4@+,%d0 4466a: 5383 subql #1,%d3 4466c: 2f0b movel %a3,%sp@- 4466e: 2f00 movel %d0,%sp@- 44670: 4e95 jsr %a5@ 44672: 508f addql #8,%sp return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 44674: 4a83 tstl %d3 44676: 66ee bnes 44666 oproc (*buffer++, tty); args->bytes_moved = args->count; 44678: 256a 0010 0018 movel %a2@(16),%a2@(24) 4467e: 601a bras 4469a } else { rtems_termios_puts (args->buffer, args->count, tty); 44680: 2f0b movel %a3,%sp@- <== NOT EXECUTED 44682: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44686: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 4468a: 4eb9 0004 3fce jsr 43fce <== NOT EXECUTED args->bytes_moved = args->count; 44690: 256a 0010 0018 movel %a2@(16),%a2@(24) <== NOT EXECUTED 44696: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 4469a: 2f2b 0018 movel %a3@(24),%sp@- 4469e: 4eb9 0004 5878 jsr 45878 return sc; 446a4: 588f addql #4,%sp } 446a6: 2002 movel %d2,%d0 446a8: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 446ae: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051b9c : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 51b9c: 4e56 fffc linkw %fp,#-4 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 51ba0: 486e fffc pea %fp@(-4) 51ba4: 2f2e 0008 movel %fp@(8),%sp@- 51ba8: 4879 0007 525e pea 7525e <_Timer_Information> 51bae: 4eb9 0005 44ec jsr 544ec <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 51bb4: 4fef 000c lea %sp@(12),%sp 51bb8: 4aae fffc tstl %fp@(-4) 51bbc: 6620 bnes 51bde case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 51bbe: 7204 moveq #4,%d1 51bc0: 2040 moveal %d0,%a0 51bc2: b2a8 0038 cmpl %a0@(56),%d1 51bc6: 670c beqs 51bd4 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 51bc8: 4868 0010 pea %a0@(16) 51bcc: 4eb9 0005 603c jsr 5603c <_Watchdog_Remove> 51bd2: 588f addql #4,%sp _Thread_Enable_dispatch(); 51bd4: 4eb9 0005 4d26 jsr 54d26 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 51bda: 4280 clrl %d0 51bdc: 6002 bras 51be0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 51bde: 7004 moveq #4,%d0 } 51be0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045e1c : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 45e1c: 4e56 fff4 linkw %fp,#-12 45e20: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 45e24: 242e 0008 movel %fp@(8),%d2 45e28: 246e 000c moveal %fp@(12),%a2 Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 45e2c: 6766 beqs 45e94 <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 45e2e: 4a8a tstl %a2 45e30: 6766 beqs 45e98 <== NEVER TAKEN 45e32: 2039 0005 c830 movel 5c830 <_Thread_Dispatch_disable_level>,%d0 45e38: 5280 addql #1,%d0 45e3a: 23c0 0005 c830 movel %d0,5c830 <_Thread_Dispatch_disable_level> * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); 45e40: 4879 0005 ca06 pea 5ca06 <_Timer_Information> 45e46: 4eb9 0004 6c18 jsr 46c18 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 45e4c: 588f addql #4,%sp 45e4e: 43f9 0004 782e lea 4782e <_Thread_Enable_dispatch>,%a1 45e54: 2040 moveal %d0,%a0 45e56: 4a80 tstl %d0 45e58: 6606 bnes 45e60 _Thread_Enable_dispatch(); 45e5a: 4e91 jsr %a1@ return RTEMS_TOO_MANY; 45e5c: 7005 moveq #5,%d0 45e5e: 603a bras 45e9a } the_timer->the_class = TIMER_DORMANT; 45e60: 7004 moveq #4,%d0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 45e62: 4281 clrl %d1 45e64: 2140 0038 movel %d0,%a0@(56) information, _Objects_Get_index( the_object->id ), 45e68: 2028 0008 movel %a0@(8),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45e6c: 2679 0005 ca1e moveal 5ca1e <_Timer_Information+0x18>,%a3 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 45e72: 3200 movew %d0,%d1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 45e74: 42a8 0018 clrl %a0@(24) the_watchdog->routine = routine; 45e78: 42a8 002c clrl %a0@(44) the_watchdog->id = id; 45e7c: 42a8 0030 clrl %a0@(48) the_watchdog->user_data = user_data; 45e80: 42a8 0034 clrl %a0@(52) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45e84: 2788 1c00 movel %a0,%a3@(00000000,%d1:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 45e88: 2142 000c movel %d2,%a0@(12) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 45e8c: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 45e8e: 4e91 jsr %a1@ return RTEMS_SUCCESSFUL; 45e90: 4280 clrl %d0 45e92: 6006 bras 45e9a ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 45e94: 7003 moveq #3,%d0 45e96: 6002 bras 45e9a if ( !id ) return RTEMS_INVALID_ADDRESS; 45e98: 7009 moveq #9,%d0 ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45e9a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 45ea0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051f68 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 51f68: 4e56 ffe4 linkw %fp,#-28 51f6c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 51f70: 262e 0008 movel %fp@(8),%d3 51f74: 242e 000c movel %fp@(12),%d2 51f78: 282e 0010 movel %fp@(16),%d4 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 51f7c: 2679 0007 5296 moveal 75296 <_Timer_server>,%a3 if ( !timer_server ) 51f82: 4a8b tstl %a3 51f84: 6700 0086 beqw 5200c return RTEMS_INCORRECT_STATE; if ( !routine ) 51f88: 4a84 tstl %d4 51f8a: 6700 0084 beqw 52010 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 51f8e: 4a82 tstl %d2 51f90: 6700 0082 beqw 52014 51f94: 486e fffc pea %fp@(-4) 51f98: 2f03 movel %d3,%sp@- 51f9a: 4879 0007 525e pea 7525e <_Timer_Information> 51fa0: 4eb9 0005 44ec jsr 544ec <_Objects_Get> return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 51fa6: 4fef 000c lea %sp@(12),%sp 51faa: 2440 moveal %d0,%a2 51fac: 4aae fffc tstl %fp@(-4) 51fb0: 6666 bnes 52018 <== NEVER TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 51fb2: 486a 0010 pea %a2@(16) 51fb6: 4eb9 0005 603c jsr 5603c <_Watchdog_Remove> _ISR_Disable( level ); 51fbc: 203c 0000 0700 movel #1792,%d0 51fc2: 40c1 movew %sr,%d1 51fc4: 8081 orl %d1,%d0 51fc6: 46c0 movew %d0,%sr 51fc8: 49f9 0005 4d26 lea 54d26 <_Thread_Enable_dispatch>,%a4 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 51fce: 588f addql #4,%sp 51fd0: 4aaa 0018 tstl %a2@(24) 51fd4: 6706 beqs 51fdc _ISR_Enable( level ); 51fd6: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 51fd8: 4e94 jsr %a4@ 51fda: 602c bras 52008 /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 51fdc: 7001 moveq #1,%d0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 51fde: 256e 0014 0034 movel %fp@(20),%a2@(52) 51fe4: 2540 0038 movel %d0,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 51fe8: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; 51fec: 2544 002c movel %d4,%a2@(44) the_watchdog->id = id; 51ff0: 2543 0030 movel %d3,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 51ff4: 2542 001c movel %d2,%a2@(28) _ISR_Enable( level ); 51ff8: 46c1 movew %d1,%sr (*timer_server->schedule_operation)( timer_server, the_timer ); 51ffa: 2f0a movel %a2,%sp@- 51ffc: 2f0b movel %a3,%sp@- 51ffe: 206b 0004 moveal %a3@(4),%a0 52002: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 52004: 4e94 jsr %a4@ return RTEMS_SUCCESSFUL; 52006: 508f addql #8,%sp 52008: 4280 clrl %d0 5200a: 600e bras 5201a Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 5200c: 700e moveq #14,%d0 5200e: 600a bras 5201a if ( !routine ) return RTEMS_INVALID_ADDRESS; 52010: 7009 moveq #9,%d0 52012: 6006 bras 5201a if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; 52014: 700a moveq #10,%d0 52016: 6002 bras 5201a #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 52018: 7004 moveq #4,%d0 } 5201a: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 52020: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052024 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 52024: 4e56 ffe8 linkw %fp,#-24 52028: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 5202c: 262e 0008 movel %fp@(8),%d3 52030: 242e 000c movel %fp@(12),%d2 52034: 282e 0010 movel %fp@(16),%d4 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 52038: 2679 0007 5296 moveal 75296 <_Timer_server>,%a3 if ( !timer_server ) 5203e: 4a8b tstl %a3 52040: 6700 0098 beqw 520da return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 52044: 4a39 0007 5058 tstb 75058 <_TOD_Is_set> 5204a: 6700 0092 beqw 520de return RTEMS_NOT_DEFINED; if ( !routine ) 5204e: 4a84 tstl %d4 52050: 6700 0090 beqw 520e2 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 52054: 2f02 movel %d2,%sp@- 52056: 4eb9 0004 f4d4 jsr 4f4d4 <_TOD_Validate> 5205c: 588f addql #4,%sp 5205e: 4a00 tstb %d0 52060: 6700 0084 beqw 520e6 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 52064: 2f02 movel %d2,%sp@- 52066: 4eb9 0004 f438 jsr 4f438 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 5206c: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 5206e: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 52070: b0b9 0007 50d2 cmpl 750d2 <_TOD_Now>,%d0 52076: 636e blss 520e6 52078: 486e fffc pea %fp@(-4) 5207c: 2f03 movel %d3,%sp@- 5207e: 4879 0007 525e pea 7525e <_Timer_Information> 52084: 4eb9 0005 44ec jsr 544ec <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5208a: 4fef 000c lea %sp@(12),%sp 5208e: 2440 moveal %d0,%a2 52090: 4aae fffc tstl %fp@(-4) 52094: 6654 bnes 520ea case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 52096: 486a 0010 pea %a2@(16) 5209a: 4eb9 0005 603c jsr 5603c <_Watchdog_Remove> the_watchdog->user_data = user_data; 520a0: 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(); 520a6: 94b9 0007 50d2 subl 750d2 <_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; 520ac: 7003 moveq #3,%d0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 520ae: 42aa 0018 clrl %a2@(24) 520b2: 2540 0038 movel %d0,%a2@(56) the_watchdog->routine = routine; 520b6: 2544 002c movel %d4,%a2@(44) the_watchdog->id = id; 520ba: 2543 0030 movel %d3,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 520be: 2542 001c movel %d2,%a2@(28) (*timer_server->schedule_operation)( timer_server, the_timer ); 520c2: 2f0a movel %a2,%sp@- 520c4: 2f0b movel %a3,%sp@- 520c6: 206b 0004 moveal %a3@(4),%a0 520ca: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 520cc: 4eb9 0005 4d26 jsr 54d26 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 520d2: 4fef 000c lea %sp@(12),%sp 520d6: 4280 clrl %d0 520d8: 6012 bras 520ec Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 520da: 700e moveq #14,%d0 520dc: 600e bras 520ec if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 520de: 700b moveq #11,%d0 <== NOT EXECUTED 520e0: 600a bras 520ec <== NOT EXECUTED if ( !routine ) return RTEMS_INVALID_ADDRESS; 520e2: 7009 moveq #9,%d0 520e4: 6006 bras 520ec 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; 520e6: 7014 moveq #20,%d0 520e8: 6002 bras 520ec #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 520ea: 7004 moveq #4,%d0 } 520ec: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 520f2: 4e5e unlk %fp ... =============================================================================== 000424a8 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 424a8: 4e56 fff0 linkw %fp,#-16 424ac: 48d7 041c moveml %d2-%d4/%a2,%sp@ 424b0: 242e 0008 movel %fp@(8),%d2 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 424b4: 0802 001d btst #29,%d2 424b8: 672e beqs 424e8 if (rtems_panic_in_progress++) 424ba: 2039 0005 c464 movel 5c464 ,%d0 424c0: 2200 movel %d0,%d1 424c2: 5281 addql #1,%d1 424c4: 23c1 0005 c464 movel %d1,5c464 424ca: 4a80 tstl %d0 424cc: 670e beqs 424dc <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 424ce: 2039 0005 c5bc movel 5c5bc <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 424d4: 5280 addql #1,%d0 <== NOT EXECUTED 424d6: 23c0 0005 c5bc movel %d0,5c5bc <_Thread_Dispatch_disable_level><== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 424dc: 7002 moveq #2,%d0 424de: b0b9 0005 c464 cmpl 5c464 ,%d0 424e4: 6d00 0100 bltw 425e6 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 424e8: 2079 0005 af80 moveal 5af80 <_impure_ptr>,%a0 status = error_flag & ~RTEMS_ERROR_MASK; 424ee: 2802 movel %d2,%d4 /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 424f0: 2f28 0008 movel %a0@(8),%sp@- status = error_flag & ~RTEMS_ERROR_MASK; 424f4: 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 */ 424fa: 4eb9 0004 c062 jsr 4c062 status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 42500: 588f addql #4,%sp 42502: 0802 001e btst #30,%d2 42506: 670c beqs 42514 local_errno = errno; 42508: 4eb9 0004 bcf8 jsr 4bcf8 <__errno> 4250e: 2040 moveal %d0,%a0 42510: 2610 movel %a0@,%d3 42512: 6002 bras 42516 rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { int local_errno = 0; 42514: 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); 42516: 2f2e 0010 movel %fp@(16),%sp@- 4251a: 2079 0005 af80 moveal 5af80 <_impure_ptr>,%a0 42520: 2f2e 000c movel %fp@(12),%sp@- 42524: 2f28 000c movel %a0@(12),%sp@- 42528: 4eb9 0005 28ce jsr 528ce if (status) 4252e: 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); 42532: 2400 movel %d0,%d2 if (status) 42534: 4a84 tstl %d4 42536: 6726 beqs 4255e chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 42538: 2f04 movel %d4,%sp@- 4253a: 4eb9 0004 2490 jsr 42490 42540: 2079 0005 af80 moveal 5af80 <_impure_ptr>,%a0 42546: 2f00 movel %d0,%sp@- 42548: 4879 0005 9bd7 pea 59bd7 4254e: 2f28 000c movel %a0@(12),%sp@- 42552: 4eb9 0004 c48a jsr 4c48a #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 42558: 4fef 0010 lea %sp@(16),%sp 4255c: d480 addl %d0,%d2 fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 4255e: 4a83 tstl %d3 42560: 6756 beqs 425b8 if ((local_errno > 0) && *strerror(local_errno)) 42562: 6f36 bles 4259a 42564: 2f03 movel %d3,%sp@- 42566: 45f9 0004 cd20 lea 4cd20 ,%a2 4256c: 4e92 jsr %a2@ 4256e: 588f addql #4,%sp 42570: 2040 moveal %d0,%a0 42572: 4a10 tstb %a0@ 42574: 6724 beqs 4259a <== NEVER TAKEN chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 42576: 2f03 movel %d3,%sp@- 42578: 4e92 jsr %a2@ 4257a: 2079 0005 af80 moveal 5af80 <_impure_ptr>,%a0 42580: 2f00 movel %d0,%sp@- 42582: 4879 0005 9be5 pea 59be5 42588: 2f28 000c movel %a0@(12),%sp@- 4258c: 4eb9 0004 c48a jsr 4c48a 42592: 4fef 0010 lea %sp@(16),%sp 42596: d480 addl %d0,%d2 42598: 601e bras 425b8 else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 4259a: 2f03 movel %d3,%sp@- 4259c: 4879 0005 9bf2 pea 59bf2 425a2: 2079 0005 af80 moveal 5af80 <_impure_ptr>,%a0 425a8: 2f28 000c movel %a0@(12),%sp@- 425ac: 4eb9 0004 c48a jsr 4c48a 425b2: 4fef 000c lea %sp@(12),%sp 425b6: d480 addl %d0,%d2 } chars_written += fprintf(stderr, "\n"); 425b8: 4879 0005 a082 pea 5a082 425be: 2079 0005 af80 moveal 5af80 <_impure_ptr>,%a0 425c4: 2f28 000c movel %a0@(12),%sp@- 425c8: 4eb9 0004 c48a jsr 4c48a (void) fflush(stderr); 425ce: 2079 0005 af80 moveal 5af80 <_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"); 425d4: d480 addl %d0,%d2 (void) fflush(stderr); 425d6: 2f28 000c movel %a0@(12),%sp@- 425da: 4eb9 0004 c062 jsr 4c062 return chars_written; 425e0: 4fef 000c lea %sp@(12),%sp 425e4: 6002 bras 425e8 if (rtems_panic_in_progress++) _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; 425e6: 4282 clrl %d2 <== NOT EXECUTED chars_written += fprintf(stderr, "\n"); (void) fflush(stderr); return chars_written; } 425e8: 2002 movel %d2,%d0 425ea: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 425f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042e90 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 42e90: 4e56 ffe4 linkw %fp,#-28 42e94: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 42e98: 246e 0008 moveal %fp@(8),%a2 int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; 42e9c: 4283 clrl %d3 static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; unsigned int limit = INT_MAX; 42e9e: 283c 7fff ffff movel #2147483647,%d4 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 42ea4: 4282 clrl %d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 42ea6: 47f9 0004 e680 lea 4e680 <__srget_r>,%a3 42eac: 202a 0004 movel %a2@(4),%d0 42eb0: 5380 subql #1,%d0 42eb2: 2540 0004 movel %d0,%a2@(4) 42eb6: 6c0e bges 42ec6 <== ALWAYS TAKEN 42eb8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42eba: 2f39 0005 c8b0 movel 5c8b0 <_impure_ptr>,%sp@- <== NOT EXECUTED 42ec0: 4e93 jsr %a3@ <== NOT EXECUTED 42ec2: 508f addql #8,%sp <== NOT EXECUTED 42ec4: 600a bras 42ed0 <== NOT EXECUTED 42ec6: 2052 moveal %a2@,%a0 42ec8: 4280 clrl %d0 42eca: 1010 moveb %a0@,%d0 42ecc: 5288 addql #1,%a0 42ece: 2488 movel %a0,%a2@ if (c == ':') 42ed0: 723a moveq #58,%d1 42ed2: b280 cmpl %d0,%d1 42ed4: 6750 beqs 42f26 break; if (sign == 0) { 42ed6: 4a83 tstl %d3 42ed8: 660e bnes 42ee8 if (c == '-') { 42eda: 7c2d moveq #45,%d6 42edc: bc80 cmpl %d0,%d6 42ede: 6606 bnes 42ee6 sign = -1; limit++; 42ee0: 5284 addql #1,%d4 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 42ee2: 76ff moveq #-1,%d3 limit++; continue; 42ee4: 60c6 bras 42eac } sign = 1; 42ee6: 7601 moveq #1,%d3 } if (!isdigit(c)) 42ee8: 2079 0005 c8ac moveal 5c8ac <__ctype_ptr__>,%a0 42eee: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 42ef2: 49c1 extbl %d1 42ef4: 44c1 movew %d1,%ccr 42ef6: 6640 bnes 42f38 return 0; d = c - '0'; if ((i > (limit / 10)) 42ef8: 2204 movel %d4,%d1 42efa: 7c0a moveq #10,%d6 42efc: 4c46 1005 remul %d6,%d5,%d1 42f00: 4c46 1001 remul %d6,%d1,%d1 42f04: b282 cmpl %d2,%d1 42f06: 6530 bcss 42f38 <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 42f08: 0680 ffff ffd0 addil #-48,%d0 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 42f0e: b282 cmpl %d2,%d1 42f10: 6604 bnes 42f16 <== ALWAYS TAKEN 42f12: ba80 cmpl %d0,%d5 <== NOT EXECUTED 42f14: 6522 bcss 42f38 <== NOT EXECUTED return 0; i = i * 10 + d; 42f16: 2202 movel %d2,%d1 42f18: e789 lsll #3,%d1 42f1a: 2241 moveal %d1,%a1 42f1c: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 42f20: 2400 movel %d0,%d2 42f22: d488 addl %a0,%d2 42f24: 6086 bras 42eac } if (sign == 0) 42f26: 4a83 tstl %d3 42f28: 670e beqs 42f38 <== NEVER TAKEN return 0; *val = i * sign; 42f2a: 4c02 3800 mulsl %d2,%d3 return 1; 42f2e: 7001 moveq #1,%d0 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; 42f30: 206e 000c moveal %fp@(12),%a0 42f34: 2083 movel %d3,%a0@ return 1; 42f36: 6002 bras 42f3a || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) return 0; 42f38: 4280 clrl %d0 *val = i * sign; return 1; } 42f3a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 42f40: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042f44 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 42f44: 4e56 ffec linkw %fp,#-20 int c; *name = *bufp; 42f48: 206e 000c moveal %fp@(12),%a0 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 42f4c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 42f50: 286e 0008 moveal %fp@(8),%a4 int c; *name = *bufp; for (;;) { c = getc(fp); 42f54: 4bf9 0004 e680 lea 4e680 <__srget_r>,%a5 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 42f5a: 246e 0010 moveal %fp@(16),%a2 42f5e: 266e 0014 moveal %fp@(20),%a3 42f62: 242e 0018 movel %fp@(24),%d2 int c; *name = *bufp; 42f66: 2092 movel %a2@,%a0@ for (;;) { c = getc(fp); 42f68: 202c 0004 movel %a4@(4),%d0 42f6c: 5380 subql #1,%d0 42f6e: 2940 0004 movel %d0,%a4@(4) 42f72: 6c0e bges 42f82 42f74: 2f0c movel %a4,%sp@- 42f76: 2f39 0005 c8b0 movel 5c8b0 <_impure_ptr>,%sp@- 42f7c: 4e95 jsr %a5@ 42f7e: 508f addql #8,%sp 42f80: 600a bras 42f8c 42f82: 2054 moveal %a4@,%a0 42f84: 4280 clrl %d0 42f86: 1010 moveb %a0@,%d0 42f88: 5288 addql #1,%a0 42f8a: 2888 movel %a0,%a4@ if (c == ':') { 42f8c: 723a moveq #58,%d1 42f8e: b280 cmpl %d0,%d1 42f90: 6606 bnes 42f98 if (nlFlag) 42f92: 4a82 tstl %d2 42f94: 6724 beqs 42fba 42f96: 602e bras 42fc6 return 0; break; } if (c == '\n') { 42f98: 720a moveq #10,%d1 42f9a: b280 cmpl %d0,%d1 42f9c: 6606 bnes 42fa4 if (!nlFlag) 42f9e: 4a82 tstl %d2 42fa0: 6618 bnes 42fba 42fa2: 6022 bras 42fc6 return 0; break; } if (c == EOF) 42fa4: 72ff moveq #-1,%d1 42fa6: b280 cmpl %d0,%d1 42fa8: 671c beqs 42fc6 return 0; if (*nleft < 2) 42faa: 7201 moveq #1,%d1 42fac: b293 cmpl %a3@,%d1 42fae: 6416 bccs 42fc6 <== NEVER TAKEN return 0; **bufp = c; 42fb0: 2052 moveal %a2@,%a0 42fb2: 1080 moveb %d0,%a0@ ++(*bufp); 42fb4: 5292 addql #1,%a2@ --(*nleft); 42fb6: 5393 subql #1,%a3@ } 42fb8: 60ae bras 42f68 **bufp = '\0'; 42fba: 2052 moveal %a2@,%a0 ++(*bufp); --(*nleft); return 1; 42fbc: 7001 moveq #1,%d0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 42fbe: 4210 clrb %a0@ ++(*bufp); 42fc0: 5292 addql #1,%a2@ --(*nleft); 42fc2: 5393 subql #1,%a3@ return 1; 42fc4: 6002 bras 42fc8 break; } if (c == EOF) return 0; if (*nleft < 2) return 0; 42fc6: 4280 clrl %d0 } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 42fc8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 42fce: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042fd2 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 42fd2: 4e56 ffe4 linkw %fp,#-28 42fd6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42fda: 42a7 clrl %sp@- 42fdc: 280e movel %fp,%d4 42fde: 0684 0000 0014 addil #20,%d4 42fe4: 260e movel %fp,%d3 42fe6: 0683 0000 0010 addil #16,%d3 42fec: 47fa ff56 lea %pc@(42f44 ),%a3 42ff0: 2f04 movel %d4,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 42ff2: 246e 000c moveal %fp@(12),%a2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42ff6: 2f03 movel %d3,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 42ff8: 242e 0008 movel %fp@(8),%d2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42ffc: 2f0a movel %a2,%sp@- 42ffe: 2f02 movel %d2,%sp@- 43000: 4e93 jsr %a3@ 43002: 4fef 0014 lea %sp@(20),%sp 43006: 4a80 tstl %d0 43008: 6700 00b6 beqw 430c0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 4300c: 42a7 clrl %sp@- 4300e: 2f04 movel %d4,%sp@- 43010: 2f03 movel %d3,%sp@- 43012: 486a 0004 pea %a2@(4) 43016: 2f02 movel %d2,%sp@- 43018: 4e93 jsr %a3@ 4301a: 4fef 0014 lea %sp@(20),%sp 4301e: 4a80 tstl %d0 43020: 6700 009e beqw 430c0 || !scanInt(fp, &grgid) 43024: 486e fffc pea %fp@(-4) 43028: 2f02 movel %d2,%sp@- 4302a: 4eba fe64 jsr %pc@(42e90 ) 4302e: 508f addql #8,%sp 43030: 4a80 tstl %d0 43032: 6700 008c beqw 430c0 || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 43036: 4878 0001 pea 1 4303a: 2f04 movel %d4,%sp@- 4303c: 2f03 movel %d3,%sp@- 4303e: 486e fff8 pea %fp@(-8) 43042: 2f02 movel %d2,%sp@- 43044: 4e93 jsr %a3@ 43046: 4fef 0014 lea %sp@(20),%sp 4304a: 4a80 tstl %d0 4304c: 6772 beqs 430c0 <== NEVER TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4304e: 222e fff8 movel %fp@(-8),%d1 43052: 7001 moveq #1,%d0 43054: 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; 43056: 356e fffe 0008 movew %fp@(-2),%a2@(8) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4305c: 600a bras 43068 if(*cp == ',') 4305e: 49c2 extbl %d2 43060: 762c moveq #44,%d3 43062: b682 cmpl %d2,%d3 43064: 6602 bnes 43068 memcount++; 43066: 5280 addql #1,%d0 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 43068: 1418 moveb %a0@+,%d2 4306a: 66f2 bnes 4305e } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 4306c: e588 lsll #2,%d0 4306e: 0680 0000 0013 addil #19,%d0 43074: b0ae 0014 cmpl %fp@(20),%d0 43078: 6246 bhis 430c0 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 4307a: 202e 0010 movel %fp@(16),%d0 4307e: 74f0 moveq #-16,%d2 43080: 0680 0000 000f addil #15,%d0 43086: c082 andl %d2,%d0 43088: 2540 000a movel %d0,%a2@(10) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 4308c: 2040 moveal %d0,%a0 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4308e: 7001 moveq #1,%d0 grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 43090: 2081 movel %d1,%a0@ 43092: 206e fff8 moveal %fp@(-8),%a0 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 43096: 6018 bras 430b0 if(*cp == ',') { 43098: 49c1 extbl %d1 4309a: 742c moveq #44,%d2 4309c: b481 cmpl %d1,%d2 4309e: 6610 bnes 430b0 *cp = '\0'; 430a0: 4203 clrb %d3 430a2: 1143 ffff moveb %d3,%a0@(-1) grp->gr_mem[memcount++] = cp + 1; 430a6: 226a 000a moveal %a2@(10),%a1 430aa: 2388 0c00 movel %a0,%a1@(00000000,%d0:l:4) 430ae: 5280 addql #1,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 430b0: 1218 moveb %a0@+,%d1 430b2: 66e4 bnes 43098 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 430b4: 206a 000a moveal %a2@(10),%a0 430b8: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) return 1; 430bc: 7001 moveq #1,%d0 430be: 6002 bras 430c2 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; 430c0: 4280 clrl %d0 grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 430c2: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 430c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000430cc : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 430cc: 4e56 ffe0 linkw %fp,#-32 430d0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 430d4: 42a7 clrl %sp@- 430d6: 280e movel %fp,%d4 430d8: 0684 0000 0014 addil #20,%d4 430de: 260e movel %fp,%d3 430e0: 0683 0000 0010 addil #16,%d3 430e6: 47fa fe5c lea %pc@(42f44 ),%a3 430ea: 2f04 movel %d4,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 430ec: 246e 000c moveal %fp@(12),%a2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 430f0: 2f03 movel %d3,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 430f2: 242e 0008 movel %fp@(8),%d2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 430f6: 2f0a movel %a2,%sp@- 430f8: 2f02 movel %d2,%sp@- 430fa: 4e93 jsr %a3@ 430fc: 4fef 0014 lea %sp@(20),%sp 43100: 4a80 tstl %d0 43102: 6700 00a4 beqw 431a8 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 43106: 42a7 clrl %sp@- 43108: 2f04 movel %d4,%sp@- 4310a: 2f03 movel %d3,%sp@- 4310c: 486a 0004 pea %a2@(4) 43110: 2f02 movel %d2,%sp@- 43112: 4e93 jsr %a3@ 43114: 4fef 0014 lea %sp@(20),%sp 43118: 4a80 tstl %d0 4311a: 6700 008c beqw 431a8 || !scanInt(fp, &pwuid) 4311e: 486e fffc pea %fp@(-4) 43122: 49fa fd6c lea %pc@(42e90 ),%a4 43126: 2f02 movel %d2,%sp@- 43128: 4e94 jsr %a4@ 4312a: 508f addql #8,%sp 4312c: 4a80 tstl %d0 4312e: 6778 beqs 431a8 <== NEVER TAKEN || !scanInt(fp, &pwgid) 43130: 486e fff8 pea %fp@(-8) 43134: 2f02 movel %d2,%sp@- 43136: 4e94 jsr %a4@ 43138: 508f addql #8,%sp 4313a: 4a80 tstl %d0 4313c: 676a beqs 431a8 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 4313e: 42a7 clrl %sp@- 43140: 2f04 movel %d4,%sp@- 43142: 2f03 movel %d3,%sp@- 43144: 486a 000c pea %a2@(12) 43148: 2f02 movel %d2,%sp@- 4314a: 4e93 jsr %a3@ 4314c: 4fef 0014 lea %sp@(20),%sp 43150: 4a80 tstl %d0 43152: 6754 beqs 431a8 <== NEVER TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 43154: 42a7 clrl %sp@- 43156: 2f04 movel %d4,%sp@- 43158: 2f03 movel %d3,%sp@- 4315a: 486a 0010 pea %a2@(16) 4315e: 2f02 movel %d2,%sp@- 43160: 4e93 jsr %a3@ 43162: 4fef 0014 lea %sp@(20),%sp 43166: 4a80 tstl %d0 43168: 673e beqs 431a8 <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 4316a: 42a7 clrl %sp@- 4316c: 2f04 movel %d4,%sp@- 4316e: 2f03 movel %d3,%sp@- 43170: 486a 0014 pea %a2@(20) 43174: 2f02 movel %d2,%sp@- 43176: 4e93 jsr %a3@ 43178: 4fef 0014 lea %sp@(20),%sp 4317c: 4a80 tstl %d0 4317e: 6728 beqs 431a8 <== NEVER TAKEN || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 43180: 4878 0001 pea 1 43184: 2f04 movel %d4,%sp@- 43186: 2f03 movel %d3,%sp@- 43188: 486a 0018 pea %a2@(24) 4318c: 2f02 movel %d2,%sp@- 4318e: 4e93 jsr %a3@ 43190: 4fef 0014 lea %sp@(20),%sp 43194: 4a80 tstl %d0 43196: 6710 beqs 431a8 return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; 43198: 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; 4319a: 356e fffe 0008 movew %fp@(-2),%a2@(8) pwd->pw_gid = pwgid; 431a0: 356e fffa 000a movew %fp@(-6),%a2@(10) return 1; 431a6: 6002 bras 431aa || !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; 431a8: 4280 clrl %d0 pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } 431aa: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 431b0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044592 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 44592: 4e56 0000 linkw %fp,#0 44596: 2f0a movel %a2,%sp@- 44598: 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)) { 4459c: 202a 003c movel %a2@(60),%d0 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 445a0: 2f02 movel %d2,%sp@- 445a2: 4282 clrl %d2 445a4: 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)) { 445a8: 0280 0000 0e78 andil #3704,%d0 445ae: 6734 beqs 445e4 <== NEVER TAKEN rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 445b0: 42a7 clrl %sp@- 445b2: 42a7 clrl %sp@- 445b4: 2f2a 0018 movel %a2@(24),%sp@- 445b8: 4eb9 0004 5770 jsr 45770 i = iproc (c, tty); 445be: 2f0a movel %a2,%sp@- 445c0: 2f02 movel %d2,%sp@- 445c2: 4eba fe66 jsr %pc@(4442a ) rtems_semaphore_release (tty->osem); 445c6: 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); 445ca: 2400 movel %d0,%d2 rtems_semaphore_release (tty->osem); 445cc: 4eb9 0004 5878 jsr 45878 } else { i = iproc (c, tty); } return i; } 445d2: 246e fffc moveal %fp@(-4),%a2 445d6: 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); 445d8: 4fef 0018 lea %sp@(24),%sp } else { i = iproc (c, tty); } return i; } 445dc: 242e fff8 movel %fp@(-8),%d2 445e0: 4e5e unlk %fp 445e2: 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); 445e4: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } return i; } 445e8: 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); 445ec: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } return i; } 445f0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 445f4: 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); 445f6: 6000 fe32 braw 4442a <== NOT EXECUTED =============================================================================== 00045748 : #include int statvfs (const char *path, struct statvfs *sb) { 45748: 4e56 ffdc linkw %fp,#-36 4574c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 45750: 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 ) ) 45754: 240e movel %fp,%d2 45756: 0682 ffff ffec addil #-20,%d2 4575c: 2f0a movel %a2,%sp@- #include int statvfs (const char *path, struct statvfs *sb) { 4575e: 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 ) ) 45762: 4eb9 0005 00a8 jsr 500a8 45768: 7201 moveq #1,%d1 4576a: 2e81 movel %d1,%sp@ 4576c: 2f02 movel %d2,%sp@- 4576e: 42a7 clrl %sp@- 45770: 2f00 movel %d0,%sp@- 45772: 2f0a movel %a2,%sp@- 45774: 4eb9 0004 447e jsr 4447e 4577a: 4fef 0014 lea %sp@(20),%sp 4577e: 4a80 tstl %d0 45780: 6638 bnes 457ba <== NEVER TAKEN return -1; mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); 45782: 4878 0038 pea 38 */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; 45786: 246e fffc moveal %fp@(-4),%a2 fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); 4578a: 42a7 clrl %sp@- 4578c: 2f03 movel %d3,%sp@- 4578e: 4eb9 0004 eec0 jsr 4eec0 result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 45794: 206a 0028 moveal %a2@(40),%a0 45798: 2f03 movel %d3,%sp@- 4579a: 486a 001c pea %a2@(28) 4579e: 2068 0044 moveal %a0@(68),%a0 457a2: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 457a4: 2f02 movel %d2,%sp@- 457a6: 2d40 ffe8 movel %d0,%fp@(-24) 457aa: 4eb9 0004 4574 jsr 44574 return result; 457b0: 202e ffe8 movel %fp@(-24),%d0 457b4: 4fef 0018 lea %sp@(24),%sp 457b8: 6002 bras 457bc * 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; 457ba: 70ff moveq #-1,%d0 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 457bc: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 457c2: 4e5e unlk %fp ... =============================================================================== 0004464c : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 4464c: 4e56 0000 linkw %fp,#0 44650: 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; 44654: 2028 0104 movel %a0@(260),%d0 fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 44658: 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 ) { 4465a: 4a80 tstl %d0 4465c: 6728 beqs 44686 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 4465e: 2279 0005 e170 moveal 5e170 <_Per_CPU_Information+0xc>,%a1 44664: 2429 0104 movel %a1@(260),%d2 _Thread_Executing->libc_reent = this_reent; 44668: 2340 0104 movel %d0,%a1@(260) _fwalk (t->libc_reent, sync_wrapper); 4466c: 487a 0020 pea %pc@(4468e ) 44670: 2f28 0104 movel %a0@(260),%sp@- 44674: 4eb9 0004 db10 jsr 4db10 <_fwalk> _Thread_Executing->libc_reent = current_reent; 4467a: 2079 0005 e170 moveal 5e170 <_Per_CPU_Information+0xc>,%a0 44680: 508f addql #8,%sp 44682: 2142 0104 movel %d2,%a0@(260) } } 44686: 242e fffc movel %fp@(-4),%d2 4468a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044aac : int tcsetattr( int fd, int opt, struct termios *tp ) { 44aac: 4e56 0000 linkw %fp,#0 44ab0: 202e 000c movel %fp@(12),%d0 44ab4: 2f03 movel %d3,%sp@- 44ab6: 262e 0010 movel %fp@(16),%d3 44aba: 2f02 movel %d2,%sp@- 44abc: 242e 0008 movel %fp@(8),%d2 switch (opt) { 44ac0: 4a80 tstl %d0 44ac2: 672c beqs 44af0 44ac4: 7201 moveq #1,%d1 44ac6: b280 cmpl %d0,%d1 44ac8: 6710 beqs 44ada default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 44aca: 4eb9 0004 d308 jsr 4d308 <__errno> 44ad0: 2040 moveal %d0,%a0 44ad2: 20bc 0000 0086 movel #134,%a0@ 44ad8: 6034 bras 44b0e case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 44ada: 42a7 clrl %sp@- 44adc: 4878 0003 pea 3 44ae0: 2f02 movel %d2,%sp@- 44ae2: 4eb9 0004 b09c jsr 4b09c 44ae8: 4fef 000c lea %sp@(12),%sp 44aec: 4a80 tstl %d0 44aee: 6d1e blts 44b0e <== NEVER TAKEN return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 44af0: 2d43 0010 movel %d3,%fp@(16) 44af4: 7002 moveq #2,%d0 44af6: 2d42 0008 movel %d2,%fp@(8) } } 44afa: 242e fff8 movel %fp@(-8),%d2 44afe: 262e fffc movel %fp@(-4),%d3 return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 44b02: 2d40 000c movel %d0,%fp@(12) } } 44b06: 4e5e unlk %fp return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 44b08: 4ef9 0004 b09c jmp 4b09c } } 44b0e: 242e fff8 movel %fp@(-8),%d2 44b12: 70ff moveq #-1,%d0 44b14: 262e fffc movel %fp@(-4),%d3 44b18: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004769c : int truncate( const char *path, off_t length ) { 4769c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 476a0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 476a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); 476a4: 4878 0001 pea 1 <== NOT EXECUTED 476a8: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 476ac: 4eb9 0004 5650 jsr 45650 <== NOT EXECUTED if ( fd == -1 ) 476b2: 508f addql #8,%sp <== NOT EXECUTED ) { int status; int fd; fd = open( path, O_WRONLY ); 476b4: 2400 movel %d0,%d2 <== NOT EXECUTED if ( fd == -1 ) 476b6: 70ff moveq #-1,%d0 <== NOT EXECUTED 476b8: b082 cmpl %d2,%d0 <== NOT EXECUTED 476ba: 6720 beqs 476dc <== NOT EXECUTED return -1; status = ftruncate( fd, length ); 476bc: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 476c0: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 476c4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 476c6: 4eb9 0004 c308 jsr 4c308 <== NOT EXECUTED 476cc: 2600 movel %d0,%d3 <== NOT EXECUTED (void) close( fd ); 476ce: 2f02 movel %d2,%sp@- <== NOT EXECUTED 476d0: 4eb9 0004 433c jsr 4433c <== NOT EXECUTED return status; 476d6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 476da: 6002 bras 476de <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); if ( fd == -1 ) return -1; 476dc: 76ff moveq #-1,%d3 <== NOT EXECUTED status = ftruncate( fd, length ); (void) close( fd ); return status; } 476de: 2003 movel %d3,%d0 <== NOT EXECUTED 476e0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 476e4: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 476e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045c74 : #include int unlink( const char *path ) { 45c74: 4e56 ffbc linkw %fp,#-68 45c78: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 45c7c: 246e 0008 moveal %fp@(8),%a2 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 45c80: 2f0a movel %a2,%sp@- 45c82: 4eb9 0004 3452 jsr 43452 if ( parentpathlen == 0 ) 45c88: 588f addql #4,%sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 45c8a: 2a00 movel %d0,%d5 45c8c: 200e movel %fp,%d0 45c8e: 0680 ffff ffe8 addil #-24,%d0 if ( parentpathlen == 0 ) 45c94: 4a85 tstl %d5 45c96: 6616 bnes 45cae rtems_filesystem_get_start_loc( path, &i, &parentloc ); 45c98: 2f00 movel %d0,%sp@- 45c9a: 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; 45c9e: 4204 clrb %d4 */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); 45ca0: 2f0a movel %a2,%sp@- 45ca2: 4eb9 0004 4288 jsr 44288 45ca8: 4fef 000c lea %sp@(12),%sp 45cac: 601e bras 45ccc else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 45cae: 42a7 clrl %sp@- 45cb0: 2f00 movel %d0,%sp@- 45cb2: 4878 0002 pea 2 45cb6: 2f05 movel %d5,%sp@- 45cb8: 2f0a movel %a2,%sp@- 45cba: 4eb9 0004 33da jsr 433da RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 45cc0: 4fef 0014 lea %sp@(20),%sp 45cc4: 4a80 tstl %d0 45cc6: 6600 00c2 bnew 45d8a return -1; free_parentloc = true; 45cca: 7801 moveq #1,%d4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 45ccc: 4878 0014 pea 14 45cd0: 260e movel %fp,%d3 45cd2: 0683 ffff ffe8 addil #-24,%d3 45cd8: 240e movel %fp,%d2 45cda: 0682 ffff ffd4 addil #-44,%d2 name = path + parentpathlen; 45ce0: d5c5 addal %d5,%a2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 45ce2: 47f9 0005 0870 lea 50870 ,%a3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 45ce8: 2f03 movel %d3,%sp@- 45cea: 2f02 movel %d2,%sp@- 45cec: 4eb9 0004 fd78 jsr 4fd78 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 45cf2: 2f0a movel %a2,%sp@- 45cf4: 4e93 jsr %a3@ 45cf6: 2e80 movel %d0,%sp@ 45cf8: 2f0a movel %a2,%sp@- 45cfa: 4eb9 0004 3494 jsr 43494 45d00: d5c0 addal %d0,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 45d02: 2f0a movel %a2,%sp@- 45d04: 4e93 jsr %a3@ 45d06: 4297 clrl %sp@ 45d08: 2f02 movel %d2,%sp@- 45d0a: 42a7 clrl %sp@- 45d0c: 2f00 movel %d0,%sp@- 45d0e: 2f0a movel %a2,%sp@- 45d10: 4eb9 0004 3340 jsr 43340 0, &loc, false ); if ( result != 0 ) { 45d16: 4fef 0028 lea %sp@(40),%sp 45d1a: 4a80 tstl %d0 45d1c: 6710 beqs 45d2e <== ALWAYS TAKEN if ( free_parentloc ) 45d1e: 4a04 tstb %d4 <== NOT EXECUTED 45d20: 6768 beqs 45d8a <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 45d22: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45d24: 4eb9 0004 34d0 jsr 434d0 <== NOT EXECUTED 45d2a: 588f addql #4,%sp <== NOT EXECUTED 45d2c: 605c bras 45d8a <== NOT EXECUTED return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 45d2e: 206e ffe0 moveal %fp@(-32),%a0 45d32: 45f9 0004 34d0 lea 434d0 ,%a2 45d38: 2f02 movel %d2,%sp@- 45d3a: 2068 0010 moveal %a0@(16),%a0 45d3e: 4e90 jsr %a0@ 45d40: 588f addql #4,%sp 45d42: 7201 moveq #1,%d1 45d44: b280 cmpl %d0,%d1 45d46: 661e bnes 45d66 rtems_filesystem_freenode( &loc ); 45d48: 2f02 movel %d2,%sp@- 45d4a: 4e92 jsr %a2@ if ( free_parentloc ) 45d4c: 588f addql #4,%sp 45d4e: 4a04 tstb %d4 45d50: 6706 beqs 45d58 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 45d52: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45d54: 4e92 jsr %a2@ <== NOT EXECUTED 45d56: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 45d58: 4eb9 0004 f4cc jsr 4f4cc <__errno> 45d5e: 2040 moveal %d0,%a0 45d60: 7015 moveq #21,%d0 45d62: 2080 movel %d0,%a0@ 45d64: 6024 bras 45d8a } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 45d66: 2f02 movel %d2,%sp@- 45d68: 206e ffe0 moveal %fp@(-32),%a0 45d6c: 2f03 movel %d3,%sp@- 45d6e: 2068 000c moveal %a0@(12),%a0 45d72: 4e90 jsr %a0@ 45d74: 2a00 movel %d0,%d5 rtems_filesystem_freenode( &loc ); 45d76: 2f02 movel %d2,%sp@- 45d78: 4e92 jsr %a2@ if ( free_parentloc ) 45d7a: 4fef 000c lea %sp@(12),%sp 45d7e: 4a04 tstb %d4 45d80: 670a beqs 45d8c rtems_filesystem_freenode( &parentloc ); 45d82: 2f03 movel %d3,%sp@- 45d84: 4e92 jsr %a2@ 45d86: 588f addql #4,%sp 45d88: 6002 bras 45d8c result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; 45d8a: 7aff moveq #-1,%d5 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 45d8c: 2005 movel %d5,%d0 45d8e: 4cee 0c3c ffbc moveml %fp@(-68),%d2-%d5/%a2-%a3 45d94: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045fe4 : */ int unmount( const char *path ) { 45fe4: 4e56 ffe0 linkw %fp,#-32 45fe8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 45fec: 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 ) ) 45ff0: 7401 moveq #1,%d2 45ff2: 2f0a movel %a2,%sp@- 45ff4: 4eb9 0004 e0d4 jsr 4e0d4 45ffa: 2e82 movel %d2,%sp@ 45ffc: 240e movel %fp,%d2 45ffe: 0682 ffff ffec addil #-20,%d2 46004: 2f02 movel %d2,%sp@- 46006: 42a7 clrl %sp@- 46008: 2f00 movel %d0,%sp@- 4600a: 2f0a movel %a2,%sp@- 4600c: 4eb9 0004 33c2 jsr 433c2 46012: 4fef 0014 lea %sp@(20),%sp 46016: 4a80 tstl %d0 46018: 6600 00e8 bnew 46102 return -1; mt_entry = loc.mt_entry; 4601c: 246e fffc moveal %fp@(-4),%a2 46020: 47f9 0004 34b8 lea 434b8 ,%a3 /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ 46026: 202e ffec movel %fp@(-20),%d0 4602a: b0aa 001c cmpl %a2@(28),%d0 4602e: 6716 beqs 46046 rtems_filesystem_freenode( &loc ); 46030: 2f02 movel %d2,%sp@- 46032: 4e93 jsr %a3@ rtems_set_errno_and_return_minus_one( EACCES ); 46034: 4eb9 0004 cc00 jsr 4cc00 <__errno> 4603a: 588f addql #4,%sp 4603c: 720d moveq #13,%d1 4603e: 2040 moveal %d0,%a0 46040: 2081 movel %d1,%a0@ 46042: 6000 00be braw 46102 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 46046: 2f02 movel %d2,%sp@- 46048: 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 ) 4604a: 2079 0005 cee4 moveal 5cee4 ,%a0 46050: 588f addql #4,%sp 46052: b5e8 0014 cmpal %a0@(20),%a2 46056: 6724 beqs 4607c /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 46058: 2f2a 002c movel %a2@(44),%sp@- 4605c: 487a ff6e pea %pc@(45fcc ) 46060: 4eb9 0004 3c9a jsr 43c9a 46066: 508f addql #8,%sp 46068: 4a00 tstb %d0 4606a: 6610 bnes 4607c * 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 ) 4606c: 2f0a movel %a2,%sp@- 4606e: 4eb9 0004 3804 jsr 43804 46074: 588f addql #4,%sp 46076: 7201 moveq #1,%d1 46078: b280 cmpl %d0,%d1 4607a: 660e bnes 4608a rtems_set_errno_and_return_minus_one( EBUSY ); 4607c: 4eb9 0004 cc00 jsr 4cc00 <__errno> 46082: 2040 moveal %d0,%a0 46084: 7010 moveq #16,%d0 46086: 2080 movel %d0,%a0@ 46088: 6078 bras 46102 * 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 ) 4608a: 206a 0014 moveal %a2@(20),%a0 4608e: 2f0a movel %a2,%sp@- 46090: 2068 0028 moveal %a0@(40),%a0 46094: 4e90 jsr %a0@ 46096: 588f addql #4,%sp 46098: 4a80 tstl %d0 4609a: 6666 bnes 46102 <== 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){ 4609c: 206a 0028 moveal %a2@(40),%a0 460a0: 2f0a movel %a2,%sp@- 460a2: 2068 002c moveal %a0@(44),%a0 460a6: 4e90 jsr %a0@ 460a8: 588f addql #4,%sp 460aa: 4a80 tstl %d0 460ac: 671a beqs 460c8 <== ALWAYS TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 460ae: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 460b2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 460b4: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED 460b8: 4e90 jsr %a0@ <== NOT EXECUTED 460ba: 588f addql #4,%sp <== NOT EXECUTED 460bc: 4a80 tstl %d0 <== NOT EXECUTED 460be: 6742 beqs 46102 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 460c0: 42a7 clrl %sp@- <== NOT EXECUTED 460c2: 4eb9 0004 6fdc jsr 46fdc <== 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 ); 460c8: 42a7 clrl %sp@- 460ca: 42a7 clrl %sp@- 460cc: 2f39 0005 e4f0 movel 5e4f0 ,%sp@- 460d2: 4eb9 0004 69a0 jsr 469a0 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 460d8: 2f0a movel %a2,%sp@- 460da: 4eb9 0004 72d4 jsr 472d4 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 460e0: 2f39 0005 e4f0 movel 5e4f0 ,%sp@- 460e6: 4eb9 0004 6aa8 jsr 46aa8 /* * 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 ); 460ec: 486a 0008 pea %a2@(8) 460f0: 4e93 jsr %a3@ free( mt_entry ); 460f2: 2f0a movel %a2,%sp@- 460f4: 4eb9 0004 34cc jsr 434cc return 0; 460fa: 4fef 001c lea %sp@(28),%sp 460fe: 4280 clrl %d0 46100: 6002 bras 46104 */ 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; 46102: 70ff moveq #-1,%d0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 46104: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 4610a: 4e5e unlk %fp ... =============================================================================== 00046050 : int utime( const char *path, const struct utimbuf *times ) { 46050: 4e56 ffe0 linkw %fp,#-32 46054: 2f0a movel %a2,%sp@- 46056: 246e 000c moveal %fp@(12),%a2 4605a: 2f02 movel %d2,%sp@- 4605c: 242e 0008 movel %fp@(8),%d2 rtems_filesystem_location_info_t temp_loc; int result; struct utimbuf now; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 46060: 2f02 movel %d2,%sp@- 46062: 4eb9 0004 ec98 jsr 4ec98 46068: 7201 moveq #1,%d1 4606a: 2e81 movel %d1,%sp@ 4606c: 486e ffe4 pea %fp@(-28) 46070: 42a7 clrl %sp@- 46072: 2f00 movel %d0,%sp@- 46074: 2f02 movel %d2,%sp@- 46076: 4eb9 0004 2ff2 jsr 42ff2 4607c: 4fef 0014 lea %sp@(20),%sp 46080: 4a80 tstl %d0 46082: 6646 bnes 460ca return -1; if ( times == NULL ) { 46084: 4a8a tstl %a2 46086: 6616 bnes 4609e <== ALWAYS TAKEN now.actime = now.modtime = time( NULL ); 46088: 42a7 clrl %sp@- <== NOT EXECUTED times = &now; 4608a: 45ee fff8 lea %fp@(-8),%a2 <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( times == NULL ) { now.actime = now.modtime = time( NULL ); 4608e: 4eb9 0005 0f78 jsr 50f78