=============================================================================== 00049370 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 49370: 7206 moveq #6,%d1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 49372: 4e56 0000 linkw %fp,#0 49376: 206e 0008 moveal %fp@(8),%a0 4937a: 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 ) { 4937c: 2450 moveal %a0@,%a2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4937e: 2268 0010 moveal %a0@(16),%a1 switch( node->type ) { 49382: 202a 0048 movel %a2@(72),%d0 49386: 5380 subql #1,%d0 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 49388: 2269 0034 moveal %a1@(52),%a1 switch( node->type ) { 4938c: b280 cmpl %d0,%d1 4938e: 6546 bcss 493d6 <== NEVER TAKEN 49390: 303b 0a08 movew %pc@(4939a ,%d0:l:2),%d0 49394: 48c0 extl %d0 49396: 4efb 0802 jmp %pc@(4939a ,%d0:l) 4939a: 000e 016 <== NOT EXECUTED 4939c: 0016 026 <== NOT EXECUTED 4939e: 001e 036 <== NOT EXECUTED 493a0: 001e 036 <== NOT EXECUTED 493a2: 002a 052 <== NOT EXECUTED 493a4: 002a 052 <== NOT EXECUTED 493a6: 0032 062 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 493a8: 2169 000c 0008 movel %a1@(12),%a0@(8) break; 493ae: 6026 bras 493d6 case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 493b0: 203c 0005 b688 movel #374408,%d0 493b6: 601a bras 493d2 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 493b8: 223c 0005 b6f8 movel #374520,%d1 493be: 2141 0008 movel %d1,%a0@(8) break; 493c2: 6012 bras 493d6 case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 493c4: 2169 0008 0008 movel %a1@(8),%a0@(8) break; 493ca: 600a bras 493d6 case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 493cc: 203c 0005 b5e0 movel #374240,%d0 493d2: 2140 0008 movel %d0,%a0@(8) break; } return 0; } 493d6: 245f moveal %sp@+,%a2 493d8: 4280 clrl %d0 493da: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000491b0 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 491b0: 4e56 fff8 linkw %fp,#-8 491b4: 2f0a movel %a2,%sp@- struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 491b6: 4878 0060 pea 60 491ba: 4878 0001 pea 1 491be: 4eb9 0004 2438 jsr 42438 if ( !node ) 491c4: 508f addql #8,%sp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 491c6: 2440 moveal %d0,%a2 if ( !node ) 491c8: 4a80 tstl %d0 491ca: 674e beqs 4921a <== NEVER TAKEN /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 491cc: 4878 0020 pea 20 491d0: 2f2e 000c movel %fp@(12),%sp@- /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 491d4: 256e 0008 0048 movel %fp@(8),%a2@(72) strncpy( node->name, name, IMFS_NAME_MAX ); 491da: 486a 000c pea %a2@(12) return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 491de: 7001 moveq #1,%d0 491e0: 3540 0032 movew %d0,%a2@(50) node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 491e4: 4eb9 0004 e4fc jsr 4e4fc /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 491ea: 256e 0010 002e movel %fp@(16),%a2@(46) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 491f0: 42a7 clrl %sp@- 491f2: 486e fff8 pea %fp@(-8) node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; 491f6: 4240 clrw %d0 491f8: 3540 0038 movew %d0,%a2@(56) node->st_gid = 0; 491fc: 3540 003a movew %d0,%a2@(58) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 49200: 4eb9 0004 28b0 jsr 428b0 node->stat_atime = (time_t) tv.tv_sec; 49206: 202e fff8 movel %fp@(-8),%d0 node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; return node; 4920a: 4fef 0014 lea %sp@(20),%sp */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; 4920e: 2540 0044 movel %d0,%a2@(68) /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 49212: 2540 003c movel %d0,%a2@(60) node->stat_mtime = (time_t) tv.tv_sec; 49216: 2540 0040 movel %d0,%a2@(64) node->stat_ctime = (time_t) tv.tv_sec; return node; } 4921a: 200a movel %a2,%d0 4921c: 246e fff4 moveal %fp@(-12),%a2 49220: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004925e : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4925e: 4e56 fff0 linkw %fp,#-16 49262: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49266: 266e 0008 moveal %fp@(8),%a3 4926a: 242e 000c movel %fp@(12),%d2 4926e: 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 ) 49272: 4a8b tstl %a3 49274: 6606 bnes 4927c <== ALWAYS TAKEN 49276: 99cc subal %a4,%a4 <== NOT EXECUTED 49278: 6000 00ea braw 49364 <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4927c: 2079 0005 c530 moveal 5c530 ,%a0 49282: 2028 002c movel %a0@(44),%d0 49286: 4680 notl %d0 49288: c0ae 0014 andl %fp@(20),%d0 4928c: 2f00 movel %d0,%sp@- 4928e: 2f2e 0010 movel %fp@(16),%sp@- 49292: 2f02 movel %d2,%sp@- 49294: 4eb9 0004 91b0 jsr 491b0 if ( !node ) 4929a: 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 ); 4929e: 2840 moveal %d0,%a4 if ( !node ) 492a0: 4a80 tstl %d0 492a2: 6700 00c0 beqw 49364 return NULL; /* * Set the type specific information */ switch (type) { 492a6: 5382 subql #1,%d2 492a8: 7006 moveq #6,%d0 492aa: b082 cmpl %d2,%d0 492ac: 6570 bcss 4931e <== NEVER TAKEN 492ae: 303b 2a08 movew %pc@(492b8 ,%d2:l:2),%d0 492b2: 48c0 extl %d0 492b4: 4efb 0802 jmp %pc@(492b8 ,%d0:l) 492b8: 000e 016 <== NOT EXECUTED 492ba: 002a 052 <== NOT EXECUTED 492bc: 0024 044 <== NOT EXECUTED 492be: 0024 044 <== NOT EXECUTED 492c0: 0046 0106 <== NOT EXECUTED 492c2: 0036 066 <== NOT EXECUTED 492c4: 0060 0140 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 492c6: 41ec 0050 lea %a4@(80),%a0 492ca: 2948 004c movel %a0,%a4@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 492ce: 41ec 004c lea %a4@(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; 492d2: 42ac 0050 clrl %a4@(80) the_chain->last = _Chain_Head(the_chain); 492d6: 2948 0054 movel %a0,%a4@(84) 492da: 605e bras 4933a 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; 492dc: 2952 004c movel %a2@,%a4@(76) break; 492e0: 6058 bras 4933a case IMFS_DEVICE: node->info.device.major = info->device.major; 492e2: 2952 004c movel %a2@,%a4@(76) node->info.device.minor = info->device.minor; 492e6: 296a 0004 0050 movel %a2@(4),%a4@(80) break; 492ec: 604c bras 4933a case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 492ee: 42ac 0054 clrl %a4@(84) <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 492f2: 4280 clrl %d0 <== NOT EXECUTED 492f4: 4281 clrl %d1 <== NOT EXECUTED 492f6: 2940 004c movel %d0,%a4@(76) <== NOT EXECUTED 492fa: 2941 0050 movel %d1,%a4@(80) <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; 492fe: 42ac 0054 clrl %a4@(84) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 49302: 4280 clrl %d0 49304: 4281 clrl %d1 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 49306: 42ac 0058 clrl %a4@(88) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4930a: 2940 004c movel %d0,%a4@(76) 4930e: 2941 0050 movel %d1,%a4@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 49312: 42ac 005c clrl %a4@(92) break; 49316: 6022 bras 4933a case IMFS_FIFO: node->info.fifo.pipe = NULL; 49318: 42ac 004c clrl %a4@(76) break; 4931c: 601c bras 4933a default: assert(0); 4931e: 4879 0005 b524 pea 5b524 <== NOT EXECUTED 49324: 4879 0005 b573 pea 5b573 <__FUNCTION__.5866> <== NOT EXECUTED 4932a: 4878 005c pea 5c <== NOT EXECUTED 4932e: 4879 0005 b526 pea 5b526 <== NOT EXECUTED 49334: 4eb9 0004 9f40 jsr 49f40 <__assert_func> <== NOT EXECUTED /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4933a: 206b 0010 moveal %a3@(16),%a0 4933e: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 49342: 2028 0004 movel %a0@(4),%d0 49346: 5280 addql #1,%d0 49348: 2140 0004 movel %d0,%a0@(4) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4934c: 2053 moveal %a3@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4934e: 2940 0034 movel %d0,%a4@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 49352: 2948 0008 movel %a0,%a4@(8) 49356: 2f0c movel %a4,%sp@- 49358: 4868 004c pea %a0@(76) 4935c: 4eb9 0004 6104 jsr 46104 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 49362: 508f addql #8,%sp } 49364: 200c movel %a4,%d0 49366: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4936c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049224 : IMFS_jnode_t *IMFS_create_root_node(void) { 49224: 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) ); 49228: 4878 41ed pea 41ed 4922c: 4879 0005 b344 pea 5b344 49232: 4878 0001 pea 1 49236: 4eb9 0004 91b0 jsr 491b0 if ( !node ) 4923c: 4fef 000c lea %sp@(12),%sp 49240: 4a80 tstl %d0 49242: 6716 beqs 4925a <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 49244: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 49246: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 49248: 43e9 0050 lea %a1@(80),%a1 4924c: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 49250: 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; 49252: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 49256: 2149 0054 movel %a1,%a0@(84) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 4925a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043dca : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 43dca: 4e56 ffe0 linkw %fp,#-32 43dce: 206e 0008 moveal %fp@(8),%a0 43dd2: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 43dd6: 242e 000c movel %fp@(12),%d2 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 43dda: 4a88 tstl %a0 43ddc: 6612 bnes 43df0 <== ALWAYS TAKEN 43dde: 4879 0005 fe00 pea 5fe00 <== NOT EXECUTED 43de4: 4879 0005 fece pea 5fece <__FUNCTION__.6617> <== NOT EXECUTED 43dea: 4878 0084 pea 84 <== NOT EXECUTED 43dee: 6014 bras 43e04 <== NOT EXECUTED assert( level >= 0 ); 43df0: 4a82 tstl %d2 43df2: 6c1c bges 43e10 <== ALWAYS TAKEN 43df4: 4879 0005 fe0e pea 5fe0e <== NOT EXECUTED 43dfa: 4879 0005 fece pea 5fece <__FUNCTION__.6617> <== NOT EXECUTED 43e00: 4878 0086 pea 86 <== NOT EXECUTED 43e04: 4879 0005 fd50 pea 5fd50 <== NOT EXECUTED 43e0a: 4eb9 0004 45e4 jsr 445e4 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 43e10: 7001 moveq #1,%d0 43e12: b0a8 0048 cmpl %a0@(72),%d0 43e16: 6712 beqs 43e2a <== ALWAYS TAKEN 43e18: 4879 0005 fe19 pea 5fe19 <== NOT EXECUTED 43e1e: 4879 0005 fece pea 5fece <__FUNCTION__.6617> <== NOT EXECUTED 43e24: 4878 0088 pea 88 <== NOT EXECUTED 43e28: 60da bras 43e04 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 43e2a: 2a08 movel %a0,%d5 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 43e2c: 2802 movel %d2,%d4 43e2e: 0685 0000 0050 addil #80,%d5 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 43e34: 4bf9 0005 0a84 lea 50a84 ,%a5 IMFS_print_jnode( the_jnode ); 43e3a: 49f9 0004 3c4e lea 43c4e ,%a4 if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 43e40: 5284 addql #1,%d4 43e42: 47f9 0004 3dca lea 43dca ,%a3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43e48: 2468 004c moveal %a0@(76),%a2 43e4c: 6034 bras 43e82 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 43e4e: 4283 clrl %d3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 43e50: 2079 0006 1814 moveal 61814 <_impure_ptr>,%a0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 43e56: 5283 addql #1,%d3 fprintf(stdout, "...." ); 43e58: 2f28 0008 movel %a0@(8),%sp@- 43e5c: 4879 0005 fe3f pea 5fe3f 43e62: 4e95 jsr %a5@ !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 43e64: 508f addql #8,%sp 43e66: b483 cmpl %d3,%d2 43e68: 6ce6 bges 43e50 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 43e6a: 2f0a movel %a2,%sp@- 43e6c: 4e94 jsr %a4@ if ( the_jnode->type == IMFS_DIRECTORY ) 43e6e: 588f addql #4,%sp 43e70: 7001 moveq #1,%d0 43e72: b0aa 0048 cmpl %a2@(72),%d0 43e76: 6608 bnes 43e80 IMFS_dump_directory( the_jnode, level + 1 ); 43e78: 2f04 movel %d4,%sp@- 43e7a: 2f0a movel %a2,%sp@- 43e7c: 4e93 jsr %a3@ 43e7e: 508f addql #8,%sp the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 43e80: 2452 moveal %a2@,%a2 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43e82: ba8a cmpl %a2,%d5 43e84: 66c8 bnes 43e4e fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 43e86: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 43e8c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004950c : char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 4950c: 70f8 moveq #-8,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4950e: 4e56 ff9c linkw %fp,#-100 49512: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 49516: 282e 0010 movel %fp@(16),%d4 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 4951a: c084 andl %d4,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4951c: 2a6e 0008 moveal %fp@(8),%a5 49520: 286e 000c moveal %fp@(12),%a4 49524: 246e 0014 moveal %fp@(20),%a2 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 49528: 671c beqs 49546 <== ALWAYS TAKEN assert( 0 ); 4952a: 4879 0005 b524 pea 5b524 <== NOT EXECUTED 49530: 4879 0005 b5d0 pea 5b5d0 <__FUNCTION__.6107> <== NOT EXECUTED 49536: 4878 01f6 pea 1f6 <== NOT EXECUTED 4953a: 4879 0005 b584 pea 5b584 <__FUNCTION__.5866+0x11> <== NOT EXECUTED 49540: 4eb9 0004 9f40 jsr 49f40 <__assert_func> <== NOT EXECUTED * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 49546: 2a0e movel %fp,%d5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 49548: 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 ); 4954a: 0685 ffff ffc7 addil #-57,%d5 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49550: 2e3c 0004 9ca8 movel #302248,%d7 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 49556: 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 ); 49558: 486e fffc pea %fp@(-4) 4955c: 2f05 movel %d5,%sp@- 4955e: 2f0c movel %a4,%sp@- 49560: 4875 2800 pea %a5@(00000000,%d2:l) 49564: 4eb9 0004 9d38 jsr 49d38 pathnamelen -= len; 4956a: 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 ); 4956e: 2600 movel %d0,%d3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 49570: 4fef 0010 lea %sp@(16),%sp 49574: 4a92 tstl %a2@ 49576: 6700 00dc beqw 49654 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4957a: 4a80 tstl %d0 4957c: 671c beqs 4959a if ( node->type == IMFS_DIRECTORY ) 4957e: 7001 moveq #1,%d0 49580: b0ab 0048 cmpl %a3@(72),%d0 49584: 6614 bnes 4959a if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 49586: 4878 0001 pea 1 4958a: 2f0a movel %a2,%sp@- 4958c: 4eb9 0004 93de jsr 493de 49592: 508f addql #8,%sp 49594: 4a80 tstl %d0 49596: 6700 0162 beqw 496fa rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 4959a: 2652 moveal %a2@,%a3 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 4959c: d486 addl %d6,%d2 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 4959e: 99c6 subal %d6,%a4 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 495a0: 7003 moveq #3,%d0 495a2: b083 cmpl %d3,%d0 495a4: 6742 beqs 495e8 495a6: 7204 moveq #4,%d1 495a8: b283 cmpl %d3,%d1 495aa: 6700 00c0 beqw 4966c 495ae: 103c 0002 moveb #2,%d0 495b2: b083 cmpl %d3,%d0 495b4: 6600 00c8 bnew 4967e case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 495b8: 2079 0005 c530 moveal 5c530 ,%a0 495be: b7e8 0018 cmpal %a0@(24),%a3 495c2: 6794 beqs 49558 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 495c4: 206a 0010 moveal %a2@(16),%a0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 495c8: b7e8 001c cmpal %a0@(28),%a3 495cc: 6614 bnes 495e2 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 495ce: 4878 0014 pea 14 495d2: 260e movel %fp,%d3 495d4: 4868 0008 pea %a0@(8) 495d8: 0683 ffff ffe8 addil #-24,%d3 495de: 6000 00ca braw 496aa pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 495e2: 266b 0008 moveal %a3@(8),%a3 495e6: 6068 bras 49650 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 495e8: 202b 0048 movel %a3@(72),%d0 495ec: 7203 moveq #3,%d1 495ee: b280 cmpl %d0,%d1 495f0: 6614 bnes 49606 IMFS_evaluate_hard_link( pathloc, 0 ); 495f2: 42a7 clrl %sp@- 495f4: 2f0a movel %a2,%sp@- 495f6: 4eb9 0004 9416 jsr 49416 node = pathloc->node_access; 495fc: 2652 moveal %a2@,%a3 if ( !node ) 495fe: 508f addql #8,%sp 49600: 4a8b tstl %a3 49602: 661e bnes 49622 <== ALWAYS TAKEN 49604: 6024 bras 4962a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 49606: 7204 moveq #4,%d1 49608: b280 cmpl %d0,%d1 4960a: 6616 bnes 49622 result = IMFS_evaluate_sym_link( pathloc, 0 ); 4960c: 42a7 clrl %sp@- 4960e: 2f0a movel %a2,%sp@- 49610: 4eb9 0004 9470 jsr 49470 node = pathloc->node_access; 49616: 2652 moveal %a2@,%a3 if ( result == -1 ) 49618: 508f addql #8,%sp 4961a: 72ff moveq #-1,%d1 4961c: b280 cmpl %d0,%d1 4961e: 6700 00ea beqw 4970a /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 49622: 7001 moveq #1,%d0 49624: b0ab 0048 cmpl %a3@(72),%d0 49628: 6712 beqs 4963c rtems_set_errno_and_return_minus_one( ENOTDIR ); 4962a: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 49630: 7e14 moveq #20,%d7 49632: 76ff moveq #-1,%d3 49634: 2040 moveal %d0,%a0 49636: 2087 movel %d7,%a0@ 49638: 6000 00d2 braw 4970c /* * 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 ) { 4963c: 206b 0058 moveal %a3@(88),%a0 49640: 4a88 tstl %a0 49642: 6656 bnes 4969a /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49644: 2f05 movel %d5,%sp@- 49646: 2047 moveal %d7,%a0 49648: 2f0b movel %a3,%sp@- 4964a: 4e90 jsr %a0@ if ( !node ) 4964c: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4964e: 2640 moveal %d0,%a3 if ( !node ) 49650: 4a8b tstl %a3 49652: 6612 bnes 49666 rtems_set_errno_and_return_minus_one( ENOENT ); 49654: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 4965a: 7c02 moveq #2,%d6 4965c: 76ff moveq #-1,%d3 4965e: 2040 moveal %d0,%a0 49660: 2086 movel %d6,%a0@ 49662: 6000 00a8 braw 4970c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 49666: 248b movel %a3,%a2@ break; 49668: 6000 feee braw 49558 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4966c: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 49672: 7a5b moveq #91,%d5 49674: 76ff moveq #-1,%d3 49676: 2040 moveal %d0,%a0 49678: 2085 movel %d5,%a0@ 4967a: 6000 0090 braw 4970c /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4967e: 4a83 tstl %d3 49680: 6708 beqs 4968a 49682: 7004 moveq #4,%d0 49684: b083 cmpl %d3,%d0 49686: 6600 fed0 bnew 49558 * 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 ) { 4968a: 7201 moveq #1,%d1 4968c: b2ab 0048 cmpl %a3@(72),%d1 49690: 664e bnes 496e0 if ( node->info.directory.mt_fs != NULL ) { 49692: 206b 0058 moveal %a3@(88),%a0 49696: 4a88 tstl %a0 49698: 6746 beqs 496e0 newloc = node->info.directory.mt_fs->mt_fs_root; 4969a: 4878 0014 pea 14 4969e: 260e movel %fp,%d3 496a0: 0683 ffff ffe8 addil #-24,%d3 496a6: 4868 001c pea %a0@(28) 496aa: 2f03 movel %d3,%sp@- 496ac: 47f9 0004 d8d8 lea 4d8d8 ,%a3 496b2: 4e93 jsr %a3@ *pathloc = newloc; 496b4: 4878 0014 pea 14 496b8: 2f03 movel %d3,%sp@- 496ba: 2f0a movel %a2,%sp@- 496bc: 4e93 jsr %a3@ return (*pathloc->ops->evalpath_h)( &pathname[i-len], 496be: 206e fffc moveal %fp@(-4),%a0 496c2: 9488 subl %a0,%d2 496c4: 2f0a movel %a2,%sp@- 496c6: 226a 000c moveal %a2@(12),%a1 496ca: 2f04 movel %d4,%sp@- 496cc: 4874 8800 pea %a4@(00000000,%a0:l) 496d0: 4875 2800 pea %a5@(00000000,%d2:l) 496d4: 2051 moveal %a1@,%a0 496d6: 4e90 jsr %a0@ 496d8: 4fef 0028 lea %sp@(40),%sp 496dc: 2600 movel %d0,%d3 496de: 602c bras 4970c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 496e0: 2f0a movel %a2,%sp@- 496e2: 4eb9 0004 9370 jsr 49370 496e8: 2600 movel %d0,%d3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 496ea: 2e84 movel %d4,%sp@ 496ec: 2f0a movel %a2,%sp@- 496ee: 4eb9 0004 93de jsr 493de 496f4: 508f addql #8,%sp 496f6: 4a80 tstl %d0 496f8: 6612 bnes 4970c rtems_set_errno_and_return_minus_one( EACCES ); 496fa: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 49700: 780d moveq #13,%d4 49702: 76ff moveq #-1,%d3 49704: 2040 moveal %d0,%a0 49706: 2084 movel %d4,%a0@ 49708: 6002 bras 4970c 4970a: 2600 movel %d0,%d3 <== NOT EXECUTED return result; } 4970c: 2003 movel %d3,%d0 4970e: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 49714: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000497ae : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 497ae: 4e56 ff9c linkw %fp,#-100 497b2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 497b6: 286e 0008 moveal %fp@(8),%a4 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 497ba: 2c0e movel %fp,%d6 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 497bc: 4282 clrl %d2 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 497be: 0686 ffff ffc7 addil #-57,%d6 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 497c4: 2a3c 0004 9718 movel #300824,%d5 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 497ca: 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 */ ) { 497cc: 246e 000c moveal %fp@(12),%a2 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 497d0: 4eb9 0004 e4e4 jsr 4e4e4 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 497d6: 2a6e 0010 moveal %fp@(16),%a5 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 497da: 588f addql #4,%sp 497dc: 2800 movel %d0,%d4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 497de: 2652 moveal %a2@,%a3 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 497e0: 486e fffc pea %fp@(-4) 497e4: 2f06 movel %d6,%sp@- 497e6: 2f04 movel %d4,%sp@- 497e8: 4874 2800 pea %a4@(00000000,%d2:l) 497ec: 4eb9 0004 9d38 jsr 49d38 pathlen -= len; 497f2: 2e2e fffc movel %fp@(-4),%d7 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 497f6: 2600 movel %d0,%d3 pathlen -= len; i += len; if ( !pathloc->node_access ) 497f8: 4fef 0010 lea %sp@(16),%sp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 497fc: 9887 subl %d7,%d4 i += len; if ( !pathloc->node_access ) 497fe: 4a92 tstl %a2@ 49800: 6700 0158 beqw 4995a /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 49804: 4a80 tstl %d0 49806: 671c beqs 49824 if ( node->type == IMFS_DIRECTORY ) 49808: 7001 moveq #1,%d0 4980a: b0ab 0048 cmpl %a3@(72),%d0 4980e: 6614 bnes 49824 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 49810: 4878 0001 pea 1 49814: 2f0a movel %a2,%sp@- 49816: 4eb9 0004 93de jsr 493de 4981c: 508f addql #8,%sp 4981e: 4a80 tstl %d0 49820: 6700 0186 beqw 499a8 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 49824: 2652 moveal %a2@,%a3 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 49826: d487 addl %d7,%d2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 49828: 7002 moveq #2,%d0 4982a: b083 cmpl %d3,%d0 4982c: 671a beqs 49848 4982e: 6508 bcss 49838 49830: 4a83 tstl %d3 49832: 6700 00e4 beqw 49918 49836: 60a8 bras 497e0 49838: 7203 moveq #3,%d1 4983a: b283 cmpl %d3,%d1 4983c: 6740 beqs 4987e 4983e: 7004 moveq #4,%d0 49840: b083 cmpl %d3,%d0 49842: 669c bnes 497e0 <== NEVER TAKEN 49844: 6000 00e4 braw 4992a case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 49848: 2079 0005 c530 moveal 5c530 ,%a0 4984e: b7e8 0018 cmpal %a0@(24),%a3 49852: 678c beqs 497e0 <== NEVER TAKEN /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 49854: 206a 0010 moveal %a2@(16),%a0 49858: b7e8 001c cmpal %a0@(28),%a3 4985c: 6612 bnes 49870 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 4985e: 4878 0014 pea 14 49862: 260e movel %fp,%d3 49864: 4868 0008 pea %a0@(8) 49868: 0683 ffff ffe8 addil #-24,%d3 4986e: 605c bras 498cc *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 49870: 266b 0008 moveal %a3@(8),%a3 49874: 4a8b tstl %a3 49876: 6600 009a bnew 49912 4987a: 6000 00de braw 4995a pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4987e: 202b 0048 movel %a3@(72),%d0 49882: 7203 moveq #3,%d1 49884: b280 cmpl %d0,%d1 49886: 6706 beqs 4988e result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 49888: 7204 moveq #4,%d1 4988a: b280 cmpl %d0,%d1 4988c: 6614 bnes 498a2 result = IMFS_evaluate_link( pathloc, 0 ); 4988e: 42a7 clrl %sp@- 49890: 2045 moveal %d5,%a0 49892: 2f0a movel %a2,%sp@- 49894: 4e90 jsr %a0@ if ( result == -1 ) 49896: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 49898: 2600 movel %d0,%d3 if ( result == -1 ) 4989a: 70ff moveq #-1,%d0 4989c: b083 cmpl %d3,%d0 4989e: 6700 0116 beqw 499b6 return -1; } node = pathloc->node_access; 498a2: 2052 moveal %a2@,%a0 if ( !node ) 498a4: 4a88 tstl %a0 498a6: 6700 00de beqw 49986 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 498aa: 7001 moveq #1,%d0 498ac: b0a8 0048 cmpl %a0@(72),%d0 498b0: 6600 00d4 bnew 49986 /* * 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 ) { 498b4: 2268 0058 moveal %a0@(88),%a1 498b8: 4a89 tstl %a1 498ba: 6744 beqs 49900 newloc = node->info.directory.mt_fs->mt_fs_root; 498bc: 4878 0014 pea 14 498c0: 260e movel %fp,%d3 498c2: 0683 ffff ffe8 addil #-24,%d3 498c8: 4869 001c pea %a1@(28) 498cc: 2f03 movel %d3,%sp@- 498ce: 47f9 0004 d8d8 lea 4d8d8 ,%a3 498d4: 4e93 jsr %a3@ *pathloc = newloc; 498d6: 4878 0014 pea 14 498da: 2f03 movel %d3,%sp@- 498dc: 2f0a movel %a2,%sp@- 498de: 4e93 jsr %a3@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 498e0: 206a 000c moveal %a2@(12),%a0 498e4: 94ae fffc subl %fp@(-4),%d2 498e8: 2f0d movel %a5,%sp@- 498ea: 2f0a movel %a2,%sp@- 498ec: 4874 2800 pea %a4@(00000000,%d2:l) 498f0: 2068 0004 moveal %a0@(4),%a0 498f4: 4e90 jsr %a0@ 498f6: 4fef 0024 lea %sp@(36),%sp 498fa: 2600 movel %d0,%d3 498fc: 6000 00b8 braw 499b6 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49900: 2f06 movel %d6,%sp@- 49902: 2f08 movel %a0,%sp@- 49904: 4eb9 0004 9ca8 jsr 49ca8 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4990a: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4990c: 2640 moveal %d0,%a3 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4990e: 4a80 tstl %d0 49910: 6728 beqs 4993a done = true; else pathloc->node_access = node; 49912: 248b movel %a3,%a2@ 49914: 6000 feca braw 497e0 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 49918: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 4991e: 7e11 moveq #17,%d7 49920: 76ff moveq #-1,%d3 49922: 2040 moveal %d0,%a0 49924: 2087 movel %d7,%a0@ 49926: 6000 008e braw 499b6 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4992a: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 49930: 7c5b moveq #91,%d6 49932: 76ff moveq #-1,%d3 49934: 2040 moveal %d0,%a0 49936: 2086 movel %d6,%a0@ 49938: 607c bras 499b6 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4993a: 2002 movel %d2,%d0 4993c: 90ae fffc subl %fp@(-4),%d0 * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) 49940: 47f9 0004 35a8 lea 435a8 ,%a3 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 49946: d08c addl %a4,%d0 49948: d9c2 addal %d2,%a4 4994a: 2a80 movel %d0,%a5@ /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 4994c: 601c bras 4996a if ( !IMFS_is_separator( path[ i ] ) ) 4994e: 49c0 extbl %d0 49950: 2f00 movel %d0,%sp@- 49952: 4e93 jsr %a3@ 49954: 588f addql #4,%sp 49956: 4a80 tstl %d0 49958: 6610 bnes 4996a rtems_set_errno_and_return_minus_one( ENOENT ); 4995a: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 49960: 7a02 moveq #2,%d5 49962: 76ff moveq #-1,%d3 49964: 2040 moveal %d0,%a0 49966: 2085 movel %d5,%a0@ 49968: 604c bras 499b6 /* * 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++) { 4996a: 1014 moveb %a4@,%d0 if ( !IMFS_is_separator( path[ i ] ) ) 4996c: 528c addql #1,%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++) { 4996e: 66de bnes 4994e /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 49970: 2f0a movel %a2,%sp@- 49972: 4eb9 0004 9370 jsr 49370 /* * The returned node must be a directory */ node = pathloc->node_access; 49978: 2052 moveal %a2@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4997a: 2600 movel %d0,%d3 /* * The returned node must be a directory */ node = pathloc->node_access; 4997c: 588f addql #4,%sp 4997e: 7001 moveq #1,%d0 49980: b0a8 0048 cmpl %a0@(72),%d0 49984: 6710 beqs 49996 <== ALWAYS TAKEN if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 49986: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 4998c: 7814 moveq #20,%d4 4998e: 76ff moveq #-1,%d3 49990: 2040 moveal %d0,%a0 49992: 2084 movel %d4,%a0@ 49994: 6020 bras 499b6 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 49996: 4878 0003 pea 3 4999a: 2f0a movel %a2,%sp@- 4999c: 4eb9 0004 93de jsr 493de 499a2: 508f addql #8,%sp 499a4: 4a80 tstl %d0 499a6: 660e bnes 499b6 rtems_set_errno_and_return_minus_one( EACCES ); 499a8: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 499ae: 740d moveq #13,%d2 499b0: 76ff moveq #-1,%d3 499b2: 2040 moveal %d0,%a0 499b4: 2082 movel %d2,%a0@ return result; } 499b6: 2003 movel %d3,%d0 499b8: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 499be: 4e5e unlk %fp ... =============================================================================== 00049416 : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 49416: 7003 moveq #3,%d0 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 49418: 4e56 0000 linkw %fp,#0 4941c: 2f0a movel %a2,%sp@- 4941e: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *jnode = node->node_access; 49422: 2052 moveal %a2@,%a0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 49424: b0a8 0048 cmpl %a0@(72),%d0 49428: 670c beqs 49436 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 4942a: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 49430: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 49436: 24a8 004c movel %a0@(76),%a2@ IMFS_Set_handlers( node ); 4943a: 2f0a movel %a2,%sp@- 4943c: 4eb9 0004 9370 jsr 49370 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 49442: 2f2e 000c movel %fp@(12),%sp@- 49446: 2f0a movel %a2,%sp@- 49448: 4eb9 0004 93de jsr 493de 4944e: 4fef 000c lea %sp@(12),%sp 49452: 4a80 tstl %d0 49454: 6704 beqs 4945a <== NEVER TAKEN 49456: 4280 clrl %d0 49458: 600e bras 49468 rtems_set_errno_and_return_minus_one( EACCES ); 4945a: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 49460: 720d moveq #13,%d1 <== NOT EXECUTED 49462: 2040 moveal %d0,%a0 <== NOT EXECUTED 49464: 70ff moveq #-1,%d0 <== NOT EXECUTED 49466: 2081 movel %d1,%a0@ <== NOT EXECUTED return result; } 49468: 246e fffc moveal %fp@(-4),%a2 4946c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000493de : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 493de: 72f8 moveq #-8,%d1 int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 493e0: 4e56 0000 linkw %fp,#0 493e4: 202e 000c movel %fp@(12),%d0 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 493e8: c280 andl %d0,%d1 493ea: 6710 beqs 493fc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 493ec: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 493f2: 7201 moveq #1,%d1 <== NOT EXECUTED 493f4: 2040 moveal %d0,%a0 <== NOT EXECUTED 493f6: 70ff moveq #-1,%d0 <== NOT EXECUTED 493f8: 2081 movel %d1,%a0@ <== NOT EXECUTED 493fa: 6016 bras 49412 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 493fc: 206e 0008 moveal %fp@(8),%a0 49400: ed88 lsll #6,%d0 49402: 2050 moveal %a0@,%a0 49404: 2200 movel %d0,%d1 49406: c2a8 002e andl %a0@(46),%d1 4940a: b081 cmpl %d1,%d0 4940c: 57c0 seq %d0 4940e: 49c0 extbl %d0 49410: 4480 negl %d0 return 1; return 0; } 49412: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049470 : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 49470: 7004 moveq #4,%d0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 49472: 4e56 ffec linkw %fp,#-20 49476: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4947a: 246e 0008 moveal %fp@(8),%a2 4947e: 262e 000c movel %fp@(12),%d3 IMFS_jnode_t *jnode = node->node_access; 49482: 2652 moveal %a2@,%a3 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 49484: b0ab 0048 cmpl %a3@(72),%d0 49488: 6708 beqs 49492 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 4948a: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 49490: 600c bras 4949e <== NOT EXECUTED if ( !jnode->Parent ) 49492: 202b 0008 movel %a3@(8),%d0 49496: 660c bnes 494a4 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 49498: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 4949e: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 494a4: 2f0a movel %a2,%sp@- 494a6: 486e fffc pea %fp@(-4) /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 494aa: 2480 movel %d0,%a2@ rtems_filesystem_get_sym_start_loc( 494ac: 2f2b 004c movel %a3@(76),%sp@- 494b0: 4eb9 0004 a628 jsr 4a628 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 494b6: 242b 004c movel %a3@(76),%d2 494ba: d4ae fffc addl %fp@(-4),%d2 494be: 2f02 movel %d2,%sp@- 494c0: 4eb9 0004 e4e4 jsr 4e4e4 494c6: 2e8a movel %a2,%sp@ 494c8: 2f03 movel %d3,%sp@- 494ca: 2f00 movel %d0,%sp@- 494cc: 2f02 movel %d2,%sp@- 494ce: 4eb9 0004 950c jsr 4950c 494d4: 2400 movel %d0,%d2 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 494d6: 2f0a movel %a2,%sp@- 494d8: 4eb9 0004 9370 jsr 49370 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 494de: 4fef 001c lea %sp@(28),%sp 494e2: 2e83 movel %d3,%sp@ 494e4: 2f0a movel %a2,%sp@- 494e6: 4eb9 0004 93de jsr 493de 494ec: 508f addql #8,%sp 494ee: 4a80 tstl %d0 494f0: 660e bnes 49500 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 494f2: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 494f8: 760d moveq #13,%d3 <== NOT EXECUTED 494fa: 74ff moveq #-1,%d2 <== NOT EXECUTED 494fc: 2040 moveal %d0,%a0 <== NOT EXECUTED 494fe: 2083 movel %d3,%a0@ <== NOT EXECUTED return result; } 49500: 2002 movel %d2,%d0 49502: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 49508: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049b52 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 49b52: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49b56: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 49b5a: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 49b5e: 246b 0038 moveal %a3@(56),%a2 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 49b62: 2f0b movel %a3,%sp@- <== NOT EXECUTED 49b64: 486a 004c pea %a2@(76) <== NOT EXECUTED 49b68: 4eb9 0004 8d7e jsr 48d7e <== NOT EXECUTED if (! err) { 49b6e: 508f addql #8,%sp <== NOT EXECUTED rtems_libio_t *iop ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 49b70: 2400 movel %d0,%d2 <== NOT EXECUTED if (! err) { 49b72: 662a bnes 49b9e <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 49b74: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 49b7a: 2f0a movel %a2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 49b7c: c1ab 0014 andl %d0,%a3@(20) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 49b80: 4eb9 0004 a1be jsr 4a1be <== NOT EXECUTED 49b86: 588f addql #4,%sp <== NOT EXECUTED 49b88: 4a80 tstl %d0 <== NOT EXECUTED 49b8a: 6624 bnes 49bb0 <== NOT EXECUTED 49b8c: 4a6a 0032 tstw %a2@(50) <== NOT EXECUTED 49b90: 661e bnes 49bb0 <== NOT EXECUTED free(jnode); 49b92: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49b94: 4eb9 0004 2828 jsr 42828 <== NOT EXECUTED 49b9a: 588f addql #4,%sp <== NOT EXECUTED 49b9c: 6012 bras 49bb0 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 49b9e: 4a80 tstl %d0 <== NOT EXECUTED 49ba0: 6c0e bges 49bb0 <== NOT EXECUTED 49ba2: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 49ba8: 4482 negl %d2 <== NOT EXECUTED 49baa: 2040 moveal %d0,%a0 <== NOT EXECUTED 49bac: 2082 movel %d2,%a0@ <== NOT EXECUTED 49bae: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49bb0: 2002 movel %d2,%d0 <== NOT EXECUTED 49bb2: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49bb8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049a1a : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 49a1a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49a1e: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49a22: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 49a26: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 49a2a: 2f02 movel %d2,%sp@- <== NOT EXECUTED int err; if (command == FIONBIO) { 49a2c: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 49a32: 6620 bnes 49a54 <== NOT EXECUTED if (buffer == NULL) 49a34: 4a89 tstl %a1 <== NOT EXECUTED 49a36: 6604 bnes 49a3c <== NOT EXECUTED 49a38: 74f2 moveq #-14,%d2 <== NOT EXECUTED 49a3a: 6034 bras 49a70 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 49a3c: 4a91 tstl %a1@ <== NOT EXECUTED 49a3e: 670a beqs 49a4a <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 49a40: 7001 moveq #1,%d0 <== NOT EXECUTED 49a42: 4282 clrl %d2 <== NOT EXECUTED 49a44: 81a8 0014 orl %d0,%a0@(20) <== NOT EXECUTED 49a48: 6034 bras 49a7e <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 49a4a: 70fe moveq #-2,%d0 <== NOT EXECUTED 49a4c: 4282 clrl %d2 <== NOT EXECUTED 49a4e: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED 49a52: 602a bras 49a7e <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 49a54: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49a56: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49a5a: 2f09 movel %a1,%sp@- <== NOT EXECUTED 49a5c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49a5e: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49a62: 4eb9 0004 89fa jsr 489fa <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49a68: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 49a6c: 2400 movel %d0,%d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49a6e: 6c0e bges 49a7e <== NOT EXECUTED 49a70: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 49a76: 4482 negl %d2 <== NOT EXECUTED 49a78: 2040 moveal %d0,%a0 <== NOT EXECUTED 49a7a: 2082 movel %d2,%a0@ <== NOT EXECUTED 49a7c: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49a7e: 2002 movel %d2,%d0 <== NOT EXECUTED 49a80: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49a84: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000499c4 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 499c4: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 499c8: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 499cc: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 499d0: 2f08 movel %a0,%sp@- <== NOT EXECUTED 499d2: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 499d6: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 499da: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 499de: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 499e2: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 499e6: 4eb9 0004 89a0 jsr 489a0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 499ec: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 499f0: 2800 movel %d0,%d4 <== NOT EXECUTED 499f2: 2600 movel %d0,%d3 <== NOT EXECUTED 499f4: 5bc2 smi %d2 <== NOT EXECUTED 499f6: 49c2 extbl %d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 499f8: 4a82 tstl %d2 <== NOT EXECUTED 499fa: 6a10 bpls 49a0c <== NOT EXECUTED 499fc: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 49a02: 4484 negl %d4 <== NOT EXECUTED 49a04: 2040 moveal %d0,%a0 <== NOT EXECUTED 49a06: 74ff moveq #-1,%d2 <== NOT EXECUTED 49a08: 76ff moveq #-1,%d3 <== NOT EXECUTED 49a0a: 2084 movel %d4,%a0@ <== NOT EXECUTED } 49a0c: 2203 movel %d3,%d1 <== NOT EXECUTED 49a0e: 2002 movel %d2,%d0 <== NOT EXECUTED 49a10: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49a16: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049bbc : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 49bbc: 4e56 0000 linkw %fp,#0 49bc0: 206e 0008 moveal %fp@(8),%a0 49bc4: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 49bc6: 2f08 movel %a0,%sp@- 49bc8: 2068 0038 moveal %a0@(56),%a0 49bcc: 41e8 004c lea %a0@(76),%a0 49bd0: 2f08 movel %a0,%sp@- 49bd2: 4eb9 0004 8e46 jsr 48e46 IMFS_FIFO_RETURN(err); 49bd8: 508f addql #8,%sp uint32_t mode ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 49bda: 2400 movel %d0,%d2 IMFS_FIFO_RETURN(err); 49bdc: 6c0e bges 49bec <== NEVER TAKEN 49bde: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 49be4: 4482 negl %d2 49be6: 2040 moveal %d0,%a0 49be8: 2082 movel %d2,%a0@ 49bea: 74ff moveq #-1,%d2 } 49bec: 2002 movel %d2,%d0 49bee: 242e fffc movel %fp@(-4),%d2 49bf2: 4e5e unlk %fp ... =============================================================================== 00049af0 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 49af0: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49af4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49af8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49afa: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 49afc: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49afe: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49b02: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 49b06: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 49b0a: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49b0e: 4eb9 0004 8bce jsr 48bce <== NOT EXECUTED if (err > 0) 49b14: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED size_t count ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 49b18: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) 49b1a: 6f16 bles 49b32 <== NOT EXECUTED IMFS_update_atime(jnode); 49b1c: 42a7 clrl %sp@- <== NOT EXECUTED 49b1e: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49b22: 4eb9 0004 28b0 jsr 428b0 <== NOT EXECUTED 49b28: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 49b2e: 508f addql #8,%sp <== NOT EXECUTED 49b30: 6012 bras 49b44 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49b32: 4a80 tstl %d0 <== NOT EXECUTED 49b34: 670e beqs 49b44 <== NOT EXECUTED 49b36: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 49b3c: 4482 negl %d2 <== NOT EXECUTED 49b3e: 2040 moveal %d0,%a0 <== NOT EXECUTED 49b40: 2082 movel %d2,%a0@ <== NOT EXECUTED 49b42: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49b44: 2002 movel %d2,%d0 <== NOT EXECUTED 49b46: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49b4a: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49b4e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049a88 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 49a88: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49a8c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49a90: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49a92: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 49a94: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49a96: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49a9a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, const void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 49a9e: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 49aa2: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49aa6: 4eb9 0004 8a5a jsr 48a5a <== NOT EXECUTED if (err > 0) { 49aac: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED size_t count ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 49ab0: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) { 49ab2: 6f1c bles 49ad0 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 49ab4: 42a7 clrl %sp@- <== NOT EXECUTED 49ab6: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49aba: 4eb9 0004 28b0 jsr 428b0 <== NOT EXECUTED 49ac0: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 49ac4: 508f addql #8,%sp <== NOT EXECUTED 49ac6: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 49aca: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED 49ace: 6012 bras 49ae2 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 49ad0: 4a80 tstl %d0 <== NOT EXECUTED 49ad2: 670e beqs 49ae2 <== NOT EXECUTED 49ad4: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 49ada: 4482 negl %d2 <== NOT EXECUTED 49adc: 2040 moveal %d0,%a0 <== NOT EXECUTED 49ade: 2082 movel %d2,%a0@ <== NOT EXECUTED 49ae0: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49ae2: 2002 movel %d2,%d0 <== NOT EXECUTED 49ae4: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49ae8: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49aec: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049ca8 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 49ca8: 4e56 fff0 linkw %fp,#-16 49cac: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49cb0: 246e 0008 moveal %fp@(8),%a2 49cb4: 242e 000c movel %fp@(12),%d2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 49cb8: 4a8a tstl %a2 49cba: 661c bnes 49cd8 <== ALWAYS TAKEN 49cbc: 4879 0005 bdbf pea 5bdbf <_global_impure_ptr+0x1b1> <== NOT EXECUTED 49cc2: 4879 0005 b66d pea 5b66d <__FUNCTION__.5393> <== NOT EXECUTED 49cc8: 4878 002a pea 2a <== NOT EXECUTED 49ccc: 4879 0005 b618 pea 5b618 <== NOT EXECUTED 49cd2: 4eb9 0004 9f40 jsr 49f40 <__assert_func> <== NOT EXECUTED if ( !name ) 49cd8: 4a82 tstl %d2 49cda: 674e beqs 49d2a <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 49cdc: 4879 0005 b668 pea 5b668 49ce2: 49f9 0004 dfc0 lea 4dfc0 ,%a4 49ce8: 2f02 movel %d2,%sp@- 49cea: 4e94 jsr %a4@ 49cec: 508f addql #8,%sp 49cee: 4a80 tstl %d0 49cf0: 673a beqs 49d2c <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 49cf2: 4879 0005 b66a pea 5b66a 49cf8: 2f02 movel %d2,%sp@- 49cfa: 4e94 jsr %a4@ 49cfc: 508f addql #8,%sp 49cfe: 4a80 tstl %d0 49d00: 6606 bnes 49d08 <== ALWAYS TAKEN return directory->Parent; 49d02: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED 49d06: 6024 bras 49d2c <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 49d08: 266a 004c moveal %a2@(76),%a3 49d0c: 45ea 0050 lea %a2@(80),%a2 49d10: 6014 bras 49d26 !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 ) ) 49d12: 486b 000c pea %a3@(12) 49d16: 2f02 movel %d2,%sp@- 49d18: 4e94 jsr %a4@ 49d1a: 508f addql #8,%sp 49d1c: 4a80 tstl %d0 49d1e: 6604 bnes 49d24 49d20: 244b moveal %a3,%a2 49d22: 6008 bras 49d2c 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 ) { 49d24: 2653 moveal %a3@,%a3 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 49d26: b5cb cmpal %a3,%a2 49d28: 66e8 bnes 49d12 49d2a: 95ca subal %a2,%a2 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 49d2c: 200a movel %a2,%d0 49d2e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49d34: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049c04 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 49c04: 4e56 ffd8 linkw %fp,#-40 * 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; 49c08: 200e movel %fp,%d0 49c0a: 0680 ffff ffec addil #-20,%d0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 49c10: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 49c14: 4878 0014 pea 14 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 49c18: 2400 movel %d0,%d2 49c1a: 4bf9 0004 9370 lea 49370 ,%a5 if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 49c20: 49f9 0004 2124 lea 42124 ,%a4 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 49c26: 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; 49c2a: 486b 001c pea %a3@(28) /* * 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; 49c2e: 246b 001c moveal %a3@(28),%a2 loc = temp_mt_entry->mt_fs_root; 49c32: 2f00 movel %d0,%sp@- 49c34: 4eb9 0004 d8d8 jsr 4d8d8 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 49c3a: 4fef 000c lea %sp@(12),%sp 49c3e: 42ab 001c clrl %a3@(28) do { next = jnode->Parent; 49c42: 266a 0008 moveal %a2@(8),%a3 loc.node_access = (void *)jnode; 49c46: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 49c4a: 2f02 movel %d2,%sp@- 49c4c: 4e95 jsr %a5@ if ( jnode->type != IMFS_DIRECTORY ) { 49c4e: 588f addql #4,%sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 49c50: 200a movel %a2,%d0 49c52: 0680 0000 0050 addil #80,%d0 49c58: 7201 moveq #1,%d1 49c5a: b2aa 0048 cmpl %a2@(72),%d1 49c5e: 6606 bnes 49c66 49c60: b0aa 004c cmpl %a2@(76),%d0 49c64: 660e bnes 49c74 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 49c66: 2f02 movel %d2,%sp@- 49c68: 42a7 clrl %sp@- 49c6a: 4e94 jsr %a4@ if (result != 0) 49c6c: 508f addql #8,%sp 49c6e: 4a80 tstl %d0 49c70: 6626 bnes 49c98 <== NEVER TAKEN 49c72: 244b moveal %a3,%a2 return -1; jnode = next; } if ( jnode != NULL ) { 49c74: 4a8a tstl %a2 49c76: 6724 beqs 49c9c if ( jnode->type == IMFS_DIRECTORY ) { 49c78: 7001 moveq #1,%d0 49c7a: b0aa 0048 cmpl %a2@(72),%d0 49c7e: 66c2 bnes 49c42 <== NEVER TAKEN 49c80: 200a movel %a2,%d0 49c82: 0680 0000 0050 addil #80,%d0 49c88: b0aa 004c cmpl %a2@(76),%d0 49c8c: 67b4 beqs 49c42 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 49c8e: 246a 004c moveal %a2@(76),%a2 } } } while (jnode != NULL); 49c92: 4a8a tstl %a2 49c94: 66ac bnes 49c42 <== ALWAYS TAKEN 49c96: 6004 bras 49c9c <== NOT EXECUTED 49c98: 70ff moveq #-1,%d0 <== NOT EXECUTED 49c9a: 6002 bras 49c9e <== NOT EXECUTED 49c9c: 4280 clrl %d0 return 0; } 49c9e: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 49ca4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049d38 : const char *path, int pathlen, char *token, int *token_len ) { 49d38: 4e56 ffe8 linkw %fp,#-24 49d3c: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 49d40: 286e 0008 moveal %fp@(8),%a4 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 49d44: 4282 clrl %d2 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49d46: 4bf9 0004 35a8 lea 435a8 ,%a5 const char *path, int pathlen, char *token, int *token_len ) { 49d4c: 266e 000c moveal %fp@(12),%a3 49d50: 246e 0010 moveal %fp@(16),%a2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 49d54: 1614 moveb %a4@,%d3 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49d56: 6014 bras 49d6c token[i] = c; if ( i == IMFS_NAME_MAX ) 49d58: 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; 49d5a: 1583 2800 moveb %d3,%a2@(00000000,%d2:l) if ( i == IMFS_NAME_MAX ) 49d5e: b082 cmpl %d2,%d0 49d60: 6604 bnes 49d66 49d62: 7604 moveq #4,%d3 49d64: 607a bras 49de0 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 49d66: 5282 addql #1,%d2 49d68: 1634 2800 moveb %a4@(00000000,%d2:l),%d3 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49d6c: 1003 moveb %d3,%d0 49d6e: 49c0 extbl %d0 49d70: 2f00 movel %d0,%sp@- 49d72: 4e95 jsr %a5@ 49d74: 588f addql #4,%sp 49d76: 4a80 tstl %d0 49d78: 6604 bnes 49d7e 49d7a: b7c2 cmpal %d2,%a3 49d7c: 6eda bgts 49d58 /* * Copy a seperator into token. */ if ( i == 0 ) { 49d7e: 4a82 tstl %d2 49d80: 6610 bnes 49d92 token[i] = c; 49d82: 1483 moveb %d3,%a2@ if ( (token[i] != '\0') && pathlen ) { 49d84: 6720 beqs 49da6 49d86: 4a8b tstl %a3 49d88: 671c beqs 49da6 49d8a: 7601 moveq #1,%d3 49d8c: 143c 0001 moveb #1,%d2 49d90: 6016 bras 49da8 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 49d92: 4a32 28ff tstb %a2@(ffffffff,%d2:l) 49d96: 6604 bnes 49d9c <== ALWAYS TAKEN 49d98: 7603 moveq #3,%d3 <== NOT EXECUTED 49d9a: 600c bras 49da8 <== NOT EXECUTED token[i] = '\0'; 49d9c: 7603 moveq #3,%d3 49d9e: 4200 clrb %d0 49da0: 1580 2800 moveb %d0,%a2@(00000000,%d2:l) 49da4: 6002 bras 49da8 49da6: 4283 clrl %d3 /* * Set token_len to the number of characters copied. */ *token_len = i; 49da8: 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 ) { 49dac: 7003 moveq #3,%d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 49dae: 2082 movel %d2,%a0@ /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 49db0: b083 cmpl %d3,%d0 49db2: 662c bnes 49de0 if ( strcmp( token, "..") == 0 ) 49db4: 4879 0005 b684 pea 5b684 <__FUNCTION__.5393+0x17> 49dba: 47f9 0004 dfc0 lea 4dfc0 ,%a3 49dc0: 2f0a movel %a2,%sp@- 49dc2: 4e93 jsr %a3@ 49dc4: 508f addql #8,%sp 49dc6: 4a80 tstl %d0 49dc8: 6604 bnes 49dce 49dca: 7602 moveq #2,%d3 49dcc: 6012 bras 49de0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 49dce: 4879 0005 b685 pea 5b685 <__FUNCTION__.5393+0x18> 49dd4: 2f0a movel %a2,%sp@- 49dd6: 4e93 jsr %a3@ 49dd8: 508f addql #8,%sp 49dda: 4a80 tstl %d0 49ddc: 6602 bnes 49de0 49dde: 7601 moveq #1,%d3 type = IMFS_CURRENT_DIR; } return type; } 49de0: 2003 movel %d3,%d0 49de2: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49de8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041d30 : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 41d30: 4281 clrl %d1 41d32: 7010 moveq #16,%d0 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 41d34: 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, 41d38: 2079 0005 c418 moveal 5c418 ,%a0 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 41d3e: 48d7 040c moveml %d2-%d3/%a2,%sp@ 41d42: 246e 0008 moveal %fp@(8),%a2 41d46: 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) { 41d4a: 5281 addql #1,%d1 41d4c: b1c0 cmpal %d0,%a0 41d4e: 670e beqs 41d5e 41d50: 7606 moveq #6,%d3 41d52: d080 addl %d0,%d0 41d54: b681 cmpl %d1,%d3 41d56: 66f2 bnes 41d4a <== ALWAYS TAKEN 41d58: 203c 0000 0080 movel #128,%d0 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 41d5e: 23c0 0005 d2b8 movel %d0,5d2b8 /* * 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(); 41d64: 4eb9 0004 9224 jsr 49224 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 41d6a: 4878 0030 pea 30 41d6e: 4879 0005 b4f4 pea 5b4f4 41d74: 486a 0038 pea %a2@(56) * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 41d78: 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(); 41d7e: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 41d82: 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; 41d86: 4eb9 0004 d8d8 jsr 4d8d8 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 41d8c: 4878 0010 pea 10 41d90: 4878 0001 pea 1 41d94: 4eb9 0004 2438 jsr 42438 if ( !fs_info ) { 41d9a: 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 ) ); 41d9e: 2040 moveal %d0,%a0 if ( !fs_info ) { 41da0: 4a80 tstl %d0 41da2: 661c bnes 41dc0 <== ALWAYS TAKEN free(temp_mt_entry->mt_fs_root.node_access); 41da4: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 41da8: 4eb9 0004 2828 jsr 42828 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 41dae: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 41db4: 588f addql #4,%sp <== NOT EXECUTED 41db6: 720c moveq #12,%d1 <== NOT EXECUTED 41db8: 2040 moveal %d0,%a0 <== NOT EXECUTED 41dba: 70ff moveq #-1,%d0 <== NOT EXECUTED 41dbc: 2081 movel %d1,%a0@ <== NOT EXECUTED 41dbe: 6038 bras 41df8 <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 41dc0: 7001 moveq #1,%d0 fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 41dc2: 7601 moveq #1,%d3 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 41dc4: 2140 0004 movel %d0,%a0@(4) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 41dc8: 2039 0005 d2bc movel 5d2bc ,%d0 41dce: 2200 movel %d0,%d1 41dd0: 5281 addql #1,%d1 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 41dd2: 226a 001c moveal %a2@(28),%a1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 41dd6: 23c1 0005 d2bc movel %d1,5d2bc fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 41ddc: 216e 0010 0008 movel %fp@(16),%a0@(8) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 41de2: 2080 movel %d0,%a0@ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 41de4: 2142 000c movel %d2,%a0@(12) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 41de8: 2343 0034 movel %d3,%a1@(52) fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 41dec: 2548 0034 movel %a0,%a2@(52) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 41df0: 4eb9 0004 89aa jsr 489aa 41df6: 4280 clrl %d0 return 0; } 41df8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 41dfe: 4e5e unlk %fp ... =============================================================================== 00041e04 : /* * 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 ) 41e04: 4280 clrl %d0 41e06: 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 */ ) { 41e08: 4e56 ffbc linkw %fp,#-68 41e0c: 206e 0008 moveal %fp@(8),%a0 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 41e10: 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 */ ) { 41e12: 2f03 movel %d3,%sp@- 41e14: 262e 0010 movel %fp@(16),%d3 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 41e18: 2d48 ffe0 movel %a0,%fp@(-32) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 41e1c: 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 */ ) { 41e20: 2f02 movel %d2,%sp@- /* * 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 ) 41e22: b280 cmpl %d0,%d1 41e24: 6410 bccs 41e36 rtems_set_errno_and_return_minus_one( EMLINK ); 41e26: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 41e2c: 741f moveq #31,%d2 41e2e: 72ff moveq #-1,%d1 41e30: 2040 moveal %d0,%a0 41e32: 2082 movel %d2,%a0@ 41e34: 607c bras 41eb2 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 41e36: 2f03 movel %d3,%sp@- 41e38: 240e movel %fp,%d2 41e3a: 0682 ffff ffbf addil #-65,%d2 41e40: 4eb9 0004 e4e4 jsr 4e4e4 41e46: 588f addql #4,%sp 41e48: 486e fffc pea %fp@(-4) 41e4c: 2f02 movel %d2,%sp@- 41e4e: 2f00 movel %d0,%sp@- 41e50: 2f03 movel %d3,%sp@- 41e52: 4eb9 0004 9d38 jsr 49d38 * 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( 41e58: 486e ffe0 pea %fp@(-32) 41e5c: 2f3c 0000 a1ff movel #41471,%sp@- 41e62: 2f02 movel %d2,%sp@- 41e64: 4878 0003 pea 3 41e68: 2f2e 000c movel %fp@(12),%sp@- 41e6c: 4eb9 0004 925e jsr 4925e new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 41e72: 4fef 0024 lea %sp@(36),%sp 41e76: 4a80 tstl %d0 41e78: 6610 bnes 41e8a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 41e7a: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 41e80: 72ff moveq #-1,%d1 <== NOT EXECUTED 41e82: 2040 moveal %d0,%a0 <== NOT EXECUTED 41e84: 700c moveq #12,%d0 <== NOT EXECUTED 41e86: 2080 movel %d0,%a0@ <== NOT EXECUTED 41e88: 6028 bras 41eb2 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 41e8a: 206e ffe0 moveal %fp@(-32),%a0 41e8e: 3028 0032 movew %a0@(50),%d0 41e92: 5280 addql #1,%d0 41e94: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( info.hard_link.link_node ); 41e98: 42a7 clrl %sp@- 41e9a: 486e fff4 pea %fp@(-12) 41e9e: 4eb9 0004 28b0 jsr 428b0 41ea4: 206e ffe0 moveal %fp@(-32),%a0 return 0; 41ea8: 508f addql #8,%sp /* * 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 ); 41eaa: 4281 clrl %d1 41eac: 216e fff4 0044 movel %fp@(-12),%a0@(68) return 0; } 41eb2: 242e ffb4 movel %fp@(-76),%d2 41eb6: 2001 movel %d1,%d0 41eb8: 262e ffb8 movel %fp@(-72),%d3 41ebc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bad4 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4bad4: 4e56 0000 linkw %fp,#0 4bad8: 206e 0008 moveal %fp@(8),%a0 4badc: 2f0a movel %a2,%sp@- block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4bade: 4a88 tstl %a0 4bae0: 6612 bnes 4baf4 <== ALWAYS TAKEN 4bae2: 4879 0005 b846 pea 5b846 <== NOT EXECUTED 4bae8: 4879 0005 b9dc pea 5b9dc <__FUNCTION__.6037> <== NOT EXECUTED 4baee: 4878 0169 pea 169 <== NOT EXECUTED 4baf2: 6018 bras 4bb0c <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4baf4: 7005 moveq #5,%d0 4baf6: b0a8 0048 cmpl %a0@(72),%d0 4bafa: 671c beqs 4bb18 <== ALWAYS TAKEN 4bafc: 4879 0005 b89a pea 5b89a <== NOT EXECUTED 4bb02: 4879 0005 b9dc pea 5b9dc <__FUNCTION__.6037> <== NOT EXECUTED 4bb08: 4878 016d pea 16d <== NOT EXECUTED 4bb0c: 4879 0005 b850 pea 5b850 <== NOT EXECUTED 4bb12: 4eb9 0004 9f40 jsr 49f40 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4bb18: 4878 0001 pea 1 4bb1c: 2f2e 000c movel %fp@(12),%sp@- 4bb20: 2f08 movel %a0,%sp@- 4bb22: 4eb9 0004 b6b8 jsr 4b6b8 if ( *block_entry_ptr ) 4bb28: 4fef 000c lea %sp@(12),%sp assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4bb2c: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 4bb2e: 4a92 tstl %a2@ 4bb30: 6612 bnes 4bb44 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 4bb32: 4eb9 0004 b694 jsr 4b694 if ( !memory ) 4bb38: 4a80 tstl %d0 4bb3a: 6606 bnes 4bb42 <== ALWAYS TAKEN 4bb3c: 103c 0001 moveb #1,%d0 <== NOT EXECUTED 4bb40: 6004 bras 4bb46 <== NOT EXECUTED return 1; *block_entry_ptr = memory; 4bb42: 2480 movel %d0,%a2@ 4bb44: 4280 clrl %d0 return 0; } 4bb46: 246e fffc moveal %fp@(-4),%a2 4bb4a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bb4e : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4bb4e: 4e56 ffd8 linkw %fp,#-40 4bb52: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4bb56: 246e 0008 moveal %fp@(8),%a2 4bb5a: 242e 000c movel %fp@(12),%d2 4bb5e: 262e 0010 movel %fp@(16),%d3 /* * Perform internal consistency checks */ assert( the_jnode ); 4bb62: 4a8a tstl %a2 4bb64: 6612 bnes 4bb78 <== ALWAYS TAKEN 4bb66: 4879 0005 b846 pea 5b846 <== NOT EXECUTED 4bb6c: 4879 0005 b9f2 pea 5b9f2 <__FUNCTION__.5988> <== NOT EXECUTED 4bb72: 4878 0131 pea 131 <== NOT EXECUTED 4bb76: 6018 bras 4bb90 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4bb78: 7005 moveq #5,%d0 4bb7a: b0aa 0048 cmpl %a2@(72),%d0 4bb7e: 671c beqs 4bb9c <== ALWAYS TAKEN 4bb80: 4879 0005 b89a pea 5b89a <== NOT EXECUTED 4bb86: 4879 0005 b9f2 pea 5b9f2 <__FUNCTION__.5988> <== NOT EXECUTED 4bb8c: 4878 0135 pea 135 <== NOT EXECUTED 4bb90: 4879 0005 b850 pea 5b850 <== NOT EXECUTED 4bb96: 4eb9 0004 9f40 jsr 49f40 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4bb9c: 2c39 0005 d2b8 movel 5d2b8 ,%d6 4bba2: 2206 movel %d6,%d1 4bba4: e489 lsrl #2,%d1 4bba6: 2001 movel %d1,%d0 4bba8: 5280 addql #1,%d0 4bbaa: 4c01 0800 mulsl %d1,%d0 4bbae: 4284 clrl %d4 4bbb0: 5280 addql #1,%d0 4bbb2: 4c01 0800 mulsl %d1,%d0 4bbb6: 5380 subql #1,%d0 4bbb8: 4c06 0800 mulsl %d6,%d0 4bbbc: 2a00 movel %d0,%d5 4bbbe: 2002 movel %d2,%d0 4bbc0: 2203 movel %d3,%d1 4bbc2: 9285 subl %d5,%d1 4bbc4: 9184 subxl %d4,%d0 4bbc6: 6d12 blts 4bbda <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4bbc8: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4bbce: 7416 moveq #22,%d2 <== NOT EXECUTED 4bbd0: 72ff moveq #-1,%d1 <== NOT EXECUTED 4bbd2: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bbd4: 2082 movel %d2,%a0@ <== NOT EXECUTED 4bbd6: 6000 0092 braw 4bc6a <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 4bbda: 282a 004c movel %a2@(76),%d4 4bbde: 2a2a 0050 movel %a2@(80),%d5 4bbe2: 2002 movel %d2,%d0 4bbe4: 2203 movel %d3,%d1 4bbe6: 9285 subl %d5,%d1 4bbe8: 9184 subxl %d4,%d0 4bbea: 6e04 bgts 4bbf0 4bbec: 4281 clrl %d1 4bbee: 607a bras 4bc6a /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4bbf0: 47f9 0005 8c88 lea 58c88 <__divdi3>,%a3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4bbf6: 4bf9 0004 bad4 lea 4bad4 ,%a5 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4bbfc: 2e06 movel %d6,%d7 4bbfe: 5bc6 smi %d6 4bc00: 49c6 extbl %d6 4bc02: 2f07 movel %d7,%sp@- 4bc04: 2f06 movel %d6,%sp@- 4bc06: 2f03 movel %d3,%sp@- 4bc08: 2f02 movel %d2,%sp@- 4bc0a: 4e93 jsr %a3@ 4bc0c: 4fef 0010 lea %sp@(16),%sp 4bc10: 2841 moveal %d1,%a4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4bc12: 2f07 movel %d7,%sp@- 4bc14: 2f06 movel %d6,%sp@- 4bc16: 2f05 movel %d5,%sp@- 4bc18: 2f04 movel %d4,%sp@- 4bc1a: 4e93 jsr %a3@ 4bc1c: 4fef 0010 lea %sp@(16),%sp 4bc20: 2c01 movel %d1,%d6 4bc22: 2801 movel %d1,%d4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4bc24: 6036 bras 4bc5c if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4bc26: 2f04 movel %d4,%sp@- 4bc28: 2f0a movel %a2,%sp@- 4bc2a: 4e95 jsr %a5@ 4bc2c: 508f addql #8,%sp 4bc2e: 4a80 tstl %d0 4bc30: 6728 beqs 4bc5a <== ALWAYS TAKEN 4bc32: 600c bras 4bc40 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 4bc34: 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-- ) { 4bc36: 5384 subql #1,%d4 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4bc38: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4bc3a: 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-- ) { 4bc3c: 508f addql #8,%sp <== NOT EXECUTED 4bc3e: 6006 bras 4bc46 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4bc40: 47f9 0004 b898 lea 4b898 ,%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-- ) { 4bc46: bc84 cmpl %d4,%d6 <== NOT EXECUTED 4bc48: 63ea blss 4bc34 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4bc4a: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4bc50: 72ff moveq #-1,%d1 <== NOT EXECUTED 4bc52: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bc54: 701c moveq #28,%d0 <== NOT EXECUTED 4bc56: 2080 movel %d0,%a0@ <== NOT EXECUTED 4bc58: 6010 bras 4bc6a <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4bc5a: 5284 addql #1,%d4 4bc5c: b9c4 cmpal %d4,%a4 4bc5e: 64c6 bccs 4bc26 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4bc60: 4281 clrl %d1 4bc62: 2542 004c movel %d2,%a2@(76) 4bc66: 2543 0050 movel %d3,%a2@(80) return 0; } 4bc6a: 2001 movel %d1,%d0 4bc6c: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 4bc72: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b6b8 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4b6b8: 4e56 fff0 linkw %fp,#-16 4b6bc: 206e 0010 moveal %fp@(16),%a0 4b6c0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4b6c4: 246e 0008 moveal %fp@(8),%a2 4b6c8: 242e 000c movel %fp@(12),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 4b6cc: 4a8a tstl %a2 4b6ce: 6612 bnes 4b6e2 <== ALWAYS TAKEN 4b6d0: 4879 0005 b846 pea 5b846 <== NOT EXECUTED 4b6d6: 4879 0005 b94d pea 5b94d <__FUNCTION__.6347> <== NOT EXECUTED 4b6dc: 4878 0388 pea 388 <== NOT EXECUTED 4b6e0: 6018 bras 4b6fa <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 4b6e2: 7005 moveq #5,%d0 4b6e4: b0aa 0048 cmpl %a2@(72),%d0 4b6e8: 671c beqs 4b706 <== ALWAYS TAKEN 4b6ea: 4879 0005 b89a pea 5b89a <== NOT EXECUTED 4b6f0: 4879 0005 b94d pea 5b94d <__FUNCTION__.6347> <== NOT EXECUTED 4b6f6: 4878 038c pea 38c <== NOT EXECUTED 4b6fa: 4879 0005 b850 pea 5b850 <== NOT EXECUTED 4b700: 4eb9 0004 9f40 jsr 49f40 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4b706: 2239 0005 d2b8 movel 5d2b8 ,%d1 4b70c: e489 lsrl #2,%d1 4b70e: 2001 movel %d1,%d0 4b710: 5380 subql #1,%d0 4b712: b082 cmpl %d2,%d0 4b714: 6536 bcss 4b74c <== NEVER TAKEN #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 4b716: 226a 0054 moveal %a2@(84),%a1 if ( malloc_it ) { 4b71a: 4a88 tstl %a0 4b71c: 6720 beqs 4b73e if ( !p ) { 4b71e: 4a89 tstl %a1 4b720: 6610 bnes 4b732 p = memfile_alloc_block(); 4b722: 4eb9 0004 b694 jsr 4b694 if ( !p ) 4b728: 4a80 tstl %d0 4b72a: 6700 00f8 beqw 4b824 return 0; info->indirect = p; 4b72e: 2540 0054 movel %d0,%a2@(84) } return &info->indirect[ my_block ]; 4b732: 206a 0054 moveal %a2@(84),%a0 4b736: e58a lsll #2,%d2 4b738: d1c2 addal %d2,%a0 4b73a: 6000 00ea braw 4b826 } if ( !p ) 4b73e: 4a89 tstl %a1 4b740: 6700 00e2 beqw 4b824 return 0; return &info->indirect[ my_block ]; 4b744: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 4b748: 6000 00dc braw 4b826 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4b74c: 2001 movel %d1,%d0 <== NOT EXECUTED 4b74e: 5280 addql #1,%d0 <== NOT EXECUTED 4b750: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 4b754: 2240 moveal %d0,%a1 <== NOT EXECUTED 4b756: 5389 subql #1,%a1 <== NOT EXECUTED 4b758: b3c2 cmpal %d2,%a1 <== NOT EXECUTED 4b75a: 653e bcss 4b79a <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 4b75c: 9481 subl %d1,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4b75e: 202a 0058 movel %a2@(88),%d0 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4b762: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4b766: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 4b76a: 4a88 tstl %a0 <== NOT EXECUTED 4b76c: 671c beqs 4b78a <== NOT EXECUTED if ( !p ) { 4b76e: 4a80 tstl %d0 <== NOT EXECUTED 4b770: 6610 bnes 4b782 <== NOT EXECUTED p = memfile_alloc_block(); 4b772: 4eb9 0004 b694 jsr 4b694 <== NOT EXECUTED if ( !p ) 4b778: 4a80 tstl %d0 <== NOT EXECUTED 4b77a: 6700 00a8 beqw 4b824 <== NOT EXECUTED return 0; info->doubly_indirect = p; 4b77e: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 4b782: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b784: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4b788: 6066 bras 4b7f0 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 4b78a: 4a80 tstl %d0 <== NOT EXECUTED 4b78c: 6700 0096 beqw 4b824 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 4b790: 2240 moveal %d0,%a1 <== NOT EXECUTED 4b792: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 <== NOT EXECUTED 4b796: 6000 0082 braw 4b81a <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4b79a: 2600 movel %d0,%d3 <== NOT EXECUTED 4b79c: 5283 addql #1,%d3 <== NOT EXECUTED 4b79e: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 4b7a2: 5383 subql #1,%d3 <== NOT EXECUTED 4b7a4: b682 cmpl %d2,%d3 <== NOT EXECUTED 4b7a6: 657c bcss 4b824 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 4b7a8: 9480 subl %d0,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4b7aa: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4b7ae: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 4b7b2: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 4b7b6: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 4b7ba: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 4b7be: 4a88 tstl %a0 <== NOT EXECUTED 4b7c0: 6746 beqs 4b808 <== NOT EXECUTED if ( !p ) { 4b7c2: 4a80 tstl %d0 <== NOT EXECUTED 4b7c4: 660e bnes 4b7d4 <== NOT EXECUTED p = memfile_alloc_block(); 4b7c6: 4eb9 0004 b694 jsr 4b694 <== NOT EXECUTED if ( !p ) 4b7cc: 4a80 tstl %d0 <== NOT EXECUTED 4b7ce: 6754 beqs 4b824 <== NOT EXECUTED return 0; info->triply_indirect = p; 4b7d0: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 4b7d4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b7d6: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4b7da: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p1 ) { 4b7dc: 660c bnes 4b7ea <== NOT EXECUTED p1 = memfile_alloc_block(); 4b7de: 4eb9 0004 b694 jsr 4b694 <== NOT EXECUTED if ( !p1 ) 4b7e4: 4a80 tstl %d0 <== NOT EXECUTED 4b7e6: 673c beqs 4b824 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 4b7e8: 2480 movel %d0,%a2@ <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 4b7ea: 2240 moveal %d0,%a1 <== NOT EXECUTED 4b7ec: 45f1 4c00 lea %a1@(00000000,%d4:l:4),%a2 <== NOT EXECUTED 4b7f0: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p2 ) { 4b7f2: 660c bnes 4b800 <== NOT EXECUTED p2 = memfile_alloc_block(); 4b7f4: 4eb9 0004 b694 jsr 4b694 <== NOT EXECUTED if ( !p2 ) 4b7fa: 4a80 tstl %d0 <== NOT EXECUTED 4b7fc: 6726 beqs 4b824 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 4b7fe: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 4b800: 2240 moveal %d0,%a1 <== NOT EXECUTED 4b802: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4b806: 601e bras 4b826 <== NOT EXECUTED } if ( !p ) 4b808: 4a80 tstl %d0 <== NOT EXECUTED 4b80a: 6718 beqs 4b824 <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 4b80c: 2240 moveal %d0,%a1 <== NOT EXECUTED 4b80e: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p1 ) 4b812: 4a88 tstl %a0 <== NOT EXECUTED 4b814: 670e beqs 4b824 <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 4b816: 2070 4c00 moveal %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED if ( !p2 ) 4b81a: 4a88 tstl %a0 <== NOT EXECUTED 4b81c: 6706 beqs 4b824 <== NOT EXECUTED return 0; return (block_p *)&p2[ singly ]; 4b81e: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4b822: 6002 bras 4b826 <== NOT EXECUTED 4b824: 91c8 subal %a0,%a0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4b826: 2008 movel %a0,%d0 4b828: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4b82e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c05a : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4c05a: 4e56 ffc0 linkw %fp,#-64 4c05e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4c062: 246e 0008 moveal %fp@(8),%a2 4c066: 2a2e 0014 movel %fp@(20),%d5 4c06a: 2a6e 0018 moveal %fp@(24),%a5 4c06e: 262e 000c movel %fp@(12),%d3 4c072: 282e 0010 movel %fp@(16),%d4 /* * Perform internal consistency checks */ assert( the_jnode ); 4c076: 4a8a tstl %a2 4c078: 6612 bnes 4c08c <== ALWAYS TAKEN 4c07a: 4879 0005 b846 pea 5b846 <== NOT EXECUTED 4c080: 4879 0005 b97f pea 5b97f <__FUNCTION__.6174> <== NOT EXECUTED 4c086: 4878 024c pea 24c <== NOT EXECUTED 4c08a: 601e bras 4c0aa <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 4c08c: 202a 0048 movel %a2@(72),%d0 4c090: 2200 movel %d0,%d1 4c092: 5b81 subql #5,%d1 4c094: 7401 moveq #1,%d2 4c096: b481 cmpl %d1,%d2 4c098: 641c bccs 4c0b6 <== ALWAYS TAKEN 4c09a: 4879 0005 b8fd pea 5b8fd <== NOT EXECUTED 4c0a0: 4879 0005 b97f pea 5b97f <__FUNCTION__.6174> <== NOT EXECUTED 4c0a6: 4878 0251 pea 251 <== NOT EXECUTED 4c0aa: 4879 0005 b850 pea 5b850 <== NOT EXECUTED 4c0b0: 4eb9 0004 9f40 jsr 49f40 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 4c0b6: 4a85 tstl %d5 4c0b8: 6612 bnes 4c0cc <== ALWAYS TAKEN 4c0ba: 4879 0005 b948 pea 5b948 <== NOT EXECUTED 4c0c0: 4879 0005 b97f pea 5b97f <__FUNCTION__.6174> <== NOT EXECUTED 4c0c6: 4878 025a pea 25a <== NOT EXECUTED 4c0ca: 60de bras 4c0aa <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 4c0cc: 4a8d tstl %a5 4c0ce: 6612 bnes 4c0e2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4c0d0: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4c0d6: 7e16 moveq #22,%d7 <== NOT EXECUTED 4c0d8: 7cff moveq #-1,%d6 <== NOT EXECUTED 4c0da: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c0dc: 2087 movel %d7,%a0@ <== NOT EXECUTED 4c0de: 6000 01be braw 4c29e <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 4c0e2: 7206 moveq #6,%d1 4c0e4: b280 cmpl %d0,%d1 4c0e6: 6658 bnes 4c140 <== ALWAYS TAKEN unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4c0e8: 284d moveal %a5,%a4 <== NOT EXECUTED 4c0ea: 97cb subal %a3,%a3 <== NOT EXECUTED 4c0ec: 2c2a 004c movel %a2@(76),%d6 <== NOT EXECUTED 4c0f0: 2e2a 0050 movel %a2@(80),%d7 <== NOT EXECUTED 4c0f4: 200b movel %a3,%d0 <== NOT EXECUTED 4c0f6: 220c movel %a4,%d1 <== NOT EXECUTED 4c0f8: 2d46 ffe8 movel %d6,%fp@(-24) <== NOT EXECUTED 4c0fc: 2d47 ffec movel %d7,%fp@(-20) <== NOT EXECUTED 4c100: 9e84 subl %d4,%d7 <== NOT EXECUTED 4c102: 9d83 subxl %d3,%d6 <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 4c104: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 4c108: 9287 subl %d7,%d1 <== NOT EXECUTED 4c10a: 9186 subxl %d6,%d0 <== NOT EXECUTED 4c10c: 6e04 bgts 4c112 <== NOT EXECUTED 4c10e: 2c0d movel %a5,%d6 <== NOT EXECUTED 4c110: 6006 bras 4c118 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 4c112: 2c2e ffec movel %fp@(-20),%d6 <== NOT EXECUTED 4c116: 9c84 subl %d4,%d6 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 4c118: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4c11a: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 4c11e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4c120: 4eb9 0004 d8d8 jsr 4d8d8 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 4c126: 42a7 clrl %sp@- <== NOT EXECUTED 4c128: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4c12c: 4eb9 0004 28b0 jsr 428b0 <== NOT EXECUTED 4c132: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED return my_length; 4c138: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4c13c: 6000 0160 braw 4c29e <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 4c140: 200d movel %a5,%d0 4c142: d084 addl %d4,%d0 4c144: 2240 moveal %d0,%a1 4c146: 91c8 subal %a0,%a0 4c148: 202a 004c movel %a2@(76),%d0 4c14c: 222a 0050 movel %a2@(80),%d1 4c150: 2c08 movel %a0,%d6 4c152: 2e09 movel %a1,%d7 4c154: 9e81 subl %d1,%d7 4c156: 9d80 subxl %d0,%d6 4c158: 6e04 bgts 4c15e <== ALWAYS TAKEN 4c15a: 240d movel %a5,%d2 <== NOT EXECUTED 4c15c: 6006 bras 4c164 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 4c15e: 2e01 movel %d1,%d7 4c160: 9e84 subl %d4,%d7 4c162: 2407 movel %d7,%d2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4c164: 2e39 0005 d2b8 movel 5d2b8 ,%d7 4c16a: 2207 movel %d7,%d1 4c16c: 5bc0 smi %d0 4c16e: 49c0 extbl %d0 4c170: 2640 moveal %d0,%a3 4c172: 2841 moveal %d1,%a4 4c174: 2f0c movel %a4,%sp@- 4c176: 2f00 movel %d0,%sp@- 4c178: 2f04 movel %d4,%sp@- 4c17a: 2f03 movel %d3,%sp@- 4c17c: 4eb9 0005 9040 jsr 59040 <__moddi3> 4c182: 4fef 0010 lea %sp@(16),%sp 4c186: 2c01 movel %d1,%d6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4c188: 2f0c movel %a4,%sp@- 4c18a: 2f0b movel %a3,%sp@- 4c18c: 2f04 movel %d4,%sp@- 4c18e: 2f03 movel %d3,%sp@- 4c190: 4eb9 0005 8c88 jsr 58c88 <__divdi3> 4c196: 4fef 0010 lea %sp@(16),%sp 4c19a: 2601 movel %d1,%d3 if ( start_offset ) { 4c19c: 4a86 tstl %d6 4c19e: 6604 bnes 4c1a4 4c1a0: 2e05 movel %d5,%d7 4c1a2: 6050 bras 4c1f4 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 ); 4c1a4: 42a7 clrl %sp@- 4c1a6: 2f01 movel %d1,%sp@- 4c1a8: 2f0a movel %a2,%sp@- 4c1aa: 4eb9 0004 b6b8 jsr 4b6b8 assert( block_ptr ); 4c1b0: 4fef 000c lea %sp@(12),%sp 4c1b4: 4a80 tstl %d0 4c1b6: 6614 bnes 4c1cc <== ALWAYS TAKEN 4c1b8: 4879 0005 b8ca pea 5b8ca <== NOT EXECUTED 4c1be: 4879 0005 b97f pea 5b97f <__FUNCTION__.6174> <== NOT EXECUTED 4c1c4: 4878 0296 pea 296 <== NOT EXECUTED 4c1c8: 6000 fee0 braw 4c0aa <== NOT EXECUTED */ 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; 4c1cc: 9e86 subl %d6,%d7 4c1ce: 2202 movel %d2,%d1 4c1d0: be82 cmpl %d2,%d7 4c1d2: 6402 bccs 4c1d6 4c1d4: 2207 movel %d7,%d1 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4c1d6: 2f01 movel %d1,%sp@- 4c1d8: 2040 moveal %d0,%a0 4c1da: dc90 addl %a0@,%d6 dest += to_copy; 4c1dc: 2e05 movel %d5,%d7 4c1de: de81 addl %d1,%d7 block++; my_length -= to_copy; 4c1e0: 9481 subl %d1,%d2 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; block++; 4c1e2: 5283 addql #1,%d3 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4c1e4: 2f06 movel %d6,%sp@- dest += to_copy; block++; my_length -= to_copy; 4c1e6: 2c01 movel %d1,%d6 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4c1e8: 2f05 movel %d5,%sp@- 4c1ea: 4eb9 0004 d8d8 jsr 4d8d8 dest += to_copy; block++; my_length -= to_copy; 4c1f0: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4c1f4: 2a39 0005 d2b8 movel 5d2b8 ,%d5 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4c1fa: 49f9 0004 b6b8 lea 4b6b8 ,%a4 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4c200: 47f9 0004 d8d8 lea 4d8d8 ,%a3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4c206: 603a bras 4c242 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4c208: 42a7 clrl %sp@- 4c20a: 2f03 movel %d3,%sp@- 4c20c: 2f0a movel %a2,%sp@- 4c20e: 4e94 jsr %a4@ assert( block_ptr ); 4c210: 4fef 000c lea %sp@(12),%sp 4c214: 4a80 tstl %d0 4c216: 6614 bnes 4c22c <== ALWAYS TAKEN 4c218: 4879 0005 b8ca pea 5b8ca <== NOT EXECUTED 4c21e: 4879 0005 b97f pea 5b97f <__FUNCTION__.6174> <== NOT EXECUTED 4c224: 4878 02a7 pea 2a7 <== NOT EXECUTED 4c228: 6000 fe80 braw 4c0aa <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4c22c: 2040 moveal %d0,%a0 dest += to_copy; block++; 4c22e: 5283 addql #1,%d3 my_length -= to_copy; 4c230: 9485 subl %d5,%d2 copied += to_copy; 4c232: dc85 addl %d5,%d6 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4c234: 2f05 movel %d5,%sp@- 4c236: 2f10 movel %a0@,%sp@- 4c238: 2f07 movel %d7,%sp@- dest += to_copy; 4c23a: de85 addl %d5,%d7 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4c23c: 4e93 jsr %a3@ dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 4c23e: 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 ) { 4c242: b4b9 0005 d2b8 cmpl 5d2b8 ,%d2 4c248: 64be bccs 4c208 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4c24a: 4a82 tstl %d2 4c24c: 673c beqs 4c28a block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4c24e: 42a7 clrl %sp@- 4c250: 2f03 movel %d3,%sp@- 4c252: 2f0a movel %a2,%sp@- 4c254: 4eb9 0004 b6b8 jsr 4b6b8 assert( block_ptr ); 4c25a: 4fef 000c lea %sp@(12),%sp 4c25e: 4a80 tstl %d0 4c260: 6614 bnes 4c276 <== ALWAYS TAKEN 4c262: 4879 0005 b8ca pea 5b8ca <== NOT EXECUTED 4c268: 4879 0005 b97f pea 5b97f <__FUNCTION__.6174> <== NOT EXECUTED 4c26e: 4878 02b9 pea 2b9 <== NOT EXECUTED 4c272: 6000 fe36 braw 4c0aa <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4c276: 2040 moveal %d0,%a0 copied += my_length; 4c278: dc82 addl %d2,%d6 if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4c27a: 2f02 movel %d2,%sp@- 4c27c: 2f10 movel %a0@,%sp@- 4c27e: 2f07 movel %d7,%sp@- 4c280: 4eb9 0004 d8d8 jsr 4d8d8 copied += my_length; 4c286: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 4c28a: 42a7 clrl %sp@- 4c28c: 486e fff8 pea %fp@(-8) 4c290: 4eb9 0004 28b0 jsr 428b0 4c296: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 4c29c: 508f addql #8,%sp } 4c29e: 2006 movel %d6,%d0 4c2a0: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 4c2a6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b8e4 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4b8e4: 4e56 ffe4 linkw %fp,#-28 4b8e8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4b8ec: 246e 0008 moveal %fp@(8),%a2 /* * Perform internal consistency checks */ assert( the_jnode ); 4b8f0: 4a8a tstl %a2 4b8f2: 6612 bnes 4b906 <== ALWAYS TAKEN 4b8f4: 4879 0005 b846 pea 5b846 <== NOT EXECUTED 4b8fa: 4879 0005 b991 pea 5b991 <__FUNCTION__.6099> <== NOT EXECUTED 4b900: 4878 01ee pea 1ee <== NOT EXECUTED 4b904: 6018 bras 4b91e <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4b906: 7005 moveq #5,%d0 4b908: b0aa 0048 cmpl %a2@(72),%d0 4b90c: 671c beqs 4b92a <== ALWAYS TAKEN 4b90e: 4879 0005 b89a pea 5b89a <== NOT EXECUTED 4b914: 4879 0005 b991 pea 5b991 <__FUNCTION__.6099> <== NOT EXECUTED 4b91a: 4878 01f2 pea 1f2 <== NOT EXECUTED 4b91e: 4879 0005 b850 pea 5b850 <== NOT EXECUTED 4b924: 4eb9 0004 9f40 jsr 49f40 <__assert_func> <== NOT EXECUTED /* * 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; 4b92a: 2439 0005 d2b8 movel 5d2b8 ,%d2 4b930: e48a lsrl #2,%d2 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4b932: 4aaa 0054 tstl %a2@(84) 4b936: 670e beqs 4b946 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 4b938: 2f02 movel %d2,%sp@- 4b93a: 486a 0054 pea %a2@(84) 4b93e: 4eb9 0004 b832 jsr 4b832 4b944: 508f addql #8,%sp * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4b946: 4aaa 0058 tstl %a2@(88) 4b94a: 673e beqs 4b98a <== ALWAYS TAKEN 4b94c: 4283 clrl %d3 <== NOT EXECUTED if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( 4b94e: 47f9 0004 b832 lea 4b832 ,%a3<== NOT EXECUTED 4b954: 601a bras 4b970 <== NOT EXECUTED } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 4b956: 2003 movel %d3,%d0 <== NOT EXECUTED 4b958: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4b95c: e588 lsll #2,%d0 <== NOT EXECUTED 4b95e: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 4b962: 670a beqs 4b96e <== NOT EXECUTED memfile_free_blocks_in_table( 4b964: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b966: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4b96a: 4e93 jsr %a3@ <== NOT EXECUTED 4b96c: 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 4b976: e488 lsrl #2,%d0 <== NOT EXECUTED 4b978: b083 cmpl %d3,%d0 <== NOT EXECUTED 4b97a: 62da bhis 4b956 <== 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 ); 4b97c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b97e: 486a 0058 pea %a2@(88) <== NOT EXECUTED 4b982: 4eb9 0004 b832 jsr 4b832 <== NOT EXECUTED 4b988: 508f addql #8,%sp <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4b98a: 4aaa 005c tstl %a2@(92) 4b98e: 6762 beqs 4b9f2 <== ALWAYS TAKEN 4b990: 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 4b998: 603e bras 4b9d8 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4b99a: 2a03 movel %d3,%d5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4b99c: 206a 005c moveal %a2@(92),%a0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4b9a0: e58d lsll #2,%d5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4b9a2: 2670 5800 moveal %a0@(00000000,%d5:l),%a3 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4b9a6: 4a8b tstl %a3 <== NOT EXECUTED 4b9a8: 673a beqs 4b9e4 <== NOT EXECUTED 4b9aa: 4284 clrl %d4 <== NOT EXECUTED 4b9ac: 6010 bras 4b9be <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4b9b2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b9b4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4b9b6: 4e94 jsr %a4@ <== NOT EXECUTED 4b9b8: 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 4b9c4: e488 lsrl #2,%d0 <== NOT EXECUTED 4b9c6: b084 cmpl %d4,%d0 <== NOT EXECUTED 4b9c8: 62e4 bhis 4b9ae <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4b9ca: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b9cc: 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 4b9de: e488 lsrl #2,%d0 <== NOT EXECUTED 4b9e0: b083 cmpl %d3,%d0 <== NOT EXECUTED 4b9e2: 62b6 bhis 4b99a <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4b9e4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b9e6: 486a 005c pea %a2@(92) <== NOT EXECUTED 4b9ea: 4eb9 0004 b832 jsr 4b832 <== NOT EXECUTED 4b9f0: 508f addql #8,%sp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 4b9f2: 4280 clrl %d0 4b9f4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4b9fa: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b898 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4b898: 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 ); 4b89c: 42a7 clrl %sp@- <== NOT EXECUTED 4b89e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4b8a2: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4b8a6: 4eb9 0004 b6b8 jsr 4b6b8 <== NOT EXECUTED assert( block_ptr ); 4b8ac: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b8b0: 4a80 tstl %d0 <== NOT EXECUTED 4b8b2: 661c bnes 4b8d0 <== NOT EXECUTED 4b8b4: 4879 0005 b8ca pea 5b8ca <== NOT EXECUTED 4b8ba: 4879 0005 b9c2 pea 5b9c2 <__FUNCTION__.6063> <== NOT EXECUTED 4b8c0: 4878 0196 pea 196 <== NOT EXECUTED 4b8c4: 4879 0005 b850 pea 5b850 <== NOT EXECUTED 4b8ca: 4eb9 0004 9f40 jsr 49f40 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 4b8d0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b8d2: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 4b8d4: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 4b8d6: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4b8d8: 4eb9 0004 b67a jsr 4b67a <== NOT EXECUTED } return 1; } 4b8de: 7001 moveq #1,%d0 <== NOT EXECUTED 4b8e0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bd6a : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4bd6a: 4e56 ffd0 linkw %fp,#-48 4bd6e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4bd72: 246e 0008 moveal %fp@(8),%a2 4bd76: 262e 0014 movel %fp@(20),%d3 4bd7a: 242e 0018 movel %fp@(24),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 4bd7e: 4a8a tstl %a2 4bd80: 6612 bnes 4bd94 <== ALWAYS TAKEN 4bd82: 4879 0005 b846 pea 5b846 <== NOT EXECUTED 4bd88: 4879 0005 b96c pea 5b96c <__FUNCTION__.6266> <== NOT EXECUTED 4bd8e: 4878 02e3 pea 2e3 <== NOT EXECUTED 4bd92: 6018 bras 4bdac <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4bd94: 7805 moveq #5,%d4 4bd96: b8aa 0048 cmpl %a2@(72),%d4 4bd9a: 671c beqs 4bdb8 <== ALWAYS TAKEN 4bd9c: 4879 0005 b89a pea 5b89a <== NOT EXECUTED 4bda2: 4879 0005 b96c pea 5b96c <__FUNCTION__.6266> <== NOT EXECUTED 4bda8: 4878 02e7 pea 2e7 <== NOT EXECUTED 4bdac: 4879 0005 b850 pea 5b850 <== NOT EXECUTED 4bdb2: 4eb9 0004 9f40 jsr 49f40 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4bdb8: 4a83 tstl %d3 4bdba: 6612 bnes 4bdce <== ALWAYS TAKEN 4bdbc: 4879 0005 b0db pea 5b0db <== NOT EXECUTED 4bdc2: 4879 0005 b96c pea 5b96c <__FUNCTION__.6266> <== NOT EXECUTED 4bdc8: 4878 02ef pea 2ef <== NOT EXECUTED 4bdcc: 60de bras 4bdac <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 4bdce: 4a82 tstl %d2 4bdd0: 6612 bnes 4bde4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4bdd2: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4bdd8: 7a16 moveq #22,%d5 <== NOT EXECUTED 4bdda: 7eff moveq #-1,%d7 <== NOT EXECUTED 4bddc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bdde: 2085 movel %d5,%a0@ <== NOT EXECUTED 4bde0: 6000 0186 braw 4bf68 <== 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; if ( last_byte > the_jnode->info.file.size ) { 4bde4: 206e 0010 moveal %fp@(16),%a0 4bde8: d1c2 addal %d2,%a0 4bdea: 2208 movel %a0,%d1 4bdec: 4280 clrl %d0 4bdee: 282a 004c movel %a2@(76),%d4 4bdf2: 2a2a 0050 movel %a2@(80),%d5 4bdf6: 9a81 subl %d1,%d5 4bdf8: 9980 subxl %d0,%d4 4bdfa: 6c26 bges 4be22 <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 4bdfc: 2f08 movel %a0,%sp@- 4bdfe: 2f00 movel %d0,%sp@- 4be00: 2f0a movel %a2,%sp@- 4be02: 4eb9 0004 bb4e jsr 4bb4e if ( status ) 4be08: 4fef 000c lea %sp@(12),%sp 4be0c: 4a80 tstl %d0 4be0e: 6712 beqs 4be22 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 4be10: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4be16: 781c moveq #28,%d4 <== NOT EXECUTED 4be18: 7eff moveq #-1,%d7 <== NOT EXECUTED 4be1a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4be1c: 2084 movel %d4,%a0@ <== NOT EXECUTED 4be1e: 6000 0148 braw 4bf68 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4be22: 2e39 0005 d2b8 movel 5d2b8 ,%d7 4be28: 2207 movel %d7,%d1 4be2a: 5bc0 smi %d0 4be2c: 49c0 extbl %d0 4be2e: 2640 moveal %d0,%a3 4be30: 2841 moveal %d1,%a4 4be32: 2f0c movel %a4,%sp@- 4be34: 2f00 movel %d0,%sp@- 4be36: 2f2e 0010 movel %fp@(16),%sp@- 4be3a: 2f2e 000c movel %fp@(12),%sp@- 4be3e: 4eb9 0005 9040 jsr 59040 <__moddi3> 4be44: 4fef 0010 lea %sp@(16),%sp 4be48: 2801 movel %d1,%d4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4be4a: 2f0c movel %a4,%sp@- 4be4c: 2f0b movel %a3,%sp@- 4be4e: 2f2e 0010 movel %fp@(16),%sp@- 4be52: 2f2e 000c movel %fp@(12),%sp@- 4be56: 4eb9 0005 8c88 jsr 58c88 <__divdi3> 4be5c: 4fef 0010 lea %sp@(16),%sp 4be60: 2a01 movel %d1,%d5 if ( start_offset ) { 4be62: 4a84 tstl %d4 4be64: 6606 bnes 4be6c 4be66: 2643 moveal %d3,%a3 4be68: 4287 clrl %d7 4be6a: 604c bras 4beb8 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 ); 4be6c: 42a7 clrl %sp@- 4be6e: 2f01 movel %d1,%sp@- 4be70: 2f0a movel %a2,%sp@- 4be72: 4eb9 0004 b6b8 jsr 4b6b8 assert( block_ptr ); 4be78: 4fef 000c lea %sp@(12),%sp 4be7c: 4a80 tstl %d0 4be7e: 6614 bnes 4be94 <== ALWAYS TAKEN 4be80: 4879 0005 b8ca pea 5b8ca <== NOT EXECUTED 4be86: 4879 0005 b96c pea 5b96c <__FUNCTION__.6266> <== NOT EXECUTED 4be8c: 4878 031c pea 31c <== NOT EXECUTED 4be90: 6000 ff1a braw 4bdac <== NOT EXECUTED */ 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; 4be94: 9e84 subl %d4,%d7 4be96: b487 cmpl %d7,%d2 4be98: 6402 bccs 4be9c <== NEVER TAKEN 4be9a: 2e02 movel %d2,%d7 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4be9c: 2f07 movel %d7,%sp@- 4be9e: 2040 moveal %d0,%a0 src += to_copy; 4bea0: 2643 moveal %d3,%a3 4bea2: d7c7 addal %d7,%a3 block++; 4bea4: 5285 addql #1,%d5 my_length -= to_copy; 4bea6: 9487 subl %d7,%d2 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4bea8: 2f03 movel %d3,%sp@- 4beaa: d890 addl %a0@,%d4 4beac: 2f04 movel %d4,%sp@- 4beae: 4eb9 0004 d8d8 jsr 4d8d8 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4beb4: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4beb8: 2639 0005 d2b8 movel 5d2b8 ,%d3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4bebe: 4bf9 0004 b6b8 lea 4b6b8 ,%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 ); 4bec4: 49f9 0004 d8d8 lea 4d8d8 ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4beca: 603a bras 4bf06 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4becc: 42a7 clrl %sp@- 4bece: 2f05 movel %d5,%sp@- 4bed0: 2f0a movel %a2,%sp@- 4bed2: 4e95 jsr %a5@ assert( block_ptr ); 4bed4: 4fef 000c lea %sp@(12),%sp 4bed8: 4a80 tstl %d0 4beda: 6614 bnes 4bef0 <== ALWAYS TAKEN 4bedc: 4879 0005 b8ca pea 5b8ca <== NOT EXECUTED 4bee2: 4879 0005 b96c pea 5b96c <__FUNCTION__.6266> <== NOT EXECUTED 4bee8: 4878 0330 pea 330 <== NOT EXECUTED 4beec: 6000 febe braw 4bdac <== NOT EXECUTED 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 ); 4bef0: 2f03 movel %d3,%sp@- 4bef2: 2240 moveal %d0,%a1 src += to_copy; block++; 4bef4: 5285 addql #1,%d5 my_length -= to_copy; 4bef6: 9483 subl %d3,%d2 * * 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( 4bef8: de83 addl %d3,%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 ); 4befa: 2f0b movel %a3,%sp@- 4befc: 2f11 movel %a1@,%sp@- src += to_copy; 4befe: d7c3 addal %d3,%a3 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 4bf00: 4e94 jsr %a4@ * * 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( 4bf02: 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 ) { 4bf06: b4b9 0005 d2b8 cmpl 5d2b8 ,%d2 4bf0c: 64be bccs 4becc */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4bf0e: 4a82 tstl %d2 4bf10: 673c beqs 4bf4e block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4bf12: 42a7 clrl %sp@- 4bf14: 2f05 movel %d5,%sp@- 4bf16: 2f0a movel %a2,%sp@- 4bf18: 4eb9 0004 b6b8 jsr 4b6b8 assert( block_ptr ); 4bf1e: 4fef 000c lea %sp@(12),%sp 4bf22: 4a80 tstl %d0 4bf24: 6614 bnes 4bf3a <== ALWAYS TAKEN 4bf26: 4879 0005 b8ca pea 5b8ca <== NOT EXECUTED 4bf2c: 4879 0005 b96c pea 5b96c <__FUNCTION__.6266> <== NOT EXECUTED 4bf32: 4878 0346 pea 346 <== NOT EXECUTED 4bf36: 6000 fe74 braw 4bdac <== NOT EXECUTED 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 ); 4bf3a: 2f02 movel %d2,%sp@- 4bf3c: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4bf3e: de82 addl %d2,%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, my_length ); 4bf40: 2f0b movel %a3,%sp@- 4bf42: 2f10 movel %a0@,%sp@- 4bf44: 4eb9 0004 d8d8 jsr 4d8d8 my_length = 0; copied += to_copy; 4bf4a: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4bf4e: 42a7 clrl %sp@- 4bf50: 486e fff8 pea %fp@(-8) 4bf54: 4eb9 0004 28b0 jsr 428b0 4bf5a: 202e fff8 movel %fp@(-8),%d0 return copied; 4bf5e: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4bf60: 2540 0044 movel %d0,%a2@(68) 4bf64: 2540 0040 movel %d0,%a2@(64) return copied; } 4bf68: 2007 movel %d7,%d0 4bf6a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4bf70: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041ec0 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 41ec0: 4e56 ffb4 linkw %fp,#-76 41ec4: 48d7 003c moveml %d2-%d5,%sp@ 41ec8: 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 ); 41ecc: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 41ece: 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 ); 41ed2: 4eb9 0004 e4e4 jsr 4e4e4 41ed8: 588f addql #4,%sp 41eda: 486e fffc pea %fp@(-4) 41ede: 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 */ ) { 41ee2: 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 ); 41ee6: 2f00 movel %d0,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 41ee8: 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 ); 41eec: 2f03 movel %d3,%sp@- 41eee: 4eb9 0004 9d38 jsr 49d38 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 41ef4: 4fef 0010 lea %sp@(16),%sp 41ef8: 2002 movel %d2,%d0 41efa: 0280 0000 f000 andil #61440,%d0 41f00: 0c80 0000 4000 cmpil #16384,%d0 41f06: 6748 beqs 41f50 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 41f08: 0c80 0000 8000 cmpil #32768,%d0 41f0e: 6606 bnes 41f16 41f10: 303c 0005 movew #5,%d0 41f14: 603c bras 41f52 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 41f16: 0c80 0000 6000 cmpil #24576,%d0 41f1c: 6708 beqs 41f26 41f1e: 0c80 0000 2000 cmpil #8192,%d0 41f24: 660c bnes 41f32 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 41f26: 2d45 ffe8 movel %d5,%fp@(-24) 41f2a: 7002 moveq #2,%d0 41f2c: 2d44 ffec movel %d4,%fp@(-20) */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 41f30: 6020 bras 41f52 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 41f32: 0c80 0000 1000 cmpil #4096,%d0 41f38: 6606 bnes 41f40 <== NEVER TAKEN 41f3a: 303c 0007 movew #7,%d0 41f3e: 6012 bras 41f52 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 41f40: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 41f46: 7416 moveq #22,%d2 <== NOT EXECUTED 41f48: 72ff moveq #-1,%d1 <== NOT EXECUTED 41f4a: 2040 moveal %d0,%a0 <== NOT EXECUTED 41f4c: 2082 movel %d2,%a0@ <== NOT EXECUTED 41f4e: 6032 bras 41f82 <== NOT EXECUTED 41f50: 7001 moveq #1,%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( 41f52: 486e ffe8 pea %fp@(-24) 41f56: 2f02 movel %d2,%sp@- 41f58: 486e ffc7 pea %fp@(-57) 41f5c: 2f00 movel %d0,%sp@- 41f5e: 2f2e 0018 movel %fp@(24),%sp@- 41f62: 4eb9 0004 925e jsr 4925e new_name, mode, &info ); if ( !new_node ) 41f68: 4fef 0014 lea %sp@(20),%sp 41f6c: 4a80 tstl %d0 41f6e: 6704 beqs 41f74 <== NEVER TAKEN 41f70: 4281 clrl %d1 41f72: 600e bras 41f82 rtems_set_errno_and_return_minus_one( ENOMEM ); 41f74: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 41f7a: 72ff moveq #-1,%d1 <== NOT EXECUTED 41f7c: 2040 moveal %d0,%a0 <== NOT EXECUTED 41f7e: 700c moveq #12,%d0 <== NOT EXECUTED 41f80: 2080 movel %d0,%a0@ <== NOT EXECUTED return 0; } 41f82: 2001 movel %d1,%d0 41f84: 4cee 003c ffb4 moveml %fp@(-76),%d2-%d5 41f8a: 4e5e unlk %fp ... =============================================================================== 00041f90 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 41f90: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 41f92: 4e56 0000 linkw %fp,#0 41f96: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 41f9a: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 41f9e: b0a8 0048 cmpl %a0@(72),%d0 41fa2: 6710 beqs 41fb4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 41fa4: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 41faa: 7214 moveq #20,%d1 <== NOT EXECUTED 41fac: 2040 moveal %d0,%a0 <== NOT EXECUTED 41fae: 70ff moveq #-1,%d0 <== NOT EXECUTED 41fb0: 2081 movel %d1,%a0@ <== NOT EXECUTED 41fb2: 6006 bras 41fba <== 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; 41fb4: 2149 0058 movel %a1,%a0@(88) 41fb8: 4280 clrl %d0 return 0; } 41fba: 4e5e unlk %fp ... =============================================================================== 00043c4e : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 43c4e: 4e56 0000 linkw %fp,#0 43c52: 2f0a movel %a2,%sp@- 43c54: 246e 0008 moveal %fp@(8),%a2 43c58: 2f02 movel %d2,%sp@- assert( the_jnode ); 43c5a: 4a8a tstl %a2 43c5c: 6614 bnes 43c72 <== ALWAYS TAKEN 43c5e: 4879 0005 fd46 pea 5fd46 <== NOT EXECUTED 43c64: 4879 0005 fee2 pea 5fee2 <__FUNCTION__.6586> <== NOT EXECUTED 43c6a: 4878 0038 pea 38 <== NOT EXECUTED 43c6e: 6000 00c6 braw 43d36 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 43c72: 2079 0006 1814 moveal 61814 <_impure_ptr>,%a0 switch( the_jnode->type ) { 43c78: 7406 moveq #6,%d2 IMFS_jnode_t *the_jnode ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 43c7a: 2f28 0008 movel %a0@(8),%sp@- 43c7e: 486a 000c pea %a2@(12) 43c82: 4eb9 0005 0a84 jsr 50a84 switch( the_jnode->type ) { 43c88: 202a 0048 movel %a2@(72),%d0 43c8c: 2200 movel %d0,%d1 43c8e: 508f addql #8,%sp 43c90: 5381 subql #1,%d1 43c92: b481 cmpl %d1,%d2 43c94: 6500 00f0 bcsw 43d86 43c98: 2079 0006 1814 moveal 61814 <_impure_ptr>,%a0 43c9e: 303b 1a08 movew %pc@(43ca8 ,%d1:l:2),%d0 43ca2: 48c0 extl %d0 43ca4: 4efb 0802 jmp %pc@(43ca8 ,%d0:l) 43ca8: 000e 016 <== NOT EXECUTED 43caa: 0022 042 <== NOT EXECUTED 43cac: 006e 0156 <== NOT EXECUTED 43cae: 009a 0052 0032 oril #5374002,%d2 <== NOT EXECUTED 43cb4: 00bc 2f28 0008 oril #791150600,%d4 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 43cba: 4878 002f pea 2f 43cbe: 4eb9 0005 0958 jsr 50958 break; 43cc4: 508f addql #8,%sp 43cc6: 6000 00e8 braw 43db0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 43cca: 2f2a 0050 movel %a2@(80),%sp@- 43cce: 2f2a 004c movel %a2@(76),%sp@- 43cd2: 4879 0005 fd9d pea 5fd9d 43cd8: 600e bras 43ce8 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 43cda: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 43cde: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 43ce2: 4879 0005 fdb0 pea 5fdb0 <== NOT EXECUTED 43ce8: 2f28 0008 movel %a0@(8),%sp@- 43cec: 4eb9 0005 0918 jsr 50918 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 43cf2: 4fef 0010 lea %sp@(16),%sp 43cf6: 6000 00b8 braw 43db0 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 43cfa: 2f2a 0050 movel %a2@(80),%sp@- 43cfe: 4879 0005 fdbf pea 5fdbf 43d04: 2f28 0008 movel %a0@(8),%sp@- 43d08: 4eb9 0005 0918 jsr 50918 (uint32_t)the_jnode->info.file.size ); #endif break; 43d0e: 4fef 000c lea %sp@(12),%sp 43d12: 6000 009c braw 43db0 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 43d16: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43d1a: 4879 0005 fdcb pea 5fdcb <== NOT EXECUTED 43d20: 4eb9 0005 0a84 jsr 50a84 <== NOT EXECUTED assert(0); 43d26: 4879 0005 ee73 pea 5ee73 <== NOT EXECUTED 43d2c: 4879 0005 fee2 pea 5fee2 <__FUNCTION__.6586> <== NOT EXECUTED 43d32: 4878 005d pea 5d <== NOT EXECUTED 43d36: 4879 0005 fd50 pea 5fd50 <== NOT EXECUTED 43d3c: 4eb9 0004 45e4 jsr 445e4 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 43d42: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43d46: 4879 0005 fdcb pea 5fdcb <== NOT EXECUTED 43d4c: 4eb9 0005 0a84 jsr 50a84 <== NOT EXECUTED assert(0); 43d52: 4879 0005 ee73 pea 5ee73 <== NOT EXECUTED 43d58: 4879 0005 fee2 pea 5fee2 <__FUNCTION__.6586> <== NOT EXECUTED 43d5e: 4878 0062 pea 62 <== NOT EXECUTED 43d62: 60d2 bras 43d36 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 43d64: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43d68: 4879 0005 fddf pea 5fddf <== NOT EXECUTED 43d6e: 4eb9 0005 0a84 jsr 50a84 <== NOT EXECUTED assert(0); 43d74: 4879 0005 ee73 pea 5ee73 <== NOT EXECUTED 43d7a: 4879 0005 fee2 pea 5fee2 <__FUNCTION__.6586> <== NOT EXECUTED 43d80: 4878 0067 pea 67 <== NOT EXECUTED 43d84: 60b0 bras 43d36 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 43d86: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43d88: 4879 0005 fdf2 pea 5fdf2 <== NOT EXECUTED 43d8e: 2079 0006 1814 moveal 61814 <_impure_ptr>,%a0 <== NOT EXECUTED 43d94: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43d98: 4eb9 0005 0918 jsr 50918 <== NOT EXECUTED assert(0); 43d9e: 4879 0005 ee73 pea 5ee73 <== NOT EXECUTED 43da4: 4879 0005 fee2 pea 5fee2 <__FUNCTION__.6586> <== NOT EXECUTED 43daa: 4878 006c pea 6c <== NOT EXECUTED 43dae: 6086 bras 43d36 <== NOT EXECUTED break; } puts(""); } 43db0: 242e fff8 movel %fp@(-8),%d2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43db4: 203c 0006 055c movel #394588,%d0 } 43dba: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43dbe: 2d40 0008 movel %d0,%fp@(8) } 43dc2: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43dc4: 4ef9 0005 22c0 jmp 522c0 =============================================================================== 00041fd4 : IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 41fd4: 7004 moveq #4,%d0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 41fd6: 4e56 0000 linkw %fp,#0 41fda: 206e 0008 moveal %fp@(8),%a0 41fde: 2f0a movel %a2,%sp@- IMFS_jnode_t *node; int i; node = loc->node_access; 41fe0: 2050 moveal %a0@,%a0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 41fe2: 2f02 movel %d2,%sp@- 41fe4: 226e 000c moveal %fp@(12),%a1 41fe8: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 41fec: b0a8 0048 cmpl %a0@(72),%d0 41ff0: 6604 bnes 41ff6 <== NEVER TAKEN 41ff2: 4200 clrb %d0 41ff4: 6016 bras 4200c rtems_set_errno_and_return_minus_one( EINVAL ); 41ff6: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 41ffc: 7216 moveq #22,%d1 <== NOT EXECUTED 41ffe: 2040 moveal %d0,%a0 <== NOT EXECUTED 42000: 70ff moveq #-1,%d0 <== NOT EXECUTED 42002: 2081 movel %d1,%a0@ <== NOT EXECUTED 42004: 6014 bras 4201a <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 42006: 1381 0800 moveb %d1,%a1@(00000000,%d0:l) 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++ ) 4200a: 5280 addql #1,%d0 4200c: b480 cmpl %d0,%d2 4200e: 630a blss 4201a 42010: 2468 004c moveal %a0@(76),%a2 42014: 1232 0800 moveb %a2@(00000000,%d0:l),%d1 42018: 66ec bnes 42006 buf[i] = node->info.sym_link.name[i]; return i; } 4201a: 242e fff8 movel %fp@(-8),%d2 4201e: 246e fffc moveal %fp@(-4),%a2 42022: 4e5e unlk %fp ... =============================================================================== 00042028 : 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 */ ) { 42028: 4e56 fff8 linkw %fp,#-8 IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 4202c: 206e 000c moveal %fp@(12),%a0 rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 42030: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 42032: 4878 0020 pea 20 42036: 2f2e 0014 movel %fp@(20),%sp@- ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 4203a: 2450 moveal %a0@,%a2 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 4203c: 486a 000c pea %a2@(12) 42040: 4eb9 0004 e4fc jsr 4e4fc if ( the_jnode->Parent != NULL ) 42046: 4fef 000c lea %sp@(12),%sp 4204a: 4aaa 0008 tstl %a2@(8) 4204e: 670a beqs 4205a <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 42050: 2f0a movel %a2,%sp@- 42052: 4eb9 0004 613c jsr 4613c <_Chain_Extract> 42058: 588f addql #4,%sp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 4205a: 206e 0010 moveal %fp@(16),%a0 4205e: 2050 moveal %a0@,%a0 the_jnode->Parent = new_parent; 42060: 2548 0008 movel %a0,%a2@(8) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 42064: 2f0a movel %a2,%sp@- 42066: 4868 004c pea %a0@(76) 4206a: 4eb9 0004 6104 jsr 46104 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 42070: 42a7 clrl %sp@- 42072: 486e fff8 pea %fp@(-8) 42076: 4eb9 0004 28b0 jsr 428b0 4207c: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; } 42082: 4280 clrl %d0 42084: 246e fff4 moveal %fp@(-12),%a2 42088: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049dec : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 49dec: 4e56 fff8 linkw %fp,#-8 49df0: 2f0b movel %a3,%sp@- 49df2: 266e 000c moveal %fp@(12),%a3 49df6: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 49df8: 2453 moveal %a3@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 49dfa: 4aaa 0008 tstl %a2@(8) 49dfe: 670e beqs 49e0e <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 49e00: 2f0a movel %a2,%sp@- 49e02: 4eb9 0004 613c jsr 4613c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 49e08: 588f addql #4,%sp 49e0a: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 49e0e: 302a 0032 movew %a2@(50),%d0 49e12: 5380 subql #1,%d0 49e14: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 49e18: 42a7 clrl %sp@- 49e1a: 486e fff8 pea %fp@(-8) 49e1e: 4eb9 0004 28b0 jsr 428b0 49e24: 256e fff8 0044 movel %fp@(-8),%a2@(68) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 49e2a: 2f0a movel %a2,%sp@- 49e2c: 4eb9 0004 a1be jsr 4a1be 49e32: 4fef 000c lea %sp@(12),%sp 49e36: 4a80 tstl %d0 49e38: 663a bnes 49e74 <== NEVER TAKEN 49e3a: 4a6a 0032 tstw %a2@(50) 49e3e: 6634 bnes 49e74 <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 49e40: 2079 0005 c530 moveal 5c530 ,%a0 49e46: 2653 moveal %a3@,%a3 49e48: b7e8 0004 cmpal %a0@(4),%a3 49e4c: 6604 bnes 49e52 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 49e4e: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 49e52: 7004 moveq #4,%d0 49e54: b0aa 0048 cmpl %a2@(72),%d0 49e58: 6610 bnes 49e6a if ( the_jnode->info.sym_link.name ) 49e5a: 202a 004c movel %a2@(76),%d0 49e5e: 670a beqs 49e6a <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 49e60: 2f00 movel %d0,%sp@- 49e62: 4eb9 0004 2828 jsr 42828 49e68: 588f addql #4,%sp } free( the_jnode ); 49e6a: 2f0a movel %a2,%sp@- 49e6c: 4eb9 0004 2828 jsr 42828 49e72: 588f addql #4,%sp } return 0; } 49e74: 246e fff0 moveal %fp@(-16),%a2 49e78: 4280 clrl %d0 49e7a: 266e fff4 moveal %fp@(-12),%a3 49e7e: 4e5e unlk %fp ... =============================================================================== 00049e84 : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 49e84: 7205 moveq #5,%d1 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 49e86: 4e56 0000 linkw %fp,#0 49e8a: 206e 000c moveal %fp@(12),%a0 49e8e: 2f0a movel %a2,%sp@- 49e90: 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; 49e94: 2252 moveal %a2@,%a1 switch ( the_jnode->type ) { 49e96: 2029 0048 movel %a1@(72),%d0 49e9a: 5580 subql #2,%d0 49e9c: b280 cmpl %d0,%d1 49e9e: 653e bcss 49ede <== NEVER TAKEN 49ea0: 303b 0a08 movew %pc@(49eaa ,%d0:l:2),%d0 49ea4: 48c0 extl %d0 49ea6: 4efb 0802 jmp %pc@(49eaa ,%d0:l) 49eaa: 000c 014 <== NOT EXECUTED 49eac: 0034 064 <== NOT EXECUTED 49eae: 0026 046 <== NOT EXECUTED 49eb0: 001c 034 <== NOT EXECUTED 49eb2: 001c 034 <== NOT EXECUTED 49eb4: 0026 046 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 49eb6: 2029 0050 movel %a1@(80),%d0 49eba: 2169 004c 0016 movel %a1@(76),%a0@(22) 49ec0: 2140 001a movel %d0,%a0@(26) break; 49ec4: 602a bras 49ef0 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 49ec6: 2029 004c movel %a1@(76),%d0 49eca: 2229 0050 movel %a1@(80),%d1 49ece: 6004 bras 49ed4 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 49ed0: 4280 clrl %d0 <== NOT EXECUTED 49ed2: 4281 clrl %d1 <== NOT EXECUTED 49ed4: 2140 001e movel %d0,%a0@(30) 49ed8: 2141 0022 movel %d1,%a0@(34) break; 49edc: 6012 bras 49ef0 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 49ede: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 49ee4: 2040 moveal %d0,%a0 <== NOT EXECUTED 49ee6: 70ff moveq #-1,%d0 <== NOT EXECUTED 49ee8: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 49eee: 6046 bras 49f36 <== 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; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 49ef0: 246a 0010 moveal %a2@(16),%a2 buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 49ef4: 4280 clrl %d0 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 49ef6: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 49efc: 2169 0034 0008 movel %a1@(52),%a0@(8) * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 49f02: 246a 0034 moveal %a2@(52),%a2 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 49f06: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 49f0c: 2169 003c 0026 movel %a1@(60),%a0@(38) * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 49f12: 2212 movel %a2@,%d1 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 49f14: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 49f1a: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 49f20: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 49f26: 3169 003a 0014 movew %a1@(58),%a0@(20) /* * 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 = 49f2c: 2141 0004 movel %d1,%a0@(4) 49f30: 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; } 49f36: 246e fffc moveal %fp@(-4),%a2 49f3a: 4e5e unlk %fp ... =============================================================================== 0004208c : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 4208c: 4e56 ffc4 linkw %fp,#-60 42090: 2f03 movel %d3,%sp@- 42092: 262e 0010 movel %fp@(16),%d3 42096: 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 ); 42098: 240e movel %fp,%d2 4209a: 0682 ffff ffc7 addil #-57,%d2 420a0: 2f03 movel %d3,%sp@- 420a2: 4eb9 0004 e4e4 jsr 4e4e4 420a8: 588f addql #4,%sp 420aa: 486e fffc pea %fp@(-4) 420ae: 2f02 movel %d2,%sp@- 420b0: 2f00 movel %d0,%sp@- 420b2: 2f03 movel %d3,%sp@- 420b4: 4eb9 0004 9d38 jsr 49d38 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 420ba: 2f2e 000c movel %fp@(12),%sp@- 420be: 4eb9 0004 e054 jsr 4e054 if (info.sym_link.name == NULL) { 420c4: 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); 420c8: 2d40 ffe8 movel %d0,%fp@(-24) if (info.sym_link.name == NULL) { 420cc: 6608 bnes 420d6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 420ce: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 420d4: 6038 bras 4210e <== 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( 420d6: 486e ffe8 pea %fp@(-24) 420da: 2f3c 0000 a1ff movel #41471,%sp@- 420e0: 2f02 movel %d2,%sp@- 420e2: 4878 0004 pea 4 420e6: 2f2e 0008 movel %fp@(8),%sp@- 420ea: 4eb9 0004 925e jsr 4925e new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 420f0: 4fef 0014 lea %sp@(20),%sp 420f4: 4a80 tstl %d0 420f6: 6704 beqs 420fc <== NEVER TAKEN 420f8: 4281 clrl %d1 420fa: 601a bras 42116 free(info.sym_link.name); 420fc: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 42100: 4eb9 0004 2828 jsr 42828 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 42106: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4210c: 588f addql #4,%sp <== NOT EXECUTED 4210e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42110: 700c moveq #12,%d0 <== NOT EXECUTED 42112: 72ff moveq #-1,%d1 <== NOT EXECUTED 42114: 2080 movel %d0,%a0@ <== NOT EXECUTED } return 0; } 42116: 242e ffbc movel %fp@(-68),%d2 4211a: 2001 movel %d1,%d0 4211c: 262e ffc0 movel %fp@(-64),%d3 42120: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042124 : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42124: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 42126: 4e56 ffd0 linkw %fp,#-48 4212a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4212e: 246e 000c moveal %fp@(12),%a2 42132: 262e 0008 movel %fp@(8),%d3 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 42136: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42138: b0ab 0048 cmpl %a3@(72),%d0 4213c: 6600 0086 bnew 421c4 if ( !node->info.hard_link.link_node ) 42140: 282b 004c movel %a3@(76),%d4 42144: 6610 bnes 42156 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42146: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4214c: 7216 moveq #22,%d1 <== NOT EXECUTED 4214e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42150: 70ff moveq #-1,%d0 <== NOT EXECUTED 42152: 2081 movel %d1,%a0@ <== NOT EXECUTED 42154: 607e bras 421d4 <== NOT EXECUTED the_link = *loc; 42156: 4878 0014 pea 14 4215a: 240e movel %fp,%d2 4215c: 0682 ffff ffe4 addil #-28,%d2 42162: 2f0a movel %a2,%sp@- 42164: 2f02 movel %d2,%sp@- 42166: 4eb9 0004 d8d8 jsr 4d8d8 the_link.node_access = node->info.hard_link.link_node; 4216c: 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) 42170: 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 ); 42172: 2f02 movel %d2,%sp@- 42174: 4eb9 0004 9370 jsr 49370 /* * 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) 4217a: 206b 004c moveal %a3@(76),%a0 4217e: 4281 clrl %d1 42180: 4fef 0010 lea %sp@(16),%sp 42184: 3028 0032 movew %a0@(50),%d0 42188: 3200 movew %d0,%d1 4218a: b881 cmpl %d1,%d4 4218c: 6618 bnes 421a6 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 4218e: 2f02 movel %d2,%sp@- 42190: 206e ffec moveal %fp@(-20),%a0 42194: 2f03 movel %d3,%sp@- 42196: 2068 0034 moveal %a0@(52),%a0 4219a: 4e90 jsr %a0@ if ( result != 0 ) 4219c: 508f addql #8,%sp 4219e: 4a80 tstl %d0 421a0: 6722 beqs 421c4 421a2: 70ff moveq #-1,%d0 421a4: 602e bras 421d4 return -1; } else { node->info.hard_link.link_node->st_nlink --; 421a6: 5380 subql #1,%d0 421a8: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 421ac: 42a7 clrl %sp@- 421ae: 486e fff8 pea %fp@(-8) 421b2: 4eb9 0004 28b0 jsr 428b0 421b8: 206b 004c moveal %a3@(76),%a0 421bc: 508f addql #8,%sp 421be: 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 ); 421c4: 2f0a movel %a2,%sp@- 421c6: 206a 0008 moveal %a2@(8),%a0 421ca: 2f03 movel %d3,%sp@- 421cc: 2068 0034 moveal %a0@(52),%a0 421d0: 4e90 jsr %a0@ return result; 421d2: 508f addql #8,%sp } 421d4: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 421da: 4e5e unlk %fp ... =============================================================================== 000421e0 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 421e0: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 421e2: 4e56 0000 linkw %fp,#0 421e6: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 421ea: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 421ee: b0a8 0048 cmpl %a0@(72),%d0 421f2: 6710 beqs 42204 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 421f4: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 421fa: 72ff moveq #-1,%d1 <== NOT EXECUTED 421fc: 2040 moveal %d0,%a0 <== NOT EXECUTED 421fe: 7014 moveq #20,%d0 <== NOT EXECUTED 42200: 2080 movel %d0,%a0@ <== NOT EXECUTED 42202: 601c bras 42220 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 42204: 4aa8 0058 tstl %a0@(88) 42208: 6610 bnes 4221a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 4220a: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 42210: 72ff moveq #-1,%d1 <== NOT EXECUTED 42212: 2040 moveal %d0,%a0 <== NOT EXECUTED 42214: 7016 moveq #22,%d0 <== NOT EXECUTED 42216: 2080 movel %d0,%a0@ <== NOT EXECUTED 42218: 6006 bras 42220 <== 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; 4221a: 42a8 0058 clrl %a0@(88) 4221e: 4281 clrl %d1 return 0; } 42220: 2001 movel %d1,%d0 42222: 4e5e unlk %fp ... =============================================================================== 00042a50 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 42a50: 4e56 0000 linkw %fp,#0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 42a54: 2079 0005 ca86 moveal 5ca86 ,%a0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 42a5a: 2f03 movel %d3,%sp@- 42a5c: 262e 0008 movel %fp@(8),%d3 42a60: 2f02 movel %d2,%sp@- 42a62: 242e 000c movel %fp@(12),%d2 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 42a66: 4a88 tstl %a0 42a68: 6704 beqs 42a6e <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 42a6a: 2050 moveal %a0@,%a0 <== NOT EXECUTED 42a6c: 4e90 jsr %a0@ <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 42a6e: 4eb9 0004 29de jsr 429de /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 42a74: 2079 0005 ca8a moveal 5ca8a ,%a0 42a7a: 4a88 tstl %a0 42a7c: 6712 beqs 42a90 <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 42a7e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 42a82: d483 addl %d3,%d2 <== NOT EXECUTED /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 42a84: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42a86: 2050 moveal %a0@,%a0 <== NOT EXECUTED 42a88: 4e90 jsr %a0@ <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 42a8a: 508f addql #8,%sp <== NOT EXECUTED 42a8c: 9480 subl %d0,%d2 <== NOT EXECUTED 42a8e: 2600 movel %d0,%d3 <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 42a90: 4a39 0005 ca85 tstb 5ca85 42a96: 6618 bnes 42ab0 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 42a98: 4a39 0005 c4ec tstb 5c4ec 42a9e: 6710 beqs 42ab0 ) { memset( heap_begin, 0, heap_size ); 42aa0: 2f02 movel %d2,%sp@- 42aa2: 42a7 clrl %sp@- 42aa4: 2f03 movel %d3,%sp@- 42aa6: 4eb9 0004 d948 jsr 4d948 42aac: 4fef 000c lea %sp@(12),%sp * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 42ab0: 4a39 0005 ca85 tstb 5ca85 42ab6: 6626 bnes 42ade void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 42ab8: 4878 0004 pea 4 42abc: 2f02 movel %d2,%sp@- 42abe: 2f03 movel %d3,%sp@- 42ac0: 2f39 0005 c420 movel 5c420 ,%sp@- 42ac6: 4eb9 0004 65fc jsr 465fc <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 42acc: 4fef 0010 lea %sp@(16),%sp 42ad0: 4a80 tstl %d0 42ad2: 660a bnes 42ade <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 42ad4: 4878 001a pea 1a <== NOT EXECUTED 42ad8: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42ade: 2f39 0005 c420 movel 5c420 ,%sp@- 42ae4: 2439 0005 dad8 movel 5dad8 ,%d2 42aea: 4eb9 0004 70d8 jsr 470d8 <_Protected_heap_Get_size> printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42af0: 262e fffc movel %fp@(-4),%d3 if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42af4: d082 addl %d2,%d0 42af6: 588f addql #4,%sp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42af8: 242e fff8 movel %fp@(-8),%d2 42afc: 4e5e unlk %fp if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42afe: 23c0 0005 dad8 movel %d0,5dad8 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } ... =============================================================================== 00041d3e : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 41d3e: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 41d42: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 41d46: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 41d4a: 4a8a tstl %a2 <== NOT EXECUTED 41d4c: 6700 0100 beqw 41e4e <== NOT EXECUTED return; if ( !print_handler ) 41d50: 2879 0005 d890 moveal 5d890 ,%a4 <== NOT EXECUTED 41d56: 4a8c tstl %a4 <== NOT EXECUTED 41d58: 6700 00f4 beqw 41e4e <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 41d5c: 70ff moveq #-1,%d0 <== NOT EXECUTED 41d5e: b08a cmpl %a2,%d0 <== NOT EXECUTED 41d60: 6616 bnes 41d78 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 41d62: 4ab9 0005 e0ac tstl 5e0ac <== NOT EXECUTED 41d68: 6700 00e4 beqw 41e4e <== NOT EXECUTED 41d6c: 47f9 0005 e0a8 lea 5e0a8 ,%a3 <== NOT EXECUTED 41d72: 4284 clrl %d4 <== NOT EXECUTED 41d74: 95ca subal %a2,%a2 <== NOT EXECUTED 41d76: 6008 bras 41d80 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 41d78: 282a 00fc movel %a2@(252),%d4 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 41d7c: 47ea 00bc lea %a2@(188),%a3 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 41d80: 2613 movel %a3@,%d3 <== NOT EXECUTED 41d82: 0683 ffff fff0 addil #-16,%d3 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 41d88: 242b 0004 movel %a3@(4),%d2 <== NOT EXECUTED 41d8c: 0682 0000 0010 addil #16,%d2 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 41d92: 2f03 movel %d3,%sp@- <== NOT EXECUTED 41d94: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41d96: 4eb9 0004 1d0e jsr 41d0e <== NOT EXECUTED if ( high_water_mark ) 41d9c: 508f addql #8,%sp <== NOT EXECUTED 41d9e: 4a80 tstl %d0 <== NOT EXECUTED 41da0: 6604 bnes 41da6 <== NOT EXECUTED 41da2: 4282 clrl %d2 <== NOT EXECUTED 41da4: 6004 bras 41daa <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 41da6: d483 addl %d3,%d2 <== NOT EXECUTED 41da8: 9480 subl %d0,%d2 <== NOT EXECUTED else used = 0; if ( the_thread ) { 41daa: 4a8a tstl %a2 <== NOT EXECUTED 41dac: 672c beqs 41dda <== NOT EXECUTED (*print_handler)( 41dae: 486e fffb pea %fp@(-5) <== NOT EXECUTED 41db2: 4878 0005 pea 5 <== NOT EXECUTED 41db6: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 41dba: 4eb9 0004 5994 jsr 45994 <== NOT EXECUTED 41dc0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41dc2: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 41dc6: 4879 0005 b250 pea 5b250 <== NOT EXECUTED 41dcc: 2f39 0005 d88c movel 5d88c ,%sp@- <== NOT EXECUTED 41dd2: 4e94 jsr %a4@ <== NOT EXECUTED 41dd4: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 41dd8: 6016 bras 41df0 <== 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 ); 41dda: 4878 ffff pea ffffffff <== NOT EXECUTED 41dde: 4879 0005 b25d pea 5b25d <== NOT EXECUTED 41de4: 2f39 0005 d88c movel 5d88c ,%sp@- <== NOT EXECUTED 41dea: 4e94 jsr %a4@ <== NOT EXECUTED 41dec: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } (*print_handler)( 41df0: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED 41df4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 41df6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 41df8: 2013 movel %a3@,%d0 <== NOT EXECUTED 41dfa: 5380 subql #1,%d0 <== NOT EXECUTED 41dfc: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 41e00: 2f08 movel %a0,%sp@- <== NOT EXECUTED 41e02: 4879 0005 b26b pea 5b26b <== NOT EXECUTED 41e08: 2f39 0005 d88c movel 5d88c ,%sp@- <== NOT EXECUTED 41e0e: 2079 0005 d890 moveal 5d890 ,%a0 <== NOT EXECUTED 41e14: 4e90 jsr %a0@ <== NOT EXECUTED 41e16: 2079 0005 d890 moveal 5d890 ,%a0 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 41e1c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 41e20: 4ab9 0005 d888 tstl 5d888 <== NOT EXECUTED 41e26: 6612 bnes 41e3a <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 41e28: 4879 0005 b289 pea 5b289 <== NOT EXECUTED 41e2e: 2f39 0005 d88c movel 5d88c ,%sp@- <== NOT EXECUTED 41e34: 4e90 jsr %a0@ <== NOT EXECUTED 41e36: 508f addql #8,%sp <== NOT EXECUTED 41e38: 6014 bras 41e4e <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 41e3a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41e3c: 4879 0005 b296 pea 5b296 <== NOT EXECUTED 41e42: 2f39 0005 d88c movel 5d88c ,%sp@- <== NOT EXECUTED 41e48: 4e90 jsr %a0@ <== NOT EXECUTED 41e4a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 41e4e: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 41e54: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042066 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 42066: 4e56 0000 linkw %fp,#0 static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized) 4206a: 4ab9 0005 d888 tstl 5d888 42070: 6656 bnes 420c8 42072: 41f9 0005 e098 lea 5e098 ,%a0 42078: 4280 clrl %d0 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 4207a: 43f9 0005 b3ce lea 5b3ce ,%a1 42080: 7203 moveq #3,%d1 42082: c280 andl %d0,%d1 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 42084: 5280 addql #1,%d0 p[i] = pattern[ i%4 ]; 42086: 20f1 1c00 movel %a1@(00000000,%d1:l:4),%a0@+ /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 4208a: 7204 moveq #4,%d1 4208c: b280 cmpl %d0,%d1 4208e: 66f0 bnes 42080 /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 42090: 2039 0005 e220 movel 5e220 <_CPU_Interrupt_stack_low>,%d0 42096: 6728 beqs 420c0 <== NEVER TAKEN 42098: 2239 0005 e1c4 movel 5e1c4 <_CPU_Interrupt_stack_high>,%d1 4209e: 6720 beqs 420c0 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 420a0: 9280 subl %d0,%d1 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 420a2: 2f01 movel %d1,%sp@- 420a4: 4878 00a5 pea a5 * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 420a8: 23c0 0005 e0ac movel %d0,5e0ac Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 420ae: 2f00 movel %d0,%sp@- * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 420b0: 23c1 0005 e0a8 movel %d1,5e0a8 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 420b6: 4eb9 0004 de48 jsr 4de48 420bc: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 420c0: 7001 moveq #1,%d0 420c2: 23c0 0005 d888 movel %d0,5d888 } 420c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041d0e : * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 41d0e: 70fc moveq #-4,%d0 <== NOT EXECUTED */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 41d10: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 41d14: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 41d18: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 41d1c: c0ae 000c andl %fp@(12),%d0 <== NOT EXECUTED 41d20: d088 addl %a0,%d0 <== NOT EXECUTED 41d22: 6010 bras 41d34 <== NOT EXECUTED if (*base != U32_PATTERN) 41d24: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 41d2a: b290 cmpl %a0@,%d1 <== NOT EXECUTED 41d2c: 6704 beqs 41d32 <== NOT EXECUTED return (void *) base; 41d2e: 2008 movel %a0,%d0 <== NOT EXECUTED 41d30: 6008 bras 41d3a <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 41d32: 5888 addql #4,%a0 <== NOT EXECUTED 41d34: b088 cmpl %a0,%d0 <== NOT EXECUTED 41d36: 62ec bhis 41d24 <== NOT EXECUTED 41d38: 4280 clrl %d0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 41d3a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041ed2 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 41ed2: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 41ed6: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== 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"); 41eda: 4879 0005 b2fd pea 5b2fd <== NOT EXECUTED 41ee0: 45f9 0004 391c lea 4391c ,%a2 <== NOT EXECUTED * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 41ee6: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED 41eea: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 41eee: 286b 00c0 moveal %a3@(192),%a4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 41ef2: 4e92 jsr %a2@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 41ef4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 41ef6: 4879 0005 b30d pea 5b30d <== NOT EXECUTED 41efc: 4e92 jsr %a2@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 41efe: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 41f02: 4879 0005 b32a pea 5b32a <== NOT EXECUTED 41f08: 4e92 jsr %a2@ <== NOT EXECUTED printk( 41f0a: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 41f0e: 4879 0005 b33c pea 5b33c <== NOT EXECUTED 41f14: 4e92 jsr %a2@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 41f16: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 41f1a: 4878 0020 pea 20 <== NOT EXECUTED 41f1e: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 41f22: 4eb9 0004 5994 jsr 45994 <== NOT EXECUTED 41f28: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 41f2c: 2e80 movel %d0,%sp@ <== NOT EXECUTED 41f2e: 4879 0005 b350 pea 5b350 <== NOT EXECUTED 41f34: 4e92 jsr %a2@ <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 41f36: 202b 00bc movel %a3@(188),%d0 <== NOT EXECUTED 41f3a: 206b 00c0 moveal %a3@(192),%a0 <== NOT EXECUTED 41f3e: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 41f42: 2f08 movel %a0,%sp@- <== NOT EXECUTED 41f44: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41f46: 4879 0005 b366 pea 5b366 <== NOT EXECUTED 41f4c: 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) { 41f4e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 41f52: 4a02 tstb %d2 <== NOT EXECUTED 41f54: 6618 bnes 41f6e <== NOT EXECUTED printk( 41f56: 486c 0018 pea %a4@(24) <== NOT EXECUTED 41f5a: 486c 0008 pea %a4@(8) <== NOT EXECUTED 41f5e: 4878 0010 pea 10 <== NOT EXECUTED 41f62: 4879 0005 b397 pea 5b397 <== NOT EXECUTED 41f68: 4e92 jsr %a2@ <== NOT EXECUTED 41f6a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 41f6e: 4878 0081 pea 81 <== NOT EXECUTED 41f72: 4eb9 0004 6210 jsr 46210 <== NOT EXECUTED =============================================================================== 000460d0 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 460d0: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 460d4: 2039 0005 dc1c movel 5dc1c <_Thread_Dispatch_disable_level>,%d0 460da: 5280 addql #1,%d0 460dc: 206e 0008 moveal %fp@(8),%a0 460e0: 23c0 0005 dc1c movel %d0,5dc1c <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 460e6: 42a7 clrl %sp@- 460e8: 2f28 0008 movel %a0@(8),%sp@- 460ec: 4868 0010 pea %a0@(16) 460f0: 4eb9 0004 6358 jsr 46358 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 460f6: 4fef 000c lea %sp@(12),%sp } 460fa: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 460fc: 4ef9 0004 7632 jmp 47632 <_Thread_Enable_dispatch> ... =============================================================================== 0004ad78 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4ad78: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4ad7e: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4ad82: 2279 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4ad88: 48d7 001c moveml %d2-%d4,%sp@ 4ad8c: 242e 000c movel %fp@(12),%d2 4ad90: 262e 0014 movel %fp@(20),%d3 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4ad94: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4ad98: 206e 0008 moveal %fp@(8),%a0 4ad9c: 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 ); 4ada0: 40c1 movew %sr,%d1 4ada2: 8081 orl %d1,%d0 4ada4: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4ada6: 2028 0048 movel %a0@(72),%d0 4adaa: 5280 addql #1,%d0 4adac: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4adb0: 4aa8 0040 tstl %a0@(64) 4adb4: 6626 bnes 4addc <_CORE_barrier_Wait+0x64> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 4adb6: b0a8 0044 cmpl %a0@(68),%d0 4adba: 6620 bnes 4addc <_CORE_barrier_Wait+0x64> executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4adbc: 7001 moveq #1,%d0 4adbe: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4adc2: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4adc4: 2d44 0010 movel %d4,%fp@(16) 4adc8: 2d42 000c movel %d2,%fp@(12) 4adcc: 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 ); } 4add0: 4cd7 001c moveml %sp@,%d2-%d4 4add4: 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 ); 4add6: 4ef9 0004 ad44 jmp 4ad44 <_CORE_barrier_Release> 4addc: 7001 moveq #1,%d0 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; 4adde: 2342 0020 movel %d2,%a1@(32) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4ade2: 2348 0044 movel %a0,%a1@(68) 4ade6: 2140 0030 movel %d0,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4adea: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4adec: 2d43 000c movel %d3,%fp@(12) 4adf0: 203c 0004 7d90 movel #294288,%d0 4adf6: 2d48 0008 movel %a0,%fp@(8) 4adfa: 2d40 0010 movel %d0,%fp@(16) } 4adfe: 4cd7 001c moveml %sp@,%d2-%d4 4ae02: 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 ); 4ae04: 4ef9 0004 7aa4 jmp 47aa4 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 000528e4 <_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 ) { 528e4: 4e56 ffe0 linkw %fp,#-32 528e8: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 528ec: 246e 0008 moveal %fp@(8),%a2 528f0: 2a2e 000c movel %fp@(12),%d5 528f4: 262e 0010 movel %fp@(16),%d3 528f8: 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 ) { 528fc: b6aa 004c cmpl %a2@(76),%d3 52900: 6304 blss 52906 <_CORE_message_queue_Broadcast+0x22><== ALWAYS TAKEN 52902: 7001 moveq #1,%d0 <== NOT EXECUTED 52904: 6042 bras 52948 <_CORE_message_queue_Broadcast+0x64><== NOT EXECUTED * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 52906: 4aaa 0048 tstl %a2@(72) 5290a: 6610 bnes 5291c <_CORE_message_queue_Broadcast+0x38> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 5290c: 4282 clrl %d2 5290e: 283c 0005 4b58 movel #346968,%d4 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 52914: 4bf9 0005 a8e0 lea 5a8e0 ,%a5 5291a: 601a bras 52936 <_CORE_message_queue_Broadcast+0x52> * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 5291c: 4294 clrl %a4@ 5291e: 6026 bras 52946 <_CORE_message_queue_Broadcast+0x62> 52920: 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; 52922: 5282 addql #1,%d2 52924: 2f05 movel %d5,%sp@- 52926: 2f2b 002c movel %a3@(44),%sp@- 5292a: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 5292c: 206b 0028 moveal %a3@(40),%a0 52930: 4fef 000c lea %sp@(12),%sp 52934: 2083 movel %d3,%a0@ * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 52936: 2f0a movel %a2,%sp@- 52938: 2044 moveal %d4,%a0 5293a: 4e90 jsr %a0@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5293c: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 5293e: 2640 moveal %d0,%a3 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 52940: 4a80 tstl %d0 52942: 66dc bnes 52920 <_CORE_message_queue_Broadcast+0x3c> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 52944: 2882 movel %d2,%a4@ 52946: 4280 clrl %d0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 52948: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 5294e: 4e5e unlk %fp ... =============================================================================== 0004e2e0 <_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)) { 4e2e0: 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 ) { 4e2e2: 4e56 fff4 linkw %fp,#-12 4e2e6: 222e 0014 movel %fp@(20),%d1 4e2ea: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4e2ee: 246e 0008 moveal %fp@(8),%a2 4e2f2: 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)) { 4e2f6: c081 andl %d1,%d0 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4e2f8: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4e2fc: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4e300: 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)) { 4e304: 4a80 tstl %d0 4e306: 6604 bnes 4e30c <_CORE_message_queue_Initialize+0x2c> 4e308: 2001 movel %d1,%d0 4e30a: 600c bras 4e318 <_CORE_message_queue_Initialize+0x38> allocated_message_size += sizeof(uint32_t); 4e30c: 2001 movel %d1,%d0 4e30e: 5880 addql #4,%d0 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4e310: 76fc moveq #-4,%d3 4e312: c083 andl %d3,%d0 } if (allocated_message_size < maximum_message_size) 4e314: b280 cmpl %d0,%d1 4e316: 626e bhis 4e386 <_CORE_message_queue_Initialize+0xa6><== NEVER TAKEN /* * 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)); 4e318: 2600 movel %d0,%d3 4e31a: 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 * 4e320: 2203 movel %d3,%d1 4e322: 4c02 1800 mulsl %d2,%d1 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4e326: b081 cmpl %d1,%d0 4e328: 625c bhis 4e386 <_CORE_message_queue_Initialize+0xa6><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4e32a: 2f01 movel %d1,%sp@- 4e32c: 4eb9 0005 0bc8 jsr 50bc8 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4e332: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4e334: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4e338: 674c beqs 4e386 <_CORE_message_queue_Initialize+0xa6> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4e33a: 2f03 movel %d3,%sp@- 4e33c: 2f02 movel %d2,%sp@- 4e33e: 2f00 movel %d0,%sp@- 4e340: 486a 0060 pea %a2@(96) 4e344: 4eb9 0005 3118 jsr 53118 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4e34a: 4878 0006 pea 6 4e34e: 7001 moveq #1,%d0 4e350: 206e 000c moveal %fp@(12),%a0 4e354: b090 cmpl %a0@,%d0 4e356: 57c0 seq %d0 4e358: 4878 0080 pea 80 4e35c: 49c0 extbl %d0 4e35e: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4e360: 41ea 0054 lea %a2@(84),%a0 4e364: 2f00 movel %d0,%sp@- 4e366: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4e36a: 41ea 0050 lea %a2@(80),%a0 4e36e: 2548 0058 movel %a0,%a2@(88) 4e372: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4e374: 42aa 0054 clrl %a2@(84) 4e378: 4eb9 0005 0110 jsr 50110 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4e37e: 4fef 0020 lea %sp@(32),%sp allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4e382: 7001 moveq #1,%d0 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4e384: 6002 bras 4e388 <_CORE_message_queue_Initialize+0xa8> 4e386: 4200 clrb %d0 } 4e388: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4e38e: 4e5e unlk %fp ... =============================================================================== 0004e394 <_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 ); 4e394: 223c 0000 0700 movel #1792,%d1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4e39a: 4e56 ffe0 linkw %fp,#-32 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4e39e: 2079 0006 69ae moveal 669ae <_Thread_Executing>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4e3a4: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4e3a8: 282e 000c movel %fp@(12),%d4 4e3ac: 262e 001c movel %fp@(28),%d3 4e3b0: 246e 0008 moveal %fp@(8),%a2 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; 4e3b4: 42a8 0034 clrl %a0@(52) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4e3b8: 242e 0010 movel %fp@(16),%d2 4e3bc: 226e 0014 moveal %fp@(20),%a1 4e3c0: 1a2e 001b moveb %fp@(27),%d5 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 ); 4e3c4: 40c0 movew %sr,%d0 4e3c6: 8280 orl %d0,%d1 4e3c8: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4e3ca: 220a movel %a2,%d1 4e3cc: 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)); 4e3d2: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4e3d6: b28b cmpl %a3,%d1 4e3d8: 6752 beqs 4e42c <_CORE_message_queue_Seize+0x98> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4e3da: 2853 moveal %a3@,%a4 the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 4e3dc: 4bea 0050 lea %a2@(80),%a5 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 4e3e0: 254c 0050 movel %a4,%a2@(80) new_first->previous = _Chain_Head(the_chain); 4e3e4: 294d 0004 movel %a5,%a4@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 4e3e8: 4a8b tstl %a3 4e3ea: 6740 beqs 4e42c <_CORE_message_queue_Seize+0x98> <== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 4e3ec: 53aa 0048 subql #1,%a2@(72) _ISR_Enable( level ); 4e3f0: 46c0 movew %d0,%sr *size_p = the_message->Contents.size; 4e3f2: 22ab 0008 movel %a3@(8),%a1@ _Thread_Executing->Wait.count = 4e3f6: 2079 0006 69ae moveal 669ae <_Thread_Executing>,%a0 4e3fc: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4e400: 2f11 movel %a1@,%sp@- 4e402: 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 ); 4e406: 45ea 0060 lea %a2@(96),%a2 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4e40a: 2f02 movel %d2,%sp@- 4e40c: 4eb9 0005 5b68 jsr 55b68 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 ); 4e412: 4fef 000c lea %sp@(12),%sp 4e416: 2d4a 0008 movel %a2,%fp@(8) 4e41a: 2d4b 000c movel %a3,%fp@(12) 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 ); } 4e41e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4e424: 4e5e unlk %fp 4e426: 4ef9 0004 e21c jmp 4e21c <_Chain_Append> return; } #endif } if ( !wait ) { 4e42c: 4a05 tstb %d5 4e42e: 6612 bnes 4e442 <_CORE_message_queue_Seize+0xae> _ISR_Enable( level ); 4e430: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4e432: 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 ); } 4e434: 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; 4e43a: 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 ); } 4e43e: 4e5e unlk %fp 4e440: 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; 4e442: 7201 moveq #1,%d1 4e444: 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; executing->Wait.return_argument = size_p; 4e448: 2149 0028 movel %a1,%a0@(40) } _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; 4e44c: 2142 002c movel %d2,%a0@(44) return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 4e450: 2144 0020 movel %d4,%a0@(32) 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; 4e454: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; 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 ); 4e458: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4e45a: 4bf9 0005 01cc lea 501cc <_Thread_queue_Timeout>,%a5 4e460: 2d43 000c movel %d3,%fp@(12) 4e464: 2d4d 0010 movel %a5,%fp@(16) 4e468: 2d4a 0008 movel %a2,%fp@(8) } 4e46c: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4e472: 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 ); 4e474: 4ef9 0004 fee0 jmp 4fee0 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 000462b0 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 462b0: 4e56 0000 linkw %fp,#0 462b4: 202e 0010 movel %fp@(16),%d0 462b8: 2f0a movel %a2,%sp@- 462ba: 246e 0008 moveal %fp@(8),%a2 462be: 2f02 movel %d2,%sp@- _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 462c0: 2239 0005 dc1c movel 5dc1c <_Thread_Dispatch_disable_level>,%d1 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 462c6: 1400 moveb %d0,%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 462c8: 4a81 tstl %d1 462ca: 671c beqs 462e8 <_CORE_mutex_Seize+0x38> 462cc: 4a00 tstb %d0 462ce: 6718 beqs 462e8 <_CORE_mutex_Seize+0x38> <== NEVER TAKEN 462d0: 7001 moveq #1,%d0 462d2: b0b9 0005 dd9e cmpl 5dd9e <_System_state_Current>,%d0 462d8: 640e bccs 462e8 <_CORE_mutex_Seize+0x38> 462da: 4878 0013 pea 13 462de: 42a7 clrl %sp@- 462e0: 42a7 clrl %sp@- 462e2: 4eb9 0004 68d4 jsr 468d4 <_Internal_error_Occurred> 462e8: 486e 0018 pea %fp@(24) 462ec: 2f0a movel %a2,%sp@- 462ee: 4eb9 0004 ae0c jsr 4ae0c <_CORE_mutex_Seize_interrupt_trylock> 462f4: 508f addql #8,%sp 462f6: 4a80 tstl %d0 462f8: 6750 beqs 4634a <_CORE_mutex_Seize+0x9a> 462fa: 4a02 tstb %d2 462fc: 6614 bnes 46312 <_CORE_mutex_Seize+0x62> 462fe: 202e 0018 movel %fp@(24),%d0 46302: 46c0 movew %d0,%sr 46304: 2079 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a0 4630a: 7001 moveq #1,%d0 4630c: 2140 0034 movel %d0,%a0@(52) 46310: 6038 bras 4634a <_CORE_mutex_Seize+0x9a> 46312: 2039 0005 dc1c movel 5dc1c <_Thread_Dispatch_disable_level>,%d0 46318: 5280 addql #1,%d0 4631a: 2079 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a0 46320: 216e 000c 0020 movel %fp@(12),%a0@(32) 46326: 23c0 0005 dc1c movel %d0,5dc1c <_Thread_Dispatch_disable_level> 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; 4632c: 7001 moveq #1,%d0 4632e: 214a 0044 movel %a2,%a0@(68) 46332: 2540 0030 movel %d0,%a2@(48) 46336: 202e 0018 movel %fp@(24),%d0 4633a: 46c0 movew %d0,%sr 4633c: 2f2e 0014 movel %fp@(20),%sp@- 46340: 2f0a movel %a2,%sp@- 46342: 4eb9 0004 624c jsr 4624c <_CORE_mutex_Seize_interrupt_blocking> 46348: 508f addql #8,%sp } 4634a: 242e fff8 movel %fp@(-8),%d2 4634e: 246e fffc moveal %fp@(-4),%a2 46352: 4e5e unlk %fp ... =============================================================================== 0004ae0c <_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 ) { 4ae0c: 4e56 0000 linkw %fp,#0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4ae10: 2279 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a1 4ae16: 2f0b movel %a3,%sp@- 4ae18: 206e 0008 moveal %fp@(8),%a0 4ae1c: 2f0a movel %a2,%sp@- 4ae1e: 246e 000c moveal %fp@(12),%a2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4ae22: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4ae26: 4aa8 004e tstl %a0@(78) 4ae2a: 6700 0098 beqw 4aec4 <_CORE_mutex_Seize_interrupt_trylock+0xb8> the_mutex->lock = CORE_MUTEX_LOCKED; 4ae2e: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4ae32: 7201 moveq #1,%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; 4ae34: 2169 0008 005e movel %a1@(8),%a0@(94) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4ae3a: 2028 0046 movel %a0@(70),%d0 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; the_mutex->nest_count = 1; 4ae3e: 2141 0052 movel %d1,%a0@(82) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4ae42: 123c 0002 moveb #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; 4ae46: 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 ) || 4ae4a: b280 cmpl %d0,%d1 4ae4c: 6708 beqs 4ae56 <_CORE_mutex_Seize_interrupt_trylock+0x4a> 4ae4e: 123c 0003 moveb #3,%d1 4ae52: b280 cmpl %d0,%d1 4ae54: 660a bnes 4ae60 <_CORE_mutex_Seize_interrupt_trylock+0x54> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4ae56: 52a9 001c addql #1,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4ae5a: 7203 moveq #3,%d1 4ae5c: b280 cmpl %d0,%d1 4ae5e: 6706 beqs 4ae66 <_CORE_mutex_Seize_interrupt_trylock+0x5a> _ISR_Enable( *level_p ); 4ae60: 2012 movel %a2@,%d0 4ae62: 46c0 movew %d0,%sr 4ae64: 607c bras 4aee2 <_CORE_mutex_Seize_interrupt_trylock+0xd6> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4ae66: 2028 004a movel %a0@(74),%d0 current = executing->current_priority; 4ae6a: 2229 0014 movel %a1@(20),%d1 if ( current == ceiling ) { 4ae6e: b081 cmpl %d1,%d0 4ae70: 6606 bnes 4ae78 <_CORE_mutex_Seize_interrupt_trylock+0x6c> _ISR_Enable( *level_p ); 4ae72: 2012 movel %a2@,%d0 4ae74: 46c0 movew %d0,%sr 4ae76: 606a bras 4aee2 <_CORE_mutex_Seize_interrupt_trylock+0xd6> return 0; } if ( current > ceiling ) { 4ae78: b081 cmpl %d1,%d0 4ae7a: 642e bccs 4aeaa <_CORE_mutex_Seize_interrupt_trylock+0x9e> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4ae7c: 2039 0005 dc1c movel 5dc1c <_Thread_Dispatch_disable_level>,%d0 4ae82: 5280 addql #1,%d0 4ae84: 23c0 0005 dc1c movel %d0,5dc1c <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4ae8a: 2012 movel %a2@,%d0 4ae8c: 46c0 movew %d0,%sr _Thread_Change_priority( 4ae8e: 42a7 clrl %sp@- 4ae90: 2f28 004a movel %a0@(74),%sp@- 4ae94: 2f28 005a movel %a0@(90),%sp@- 4ae98: 4eb9 0004 7138 jsr 47138 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4ae9e: 4eb9 0004 7632 jsr 47632 <_Thread_Enable_dispatch> 4aea4: 4fef 000c lea %sp@(12),%sp 4aea8: 6038 bras 4aee2 <_CORE_mutex_Seize_interrupt_trylock+0xd6> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4aeaa: 7006 moveq #6,%d0 the_mutex->lock = CORE_MUTEX_UNLOCKED; 4aeac: 7201 moveq #1,%d1 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4aeae: 2340 0034 movel %d0,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4aeb2: 42a8 0052 clrl %a0@(82) _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 4aeb6: 2141 004e movel %d1,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4aeba: 53a9 001c subql #1,%a1@(28) _ISR_Enable( *level_p ); 4aebe: 2012 movel %a2@,%d0 4aec0: 46c0 movew %d0,%sr 4aec2: 601e bras 4aee2 <_CORE_mutex_Seize_interrupt_trylock+0xd6> /* * 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 ) ) { 4aec4: 2668 005a moveal %a0@(90),%a3 4aec8: b3cb cmpal %a3,%a1 4aeca: 6626 bnes 4aef2 <_CORE_mutex_Seize_interrupt_trylock+0xe6> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4aecc: 2028 0040 movel %a0@(64),%d0 4aed0: 6708 beqs 4aeda <_CORE_mutex_Seize_interrupt_trylock+0xce> 4aed2: 7201 moveq #1,%d1 4aed4: b280 cmpl %d0,%d1 4aed6: 661a bnes 4aef2 <_CORE_mutex_Seize_interrupt_trylock+0xe6><== ALWAYS TAKEN 4aed8: 600c bras 4aee6 <_CORE_mutex_Seize_interrupt_trylock+0xda><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4aeda: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 4aede: 2012 movel %a2@,%d0 4aee0: 46c0 movew %d0,%sr 4aee2: 4280 clrl %d0 4aee4: 600e bras 4aef4 <_CORE_mutex_Seize_interrupt_trylock+0xe8> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4aee6: 7002 moveq #2,%d0 <== NOT EXECUTED 4aee8: 2740 0034 movel %d0,%a3@(52) <== NOT EXECUTED _ISR_Enable( *level_p ); 4aeec: 2012 movel %a2@,%d0 <== NOT EXECUTED 4aeee: 46c0 movew %d0,%sr <== NOT EXECUTED 4aef0: 60f0 bras 4aee2 <_CORE_mutex_Seize_interrupt_trylock+0xd6><== NOT EXECUTED 4aef2: 7001 moveq #1,%d0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4aef4: 246e fff8 moveal %fp@(-8),%a2 4aef8: 266e fffc moveal %fp@(-4),%a3 4aefc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000464a4 <_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 ) { 464a4: 4e56 0000 linkw %fp,#0 464a8: 2f0a movel %a2,%sp@- 464aa: 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)) ) { 464ae: 2f0a movel %a2,%sp@- 464b0: 4eb9 0004 7964 jsr 47964 <_Thread_queue_Dequeue> 464b6: 588f addql #4,%sp 464b8: 4a80 tstl %d0 464ba: 6704 beqs 464c0 <_CORE_semaphore_Surrender+0x1c> 464bc: 4280 clrl %d0 464be: 6024 bras 464e4 <_CORE_semaphore_Surrender+0x40> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 464c0: 203c 0000 0700 movel #1792,%d0 464c6: 40c1 movew %sr,%d1 464c8: 8081 orl %d1,%d0 464ca: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 464cc: 202a 0048 movel %a2@(72),%d0 464d0: b0aa 0040 cmpl %a2@(64),%d0 464d4: 6504 bcss 464da <_CORE_semaphore_Surrender+0x36> <== ALWAYS TAKEN 464d6: 7004 moveq #4,%d0 <== NOT EXECUTED 464d8: 6008 bras 464e2 <_CORE_semaphore_Surrender+0x3e> <== NOT EXECUTED the_semaphore->count += 1; 464da: 5280 addql #1,%d0 464dc: 2540 0048 movel %d0,%a2@(72) 464e0: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 464e2: 46c1 movew %d1,%sr } return status; } 464e4: 246e fffc moveal %fp@(-4),%a2 464e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045268 <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 45268: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 4526e: 4e56 ffec linkw %fp,#-20 45272: 226e 0010 moveal %fp@(16),%a1 45276: 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; 4527a: 2479 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 45280: 242e 0008 movel %fp@(8),%d2 45284: 262e 000c movel %fp@(12),%d3 ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; 45288: 42aa 0034 clrl %a2@(52) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 4528c: 206e 0014 moveal %fp@(20),%a0 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 45290: 266a 0108 moveal %a2@(264),%a3 _ISR_Disable( level ); 45294: 40c1 movew %sr,%d1 45296: 8081 orl %d1,%d0 45298: 46c0 movew %d0,%sr pending_events = api->pending_events; 4529a: 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 ); 4529c: 2002 movel %d2,%d0 4529e: c084 andl %d4,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 452a0: 6716 beqs 452b8 <_Event_Seize+0x50> 452a2: b480 cmpl %d0,%d2 452a4: 6706 beqs 452ac <_Event_Seize+0x44> 452a6: 0803 0001 btst #1,%d3 452aa: 670c beqs 452b8 <_Event_Seize+0x50> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 452ac: 2400 movel %d0,%d2 452ae: 4682 notl %d2 452b0: c484 andl %d4,%d2 452b2: 2682 movel %d2,%a3@ _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 452b4: 46c1 movew %d1,%sr 452b6: 600e bras 452c6 <_Event_Seize+0x5e> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 452b8: 0803 0000 btst #0,%d3 452bc: 670e beqs 452cc <_Event_Seize+0x64> _ISR_Enable( level ); 452be: 46c1 movew %d1,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 452c0: 720d moveq #13,%d1 452c2: 2541 0034 movel %d1,%a2@(52) *event_out = seized_events; 452c6: 2080 movel %d0,%a0@ return; 452c8: 6000 0096 braw 45360 <_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; 452cc: 2542 0024 movel %d2,%a2@(36) executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 452d0: 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; 452d2: 2543 0030 movel %d3,%a2@(48) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; 452d6: 2548 0028 movel %a0,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 452da: 23c2 0005 de26 movel %d2,5de26 <_Event_Sync_state> _ISR_Enable( level ); 452e0: 46c1 movew %d1,%sr if ( ticks ) { 452e2: 4a89 tstl %a1 452e4: 6730 beqs 45316 <_Event_Seize+0xae> _Watchdog_Initialize( 452e6: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 452ea: 223c 0004 54c8 movel #283848,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 452f0: 2549 0054 movel %a1,%a2@(84) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 452f4: 2541 0064 movel %d1,%a2@(100) the_watchdog->id = id; 452f8: 2540 0068 movel %d0,%a2@(104) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 452fc: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 45300: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 45304: 486a 0048 pea %a2@(72) 45308: 4879 0005 dcf4 pea 5dcf4 <_Watchdog_Ticks_chain> 4530e: 4eb9 0004 8544 jsr 48544 <_Watchdog_Insert> 45314: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 45316: 4878 0100 pea 100 4531a: 2f0a movel %a2,%sp@- 4531c: 4eb9 0004 7e38 jsr 47e38 <_Thread_Set_state> _ISR_Disable( level ); 45322: 203c 0000 0700 movel #1792,%d0 45328: 40c1 movew %sr,%d1 4532a: 8081 orl %d1,%d0 4532c: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4532e: 7401 moveq #1,%d2 45330: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 45332: 2039 0005 de26 movel 5de26 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 45338: 42b9 0005 de26 clrl 5de26 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4533e: b480 cmpl %d0,%d2 45340: 6604 bnes 45346 <_Event_Seize+0xde> _ISR_Enable( level ); 45342: 46c1 movew %d1,%sr 45344: 601a bras 45360 <_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 ); 45346: 2d4a 000c movel %a2,%fp@(12) 4534a: 2d41 0010 movel %d1,%fp@(16) } 4534e: 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 ); 45354: 2d40 0008 movel %d0,%fp@(8) } 45358: 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 ); 4535a: 4ef9 0004 70e8 jmp 470e8 <_Thread_blocking_operation_Cancel> } 45360: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 45366: 4e5e unlk %fp ... =============================================================================== 000453c0 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 453c0: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 453c6: 4e56 ffe8 linkw %fp,#-24 453ca: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 453ce: 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 ]; 453d2: 206a 0108 moveal %a2@(264),%a0 option_set = (rtems_option) the_thread->Wait.option; 453d6: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 453da: 40c1 movew %sr,%d1 453dc: 8081 orl %d1,%d0 453de: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 453e0: 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 ); 453e4: 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; 453e6: 2410 movel %a0@,%d2 453e8: 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 ) ) { 453ea: 6606 bnes 453f2 <_Event_Surrender+0x32> _ISR_Enable( level ); 453ec: 46c1 movew %d1,%sr return; 453ee: 6000 00cc braw 454bc <_Event_Surrender+0xfc> /* * 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() && 453f2: 2279 0005 dcb6 moveal 5dcb6 <_ISR_Nest_level>,%a1 453f8: 4a89 tstl %a1 453fa: 674a beqs 45446 <_Event_Surrender+0x86> 453fc: b5f9 0005 dcd6 cmpal 5dcd6 <_Thread_Executing>,%a2 45402: 6642 bnes 45446 <_Event_Surrender+0x86> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 45404: 2279 0005 de26 moveal 5de26 <_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() && 4540a: 7a02 moveq #2,%d5 4540c: ba89 cmpl %a1,%d5 4540e: 670e beqs 4541e <_Event_Surrender+0x5e> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 45410: 2279 0005 de26 moveal 5de26 <_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() && 45416: 1a3c 0001 moveb #1,%d5 4541a: ba89 cmpl %a1,%d5 4541c: 6628 bnes 45446 <_Event_Surrender+0x86> _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) ) { 4541e: b680 cmpl %d0,%d3 45420: 6706 beqs 45428 <_Event_Surrender+0x68> 45422: 0804 0001 btst #1,%d4 45426: 671a beqs 45442 <_Event_Surrender+0x82> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 45428: 2600 movel %d0,%d3 4542a: 4683 notl %d3 4542c: c682 andl %d2,%d3 4542e: 2083 movel %d3,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45430: 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; 45434: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45438: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 4543a: 7003 moveq #3,%d0 4543c: 23c0 0005 de26 movel %d0,5de26 <_Event_Sync_state> } _ISR_Enable( level ); 45442: 46c1 movew %d1,%sr return; 45444: 6076 bras 454bc <_Event_Surrender+0xfc> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 45446: 2a2a 0010 movel %a2@(16),%d5 4544a: 0285 0000 0100 andil #256,%d5 45450: 6768 beqs 454ba <_Event_Surrender+0xfa> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 45452: b680 cmpl %d0,%d3 45454: 6706 beqs 4545c <_Event_Surrender+0x9c> 45456: 0804 0001 btst #1,%d4 4545a: 675e beqs 454ba <_Event_Surrender+0xfa> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 4545c: 2600 movel %d0,%d3 4545e: 4683 notl %d3 45460: c682 andl %d2,%d3 45462: 2083 movel %d3,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45464: 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; 45468: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4546c: 2080 movel %d0,%a0@ _ISR_Flash( level ); 4546e: 203c 0000 0700 movel #1792,%d0 45474: 46c1 movew %d1,%sr 45476: 8081 orl %d1,%d0 45478: 46c0 movew %d0,%sr 4547a: 47f9 0004 7278 lea 47278 <_Thread_Clear_state>,%a3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 45480: 7a02 moveq #2,%d5 45482: baaa 0050 cmpl %a2@(80),%d5 45486: 6710 beqs 45498 <_Event_Surrender+0xd8> _ISR_Enable( level ); 45488: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4548a: 2f3c 1003 fff8 movel #268697592,%sp@- 45490: 2f0a movel %a2,%sp@- 45492: 4e93 jsr %a3@ 45494: 508f addql #8,%sp 45496: 6024 bras 454bc <_Event_Surrender+0xfc> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 45498: 7003 moveq #3,%d0 4549a: 2540 0050 movel %d0,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4549e: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 454a0: 486a 0048 pea %a2@(72) 454a4: 4eb9 0004 8660 jsr 48660 <_Watchdog_Remove> 454aa: 2f3c 1003 fff8 movel #268697592,%sp@- 454b0: 2f0a movel %a2,%sp@- 454b2: 4e93 jsr %a3@ 454b4: 4fef 000c lea %sp@(12),%sp 454b8: 6002 bras 454bc <_Event_Surrender+0xfc> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 454ba: 46c1 movew %d1,%sr } 454bc: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 454c2: 4e5e unlk %fp ... =============================================================================== 000454c8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 454c8: 4e56 fffc linkw %fp,#-4 454cc: 2f03 movel %d3,%sp@- 454ce: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 454d0: 486e fffc pea %fp@(-4) 454d4: 2f2e 0008 movel %fp@(8),%sp@- 454d8: 4eb9 0004 7658 jsr 47658 <_Thread_Get> switch ( location ) { 454de: 508f addql #8,%sp 454e0: 4aae fffc tstl %fp@(-4) 454e4: 6656 bnes 4553c <_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 ); 454e6: 223c 0000 0700 movel #1792,%d1 454ec: 40c2 movew %sr,%d2 454ee: 8282 orl %d2,%d1 454f0: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 454f2: 2040 moveal %d0,%a0 454f4: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 454f8: b0b9 0005 dcd6 cmpl 5dcd6 <_Thread_Executing>,%d0 454fe: 6614 bnes 45514 <_Event_Timeout+0x4c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 45500: 2239 0005 de26 movel 5de26 <_Event_Sync_state>,%d1 45506: 7601 moveq #1,%d3 45508: b681 cmpl %d1,%d3 4550a: 6608 bnes 45514 <_Event_Timeout+0x4c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4550c: 7202 moveq #2,%d1 4550e: 23c1 0005 de26 movel %d1,5de26 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45514: 7606 moveq #6,%d3 45516: 2040 moveal %d0,%a0 45518: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 4551c: 46c2 movew %d2,%sr 4551e: 2f3c 1003 fff8 movel #268697592,%sp@- 45524: 2f00 movel %d0,%sp@- 45526: 4eb9 0004 7278 jsr 47278 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4552c: 508f addql #8,%sp 4552e: 2039 0005 dc1c movel 5dc1c <_Thread_Dispatch_disable_level>,%d0 45534: 5380 subql #1,%d0 45536: 23c0 0005 dc1c movel %d0,5dc1c <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 4553c: 242e fff4 movel %fp@(-12),%d2 45540: 262e fff8 movel %fp@(-8),%d3 45544: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004af6c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4af6c: 4e56 ffc8 linkw %fp,#-56 4af70: 202e 000c movel %fp@(12),%d0 4af74: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4af78: 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 - HEAP_BLOCK_SIZE_OFFSET; 4af7c: 2840 moveal %d0,%a4 4af7e: 588c addql #4,%a4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4af80: 222e 0010 movel %fp@(16),%d1 4af84: 2a2e 0014 movel %fp@(20),%d5 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4af88: 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; 4af8c: 2e2a 0010 movel %a2@(16),%d7 uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4af90: b08c cmpl %a4,%d0 4af92: 6200 0120 bhiw 4b0b4 <_Heap_Allocate_aligned_with_boundary+0x148> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4af96: 4a85 tstl %d5 4af98: 670c beqs 4afa6 <_Heap_Allocate_aligned_with_boundary+0x3a> if ( boundary < alloc_size ) { 4af9a: b085 cmpl %d5,%d0 4af9c: 6200 0116 bhiw 4b0b4 <_Heap_Allocate_aligned_with_boundary+0x148> return NULL; } if ( alignment == 0 ) { 4afa0: 4a81 tstl %d1 4afa2: 6602 bnes 4afa6 <_Heap_Allocate_aligned_with_boundary+0x3a> 4afa4: 2207 movel %d7,%d1 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; 4afa6: 2407 movel %d7,%d2 4afa8: 5e82 addql #7,%d2 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4afaa: 4283 clrl %d3 4afac: 2a43 moveal %d3,%a5 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; 4afae: 2d42 fff8 movel %d2,%fp@(-8) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4afb2: 7404 moveq #4,%d2 4afb4: 9480 subl %d0,%d2 4afb6: 2d42 fff4 movel %d2,%fp@(-12) 4afba: 6000 00c6 braw 4b082 <_Heap_Allocate_aligned_with_boundary+0x116> /* * 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 ) { 4afbe: 2628 0004 movel %a0@(4),%d3 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4afc2: 528d addql #1,%a5 /* * 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 ) { 4afc4: b9c3 cmpal %d3,%a4 4afc6: 6400 00b6 bccw 4b07e <_Heap_Allocate_aligned_with_boundary+0x112> 4afca: 43e8 0008 lea %a0@(8),%a1 if ( alignment == 0 ) { 4afce: 4a81 tstl %d1 4afd0: 6606 bnes 4afd8 <_Heap_Allocate_aligned_with_boundary+0x6c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4afd2: 2409 movel %a1,%d2 4afd4: 6000 00a4 braw 4b07a <_Heap_Allocate_aligned_with_boundary+0x10e> 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; 4afd8: 74fe moveq #-2,%d2 4afda: c682 andl %d2,%d3 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4afdc: 266a 0014 moveal %a2@(20),%a3 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; 4afe0: d688 addl %a0,%d3 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; 4afe2: 282e fff8 movel %fp@(-8),%d4 4afe6: 988b subl %a3,%d4 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4afe8: 242e fff4 movel %fp@(-12),%d2 4afec: d483 addl %d3,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4afee: 2c02 movel %d2,%d6 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; 4aff0: d684 addl %d4,%d3 4aff2: 4c41 6004 remul %d1,%d4,%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; 4aff6: 2d4b fff0 movel %a3,%fp@(-16) 4affa: 9484 subl %d4,%d2 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4affc: b682 cmpl %d2,%d3 4affe: 640a bccs 4b00a <_Heap_Allocate_aligned_with_boundary+0x9e> 4b000: 2803 movel %d3,%d4 4b002: 4c41 4002 remul %d1,%d2,%d4 4b006: 9682 subl %d2,%d3 4b008: 2403 movel %d3,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4b00a: 4a85 tstl %d5 4b00c: 674e beqs 4b05c <_Heap_Allocate_aligned_with_boundary+0xf0> /* 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; 4b00e: 2802 movel %d2,%d4 4b010: d880 addl %d0,%d4 4b012: 2604 movel %d4,%d3 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4b014: 47f1 0800 lea %a1@(00000000,%d0:l),%a3 4b018: 4c45 3006 remul %d5,%d6,%d3 4b01c: 2d4b fffc movel %a3,%fp@(-4) 4b020: 2604 movel %d4,%d3 4b022: 9686 subl %d6,%d3 4b024: 2c03 movel %d3,%d6 4b026: 266e fff0 moveal %fp@(-16),%a3 4b02a: 6020 bras 4b04c <_Heap_Allocate_aligned_with_boundary+0xe0> uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4b02c: bcae fffc cmpl %fp@(-4),%d6 4b030: 654c bcss 4b07e <_Heap_Allocate_aligned_with_boundary+0x112> 4b032: 2803 movel %d3,%d4 4b034: 4c41 4002 remul %d1,%d2,%d4 4b038: 9682 subl %d2,%d3 return 0; } alloc_begin = boundary_line - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4b03a: 2803 movel %d3,%d4 4b03c: d880 addl %d0,%d4 4b03e: 2403 movel %d3,%d2 4b040: 2604 movel %d4,%d3 4b042: 4c45 3006 remul %d5,%d6,%d3 4b046: 2604 movel %d4,%d3 4b048: 9686 subl %d6,%d3 4b04a: 2c03 movel %d3,%d6 while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { return 0; } alloc_begin = boundary_line - alloc_size; 4b04c: 2606 movel %d6,%d3 4b04e: 9680 subl %d0,%d3 /* 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 ) { 4b050: bc82 cmpl %d2,%d6 4b052: 6304 blss 4b058 <_Heap_Allocate_aligned_with_boundary+0xec> 4b054: b886 cmpl %d6,%d4 4b056: 62d4 bhis 4b02c <_Heap_Allocate_aligned_with_boundary+0xc0> 4b058: 2d4b fff0 movel %a3,%fp@(-16) 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 ) { 4b05c: b3c2 cmpal %d2,%a1 4b05e: 621e bhis 4b07e <_Heap_Allocate_aligned_with_boundary+0x112> 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; 4b060: 2802 movel %d2,%d4 4b062: 327c fff8 moveaw #-8,%a1 4b066: 93c8 subal %a0,%a1 4b068: d3c2 addal %d2,%a1 4b06a: 4c47 4003 remul %d7,%d3,%d4 4b06e: 93c3 subal %d3,%a1 if ( free_size >= min_block_size || free_size == 0 ) { 4b070: b3ee fff0 cmpal %fp@(-16),%a1 4b074: 6404 bccs 4b07a <_Heap_Allocate_aligned_with_boundary+0x10e> 4b076: 4a89 tstl %a1 4b078: 6604 bnes 4b07e <_Heap_Allocate_aligned_with_boundary+0x112> boundary ); } } if ( alloc_begin != 0 ) { 4b07a: 4a82 tstl %d2 4b07c: 6610 bnes 4b08e <_Heap_Allocate_aligned_with_boundary+0x122><== ALWAYS TAKEN break; } block = block->next; 4b07e: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b082: b5c8 cmpal %a0,%a2 4b084: 6600 ff38 bnew 4afbe <_Heap_Allocate_aligned_with_boundary+0x52> 4b088: 260d movel %a5,%d3 4b08a: 4282 clrl %d2 4b08c: 6018 bras 4b0a6 <_Heap_Allocate_aligned_with_boundary+0x13a> if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4b08e: 2f00 movel %d0,%sp@- 4b090: 260d movel %a5,%d3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4b092: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4b096: 2f02 movel %d2,%sp@- 4b098: 2f08 movel %a0,%sp@- 4b09a: 2f0a movel %a2,%sp@- 4b09c: 4eb9 0004 67de jsr 467de <_Heap_Block_allocate> 4b0a2: 4fef 0010 lea %sp@(16),%sp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4b0a6: b6aa 0044 cmpl %a2@(68),%d3 4b0aa: 6304 blss 4b0b0 <_Heap_Allocate_aligned_with_boundary+0x144> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4b0ac: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; 4b0b0: 2002 movel %d2,%d0 4b0b2: 6002 bras 4b0b6 <_Heap_Allocate_aligned_with_boundary+0x14a> 4b0b4: 4280 clrl %d0 } 4b0b6: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4b0bc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f170 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 4f170: 4e56 fff4 linkw %fp,#-12 4f174: 206e 0008 moveal %fp@(8),%a0 4f178: 202e 000c movel %fp@(12),%d0 Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 4f17c: 2228 001c movel %a0@(28),%d1 uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 4f180: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 4f184: 48d7 040c moveml %d2-%d3/%a2,%sp@ Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 4f188: b0a8 0018 cmpl %a0@(24),%d0 4f18c: 6508 bcss 4f196 <_Heap_Extend+0x26> * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 4f18e: b280 cmpl %d0,%d1 4f190: 6304 blss 4f196 <_Heap_Extend+0x26> 4f192: 7001 moveq #1,%d0 4f194: 606c bras 4f202 <_Heap_Extend+0x92> return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 4f196: b280 cmpl %d0,%d1 4f198: 6704 beqs 4f19e <_Heap_Extend+0x2e> 4f19a: 7002 moveq #2,%d0 4f19c: 6064 bras 4f202 <_Heap_Extend+0x92> { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 4f19e: 2200 movel %d0,%d1 4f1a0: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 4f1a4: 70f8 moveq #-8,%d0 4f1a6: 9089 subl %a1,%d0 4f1a8: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4f1aa: 2600 movel %d0,%d3 4f1ac: 4c68 3002 0010 remul %a0@(16),%d2,%d3 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 4f1b2: 2141 001c movel %d1,%a0@(28) extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 4f1b6: 246e 0014 moveal %fp@(20),%a2 4f1ba: 9082 subl %d2,%d0 4f1bc: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 4f1be: b0a8 0014 cmpl %a0@(20),%d0 4f1c2: 653c bcss 4f200 <_Heap_Extend+0x90> <== NEVER TAKEN uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 4f1c4: 7401 moveq #1,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4f1c6: 45f1 0800 lea %a1@(00000000,%d0:l),%a2 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 4f1ca: c4a9 0004 andl %a1@(4),%d2 Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 4f1ce: 2228 0020 movel %a0@(32),%d1 4f1d2: 928a subl %a2,%d1 4f1d4: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 4f1d6: 214a 0024 movel %a2,%a0@(36) 4f1da: 2342 0004 movel %d2,%a1@(4) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 4f1de: 7401 moveq #1,%d2 4f1e0: 8481 orl %d1,%d2 4f1e2: 2542 0004 movel %d2,%a2@(4) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 4f1e6: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 4f1ea: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 4f1ee: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 4f1f2: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 4f1f6: 2f08 movel %a0,%sp@- 4f1f8: 4eb9 0004 a004 jsr 4a004 <_Heap_Free> 4f1fe: 508f addql #8,%sp 4f200: 4280 clrl %d0 } return HEAP_EXTEND_SUCCESSFUL; } 4f202: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4f208: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005a6e4 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5a6e4: 4e56 0000 linkw %fp,#0 5a6e8: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 5a6ec: 2040 moveal %d0,%a0 5a6ee: 5188 subql #8,%a0 5a6f0: 226e 0008 moveal %fp@(8),%a1 5a6f4: 2f02 movel %d2,%sp@- 5a6f6: 2400 movel %d0,%d2 5a6f8: 4c69 2001 0010 remul %a1@(16),%d1,%d2 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 5a6fe: 2429 0020 movel %a1@(32),%d2 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 ) 5a702: 91c1 subal %d1,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 5a704: b488 cmpl %a0,%d2 5a706: 6244 bhis 5a74c <_Heap_Size_of_alloc_area+0x68> 5a708: b1e9 0024 cmpal %a1@(36),%a0 5a70c: 53c1 sls %d1 5a70e: 49c1 extbl %d1 5a710: 4481 negl %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 ) ) { 5a712: 4a01 tstb %d1 5a714: 6736 beqs 5a74c <_Heap_Size_of_alloc_area+0x68> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5a716: 72fe moveq #-2,%d1 5a718: c2a8 0004 andl %a0@(4),%d1 5a71c: d1c1 addal %d1,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 5a71e: b488 cmpl %a0,%d2 5a720: 622a bhis 5a74c <_Heap_Size_of_alloc_area+0x68> <== NEVER TAKEN 5a722: b1e9 0024 cmpal %a1@(36),%a0 5a726: 53c1 sls %d1 5a728: 49c1 extbl %d1 5a72a: 4481 negl %d1 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 5a72c: 4a01 tstb %d1 5a72e: 671c beqs 5a74c <_Heap_Size_of_alloc_area+0x68> <== NEVER TAKEN 5a730: 7201 moveq #1,%d1 5a732: c2a8 0004 andl %a0@(4),%d1 5a736: 4a01 tstb %d1 5a738: 6712 beqs 5a74c <_Heap_Size_of_alloc_area+0x68> <== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5a73a: 7204 moveq #4,%d1 5a73c: 9280 subl %d0,%d1 5a73e: 2001 movel %d1,%d0 5a740: d088 addl %a0,%d0 5a742: 226e 0010 moveal %fp@(16),%a1 5a746: 2280 movel %d0,%a1@ 5a748: 7001 moveq #1,%d0 return true; 5a74a: 6002 bras 5a74e <_Heap_Size_of_alloc_area+0x6a> 5a74c: 4200 clrb %d0 } 5a74e: 241f movel %sp@+,%d2 5a750: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047298 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 47298: 4e56 ffd0 linkw %fp,#-48 4729c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 472a0: 286e 0008 moveal %fp@(8),%a4 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 472a4: 47fa 031a lea %pc@(475c0 <_Heap_Walk_print>),%a3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 472a8: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 472ac: 2c2c 0010 movel %a4@(16),%d6 uintptr_t const min_block_size = heap->min_block_size; 472b0: 262c 0014 movel %a4@(20),%d3 Heap_Block *const last_block = heap->last_block; 472b4: 2a2c 0024 movel %a4@(36),%d5 Heap_Block *block = heap->first_block; 472b8: 246c 0020 moveal %a4@(32),%a2 Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 472bc: 4a2e 0013 tstb %fp@(19) 472c0: 6604 bnes 472c6 <_Heap_Walk+0x2e> 472c2: 47fa ffcc lea %pc@(47290 <_Heap_Walk_print_nothing>),%a3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 472c6: 7003 moveq #3,%d0 472c8: b0b9 0006 0146 cmpl 60146 <_System_state_Current>,%d0 472ce: 6600 02da bnew 475aa <_Heap_Walk+0x312> 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)( 472d2: 2f2c 000c movel %a4@(12),%sp@- 472d6: 2f2c 0008 movel %a4@(8),%sp@- 472da: 2f05 movel %d5,%sp@- 472dc: 2f0a movel %a2,%sp@- 472de: 2f2c 001c movel %a4@(28),%sp@- 472e2: 2f2c 0018 movel %a4@(24),%sp@- 472e6: 2f03 movel %d3,%sp@- 472e8: 2f06 movel %d6,%sp@- 472ea: 4879 0005 c2fc pea 5c2fc 472f0: 42a7 clrl %sp@- 472f2: 2f02 movel %d2,%sp@- 472f4: 4e93 jsr %a3@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 472f6: 4fef 002c lea %sp@(44),%sp 472fa: 4a86 tstl %d6 472fc: 6608 bnes 47306 <_Heap_Walk+0x6e> (*printer)( source, true, "page size is zero\n" ); 472fe: 4879 0005 c38d pea 5c38d 47304: 607e bras 47384 <_Heap_Walk+0xec> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 47306: 7003 moveq #3,%d0 47308: c086 andl %d6,%d0 4730a: 670c beqs 47318 <_Heap_Walk+0x80> (*printer)( 4730c: 2f06 movel %d6,%sp@- 4730e: 4879 0005 c3a0 pea 5c3a0 47314: 6000 0268 braw 4757e <_Heap_Walk+0x2e6> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 47318: 2203 movel %d3,%d1 4731a: 4c46 1000 remul %d6,%d0,%d1 4731e: 4a80 tstl %d0 47320: 670c beqs 4732e <_Heap_Walk+0x96> (*printer)( 47322: 2f03 movel %d3,%sp@- 47324: 4879 0005 c3be pea 5c3be 4732a: 6000 0252 braw 4757e <_Heap_Walk+0x2e6> ); return false; } if ( 4732e: 200a movel %a2,%d0 47330: 5080 addql #8,%d0 47332: 4c46 0001 remul %d6,%d1,%d0 47336: 4a81 tstl %d1 47338: 670c beqs 47346 <_Heap_Walk+0xae> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 4733a: 2f0a movel %a2,%sp@- 4733c: 4879 0005 c3e2 pea 5c3e2 47342: 6000 023a braw 4757e <_Heap_Walk+0x2e6> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 47346: 7001 moveq #1,%d0 47348: c0aa 0004 andl %a2@(4),%d0 4734c: 4a00 tstb %d0 4734e: 6608 bnes 47358 <_Heap_Walk+0xc0> (*printer)( 47350: 4879 0005 c413 pea 5c413 47356: 602c bras 47384 <_Heap_Walk+0xec> ); return false; } if ( first_block->prev_size != page_size ) { 47358: 2812 movel %a2@,%d4 4735a: bc84 cmpl %d4,%d6 4735c: 670e beqs 4736c <_Heap_Walk+0xd4> (*printer)( 4735e: 2f06 movel %d6,%sp@- 47360: 2f04 movel %d4,%sp@- 47362: 4879 0005 c441 pea 5c441 47368: 6000 0150 braw 474ba <_Heap_Walk+0x222> ); return false; } if ( _Heap_Is_free( last_block ) ) { 4736c: 2045 moveal %d5,%a0 4736e: 70fe moveq #-2,%d0 47370: 7201 moveq #1,%d1 47372: c0a8 0004 andl %a0@(4),%d0 47376: c2b0 0804 andl %a0@(00000004,%d0:l),%d1 4737a: 4a01 tstb %d1 4737c: 6616 bnes 47394 <_Heap_Walk+0xfc> (*printer)( 4737e: 4879 0005 c46c pea 5c46c 47384: 4878 0001 pea 1 47388: 2f02 movel %d2,%sp@- 4738a: 4e93 jsr %a3@ 4738c: 4fef 000c lea %sp@(12),%sp 47390: 6000 01f8 braw 4758a <_Heap_Walk+0x2f2> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 47394: 2c2c 0010 movel %a4@(16),%d6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 47398: 220c movel %a4,%d1 4739a: 206c 0008 moveal %a4@(8),%a0 4739e: 606a bras 4740a <_Heap_Walk+0x172> 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 473a0: b1ec 0020 cmpal %a4@(32),%a0 473a4: 650e bcss 473b4 <_Heap_Walk+0x11c> 473a6: b1ec 0024 cmpal %a4@(36),%a0 473aa: 53c0 sls %d0 473ac: 49c0 extbl %d0 473ae: 4480 negl %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 ) ) { 473b0: 4a00 tstb %d0 473b2: 660c bnes 473c0 <_Heap_Walk+0x128> <== ALWAYS TAKEN (*printer)( 473b4: 2f08 movel %a0,%sp@- 473b6: 4879 0005 c481 pea 5c481 473bc: 6000 01c0 braw 4757e <_Heap_Walk+0x2e6> ); return false; } if ( 473c0: 4c46 7000 remul %d6,%d0,%d7 473c4: 4a80 tstl %d0 473c6: 670c beqs 473d4 <_Heap_Walk+0x13c> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 473c8: 2f08 movel %a0,%sp@- 473ca: 4879 0005 c4a1 pea 5c4a1 473d0: 6000 01ac braw 4757e <_Heap_Walk+0x2e6> ); return false; } if ( _Heap_Is_used( free_block ) ) { 473d4: 70fe moveq #-2,%d0 473d6: 7e01 moveq #1,%d7 473d8: c0a8 0004 andl %a0@(4),%d0 473dc: ceb0 0804 andl %a0@(00000004,%d0:l),%d7 473e0: 670c beqs 473ee <_Heap_Walk+0x156> (*printer)( 473e2: 2f08 movel %a0,%sp@- 473e4: 4879 0005 c4d1 pea 5c4d1 473ea: 6000 0192 braw 4757e <_Heap_Walk+0x2e6> ); return false; } if ( free_block->prev != prev_block ) { 473ee: 2028 000c movel %a0@(12),%d0 473f2: b280 cmpl %d0,%d1 473f4: 670e beqs 47404 <_Heap_Walk+0x16c> (*printer)( 473f6: 2f00 movel %d0,%sp@- 473f8: 2f08 movel %a0,%sp@- 473fa: 4879 0005 c4ed pea 5c4ed 47400: 6000 00b8 braw 474ba <_Heap_Walk+0x222> return false; } prev_block = free_block; free_block = free_block->next; 47404: 2208 movel %a0,%d1 47406: 2068 0008 moveal %a0@(8),%a0 ); return false; } if ( 4740a: 2e08 movel %a0,%d7 4740c: 5087 addql #8,%d7 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 ) { 4740e: b9c8 cmpal %a0,%a4 47410: 668e bnes 473a0 <_Heap_Walk+0x108> 47412: 6000 0190 braw 475a4 <_Heap_Walk+0x30c> - 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; 47416: 202a 0004 movel %a2@(4),%d0 4741a: 7cfe moveq #-2,%d6 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; if ( prev_used ) { 4741c: 7201 moveq #1,%d1 4741e: cc80 andl %d0,%d6 47420: c081 andl %d1,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47422: 4bf2 6800 lea %a2@(00000000,%d6:l),%a5 47426: 4a00 tstb %d0 47428: 6716 beqs 47440 <_Heap_Walk+0x1a8> (*printer)( 4742a: 2f06 movel %d6,%sp@- 4742c: 2f0a movel %a2,%sp@- 4742e: 4879 0005 c51f pea 5c51f 47434: 42a7 clrl %sp@- 47436: 2f02 movel %d2,%sp@- 47438: 4e93 jsr %a3@ 4743a: 4fef 0014 lea %sp@(20),%sp 4743e: 6016 bras 47456 <_Heap_Walk+0x1be> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 47440: 2f12 movel %a2@,%sp@- 47442: 2f06 movel %d6,%sp@- 47444: 2f0a movel %a2,%sp@- 47446: 4879 0005 c536 pea 5c536 4744c: 42a7 clrl %sp@- 4744e: 2f02 movel %d2,%sp@- 47450: 4e93 jsr %a3@ 47452: 4fef 0018 lea %sp@(24),%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 47456: bbec 0020 cmpal %a4@(32),%a5 4745a: 650e bcss 4746a <_Heap_Walk+0x1d2> <== NEVER TAKEN 4745c: bbec 0024 cmpal %a4@(36),%a5 47460: 53c0 sls %d0 47462: 49c0 extbl %d0 47464: 4480 negl %d0 block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 47466: 4a00 tstb %d0 47468: 660c bnes 47476 <_Heap_Walk+0x1de> (*printer)( 4746a: 2f0d movel %a5,%sp@- 4746c: 2f0a movel %a2,%sp@- 4746e: 4879 0005 c55b pea 5c55b 47474: 6044 bras 474ba <_Heap_Walk+0x222> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 47476: 2206 movel %d6,%d1 47478: 4c44 1000 remul %d4,%d0,%d1 4747c: 4a80 tstl %d0 4747e: 670c beqs 4748c <_Heap_Walk+0x1f4> (*printer)( 47480: 2f06 movel %d6,%sp@- 47482: 2f0a movel %a2,%sp@- 47484: 4879 0005 c588 pea 5c588 4748a: 602e bras 474ba <_Heap_Walk+0x222> ); return false; } if ( block_size < min_block_size ) { 4748c: b686 cmpl %d6,%d3 4748e: 631c blss 474ac <_Heap_Walk+0x214> (*printer)( 47490: 2f03 movel %d3,%sp@- 47492: 2f06 movel %d6,%sp@- 47494: 2f0a movel %a2,%sp@- 47496: 4879 0005 c5b6 pea 5c5b6 4749c: 4878 0001 pea 1 474a0: 2f02 movel %d2,%sp@- 474a2: 4e93 jsr %a3@ block, block_size, min_block_size ); return false; 474a4: 4fef 0018 lea %sp@(24),%sp 474a8: 6000 00e0 braw 4758a <_Heap_Walk+0x2f2> } if ( next_block_begin <= block_begin ) { 474ac: b5cd cmpal %a5,%a2 474ae: 651a bcss 474ca <_Heap_Walk+0x232> (*printer)( 474b0: 2f0d movel %a5,%sp@- 474b2: 2f0a movel %a2,%sp@- 474b4: 4879 0005 c5e1 pea 5c5e1 474ba: 4878 0001 pea 1 474be: 2f02 movel %d2,%sp@- 474c0: 4e93 jsr %a3@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 474c2: 4fef 0014 lea %sp@(20),%sp 474c6: 6000 00c2 braw 4758a <_Heap_Walk+0x2f2> } if ( !_Heap_Is_prev_used( next_block ) ) { 474ca: 7001 moveq #1,%d0 474cc: c0ad 0004 andl %a5@(4),%d0 474d0: 4a00 tstb %d0 474d2: 6600 00ce bnew 475a2 <_Heap_Walk+0x30a> 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; 474d6: 2e2a 0004 movel %a2@(4),%d7 - 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; 474da: 7cfe moveq #-2,%d6 return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 474dc: 43f9 0005 c615 lea 5c615 ,%a1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 474e2: 206c 0008 moveal %a4@(8),%a0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 474e6: cc87 andl %d7,%d6 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; 474e8: 2d47 fffc movel %d7,%fp@(-4) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 474ec: 2e0a movel %a2,%d7 474ee: de86 addl %d6,%d7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 474f0: 2d48 fff8 movel %a0,%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)( 474f4: 206a 0008 moveal %a2@(8),%a0 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 474f8: b1ec 000c cmpal %a4@(12),%a0 474fc: 6710 beqs 4750e <_Heap_Walk+0x276> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 474fe: 43f9 0005 c61f lea 5c61f ,%a1 47504: b9c8 cmpal %a0,%a4 47506: 6706 beqs 4750e <_Heap_Walk+0x276> 47508: 43f9 0005 c24c lea 5c24c ,%a1 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)( 4750e: 202a 000c movel %a2@(12),%d0 47512: 223c 0005 c629 movel #378409,%d1 47518: b0ae fff8 cmpl %fp@(-8),%d0 4751c: 6710 beqs 4752e <_Heap_Walk+0x296> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 4751e: 223c 0005 c634 movel #378420,%d1 47524: b9c0 cmpal %d0,%a4 47526: 6706 beqs 4752e <_Heap_Walk+0x296> 47528: 223c 0005 c24c movel #377420,%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)( 4752e: 2f09 movel %a1,%sp@- 47530: 2f08 movel %a0,%sp@- 47532: 2f01 movel %d1,%sp@- 47534: 2f00 movel %d0,%sp@- 47536: 2f0a movel %a2,%sp@- 47538: 4879 0005 c63e pea 5c63e 4753e: 42a7 clrl %sp@- 47540: 2f02 movel %d2,%sp@- 47542: 4e93 jsr %a3@ block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 47544: 4fef 0020 lea %sp@(32),%sp 47548: 2047 moveal %d7,%a0 4754a: 2010 movel %a0@,%d0 4754c: b086 cmpl %d6,%d0 4754e: 671c beqs 4756c <_Heap_Walk+0x2d4> (*printer)( 47550: 2f07 movel %d7,%sp@- 47552: 2f00 movel %d0,%sp@- 47554: 2f06 movel %d6,%sp@- 47556: 2f0a movel %a2,%sp@- 47558: 4879 0005 c66a pea 5c66a 4755e: 4878 0001 pea 1 47562: 2f02 movel %d2,%sp@- 47564: 4e93 jsr %a3@ 47566: 4fef 001c lea %sp@(28),%sp 4756a: 601e bras 4758a <_Heap_Walk+0x2f2> ); return false; } if ( !prev_used ) { 4756c: 7001 moveq #1,%d0 4756e: c0ae fffc andl %fp@(-4),%d0 47572: 4a00 tstb %d0 47574: 6618 bnes 4758e <_Heap_Walk+0x2f6> (*printer)( 47576: 2f0a movel %a2,%sp@- 47578: 4879 0005 c6a3 pea 5c6a3 4757e: 4878 0001 pea 1 47582: 2f02 movel %d2,%sp@- 47584: 4e93 jsr %a3@ 47586: 4fef 0010 lea %sp@(16),%sp 4758a: 4200 clrb %d0 4758c: 601e bras 475ac <_Heap_Walk+0x314> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4758e: 206c 0008 moveal %a4@(8),%a0 47592: 6008 bras 4759c <_Heap_Walk+0x304> { 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 ) { 47594: b5c8 cmpal %a0,%a2 47596: 670a beqs 475a2 <_Heap_Walk+0x30a> return true; } free_block = free_block->next; 47598: 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 ) { 4759c: b9c8 cmpal %a0,%a4 4759e: 66f4 bnes 47594 <_Heap_Walk+0x2fc> 475a0: 6014 bras 475b6 <_Heap_Walk+0x31e> 475a2: 244d moveal %a5,%a2 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 475a4: ba8a cmpl %a2,%d5 475a6: 6600 fe6e bnew 47416 <_Heap_Walk+0x17e> 475aa: 7001 moveq #1,%d0 block = next_block; } return true; } 475ac: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 475b2: 4e5e unlk %fp 475b4: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 475b6: 2f0a movel %a2,%sp@- 475b8: 4879 0005 c6d2 pea 5c6d2 475be: 60be bras 4757e <_Heap_Walk+0x2e6> =============================================================================== 000468d4 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 468d4: 4e56 0000 linkw %fp,#0 468d8: 222e 000c movel %fp@(12),%d1 468dc: 2f03 movel %d3,%sp@- _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 468de: 4283 clrl %d3 468e0: 1601 moveb %d1,%d3 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 468e2: 2f02 movel %d2,%sp@- 468e4: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 468e8: 2f02 movel %d2,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 468ea: 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 ); 468ee: 2f03 movel %d3,%sp@- _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 468f0: 263c 0000 0700 movel #1792,%d3 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 468f6: 2f00 movel %d0,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 468f8: 13c1 0005 dcc6 moveb %d1,5dcc6 <_Internal_errors_What_happened+0x4> bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 468fe: 23c0 0005 dcc2 movel %d0,5dcc2 <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 46904: 23c2 0005 dcc8 movel %d2,5dcc8 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 4690a: 4eb9 0004 83fe jsr 483fe <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46910: 40c0 movew %sr,%d0 46912: 8083 orl %d3,%d0 46914: 46c0 movew %d0,%sr 46916: 2002 movel %d2,%d0 <== NOT EXECUTED 46918: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 4691e: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46920: 7005 moveq #5,%d0 46922: 4fef 000c lea %sp@(12),%sp 46926: 23c0 0005 dd9e movel %d0,5dd9e <_System_state_Current> 4692c: 60fe bras 4692c <_Internal_error_Occurred+0x58> ... =============================================================================== 00046998 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 46998: 4e56 fff0 linkw %fp,#-16 4699c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 469a0: 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 ) 469a4: 4aaa 0014 tstl %a2@(20) 469a8: 6604 bnes 469ae <_Objects_Allocate+0x16> <== ALWAYS TAKEN 469aa: 4280 clrl %d0 <== NOT EXECUTED 469ac: 605e bras 46a0c <_Objects_Allocate+0x74> <== NOT EXECUTED /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 469ae: 240a movel %a2,%d2 469b0: 0682 0000 001c addil #28,%d2 469b6: 47f9 0004 6164 lea 46164 <_Chain_Get>,%a3 469bc: 2f02 movel %d2,%sp@- 469be: 4e93 jsr %a3@ if ( information->auto_extend ) { 469c0: 588f addql #4,%sp 469c2: 4a2a 0010 tstb %a2@(16) 469c6: 6744 beqs 46a0c <_Objects_Allocate+0x74> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 469c8: 4a80 tstl %d0 469ca: 6612 bnes 469de <_Objects_Allocate+0x46> _Objects_Extend_information( information ); 469cc: 2f0a movel %a2,%sp@- 469ce: 4eb9 0004 6a44 jsr 46a44 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 469d4: 2f02 movel %d2,%sp@- 469d6: 4e93 jsr %a3@ } if ( the_object ) { 469d8: 508f addql #8,%sp 469da: 4a80 tstl %d0 469dc: 672e beqs 46a0c <_Objects_Allocate+0x74> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 469de: 2040 moveal %d0,%a0 469e0: 4281 clrl %d1 469e2: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 469e4: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 469e6: 362a 0008 movew %a2@(8),%d3 469ea: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 469ee: 342a 0012 movew %a2@(18),%d2 information->inactive--; 469f2: 306a 0028 moveaw %a2@(40),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 469f6: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 469f8: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 469fc: 5388 subql #1,%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 469fe: e589 lsll #2,%d1 information->inactive--; 46a00: 3548 0028 movew %a0,%a2@(40) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 46a04: 206a 002a moveal %a2@(42),%a0 46a08: d1c1 addal %d1,%a0 46a0a: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 46a0c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 46a12: 4e5e unlk %fp ... =============================================================================== 00046a18 <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46a18: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 46a1a: 4e56 0000 linkw %fp,#0 46a1e: 226e 000c moveal %fp@(12),%a1 46a22: 206e 0008 moveal %fp@(8),%a0 46a26: 2f0a movel %a2,%sp@- 46a28: 2468 0018 moveal %a0@(24),%a2 46a2c: 3029 000a movew %a1@(10),%d0 46a30: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 46a34: 2d49 000c movel %a1,%fp@(12) } 46a38: 245f moveal %sp@+,%a2 46a3a: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 46a3c: 4ef9 0004 6f38 jmp 46f38 <_Objects_Namespace_remove> ... =============================================================================== 00046d3c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 46d3c: 4e56 0000 linkw %fp,#0 46d40: 2f03 movel %d3,%sp@- 46d42: 262e 0008 movel %fp@(8),%d3 46d46: 2f02 movel %d2,%sp@- 46d48: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 46d4c: 672e beqs 46d7c <_Objects_Get_information+0x40> /* * 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 ); 46d4e: 2f03 movel %d3,%sp@- 46d50: 4eb9 0004 b230 jsr 4b230 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 46d56: 588f addql #4,%sp 46d58: 4a80 tstl %d0 46d5a: 6720 beqs 46d7c <_Objects_Get_information+0x40> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 46d5c: b082 cmpl %d2,%d0 46d5e: 651c bcss 46d7c <_Objects_Get_information+0x40> return NULL; if ( !_Objects_Information_table[ the_api ] ) 46d60: 41f9 0005 dbd4 lea 5dbd4 <_Objects_Information_table>,%a0 46d66: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 46d6a: 4a88 tstl %a0 46d6c: 670e beqs 46d7c <_Objects_Get_information+0x40> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 46d6e: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 46d72: 670a beqs 46d7e <_Objects_Get_information+0x42> <== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 46d74: 2040 moveal %d0,%a0 46d76: 4a68 000e tstw %a0@(14) 46d7a: 6602 bnes 46d7e <_Objects_Get_information+0x42> 46d7c: 4280 clrl %d0 return NULL; #endif return info; } 46d7e: 242e fff8 movel %fp@(-8),%d2 46d82: 262e fffc movel %fp@(-4),%d3 46d86: 4e5e unlk %fp ... =============================================================================== 00053eec <_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; 53eec: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 53eee: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 53ef0: 4e56 0000 linkw %fp,#0 53ef4: 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; 53ef8: 90a8 0006 subl %a0@(6),%d0 53efc: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 53f00: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 53f04: 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 ) { 53f08: b081 cmpl %d1,%d0 53f0a: 620e bhis 53f1a <_Objects_Get_no_protection+0x2e> if ( (the_object = information->local_table[ index ]) != NULL ) { 53f0c: 2068 0018 moveal %a0@(24),%a0 53f10: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 53f14: 6704 beqs 53f1a <_Objects_Get_no_protection+0x2e><== NEVER TAKEN *location = OBJECTS_LOCAL; 53f16: 4291 clrl %a1@ return the_object; 53f18: 6006 bras 53f20 <_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; 53f1a: 7001 moveq #1,%d0 53f1c: 2280 movel %d0,%a1@ 53f1e: 4280 clrl %d0 return NULL; } 53f20: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047c6c <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 47c6c: 4e56 fffc linkw %fp,#-4 47c70: 222e 0008 movel %fp@(8),%d1 47c74: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 47c76: 4a81 tstl %d1 47c78: 660a bnes 47c84 <_Objects_Id_to_name+0x18> 47c7a: 2079 0005 f0fe moveal 5f0fe <_Thread_Executing>,%a0 47c80: 2228 0008 movel %a0@(8),%d1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 47c84: 7418 moveq #24,%d2 47c86: 2001 movel %d1,%d0 47c88: e4a8 lsrl %d2,%d0 47c8a: 143c 0007 moveb #7,%d2 47c8e: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 47c90: 143c 0003 moveb #3,%d2 47c94: 2040 moveal %d0,%a0 47c96: 5388 subql #1,%a0 47c98: b488 cmpl %a0,%d2 47c9a: 6538 bcss 47cd4 <_Objects_Id_to_name+0x68> 47c9c: 6040 bras 47cde <_Objects_Id_to_name+0x72> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 47c9e: 2001 movel %d1,%d0 47ca0: 741b moveq #27,%d2 47ca2: e4a8 lsrl %d2,%d0 47ca4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 47ca8: 672a beqs 47cd4 <_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 ); 47caa: 486e fffc pea %fp@(-4) 47cae: 2f01 movel %d1,%sp@- 47cb0: 2f00 movel %d0,%sp@- 47cb2: 4eb9 0004 7c0c jsr 47c0c <_Objects_Get> if ( !the_object ) 47cb8: 4fef 000c lea %sp@(12),%sp 47cbc: 4a80 tstl %d0 47cbe: 6714 beqs 47cd4 <_Objects_Id_to_name+0x68> return OBJECTS_INVALID_ID; *name = the_object->name; 47cc0: 206e 000c moveal %fp@(12),%a0 47cc4: 2240 moveal %d0,%a1 47cc6: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 47cca: 4eb9 0004 84de jsr 484de <_Thread_Enable_dispatch> 47cd0: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 47cd2: 6002 bras 47cd6 <_Objects_Id_to_name+0x6a> 47cd4: 7003 moveq #3,%d0 } 47cd6: 242e fff8 movel %fp@(-8),%d2 47cda: 4e5e unlk %fp 47cdc: 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 ] ) 47cde: 41f9 0005 effc lea 5effc <_Objects_Information_table>,%a0 47ce4: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47ce8: 4a88 tstl %a0 47cea: 66b2 bnes 47c9e <_Objects_Id_to_name+0x32> 47cec: 60e6 bras 47cd4 <_Objects_Id_to_name+0x68> ... =============================================================================== 00046e44 <_Objects_Initialize_information>: information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 46e44: 41f9 0005 dbd4 lea 5dbd4 <_Objects_Information_table>,%a0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46e4a: 4e56 fff0 linkw %fp,#-16 46e4e: 202e 000c movel %fp@(12),%d0 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 46e52: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46e56: 48d7 003c moveml %d2-%d5,%sp@ 46e5a: 222e 0014 movel %fp@(20),%d1 46e5e: 4285 clrl %d5 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 46e60: 2601 movel %d1,%d3 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46e62: 206e 0008 moveal %fp@(8),%a0 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 46e66: 4242 clrw %d2 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46e68: 3a2e 001a movew %fp@(26),%d5 46e6c: 282e 0010 movel %fp@(16),%d4 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 46e70: d683 addl %d3,%d3 46e72: 9783 subxl %d3,%d3 46e74: 4483 negl %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; 46e76: 3142 0028 movew %d2,%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; 46e7a: 3142 000e movew %d2,%a0@(14) , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46e7e: 242e 0020 movel %fp@(32),%d2 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 46e82: 3144 0004 movew %d4,%a0@(4) _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 46e86: 1143 0010 moveb %d3,%a0@(16) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 46e8a: 2145 0014 movel %d5,%a0@(20) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 46e8e: 2388 4c00 movel %a0,%a1@(00000000,%d4:l:4) /* * 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; 46e92: 0881 001f bclr #31,%d1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 46e96: 2080 movel %d0,%a0@ information->the_class = the_class; information->size = size; information->local_table = 0; 46e98: 42a8 0018 clrl %a0@(24) information->inactive_per_block = 0; 46e9c: 42a8 002a clrl %a0@(42) information->object_blocks = 0; 46ea0: 42a8 002e clrl %a0@(46) maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 46ea4: 4a03 tstb %d3 46ea6: 6714 beqs 46ebc <_Objects_Initialize_information+0x78> 46ea8: 4a81 tstl %d1 46eaa: 6610 bnes 46ebc <_Objects_Initialize_information+0x78> _Internal_error_Occurred( 46eac: 4878 0014 pea 14 46eb0: 4878 0001 pea 1 46eb4: 42a7 clrl %sp@- 46eb6: 4eb9 0004 68d4 jsr 468d4 <_Internal_error_Occurred> /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 46ebc: 7a18 moveq #24,%d5 46ebe: 4a81 tstl %d1 46ec0: 56c3 sne %d3 46ec2: eba8 lsll %d5,%d0 46ec4: 1a3c 001b moveb #27,%d5 46ec8: 49c3 extbl %d3 46eca: 4483 negl %d3 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; 46ecc: 43f9 0005 d3c4 lea 5d3c4 ,%a1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 46ed2: ebac lsll %d5,%d4 46ed4: 08c0 0010 bset #16,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 46ed8: 1a3c 0003 moveb #3,%d5 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 46edc: 8084 orl %d4,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 46ede: ca82 andl %d2,%d5 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 46ee0: 3141 0012 movew %d1,%a0@(18) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 46ee4: 8083 orl %d3,%d0 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; 46ee6: 2149 0018 movel %a1,%a0@(24) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 46eea: 2140 0006 movel %d0,%a0@(6) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 46eee: 4a85 tstl %d5 46ef0: 6604 bnes 46ef6 <_Objects_Initialize_information+0xb2><== NEVER TAKEN 46ef2: 2002 movel %d2,%d0 46ef4: 6008 bras 46efe <_Objects_Initialize_information+0xba> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 46ef6: 2002 movel %d2,%d0 <== NOT EXECUTED 46ef8: 5880 addql #4,%d0 <== NOT EXECUTED 46efa: 74fc moveq #-4,%d2 <== NOT EXECUTED 46efc: c082 andl %d2,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 46efe: 43e8 0020 lea %a0@(32),%a1 46f02: 2149 001c movel %a1,%a0@(28) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 46f06: 43e8 001c lea %a0@(28),%a1 ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 46f0a: 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; 46f0e: 42a8 0020 clrl %a0@(32) the_chain->last = _Chain_Head(the_chain); 46f12: 2149 0024 movel %a1,%a0@(36) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 46f16: 4a81 tstl %d1 46f18: 6712 beqs 46f2c <_Objects_Initialize_information+0xe8> /* * 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 ); 46f1a: 2d48 0008 movel %a0,%fp@(8) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 46f1e: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 46f24: 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 ); 46f26: 4ef9 0004 6a44 jmp 46a44 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 46f2c: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 46f32: 4e5e unlk %fp ... =============================================================================== 00048ae8 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48ae8: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 48aea: 4e56 fff0 linkw %fp,#-16 48aee: 206e 0008 moveal %fp@(8),%a0 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48af2: 3028 0032 movew %a0@(50),%d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 48af6: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48afa: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48afe: 2f00 movel %d0,%sp@- 48b00: 2f0a movel %a2,%sp@- 48b02: 4eb9 0005 0064 jsr 50064 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 48b08: 508f addql #8,%sp 48b0a: 7201 moveq #1,%d1 48b0c: 1812 moveb %a2@,%d4 48b0e: b280 cmpl %d0,%d1 48b10: 644a bccs 48b5c <_Objects_Set_name+0x74> 48b12: 7602 moveq #2,%d3 48b14: 142a 0001 moveb %a2@(1),%d2 48b18: 49c2 extbl %d2 48b1a: 4842 swap %d2 48b1c: 4242 clrw %d2 48b1e: b680 cmpl %d0,%d3 48b20: 643e bccs 48b60 <_Objects_Set_name+0x78> 48b22: 163c 0003 moveb #3,%d3 48b26: 122a 0002 moveb %a2@(2),%d1 48b2a: 49c1 extbl %d1 48b2c: e189 lsll #8,%d1 48b2e: b680 cmpl %d0,%d3 48b30: 6506 bcss 48b38 <_Objects_Set_name+0x50> 48b32: 163c 0020 moveb #32,%d3 48b36: 6006 bras 48b3e <_Objects_Set_name+0x56> 48b38: 162a 0003 moveb %a2@(3),%d3 48b3c: 49c3 extbl %d3 48b3e: 7018 moveq #24,%d0 48b40: e1ac lsll %d0,%d4 48b42: 206e 000c moveal %fp@(12),%a0 48b46: 8484 orl %d4,%d2 ); } return true; } 48b48: 7001 moveq #1,%d0 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 48b4a: 8481 orl %d1,%d2 48b4c: 8483 orl %d3,%d2 48b4e: 2142 000c movel %d2,%a0@(12) ); } return true; } 48b52: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48b58: 4e5e unlk %fp 48b5a: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 48b5c: 7420 moveq #32,%d2 48b5e: 4842 swap %d2 48b60: 223c 0000 2000 movel #8192,%d1 48b66: 7620 moveq #32,%d3 48b68: 60d4 bras 48b3e <_Objects_Set_name+0x56> ... =============================================================================== 0004aab2 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4aab2: 4e56 ffec linkw %fp,#-20 4aab6: 206e 0008 moveal %fp@(8),%a0 4aaba: 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 ]; 4aabe: 2468 0108 moveal %a0@(264),%a2 if ( !api ) 4aac2: 4a8a tstl %a2 4aac4: 6754 beqs 4ab1a <_RTEMS_tasks_Post_switch_extension+0x68><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4aac6: 203c 0000 0700 movel #1792,%d0 4aacc: 40c1 movew %sr,%d1 4aace: 8081 orl %d1,%d0 4aad0: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4aad2: 262a 0012 movel %a2@(18),%d3 asr->signals_posted = 0; 4aad6: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4aada: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4aadc: 4a83 tstl %d3 4aade: 673a beqs 4ab1a <_RTEMS_tasks_Post_switch_extension+0x68><== NEVER TAKEN return; asr->nest_level += 1; 4aae0: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4aae4: 240e movel %fp,%d2 4aae6: 5982 subql #4,%d2 4aae8: 47f9 0004 cc14 lea 4cc14 ,%a3 4aaee: 2f02 movel %d2,%sp@- 4aaf0: 2f3c 0000 ffff movel #65535,%sp@- 4aaf6: 2f2a 000e movel %a2@(14),%sp@- 4aafa: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4aafc: 2f03 movel %d3,%sp@- 4aafe: 206a 000a moveal %a2@(10),%a0 4ab02: 4e90 jsr %a0@ asr->nest_level -= 1; 4ab04: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4ab08: 2f02 movel %d2,%sp@- 4ab0a: 2f3c 0000 ffff movel #65535,%sp@- 4ab10: 2f2e fffc movel %fp@(-4),%sp@- 4ab14: 4e93 jsr %a3@ 4ab16: 4fef 001c lea %sp@(28),%sp } 4ab1a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4ab20: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00057e74 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 57e74: 4e56 ffe4 linkw %fp,#-28 57e78: 2039 0007 6278 movel 76278 <_Thread_Dispatch_disable_level>,%d0 57e7e: 5280 addql #1,%d0 57e80: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 57e84: 266e 0008 moveal %fp@(8),%a3 57e88: 23c0 0007 6278 movel %d0,76278 <_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(); 57e8e: 2f39 0007 632a movel 7632a <_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 ); 57e94: 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 ); 57e96: 280b movel %a3,%d4 57e98: 0682 0000 0010 addil #16,%d2 57e9e: 0684 0000 0068 addil #104,%d4 57ea4: 4bf9 0005 31ac lea 531ac <_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 ); 57eaa: 49f9 0005 856c lea 5856c <_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(); 57eb0: 4eb9 0005 27dc jsr 527dc <_API_Mutex_Unlock> 57eb6: 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 ); 57eb8: 263c 0005 8670 movel #362096,%d3 57ebe: 2f02 movel %d2,%sp@- 57ec0: 2043 moveal %d3,%a0 57ec2: 4e90 jsr %a0@ if ( the_thread == NULL ) 57ec4: 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 ); 57ec6: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 57ec8: 4a80 tstl %d0 57eca: 672c beqs 57ef8 <_Region_Process_queue+0x84> 57ecc: 42a7 clrl %sp@- 57ece: 42a7 clrl %sp@- 57ed0: 2f2a 0024 movel %a2@(36),%sp@- 57ed4: 2f04 movel %d4,%sp@- 57ed6: 4e95 jsr %a5@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 57ed8: 4fef 0010 lea %sp@(16),%sp 57edc: 4a80 tstl %d0 57ede: 6718 beqs 57ef8 <_Region_Process_queue+0x84> break; *(void **)the_thread->Wait.return_argument = the_segment; 57ee0: 206a 0028 moveal %a2@(40),%a0 the_region->number_of_used_blocks += 1; 57ee4: 52ab 0064 addql #1,%a3@(100) ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; 57ee8: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 57eea: 2f0a movel %a2,%sp@- 57eec: 2f02 movel %d2,%sp@- 57eee: 4e94 jsr %a4@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 57ef0: 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; 57ef2: 42aa 0034 clrl %a2@(52) } 57ef6: 60c6 bras 57ebe <_Region_Process_queue+0x4a> _Thread_Enable_dispatch(); } 57ef8: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 57efe: 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(); 57f00: 4ef9 0005 47f6 jmp 547f6 <_Thread_Enable_dispatch> ... =============================================================================== 00046170 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46170: 4e56 0000 linkw %fp,#0 46174: 206e 0008 moveal %fp@(8),%a0 46178: 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(); 4617a: 2039 0005 e610 movel 5e610 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46180: 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) || 46182: 4a88 tstl %a0 46184: 6762 beqs 461e8 <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 46186: 243c 000f 4240 movel #1000000,%d2 4618c: 4c40 2002 remul %d0,%d2,%d2 46190: b4a8 0018 cmpl %a0@(24),%d2 46194: 6352 blss 461e8 <_TOD_Validate+0x78> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 46196: 763b moveq #59,%d3 46198: b6a8 0014 cmpl %a0@(20),%d3 4619c: 654a bcss 461e8 <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 4619e: b6a8 0010 cmpl %a0@(16),%d3 461a2: 6544 bcss 461e8 <_TOD_Validate+0x78> (the_tod->hour >= TOD_HOURS_PER_DAY) || 461a4: 7017 moveq #23,%d0 461a6: b0a8 000c cmpl %a0@(12),%d0 461aa: 653c bcss 461e8 <_TOD_Validate+0x78> (the_tod->month == 0) || 461ac: 2028 0004 movel %a0@(4),%d0 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) || 461b0: 6736 beqs 461e8 <_TOD_Validate+0x78> <== NEVER TAKEN 461b2: 720c moveq #12,%d1 461b4: b280 cmpl %d0,%d1 461b6: 6530 bcss 461e8 <_TOD_Validate+0x78> (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) || 461b8: 2410 movel %a0@,%d2 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) || 461ba: 0c82 0000 07c3 cmpil #1987,%d2 461c0: 6326 blss 461e8 <_TOD_Validate+0x78> (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) || (the_tod->day == 0) ) 461c2: 2228 0008 movel %a0@(8),%d1 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) || 461c6: 6720 beqs 461e8 <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 461c8: 163c 0003 moveb #3,%d3 461cc: 41f9 0005 d3c2 lea 5d3c2 <_TOD_Days_per_month>,%a0 461d2: c483 andl %d3,%d2 461d4: 6606 bnes 461dc <_TOD_Validate+0x6c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 461d6: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0 461da: 6004 bras 461e0 <_TOD_Validate+0x70> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 461dc: 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( 461e0: b081 cmpl %d1,%d0 461e2: 54c0 scc %d0 461e4: 4480 negl %d0 461e6: 6002 bras 461ea <_TOD_Validate+0x7a> 461e8: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 461ea: 241f movel %sp@+,%d2 461ec: 261f movel %sp@+,%d3 461ee: 4e5e unlk %fp ... =============================================================================== 00047138 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47138: 4e56 fff0 linkw %fp,#-16 4713c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 47140: 246e 0008 moveal %fp@(8),%a2 /* * 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 ); 47144: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47146: 262e 000c movel %fp@(12),%d3 */ /* * Save original state */ original_state = the_thread->current_state; 4714a: 242a 0010 movel %a2@(16),%d2 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4714e: 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 ); 47152: 4eb9 0004 7f20 jsr 47f20 <_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 ) 47158: 588f addql #4,%sp 4715a: b6aa 0014 cmpl %a2@(20),%d3 4715e: 670c beqs 4716c <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 47160: 2f03 movel %d3,%sp@- 47162: 2f0a movel %a2,%sp@- 47164: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Set_priority> 4716a: 508f addql #8,%sp _ISR_Disable( level ); 4716c: 223c 0000 0700 movel #1792,%d1 47172: 40c0 movew %sr,%d0 47174: 8280 orl %d0,%d1 47176: 46c1 movew %d1,%sr 47178: 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; 4717a: 222a 0010 movel %a2@(16),%d1 4717e: c483 andl %d3,%d2 if ( state != STATES_TRANSIENT ) { 47180: b681 cmpl %d1,%d3 47182: 6730 beqs 471b4 <_Thread_Change_priority+0x7c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 47184: 4a82 tstl %d2 47186: 6608 bnes 47190 <_Thread_Change_priority+0x58> <== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 47188: 74fb moveq #-5,%d2 4718a: c481 andl %d1,%d2 4718c: 2542 0010 movel %d2,%a2@(16) _ISR_Enable( level ); 47190: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( state ) ) { 47192: 0281 0003 bee0 andil #245472,%d1 47198: 6700 00d2 beqw 4726c <_Thread_Change_priority+0x134> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 4719c: 2d4a 000c movel %a2,%fp@(12) 471a0: 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 ); } 471a6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 471ac: 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 ); 471ae: 4ef9 0004 7d2c jmp 47d2c <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 471b4: 4a82 tstl %d2 471b6: 6650 bnes 47208 <_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; 471b8: 226a 008e moveal %a2@(142),%a1 471bc: 322a 0094 movew %a2@(148),%d1 471c0: 3411 movew %a1@,%d2 471c2: 206a 008a moveal %a2@(138),%a0 471c6: 8282 orl %d2,%d1 * 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 ); 471c8: 42aa 0010 clrl %a2@(16) 471cc: 3281 movew %d1,%a1@ _Priority_Major_bit_map |= the_priority_map->ready_major; 471ce: 3239 0005 dccc movew 5dccc <_Priority_Major_bit_map>,%d1 471d4: 342a 0092 movew %a2@(146),%d2 471d8: 8282 orl %d2,%d1 471da: 33c1 0005 dccc movew %d1,5dccc <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 471e0: 4a04 tstb %d4 471e2: 6710 beqs 471f4 <_Thread_Change_priority+0xbc> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 471e4: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 471e6: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 471ea: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 471ec: 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; 471f0: 2489 movel %a1,%a2@ 471f2: 6014 bras 47208 <_Thread_Change_priority+0xd0> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 471f4: 2608 movel %a0,%d3 471f6: 5883 addql #4,%d3 471f8: 2483 movel %d3,%a2@ old_last_node = the_chain->last; 471fa: 2268 0008 moveal %a0@(8),%a1 the_chain->last = the_node; 471fe: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 47202: 2549 0004 movel %a1,%a2@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 47206: 228a movel %a2,%a1@ _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 47208: 223c 0000 0700 movel #1792,%d1 4720e: 46c0 movew %d0,%sr 47210: 8280 orl %d0,%d1 47212: 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 ); 47214: 3239 0005 dccc movew 5dccc <_Priority_Major_bit_map>,%d1 4721a: 4841 swap %d1 4721c: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4721e: 4282 clrl %d2 47220: 41f9 0005 dd38 lea 5dd38 <_Priority_Bit_map>,%a0 47226: 3401 movew %d1,%d2 47228: 3230 2a00 movew %a0@(00000000,%d2:l:2),%d1 4722c: 4841 swap %d1 4722e: 04c1 ff1 %d1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 47230: 4283 clrl %d3 47232: e98a lsll #4,%d2 47234: 3601 movew %d1,%d3 47236: 2279 0005 dbc8 moveal 5dbc8 <_Thread_Ready_chain>,%a1 4723c: 2202 movel %d2,%d1 4723e: d283 addl %d3,%d1 47240: 2401 movel %d1,%d2 47242: e58a lsll #2,%d2 47244: e989 lsll #4,%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 ); 47246: 2079 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4724c: 93c2 subal %d2,%a1 4724e: 2231 1800 movel %a1@(00000000,%d1:l),%d1 47252: 23c1 0005 dcaa movel %d1,5dcaa <_Thread_Heir> * 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() && 47258: b288 cmpl %a0,%d1 4725a: 670e beqs 4726a <_Thread_Change_priority+0x132> _Thread_Executing->is_preemptible ) 4725c: 4a28 0075 tstb %a0@(117) 47260: 6708 beqs 4726a <_Thread_Change_priority+0x132> _Context_Switch_necessary = true; 47262: 7201 moveq #1,%d1 47264: 13c1 0005 dce6 moveb %d1,5dce6 <_Context_Switch_necessary> _ISR_Enable( level ); 4726a: 46c0 movew %d0,%sr } 4726c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47272: 4e5e unlk %fp ... =============================================================================== 00047278 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 47278: 4e56 ffec linkw %fp,#-20 4727c: 206e 0008 moveal %fp@(8),%a0 47280: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 47284: 263c 0000 0700 movel #1792,%d3 4728a: 2203 movel %d3,%d1 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 4728c: 202e 000c movel %fp@(12),%d0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 47290: 40c2 movew %sr,%d2 47292: 8282 orl %d2,%d1 47294: 46c1 movew %d1,%sr current_state = the_thread->current_state; 47296: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 4729a: 2800 movel %d0,%d4 4729c: c881 andl %d1,%d4 4729e: 6778 beqs 47318 <_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); 472a0: 4680 notl %d0 472a2: c081 andl %d1,%d0 current_state = 472a4: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 472a8: 666e bnes 47318 <_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; 472aa: 2668 008e moveal %a0@(142),%a3 472ae: 3028 0094 movew %a0@(148),%d0 472b2: 3213 movew %a3@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 472b4: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 472b8: 2809 movel %a1,%d4 472ba: 5884 addql #4,%d4 472bc: 8081 orl %d1,%d0 472be: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 472c0: 2469 0008 moveal %a1@(8),%a2 472c4: 3680 movew %d0,%a3@ the_chain->last = the_node; 472c6: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 472ca: 3039 0005 dccc movew 5dccc <_Priority_Major_bit_map>,%d0 472d0: 3228 0092 movew %a0@(146),%d1 old_last_node->next = the_node; the_node->previous = old_last_node; 472d4: 214a 0004 movel %a2,%a0@(4) 472d8: 8081 orl %d1,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 472da: 2488 movel %a0,%a2@ 472dc: 33c0 0005 dccc movew %d0,5dccc <_Priority_Major_bit_map> _ISR_Flash( level ); 472e2: 2003 movel %d3,%d0 472e4: 46c2 movew %d2,%sr 472e6: 8082 orl %d2,%d0 472e8: 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 ) { 472ea: 2028 0014 movel %a0@(20),%d0 472ee: 2279 0005 dcaa moveal 5dcaa <_Thread_Heir>,%a1 472f4: b0a9 0014 cmpl %a1@(20),%d0 472f8: 641e bccs 47318 <_Thread_Clear_state+0xa0> _Thread_Heir = the_thread; 472fa: 23c8 0005 dcaa movel %a0,5dcaa <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 47300: 2079 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a0 47306: 4a28 0075 tstb %a0@(117) 4730a: 6604 bnes 47310 <_Thread_Clear_state+0x98> 4730c: 4a80 tstl %d0 4730e: 6608 bnes 47318 <_Thread_Clear_state+0xa0> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47310: 7001 moveq #1,%d0 47312: 13c0 0005 dce6 moveb %d0,5dce6 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 47318: 46c2 movew %d2,%sr } 4731a: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4731e: 4e5e unlk %fp ... =============================================================================== 000474a4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 474a4: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 474a8: 486e fffc pea %fp@(-4) 474ac: 2f2e 0008 movel %fp@(8),%sp@- 474b0: 4eb9 0004 7658 jsr 47658 <_Thread_Get> switch ( location ) { 474b6: 508f addql #8,%sp 474b8: 4aae fffc tstl %fp@(-4) 474bc: 661e bnes 474dc <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 474be: 2f3c 1000 0018 movel #268435480,%sp@- 474c4: 2f00 movel %d0,%sp@- 474c6: 4eb9 0004 7278 jsr 47278 <_Thread_Clear_state> 474cc: 508f addql #8,%sp 474ce: 2039 0005 dc1c movel 5dc1c <_Thread_Dispatch_disable_level>,%d0 474d4: 5380 subql #1,%d0 474d6: 23c0 0005 dc1c movel %d0,5dc1c <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 474dc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000474e0 <_Thread_Dispatch>: Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 474e0: 307c 0700 moveaw #1792,%a0 474e4: 2208 movel %a0,%d1 * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 474e6: 4e56 ffc8 linkw %fp,#-56 474ea: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 474ee: 2479 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a2 _ISR_Disable( level ); 474f4: 40c0 movew %sr,%d0 474f6: 8280 orl %d0,%d1 474f8: 46c1 movew %d1,%sr _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 474fa: 260e movel %fp,%d3 _Timestamp_Subtract( 474fc: 240e movel %fp,%d2 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 474fe: 5183 subql #8,%d3 _Timestamp_Subtract( 47500: 0682 ffff fff0 addil #-16,%d2 47506: 2e3c 0004 8294 movel #295572,%d7 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 4750c: 2c3c 0004 825c movel #295516,%d6 if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 47512: 2a3c 0004 850c movel #296204,%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 ); 47518: 4bf9 0004 897c lea 4897c <_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 ); 4751e: 49f9 0004 895a lea 4895a <_CPU_Context_save_fp>,%a4 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 47524: 283c 0004 8824 movel #296996,%d4 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 4752a: 6000 00d0 braw 475fc <_Thread_Dispatch+0x11c> heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 4752e: 7201 moveq #1,%d1 47530: 23c1 0005 dc1c movel %d1,5dc1c <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 47536: 2679 0005 dcaa moveal 5dcaa <_Thread_Heir>,%a3 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 4753c: 4201 clrb %d1 _Thread_Executing = heir; 4753e: 23cb 0005 dcd6 movel %a3,5dcd6 <_Thread_Executing> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 47544: 13c1 0005 dce6 moveb %d1,5dce6 <_Context_Switch_necessary> _Thread_Executing = heir; #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 ) 4754a: 7201 moveq #1,%d1 4754c: b2ab 007a cmpl %a3@(122),%d1 47550: 660a bnes 4755c <_Thread_Dispatch+0x7c> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 47552: 41f9 0005 dbcc lea 5dbcc <_Thread_Ticks_per_timeslice>,%a0 47558: 2750 0076 movel %a0@,%a3@(118) _ISR_Enable( level ); 4755c: 46c0 movew %d0,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 4755e: 2f03 movel %d3,%sp@- 47560: 4eb9 0004 af00 jsr 4af00 <_TOD_Get_uptime> _Timestamp_Subtract( 47566: 2047 moveal %d7,%a0 47568: 2f02 movel %d2,%sp@- 4756a: 2f03 movel %d3,%sp@- 4756c: 4879 0005 dcde pea 5dcde <_Thread_Time_of_last_context_switch> 47572: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 47574: 2046 moveal %d6,%a0 47576: 2f02 movel %d2,%sp@- 47578: 486a 0082 pea %a2@(130) 4757c: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 4757e: 2079 0005 dca6 moveal 5dca6 <_Thread_libc_reent>,%a0 47584: 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; 47588: 202e fff8 movel %fp@(-8),%d0 4758c: 222e fffc movel %fp@(-4),%d1 47590: 23c0 0005 dcde movel %d0,5dcde <_Thread_Time_of_last_context_switch> 47596: 23c1 0005 dce2 movel %d1,5dce2 <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 4759c: 4a88 tstl %a0 4759e: 6708 beqs 475a8 <_Thread_Dispatch+0xc8> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 475a0: 2550 0104 movel %a0@,%a2@(260) *_Thread_libc_reent = heir->libc_reent; 475a4: 20ab 0104 movel %a3@(260),%a0@ } _User_extensions_Thread_switch( executing, heir ); 475a8: 2f0b movel %a3,%sp@- 475aa: 2045 moveal %d5,%a0 475ac: 2f0a movel %a2,%sp@- 475ae: 4e90 jsr %a0@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 475b0: 486b 00cc pea %a3@(204) 475b4: 2044 moveal %d4,%a0 475b6: 486a 00cc pea %a2@(204) 475ba: 4e90 jsr %a0@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 475bc: 4fef 0010 lea %sp@(16),%sp 475c0: 4aaa 0100 tstl %a2@(256) 475c4: 6724 beqs 475ea <_Thread_Dispatch+0x10a> #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 ); 475c6: 2079 0005 dca2 moveal 5dca2 <_Thread_Allocated_fp>,%a0 475cc: b1ca cmpal %a2,%a0 475ce: 671a beqs 475ea <_Thread_Dispatch+0x10a> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 475d0: 4a88 tstl %a0 475d2: 6708 beqs 475dc <_Thread_Dispatch+0xfc> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 475d4: 4868 0100 pea %a0@(256) 475d8: 4e94 jsr %a4@ 475da: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 475dc: 486a 0100 pea %a2@(256) 475e0: 4e95 jsr %a5@ _Thread_Allocated_fp = executing; 475e2: 588f addql #4,%sp 475e4: 23ca 0005 dca2 movel %a2,5dca2 <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 475ea: 2479 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a2 _ISR_Disable( level ); 475f0: 223c 0000 0700 movel #1792,%d1 475f6: 40c0 movew %sr,%d0 475f8: 8280 orl %d0,%d1 475fa: 46c1 movew %d1,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 475fc: 1239 0005 dce6 moveb 5dce6 <_Context_Switch_necessary>,%d1 47602: 6600 ff2a bnew 4752e <_Thread_Dispatch+0x4e> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 47606: 42b9 0005 dc1c clrl 5dc1c <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 4760c: 46c0 movew %d0,%sr if ( _Thread_Do_post_task_switch_extension || 4760e: 4ab9 0005 dcbe tstl 5dcbe <_Thread_Do_post_task_switch_extension> 47614: 6606 bnes 4761c <_Thread_Dispatch+0x13c> <== NEVER TAKEN executing->do_post_task_switch_extension ) { 47616: 4a2a 0074 tstb %a2@(116) 4761a: 670c beqs 47628 <_Thread_Dispatch+0x148> executing->do_post_task_switch_extension = false; 4761c: 4200 clrb %d0 4761e: 1540 0074 moveb %d0,%a2@(116) _API_extensions_Run_postswitch(); 47622: 4eb9 0004 5fba jsr 45fba <_API_extensions_Run_postswitch> } } 47628: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4762e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cef0 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 4cef0: 4e56 0000 linkw %fp,#0 Thread_Control *executing; executing = _Thread_Executing; 4cef4: 2079 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4cefa: 4aa8 0010 tstl %a0@(16) 4cefe: 660e bnes 4cf0e <_Thread_Evaluate_mode+0x1e> <== NEVER TAKEN 4cf00: b1f9 0005 dcaa cmpal 5dcaa <_Thread_Heir>,%a0 4cf06: 6710 beqs 4cf18 <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4cf08: 4a28 0075 tstb %a0@(117) 4cf0c: 670a beqs 4cf18 <_Thread_Evaluate_mode+0x28> <== NEVER TAKEN _Context_Switch_necessary = true; 4cf0e: 7001 moveq #1,%d0 4cf10: 13c0 0005 dce6 moveb %d0,5dce6 <_Context_Switch_necessary> return true; 4cf16: 6002 bras 4cf1a <_Thread_Evaluate_mode+0x2a> 4cf18: 4200 clrb %d0 } return false; } 4cf1a: 4e5e unlk %fp ... =============================================================================== 0004cf20 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4cf20: 4e56 0000 linkw %fp,#0 4cf24: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4cf26: 2479 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4cf2c: 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; 4cf2e: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4cf32: 40c0 movew %sr,%d0 4cf34: e189 lsll #8,%d1 4cf36: 0280 0000 f8ff andil #63743,%d0 4cf3c: 8081 orl %d1,%d0 4cf3e: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4cf40: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4cf42: 1439 0005 d3d4 moveb 5d3d4 ,%d2 doneConstructors = 1; 4cf48: 13c0 0005 d3d4 moveb %d0,5d3d4 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4cf4e: 4aaa 0100 tstl %a2@(256) 4cf52: 6720 beqs 4cf74 <_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 ); 4cf54: 2079 0005 dca2 moveal 5dca2 <_Thread_Allocated_fp>,%a0 4cf5a: b1ca cmpal %a2,%a0 4cf5c: 6716 beqs 4cf74 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4cf5e: 4a88 tstl %a0 4cf60: 670c beqs 4cf6e <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4cf62: 4868 0100 pea %a0@(256) 4cf66: 4eb9 0004 895a jsr 4895a <_CPU_Context_save_fp> 4cf6c: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4cf6e: 23ca 0005 dca2 movel %a2,5dca2 <_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 ); 4cf74: 2f0a movel %a2,%sp@- 4cf76: 4eb9 0004 838c jsr 4838c <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4cf7c: 4eb9 0004 7632 jsr 47632 <_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) */ { 4cf82: 588f addql #4,%sp 4cf84: 4a02 tstb %d2 4cf86: 6606 bnes 4cf8e <_Thread_Handler+0x6e> INIT_NAME (); 4cf88: 4eb9 0005 a7ec jsr 5a7ec <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4cf8e: 4aaa 009e tstl %a2@(158) 4cf92: 6610 bnes 4cfa4 <_Thread_Handler+0x84> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4cf94: 2f2a 00a6 movel %a2@(166),%sp@- 4cf98: 206a 009a moveal %a2@(154),%a0 4cf9c: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4cf9e: 588f addql #4,%sp 4cfa0: 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 ); 4cfa4: 2f0a movel %a2,%sp@- 4cfa6: 4eb9 0004 83c4 jsr 483c4 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4cfac: 4878 0006 pea 6 4cfb0: 4878 0001 pea 1 4cfb4: 42a7 clrl %sp@- 4cfb6: 4eb9 0004 68d4 jsr 468d4 <_Internal_error_Occurred> =============================================================================== 000476e4 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 476e4: 4e56 ffec linkw %fp,#-20 476e8: 48d7 043c moveml %d2-%d5/%a2,%sp@ 476ec: 242e 0014 movel %fp@(20),%d2 476f0: 246e 000c moveal %fp@(12),%a2 /* * 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 ); 476f4: 2f02 movel %d2,%sp@- Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 476f6: 262e 0018 movel %fp@(24),%d3 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 476fa: 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 ) { 476fe: 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; 47702: 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 ) { 47706: 1a2e 0023 moveb %fp@(35),%d5 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 4770a: 42aa 0110 clrl %a2@(272) extensions_area = NULL; the_thread->libc_reent = NULL; 4770e: 42aa 0104 clrl %a2@(260) /* * 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 ); 47712: 2f0a movel %a2,%sp@- 47714: 4eb9 0004 7f9c jsr 47f9c <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 4771a: 508f addql #8,%sp 4771c: 4a80 tstl %d0 4771e: 6700 015a beqw 4787a <_Thread_Initialize+0x196> 47722: b480 cmpl %d0,%d2 47724: 6200 0154 bhiw 4787a <_Thread_Initialize+0x196> void *starting_address, size_t size ) { the_stack->area = starting_address; the_stack->size = size; 47728: 2540 00bc movel %d0,%a2@(188) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 4772c: 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 ) { 47732: 4a03 tstb %d3 47734: 6604 bnes 4773a <_Thread_Initialize+0x56> 47736: 4283 clrl %d3 47738: 6016 bras 47750 <_Thread_Initialize+0x6c> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 4773a: 4878 001c pea 1c 4773e: 4eb9 0004 878c jsr 4878c <_Workspace_Allocate> if ( !fp_area ) 47744: 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 ); 47746: 2600 movel %d0,%d3 if ( !fp_area ) 47748: 6606 bnes 47750 <_Thread_Initialize+0x6c> 4774a: 4282 clrl %d2 4774c: 6000 00c6 braw 47814 <_Thread_Initialize+0x130> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47750: 2039 0005 dcba movel 5dcba <_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; 47756: 2543 0100 movel %d3,%a2@(256) the_thread->Start.fp_context = fp_area; 4775a: 2543 00c4 movel %d3,%a2@(196) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4775e: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 47762: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 47766: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 4776a: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 4776e: 4a80 tstl %d0 47770: 6604 bnes 47776 <_Thread_Initialize+0x92> 47772: 4282 clrl %d2 47774: 6016 bras 4778c <_Thread_Initialize+0xa8> extensions_area = _Workspace_Allocate( 47776: e588 lsll #2,%d0 47778: 2040 moveal %d0,%a0 4777a: 4868 0004 pea %a0@(4) 4777e: 4eb9 0004 878c jsr 4878c <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 47784: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 47786: 2400 movel %d0,%d2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 47788: 6700 008a beqw 47814 <_Thread_Initialize+0x130> goto failed; } the_thread->extensions = (void **) extensions_area; 4778c: 2542 0114 movel %d2,%a2@(276) * 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 ) { 47790: 6718 beqs 477aa <_Thread_Initialize+0xc6> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 47792: 2239 0005 dcba movel 5dcba <_Thread_Maximum_extensions>,%d1 47798: 4280 clrl %d0 4779a: 600a bras 477a6 <_Thread_Initialize+0xc2> the_thread->extensions[i] = NULL; 4779c: 206a 0114 moveal %a2@(276),%a0 477a0: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 477a4: 5280 addql #1,%d0 477a6: b280 cmpl %d0,%d1 477a8: 64f2 bccs 4779c <_Thread_Initialize+0xb8> #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 477aa: 2f04 movel %d4,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 477ac: 256e 002c 00b4 movel %fp@(44),%a2@(180) the_thread->current_state = STATES_DORMANT; 477b2: 7001 moveq #1,%d0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 477b4: 256e 0024 00ac movel %fp@(36),%a2@(172) the_thread->Start.budget_callout = budget_callout; 477ba: 256e 0028 00b0 movel %fp@(40),%a2@(176) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 477c0: 1545 00aa moveb %d5,%a2@(170) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 477c4: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 477c6: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 477ca: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 477ce: 42aa 001c clrl %a2@(28) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 477d2: 2544 0018 movel %d4,%a2@(24) the_thread->Start.initial_priority = priority; 477d6: 2544 00b8 movel %d4,%a2@(184) _Thread_Set_priority( the_thread, priority ); 477da: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 477e0: 206e 0008 moveal %fp@(8),%a0 477e4: 4280 clrl %d0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 477e6: 256e 0030 000c movel %fp@(48),%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 477ec: 2068 0018 moveal %a0@(24),%a0 477f0: 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 ); 477f4: 42aa 0082 clrl %a2@(130) 477f8: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 477fc: 42aa 0086 clrl %a2@(134) * 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 ); 47800: 2f0a movel %a2,%sp@- 47802: 4eb9 0004 8448 jsr 48448 <_User_extensions_Thread_create> if ( extension_status ) 47808: 4fef 000c lea %sp@(12),%sp 4780c: 4a00 tstb %d0 4780e: 6704 beqs 47814 <_Thread_Initialize+0x130> 47810: 7001 moveq #1,%d0 47812: 6068 bras 4787c <_Thread_Initialize+0x198> return true; failed: if ( the_thread->libc_reent ) 47814: 202a 0104 movel %a2@(260),%d0 47818: 670a beqs 47824 <_Thread_Initialize+0x140> _Workspace_Free( the_thread->libc_reent ); 4781a: 2f00 movel %d0,%sp@- 4781c: 4eb9 0004 87a8 jsr 487a8 <_Workspace_Free> 47822: 588f addql #4,%sp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 47824: 202a 0108 movel %a2@(264),%d0 47828: 670a beqs 47834 <_Thread_Initialize+0x150> _Workspace_Free( the_thread->API_Extensions[i] ); 4782a: 2f00 movel %d0,%sp@- 4782c: 4eb9 0004 87a8 jsr 487a8 <_Workspace_Free> 47832: 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] ) 47834: 202a 010c movel %a2@(268),%d0 47838: 670a beqs 47844 <_Thread_Initialize+0x160> <== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 4783a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4783c: 4eb9 0004 87a8 jsr 487a8 <_Workspace_Free> <== NOT EXECUTED 47842: 588f addql #4,%sp <== NOT EXECUTED 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] ) 47844: 202a 0110 movel %a2@(272),%d0 47848: 670a beqs 47854 <_Thread_Initialize+0x170> <== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 4784a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4784c: 4eb9 0004 87a8 jsr 487a8 <_Workspace_Free> <== NOT EXECUTED 47852: 588f addql #4,%sp <== NOT EXECUTED if ( extensions_area ) 47854: 4a82 tstl %d2 47856: 670a beqs 47862 <_Thread_Initialize+0x17e> (void) _Workspace_Free( extensions_area ); 47858: 2f02 movel %d2,%sp@- 4785a: 4eb9 0004 87a8 jsr 487a8 <_Workspace_Free> 47860: 588f addql #4,%sp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 47862: 4a83 tstl %d3 47864: 670a beqs 47870 <_Thread_Initialize+0x18c> (void) _Workspace_Free( fp_area ); 47866: 2f03 movel %d3,%sp@- 47868: 4eb9 0004 87a8 jsr 487a8 <_Workspace_Free> 4786e: 588f addql #4,%sp #endif _Thread_Stack_Free( the_thread ); 47870: 2f0a movel %a2,%sp@- 47872: 4eb9 0004 7fe8 jsr 47fe8 <_Thread_Stack_Free> return false; 47878: 588f addql #4,%sp 4787a: 4200 clrb %d0 } 4787c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 47882: 4e5e unlk %fp ... =============================================================================== 0004b5b8 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4b5b8: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4b5bc: 2079 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4b5c2: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 4b5c6: 243c 0000 0700 movel #1792,%d2 4b5cc: 2202 movel %d2,%d1 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 4b5ce: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4b5d2: 40c0 movew %sr,%d0 4b5d4: 8280 orl %d0,%d1 4b5d6: 46c1 movew %d1,%sr if ( _Chain_Has_only_one_node( ready ) ) { 4b5d8: 2229 0008 movel %a1@(8),%d1 4b5dc: b291 cmpl %a1@,%d1 4b5de: 6604 bnes 4b5e4 <_Thread_Reset_timeslice+0x2c> _ISR_Enable( level ); 4b5e0: 46c0 movew %d0,%sr return; 4b5e2: 6040 bras 4b624 <_Thread_Reset_timeslice+0x6c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4b5e4: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4b5e6: 2209 movel %a1,%d1 4b5e8: 5881 addql #4,%d1 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4b5ea: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4b5ee: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4b5f0: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4b5f4: 2081 movel %d1,%a0@ old_last_node = the_chain->last; 4b5f6: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4b5fa: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4b5fe: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4b602: 2488 movel %a0,%a2@ } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4b604: 2202 movel %d2,%d1 4b606: 46c0 movew %d0,%sr 4b608: 8280 orl %d0,%d1 4b60a: 46c1 movew %d1,%sr if ( _Thread_Is_heir( executing ) ) 4b60c: b1f9 0005 dcaa cmpal 5dcaa <_Thread_Heir>,%a0 4b612: 6606 bnes 4b61a <_Thread_Reset_timeslice+0x62> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 4b614: 23d1 0005 dcaa movel %a1@,5dcaa <_Thread_Heir> _Context_Switch_necessary = true; 4b61a: 7201 moveq #1,%d1 4b61c: 13c1 0005 dce6 moveb %d1,5dce6 <_Context_Switch_necessary> _ISR_Enable( level ); 4b622: 46c0 movew %d0,%sr } 4b624: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4b628: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004853c <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 4853c: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4853e: 4e56 0000 linkw %fp,#0 48542: 2f0a movel %a2,%sp@- 48544: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 48548: c0aa 0010 andl %a2@(16),%d0 4854c: 4a00 tstb %d0 4854e: 6704 beqs 48554 <_Thread_Restart+0x18> 48550: 4200 clrb %d0 48552: 6064 bras 485b8 <_Thread_Restart+0x7c> _Thread_Set_transient( the_thread ); 48554: 2f0a movel %a2,%sp@- 48556: 4eb9 0004 8718 jsr 48718 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 4855c: 2f2e 0010 movel %fp@(16),%sp@- 48560: 2f2e 000c movel %fp@(12),%sp@- 48564: 2f0a movel %a2,%sp@- 48566: 4eb9 0004 bdf0 jsr 4bdf0 <_Thread_Reset> _Thread_Load_environment( the_thread ); 4856c: 2f0a movel %a2,%sp@- 4856e: 4eb9 0004 ba8c jsr 4ba8c <_Thread_Load_environment> _Thread_Ready( the_thread ); 48574: 2f0a movel %a2,%sp@- 48576: 4eb9 0004 bd30 jsr 4bd30 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 4857c: 2f0a movel %a2,%sp@- 4857e: 4eb9 0004 8cc4 jsr 48cc4 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 48584: 4fef 001c lea %sp@(28),%sp 48588: b5f9 0005 e7ce cmpal 5e7ce <_Thread_Executing>,%a2 4858e: 6626 bnes 485b6 <_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 ) 48590: 4aaa 0100 tstl %a2@(256) 48594: 670c beqs 485a2 <_Thread_Restart+0x66> _Context_Restore_fp( &_Thread_Executing->fp_context ); 48596: 486a 0100 pea %a2@(256) 4859a: 4eb9 0004 91b4 jsr 491b4 <_CPU_Context_restore_fp> 485a0: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 485a2: 2079 0005 e7ce moveal 5e7ce <_Thread_Executing>,%a0 485a8: 41e8 00cc lea %a0@(204),%a0 485ac: 2f08 movel %a0,%sp@- 485ae: 4eb9 0004 9072 jsr 49072 <_CPU_Context_Restart_self> 485b4: 588f addql #4,%sp <== NOT EXECUTED 485b6: 7001 moveq #1,%d0 return true; } return false; } 485b8: 246e fffc moveal %fp@(-4),%a2 485bc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004acb0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4acb0: 4e56 ffec linkw %fp,#-20 4acb4: 206e 0008 moveal %fp@(8),%a0 4acb8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4acbc: 243c 0000 0700 movel #1792,%d2 4acc2: 2002 movel %d2,%d0 4acc4: 40c1 movew %sr,%d1 4acc6: 8081 orl %d1,%d0 4acc8: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4acca: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4acce: 0800 0001 btst #1,%d0 4acd2: 6778 beqs 4ad4c <_Thread_Resume+0x9c> <== NEVER TAKEN 4acd4: 76fd moveq #-3,%d3 4acd6: c083 andl %d3,%d0 current_state = 4acd8: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4acdc: 666e bnes 4ad4c <_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; 4acde: 2668 008e moveal %a0@(142),%a3 4ace2: 3028 0094 movew %a0@(148),%d0 4ace6: 3613 movew %a3@,%d3 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4ace8: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4acec: 2809 movel %a1,%d4 4acee: 5884 addql #4,%d4 4acf0: 8083 orl %d3,%d0 4acf2: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 4acf4: 2469 0008 moveal %a1@(8),%a2 4acf8: 3680 movew %d0,%a3@ the_chain->last = the_node; 4acfa: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4acfe: 3039 0006 1004 movew 61004 <_Priority_Major_bit_map>,%d0 4ad04: 3628 0092 movew %a0@(146),%d3 old_last_node->next = the_node; the_node->previous = old_last_node; 4ad08: 214a 0004 movel %a2,%a0@(4) 4ad0c: 8083 orl %d3,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4ad0e: 2488 movel %a0,%a2@ 4ad10: 33c0 0006 1004 movew %d0,61004 <_Priority_Major_bit_map> _ISR_Flash( level ); 4ad16: 2002 movel %d2,%d0 4ad18: 46c1 movew %d1,%sr 4ad1a: 8081 orl %d1,%d0 4ad1c: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4ad1e: 2028 0014 movel %a0@(20),%d0 4ad22: 2279 0006 0fe2 moveal 60fe2 <_Thread_Heir>,%a1 4ad28: b0a9 0014 cmpl %a1@(20),%d0 4ad2c: 641e bccs 4ad4c <_Thread_Resume+0x9c> _Thread_Heir = the_thread; 4ad2e: 23c8 0006 0fe2 movel %a0,60fe2 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4ad34: 2079 0006 100e moveal 6100e <_Thread_Executing>,%a0 4ad3a: 4a28 0075 tstb %a0@(117) 4ad3e: 6604 bnes 4ad44 <_Thread_Resume+0x94> 4ad40: 4a80 tstl %d0 4ad42: 6608 bnes 4ad4c <_Thread_Resume+0x9c> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4ad44: 7001 moveq #1,%d0 4ad46: 13c0 0006 101e moveb %d0,6101e <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4ad4c: 46c1 movew %d1,%sr } 4ad4e: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4ad52: 4e5e unlk %fp ... =============================================================================== 00047fe8 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 47fe8: 4e56 0000 linkw %fp,#0 47fec: 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 ) 47ff0: 2279 0005 c4e8 moveal 5c4e8 ,%a1 47ff6: 4a89 tstl %a1 47ff8: 670a beqs 48004 <_Thread_Stack_Free+0x1c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 47ffa: 2d68 00c0 0008 movel %a0@(192),%fp@(8) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 48000: 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 ); 48002: 4ed1 jmp %a1@ else _Workspace_Free( the_thread->Start.Initial_stack.area ); 48004: 2d68 00c0 0008 movel %a0@(192),%fp@(8) } 4800a: 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 ); 4800c: 4ef9 0004 87a8 jmp 487a8 <_Workspace_Free> ... =============================================================================== 000481e0 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 481e0: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 481e4: 2079 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 481ea: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 481ee: 243c 0000 0700 movel #1792,%d2 481f4: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 481f6: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 481fa: 40c1 movew %sr,%d1 481fc: 8081 orl %d1,%d0 481fe: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 48200: 2029 0008 movel %a1@(8),%d0 48204: b091 cmpl %a1@,%d0 48206: 6738 beqs 48240 <_Thread_Yield_processor+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48208: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4820a: 2009 movel %a1,%d0 4820c: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4820e: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 48212: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48214: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48218: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 4821a: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4821e: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 48222: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 48226: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 48228: 2002 movel %d2,%d0 4822a: 46c1 movew %d1,%sr 4822c: 8081 orl %d1,%d0 4822e: 46c0 movew %d0,%sr if ( _Thread_Is_heir( executing ) ) 48230: b1f9 0005 dcaa cmpal 5dcaa <_Thread_Heir>,%a0 48236: 6610 bnes 48248 <_Thread_Yield_processor+0x68> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 48238: 23d1 0005 dcaa movel %a1@,5dcaa <_Thread_Heir> 4823e: 6008 bras 48248 <_Thread_Yield_processor+0x68> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 48240: b1f9 0005 dcaa cmpal 5dcaa <_Thread_Heir>,%a0 48246: 6708 beqs 48250 <_Thread_Yield_processor+0x70> <== ALWAYS TAKEN _Context_Switch_necessary = true; 48248: 7001 moveq #1,%d0 4824a: 13c0 0005 dce6 moveb %d0,5dce6 <_Context_Switch_necessary> _ISR_Enable( level ); 48250: 46c1 movew %d1,%sr } 48252: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48256: 4e5e unlk %fp ... =============================================================================== 000470e8 <_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 ) ) { 470e8: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 470ea: 4e56 0000 linkw %fp,#0 470ee: 202e 0010 movel %fp@(16),%d0 470f2: 2f0a movel %a2,%sp@- 470f4: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 470f8: 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 ) ) { 470fc: b2aa 0050 cmpl %a2@(80),%d1 47100: 6618 bnes 4711a <_Thread_blocking_operation_Cancel+0x32> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 47102: 123c 0003 moveb #3,%d1 47106: 2541 0050 movel %d1,%a2@(80) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4710a: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4710c: 486a 0048 pea %a2@(72) 47110: 4eb9 0004 8660 jsr 48660 <_Watchdog_Remove> 47116: 588f addql #4,%sp 47118: 6002 bras 4711c <_Thread_blocking_operation_Cancel+0x34> } else _ISR_Enable( level ); 4711a: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4711c: 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 } 47120: 246e fffc moveal %fp@(-4),%a2 47124: 203c 1003 fff8 movel #268697592,%d0 4712a: 2d40 000c movel %d0,%fp@(12) 4712e: 4e5e unlk %fp 47130: 4ef9 0004 7278 jmp 47278 <_Thread_Clear_state> ... =============================================================================== 00047b3c <_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 ) { 47b3c: 4e56 ffe4 linkw %fp,#-28 47b40: 206e 000c moveal %fp@(12),%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47b44: 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; 47b48: 2028 0014 movel %a0@(20),%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 47b4c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 47b50: 2400 movel %d0,%d2 47b52: ec8a lsrl #6,%d2 47b54: 2202 movel %d2,%d1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 47b56: 283c 0000 0700 movel #1792,%d4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 47b5c: e989 lsll #4,%d1 47b5e: 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 ) { 47b60: 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 ]; 47b64: 9282 subl %d2,%d1 47b66: 47f2 1800 lea %a2@(00000000,%d1:l),%a3 47b6a: 2149 0038 movel %a1,%a0@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47b6e: 43e8 0038 lea %a0@(56),%a1 block_state = the_thread_queue->state; 47b72: 2a2a 0038 movel %a2@(56),%d5 47b76: 2149 0040 movel %a1,%a0@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47b7a: 42a8 003c clrl %a0@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 47b7e: 0800 0005 btst #5,%d0 47b82: 6660 bnes 47be4 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 47b84: 2c0b movel %a3,%d6 47b86: 5886 addql #4,%d6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 47b88: 2404 movel %d4,%d2 47b8a: 40c1 movew %sr,%d1 47b8c: 8481 orl %d1,%d2 47b8e: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->first; 47b90: 2253 moveal %a3@,%a1 47b92: 76ff moveq #-1,%d3 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 47b94: 601e bras 47bb4 <_Thread_queue_Enqueue_priority+0x78> search_priority = search_thread->current_priority; 47b96: 2629 0014 movel %a1@(20),%d3 if ( priority <= search_priority ) 47b9a: b680 cmpl %d0,%d3 47b9c: 641a bccs 47bb8 <_Thread_queue_Enqueue_priority+0x7c> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 47b9e: 2404 movel %d4,%d2 47ba0: 46c1 movew %d1,%sr 47ba2: 8481 orl %d1,%d2 47ba4: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 47ba6: 2405 movel %d5,%d2 47ba8: c4a9 0010 andl %a1@(16),%d2 47bac: 6604 bnes 47bb2 <_Thread_queue_Enqueue_priority+0x76><== ALWAYS TAKEN _ISR_Enable( level ); 47bae: 46c1 movew %d1,%sr <== NOT EXECUTED goto restart_forward_search; 47bb0: 60d6 bras 47b88 <_Thread_queue_Enqueue_priority+0x4c><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 47bb2: 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 ) ) { 47bb4: bc89 cmpl %a1,%d6 47bb6: 66de bnes 47b96 <_Thread_queue_Enqueue_priority+0x5a> 47bb8: 2401 movel %d1,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 47bba: 7801 moveq #1,%d4 47bbc: b8aa 0030 cmpl %a2@(48),%d4 47bc0: 6600 00a4 bnew 47c66 <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 47bc4: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 47bc8: b680 cmpl %d0,%d3 47bca: 677e beqs 47c4a <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 47bcc: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 47bd0: 2089 movel %a1,%a0@ the_node->previous = previous_node; 47bd2: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47bd6: 214a 0044 movel %a2,%a0@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 47bda: 2688 movel %a0,%a3@ search_node->previous = the_node; 47bdc: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 47be0: 46c1 movew %d1,%sr 47be2: 6062 bras 47c46 <_Thread_queue_Enqueue_priority+0x10a> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 47be4: 4283 clrl %d3 47be6: 1639 0005 c4c2 moveb 5c4c2 ,%d3 _ISR_Disable( level ); 47bec: 2404 movel %d4,%d2 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 47bee: 5283 addql #1,%d3 _ISR_Disable( level ); 47bf0: 40c1 movew %sr,%d1 47bf2: 8481 orl %d1,%d2 47bf4: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->last; 47bf6: 226b 0008 moveal %a3@(8),%a1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 47bfa: 6020 bras 47c1c <_Thread_queue_Enqueue_priority+0xe0> search_priority = search_thread->current_priority; 47bfc: 2629 0014 movel %a1@(20),%d3 if ( priority >= search_priority ) 47c00: b680 cmpl %d0,%d3 47c02: 631c blss 47c20 <_Thread_queue_Enqueue_priority+0xe4> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 47c04: 2404 movel %d4,%d2 47c06: 46c1 movew %d1,%sr 47c08: 8481 orl %d1,%d2 47c0a: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 47c0c: 2405 movel %d5,%d2 47c0e: c4a9 0010 andl %a1@(16),%d2 47c12: 6604 bnes 47c18 <_Thread_queue_Enqueue_priority+0xdc> _ISR_Enable( level ); 47c14: 46c1 movew %d1,%sr goto restart_reverse_search; 47c16: 60cc bras 47be4 <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *) 47c18: 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 ) ) { 47c1c: b7c9 cmpal %a1,%a3 47c1e: 66dc bnes 47bfc <_Thread_queue_Enqueue_priority+0xc0> 47c20: 2401 movel %d1,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 47c22: 7801 moveq #1,%d4 47c24: b8aa 0030 cmpl %a2@(48),%d4 47c28: 663c bnes 47c66 <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 47c2a: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 47c2e: b680 cmpl %d0,%d3 47c30: 6718 beqs 47c4a <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 47c32: 2651 moveal %a1@,%a3 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 47c34: 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; 47c38: 208b movel %a3,%a0@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47c3a: 214a 0044 movel %a2,%a0@(68) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 47c3e: 2288 movel %a0,%a1@ next_node->previous = the_node; 47c40: 2748 0004 movel %a0,%a3@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 47c44: 46c1 movew %d1,%sr 47c46: 7001 moveq #1,%d0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 47c48: 6026 bras 47c70 <_Thread_queue_Enqueue_priority+0x134> 47c4a: 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; 47c4e: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 47c52: 2089 movel %a1,%a0@ the_node->previous = previous_node; 47c54: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47c58: 214a 0044 movel %a2,%a0@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 47c5c: 2688 movel %a0,%a3@ search_node->previous = the_node; 47c5e: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 47c62: 46c2 movew %d2,%sr 47c64: 60e0 bras 47c46 <_Thread_queue_Enqueue_priority+0x10a> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 47c66: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 47c6a: 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; 47c6e: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 47c70: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 47c74: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cfbc <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4cfbc: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4cfc2: 4e56 0000 linkw %fp,#0 4cfc6: 2f0a movel %a2,%sp@- 4cfc8: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4cfcc: 40c0 movew %sr,%d0 4cfce: 8280 orl %d0,%d1 4cfd0: 46c1 movew %d1,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4cfd2: 222a 0010 movel %a2@(16),%d1 4cfd6: 0281 0003 bee0 andil #245472,%d1 4cfdc: 660a bnes 4cfe8 <_Thread_queue_Extract_fifo+0x2c> _ISR_Enable( level ); 4cfde: 46c0 movew %d0,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cfe0: 246e fffc moveal %fp@(-4),%a2 4cfe4: 4e5e unlk %fp 4cfe6: 4e75 rts ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4cfe8: 2052 moveal %a2@,%a0 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4cfea: 7202 moveq #2,%d1 previous = the_node->previous; 4cfec: 226a 0004 moveal %a2@(4),%a1 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4cff0: 42aa 0044 clrl %a2@(68) next->previous = previous; previous->next = next; 4cff4: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4cff6: 2149 0004 movel %a1,%a0@(4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4cffa: b2aa 0050 cmpl %a2@(80),%d1 4cffe: 6704 beqs 4d004 <_Thread_queue_Extract_fifo+0x48> _ISR_Enable( level ); 4d000: 46c0 movew %d0,%sr 4d002: 6014 bras 4d018 <_Thread_queue_Extract_fifo+0x5c> 4d004: 7203 moveq #3,%d1 4d006: 2541 0050 movel %d1,%a2@(80) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4d00a: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4d00c: 486a 0048 pea %a2@(72) 4d010: 4eb9 0004 8660 jsr 48660 <_Watchdog_Remove> 4d016: 588f addql #4,%sp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4d018: 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 } 4d01c: 246e fffc moveal %fp@(-4),%a2 4d020: 203c 1003 fff8 movel #268697592,%d0 4d026: 2d40 000c movel %d0,%fp@(12) 4d02a: 4e5e unlk %fp 4d02c: 4ef9 0004 7278 jmp 47278 <_Thread_Clear_state> ... =============================================================================== 0004b4b0 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4b4b0: 4e56 0000 linkw %fp,#0 4b4b4: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4b4b8: 2268 0044 moveal %a0@(68),%a1 * 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 && 4b4bc: 2029 0030 movel %a1@(48),%d0 4b4c0: 671c beqs 4b4de <_Thread_queue_Process_timeout+0x2e> 4b4c2: b1f9 0005 dcd6 cmpal 5dcd6 <_Thread_Executing>,%a0 4b4c8: 6614 bnes 4b4de <_Thread_queue_Process_timeout+0x2e><== NEVER TAKEN _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4b4ca: 7203 moveq #3,%d1 4b4cc: b280 cmpl %d0,%d1 4b4ce: 6722 beqs 4b4f2 <_Thread_queue_Process_timeout+0x42> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4b4d0: 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; 4b4d2: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4b4d8: 2340 0030 movel %d0,%a1@(48) 4b4dc: 6014 bras 4b4f2 <_Thread_queue_Process_timeout+0x42> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4b4de: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4b4e4: 2f08 movel %a0,%sp@- 4b4e6: 2f28 0044 movel %a0@(68),%sp@- 4b4ea: 4eb9 0004 b3ac jsr 4b3ac <_Thread_queue_Extract> 4b4f0: 508f addql #8,%sp } } 4b4f2: 4e5e unlk %fp ... =============================================================================== 00047d2c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 47d2c: 4e56 fff0 linkw %fp,#-16 47d30: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 47d34: 246e 0008 moveal %fp@(8),%a2 47d38: 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 ) 47d3c: 4a8a tstl %a2 47d3e: 6746 beqs 47d86 <_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 ) { 47d40: 7001 moveq #1,%d0 47d42: b0aa 0034 cmpl %a2@(52),%d0 47d46: 663e bnes 47d86 <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 47d48: 303c 0700 movew #1792,%d0 47d4c: 40c2 movew %sr,%d2 47d4e: 8082 orl %d2,%d0 47d50: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 47d52: 202b 0010 movel %a3@(16),%d0 47d56: 0280 0003 bee0 andil #245472,%d0 47d5c: 6726 beqs 47d84 <_Thread_queue_Requeue+0x58> <== NEVER TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 47d5e: 4878 0001 pea 1 47d62: 7001 moveq #1,%d0 47d64: 2f0b movel %a3,%sp@- 47d66: 2540 0030 movel %d0,%a2@(48) 47d6a: 2f0a movel %a2,%sp@- 47d6c: 4eb9 0004 b3e4 jsr 4b3e4 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 47d72: 486e fffc pea %fp@(-4) 47d76: 2f0b movel %a3,%sp@- 47d78: 2f0a movel %a2,%sp@- 47d7a: 4eb9 0004 7b3c jsr 47b3c <_Thread_queue_Enqueue_priority> 47d80: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 47d84: 46c2 movew %d2,%sr } } 47d86: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 47d8c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047d90 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 47d90: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 47d94: 486e fffc pea %fp@(-4) 47d98: 2f2e 0008 movel %fp@(8),%sp@- 47d9c: 4eb9 0004 7658 jsr 47658 <_Thread_Get> switch ( location ) { 47da2: 508f addql #8,%sp 47da4: 4aae fffc tstl %fp@(-4) 47da8: 6618 bnes 47dc2 <_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 ); 47daa: 2f00 movel %d0,%sp@- 47dac: 4eb9 0004 b4b0 jsr 4b4b0 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47db2: 588f addql #4,%sp 47db4: 2039 0005 dc1c movel 5dc1c <_Thread_Dispatch_disable_level>,%d0 47dba: 5380 subql #1,%d0 47dbc: 23c0 0005 dc1c movel %d0,5dc1c <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 47dc2: 4e5e unlk %fp ... =============================================================================== 00051ed4 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 51ed4: 4e56 ffb4 linkw %fp,#-76 51ed8: 200e movel %fp,%d0 51eda: 0680 ffff fff4 addil #-12,%d0 51ee0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 51ee4: 246e 0008 moveal %fp@(8),%a2 51ee8: 240e movel %fp,%d2 51eea: 2a0e movel %fp,%d5 51eec: 260e movel %fp,%d3 51eee: 0682 ffff ffe8 addil #-24,%d2 51ef4: 5185 subql #8,%d5 51ef6: 0683 ffff ffec addil #-20,%d3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 51efc: 41ea 0008 lea %a2@(8),%a0 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 51f00: 4bea 0040 lea %a2@(64),%a5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51f04: 2e0a movel %a2,%d7 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51f06: 280a movel %a2,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51f08: 0687 0000 0030 addil #48,%d7 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51f0e: 0684 0000 0068 addil #104,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51f14: 49f9 0005 5984 lea 55984 <_Watchdog_Adjust_to_chain>,%a4 ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 51f1a: 47f9 0005 5a14 lea 55a14 <_Watchdog_Insert>,%a3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 51f20: 2d48 ffe4 movel %a0,%fp@(-28) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 51f24: 2d45 fff4 movel %d5,%fp@(-12) the_chain->permanent_null = NULL; 51f28: 42ae fff8 clrl %fp@(-8) the_chain->last = _Chain_Head(the_chain); 51f2c: 2d40 fffc movel %d0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 51f30: 2d43 ffe8 movel %d3,%fp@(-24) the_chain->permanent_null = NULL; 51f34: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 51f38: 2d42 fff0 movel %d2,%fp@(-16) 51f3c: 2d4d ffe0 movel %a5,%fp@(-32) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 51f40: 41ee fff4 lea %fp@(-12),%a0 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 51f44: 3a7c 0700 moveaw #1792,%a5 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 51f48: 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; 51f4c: 2039 0007 63b8 movel 763b8 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 51f52: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 51f56: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51f5a: 486e ffe8 pea %fp@(-24) 51f5e: 9081 subl %d1,%d0 51f60: 2f00 movel %d0,%sp@- 51f62: 2f07 movel %d7,%sp@- 51f64: 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(); 51f66: 2039 0007 630a movel 7630a <_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 ) { 51f6c: 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; 51f70: 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 ) { 51f74: b280 cmpl %d0,%d1 51f76: 6414 bccs 51f8c <_Timer_server_Body+0xb8> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51f78: 486e ffe8 pea %fp@(-24) 51f7c: 2c00 movel %d0,%d6 51f7e: 9c81 subl %d1,%d6 51f80: 2f06 movel %d6,%sp@- 51f82: 2d40 ffdc movel %d0,%fp@(-36) 51f86: 2f04 movel %d4,%sp@- 51f88: 4e94 jsr %a4@ 51f8a: 6018 bras 51fa4 <_Timer_server_Body+0xd0> } else if ( snapshot < last_snapshot ) { 51f8c: b280 cmpl %d0,%d1 51f8e: 631c blss 51fac <_Timer_server_Body+0xd8> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 51f90: 9280 subl %d0,%d1 51f92: 2f01 movel %d1,%sp@- 51f94: 4878 0001 pea 1 51f98: 2d40 ffdc movel %d0,%fp@(-36) 51f9c: 2f04 movel %d4,%sp@- 51f9e: 4eb9 0005 5904 jsr 55904 <_Watchdog_Adjust> 51fa4: 202e ffdc movel %fp@(-36),%d0 51fa8: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 51fac: 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 ); 51fb0: 202a 0078 movel %a2@(120),%d0 51fb4: 2f00 movel %d0,%sp@- 51fb6: 4eb9 0005 2870 jsr 52870 <_Chain_Get> if ( timer == NULL ) { 51fbc: 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 ); 51fbe: 2040 moveal %d0,%a0 if ( timer == NULL ) { 51fc0: 4a80 tstl %d0 51fc2: 6724 beqs 51fe8 <_Timer_server_Body+0x114> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 51fc4: 2028 0038 movel %a0@(56),%d0 <== NOT EXECUTED 51fc8: 7201 moveq #1,%d1 <== NOT EXECUTED 51fca: b280 cmpl %d0,%d1 <== NOT EXECUTED 51fcc: 6608 bnes 51fd6 <_Timer_server_Body+0x102> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 51fce: 4868 0010 pea %a0@(16) <== NOT EXECUTED 51fd2: 2f07 movel %d7,%sp@- <== NOT EXECUTED 51fd4: 600c bras 51fe2 <_Timer_server_Body+0x10e> <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 51fd6: 7c03 moveq #3,%d6 <== NOT EXECUTED 51fd8: bc80 cmpl %d0,%d6 <== NOT EXECUTED 51fda: 66d4 bnes 51fb0 <_Timer_server_Body+0xdc> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 51fdc: 4868 0010 pea %a0@(16) <== NOT EXECUTED 51fe0: 2f04 movel %d4,%sp@- <== NOT EXECUTED 51fe2: 4e93 jsr %a3@ <== NOT EXECUTED 51fe4: 508f addql #8,%sp <== NOT EXECUTED 51fe6: 60c8 bras 51fb0 <_Timer_server_Body+0xdc> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 51fe8: 200d movel %a5,%d0 51fea: 40c1 movew %sr,%d1 51fec: 8081 orl %d1,%d0 51fee: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 51ff0: baae fff4 cmpl %fp@(-12),%d5 51ff4: 6612 bnes 52008 <_Timer_server_Body+0x134> <== NEVER TAKEN ts->insert_chain = NULL; 51ff6: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 51ffa: 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 ); 51ffc: 3a7c 0700 moveaw #1792,%a5 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 52000: b6ae ffe8 cmpl %fp@(-24),%d3 52004: 6608 bnes 5200e <_Timer_server_Body+0x13a> 52006: 6042 bras 5204a <_Timer_server_Body+0x176> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 52008: 46c1 movew %d1,%sr <== NOT EXECUTED 5200a: 6000 ff40 braw 51f4c <_Timer_server_Body+0x78> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 5200e: 220d movel %a5,%d1 52010: 40c0 movew %sr,%d0 52012: 8280 orl %d0,%d1 52014: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 52016: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 5201a: b688 cmpl %a0,%d3 5201c: 6726 beqs 52044 <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 5201e: 2250 moveal %a0@,%a1 the_chain->first = new_first; 52020: 2d49 ffe8 movel %a1,%fp@(-24) new_first->previous = _Chain_Head(the_chain); 52024: 2342 0004 movel %d2,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 52028: 4a88 tstl %a0 5202a: 6718 beqs 52044 <_Timer_server_Body+0x170> <== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 5202c: 42a8 0008 clrl %a0@(8) _ISR_Enable( level ); 52030: 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 ); 52032: 2f28 0024 movel %a0@(36),%sp@- 52036: 2f28 0020 movel %a0@(32),%sp@- 5203a: 2068 001c moveal %a0@(28),%a0 5203e: 4e90 jsr %a0@ } 52040: 508f addql #8,%sp 52042: 60ca bras 5200e <_Timer_server_Body+0x13a> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 52044: 46c0 movew %d0,%sr 52046: 6000 fef8 braw 51f40 <_Timer_server_Body+0x6c> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 5204a: 4200 clrb %d0 5204c: 1540 007c moveb %d0,%a2@(124) 52050: 2039 0007 6278 movel 76278 <_Thread_Dispatch_disable_level>,%d0 52056: 5280 addql #1,%d0 52058: 23c0 0007 6278 movel %d0,76278 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 5205e: 4878 0008 pea 8 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 52062: 4bf9 0005 5b30 lea 55b30 <_Watchdog_Remove>,%a5 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 52068: 2f12 movel %a2@,%sp@- 5206a: 4eb9 0005 5158 jsr 55158 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 52070: 2f0a movel %a2,%sp@- 52072: 4eba fd9c jsr %pc@(51e10 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 52076: 2f0a movel %a2,%sp@- 52078: 4eba fdf6 jsr %pc@(51e70 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 5207c: 4eb9 0005 47f6 jsr 547f6 <_Thread_Enable_dispatch> ts->active = true; 52082: 7201 moveq #1,%d1 52084: 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 ); 52088: 2f2e ffe4 movel %fp@(-28),%sp@- 5208c: 4e95 jsr %a5@ static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 5208e: 2f2e ffe0 movel %fp@(-32),%sp@- 52092: 4e95 jsr %a5@ 52094: 4fef 0018 lea %sp@(24),%sp 52098: 6000 fea6 braw 51f40 <_Timer_server_Body+0x6c> =============================================================================== 0005209c <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 5209c: 4e56 fff0 linkw %fp,#-16 520a0: 206e 000c moveal %fp@(12),%a0 520a4: 48d7 041c moveml %d2-%d4/%a2,%sp@ 520a8: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 520ac: 202a 0078 movel %a2@(120),%d0 520b0: 6600 00f8 bnew 521aa <_Timer_server_Schedule_operation_method+0x10e> 520b4: 2039 0007 6278 movel 76278 <_Thread_Dispatch_disable_level>,%d0 520ba: 5280 addql #1,%d0 520bc: 23c0 0007 6278 movel %d0,76278 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 520c2: 2028 0038 movel %a0@(56),%d0 520c6: 7201 moveq #1,%d1 520c8: b280 cmpl %d0,%d1 520ca: 6660 bnes 5212c <_Timer_server_Schedule_operation_method+0x90> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 520cc: 203c 0000 0700 movel #1792,%d0 520d2: 40c3 movew %sr,%d3 520d4: 8083 orl %d3,%d0 520d6: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 520d8: 2039 0007 63b8 movel 763b8 <_Watchdog_Ticks_since_boot>,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 520de: 220a movel %a2,%d1 520e0: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 520e6: 242a 003c movel %a2@(60),%d2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 520ea: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 520ee: b289 cmpl %a1,%d1 520f0: 6716 beqs 52108 <_Timer_server_Schedule_operation_method+0x6c> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 520f2: 2800 movel %d0,%d4 520f4: 9882 subl %d2,%d4 delta_interval = first_watchdog->delta_interval; 520f6: 2229 0010 movel %a1@(16),%d1 if (delta_interval > delta) { 520fa: b881 cmpl %d1,%d4 520fc: 6504 bcss 52102 <_Timer_server_Schedule_operation_method+0x66> 520fe: 4281 clrl %d1 52100: 6002 bras 52104 <_Timer_server_Schedule_operation_method+0x68> delta_interval -= delta; 52102: 9284 subl %d4,%d1 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 52104: 2341 0010 movel %d1,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 52108: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 5210c: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 5210e: 4868 0010 pea %a0@(16) 52112: 486a 0030 pea %a2@(48) 52116: 4eb9 0005 5a14 jsr 55a14 <_Watchdog_Insert> if ( !ts->active ) { 5211c: 508f addql #8,%sp 5211e: 102a 007c moveb %a2@(124),%d0 52122: 6678 bnes 5219c <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_interval_system_watchdog( ts ); 52124: 2f0a movel %a2,%sp@- 52126: 4eba fce8 jsr %pc@(51e10 <_Timer_server_Reset_interval_system_watchdog>) 5212a: 606e bras 5219a <_Timer_server_Schedule_operation_method+0xfe> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 5212c: 7203 moveq #3,%d1 5212e: b280 cmpl %d0,%d1 52130: 666a bnes 5219c <_Timer_server_Schedule_operation_method+0x100> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 52132: 203c 0000 0700 movel #1792,%d0 52138: 40c3 movew %sr,%d3 5213a: 8083 orl %d3,%d0 5213c: 46c0 movew %d0,%sr 5213e: 200a movel %a2,%d0 52140: 0680 0000 006c addil #108,%d0 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 52146: 2239 0007 630a movel 7630a <_TOD_Now>,%d1 last_snapshot = ts->TOD_watchdogs.last_snapshot; 5214c: 242a 0074 movel %a2@(116),%d2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 52150: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 52154: b089 cmpl %a1,%d0 52156: 6720 beqs 52178 <_Timer_server_Schedule_operation_method+0xdc> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 52158: 2029 0010 movel %a1@(16),%d0 if ( snapshot > last_snapshot ) { 5215c: b481 cmpl %d1,%d2 5215e: 6410 bccs 52170 <_Timer_server_Schedule_operation_method+0xd4> /* * We advanced in time. */ delta = snapshot - last_snapshot; 52160: 2801 movel %d1,%d4 52162: 9882 subl %d2,%d4 if (delta_interval > delta) { 52164: b880 cmpl %d0,%d4 52166: 6504 bcss 5216c <_Timer_server_Schedule_operation_method+0xd0><== ALWAYS TAKEN 52168: 4280 clrl %d0 <== NOT EXECUTED 5216a: 6008 bras 52174 <_Timer_server_Schedule_operation_method+0xd8><== NOT EXECUTED delta_interval -= delta; 5216c: 9084 subl %d4,%d0 5216e: 6004 bras 52174 <_Timer_server_Schedule_operation_method+0xd8> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 52170: d082 addl %d2,%d0 delta_interval += delta; 52172: 9081 subl %d1,%d0 } first_watchdog->delta_interval = delta_interval; 52174: 2340 0010 movel %d0,%a1@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 52178: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 5217c: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5217e: 4868 0010 pea %a0@(16) 52182: 486a 0068 pea %a2@(104) 52186: 4eb9 0005 5a14 jsr 55a14 <_Watchdog_Insert> if ( !ts->active ) { 5218c: 508f addql #8,%sp 5218e: 102a 007c moveb %a2@(124),%d0 52192: 6608 bnes 5219c <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_tod_system_watchdog( ts ); 52194: 2f0a movel %a2,%sp@- 52196: 4eba fcd8 jsr %pc@(51e70 <_Timer_server_Reset_tod_system_watchdog>) 5219a: 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 ); } } 5219c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 521a2: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 521a4: 4ef9 0005 47f6 jmp 547f6 <_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 ); 521aa: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 521ae: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 521b2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 521b8: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 521bc: 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 ); 521be: 4ef9 0005 2810 jmp 52810 <_Chain_Append> <== NOT EXECUTED =============================================================================== 0004991c <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 4991c: 4e56 0000 linkw %fp,#0 49920: 226e 0008 moveal %fp@(8),%a1 49924: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec > rhs->tv_sec ) 49928: 2211 movel %a1@,%d1 4992a: 2010 movel %a0@,%d0 4992c: b081 cmpl %d1,%d0 4992e: 6c04 bges 49934 <_Timespec_Greater_than+0x18> 49930: 7001 moveq #1,%d0 49932: 6014 bras 49948 <_Timespec_Greater_than+0x2c> return true; if ( lhs->tv_sec < rhs->tv_sec ) 49934: b081 cmpl %d1,%d0 49936: 6f04 bles 4993c <_Timespec_Greater_than+0x20> <== ALWAYS TAKEN 49938: 4200 clrb %d0 4993a: 600c bras 49948 <_Timespec_Greater_than+0x2c> <== NOT EXECUTED #include #include #include bool _Timespec_Greater_than( 4993c: 2068 0004 moveal %a0@(4),%a0 49940: b1e9 0004 cmpal %a1@(4),%a0 49944: 5dc0 slt %d0 49946: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 49948: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000483c4 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 483c4: 4e56 0000 linkw %fp,#0 483c8: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 483ca: 2479 0005 ddb2 moveal 5ddb2 <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 483d0: 2f02 movel %d2,%sp@- 483d2: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 483d6: 6012 bras 483ea <_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 ) 483d8: 206a 002c moveal %a2@(44),%a0 483dc: 4a88 tstl %a0 483de: 6706 beqs 483e6 <_User_extensions_Thread_exitted+0x22> (*the_extension->Callouts.thread_exitted)( executing ); 483e0: 2f02 movel %d2,%sp@- 483e2: 4e90 jsr %a0@ 483e4: 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 ) { 483e6: 246a 0004 moveal %a2@(4),%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 483ea: b5fc 0005 ddaa cmpal #384426,%a2 483f0: 66e6 bnes 483d8 <_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 ); } } 483f2: 242e fff8 movel %fp@(-8),%d2 483f6: 246e fffc moveal %fp@(-4),%a2 483fa: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049a7c <_Watchdog_Adjust>: Watchdog_Interval units ) { ISR_Level level; _ISR_Disable( level ); 49a7c: 327c 0700 moveaw #1792,%a1 49a80: 2209 movel %a1,%d1 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 49a82: 4e56 ffe8 linkw %fp,#-24 49a86: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 49a8a: 266e 0008 moveal %fp@(8),%a3 49a8e: 262e 000c movel %fp@(12),%d3 49a92: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 49a96: 40c0 movew %sr,%d0 49a98: 8280 orl %d0,%d1 49a9a: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 49a9c: 244b moveal %a3,%a2 49a9e: 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 ) ) { 49aa0: b5c8 cmpal %a0,%a2 49aa2: 674c beqs 49af0 <_Watchdog_Adjust+0x74> switch ( direction ) { 49aa4: 4a83 tstl %d3 49aa6: 673c beqs 49ae4 <_Watchdog_Adjust+0x68> 49aa8: 7201 moveq #1,%d1 49aaa: b283 cmpl %d3,%d1 49aac: 6642 bnes 49af0 <_Watchdog_Adjust+0x74> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 49aae: d5a8 0010 addl %d2,%a0@(16) break; 49ab2: 603c bras 49af0 <_Watchdog_Adjust+0x74> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 49ab4: 2053 moveal %a3@,%a0 case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 49ab6: 2628 0010 movel %a0@(16),%d3 49aba: b682 cmpl %d2,%d3 49abc: 6308 blss 49ac6 <_Watchdog_Adjust+0x4a> _Watchdog_First( header )->delta_interval -= units; 49abe: 9682 subl %d2,%d3 49ac0: 2143 0010 movel %d3,%a0@(16) break; 49ac4: 602a bras 49af0 <_Watchdog_Adjust+0x74> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 49ac6: 7201 moveq #1,%d1 49ac8: 2141 0010 movel %d1,%a0@(16) _ISR_Enable( level ); 49acc: 46c0 movew %d0,%sr _Watchdog_Tickle( header ); 49ace: 2f0b movel %a3,%sp@- 49ad0: 4e94 jsr %a4@ _ISR_Disable( level ); 49ad2: 2204 movel %d4,%d1 49ad4: 40c0 movew %sr,%d0 49ad6: 8280 orl %d0,%d1 49ad8: 46c1 movew %d1,%sr while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 49ada: 9483 subl %d3,%d2 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 49adc: 588f addql #4,%sp 49ade: b5d3 cmpal %a3@,%a2 49ae0: 660a bnes 49aec <_Watchdog_Adjust+0x70> 49ae2: 600c bras 49af0 <_Watchdog_Adjust+0x74> _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 49ae4: 2809 movel %a1,%d4 units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); _Watchdog_Tickle( header ); 49ae6: 49f9 0004 9c94 lea 49c94 <_Watchdog_Tickle>,%a4 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 49aec: 4a82 tstl %d2 49aee: 66c4 bnes 49ab4 <_Watchdog_Adjust+0x38> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 49af0: 46c0 movew %d0,%sr } 49af2: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 49af8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048660 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48660: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 48666: 4e56 0000 linkw %fp,#0 4866a: 206e 0008 moveal %fp@(8),%a0 4866e: 2f0a movel %a2,%sp@- 48670: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48672: 40c1 movew %sr,%d1 48674: 8081 orl %d1,%d0 48676: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 48678: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 4867c: 7401 moveq #1,%d2 4867e: b480 cmpl %d0,%d2 48680: 670c beqs 4868e <_Watchdog_Remove+0x2e> 48682: 6244 bhis 486c8 <_Watchdog_Remove+0x68> 48684: 143c 0003 moveb #3,%d2 48688: b480 cmpl %d0,%d2 4868a: 653c bcss 486c8 <_Watchdog_Remove+0x68> <== NEVER TAKEN 4868c: 6006 bras 48694 <_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; 4868e: 42a8 0008 clrl %a0@(8) break; 48692: 6034 bras 486c8 <_Watchdog_Remove+0x68> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 48694: 2250 moveal %a0@,%a1 case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 48696: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4869a: 4a91 tstl %a1@ 4869c: 6708 beqs 486a6 <_Watchdog_Remove+0x46> next_watchdog->delta_interval += the_watchdog->delta_interval; 4869e: 2428 0010 movel %a0@(16),%d2 486a2: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 486a6: 2279 0005 dd58 moveal 5dd58 <_Watchdog_Sync_count>,%a1 486ac: 4a89 tstl %a1 486ae: 670c beqs 486bc <_Watchdog_Remove+0x5c> _Watchdog_Sync_level = _ISR_Nest_level; 486b0: 2279 0005 dcb6 moveal 5dcb6 <_ISR_Nest_level>,%a1 486b6: 23c9 0005 dcd2 movel %a1,5dcd2 <_Watchdog_Sync_level> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 486bc: 2250 moveal %a0@,%a1 previous = the_node->previous; 486be: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 486c2: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 486c4: 234a 0004 movel %a2,%a1@(4) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 486c8: 2279 0005 dd5c moveal 5dd5c <_Watchdog_Ticks_since_boot>,%a1 486ce: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 486d2: 46c1 movew %d1,%sr return( previous_state ); } 486d4: 241f movel %sp@+,%d2 486d6: 245f moveal %sp@+,%a2 486d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049684 <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 49684: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4968a: 4e56 ffec linkw %fp,#-20 4968e: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49692: 242e 0008 movel %fp@(8),%d2 49696: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4969a: 40c3 movew %sr,%d3 4969c: 8083 orl %d3,%d0 4969e: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 496a0: 2f0b movel %a3,%sp@- 496a2: 49f9 0004 3e90 lea 43e90 ,%a4 496a8: 2f02 movel %d2,%sp@- 496aa: 4879 0005 cf96 pea 5cf96 496b0: 4e94 jsr %a4@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 496b2: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 496b4: 4fef 000c lea %sp@(12),%sp 496b8: b7ca cmpal %a2,%a3 496ba: 6726 beqs 496e2 <_Watchdog_Report_chain+0x5e> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 496bc: 49f9 0004 96f8 lea 496f8 <_Watchdog_Report>,%a4 496c2: 2f0a movel %a2,%sp@- 496c4: 42a7 clrl %sp@- 496c6: 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 ) 496c8: 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 ; 496ca: 508f addql #8,%sp 496cc: b7ca cmpal %a2,%a3 496ce: 66f2 bnes 496c2 <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 496d0: 2f02 movel %d2,%sp@- 496d2: 4879 0005 cfad pea 5cfad 496d8: 4eb9 0004 3e90 jsr 43e90 496de: 508f addql #8,%sp 496e0: 600a bras 496ec <_Watchdog_Report_chain+0x68> } else { printk( "Chain is empty\n" ); 496e2: 4879 0005 cfbc pea 5cfbc 496e8: 4e94 jsr %a4@ 496ea: 588f addql #4,%sp } _ISR_Enable( level ); 496ec: 46c3 movew %d3,%sr } 496ee: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 496f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000486dc <_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 ); 486dc: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 486e2: 4e56 ffe8 linkw %fp,#-24 486e6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 486ea: 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 ); 486ee: 40c2 movew %sr,%d2 486f0: 8082 orl %d2,%d0 486f2: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 486f4: 264c moveal %a4,%a3 486f6: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 486f8: b7ca cmpal %a2,%a3 486fa: 674e beqs 4874a <_Watchdog_Tickle+0x6e> * 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) { 486fc: 202a 0010 movel %a2@(16),%d0 48700: 6708 beqs 4870a <_Watchdog_Tickle+0x2e> the_watchdog->delta_interval--; 48702: 5380 subql #1,%d0 48704: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 48708: 6640 bnes 4874a <_Watchdog_Tickle+0x6e> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 4870a: 4bf9 0004 8660 lea 48660 <_Watchdog_Remove>,%a5 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 48710: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 48716: 2f0a movel %a2,%sp@- 48718: 4e95 jsr %a5@ _ISR_Enable( level ); 4871a: 46c2 movew %d2,%sr switch( watchdog_state ) { 4871c: 7202 moveq #2,%d1 4871e: 588f addql #4,%sp 48720: b280 cmpl %d0,%d1 48722: 6610 bnes 48734 <_Watchdog_Tickle+0x58> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 48724: 2f2a 0024 movel %a2@(36),%sp@- 48728: 2f2a 0020 movel %a2@(32),%sp@- 4872c: 206a 001c moveal %a2@(28),%a0 48730: 4e90 jsr %a0@ 48732: 508f addql #8,%sp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 48734: 2003 movel %d3,%d0 48736: 40c2 movew %sr,%d2 48738: 8082 orl %d2,%d0 4873a: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 4873c: 2014 movel %a4@,%d0 4873e: 2440 moveal %d0,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 48740: b7c0 cmpal %d0,%a3 48742: 6706 beqs 4874a <_Watchdog_Tickle+0x6e> 48744: 4aaa 0010 tstl %a2@(16) 48748: 67cc beqs 48716 <_Watchdog_Tickle+0x3a> leave: _ISR_Enable(level); 4874a: 46c2 movew %d2,%sr } 4874c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 48752: 4e5e unlk %fp ... =============================================================================== 0005a1ac <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 5a1ac: 4280 clrl %d0 <== NOT EXECUTED return 0; } #endif int __kill( pid_t pid, int sig ) { 5a1ae: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5a1b2: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0005a07c <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 5a07c: 4e56 0000 linkw %fp,#0 5a080: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 5a084: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5a08a: 2d40 0008 movel %d0,%fp@(8) } 5a08e: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 5a090: 4ef9 0004 2438 jmp 42438 ... =============================================================================== 00043020 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 43020: 4e56 0000 linkw %fp,#0 43024: 4eb9 0005 a800 jsr 5a800 <_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(); 4302a: 4eb9 0004 2fbc jsr 42fbc rtems_shutdown_executive(status); 43030: 2f2e 0008 movel %fp@(8),%sp@- 43034: 4eb9 0004 5de8 jsr 45de8 4303a: 588f addql #4,%sp 4303c: 60fe bras 4303c <_exit+0x1c> <== NOT EXECUTED ... =============================================================================== 00043296 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 43296: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4329a: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 4329e: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return fcntl( fd, cmd, arg ); 432a2: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 432a8: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 432ac: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 432b0: 4e5e unlk %fp <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 432b2: 4ef9 0004 3128 jmp 43128 <== NOT EXECUTED =============================================================================== 0005a098 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 5a098: 4e56 0000 linkw %fp,#0 free( ptr ); 5a09c: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5a0a2: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 5a0a4: 4ef9 0004 2828 jmp 42828 ... =============================================================================== 0005a17a <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 5a17a: 7001 moveq #1,%d0 <== NOT EXECUTED #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 5a17c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpid(); } 5a180: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004290c <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 4290c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 42910: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 42912: 4ef9 0004 28b0 jmp 428b0 <== NOT EXECUTED =============================================================================== 00042918 <_gettimeofday_r>: int _gettimeofday_r( struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { 42918: 4e56 0000 linkw %fp,#0 4291c: 202e 000c movel %fp@(12),%d0 return gettimeofday( tp, tzp ); 42920: 2d6e 0010 000c movel %fp@(16),%fp@(12) 42926: 2d40 0008 movel %d0,%fp@(8) } 4292a: 4e5e unlk %fp struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4292c: 4ef9 0004 28b0 jmp 428b0 ... =============================================================================== 0005a184 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 5a184: 4e56 0000 linkw %fp,#0 return isatty( fd ); 5a188: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5a18e: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 5a190: 4ef9 0005 a754 jmp 5a754 ... =============================================================================== 0005a1a2 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 5a1a2: 4280 clrl %d0 <== NOT EXECUTED #if defined(RTEMS_NEWLIB) #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 5a1a4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5a1a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043aa8 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 43aa8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43aac: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return link( existing, new ); 43ab0: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 43ab6: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 43aba: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 43abc: 4ef9 0004 390c jmp 4390c <== NOT EXECUTED ... =============================================================================== 0005a2a4 <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 5a2a4: 4e56 0000 linkw %fp,#0 5a2a8: 202e 000c movel %fp@(12),%d0 5a2ac: 2f02 movel %d2,%sp@- 5a2ae: 222e 0010 movel %fp@(16),%d1 5a2b2: 242e 0014 movel %fp@(20),%d2 return lseek( fd, offset, whence ); 5a2b6: 2d6e 0018 0014 movel %fp@(24),%fp@(20) 5a2bc: 2d41 000c movel %d1,%fp@(12) 5a2c0: 2d42 0010 movel %d2,%fp@(16) 5a2c4: 2d40 0008 movel %d0,%fp@(8) } 5a2c8: 241f movel %sp@+,%d2 5a2ca: 4e5e unlk %fp int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 5a2cc: 4ef9 0005 a1b8 jmp 5a1b8 ... =============================================================================== 0005a2d4 <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 5a2d4: 4e56 0000 linkw %fp,#0 return malloc( size ); 5a2d8: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5a2de: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 5a2e0: 4ef9 0004 2b08 jmp 42b08 ... =============================================================================== 00043504 <_open_r>: struct _reent *ptr __attribute__((unused)), const char *buf, int flags, int mode ) { 43504: 4e56 0000 linkw %fp,#0 43508: 222e 0010 movel %fp@(16),%d1 4350c: 202e 000c movel %fp@(12),%d0 return open( buf, flags, mode ); 43510: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 43516: 2d41 000c movel %d1,%fp@(12) 4351a: 2d40 0008 movel %d0,%fp@(8) } 4351e: 4e5e unlk %fp const char *buf, int flags, int mode ) { return open( buf, flags, mode ); 43520: 4ef9 0004 3308 jmp 43308 ... =============================================================================== 0005a394 <_read_r>: struct _reent *ptr __attribute__((unused)), int fd, void *buf, size_t nbytes ) { 5a394: 4e56 0000 linkw %fp,#0 5a398: 222e 0010 movel %fp@(16),%d1 5a39c: 202e 000c movel %fp@(12),%d0 return read( fd, buf, nbytes ); 5a3a0: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5a3a6: 2d41 000c movel %d1,%fp@(12) 5a3aa: 2d40 0008 movel %d0,%fp@(8) } 5a3ae: 4e5e unlk %fp int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 5a3b0: 4ef9 0005 a2e8 jmp 5a2e8 ... =============================================================================== 0005a3b8 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5a3b8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 5a3bc: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return realloc( ptr, size ); 5a3c0: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 5a3c6: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 5a3ca: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 5a3cc: 4ef9 0005 a3f8 jmp 5a3f8 <== NOT EXECUTED ... =============================================================================== 00046070 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 46070: 4e56 ffa0 linkw %fp,#-96 46074: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 46078: 282e 000c movel %fp@(12),%d4 4607c: 2e2e 0010 movel %fp@(16),%d7 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 46080: 2f04 movel %d4,%sp@- 46082: 4eb9 0004 4b02 jsr 44b02 if ( old_parent_pathlen == 0 ) 46088: 588f addql #4,%sp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 4608a: 2c00 movel %d0,%d6 4608c: 200e movel %fp,%d0 4608e: 0680 ffff ffd0 addil #-48,%d0 if ( old_parent_pathlen == 0 ) 46094: 4a86 tstl %d6 46096: 6616 bnes 460ae <_rename_r+0x3e> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 46098: 2f00 movel %d0,%sp@- 4609a: 486e fffc pea %fp@(-4) 4609e: 4203 clrb %d3 460a0: 2f04 movel %d4,%sp@- 460a2: 4eb9 0004 65d4 jsr 465d4 460a8: 4fef 000c lea %sp@(12),%sp 460ac: 601e bras 460cc <_rename_r+0x5c> else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 460ae: 42a7 clrl %sp@- 460b0: 2f00 movel %d0,%sp@- 460b2: 4878 0002 pea 2 460b6: 2f06 movel %d6,%sp@- 460b8: 2f04 movel %d4,%sp@- 460ba: 4eb9 0004 4c18 jsr 44c18 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 460c0: 4fef 0014 lea %sp@(20),%sp 460c4: 4a80 tstl %d0 460c6: 6600 024c bnew 46314 <_rename_r+0x2a4> 460ca: 7601 moveq #1,%d3 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 460cc: 4878 0014 pea 14 460d0: 240e movel %fp,%d2 460d2: 0682 ffff ffd0 addil #-48,%d2 460d8: 2a0e movel %fp,%d5 460da: 0685 ffff ffe4 addil #-28,%d5 name = old + old_parent_pathlen; 460e0: d886 addl %d6,%d4 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 460e2: 45f9 0005 2fa4 lea 52fa4 ,%a2 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 460e8: 2f02 movel %d2,%sp@- 460ea: 2f05 movel %d5,%sp@- 460ec: 4eb9 0005 1828 jsr 51828 name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 460f2: 2f04 movel %d4,%sp@- /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 460f4: 2d44 fff8 movel %d4,%fp@(-8) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 460f8: 4e92 jsr %a2@ 460fa: 2e80 movel %d0,%sp@ 460fc: 2f04 movel %d4,%sp@- 460fe: 4eb9 0004 4ac4 jsr 44ac4 46104: d880 addl %d0,%d4 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 46106: 2f04 movel %d4,%sp@- * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 46108: 2d44 fff8 movel %d4,%fp@(-8) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4610c: 4e92 jsr %a2@ 4610e: 4297 clrl %sp@ 46110: 2f05 movel %d5,%sp@- 46112: 42a7 clrl %sp@- 46114: 2f00 movel %d0,%sp@- 46116: 2f04 movel %d4,%sp@- 46118: 4eb9 0004 4b48 jsr 44b48 0, &old_loc, false ); if ( result != 0 ) { 4611e: 4fef 0028 lea %sp@(40),%sp 46122: 4a80 tstl %d0 46124: 6720 beqs 46146 <_rename_r+0xd6> if ( free_old_parentloc ) 46126: 4a03 tstb %d3 46128: 6700 01ea beqw 46314 <_rename_r+0x2a4> rtems_filesystem_freenode( &old_parent_loc ); 4612c: 206e ffdc moveal %fp@(-36),%a0 46130: 4a88 tstl %a0 46132: 6700 01e0 beqw 46314 <_rename_r+0x2a4> 46136: 2068 001c moveal %a0@(28),%a0 4613a: 4a88 tstl %a0 4613c: 6700 01d6 beqw 46314 <_rename_r+0x2a4> 46140: 2f02 movel %d2,%sp@- 46142: 6000 00a8 braw 461ec <_rename_r+0x17c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 46146: 280e movel %fp,%d4 46148: 0684 ffff ffbc addil #-68,%d4 4614e: 2f04 movel %d4,%sp@- 46150: 486e fffc pea %fp@(-4) 46154: 2f07 movel %d7,%sp@- 46156: 4eb9 0004 65d4 jsr 465d4 if ( !new_parent_loc.ops->evalformake_h ) { 4615c: 206e ffc8 moveal %fp@(-56),%a0 46160: 4fef 000c lea %sp@(12),%sp 46164: 2068 0004 moveal %a0@(4),%a0 46168: 4a88 tstl %a0 4616a: 6620 bnes 4618c <_rename_r+0x11c> if ( free_old_parentloc ) 4616c: 4a03 tstb %d3 4616e: 6700 011e beqw 4628e <_rename_r+0x21e> rtems_filesystem_freenode( &old_parent_loc ); 46172: 206e ffdc moveal %fp@(-36),%a0 46176: 4a88 tstl %a0 46178: 6700 0114 beqw 4628e <_rename_r+0x21e> 4617c: 2068 001c moveal %a0@(28),%a0 46180: 4a88 tstl %a0 46182: 6700 010a beqw 4628e <_rename_r+0x21e> 46186: 2f02 movel %d2,%sp@- 46188: 6000 0100 braw 4628a <_rename_r+0x21a> rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 4618c: 486e fff8 pea %fp@(-8) 46190: deae fffc addl %fp@(-4),%d7 46194: 2f04 movel %d4,%sp@- 46196: 2f07 movel %d7,%sp@- 46198: 4e90 jsr %a0@ if ( result != 0 ) { 4619a: 4fef 000c lea %sp@(12),%sp 4619e: 4a80 tstl %d0 461a0: 6754 beqs 461f6 <_rename_r+0x186> rtems_filesystem_freenode( &new_parent_loc ); 461a2: 206e ffc8 moveal %fp@(-56),%a0 461a6: 4a88 tstl %a0 461a8: 670e beqs 461b8 <_rename_r+0x148> <== NEVER TAKEN 461aa: 2068 001c moveal %a0@(28),%a0 461ae: 4a88 tstl %a0 461b0: 6706 beqs 461b8 <_rename_r+0x148> <== NEVER TAKEN 461b2: 2f04 movel %d4,%sp@- 461b4: 4e90 jsr %a0@ 461b6: 588f addql #4,%sp if ( free_old_parentloc ) 461b8: 4a03 tstb %d3 461ba: 6718 beqs 461d4 <_rename_r+0x164> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 461bc: 206e ffdc moveal %fp@(-36),%a0 461c0: 4a88 tstl %a0 461c2: 6710 beqs 461d4 <_rename_r+0x164> <== NEVER TAKEN 461c4: 2068 001c moveal %a0@(28),%a0 461c8: 4a88 tstl %a0 461ca: 6708 beqs 461d4 <_rename_r+0x164> <== NEVER TAKEN 461cc: 486e ffd0 pea %fp@(-48) 461d0: 4e90 jsr %a0@ 461d2: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 461d4: 206e fff0 moveal %fp@(-16),%a0 461d8: 4a88 tstl %a0 461da: 6700 0138 beqw 46314 <_rename_r+0x2a4> 461de: 2068 001c moveal %a0@(28),%a0 461e2: 4a88 tstl %a0 461e4: 6700 012e beqw 46314 <_rename_r+0x2a4> 461e8: 486e ffe4 pea %fp@(-28) 461ec: 74ff moveq #-1,%d2 461ee: 4e90 jsr %a0@ 461f0: 588f addql #4,%sp 461f2: 6000 0122 braw 46316 <_rename_r+0x2a6> 461f6: 206e ffc8 moveal %fp@(-56),%a0 /* * 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 ) { 461fa: 202e ffcc movel %fp@(-52),%d0 461fe: b0ae ffe0 cmpl %fp@(-32),%d0 46202: 6758 beqs 4625c <_rename_r+0x1ec> rtems_filesystem_freenode( &new_parent_loc ); 46204: 4a88 tstl %a0 46206: 670e beqs 46216 <_rename_r+0x1a6> <== NEVER TAKEN 46208: 2068 001c moveal %a0@(28),%a0 4620c: 4a88 tstl %a0 4620e: 6706 beqs 46216 <_rename_r+0x1a6> <== NEVER TAKEN 46210: 2f04 movel %d4,%sp@- 46212: 4e90 jsr %a0@ 46214: 588f addql #4,%sp if ( free_old_parentloc ) 46216: 4a03 tstb %d3 46218: 6718 beqs 46232 <_rename_r+0x1c2> rtems_filesystem_freenode( &old_parent_loc ); 4621a: 206e ffdc moveal %fp@(-36),%a0 4621e: 4a88 tstl %a0 46220: 6710 beqs 46232 <_rename_r+0x1c2> <== NEVER TAKEN 46222: 2068 001c moveal %a0@(28),%a0 46226: 4a88 tstl %a0 46228: 6708 beqs 46232 <_rename_r+0x1c2> <== NEVER TAKEN 4622a: 486e ffd0 pea %fp@(-48) 4622e: 4e90 jsr %a0@ 46230: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 46232: 206e fff0 moveal %fp@(-16),%a0 46236: 4a88 tstl %a0 46238: 6710 beqs 4624a <_rename_r+0x1da> <== NEVER TAKEN 4623a: 2068 001c moveal %a0@(28),%a0 4623e: 4a88 tstl %a0 46240: 6708 beqs 4624a <_rename_r+0x1da> <== NEVER TAKEN 46242: 486e ffe4 pea %fp@(-28) 46246: 4e90 jsr %a0@ 46248: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 4624a: 4eb9 0004 fff8 jsr 4fff8 <__errno> 46250: 74ff moveq #-1,%d2 46252: 2040 moveal %d0,%a0 46254: 7012 moveq #18,%d0 46256: 2080 movel %d0,%a0@ 46258: 6000 00bc braw 46316 <_rename_r+0x2a6> } if ( !new_parent_loc.ops->rename_h ) { 4625c: 2268 0040 moveal %a0@(64),%a1 46260: 4a89 tstl %a1 46262: 6654 bnes 462b8 <_rename_r+0x248> rtems_filesystem_freenode( &new_parent_loc ); 46264: 2068 001c moveal %a0@(28),%a0 46268: 4a88 tstl %a0 4626a: 6706 beqs 46272 <_rename_r+0x202> <== NEVER TAKEN 4626c: 2f04 movel %d4,%sp@- 4626e: 4e90 jsr %a0@ 46270: 588f addql #4,%sp if ( free_old_parentloc ) 46272: 4a03 tstb %d3 46274: 6718 beqs 4628e <_rename_r+0x21e> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 46276: 206e ffdc moveal %fp@(-36),%a0 4627a: 4a88 tstl %a0 4627c: 6710 beqs 4628e <_rename_r+0x21e> <== NEVER TAKEN 4627e: 2068 001c moveal %a0@(28),%a0 46282: 4a88 tstl %a0 46284: 6708 beqs 4628e <_rename_r+0x21e> <== NEVER TAKEN 46286: 486e ffd0 pea %fp@(-48) 4628a: 4e90 jsr %a0@ 4628c: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 4628e: 206e fff0 moveal %fp@(-16),%a0 46292: 4a88 tstl %a0 46294: 6710 beqs 462a6 <_rename_r+0x236> <== NEVER TAKEN 46296: 2068 001c moveal %a0@(28),%a0 4629a: 4a88 tstl %a0 4629c: 6708 beqs 462a6 <_rename_r+0x236> <== NEVER TAKEN 4629e: 486e ffe4 pea %fp@(-28) 462a2: 4e90 jsr %a0@ 462a4: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTSUP ); 462a6: 4eb9 0004 fff8 jsr 4fff8 <__errno> 462ac: 74ff moveq #-1,%d2 462ae: 2040 moveal %d0,%a0 462b0: 20bc 0000 0086 movel #134,%a0@ 462b6: 605e bras 46316 <_rename_r+0x2a6> } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 462b8: 2f2e fff8 movel %fp@(-8),%sp@- 462bc: 2f04 movel %d4,%sp@- 462be: 2f05 movel %d5,%sp@- 462c0: 2f02 movel %d2,%sp@- 462c2: 4e91 jsr %a1@ rtems_filesystem_freenode( &new_parent_loc ); 462c4: 206e ffc8 moveal %fp@(-56),%a0 rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 462c8: 2400 movel %d0,%d2 rtems_filesystem_freenode( &new_parent_loc ); 462ca: 4fef 0010 lea %sp@(16),%sp 462ce: 4a88 tstl %a0 462d0: 670e beqs 462e0 <_rename_r+0x270> <== NEVER TAKEN 462d2: 2068 001c moveal %a0@(28),%a0 462d6: 4a88 tstl %a0 462d8: 6706 beqs 462e0 <_rename_r+0x270> <== NEVER TAKEN 462da: 2f04 movel %d4,%sp@- 462dc: 4e90 jsr %a0@ 462de: 588f addql #4,%sp if ( free_old_parentloc ) 462e0: 4a03 tstb %d3 462e2: 6718 beqs 462fc <_rename_r+0x28c> rtems_filesystem_freenode( &old_parent_loc ); 462e4: 206e ffdc moveal %fp@(-36),%a0 462e8: 4a88 tstl %a0 462ea: 6710 beqs 462fc <_rename_r+0x28c> <== NEVER TAKEN 462ec: 2068 001c moveal %a0@(28),%a0 462f0: 4a88 tstl %a0 462f2: 6708 beqs 462fc <_rename_r+0x28c> <== NEVER TAKEN 462f4: 486e ffd0 pea %fp@(-48) 462f8: 4e90 jsr %a0@ 462fa: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 462fc: 206e fff0 moveal %fp@(-16),%a0 46300: 4a88 tstl %a0 46302: 6712 beqs 46316 <_rename_r+0x2a6> <== NEVER TAKEN 46304: 2068 001c moveal %a0@(28),%a0 46308: 4a88 tstl %a0 4630a: 670a beqs 46316 <_rename_r+0x2a6> <== NEVER TAKEN 4630c: 486e ffe4 pea %fp@(-28) 46310: 6000 fedc braw 461ee <_rename_r+0x17e> 46314: 74ff moveq #-1,%d2 <== NOT EXECUTED return result; } 46316: 2002 movel %d2,%d0 46318: 4cee 04fc ffa0 moveml %fp@(-96),%d2-%d7/%a2 4631e: 4e5e unlk %fp ... =============================================================================== 00044700 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 44700: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44704: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 44708: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 4470e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 44712: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 44714: 4ef9 0004 4638 jmp 44638 <== NOT EXECUTED ... =============================================================================== 0004cbea <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 4cbea: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return unlink( path ); 4cbee: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED } 4cbf4: 4e5e unlk %fp <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4cbf6: 4ef9 0004 ca2c jmp 4ca2c <== NOT EXECUTED =============================================================================== 0005a3d4 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5a3d4: 4e56 0000 linkw %fp,#0 5a3d8: 222e 0010 movel %fp@(16),%d1 5a3dc: 202e 000c movel %fp@(12),%d0 return write( fd, buf, nbytes ); 5a3e0: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5a3e6: 2d41 000c movel %d1,%fp@(12) 5a3ea: 2d40 0008 movel %d0,%fp@(8) } 5a3ee: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 5a3f0: 4ef9 0005 a4d8 jmp 5a4d8 ... =============================================================================== 00042438 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 42438: 4e56 0000 linkw %fp,#0 length = nelem * elsize; 4243c: 41ee 0008 lea %fp@(8),%a0 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 42440: 52b9 0005 daec addql #1,5daec 42446: 2f03 movel %d3,%sp@- length = nelem * elsize; 42448: 262e 000c movel %fp@(12),%d3 4244c: 4c10 3800 mulsl %a0@,%d3 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 42450: 2f02 movel %d2,%sp@- length = nelem * elsize; cptr = malloc( length ); 42452: 2f03 movel %d3,%sp@- 42454: 4eb9 0004 2b08 jsr 42b08 if ( cptr ) 4245a: 588f addql #4,%sp size_t length; MSBUMP(calloc_calls, 1); length = nelem * elsize; cptr = malloc( length ); 4245c: 2400 movel %d0,%d2 if ( cptr ) 4245e: 6710 beqs 42470 <== NEVER TAKEN memset( cptr, '\0', length ); 42460: 2f03 movel %d3,%sp@- 42462: 42a7 clrl %sp@- 42464: 2f00 movel %d0,%sp@- 42466: 4eb9 0004 d948 jsr 4d948 4246c: 4fef 000c lea %sp@(12),%sp MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ return cptr; } 42470: 2002 movel %d2,%d0 length = nelem * elsize; cptr = malloc( length ); if ( cptr ) memset( cptr, '\0', length ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 42472: 53b9 0005 dadc subql #1,5dadc return cptr; } 42478: 242e fff8 movel %fp@(-8),%d2 4247c: 262e fffc movel %fp@(-4),%d3 42480: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ab24 : #include int chdir( const char *pathname ) { 4ab24: 4e56 ffec linkw %fp,#-20 4ab28: 2f03 movel %d3,%sp@- 4ab2a: 262e 0008 movel %fp@(8),%d3 4ab2e: 2f02 movel %d2,%sp@- rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 4ab30: 4a83 tstl %d3 4ab32: 6612 bnes 4ab46 rtems_set_errno_and_return_minus_one( EFAULT ); 4ab34: 4eb9 0004 d8dc jsr 4d8dc <__errno> 4ab3a: 740e moveq #14,%d2 4ab3c: 72ff moveq #-1,%d1 4ab3e: 2040 moveal %d0,%a0 4ab40: 2082 movel %d2,%a0@ 4ab42: 6000 00ce braw 4ac12 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4ab46: 2f03 movel %d3,%sp@- 4ab48: 240e movel %fp,%d2 4ab4a: 0682 ffff ffec addil #-20,%d2 4ab50: 4eb9 0004 ec58 jsr 4ec58 4ab56: 7201 moveq #1,%d1 4ab58: 2e81 movel %d1,%sp@ 4ab5a: 2f02 movel %d2,%sp@- 4ab5c: 4878 0001 pea 1 4ab60: 2f00 movel %d0,%sp@- 4ab62: 2f03 movel %d3,%sp@- 4ab64: 4eb9 0004 2b18 jsr 42b18 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 4ab6a: 4fef 0014 lea %sp@(20),%sp 4ab6e: 4a80 tstl %d0 4ab70: 6706 beqs 4ab78 4ab72: 72ff moveq #-1,%d1 4ab74: 6000 009c braw 4ac12 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 4ab78: 226e fff8 moveal %fp@(-8),%a1 4ab7c: 2069 0010 moveal %a1@(16),%a0 4ab80: 4a88 tstl %a0 4ab82: 6620 bnes 4aba4 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 4ab84: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4ab88: 4a88 tstl %a0 <== NOT EXECUTED 4ab8a: 6706 beqs 4ab92 <== NOT EXECUTED 4ab8c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4ab8e: 4e90 jsr %a0@ <== NOT EXECUTED 4ab90: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4ab92: 4eb9 0004 d8dc jsr 4d8dc <__errno> <== NOT EXECUTED 4ab98: 72ff moveq #-1,%d1 <== NOT EXECUTED 4ab9a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ab9c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4aba2: 606e bras 4ac12 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4aba4: 2f02 movel %d2,%sp@- 4aba6: 4e90 jsr %a0@ 4aba8: 588f addql #4,%sp 4abaa: 7201 moveq #1,%d1 4abac: b280 cmpl %d0,%d1 4abae: 6726 beqs 4abd6 rtems_filesystem_freenode( &loc ); 4abb0: 206e fff8 moveal %fp@(-8),%a0 4abb4: 4a88 tstl %a0 4abb6: 670e beqs 4abc6 <== NEVER TAKEN 4abb8: 2068 001c moveal %a0@(28),%a0 4abbc: 4a88 tstl %a0 4abbe: 6706 beqs 4abc6 <== NEVER TAKEN 4abc0: 2f02 movel %d2,%sp@- 4abc2: 4e90 jsr %a0@ 4abc4: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 4abc6: 4eb9 0004 d8dc jsr 4d8dc <__errno> 4abcc: 72ff moveq #-1,%d1 4abce: 2040 moveal %d0,%a0 4abd0: 7014 moveq #20,%d0 4abd2: 2080 movel %d0,%a0@ 4abd4: 603c bras 4ac12 } rtems_filesystem_freenode( &rtems_filesystem_current ); 4abd6: 2279 0005 ccf8 moveal 5ccf8 ,%a1 4abdc: 2069 0010 moveal %a1@(16),%a0 4abe0: 4a88 tstl %a0 4abe2: 6710 beqs 4abf4 <== NEVER TAKEN 4abe4: 2068 001c moveal %a0@(28),%a0 4abe8: 4a88 tstl %a0 4abea: 6708 beqs 4abf4 <== NEVER TAKEN 4abec: 4869 0004 pea %a1@(4) 4abf0: 4e90 jsr %a0@ 4abf2: 588f addql #4,%sp rtems_filesystem_current = loc; 4abf4: 4878 0014 pea 14 4abf8: 486e ffec pea %fp@(-20) 4abfc: 2039 0005 ccf8 movel 5ccf8 ,%d0 4ac02: 5880 addql #4,%d0 4ac04: 2f00 movel %d0,%sp@- 4ac06: 4eb9 0004 e0fc jsr 4e0fc return 0; 4ac0c: 4fef 000c lea %sp@(12),%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; 4ac10: 4281 clrl %d1 return 0; } 4ac12: 242e ffe4 movel %fp@(-28),%d2 4ac16: 2001 movel %d1,%d0 4ac18: 262e ffe8 movel %fp@(-24),%d3 4ac1c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043e10 : int chmod( const char *path, mode_t mode ) { 43e10: 4e56 ffec linkw %fp,#-20 43e14: 2f03 movel %d3,%sp@- 43e16: 262e 0008 movel %fp@(8),%d3 43e1a: 2f02 movel %d2,%sp@- int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 43e1c: 240e movel %fp,%d2 43e1e: 0682 ffff ffec addil #-20,%d2 43e24: 2f03 movel %d3,%sp@- 43e26: 4eb9 0005 1148 jsr 51148 43e2c: 7201 moveq #1,%d1 43e2e: 2e81 movel %d1,%sp@ 43e30: 2f02 movel %d2,%sp@- 43e32: 42a7 clrl %sp@- 43e34: 2f00 movel %d0,%sp@- 43e36: 2f03 movel %d3,%sp@- 43e38: 4eb9 0004 42a8 jsr 442a8 if ( status != 0 ) 43e3e: 4fef 0014 lea %sp@(20),%sp 43e42: 4a80 tstl %d0 43e44: 6706 beqs 43e4c 43e46: 76ff moveq #-1,%d3 43e48: 6000 0082 braw 43ecc return -1; if ( !loc.handlers ){ 43e4c: 206e fff4 moveal %fp@(-12),%a0 43e50: 4a88 tstl %a0 43e52: 6626 bnes 43e7a <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 43e54: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 43e58: 4a88 tstl %a0 <== NOT EXECUTED 43e5a: 670e beqs 43e6a <== NOT EXECUTED 43e5c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43e60: 4a88 tstl %a0 <== NOT EXECUTED 43e62: 6706 beqs 43e6a <== NOT EXECUTED 43e64: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43e66: 4e90 jsr %a0@ <== NOT EXECUTED 43e68: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 43e6a: 4eb9 0004 f6e4 jsr 4f6e4 <__errno> <== NOT EXECUTED 43e70: 76ff moveq #-1,%d3 <== NOT EXECUTED 43e72: 2040 moveal %d0,%a0 <== NOT EXECUTED 43e74: 7009 moveq #9,%d0 <== NOT EXECUTED 43e76: 2080 movel %d0,%a0@ <== NOT EXECUTED 43e78: 6052 bras 43ecc <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 43e7a: 2068 001c moveal %a0@(28),%a0 43e7e: 4a88 tstl %a0 43e80: 6628 bnes 43eaa <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 43e82: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 43e86: 4a88 tstl %a0 <== NOT EXECUTED 43e88: 670e beqs 43e98 <== NOT EXECUTED 43e8a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43e8e: 4a88 tstl %a0 <== NOT EXECUTED 43e90: 6706 beqs 43e98 <== NOT EXECUTED 43e92: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43e94: 4e90 jsr %a0@ <== NOT EXECUTED 43e96: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 43e98: 4eb9 0004 f6e4 jsr 4f6e4 <__errno> <== NOT EXECUTED 43e9e: 76ff moveq #-1,%d3 <== NOT EXECUTED 43ea0: 2040 moveal %d0,%a0 <== NOT EXECUTED 43ea2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 43ea8: 6022 bras 43ecc <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 43eaa: 2f2e 000c movel %fp@(12),%sp@- 43eae: 2f02 movel %d2,%sp@- 43eb0: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 43eb2: 206e fff8 moveal %fp@(-8),%a0 if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 43eb6: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 43eb8: 508f addql #8,%sp 43eba: 4a88 tstl %a0 43ebc: 670e beqs 43ecc <== NEVER TAKEN 43ebe: 2068 001c moveal %a0@(28),%a0 43ec2: 4a88 tstl %a0 43ec4: 6706 beqs 43ecc <== NEVER TAKEN 43ec6: 2f02 movel %d2,%sp@- 43ec8: 4e90 jsr %a0@ 43eca: 588f addql #4,%sp return result; } 43ecc: 2003 movel %d3,%d0 43ece: 242e ffe4 movel %fp@(-28),%d2 43ed2: 262e ffe8 movel %fp@(-24),%d3 43ed6: 4e5e unlk %fp ... =============================================================================== 00043edc : int chown( const char *path, uid_t owner, gid_t group ) { 43edc: 4e56 ffdc linkw %fp,#-36 43ee0: 48d7 003c moveml %d2-%d5,%sp@ 43ee4: 262e 0008 movel %fp@(8),%d3 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 43ee8: 240e movel %fp,%d2 43eea: 0682 ffff ffec addil #-20,%d2 43ef0: 2f03 movel %d3,%sp@- int chown( const char *path, uid_t owner, gid_t group ) { 43ef2: 382e 000e movew %fp@(14),%d4 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 43ef6: 4eb9 0005 1148 jsr 51148 43efc: 7201 moveq #1,%d1 43efe: 2e81 movel %d1,%sp@ int chown( const char *path, uid_t owner, gid_t group ) { 43f00: 3a2e 0012 movew %fp@(18),%d5 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 43f04: 2f02 movel %d2,%sp@- 43f06: 42a7 clrl %sp@- 43f08: 2f00 movel %d0,%sp@- 43f0a: 2f03 movel %d3,%sp@- 43f0c: 4eb9 0004 42a8 jsr 442a8 43f12: 4fef 0014 lea %sp@(20),%sp 43f16: 4a80 tstl %d0 43f18: 6704 beqs 43f1e 43f1a: 76ff moveq #-1,%d3 43f1c: 6054 bras 43f72 return -1; if ( !loc.ops->chown_h ) { 43f1e: 226e fff8 moveal %fp@(-8),%a1 43f22: 2069 0018 moveal %a1@(24),%a0 43f26: 4a88 tstl %a0 43f28: 6620 bnes 43f4a <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 43f2a: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 43f2e: 4a88 tstl %a0 <== NOT EXECUTED 43f30: 6706 beqs 43f38 <== NOT EXECUTED 43f32: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43f34: 4e90 jsr %a0@ <== NOT EXECUTED 43f36: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 43f38: 4eb9 0004 f6e4 jsr 4f6e4 <__errno> <== NOT EXECUTED 43f3e: 76ff moveq #-1,%d3 <== NOT EXECUTED 43f40: 2040 moveal %d0,%a0 <== NOT EXECUTED 43f42: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 43f48: 6028 bras 43f72 <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 43f4a: 3f05 movew %d5,%sp@- 43f4c: 4267 clrw %sp@- 43f4e: 3f04 movew %d4,%sp@- 43f50: 4267 clrw %sp@- 43f52: 2f02 movel %d2,%sp@- 43f54: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 43f56: 206e fff8 moveal %fp@(-8),%a0 if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 43f5a: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 43f5c: 4fef 000c lea %sp@(12),%sp 43f60: 4a88 tstl %a0 43f62: 670e beqs 43f72 <== NEVER TAKEN 43f64: 2068 001c moveal %a0@(28),%a0 43f68: 4a88 tstl %a0 43f6a: 6706 beqs 43f72 <== NEVER TAKEN 43f6c: 2f02 movel %d2,%sp@- 43f6e: 4e90 jsr %a0@ 43f70: 588f addql #4,%sp return result; } 43f72: 2003 movel %d3,%d0 43f74: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 43f7a: 4e5e unlk %fp ... =============================================================================== 0004268c : #include int chroot( const char *pathname ) { 4268c: 4e56 ffec linkw %fp,#-20 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 42690: 203c 0005 e2d0 movel #385744,%d0 #include int chroot( const char *pathname ) { 42696: 2f0b movel %a3,%sp@- 42698: 2f0a movel %a2,%sp@- int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 4269a: b0b9 0005 ccf8 cmpl 5ccf8 ,%d0 426a0: 6628 bnes 426ca <== NEVER TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 426a2: 4eb9 0004 3c0a jsr 43c0a if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 426a8: 41f9 0005 e2d0 lea 5e2d0 ,%a0 426ae: b1f9 0005 ccf8 cmpal 5ccf8 ,%a0 426b4: 6614 bnes 426ca <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 426b6: 4eb9 0004 d8dc jsr 4d8dc <__errno> <== NOT EXECUTED 426bc: 72ff moveq #-1,%d1 <== NOT EXECUTED 426be: 2040 moveal %d0,%a0 <== NOT EXECUTED 426c0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 426c6: 6000 0084 braw 4274c <== NOT EXECUTED } result = chdir(pathname); 426ca: 2f2e 0008 movel %fp@(8),%sp@- 426ce: 4eb9 0004 ab24 jsr 4ab24 if (result) { 426d4: 588f addql #4,%sp 426d6: 4a80 tstl %d0 426d8: 6620 bnes 426fa <== NEVER TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 426da: 42a7 clrl %sp@- 426dc: 486e ffec pea %fp@(-20) 426e0: 42a7 clrl %sp@- 426e2: 4878 0001 pea 1 426e6: 4879 0005 bef1 pea 5bef1 <__FUNCTION__.5393+0x18> 426ec: 4eb9 0004 2b18 jsr 42b18 426f2: 4fef 0014 lea %sp@(20),%sp 426f6: 4a80 tstl %d0 426f8: 6714 beqs 4270e <== ALWAYS TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 426fa: 45f9 0004 d8dc lea 4d8dc <__errno>,%a2 <== NOT EXECUTED 42700: 4e92 jsr %a2@ <== NOT EXECUTED 42702: 2640 moveal %d0,%a3 <== NOT EXECUTED 42704: 4e92 jsr %a2@ <== NOT EXECUTED 42706: 72ff moveq #-1,%d1 <== NOT EXECUTED 42708: 2040 moveal %d0,%a0 <== NOT EXECUTED 4270a: 2690 movel %a0@,%a3@ <== NOT EXECUTED 4270c: 603e bras 4274c <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 4270e: 2279 0005 ccf8 moveal 5ccf8 ,%a1 42714: 2069 0024 moveal %a1@(36),%a0 42718: 4a88 tstl %a0 4271a: 6710 beqs 4272c <== NEVER TAKEN 4271c: 2068 001c moveal %a0@(28),%a0 42720: 4a88 tstl %a0 42722: 6708 beqs 4272c <== NEVER TAKEN 42724: 4869 0018 pea %a1@(24) 42728: 4e90 jsr %a0@ 4272a: 588f addql #4,%sp rtems_filesystem_root = loc; 4272c: 4878 0014 pea 14 42730: 486e ffec pea %fp@(-20) 42734: 2079 0005 ccf8 moveal 5ccf8 ,%a0 4273a: 41e8 0018 lea %a0@(24),%a0 4273e: 2f08 movel %a0,%sp@- 42740: 4eb9 0004 e0fc jsr 4e0fc return 0; 42746: 4fef 000c lea %sp@(12),%sp if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; 4274a: 4281 clrl %d1 return 0; } 4274c: 246e ffe4 moveal %fp@(-28),%a2 42750: 2001 movel %d1,%d0 42752: 266e ffe8 moveal %fp@(-24),%a3 42756: 4e5e unlk %fp ... =============================================================================== 0004a004 : #include int close( int fd ) { 4a004: 4e56 0000 linkw %fp,#0 4a008: 202e 0008 movel %fp@(8),%d0 4a00c: 2f0a movel %a2,%sp@- 4a00e: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 4a010: b0b9 0005 c414 cmpl 5c414 ,%d0 4a016: 6416 bccs 4a02e iop = rtems_libio_iop(fd); 4a018: 2479 0005 dac0 moveal 5dac0 ,%a2 4a01e: ed88 lsll #6,%d0 4a020: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 4a022: 202a 0014 movel %a2@(20),%d0 4a026: 0280 0000 0100 andil #256,%d0 4a02c: 6610 bnes 4a03e 4a02e: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 4a034: 74ff moveq #-1,%d2 4a036: 2040 moveal %d0,%a0 4a038: 7009 moveq #9,%d0 4a03a: 2080 movel %d0,%a0@ 4a03c: 603a bras 4a078 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 4a03e: 206a 003c moveal %a2@(60),%a0 4a042: 2068 0004 moveal %a0@(4),%a0 4a046: 4a88 tstl %a0 4a048: 6604 bnes 4a04e <== ALWAYS TAKEN 4a04a: 4282 clrl %d2 <== NOT EXECUTED 4a04c: 6008 bras 4a056 <== NOT EXECUTED rc = (*iop->handlers->close_h)( iop ); 4a04e: 2f0a movel %a2,%sp@- 4a050: 4e90 jsr %a0@ 4a052: 588f addql #4,%sp 4a054: 2400 movel %d0,%d2 rtems_filesystem_freenode( &iop->pathinfo ); 4a056: 206a 0024 moveal %a2@(36),%a0 4a05a: 4a88 tstl %a0 4a05c: 6710 beqs 4a06e <== NEVER TAKEN 4a05e: 2068 001c moveal %a0@(28),%a0 4a062: 4a88 tstl %a0 4a064: 6708 beqs 4a06e 4a066: 486a 0018 pea %a2@(24) 4a06a: 4e90 jsr %a0@ 4a06c: 588f addql #4,%sp rtems_libio_free( iop ); 4a06e: 2f0a movel %a2,%sp@- 4a070: 4eb9 0004 a29a jsr 4a29a return rc; 4a076: 588f addql #4,%sp } 4a078: 2002 movel %d2,%d0 4a07a: 242e fff8 movel %fp@(-8),%d2 4a07e: 246e fffc moveal %fp@(-4),%a2 4a082: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000483ec : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 483ec: 4e56 fff4 linkw %fp,#-12 483f0: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 483f4: 486e fff4 pea %fp@(-12) { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 483f8: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = 0; 483fc: 42ae fff8 clrl %fp@(-8) args.mode = 0; 48400: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 48404: 2f29 000c movel %a1@(12),%sp@- 48408: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 4840c: 2d48 fff4 movel %a0,%fp@(-12) args.flags = 0; args.mode = 0; status = rtems_io_close( 48410: 4eb9 0004 921c jsr 4921c np->major, np->minor, (void *) &args ); if ( status ) { 48416: 4fef 000c lea %sp@(12),%sp 4841a: 4a80 tstl %d0 4841c: 670a beqs 48428 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4841e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48420: 4eb9 0004 84f8 jsr 484f8 <== NOT EXECUTED 48426: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 48428: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004843e : { int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4843e: 70f8 moveq #-8,%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 48440: 4e56 ffe4 linkw %fp,#-28 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 48444: c0ae 0010 andl %fp@(16),%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 48448: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4844c: 282e 0008 movel %fp@(8),%d4 48450: 262e 000c movel %fp@(12),%d3 48454: 246e 0014 moveal %fp@(20),%a2 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 48458: 4a80 tstl %d0 4845a: 6710 beqs 4846c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 4845c: 4eb9 0004 9fa4 jsr 49fa4 <__errno> <== NOT EXECUTED 48462: 7601 moveq #1,%d3 <== NOT EXECUTED 48464: 72ff moveq #-1,%d1 <== NOT EXECUTED 48466: 2040 moveal %d0,%a0 <== NOT EXECUTED 48468: 2083 movel %d3,%a0@ <== NOT EXECUTED 4846a: 607e bras 484ea <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 4846c: 2652 moveal %a2@,%a3 if (!device_name_table) 4846e: 4a8b tstl %a3 48470: 670a beqs 4847c <== NEVER TAKEN 48472: 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) 48474: 4bf9 0004 b2ac lea 4b2ac ,%a5 4847a: 6058 bras 484d4 rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 4847c: 4eb9 0004 9fa4 jsr 49fa4 <__errno> <== NOT EXECUTED 48482: 740e moveq #14,%d2 <== NOT EXECUTED 48484: 72ff moveq #-1,%d1 <== NOT EXECUTED 48486: 2040 moveal %d0,%a0 <== NOT EXECUTED 48488: 2082 movel %d2,%a0@ <== NOT EXECUTED 4848a: 605e bras 484ea <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 4848c: 2853 moveal %a3@,%a4 4848e: 4a8c tstl %a4 48490: 673c beqs 484ce continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 48492: 2f03 movel %d3,%sp@- 48494: 2f0c movel %a4,%sp@- 48496: 2f04 movel %d4,%sp@- 48498: 4e95 jsr %a5@ 4849a: 4fef 000c lea %sp@(12),%sp 4849e: 4a80 tstl %d0 484a0: 662c bnes 484ce continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 484a2: 4a34 3800 tstb %a4@(00000000,%d3:l) 484a6: 6626 bnes 484ce <== NEVER TAKEN /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 484a8: 2079 0005 8608 moveal 58608 ,%a0 484ae: 4281 clrl %d1 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; 484b0: 203c 0005 85b0 movel #361904,%d0 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 484b6: 2568 0028 0010 movel %a0@(40),%a2@(16) continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 484bc: 41f9 0005 8568 lea 58568 ,%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; 484c2: 2540 0008 movel %d0,%a2@(8) pathloc->ops = &devFS_ops; 484c6: 2548 000c movel %a0,%a2@(12) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 484ca: 248b movel %a3,%a2@ pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 484cc: 601c bras 484ea /* 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++) { 484ce: 5282 addql #1,%d2 484d0: 47eb 0014 lea %a3@(20),%a3 484d4: b4b9 0005 8488 cmpl 58488 ,%d2 484da: 65b0 bcss 4848c pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 484dc: 4eb9 0004 9fa4 jsr 49fa4 <__errno> 484e2: 72ff moveq #-1,%d1 484e4: 2040 moveal %d0,%a0 484e6: 7002 moveq #2,%d0 484e8: 2080 movel %d0,%a0@ } 484ea: 2001 movel %d1,%d0 484ec: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 484f2: 4e5e unlk %fp ... =============================================================================== 00041c80 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 41c80: 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( 41c84: 2039 0005 8488 movel 58488 ,%d0 41c8a: 2200 movel %d0,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 41c8c: 2f0a movel %a2,%sp@- 41c8e: 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( 41c92: e989 lsll #4,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 41c94: 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( 41c96: 2041 moveal %d1,%a0 41c98: 4870 0c00 pea %a0@(00000000,%d0:l:4) 41c9c: 4eb9 0004 81d8 jsr 481d8 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 41ca2: 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( 41ca4: 2400 movel %d0,%d2 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 41ca6: 6610 bnes 41cb8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 41ca8: 4eb9 0004 9fa4 jsr 49fa4 <__errno> <== NOT EXECUTED 41cae: 720c moveq #12,%d1 <== NOT EXECUTED 41cb0: 2040 moveal %d0,%a0 <== NOT EXECUTED 41cb2: 70ff moveq #-1,%d0 <== NOT EXECUTED 41cb4: 2081 movel %d1,%a0@ <== NOT EXECUTED 41cb6: 6038 bras 41cf0 <== NOT EXECUTED memset( 41cb8: 2039 0005 8488 movel 58488 ,%d0 41cbe: 2200 movel %d0,%d1 41cc0: e989 lsll #4,%d1 41cc2: 2041 moveal %d1,%a0 41cc4: 4870 0c00 pea %a0@(00000000,%d0:l:4) 41cc8: 42a7 clrl %sp@- 41cca: 2f02 movel %d2,%sp@- 41ccc: 4eb9 0004 a7f4 jsr 4a7f4 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; 41cd2: 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; 41cd6: 203c 0005 85b0 movel #361904,%d0 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 41cdc: 41f9 0005 8568 lea 58568 ,%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; 41ce2: 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; 41ce6: 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; 41ce8: 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; 41cec: 2542 001c movel %d2,%a2@(28) return 0; } 41cf0: 242e fff8 movel %fp@(-8),%d2 41cf4: 246e fffc moveal %fp@(-4),%a2 41cf8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041e30 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 41e30: 4e56 fff0 linkw %fp,#-16 41e34: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 41e38: 486e fff0 pea %fp@(-16) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; 41e3c: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) { rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41e42: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 41e46: 2f29 000c movel %a1@(12),%sp@- np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; args.buffer = buffer; 41e4a: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) status = rtems_io_control( 41e50: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41e54: 2d48 fff0 movel %a0,%fp@(-16) args.command = command; args.buffer = buffer; status = rtems_io_control( 41e58: 4eb9 0004 58f4 jsr 458f4 np->major, np->minor, (void *) &args ); if ( status ) 41e5e: 4fef 000c lea %sp@(12),%sp 41e62: 4a80 tstl %d0 41e64: 670c beqs 41e72 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 41e66: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41e68: 4eb9 0004 84f8 jsr 484f8 <== NOT EXECUTED 41e6e: 588f addql #4,%sp <== NOT EXECUTED 41e70: 6004 bras 41e76 <== NOT EXECUTED return args.ioctl_return; 41e72: 202e fffc movel %fp@(-4),%d0 } 41e76: 4e5e unlk %fp ... =============================================================================== 00041cfc : * 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') && 41cfc: 7264 moveq #100,%d1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41cfe: 4e56 ffdc linkw %fp,#-36 41d02: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 41d06: 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') && 41d0a: 1012 moveb %a2@,%d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41d0c: 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') && 41d10: 49c0 extbl %d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41d12: 2c2e 0010 movel %fp@(16),%d6 41d16: 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') && 41d1a: b280 cmpl %d0,%d1 41d1c: 6628 bnes 41d46 <== NEVER TAKEN 41d1e: 123c 0065 moveb #101,%d1 41d22: 102a 0001 moveb %a2@(1),%d0 41d26: 49c0 extbl %d0 41d28: b280 cmpl %d0,%d1 41d2a: 661a bnes 41d46 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 41d2c: 123c 0076 moveb #118,%d1 41d30: 102a 0002 moveb %a2@(2),%d0 41d34: 49c0 extbl %d0 41d36: b280 cmpl %d0,%d1 41d38: 660c bnes 41d46 <== NEVER TAKEN 41d3a: 4a2a 0003 tstb %a2@(3) 41d3e: 6606 bnes 41d46 41d40: 4201 clrb %d1 41d42: 6000 00d2 braw 41e16 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 41d46: 2004 movel %d4,%d0 41d48: 0280 0000 f000 andil #61440,%d0 41d4e: 0c80 0000 6000 cmpil #24576,%d0 41d54: 671a beqs 41d70 <== NEVER TAKEN 41d56: 0c80 0000 2000 cmpil #8192,%d0 41d5c: 6712 beqs 41d70 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 41d5e: 4eb9 0004 9fa4 jsr 49fa4 <__errno> <== NOT EXECUTED 41d64: 7816 moveq #22,%d4 <== NOT EXECUTED 41d66: 72ff moveq #-1,%d1 <== NOT EXECUTED 41d68: 2040 moveal %d0,%a0 <== NOT EXECUTED 41d6a: 2084 movel %d4,%a0@ <== NOT EXECUTED 41d6c: 6000 00a8 braw 41e16 <== 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; 41d70: 206e 0018 moveal %fp@(24),%a0 41d74: 2650 moveal %a0@,%a3 if (!device_name_table) 41d76: 4a8b tstl %a3 41d78: 670e beqs 41d88 <== NEVER TAKEN 41d7a: 284b moveal %a3,%a4 41d7c: 74ff moveq #-1,%d2 41d7e: 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) 41d80: 4bf9 0004 add0 lea 4add0 ,%a5 41d86: 6038 bras 41dc0 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 ); 41d88: 4eb9 0004 9fa4 jsr 49fa4 <__errno> <== NOT EXECUTED 41d8e: 760e moveq #14,%d3 <== NOT EXECUTED 41d90: 72ff moveq #-1,%d1 <== NOT EXECUTED 41d92: 2240 moveal %d0,%a1 <== NOT EXECUTED 41d94: 2283 movel %d3,%a1@ <== NOT EXECUTED 41d96: 607e bras 41e16 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 41d98: 2014 movel %a4@,%d0 41d9a: 671c beqs 41db8 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 41d9c: 2f00 movel %d0,%sp@- 41d9e: 2f0a movel %a2,%sp@- 41da0: 4e95 jsr %a5@ 41da2: 508f addql #8,%sp 41da4: 4a80 tstl %d0 41da6: 6612 bnes 41dba <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EEXIST ); 41da8: 4eb9 0004 9fa4 jsr 49fa4 <__errno> <== NOT EXECUTED 41dae: 7411 moveq #17,%d2 <== NOT EXECUTED 41db0: 72ff moveq #-1,%d1 <== NOT EXECUTED 41db2: 2040 moveal %d0,%a0 <== NOT EXECUTED 41db4: 2082 movel %d2,%a0@ <== NOT EXECUTED 41db6: 605e bras 41e16 <== NOT EXECUTED 41db8: 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++){ 41dba: 5283 addql #1,%d3 41dbc: 49ec 0014 lea %a4@(20),%a4 41dc0: b6b9 0005 8488 cmpl 58488 ,%d3 41dc6: 65d0 bcss 41d98 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 41dc8: 70ff moveq #-1,%d0 41dca: b082 cmpl %d2,%d0 41dcc: 6610 bnes 41dde <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 41dce: 4eb9 0004 9fa4 jsr 49fa4 <__errno> <== NOT EXECUTED 41dd4: 72ff moveq #-1,%d1 <== NOT EXECUTED 41dd6: 2040 moveal %d0,%a0 <== NOT EXECUTED 41dd8: 700c moveq #12,%d0 <== NOT EXECUTED 41dda: 2080 movel %d0,%a0@ <== NOT EXECUTED 41ddc: 6038 bras 41e16 <== NOT EXECUTED _ISR_Disable(level); 41dde: 203c 0000 0700 movel #1792,%d0 41de4: 40c3 movew %sr,%d3 41de6: 8083 orl %d3,%d0 41de8: 46c0 movew %d0,%sr device_name_table[slot].device_name = (char *)path; 41dea: 2002 movel %d2,%d0 41dec: e988 lsll #4,%d0 41dee: 2240 moveal %d0,%a1 41df0: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 41df4: d7c8 addal %a0,%a3 41df6: 268a movel %a2,%a3@ device_name_table[slot].device_name_length = strlen(path); 41df8: 2f0a movel %a2,%sp@- 41dfa: 4eb9 0004 b294 jsr 4b294 41e00: 588f addql #4,%sp device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 41e02: 2744 0010 movel %d4,%a3@(16) if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); 41e06: 2740 0004 movel %d0,%a3@(4) device_name_table[slot].major = major; 41e0a: 2746 0008 movel %d6,%a3@(8) device_name_table[slot].minor = minor; 41e0e: 2745 000c movel %d5,%a3@(12) device_name_table[slot].mode = mode; _ISR_Enable(level); 41e12: 46c3 movew %d3,%sr 41e14: 4281 clrl %d1 return 0; } 41e16: 2001 movel %d1,%d0 41e18: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 41e1e: 4e5e unlk %fp ... =============================================================================== 00041e7c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 41e7c: 4e56 fff4 linkw %fp,#-12 41e80: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 41e84: 486e fff4 pea %fp@(-12) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 41e88: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41e8e: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 41e92: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) status = rtems_io_open( 41e98: 2f29 000c movel %a1@(12),%sp@- 41e9c: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41ea0: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 41ea4: 4eb9 0004 5a14 jsr 45a14 np->major, np->minor, (void *) &args ); if ( status ) 41eaa: 4fef 000c lea %sp@(12),%sp 41eae: 4a80 tstl %d0 41eb0: 670a beqs 41ebc <== ALWAYS TAKEN return rtems_deviceio_errno(status); 41eb2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41eb4: 4eb9 0004 84f8 jsr 484f8 <== NOT EXECUTED 41eba: 588f addql #4,%sp <== NOT EXECUTED return 0; } 41ebc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041ec0 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 41ec0: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 41ec4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 41ec8: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 41ecc: 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->file_info; 41ed2: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 41ed6: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 41edc: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 41ee2: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 41ee6: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED 41eea: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 41eee: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 41ef2: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41ef6: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 41efa: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 41efe: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 41f02: 4eb9 0004 5a6c jsr 45a6c <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 41f08: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 41f0c: 4a80 tstl %d0 <== NOT EXECUTED 41f0e: 670c beqs 41f1c <== NOT EXECUTED return rtems_deviceio_errno(status); 41f10: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41f12: 4eb9 0004 84f8 jsr 484f8 <== NOT EXECUTED 41f18: 588f addql #4,%sp <== NOT EXECUTED 41f1a: 6004 bras 41f20 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 41f1c: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 41f20: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041f24 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 41f24: 4e56 0000 linkw %fp,#0 41f28: 206e 0008 moveal %fp@(8),%a0 41f2c: 226e 000c moveal %fp@(12),%a1 rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 41f30: 2050 moveal %a0@,%a0 if (!the_dev) 41f32: 4a88 tstl %a0 41f34: 6610 bnes 41f46 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 41f36: 4eb9 0004 9fa4 jsr 49fa4 <__errno> <== NOT EXECUTED 41f3c: 720e moveq #14,%d1 <== NOT EXECUTED 41f3e: 2040 moveal %d0,%a0 <== NOT EXECUTED 41f40: 70ff moveq #-1,%d0 <== NOT EXECUTED 41f42: 2081 movel %d1,%a0@ <== NOT EXECUTED 41f44: 6016 bras 41f5c <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 41f46: 2228 000c movel %a0@(12),%d1 buf->st_mode = the_dev->mode; 41f4a: 4280 clrl %d0 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 ); 41f4c: 2368 0008 0016 movel %a0@(8),%a1@(22) buf->st_mode = the_dev->mode; 41f52: 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 ); 41f58: 2341 001a movel %d1,%a1@(26) buf->st_mode = the_dev->mode; return 0; } 41f5c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041f60 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 41f60: 4e56 ffe4 linkw %fp,#-28 41f64: 206e 0008 moveal %fp@(8),%a0 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 41f68: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 41f6c: 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->file_info; 41f72: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 41f76: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 41f7c: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 41f82: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 41f86: 2f29 000c movel %a1@(12),%sp@- 41f8a: 2f29 0008 movel %a1@(8),%sp@- rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 41f8e: 2028 000c movel %a0@(12),%d0 41f92: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41f96: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 41f9a: 2d40 ffe8 movel %d0,%fp@(-24) 41f9e: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 41fa2: 4eb9 0004 5ac4 jsr 45ac4 np->major, np->minor, (void *) &args ); if ( status ) 41fa8: 4fef 000c lea %sp@(12),%sp 41fac: 4a80 tstl %d0 41fae: 670c beqs 41fbc <== ALWAYS TAKEN return rtems_deviceio_errno(status); 41fb0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41fb2: 4eb9 0004 84f8 jsr 484f8 <== NOT EXECUTED 41fb8: 588f addql #4,%sp <== NOT EXECUTED 41fba: 6004 bras 41fc0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 41fbc: 202e fffc movel %fp@(-4),%d0 } 41fc0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c55c : */ int device_close( rtems_libio_t *iop ) { 4c55c: 4e56 fff4 linkw %fp,#-12 4c560: 226e 0008 moveal %fp@(8),%a1 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 4c564: 486e fff4 pea %fp@(-12) { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4c568: 2069 0038 moveal %a1@(56),%a0 args.iop = iop; 4c56c: 2d49 fff4 movel %a1,%fp@(-12) args.flags = 0; 4c570: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4c574: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 4c578: 2f28 0050 movel %a0@(80),%sp@- 4c57c: 2f28 004c movel %a0@(76),%sp@- 4c580: 4eb9 0004 cd38 jsr 4cd38 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4c586: 4fef 000c lea %sp@(12),%sp 4c58a: 4a80 tstl %d0 4c58c: 670a beqs 4c598 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4c58e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c590: 4eb9 0004 d034 jsr 4d034 <== NOT EXECUTED 4c596: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 4c598: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c44a : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4c44a: 4e56 fff0 linkw %fp,#-16 rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 4c44e: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) the_jnode = iop->file_info; status = rtems_io_control( 4c454: 486e fff0 pea %fp@(-16) int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4c458: 226e 0008 moveal %fp@(8),%a1 rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 4c45c: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; the_jnode = iop->file_info; 4c462: 2069 0038 moveal %a1@(56),%a0 { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4c466: 2d49 fff0 movel %a1,%fp@(-16) args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4c46a: 2f28 0050 movel %a0@(80),%sp@- 4c46e: 2f28 004c movel %a0@(76),%sp@- 4c472: 4eb9 0004 cd90 jsr 4cd90 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4c478: 4fef 000c lea %sp@(12),%sp 4c47c: 4a80 tstl %d0 4c47e: 670c beqs 4c48c <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4c480: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c482: 4eb9 0004 d034 jsr 4d034 <== NOT EXECUTED 4c488: 588f addql #4,%sp <== NOT EXECUTED 4c48a: 6004 bras 4c490 <== NOT EXECUTED return args.ioctl_return; 4c48c: 202e fffc movel %fp@(-4),%d0 } 4c490: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c59c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4c59c: 4e56 fff4 linkw %fp,#-12 4c5a0: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4c5a4: 486e fff4 pea %fp@(-12) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4c5a8: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4c5ae: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 4c5b2: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4c5b8: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4c5bc: 2f29 0050 movel %a1@(80),%sp@- 4c5c0: 2f29 004c movel %a1@(76),%sp@- 4c5c4: 4eb9 0004 cde8 jsr 4cde8 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4c5ca: 4fef 000c lea %sp@(12),%sp 4c5ce: 4a80 tstl %d0 4c5d0: 670a beqs 4c5dc <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4c5d2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c5d4: 4eb9 0004 d034 jsr 4d034 <== NOT EXECUTED 4c5da: 588f addql #4,%sp <== NOT EXECUTED return 0; } 4c5dc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c4f8 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4c4f8: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4c4fc: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 4c500: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4c504: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 4c50a: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; 4c510: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4c516: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4c51a: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4c51e: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4c522: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 4c526: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4c52a: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4c52e: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 4c532: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4c536: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4c53a: 4eb9 0004 ce40 jsr 4ce40 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4c540: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c544: 4a80 tstl %d0 <== NOT EXECUTED 4c546: 670c beqs 4c554 <== NOT EXECUTED return rtems_deviceio_errno(status); 4c548: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c54a: 4eb9 0004 d034 jsr 4d034 <== NOT EXECUTED 4c550: 588f addql #4,%sp <== NOT EXECUTED 4c552: 6004 bras 4c558 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 4c554: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4c558: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c494 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4c494: 4e56 ffe4 linkw %fp,#-28 4c498: 206e 0008 moveal %fp@(8),%a0 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 4c49c: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4c4a0: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4c4a6: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; 4c4ac: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4c4b2: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; 4c4b6: 2028 000c movel %a0@(12),%d0 4c4ba: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4c4be: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4c4c2: 2d40 ffe8 movel %d0,%fp@(-24) 4c4c6: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4c4ca: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 4c4ce: 2f29 0050 movel %a1@(80),%sp@- 4c4d2: 2f29 004c movel %a1@(76),%sp@- 4c4d6: 4eb9 0004 ce98 jsr 4ce98 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4c4dc: 4fef 000c lea %sp@(12),%sp 4c4e0: 4a80 tstl %d0 4c4e2: 670c beqs 4c4f0 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4c4e4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c4e6: 4eb9 0004 d034 jsr 4d034 <== NOT EXECUTED 4c4ec: 588f addql #4,%sp <== NOT EXECUTED 4c4ee: 6004 bras 4c4f4 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 4c4f0: 202e fffc movel %fp@(-4),%d0 } 4c4f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000442ca : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 442ca: 4e56 fff4 linkw %fp,#-12 442ce: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 442d2: 246e 0008 moveal %fp@(8),%a2 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 442d6: 4aaa 00b4 tstl %a2@(180) 442da: 674e beqs 4432a rtems_interrupt_disable (level); 442dc: 243c 0000 0700 movel #1792,%d2 442e2: 2202 movel %d2,%d1 442e4: 40c0 movew %sr,%d0 442e6: 8280 orl %d0,%d1 442e8: 46c1 movew %d1,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 442ea: 47f9 0004 57c0 lea 457c0 ,%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) { 442f0: 602a bras 4431c tty->rawOutBufState = rob_wait; 442f2: 7202 moveq #2,%d1 442f4: 2541 0094 movel %d1,%a2@(148) rtems_interrupt_enable (level); 442f8: 46c0 movew %d0,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 442fa: 42a7 clrl %sp@- 442fc: 42a7 clrl %sp@- 442fe: 2f2a 008c movel %a2@(140),%sp@- 44302: 4e93 jsr %a3@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44304: 4fef 000c lea %sp@(12),%sp 44308: 4a80 tstl %d0 4430a: 6708 beqs 44314 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 4430c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4430e: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED rtems_interrupt_disable (level); 44314: 2202 movel %d2,%d1 44316: 40c0 movew %sr,%d0 44318: 8280 orl %d0,%d1 4431a: 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) { 4431c: 206a 0084 moveal %a2@(132),%a0 44320: 222a 0080 movel %a2@(128),%d1 44324: b288 cmpl %a0,%d1 44326: 66ca bnes 442f2 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 44328: 46c0 movew %d0,%sr } } 4432a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 44330: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042d14 : int dup2( int fildes, int fildes2 ) { 42d14: 4e56 ffa8 linkw %fp,#-88 42d18: 48d7 041c moveml %d2-%d4/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42d1c: 280e movel %fp,%d4 42d1e: 0684 ffff ffba addil #-70,%d4 42d24: 45f9 0004 3478 lea 43478 ,%a2 42d2a: 2f04 movel %d4,%sp@- int dup2( int fildes, int fildes2 ) { 42d2c: 242e 0008 movel %fp@(8),%d2 42d30: 262e 000c movel %fp@(12),%d3 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42d34: 2f02 movel %d2,%sp@- 42d36: 4e92 jsr %a2@ if ( status == -1 ) 42d38: 508f addql #8,%sp 42d3a: 72ff moveq #-1,%d1 42d3c: b280 cmpl %d0,%d1 42d3e: 6720 beqs 42d60 <== NEVER TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 42d40: 2f04 movel %d4,%sp@- 42d42: 2f03 movel %d3,%sp@- 42d44: 4e92 jsr %a2@ if ( status == -1 ) 42d46: 508f addql #8,%sp 42d48: 72ff moveq #-1,%d1 42d4a: b280 cmpl %d0,%d1 42d4c: 6712 beqs 42d60 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 42d4e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42d50: 42a7 clrl %sp@- <== NOT EXECUTED 42d52: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42d54: 4eb9 0004 3128 jsr 43128 <== NOT EXECUTED 42d5a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42d5e: 6002 bras 42d62 <== NOT EXECUTED 42d60: 70ff moveq #-1,%d0 } 42d62: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2 42d68: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043e30 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 43e30: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 43e34: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 43e38: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43e3c: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 43e40: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43e44: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 43e4a: 1202 moveb %d2,%d1 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43e4c: 4a80 tstl %d0 <== NOT EXECUTED 43e4e: 674c beqs 43e9c <== NOT EXECUTED 43e50: 4280 clrl %d0 <== NOT EXECUTED 43e52: 1002 moveb %d2,%d0 <== NOT EXECUTED 43e54: 2079 0005 c5c0 moveal 5c5c0 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43e5a: 1630 0801 moveb %a0@(00000001,%d0:l),%d3 <== NOT EXECUTED 43e5e: 49c3 extbl %d3 <== NOT EXECUTED 43e60: 0803 0005 btst #5,%d3 <== NOT EXECUTED 43e64: 6736 beqs 43e9c <== NOT EXECUTED 43e66: 7609 moveq #9,%d3 <== NOT EXECUTED 43e68: b680 cmpl %d0,%d3 <== NOT EXECUTED 43e6a: 6730 beqs 43e9c <== NOT EXECUTED 43e6c: 163c 000a moveb #10,%d3 <== NOT EXECUTED 43e70: b680 cmpl %d0,%d3 <== NOT EXECUTED 43e72: 6728 beqs 43e9c <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 43e74: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e76: 4878 0002 pea 2 <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 43e7a: 7040 moveq #64,%d0 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 43e7c: 486e fffe pea %fp@(-2) <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 43e80: b182 eorl %d0,%d2 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 43e82: 765e moveq #94,%d3 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 43e84: 1d42 ffff moveb %d2,%fp@(-1) <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 43e88: 1d43 fffe moveb %d3,%fp@(-2) <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 43e8c: 4eb9 0004 3bee jsr 43bee <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43e92: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; 43e96: 54aa 0028 addql #2,%a2@(40) <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43e9a: 6010 bras 43eac <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 43e9c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e9e: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 43ea4: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43ea6: 4eba fe40 jsr %pc@(43ce8 ) <== NOT EXECUTED 43eaa: 508f addql #8,%sp <== NOT EXECUTED } } 43eac: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 <== NOT EXECUTED 43eb2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000429ec : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 429ec: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp != NULL) 429f0: 2039 0005 e82a movel 5e82a ,%d0 <== NOT EXECUTED 429f6: 670a beqs 42a02 <== NOT EXECUTED fclose(group_fp); 429f8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 429fa: 4eb9 0004 da8a jsr 4da8a <== NOT EXECUTED 42a00: 588f addql #4,%sp <== NOT EXECUTED } 42a02: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042a06 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 42a06: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp != NULL) 42a0a: 2039 0005 e742 movel 5e742 ,%d0 <== NOT EXECUTED 42a10: 670a beqs 42a1c <== NOT EXECUTED fclose(passwd_fp); 42a12: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42a14: 4eb9 0004 da8a jsr 4da8a <== NOT EXECUTED 42a1a: 588f addql #4,%sp <== NOT EXECUTED } 42a1c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043eb6 : * 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) { 43eb6: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 43eba: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 43ebe: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 43ec2: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED if (tty->ccount == 0) 43ec6: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 43eca: 6700 0178 beqw 44044 <== NOT EXECUTED return; if (lineFlag) { 43ece: 4a83 tstl %d3 <== NOT EXECUTED 43ed0: 6700 0162 beqw 44034 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 43ed4: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 43ed8: 44c0 movew %d0,%ccr <== NOT EXECUTED 43eda: 6b08 bmis 43ee4 <== NOT EXECUTED tty->ccount = 0; 43edc: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED return; 43ee0: 6000 0162 braw 44044 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 43ee4: 0800 0004 btst #4,%d0 <== NOT EXECUTED 43ee8: 6600 014a bnew 44034 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 43eec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43eee: 4280 clrl %d0 <== NOT EXECUTED 43ef0: 102a 0044 moveb %a2@(68),%d0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 43ef4: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 43ef8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43efa: 4eba ff34 jsr %pc@(43e30 ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 43efe: 508f addql #8,%sp <== NOT EXECUTED 43f00: 7020 moveq #32,%d0 <== NOT EXECUTED 43f02: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43f06: 6700 013c beqw 44044 <== NOT EXECUTED echo ('\n', tty); 43f0a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 43f0e: 700a moveq #10,%d0 <== NOT EXECUTED 43f10: 602c bras 43f3e <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 43f12: 5388 subql #1,%a0 <== NOT EXECUTED 43f14: 226a 001c moveal %a2@(28),%a1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 43f18: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 43f1c: 2548 0020 movel %a0,%a2@(32) <== NOT EXECUTED 43f20: 1431 8800 moveb %a1@(00000000,%a0:l),%d2 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 43f24: 44c0 movew %d0,%ccr <== NOT EXECUTED 43f26: 6a00 0106 bplw 4402e <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 43f2a: 4a83 tstl %d3 <== NOT EXECUTED 43f2c: 6620 bnes 43f4e <== NOT EXECUTED 43f2e: 0800 0004 btst #4,%d0 <== NOT EXECUTED 43f32: 661a bnes 43f4e <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 43f34: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 43f38: 4280 clrl %d0 <== NOT EXECUTED 43f3a: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED 43f3e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 43f42: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 43f48: 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); 43f4a: 6000 fee4 braw 43e30 <== NOT EXECUTED 43f4e: 2279 0005 c5c0 moveal 5c5c0 <__ctype_ptr__>,%a1 <== NOT EXECUTED } else if (c == '\t') { 43f54: 7209 moveq #9,%d1 <== NOT EXECUTED 43f56: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 43f5c: b282 cmpl %d2,%d1 <== NOT EXECUTED 43f5e: 6660 bnes 43fc0 <== NOT EXECUTED int col = tty->read_start_column; 43f60: 242a 002c movel %a2@(44),%d2 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 43f64: 4201 clrb %d1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 43f66: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 43f6c: 602e bras 43f9c <== NOT EXECUTED c = tty->cbuf[i++]; 43f6e: 286a 001c moveal %a2@(28),%a4 <== NOT EXECUTED if (c == '\t') { 43f72: 4284 clrl %d4 <== NOT EXECUTED 43f74: 1834 1800 moveb %a4@(00000000,%d1:l),%d4 <== NOT EXECUTED 43f78: 7a09 moveq #9,%d5 <== NOT EXECUTED 43f7a: ba84 cmpl %d4,%d5 <== NOT EXECUTED 43f7c: 6606 bnes 43f84 <== NOT EXECUTED col = (col | 7) + 1; 43f7e: 7807 moveq #7,%d4 <== NOT EXECUTED 43f80: 8484 orl %d4,%d2 <== NOT EXECUTED 43f82: 6014 bras 43f98 <== NOT EXECUTED } else if (iscntrl (c)) { 43f84: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 <== NOT EXECUTED 43f88: 49c4 extbl %d4 <== NOT EXECUTED 43f8a: 0804 0005 btst #5,%d4 <== NOT EXECUTED 43f8e: 6708 beqs 43f98 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 43f90: 4a80 tstl %d0 <== NOT EXECUTED 43f92: 6706 beqs 43f9a <== NOT EXECUTED col += 2; 43f94: 5482 addql #2,%d2 <== NOT EXECUTED 43f96: 6002 bras 43f9a <== NOT EXECUTED } else { col++; 43f98: 5282 addql #1,%d2 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 43f9a: 5281 addql #1,%d1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 43f9c: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 43f9e: 66ce bnes 43f6e <== NOT EXECUTED 43fa0: 6016 bras 43fb8 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 43fa2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43fa4: 4878 0001 pea 1 <== NOT EXECUTED 43fa8: 4879 0005 b343 pea 5b343 <== NOT EXECUTED 43fae: 4e93 jsr %a3@ <== NOT EXECUTED tty->column--; 43fb0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43fb4: 53aa 0028 subql #1,%a2@(40) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43fb8: b4aa 0028 cmpl %a2@(40),%d2 <== NOT EXECUTED 43fbc: 6de4 blts 43fa2 <== NOT EXECUTED 43fbe: 606e bras 4402e <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 43fc0: 5282 addql #1,%d2 <== NOT EXECUTED 43fc2: 1231 2800 moveb %a1@(00000000,%d2:l),%d1 <== NOT EXECUTED 43fc6: 49c1 extbl %d1 <== NOT EXECUTED 43fc8: 0801 0005 btst #5,%d1 <== NOT EXECUTED 43fcc: 6724 beqs 43ff2 <== NOT EXECUTED 43fce: 0800 0009 btst #9,%d0 <== NOT EXECUTED 43fd2: 671e beqs 43ff2 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 43fd4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43fd6: 4878 0003 pea 3 <== NOT EXECUTED 43fda: 4879 0005 b341 pea 5b341 <== NOT EXECUTED 43fe0: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 43fe2: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43fe6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43fea: 6706 beqs 43ff2 <== NOT EXECUTED tty->column--; 43fec: 5380 subql #1,%d0 <== NOT EXECUTED 43fee: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 43ff2: 2079 0005 c5c0 moveal 5c5c0 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43ff8: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 43ffc: 49c0 extbl %d0 <== NOT EXECUTED 43ffe: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44002: 670c beqs 44010 <== NOT EXECUTED 44004: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 44008: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 4400e: 671e beqs 4402e <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 44010: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44012: 4878 0003 pea 3 <== NOT EXECUTED 44016: 4879 0005 b341 pea 5b341 <== NOT EXECUTED 4401c: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 4401e: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 44022: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44026: 6706 beqs 4402e <== NOT EXECUTED tty->column--; 44028: 5380 subql #1,%d0 <== NOT EXECUTED 4402a: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } } } if (!lineFlag) 4402e: 4a83 tstl %d3 <== NOT EXECUTED 44030: 6608 bnes 4403a <== NOT EXECUTED 44032: 6010 bras 44044 <== NOT EXECUTED 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); 44034: 47f9 0004 3bee lea 43bee ,%a3 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 4403a: 206a 0020 moveal %a2@(32),%a0 <== NOT EXECUTED 4403e: 4a88 tstl %a0 <== NOT EXECUTED 44040: 6600 fed0 bnew 43f12 <== NOT EXECUTED } } if (!lineFlag) break; } } 44044: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 4404a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043128 : int fcntl( int fd, int cmd, ... ) { 43128: 4e56 fff0 linkw %fp,#-16 4312c: 202e 0008 movel %fp@(8),%d0 #include #include /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); extern int creat _PARAMS ((const char *, mode_t)); extern int fcntl _PARAMS ((int, int, ...)); 43130: 41ee 0010 lea %fp@(16),%a0 43134: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 43138: 262e 000c movel %fp@(12),%d3 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4313c: 2279 0005 df44 moveal 5df44 ,%a1 43142: b3c0 cmpal %d0,%a1 43144: 6316 blss 4315c <== NEVER TAKEN iop = rtems_libio_iop( fd ); 43146: 2239 0005 f5f0 movel 5f5f0 ,%d1 4314c: 2441 moveal %d1,%a2 4314e: ed88 lsll #6,%d0 43150: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 43152: 202a 0014 movel %a2@(20),%d0 43156: 0800 0008 btst #8,%d0 4315a: 6612 bnes 4316e <== ALWAYS TAKEN 4315c: 4eb9 0004 e080 jsr 4e080 <__errno> <== NOT EXECUTED 43162: 74ff moveq #-1,%d2 <== NOT EXECUTED 43164: 7209 moveq #9,%d1 <== NOT EXECUTED 43166: 2040 moveal %d0,%a0 <== NOT EXECUTED 43168: 2081 movel %d1,%a0@ <== NOT EXECUTED 4316a: 6000 011e braw 4328a <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4316e: 7409 moveq #9,%d2 43170: b483 cmpl %d3,%d2 43172: 6500 00de bcsw 43252 43176: 343b 3a08 movew %pc@(43180 ,%d3:l:2),%d2 4317a: 48c2 extl %d2 4317c: 4efb 2802 jmp %pc@(43180 ,%d2:l) 43180: 0014 024 <== NOT EXECUTED 43182: 006e 0156 <== NOT EXECUTED 43184: 007a 0172 <== NOT EXECUTED 43186: 0092 00a0 00c0 oril #10485952,%d2 <== NOT EXECUTED 4318c: 00c0 bitrev %d0 <== NOT EXECUTED 4318e: 00c0 bitrev %d0 <== NOT EXECUTED 43190: 00c0 bitrev %d0 <== NOT EXECUTED 43192: 00c0 bitrev %d0 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 43194: 2410 movel %a0@,%d2 if ( fd2 ) 43196: 6710 beqs 431a8 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 43198: b3c2 cmpal %d2,%a1 <== NOT EXECUTED 4319a: 6204 bhis 431a0 <== NOT EXECUTED 4319c: 97cb subal %a3,%a3 <== NOT EXECUTED 4319e: 601a bras 431ba <== NOT EXECUTED 431a0: 2641 moveal %d1,%a3 <== NOT EXECUTED 431a2: ed8a lsll #6,%d2 <== NOT EXECUTED 431a4: d7c2 addal %d2,%a3 <== NOT EXECUTED 431a6: 6012 bras 431ba <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 431a8: 4eb9 0004 3848 jsr 43848 431ae: 2640 moveal %d0,%a3 if ( diop == 0 ) { 431b0: 4a80 tstl %d0 431b2: 6606 bnes 431ba <== ALWAYS TAKEN 431b4: 74ff moveq #-1,%d2 <== NOT EXECUTED 431b6: 6000 00d2 braw 4328a <== NOT EXECUTED diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 431ba: 240b movel %a3,%d2 ret = -1; break; } } diop->handlers = iop->handlers; 431bc: 276a 003c 003c movel %a2@(60),%a3@(60) diop->file_info = iop->file_info; 431c2: 276a 0038 0038 movel %a2@(56),%a3@(56) diop->flags = iop->flags; 431c8: 276a 0014 0014 movel %a2@(20),%a3@(20) diop->pathinfo = iop->pathinfo; 431ce: 4878 0014 pea 14 431d2: 486a 0018 pea %a2@(24) 431d6: 486b 0018 pea %a3@(24) 431da: 4eb9 0004 f2b0 jsr 4f2b0 ret = (int) (diop - rtems_libio_iops); 431e0: 4fef 000c lea %sp@(12),%sp 431e4: 94b9 0005 f5f0 subl 5f5f0 ,%d2 431ea: ec82 asrl #6,%d2 431ec: 6074 bras 43262 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 431ee: 2400 movel %d0,%d2 431f0: 720b moveq #11,%d1 431f2: e2aa lsrl %d1,%d2 431f4: 7001 moveq #1,%d0 431f6: c480 andl %d0,%d2 431f8: 606c bras 43266 * 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 ) ) 431fa: 4a90 tstl %a0@ 431fc: 6708 beqs 43206 <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 431fe: 4282 clrl %d2 43200: 08c0 000b bset #11,%d0 43204: 6006 bras 4320c else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 43206: 4282 clrl %d2 <== NOT EXECUTED 43208: 0880 000b bclr #11,%d0 <== NOT EXECUTED 4320c: 2540 0014 movel %d0,%a2@(20) 43210: 6054 bras 43266 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 43212: 2f00 movel %d0,%sp@- 43214: 4eb9 0004 36c0 jsr 436c0 4321a: 588f addql #4,%sp 4321c: 2400 movel %d0,%d2 4321e: 6042 bras 43262 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 43220: 2f10 movel %a0@,%sp@- /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 43222: 4282 clrl %d2 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 43224: 4eb9 0004 38e8 jsr 438e8 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 4322a: 222a 0014 movel %a2@(20),%d1 4322e: 588f addql #4,%sp 43230: 0280 0000 0201 andil #513,%d0 43236: 0281 ffff fdfe andil #-514,%d1 4323c: 8081 orl %d1,%d0 4323e: 60cc bras 4320c errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 43240: 4eb9 0004 e080 jsr 4e080 <__errno> 43246: 74ff moveq #-1,%d2 43248: 2040 moveal %d0,%a0 4324a: 20bc 0000 0086 movel #134,%a0@ 43250: 6038 bras 4328a ret = -1; break; default: errno = EINVAL; 43252: 4eb9 0004 e080 jsr 4e080 <__errno> 43258: 74ff moveq #-1,%d2 4325a: 2040 moveal %d0,%a0 4325c: 7016 moveq #22,%d0 4325e: 2080 movel %d0,%a0@ 43260: 6028 bras 4328a /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 43262: 4a82 tstl %d2 43264: 6d24 blts 4328a <== NEVER TAKEN if (iop->handlers->fcntl_h) { 43266: 206a 003c moveal %a2@(60),%a0 4326a: 2068 0030 moveal %a0@(48),%a0 4326e: 4a88 tstl %a0 43270: 6718 beqs 4328a <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 43272: 2f0a movel %a2,%sp@- 43274: 2f03 movel %d3,%sp@- 43276: 4e90 jsr %a0@ if (err) { 43278: 508f addql #8,%sp * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); 4327a: 2600 movel %d0,%d3 if (err) { 4327c: 670c beqs 4328a <== ALWAYS TAKEN errno = err; 4327e: 4eb9 0004 e080 jsr 4e080 <__errno> <== NOT EXECUTED 43284: 74ff moveq #-1,%d2 <== NOT EXECUTED 43286: 2040 moveal %d0,%a0 <== NOT EXECUTED 43288: 2083 movel %d3,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4328a: 2002 movel %d2,%d0 4328c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 43292: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000432b8 : #include int fdatasync( int fd ) { 432b8: 4e56 0000 linkw %fp,#0 432bc: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 432c0: b0b9 0005 df44 cmpl 5df44 ,%d0 432c6: 6414 bccs 432dc iop = rtems_libio_iop( fd ); 432c8: 2079 0005 f5f0 moveal 5f5f0 ,%a0 432ce: ed88 lsll #6,%d0 432d0: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 432d2: 2028 0014 movel %a0@(20),%d0 432d6: 0800 0008 btst #8,%d0 432da: 660e bnes 432ea <== ALWAYS TAKEN 432dc: 4eb9 0004 e080 jsr 4e080 <__errno> 432e2: 7209 moveq #9,%d1 432e4: 2040 moveal %d0,%a0 432e6: 2081 movel %d1,%a0@ 432e8: 6036 bras 43320 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 432ea: 44c0 movew %d0,%ccr 432ec: 670e beqs 432fc 432ee: 4eb9 0004 e080 jsr 4e080 <__errno> 432f4: 2040 moveal %d0,%a0 432f6: 7016 moveq #22,%d0 432f8: 2080 movel %d0,%a0@ 432fa: 6024 bras 43320 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 432fc: 2268 003c moveal %a0@(60),%a1 43300: 2269 002c moveal %a1@(44),%a1 43304: 4a89 tstl %a1 43306: 6610 bnes 43318 rtems_set_errno_and_return_minus_one( ENOTSUP ); 43308: 4eb9 0004 e080 jsr 4e080 <__errno> 4330e: 2040 moveal %d0,%a0 43310: 20bc 0000 0086 movel #134,%a0@ 43316: 6008 bras 43320 return (*iop->handlers->fdatasync_h)( iop ); 43318: 2d48 0008 movel %a0,%fp@(8) } 4331c: 4e5e unlk %fp */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 4331e: 4ed1 jmp %a1@ } 43320: 70ff moveq #-1,%d0 43322: 4e5e unlk %fp ... =============================================================================== 00048e46 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 48e46: 4e56 ffdc linkw %fp,#-36 48e4a: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 48e4e: 42a7 clrl %sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 48e50: 266e 0008 moveal %fp@(8),%a3 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 48e54: 42a7 clrl %sp@- 48e56: 2f39 0005 d3c8 movel 5d3c8 ,%sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 48e5c: 286e 000c moveal %fp@(12),%a4 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 48e60: 4eb9 0004 57c0 jsr 457c0 48e66: 4fef 000c lea %sp@(12),%sp 48e6a: 4a80 tstl %d0 48e6c: 6706 beqs 48e74 <== NEVER TAKEN 48e6e: 74fc moveq #-4,%d2 48e70: 6000 02fe braw 49170 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 48e74: 2453 moveal %a3@,%a2 <== NOT EXECUTED if (pipe == NULL) { 48e76: 4a8a tstl %a2 <== NOT EXECUTED 48e78: 6600 0114 bnew 48f8e <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 48e7c: 4878 0034 pea 34 <== NOT EXECUTED 48e80: 243c 0004 2b08 movel #273160,%d2 <== NOT EXECUTED 48e86: 2042 moveal %d2,%a0 <== NOT EXECUTED 48e88: 4e90 jsr %a0@ <== NOT EXECUTED if (pipe == NULL) 48e8a: 588f addql #4,%sp <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 48e8c: 2440 moveal %d0,%a2 <== NOT EXECUTED 48e8e: 2a40 moveal %d0,%a5 <== NOT EXECUTED if (pipe == NULL) 48e90: 4a80 tstl %d0 <== NOT EXECUTED 48e92: 6700 00f6 beqw 48f8a <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 48e96: 4878 0034 pea 34 <== NOT EXECUTED 48e9a: 42a7 clrl %sp@- <== NOT EXECUTED 48e9c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48e9e: 4eb9 0004 d948 jsr 4d948 <== NOT EXECUTED pipe->Size = PIPE_BUF; 48ea4: 203c 0000 0200 movel #512,%d0 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 48eaa: 2042 moveal %d2,%a0 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 48eac: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 48eb0: 4878 0200 pea 200 <== NOT EXECUTED 48eb4: 4e90 jsr %a0@ <== NOT EXECUTED if (! pipe->Buffer) 48eb6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 48eba: 2480 movel %d0,%a2@ <== NOT EXECUTED if (! pipe->Buffer) 48ebc: 6700 00c2 beqw 48f80 <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 48ec0: 486a 002c pea %a2@(44) <== NOT EXECUTED 48ec4: 243c 0004 a678 movel #304760,%d2 <== NOT EXECUTED 48eca: 2042 moveal %d2,%a0 <== NOT EXECUTED 48ecc: 1039 0005 c534 moveb 5c534 ,%d0 <== NOT EXECUTED 48ed2: 42a7 clrl %sp@- <== NOT EXECUTED 48ed4: 49c0 extbl %d0 <== NOT EXECUTED 48ed6: 42a7 clrl %sp@- <== NOT EXECUTED 48ed8: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 48ede: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48ee0: 4e90 jsr %a0@ <== NOT EXECUTED 48ee2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 48ee6: 4a80 tstl %d0 <== NOT EXECUTED 48ee8: 6600 008c bnew 48f76 <== NOT EXECUTED rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 48eec: 486a 0030 pea %a2@(48) <== NOT EXECUTED 48ef0: 2042 moveal %d2,%a0 <== NOT EXECUTED 48ef2: 1039 0005 c534 moveb 5c534 ,%d0 <== NOT EXECUTED 48ef8: 42a7 clrl %sp@- <== NOT EXECUTED 48efa: 49c0 extbl %d0 <== NOT EXECUTED 48efc: 42a7 clrl %sp@- <== NOT EXECUTED 48efe: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 48f04: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48f06: 4e90 jsr %a0@ <== NOT EXECUTED 48f08: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 48f0c: 4a80 tstl %d0 <== NOT EXECUTED 48f0e: 665a bnes 48f6a <== NOT EXECUTED rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 48f10: 486a 0028 pea %a2@(40) <== NOT EXECUTED 48f14: 1039 0005 c534 moveb 5c534 ,%d0 <== NOT EXECUTED 48f1a: 42a7 clrl %sp@- <== NOT EXECUTED 48f1c: 4878 0010 pea 10 <== NOT EXECUTED 48f20: 49c0 extbl %d0 <== NOT EXECUTED 48f22: 4878 0001 pea 1 <== NOT EXECUTED 48f26: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 48f2c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48f2e: 4eb9 0004 5588 jsr 45588 <== NOT EXECUTED 48f34: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 48f38: 4a80 tstl %d0 <== NOT EXECUTED 48f3a: 6622 bnes 48f5e <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 48f3c: 1039 0005 c534 moveb 5c534 ,%d0 <== NOT EXECUTED 48f42: 49c0 extbl %d0 <== NOT EXECUTED 48f44: 2200 movel %d0,%d1 <== NOT EXECUTED 48f46: 5281 addql #1,%d1 <== NOT EXECUTED 48f48: 13c1 0005 c534 moveb %d1,5c534 <== NOT EXECUTED 48f4e: 727a moveq #122,%d1 <== NOT EXECUTED 48f50: b280 cmpl %d0,%d1 <== NOT EXECUTED 48f52: 663a bnes 48f8e <== NOT EXECUTED c = 'a'; 48f54: 7061 moveq #97,%d0 <== NOT EXECUTED 48f56: 13c0 0005 c534 moveb %d0,5c534 <== NOT EXECUTED 48f5c: 6030 bras 48f8e <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 48f5e: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 48f62: 4eb9 0004 a72c jsr 4a72c <== NOT EXECUTED 48f68: 588f addql #4,%sp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 48f6a: 2f2d 002c movel %a5@(44),%sp@- <== NOT EXECUTED 48f6e: 4eb9 0004 a72c jsr 4a72c <== NOT EXECUTED 48f74: 588f addql #4,%sp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 48f76: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 48f78: 4eb9 0004 2828 jsr 42828 <== NOT EXECUTED 48f7e: 588f addql #4,%sp <== NOT EXECUTED err_buf: free(pipe); 48f80: 2f0d movel %a5,%sp@- <== NOT EXECUTED 48f82: 4eb9 0004 2828 jsr 42828 <== NOT EXECUTED 48f88: 588f addql #4,%sp <== NOT EXECUTED 48f8a: 74f4 moveq #-12,%d2 <== NOT EXECUTED 48f8c: 6030 bras 48fbe <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 48f8e: 42a7 clrl %sp@- <== NOT EXECUTED 48f90: 42a7 clrl %sp@- <== NOT EXECUTED 48f92: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 48f96: 4eb9 0004 57c0 jsr 457c0 <== NOT EXECUTED 48f9c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 48fa0: 4a80 tstl %d0 <== NOT EXECUTED 48fa2: 6704 beqs 48fa8 <== NOT EXECUTED 48fa4: 74fc moveq #-4,%d2 <== NOT EXECUTED 48fa6: 6002 bras 48faa <== NOT EXECUTED 48fa8: 4282 clrl %d2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 48faa: 4a93 tstl %a3@ <== NOT EXECUTED 48fac: 6610 bnes 48fbe <== NOT EXECUTED if (err) 48fae: 4a82 tstl %d2 <== NOT EXECUTED 48fb0: 670a beqs 48fbc <== NOT EXECUTED pipe_free(pipe); 48fb2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48fb4: 4eba fd80 jsr %pc@(48d36 ) <== NOT EXECUTED 48fb8: 588f addql #4,%sp <== NOT EXECUTED 48fba: 6002 bras 48fbe <== NOT EXECUTED else *pipep = pipe; 48fbc: 268a movel %a2,%a3@ <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 48fbe: 2f39 0005 d3c8 movel 5d3c8 ,%sp@- <== NOT EXECUTED 48fc4: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 48fca: 588f addql #4,%sp <== NOT EXECUTED 48fcc: 4a82 tstl %d2 <== NOT EXECUTED 48fce: 6600 01a0 bnew 49170 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 48fd2: 7006 moveq #6,%d0 <== NOT EXECUTED 48fd4: 7204 moveq #4,%d1 <== NOT EXECUTED 48fd6: c0ac 0014 andl %a4@(20),%d0 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 48fda: 2453 moveal %a3@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 48fdc: b280 cmpl %d0,%d1 <== NOT EXECUTED 48fde: 6700 009c beqw 4907c <== NOT EXECUTED 48fe2: 123c 0006 moveb #6,%d1 <== NOT EXECUTED 48fe6: b280 cmpl %d0,%d1 <== NOT EXECUTED 48fe8: 6700 0122 beqw 4910c <== NOT EXECUTED 48fec: 123c 0002 moveb #2,%d1 <== NOT EXECUTED 48ff0: b280 cmpl %d0,%d1 <== NOT EXECUTED 48ff2: 6600 0160 bnew 49154 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 48ff6: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 48ffa: 2040 moveal %d0,%a0 <== NOT EXECUTED 48ffc: 5288 addql #1,%a0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 48ffe: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 49002: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 49006: 4a80 tstl %d0 <== NOT EXECUTED 49008: 6610 bnes 4901a <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4900a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4900e: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 49012: 4eb9 0004 a7c8 jsr 4a7c8 <== NOT EXECUTED 49018: 508f addql #8,%sp <== NOT EXECUTED if (pipe->Writers == 0) { 4901a: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4901e: 6600 0134 bnew 49154 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 49022: 7001 moveq #1,%d0 <== NOT EXECUTED 49024: c0ac 0014 andl %a4@(20),%d0 <== NOT EXECUTED 49028: 6600 012a bnew 49154 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4902c: 2a2a 0024 movel %a2@(36),%d5 <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 49030: 4bf9 0004 57c0 lea 457c0 ,%a5 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 49036: 283c 0004 58c4 movel #284868,%d4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4903c: 263c 0004 a82c movel #305196,%d3 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 49042: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 49046: 2044 moveal %d4,%a0 <== NOT EXECUTED 49048: 4e90 jsr %a0@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4904a: 2043 moveal %d3,%a0 <== NOT EXECUTED 4904c: 42a7 clrl %sp@- <== NOT EXECUTED 4904e: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 49052: 4e90 jsr %a0@ <== NOT EXECUTED 49054: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 49058: 4a80 tstl %d0 <== NOT EXECUTED 4905a: 6600 0106 bnew 49162 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4905e: 42a7 clrl %sp@- <== NOT EXECUTED 49060: 42a7 clrl %sp@- <== NOT EXECUTED 49062: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 49066: 4e95 jsr %a5@ <== NOT EXECUTED 49068: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4906c: 4a80 tstl %d0 <== NOT EXECUTED 4906e: 6600 00f2 bnew 49162 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 49072: baaa 0024 cmpl %a2@(36),%d5 <== NOT EXECUTED 49076: 67ca beqs 49042 <== NOT EXECUTED 49078: 6000 00da braw 49154 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4907c: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 49080: 2200 movel %d0,%d1 <== NOT EXECUTED 49082: 5281 addql #1,%d1 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 49084: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 49088: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4908c: 4a80 tstl %d0 <== NOT EXECUTED 4908e: 6610 bnes 490a0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 49090: 486e fffc pea %fp@(-4) <== NOT EXECUTED 49094: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 49098: 4eb9 0004 a7c8 jsr 4a7c8 <== NOT EXECUTED 4909e: 508f addql #8,%sp <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 490a0: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 490a4: 6600 00ae bnew 49154 <== NOT EXECUTED 490a8: 7001 moveq #1,%d0 <== NOT EXECUTED 490aa: c0ac 0014 andl %a4@(20),%d0 <== NOT EXECUTED 490ae: 6712 beqs 490c2 <== NOT EXECUTED PIPE_UNLOCK(pipe); 490b0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 490b4: 74fa moveq #-6,%d2 <== NOT EXECUTED 490b6: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED err = -ENXIO; goto out_error; 490bc: 588f addql #4,%sp <== NOT EXECUTED 490be: 6000 00a4 braw 49164 <== NOT EXECUTED } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 490c2: 2a2a 0020 movel %a2@(32),%d5 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 490c6: 4bf9 0004 57c0 lea 457c0 ,%a5 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 490cc: 283c 0004 58c4 movel #284868,%d4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 490d2: 263c 0004 a82c movel #305196,%d3 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 490d8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 490dc: 2044 moveal %d4,%a0 <== NOT EXECUTED 490de: 4e90 jsr %a0@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 490e0: 2043 moveal %d3,%a0 <== NOT EXECUTED 490e2: 42a7 clrl %sp@- <== NOT EXECUTED 490e4: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 490e8: 4e90 jsr %a0@ <== NOT EXECUTED 490ea: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 490ee: 4a80 tstl %d0 <== NOT EXECUTED 490f0: 6670 bnes 49162 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 490f2: 42a7 clrl %sp@- <== NOT EXECUTED 490f4: 42a7 clrl %sp@- <== NOT EXECUTED 490f6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 490fa: 4e95 jsr %a5@ <== NOT EXECUTED 490fc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 49100: 4a80 tstl %d0 <== NOT EXECUTED 49102: 665e bnes 49162 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 49104: baaa 0020 cmpl %a2@(32),%d5 <== NOT EXECUTED 49108: 67ce beqs 490d8 <== NOT EXECUTED 4910a: 6048 bras 49154 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4910c: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 49110: 2200 movel %d0,%d1 <== NOT EXECUTED 49112: 5281 addql #1,%d1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 49114: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 49118: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4911c: 4a80 tstl %d0 <== NOT EXECUTED 4911e: 6610 bnes 49130 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 49120: 486e fffc pea %fp@(-4) <== NOT EXECUTED 49124: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 49128: 4eb9 0004 a7c8 jsr 4a7c8 <== NOT EXECUTED 4912e: 508f addql #8,%sp <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 49130: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 49134: 2040 moveal %d0,%a0 <== NOT EXECUTED 49136: 5288 addql #1,%a0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 49138: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4913c: 2548 0014 movel %a0,%a2@(20) <== NOT EXECUTED 49140: 4a80 tstl %d0 <== NOT EXECUTED 49142: 6610 bnes 49154 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 49144: 486e fffc pea %fp@(-4) <== NOT EXECUTED 49148: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4914c: 4eb9 0004 a7c8 jsr 4a7c8 <== NOT EXECUTED 49152: 508f addql #8,%sp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 49154: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 49158: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED return 0; 4915e: 588f addql #4,%sp <== NOT EXECUTED 49160: 600e bras 49170 <== NOT EXECUTED 49162: 74fc moveq #-4,%d2 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 49164: 2f0c movel %a4,%sp@- <== NOT EXECUTED 49166: 2f0b movel %a3,%sp@- <== NOT EXECUTED 49168: 4eb9 0004 8d7e jsr 48d7e <== NOT EXECUTED return err; 4916e: 508f addql #8,%sp <== NOT EXECUTED } 49170: 2002 movel %d2,%d0 49172: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 49178: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043328 : long fpathconf( int fd, int name ) { 43328: 4e56 0000 linkw %fp,#0 4332c: 222e 0008 movel %fp@(8),%d1 43330: 202e 000c movel %fp@(12),%d0 long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 43334: b2b9 0005 df44 cmpl 5df44 ,%d1 4333a: 6414 bccs 43350 iop = rtems_libio_iop(fd); 4333c: 2079 0005 f5f0 moveal 5f5f0 ,%a0 43342: ed89 lsll #6,%d1 43344: d1c1 addal %d1,%a0 rtems_libio_check_is_open(iop); 43346: 2228 0014 movel %a0@(20),%d1 4334a: 0801 0008 btst #8,%d1 4334e: 6612 bnes 43362 <== ALWAYS TAKEN 43350: 4eb9 0004 e080 jsr 4e080 <__errno> 43356: 72ff moveq #-1,%d1 43358: 2040 moveal %d0,%a0 4335a: 7009 moveq #9,%d0 4335c: 2080 movel %d0,%a0@ 4335e: 6000 008a braw 433ea rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 43362: 0801 0001 btst #1,%d1 43366: 6774 beqs 433dc <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 43368: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 4336c: 720b moveq #11,%d1 4336e: b280 cmpl %d0,%d1 43370: 656a bcss 433dc 43372: 303b 0a08 movew %pc@(4337c ,%d0:l:2),%d0 43376: 48c0 extl %d0 43378: 4efb 0802 jmp %pc@(4337c ,%d0:l) 4337c: 0018 030 <== NOT EXECUTED 4337e: 001e 036 <== NOT EXECUTED 43380: 0024 044 <== NOT EXECUTED 43382: 002a 052 <== NOT EXECUTED 43384: 0030 060 <== NOT EXECUTED 43386: 0036 066 <== NOT EXECUTED 43388: 003c 074 <== NOT EXECUTED 4338a: 0042 0102 <== NOT EXECUTED 4338c: 0048 0110 <== NOT EXECUTED 4338e: 004e 0116 <== NOT EXECUTED 43390: 0054 0124 <== NOT EXECUTED 43392: 005a 0132 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 43394: 2228 0038 movel %a0@(56),%d1 break; 43398: 6050 bras 433ea case _PC_MAX_CANON: return_value = the_limits->max_canon; 4339a: 2228 003c movel %a0@(60),%d1 break; 4339e: 604a bras 433ea case _PC_MAX_INPUT: return_value = the_limits->max_input; 433a0: 2228 0040 movel %a0@(64),%d1 break; 433a4: 6044 bras 433ea case _PC_NAME_MAX: return_value = the_limits->name_max; 433a6: 2228 0044 movel %a0@(68),%d1 break; 433aa: 603e bras 433ea case _PC_PATH_MAX: return_value = the_limits->path_max; 433ac: 2228 0048 movel %a0@(72),%d1 break; 433b0: 6038 bras 433ea case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 433b2: 2228 004c movel %a0@(76),%d1 break; 433b6: 6032 bras 433ea case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 433b8: 2228 0054 movel %a0@(84),%d1 break; 433bc: 602c bras 433ea case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 433be: 2228 0058 movel %a0@(88),%d1 break; 433c2: 6026 bras 433ea case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 433c4: 2228 0064 movel %a0@(100),%d1 break; 433c8: 6020 bras 433ea case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 433ca: 2228 0050 movel %a0@(80),%d1 break; 433ce: 601a bras 433ea case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 433d0: 2228 005c movel %a0@(92),%d1 break; 433d4: 6014 bras 433ea case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 433d6: 2228 0060 movel %a0@(96),%d1 break; 433da: 600e bras 433ea default: rtems_set_errno_and_return_minus_one( EINVAL ); 433dc: 4eb9 0004 e080 jsr 4e080 <__errno> 433e2: 72ff moveq #-1,%d1 433e4: 2040 moveal %d0,%a0 433e6: 7016 moveq #22,%d0 433e8: 2080 movel %d0,%a0@ break; } return return_value; } 433ea: 2001 movel %d1,%d0 433ec: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042828 : void free( void *ptr ) { MSBUMP(free_calls, 1); 42828: 4e56 0000 linkw %fp,#0 4282c: 52b9 0005 dae4 addql #1,5dae4 42832: 2f02 movel %d2,%sp@- 42834: 242e 0008 movel %fp@(8),%d2 if ( !ptr ) 42838: 676c beqs 428a6 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4283a: 7003 moveq #3,%d0 4283c: b0b9 0005 dd9e cmpl 5dd9e <_System_state_Current>,%d0 42842: 661a bnes 4285e <== NEVER TAKEN 42844: 4eb9 0004 29c0 jsr 429c0 4284a: 4a00 tstb %d0 4284c: 6610 bnes 4285e <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4284e: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 42852: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 42856: 4e5e unlk %fp <== NOT EXECUTED * 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); 42858: 4ef9 0004 29fe jmp 429fe <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4285e: 2079 0005 ca86 moveal 5ca86 ,%a0 42864: 4a88 tstl %a0 42866: 670a beqs 42872 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 42868: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4286a: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 4286e: 4e90 jsr %a0@ <== NOT EXECUTED 42870: 588f addql #4,%sp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 42872: 2f02 movel %d2,%sp@- 42874: 2f39 0005 c420 movel 5c420 ,%sp@- 4287a: 4eb9 0004 70a0 jsr 470a0 <_Protected_heap_Free> 42880: 508f addql #8,%sp 42882: 4a00 tstb %d0 42884: 6620 bnes 428a6 <== ALWAYS TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 42886: 2079 0005 c420 moveal 5c420 ,%a0 <== NOT EXECUTED */ 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", 4288c: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 42890: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 42894: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42896: 4879 0005 b2cc pea 5b2cc <== NOT EXECUTED 4289c: 4eb9 0004 3528 jsr 43528 <== NOT EXECUTED 428a2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 428a6: 242e fffc movel %fp@(-4),%d2 428aa: 4e5e unlk %fp ... =============================================================================== 00043b14 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 43b14: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43b18: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43b1a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 43b1e: b5fc 0005 e2d0 cmpal #385744,%a2 <== NOT EXECUTED 43b24: 6740 beqs 43b66 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 43b26: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 43b2a: 4a88 tstl %a0 <== NOT EXECUTED 43b2c: 6710 beqs 43b3e <== NOT EXECUTED 43b2e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43b32: 4a88 tstl %a0 <== NOT EXECUTED 43b34: 6708 beqs 43b3e <== NOT EXECUTED 43b36: 486a 0004 pea %a2@(4) <== NOT EXECUTED 43b3a: 4e90 jsr %a0@ <== NOT EXECUTED 43b3c: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 43b3e: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 43b42: 4a88 tstl %a0 <== NOT EXECUTED 43b44: 6710 beqs 43b56 <== NOT EXECUTED 43b46: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43b4a: 4a88 tstl %a0 <== NOT EXECUTED 43b4c: 6708 beqs 43b56 <== NOT EXECUTED 43b4e: 486a 0018 pea %a2@(24) <== NOT EXECUTED 43b52: 4e90 jsr %a0@ <== NOT EXECUTED 43b54: 588f addql #4,%sp <== NOT EXECUTED free(env); 43b56: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 43b5a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43b5e: 4e5e unlk %fp <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 43b60: 4ef9 0004 2b94 jmp 42b94 <== NOT EXECUTED } } 43b66: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43b6a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005a0ac : int fstat( int fd, struct stat *sbuf ) { 5a0ac: 4e56 0000 linkw %fp,#0 5a0b0: 202e 0008 movel %fp@(8),%d0 5a0b4: 2f0a movel %a2,%sp@- 5a0b6: 2f02 movel %d2,%sp@- 5a0b8: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 5a0bc: 660e bnes 5a0cc rtems_set_errno_and_return_minus_one( EFAULT ); 5a0be: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 5a0c4: 720e moveq #14,%d1 5a0c6: 2040 moveal %d0,%a0 5a0c8: 2081 movel %d1,%a0@ 5a0ca: 607c bras 5a148 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 5a0cc: b0b9 0005 c414 cmpl 5c414 ,%d0 5a0d2: 641e bccs 5a0f2 5a0d4: 2479 0005 dac0 moveal 5dac0 ,%a2 5a0da: ed88 lsll #6,%d0 5a0dc: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5a0de: 202a 0014 movel %a2@(20),%d0 5a0e2: 0280 0000 0100 andil #256,%d0 5a0e8: 6708 beqs 5a0f2 <== NEVER TAKEN if ( !iop->handlers ) 5a0ea: 206a 003c moveal %a2@(60),%a0 5a0ee: 4a88 tstl %a0 5a0f0: 660e bnes 5a100 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 5a0f2: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 5a0f8: 2040 moveal %d0,%a0 5a0fa: 7009 moveq #9,%d0 5a0fc: 2080 movel %d0,%a0@ 5a0fe: 6048 bras 5a148 if ( !iop->handlers->fstat_h ) 5a100: 4aa8 0018 tstl %a0@(24) 5a104: 6610 bnes 5a116 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a106: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 5a10c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a10e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 5a114: 6032 bras 5a148 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 5a116: 4878 0046 pea 46 5a11a: 42a7 clrl %sp@- 5a11c: 2f02 movel %d2,%sp@- 5a11e: 4eb9 0004 d948 jsr 4d948 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 5a124: 206a 003c moveal %a2@(60),%a0 5a128: 45ea 0018 lea %a2@(24),%a2 5a12c: 4fef 000c lea %sp@(12),%sp 5a130: 2d42 000c movel %d2,%fp@(12) } 5a134: 242e fff8 movel %fp@(-8),%d2 * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 5a138: 2d4a 0008 movel %a2,%fp@(8) } 5a13c: 246e fffc moveal %fp@(-4),%a2 5a140: 4e5e unlk %fp * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 5a142: 2268 0018 moveal %a0@(24),%a1 5a146: 4ed1 jmp %a1@ } 5a148: 242e fff8 movel %fp@(-8),%d2 5a14c: 70ff moveq #-1,%d0 5a14e: 246e fffc moveal %fp@(-4),%a2 5a152: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004353c : #include int fsync( int fd ) { 4353c: 4e56 0000 linkw %fp,#0 43540: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 43544: b0b9 0005 df44 cmpl 5df44 ,%d0 4354a: 642e bccs 4357a <== NEVER TAKEN iop = rtems_libio_iop( fd ); 4354c: 2079 0005 f5f0 moveal 5f5f0 ,%a0 43552: ed88 lsll #6,%d0 43554: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43556: 2028 0014 movel %a0@(20),%d0 4355a: 0800 0008 btst #8,%d0 4355e: 671a beqs 4357a <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43560: 44c0 movew %d0,%ccr 43562: 670e beqs 43572 43564: 4eb9 0004 e080 jsr 4e080 <__errno> 4356a: 7216 moveq #22,%d1 4356c: 2040 moveal %d0,%a0 4356e: 2081 movel %d1,%a0@ 43570: 6036 bras 435a8 /* * Now process the fsync(). */ if ( !iop->handlers ) 43572: 2268 003c moveal %a0@(60),%a1 43576: 4a89 tstl %a1 43578: 660e bnes 43588 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 4357a: 4eb9 0004 e080 jsr 4e080 <__errno> <== NOT EXECUTED 43580: 2040 moveal %d0,%a0 <== NOT EXECUTED 43582: 7009 moveq #9,%d0 <== NOT EXECUTED 43584: 2080 movel %d0,%a0@ <== NOT EXECUTED 43586: 6020 bras 435a8 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 43588: 2269 0028 moveal %a1@(40),%a1 4358c: 4a89 tstl %a1 4358e: 6610 bnes 435a0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 43590: 4eb9 0004 e080 jsr 4e080 <__errno> 43596: 2040 moveal %d0,%a0 43598: 20bc 0000 0086 movel #134,%a0@ 4359e: 6008 bras 435a8 return (*iop->handlers->fsync_h)( iop ); 435a0: 2d48 0008 movel %a0,%fp@(8) } 435a4: 4e5e unlk %fp rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 435a6: 4ed1 jmp %a1@ } 435a8: 70ff moveq #-1,%d0 435aa: 4e5e unlk %fp ... =============================================================================== 0004a098 : int ftruncate( int fd, off_t length ) { 4a098: 4e56 ffec linkw %fp,#-20 4a09c: 202e 0008 movel %fp@(8),%d0 4a0a0: 2f0a movel %a2,%sp@- 4a0a2: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4a0a4: b0b9 0005 c414 cmpl 5c414 ,%d0 4a0aa: 6416 bccs 4a0c2 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 4a0ac: 2479 0005 dac0 moveal 5dac0 ,%a2 4a0b2: ed88 lsll #6,%d0 4a0b4: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 4a0b6: 202a 0014 movel %a2@(20),%d0 4a0ba: 0280 0000 0100 andil #256,%d0 4a0c0: 6612 bnes 4a0d4 <== ALWAYS TAKEN 4a0c2: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4a0c8: 72ff moveq #-1,%d1 <== NOT EXECUTED 4a0ca: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a0cc: 7009 moveq #9,%d0 <== NOT EXECUTED 4a0ce: 2080 movel %d0,%a0@ <== NOT EXECUTED 4a0d0: 6000 008e braw 4a160 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4a0d4: 4878 0014 pea 14 4a0d8: 240e movel %fp,%d2 4a0da: 486a 0018 pea %a2@(24) 4a0de: 0682 ffff ffec addil #-20,%d2 4a0e4: 2f02 movel %d2,%sp@- 4a0e6: 4eb9 0004 d8d8 jsr 4d8d8 if ( !loc.ops->node_type_h ) 4a0ec: 206e fff8 moveal %fp@(-8),%a0 4a0f0: 4fef 000c lea %sp@(12),%sp 4a0f4: 2068 0010 moveal %a0@(16),%a0 4a0f8: 4a88 tstl %a0 4a0fa: 6740 beqs 4a13c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4a0fc: 2f02 movel %d2,%sp@- 4a0fe: 4e90 jsr %a0@ 4a100: 588f addql #4,%sp 4a102: 7201 moveq #1,%d1 4a104: b280 cmpl %d0,%d1 4a106: 6610 bnes 4a118 rtems_set_errno_and_return_minus_one( EISDIR ); 4a108: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 4a10e: 7415 moveq #21,%d2 4a110: 72ff moveq #-1,%d1 4a112: 2040 moveal %d0,%a0 4a114: 2082 movel %d2,%a0@ 4a116: 6048 bras 4a160 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4a118: 7004 moveq #4,%d0 4a11a: c0aa 0014 andl %a2@(20),%d0 4a11e: 6610 bnes 4a130 <== ALWAYS TAKEN 4a120: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4a126: 72ff moveq #-1,%d1 <== NOT EXECUTED 4a128: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a12a: 7016 moveq #22,%d0 <== NOT EXECUTED 4a12c: 2080 movel %d0,%a0@ <== NOT EXECUTED 4a12e: 6030 bras 4a160 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 4a130: 206a 003c moveal %a2@(60),%a0 4a134: 2068 0020 moveal %a0@(32),%a0 4a138: 4a88 tstl %a0 4a13a: 6612 bnes 4a14e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a13c: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4a142: 72ff moveq #-1,%d1 <== NOT EXECUTED 4a144: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a146: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4a14c: 6012 bras 4a160 <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); 4a14e: 2f2e 0010 movel %fp@(16),%sp@- 4a152: 2f2e 000c movel %fp@(12),%sp@- 4a156: 2f0a movel %a2,%sp@- 4a158: 4e90 jsr %a0@ 4a15a: 4fef 000c lea %sp@(12),%sp 4a15e: 2200 movel %d0,%d1 } 4a160: 242e ffe4 movel %fp@(-28),%d2 4a164: 2001 movel %d1,%d0 4a166: 246e ffe8 moveal %fp@(-24),%a2 4a16a: 4e5e unlk %fp ... =============================================================================== 0005b97c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5b97c: 4e56 ffec linkw %fp,#-20 5b980: 202e 0008 movel %fp@(8),%d0 5b984: 2f0a movel %a2,%sp@- 5b986: 2f02 movel %d2,%sp@- /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5b988: b0b9 0005 e564 cmpl 5e564 ,%d0 5b98e: 6504 bcss 5b994 <== ALWAYS TAKEN 5b990: 95ca subal %a2,%a2 <== NOT EXECUTED 5b992: 600a bras 5b99e <== NOT EXECUTED 5b994: 2479 0005 fd20 moveal 5fd20 ,%a2 5b99a: ed88 lsll #6,%d0 5b99c: d5c0 addal %d0,%a2 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5b99e: 4878 0014 pea 14 5b9a2: 240e movel %fp,%d2 5b9a4: 486a 0018 pea %a2@(24) 5b9a8: 0682 ffff ffec addil #-20,%d2 5b9ae: 2f02 movel %d2,%sp@- 5b9b0: 4eb9 0004 e9b8 jsr 4e9b8 if ( !loc.ops->node_type_h ) 5b9b6: 206e fff8 moveal %fp@(-8),%a0 5b9ba: 4fef 000c lea %sp@(12),%sp 5b9be: 2068 0010 moveal %a0@(16),%a0 5b9c2: 4a88 tstl %a0 5b9c4: 6728 beqs 5b9ee <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5b9c6: 2f02 movel %d2,%sp@- 5b9c8: 4e90 jsr %a0@ 5b9ca: 588f addql #4,%sp 5b9cc: 7201 moveq #1,%d1 5b9ce: b280 cmpl %d0,%d1 5b9d0: 6710 beqs 5b9e2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 5b9d2: 4eb9 0004 e198 jsr 4e198 <__errno> 5b9d8: 72ff moveq #-1,%d1 5b9da: 2040 moveal %d0,%a0 5b9dc: 7014 moveq #20,%d0 5b9de: 2080 movel %d0,%a0@ 5b9e0: 6030 bras 5ba12 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 5b9e2: 206a 003c moveal %a2@(60),%a0 5b9e6: 2068 0008 moveal %a0@(8),%a0 5b9ea: 4a88 tstl %a0 5b9ec: 6612 bnes 5ba00 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 5b9ee: 4eb9 0004 e198 jsr 4e198 <__errno> <== NOT EXECUTED 5b9f4: 72ff moveq #-1,%d1 <== NOT EXECUTED 5b9f6: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b9f8: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 5b9fe: 6012 bras 5ba12 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 5ba00: 2f2e 0010 movel %fp@(16),%sp@- 5ba04: 2f2e 000c movel %fp@(12),%sp@- 5ba08: 2f0a movel %a2,%sp@- 5ba0a: 4e90 jsr %a0@ 5ba0c: 4fef 000c lea %sp@(12),%sp 5ba10: 2200 movel %d0,%d1 } 5ba12: 242e ffe4 movel %fp@(-28),%d2 5ba16: 2001 movel %d1,%d0 5ba18: 246e ffe8 moveal %fp@(-24),%a2 5ba1c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042eda : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 42eda: 4e56 ffe0 linkw %fp,#-32 42ede: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 42ee2: 262e 0008 movel %fp@(8),%d3 42ee6: 282e 000c movel %fp@(12),%d4 42eea: 246e 0010 moveal %fp@(16),%a2 42eee: 2a2e 0014 movel %fp@(20),%d5 42ef2: 2c2e 0018 movel %fp@(24),%d6 FILE *fp; int match; init_etc_passwd_group(); 42ef6: 4eb9 0004 2dc0 jsr 42dc0 if ((fp = fopen("/etc/group", "r")) == NULL) { 42efc: 4879 0005 d14d pea 5d14d <_global_impure_ptr+0xbf> 42f02: 4879 0005 c752 pea 5c752 42f08: 4eb9 0004 e10c jsr 4e10c 42f0e: 508f addql #8,%sp 42f10: 2400 movel %d0,%d2 42f12: 6610 bnes 42f24 <== ALWAYS TAKEN errno = EINVAL; 42f14: 4eb9 0004 d94c jsr 4d94c <__errno> <== NOT EXECUTED 42f1a: 7216 moveq #22,%d1 <== NOT EXECUTED 42f1c: 2040 moveal %d0,%a0 <== NOT EXECUTED 42f1e: 70ff moveq #-1,%d0 <== NOT EXECUTED 42f20: 2081 movel %d1,%a0@ <== NOT EXECUTED return -1; 42f22: 606a bras 42f8e <== NOT EXECUTED } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 42f24: 49fa fc3c lea %pc@(42b62 ),%a4 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 42f28: 47f9 0004 f910 lea 4f910 ,%a3 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 42f2e: 2f06 movel %d6,%sp@- 42f30: 2f05 movel %d5,%sp@- 42f32: 2f0a movel %a2,%sp@- 42f34: 2f02 movel %d2,%sp@- 42f36: 4e94 jsr %a4@ 42f38: 4fef 0010 lea %sp@(16),%sp 42f3c: 4a80 tstl %d0 42f3e: 661a bnes 42f5a <== ALWAYS TAKEN errno = EINVAL; 42f40: 4eb9 0004 d94c jsr 4d94c <__errno> <== NOT EXECUTED 42f46: 2040 moveal %d0,%a0 <== NOT EXECUTED 42f48: 7016 moveq #22,%d0 <== NOT EXECUTED 42f4a: 2080 movel %d0,%a0@ <== NOT EXECUTED fclose(fp); 42f4c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42f4e: 4eb9 0004 da8a jsr 4da8a <== NOT EXECUTED return -1; 42f54: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); 42f56: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; 42f58: 6034 bras 42f8e <== NOT EXECUTED } if (name) { 42f5a: 4a83 tstl %d3 42f5c: 670e beqs 42f6c <== NEVER TAKEN match = (strcmp(grp->gr_name, name) == 0); 42f5e: 2f03 movel %d3,%sp@- 42f60: 2f12 movel %a2@,%sp@- 42f62: 4e93 jsr %a3@ 42f64: 508f addql #8,%sp 42f66: 4a80 tstl %d0 42f68: 57c0 seq %d0 42f6a: 600a bras 42f76 } else { match = (grp->gr_gid == gid); 42f6c: 4280 clrl %d0 <== NOT EXECUTED 42f6e: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 42f72: b880 cmpl %d0,%d4 <== NOT EXECUTED 42f74: 57c0 seq %d0 <== NOT EXECUTED 42f76: 49c0 extbl %d0 42f78: 4480 negl %d0 } if (match) { 42f7a: 67b2 beqs 42f2e fclose(fp); 42f7c: 2f02 movel %d2,%sp@- 42f7e: 4eb9 0004 da8a jsr 4da8a *result = grp; 42f84: 206e 001c moveal %fp@(28),%a0 return 0; 42f88: 588f addql #4,%sp else { match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 42f8a: 4280 clrl %d0 42f8c: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 42f8e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 42f94: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042c68 : return NULL; return p; } struct group *getgrent(void) { 42c68: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp == NULL) 42c6c: 2039 0005 e82a movel 5e82a ,%d0 <== NOT EXECUTED 42c72: 6724 beqs 42c98 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 42c74: 4878 00c8 pea c8 <== NOT EXECUTED 42c78: 4879 0005 e82e pea 5e82e <== NOT EXECUTED 42c7e: 4879 0005 e8f6 pea 5e8f6 <== NOT EXECUTED 42c84: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42c86: 4eba feda jsr %pc@(42b62 ) <== NOT EXECUTED 42c8a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 42c8e: 223c 0005 e8f6 movel #387318,%d1 <== NOT EXECUTED 42c94: 4a80 tstl %d0 <== NOT EXECUTED 42c96: 6602 bnes 42c9a <== NOT EXECUTED 42c98: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &grent; } 42c9a: 2001 movel %d1,%d0 <== NOT EXECUTED 42c9c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042fbe : gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 42fbe: 4280 clrl %d0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 42fc0: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 42fc4: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 42fc8: 486e fffc pea %fp@(-4) <== NOT EXECUTED 42fcc: 4878 00c8 pea c8 <== NOT EXECUTED 42fd0: 4879 0005 e82e pea 5e82e <== NOT EXECUTED 42fd6: 4879 0005 e8f6 pea 5e8f6 <== NOT EXECUTED 42fdc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42fde: 4eb9 0004 2f98 jsr 42f98 <== NOT EXECUTED 42fe4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 42fe8: 4a80 tstl %d0 <== NOT EXECUTED 42fea: 6704 beqs 42ff0 <== NOT EXECUTED 42fec: 4280 clrl %d0 <== NOT EXECUTED 42fee: 6004 bras 42ff4 <== NOT EXECUTED return NULL; return p; 42ff0: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 42ff4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042f98 : char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 42f98: 4280 clrl %d0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 42f9a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 42f9e: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 42fa2: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 42fa6: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 42faa: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 42fae: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 42fb2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42fb4: 42a7 clrl %sp@- <== NOT EXECUTED 42fb6: 4eba ff22 jsr %pc@(42eda ) <== NOT EXECUTED } 42fba: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004301a : struct group *getgrnam( const char *name ) { 4301a: 4e56 fffc linkw %fp,#-4 struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 4301e: 486e fffc pea %fp@(-4) 43022: 4878 00c8 pea c8 43026: 4879 0005 e82e pea 5e82e 4302c: 4879 0005 e8f6 pea 5e8f6 43032: 2f2e 0008 movel %fp@(8),%sp@- 43036: 4eb9 0004 2ff8 jsr 42ff8 4303c: 4fef 0014 lea %sp@(20),%sp 43040: 4a80 tstl %d0 43042: 6704 beqs 43048 <== ALWAYS TAKEN 43044: 4280 clrl %d0 <== NOT EXECUTED 43046: 6004 bras 4304c <== NOT EXECUTED return NULL; return p; 43048: 202e fffc movel %fp@(-4),%d0 } 4304c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005a170 : */ pid_t getpid( void ) { return _Objects_Local_node; } 5a170: 7001 moveq #1,%d0 <== NOT EXECUTED * * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ pid_t getpid( void ) { 5a172: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return _Objects_Local_node; } 5a176: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004308a : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4308a: 4e56 ffe0 linkw %fp,#-32 4308e: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 43092: 262e 0008 movel %fp@(8),%d3 43096: 282e 000c movel %fp@(12),%d4 4309a: 246e 0010 moveal %fp@(16),%a2 4309e: 2a2e 0014 movel %fp@(20),%d5 430a2: 2c2e 0018 movel %fp@(24),%d6 FILE *fp; int match; init_etc_passwd_group(); 430a6: 4eb9 0004 2dc0 jsr 42dc0 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 430ac: 4879 0005 d14d pea 5d14d <_global_impure_ptr+0xbf> 430b2: 4879 0005 c6df pea 5c6df 430b8: 4eb9 0004 e10c jsr 4e10c 430be: 508f addql #8,%sp 430c0: 2400 movel %d0,%d2 430c2: 6610 bnes 430d4 <== ALWAYS TAKEN errno = EINVAL; 430c4: 4eb9 0004 d94c jsr 4d94c <__errno> <== NOT EXECUTED 430ca: 7816 moveq #22,%d4 <== NOT EXECUTED 430cc: 2040 moveal %d0,%a0 <== NOT EXECUTED 430ce: 70ff moveq #-1,%d0 <== NOT EXECUTED 430d0: 2084 movel %d4,%a0@ <== NOT EXECUTED return -1; 430d2: 606a bras 4313e <== NOT EXECUTED } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 430d4: 49fa fbca lea %pc@(42ca0 ),%a4 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 430d8: 47f9 0004 f910 lea 4f910 ,%a3 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 430de: 2f06 movel %d6,%sp@- 430e0: 2f05 movel %d5,%sp@- 430e2: 2f0a movel %a2,%sp@- 430e4: 2f02 movel %d2,%sp@- 430e6: 4e94 jsr %a4@ 430e8: 4fef 0010 lea %sp@(16),%sp 430ec: 4a80 tstl %d0 430ee: 661a bnes 4310a <== ALWAYS TAKEN errno = EINVAL; 430f0: 4eb9 0004 d94c jsr 4d94c <__errno> <== NOT EXECUTED 430f6: 7616 moveq #22,%d3 <== NOT EXECUTED 430f8: 2040 moveal %d0,%a0 <== NOT EXECUTED 430fa: 2083 movel %d3,%a0@ <== NOT EXECUTED fclose(fp); 430fc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 430fe: 4eb9 0004 da8a jsr 4da8a <== NOT EXECUTED return -1; 43104: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); 43106: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; 43108: 6034 bras 4313e <== NOT EXECUTED } if (name) { 4310a: 4a83 tstl %d3 4310c: 670e beqs 4311c <== NEVER TAKEN match = (strcmp(pwd->pw_name, name) == 0); 4310e: 2f03 movel %d3,%sp@- 43110: 2f12 movel %a2@,%sp@- 43112: 4e93 jsr %a3@ 43114: 508f addql #8,%sp 43116: 4a80 tstl %d0 43118: 57c0 seq %d0 4311a: 600a bras 43126 } else { match = (pwd->pw_uid == uid); 4311c: 4280 clrl %d0 <== NOT EXECUTED 4311e: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 43122: b880 cmpl %d0,%d4 <== NOT EXECUTED 43124: 57c0 seq %d0 <== NOT EXECUTED 43126: 49c0 extbl %d0 43128: 4480 negl %d0 } if (match) { 4312a: 67b2 beqs 430de fclose(fp); 4312c: 2f02 movel %d2,%sp@- 4312e: 4eb9 0004 da8a jsr 4da8a *result = pwd; 43134: 206e 001c moveal %fp@(28),%a0 return 0; 43138: 588f addql #4,%sp else { match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd; 4313a: 4280 clrl %d0 4313c: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 4313e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 43144: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042d88 : return NULL; return p; } struct passwd *getpwent(void) { 42d88: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp == NULL) 42d8c: 2039 0005 e742 movel 5e742 ,%d0 <== NOT EXECUTED 42d92: 6724 beqs 42db8 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 42d94: 4878 00c8 pea c8 <== NOT EXECUTED 42d98: 4879 0005 e746 pea 5e746 <== NOT EXECUTED 42d9e: 4879 0005 e80e pea 5e80e <== NOT EXECUTED 42da4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42da6: 4eba fef8 jsr %pc@(42ca0 ) <== NOT EXECUTED 42daa: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 42dae: 223c 0005 e80e movel #387086,%d1 <== NOT EXECUTED 42db4: 4a80 tstl %d0 <== NOT EXECUTED 42db6: 6602 bnes 42dba <== NOT EXECUTED 42db8: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &pwent; } 42dba: 2001 movel %d1,%d0 <== NOT EXECUTED 42dbc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000431ca : struct passwd *getpwnam( const char *name ) { 431ca: 4e56 fffc linkw %fp,#-4 struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 431ce: 486e fffc pea %fp@(-4) 431d2: 4878 00c8 pea c8 431d6: 4879 0005 e746 pea 5e746 431dc: 4879 0005 e80e pea 5e80e 431e2: 2f2e 0008 movel %fp@(8),%sp@- 431e6: 4eb9 0004 31a8 jsr 431a8 431ec: 4fef 0014 lea %sp@(20),%sp 431f0: 4a80 tstl %d0 431f2: 6704 beqs 431f8 <== ALWAYS TAKEN 431f4: 4280 clrl %d0 <== NOT EXECUTED 431f6: 6004 bras 431fc <== NOT EXECUTED return NULL; return p; 431f8: 202e fffc movel %fp@(-4),%d0 } 431fc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004316e : uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 4316e: 4280 clrl %d0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 43170: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 43174: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 43178: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4317c: 4878 00c8 pea c8 <== NOT EXECUTED 43180: 4879 0005 e746 pea 5e746 <== NOT EXECUTED 43186: 4879 0005 e80e pea 5e80e <== NOT EXECUTED 4318c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4318e: 4eb9 0004 3148 jsr 43148 <== NOT EXECUTED 43194: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 43198: 4a80 tstl %d0 <== NOT EXECUTED 4319a: 6704 beqs 431a0 <== NOT EXECUTED 4319c: 4280 clrl %d0 <== NOT EXECUTED 4319e: 6004 bras 431a4 <== NOT EXECUTED return NULL; return p; 431a0: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 431a4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043148 : char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 43148: 4280 clrl %d0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4314a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4314e: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 43152: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 43156: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4315a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4315e: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 43162: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43164: 42a7 clrl %sp@- <== NOT EXECUTED 43166: 4eba ff22 jsr %pc@(4308a ) <== NOT EXECUTED } 4316a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000428b0 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 428b0: 4e56 ffec linkw %fp,#-20 428b4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 428b8: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 428bc: 4a8a tstl %a2 428be: 6610 bnes 428d0 <== ALWAYS TAKEN errno = EFAULT; 428c0: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 428c6: 720e moveq #14,%d1 <== NOT EXECUTED 428c8: 2040 moveal %d0,%a0 <== NOT EXECUTED 428ca: 70ff moveq #-1,%d0 <== NOT EXECUTED 428cc: 2081 movel %d1,%a0@ <== NOT EXECUTED return -1; 428ce: 6032 bras 42902 <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 428d0: 203c 0000 0700 movel #1792,%d0 428d6: 40c2 movew %sr,%d2 428d8: 8082 orl %d2,%d0 428da: 46c0 movew %d0,%sr _TOD_Get( &now ); 428dc: 486e fff8 pea %fp@(-8) 428e0: 4eb9 0004 64ec jsr 464ec <_TOD_Get> _ISR_Enable(level); 428e6: 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; 428e8: 263c 0000 03e8 movel #1000,%d3 * 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; 428ee: 588f addql #4,%sp 428f0: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 428f2: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 428f6: 4c43 1801 remsl %d3,%d1,%d1 428fa: 2541 0004 movel %d1,%a2@(4) _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 428fe: 24ae fff8 movel %fp@(-8),%a2@ } 42902: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 42908: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c5e0 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 4c5e0: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4c5e2: 4e56 0000 linkw %fp,#0 4c5e6: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 4c5ea: 2268 0038 moveal %a0@(56),%a1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4c5ee: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 4c5f0: b0a9 0048 cmpl %a1@(72),%d0 4c5f4: 6704 beqs 4c5fa <== ALWAYS TAKEN 4c5f6: 70ff moveq #-1,%d0 <== NOT EXECUTED 4c5f8: 600e bras 4c608 <== NOT EXECUTED if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 4c5fa: 4280 clrl %d0 4c5fc: 4281 clrl %d1 4c5fe: 4282 clrl %d2 4c600: 2141 000c movel %d1,%a0@(12) 4c604: 2142 0010 movel %d2,%a0@(16) return 0; } 4c608: 241f movel %sp@+,%d2 4c60a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c734 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4c734: 4e56 fff8 linkw %fp,#-8 4c738: 2f0b movel %a3,%sp@- 4c73a: 266e 000c moveal %fp@(12),%a3 4c73e: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4c740: 2453 moveal %a3@,%a2 4c742: 200a movel %a2,%d0 4c744: 0680 0000 0050 addil #80,%d0 4c74a: b0aa 004c cmpl %a2@(76),%d0 4c74e: 6712 beqs 4c762 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4c750: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 4c756: 72ff moveq #-1,%d1 4c758: 2040 moveal %d0,%a0 4c75a: 705a moveq #90,%d0 4c75c: 2080 movel %d0,%a0@ 4c75e: 6000 0086 braw 4c7e6 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 4c762: 206b 0010 moveal %a3@(16),%a0 4c766: b5e8 001c cmpal %a0@(28),%a2 4c76a: 6706 beqs 4c772 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4c76c: 4aaa 0058 tstl %a2@(88) 4c770: 6710 beqs 4c782 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); 4c772: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 4c778: 72ff moveq #-1,%d1 4c77a: 2040 moveal %d0,%a0 4c77c: 7010 moveq #16,%d0 4c77e: 2080 movel %d0,%a0@ 4c780: 6064 bras 4c7e6 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4c782: 4aaa 0008 tstl %a2@(8) 4c786: 670e beqs 4c796 4c788: 2f0a movel %a2,%sp@- 4c78a: 4eb9 0004 613c jsr 4613c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4c790: 588f addql #4,%sp 4c792: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4c796: 302a 0032 movew %a2@(50),%d0 4c79a: 5380 subql #1,%d0 4c79c: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4c7a0: 42a7 clrl %sp@- 4c7a2: 486e fff8 pea %fp@(-8) 4c7a6: 4eb9 0004 28b0 jsr 428b0 4c7ac: 256e fff8 0044 movel %fp@(-8),%a2@(68) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 4c7b2: 2f0a movel %a2,%sp@- 4c7b4: 4eb9 0004 a1be jsr 4a1be 4c7ba: 4fef 000c lea %sp@(12),%sp 4c7be: 4a80 tstl %d0 4c7c0: 6622 bnes 4c7e4 4c7c2: 4a6a 0032 tstw %a2@(50) 4c7c6: 661c bnes 4c7e4 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4c7c8: 2079 0005 c530 moveal 5c530 ,%a0 4c7ce: 2653 moveal %a3@,%a3 4c7d0: b7e8 0004 cmpal %a0@(4),%a3 4c7d4: 6604 bnes 4c7da <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 4c7d6: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 4c7da: 2f0a movel %a2,%sp@- 4c7dc: 4eb9 0004 2828 jsr 42828 4c7e2: 588f addql #4,%sp 4c7e4: 4281 clrl %d1 } return 0; } 4c7e6: 246e fff0 moveal %fp@(-16),%a2 4c7ea: 2001 movel %d1,%d0 4c7ec: 266e fff4 moveal %fp@(-12),%a3 4c7f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042dc0 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 42dc0: 4e56 0000 linkw %fp,#0 42dc4: 2f0a movel %a2,%sp@- 42dc6: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 42dc8: 4a39 0005 e740 tstb 5e740 42dce: 6600 00c4 bnew 42e94 return; etc_passwd_initted = 1; mkdir("/etc", 0777); 42dd2: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 42dd6: 45f9 0004 e10c lea 4e10c ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 42ddc: 4879 0005 c6da pea 5c6da FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 42de2: 7001 moveq #1,%d0 42de4: 13c0 0005 e740 moveb %d0,5e740 mkdir("/etc", 0777); 42dea: 4eb9 0004 3508 jsr 43508 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 42df0: 4879 0005 d14d pea 5d14d <_global_impure_ptr+0xbf> 42df6: 4879 0005 c6df pea 5c6df 42dfc: 4e92 jsr %a2@ 42dfe: 4fef 0010 lea %sp@(16),%sp 42e02: 4a80 tstl %d0 42e04: 670c beqs 42e12 <== ALWAYS TAKEN fclose(fp); 42e06: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42e08: 4eb9 0004 da8a jsr 4da8a <== NOT EXECUTED 42e0e: 588f addql #4,%sp <== NOT EXECUTED 42e10: 602e bras 42e40 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 42e12: 4879 0005 bde2 pea 5bde2 <_rodata_start+0xf2> 42e18: 4879 0005 c6df pea 5c6df 42e1e: 4e92 jsr %a2@ 42e20: 508f addql #8,%sp 42e22: 2400 movel %d0,%d2 42e24: 671a beqs 42e40 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 42e26: 2f00 movel %d0,%sp@- 42e28: 4879 0005 c6eb pea 5c6eb 42e2e: 4eb9 0004 e1ec jsr 4e1ec "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 42e34: 2f02 movel %d2,%sp@- 42e36: 4eb9 0004 da8a jsr 4da8a 42e3c: 4fef 000c lea %sp@(12),%sp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 42e40: 4879 0005 d14d pea 5d14d <_global_impure_ptr+0xbf> 42e46: 45f9 0004 e10c lea 4e10c ,%a2 42e4c: 4879 0005 c752 pea 5c752 42e52: 4e92 jsr %a2@ 42e54: 508f addql #8,%sp 42e56: 4a80 tstl %d0 42e58: 670c beqs 42e66 <== ALWAYS TAKEN fclose(fp); 42e5a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42e5c: 4eb9 0004 da8a jsr 4da8a <== NOT EXECUTED 42e62: 588f addql #4,%sp <== NOT EXECUTED 42e64: 602e bras 42e94 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 42e66: 4879 0005 bde2 pea 5bde2 <_rodata_start+0xf2> 42e6c: 4879 0005 c752 pea 5c752 42e72: 4e92 jsr %a2@ 42e74: 508f addql #8,%sp 42e76: 2400 movel %d0,%d2 42e78: 671a beqs 42e94 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 42e7a: 2f00 movel %d0,%sp@- 42e7c: 4879 0005 c75d pea 5c75d 42e82: 4eb9 0004 e1ec jsr 4e1ec "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 42e88: 2f02 movel %d2,%sp@- 42e8a: 4eb9 0004 da8a jsr 4da8a 42e90: 4fef 000c lea %sp@(12),%sp } } 42e94: 242e fff8 movel %fp@(-8),%d2 42e98: 246e fffc moveal %fp@(-4),%a2 42e9c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045654 : int ioctl( int fd, ioctl_command_t command, ... ) { 45654: 4e56 0000 linkw %fp,#0 45658: 202e 0008 movel %fp@(8),%d0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4565c: b0b9 0005 fb54 cmpl 5fb54 ,%d0 45662: 6422 bccs 45686 iop = rtems_libio_iop( fd ); 45664: 2079 0006 12bc moveal 612bc ,%a0 4566a: ed88 lsll #6,%d0 4566c: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 4566e: 2028 0014 movel %a0@(20),%d0 45672: 0280 0000 0100 andil #256,%d0 45678: 670c beqs 45686 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 4567a: 202e 0010 movel %fp@(16),%d0 /* * Now process the ioctl(). */ if ( !iop->handlers ) 4567e: 2268 003c moveal %a0@(60),%a1 45682: 4a89 tstl %a1 45684: 6610 bnes 45696 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 45686: 4eb9 0005 0980 jsr 50980 <__errno> 4568c: 72ff moveq #-1,%d1 4568e: 2040 moveal %d0,%a0 45690: 7009 moveq #9,%d0 45692: 2080 movel %d0,%a0@ 45694: 602a bras 456c0 if ( !iop->handlers->ioctl_h ) 45696: 2269 0010 moveal %a1@(16),%a1 4569a: 4a89 tstl %a1 4569c: 6612 bnes 456b0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 4569e: 4eb9 0005 0980 jsr 50980 <__errno> <== NOT EXECUTED 456a4: 72ff moveq #-1,%d1 <== NOT EXECUTED 456a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 456a8: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 456ae: 6010 bras 456c0 <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 456b0: 2f00 movel %d0,%sp@- 456b2: 2f2e 000c movel %fp@(12),%sp@- 456b6: 2f08 movel %a0,%sp@- 456b8: 4e91 jsr %a1@ return rc; 456ba: 4fef 000c lea %sp@(12),%sp rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 456be: 2200 movel %d0,%d1 return rc; } 456c0: 2001 movel %d1,%d0 456c2: 4e5e unlk %fp ... =============================================================================== 0004404e : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 4404e: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 44052: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED 44056: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 4405a: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 4405e: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 44062: 1401 moveb %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 44064: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44068: 6704 beqs 4406e <== NOT EXECUTED c &= 0x7f; 4406a: 747f moveq #127,%d2 <== NOT EXECUTED 4406c: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 4406e: 0800 0009 btst #9,%d0 <== NOT EXECUTED 44072: 6724 beqs 44098 <== NOT EXECUTED c = tolower (c); 44074: 2079 0005 c5c0 moveal 5c5c0 <__ctype_ptr__>,%a0 <== NOT EXECUTED 4407a: 7603 moveq #3,%d3 <== NOT EXECUTED 4407c: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44082: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 <== NOT EXECUTED 44086: 49c1 extbl %d1 <== NOT EXECUTED 44088: c283 andl %d3,%d1 <== NOT EXECUTED 4408a: 163c 0001 moveb #1,%d3 <== NOT EXECUTED 4408e: b681 cmpl %d1,%d3 <== NOT EXECUTED 44090: 6606 bnes 44098 <== NOT EXECUTED 44092: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED if (c == '\r') { 44098: 4281 clrl %d1 <== NOT EXECUTED 4409a: 1202 moveb %d2,%d1 <== NOT EXECUTED 4409c: 760d moveq #13,%d3 <== NOT EXECUTED 4409e: b681 cmpl %d1,%d3 <== NOT EXECUTED 440a0: 6610 bnes 440b2 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 440a2: 4a00 tstb %d0 <== NOT EXECUTED 440a4: 6d00 00f8 bltw 4419e <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 440a8: 0800 0008 btst #8,%d0 <== NOT EXECUTED 440ac: 671a beqs 440c8 <== NOT EXECUTED 440ae: 740a moveq #10,%d2 <== NOT EXECUTED 440b0: 6016 bras 440c8 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 440b2: 760a moveq #10,%d3 <== NOT EXECUTED 440b4: b681 cmpl %d1,%d3 <== NOT EXECUTED 440b6: 660a bnes 440c2 <== NOT EXECUTED 440b8: 0800 0006 btst #6,%d0 <== NOT EXECUTED 440bc: 670a beqs 440c8 <== NOT EXECUTED 440be: 740d moveq #13,%d2 <== NOT EXECUTED 440c0: 6006 bras 440c8 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 440c2: 4a02 tstb %d2 <== NOT EXECUTED 440c4: 6700 009e beqw 44164 <== NOT EXECUTED 440c8: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED 440cc: 0801 0001 btst #1,%d1 <== NOT EXECUTED 440d0: 6700 0092 beqw 44164 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 440d4: 4283 clrl %d3 <== NOT EXECUTED 440d6: 162a 0043 moveb %a2@(67),%d3 <== NOT EXECUTED 440da: 4280 clrl %d0 <== NOT EXECUTED 440dc: 1002 moveb %d2,%d0 <== NOT EXECUTED 440de: b680 cmpl %d0,%d3 <== NOT EXECUTED 440e0: 6604 bnes 440e6 <== NOT EXECUTED erase (tty, 0); 440e2: 42a7 clrl %sp@- <== NOT EXECUTED 440e4: 600e bras 440f4 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { 440e6: 4283 clrl %d3 <== NOT EXECUTED 440e8: 162a 0044 moveb %a2@(68),%d3 <== NOT EXECUTED 440ec: b680 cmpl %d0,%d3 <== NOT EXECUTED 440ee: 6610 bnes 44100 <== NOT EXECUTED erase (tty, 1); 440f0: 4878 0001 pea 1 <== NOT EXECUTED 440f4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 440f6: 4eba fdbe jsr %pc@(43eb6 ) <== NOT EXECUTED return 0; 440fa: 508f addql #8,%sp <== NOT EXECUTED 440fc: 6000 00a0 braw 4419e <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { 44100: 4283 clrl %d3 <== NOT EXECUTED 44102: 162a 0045 moveb %a2@(69),%d3 <== NOT EXECUTED 44106: b680 cmpl %d0,%d3 <== NOT EXECUTED 44108: 6606 bnes 44110 <== NOT EXECUTED 4410a: 7001 moveq #1,%d0 <== NOT EXECUTED 4410c: 6000 0092 braw 441a0 <== NOT EXECUTED return 1; } else if (c == '\n') { 44110: 760a moveq #10,%d3 <== NOT EXECUTED 44112: b680 cmpl %d0,%d3 <== NOT EXECUTED 44114: 6620 bnes 44136 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 44116: 7048 moveq #72,%d0 <== NOT EXECUTED 44118: c280 andl %d0,%d1 <== NOT EXECUTED 4411a: 670c beqs 44128 <== NOT EXECUTED echo (c, tty); 4411c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4411e: 4878 000a pea a <== NOT EXECUTED 44122: 4eba fd0c jsr %pc@(43e30 ) <== NOT EXECUTED 44126: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44128: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 4412c: 7001 moveq #1,%d0 <== NOT EXECUTED 4412e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44132: 740a moveq #10,%d2 <== NOT EXECUTED 44134: 605c bras 44192 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 44136: 4283 clrl %d3 <== NOT EXECUTED 44138: 162a 004c moveb %a2@(76),%d3 <== NOT EXECUTED 4413c: b680 cmpl %d0,%d3 <== NOT EXECUTED 4413e: 670a beqs 4414a <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 44140: 4283 clrl %d3 <== NOT EXECUTED 44142: 162a 0051 moveb %a2@(81),%d3 <== NOT EXECUTED 44146: b680 cmpl %d0,%d3 <== NOT EXECUTED 44148: 661a bnes 44164 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 4414a: 44c1 movew %d1,%ccr <== NOT EXECUTED 4414c: 6a0e bpls 4415c <== NOT EXECUTED echo (c, tty); 4414e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44150: 4280 clrl %d0 <== NOT EXECUTED 44152: 1002 moveb %d2,%d0 <== NOT EXECUTED 44154: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44156: 4eba fcd8 jsr %pc@(43e30 ) <== NOT EXECUTED 4415a: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 4415c: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44160: 7001 moveq #1,%d0 <== NOT EXECUTED 44162: 602a bras 4418e <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 44164: 2039 0005 c520 movel 5c520 ,%d0 <== NOT EXECUTED 4416a: 5380 subql #1,%d0 <== NOT EXECUTED 4416c: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44170: 6f2c bles 4419e <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 44172: 7008 moveq #8,%d0 <== NOT EXECUTED 44174: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44178: 670e beqs 44188 <== NOT EXECUTED echo (c, tty); 4417a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4417c: 4280 clrl %d0 <== NOT EXECUTED 4417e: 1002 moveb %d2,%d0 <== NOT EXECUTED 44180: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44182: 4eba fcac jsr %pc@(43e30 ) <== NOT EXECUTED 44186: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44188: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 4418c: 4280 clrl %d0 <== NOT EXECUTED 4418e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44192: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44196: 5281 addql #1,%d1 <== NOT EXECUTED 44198: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 4419c: 6002 bras 441a0 <== NOT EXECUTED 4419e: 4280 clrl %d0 <== NOT EXECUTED } return 0; } 441a0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 441a6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005a198 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 5a198: 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 ) { 5a19a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5a19e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004390c : int link( const char *existing, const char *new ) { 4390c: 4e56 ffc4 linkw %fp,#-60 43910: 48d7 001c moveml %d2-%d4,%sp@ 43914: 262e 0008 movel %fp@(8),%d3 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 43918: 240e movel %fp,%d2 4391a: 0682 ffff ffe4 addil #-28,%d2 43920: 2f03 movel %d3,%sp@- int link( const char *existing, const char *new ) { 43922: 282e 000c movel %fp@(12),%d4 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 43926: 4eb9 0004 f664 jsr 4f664 4392c: 7201 moveq #1,%d1 4392e: 2e81 movel %d1,%sp@ 43930: 2f02 movel %d2,%sp@- 43932: 42a7 clrl %sp@- 43934: 2f00 movel %d0,%sp@- 43936: 2f03 movel %d3,%sp@- 43938: 4eb9 0004 3490 jsr 43490 0, &existing_loc, true ); if ( result != 0 ) 4393e: 4fef 0014 lea %sp@(20),%sp 43942: 4a80 tstl %d0 43944: 6706 beqs 4394c 43946: 76ff moveq #-1,%d3 43948: 6000 0152 braw 43a9c /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 4394c: 260e movel %fp,%d3 4394e: 0683 ffff ffd0 addil #-48,%d3 43954: 2f03 movel %d3,%sp@- 43956: 486e fffc pea %fp@(-4) 4395a: 2f04 movel %d4,%sp@- 4395c: 4eb9 0004 4728 jsr 44728 if ( !parent_loc.ops->evalformake_h ) { 43962: 206e ffdc moveal %fp@(-36),%a0 43966: 4fef 000c lea %sp@(12),%sp 4396a: 2068 0004 moveal %a0@(4),%a0 4396e: 4a88 tstl %a0 43970: 661a bnes 4398c <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 43972: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 43976: 4a88 tstl %a0 <== NOT EXECUTED 43978: 6700 00d2 beqw 43a4c <== NOT EXECUTED 4397c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43980: 4a88 tstl %a0 <== NOT EXECUTED 43982: 6700 00c8 beqw 43a4c <== NOT EXECUTED 43986: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43988: 6000 00be braw 43a48 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 4398c: 486e fff8 pea %fp@(-8) 43990: d8ae fffc addl %fp@(-4),%d4 43994: 2f03 movel %d3,%sp@- 43996: 2f04 movel %d4,%sp@- 43998: 4e90 jsr %a0@ if ( result != 0 ) { 4399a: 4fef 000c lea %sp@(12),%sp if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 4399e: 2800 movel %d0,%d4 if ( result != 0 ) { 439a0: 6726 beqs 439c8 rtems_filesystem_freenode( &existing_loc ); 439a2: 206e fff0 moveal %fp@(-16),%a0 439a6: 4a88 tstl %a0 439a8: 670e beqs 439b8 <== NEVER TAKEN 439aa: 2068 001c moveal %a0@(28),%a0 439ae: 4a88 tstl %a0 439b0: 6706 beqs 439b8 <== NEVER TAKEN 439b2: 2f02 movel %d2,%sp@- 439b4: 4e90 jsr %a0@ 439b6: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( result ); 439b8: 4eb9 0004 e198 jsr 4e198 <__errno> 439be: 76ff moveq #-1,%d3 439c0: 2040 moveal %d0,%a0 439c2: 2084 movel %d4,%a0@ 439c4: 6000 00d6 braw 43a9c /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 439c8: 202e fff4 movel %fp@(-12),%d0 439cc: b0ae ffe0 cmpl %fp@(-32),%d0 439d0: 6740 beqs 43a12 rtems_filesystem_freenode( &existing_loc ); 439d2: 206e fff0 moveal %fp@(-16),%a0 439d6: 4a88 tstl %a0 439d8: 670e beqs 439e8 <== NEVER TAKEN 439da: 2068 001c moveal %a0@(28),%a0 439de: 4a88 tstl %a0 439e0: 6706 beqs 439e8 <== NEVER TAKEN 439e2: 2f02 movel %d2,%sp@- 439e4: 4e90 jsr %a0@ 439e6: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 439e8: 206e ffdc moveal %fp@(-36),%a0 439ec: 4a88 tstl %a0 439ee: 6710 beqs 43a00 <== NEVER TAKEN 439f0: 2068 001c moveal %a0@(28),%a0 439f4: 4a88 tstl %a0 439f6: 6708 beqs 43a00 <== NEVER TAKEN 439f8: 486e ffd0 pea %fp@(-48) 439fc: 4e90 jsr %a0@ 439fe: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 43a00: 4eb9 0004 e198 jsr 4e198 <__errno> 43a06: 76ff moveq #-1,%d3 43a08: 2040 moveal %d0,%a0 43a0a: 7012 moveq #18,%d0 43a0c: 2080 movel %d0,%a0@ 43a0e: 6000 008c braw 43a9c } if ( !parent_loc.ops->link_h ) { 43a12: 206e ffdc moveal %fp@(-36),%a0 43a16: 2068 0008 moveal %a0@(8),%a0 43a1a: 4a88 tstl %a0 43a1c: 6640 bnes 43a5e <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 43a1e: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 43a22: 4a88 tstl %a0 <== NOT EXECUTED 43a24: 670e beqs 43a34 <== NOT EXECUTED 43a26: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43a2a: 4a88 tstl %a0 <== NOT EXECUTED 43a2c: 6706 beqs 43a34 <== NOT EXECUTED 43a2e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43a30: 4e90 jsr %a0@ <== NOT EXECUTED 43a32: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 43a34: 206e ffdc moveal %fp@(-36),%a0 <== NOT EXECUTED 43a38: 4a88 tstl %a0 <== NOT EXECUTED 43a3a: 6710 beqs 43a4c <== NOT EXECUTED 43a3c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43a40: 4a88 tstl %a0 <== NOT EXECUTED 43a42: 6708 beqs 43a4c <== NOT EXECUTED 43a44: 486e ffd0 pea %fp@(-48) <== NOT EXECUTED 43a48: 4e90 jsr %a0@ <== NOT EXECUTED 43a4a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 43a4c: 4eb9 0004 e198 jsr 4e198 <__errno> <== NOT EXECUTED 43a52: 76ff moveq #-1,%d3 <== NOT EXECUTED 43a54: 2040 moveal %d0,%a0 <== NOT EXECUTED 43a56: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 43a5c: 603e bras 43a9c <== NOT EXECUTED } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 43a5e: 2f2e fff8 movel %fp@(-8),%sp@- 43a62: 2f03 movel %d3,%sp@- 43a64: 2f02 movel %d2,%sp@- 43a66: 4e90 jsr %a0@ rtems_filesystem_freenode( &existing_loc ); 43a68: 206e fff0 moveal %fp@(-16),%a0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 43a6c: 2600 movel %d0,%d3 rtems_filesystem_freenode( &existing_loc ); 43a6e: 4fef 000c lea %sp@(12),%sp 43a72: 4a88 tstl %a0 43a74: 670e beqs 43a84 <== NEVER TAKEN 43a76: 2068 001c moveal %a0@(28),%a0 43a7a: 4a88 tstl %a0 43a7c: 6706 beqs 43a84 <== NEVER TAKEN 43a7e: 2f02 movel %d2,%sp@- 43a80: 4e90 jsr %a0@ 43a82: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 43a84: 206e ffdc moveal %fp@(-36),%a0 43a88: 4a88 tstl %a0 43a8a: 6710 beqs 43a9c <== NEVER TAKEN 43a8c: 2068 001c moveal %a0@(28),%a0 43a90: 4a88 tstl %a0 43a92: 6708 beqs 43a9c <== NEVER TAKEN 43a94: 486e ffd0 pea %fp@(-48) 43a98: 4e90 jsr %a0@ 43a9a: 588f addql #4,%sp return result; } 43a9c: 2003 movel %d3,%d0 43a9e: 4cee 001c ffc4 moveml %fp@(-60),%d2-%d4 43aa4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005a1b8 : off_t lseek( int fd, off_t offset, int whence ) { 5a1b8: 4e56 ffec linkw %fp,#-20 5a1bc: 206e 0014 moveal %fp@(20),%a0 5a1c0: 48d7 043c moveml %d2-%d5/%a2,%sp@ 5a1c4: 242e 0008 movel %fp@(8),%d2 5a1c8: 202e 000c movel %fp@(12),%d0 5a1cc: 222e 0010 movel %fp@(16),%d1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 5a1d0: b4b9 0005 c414 cmpl 5c414 ,%d2 5a1d6: 6416 bccs 5a1ee <== NEVER TAKEN iop = rtems_libio_iop( fd ); 5a1d8: 2479 0005 dac0 moveal 5dac0 ,%a2 5a1de: ed8a lsll #6,%d2 5a1e0: d5c2 addal %d2,%a2 rtems_libio_check_is_open(iop); 5a1e2: 242a 0014 movel %a2@(20),%d2 5a1e6: 0282 0000 0100 andil #256,%d2 5a1ec: 660e bnes 5a1fc <== ALWAYS TAKEN 5a1ee: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 5a1f4: 7209 moveq #9,%d1 <== NOT EXECUTED 5a1f6: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a1f8: 2081 movel %d1,%a0@ <== NOT EXECUTED 5a1fa: 6068 bras 5a264 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 5a1fc: 226a 003c moveal %a2@(60),%a1 5a200: 4aa9 0014 tstl %a1@(20) 5a204: 6610 bnes 5a216 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a206: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 5a20c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a20e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 5a214: 604e bras 5a264 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 5a216: 7801 moveq #1,%d4 /* * Now process the lseek(). */ old_offset = iop->offset; 5a218: 242a 000c movel %a2@(12),%d2 5a21c: 262a 0010 movel %a2@(16),%d3 switch ( whence ) { 5a220: b888 cmpl %a0,%d4 5a222: 6714 beqs 5a238 5a224: 7a02 moveq #2,%d5 5a226: ba88 cmpl %a0,%d5 5a228: 6718 beqs 5a242 5a22a: 4a88 tstl %a0 5a22c: 662a bnes 5a258 case SEEK_SET: iop->offset = offset; 5a22e: 2540 000c movel %d0,%a2@(12) 5a232: 2541 0010 movel %d1,%a2@(16) break; 5a236: 6032 bras 5a26a case SEEK_CUR: iop->offset += offset; 5a238: 2800 movel %d0,%d4 5a23a: 2a01 movel %d1,%d5 5a23c: da83 addl %d3,%d5 5a23e: d982 addxl %d2,%d4 5a240: 600c bras 5a24e break; case SEEK_END: iop->offset = iop->size + offset; 5a242: 282a 0004 movel %a2@(4),%d4 5a246: 2a2a 0008 movel %a2@(8),%d5 5a24a: da81 addl %d1,%d5 5a24c: d980 addxl %d0,%d4 5a24e: 2544 000c movel %d4,%a2@(12) 5a252: 2545 0010 movel %d5,%a2@(16) break; 5a256: 6012 bras 5a26a default: rtems_set_errno_and_return_minus_one( EINVAL ); 5a258: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 5a25e: 2040 moveal %d0,%a0 5a260: 7016 moveq #22,%d0 5a262: 2080 movel %d0,%a0@ 5a264: 78ff moveq #-1,%d4 5a266: 7aff moveq #-1,%d5 5a268: 602c bras 5a296 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5a26a: 226a 003c moveal %a2@(60),%a1 5a26e: 2f08 movel %a0,%sp@- 5a270: 2f01 movel %d1,%sp@- 5a272: 2f00 movel %d0,%sp@- 5a274: 2f0a movel %a2,%sp@- 5a276: 2069 0014 moveal %a1@(20),%a0 5a27a: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5a27c: 4fef 0010 lea %sp@(16),%sp /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5a280: 2800 movel %d0,%d4 5a282: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5a284: 70ff moveq #-1,%d0 5a286: 72ff moveq #-1,%d1 5a288: 9285 subl %d5,%d1 5a28a: 9184 subxl %d4,%d0 5a28c: 6608 bnes 5a296 iop->offset = old_offset; 5a28e: 2542 000c movel %d2,%a2@(12) 5a292: 2543 0010 movel %d3,%a2@(16) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5a296: 2205 movel %d5,%d1 5a298: 2004 movel %d4,%d0 5a29a: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 5a2a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042b08 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 42b08: 4e56 fff4 linkw %fp,#-12 42b0c: 52b9 0005 dadc addql #1,5dadc 42b12: 48d7 001c moveml %d2-%d4,%sp@ 42b16: 262e 0008 movel %fp@(8),%d3 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 42b1a: 4eb9 0004 2a18 jsr 42a18 /* * Validate the parameters */ if ( !size ) 42b20: 4a83 tstl %d3 42b22: 6700 0086 beqw 42baa return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 42b26: 7003 moveq #3,%d0 42b28: b0b9 0005 dd9e cmpl 5dd9e <_System_state_Current>,%d0 42b2e: 660a bnes 42b3a 42b30: 4eb9 0004 29c0 jsr 429c0 42b36: 4a00 tstb %d0 42b38: 6770 beqs 42baa <== 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 ); 42b3a: 42a7 clrl %sp@- 42b3c: 42a7 clrl %sp@- 42b3e: 2f03 movel %d3,%sp@- 42b40: 2f39 0005 c420 movel 5c420 ,%sp@- 42b46: 4eb9 0004 7060 jsr 47060 <_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 ) { 42b4c: 4fef 0010 lea %sp@(16),%sp 42b50: 2400 movel %d0,%d2 42b52: 6626 bnes 42b7a if (rtems_malloc_sbrk_helpers) 42b54: 2079 0005 ca8a moveal 5ca8a ,%a0 42b5a: 4a88 tstl %a0 42b5c: 670e beqs 42b6c <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 42b5e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42b60: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 42b64: 4e90 jsr %a0@ <== NOT EXECUTED if ( !return_this ) { 42b66: 588f addql #4,%sp <== NOT EXECUTED 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 ); 42b68: 2800 movel %d0,%d4 <== NOT EXECUTED if ( !return_this ) { 42b6a: 6610 bnes 42b7c <== NOT EXECUTED errno = ENOMEM; 42b6c: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 42b72: 2040 moveal %d0,%a0 42b74: 700c moveq #12,%d0 42b76: 2080 movel %d0,%a0@ return (void *) 0; 42b78: 6032 bras 42bac 42b7a: 2800 movel %d0,%d4 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 42b7c: 2079 0005 ca8e moveal 5ca8e ,%a0 42b82: 4a88 tstl %a0 42b84: 6708 beqs 42b8e <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 42b86: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42b88: 2f04 movel %d4,%sp@- <== NOT EXECUTED 42b8a: 4e90 jsr %a0@ <== NOT EXECUTED 42b8c: 508f addql #8,%sp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 42b8e: 2079 0005 ca86 moveal 5ca86 ,%a0 42b94: 4a88 tstl %a0 42b96: 6604 bnes 42b9c <== NEVER TAKEN 42b98: 2404 movel %d4,%d2 42b9a: 6010 bras 42bac (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 42b9c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 42b9e: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 42ba2: 2404 movel %d4,%d2 <== NOT EXECUTED 42ba4: 4e90 jsr %a0@ <== NOT EXECUTED 42ba6: 588f addql #4,%sp <== NOT EXECUTED 42ba8: 6002 bras 42bac <== NOT EXECUTED 42baa: 4282 clrl %d2 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 42bac: 2002 movel %d2,%d0 42bae: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 42bb4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000429fe : } void malloc_deferred_free( void *pointer ) { 429fe: 4e56 0000 linkw %fp,#0 <== 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 ); 42a02: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42a06: 4879 0005 dacc pea 5dacc <== NOT EXECUTED 42a0c: 4eb9 0004 6104 jsr 46104 <_Chain_Append> <== NOT EXECUTED 42a12: 508f addql #8,%sp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 42a14: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042a18 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 42a18: 4e56 0000 linkw %fp,#0 42a1c: 2f0b movel %a3,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 42a1e: 47f9 0004 6164 lea 46164 <_Chain_Get>,%a3 42a24: 2f0a movel %a2,%sp@- /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 42a26: 45f9 0004 2828 lea 42828 ,%a2 rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 42a2c: 6006 bras 42a34 free(to_be_freed); 42a2e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42a30: 4e92 jsr %a2@ <== NOT EXECUTED 42a32: 588f addql #4,%sp <== NOT EXECUTED 42a34: 4879 0005 dacc pea 5dacc 42a3a: 4e93 jsr %a3@ rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 42a3c: 588f addql #4,%sp 42a3e: 4a80 tstl %d0 42a40: 66ec bnes 42a2e <== NEVER TAKEN free(to_be_freed); } 42a42: 246e fff8 moveal %fp@(-8),%a2 42a46: 266e fffc moveal %fp@(-4),%a3 42a4a: 4e5e unlk %fp ... =============================================================================== 000429c0 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 429c0: 4e56 0000 linkw %fp,#0 if ( _Thread_Dispatch_disable_level > 0 ) 429c4: 2039 0005 dc1c movel 5dc1c <_Thread_Dispatch_disable_level>,%d0 429ca: 6704 beqs 429d0 <== ALWAYS TAKEN 429cc: 4200 clrb %d0 <== NOT EXECUTED 429ce: 600a bras 429da <== NOT EXECUTED return false; if ( _ISR_Nest_level > 0 ) 429d0: 2039 0005 dcb6 movel 5dcb6 <_ISR_Nest_level>,%d0 #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 429d6: 57c0 seq %d0 429d8: 4480 negl %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 429da: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b694 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 4b694: 4e56 0000 linkw %fp,#0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 4b698: 2f39 0005 d2b8 movel 5d2b8 ,%sp@- 4b69e: 4878 0001 pea 1 4b6a2: 4eb9 0004 2438 jsr 42438 if ( memory ) 4b6a8: 508f addql #8,%sp 4b6aa: 4a80 tstl %d0 4b6ac: 6706 beqs 4b6b4 <== NEVER TAKEN memfile_blocks_allocated++; 4b6ae: 52b9 0005 d3cc addql #1,5d3cc return memory; } 4b6b4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b9fe : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 4b9fe: 4e56 0000 linkw %fp,#0 4ba02: 2f0a movel %a2,%sp@- 4ba04: 246e 0008 moveal %fp@(8),%a2 /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 4ba08: 2f0a movel %a2,%sp@- 4ba0a: 4eb9 0004 a1be jsr 4a1be 4ba10: 588f addql #4,%sp 4ba12: 4a80 tstl %d0 4ba14: 6632 bnes 4ba48 4ba16: 4a6a 0032 tstw %a2@(50) 4ba1a: 662c bnes 4ba48 <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 4ba1c: 2079 0005 c530 moveal 5c530 ,%a0 4ba22: b5e8 0004 cmpal %a0@(4),%a2 4ba26: 6604 bnes 4ba2c <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 4ba28: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 4ba2c: 7006 moveq #6,%d0 4ba2e: b0aa 0048 cmpl %a2@(72),%d0 4ba32: 670a beqs 4ba3e <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 4ba34: 2f0a movel %a2,%sp@- 4ba36: 4eb9 0004 b8e4 jsr 4b8e4 4ba3c: 588f addql #4,%sp free( the_jnode ); 4ba3e: 2f0a movel %a2,%sp@- 4ba40: 4eb9 0004 2828 jsr 42828 4ba46: 588f addql #4,%sp } return 0; } 4ba48: 246e fffc moveal %fp@(-4),%a2 4ba4c: 4280 clrl %d0 4ba4e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b832 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4b832: 4e56 ffec linkw %fp,#-20 4b836: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4b83a: 246e 0008 moveal %fp@(8),%a2 4b83e: 262e 000c movel %fp@(12),%d3 /* * Perform internal consistency checks */ assert( block_table ); 4b842: 4a8a tstl %a2 4b844: 661c bnes 4b862 <== ALWAYS TAKEN 4b846: 4879 0005 b8be pea 5b8be 4b84c: 4879 0005 b9a5 pea 5b9a5 <__FUNCTION__.6076> <== NOT EXECUTED 4b852: 4878 01b3 pea 1b3 <== NOT EXECUTED 4b856: 4879 0005 b850 pea 5b850 <== NOT EXECUTED 4b85c: 4eb9 0004 9f40 jsr 49f40 <__assert_func> <== NOT EXECUTED 4b862: 2652 moveal %a2@,%a3 4b864: 4282 clrl %d2 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] ) { 4b86e: 2013 movel %a3@,%d0 4b870: 6708 beqs 4b87a memfile_free_block( b[i] ); 4b872: 2f00 movel %d0,%sp@- 4b874: 4e94 jsr %a4@ b[i] = 0; 4b876: 588f addql #4,%sp 4b878: 4293 clrl %a3@ * 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 ); 4b882: 2f12 movel %a2@,%sp@- 4b884: 4eb9 0004 b67a jsr 4b67a *block_table = 0; 4b88a: 588f addql #4,%sp 4b88c: 4292 clrl %a2@ } 4b88e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4b894: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bc76 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4bc76: 4e56 ffec linkw %fp,#-20 4bc7a: 206e 0008 moveal %fp@(8),%a0 4bc7e: 48d7 040c moveml %d2-%d3/%a2,%sp@ IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4bc82: 2468 0038 moveal %a0@(56),%a2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4bc86: 202e 000c movel %fp@(12),%d0 4bc8a: 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 ) 4bc8e: 242a 004c movel %a2@(76),%d2 4bc92: 262a 0050 movel %a2@(80),%d3 4bc96: 9681 subl %d1,%d3 4bc98: 9580 subxl %d0,%d2 4bc9a: 6c12 bges 4bcae <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 4bc9c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4bc9e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bca0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4bca2: 4eb9 0004 bb4e jsr 4bb4e <== NOT EXECUTED 4bca8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bcac: 6026 bras 4bcd4 <== 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; 4bcae: 2540 004c movel %d0,%a2@(76) 4bcb2: 2541 0050 movel %d1,%a2@(80) iop->size = the_jnode->info.file.size; 4bcb6: 2140 0004 movel %d0,%a0@(4) 4bcba: 2141 0008 movel %d1,%a0@(8) IMFS_update_atime( the_jnode ); 4bcbe: 42a7 clrl %sp@- 4bcc0: 486e fff8 pea %fp@(-8) 4bcc4: 4eb9 0004 28b0 jsr 428b0 4bcca: 256e fff8 003c movel %fp@(-8),%a2@(60) return 0; 4bcd0: 508f addql #8,%sp */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); 4bcd2: 4280 clrl %d0 return 0; } 4bcd4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4bcda: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bcde : { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 4bcde: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4bce0: 4e56 fff0 linkw %fp,#-16 4bce4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4bce8: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4bcec: 266a 0038 moveal %a2@(56),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 4bcf0: b0ab 0048 cmpl %a3@(72),%d0 4bcf4: 6620 bnes 4bd16 <== ALWAYS TAKEN if (iop->offset > the_jnode->info.linearfile.size) 4bcf6: 202b 004c movel %a3@(76),%d0 <== NOT EXECUTED 4bcfa: 222b 0050 movel %a3@(80),%d1 <== NOT EXECUTED 4bcfe: 242a 000c movel %a2@(12),%d2 <== NOT EXECUTED 4bd02: 262a 0010 movel %a2@(16),%d3 <== NOT EXECUTED 4bd06: 9681 subl %d1,%d3 <== NOT EXECUTED 4bd08: 9580 subxl %d0,%d2 <== NOT EXECUTED 4bd0a: 6f48 bles 4bd54 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 4bd0c: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED 4bd10: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4bd14: 603e bras 4bd54 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4bd16: 2f2a 0010 movel %a2@(16),%sp@- 4bd1a: 2f2a 000c movel %a2@(12),%sp@- 4bd1e: 2f0b movel %a3,%sp@- 4bd20: 4eb9 0004 bb4e jsr 4bb4e 4bd26: 4fef 000c lea %sp@(12),%sp 4bd2a: 4a80 tstl %d0 4bd2c: 6716 beqs 4bd44 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 4bd2e: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4bd34: 761c moveq #28,%d3 <== NOT EXECUTED 4bd36: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bd38: 2083 movel %d3,%a0@ <== NOT EXECUTED 4bd3a: 307c ffff moveaw #-1,%a0 <== NOT EXECUTED 4bd3e: 327c ffff moveaw #-1,%a1 <== NOT EXECUTED 4bd42: 6018 bras 4bd5c <== NOT EXECUTED iop->size = the_jnode->info.file.size; 4bd44: 202b 004c movel %a3@(76),%d0 4bd48: 222b 0050 movel %a3@(80),%d1 4bd4c: 2540 0004 movel %d0,%a2@(4) 4bd50: 2541 0008 movel %d1,%a2@(8) } return iop->offset; 4bd54: 206a 000c moveal %a2@(12),%a0 4bd58: 226a 0010 moveal %a2@(16),%a1 } 4bd5c: 2209 movel %a1,%d1 4bd5e: 2008 movel %a0,%d0 4bd60: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4bd66: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bfb6 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4bfb6: 4e56 fff0 linkw %fp,#-16 4bfba: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4bfbe: 266e 0008 moveal %fp@(8),%a3 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4bfc2: 202b 0014 movel %a3@(20),%d0 4bfc6: 0280 0000 0204 andil #516,%d0 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4bfcc: 246b 0038 moveal %a3@(56),%a2 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4bfd0: 6750 beqs 4c022 && (the_jnode->type == IMFS_LINEAR_FILE)) { 4bfd2: 7006 moveq #6,%d0 4bfd4: b0aa 0048 cmpl %a2@(72),%d0 4bfd8: 6648 bnes 4c022 <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; 4bfda: 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; 4bfde: 4282 clrl %d2 <== NOT EXECUTED 4bfe0: 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; 4bfe2: 222a 0054 movel %a2@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4bfe6: 2542 004c movel %d2,%a2@(76) <== NOT EXECUTED 4bfea: 2543 0050 movel %d3,%a2@(80) <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 4bfee: 7605 moveq #5,%d3 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 4bff0: 42aa 0054 clrl %a2@(84) <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 4bff4: 2543 0048 movel %d3,%a2@(72) <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 4bff8: 42aa 0058 clrl %a2@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4bffc: 42aa 005c clrl %a2@(92) <== NOT EXECUTED if ((count != 0) 4c000: 4a80 tstl %d0 <== NOT EXECUTED 4c002: 671e beqs 4c022 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4c004: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c006: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4c008: 42a7 clrl %sp@- <== NOT EXECUTED 4c00a: 42a7 clrl %sp@- <== NOT EXECUTED 4c00c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4c00e: 4eb9 0004 bd6a jsr 4bd6a <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 4c014: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4c018: 72ff moveq #-1,%d1 <== NOT EXECUTED 4c01a: b280 cmpl %d0,%d1 <== NOT EXECUTED 4c01c: 6604 bnes 4c022 <== NOT EXECUTED 4c01e: 70ff moveq #-1,%d0 <== NOT EXECUTED 4c020: 602e bras 4c050 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4c022: 202b 0014 movel %a3@(20),%d0 4c026: 0280 0000 0200 andil #512,%d0 4c02c: 6710 beqs 4c03e iop->offset = the_jnode->info.file.size; 4c02e: 242a 004c movel %a2@(76),%d2 4c032: 262a 0050 movel %a2@(80),%d3 4c036: 2742 000c movel %d2,%a3@(12) 4c03a: 2743 0010 movel %d3,%a3@(16) iop->size = the_jnode->info.file.size; 4c03e: 4280 clrl %d0 4c040: 222a 004c movel %a2@(76),%d1 4c044: 242a 0050 movel %a2@(80),%d2 4c048: 2741 0004 movel %d1,%a3@(4) 4c04c: 2742 0008 movel %d2,%a3@(8) return 0; } 4c050: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4c056: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ba52 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4ba52: 4e56 fff8 linkw %fp,#-8 4ba56: 206e 000c moveal %fp@(12),%a0 4ba5a: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4ba5c: 2450 moveal %a0@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4ba5e: 4aaa 0008 tstl %a2@(8) 4ba62: 670e beqs 4ba72 <== NEVER TAKEN 4ba64: 2f0a movel %a2,%sp@- 4ba66: 4eb9 0004 613c jsr 4613c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4ba6c: 588f addql #4,%sp 4ba6e: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4ba72: 302a 0032 movew %a2@(50),%d0 4ba76: 5380 subql #1,%d0 4ba78: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4ba7c: 42a7 clrl %sp@- 4ba7e: 486e fff8 pea %fp@(-8) 4ba82: 4eb9 0004 28b0 jsr 428b0 4ba88: 256e fff8 0044 movel %fp@(-8),%a2@(68) return memfile_check_rmnod( the_jnode ); 4ba8e: 2f0a movel %a2,%sp@- 4ba90: 4eb9 0004 b9fe jsr 4b9fe } 4ba96: 246e fff4 moveal %fp@(-12),%a2 4ba9a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042bd8 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 42bd8: 4e56 ffd8 linkw %fp,#-40 42bdc: 48d7 001c moveml %d2-%d4,%sp@ 42be0: 242e 000c movel %fp@(12),%d2 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) ) ) 42be4: 2002 movel %d2,%d0 42be6: 0280 0000 f000 andil #61440,%d0 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 42bec: 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) ) ) 42bf0: 4a80 tstl %d0 42bf2: 6612 bnes 42c06 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42bf4: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 42bfa: 74ff moveq #-1,%d2 <== NOT EXECUTED 42bfc: 2040 moveal %d0,%a0 <== NOT EXECUTED 42bfe: 7016 moveq #22,%d0 <== NOT EXECUTED 42c00: 2080 movel %d0,%a0@ <== NOT EXECUTED 42c02: 6000 009c braw 42ca0 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 42c06: 260e movel %fp,%d3 42c08: 0683 ffff ffe4 addil #-28,%d3 42c0e: 2f03 movel %d3,%sp@- 42c10: 486e fffc pea %fp@(-4) 42c14: 2f04 movel %d4,%sp@- 42c16: 4eb9 0004 3540 jsr 43540 if ( !temp_loc.ops->evalformake_h ) { 42c1c: 206e fff0 moveal %fp@(-16),%a0 42c20: 4fef 000c lea %sp@(12),%sp 42c24: 2068 0004 moveal %a0@(4),%a0 42c28: 4a88 tstl %a0 42c2a: 6734 beqs 42c60 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 42c2c: 486e fff8 pea %fp@(-8) 42c30: d8ae fffc addl %fp@(-4),%d4 42c34: 2f03 movel %d3,%sp@- 42c36: 2f04 movel %d4,%sp@- 42c38: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42c3a: 4fef 000c lea %sp@(12),%sp 42c3e: 4a80 tstl %d0 42c40: 6704 beqs 42c46 42c42: 74ff moveq #-1,%d2 42c44: 605a bras 42ca0 return -1; if ( !temp_loc.ops->mknod_h ) { 42c46: 226e fff0 moveal %fp@(-16),%a1 42c4a: 2069 0014 moveal %a1@(20),%a0 42c4e: 4a88 tstl %a0 42c50: 6620 bnes 42c72 <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); 42c52: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 42c56: 4a88 tstl %a0 <== NOT EXECUTED 42c58: 6706 beqs 42c60 <== NOT EXECUTED 42c5a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42c5c: 4e90 jsr %a0@ <== NOT EXECUTED 42c5e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42c60: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 42c66: 74ff moveq #-1,%d2 <== NOT EXECUTED 42c68: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c6a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 42c70: 602e bras 42ca0 <== NOT EXECUTED } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 42c72: 2f03 movel %d3,%sp@- 42c74: 2f2e 0014 movel %fp@(20),%sp@- 42c78: 2f2e 0010 movel %fp@(16),%sp@- 42c7c: 2f02 movel %d2,%sp@- 42c7e: 2f2e fff8 movel %fp@(-8),%sp@- 42c82: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 42c84: 206e fff0 moveal %fp@(-16),%a0 if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 42c88: 2400 movel %d0,%d2 rtems_filesystem_freenode( &temp_loc ); 42c8a: 4fef 0014 lea %sp@(20),%sp 42c8e: 4a88 tstl %a0 42c90: 670e beqs 42ca0 <== NEVER TAKEN 42c92: 2068 001c moveal %a0@(28),%a0 42c96: 4a88 tstl %a0 42c98: 6706 beqs 42ca0 42c9a: 2f03 movel %d3,%sp@- 42c9c: 4e90 jsr %a0@ 42c9e: 588f addql #4,%sp return result; } 42ca0: 2002 movel %d2,%d0 42ca2: 4cee 001c ffd8 moveml %fp@(-40),%d2-%d4 42ca8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042d22 : /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 42d22: 7001 moveq #1,%d0 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 42d24: 4e56 ffc0 linkw %fp,#-64 42d28: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 42d2c: 242e 0008 movel %fp@(8),%d2 42d30: 262e 000c movel %fp@(12),%d3 42d34: 2a2e 0010 movel %fp@(16),%d5 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 42d38: b0ae 0014 cmpl %fp@(20),%d0 42d3c: 6510 bcss 42d4e rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 42d3e: 2f05 movel %d5,%sp@- 42d40: 4eb9 0004 a536 jsr 4a536 if ( !mount_h ) 42d46: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 42d48: 2a40 moveal %d0,%a5 if ( !mount_h ) 42d4a: 4a80 tstl %d0 42d4c: 6612 bnes 42d60 rtems_set_errno_and_return_minus_one( EINVAL ); 42d4e: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 42d54: 7816 moveq #22,%d4 42d56: 72ff moveq #-1,%d1 42d58: 2040 moveal %d0,%a0 42d5a: 2084 movel %d4,%a0@ 42d5c: 6000 0252 braw 42fb0 { 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: 4a83 tstl %d3 42d62: 56c0 sne %d0 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 42d64: 283c 0005 ae50 movel #372304,%d4 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 42d6a: 4480 negl %d0 42d6c: 1c00 moveb %d0,%d6 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 42d6e: 6702 beqs 42d72 42d70: 2803 movel %d3,%d4 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 42d72: 2f05 movel %d5,%sp@- 42d74: 45f9 0004 e4e4 lea 4e4e4 ,%a2 42d7a: 4e92 jsr %a2@ 42d7c: 588f addql #4,%sp 42d7e: 2640 moveal %d0,%a3 42d80: 528b addql #1,%a3 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 42d82: 4a82 tstl %d2 42d84: 6604 bnes 42d8a 42d86: 99cc subal %a4,%a4 42d88: 600a bras 42d94 42d8a: 2f02 movel %d2,%sp@- 42d8c: 4e92 jsr %a2@ 42d8e: 588f addql #4,%sp 42d90: 2840 moveal %d0,%a4 42d92: 528c addql #1,%a4 size_t target_length = strlen( target ); 42d94: 2f04 movel %d4,%sp@- 42d96: 4eb9 0004 e4e4 jsr 4e4e4 42d9c: 588f addql #4,%sp 42d9e: 2e00 movel %d0,%d7 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 ); 42da0: 41f3 0875 lea %a3@(00000075,%d0:l),%a0 42da4: 4870 c800 pea %a0@(00000000,%a4:l) 42da8: 4878 0001 pea 1 42dac: 4eb9 0004 2438 jsr 42438 if ( mt_entry != NULL ) { 42db2: 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 ); 42db4: 2440 moveal %d0,%a2 if ( mt_entry != NULL ) { 42db6: 4a80 tstl %d0 42db8: 6772 beqs 42e2c <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); 42dba: 2f05 movel %d5,%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 ); 42dbc: 2a00 movel %d0,%d5 42dbe: 0685 0000 0074 addil #116,%d5 strcpy( str, filesystemtype ); 42dc4: 41f9 0004 e038 lea 4e038 ,%a0 mt_entry->type = str; str += filesystemtype_size; 42dca: 47f3 5800 lea %a3@(00000000,%d5:l),%a3 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); 42dce: 2f05 movel %d5,%sp@- 42dd0: 2d48 ffe8 movel %a0,%fp@(-24) 42dd4: 4e90 jsr %a0@ mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { 42dd6: 206e ffe8 moveal %fp@(-24),%a0 42dda: 508f addql #8,%sp if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); mt_entry->type = str; 42ddc: 2545 006c movel %d5,%a2@(108) str += filesystemtype_size; if ( source_or_null != NULL ) { 42de0: 4a82 tstl %d2 42de2: 670e beqs 42df2 strcpy( str, source_or_null ); 42de4: 2f02 movel %d2,%sp@- 42de6: 2f0b movel %a3,%sp@- 42de8: 4e90 jsr %a0@ mt_entry->dev = str; str += source_size; 42dea: 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; 42dec: 254b 0070 movel %a3,%a2@(112) str += source_size; 42df0: d7cc addal %a4,%a3 } strcpy( str, target ); 42df2: 2f04 movel %d4,%sp@- 42df4: 2f0b movel %a3,%sp@- 42df6: 4eb9 0004 e038 jsr 4e038 if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 42dfc: 4878 0030 pea 30 42e00: 4879 0005 b304 pea 5b304 42e06: 486a 0038 pea %a2@(56) ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 42e0a: 202e 0014 movel %fp@(20),%d0 mt_entry->dev = str; str += source_size; } strcpy( str, target ); mt_entry->target = str; 42e0e: 254b 0068 movel %a3,%a2@(104) ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 42e12: 2540 0030 movel %d0,%a2@(48) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 42e16: 254a 002c movel %a2,%a2@(44) mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 42e1a: 4eb9 0004 d8d8 jsr 4d8d8 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 42e20: 4fef 0014 lea %sp@(20),%sp 42e24: 4a06 tstb %d6 42e26: 6700 00c8 beqw 42ef0 42e2a: 6012 bras 42e3e target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 42e2c: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 42e32: 760c moveq #12,%d3 <== NOT EXECUTED 42e34: 72ff moveq #-1,%d1 <== NOT EXECUTED 42e36: 2040 moveal %d0,%a0 <== NOT EXECUTED 42e38: 2083 movel %d3,%a0@ <== NOT EXECUTED 42e3a: 6000 0174 braw 42fb0 <== 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( 42e3e: 4878 0001 pea 1 42e42: 47ee ffec lea %fp@(-20),%a3 42e46: 2f0b movel %a3,%sp@- 42e48: 4878 0007 pea 7 42e4c: 2f07 movel %d7,%sp@- 42e4e: 2f03 movel %d3,%sp@- 42e50: 4eb9 0004 27ac jsr 427ac 42e56: 4fef 0014 lea %sp@(20),%sp 42e5a: 72ff moveq #-1,%d1 42e5c: b280 cmpl %d0,%d1 42e5e: 6700 0128 beqw 42f88 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 42e62: 206e fff8 moveal %fp@(-8),%a0 42e66: 2068 0010 moveal %a0@(16),%a0 42e6a: 4a88 tstl %a0 42e6c: 6762 beqs 42ed0 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 42e6e: 2f0b movel %a3,%sp@- 42e70: 4e90 jsr %a0@ 42e72: 588f addql #4,%sp 42e74: 7201 moveq #1,%d1 42e76: b280 cmpl %d0,%d1 42e78: 6710 beqs 42e8a errno = ENOTDIR; 42e7a: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 42e80: 7414 moveq #20,%d2 42e82: 2040 moveal %d0,%a0 42e84: 2082 movel %d2,%a0@ goto cleanup_and_bail; 42e86: 6000 0102 braw 42f8a /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 42e8a: 2f2e ffec movel %fp@(-20),%sp@- 42e8e: 487a fe1c pea %pc@(42cac ) 42e92: 4eb9 0004 2cc4 jsr 42cc4 42e98: 508f addql #8,%sp 42e9a: 4a00 tstb %d0 42e9c: 6710 beqs 42eae errno = EBUSY; 42e9e: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 42ea4: 7210 moveq #16,%d1 42ea6: 2040 moveal %d0,%a0 42ea8: 2081 movel %d1,%a0@ goto cleanup_and_bail; 42eaa: 6000 00de braw 42f8a * 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; 42eae: 226e fff8 moveal %fp@(-8),%a1 * 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; 42eb2: 256e ffec 0008 movel %fp@(-20),%a2@(8) mt_entry->mt_point_node.handlers = loc.handlers; 42eb8: 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; 42ebe: 256e fffc 0018 movel %fp@(-4),%a2@(24) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 42ec4: 2069 0020 moveal %a1@(32),%a0 * 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: 2549 0014 movel %a1,%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 ){ 42ecc: 4a88 tstl %a0 42ece: 6612 bnes 42ee2 <== ALWAYS TAKEN errno = ENOTSUP; 42ed0: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 42ed6: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ed8: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED goto cleanup_and_bail; 42ede: 6000 00aa braw 42f8a <== NOT EXECUTED } if ( loc.ops->mount_h( mt_entry ) ) { 42ee2: 2f0a movel %a2,%sp@- 42ee4: 4e90 jsr %a0@ 42ee6: 588f addql #4,%sp 42ee8: 4a80 tstl %d0 42eea: 6726 beqs 42f12 <== ALWAYS TAKEN 42eec: 6000 009c braw 42f8a <== NOT EXECUTED 42ef0: 203c 0005 c514 movel #378132,%d0 42ef6: b0b9 0005 c510 cmpl 5c510 ,%d0 42efc: 6604 bnes 42f02 <== NEVER TAKEN 42efe: 97cb subal %a3,%a3 42f00: 6010 bras 42f12 } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 42f02: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 42f08: 97cb subal %a3,%a3 <== NOT EXECUTED 42f0a: 2040 moveal %d0,%a0 <== NOT EXECUTED 42f0c: 7016 moveq #22,%d0 <== NOT EXECUTED 42f0e: 2080 movel %d0,%a0@ <== NOT EXECUTED goto cleanup_and_bail; 42f10: 6078 bras 42f8a <== NOT EXECUTED * 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 ) ) { 42f12: 2f2e 0018 movel %fp@(24),%sp@- 42f16: 2f0a movel %a2,%sp@- 42f18: 4e95 jsr %a5@ 42f1a: 508f addql #8,%sp 42f1c: 4a80 tstl %d0 42f1e: 6714 beqs 42f34 <== ALWAYS TAKEN /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 42f20: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 42f24: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 42f28: 4a88 tstl %a0 <== NOT EXECUTED 42f2a: 675e beqs 42f8a <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 42f2c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42f2e: 4e90 jsr %a0@ <== NOT EXECUTED 42f30: 588f addql #4,%sp <== NOT EXECUTED 42f32: 6056 bras 42f8a <== 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 ); 42f34: 42a7 clrl %sp@- 42f36: 42a7 clrl %sp@- 42f38: 2f39 0005 dac8 movel 5dac8 ,%sp@- 42f3e: 4eb9 0004 57c0 jsr 457c0 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 42f44: 2f0a movel %a2,%sp@- 42f46: 4879 0005 c510 pea 5c510 42f4c: 4eb9 0004 6104 jsr 46104 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 42f52: 2f39 0005 dac8 movel 5dac8 ,%sp@- 42f58: 4eb9 0004 58c4 jsr 458c4 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 42f5e: 4fef 0018 lea %sp@(24),%sp 42f62: 4a06 tstb %d6 42f64: 661e bnes 42f84 rtems_filesystem_root = mt_entry->mt_fs_root; 42f66: 4878 0014 pea 14 42f6a: 486a 001c pea %a2@(28) 42f6e: 2079 0005 c530 moveal 5c530 ,%a0 42f74: 41e8 0018 lea %a0@(24),%a0 42f78: 2f08 movel %a0,%sp@- 42f7a: 4eb9 0004 d8d8 jsr 4d8d8 42f80: 4fef 000c lea %sp@(12),%sp 42f84: 4281 clrl %d1 42f86: 6028 bras 42fb0 42f88: 97cb subal %a3,%a3 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 42f8a: 2f0a movel %a2,%sp@- 42f8c: 4eb9 0004 2828 jsr 42828 if ( loc_to_free ) 42f92: 588f addql #4,%sp 42f94: 4a8b tstl %a3 42f96: 6716 beqs 42fae <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); 42f98: 206b 000c moveal %a3@(12),%a0 42f9c: 4a88 tstl %a0 42f9e: 670e beqs 42fae <== NEVER TAKEN 42fa0: 2068 001c moveal %a0@(28),%a0 42fa4: 4a88 tstl %a0 42fa6: 6706 beqs 42fae <== NEVER TAKEN 42fa8: 2f0b movel %a3,%sp@- 42faa: 4e90 jsr %a0@ 42fac: 588f addql #4,%sp 42fae: 72ff moveq #-1,%d1 return -1; } 42fb0: 2001 movel %d1,%d0 42fb2: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 42fb8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043048 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 43048: 4e56 fff4 linkw %fp,#-12 4304c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43050: 262e 0008 movel %fp@(8),%d3 43054: 246e 000c moveal %fp@(12),%a2 /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 43058: b5c3 cmpal %d3,%a2 4305a: 6608 bnes 43064 ptr = _REENT; 4305c: 2439 0005 c5c4 movel 5c5c4 <_impure_ptr>,%d2 43062: 6004 bras 43068 } else { ptr = deleted_task->libc_reent; 43064: 242a 0104 movel %a2@(260),%d2 } if (ptr && ptr != _global_impure_ptr) { 43068: 4a82 tstl %d2 4306a: 6722 beqs 4308e <== NEVER TAKEN 4306c: b4b9 0005 bc0e cmpl 5bc0e <_global_impure_ptr>,%d2 43072: 671a beqs 4308e _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 43074: 4879 0004 30a6 pea 430a6 4307a: 2f02 movel %d2,%sp@- 4307c: 4eb9 0004 d85e jsr 4d85e <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 43082: 2f02 movel %d2,%sp@- 43084: 4eb9 0004 87a8 jsr 487a8 <_Workspace_Free> 4308a: 4fef 000c lea %sp@(12),%sp #endif } deleted_task->libc_reent = NULL; 4308e: 42aa 0104 clrl %a2@(260) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 43092: b5c3 cmpal %d3,%a2 43094: 6606 bnes 4309c _REENT = 0; 43096: 42b9 0005 c5c4 clrl 5c5c4 <_impure_ptr> } } 4309c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 430a2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000430a6 : */ int newlib_free_buffers( FILE *fp ) { 430a6: 4e56 0000 linkw %fp,#0 430aa: 2f0a movel %a2,%sp@- 430ac: 246e 0008 moveal %fp@(8),%a2 switch ( fileno(fp) ) { 430b0: 2f0a movel %a2,%sp@- 430b2: 4eb9 0004 d44c jsr 4d44c 430b8: 588f addql #4,%sp 430ba: 7202 moveq #2,%d1 430bc: b280 cmpl %d0,%d1 430be: 652a bcss 430ea <== NEVER TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { 430c0: 302a 000c movew %a2@(12),%d0 430c4: 48c0 extl %d0 430c6: 4a00 tstb %d0 430c8: 6c2a bges 430f4 <== ALWAYS TAKEN free( fp->_bf._base ); 430ca: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 430ce: 4eb9 0004 2828 jsr 42828 <== NOT EXECUTED fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; 430d4: 588f addql #4,%sp <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 430d6: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 430da: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 430de: 0880 0007 bclr #7,%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 430e2: 4292 clrl %a2@ <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 430e4: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED 430e8: 600a bras 430f4 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 430ea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 430ec: 4eb9 0004 d1f6 jsr 4d1f6 <== NOT EXECUTED 430f2: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 430f4: 246e fffc moveal %fp@(-4),%a2 430f8: 4280 clrl %d0 430fa: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000427f8 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 427f8: 4e56 0000 linkw %fp,#0 427fc: 2f02 movel %d2,%sp@- 427fe: 242e 0008 movel %fp@(8),%d2 rtems_device_driver status; if ( !initialized ) { 42802: 4a39 0005 e590 tstb 5e590 42808: 662e bnes 42838 initialized = 1; status = rtems_io_register_name( 4280a: 42a7 clrl %sp@- ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 4280c: 7001 moveq #1,%d0 status = rtems_io_register_name( 4280e: 2f02 movel %d2,%sp@- 42810: 4879 0005 c080 pea 5c080 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 42816: 13c0 0005 e590 moveb %d0,5e590 status = rtems_io_register_name( 4281c: 4eb9 0004 2e50 jsr 42e50 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 42822: 4fef 000c lea %sp@(12),%sp 42826: 4a80 tstl %d0 42828: 6708 beqs 42832 <== ALWAYS TAKEN rtems_fatal_error_occurred(status); 4282a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4282c: 4eb9 0004 6930 jsr 46930 <== NOT EXECUTED NULL_major = major; 42832: 23c2 0005 edb8 movel %d2,5edb8 } return RTEMS_SUCCESSFUL; } 42838: 242e fffc movel %fp@(-4),%d2 4283c: 4280 clrl %d0 4283e: 4e5e unlk %fp ... =============================================================================== 000427d6 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 427d6: 4e56 0000 linkw %fp,#0 427da: 206e 0010 moveal %fp@(16),%a0 rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 427de: 4a88 tstl %a0 427e0: 6706 beqs 427e8 <== ALWAYS TAKEN rw_args->bytes_moved = rw_args->count; 427e2: 2168 0010 0018 movel %a0@(16),%a0@(24) return NULL_SUCCESSFUL; } 427e8: 4280 clrl %d0 427ea: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043308 : int open( const char *pathname, int flags, ... ) { 43308: 4e56 ffc8 linkw %fp,#-56 4330c: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 43310: 242e 000c movel %fp@(12),%d2 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 43314: 2002 movel %d2,%d0 43316: 5280 addql #1,%d0 int open( const char *pathname, int flags, ... ) { 43318: 262e 0008 movel %fp@(8),%d3 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 4331c: 0800 0000 btst #0,%d0 43320: 6604 bnes 43326 43322: 4284 clrl %d4 43324: 6002 bras 43328 43326: 7804 moveq #4,%d4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 43328: 0800 0001 btst #1,%d0 4332c: 6704 beqs 43332 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 4332e: 7002 moveq #2,%d0 43330: 8880 orl %d0,%d4 va_start(ap, flags); mode = va_arg( ap, int ); 43332: 2a2e 0010 movel %fp@(16),%d5 * 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(); 43336: 4eb9 0004 a2f8 jsr 4a2f8 4333c: 2440 moveal %d0,%a2 if ( iop == 0 ) { 4333e: 4a80 tstl %d0 43340: 6606 bnes 43348 43342: 7417 moveq #23,%d2 43344: 6000 0190 braw 434d6 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 43348: 2f03 movel %d3,%sp@- 4334a: 2c3c 0004 e4e4 movel #320740,%d6 43350: 2046 moveal %d6,%a0 43352: 47ee ffec lea %fp@(-20),%a3 43356: 4bf9 0004 27ac lea 427ac ,%a5 4335c: 4e90 jsr %a0@ 4335e: 7201 moveq #1,%d1 43360: 2e81 movel %d1,%sp@ 43362: 2f0b movel %a3,%sp@- 43364: 2f04 movel %d4,%sp@- 43366: 2f00 movel %d0,%sp@- 43368: 2f03 movel %d3,%sp@- 4336a: 4e95 jsr %a5@ pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 4336c: 4fef 0014 lea %sp@(20),%sp 43370: 72ff moveq #-1,%d1 43372: b280 cmpl %d0,%d1 43374: 6666 bnes 433dc if ( errno != ENOENT ) { 43376: 49f9 0004 d0b8 lea 4d0b8 <__errno>,%a4 4337c: 4e94 jsr %a4@ 4337e: 7202 moveq #2,%d1 43380: 2040 moveal %d0,%a0 43382: b290 cmpl %a0@,%d1 43384: 662a bnes 433b0 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 43386: 0802 0009 btst #9,%d2 4338a: 6608 bnes 43394 4338c: 97cb subal %a3,%a3 4338e: 7402 moveq #2,%d2 43390: 6000 011c braw 434ae rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 43394: 42a7 clrl %sp@- 43396: 2005 movel %d5,%d0 43398: 42a7 clrl %sp@- 4339a: 08c0 000f bset #15,%d0 4339e: 2f00 movel %d0,%sp@- 433a0: 2f03 movel %d3,%sp@- 433a2: 4eb9 0004 2bd8 jsr 42bd8 if ( rc ) { 433a8: 4fef 0010 lea %sp@(16),%sp 433ac: 4a80 tstl %d0 433ae: 6708 beqs 433b8 <== ALWAYS TAKEN rc = errno; 433b0: 4e94 jsr %a4@ 433b2: 97cb subal %a3,%a3 433b4: 6000 009c braw 43452 goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 433b8: 2f03 movel %d3,%sp@- 433ba: 2046 moveal %d6,%a0 433bc: 4e90 jsr %a0@ 433be: 7201 moveq #1,%d1 433c0: 2e81 movel %d1,%sp@ 433c2: 2f0b movel %a3,%sp@- 433c4: 42a7 clrl %sp@- 433c6: 2f00 movel %d0,%sp@- 433c8: 2f03 movel %d3,%sp@- 433ca: 4e95 jsr %a5@ if ( status != 0 ) { /* The file did not exist */ 433cc: 4fef 0014 lea %sp@(20),%sp 433d0: 4a80 tstl %d0 433d2: 671e beqs 433f2 <== ALWAYS TAKEN 433d4: 97cb subal %a3,%a3 <== NOT EXECUTED 433d6: 740d moveq #13,%d2 <== NOT EXECUTED 433d8: 6000 00d4 braw 434ae <== NOT EXECUTED rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 433dc: 2002 movel %d2,%d0 433de: 0280 0000 0a00 andil #2560,%d0 433e4: 0c80 0000 0a00 cmpil #2560,%d0 433ea: 6606 bnes 433f2 433ec: 7411 moveq #17,%d2 433ee: 6000 00be braw 434ae * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 433f2: 282a 0014 movel %a2@(20),%d4 iop->pathinfo = loc; 433f6: 47ee ffec lea %fp@(-20),%a3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 433fa: 256e fff4 003c movel %fp@(-12),%a2@(60) iop->file_info = loc.node_access; 43400: 256e ffec 0038 movel %fp@(-20),%a2@(56) iop->flags |= rtems_libio_fcntl_flags( flags ); 43406: 2f02 movel %d2,%sp@- 43408: 4eb9 0004 a398 jsr 4a398 4340e: 8084 orl %d4,%d0 43410: 2540 0014 movel %d0,%a2@(20) iop->pathinfo = loc; 43414: 4878 0014 pea 14 43418: 2f0b movel %a3,%sp@- 4341a: 486a 0018 pea %a2@(24) 4341e: 4eb9 0004 d8d8 jsr 4d8d8 if ( !iop->handlers || !iop->handlers->open_h ) { 43424: 206a 003c moveal %a2@(60),%a0 43428: 4fef 0010 lea %sp@(16),%sp 4342c: 4a88 tstl %a0 4342e: 6700 00c8 beqw 434f8 43432: 2050 moveal %a0@,%a0 43434: 4a88 tstl %a0 43436: 6700 00c0 beqw 434f8 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 4343a: 2f05 movel %d5,%sp@- 4343c: 2f02 movel %d2,%sp@- 4343e: 2f03 movel %d3,%sp@- 43440: 2f0a movel %a2,%sp@- 43442: 4e90 jsr %a0@ if ( rc ) { 43444: 4fef 0010 lea %sp@(16),%sp 43448: 4a80 tstl %d0 4344a: 670c beqs 43458 rc = errno; 4344c: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 43452: 2040 moveal %d0,%a0 43454: 2410 movel %a0@,%d2 goto done; 43456: 6052 bras 434aa /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 43458: 0802 000a btst #10,%d2 4345c: 6700 0086 beqw 434e4 rc = ftruncate( iop - rtems_libio_iops, 0 ); 43460: 42a7 clrl %sp@- 43462: 200a movel %a2,%d0 43464: 90b9 0005 dac0 subl 5dac0 ,%d0 4346a: ec80 asrl #6,%d0 4346c: 42a7 clrl %sp@- 4346e: 2f00 movel %d0,%sp@- 43470: 4eb9 0004 a098 jsr 4a098 if ( rc ) { 43476: 4fef 000c lea %sp@(12),%sp /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 4347a: 2400 movel %d0,%d2 if ( rc ) { 4347c: 6766 beqs 434e4 <== ALWAYS TAKEN if(errno) rc = errno; 4347e: 47f9 0004 d0b8 lea 4d0b8 <__errno>,%a3 <== NOT EXECUTED 43484: 4e93 jsr %a3@ <== NOT EXECUTED 43486: 2040 moveal %d0,%a0 <== NOT EXECUTED 43488: 4a90 tstl %a0@ <== NOT EXECUTED 4348a: 6706 beqs 43492 <== NOT EXECUTED 4348c: 4e93 jsr %a3@ <== NOT EXECUTED 4348e: 2040 moveal %d0,%a0 <== NOT EXECUTED 43490: 2410 movel %a0@,%d2 <== NOT EXECUTED close( iop - rtems_libio_iops ); 43492: 200a movel %a2,%d0 <== NOT EXECUTED 43494: 90b9 0005 dac0 subl 5dac0 ,%d0 <== NOT EXECUTED 4349a: 97cb subal %a3,%a3 <== NOT EXECUTED 4349c: ec80 asrl #6,%d0 <== NOT EXECUTED 4349e: 95ca subal %a2,%a2 <== NOT EXECUTED 434a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 434a2: 4eb9 0004 a004 jsr 4a004 <== NOT EXECUTED 434a8: 588f addql #4,%sp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 434aa: 4a82 tstl %d2 434ac: 6736 beqs 434e4 <== NEVER TAKEN if ( iop ) 434ae: 4a8a tstl %a2 434b0: 670a beqs 434bc <== NEVER TAKEN rtems_libio_free( iop ); 434b2: 2f0a movel %a2,%sp@- 434b4: 4eb9 0004 a29a jsr 4a29a 434ba: 588f addql #4,%sp if ( loc_to_free ) 434bc: 4a8b tstl %a3 434be: 6716 beqs 434d6 rtems_filesystem_freenode( loc_to_free ); 434c0: 206b 000c moveal %a3@(12),%a0 434c4: 4a88 tstl %a0 434c6: 670e beqs 434d6 <== NEVER TAKEN 434c8: 2068 001c moveal %a0@(28),%a0 434cc: 4a88 tstl %a0 434ce: 6706 beqs 434d6 <== NEVER TAKEN 434d0: 2f0b movel %a3,%sp@- 434d2: 4e90 jsr %a0@ 434d4: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( rc ); 434d6: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 434dc: 2040 moveal %d0,%a0 434de: 70ff moveq #-1,%d0 434e0: 2082 movel %d2,%a0@ 434e2: 600a bras 434ee } return iop - rtems_libio_iops; 434e4: 200a movel %a2,%d0 434e6: 90b9 0005 dac0 subl 5dac0 ,%d0 434ec: ec80 asrl #6,%d0 } 434ee: 4cee 3c7c ffc8 moveml %fp@(-56),%d2-%d6/%a2-%a5 434f4: 4e5e unlk %fp 434f6: 4e75 rts if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 434f8: 47ee ffec lea %fp@(-20),%a3 <== NOT EXECUTED 434fc: 243c 0000 0086 movel #134,%d2 <== NOT EXECUTED 43502: 60aa bras 434ae <== NOT EXECUTED =============================================================================== 00043298 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 43298: 4e56 0000 linkw %fp,#0 4329c: 2f0a movel %a2,%sp@- int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 4329e: 45f9 0004 3308 lea 43308 ,%a2 432a4: 42a7 clrl %sp@- 432a6: 42a7 clrl %sp@- 432a8: 4879 0005 ad72 pea 5ad72 432ae: 4e92 jsr %a2@ 432b0: 4fef 000c lea %sp@(12),%sp 432b4: 72ff moveq #-1,%d1 432b6: b280 cmpl %d0,%d1 432b8: 6744 beqs 432fe /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 432ba: 42a7 clrl %sp@- 432bc: 4878 0001 pea 1 432c0: 4879 0005 ad72 pea 5ad72 432c6: 4e92 jsr %a2@ 432c8: 4fef 000c lea %sp@(12),%sp 432cc: 72ff moveq #-1,%d1 432ce: b280 cmpl %d0,%d1 432d0: 6608 bnes 432da <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 432d2: 2f3c 5554 4431 movel #1431585841,%sp@- <== NOT EXECUTED 432d8: 601e bras 432f8 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 432da: 42a7 clrl %sp@- 432dc: 4878 0001 pea 1 432e0: 4879 0005 ad72 pea 5ad72 432e6: 4e92 jsr %a2@ 432e8: 4fef 000c lea %sp@(12),%sp 432ec: 72ff moveq #-1,%d1 432ee: b280 cmpl %d0,%d1 432f0: 660c bnes 432fe <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 432f2: 2f3c 5554 4432 movel #1431585842,%sp@- <== NOT EXECUTED 432f8: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED } 432fe: 246e fffc moveal %fp@(-4),%a2 43302: 4e5e unlk %fp ... =============================================================================== 00043ce8 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 43ce8: 4e56 fff0 linkw %fp,#-16 43cec: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43cf0: 246e 000c moveal %fp@(12),%a2 43cf4: 242e 0008 movel %fp@(8),%d2 int i; if (tty->termios.c_oflag & OPOST) { 43cf8: 202a 0034 movel %a2@(52),%d0 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 43cfc: 1d42 fffe moveb %d2,%fp@(-2) int i; if (tty->termios.c_oflag & OPOST) { 43d00: 0800 0000 btst #0,%d0 43d04: 6700 010c beqw 43e12 switch (c) { 43d08: 4281 clrl %d1 43d0a: 1202 moveb %d2,%d1 43d0c: 7609 moveq #9,%d3 43d0e: b681 cmpl %d1,%d3 43d10: 6776 beqs 43d88 43d12: 650e bcss 43d22 <== ALWAYS TAKEN 43d14: 163c 0008 moveb #8,%d3 <== NOT EXECUTED 43d18: b681 cmpl %d1,%d3 <== NOT EXECUTED 43d1a: 6600 00b0 bnew 43dcc <== NOT EXECUTED 43d1e: 6000 009e braw 43dbe <== NOT EXECUTED 43d22: 760a moveq #10,%d3 43d24: b681 cmpl %d1,%d3 43d26: 670c beqs 43d34 43d28: 163c 000d moveb #13,%d3 43d2c: b681 cmpl %d1,%d3 43d2e: 6600 009c bnew 43dcc 43d32: 602c bras 43d60 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 43d34: 0800 0005 btst #5,%d0 43d38: 6704 beqs 43d3e <== ALWAYS TAKEN tty->column = 0; 43d3a: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 43d3e: 7004 moveq #4,%d0 43d40: c0aa 0034 andl %a2@(52),%d0 43d44: 6700 00cc beqw 43e12 rtems_termios_puts ("\r", 1, tty); 43d48: 2f0a movel %a2,%sp@- 43d4a: 4878 0001 pea 1 43d4e: 4879 0005 b336 pea 5b336 43d54: 4eb9 0004 3bee jsr 43bee tty->column = 0; 43d5a: 4fef 000c lea %sp@(12),%sp 43d5e: 6020 bras 43d80 } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 43d60: 0800 0004 btst #4,%d0 <== NOT EXECUTED 43d64: 6708 beqs 43d6e <== NOT EXECUTED 43d66: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 43d6a: 6700 00ba beqw 43e26 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 43d6e: 44c0 movew %d0,%ccr <== NOT EXECUTED 43d70: 6a0e bpls 43d80 <== NOT EXECUTED c = '\n'; 43d72: 720a moveq #10,%d1 <== NOT EXECUTED 43d74: 1d41 fffe moveb %d1,%fp@(-2) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 43d78: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43d7c: 6700 0094 beqw 43e12 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 43d80: 42aa 0028 clrl %a2@(40) break; 43d84: 6000 008c braw 43e12 case '\t': i = 8 - (tty->column & 7); 43d88: 222a 0028 movel %a2@(40),%d1 43d8c: 7407 moveq #7,%d2 43d8e: 307c 0008 moveaw #8,%a0 43d92: c481 andl %d1,%d2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 43d94: 0280 0000 1800 andil #6144,%d0 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 43d9a: 91c2 subal %d2,%a0 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 43d9c: 0c80 0000 1800 cmpil #6144,%d0 43da2: 6612 bnes 43db6 <== NEVER TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); 43da4: 2f0a movel %a2,%sp@- break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 43da6: d288 addl %a0,%d1 43da8: 2541 0028 movel %d1,%a2@(40) rtems_termios_puts ( " ", i, tty); 43dac: 2f08 movel %a0,%sp@- 43dae: 4879 0005 b338 pea 5b338 43db4: 6066 bras 43e1c return; } tty->column += i; 43db6: d1c1 addal %d1,%a0 <== NOT EXECUTED 43db8: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED break; 43dbc: 6054 bras 43e12 <== NOT EXECUTED case '\b': if (tty->column > 0) 43dbe: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43dc2: 6f4e bles 43e12 <== NOT EXECUTED tty->column--; 43dc4: 5380 subql #1,%d0 <== NOT EXECUTED 43dc6: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 43dca: 6046 bras 43e12 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) 43dcc: 0800 0001 btst #1,%d0 43dd0: 6724 beqs 43df6 <== ALWAYS TAKEN c = toupper(c); 43dd2: 4280 clrl %d0 <== NOT EXECUTED 43dd4: 1002 moveb %d2,%d0 <== NOT EXECUTED 43dd6: 7403 moveq #3,%d2 <== NOT EXECUTED 43dd8: 7602 moveq #2,%d3 <== NOT EXECUTED 43dda: 2079 0005 c5c0 moveal 5c5c0 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43de0: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 43de4: 49c1 extbl %d1 <== NOT EXECUTED 43de6: c282 andl %d2,%d1 <== NOT EXECUTED 43de8: b681 cmpl %d1,%d3 <== NOT EXECUTED 43dea: 6606 bnes 43df2 <== NOT EXECUTED 43dec: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 43df2: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED if (!iscntrl(c)) 43df6: 4280 clrl %d0 43df8: 102e fffe moveb %fp@(-2),%d0 43dfc: 2079 0005 c5c0 moveal 5c5c0 <__ctype_ptr__>,%a0 43e02: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 43e06: 49c0 extbl %d0 43e08: 0800 0005 btst #5,%d0 43e0c: 6604 bnes 43e12 <== NEVER TAKEN tty->column++; 43e0e: 52aa 0028 addql #1,%a2@(40) break; } } rtems_termios_puts (&c, 1, tty); 43e12: 2f0a movel %a2,%sp@- 43e14: 4878 0001 pea 1 43e18: 486e fffe pea %fp@(-2) 43e1c: 4eb9 0004 3bee jsr 43bee 43e22: 4fef 000c lea %sp@(12),%sp } 43e26: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 43e2c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c2d0 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4c2d0: 4e56 ffd0 linkw %fp,#-48 4c2d4: 48d7 040c moveml %d2-%d3/%a2,%sp@ rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 4c2d8: 4878 0001 pea 1 4c2dc: 240e movel %fp,%d2 4c2de: 0682 ffff ffdc addil #-36,%d2 4c2e4: 2f02 movel %d2,%sp@- 4c2e6: 4878 0007 pea 7 4c2ea: 4878 0003 pea 3 4c2ee: 4879 0005 ba06 pea 5ba06 <__FUNCTION__.5988+0x14> * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4c2f4: 246e 0008 moveal %fp@(8),%a2 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 4c2f8: 4eb9 0004 27ac jsr 427ac 4c2fe: 4fef 0014 lea %sp@(20),%sp 4c302: 4a80 tstl %d0 4c304: 672a beqs 4c330 <== NEVER TAKEN != 0) { if (errno != ENOENT) 4c306: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 4c30c: 7202 moveq #2,%d1 4c30e: 2040 moveal %d0,%a0 4c310: b290 cmpl %a0@,%d1 4c312: 6600 010e bnew 4c422 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4c316: 4878 03ff pea 3ff 4c31a: 4879 0005 ba06 pea 5ba06 <__FUNCTION__.5988+0x14> 4c320: 4eb9 0004 2bb8 jsr 42bb8 4c326: 508f addql #8,%sp 4c328: 4a80 tstl %d0 4c32a: 671a beqs 4c346 <== ALWAYS TAKEN 4c32c: 6000 00f4 braw 4c422 <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 4c330: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4c334: 4a88 tstl %a0 <== NOT EXECUTED 4c336: 670e beqs 4c346 <== NOT EXECUTED 4c338: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c33c: 4a88 tstl %a0 <== NOT EXECUTED 4c33e: 6706 beqs 4c346 <== NOT EXECUTED 4c340: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c342: 4e90 jsr %a0@ <== NOT EXECUTED 4c344: 588f addql #4,%sp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4c346: 4878 000a pea a 4c34a: 240e movel %fp,%d2 4c34c: 4879 0005 ba0b pea 5ba0b <__FUNCTION__.5988+0x19> 4c352: 0682 ffff fff1 addil #-15,%d2 4c358: 2f02 movel %d2,%sp@- 4c35a: 4eb9 0004 d8d8 jsr 4d8d8 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4c360: 3039 0005 d3d0 movew 5d3d0 ,%d0 4c366: 2200 movel %d0,%d1 4c368: 5281 addql #1,%d1 4c36a: 3f00 movew %d0,%sp@- 4c36c: 33c1 0005 d3d0 movew %d1,5d3d0 4c372: 4267 clrw %sp@- 4c374: 4879 0005 ba16 pea 5ba16 <__FUNCTION__.5988+0x24> 4c37a: 486e fffb pea %fp@(-5) 4c37e: 4eb9 0004 ddb0 jsr 4ddb0 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4c384: 4878 0180 pea 180 4c388: 2f02 movel %d2,%sp@- 4c38a: 4eb9 0004 ca0c jsr 4ca0c 4c390: 4fef 0020 lea %sp@(32),%sp 4c394: 4a80 tstl %d0 4c396: 670a beqs 4c3a2 <== ALWAYS TAKEN if (errno != EEXIST){ 4c398: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4c39e: 6000 0082 braw 4c422 <== NOT EXECUTED 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); 4c3a2: 4878 4000 pea 4000 4c3a6: 2f02 movel %d2,%sp@- 4c3a8: 4eb9 0004 3308 jsr 43308 if (filsdes[0] < 0) { 4c3ae: 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); 4c3b0: 2480 movel %d0,%a2@ if (filsdes[0] < 0) { 4c3b2: 6c0e bges 4c3c2 <== NEVER TAKEN err = errno; 4c3b4: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 4c3ba: 2040 moveal %d0,%a0 4c3bc: 2610 movel %a0@,%d3 /* 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); 4c3be: 2f02 movel %d2,%sp@- 4c3c0: 604e bras 4c410 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4c3c2: b0b9 0005 c414 cmpl 5c414 ,%d0 <== NOT EXECUTED 4c3c8: 6504 bcss 4c3ce <== NOT EXECUTED 4c3ca: 91c8 subal %a0,%a0 <== NOT EXECUTED 4c3cc: 600a bras 4c3d8 <== NOT EXECUTED 4c3ce: 2079 0005 dac0 moveal 5dac0 ,%a0 <== NOT EXECUTED 4c3d4: ed88 lsll #6,%d0 <== NOT EXECUTED 4c3d6: d1c0 addal %d0,%a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4c3d8: 70fe moveq #-2,%d0 <== NOT EXECUTED 4c3da: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4c3de: 4878 0001 pea 1 <== NOT EXECUTED 4c3e2: 486e fff1 pea %fp@(-15) <== NOT EXECUTED 4c3e6: 4eb9 0004 3308 jsr 43308 <== NOT EXECUTED if (filsdes[1] < 0) { 4c3ec: 508f addql #8,%sp <== NOT EXECUTED 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); 4c3ee: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED if (filsdes[1] < 0) { 4c3f2: 6d04 blts 4c3f8 <== NOT EXECUTED 4c3f4: 4283 clrl %d3 <== NOT EXECUTED 4c3f6: 6014 bras 4c40c <== NOT EXECUTED err = errno; 4c3f8: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4c3fe: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c400: 2610 movel %a0@,%d3 <== NOT EXECUTED close(filsdes[0]); 4c402: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4c404: 4eb9 0004 a004 jsr 4a004 <== NOT EXECUTED 4c40a: 588f addql #4,%sp <== NOT EXECUTED } unlink(fifopath); 4c40c: 486e fff1 pea %fp@(-15) <== NOT EXECUTED 4c410: 4eb9 0004 ca2c jsr 4ca2c 4c416: 588f addql #4,%sp } rtems_set_errno_and_return_minus_one(err); 4c418: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 4c41e: 2040 moveal %d0,%a0 4c420: 2083 movel %d3,%a0@ } 4c422: 70ff moveq #-1,%d0 4c424: 4cee 040c ffd0 moveml %fp@(-48),%d2-%d3/%a2 4c42a: 4e5e unlk %fp ... =============================================================================== 00048d36 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 48d36: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 48d3a: 2f0b movel %a3,%sp@- <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 48d3c: 47f9 0004 a72c lea 4a72c ,%a3 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 48d42: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48d44: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 48d48: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 48d4c: 4e93 jsr %a3@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 48d4e: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 48d52: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 48d54: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 48d58: 4eb9 0004 5724 jsr 45724 <== NOT EXECUTED free(pipe->Buffer); 48d5e: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 48d60: 4eb9 0004 2828 jsr 42828 <== NOT EXECUTED free(pipe); } 48d66: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); 48d6a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 48d6e: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } 48d72: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 48d76: 4e5e unlk %fp <== NOT EXECUTED { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); 48d78: 4ef9 0004 2828 jmp 42828 <== NOT EXECUTED =============================================================================== 000489fa : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 489fa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (cmd == FIONREAD) { 489fe: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 48a04: 2f0b movel %a3,%sp@- <== NOT EXECUTED 48a06: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED 48a0a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48a0c: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED if (cmd == FIONREAD) { 48a10: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 48a14: 6704 beqs 48a1a <== NOT EXECUTED 48a16: 70ea moveq #-22,%d0 <== NOT EXECUTED 48a18: 6034 bras 48a4e <== NOT EXECUTED if (buffer == NULL) 48a1a: 4a8b tstl %a3 <== NOT EXECUTED 48a1c: 6604 bnes 48a22 <== NOT EXECUTED 48a1e: 70f2 moveq #-14,%d0 <== NOT EXECUTED 48a20: 602c bras 48a4e <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 48a22: 42a7 clrl %sp@- <== NOT EXECUTED 48a24: 42a7 clrl %sp@- <== NOT EXECUTED 48a26: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 48a2a: 4eb9 0004 57c0 jsr 457c0 <== NOT EXECUTED 48a30: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 48a34: 4a80 tstl %d0 <== NOT EXECUTED 48a36: 6704 beqs 48a3c <== NOT EXECUTED 48a38: 70fc moveq #-4,%d0 <== NOT EXECUTED 48a3a: 6012 bras 48a4e <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 48a3c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 48a40: 26aa 000c movel %a2@(12),%a3@ <== NOT EXECUTED PIPE_UNLOCK(pipe); 48a44: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED return 0; 48a4a: 588f addql #4,%sp <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 48a4c: 4280 clrl %d0 <== NOT EXECUTED return 0; } return -EINVAL; } 48a4e: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 48a52: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 48a56: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000489a0 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 489a0: 70e3 moveq #-29,%d0 <== NOT EXECUTED pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 489a2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 489a6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048bce : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 48bce: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 48bd2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 48bd6: 42a7 clrl %sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 48bd8: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 48bdc: 47f9 0004 57c0 lea 457c0 ,%a3 <== NOT EXECUTED 48be2: 42a7 clrl %sp@- <== NOT EXECUTED 48be4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 48be8: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED 48bec: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED 48bf0: 2e2e 0014 movel %fp@(20),%d7 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 48bf4: 4e93 jsr %a3@ <== NOT EXECUTED 48bf6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 48bfa: 4a80 tstl %d0 <== NOT EXECUTED 48bfc: 6706 beqs 48c04 <== NOT EXECUTED 48bfe: 74fc moveq #-4,%d2 <== NOT EXECUTED 48c00: 6000 0128 braw 48d2a <== NOT EXECUTED 48c04: 4282 clrl %d2 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 48c06: 2c3c 0004 58c4 movel #284868,%d6 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 48c0c: 4bf9 0004 a82c lea 4a82c ,%a5 <== NOT EXECUTED 48c12: 6000 00fc braw 48d10 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 48c16: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 48c1a: 6700 00fa beqw 48d16 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 48c1e: 7001 moveq #1,%d0 <== NOT EXECUTED 48c20: 2047 moveal %d7,%a0 <== NOT EXECUTED 48c22: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 48c26: 6706 beqs 48c2e <== NOT EXECUTED 48c28: 78f5 moveq #-11,%d4 <== NOT EXECUTED 48c2a: 6000 00ec braw 48d18 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 48c2e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 48c32: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 48c36: 2246 moveal %d6,%a1 <== NOT EXECUTED 48c38: 4e91 jsr %a1@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 48c3a: 42a7 clrl %sp@- <== NOT EXECUTED 48c3c: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 48c40: 4e95 jsr %a5@ <== NOT EXECUTED 48c42: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 48c46: 4a80 tstl %d0 <== NOT EXECUTED 48c48: 6602 bnes 48c4c <== NOT EXECUTED 48c4a: 4284 clrl %d4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 48c4c: 42a7 clrl %sp@- <== NOT EXECUTED 48c4e: 42a7 clrl %sp@- <== NOT EXECUTED 48c50: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 48c54: 4eb9 0004 57c0 jsr 457c0 <== NOT EXECUTED 48c5a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 48c5e: 4a80 tstl %d0 <== NOT EXECUTED 48c60: 6706 beqs 48c68 <== NOT EXECUTED 48c62: 78fc moveq #-4,%d4 <== NOT EXECUTED 48c64: 6000 00be braw 48d24 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 48c68: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED if (ret != 0) 48c6c: 4a84 tstl %d4 <== NOT EXECUTED 48c6e: 6600 00a8 bnew 48d18 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 48c72: 262a 000c movel %a2@(12),%d3 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 48c76: 78fc moveq #-4,%d4 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 48c78: 4a83 tstl %d3 <== NOT EXECUTED 48c7a: 679a beqs 48c16 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 48c7c: 2005 movel %d5,%d0 <== NOT EXECUTED 48c7e: 9082 subl %d2,%d0 <== NOT EXECUTED 48c80: b083 cmpl %d3,%d0 <== NOT EXECUTED 48c82: 6402 bccs 48c86 <== NOT EXECUTED 48c84: 2600 movel %d0,%d3 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 48c86: 206a 0008 moveal %a2@(8),%a0 <== NOT EXECUTED 48c8a: 200c movel %a4,%d0 <== NOT EXECUTED 48c8c: d082 addl %d2,%d0 <== NOT EXECUTED 48c8e: 47f9 0004 d8d8 lea 4d8d8 ,%a3 <== NOT EXECUTED 48c94: 2212 movel %a2@,%d1 <== NOT EXECUTED 48c96: d288 addl %a0,%d1 <== NOT EXECUTED 48c98: 226a 0004 moveal %a2@(4),%a1 <== NOT EXECUTED 48c9c: 93c8 subal %a0,%a1 <== NOT EXECUTED if (chunk > chunk1) { 48c9e: b3c3 cmpal %d3,%a1 <== NOT EXECUTED 48ca0: 6c28 bges 48cca <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 48ca2: 2f09 movel %a1,%sp@- <== NOT EXECUTED 48ca4: 2f01 movel %d1,%sp@- <== NOT EXECUTED 48ca6: 2d49 fff8 movel %a1,%fp@(-8) <== NOT EXECUTED 48caa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48cac: 4e93 jsr %a3@ <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 48cae: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 48cb2: 2203 movel %d3,%d1 <== NOT EXECUTED 48cb4: 9288 subl %a0,%d1 <== NOT EXECUTED 48cb6: 2002 movel %d2,%d0 <== NOT EXECUTED 48cb8: d088 addl %a0,%d0 <== NOT EXECUTED 48cba: 2f01 movel %d1,%sp@- <== NOT EXECUTED 48cbc: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 48cbe: 4874 0800 pea %a4@(00000000,%d0:l) <== NOT EXECUTED 48cc2: 4e93 jsr %a3@ <== NOT EXECUTED 48cc4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 48cc8: 600c bras 48cd6 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 48cca: 2f03 movel %d3,%sp@- <== NOT EXECUTED 48ccc: 2f01 movel %d1,%sp@- <== NOT EXECUTED 48cce: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48cd0: 4e93 jsr %a3@ <== NOT EXECUTED 48cd2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Start += chunk; 48cd6: 2203 movel %d3,%d1 <== NOT EXECUTED 48cd8: d2aa 0008 addl %a2@(8),%d1 <== NOT EXECUTED pipe->Start %= pipe->Size; pipe->Length -= chunk; 48cdc: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 48ce0: 9083 subl %d3,%d0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 48ce2: 4c6a 1004 0004 remul %a2@(4),%d4,%d1 <== NOT EXECUTED pipe->Length -= chunk; 48ce8: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 48cec: 2544 0008 movel %d4,%a2@(8) <== NOT EXECUTED pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 48cf0: 4a80 tstl %d0 <== NOT EXECUTED 48cf2: 6604 bnes 48cf8 <== NOT EXECUTED pipe->Start = 0; 48cf4: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED if (pipe->waitingWriters > 0) 48cf8: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 48cfc: 6710 beqs 48d0e <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 48cfe: 486e fffc pea %fp@(-4) <== NOT EXECUTED 48d02: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 48d06: 4eb9 0004 a7c8 jsr 4a7c8 <== NOT EXECUTED 48d0c: 508f addql #8,%sp <== NOT EXECUTED read += chunk; 48d0e: d483 addl %d3,%d2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 48d10: ba82 cmpl %d2,%d5 <== NOT EXECUTED 48d12: 6200 ff5e bhiw 48c72 <== NOT EXECUTED 48d16: 4284 clrl %d4 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 48d18: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 48d1c: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED 48d22: 588f addql #4,%sp <== NOT EXECUTED out_nolock: if (read > 0) 48d24: 4a82 tstl %d2 <== NOT EXECUTED 48d26: 6e02 bgts 48d2a <== NOT EXECUTED 48d28: 2404 movel %d4,%d2 <== NOT EXECUTED return read; return ret; } 48d2a: 2002 movel %d2,%d0 <== NOT EXECUTED 48d2c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 48d32: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048d7e : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 48d7e: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 48d82: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 48d86: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 48d8a: 42a7 clrl %sp@- <== NOT EXECUTED int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep; 48d8c: 2453 moveal %a3@,%a2 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 48d8e: 42a7 clrl %sp@- <== NOT EXECUTED 48d90: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 48d94: 4eb9 0004 57c0 jsr 457c0 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 48d9a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 48d9e: 4a80 tstl %d0 <== NOT EXECUTED 48da0: 6634 bnes 48dd6 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 48da2: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 48da6: 7406 moveq #6,%d2 <== NOT EXECUTED 48da8: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 48dac: 0802 0001 btst #1,%d2 <== NOT EXECUTED 48db0: 6704 beqs 48db6 <== NOT EXECUTED pipe->Readers --; 48db2: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 48db6: 44c2 movew %d2,%ccr <== NOT EXECUTED 48db8: 6604 bnes 48dbe <== NOT EXECUTED pipe->Writers --; 48dba: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 48dbe: 42a7 clrl %sp@- <== NOT EXECUTED 48dc0: 42a7 clrl %sp@- <== NOT EXECUTED 48dc2: 2f39 0005 d3c8 movel 5d3c8 ,%sp@- <== NOT EXECUTED 48dc8: 4eb9 0004 57c0 jsr 457c0 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 48dce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 48dd2: 4a80 tstl %d0 <== NOT EXECUTED 48dd4: 6708 beqs 48dde <== NOT EXECUTED rtems_fatal_error_occurred(sc); 48dd6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48dd8: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED PIPE_UNLOCK(pipe); 48dde: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 48de2: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 48de8: 588f addql #4,%sp <== NOT EXECUTED 48dea: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 48dee: 6622 bnes 48e12 <== NOT EXECUTED 48df0: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 48df4: 660c bnes 48e02 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 48df6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48df8: 4eba ff3c jsr %pc@(48d36 ) <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 48dfc: 588f addql #4,%sp <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 48dfe: 4293 clrl %a3@ <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 48e00: 602c bras 48e2e <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 48e02: 7004 moveq #4,%d0 <== NOT EXECUTED 48e04: b082 cmpl %d2,%d0 <== NOT EXECUTED 48e06: 670a beqs 48e12 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 48e08: 486e fffc pea %fp@(-4) <== NOT EXECUTED 48e0c: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 48e10: 6014 bras 48e26 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 48e12: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 48e16: 6616 bnes 48e2e <== NOT EXECUTED 48e18: 7002 moveq #2,%d0 <== NOT EXECUTED 48e1a: b082 cmpl %d2,%d0 <== NOT EXECUTED 48e1c: 6710 beqs 48e2e <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 48e1e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 48e22: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 48e26: 4eb9 0004 a7c8 jsr 4a7c8 <== NOT EXECUTED 48e2c: 508f addql #8,%sp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 48e2e: 2f39 0005 d3c8 movel 5d3c8 ,%sp@- <== NOT EXECUTED 48e34: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 48e3a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 48e40: 4280 clrl %d0 <== NOT EXECUTED 48e42: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048a5a : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 48a5a: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 48a5e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 48a62: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 48a66: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED 48a6a: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 48a6e: 6606 bnes 48a76 <== NOT EXECUTED 48a70: 4282 clrl %d2 <== NOT EXECUTED 48a72: 6000 014e braw 48bc2 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 48a76: 42a7 clrl %sp@- <== NOT EXECUTED 48a78: 42a7 clrl %sp@- <== NOT EXECUTED 48a7a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 48a7e: 4eb9 0004 57c0 jsr 457c0 <== NOT EXECUTED 48a84: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 48a88: 4a80 tstl %d0 <== NOT EXECUTED 48a8a: 6706 beqs 48a92 <== NOT EXECUTED 48a8c: 74fc moveq #-4,%d2 <== NOT EXECUTED 48a8e: 6000 0132 braw 48bc2 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 48a92: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 48a96: 6608 bnes 48aa0 <== NOT EXECUTED 48a98: 76e0 moveq #-32,%d3 <== NOT EXECUTED 48a9a: 4282 clrl %d2 <== NOT EXECUTED 48a9c: 6000 0112 braw 48bb0 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 48aa0: b8aa 0004 cmpl %a2@(4),%d4 <== NOT EXECUTED 48aa4: 6304 blss 48aaa <== NOT EXECUTED 48aa6: 7c01 moveq #1,%d6 <== NOT EXECUTED 48aa8: 6002 bras 48aac <== NOT EXECUTED 48aaa: 2c04 movel %d4,%d6 <== NOT EXECUTED 48aac: 4282 clrl %d2 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 48aae: 4bf9 0004 a82c lea 4a82c ,%a5 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 48ab4: 49f9 0004 57c0 lea 457c0 ,%a4 <== NOT EXECUTED 48aba: 6000 00ec braw 48ba8 <== NOT EXECUTED /* 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)) { 48abe: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 48ac2: 7001 moveq #1,%d0 <== NOT EXECUTED 48ac4: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 48ac8: 6706 beqs 48ad0 <== NOT EXECUTED 48aca: 76f5 moveq #-11,%d3 <== NOT EXECUTED 48acc: 6000 00e2 braw 48bb0 <== NOT EXECUTED goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); 48ad0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 48ad4: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 48ad8: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 48ade: 42a7 clrl %sp@- <== NOT EXECUTED 48ae0: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 48ae4: 4e95 jsr %a5@ <== NOT EXECUTED 48ae6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 48aea: 4a80 tstl %d0 <== NOT EXECUTED 48aec: 6602 bnes 48af0 <== NOT EXECUTED 48aee: 4283 clrl %d3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 48af0: 42a7 clrl %sp@- <== NOT EXECUTED 48af2: 42a7 clrl %sp@- <== NOT EXECUTED 48af4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 48af8: 4e94 jsr %a4@ <== NOT EXECUTED 48afa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 48afe: 4a80 tstl %d0 <== NOT EXECUTED 48b00: 6706 beqs 48b08 <== NOT EXECUTED 48b02: 76fc moveq #-4,%d3 <== NOT EXECUTED 48b04: 6000 00b6 braw 48bbc <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 48b08: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED if (ret != 0) 48b0c: 4a83 tstl %d3 <== NOT EXECUTED 48b0e: 6600 00a0 bnew 48bb0 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 48b12: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 48b16: 6606 bnes 48b1e <== NOT EXECUTED 48b18: 76e0 moveq #-32,%d3 <== NOT EXECUTED 48b1a: 6000 0094 braw 48bb0 <== NOT EXECUTED /* 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) { 48b1e: 2a2a 0004 movel %a2@(4),%d5 <== NOT EXECUTED 48b22: 2005 movel %d5,%d0 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 48b24: 76fc moveq #-4,%d3 <== NOT EXECUTED /* 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) { 48b26: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 48b2a: 9088 subl %a0,%d0 <== NOT EXECUTED 48b2c: bc80 cmpl %d0,%d6 <== NOT EXECUTED 48b2e: 628e bhis 48abe <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 48b30: 2600 movel %d0,%d3 <== NOT EXECUTED 48b32: 2004 movel %d4,%d0 <== NOT EXECUTED 48b34: 9082 subl %d2,%d0 <== NOT EXECUTED 48b36: b083 cmpl %d3,%d0 <== NOT EXECUTED 48b38: 6402 bccs 48b3c <== NOT EXECUTED 48b3a: 2600 movel %d0,%d3 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 48b3c: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED 48b40: 220b movel %a3,%d1 <== NOT EXECUTED 48b42: 2e08 movel %a0,%d7 <== NOT EXECUTED 48b44: 2c3c 0004 d8d8 movel #317656,%d6 <== NOT EXECUTED 48b4a: d282 addl %d2,%d1 <== NOT EXECUTED 48b4c: 4c45 7000 remul %d5,%d0,%d7 <== NOT EXECUTED 48b50: 9a80 subl %d0,%d5 <== NOT EXECUTED 48b52: d092 addl %a2@,%d0 <== NOT EXECUTED if (chunk > chunk1) { 48b54: ba83 cmpl %d3,%d5 <== NOT EXECUTED 48b56: 6c24 bges 48b7c <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 48b58: 2f05 movel %d5,%sp@- <== NOT EXECUTED 48b5a: 2046 moveal %d6,%a0 <== NOT EXECUTED 48b5c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 48b5e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48b60: 4e90 jsr %a0@ <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 48b62: 2203 movel %d3,%d1 <== NOT EXECUTED 48b64: 9285 subl %d5,%d1 <== NOT EXECUTED 48b66: 2005 movel %d5,%d0 <== NOT EXECUTED 48b68: d082 addl %d2,%d0 <== NOT EXECUTED 48b6a: 2046 moveal %d6,%a0 <== NOT EXECUTED 48b6c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 48b6e: 4873 0800 pea %a3@(00000000,%d0:l) <== NOT EXECUTED 48b72: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 48b74: 4e90 jsr %a0@ <== NOT EXECUTED 48b76: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 48b7a: 600e bras 48b8a <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 48b7c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 48b7e: 2046 moveal %d6,%a0 <== NOT EXECUTED 48b80: 2f01 movel %d1,%sp@- <== NOT EXECUTED 48b82: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48b84: 4e90 jsr %a0@ <== NOT EXECUTED 48b86: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Length += chunk; 48b8a: d7aa 000c addl %d3,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 48b8e: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 48b92: 6710 beqs 48ba4 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 48b94: 486e fffc pea %fp@(-4) <== NOT EXECUTED 48b98: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 48b9c: 4eb9 0004 a7c8 jsr 4a7c8 <== NOT EXECUTED 48ba2: 508f addql #8,%sp <== NOT EXECUTED written += chunk; 48ba4: d483 addl %d3,%d2 <== NOT EXECUTED 48ba6: 7c01 moveq #1,%d6 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 48ba8: b882 cmpl %d2,%d4 <== NOT EXECUTED 48baa: 6200 ff72 bhiw 48b1e <== NOT EXECUTED 48bae: 4283 clrl %d3 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 48bb0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 48bb4: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED 48bba: 588f addql #4,%sp <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 48bbc: 4a82 tstl %d2 <== NOT EXECUTED 48bbe: 6e02 bgts 48bc2 <== NOT EXECUTED 48bc0: 2403 movel %d3,%d2 <== NOT EXECUTED return written; return ret; } 48bc2: 2002 movel %d2,%d0 <== NOT EXECUTED 48bc4: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 48bca: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046984 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 46984: 4e56 0000 linkw %fp,#0 46988: 202e 000c movel %fp@(12),%d0 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 4698c: 2200 movel %d0,%d1 4698e: 5381 subql #1,%d1 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); 46990: 52b9 0006 2e50 addql #1,62e50 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 46996: c280 andl %d0,%d1 46998: 6610 bnes 469aa <== NEVER TAKEN 4699a: 123c 0003 moveb #3,%d1 4699e: b280 cmpl %d0,%d1 469a0: 6408 bccs 469aa /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 469a2: 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 ); 469a4: 4ef9 0004 6ac0 jmp 46ac0 } 469aa: 7016 moveq #22,%d0 469ac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042c7c : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 42c7c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 42c80: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42c82: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED const char *p = s; for (p=s ; *p ; p++ ) 42c86: 6008 bras 42c90 <== NOT EXECUTED BSP_output_char(*p); 42c88: 49c0 extbl %d0 <== NOT EXECUTED 42c8a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42c8c: 4e91 jsr %a1@ <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 42c8e: 588f addql #4,%sp <== NOT EXECUTED 42c90: 2279 0005 cb04 moveal 5cb04 ,%a1 <== NOT EXECUTED 42c96: 1012 moveb %a2@,%d0 <== NOT EXECUTED 42c98: 528a addql #1,%a2 <== NOT EXECUTED 42c9a: 66ec bnes 42c88 <== NOT EXECUTED BSP_output_char(*p); BSP_output_char('\n'); 42c9c: 700a moveq #10,%d0 <== NOT EXECUTED } 42c9e: 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'); 42ca2: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 42ca6: 4e5e unlk %fp <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 42ca8: 4ed1 jmp %a1@ <== NOT EXECUTED ... =============================================================================== 0005a2e8 : ssize_t read( int fd, void *buffer, size_t count ) { 5a2e8: 4e56 fff4 linkw %fp,#-12 5a2ec: 202e 000c movel %fp@(12),%d0 5a2f0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5a2f4: 242e 0008 movel %fp@(8),%d2 5a2f8: 222e 0010 movel %fp@(16),%d1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5a2fc: b4b9 0005 c414 cmpl 5c414 ,%d2 5a302: 6414 bccs 5a318 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 5a304: 2479 0005 dac0 moveal 5dac0 ,%a2 5a30a: ed8a lsll #6,%d2 5a30c: d5c2 addal %d2,%a2 rtems_libio_check_is_open( iop ); 5a30e: 242a 0014 movel %a2@(20),%d2 5a312: 0802 0008 btst #8,%d2 5a316: 6610 bnes 5a328 5a318: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 5a31e: 7409 moveq #9,%d2 5a320: 72ff moveq #-1,%d1 5a322: 2040 moveal %d0,%a0 5a324: 2082 movel %d2,%a0@ 5a326: 6060 bras 5a388 rtems_libio_check_buffer( buffer ); 5a328: 4a80 tstl %d0 5a32a: 670a beqs 5a336 <== NEVER TAKEN rtems_libio_check_count( count ); 5a32c: 4a81 tstl %d1 5a32e: 6758 beqs 5a388 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5a330: 0802 0001 btst #1,%d2 5a334: 6610 bnes 5a346 <== ALWAYS TAKEN 5a336: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 5a33c: 72ff moveq #-1,%d1 <== NOT EXECUTED 5a33e: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a340: 7016 moveq #22,%d0 <== NOT EXECUTED 5a342: 2080 movel %d0,%a0@ <== NOT EXECUTED 5a344: 6042 bras 5a388 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 5a346: 206a 003c moveal %a2@(60),%a0 5a34a: 2068 0008 moveal %a0@(8),%a0 5a34e: 4a88 tstl %a0 5a350: 6612 bnes 5a364 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a352: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 5a358: 72ff moveq #-1,%d1 <== NOT EXECUTED 5a35a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a35c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 5a362: 6024 bras 5a388 <== NOT EXECUTED rc = (*iop->handlers->read_h)( iop, buffer, count ); 5a364: 2f01 movel %d1,%sp@- 5a366: 2f00 movel %d0,%sp@- 5a368: 2f0a movel %a2,%sp@- 5a36a: 4e90 jsr %a0@ if ( rc > 0 ) 5a36c: 4fef 000c lea %sp@(12),%sp */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 5a370: 2200 movel %d0,%d1 if ( rc > 0 ) 5a372: 6f14 bles 5a388 iop->offset += rc; 5a374: 2600 movel %d0,%d3 5a376: 5bc2 smi %d2 5a378: 49c2 extbl %d2 5a37a: d7aa 0010 addl %d3,%a2@(16) 5a37e: 202a 000c movel %a2@(12),%d0 5a382: d182 addxl %d2,%d0 5a384: 2540 000c movel %d0,%a2@(12) return rc; } 5a388: 2001 movel %d1,%d0 5a38a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a390: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000452e0 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 452e0: 4e56 ffe0 linkw %fp,#-32 452e4: 48d7 001c moveml %d2-%d4,%sp@ 452e8: 282e 0008 movel %fp@(8),%d4 452ec: 262e 000c movel %fp@(12),%d3 rtems_filesystem_location_info_t loc; int result; if (!buf) 452f0: 6612 bnes 45304 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 452f2: 4eb9 0004 f6e4 jsr 4f6e4 <__errno> <== NOT EXECUTED 452f8: 76ff moveq #-1,%d3 <== NOT EXECUTED 452fa: 720e moveq #14,%d1 <== NOT EXECUTED 452fc: 2040 moveal %d0,%a0 <== NOT EXECUTED 452fe: 2081 movel %d1,%a0@ <== NOT EXECUTED 45300: 6000 00c2 braw 453c4 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 45304: 2f04 movel %d4,%sp@- 45306: 240e movel %fp,%d2 45308: 0682 ffff ffec addil #-20,%d2 4530e: 4eb9 0005 1148 jsr 51148 45314: 4297 clrl %sp@ 45316: 2f02 movel %d2,%sp@- 45318: 42a7 clrl %sp@- 4531a: 2f00 movel %d0,%sp@- 4531c: 2f04 movel %d4,%sp@- 4531e: 4eb9 0004 42a8 jsr 442a8 0, &loc, false ); if ( result != 0 ) 45324: 4fef 0014 lea %sp@(20),%sp 45328: 4a80 tstl %d0 4532a: 6706 beqs 45332 <== ALWAYS TAKEN 4532c: 76ff moveq #-1,%d3 <== NOT EXECUTED 4532e: 6000 0094 braw 453c4 <== NOT EXECUTED return -1; if ( !loc.ops->node_type_h ){ 45332: 226e fff8 moveal %fp@(-8),%a1 45336: 2069 0010 moveal %a1@(16),%a0 4533a: 4a88 tstl %a0 4533c: 6606 bnes 45344 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 4533e: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 45342: 603e bras 45382 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 45344: 2f02 movel %d2,%sp@- 45346: 4e90 jsr %a0@ 45348: 206e fff8 moveal %fp@(-8),%a0 4534c: 588f addql #4,%sp 4534e: 7204 moveq #4,%d1 45350: b280 cmpl %d0,%d1 45352: 6722 beqs 45376 rtems_filesystem_freenode( &loc ); 45354: 4a88 tstl %a0 45356: 670e beqs 45366 <== NEVER TAKEN 45358: 2068 001c moveal %a0@(28),%a0 4535c: 4a88 tstl %a0 4535e: 6706 beqs 45366 <== NEVER TAKEN 45360: 2f02 movel %d2,%sp@- 45362: 4e90 jsr %a0@ 45364: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); 45366: 4eb9 0004 f6e4 jsr 4f6e4 <__errno> 4536c: 76ff moveq #-1,%d3 4536e: 2040 moveal %d0,%a0 45370: 7016 moveq #22,%d0 45372: 2080 movel %d0,%a0@ 45374: 604e bras 453c4 } if ( !loc.ops->readlink_h ){ 45376: 2268 003c moveal %a0@(60),%a1 4537a: 4a89 tstl %a1 4537c: 6620 bnes 4539e <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 4537e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 45382: 4a88 tstl %a0 <== NOT EXECUTED 45384: 6706 beqs 4538c <== NOT EXECUTED 45386: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45388: 4e90 jsr %a0@ <== NOT EXECUTED 4538a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4538c: 4eb9 0004 f6e4 jsr 4f6e4 <__errno> <== NOT EXECUTED 45392: 76ff moveq #-1,%d3 <== NOT EXECUTED 45394: 2040 moveal %d0,%a0 <== NOT EXECUTED 45396: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4539c: 6026 bras 453c4 <== NOT EXECUTED } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 4539e: 2f2e 0010 movel %fp@(16),%sp@- 453a2: 2f03 movel %d3,%sp@- 453a4: 2f02 movel %d2,%sp@- 453a6: 4e91 jsr %a1@ rtems_filesystem_freenode( &loc ); 453a8: 206e fff8 moveal %fp@(-8),%a0 if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 453ac: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 453ae: 4fef 000c lea %sp@(12),%sp 453b2: 4a88 tstl %a0 453b4: 670e beqs 453c4 <== NEVER TAKEN 453b6: 2068 001c moveal %a0@(28),%a0 453ba: 4a88 tstl %a0 453bc: 6706 beqs 453c4 <== NEVER TAKEN 453be: 2f02 movel %d2,%sp@- 453c0: 4e90 jsr %a0@ 453c2: 588f addql #4,%sp return result; } 453c4: 2003 movel %d3,%d0 453c6: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 453cc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044084 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 44084: 4e56 ffe4 linkw %fp,#-28 44088: 202e 0008 movel %fp@(8),%d0 4408c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 44090: 266e 000c moveal %fp@(12),%a3 44094: 262e 0010 movel %fp@(16),%d3 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 44098: b0b9 0005 ddc4 cmpl 5ddc4 ,%d0 4409e: 6414 bccs 440b4 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 440a0: 2479 0005 fc40 moveal 5fc40 ,%a2 440a6: ed88 lsll #6,%d0 440a8: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 440aa: 202a 0014 movel %a2@(20),%d0 440ae: 0800 0008 btst #8,%d0 440b2: 6612 bnes 440c6 <== ALWAYS TAKEN 440b4: 4eb9 0004 dd6c jsr 4dd6c <__errno> <== NOT EXECUTED 440ba: 74ff moveq #-1,%d2 <== NOT EXECUTED 440bc: 7209 moveq #9,%d1 <== NOT EXECUTED 440be: 2040 moveal %d0,%a0 <== NOT EXECUTED 440c0: 2081 movel %d1,%a0@ <== NOT EXECUTED 440c2: 6000 00c2 braw 44186 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 440c6: 0800 0001 btst #1,%d0 440ca: 674a beqs 44116 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 440cc: 4a8b tstl %a3 440ce: 6746 beqs 44116 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 440d0: 4a83 tstl %d3 440d2: 6f42 bles 44116 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 440d4: 0c83 0000 0400 cmpil #1024,%d3 440da: 6e3a bgts 44116 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 440dc: 206a 003c moveal %a2@(60),%a0 440e0: 4aa8 0008 tstl %a0@(8) 440e4: 6614 bnes 440fa <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 440e6: 4eb9 0004 dd6c jsr 4dd6c <__errno> <== NOT EXECUTED 440ec: 74ff moveq #-1,%d2 <== NOT EXECUTED 440ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 440f0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 440f6: 6000 008e braw 44186 <== NOT EXECUTED 440fa: 204b moveal %a3,%a0 440fc: 4281 clrl %d1 440fe: 4280 clrl %d0 44100: 7801 moveq #1,%d4 * 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++ ) { 44102: 5281 addql #1,%d1 ssize_t old; if ( !iov[v].iov_base ) 44104: 4a90 tstl %a0@ 44106: 670e beqs 44116 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 44108: 2428 0004 movel %a0@(4),%d2 4410c: 2240 moveal %d0,%a1 4410e: d3c2 addal %d2,%a1 * 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++ ) { 44110: 5088 addql #8,%a0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 44112: b089 cmpl %a1,%d0 44114: 6f10 bles 44126 rtems_set_errno_and_return_minus_one( EINVAL ); 44116: 4eb9 0004 dd6c jsr 4dd6c <__errno> 4411c: 74ff moveq #-1,%d2 4411e: 2040 moveal %d0,%a0 44120: 7016 moveq #22,%d0 44122: 2080 movel %d0,%a0@ 44124: 6060 bras 44186 if ( iov[v].iov_len ) 44126: 4a82 tstl %d2 44128: 57c2 seq %d2 * 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++ ) { 4412a: 2009 movel %a1,%d0 old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 4412c: c484 andl %d4,%d2 4412e: 1802 moveb %d2,%d4 * 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++ ) { 44130: b681 cmpl %d1,%d3 44132: 6ece bgts 44102 <== ALWAYS TAKEN /* * 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 ) { 44134: 4a02 tstb %d2 <== NOT EXECUTED 44136: 6704 beqs 4413c <== NOT EXECUTED 44138: 4282 clrl %d2 <== NOT EXECUTED 4413a: 604a bras 44186 <== NOT EXECUTED 4413c: 588b addql #4,%a3 <== NOT EXECUTED 4413e: 4284 clrl %d4 <== NOT EXECUTED 44140: 4282 clrl %d2 <== NOT EXECUTED /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 44142: 206a 003c moveal %a2@(60),%a0 <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44146: 5284 addql #1,%d4 <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 44148: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 4414a: 2f2b fffc movel %a3@(-4),%sp@- <== NOT EXECUTED 4414e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44150: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 44154: 4e90 jsr %a0@ <== NOT EXECUTED if ( bytes < 0 ) 44156: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4415a: 4a80 tstl %d0 <== NOT EXECUTED 4415c: 6c04 bges 44162 <== NOT EXECUTED 4415e: 74ff moveq #-1,%d2 <== NOT EXECUTED 44160: 6024 bras 44186 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 44162: 4a80 tstl %d0 <== NOT EXECUTED 44164: 6716 beqs 4417c <== NOT EXECUTED iop->offset += bytes; total += bytes; 44166: d480 addl %d0,%d2 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 44168: 2c00 movel %d0,%d6 <== NOT EXECUTED 4416a: 5bc5 smi %d5 <== NOT EXECUTED 4416c: 49c5 extbl %d5 <== NOT EXECUTED 4416e: ddaa 0010 addl %d6,%a2@(16) <== NOT EXECUTED 44172: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 44176: d385 addxl %d5,%d1 <== NOT EXECUTED 44178: 2541 000c movel %d1,%a2@(12) <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 4417c: b093 cmpl %a3@,%d0 <== NOT EXECUTED 4417e: 6606 bnes 44186 <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44180: 508b addql #8,%a3 <== NOT EXECUTED 44182: b684 cmpl %d4,%d3 <== NOT EXECUTED 44184: 6ebc bgts 44142 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44186: 2002 movel %d2,%d0 44188: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4418e: 4e5e unlk %fp ... =============================================================================== 0005a3f8 : /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 5a3f8: 7003 moveq #3,%d0 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 5a3fa: 4e56 fff0 linkw %fp,#-16 5a3fe: 52b9 0005 dae8 addql #1,5dae8 5a404: 48d7 001c moveml %d2-%d4,%sp@ 5a408: 242e 0008 movel %fp@(8),%d2 5a40c: 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())) { 5a410: b0b9 0005 dd9e cmpl 5dd9e <_System_state_Current>,%d0 5a416: 6614 bnes 5a42c <== NEVER TAKEN if (_Thread_Dispatch_disable_level > 0) 5a418: 2039 0005 dc1c movel 5dc1c <_Thread_Dispatch_disable_level>,%d0 5a41e: 6600 00aa bnew 5a4ca return (void *) 0; if (_ISR_Nest_level > 0) 5a422: 2039 0005 dcb6 movel 5dcb6 <_ISR_Nest_level>,%d0 5a428: 6600 00a0 bnew 5a4ca } /* * Continue with realloc(). */ if ( !ptr ) 5a42c: 4a82 tstl %d2 5a42e: 660c bnes 5a43c return malloc( size ); 5a430: 2f03 movel %d3,%sp@- 5a432: 4eb9 0004 2b08 jsr 42b08 5a438: 2400 movel %d0,%d2 5a43a: 600e bras 5a44a if ( !size ) { 5a43c: 4a83 tstl %d3 5a43e: 660e bnes 5a44e <== ALWAYS TAKEN free( ptr ); 5a440: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5a442: 4282 clrl %d2 <== NOT EXECUTED 5a444: 4eb9 0004 2828 jsr 42828 <== NOT EXECUTED return (void *) 0; 5a44a: 588f addql #4,%sp 5a44c: 607e bras 5a4cc } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 5a44e: 486e fffc pea %fp@(-4) 5a452: 2f02 movel %d2,%sp@- 5a454: 2f39 0005 c420 movel 5c420 ,%sp@- 5a45a: 4eb9 0005 a584 jsr 5a584 <_Protected_heap_Get_block_size> 5a460: 4fef 000c lea %sp@(12),%sp 5a464: 4a00 tstb %d0 5a466: 6610 bnes 5a478 errno = EINVAL; 5a468: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 5a46e: 4282 clrl %d2 5a470: 2040 moveal %d0,%a0 5a472: 7016 moveq #22,%d0 5a474: 2080 movel %d0,%a0@ return (void *) 0; 5a476: 6054 bras 5a4cc #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS) if (rtems_malloc_boundary_helpers) resize += (*rtems_malloc_boundary_helpers->overhead)(); #endif if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) { 5a478: 2f03 movel %d3,%sp@- 5a47a: 2f02 movel %d2,%sp@- 5a47c: 2f39 0005 c420 movel 5c420 ,%sp@- 5a482: 4eb9 0005 a5c0 jsr 5a5c0 <_Protected_heap_Resize_block> 5a488: 4fef 000c lea %sp@(12),%sp 5a48c: 4a00 tstb %d0 5a48e: 663c bnes 5a4cc * 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 ); 5a490: 2f03 movel %d3,%sp@- 5a492: 4eb9 0004 2b08 jsr 42b08 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5a498: 588f addql #4,%sp * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 5a49a: 53b9 0005 dadc subql #1,5dadc * 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 ); 5a4a0: 2800 movel %d0,%d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5a4a2: 6726 beqs 5a4ca return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 5a4a4: 202e fffc movel %fp@(-4),%d0 5a4a8: b083 cmpl %d3,%d0 5a4aa: 6402 bccs 5a4ae <== NEVER TAKEN 5a4ac: 2600 movel %d0,%d3 5a4ae: 2f03 movel %d3,%sp@- 5a4b0: 2f02 movel %d2,%sp@- 5a4b2: 2f04 movel %d4,%sp@- 5a4b4: 4eb9 0004 d8d8 jsr 4d8d8 free( ptr ); 5a4ba: 2f02 movel %d2,%sp@- 5a4bc: 2404 movel %d4,%d2 5a4be: 4eb9 0004 2828 jsr 42828 return new_area; 5a4c4: 4fef 0010 lea %sp@(16),%sp 5a4c8: 6002 bras 5a4cc 5a4ca: 4282 clrl %d2 } 5a4cc: 2002 movel %d2,%d0 5a4ce: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a4d4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046324 : #include int rmdir( const char *pathname ) { 46324: 4e56 ffbc linkw %fp,#-68 46328: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4632c: 262e 0008 movel %fp@(8),%d3 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 46330: 2f03 movel %d3,%sp@- 46332: 4eb9 0004 4b02 jsr 44b02 if ( parentpathlen == 0 ) 46338: 588f addql #4,%sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 4633a: 2c00 movel %d0,%d6 4633c: 200e movel %fp,%d0 4633e: 0680 ffff ffe8 addil #-24,%d0 if ( parentpathlen == 0 ) 46344: 4a86 tstl %d6 46346: 6616 bnes 4635e rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 46348: 2f00 movel %d0,%sp@- 4634a: 486e fffc pea %fp@(-4) 4634e: 4204 clrb %d4 46350: 2f03 movel %d3,%sp@- 46352: 4eb9 0004 65d4 jsr 465d4 46358: 4fef 000c lea %sp@(12),%sp 4635c: 601e bras 4637c else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 4635e: 42a7 clrl %sp@- 46360: 2f00 movel %d0,%sp@- 46362: 4878 0002 pea 2 46366: 2f06 movel %d6,%sp@- 46368: 2f03 movel %d3,%sp@- 4636a: 4eb9 0004 4c18 jsr 44c18 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 46370: 4fef 0014 lea %sp@(20),%sp 46374: 4a80 tstl %d0 46376: 6600 0168 bnew 464e0 4637a: 7801 moveq #1,%d4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4637c: 4878 0014 pea 14 46380: 2a0e movel %fp,%d5 46382: 0685 ffff ffe8 addil #-24,%d5 46388: 240e movel %fp,%d2 4638a: 0682 ffff ffd4 addil #-44,%d2 name = pathname + parentpathlen; 46390: d686 addl %d6,%d3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 46392: 45f9 0005 2fa4 lea 52fa4 ,%a2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 46398: 2f05 movel %d5,%sp@- 4639a: 2f02 movel %d2,%sp@- 4639c: 4eb9 0005 1828 jsr 51828 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 463a2: 2f03 movel %d3,%sp@- 463a4: 4e92 jsr %a2@ 463a6: 2e80 movel %d0,%sp@ 463a8: 2f03 movel %d3,%sp@- 463aa: 4eb9 0004 4ac4 jsr 44ac4 463b0: d680 addl %d0,%d3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 463b2: 2f03 movel %d3,%sp@- 463b4: 4e92 jsr %a2@ 463b6: 4297 clrl %sp@ 463b8: 2f02 movel %d2,%sp@- 463ba: 42a7 clrl %sp@- 463bc: 2f00 movel %d0,%sp@- 463be: 2f03 movel %d3,%sp@- 463c0: 4eb9 0004 4b48 jsr 44b48 0, &loc, false ); if ( result != 0 ) { 463c6: 4fef 0028 lea %sp@(40),%sp 463ca: 4a80 tstl %d0 463cc: 6722 beqs 463f0 if ( free_parentloc ) 463ce: 4a04 tstb %d4 463d0: 6700 010e beqw 464e0 rtems_filesystem_freenode( &parentloc ); 463d4: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 463d8: 4a88 tstl %a0 <== NOT EXECUTED 463da: 6700 0104 beqw 464e0 <== NOT EXECUTED 463de: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 463e2: 4a88 tstl %a0 <== NOT EXECUTED 463e4: 6700 00fa beqw 464e0 <== NOT EXECUTED 463e8: 2f05 movel %d5,%sp@- <== NOT EXECUTED 463ea: 76ff moveq #-1,%d3 <== NOT EXECUTED 463ec: 6000 00ec braw 464da <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 463f0: 226e ffe0 moveal %fp@(-32),%a1 463f4: 2069 0010 moveal %a1@(16),%a0 463f8: 4a88 tstl %a0 463fa: 6606 bnes 46402 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 463fc: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 46400: 6068 bras 4646a <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 46402: 2f02 movel %d2,%sp@- 46404: 4e90 jsr %a0@ 46406: 588f addql #4,%sp 46408: 7201 moveq #1,%d1 4640a: b280 cmpl %d0,%d1 4640c: 6744 beqs 46452 rtems_filesystem_freenode( &loc ); 4640e: 206e ffe0 moveal %fp@(-32),%a0 46412: 4a88 tstl %a0 46414: 670e beqs 46424 <== NEVER TAKEN 46416: 2068 001c moveal %a0@(28),%a0 4641a: 4a88 tstl %a0 4641c: 6706 beqs 46424 <== NEVER TAKEN 4641e: 2f02 movel %d2,%sp@- 46420: 4e90 jsr %a0@ 46422: 588f addql #4,%sp if ( free_parentloc ) 46424: 4a04 tstb %d4 46426: 6718 beqs 46440 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 46428: 206e fff4 moveal %fp@(-12),%a0 4642c: 4a88 tstl %a0 4642e: 6710 beqs 46440 <== NEVER TAKEN 46430: 2068 001c moveal %a0@(28),%a0 46434: 4a88 tstl %a0 46436: 6708 beqs 46440 <== NEVER TAKEN 46438: 486e ffe8 pea %fp@(-24) 4643c: 4e90 jsr %a0@ 4643e: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 46440: 4eb9 0004 fff8 jsr 4fff8 <__errno> 46446: 76ff moveq #-1,%d3 46448: 2040 moveal %d0,%a0 4644a: 7014 moveq #20,%d0 4644c: 2080 movel %d0,%a0@ 4644e: 6000 0092 braw 464e2 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 46452: 206e ffdc moveal %fp@(-36),%a0 46456: 2068 0034 moveal %a0@(52),%a0 4645a: 4a88 tstl %a0 4645c: 6644 bnes 464a2 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 4645e: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 46462: 4a88 tstl %a0 <== NOT EXECUTED 46464: 670e beqs 46474 <== NOT EXECUTED 46466: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4646a: 4a88 tstl %a0 <== NOT EXECUTED 4646c: 6706 beqs 46474 <== NOT EXECUTED 4646e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 46470: 4e90 jsr %a0@ <== NOT EXECUTED 46472: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 46474: 4a04 tstb %d4 <== NOT EXECUTED 46476: 6718 beqs 46490 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 46478: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 4647c: 4a88 tstl %a0 <== NOT EXECUTED 4647e: 6710 beqs 46490 <== NOT EXECUTED 46480: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 46484: 4a88 tstl %a0 <== NOT EXECUTED 46486: 6708 beqs 46490 <== NOT EXECUTED 46488: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 4648c: 4e90 jsr %a0@ <== NOT EXECUTED 4648e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 46490: 4eb9 0004 fff8 jsr 4fff8 <__errno> <== NOT EXECUTED 46496: 76ff moveq #-1,%d3 <== NOT EXECUTED 46498: 2040 moveal %d0,%a0 <== NOT EXECUTED 4649a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 464a0: 6040 bras 464e2 <== NOT EXECUTED } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 464a2: 2f02 movel %d2,%sp@- 464a4: 2f05 movel %d5,%sp@- 464a6: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 464a8: 206e ffe0 moveal %fp@(-32),%a0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 464ac: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 464ae: 508f addql #8,%sp 464b0: 4a88 tstl %a0 464b2: 670e beqs 464c2 <== NEVER TAKEN 464b4: 2068 001c moveal %a0@(28),%a0 464b8: 4a88 tstl %a0 464ba: 6706 beqs 464c2 <== NEVER TAKEN 464bc: 2f02 movel %d2,%sp@- 464be: 4e90 jsr %a0@ 464c0: 588f addql #4,%sp if ( free_parentloc ) 464c2: 4a04 tstb %d4 464c4: 671c beqs 464e2 rtems_filesystem_freenode( &parentloc ); 464c6: 206e fff4 moveal %fp@(-12),%a0 464ca: 4a88 tstl %a0 464cc: 6714 beqs 464e2 <== NEVER TAKEN 464ce: 2068 001c moveal %a0@(28),%a0 464d2: 4a88 tstl %a0 464d4: 670c beqs 464e2 <== NEVER TAKEN 464d6: 486e ffe8 pea %fp@(-24) 464da: 4e90 jsr %a0@ 464dc: 588f addql #4,%sp 464de: 6002 bras 464e2 464e0: 76ff moveq #-1,%d3 return result; } 464e2: 2003 movel %d3,%d0 464e4: 4cee 047c ffbc moveml %fp@(-68),%d2-%d6/%a2 464ea: 4e5e unlk %fp ... =============================================================================== 0004c9ac : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 4c9ac: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 4c9b0: 203c 0005 c588 movel #378248,%d0 <== NOT EXECUTED 4c9b6: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00049f7c : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 49f7c: 4e56 0000 linkw %fp,#0 49f80: 2f02 movel %d2,%sp@- 49f82: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 49f86: 2f02 movel %d2,%sp@- 49f88: 2f2e 0008 movel %fp@(8),%sp@- 49f8c: 4eb9 0004 9fb4 jsr 49fb4 if (nap) 49f92: 508f addql #8,%sp 49f94: 4a80 tstl %d0 49f96: 670c beqs 49fa4 <== NEVER TAKEN return nap->name; return rtems_assoc_name_bad(local_value); } 49f98: 2040 moveal %d0,%a0 49f9a: 242e fffc movel %fp@(-4),%d2 49f9e: 4e5e unlk %fp 49fa0: 2010 movel %a0@,%d0 49fa2: 4e75 rts nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 49fa4: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } 49fa8: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49fac: 4e5e unlk %fp <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 49fae: 4ef9 0004 c9ac jmp 4c9ac <== NOT EXECUTED =============================================================================== 00049fb4 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 49fb4: 4e56 0000 linkw %fp,#0 49fb8: 2f0a movel %a2,%sp@- 49fba: 246e 0008 moveal %fp@(8),%a2 49fbe: 2f02 movel %d2,%sp@- 49fc0: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 49fc4: 2012 movel %a2@,%d0 49fc6: 6718 beqs 49fe0 <== NEVER TAKEN 49fc8: 4879 0005 b7a4 pea 5b7a4 49fce: 2f00 movel %d0,%sp@- 49fd0: 4eb9 0004 dfc0 jsr 4dfc0 49fd6: 508f addql #8,%sp 49fd8: 4a80 tstl %d0 49fda: 6604 bnes 49fe0 <== ALWAYS TAKEN default_ap = ap++; 49fdc: 200a movel %a2,%d0 <== NOT EXECUTED 49fde: 600a bras 49fea <== NOT EXECUTED 49fe0: 4280 clrl %d0 49fe2: 600a bras 49fee for ( ; ap->name; ap++) if (ap->local_value == local_value) 49fe4: b4aa 0004 cmpl %a2@(4),%d2 49fe8: 670a beqs 49ff4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 49fea: 45ea 000c lea %a2@(12),%a2 49fee: 4a92 tstl %a2@ 49ff0: 66f2 bnes 49fe4 49ff2: 2440 moveal %d0,%a2 if (ap->local_value == local_value) return ap; return default_ap; } 49ff4: 200a movel %a2,%d0 49ff6: 242e fff8 movel %fp@(-8),%d2 49ffa: 246e fffc moveal %fp@(-4),%a2 49ffe: 4e5e unlk %fp ... =============================================================================== 0004c9bc : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4c9bc: 4e56 0000 linkw %fp,#0 4c9c0: 2f0a movel %a2,%sp@- 4c9c2: 246e 0008 moveal %fp@(8),%a2 4c9c6: 2f02 movel %d2,%sp@- 4c9c8: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4c9cc: 2012 movel %a2@,%d0 4c9ce: 6718 beqs 4c9e8 <== NEVER TAKEN 4c9d0: 4879 0005 b7a4 pea 5b7a4 4c9d6: 2f00 movel %d0,%sp@- 4c9d8: 4eb9 0004 dfc0 jsr 4dfc0 4c9de: 508f addql #8,%sp 4c9e0: 4a80 tstl %d0 4c9e2: 6604 bnes 4c9e8 <== ALWAYS TAKEN default_ap = ap++; 4c9e4: 200a movel %a2,%d0 <== NOT EXECUTED 4c9e6: 600a bras 4c9f2 <== NOT EXECUTED 4c9e8: 4280 clrl %d0 4c9ea: 600a bras 4c9f6 for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 4c9ec: b4aa 0008 cmpl %a2@(8),%d2 4c9f0: 670a beqs 4c9fc const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4c9f2: 45ea 000c lea %a2@(12),%a2 4c9f6: 4a92 tstl %a2@ 4c9f8: 66f2 bnes 4c9ec 4c9fa: 2440 moveal %d0,%a2 if (ap->remote_value == remote_value) return ap; return default_ap; } 4c9fc: 200a movel %a2,%d0 4c9fe: 242e fff8 movel %fp@(-8),%d2 4ca02: 246e fffc moveal %fp@(-4),%a2 4ca06: 4e5e unlk %fp ... =============================================================================== 0004d064 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4d064: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4d068: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4d06c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4d070: 4eb9 0004 9fb4 jsr 49fb4 <== NOT EXECUTED if (nap) 4d076: 508f addql #8,%sp <== NOT EXECUTED 4d078: 4a80 tstl %d0 <== NOT EXECUTED 4d07a: 6706 beqs 4d082 <== NOT EXECUTED return nap->remote_value; 4d07c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d07e: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED return 0; } 4d082: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00042140 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 42140: 4e56 ffe8 linkw %fp,#-24 42144: 202e 0008 movel %fp@(8),%d0 42148: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4214c: 246e 000c moveal %fp@(12),%a2 42150: 242e 0010 movel %fp@(16),%d2 const char *p; if ( !name ) 42154: 4a80 tstl %d0 42156: 6756 beqs 421ae return NULL; if ( !value ) 42158: 4a8a tstl %a2 4215a: 6754 beqs 421b0 return NULL; if ( !length ) 4215c: 4a82 tstl %d2 4215e: 674e beqs 421ae return NULL; value[0] = '\0'; 42160: 4212 clrb %a2@ p = rtems_bsp_cmdline_get_param_raw( name ); 42162: 2f00 movel %d0,%sp@- 42164: 4eb9 0004 21bc jsr 421bc if ( !p ) 4216a: 588f addql #4,%sp 4216c: 4a80 tstl %d0 4216e: 673e beqs 421ae int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== ALWAYS TAKEN quotes++; 4217e: 5283 addql #1,%d3 <== NOT EXECUTED 42180: 600c bras 4218e <== NOT EXECUTED } else if ( ((quotes % 2) == 0) && *p == ' ' ) 42182: 0803 0000 btst #0,%d3 42186: 6606 bnes 4218e <== NEVER TAKEN 42188: 7c20 moveq #32,%d6 4218a: bc85 cmpl %d5,%d6 4218c: 6722 beqs 421b0 <== NEVER TAKEN break; value[i++] = *p++; 4218e: 1584 1800 moveb %d4,%a2@(00000000,%d1:l) value[i] = '\0'; 42192: 4204 clrb %d4 for (i=0 ; *p && i 421a8: b481 cmpl %d1,%d2 421aa: 62cc bhis 42178 <== ALWAYS TAKEN 421ac: 6002 bras 421b0 <== NOT EXECUTED 421ae: 95ca subal %a2,%a2 return NULL; copy_string( p, value, length ); return value; } 421b0: 200a movel %a2,%d0 421b2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 421b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000421e4 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 421e4: 4e56 fff4 linkw %fp,#-12 421e8: 48d7 001c moveml %d2-%d4,%sp@ const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 421ec: 2f2e 0010 movel %fp@(16),%sp@- const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 421f0: 242e 000c movel %fp@(12),%d2 421f4: 282e 0008 movel %fp@(8),%d4 const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 421f8: 2f02 movel %d2,%sp@- 421fa: 2f04 movel %d4,%sp@- 421fc: 4eb9 0004 2140 jsr 42140 if ( !p ) 42202: 4fef 000c lea %sp@(12),%sp { const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 42206: 2600 movel %d0,%d3 if ( !p ) 42208: 6746 beqs 42250 <== NEVER TAKEN return NULL; rhs = &p[strlen(name)]; 4220a: 2f04 movel %d4,%sp@- 4220c: 4eb9 0004 e8cc jsr 4e8cc 42212: 588f addql #4,%sp 42214: 2043 moveal %d3,%a0 42216: d1c0 addal %d0,%a0 if ( *rhs != '=' ) 42218: 723d moveq #61,%d1 4221a: 1010 moveb %a0@,%d0 4221c: 49c0 extbl %d0 4221e: b280 cmpl %d0,%d1 42220: 662e bnes 42250 <== NEVER TAKEN return NULL; rhs++; 42222: 5288 addql #1,%a0 if ( *rhs == '\"' ) 42224: 123c 0022 moveb #34,%d1 42228: 1010 moveb %a0@,%d0 4222a: 49c0 extbl %d0 4222c: b280 cmpl %d0,%d1 4222e: 6602 bnes 42232 <== ALWAYS TAKEN rhs++; 42230: 5288 addql #1,%a0 <== NOT EXECUTED 42232: 2242 moveal %d2,%a1 42234: 6002 bras 42238 for ( d=value ; *rhs ; ) *d++ = *rhs++; 42236: 12c0 moveb %d0,%a1@+ <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 42238: 1010 moveb %a0@,%d0 *d++ = *rhs++; 4223a: 5288 addql #1,%a0 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 4223c: 66f8 bnes 42236 <== NEVER TAKEN *d++ = *rhs++; if ( *(d-1) == '\"' ) 4223e: 2049 moveal %a1,%a0 42240: 7222 moveq #34,%d1 42242: 1020 moveb %a0@-,%d0 42244: 49c0 extbl %d0 42246: b280 cmpl %d0,%d1 42248: 6602 bnes 4224c <== ALWAYS TAKEN 4224a: 2248 moveal %a0,%a1 <== NOT EXECUTED d--; *d = '\0'; 4224c: 4211 clrb %a1@ return value; 4224e: 6002 bras 42252 42250: 4282 clrl %d2 <== NOT EXECUTED } 42252: 2002 movel %d2,%d0 42254: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4225a: 4e5e unlk %fp ... =============================================================================== 0004d034 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4d034: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4d038: 2f02 movel %d2,%sp@- <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4d03a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4d03e: 4879 0005 ba88 pea 5ba88 <== NOT EXECUTED 4d044: 4eb9 0004 d064 jsr 4d064 <== NOT EXECUTED 4d04a: 508f addql #8,%sp <== NOT EXECUTED 4d04c: 2400 movel %d0,%d2 <== NOT EXECUTED 4d04e: 670a beqs 4d05a <== NOT EXECUTED { errno = rc; 4d050: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4d056: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d058: 2082 movel %d2,%a0@ <== NOT EXECUTED return -1; } return -1; } 4d05a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4d05e: 70ff moveq #-1,%d0 <== NOT EXECUTED 4d060: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042640 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 42640: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 42644: 486e 0010 pea %fp@(16) <== NOT EXECUTED 42648: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4264c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42650: 4eba fe4a jsr %pc@(4249c ) <== NOT EXECUTED va_end(arglist); return chars_written; } 42654: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000427ac : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 427ac: 4e56 fffc linkw %fp,#-4 427b0: 2f0a movel %a2,%sp@- 427b2: 246e 0008 moveal %fp@(8),%a2 427b6: 2f02 movel %d2,%sp@- 427b8: 242e 0014 movel %fp@(20),%d2 int i = 0; 427bc: 42ae fffc clrl %fp@(-4) /* * Verify Input parameters. */ if ( !pathname ) 427c0: 4a8a tstl %a2 427c2: 6610 bnes 427d4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 427c4: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 427ca: 720e moveq #14,%d1 <== NOT EXECUTED 427cc: 2040 moveal %d0,%a0 <== NOT EXECUTED 427ce: 70ff moveq #-1,%d0 <== NOT EXECUTED 427d0: 2081 movel %d1,%a0@ <== NOT EXECUTED 427d2: 6046 bras 4281a <== NOT EXECUTED if ( !pathloc ) 427d4: 4a82 tstl %d2 427d6: 6610 bnes 427e8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 427d8: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 427de: 7405 moveq #5,%d2 <== NOT EXECUTED 427e0: 2040 moveal %d0,%a0 <== NOT EXECUTED 427e2: 70ff moveq #-1,%d0 <== NOT EXECUTED 427e4: 2082 movel %d2,%a0@ <== NOT EXECUTED 427e6: 6032 bras 4281a <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 427e8: 2f02 movel %d2,%sp@- 427ea: 486e fffc pea %fp@(-4) 427ee: 2f0a movel %a2,%sp@- 427f0: 4eb9 0004 3540 jsr 43540 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427f6: 2f2e 0018 movel %fp@(24),%sp@- 427fa: 2f02 movel %d2,%sp@- 427fc: 2f2e 0010 movel %fp@(16),%sp@- 42800: 202e fffc movel %fp@(-4),%d0 42804: 222e 000c movel %fp@(12),%d1 42808: 9280 subl %d0,%d1 4280a: 2f01 movel %d1,%sp@- 4280c: 4872 0800 pea %a2@(00000000,%d0:l) 42810: 4eb9 0004 26dc jsr 426dc 42816: 4fef 0020 lea %sp@(32),%sp pathnamelen - i, flags, pathloc, follow_link ); } 4281a: 242e fff4 movel %fp@(-12),%d2 4281e: 246e fff8 moveal %fp@(-8),%a2 42822: 4e5e unlk %fp ... =============================================================================== 000426dc : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 426dc: 4e56 fff0 linkw %fp,#-16 426e0: 202e 0008 movel %fp@(8),%d0 426e4: 48d7 041c moveml %d2-%d4/%a2,%sp@ 426e8: 222e 000c movel %fp@(12),%d1 426ec: 242e 0010 movel %fp@(16),%d2 426f0: 246e 0014 moveal %fp@(20),%a2 426f4: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 426f8: 4a80 tstl %d0 426fa: 6612 bnes 4270e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 426fc: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 42702: 76ff moveq #-1,%d3 <== NOT EXECUTED 42704: 720e moveq #14,%d1 <== NOT EXECUTED 42706: 2040 moveal %d0,%a0 <== NOT EXECUTED 42708: 2081 movel %d1,%a0@ <== NOT EXECUTED 4270a: 6000 0094 braw 427a0 <== NOT EXECUTED if ( !pathloc ) 4270e: 4a8a tstl %a2 42710: 6610 bnes 42722 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 42712: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 42718: 76ff moveq #-1,%d3 <== NOT EXECUTED 4271a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4271c: 7005 moveq #5,%d0 <== NOT EXECUTED 4271e: 2080 movel %d0,%a0@ <== NOT EXECUTED 42720: 607e bras 427a0 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 42722: 206a 000c moveal %a2@(12),%a0 42726: 2050 moveal %a0@,%a0 42728: 4a88 tstl %a0 4272a: 6750 beqs 4277c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 4272c: 2f0a movel %a2,%sp@- 4272e: 2f02 movel %d2,%sp@- 42730: 2f01 movel %d1,%sp@- 42732: 2f00 movel %d0,%sp@- 42734: 4e90 jsr %a0@ /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 42736: 4fef 0010 lea %sp@(16),%sp rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 4273a: 2600 movel %d0,%d3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 4273c: 6662 bnes 427a0 4273e: 4a84 tstl %d4 42740: 675e beqs 427a0 if ( !pathloc->ops->node_type_h ){ 42742: 226a 000c moveal %a2@(12),%a1 42746: 2069 0010 moveal %a1@(16),%a0 4274a: 4a88 tstl %a0 4274c: 6606 bnes 42754 <== ALWAYS TAKEN rtems_filesystem_freenode( pathloc ); 4274e: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 42752: 601e bras 42772 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 42754: 2f0a movel %a2,%sp@- 42756: 4e90 jsr %a0@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 42758: 588f addql #4,%sp 4275a: 7201 moveq #1,%d1 4275c: 5780 subql #3,%d0 4275e: b280 cmpl %d0,%d1 42760: 653e bcss 427a0 ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 42762: 206a 000c moveal %a2@(12),%a0 42766: 2268 0034 moveal %a0@(52),%a1 4276a: 4a89 tstl %a1 4276c: 6620 bnes 4278e <== ALWAYS TAKEN rtems_filesystem_freenode( pathloc ); 4276e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 42772: 4a88 tstl %a0 <== NOT EXECUTED 42774: 6706 beqs 4277c <== NOT EXECUTED 42776: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42778: 4e90 jsr %a0@ <== NOT EXECUTED 4277a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4277c: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 42782: 76ff moveq #-1,%d3 <== NOT EXECUTED 42784: 2040 moveal %d0,%a0 <== NOT EXECUTED 42786: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4278c: 6012 bras 427a0 <== NOT EXECUTED * 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 ); 4278e: 2d42 000c movel %d2,%fp@(12) 42792: 2d4a 0008 movel %a2,%fp@(8) } } return result; } 42796: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4279c: 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 ); 4279e: 4ed1 jmp %a1@ } } return result; } 427a0: 2003 movel %d3,%d0 427a2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 427a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a536 : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 4a536: 4e56 fff8 linkw %fp,#-8 4a53a: 202e 0008 movel %fp@(8),%d0 find_arg fa = { .type = type, .mount_h = NULL }; 4a53e: 42ae fffc clrl %fp@(-4) 4a542: 2d40 fff8 movel %d0,%fp@(-8) if ( type != NULL ) { 4a546: 6710 beqs 4a558 <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 4a548: 486e fff8 pea %fp@(-8) 4a54c: 487a fe8a pea %pc@(4a3d8 ) 4a550: 4eb9 0004 a4b4 jsr 4a4b4 4a556: 508f addql #8,%sp } return fa.mount_h; } 4a558: 202e fffc movel %fp@(-4),%d0 4a55c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042344 : /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 42344: 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 ) { 42346: 4e56 ffe0 linkw %fp,#-32 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 4234a: 2079 0005 c530 moveal 5c530 ,%a0 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 42350: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 42354: 2140 002c movel %d0,%a0@(44) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 42358: 4ab9 0005 aa9e tstl 5aa9e 4235e: 6608 bnes 42368 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); 42360: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 42366: 602c bras 42394 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 42368: 2079 0005 c41c moveal 5c41c ,%a0 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 4236e: 42a7 clrl %sp@- 42370: 2f28 0004 movel %a0@(4),%sp@- 42374: 2f10 movel %a0@,%sp@- 42376: 2f28 000c movel %a0@(12),%sp@- 4237a: 2f28 0008 movel %a0@(8),%sp@- 4237e: 4eb9 0004 2d22 jsr 42d22 if ( status == -1 ) 42384: 4fef 0014 lea %sp@(20),%sp 42388: 72ff moveq #-1,%d1 4238a: b280 cmpl %d0,%d1 4238c: 660c bnes 4239a <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); 4238e: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 42394: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 4239a: 2079 0005 c530 moveal 5c530 ,%a0 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 423a0: 240e movel %fp,%d2 423a2: 0682 ffff ffec addil #-20,%d2 423a8: 47f9 0004 27ac lea 427ac ,%a3 rtems_filesystem_root = loc; 423ae: 45f9 0004 d8d8 lea 4d8d8 ,%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; 423b4: 4240 clrw %d0 423b6: 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); 423ba: 42a7 clrl %sp@- 423bc: 2f02 movel %d2,%sp@- 423be: 42a7 clrl %sp@- 423c0: 4878 0001 pea 1 423c4: 4879 0005 ae50 pea 5ae50 423ca: 4e93 jsr %a3@ rtems_filesystem_root = loc; 423cc: 4878 0014 pea 14 423d0: 2079 0005 c530 moveal 5c530 ,%a0 423d6: 41e8 0018 lea %a0@(24),%a0 423da: 2f02 movel %d2,%sp@- 423dc: 2f08 movel %a0,%sp@- 423de: 4e92 jsr %a2@ /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 423e0: 4fef 001c lea %sp@(28),%sp 423e4: 4297 clrl %sp@ 423e6: 2f02 movel %d2,%sp@- 423e8: 42a7 clrl %sp@- 423ea: 4878 0001 pea 1 423ee: 4879 0005 ae50 pea 5ae50 423f4: 4e93 jsr %a3@ rtems_filesystem_current = loc; 423f6: 4878 0014 pea 14 423fa: 2039 0005 c530 movel 5c530 ,%d0 42400: 5880 addql #4,%d0 42402: 2f02 movel %d2,%sp@- 42404: 2f00 movel %d0,%sp@- 42406: 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); 42408: 4fef 0020 lea %sp@(32),%sp 4240c: 4878 01ff pea 1ff 42410: 4879 0005 ae52 pea 5ae52 42416: 4eb9 0004 2bb8 jsr 42bb8 if ( status != 0 ) 4241c: 508f addql #8,%sp 4241e: 4a80 tstl %d0 42420: 670a beqs 4242c <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0003 ); 42422: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 42428: 6000 ff6a braw 42394 <== 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. */ } 4242c: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 42432: 4e5e unlk %fp ... =============================================================================== 0004a4b4 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 4a4b4: 4e56 fff0 linkw %fp,#-16 4a4b8: 4200 clrb %d0 4a4ba: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4a4be: 266e 0008 moveal %fp@(8),%a3 4a4c2: 45f9 0005 aa7e lea 5aa7e ,%a2 4a4c8: 262e 000c movel %fp@(12),%d3 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 4a4cc: 600a bras 4a4d8 stop = (*routine)( table_entry, routine_arg ); 4a4ce: 2f03 movel %d3,%sp@- 4a4d0: 2f0a movel %a2,%sp@- ++table_entry; 4a4d2: 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 ); 4a4d4: 4e93 jsr %a3@ ++table_entry; 4a4d6: 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 ) { 4a4d8: 4a92 tstl %a2@ 4a4da: 6706 beqs 4a4e2 4a4dc: 4a00 tstb %d0 4a4de: 67ee beqs 4a4ce <== ALWAYS TAKEN 4a4e0: 604a bras 4a52c <== NOT EXECUTED 4a4e2: 1400 moveb %d0,%d2 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 4a4e4: 6646 bnes 4a52c 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 ); 4a4e6: 42a7 clrl %sp@- 4a4e8: 42a7 clrl %sp@- 4a4ea: 2f39 0005 dac8 movel 5dac8 ,%sp@- 4a4f0: 4eb9 0004 57c0 jsr 457c0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 4a4f6: 2479 0005 c538 moveal 5c538 ,%a2 rtems_libio_lock(); for ( 4a4fc: 4fef 000c lea %sp@(12),%sp 4a500: 600e bras 4a510 !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 ); 4a502: 2f03 movel %d3,%sp@- 4a504: 486a 0008 pea %a2@(8) 4a508: 4e93 jsr %a3@ */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 4a50a: 2452 moveal %a2@,%a2 4a50c: 508f addql #8,%sp 4a50e: 1400 moveb %d0,%d2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4a510: b5fc 0005 c53c cmpal #378172,%a2 4a516: 6704 beqs 4a51c ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 4a518: 4a02 tstb %d2 4a51a: 67e6 beqs 4a502 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4a51c: 2f39 0005 dac8 movel 5dac8 ,%sp@- 4a522: 4eb9 0004 58c4 jsr 458c4 4a528: 588f addql #4,%sp 4a52a: 1002 moveb %d2,%d0 } rtems_libio_unlock(); } return stop; } 4a52c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4a532: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042cc4 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 42cc4: 4e56 fff0 linkw %fp,#-16 42cc8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 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 ); 42ccc: 42a7 clrl %sp@- 42cce: 266e 0008 moveal %fp@(8),%a3 42cd2: 42a7 clrl %sp@- 42cd4: 2f39 0005 dac8 movel 5dac8 ,%sp@- 42cda: 262e 000c movel %fp@(12),%d3 42cde: 4eb9 0004 57c0 jsr 457c0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 42ce4: 2479 0005 c510 moveal 5c510 ,%a2 rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 42cea: 4fef 000c lea %sp@(12),%sp 42cee: 4202 clrb %d2 42cf0: 600c bras 42cfe 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 ); 42cf2: 2f03 movel %d3,%sp@- 42cf4: 2f0a movel %a2,%sp@- 42cf6: 4e93 jsr %a3@ */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 42cf8: 2452 moveal %a2@,%a2 42cfa: 508f addql #8,%sp 42cfc: 1400 moveb %d0,%d2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 42cfe: b5fc 0005 c514 cmpal #378132,%a2 42d04: 6704 beqs 42d0a { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 42d06: 4a02 tstb %d2 42d08: 67e8 beqs 42cf2 <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 42d0a: 2f39 0005 dac8 movel 5dac8 ,%sp@- 42d10: 4eb9 0004 58c4 jsr 458c4 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 42d16: 1002 moveb %d2,%d0 42d18: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 42d1e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042658 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 42658: 4e56 fff0 linkw %fp,#-16 4265c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 42660: 266e 0008 moveal %fp@(8),%a3 42664: 4282 clrl %d2 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 42666: 45f9 0004 35a8 lea 435a8 ,%a2 int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 4266c: 262e 000c movel %fp@(12),%d3 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 42670: 6002 bras 42674 { pathname++; pathnamelen--; stripped++; 42672: 5282 addql #1,%d2 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 42674: 1033 2800 moveb %a3@(00000000,%d2:l),%d0 42678: 6710 beqs 4268a <== NEVER TAKEN 4267a: b483 cmpl %d3,%d2 4267c: 670c beqs 4268a <== NEVER TAKEN 4267e: 49c0 extbl %d0 42680: 2f00 movel %d0,%sp@- 42682: 4e92 jsr %a2@ 42684: 588f addql #4,%sp 42686: 4a80 tstl %d0 42688: 66e8 bnes 42672 pathname++; pathnamelen--; stripped++; } return stripped; } 4268a: 2002 movel %d2,%d0 4268c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 42692: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a560 : int rtems_filesystem_register( const char *type, rtems_filesystem_fsmount_me_t mount_h ) { 4a560: 4e56 fff0 linkw %fp,#-16 4a564: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4a568: 242e 0008 movel %fp@(8),%d2 size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; 4a56c: 2f02 movel %d2,%sp@- 4a56e: 4eb9 0004 e4e4 jsr 4e4e4 filesystem_node *fsn = malloc( fsn_size ); 4a574: 0680 0000 0011 addil #17,%d0 4a57a: 2e80 movel %d0,%sp@ 4a57c: 4eb9 0004 2b08 jsr 42b08 char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) 4a582: 588f addql #4,%sp const char *type, rtems_filesystem_fsmount_me_t mount_h ) { size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; filesystem_node *fsn = malloc( fsn_size ); 4a584: 2440 moveal %d0,%a2 char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) 4a586: 4a80 tstl %d0 4a588: 6612 bnes 4a59c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 4a58a: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4a590: 72ff moveq #-1,%d1 <== NOT EXECUTED 4a592: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a594: 700c moveq #12,%d0 <== NOT EXECUTED 4a596: 2080 movel %d0,%a0@ <== NOT EXECUTED 4a598: 6000 0082 braw 4a61c <== NOT EXECUTED strcpy(type_storage, type); 4a59c: 2f02 movel %d2,%sp@- rtems_filesystem_fsmount_me_t mount_h ) { size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( filesystem_node ); 4a59e: 2600 movel %d0,%d3 4a5a0: 0683 0000 0010 addil #16,%d3 4a5a6: 47f9 0004 58c4 lea 458c4 ,%a3 if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); strcpy(type_storage, type); 4a5ac: 2f03 movel %d3,%sp@- 4a5ae: 4eb9 0004 e038 jsr 4e038 fsn->entry.type = type_storage; fsn->entry.mount_h = mount_h; 4a5b4: 256e 000c 000c movel %fp@(12),%a2@(12) 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 ); 4a5ba: 42a7 clrl %sp@- 4a5bc: 42a7 clrl %sp@- 4a5be: 2f39 0005 dac8 movel 5dac8 ,%sp@- if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); strcpy(type_storage, type); fsn->entry.type = type_storage; 4a5c4: 2543 0008 movel %d3,%a2@(8) 4a5c8: 4eb9 0004 57c0 jsr 457c0 fsn->entry.mount_h = mount_h; rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { 4a5ce: 2f02 movel %d2,%sp@- 4a5d0: 4eb9 0004 a536 jsr 4a536 4a5d6: 4fef 0018 lea %sp@(24),%sp 4a5da: 4a80 tstl %d0 4a5dc: 661e bnes 4a5fc <== NEVER TAKEN RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 4a5de: 2f0a movel %a2,%sp@- 4a5e0: 4879 0005 c538 pea 5c538 4a5e6: 4eb9 0004 6104 jsr 46104 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4a5ec: 2f39 0005 dac8 movel 5dac8 ,%sp@- 4a5f2: 4e93 jsr %a3@ rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_unlock(); return 0; 4a5f4: 4fef 000c lea %sp@(12),%sp 4a5f8: 4281 clrl %d1 4a5fa: 6020 bras 4a61c 4a5fc: 2f39 0005 dac8 movel 5dac8 ,%sp@- <== NOT EXECUTED rtems_chain_append( &filesystem_chain, &fsn->node ); } else { rtems_libio_unlock(); free( fsn ); rtems_set_errno_and_return_minus_one( EINVAL ); 4a602: 7616 moveq #22,%d3 <== NOT EXECUTED 4a604: 4e93 jsr %a3@ <== NOT EXECUTED rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { rtems_chain_append( &filesystem_chain, &fsn->node ); } else { rtems_libio_unlock(); free( fsn ); 4a606: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a608: 4eb9 0004 2828 jsr 42828 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 4a60e: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4a614: 508f addql #8,%sp <== NOT EXECUTED 4a616: 72ff moveq #-1,%d1 <== NOT EXECUTED 4a618: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a61a: 2083 movel %d3,%a0@ <== NOT EXECUTED } rtems_libio_unlock(); return 0; } 4a61c: 2001 movel %d1,%d0 4a61e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4a624: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a410 : int rtems_filesystem_unregister( const char *type ) { 4a410: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 4a414: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 4a418: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED rtems_chain_node *node = NULL; if ( type == NULL ) { 4a41c: 6610 bnes 4a42e <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 4a41e: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4a424: 7416 moveq #22,%d2 <== NOT EXECUTED 4a426: 72ff moveq #-1,%d1 <== NOT EXECUTED 4a428: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a42a: 2082 movel %d2,%a0@ <== NOT EXECUTED 4a42c: 607a bras 4a4a8 <== 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 ); 4a42e: 42a7 clrl %sp@- <== NOT EXECUTED !rtems_chain_is_tail( &filesystem_chain, node ); node = rtems_chain_next( node ) ) { filesystem_node *fsn = (filesystem_node *) node; if ( strcmp( fsn->entry.type, type ) == 0 ) { 4a430: 47f9 0004 dfc0 lea 4dfc0 ,%a3 <== NOT EXECUTED 4a436: 42a7 clrl %sp@- <== NOT EXECUTED 4a438: 2f39 0005 dac8 movel 5dac8 ,%sp@- <== NOT EXECUTED 4a43e: 4eb9 0004 57c0 jsr 457c0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 4a444: 2479 0005 c538 moveal 5c538 ,%a2 <== NOT EXECUTED if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 4a44a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a44e: 6034 bras 4a484 <== NOT EXECUTED !rtems_chain_is_tail( &filesystem_chain, node ); node = rtems_chain_next( node ) ) { filesystem_node *fsn = (filesystem_node *) node; if ( strcmp( fsn->entry.type, type ) == 0 ) { 4a450: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a452: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4a456: 4e93 jsr %a3@ <== NOT EXECUTED 4a458: 508f addql #8,%sp <== NOT EXECUTED 4a45a: 4a80 tstl %d0 <== NOT EXECUTED 4a45c: 6624 bnes 4a482 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4a45e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a460: 4eb9 0004 613c jsr 4613c <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( node ); free( fsn ); 4a466: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a468: 4eb9 0004 2828 jsr 42828 <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4a46e: 2f39 0005 dac8 movel 5dac8 ,%sp@- <== NOT EXECUTED 4a474: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED rtems_libio_unlock(); return 0; 4a47a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a47e: 4281 clrl %d1 <== NOT EXECUTED 4a480: 6026 bras 4a4a8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 4a482: 2452 moveal %a2@,%a2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4a484: b5fc 0005 c53c cmpal #378172,%a2 <== NOT EXECUTED 4a48a: 66c4 bnes 4a450 <== NOT EXECUTED 4a48c: 2f39 0005 dac8 movel 5dac8 ,%sp@- <== NOT EXECUTED 4a492: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); 4a498: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4a49e: 588f addql #4,%sp <== NOT EXECUTED 4a4a0: 72ff moveq #-1,%d1 <== NOT EXECUTED 4a4a2: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a4a4: 7002 moveq #2,%d0 <== NOT EXECUTED 4a4a6: 2080 movel %d0,%a0@ <== NOT EXECUTED } 4a4a8: 2001 movel %d1,%d0 <== NOT EXECUTED 4a4aa: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4a4b0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042244 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 42244: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 42248: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4224c: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED 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( name, strlen( name ), 0x00, &loc, true ); 42250: 49f9 0004 e4e4 lea 4e4e4 ,%a4 <== NOT EXECUTED 42256: 240e movel %fp,%d2 <== NOT EXECUTED 42258: 0682 ffff ffec addil #-20,%d2 <== NOT EXECUTED 4225e: 2f03 movel %d3,%sp@- <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 42260: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 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( name, strlen( name ), 0x00, &loc, true ); 42264: 4e94 jsr %a4@ <== NOT EXECUTED 42266: 7201 moveq #1,%d1 <== NOT EXECUTED 42268: 2e81 movel %d1,%sp@ <== NOT EXECUTED 4226a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4226c: 42a7 clrl %sp@- <== NOT EXECUTED 4226e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42270: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42272: 4eb9 0004 27ac jsr 427ac <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 42278: 226e fff8 moveal %fp@(-8),%a1 <== NOT EXECUTED 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( name, strlen( name ), 0x00, &loc, true ); 4227c: 2800 movel %d0,%d4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 4227e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED rtems_filesystem_location_info_t loc; 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; 42282: 266e ffec moveal %fp@(-20),%a3 <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 42286: 2069 0010 moveal %a1@(16),%a0 <== NOT EXECUTED 4228a: 4a88 tstl %a0 <== NOT EXECUTED 4228c: 6620 bnes 422ae <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4228e: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 42292: 4a88 tstl %a0 <== NOT EXECUTED 42294: 6706 beqs 4229c <== NOT EXECUTED 42296: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42298: 4e90 jsr %a0@ <== NOT EXECUTED 4229a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4229c: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 422a2: 2040 moveal %d0,%a0 <== NOT EXECUTED 422a4: 70ff moveq #-1,%d0 <== NOT EXECUTED 422a6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 422ac: 6060 bras 4230e <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 422ae: 2f02 movel %d2,%sp@- <== NOT EXECUTED 422b0: 4e90 jsr %a0@ <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 422b2: 588f addql #4,%sp <== NOT EXECUTED 422b4: 4a84 tstl %d4 <== NOT EXECUTED 422b6: 6606 bnes 422be <== NOT EXECUTED 422b8: 7202 moveq #2,%d1 <== NOT EXECUTED 422ba: b280 cmpl %d0,%d1 <== NOT EXECUTED 422bc: 671a beqs 422d8 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 422be: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 422c2: 4a88 tstl %a0 <== NOT EXECUTED 422c4: 6742 beqs 42308 <== NOT EXECUTED 422c6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 422ca: 4a88 tstl %a0 <== NOT EXECUTED 422cc: 673a beqs 42308 <== NOT EXECUTED 422ce: 486e ffec pea %fp@(-20) <== NOT EXECUTED 422d2: 4e90 jsr %a0@ <== NOT EXECUTED 422d4: 588f addql #4,%sp <== NOT EXECUTED 422d6: 6030 bras 42308 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 422d8: 2f03 movel %d3,%sp@- <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 422da: 2483 movel %d3,%a2@ <== NOT EXECUTED device_info->device_name_length = strlen( name ); 422dc: 4e94 jsr %a4@ <== NOT EXECUTED device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 422de: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 422e2: 588f addql #4,%sp <== NOT EXECUTED 422e4: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 422e8: 256b 004c 0008 movel %a3@(76),%a2@(8) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 422ee: 256b 0050 000c movel %a3@(80),%a2@(12) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 422f4: 4a88 tstl %a0 <== NOT EXECUTED 422f6: 6714 beqs 4230c <== NOT EXECUTED 422f8: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 422fc: 4a88 tstl %a0 <== NOT EXECUTED 422fe: 670c beqs 4230c <== NOT EXECUTED 42300: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42302: 4e90 jsr %a0@ <== NOT EXECUTED 42304: 588f addql #4,%sp <== NOT EXECUTED 42306: 6004 bras 4230c <== NOT EXECUTED 42308: 700d moveq #13,%d0 <== NOT EXECUTED 4230a: 6002 bras 4230e <== NOT EXECUTED 4230c: 4280 clrl %d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 4230e: 4cee 1c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a4 <== NOT EXECUTED 42314: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046e2c : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 46e2c: 4e56 0000 linkw %fp,#0 46e30: 206e 000c moveal %fp@(12),%a0 46e34: 2f0a movel %a2,%sp@- 46e36: 226e 0010 moveal %fp@(16),%a1 46e3a: 2f02 movel %d2,%sp@- 46e3c: 242e 0008 movel %fp@(8),%d2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 46e40: 2039 0006 13fa movel 613fa <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 46e46: 2239 0006 124e movel 6124e <_ISR_Nest_level>,%d1 46e4c: 6706 beqs 46e54 46e4e: 7012 moveq #18,%d0 46e50: 6000 00d6 braw 46f28 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 46e54: 4a89 tstl %a1 46e56: 6700 00ce beqw 46f26 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 46e5a: 2280 movel %d0,%a1@ if ( driver_table == NULL ) 46e5c: 4a88 tstl %a0 46e5e: 6700 00c6 beqw 46f26 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46e62: 4a90 tstl %a0@ 46e64: 6600 00ce bnew 46f34 46e68: 4aa8 0004 tstl %a0@(4) 46e6c: 6600 00c6 bnew 46f34 46e70: 6000 00b4 braw 46f26 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46e74: 2039 0006 11b4 movel 611b4 <_Thread_Dispatch_disable_level>,%d0 46e7a: 5280 addql #1,%d0 46e7c: 23c0 0006 11b4 movel %d0,611b4 <_Thread_Dispatch_disable_level> if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 46e82: 4a82 tstl %d2 46e84: 662c bnes 46eb2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 46e86: 2039 0006 13fa movel 613fa <_IO_Number_of_drivers>,%d0 46e8c: 2479 0006 13fe moveal 613fe <_IO_Driver_address_table>,%a2 46e92: 6010 bras 46ea4 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46e94: 4a92 tstl %a2@ 46e96: 6600 00a6 bnew 46f3e 46e9a: 4aaa 0004 tstl %a2@(4) 46e9e: 6600 009e bnew 46f3e 46ea2: 6004 bras 46ea8 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 46ea4: b082 cmpl %d2,%d0 46ea6: 62ec bhis 46e94 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 46ea8: 2282 movel %d2,%a1@ if ( m != n ) 46eaa: b082 cmpl %d2,%d0 46eac: 6634 bnes 46ee2 46eae: 6000 0098 braw 46f48 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 46eb2: 2202 movel %d2,%d1 46eb4: 2002 movel %d2,%d0 46eb6: e789 lsll #3,%d1 46eb8: eb88 lsll #5,%d0 46eba: 2479 0006 13fe moveal 613fe <_IO_Driver_address_table>,%a2 46ec0: 9081 subl %d1,%d0 46ec2: d5c0 addal %d0,%a2 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46ec4: 4a92 tstl %a2@ 46ec6: 660e bnes 46ed6 46ec8: 4aaa 0004 tstl %a2@(4) 46ecc: 57c0 seq %d0 46ece: 49c0 extbl %d0 46ed0: 4480 negl %d0 } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { 46ed2: 4a00 tstb %d0 46ed4: 660a bnes 46ee0 _Thread_Enable_dispatch(); 46ed6: 4eb9 0004 86da jsr 486da <_Thread_Enable_dispatch> 46edc: 700c moveq #12,%d0 return RTEMS_RESOURCE_IN_USE; 46ede: 6048 bras 46f28 } *registered_major = major; 46ee0: 2282 movel %d2,%a1@ } _IO_Driver_address_table [major] = *driver_table; 46ee2: 4878 0018 pea 18 46ee6: 2202 movel %d2,%d1 46ee8: 2002 movel %d2,%d0 46eea: e789 lsll #3,%d1 46eec: eb88 lsll #5,%d0 46eee: 2f08 movel %a0,%sp@- 46ef0: 9081 subl %d1,%d0 46ef2: d0b9 0006 13fe addl 613fe <_IO_Driver_address_table>,%d0 46ef8: 2f00 movel %d0,%sp@- 46efa: 4eb9 0005 0f98 jsr 50f98 _Thread_Enable_dispatch(); 46f00: 4eb9 0004 86da jsr 486da <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); } 46f06: 246e fffc moveal %fp@(-4),%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46f0a: 4fef 000c lea %sp@(12),%sp 46f0e: 2d42 0008 movel %d2,%fp@(8) } 46f12: 242e fff8 movel %fp@(-8),%d2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46f16: 42ae 0010 clrl %fp@(16) 46f1a: 42ae 000c clrl %fp@(12) } 46f1e: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46f20: 4ef9 0004 e4ac jmp 4e4ac 46f26: 7009 moveq #9,%d0 } 46f28: 242e fff8 movel %fp@(-8),%d2 46f2c: 246e fffc moveal %fp@(-4),%a2 46f30: 4e5e unlk %fp 46f32: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 46f34: b082 cmpl %d2,%d0 46f36: 6200 ff3c bhiw 46e74 46f3a: 700a moveq #10,%d0 46f3c: 60ea bras 46f28 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 46f3e: 5282 addql #1,%d2 46f40: 45ea 0018 lea %a2@(24),%a2 46f44: 6000 ff5e braw 46ea4 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 46f48: 4eb9 0004 86da jsr 486da <_Thread_Enable_dispatch> 46f4e: 7005 moveq #5,%d0 return sc; 46f50: 60d6 bras 46f28 ... =============================================================================== 00047c20 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 47c20: 4e56 fff0 linkw %fp,#-16 47c24: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 47c28: 286e 0008 moveal %fp@(8),%a4 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 47c2c: 4a8c tstl %a4 47c2e: 6740 beqs 47c70 <== NEVER TAKEN 47c30: 45f9 0006 00f8 lea 600f8 <_Objects_Information_table+0x4>,%a2 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 47c36: 2052 moveal %a2@,%a0 47c38: 4a88 tstl %a0 47c3a: 672a beqs 47c66 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 47c3c: 2668 0004 moveal %a0@(4),%a3 if ( !information ) 47c40: 4a8b tstl %a3 47c42: 6722 beqs 47c66 47c44: 7401 moveq #1,%d2 47c46: 6014 bras 47c5c continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 47c48: 206b 0018 moveal %a3@(24),%a0 47c4c: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 47c50: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 47c52: 4a80 tstl %d0 47c54: 6706 beqs 47c5c <== NEVER TAKEN continue; (*routine)(the_thread); 47c56: 2f00 movel %d0,%sp@- 47c58: 4e94 jsr %a4@ 47c5a: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 47c5c: 4280 clrl %d0 47c5e: 302b 000e movew %a3@(14),%d0 47c62: b082 cmpl %d2,%d0 47c64: 64e2 bccs 47c48 47c66: 588a addql #4,%a2 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 47c68: b5fc 0006 0108 cmpal #393480,%a2 47c6e: 66c6 bnes 47c36 (*routine)(the_thread); } } } 47c70: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 47c76: 4e5e unlk %fp ... =============================================================================== 0004a2f8 : * This routine searches the IOP Table for an unused entry. If it * finds one, it returns it. Otherwise, it returns NULL. */ rtems_libio_t *rtems_libio_allocate( void ) { 4a2f8: 4e56 fffc linkw %fp,#-4 4a2fc: 2f0a movel %a2,%sp@- 4a2fe: 2f02 movel %d2,%sp@- 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 ); 4a300: 42a7 clrl %sp@- 4a302: 42a7 clrl %sp@- 4a304: 2f39 0005 dac8 movel 5dac8 ,%sp@- 4a30a: 4eb9 0004 57c0 jsr 457c0 rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { 4a310: 2039 0005 dac4 movel 5dac4 ,%d0 4a316: 4fef 000c lea %sp@(12),%sp 4a31a: 6760 beqs 4a37c rc = rtems_semaphore_create( 4a31c: 486e fffc pea %fp@(-4) 4a320: 90b9 0005 dac0 subl 5dac0 ,%d0 4a326: ec80 asrl #6,%d0 4a328: 42a7 clrl %sp@- 4a32a: 4878 0054 pea 54 4a32e: 4878 0001 pea 1 4a332: 0080 4c42 4900 oril #1279412480,%d0 4a338: 2f00 movel %d0,%sp@- 4a33a: 4eb9 0004 5588 jsr 45588 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) 4a340: 4fef 0014 lea %sp@(20),%sp 4a344: 4a80 tstl %d0 4a346: 6634 bnes 4a37c <== NEVER TAKEN goto failed; iop = rtems_libio_iop_freelist; 4a348: 2479 0005 dac4 moveal 5dac4 ,%a2 next = iop->data1; 4a34e: 242a 0034 movel %a2@(52),%d2 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4a352: 4878 0040 pea 40 4a356: 42a7 clrl %sp@- 4a358: 2f0a movel %a2,%sp@- 4a35a: 4eb9 0004 d948 jsr 4d948 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4a360: 256e fffc 002c movel %fp@(-4),%a2@(44) if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; 4a366: 203c 0000 0100 movel #256,%d0 iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 4a36c: 4fef 000c lea %sp@(12),%sp iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; 4a370: 23c2 0005 dac4 movel %d2,5dac4 if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; 4a376: 2540 0014 movel %d0,%a2@(20) iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 4a37a: 6002 bras 4a37e 4a37c: 95ca subal %a2,%a2 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4a37e: 2f39 0005 dac8 movel 5dac8 ,%sp@- 4a384: 4eb9 0004 58c4 jsr 458c4 iop = 0; done: rtems_libio_unlock(); return iop; } 4a38a: 242e fff4 movel %fp@(-12),%d2 4a38e: 200a movel %a2,%d0 4a390: 246e fff8 moveal %fp@(-8),%a2 4a394: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a29a : */ void rtems_libio_free( rtems_libio_t *iop ) { 4a29a: 4e56 0000 linkw %fp,#0 4a29e: 2f0a movel %a2,%sp@- 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 ); 4a2a0: 42a7 clrl %sp@- 4a2a2: 246e 0008 moveal %fp@(8),%a2 4a2a6: 42a7 clrl %sp@- 4a2a8: 2f39 0005 dac8 movel 5dac8 ,%sp@- 4a2ae: 4eb9 0004 57c0 jsr 457c0 rtems_libio_lock(); if (iop->sem) 4a2b4: 202a 002c movel %a2@(44),%d0 4a2b8: 4fef 000c lea %sp@(12),%sp 4a2bc: 670a beqs 4a2c8 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 4a2be: 2f00 movel %d0,%sp@- 4a2c0: 4eb9 0004 5724 jsr 45724 4a2c6: 588f addql #4,%sp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 4a2c8: 41f9 0005 dac4 lea 5dac4 ,%a0 rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4a2ce: 203c ffff feff movel #-257,%d0 iop->data1 = rtems_libio_iop_freelist; 4a2d4: 2550 0034 movel %a0@,%a2@(52) } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4a2d8: 41f9 0005 dac8 lea 5dac8 ,%a0 4a2de: 2d50 0008 movel %a0@,%fp@(8) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4a2e2: c1aa 0014 andl %d0,%a2@(20) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 4a2e6: 23ca 0005 dac4 movel %a2,5dac4 rtems_libio_unlock(); } 4a2ec: 246e fffc moveal %fp@(-4),%a2 4a2f0: 4e5e unlk %fp 4a2f2: 4ef9 0004 58c4 jmp 458c4 =============================================================================== 00042934 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 42934: 4e56 0000 linkw %fp,#0 rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 42938: 2039 0005 c414 movel 5c414 ,%d0 4293e: 6742 beqs 42982 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 42940: 4878 0040 pea 40 42944: 2f00 movel %d0,%sp@- 42946: 4eb9 0004 2438 jsr 42438 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 4294c: 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, 4294e: 23c0 0005 dac0 movel %d0,5dac0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42954: 6606 bnes 4295c <== ALWAYS TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 42956: 4878 001a pea 1a <== NOT EXECUTED 4295a: 604c bras 429a8 <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 4295c: 23c0 0005 dac4 movel %d0,5dac4 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42962: 2040 moveal %d0,%a0 42964: 4280 clrl %d0 42966: 2239 0005 c414 movel 5c414 ,%d1 4296c: 6004 bras 42972 iop->data1 = iop + 1; 4296e: 2148 fff4 movel %a0,%a0@(-12) 42972: 2248 moveal %a0,%a1 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++) 42974: 5280 addql #1,%d0 42976: 41e8 0040 lea %a0@(64),%a0 4297a: b280 cmpl %d0,%d1 4297c: 62f0 bhis 4296e iop->data1 = iop + 1; iop->data1 = NULL; 4297e: 42a9 0034 clrl %a1@(52) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 42982: 4879 0005 dac8 pea 5dac8 42988: 42a7 clrl %sp@- 4298a: 4878 0054 pea 54 4298e: 4878 0001 pea 1 42992: 2f3c 4c42 494f movel #1279412559,%sp@- 42998: 4eb9 0004 5588 jsr 45588 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 4299e: 4fef 0014 lea %sp@(20),%sp 429a2: 4a80 tstl %d0 429a4: 6708 beqs 429ae <== ALWAYS TAKEN rtems_fatal_error_occurred( rc ); 429a6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 429a8: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 429ae: 2279 0005 c410 moveal 5c410 ,%a1 429b4: 4a89 tstl %a1 429b6: 6704 beqs 429bc <== NEVER TAKEN (* rtems_fs_init_helper)(); } 429b8: 4e5e unlk %fp /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 429ba: 4ed1 jmp %a1@ } 429bc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043c0a : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 43c0a: 4e56 ffd4 linkw %fp,#-44 43c0e: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 43c12: 486e fffc pea %fp@(-4) 43c16: 42a7 clrl %sp@- 43c18: 42a7 clrl %sp@- 43c1a: 4eb9 0004 63d4 jsr 463d4 if (sc != RTEMS_SUCCESSFUL) return sc; 43c20: 4fef 000c lea %sp@(12),%sp rtems_status_code rtems_libio_set_private_env(void) { rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 43c24: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) return sc; 43c26: 6600 00da bnew 43d02 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 43c2a: 203c 0005 e2d0 movel #385744,%d0 43c30: b0b9 0005 ccf8 cmpl 5ccf8 ,%d0 43c36: 6648 bnes 43c80 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 43c38: 4878 0048 pea 48 43c3c: 4eb9 0004 30dc jsr 430dc if (!tmp) 43c42: 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)); 43c44: 2600 movel %d0,%d3 if (!tmp) 43c46: 6608 bnes 43c50 <== ALWAYS TAKEN 43c48: 143c 001a moveb #26,%d2 <== NOT EXECUTED 43c4c: 6000 00b4 braw 43d02 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 43c50: 487a fec2 pea %pc@(43b14 ) 43c54: 4879 0005 ccf8 pea 5ccf8 43c5a: 42a7 clrl %sp@- 43c5c: 4eb9 0004 654c jsr 4654c if (sc != RTEMS_SUCCESSFUL) { 43c62: 4fef 000c lea %sp@(12),%sp 43c66: 4a80 tstl %d0 43c68: 6710 beqs 43c7a <== ALWAYS TAKEN /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 43c6a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 43c6c: 2400 movel %d0,%d2 <== NOT EXECUTED 43c6e: 4eb9 0004 2b94 jsr 42b94 <== NOT EXECUTED return sc; 43c74: 588f addql #4,%sp <== NOT EXECUTED 43c76: 6000 008a braw 43d02 <== NOT EXECUTED } rtems_current_user_env = tmp; 43c7a: 23c3 0005 ccf8 movel %d3,5ccf8 }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 43c80: 4878 0048 pea 48 43c84: 45f9 0004 e0fc lea 4e0fc ,%a2 43c8a: 4879 0005 e2d0 pea 5e2d0 * 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); 43c90: 260e movel %fp,%d3 43c92: 0683 ffff ffe8 addil #-24,%d3 43c98: 47f9 0004 2b18 lea 42b18 ,%a3 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 43c9e: 2879 0005 ccf8 moveal 5ccf8 ,%a4 43ca4: 2f0c movel %a4,%sp@- 43ca6: 4e92 jsr %a2@ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 43ca8: 28ae fffc movel %fp@(-4),%a4@ * 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); 43cac: 42a7 clrl %sp@- 43cae: 2f03 movel %d3,%sp@- 43cb0: 42a7 clrl %sp@- 43cb2: 4878 0001 pea 1 43cb6: 4879 0005 b636 pea 5b636 43cbc: 4e93 jsr %a3@ rtems_filesystem_root = loc; 43cbe: 4fef 0020 lea %sp@(32),%sp 43cc2: 4878 0014 pea 14 43cc6: 2079 0005 ccf8 moveal 5ccf8 ,%a0 43ccc: 41e8 0018 lea %a0@(24),%a0 43cd0: 2f03 movel %d3,%sp@- 43cd2: 2f08 movel %a0,%sp@- 43cd4: 4e92 jsr %a2@ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 43cd6: 42a7 clrl %sp@- 43cd8: 2f03 movel %d3,%sp@- 43cda: 42a7 clrl %sp@- 43cdc: 4878 0001 pea 1 43ce0: 4879 0005 b636 pea 5b636 43ce6: 4e93 jsr %a3@ rtems_filesystem_current = loc; 43ce8: 4fef 0020 lea %sp@(32),%sp 43cec: 4878 0014 pea 14 43cf0: 2039 0005 ccf8 movel 5ccf8 ,%d0 43cf6: 5880 addql #4,%d0 43cf8: 2f03 movel %d3,%sp@- 43cfa: 2f00 movel %d0,%sp@- 43cfc: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 43cfe: 4fef 000c lea %sp@(12),%sp } 43d02: 2002 movel %d2,%d0 43d04: 4cee 1c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a4 43d0a: 4e5e unlk %fp ... =============================================================================== 00043b6e : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 43b6e: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 43b72: 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); 43b74: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 43b78: 42a7 clrl %sp@- <== NOT EXECUTED 43b7a: 42a7 clrl %sp@- <== NOT EXECUTED 43b7c: 4eb9 0004 63d4 jsr 463d4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 43b82: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43b86: 4a80 tstl %d0 <== NOT EXECUTED 43b88: 6678 bnes 43c02 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 43b8a: 2479 0005 ccf8 moveal 5ccf8 ,%a2 <== NOT EXECUTED 43b90: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 43b94: b092 cmpl %a2@,%d0 <== NOT EXECUTED 43b96: 661c bnes 43bb4 <== 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); 43b98: 4879 0005 ccf8 pea 5ccf8 <== NOT EXECUTED 43b9e: 42a7 clrl %sp@- <== NOT EXECUTED 43ba0: 4eb9 0004 65e0 jsr 465e0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 43ba6: 508f addql #8,%sp <== NOT EXECUTED 43ba8: 4a80 tstl %d0 <== NOT EXECUTED 43baa: 6656 bnes 43c02 <== NOT EXECUTED free_user_env(tmp); 43bac: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43bae: 4eba ff64 jsr %pc@(43b14 ) <== NOT EXECUTED 43bb2: 588f addql #4,%sp <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 43bb4: 486e fffc pea %fp@(-4) <== NOT EXECUTED 43bb8: 4879 0005 ccf8 pea 5ccf8 <== NOT EXECUTED 43bbe: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 43bc2: 4eb9 0004 6654 jsr 46654 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 43bc8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43bcc: 4a80 tstl %d0 <== NOT EXECUTED 43bce: 6626 bnes 43bf6 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 43bd0: 487a ff42 pea %pc@(43b14 ) <== NOT EXECUTED 43bd4: 4879 0005 ccf8 pea 5ccf8 <== NOT EXECUTED 43bda: 42a7 clrl %sp@- <== NOT EXECUTED 43bdc: 4eb9 0004 654c jsr 4654c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 43be2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43be6: 4a80 tstl %d0 <== NOT EXECUTED 43be8: 660c bnes 43bf6 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 43bea: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED 43bee: 23d0 0005 ccf8 movel %a0@,5ccf8 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 43bf4: 600c bras 43c02 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 43bf6: 223c 0005 e2d0 movel #385744,%d1 <== NOT EXECUTED 43bfc: 23c1 0005 ccf8 movel %d1,5ccf8 <== NOT EXECUTED return sc; } 43c02: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 43c06: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a170 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a170: 7006 moveq #6,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4a172: 4e56 0000 linkw %fp,#0 4a176: 222e 0008 movel %fp@(8),%d1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a17a: c081 andl %d1,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4a17c: 2f02 movel %d2,%sp@- uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a17e: 7406 moveq #6,%d2 4a180: b480 cmpl %d0,%d2 4a182: 6604 bnes 4a188 <== ALWAYS TAKEN 4a184: 7002 moveq #2,%d0 <== NOT EXECUTED 4a186: 6012 bras 4a19a <== NOT EXECUTED fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4a188: 0801 0001 btst #1,%d1 4a18c: 6704 beqs 4a192 <== NEVER TAKEN 4a18e: 4280 clrl %d0 4a190: 6008 bras 4a19a 4a192: 2001 movel %d1,%d0 <== NOT EXECUTED 4a194: e488 lsrl #2,%d0 <== NOT EXECUTED 4a196: 7401 moveq #1,%d2 <== NOT EXECUTED 4a198: c082 andl %d2,%d0 <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 4a19a: 0801 0000 btst #0,%d1 4a19e: 6704 beqs 4a1a4 fcntl_flags |= O_NONBLOCK; 4a1a0: 08c0 000e bset #14,%d0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 4a1a4: 0801 0009 btst #9,%d1 4a1a8: 6704 beqs 4a1ae fcntl_flags |= O_APPEND; 4a1aa: 7408 moveq #8,%d2 4a1ac: 8082 orl %d2,%d0 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 4a1ae: 0801 000a btst #10,%d1 4a1b2: 6704 beqs 4a1b8 fcntl_flags |= O_CREAT; 4a1b4: 08c0 0009 bset #9,%d0 } return fcntl_flags; } 4a1b8: 241f movel %sp@+,%d2 4a1ba: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004dc48 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 4dc48: 4e56 0000 linkw %fp,#0 4dc4c: 2f0a movel %a2,%sp@- 4dc4e: 246e 0008 moveal %fp@(8),%a2 4dc52: 2f02 movel %d2,%sp@- void *return_this; /* * Parameter error checks */ if ( !pointer ) 4dc54: 4a8a tstl %a2 4dc56: 6758 beqs 4dcb0 return EINVAL; *pointer = NULL; 4dc58: 4292 clrl %a2@ /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4dc5a: 7003 moveq #3,%d0 4dc5c: b0b9 0006 1336 cmpl 61336 <_System_state_Current>,%d0 4dc62: 660a bnes 4dc6e <== NEVER TAKEN 4dc64: 4eb9 0004 3668 jsr 43668 4dc6a: 4a00 tstb %d0 4dc6c: 6742 beqs 4dcb0 <== NEVER TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4dc6e: 4eb9 0004 36c0 jsr 436c0 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 4dc74: 42a7 clrl %sp@- 4dc76: 2f2e 000c movel %fp@(12),%sp@- 4dc7a: 2f2e 0010 movel %fp@(16),%sp@- 4dc7e: 2f39 0005 f910 movel 5f910 ,%sp@- 4dc84: 4eb9 0004 8080 jsr 48080 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 4dc8a: 4fef 0010 lea %sp@(16),%sp 4dc8e: 2400 movel %d0,%d2 4dc90: 6604 bnes 4dc96 4dc92: 700c moveq #12,%d0 4dc94: 601c bras 4dcb2 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 4dc96: 2079 0005 ff86 moveal 5ff86 ,%a0 4dc9c: 4a88 tstl %a0 4dc9e: 670a beqs 4dcaa <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 4dca0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4dca2: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4dca6: 4e90 jsr %a0@ <== NOT EXECUTED 4dca8: 588f addql #4,%sp <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 4dcaa: 2482 movel %d2,%a2@ 4dcac: 4280 clrl %d0 return 0; 4dcae: 6002 bras 4dcb2 4dcb0: 7016 moveq #22,%d0 } 4dcb2: 242e fff8 movel %fp@(-8),%d2 4dcb6: 246e fffc moveal %fp@(-4),%a2 4dcba: 4e5e unlk %fp ... =============================================================================== 00042622 : void rtems_panic( const char *printf_format, ... ) { 42622: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 42626: 486e 000c pea %fp@(12) <== NOT EXECUTED 4262a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4262e: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 42634: 4eba fe66 jsr %pc@(4249c ) <== NOT EXECUTED 42638: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED va_end(arglist); } 4263c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fc20 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 4fc20: 4e56 fffc linkw %fp,#-4 4fc24: 2f0a movel %a2,%sp@- 4fc26: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4fc28: 486e fffc pea %fp@(-4) 4fc2c: 2f2e 0008 movel %fp@(8),%sp@- 4fc30: 4879 0007 610c pea 7610c <_Partition_Information> 4fc36: 242e 000c movel %fp@(12),%d2 4fc3a: 4eb9 0005 3f24 jsr 53f24 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4fc40: 4fef 000c lea %sp@(12),%sp 4fc44: 2440 moveal %d0,%a2 4fc46: 4aae fffc tstl %fp@(-4) 4fc4a: 6704 beqs 4fc50 4fc4c: 7004 moveq #4,%d0 4fc4e: 603c bras 4fc8c ) { void *starting; void *ending; starting = the_partition->starting_address; 4fc50: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 4fc54: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 4fc58: b082 cmpl %d2,%d0 4fc5a: 623c bhis 4fc98 4fc5c: d280 addl %d0,%d1 4fc5e: b282 cmpl %d2,%d1 4fc60: 6536 bcss 4fc98 <== NEVER TAKEN return ( 4fc62: 2202 movel %d2,%d1 4fc64: 9280 subl %d0,%d1 4fc66: 2001 movel %d1,%d0 4fc68: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 4fc6e: 4a81 tstl %d1 4fc70: 6626 bnes 4fc98 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 4fc72: 2f02 movel %d2,%sp@- 4fc74: 486a 0024 pea %a2@(36) 4fc78: 4eb9 0005 2810 jsr 52810 <_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; 4fc7e: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 4fc82: 4eb9 0005 47f6 jsr 547f6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4fc88: 508f addql #8,%sp case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); 4fc8a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4fc8c: 242e fff4 movel %fp@(-12),%d2 4fc90: 246e fff8 moveal %fp@(-8),%a2 4fc94: 4e5e unlk %fp 4fc96: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 4fc98: 4eb9 0005 47f6 jsr 547f6 <_Thread_Enable_dispatch> 4fc9e: 7009 moveq #9,%d0 return RTEMS_INVALID_ADDRESS; 4fca0: 60ea bras 4fc8c ... =============================================================================== 000489aa : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 489aa: 4e56 0000 linkw %fp,#0 if (!rtems_pipe_configured) 489ae: 4a39 0005 ca84 tstb 5ca84 489b4: 6740 beqs 489f6 <== ALWAYS TAKEN return; if (rtems_pipe_semaphore) 489b6: 4ab9 0005 d3c8 tstl 5d3c8 <== NOT EXECUTED 489bc: 6638 bnes 489f6 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 489be: 4879 0005 d3c8 pea 5d3c8 <== NOT EXECUTED 489c4: 42a7 clrl %sp@- <== NOT EXECUTED 489c6: 4878 0054 pea 54 <== NOT EXECUTED 489ca: 4878 0001 pea 1 <== NOT EXECUTED 489ce: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 489d4: 4eb9 0004 5588 jsr 45588 <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) 489da: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 489de: 4a80 tstl %d0 <== NOT EXECUTED 489e0: 6708 beqs 489ea <== NOT EXECUTED rtems_fatal_error_occurred (sc); 489e2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 489e4: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 489ea: 4eb9 0004 51a0 jsr 451a0 <== NOT EXECUTED rtems_pipe_no = now; 489f0: 33c0 0005 d3d0 movew %d0,5d3d0 <== NOT EXECUTED } 489f6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000464c0 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 464c0: 4e56 ffec linkw %fp,#-20 464c4: 48d7 041c moveml %d2-%d4/%a2,%sp@ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 464c8: 486e fffc pea %fp@(-4) 464cc: 262e 0008 movel %fp@(8),%d3 464d0: 2f03 movel %d3,%sp@- 464d2: 4879 0005 f748 pea 5f748 <_Rate_monotonic_Information> 464d8: 242e 000c movel %fp@(12),%d2 464dc: 4eb9 0004 83ac jsr 483ac <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 464e2: 4fef 000c lea %sp@(12),%sp 464e6: 2440 moveal %d0,%a2 464e8: 4aae fffc tstl %fp@(-4) 464ec: 6600 0138 bnew 46626 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 464f0: 2039 0005 f8fe movel 5f8fe <_Thread_Executing>,%d0 464f6: b0aa 0040 cmpl %a2@(64),%d0 464fa: 670c beqs 46508 _Thread_Enable_dispatch(); 464fc: 4eb9 0004 8bfa jsr 48bfa <_Thread_Enable_dispatch> 46502: 7817 moveq #23,%d4 return RTEMS_NOT_OWNER_OF_RESOURCE; 46504: 6000 0122 braw 46628 } if ( length == RTEMS_PERIOD_STATUS ) { 46508: 4a82 tstl %d2 4650a: 6622 bnes 4652e switch ( the_period->state ) { 4650c: 202a 0038 movel %a2@(56),%d0 46510: 7204 moveq #4,%d1 46512: b280 cmpl %d0,%d1 46514: 6404 bccs 4651a <== ALWAYS TAKEN 46516: 4284 clrl %d4 <== NOT EXECUTED 46518: 600a bras 46524 <== NOT EXECUTED 4651a: 41f9 0005 cd42 lea 5cd42 ,%a0 46520: 2830 0c00 movel %a0@(00000000,%d0:l:4),%d4 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 46524: 4eb9 0004 8bfa jsr 48bfa <_Thread_Enable_dispatch> return( return_value ); 4652a: 6000 00fc braw 46628 } _ISR_Disable( level ); 4652e: 203c 0000 0700 movel #1792,%d0 46534: 40c4 movew %sr,%d4 46536: 8084 orl %d4,%d0 46538: 46c0 movew %d0,%sr switch ( the_period->state ) { 4653a: 202a 0038 movel %a2@(56),%d0 4653e: 7202 moveq #2,%d1 46540: b280 cmpl %d0,%d1 46542: 6740 beqs 46584 46544: 123c 0004 moveb #4,%d1 46548: b280 cmpl %d0,%d1 4654a: 6700 00a4 beqw 465f0 4654e: 4a80 tstl %d0 46550: 6600 00d4 bnew 46626 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 46554: 46c4 movew %d4,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 46556: 2f0a movel %a2,%sp@- ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 46558: 4284 clrl %d4 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 4655a: 4eb9 0004 62ac jsr 462ac <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46560: 203c 0004 686c movel #288876,%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 46566: 7202 moveq #2,%d1 46568: 2540 002c movel %d0,%a2@(44) the_watchdog->id = id; 4656c: 2543 0030 movel %d3,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46570: 2542 001c movel %d2,%a2@(28) 46574: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46578: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4657c: 42aa 0034 clrl %a2@(52) 46580: 6000 0084 braw 46606 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 46584: 2f0a movel %a2,%sp@- 46586: 4eb9 0004 63cc jsr 463cc <_Rate_monotonic_Update_statistics> * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; 4658c: 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; 46590: 7401 moveq #1,%d2 46592: 2542 0038 movel %d2,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 46596: 46c4 movew %d4,%sr _Thread_Executing->Wait.id = the_period->Object.id; 46598: 2079 0005 f8fe moveal 5f8fe <_Thread_Executing>,%a0 4659e: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 465a4: 4878 4000 pea 4000 465a8: 2f08 movel %a0,%sp@- 465aa: 4eb9 0004 9430 jsr 49430 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 465b0: 203c 0000 0700 movel #1792,%d0 465b6: 40c1 movew %sr,%d1 465b8: 8081 orl %d1,%d0 465ba: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 465bc: 143c 0002 moveb #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 465c0: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 465c4: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 465c8: 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 ) 465ca: 7203 moveq #3,%d1 465cc: 4fef 000c lea %sp@(12),%sp 465d0: b280 cmpl %d0,%d1 465d2: 6612 bnes 465e6 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 465d4: 4878 4000 pea 4000 465d8: 2f39 0005 f8fe movel 5f8fe <_Thread_Executing>,%sp@- 465de: 4eb9 0004 8840 jsr 48840 <_Thread_Clear_state> 465e4: 508f addql #8,%sp _Thread_Enable_dispatch(); 465e6: 4eb9 0004 8bfa jsr 48bfa <_Thread_Enable_dispatch> 465ec: 4284 clrl %d4 return RTEMS_SUCCESSFUL; 465ee: 6038 bras 46628 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 465f0: 2f0a movel %a2,%sp@- 465f2: 4eb9 0004 63cc jsr 463cc <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 465f8: 46c4 movew %d4,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 465fa: 7002 moveq #2,%d0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 465fc: 7806 moveq #6,%d4 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 465fe: 2542 001c movel %d2,%a2@(28) */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 46602: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; 46606: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4660a: 486a 0010 pea %a2@(16) 4660e: 4879 0005 f91c pea 5f91c <_Watchdog_Ticks_chain> 46614: 4eb9 0004 9c2c jsr 49c2c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 4661a: 4eb9 0004 8bfa jsr 48bfa <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 46620: 4fef 000c lea %sp@(12),%sp 46624: 6002 bras 46628 46626: 7804 moveq #4,%d4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46628: 2004 movel %d4,%d0 4662a: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 46630: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050818 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 50818: 4e56 fffc linkw %fp,#-4 5081c: 2f03 movel %d3,%sp@- 5081e: 262e 0010 movel %fp@(16),%d3 50822: 2f02 movel %d2,%sp@- 50824: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 50828: 6766 beqs 50890 return RTEMS_INVALID_ADDRESS; if ( !size ) 5082a: 4a83 tstl %d3 5082c: 6762 beqs 50890 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 5082e: 2f39 0007 632a movel 7632a <_RTEMS_Allocator_Mutex>,%sp@- 50834: 4eb9 0005 277c jsr 5277c <_API_Mutex_Lock> 5083a: 486e fffc pea %fp@(-4) 5083e: 2f2e 0008 movel %fp@(8),%sp@- 50842: 4879 0007 617c pea 7617c <_Region_Information> 50848: 4eb9 0005 3eec jsr 53eec <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 5084e: 222e fffc movel %fp@(-4),%d1 50852: 4fef 0010 lea %sp@(16),%sp 50856: 670a beqs 50862 50858: 7001 moveq #1,%d0 5085a: b081 cmpl %d1,%d0 5085c: 6620 bnes 5087e <== NEVER TAKEN 5085e: 7404 moveq #4,%d2 50860: 601e bras 50880 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 50862: 2f03 movel %d3,%sp@- 50864: 2040 moveal %d0,%a0 50866: 2f02 movel %d2,%sp@- 50868: 4868 0068 pea %a0@(104) 5086c: 4eb9 0005 396c jsr 5396c <_Heap_Size_of_alloc_area> 50872: 4fef 000c lea %sp@(12),%sp 50876: 4a00 tstb %d0 50878: 6604 bnes 5087e 5087a: 7409 moveq #9,%d2 <== NOT EXECUTED 5087c: 6002 bras 50880 <== NOT EXECUTED 5087e: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 50880: 2f39 0007 632a movel 7632a <_RTEMS_Allocator_Mutex>,%sp@- 50886: 4eb9 0005 27dc jsr 527dc <_API_Mutex_Unlock> return return_status; 5088c: 588f addql #4,%sp 5088e: 6002 bras 50892 50890: 7409 moveq #9,%d2 } 50892: 2002 movel %d2,%d0 50894: 242e fff4 movel %fp@(-12),%d2 50898: 262e fff8 movel %fp@(-8),%d3 5089c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050eb0 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 50eb0: 4e56 fffc linkw %fp,#-4 50eb4: 2f03 movel %d3,%sp@- 50eb6: 2f02 movel %d2,%sp@- 50eb8: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 50ebc: 6606 bnes 50ec4 50ebe: 700a moveq #10,%d0 50ec0: 6000 0084 braw 50f46 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 50ec4: 486e fffc pea %fp@(-4) 50ec8: 2f2e 0008 movel %fp@(8),%sp@- 50ecc: 4eb9 0005 484c jsr 5484c <_Thread_Get> switch ( location ) { 50ed2: 508f addql #8,%sp 50ed4: 4aae fffc tstl %fp@(-4) 50ed8: 6704 beqs 50ede 50eda: 7004 moveq #4,%d0 50edc: 6068 bras 50f46 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 50ede: 2240 moveal %d0,%a1 50ee0: 2069 0108 moveal %a1@(264),%a0 asr = &api->Signal; 50ee4: 4aa8 000a tstl %a0@(10) 50ee8: 6754 beqs 50f3e if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 50eea: 4a28 0008 tstb %a0@(8) 50eee: 6732 beqs 50f22 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 50ef0: 223c 0000 0700 movel #1792,%d1 50ef6: 40c3 movew %sr,%d3 50ef8: 8283 orl %d3,%d1 50efa: 46c1 movew %d1,%sr *signal_set |= signals; 50efc: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 50f00: 46c3 movew %d3,%sr _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 50f02: 2239 0007 6312 movel 76312 <_ISR_Nest_level>,%d1 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 50f08: 7401 moveq #1,%d2 50f0a: 1342 0074 moveb %d2,%a1@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 50f0e: 4a81 tstl %d1 50f10: 6722 beqs 50f34 50f12: b0b9 0007 6332 cmpl 76332 <_Thread_Executing>,%d0 50f18: 661a bnes 50f34 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 50f1a: 13c2 0007 63bc moveb %d2,763bc <_ISR_Signals_to_thread_executing> 50f20: 6012 bras 50f34 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 50f22: 203c 0000 0700 movel #1792,%d0 50f28: 40c1 movew %sr,%d1 50f2a: 8081 orl %d1,%d0 50f2c: 46c0 movew %d0,%sr *signal_set |= signals; 50f2e: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 50f32: 46c1 movew %d1,%sr } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 50f34: 4eb9 0005 47f6 jsr 547f6 <_Thread_Enable_dispatch> 50f3a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 50f3c: 6008 bras 50f46 } _Thread_Enable_dispatch(); 50f3e: 4eb9 0005 47f6 jsr 547f6 <_Thread_Enable_dispatch> 50f44: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50f46: 242e fff4 movel %fp@(-12),%d2 50f4a: 262e fff8 movel %fp@(-8),%d3 50f4e: 4e5e unlk %fp ... =============================================================================== 00041ce0 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 41ce0: 4e56 0000 linkw %fp,#0 41ce4: 206e 0008 moveal %fp@(8),%a0 Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 41ce8: 4aa8 0008 tstl %a0@(8) 41cec: 671c beqs 41d0a <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 41cee: 4878 0010 pea 10 41cf2: 4879 0005 e098 pea 5e098 41cf8: 2068 00c0 moveal %a0@(192),%a0 41cfc: 5088 addql #8,%a0 41cfe: 2f08 movel %a0,%sp@- 41d00: 4eb9 0004 ddd8 jsr 4ddd8 41d06: 4fef 000c lea %sp@(12),%sp } 41d0a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000420cc : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 420cc: 4e56 0000 linkw %fp,#0 420d0: 2f0a movel %a2,%sp@- 420d2: 246e 000c moveal %fp@(12),%a2 Stack_check_Initialize(); 420d6: 4eb9 0004 2066 jsr 42066 if (the_thread) 420dc: 4a8a tstl %a2 420de: 6716 beqs 420f6 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 420e0: 2f2a 00bc movel %a2@(188),%sp@- 420e4: 4878 00a5 pea a5 420e8: 2f2a 00c0 movel %a2@(192),%sp@- 420ec: 4eb9 0004 de48 jsr 4de48 420f2: 4fef 000c lea %sp@(12),%sp return true; } 420f6: 246e fffc moveal %fp@(-4),%a2 420fa: 4e5e unlk %fp 420fc: 7001 moveq #1,%d0 <== NOT EXECUTED =============================================================================== 00041f78 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 41f78: 4e56 0000 linkw %fp,#0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 41f7c: 2279 0005 e2ca moveal 5e2ca <_Thread_Executing>,%a1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 41f82: 2069 00c0 moveal %a1@(192),%a0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 41f86: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 41f88: b1ce cmpal %fp,%a0 41f8a: 6304 blss 41f90 <== ALWAYS TAKEN 41f8c: 4202 clrb %d2 <== NOT EXECUTED 41f8e: 600c bras 41f9c <== NOT EXECUTED } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 41f90: 2008 movel %a0,%d0 41f92: d0a9 00bc addl %a1@(188),%d0 41f96: b08e cmpl %fp,%d0 41f98: 54c2 scc %d2 41f9a: 4482 negl %d2 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 41f9c: 4ab9 0005 d888 tstl 5d888 41fa2: 6604 bnes 41fa8 <== ALWAYS TAKEN 41fa4: 7001 moveq #1,%d0 <== NOT EXECUTED 41fa6: 601e bras 41fc6 <== NOT EXECUTED pattern_ok = (!memcmp( 41fa8: 4878 0010 pea 10 41fac: 4879 0005 e098 pea 5e098 41fb2: 4868 0008 pea %a0@(8) 41fb6: 4eb9 0004 dd60 jsr 4dd60 41fbc: 4fef 000c lea %sp@(12),%sp 41fc0: 4a80 tstl %d0 41fc2: 57c0 seq %d0 41fc4: 4480 negl %d0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 41fc6: 4a02 tstb %d2 41fc8: 6708 beqs 41fd2 <== NEVER TAKEN 41fca: 4a00 tstb %d0 41fcc: 6704 beqs 41fd2 <== NEVER TAKEN 41fce: 4200 clrb %d0 41fd0: 6018 bras 41fea return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 41fd2: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 41fd8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41fda: 2f39 0005 e2ca movel 5e2ca <_Thread_Executing>,%sp@- <== NOT EXECUTED 41fe0: 4eb9 0004 1ed2 jsr 41ed2 <== NOT EXECUTED return true; 41fe6: 508f addql #8,%sp <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 41fe8: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } 41fea: 242e fffc movel %fp@(-4),%d2 41fee: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041eba : void rtems_stack_checker_report_usage( void ) { 41eba: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 41ebe: 4879 0004 3934 pea 43934 <== NOT EXECUTED 41ec4: 42a7 clrl %sp@- <== NOT EXECUTED 41ec6: 4eb9 0004 1e58 jsr 41e58 <== NOT EXECUTED 41ecc: 508f addql #8,%sp <== NOT EXECUTED } 41ece: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041e58 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 41e58: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 41e5c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 41e5e: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 41e62: 2f02 movel %d2,%sp@- <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 41e64: 4879 0005 b29c pea 5b29c <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 41e6a: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED print_context = context; print_handler = print; 41e6e: 23ca 0005 d890 movel %a2,5d890 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 41e74: 2f02 movel %d2,%sp@- <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 41e76: 23c2 0005 d88c movel %d2,5d88c <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 41e7c: 4e92 jsr %a2@ <== NOT EXECUTED (*print)( context, 41e7e: 4879 0005 b2b3 pea 5b2b3 <== NOT EXECUTED 41e84: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41e86: 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 ); 41e88: 4879 0004 1d3e pea 41d3e <== NOT EXECUTED 41e8e: 4eb9 0004 6d64 jsr 46d64 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 41e94: 4878 ffff pea ffffffff <== NOT EXECUTED 41e98: 4eb9 0004 1d3e jsr 41d3e <== NOT EXECUTED print_context = NULL; print_handler = NULL; } 41e9e: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; print_handler = NULL; 41ea2: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } 41ea6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 41eaa: 4e5e unlk %fp <== NOT EXECUTED rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; 41eac: 42b9 0005 d88c clrl 5d88c <== NOT EXECUTED print_handler = NULL; 41eb2: 42b9 0005 d890 clrl 5d890 <== NOT EXECUTED } =============================================================================== 00041ff2 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 41ff2: 4e56 0000 linkw %fp,#0 41ff6: 2f0a movel %a2,%sp@- 41ff8: 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; 41ffc: 206a 00c0 moveal %a2@(192),%a0 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 42000: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 42002: b1ce cmpal %fp,%a0 42004: 6304 blss 4200a <== ALWAYS TAKEN 42006: 4202 clrb %d2 <== NOT EXECUTED 42008: 600c bras 42016 <== NOT EXECUTED } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 4200a: 2008 movel %a0,%d0 4200c: d0aa 00bc addl %a2@(188),%d0 42010: b08e cmpl %fp,%d0 42012: 54c2 scc %d2 42014: 4482 negl %d2 /* * 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, 42016: 4878 0010 pea 10 4201a: 4879 0005 e098 pea 5e098 42020: 4868 0008 pea %a0@(8) 42024: 4eb9 0004 dd60 jsr 4dd60 4202a: 4fef 000c lea %sp@(12),%sp 4202e: 4a80 tstl %d0 42030: 57c0 seq %d0 42032: 4480 negl %d0 42034: 1200 moveb %d0,%d1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 42036: 4a02 tstb %d2 42038: 6704 beqs 4203e <== NEVER TAKEN 4203a: 4a00 tstb %d0 4203c: 661c bnes 4205a <== ALWAYS TAKEN Stack_check_report_blown_task( running, pattern_ok ); 4203e: 4280 clrl %d0 <== NOT EXECUTED 42040: 1001 moveb %d1,%d0 <== NOT EXECUTED 42042: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 42046: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4204a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 4204e: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 42052: 4e5e unlk %fp <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 42054: 4ef9 0004 1ed2 jmp 41ed2 <== NOT EXECUTED } } 4205a: 242e fff8 movel %fp@(-8),%d2 4205e: 246e fffc moveal %fp@(-4),%a2 42062: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b5c0 : rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { 4b5c0: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4b5c4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 4b5c8: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4b5cc: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4b5d0: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED double result; char *end; if ( !n ) 4b5d4: 4a8a tstl %a2 <== NOT EXECUTED 4b5d6: 6606 bnes 4b5de <== NOT EXECUTED 4b5d8: 7009 moveq #9,%d0 <== NOT EXECUTED 4b5da: 6000 00a2 braw 4b67e <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 4b5de: 4eb9 0004 d6cc jsr 4d6cc <__errno> <== NOT EXECUTED *n = 0; 4b5e4: 4281 clrl %d1 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b5e6: 2040 moveal %d0,%a0 <== NOT EXECUTED *n = 0; 4b5e8: 4280 clrl %d0 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b5ea: 4290 clrl %a0@ <== NOT EXECUTED *n = 0; result = strtod( s, &end ); 4b5ec: 486e fffc pea %fp@(-4) <== NOT EXECUTED if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b5f0: 2480 movel %d0,%a2@ <== NOT EXECUTED 4b5f2: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED result = strtod( s, &end ); 4b5f6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b5f8: 4eb9 0005 0120 jsr 50120 <== NOT EXECUTED if ( endptr ) 4b5fe: 508f addql #8,%sp <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtod( s, &end ); 4b600: 2600 movel %d0,%d3 <== NOT EXECUTED 4b602: 2801 movel %d1,%d4 <== NOT EXECUTED if ( endptr ) 4b604: 4a8b tstl %a3 <== NOT EXECUTED 4b606: 6704 beqs 4b60c <== NOT EXECUTED *endptr = end; 4b608: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED if ( end == s ) 4b60c: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4b610: 6604 bnes 4b616 <== NOT EXECUTED 4b612: 700b moveq #11,%d0 <== NOT EXECUTED 4b614: 6068 bras 4b67e <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4b616: 4eb9 0004 d6cc jsr 4d6cc <__errno> <== NOT EXECUTED 4b61c: 7222 moveq #34,%d1 <== NOT EXECUTED 4b61e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b620: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b622: 664e bnes 4b672 <== NOT EXECUTED 4b624: 42a7 clrl %sp@- <== NOT EXECUTED 4b626: 42a7 clrl %sp@- <== NOT EXECUTED 4b628: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4b62a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b62c: 4eb9 0004 2340 jsr 42340 <__eqdf2> <== NOT EXECUTED 4b632: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b636: 4a80 tstl %d0 <== NOT EXECUTED 4b638: 6742 beqs 4b67c <== NOT EXECUTED 4b63a: 4878 ffff pea ffffffff <== NOT EXECUTED 4b63e: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4b644: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4b646: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b648: 4eb9 0005 af1c jsr 5af1c <__gtdf2> <== NOT EXECUTED 4b64e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b652: 4a80 tstl %d0 <== NOT EXECUTED 4b654: 6e26 bgts 4b67c <== NOT EXECUTED 4b656: 4878 ffff pea ffffffff <== NOT EXECUTED 4b65a: 2f3c ffef ffff movel #-1048577,%sp@- <== NOT EXECUTED 4b660: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4b662: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b664: 4eb9 0005 af64 jsr 5af64 <__ltdf2> <== NOT EXECUTED 4b66a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b66e: 4a80 tstl %d0 <== NOT EXECUTED 4b670: 6d0a blts 4b67c <== NOT EXECUTED (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; *n = result; 4b672: 2483 movel %d3,%a2@ <== NOT EXECUTED 4b674: 4280 clrl %d0 <== NOT EXECUTED 4b676: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED return RTEMS_SUCCESSFUL; 4b67a: 6002 bras 4b67e <== NOT EXECUTED 4b67c: 700a moveq #10,%d0 <== NOT EXECUTED } 4b67e: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4b684: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b688 : rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { 4b688: 4e56 ffec linkw %fp,#-20 4b68c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b690: 262e 0008 movel %fp@(8),%d3 4b694: 246e 000c moveal %fp@(12),%a2 4b698: 266e 0010 moveal %fp@(16),%a3 float result; char *end; if ( !n ) 4b69c: 4a8a tstl %a2 4b69e: 6606 bnes 4b6a6 4b6a0: 7009 moveq #9,%d0 4b6a2: 6000 0086 braw 4b72a return RTEMS_INVALID_ADDRESS; errno = 0; 4b6a6: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4b6ac: 2040 moveal %d0,%a0 4b6ae: 4290 clrl %a0@ *n = 0; result = strtof( s, &end ); 4b6b0: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b6b4: 24bc 0000 0000 movel #0,%a2@ result = strtof( s, &end ); 4b6ba: 2f03 movel %d3,%sp@- 4b6bc: 4eb9 0005 00c2 jsr 500c2 if ( endptr ) 4b6c2: 508f addql #8,%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtof( s, &end ); 4b6c4: 2400 movel %d0,%d2 if ( endptr ) 4b6c6: 4a8b tstl %a3 4b6c8: 6704 beqs 4b6ce *endptr = end; 4b6ca: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4b6ce: b6ae fffc cmpl %fp@(-4),%d3 4b6d2: 6604 bnes 4b6d8 4b6d4: 700b moveq #11,%d0 4b6d6: 6052 bras 4b72a return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4b6d8: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4b6de: 7222 moveq #34,%d1 4b6e0: 2040 moveal %d0,%a0 4b6e2: b290 cmpl %a0@,%d1 4b6e4: 663c bnes 4b722 4b6e6: 2f3c 0000 0000 movel #0,%sp@- 4b6ec: 2f02 movel %d2,%sp@- 4b6ee: 4eb9 0004 2364 jsr 42364 <__eqsf2> 4b6f4: 508f addql #8,%sp 4b6f6: 4a80 tstl %d0 4b6f8: 672e beqs 4b728 <== NEVER TAKEN 4b6fa: 2f3c 7f7f ffff movel #2139095039,%sp@- 4b700: 2f02 movel %d2,%sp@- 4b702: 4eb9 0005 afac jsr 5afac <__gtsf2> 4b708: 508f addql #8,%sp 4b70a: 4a80 tstl %d0 4b70c: 6e1a bgts 4b728 <== NEVER TAKEN 4b70e: 2f3c ff7f ffff movel #-8388609,%sp@- 4b714: 2f02 movel %d2,%sp@- 4b716: 4eb9 0005 afc8 jsr 5afc8 <__ltsf2> 4b71c: 508f addql #8,%sp 4b71e: 4a80 tstl %d0 4b720: 6d06 blts 4b728 <== NEVER TAKEN (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; *n = result; 4b722: 2482 movel %d2,%a2@ 4b724: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4b726: 6002 bras 4b72a 4b728: 700a moveq #10,%d0 <== NOT EXECUTED } 4b72a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b730: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b734 : const char *s, int *n, char **endptr, int base ) { 4b734: 4e56 ffec linkw %fp,#-20 4b738: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b73c: 262e 0008 movel %fp@(8),%d3 4b740: 246e 000c moveal %fp@(12),%a2 4b744: 266e 0010 moveal %fp@(16),%a3 long result; char *end; if ( !n ) 4b748: 4a8a tstl %a2 4b74a: 6604 bnes 4b750 4b74c: 7009 moveq #9,%d0 4b74e: 605e bras 4b7ae return RTEMS_INVALID_ADDRESS; errno = 0; 4b750: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4b756: 2040 moveal %d0,%a0 4b758: 4290 clrl %a0@ *n = 0; result = strtol( s, &end, base ); 4b75a: 2f2e 0014 movel %fp@(20),%sp@- 4b75e: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b762: 4292 clrl %a2@ result = strtol( s, &end, base ); 4b764: 2f03 movel %d3,%sp@- 4b766: 4eb9 0005 02a2 jsr 502a2 if ( endptr ) 4b76c: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtol( s, &end, base ); 4b770: 2400 movel %d0,%d2 if ( endptr ) 4b772: 4a8b tstl %a3 4b774: 6704 beqs 4b77a *endptr = end; 4b776: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4b77a: b6ae fffc cmpl %fp@(-4),%d3 4b77e: 6604 bnes 4b784 4b780: 700b moveq #11,%d0 4b782: 602a bras 4b7ae return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4b784: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4b78a: 7222 moveq #34,%d1 4b78c: 2040 moveal %d0,%a0 4b78e: b290 cmpl %a0@,%d1 4b790: 6614 bnes 4b7a6 4b792: 4a82 tstl %d2 4b794: 6716 beqs 4b7ac <== NEVER TAKEN 4b796: 0c82 7fff ffff cmpil #2147483647,%d2 4b79c: 670e beqs 4b7ac <== ALWAYS TAKEN 4b79e: 0c82 8000 0000 cmpil #-2147483648,%d2 <== NOT EXECUTED 4b7a4: 6706 beqs 4b7ac <== NOT EXECUTED errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 4b7a6: 2482 movel %d2,%a2@ 4b7a8: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4b7aa: 6002 bras 4b7ae 4b7ac: 700a moveq #10,%d0 } 4b7ae: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b7b4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b858 : const char *s, long *n, char **endptr, int base ) { 4b858: 4e56 ffec linkw %fp,#-20 4b85c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b860: 262e 0008 movel %fp@(8),%d3 4b864: 246e 000c moveal %fp@(12),%a2 4b868: 266e 0010 moveal %fp@(16),%a3 long result; char *end; if ( !n ) 4b86c: 4a8a tstl %a2 4b86e: 6604 bnes 4b874 4b870: 7009 moveq #9,%d0 4b872: 605e bras 4b8d2 return RTEMS_INVALID_ADDRESS; errno = 0; 4b874: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4b87a: 2040 moveal %d0,%a0 4b87c: 4290 clrl %a0@ *n = 0; result = strtol( s, &end, base ); 4b87e: 2f2e 0014 movel %fp@(20),%sp@- 4b882: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b886: 4292 clrl %a2@ result = strtol( s, &end, base ); 4b888: 2f03 movel %d3,%sp@- 4b88a: 4eb9 0005 02a2 jsr 502a2 if ( endptr ) 4b890: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtol( s, &end, base ); 4b894: 2400 movel %d0,%d2 if ( endptr ) 4b896: 4a8b tstl %a3 4b898: 6704 beqs 4b89e *endptr = end; 4b89a: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4b89e: b6ae fffc cmpl %fp@(-4),%d3 4b8a2: 6604 bnes 4b8a8 4b8a4: 700b moveq #11,%d0 4b8a6: 602a bras 4b8d2 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4b8a8: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4b8ae: 7222 moveq #34,%d1 4b8b0: 2040 moveal %d0,%a0 4b8b2: b290 cmpl %a0@,%d1 4b8b4: 6614 bnes 4b8ca 4b8b6: 4a82 tstl %d2 4b8b8: 6716 beqs 4b8d0 <== NEVER TAKEN 4b8ba: 0c82 7fff ffff cmpil #2147483647,%d2 4b8c0: 670e beqs 4b8d0 4b8c2: 0c82 8000 0000 cmpil #-2147483648,%d2 4b8c8: 6706 beqs 4b8d0 <== ALWAYS TAKEN (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 4b8ca: 2482 movel %d2,%a2@ 4b8cc: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4b8ce: 6002 bras 4b8d2 4b8d0: 700a moveq #10,%d0 } 4b8d2: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b8d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b7b8 : const char *s, long long *n, char **endptr, int base ) { 4b7b8: 4e56 ffe8 linkw %fp,#-24 4b7bc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4b7c0: 242e 0008 movel %fp@(8),%d2 4b7c4: 246e 000c moveal %fp@(12),%a2 4b7c8: 266e 0010 moveal %fp@(16),%a3 long long result; char *end; if ( !n ) 4b7cc: 4a8a tstl %a2 4b7ce: 6604 bnes 4b7d4 4b7d0: 7009 moveq #9,%d0 4b7d2: 607a bras 4b84e return RTEMS_INVALID_ADDRESS; errno = 0; 4b7d4: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4b7da: 2040 moveal %d0,%a0 *n = 0; 4b7dc: 4280 clrl %d0 4b7de: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b7e0: 4290 clrl %a0@ *n = 0; 4b7e2: 2480 movel %d0,%a2@ 4b7e4: 2541 0004 movel %d1,%a2@(4) result = strtoll( s, &end, base ); 4b7e8: 2f2e 0014 movel %fp@(20),%sp@- 4b7ec: 486e fffc pea %fp@(-4) 4b7f0: 2f02 movel %d2,%sp@- 4b7f2: 4eb9 0005 02c4 jsr 502c4 if ( endptr ) 4b7f8: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoll( s, &end, base ); 4b7fc: 2600 movel %d0,%d3 4b7fe: 2801 movel %d1,%d4 if ( endptr ) 4b800: 4a8b tstl %a3 4b802: 6704 beqs 4b808 *endptr = end; 4b804: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4b808: b4ae fffc cmpl %fp@(-4),%d2 4b80c: 6604 bnes 4b812 4b80e: 700b moveq #11,%d0 4b810: 603c bras 4b84e return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4b812: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4b818: 7222 moveq #34,%d1 4b81a: 2040 moveal %d0,%a0 4b81c: b290 cmpl %a0@,%d1 4b81e: 6622 bnes 4b842 4b820: 2003 movel %d3,%d0 4b822: 8084 orl %d4,%d0 4b824: 6726 beqs 4b84c <== NEVER TAKEN 4b826: 203c 7fff ffff movel #2147483647,%d0 4b82c: 72ff moveq #-1,%d1 4b82e: 9284 subl %d4,%d1 4b830: 9183 subxl %d3,%d0 4b832: 6718 beqs 4b84c 4b834: 203c 8000 0000 movel #-2147483648,%d0 4b83a: 4281 clrl %d1 4b83c: 9284 subl %d4,%d1 4b83e: 9183 subxl %d3,%d0 4b840: 670a beqs 4b84c <== ALWAYS TAKEN (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 4b842: 4280 clrl %d0 4b844: 2483 movel %d3,%a2@ 4b846: 2544 0004 movel %d4,%a2@(4) return RTEMS_SUCCESSFUL; 4b84a: 6002 bras 4b84e 4b84c: 700a moveq #10,%d0 } 4b84e: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 4b854: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b8f8 : const char *s, unsigned char *n, char **endptr, int base ) { 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 unsigned long result; char *end; if ( !n ) 4b90c: 4a8a tstl %a2 4b90e: 6604 bnes 4b914 4b910: 7009 moveq #9,%d0 4b912: 606c bras 4b980 return RTEMS_INVALID_ADDRESS; errno = 0; 4b914: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4b91a: 2040 moveal %d0,%a0 4b91c: 4290 clrl %a0@ *n = 0; 4b91e: 4212 clrb %a2@ result = strtoul( s, &end, base ); 4b920: 2f2e 0014 movel %fp@(20),%sp@- 4b924: 486e fffc pea %fp@(-4) 4b928: 2f03 movel %d3,%sp@- 4b92a: 4eb9 0005 06d4 jsr 506d4 if ( endptr ) 4b930: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); 4b934: 2400 movel %d0,%d2 if ( endptr ) 4b936: 4a8b tstl %a3 4b938: 6704 beqs 4b93e *endptr = end; 4b93a: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4b93e: b6ae fffc cmpl %fp@(-4),%d3 4b942: 6604 bnes 4b948 4b944: 700b moveq #11,%d0 4b946: 6038 bras 4b980 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4b948: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4b94e: 7222 moveq #34,%d1 4b950: 2040 moveal %d0,%a0 4b952: b290 cmpl %a0@,%d1 4b954: 660e bnes 4b964 <== ALWAYS TAKEN 4b956: 2002 movel %d2,%d0 <== NOT EXECUTED 4b958: 5380 subql #1,%d0 <== NOT EXECUTED 4b95a: 72fd moveq #-3,%d1 <== NOT EXECUTED 4b95c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4b95e: 6404 bccs 4b964 <== NOT EXECUTED 4b960: 700a moveq #10,%d0 <== NOT EXECUTED 4b962: 601c bras 4b980 <== NOT EXECUTED (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { 4b964: 0c82 0000 00ff cmpil #255,%d2 4b96a: 6310 blss 4b97c <== ALWAYS TAKEN errno = ERANGE; 4b96c: 4eb9 0004 d6cc jsr 4d6cc <__errno> <== NOT EXECUTED 4b972: 7222 moveq #34,%d1 <== NOT EXECUTED 4b974: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b976: 700a moveq #10,%d0 <== NOT EXECUTED 4b978: 2081 movel %d1,%a0@ <== NOT EXECUTED return RTEMS_INVALID_NUMBER; 4b97a: 6004 bras 4b980 <== NOT EXECUTED } #endif *n = result; 4b97c: 4280 clrl %d0 4b97e: 1482 moveb %d2,%a2@ return RTEMS_SUCCESSFUL; } 4b980: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b986: 4e5e unlk %fp ... =============================================================================== 0004b98c : const char *s, unsigned int *n, char **endptr, int base ) { 4b98c: 4e56 ffec linkw %fp,#-20 4b990: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b994: 262e 0008 movel %fp@(8),%d3 4b998: 246e 000c moveal %fp@(12),%a2 4b99c: 266e 0010 moveal %fp@(16),%a3 unsigned long result; char *end; if ( !n ) 4b9a0: 4a8a tstl %a2 4b9a2: 6604 bnes 4b9a8 4b9a4: 7009 moveq #9,%d0 4b9a6: 6054 bras 4b9fc return RTEMS_INVALID_ADDRESS; errno = 0; 4b9a8: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4b9ae: 2040 moveal %d0,%a0 4b9b0: 4290 clrl %a0@ *n = 0; result = strtoul( s, &end, base ); 4b9b2: 2f2e 0014 movel %fp@(20),%sp@- 4b9b6: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b9ba: 4292 clrl %a2@ result = strtoul( s, &end, base ); 4b9bc: 2f03 movel %d3,%sp@- 4b9be: 4eb9 0005 06d4 jsr 506d4 if ( endptr ) 4b9c4: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); 4b9c8: 2400 movel %d0,%d2 if ( endptr ) 4b9ca: 4a8b tstl %a3 4b9cc: 6704 beqs 4b9d2 *endptr = end; 4b9ce: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4b9d2: b6ae fffc cmpl %fp@(-4),%d3 4b9d6: 6604 bnes 4b9dc 4b9d8: 700b moveq #11,%d0 4b9da: 6020 bras 4b9fc return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4b9dc: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4b9e2: 7222 moveq #34,%d1 4b9e4: 2040 moveal %d0,%a0 4b9e6: b290 cmpl %a0@,%d1 4b9e8: 660e bnes 4b9f8 4b9ea: 2002 movel %d2,%d0 4b9ec: 5380 subql #1,%d0 4b9ee: 72fd moveq #-3,%d1 4b9f0: b280 cmpl %d0,%d1 4b9f2: 6404 bccs 4b9f8 <== NEVER TAKEN 4b9f4: 700a moveq #10,%d0 4b9f6: 6004 bras 4b9fc errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 4b9f8: 2482 movel %d2,%a2@ 4b9fa: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4b9fc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4ba02: 4e5e unlk %fp ... =============================================================================== 0004ba98 : const char *s, unsigned long *n, char **endptr, int base ) { 4ba98: 4e56 ffec linkw %fp,#-20 4ba9c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4baa0: 262e 0008 movel %fp@(8),%d3 4baa4: 246e 000c moveal %fp@(12),%a2 4baa8: 266e 0010 moveal %fp@(16),%a3 unsigned long result; char *end; if ( !n ) 4baac: 4a8a tstl %a2 4baae: 6604 bnes 4bab4 4bab0: 7009 moveq #9,%d0 4bab2: 6054 bras 4bb08 return RTEMS_INVALID_ADDRESS; errno = 0; 4bab4: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4baba: 2040 moveal %d0,%a0 4babc: 4290 clrl %a0@ *n = 0; result = strtoul( s, &end, base ); 4babe: 2f2e 0014 movel %fp@(20),%sp@- 4bac2: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4bac6: 4292 clrl %a2@ result = strtoul( s, &end, base ); 4bac8: 2f03 movel %d3,%sp@- 4baca: 4eb9 0005 06d4 jsr 506d4 if ( endptr ) 4bad0: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); 4bad4: 2400 movel %d0,%d2 if ( endptr ) 4bad6: 4a8b tstl %a3 4bad8: 6704 beqs 4bade *endptr = end; 4bada: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4bade: b6ae fffc cmpl %fp@(-4),%d3 4bae2: 6604 bnes 4bae8 4bae4: 700b moveq #11,%d0 4bae6: 6020 bras 4bb08 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4bae8: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4baee: 7222 moveq #34,%d1 4baf0: 2040 moveal %d0,%a0 4baf2: b290 cmpl %a0@,%d1 4baf4: 660e bnes 4bb04 4baf6: 2002 movel %d2,%d0 4baf8: 5380 subql #1,%d0 4bafa: 72fd moveq #-3,%d1 4bafc: b280 cmpl %d0,%d1 4bafe: 6404 bccs 4bb04 <== NEVER TAKEN 4bb00: 700a moveq #10,%d0 4bb02: 6004 bras 4bb08 (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 4bb04: 2482 movel %d2,%a2@ 4bb06: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4bb08: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4bb0e: 4e5e unlk %fp ... =============================================================================== 0004ba08 : const char *s, unsigned long long *n, char **endptr, int base ) { 4ba08: 4e56 ffe0 linkw %fp,#-32 4ba0c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4ba10: 242e 0008 movel %fp@(8),%d2 4ba14: 246e 000c moveal %fp@(12),%a2 4ba18: 266e 0010 moveal %fp@(16),%a3 unsigned long long result; char *end; if ( !n ) 4ba1c: 4a8a tstl %a2 4ba1e: 6604 bnes 4ba24 4ba20: 7009 moveq #9,%d0 4ba22: 606a bras 4ba8e return RTEMS_INVALID_ADDRESS; errno = 0; 4ba24: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4ba2a: 2040 moveal %d0,%a0 *n = 0; 4ba2c: 4280 clrl %d0 4ba2e: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4ba30: 4290 clrl %a0@ *n = 0; 4ba32: 2480 movel %d0,%a2@ 4ba34: 2541 0004 movel %d1,%a2@(4) result = strtoull( s, &end, base ); 4ba38: 2f2e 0014 movel %fp@(20),%sp@- 4ba3c: 486e fffc pea %fp@(-4) 4ba40: 2f02 movel %d2,%sp@- 4ba42: 4eb9 0005 06f4 jsr 506f4 if ( endptr ) 4ba48: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoull( s, &end, base ); 4ba4c: 2600 movel %d0,%d3 4ba4e: 2801 movel %d1,%d4 if ( endptr ) 4ba50: 4a8b tstl %a3 4ba52: 6704 beqs 4ba58 *endptr = end; 4ba54: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4ba58: b4ae fffc cmpl %fp@(-4),%d2 4ba5c: 6604 bnes 4ba62 4ba5e: 700b moveq #11,%d0 4ba60: 602c bras 4ba8e return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4ba62: 4eb9 0004 d6cc jsr 4d6cc <__errno> 4ba68: 7222 moveq #34,%d1 4ba6a: 2040 moveal %d0,%a0 4ba6c: b290 cmpl %a0@,%d1 4ba6e: 6616 bnes 4ba86 4ba70: 70ff moveq #-1,%d0 4ba72: 72ff moveq #-1,%d1 4ba74: 7aff moveq #-1,%d5 4ba76: 7cfd moveq #-3,%d6 4ba78: d284 addl %d4,%d1 4ba7a: d183 addxl %d3,%d0 4ba7c: 9c81 subl %d1,%d6 4ba7e: 9b80 subxl %d0,%d5 4ba80: 6404 bccs 4ba86 <== NEVER TAKEN 4ba82: 700a moveq #10,%d0 4ba84: 6008 bras 4ba8e (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 4ba86: 4280 clrl %d0 4ba88: 2483 movel %d3,%a2@ 4ba8a: 2544 0004 movel %d4,%a2@(4) return RTEMS_SUCCESSFUL; } 4ba8e: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 4ba94: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cc14 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4cc14: 4e56 ffe4 linkw %fp,#-28 4cc18: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4cc1c: 262e 0008 movel %fp@(8),%d3 4cc20: 282e 000c movel %fp@(12),%d4 4cc24: 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 ) 4cc28: 4a8c tstl %a4 4cc2a: 6606 bnes 4cc32 4cc2c: 7009 moveq #9,%d0 4cc2e: 6000 00fc braw 4cd2c return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4cc32: 2479 0005 dcd6 moveal 5dcd6 <_Thread_Executing>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4cc38: 4a2a 0075 tstb %a2@(117) 4cc3c: 57c0 seq %d0 4cc3e: 243c 0000 0100 movel #256,%d2 4cc44: 49c0 extbl %d0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4cc46: 266a 0108 moveal %a2@(264),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4cc4a: c480 andl %d0,%d2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4cc4c: 4aaa 007a tstl %a2@(122) 4cc50: 6704 beqs 4cc56 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4cc52: 08c2 0009 bset #9,%d2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4cc56: 4a2b 0008 tstb %a3@(8) 4cc5a: 57c0 seq %d0 4cc5c: 2a3c 0000 0400 movel #1024,%d5 4cc62: 49c0 extbl %d0 4cc64: ca80 andl %d0,%d5 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 4cc66: 4eb9 0004 88f0 jsr 488f0 <_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; 4cc6c: 8085 orl %d5,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4cc6e: 8082 orl %d2,%d0 4cc70: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4cc72: 0804 0008 btst #8,%d4 4cc76: 670e beqs 4cc86 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4cc78: 2003 movel %d3,%d0 4cc7a: 7201 moveq #1,%d1 4cc7c: e088 lsrl #8,%d0 4cc7e: b380 eorl %d1,%d0 4cc80: c081 andl %d1,%d0 4cc82: 1540 0075 moveb %d0,%a2@(117) if ( mask & RTEMS_TIMESLICE_MASK ) { 4cc86: 0804 0009 btst #9,%d4 4cc8a: 671c beqs 4cca8 if ( _Modes_Is_timeslice(mode_set) ) { 4cc8c: 0803 0009 btst #9,%d3 4cc90: 6712 beqs 4cca4 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4cc92: 41f9 0005 dbcc lea 5dbcc <_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; 4cc98: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4cc9a: 2550 0076 movel %a0@,%a2@(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; 4cc9e: 2540 007a movel %d0,%a2@(122) 4cca2: 6004 bras 4cca8 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4cca4: 42aa 007a clrl %a2@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4cca8: 7007 moveq #7,%d0 4ccaa: c084 andl %d4,%d0 4ccac: 6712 beqs 4ccc0 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4ccae: 40c0 movew %sr,%d0 4ccb0: 7207 moveq #7,%d1 4ccb2: c283 andl %d3,%d1 4ccb4: 0280 0000 f8ff andil #63743,%d0 4ccba: e189 lsll #8,%d1 4ccbc: 8081 orl %d1,%d0 4ccbe: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4ccc0: 0804 000a btst #10,%d4 4ccc4: 6744 beqs 4cd0a * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4ccc6: 700a moveq #10,%d0 4ccc8: e0ab lsrl %d0,%d3 4ccca: 7201 moveq #1,%d1 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4cccc: 4280 clrl %d0 4ccce: 102b 0008 moveb %a3@(8),%d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4ccd2: b383 eorl %d1,%d3 4ccd4: c681 andl %d1,%d3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4ccd6: b083 cmpl %d3,%d0 4ccd8: 6730 beqs 4cd0a ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4ccda: 203c 0000 0700 movel #1792,%d0 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 ) { asr->is_enabled = is_asr_enabled; 4cce0: 1743 0008 moveb %d3,%a3@(8) 4cce4: 40c1 movew %sr,%d1 4cce6: 8081 orl %d1,%d0 4cce8: 46c0 movew %d0,%sr _signals = information->signals_pending; 4ccea: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4ccee: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4ccf4: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4ccf8: 46c1 movew %d1,%sr if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4ccfa: 4aab 0012 tstl %a3@(18) 4ccfe: 670a beqs 4cd0a if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 4cd00: 7001 moveq #1,%d0 4cd02: 7401 moveq #1,%d2 4cd04: 1540 0074 moveb %d0,%a2@(116) 4cd08: 6002 bras 4cd0c 4cd0a: 4202 clrb %d2 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4cd0c: 7203 moveq #3,%d1 4cd0e: b2b9 0005 dd9e cmpl 5dd9e <_System_state_Current>,%d1 4cd14: 6614 bnes 4cd2a <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4cd16: 4eb9 0004 cef0 jsr 4cef0 <_Thread_Evaluate_mode> 4cd1c: 4a00 tstb %d0 4cd1e: 6604 bnes 4cd24 4cd20: 4a02 tstb %d2 4cd22: 6706 beqs 4cd2a _Thread_Dispatch(); 4cd24: 4eb9 0004 74e0 jsr 474e0 <_Thread_Dispatch> 4cd2a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4cd2c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4cd32: 4e5e unlk %fp ... =============================================================================== 0004955c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4955c: 4e56 fffc linkw %fp,#-4 49560: 2f0a movel %a2,%sp@- 49562: 246e 0010 moveal %fp@(16),%a2 49566: 2f02 movel %d2,%sp@- 49568: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4956c: 6710 beqs 4957e 4956e: 4280 clrl %d0 49570: 1039 0005 fd62 moveb 5fd62 ,%d0 49576: b082 cmpl %d2,%d0 49578: 6404 bccs 4957e 4957a: 7013 moveq #19,%d0 4957c: 6054 bras 495d2 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4957e: 4a8a tstl %a2 49580: 6604 bnes 49586 49582: 7009 moveq #9,%d0 49584: 604c bras 495d2 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 49586: 486e fffc pea %fp@(-4) 4958a: 2f2e 0008 movel %fp@(8),%sp@- 4958e: 4eb9 0004 b1e8 jsr 4b1e8 <_Thread_Get> switch ( location ) { 49594: 508f addql #8,%sp return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 49596: 2040 moveal %d0,%a0 switch ( location ) { 49598: 4aae fffc tstl %fp@(-4) 4959c: 6704 beqs 495a2 4959e: 7004 moveq #4,%d0 495a0: 6030 bras 495d2 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 495a2: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 495a6: 4a82 tstl %d2 495a8: 6720 beqs 495ca the_thread->real_priority = new_priority; 495aa: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 495ae: 4aa8 001c tstl %a0@(28) 495b2: 6706 beqs 495ba the_thread->current_priority > new_priority ) 495b4: b4a8 0014 cmpl %a0@(20),%d2 495b8: 6410 bccs 495ca <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 495ba: 42a7 clrl %sp@- 495bc: 2f02 movel %d2,%sp@- 495be: 2f08 movel %a0,%sp@- 495c0: 4eb9 0004 ac98 jsr 4ac98 <_Thread_Change_priority> 495c6: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 495ca: 4eb9 0004 b192 jsr 4b192 <_Thread_Enable_dispatch> 495d0: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 495d2: 242e fff4 movel %fp@(-12),%d2 495d6: 246e fff8 moveal %fp@(-8),%a2 495da: 4e5e unlk %fp ... =============================================================================== 00044710 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44710: 7209 moveq #9,%d1 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 44712: 4e56 0000 linkw %fp,#0 44716: 202e 0008 movel %fp@(8),%d0 int baud_index; switch (termios_baud) { 4471a: b280 cmpl %d0,%d1 4471c: 6700 00ce beqw 447ec 44720: 6d54 blts 44776 <== NEVER TAKEN 44722: 123c 0004 moveb #4,%d1 44726: b280 cmpl %d0,%d1 44728: 6700 00ae beqw 447d8 4472c: 6d2a blts 44758 <== NEVER TAKEN 4472e: 123c 0001 moveb #1,%d1 44732: b280 cmpl %d0,%d1 44734: 6700 0092 beqw 447c8 44738: 6d0a blts 44744 <== NEVER TAKEN 4473a: 4a80 tstl %d0 4473c: 6700 008e beqw 447cc 44740: 6000 00d6 braw 44818 44744: 7202 moveq #2,%d1 44746: b280 cmpl %d0,%d1 <== NOT EXECUTED 44748: 6700 0086 beqw 447d0 <== NOT EXECUTED 4474c: 123c 0003 moveb #3,%d1 <== NOT EXECUTED 44750: b280 cmpl %d0,%d1 <== NOT EXECUTED 44752: 6600 00c4 bnew 44818 <== NOT EXECUTED 44756: 607c bras 447d4 <== NOT EXECUTED 44758: 7206 moveq #6,%d1 <== NOT EXECUTED 4475a: b280 cmpl %d0,%d1 <== NOT EXECUTED 4475c: 6700 0082 beqw 447e0 <== NOT EXECUTED 44760: 6e7a bgts 447dc <== NOT EXECUTED 44762: 123c 0007 moveb #7,%d1 <== NOT EXECUTED 44766: b280 cmpl %d0,%d1 <== NOT EXECUTED 44768: 677a beqs 447e4 <== NOT EXECUTED 4476a: 123c 0008 moveb #8,%d1 <== NOT EXECUTED 4476e: b280 cmpl %d0,%d1 <== NOT EXECUTED 44770: 6600 00a6 bnew 44818 <== NOT EXECUTED 44774: 6072 bras 447e8 <== NOT EXECUTED 44776: 720e moveq #14,%d1 <== NOT EXECUTED 44778: b280 cmpl %d0,%d1 <== NOT EXECUTED 4477a: 6700 0084 beqw 44800 <== NOT EXECUTED 4477e: 6d1c blts 4479c <== NOT EXECUTED 44780: 123c 000b moveb #11,%d1 <== NOT EXECUTED 44784: b280 cmpl %d0,%d1 <== NOT EXECUTED 44786: 676c beqs 447f4 <== NOT EXECUTED 44788: 6e66 bgts 447f0 <== NOT EXECUTED 4478a: 123c 000c moveb #12,%d1 <== NOT EXECUTED 4478e: b280 cmpl %d0,%d1 <== NOT EXECUTED 44790: 6766 beqs 447f8 <== NOT EXECUTED 44792: 123c 000d moveb #13,%d1 <== NOT EXECUTED 44796: b280 cmpl %d0,%d1 <== NOT EXECUTED 44798: 667e bnes 44818 <== NOT EXECUTED 4479a: 6060 bras 447fc <== NOT EXECUTED 4479c: 0c80 0000 1002 cmpil #4098,%d0 <== NOT EXECUTED 447a2: 6768 beqs 4480c <== NOT EXECUTED 447a4: 6e10 bgts 447b6 <== NOT EXECUTED 447a6: 720f moveq #15,%d1 <== NOT EXECUTED 447a8: b280 cmpl %d0,%d1 <== NOT EXECUTED 447aa: 6758 beqs 44804 <== NOT EXECUTED 447ac: 0c80 0000 1001 cmpil #4097,%d0 <== NOT EXECUTED 447b2: 6664 bnes 44818 <== NOT EXECUTED 447b4: 6052 bras 44808 <== NOT EXECUTED 447b6: 0c80 0000 1003 cmpil #4099,%d0 <== NOT EXECUTED 447bc: 6752 beqs 44810 <== NOT EXECUTED 447be: 0c80 0000 1004 cmpil #4100,%d0 <== NOT EXECUTED 447c4: 6652 bnes 44818 <== NOT EXECUTED 447c6: 604c bras 44814 <== NOT EXECUTED 447c8: 7001 moveq #1,%d0 <== NOT EXECUTED 447ca: 604e bras 4481a <== NOT EXECUTED 447cc: 4280 clrl %d0 <== NOT EXECUTED 447ce: 604a bras 4481a <== NOT EXECUTED 447d0: 7002 moveq #2,%d0 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 447d2: 6046 bras 4481a <== NOT EXECUTED 447d4: 7003 moveq #3,%d0 <== NOT EXECUTED case B110: baud_index = 3; break; 447d6: 6042 bras 4481a <== NOT EXECUTED 447d8: 7004 moveq #4,%d0 <== NOT EXECUTED case B134: baud_index = 4; break; 447da: 603e bras 4481a <== NOT EXECUTED 447dc: 7005 moveq #5,%d0 <== NOT EXECUTED case B150: baud_index = 5; break; 447de: 603a bras 4481a <== NOT EXECUTED 447e0: 7006 moveq #6,%d0 <== NOT EXECUTED case B200: baud_index = 6; break; 447e2: 6036 bras 4481a <== NOT EXECUTED 447e4: 7007 moveq #7,%d0 <== NOT EXECUTED case B300: baud_index = 7; break; 447e6: 6032 bras 4481a <== NOT EXECUTED 447e8: 7008 moveq #8,%d0 <== NOT EXECUTED case B600: baud_index = 8; break; 447ea: 602e bras 4481a <== NOT EXECUTED 447ec: 7009 moveq #9,%d0 <== NOT EXECUTED case B1200: baud_index = 9; break; 447ee: 602a bras 4481a <== NOT EXECUTED 447f0: 700a moveq #10,%d0 <== NOT EXECUTED case B1800: baud_index = 10; break; 447f2: 6026 bras 4481a <== NOT EXECUTED 447f4: 700b moveq #11,%d0 <== NOT EXECUTED case B2400: baud_index = 11; break; 447f6: 6022 bras 4481a <== NOT EXECUTED 447f8: 700c moveq #12,%d0 <== NOT EXECUTED case B4800: baud_index = 12; break; 447fa: 601e bras 4481a <== NOT EXECUTED 447fc: 700d moveq #13,%d0 <== NOT EXECUTED case B9600: baud_index = 13; break; 447fe: 601a bras 4481a <== NOT EXECUTED 44800: 700e moveq #14,%d0 <== NOT EXECUTED case B19200: baud_index = 14; break; 44802: 6016 bras 4481a <== NOT EXECUTED 44804: 700f moveq #15,%d0 <== NOT EXECUTED case B38400: baud_index = 15; break; 44806: 6012 bras 4481a <== NOT EXECUTED 44808: 7010 moveq #16,%d0 <== NOT EXECUTED case B57600: baud_index = 16; break; 4480a: 600e bras 4481a <== NOT EXECUTED 4480c: 7011 moveq #17,%d0 <== NOT EXECUTED case B115200: baud_index = 17; break; 4480e: 600a bras 4481a <== NOT EXECUTED 44810: 7012 moveq #18,%d0 <== NOT EXECUTED case B230400: baud_index = 18; break; 44812: 6006 bras 4481a <== NOT EXECUTED 44814: 7013 moveq #19,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; 44816: 6002 bras 4481a <== NOT EXECUTED 44818: 70ff moveq #-1,%d0 default: baud_index = -1; break; } return baud_index; } 4481a: 4e5e unlk %fp ... =============================================================================== 000435d8 : 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; 435d8: 203c 0000 04b0 movel #1200,%d0 #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 435de: 4e56 0000 linkw %fp,#0 435e2: 222e 0008 movel %fp@(8),%d1 435e6: 2f02 movel %d2,%sp@- int32_t baud; switch (termios_baud) { 435e8: 7409 moveq #9,%d2 435ea: b481 cmpl %d1,%d2 435ec: 6700 0108 beqw 436f6 435f0: 6d6c blts 4365e 435f2: 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; 435f6: 303c 0086 movew #134,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 435fa: b481 cmpl %d1,%d2 435fc: 6700 00f8 beqw 436f6 43600: 6d2a blts 4362c 43602: 103c 0001 moveb #1,%d0 43606: b081 cmpl %d1,%d0 43608: 6700 00da beqw 436e4 4360c: 6d0a blts 43618 4360e: 4a81 tstl %d1 43610: 6700 00d6 beqw 436e8 43614: 6000 00de braw 436f4 43618: 7402 moveq #2,%d2 4361a: b481 cmpl %d1,%d2 4361c: 6700 00ce beqw 436ec 43620: 7003 moveq #3,%d0 43622: b081 cmpl %d1,%d0 43624: 6600 00ce bnew 436f4 43628: 6000 00c6 braw 436f0 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; 4362c: 203c 0000 00c8 movel #200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43632: 7406 moveq #6,%d2 43634: b481 cmpl %d1,%d2 43636: 6700 00be beqw 436f6 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; 4363a: 0680 ffff ffce addil #-50,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43640: b481 cmpl %d1,%d2 43642: 6e00 00b2 bgtw 436f6 43646: 143c 0007 moveb #7,%d2 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; 4364a: 303c 012c movew #300,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4364e: b481 cmpl %d1,%d2 43650: 6700 00a4 beqw 436f6 43654: 143c 0008 moveb #8,%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; 43658: 303c 0258 movew #600,%d0 4365c: 6038 bras 43696 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; 4365e: 203c 0000 4b00 movel #19200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43664: 740e moveq #14,%d2 43666: b481 cmpl %d1,%d2 43668: 6700 008c beqw 436f6 4366c: 6d2e blts 4369c 4366e: 143c 000b moveb #11,%d2 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; 43672: 303c 0960 movew #2400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43676: b481 cmpl %d1,%d2 43678: 677c beqs 436f6 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; 4367a: 303c 0708 movew #1800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4367e: b481 cmpl %d1,%d2 43680: 6e74 bgts 436f6 43682: 143c 000c moveb #12,%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; 43686: 303c 12c0 movew #4800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4368a: b481 cmpl %d1,%d2 4368c: 6768 beqs 436f6 4368e: 143c 000d moveb #13,%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; 43692: 303c 2580 movew #9600,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43696: b481 cmpl %d1,%d2 43698: 665a bnes 436f4 <== NEVER TAKEN 4369a: 605a bras 436f6 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; 4369c: 203c 0001 c200 movel #115200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 436a2: 0c81 0000 1002 cmpil #4098,%d1 436a8: 674c beqs 436f6 436aa: 6e1a bgts 436c6 436ac: 740f moveq #15,%d2 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; 436ae: 203c 0000 9600 movel #38400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 436b4: b481 cmpl %d1,%d2 436b6: 673e beqs 436f6 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; 436b8: 303c e100 movew #-7936,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 436bc: 0c81 0000 1001 cmpil #4097,%d1 436c2: 6630 bnes 436f4 <== NEVER TAKEN 436c4: 6030 bras 436f6 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; 436c6: 203c 0003 8400 movel #230400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 436cc: 0c81 0000 1003 cmpil #4099,%d1 436d2: 6722 beqs 436f6 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; 436d4: 203c 0007 0800 movel #460800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 436da: 0c81 0000 1004 cmpil #4100,%d1 436e0: 6612 bnes 436f4 <== NEVER TAKEN 436e2: 6012 bras 436f6 436e4: 7032 moveq #50,%d0 436e6: 600e bras 436f6 436e8: 4280 clrl %d0 436ea: 600a bras 436f6 436ec: 704b moveq #75,%d0 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 436ee: 6006 bras 436f6 436f0: 706e moveq #110,%d0 case B110: baud = 110; break; 436f2: 6002 bras 436f6 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; 436f4: 70ff moveq #-1,%d0 default: baud = -1; break; } return baud; } 436f6: 241f movel %sp@+,%d2 436f8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043738 : { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 43738: 4280 clrl %d0 <== NOT EXECUTED rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 4373a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 4373e: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED 43742: 23d0 0005 c520 movel %a0@,5c520 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 43748: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 4374c: 23d0 0005 c524 movel %a0@,5c524 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 43752: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 43756: 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; 43758: 23d0 0005 c528 movel %a0@,5c528 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } =============================================================================== 00044920 : } } rtems_status_code rtems_termios_close (void *arg) { 44920: 4e56 fff4 linkw %fp,#-12 44924: 48d7 1c00 moveml %a2-%a4,%sp@ 44928: 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 (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4492c: 49f9 0004 57c0 lea 457c0 ,%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; 44932: 2053 moveal %a3@,%a0 44934: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44938: 42a7 clrl %sp@- 4493a: 42a7 clrl %sp@- 4493c: 2f39 0005 db04 movel 5db04 ,%sp@- 44942: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 44944: 4fef 000c lea %sp@(12),%sp 44948: 4a80 tstl %d0 4494a: 6670 bnes 449bc <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 4494c: 202a 0008 movel %a2@(8),%d0 44950: 5380 subql #1,%d0 44952: 2540 0008 movel %d0,%a2@(8) 44956: 6600 0110 bnew 44a68 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 4495a: 202a 00cc movel %a2@(204),%d0 4495e: 41f9 0005 d2c0 lea 5d2c0 ,%a0 44964: e788 lsll #3,%d0 44966: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 4496a: 4a88 tstl %a0 4496c: 6706 beqs 44974 <== ALWAYS TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 4496e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44970: 4e90 jsr %a0@ <== NOT EXECUTED 44972: 6018 bras 4498c <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44974: 42a7 clrl %sp@- 44976: 42a7 clrl %sp@- 44978: 2f2a 0018 movel %a2@(24),%sp@- 4497c: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) { 4497e: 4fef 000c lea %sp@(12),%sp 44982: 4a80 tstl %d0 44984: 6636 bnes 449bc <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 44986: 2f0a movel %a2,%sp@- 44988: 4eba f940 jsr %pc@(442ca ) 4498c: 588f addql #4,%sp } if (tty->device.outputUsesInterrupts 4498e: 7002 moveq #2,%d0 44990: b0aa 00b4 cmpl %a2@(180),%d0 44994: 662e bnes 449c4 <== ALWAYS TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 44996: 4878 0001 pea 1 <== NOT EXECUTED 4499a: 49f9 0004 536c lea 4536c ,%a4 <== NOT EXECUTED 449a0: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 449a4: 4e94 jsr %a4@ <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 449a6: 508f addql #8,%sp <== NOT EXECUTED 449a8: 4a80 tstl %d0 <== NOT EXECUTED 449aa: 6610 bnes 449bc <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 449ac: 4878 0001 pea 1 <== NOT EXECUTED 449b0: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 449b4: 4e94 jsr %a4@ <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 449b6: 508f addql #8,%sp <== NOT EXECUTED 449b8: 4a80 tstl %d0 <== NOT EXECUTED 449ba: 6708 beqs 449c4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 449bc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 449be: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED } if (tty->device.lastClose) 449c4: 206a 009c moveal %a2@(156),%a0 449c8: 4a88 tstl %a0 449ca: 6710 beqs 449dc (*tty->device.lastClose)(tty->major, tty->minor, arg); 449cc: 2f0b movel %a3,%sp@- 449ce: 2f2a 0010 movel %a2@(16),%sp@- 449d2: 2f2a 000c movel %a2@(12),%sp@- 449d6: 4e90 jsr %a0@ 449d8: 4fef 000c lea %sp@(12),%sp if (tty->forw == NULL) { 449dc: 2052 moveal %a2@,%a0 449de: 4a88 tstl %a0 449e0: 6610 bnes 449f2 rtems_termios_ttyTail = tty->back; 449e2: 206a 0004 moveal %a2@(4),%a0 449e6: 23c8 0005 db08 movel %a0,5db08 if ( rtems_termios_ttyTail != NULL ) { 449ec: 670a beqs 449f8 <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; 449ee: 4290 clrl %a0@ <== NOT EXECUTED 449f0: 6006 bras 449f8 <== NOT EXECUTED } } else { tty->forw->back = tty->back; 449f2: 216a 0004 0004 movel %a2@(4),%a0@(4) } if (tty->back == NULL) { 449f8: 206a 0004 moveal %a2@(4),%a0 449fc: 4a88 tstl %a0 449fe: 6610 bnes 44a10 <== NEVER TAKEN rtems_termios_ttyHead = tty->forw; 44a00: 2052 moveal %a2@,%a0 44a02: 23c8 0005 db0c movel %a0,5db0c if ( rtems_termios_ttyHead != NULL ) { 44a08: 6708 beqs 44a12 rtems_termios_ttyHead->back = NULL; 44a0a: 42a8 0004 clrl %a0@(4) 44a0e: 6002 bras 44a12 } } else { tty->back->forw = tty->forw; 44a10: 2092 movel %a2@,%a0@ <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 44a12: 2f2a 0014 movel %a2@(20),%sp@- 44a16: 47f9 0004 5724 lea 45724 ,%a3 44a1c: 4e93 jsr %a3@ rtems_semaphore_delete (tty->osem); 44a1e: 2f2a 0018 movel %a2@(24),%sp@- 44a22: 4e93 jsr %a3@ rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 44a24: 2f2a 008c movel %a2@(140),%sp@- 44a28: 4e93 jsr %a3@ if ((tty->device.pollRead == NULL) || 44a2a: 4fef 000c lea %sp@(12),%sp 44a2e: 4aaa 00a0 tstl %a2@(160) 44a32: 6708 beqs 44a3c (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 44a34: 7002 moveq #2,%d0 44a36: b0aa 00b4 cmpl %a2@(180),%d0 44a3a: 660c bnes 44a48 <== ALWAYS TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); 44a3c: 2f2a 0068 movel %a2@(104),%sp@- 44a40: 4eb9 0004 5724 jsr 45724 44a46: 588f addql #4,%sp free (tty->rawInBuf.theBuf); 44a48: 2f2a 0058 movel %a2@(88),%sp@- 44a4c: 47f9 0004 2828 lea 42828 ,%a3 44a52: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 44a54: 2f2a 007c movel %a2@(124),%sp@- 44a58: 4e93 jsr %a3@ free (tty->cbuf); 44a5a: 2f2a 001c movel %a2@(28),%sp@- 44a5e: 4e93 jsr %a3@ free (tty); 44a60: 2f0a movel %a2,%sp@- 44a62: 4e93 jsr %a3@ 44a64: 4fef 0010 lea %sp@(16),%sp } rtems_semaphore_release (rtems_termios_ttyMutex); 44a68: 2f39 0005 db04 movel 5db04 ,%sp@- 44a6e: 4eb9 0004 58c4 jsr 458c4 return RTEMS_SUCCESSFUL; } 44a74: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 44a7a: 4280 clrl %d0 44a7c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043936 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 43936: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 4393a: 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) { 4393e: 206e 0008 moveal %fp@(8),%a0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 43942: d1a8 0090 addl %d0,%a0@(144) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 43946: 7002 moveq #2,%d0 43948: b0a8 00b4 cmpl %a0@(180),%d0 4394c: 661c bnes 4396a <== ALWAYS TAKEN /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 4394e: 4878 0002 pea 2 43952: 2f28 00c8 movel %a0@(200),%sp@- <== NOT EXECUTED 43956: 4eb9 0004 536c jsr 4536c <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 4395c: 508f addql #8,%sp <== NOT EXECUTED 4395e: 4a80 tstl %d0 <== NOT EXECUTED 43960: 672e beqs 43990 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 43962: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43964: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 4396a: 7005 moveq #5,%d0 4396c: b0a8 00cc cmpl %a0@(204),%d0 43970: 6612 bnes 43984 <== ALWAYS TAKEN /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 43972: 2279 0005 d374 moveal 5d374 ,%a1<== NOT EXECUTED 43978: 4a89 tstl %a1 <== NOT EXECUTED 4397a: 6714 beqs 43990 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 4397c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4397e: 4e91 jsr %a1@ <== NOT EXECUTED 43980: 588f addql #4,%sp <== NOT EXECUTED 43982: 600c bras 43990 <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 43984: 2d48 0008 movel %a0,%fp@(8) } } 43988: 4e5e unlk %fp rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 4398a: 4ef9 0004 377c jmp 4377c } } 43990: 4280 clrl %d0 43992: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043996 : * 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) { 43996: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 4399a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4399e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 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) { 439a2: 49f9 0005 d2c0 lea 5d2c0 ,%a4 <== NOT EXECUTED 439a8: 202a 00cc movel %a2@(204),%d0 <== 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) { 439ac: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED 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) { 439b0: eb88 lsll #5,%d0 <== 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) { 439b2: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED 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) { 439b6: 4ab4 0810 tstl %a4@(00000010,%d0:l) <== NOT EXECUTED 439ba: 6634 bnes 439f0 <== NOT EXECUTED /* * 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); 439bc: 2802 movel %d2,%d4 <== NOT EXECUTED 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, 439be: 4bea 004a lea %a2@(74),%a5 <== NOT EXECUTED /* * 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); 439c2: 49ea 0030 lea %a2@(48),%a4 <== NOT EXECUTED 439c6: 4282 clrl %d2 <== NOT EXECUTED } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); 439c8: 2c3c 0000 0700 movel #1792,%d6 <== NOT EXECUTED /* * 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); 439ce: 4200 clrb %d0 <== NOT EXECUTED 439d0: 1d40 fffb moveb %d0,%fp@(-5) <== NOT EXECUTED 439d4: 6000 01f2 braw 43bc8 <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 439d8: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 439dc: 5382 subql #1,%d2 <== NOT EXECUTED 439de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 439e0: 121b moveb %a3@+,%d1 <== NOT EXECUTED 439e2: eb88 lsll #5,%d0 <== NOT EXECUTED 439e4: 49c1 extbl %d1 <== NOT EXECUTED 439e6: 2f01 movel %d1,%sp@- <== NOT EXECUTED 439e8: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== NOT EXECUTED 439ec: 4e90 jsr %a0@ <== NOT EXECUTED 439ee: 508f addql #8,%sp <== NOT EXECUTED 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--) { 439f0: 4a82 tstl %d2 <== NOT EXECUTED 439f2: 66e4 bnes 439d8 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 439f4: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 439f8: 6600 01e6 bnew 43be0 <== NOT EXECUTED 439fc: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 43a00: 4a88 tstl %a0 <== NOT EXECUTED 43a02: 6700 01dc beqw 43be0 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43a06: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43a0a: 7a01 moveq #1,%d5 <== NOT EXECUTED /* * 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); 43a0c: 486a 0030 pea %a2@(48) <== NOT EXECUTED 43a10: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43a12: 508f addql #8,%sp <== NOT EXECUTED 43a14: 2545 00e4 movel %d5,%a2@(228) <== NOT EXECUTED 43a18: 6000 01c8 braw 43be2 <== 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) { 43a1c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43a20: 1e13 moveb %a3@,%d7 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 43a22: 0800 0009 btst #9,%d0 <== NOT EXECUTED 43a26: 6744 beqs 43a6c <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 43a28: 4283 clrl %d3 <== NOT EXECUTED 43a2a: 162a 004a moveb %a2@(74),%d3 <== NOT EXECUTED 43a2e: 4281 clrl %d1 <== NOT EXECUTED 43a30: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 43a34: 1007 moveb %d7,%d0 <== NOT EXECUTED 43a36: 49c0 extbl %d0 <== NOT EXECUTED 43a38: b680 cmpl %d0,%d3 <== NOT EXECUTED 43a3a: 6622 bnes 43a5e <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 43a3c: b280 cmpl %d0,%d1 <== NOT EXECUTED 43a3e: 660a bnes 43a4a <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 43a40: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a44: 7210 moveq #16,%d1 <== NOT EXECUTED 43a46: b380 eorl %d1,%d0 <== NOT EXECUTED 43a48: 6008 bras 43a52 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 43a4a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a4e: 7a10 moveq #16,%d5 <== NOT EXECUTED 43a50: 8085 orl %d5,%d0 <== NOT EXECUTED 43a52: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a56: 7001 moveq #1,%d0 <== NOT EXECUTED 43a58: 1d40 fffb moveb %d0,%fp@(-5) <== NOT EXECUTED 43a5c: 6014 bras 43a72 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 43a5e: b280 cmpl %d0,%d1 <== NOT EXECUTED 43a60: 660a bnes 43a6c <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 43a62: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a66: 72ef moveq #-17,%d1 <== NOT EXECUTED 43a68: c081 andl %d1,%d0 <== NOT EXECUTED 43a6a: 60e6 bras 43a52 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 43a6c: 4a2e fffb tstb %fp@(-5) <== NOT EXECUTED 43a70: 674c beqs 43abe <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 43a72: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a76: 7a30 moveq #48,%d5 <== NOT EXECUTED 43a78: 7220 moveq #32,%d1 <== NOT EXECUTED 43a7a: c085 andl %d5,%d0 <== NOT EXECUTED 43a7c: b280 cmpl %d0,%d1 <== NOT EXECUTED 43a7e: 6600 0144 bnew 43bc4 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 43a82: 2006 movel %d6,%d0 <== NOT EXECUTED 43a84: 40c3 movew %sr,%d3 <== NOT EXECUTED 43a86: 8083 orl %d3,%d0 <== NOT EXECUTED 43a88: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 43a8a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a8e: 7adf moveq #-33,%d5 <== NOT EXECUTED 43a90: c085 andl %d5,%d0 <== NOT EXECUTED 43a92: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 43a96: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43a9a: 671c beqs 43ab8 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 43a9c: 4878 0001 pea 1 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 43aa0: 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)(tty->minor, 43aa4: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43aa8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43aaa: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43aae: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43ab2: 4e90 jsr %a0@ <== NOT EXECUTED 43ab4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43ab8: 46c3 movew %d3,%sr <== NOT EXECUTED 43aba: 6000 0108 braw 43bc4 <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 43abe: 206a 0060 moveal %a2@(96),%a0 <== NOT EXECUTED 43ac2: 5288 addql #1,%a0 <== NOT EXECUTED 43ac4: 2208 movel %a0,%d1 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 43ac6: 2006 movel %d6,%d0 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 43ac8: 226a 0064 moveal %a2@(100),%a1 <== NOT EXECUTED 43acc: 2a09 movel %a1,%d5 <== NOT EXECUTED 43ace: 4c45 1003 remul %d5,%d3,%d1 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 43ad2: 40c1 movew %sr,%d1 <== NOT EXECUTED 43ad4: 8081 orl %d1,%d0 <== NOT EXECUTED 43ad6: 46c0 movew %d0,%sr <== NOT EXECUTED 43ad8: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 43adc: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 43ae0: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 43ae4: 9081 subl %d1,%d0 <== NOT EXECUTED 43ae6: 2240 moveal %d0,%a1 <== NOT EXECUTED 43ae8: d3c3 addal %d3,%a1 <== NOT EXECUTED 43aea: 2a09 movel %a1,%d5 <== NOT EXECUTED 43aec: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 43af0: 4c41 5000 remul %d1,%d0,%d5 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 43af4: b0aa 00c0 cmpl %a2@(192),%d0 <== NOT EXECUTED 43af8: 6300 008e blsw 43b88 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 43afc: 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) 43b00: 0800 0000 btst #0,%d0 <== NOT EXECUTED 43b04: 6600 0082 bnew 43b88 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 43b08: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43b0c: 7201 moveq #1,%d1 <== NOT EXECUTED 43b0e: 8081 orl %d1,%d0 <== NOT EXECUTED 43b10: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 43b14: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43b18: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 43b1e: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 43b24: 6632 bnes 43b58 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 43b26: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43b2a: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43b2e: 6606 bnes 43b36 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 43b30: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43b34: 6652 bnes 43b88 <== NOT EXECUTED /* 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, 43b36: 4878 0001 pea 1 <== NOT EXECUTED == (FL_MDXOF ) ){ 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; 43b3a: 7a02 moveq #2,%d5 <== NOT EXECUTED 43b3c: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 43b40: 2f0d movel %a5,%sp@- <== NOT EXECUTED 43b42: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43b46: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED == (FL_MDXOF ) ){ 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; 43b4a: 8285 orl %d5,%d1 <== NOT EXECUTED 43b4c: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 43b50: 4e90 jsr %a0@ <== NOT EXECUTED 43b52: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43b56: 6030 bras 43b88 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 43b58: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43b5c: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 43b62: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 43b68: 661e bnes 43b88 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 43b6a: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 43b6e: 303c 0004 movew #4,%d0 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 43b72: 206a 00ac moveal %a2@(172),%a0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 43b76: 8280 orl %d0,%d1 <== NOT EXECUTED 43b78: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 43b7c: 4a88 tstl %a0 <== NOT EXECUTED 43b7e: 6708 beqs 43b88 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 43b80: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43b84: 4e90 jsr %a0@ <== NOT EXECUTED 43b86: 588f addql #4,%sp <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 43b88: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED 43b8c: 46c1 movew %d1,%sr <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 43b8e: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED 43b92: b083 cmpl %d3,%d0 <== NOT EXECUTED 43b94: 6604 bnes 43b9a <== NOT EXECUTED dropped++; 43b96: 5282 addql #1,%d2 <== NOT EXECUTED 43b98: 602a bras 43bc4 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 43b9a: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 43b9e: 1187 3800 moveb %d7,%a0@(00000000,%d3:l) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 43ba2: 2543 0060 movel %d3,%a2@(96) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 43ba6: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 43baa: 6618 bnes 43bc4 <== NOT EXECUTED 43bac: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 43bb0: 4a88 tstl %a0 <== NOT EXECUTED 43bb2: 6710 beqs 43bc4 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43bb4: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43bb8: 7a01 moveq #1,%d5 <== NOT EXECUTED /* * 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); 43bba: 2f0c movel %a4,%sp@- <== NOT EXECUTED 43bbc: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43bbe: 508f addql #8,%sp <== NOT EXECUTED 43bc0: 2545 00e4 movel %d5,%a2@(228) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43bc4: 528b addql #1,%a3 <== NOT EXECUTED 43bc6: 5384 subql #1,%d4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 43bc8: 4a84 tstl %d4 <== NOT EXECUTED 43bca: 6600 fe50 bnew 43a1c <== NOT EXECUTED } } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); 43bce: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 43bd2: d5aa 0078 addl %d2,%a2@(120) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 43bd6: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED return dropped; 43bdc: 588f addql #4,%sp <== NOT EXECUTED 43bde: 6002 bras 43be2 <== NOT EXECUTED 43be0: 4282 clrl %d2 <== NOT EXECUTED } 43be2: 2002 movel %d2,%d0 <== NOT EXECUTED 43be4: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43bea: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000436fc : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 436fc: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 43700: 4ab9 0005 db04 tstl 5db04 43706: 662c bnes 43734 sc = rtems_semaphore_create ( 43708: 4879 0005 db04 pea 5db04 4370e: 42a7 clrl %sp@- 43710: 4878 0054 pea 54 43714: 4878 0001 pea 1 43718: 2f3c 5452 6d69 movel #1414688105,%sp@- 4371e: 4eb9 0004 5588 jsr 45588 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 43724: 4fef 0014 lea %sp@(20),%sp 43728: 4a80 tstl %d0 4372a: 6708 beqs 43734 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 4372c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4372e: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED } } 43734: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004460a : } } rtems_status_code rtems_termios_ioctl (void *arg) { 4460a: 4e56 ffec linkw %fp,#-20 4460e: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 44612: 266e 0008 moveal %fp@(8),%a3 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 44616: 2053 moveal %a3@,%a0 44618: 2468 0034 moveal %a0@(52),%a2 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); 4461c: 42a7 clrl %sp@- rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 4461e: 286b 0008 moveal %a3@(8),%a4 rtems_status_code sc; args->ioctl_return = 0; 44622: 42ab 000c clrl %a3@(12) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44626: 42a7 clrl %sp@- 44628: 2f2a 0018 movel %a2@(24),%sp@- 4462c: 4eb9 0004 57c0 jsr 457c0 if (sc != RTEMS_SUCCESSFUL) { 44632: 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); 44636: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 44638: 6600 02d6 bnew 44910 args->ioctl_return = sc; return sc; } switch (args->command) { 4463c: 202b 0004 movel %a3@(4),%d0 44640: 7204 moveq #4,%d1 44642: b280 cmpl %d0,%d1 44644: 6700 023c beqw 44882 44648: 6514 bcss 4465e <== NEVER TAKEN 4464a: 7602 moveq #2,%d3 4464c: b680 cmpl %d0,%d3 4464e: 6778 beqs 446c8 44650: 6500 0216 bcsw 44868 44654: 123c 0001 moveb #1,%d1 44658: b280 cmpl %d0,%d1 4465a: 662c bnes 44688 <== NEVER TAKEN 4465c: 6050 bras 446ae 4465e: 0c80 4004 667f cmpil #1074030207,%d0 <== NOT EXECUTED 44664: 6700 027c beqw 448e2 <== NOT EXECUTED 44668: 620a bhis 44674 <== NOT EXECUTED 4466a: 7605 moveq #5,%d3 <== NOT EXECUTED 4466c: b680 cmpl %d0,%d3 <== NOT EXECUTED 4466e: 6618 bnes 44688 <== NOT EXECUTED 44670: 6000 01fe braw 44870 <== NOT EXECUTED 44674: 0c80 4004 741a cmpil #1074033690,%d0 <== NOT EXECUTED 4467a: 6700 025c beqw 448d8 <== NOT EXECUTED 4467e: 0c80 8004 741b cmpil #-2147191781,%d0 <== NOT EXECUTED 44684: 6700 020c beqw 44892 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 44688: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 4468c: eb88 lsll #5,%d0 <== NOT EXECUTED 4468e: 0680 0005 d2d8 addil #381656,%d0 <== NOT EXECUTED 44694: 2240 moveal %d0,%a1 <== NOT EXECUTED 44696: 2051 moveal %a1@,%a0 <== NOT EXECUTED 44698: 4a88 tstl %a0 <== NOT EXECUTED 4469a: 6606 bnes 446a2 <== NOT EXECUTED 4469c: 740a moveq #10,%d2 <== NOT EXECUTED 4469e: 6000 0264 braw 44904 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 446a2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 446a4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 446a6: 4e90 jsr %a0@ <== NOT EXECUTED 446a8: 2400 movel %d0,%d2 <== NOT EXECUTED 446aa: 6000 01b6 braw 44862 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 446ae: 4878 0024 pea 24 446b2: 486a 0030 pea %a2@(48) 446b6: 2f2b 0008 movel %a3@(8),%sp@- 446ba: 4eb9 0004 d8d8 jsr 4d8d8 break; 446c0: 4fef 000c lea %sp@(12),%sp 446c4: 6000 023e braw 44904 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 446c8: 4878 0024 pea 24 446cc: 2f2b 0008 movel %a3@(8),%sp@- 446d0: 486a 0030 pea %a2@(48) 446d4: 4eb9 0004 d8d8 jsr 4d8d8 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 446da: 202a 00b8 movel %a2@(184),%d0 446de: 4fef 000c lea %sp@(12),%sp 446e2: 0800 0009 btst #9,%d0 446e6: 6760 beqs 44748 446e8: 202a 0030 movel %a2@(48),%d0 446ec: 0280 0000 0400 andil #1024,%d0 446f2: 6654 bnes 44748 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 446f4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 446f8: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED 446fe: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 44702: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44706: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4470a: 673c beqs 44748 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 4470c: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 44712: 40c3 movew %sr,%d3 <== NOT EXECUTED 44714: 8083 orl %d3,%d0 <== NOT EXECUTED 44716: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 44718: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4471c: 72df moveq #-33,%d1 <== NOT EXECUTED 4471e: c081 andl %d1,%d0 <== NOT EXECUTED 44720: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 44724: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 44728: 671c beqs 44746 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 4472a: 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)(tty->minor, 4472e: 4878 0001 pea 1 <== NOT EXECUTED 44732: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 44736: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44738: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4473c: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44740: 4e90 jsr %a0@ <== NOT EXECUTED 44742: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 44746: 46c3 movew %d3,%sr <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 44748: 202a 00b8 movel %a2@(184),%d0 4474c: 0800 000a btst #10,%d0 44750: 6724 beqs 44776 <== ALWAYS TAKEN 44752: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 44756: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED 4475c: 6618 bnes 44776 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 4475e: 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); 44762: 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); 44764: 0880 000a bclr #10,%d0 <== NOT EXECUTED 44768: 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); 4476c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44770: c083 andl %d3,%d0 <== NOT EXECUTED 44772: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 44776: 202a 00b8 movel %a2@(184),%d0 4477a: 0800 0008 btst #8,%d0 4477e: 6736 beqs 447b6 <== ALWAYS TAKEN 44780: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED 44784: 6d30 blts 447b6 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 44786: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4478a: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 4478e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 44792: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44796: 44c0 movew %d0,%ccr <== NOT EXECUTED 44798: 6610 bnes 447aa <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 4479a: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 4479e: 4a88 tstl %a0 <== NOT EXECUTED 447a0: 6708 beqs 447aa <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 447a2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 447a6: 4e90 jsr %a0@ <== NOT EXECUTED 447a8: 588f addql #4,%sp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 447aa: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 447ae: 72fb moveq #-5,%d1 <== NOT EXECUTED 447b0: c081 andl %d1,%d0 <== NOT EXECUTED 447b2: 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) { 447b6: 4aaa 0038 tstl %a2@(56) 447ba: 6c0c bges 447c8 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDRTS; 447bc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 447c0: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 447c4: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 447c8: 202a 0030 movel %a2@(48),%d0 447cc: 0280 0000 1000 andil #4096,%d0 447d2: 670c beqs 447e0 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXOF; 447d4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 447d8: 08c0 000a bset #10,%d0 <== NOT EXECUTED 447dc: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 447e0: 202a 0030 movel %a2@(48),%d0 447e4: 0280 0000 0400 andil #1024,%d0 447ea: 670c beqs 447f8 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; 447ec: 202a 00b8 movel %a2@(184),%d0 447f0: 08c0 0009 bset #9,%d0 447f4: 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) { 447f8: 7002 moveq #2,%d0 447fa: c0aa 003c andl %a2@(60),%d0 447fe: 663a bnes 4483a <== ALWAYS TAKEN tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 44800: 4283 clrl %d3 <== NOT EXECUTED 44802: 162a 0046 moveb %a2@(70),%d3 <== NOT EXECUTED 44806: 4eb9 0004 5188 jsr 45188 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 4480c: 4c03 0800 mulsl %d3,%d0 <== NOT EXECUTED 44810: 760a moveq #10,%d3 <== NOT EXECUTED 44812: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED 44816: 2540 0054 movel %d0,%a2@(84) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 4481a: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 4481e: 6714 beqs 44834 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 44820: 42aa 006c clrl %a2@(108) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 44824: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 44828: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 4482c: 6614 bnes 44842 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 4482e: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED 44832: 601a bras 4484e <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 44834: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 44838: 670e beqs 44848 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 4483a: 42aa 006c clrl %a2@(108) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 4483e: 42aa 0070 clrl %a2@(112) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 44842: 42aa 0074 clrl %a2@(116) 44846: 6006 bras 4484e } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 44848: 7001 moveq #1,%d0 <== NOT EXECUTED 4484a: 2540 006c movel %d0,%a2@(108) <== NOT EXECUTED } } } if (tty->device.setAttributes) 4484e: 206a 00a8 moveal %a2@(168),%a0 44852: 4a88 tstl %a0 44854: 6700 00ae beqw 44904 (*tty->device.setAttributes)(tty->minor, &tty->termios); 44858: 486a 0030 pea %a2@(48) 4485c: 2f2a 0010 movel %a2@(16),%sp@- 44860: 4e90 jsr %a0@ 44862: 508f addql #8,%sp 44864: 6000 009e braw 44904 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 44868: 2f0a movel %a2,%sp@- 4486a: 4eba fa5e jsr %pc@(442ca ) 4486e: 6064 bras 448d4 break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 44870: 2014 movel %a4@,%d0 <== NOT EXECUTED 44872: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 44876: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED 4487a: 2541 00d8 movel %d1,%a2@(216) <== NOT EXECUTED break; 4487e: 6000 0084 braw 44904 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 44882: 2014 movel %a4@,%d0 <== NOT EXECUTED 44884: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 44888: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED 4488c: 2541 00e0 movel %d1,%a2@(224) <== NOT EXECUTED break; 44890: 6072 bras 44904 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 44892: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44896: 41f9 0005 d2c0 lea 5d2c0 ,%a0 <== NOT EXECUTED 4489c: e788 lsll #3,%d0 <== NOT EXECUTED 4489e: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 <== NOT EXECUTED 448a2: 4a88 tstl %a0 <== NOT EXECUTED 448a4: 6708 beqs 448ae <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 448a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 448a8: 4e90 jsr %a0@ <== NOT EXECUTED 448aa: 588f addql #4,%sp <== NOT EXECUTED 448ac: 2400 movel %d0,%d2 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 448ae: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 448b2: 2010 movel %a0@,%d0 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 448b4: 2200 movel %d0,%d1 <== NOT EXECUTED 448b6: 41f9 0005 d2c0 lea 5d2c0 ,%a0 <== NOT EXECUTED 448bc: eb89 lsll #5,%d1 <== NOT EXECUTED * 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); 448be: 2540 00cc movel %d0,%a2@(204) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 448c2: 2070 1800 moveal %a0@(00000000,%d1:l),%a0 <== NOT EXECUTED */ 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 */ 448c6: 42aa 00d0 clrl %a2@(208) <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 448ca: 4a88 tstl %a0 <== NOT EXECUTED 448cc: 6736 beqs 44904 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 448ce: 2f0a movel %a2,%sp@- <== NOT EXECUTED 448d0: 4e90 jsr %a0@ <== NOT EXECUTED 448d2: 2400 movel %d0,%d2 <== NOT EXECUTED 448d4: 588f addql #4,%sp 448d6: 602c bras 44904 } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 448d8: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 448dc: 20aa 00cc movel %a2@(204),%a0@ <== NOT EXECUTED break; 448e0: 6022 bras 44904 <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 448e2: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 448e6: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 448ea: 9081 subl %d1,%d0 <== NOT EXECUTED if ( rawnc < 0 ) 448ec: 6a06 bpls 448f4 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 448ee: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 448f2: d081 addl %d1,%d0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 448f4: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 448f8: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 448fc: d280 addl %d0,%d1 <== NOT EXECUTED 448fe: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44902: 2081 movel %d1,%a0@ <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 44904: 2f2a 0018 movel %a2@(24),%sp@- 44908: 4eb9 0004 58c4 jsr 458c4 args->ioctl_return = sc; return sc; 4490e: 588f addql #4,%sp } 44910: 2002 movel %d2,%d0 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 44912: 2742 000c movel %d2,%a3@(12) return sc; } 44916: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4491c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044980 : #include int rtems_termios_number_to_baud( int32_t baud ) { 44980: 4e56 0000 linkw %fp,#0 44984: 222e 0008 movel %fp@(8),%d1 int termios_baud; switch (baud) { 44988: 0c81 0000 04b0 cmpil #1200,%d1 4498e: 6700 0106 beqw 44a96 44992: 6e68 bgts 449fc 44994: 0c81 0000 0086 cmpil #134,%d1 4499a: 6700 00e6 beqw 44a82 4499e: 6e2a bgts 449ca 449a0: 7032 moveq #50,%d0 449a2: b081 cmpl %d1,%d0 449a4: 6700 00cc beqw 44a72 449a8: 6d0a blts 449b4 449aa: 4a81 tstl %d1 449ac: 6700 00c8 beqw 44a76 449b0: 6000 0100 braw 44ab2 449b4: 704b moveq #75,%d0 449b6: b081 cmpl %d1,%d0 449b8: 6700 00c0 beqw 44a7a 449bc: 103c 006e moveb #110,%d0 449c0: b081 cmpl %d1,%d0 449c2: 6600 00ee bnew 44ab2 449c6: 6000 00b6 braw 44a7e 449ca: 0c81 0000 00c8 cmpil #200,%d1 449d0: 6700 00b8 beqw 44a8a 449d4: 6e0e bgts 449e4 449d6: 0c81 0000 0096 cmpil #150,%d1 449dc: 6600 00d4 bnew 44ab2 449e0: 6000 00a4 braw 44a86 449e4: 0c81 0000 012c cmpil #300,%d1 449ea: 6700 00a2 beqw 44a8e 449ee: 0c81 0000 0258 cmpil #600,%d1 449f4: 6600 00bc bnew 44ab2 449f8: 6000 0098 braw 44a92 449fc: 0c81 0000 4b00 cmpil #19200,%d1 44a02: 6700 00a6 beqw 44aaa 44a06: 6e2c bgts 44a34 44a08: 0c81 0000 0960 cmpil #2400,%d1 44a0e: 6700 008e beqw 44a9e 44a12: 6e0c bgts 44a20 44a14: 0c81 0000 0708 cmpil #1800,%d1 44a1a: 6600 0096 bnew 44ab2 44a1e: 607a bras 44a9a 44a20: 0c81 0000 12c0 cmpil #4800,%d1 44a26: 677a beqs 44aa2 44a28: 0c81 0000 2580 cmpil #9600,%d1 44a2e: 6600 0082 bnew 44ab2 44a32: 6072 bras 44aa6 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; 44a34: 203c 0000 1002 movel #4098,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44a3a: 0c81 0001 c200 cmpil #115200,%d1 44a40: 6772 beqs 44ab4 44a42: 6e14 bgts 44a58 44a44: 0c81 0000 9600 cmpil #38400,%d1 44a4a: 6762 beqs 44aae case 1800: termios_baud = B1800; break; 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; 44a4c: 5380 subql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44a4e: 0c81 0000 e100 cmpil #57600,%d1 44a54: 665c bnes 44ab2 <== NEVER TAKEN 44a56: 605c bras 44ab4 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; 44a58: 203c 0000 1003 movel #4099,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44a5e: 0c81 0003 8400 cmpil #230400,%d1 44a64: 674e beqs 44ab4 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; 44a66: 5280 addql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44a68: 0c81 0007 0800 cmpil #460800,%d1 44a6e: 6642 bnes 44ab2 <== NEVER TAKEN 44a70: 6042 bras 44ab4 44a72: 7001 moveq #1,%d0 44a74: 603e bras 44ab4 44a76: 4280 clrl %d0 44a78: 603a bras 44ab4 44a7a: 7002 moveq #2,%d0 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 44a7c: 6036 bras 44ab4 44a7e: 7003 moveq #3,%d0 case 110: termios_baud = B110; break; 44a80: 6032 bras 44ab4 44a82: 7004 moveq #4,%d0 case 134: termios_baud = B134; break; 44a84: 602e bras 44ab4 44a86: 7005 moveq #5,%d0 case 150: termios_baud = B150; break; 44a88: 602a bras 44ab4 44a8a: 7006 moveq #6,%d0 case 200: termios_baud = B200; break; 44a8c: 6026 bras 44ab4 44a8e: 7007 moveq #7,%d0 case 300: termios_baud = B300; break; 44a90: 6022 bras 44ab4 44a92: 7008 moveq #8,%d0 case 600: termios_baud = B600; break; 44a94: 601e bras 44ab4 44a96: 7009 moveq #9,%d0 case 1200: termios_baud = B1200; break; 44a98: 601a bras 44ab4 44a9a: 700a moveq #10,%d0 case 1800: termios_baud = B1800; break; 44a9c: 6016 bras 44ab4 44a9e: 700b moveq #11,%d0 case 2400: termios_baud = B2400; break; 44aa0: 6012 bras 44ab4 44aa2: 700c moveq #12,%d0 case 4800: termios_baud = B4800; break; 44aa4: 600e bras 44ab4 44aa6: 700d moveq #13,%d0 case 9600: termios_baud = B9600; break; 44aa8: 600a bras 44ab4 44aaa: 700e moveq #14,%d0 case 19200: termios_baud = B19200; break; 44aac: 6006 bras 44ab4 44aae: 700f moveq #15,%d0 case 38400: termios_baud = B38400; break; 44ab0: 6002 bras 44ab4 case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 44ab2: 70ff moveq #-1,%d0 default: termios_baud = -1; break; } return termios_baud; } 44ab4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044a80 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44a80: 4e56 ffe0 linkw %fp,#-32 44a84: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44a88: 42a7 clrl %sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44a8a: 262e 0008 movel %fp@(8),%d3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44a8e: 42a7 clrl %sp@- 44a90: 2f39 0005 db04 movel 5db04 ,%sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44a96: 282e 000c movel %fp@(12),%d4 44a9a: 2a6e 0010 moveal %fp@(16),%a5 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44a9e: 4eb9 0004 57c0 jsr 457c0 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44aa4: 4fef 000c lea %sp@(12),%sp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44aa8: 2400 movel %d0,%d2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44aaa: 6600 0394 bnew 44e40 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 44aae: 2479 0005 db0c moveal 5db0c ,%a2 44ab4: 6010 bras 44ac6 if ((tty->major == major) && (tty->minor == minor)) 44ab6: b6aa 000c cmpl %a2@(12),%d3 44aba: 6608 bnes 44ac4 44abc: b8aa 0010 cmpl %a2@(16),%d4 44ac0: 6700 0308 beqw 44dca */ 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) { 44ac4: 2452 moveal %a2@,%a2 44ac6: 4a8a tstl %a2 44ac8: 66ec bnes 44ab6 44aca: 6000 0380 braw 44e4c /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 44ace: 2f39 0005 db04 movel 5db04 ,%sp@- <== NOT EXECUTED 44ad4: 741a moveq #26,%d2 <== NOT EXECUTED 44ad6: 6000 0360 braw 44e38 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 44ada: 41f9 0005 c524 lea 5c524 ,%a0 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44ae0: 49f9 0004 2b08 lea 42b08 ,%a4 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 44ae6: 2550 0064 movel %a0@,%a2@(100) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44aea: 202a 0064 movel %a2@(100),%d0 44aee: 2f00 movel %d0,%sp@- 44af0: 4e94 jsr %a4@ if (tty->rawInBuf.theBuf == NULL) { 44af2: 588f addql #4,%sp } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44af4: 2540 0058 movel %d0,%a2@(88) if (tty->rawInBuf.theBuf == NULL) { 44af8: 661c bnes 44b16 <== ALWAYS TAKEN free(tty); 44afa: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 44afc: 741a moveq #26,%d2 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 44afe: 4eb9 0004 2828 jsr 42828 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 44b04: 2f39 0005 db04 movel 5db04 ,%sp@- <== NOT EXECUTED 44b0a: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED return RTEMS_NO_MEMORY; 44b10: 508f addql #8,%sp <== NOT EXECUTED 44b12: 6000 032c braw 44e40 <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 44b16: 41f9 0005 c528 lea 5c528 ,%a0 44b1c: 2550 0088 movel %a0@,%a2@(136) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 44b20: 202a 0088 movel %a2@(136),%d0 44b24: 2f00 movel %d0,%sp@- 44b26: 4e94 jsr %a4@ if (tty->rawOutBuf.theBuf == NULL) { 44b28: 588f addql #4,%sp } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 44b2a: 2540 007c movel %d0,%a2@(124) if (tty->rawOutBuf.theBuf == NULL) { 44b2e: 6626 bnes 44b56 <== ALWAYS TAKEN free((void *)(tty->rawInBuf.theBuf)); 44b30: 2f2a 0058 movel %a2@(88),%sp@- <== NOT EXECUTED 44b34: 47f9 0004 2828 lea 42828 ,%a3 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 44b3a: 741a moveq #26,%d2 <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 44b3c: 4e93 jsr %a3@ <== NOT EXECUTED free(tty); 44b3e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44b40: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 44b42: 2f39 0005 db04 movel 5db04 ,%sp@- <== NOT EXECUTED 44b48: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED return RTEMS_NO_MEMORY; 44b4e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44b52: 6000 02ec braw 44e40 <== NOT EXECUTED } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 44b56: 2f39 0005 c520 movel 5c520 ,%sp@- 44b5c: 4e94 jsr %a4@ if (tty->cbuf == NULL) { 44b5e: 588f addql #4,%sp return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 44b60: 2540 001c movel %d0,%a2@(28) if (tty->cbuf == NULL) { 44b64: 662c bnes 44b92 <== ALWAYS TAKEN free((void *)(tty->rawOutBuf.theBuf)); 44b66: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 44b6a: 47f9 0004 2828 lea 42828 ,%a3 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 44b70: 741a moveq #26,%d2 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 44b72: 4e93 jsr %a3@ <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 44b74: 2f2a 0058 movel %a2@(88),%sp@- <== NOT EXECUTED 44b78: 4e93 jsr %a3@ <== NOT EXECUTED free(tty); 44b7a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44b7c: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 44b7e: 2f39 0005 db04 movel 5db04 ,%sp@- <== NOT EXECUTED 44b84: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED return RTEMS_NO_MEMORY; 44b8a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 44b8e: 6000 02b0 braw 44e40 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 44b92: 2079 0005 db0c moveal 5db0c ,%a0 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 44b98: 42aa 00d4 clrl %a2@(212) tty->tty_snd.sw_arg = NULL; 44b9c: 42aa 00d8 clrl %a2@(216) tty->tty_rcv.sw_pfn = NULL; 44ba0: 42aa 00dc clrl %a2@(220) tty->tty_rcv.sw_arg = NULL; 44ba4: 42aa 00e0 clrl %a2@(224) tty->tty_rcvwakeup = 0; 44ba8: 42aa 00e4 clrl %a2@(228) /* * link tty */ tty->forw = rtems_termios_ttyHead; 44bac: 2488 movel %a0,%a2@ tty->back = NULL; 44bae: 42aa 0004 clrl %a2@(4) if (rtems_termios_ttyHead != NULL) 44bb2: 4a88 tstl %a0 44bb4: 6704 beqs 44bba rtems_termios_ttyHead->back = tty; 44bb6: 214a 0004 movel %a2,%a0@(4) rtems_termios_ttyHead = tty; 44bba: 23cb 0005 db0c movel %a3,5db0c if (rtems_termios_ttyTail == NULL) 44bc0: 4ab9 0005 db08 tstl 5db08 44bc6: 6606 bnes 44bce rtems_termios_ttyTail = tty; 44bc8: 23cb 0005 db08 movel %a3,5db08 tty->minor = minor; 44bce: 2744 0010 movel %d4,%a3@(16) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44bd2: 49f9 0004 5588 lea 45588 ,%a4 44bd8: 1039 0005 c52c moveb 5c52c ,%d0 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; 44bde: 2743 000c movel %d3,%a3@(12) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44be2: 486b 0014 pea %a3@(20) 44be6: 49c0 extbl %d0 44be8: 0080 5452 6900 oril #1414686976,%d0 44bee: 42a7 clrl %sp@- 44bf0: 4878 0054 pea 54 44bf4: 4878 0001 pea 1 44bf8: 2f00 movel %d0,%sp@- 44bfa: 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) 44bfc: 4fef 0014 lea %sp@(20),%sp 44c00: 4a80 tstl %d0 44c02: 6600 0226 bnew 44e2a rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44c06: 486b 0018 pea %a3@(24) 44c0a: 1039 0005 c52c moveb 5c52c ,%d0 44c10: 42a7 clrl %sp@- 44c12: 4878 0054 pea 54 44c16: 49c0 extbl %d0 44c18: 4878 0001 pea 1 44c1c: 0080 5452 6f00 oril #1414688512,%d0 44c22: 2f00 movel %d0,%sp@- 44c24: 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) 44c26: 4fef 0014 lea %sp@(20),%sp 44c2a: 4a80 tstl %d0 44c2c: 6600 01fc bnew 44e2a rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44c30: 486b 008c pea %a3@(140) 44c34: 1039 0005 c52c moveb 5c52c ,%d0 44c3a: 42a7 clrl %sp@- 44c3c: 4878 0020 pea 20 44c40: 49c0 extbl %d0 44c42: 0080 5452 7800 oril #1414690816,%d0 44c48: 42a7 clrl %sp@- 44c4a: 2f00 movel %d0,%sp@- 44c4c: 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) 44c4e: 4fef 0014 lea %sp@(20),%sp 44c52: 4a80 tstl %d0 44c54: 6600 01d4 bnew 44e2a rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 44c58: 42ab 0094 clrl %a3@(148) /* * Set callbacks */ tty->device = *callbacks; 44c5c: 4878 0020 pea 20 44c60: 2f2e 0014 movel %fp@(20),%sp@- 44c64: 486b 0098 pea %a3@(152) 44c68: 4eb9 0004 d8d8 jsr 4d8d8 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44c6e: 4fef 000c lea %sp@(12),%sp 44c72: 7002 moveq #2,%d0 44c74: b0ab 00b4 cmpl %a3@(180),%d0 44c78: 6662 bnes 44cdc <== ALWAYS TAKEN sc = rtems_task_create ( 44c7a: 486b 00c8 pea %a3@(200) <== NOT EXECUTED 44c7e: 49f9 0004 5974 lea 45974 ,%a4 <== NOT EXECUTED 44c84: 1039 0005 c52c moveb 5c52c ,%d0 <== NOT EXECUTED 44c8a: 42a7 clrl %sp@- <== NOT EXECUTED 44c8c: 4878 0500 pea 500 <== NOT EXECUTED 44c90: 49c0 extbl %d0 <== NOT EXECUTED 44c92: 4878 0400 pea 400 <== NOT EXECUTED 44c96: 4878 000a pea a <== NOT EXECUTED 44c9a: 0080 5478 5400 oril #1417171968,%d0 <== NOT EXECUTED 44ca0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44ca2: 4e94 jsr %a4@ <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 44ca4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44ca8: 4a80 tstl %d0 <== NOT EXECUTED 44caa: 6600 017e bnew 44e2a <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 44cae: 486b 00c4 pea %a3@(196) <== NOT EXECUTED 44cb2: 1039 0005 c52c moveb 5c52c ,%d0 <== NOT EXECUTED 44cb8: 42a7 clrl %sp@- <== NOT EXECUTED 44cba: 4878 0500 pea 500 <== NOT EXECUTED 44cbe: 49c0 extbl %d0 <== NOT EXECUTED 44cc0: 4878 0400 pea 400 <== NOT EXECUTED 44cc4: 4878 0009 pea 9 <== NOT EXECUTED 44cc8: 0080 5278 5400 oril #1383617536,%d0 <== NOT EXECUTED 44cce: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44cd0: 4e94 jsr %a4@ <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 44cd2: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44cd6: 4a80 tstl %d0 <== NOT EXECUTED 44cd8: 6600 0150 bnew 44e2a <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 44cdc: 4aab 00a0 tstl %a3@(160) 44ce0: 6708 beqs 44cea (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 44ce2: 7202 moveq #2,%d1 44ce4: b2ab 00b4 cmpl %a3@(180),%d1 44ce8: 662c bnes 44d16 <== ALWAYS TAKEN sc = rtems_semaphore_create ( 44cea: 486b 0068 pea %a3@(104) 44cee: 1039 0005 c52c moveb 5c52c ,%d0 44cf4: 42a7 clrl %sp@- 44cf6: 4878 0024 pea 24 44cfa: 49c0 extbl %d0 44cfc: 0080 5452 7200 oril #1414689280,%d0 44d02: 42a7 clrl %sp@- 44d04: 2f00 movel %d0,%sp@- 44d06: 4eb9 0004 5588 jsr 45588 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 44d0c: 4fef 0014 lea %sp@(20),%sp 44d10: 4a80 tstl %d0 44d12: 6600 0116 bnew 44e2a 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; 44d16: 42ab 00b8 clrl %a3@(184) /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 44d1a: 202b 0064 movel %a3@(100),%d0 44d1e: e288 lsrl #1,%d0 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 = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 44d20: 7203 moveq #3,%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; 44d22: 2740 00bc movel %d0,%a3@(188) tty->highwater = tty->rawInBuf.Size * 3/4; 44d26: 206b 0064 moveal %a3@(100),%a0 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 = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 44d2a: 1741 0041 moveb %d1,%a3@(65) tty->termios.c_cc[VQUIT] = '\034'; 44d2e: 721c moveq #28,%d1 tty->termios.c_cc[VERASE] = '\177'; 44d30: 707f moveq #127,%d0 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 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'; 44d32: 1741 0042 moveb %d1,%a3@(66) tty->termios.c_cc[VERASE] = '\177'; 44d36: 1740 0043 moveb %d0,%a3@(67) tty->termios.c_cc[VKILL] = '\025'; 44d3a: 7215 moveq #21,%d1 tty->termios.c_cc[VEOF] = '\004'; 44d3c: 7004 moveq #4,%d0 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'; tty->termios.c_cc[VKILL] = '\025'; 44d3e: 1741 0044 moveb %d1,%a3@(68) tty->termios.c_cc[VEOF] = '\004'; 44d42: 1740 0045 moveb %d0,%a3@(69) tty->termios.c_cc[VEOL] = '\000'; 44d46: 4201 clrb %d1 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 44d48: 7011 moveq #17,%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'; 44d4a: 1741 004c moveb %d1,%a3@(76) tty->termios.c_cc[VEOL2] = '\000'; 44d4e: 1741 0051 moveb %d1,%a3@(81) tty->termios.c_cc[VSTART] = '\021'; 44d52: 1740 0049 moveb %d0,%a3@(73) tty->termios.c_cc[VSTOP] = '\023'; 44d56: 7213 moveq #19,%d1 tty->termios.c_cc[VSUSP] = '\032'; 44d58: 701a moveq #26,%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'; 44d5a: 1741 004a moveb %d1,%a3@(74) tty->termios.c_cc[VSUSP] = '\032'; 44d5e: 1740 004b moveb %d0,%a3@(75) tty->termios.c_cc[VREPRINT] = '\022'; 44d62: 7212 moveq #18,%d1 tty->termios.c_cc[VDISCARD] = '\017'; 44d64: 700f moveq #15,%d0 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'; 44d66: 1741 004d moveb %d1,%a3@(77) tty->termios.c_cc[VDISCARD] = '\017'; 44d6a: 1740 004e moveb %d0,%a3@(78) tty->termios.c_cc[VWERASE] = '\027'; 44d6e: 7217 moveq #23,%d1 tty->termios.c_cc[VLNEXT] = '\026'; 44d70: 7016 moveq #22,%d0 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; 44d72: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0 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'; tty->termios.c_cc[VLNEXT] = '\026'; 44d76: 1740 0050 moveb %d0,%a3@(80) 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'; 44d7a: 1741 004f moveb %d1,%a3@(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; 44d7e: 2008 movel %a0,%d0 44d80: e488 lsrl #2,%d0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 44d82: 307c 2502 moveaw #9474,%a0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44d86: 1239 0005 c52c moveb 5c52c ,%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; 44d8c: 2740 00c0 movel %d0,%a3@(192) /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 44d90: 203c 0000 1805 movel #6149,%d0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44d96: 49c1 extbl %d1 44d98: 2a01 movel %d1,%d5 44d9a: 5285 addql #1,%d5 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 44d9c: 2740 0034 movel %d0,%a3@(52) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 44da0: 303c 823b movew #-32197,%d0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 44da4: 2748 0030 movel %a0,%a3@(48) tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 44da8: 307c 08bd moveaw #2237,%a0 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 44dac: 2740 003c movel %d0,%a3@(60) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44db0: 303c 007a movew #122,%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; 44db4: 2748 0038 movel %a0,%a3@(56) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44db8: 13c5 0005 c52c moveb %d5,5c52c 44dbe: b081 cmpl %d1,%d0 44dc0: 6608 bnes 44dca <== ALWAYS TAKEN c = 'a'; 44dc2: 7261 moveq #97,%d1 <== NOT EXECUTED 44dc4: 13c1 0005 c52c moveb %d1,5c52c <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 44dca: 202a 0008 movel %a2@(8),%d0 44dce: 2200 movel %d0,%d1 44dd0: 5281 addql #1,%d1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44dd2: 2055 moveal %a5@,%a0 if (!tty->refcount++) { 44dd4: 2541 0008 movel %d1,%a2@(8) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44dd8: 214a 0034 movel %a2,%a0@(52) if (!tty->refcount++) { 44ddc: 4a80 tstl %d0 44dde: 6652 bnes 44e32 if (tty->device.firstOpen) 44de0: 206a 0098 moveal %a2@(152),%a0 44de4: 4a88 tstl %a0 44de6: 670c beqs 44df4 (*tty->device.firstOpen)(major, minor, arg); 44de8: 2f0d movel %a5,%sp@- 44dea: 2f04 movel %d4,%sp@- 44dec: 2f03 movel %d3,%sp@- 44dee: 4e90 jsr %a0@ 44df0: 4fef 000c lea %sp@(12),%sp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44df4: 7002 moveq #2,%d0 44df6: b0aa 00b4 cmpl %a2@(180),%d0 44dfa: 6636 bnes 44e32 <== ALWAYS TAKEN sc = rtems_task_start(tty->rxTaskId, 44dfc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44dfe: 487a 00d2 pea %pc@(44ed2 ) <== NOT EXECUTED 44e02: 47f9 0004 5bf0 lea 45bf0 ,%a3 <== NOT EXECUTED 44e08: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 44e0c: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 44e0e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44e12: 4a80 tstl %d0 <== NOT EXECUTED 44e14: 6614 bnes 44e2a <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 44e16: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44e18: 487a 0050 pea %pc@(44e6a ) <== NOT EXECUTED 44e1c: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44e20: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 44e22: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44e26: 4a80 tstl %d0 <== NOT EXECUTED 44e28: 6708 beqs 44e32 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 44e2a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44e2c: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 44e32: 2f39 0005 db04 movel 5db04 ,%sp@- 44e38: 4eb9 0004 58c4 jsr 458c4 return RTEMS_SUCCESSFUL; 44e3e: 588f addql #4,%sp } 44e40: 2002 movel %d2,%d0 44e42: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 44e48: 4e5e unlk %fp 44e4a: 4e75 rts static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 44e4c: 4878 00e8 pea e8 44e50: 4878 0001 pea 1 44e54: 4eb9 0004 2438 jsr 42438 if (tty == NULL) { 44e5a: 508f addql #8,%sp static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 44e5c: 2440 moveal %d0,%a2 44e5e: 2640 moveal %d0,%a3 if (tty == NULL) { 44e60: 4a80 tstl %d0 44e62: 6600 fc76 bnew 44ada 44e66: 6000 fc66 braw 44ace <== NOT EXECUTED =============================================================================== 00043bee : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43bee: 4e56 ffe0 linkw %fp,#-32 43bf2: 202e 0008 movel %fp@(8),%d0 43bf6: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 43bfa: 242e 000c movel %fp@(12),%d2 const unsigned char *buf = _buf; 43bfe: 2640 moveal %d0,%a3 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43c00: 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) { 43c04: 4aaa 00b4 tstl %a2@(180) 43c08: 661c bnes 43c26 <== ALWAYS TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); 43c0a: 226a 00a4 moveal %a2@(164),%a1 <== NOT EXECUTED 43c0e: 2d6a 0010 0008 movel %a2@(16),%fp@(8) <== NOT EXECUTED 43c14: 2d42 0010 movel %d2,%fp@(16) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43c18: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 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); 43c1e: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43c22: 4e5e unlk %fp <== NOT EXECUTED 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); 43c24: 4ed1 jmp %a1@ <== NOT EXECUTED return; } newHead = tty->rawOutBuf.Head; 43c26: 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); 43c2a: 2a3c 0000 0700 movel #1792,%d5 while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 43c30: 49f9 0004 57c0 lea 457c0 ,%a4 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 43c36: 6000 00a0 braw 43cd8 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43c3a: 222a 0088 movel %a2@(136),%d1 43c3e: 5286 addql #1,%d6 rtems_interrupt_disable (level); 43c40: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43c42: 4c41 6004 remul %d1,%d4,%d6 43c46: 2c04 movel %d4,%d6 rtems_interrupt_disable (level); 43c48: 40c3 movew %sr,%d3 43c4a: 8083 orl %d3,%d0 43c4c: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 43c4e: 602a bras 43c7a tty->rawOutBufState = rob_wait; 43c50: 7002 moveq #2,%d0 43c52: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 43c56: 46c3 movew %d3,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 43c58: 42a7 clrl %sp@- 43c5a: 42a7 clrl %sp@- 43c5c: 2f2a 008c movel %a2@(140),%sp@- 43c60: 4e94 jsr %a4@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43c62: 4fef 000c lea %sp@(12),%sp 43c66: 4a80 tstl %d0 43c68: 6708 beqs 43c72 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 43c6a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43c6c: 4eb9 0004 5e44 jsr 45e44 <== NOT EXECUTED rtems_interrupt_disable (level); 43c72: 2005 movel %d5,%d0 43c74: 40c3 movew %sr,%d3 43c76: 8083 orl %d3,%d0 43c78: 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) { 43c7a: 202a 0084 movel %a2@(132),%d0 43c7e: b084 cmpl %d4,%d0 43c80: 67ce beqs 43c50 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 43c82: 202a 0080 movel %a2@(128),%d0 43c86: 206a 007c moveal %a2@(124),%a0 43c8a: 1193 0800 moveb %a3@,%a0@(00000000,%d0:l) tty->rawOutBuf.Head = newHead; 43c8e: 2544 0080 movel %d4,%a2@(128) if (tty->rawOutBufState == rob_idle) { 43c92: 4aaa 0094 tstl %a2@(148) 43c96: 663a bnes 43cd2 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 43c98: 202a 00b8 movel %a2@(184),%d0 43c9c: 0800 0004 btst #4,%d0 43ca0: 661e bnes 43cc0 <== NEVER TAKEN (*tty->device.write)(tty->minor, 43ca2: 4878 0001 pea 1 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 43ca6: 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, 43caa: d0aa 007c addl %a2@(124),%d0 43cae: 2f00 movel %d0,%sp@- 43cb0: 2f2a 0010 movel %a2@(16),%sp@- 43cb4: 206a 00a4 moveal %a2@(164),%a0 43cb8: 4e90 jsr %a0@ 43cba: 4fef 000c lea %sp@(12),%sp 43cbe: 600c bras 43ccc (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 43cc0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43cc4: 7220 moveq #32,%d1 <== NOT EXECUTED 43cc6: 8081 orl %d1,%d0 <== NOT EXECUTED 43cc8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 43ccc: 7001 moveq #1,%d0 43cce: 2540 0094 movel %d0,%a2@(148) RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 43cd2: 528b addql #1,%a3 /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); 43cd4: 46c3 movew %d3,%sr len--; 43cd6: 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) { 43cd8: 4a82 tstl %d2 43cda: 6600 ff5e bnew 43c3a tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43cde: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 43ce4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044334 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 44334: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 44338: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4433c: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 44340: 2053 moveal %a3@,%a0 <== NOT EXECUTED 44342: 2468 0034 moveal %a0@(52),%a2 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44346: 42a7 clrl %sp@- <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; 44348: 242b 0010 movel %a3@(16),%d2 <== NOT EXECUTED char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4434c: 42a7 clrl %sp@- <== NOT EXECUTED 4434e: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; 44352: 2a6b 000c moveal %a3@(12),%a5 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44356: 4eb9 0004 57c0 jsr 457c0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 4435c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 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); 44360: 2600 movel %d0,%d3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 44362: 6600 029a bnew 445fe <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 44366: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 4436a: 41f9 0005 d2c0 lea 5d2c0 ,%a0 <== NOT EXECUTED 44370: eb88 lsll #5,%d0 <== NOT EXECUTED 44372: 2070 0808 moveal %a0@(00000008,%d0:l),%a0 <== NOT EXECUTED 44376: 4a88 tstl %a0 <== NOT EXECUTED 44378: 671e beqs 44398 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 4437a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4437c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4437e: 4e90 jsr %a0@ <== NOT EXECUTED 44380: 2600 movel %d0,%d3 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 44382: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED rtems_semaphore_release (tty->isem); 44386: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 4438a: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED return sc; 44390: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44394: 6000 0268 braw 445fe <== NOT EXECUTED } if (tty->cindex == tty->ccount) { 44398: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 4439c: b0aa 0024 cmpl %a2@(36),%d0 <== NOT EXECUTED 443a0: 6600 0234 bnew 445d6 <== NOT EXECUTED tty->cindex = tty->ccount = 0; 443a4: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED tty->read_start_column = tty->column; 443a8: 256a 0028 002c movel %a2@(40),%a2@(44) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 443ae: 42aa 0024 clrl %a2@(36) <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 443b2: 4aaa 00a0 tstl %a2@(160) <== NOT EXECUTED 443b6: 6700 00da beqw 44492 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 443ba: 4aaa 00b4 tstl %a2@(180) <== NOT EXECUTED 443be: 6600 00d2 bnew 44492 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 443c2: 7002 moveq #2,%d0 <== NOT EXECUTED 443c4: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 443c8: 673e beqs 44408 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 443ca: 49f9 0004 5c98 lea 45c98 ,%a4 <== NOT EXECUTED } else { if (siproc (n, tty)) 443d0: 283c 0004 41aa movel #278954,%d4 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 443d6: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 443da: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 443de: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 443e0: 588f addql #4,%sp <== NOT EXECUTED 443e2: 4a80 tstl %d0 <== NOT EXECUTED 443e4: 6c0a bges 443f0 <== NOT EXECUTED rtems_task_wake_after (1); 443e6: 4878 0001 pea 1 <== NOT EXECUTED 443ea: 4e94 jsr %a4@ <== NOT EXECUTED 443ec: 588f addql #4,%sp <== NOT EXECUTED 443ee: 60e6 bras 443d6 <== NOT EXECUTED } else { if (siproc (n, tty)) 443f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 443f2: 2044 moveal %d4,%a0 <== NOT EXECUTED 443f4: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 443fa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 443fc: 4e90 jsr %a0@ <== NOT EXECUTED 443fe: 508f addql #8,%sp <== NOT EXECUTED 44400: 4a80 tstl %d0 <== NOT EXECUTED 44402: 67d2 beqs 443d6 <== NOT EXECUTED 44404: 6000 01d0 braw 445d6 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 44408: 41f9 0004 51a0 lea 451a0 ,%a0<== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; now = rtems_clock_get_ticks_since_boot(); 4440e: 2848 moveal %a0,%a4 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 44410: 2c3c 0004 5c98 movel #285848,%d6 <== NOT EXECUTED } else { siproc (n, tty); 44416: 2a3c 0004 41aa movel #278954,%d5 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 4441c: 4e90 jsr %a0@ <== NOT EXECUTED 4441e: 2800 movel %d0,%d4 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 44420: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44424: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 44428: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 4442a: 588f addql #4,%sp <== NOT EXECUTED 4442c: 4a80 tstl %d0 <== NOT EXECUTED 4442e: 6c34 bges 44464 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 44430: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 44434: 670e beqs 44444 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 44436: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 4443a: 671c beqs 44458 <== NOT EXECUTED 4443c: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 44440: 6716 beqs 44458 <== NOT EXECUTED 44442: 6008 bras 4444c <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 44444: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 44448: 6700 018c beqw 445d6 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 4444c: 4e94 jsr %a4@ <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 4444e: 9084 subl %d4,%d0 <== NOT EXECUTED 44450: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 44454: 6200 0180 bhiw 445d6 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 44458: 4878 0001 pea 1 <== NOT EXECUTED 4445c: 2046 moveal %d6,%a0 <== NOT EXECUTED 4445e: 4e90 jsr %a0@ <== NOT EXECUTED 44460: 588f addql #4,%sp <== NOT EXECUTED 44462: 60bc bras 44420 <== NOT EXECUTED } else { siproc (n, tty); 44464: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44466: 2045 moveal %d5,%a0 <== NOT EXECUTED 44468: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 4446e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44470: 4e90 jsr %a0@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 44472: 508f addql #8,%sp <== NOT EXECUTED 44474: 4281 clrl %d1 <== NOT EXECUTED 44476: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 4447a: 1200 moveb %d0,%d1 <== NOT EXECUTED 4447c: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED 44480: 6f00 0154 blew 445d6 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 44484: 4a00 tstb %d0 <== NOT EXECUTED 44486: 6798 beqs 44420 <== NOT EXECUTED 44488: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 4448c: 6792 beqs 44420 <== NOT EXECUTED then = rtems_clock_get_ticks_since_boot(); 4448e: 4e94 jsr %a4@ <== NOT EXECUTED 44490: 608c bras 4441e <== 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)(tty->minor, 44492: 2e0a movel %a2,%d7 <== NOT EXECUTED 44494: 0687 0000 0049 addil #73,%d7 <== NOT EXECUTED 4449a: 7801 moveq #1,%d4 <== NOT EXECUTED 4449c: 49fa fd0c lea %pc@(441aa ),%a4 <== NOT EXECUTED /* * Wait for characters */ if ( wait ) { sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 444a0: 2c3c 0004 57c0 movel #284608,%d6 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 444a6: 2a2a 0074 movel %a2@(116),%d5 <== NOT EXECUTED 444aa: 6000 00e2 braw 4458e <== NOT EXECUTED 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; 444ae: 2a2a 005c movel %a2@(92),%d5 <== NOT EXECUTED 444b2: 5285 addql #1,%d5 <== NOT EXECUTED 444b4: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 444b8: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 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; 444bc: 4c40 5001 remul %d0,%d1,%d5 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 444c0: 1030 1800 moveb %a0@(00000000,%d1:l),%d0 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 444c4: 2541 005c movel %d1,%a2@(92) <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; 444c8: 1d40 fffb moveb %d0,%fp@(-5) <== NOT EXECUTED tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 444cc: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 444d0: 206a 0064 moveal %a2@(100),%a0 <== NOT EXECUTED 444d4: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 <== NOT EXECUTED 444d8: 93c1 subal %d1,%a1 <== NOT EXECUTED 444da: 2a09 movel %a1,%d5 <== NOT EXECUTED 444dc: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 444e0: 4c41 5000 remul %d1,%d0,%d5 <== NOT EXECUTED 444e4: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED 444e8: b0aa 00bc cmpl %a2@(188),%d0 <== NOT EXECUTED 444ec: 646a bccs 44558 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 444ee: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 444f2: 72fe moveq #-2,%d1 <== NOT EXECUTED 444f4: c081 andl %d1,%d0 <== NOT EXECUTED 444f6: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 444fa: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 444fe: 0280 0000 0202 andil #514,%d0 <== NOT EXECUTED 44504: 0c80 0000 0202 cmpil #514,%d0 <== NOT EXECUTED 4450a: 6626 bnes 44532 <== NOT EXECUTED 4450c: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 44510: 670a beqs 4451c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 44512: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 44516: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4451a: 6716 beqs 44532 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 4451c: 4878 0001 pea 1 <== NOT EXECUTED 44520: 2f07 movel %d7,%sp@- <== NOT EXECUTED 44522: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44526: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4452a: 4e90 jsr %a0@ <== NOT EXECUTED 4452c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44530: 6026 bras 44558 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 44532: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44536: 0800 0008 btst #8,%d0 <== NOT EXECUTED 4453a: 671c beqs 44558 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 4453c: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 44540: 7afb moveq #-5,%d5 <== NOT EXECUTED 44542: c285 andl %d5,%d1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 44544: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 44548: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 4454c: 4a88 tstl %a0 <== NOT EXECUTED 4454e: 6708 beqs 44558 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 44550: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44554: 4e90 jsr %a0@ <== NOT EXECUTED 44556: 588f addql #4,%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 44558: 7002 moveq #2,%d0 <== NOT EXECUTED 4455a: 4285 clrl %d5 <== NOT EXECUTED 4455c: 1a2e fffb moveb %fp@(-5),%d5 <== NOT EXECUTED 44560: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44564: 670e beqs 44574 <== NOT EXECUTED if (siproc (c, tty)) 44566: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44568: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4456a: 4e94 jsr %a4@ <== NOT EXECUTED 4456c: 508f addql #8,%sp <== NOT EXECUTED 4456e: 4a80 tstl %d0 <== NOT EXECUTED 44570: 6616 bnes 44588 <== NOT EXECUTED 44572: 6016 bras 4458a <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 44574: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44576: 2f05 movel %d5,%sp@- <== NOT EXECUTED 44578: 4e94 jsr %a4@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 4457a: 508f addql #8,%sp <== NOT EXECUTED 4457c: 4280 clrl %d0 <== NOT EXECUTED 4457e: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 44582: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44586: 6e02 bgts 4458a <== NOT EXECUTED 44588: 4284 clrl %d4 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 4458a: 2a2a 0070 movel %a2@(112),%d5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4458e: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 44592: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44596: b081 cmpl %d1,%d0 <== NOT EXECUTED 44598: 6710 beqs 445aa <== NOT EXECUTED 4459a: 2039 0005 c520 movel 5c520 ,%d0 <== NOT EXECUTED 445a0: 5380 subql #1,%d0 <== NOT EXECUTED 445a2: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 445a6: 6e00 ff06 bgtw 444ae <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 445aa: 4a84 tstl %d4 <== NOT EXECUTED 445ac: 6728 beqs 445d6 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 445ae: 2f05 movel %d5,%sp@- <== NOT EXECUTED 445b0: 2f2a 006c movel %a2@(108),%sp@- <== NOT EXECUTED 445b4: 2046 moveal %d6,%a0 <== NOT EXECUTED 445b6: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED 445ba: 4e90 jsr %a0@ <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 445bc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 445c0: 4a80 tstl %d0 <== NOT EXECUTED 445c2: 67ca beqs 4458e <== NOT EXECUTED 445c4: 6010 bras 445d6 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 445c6: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED count--; 445ca: 5382 subql #1,%d2 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 445cc: 1af0 0800 moveb %a0@(00000000,%d0:l),%a5@+ <== NOT EXECUTED 445d0: 5280 addql #1,%d0 <== NOT EXECUTED 445d2: 2540 0024 movel %d0,%a2@(36) <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 445d6: 4a82 tstl %d2 <== NOT EXECUTED 445d8: 670a beqs 445e4 <== NOT EXECUTED 445da: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 445de: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 445e2: 6de2 blts 445c6 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 445e4: 202b 0010 movel %a3@(16),%d0 <== NOT EXECUTED 445e8: 9082 subl %d2,%d0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 445ea: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 445ee: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 445f2: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 445f6: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED return sc; 445fc: 588f addql #4,%sp <== NOT EXECUTED } 445fe: 2003 movel %d3,%d0 <== NOT EXECUTED 44600: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44606: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004377c : * 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) { 4377c: 4e56 fff4 linkw %fp,#-12 43780: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43784: 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)) 43788: 202a 00b8 movel %a2@(184),%d0 4378c: 0280 0000 0403 andil #1027,%d0 43792: 0c80 0000 0401 cmpil #1025,%d0 43798: 663c bnes 437d6 <== ALWAYS TAKEN == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 4379a: 4878 0001 pea 1 <== NOT EXECUTED 4379e: 486a 004a pea %a2@(74) <== NOT EXECUTED 437a2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 437a6: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 437aa: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 437ac: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 437b2: 40c1 movew %sr,%d1 <== NOT EXECUTED 437b4: 8081 orl %d1,%d0 <== NOT EXECUTED 437b6: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; 437b8: 7402 moveq #2,%d2 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 437ba: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 437be: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 437c2: 8082 orl %d2,%d0 <== NOT EXECUTED 437c4: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 437c8: 46c1 movew %d1,%sr <== NOT EXECUTED 437ca: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 437ce: 143c 0001 moveb #1,%d2 <== NOT EXECUTED 437d2: 6000 0156 braw 4392a <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 437d6: 202a 00b8 movel %a2@(184),%d0 437da: 7203 moveq #3,%d1 437dc: 7402 moveq #2,%d2 437de: c081 andl %d1,%d0 437e0: b480 cmpl %d0,%d2 437e2: 663a bnes 4381e <== 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, 437e4: 4878 0001 pea 1 <== NOT EXECUTED 437e8: 486a 0049 pea %a2@(73) <== NOT EXECUTED 437ec: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 437f0: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 437f4: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 437f6: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 437fc: 40c1 movew %sr,%d1 <== NOT EXECUTED 437fe: 8081 orl %d1,%d0 <== NOT EXECUTED 43800: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; 43802: 74fd moveq #-3,%d2 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 43804: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 43808: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4380c: c082 andl %d2,%d0 <== NOT EXECUTED 4380e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 43812: 46c1 movew %d1,%sr <== NOT EXECUTED 43814: 7401 moveq #1,%d2 <== NOT EXECUTED 43816: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4381a: 6000 010e braw 4392a <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 4381e: 222a 0080 movel %a2@(128),%d1 43822: 202a 0084 movel %a2@(132),%d0 43826: b081 cmpl %d1,%d0 43828: 6620 bnes 4384a <== ALWAYS TAKEN /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 4382a: 7002 moveq #2,%d0 <== NOT EXECUTED 4382c: b0aa 0094 cmpl %a2@(148),%d0 <== NOT EXECUTED 43830: 6706 beqs 43838 <== NOT EXECUTED 43832: 4282 clrl %d2 <== NOT EXECUTED 43834: 6000 00f4 braw 4392a <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 43838: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 4383c: 4282 clrl %d2 <== NOT EXECUTED 4383e: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED 43844: 588f addql #4,%sp <== NOT EXECUTED 43846: 6000 00e2 braw 4392a <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 4384a: 203c 0000 0700 movel #1792,%d0 43850: 40c2 movew %sr,%d2 43852: 8082 orl %d2,%d0 43854: 46c0 movew %d0,%sr len = tty->t_dqlen; 43856: 222a 0090 movel %a2@(144),%d1 tty->t_dqlen = 0; 4385a: 42aa 0090 clrl %a2@(144) rtems_interrupt_enable(level); 4385e: 46c2 movew %d2,%sr newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 43860: 202a 0084 movel %a2@(132),%d0 43864: d280 addl %d0,%d1 43866: 202a 0088 movel %a2@(136),%d0 4386a: 4c40 1003 remul %d0,%d3,%d1 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 4386e: 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; 43870: 2543 0084 movel %d3,%a2@(132) if (tty->rawOutBufState == rob_wait) { 43874: b2aa 0094 cmpl %a2@(148),%d1 43878: 660c bnes 43886 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4387a: 2f2a 008c movel %a2@(140),%sp@- 4387e: 4eb9 0004 58c4 jsr 458c4 43884: 588f addql #4,%sp } if (newTail == tty->rawOutBuf.Head) { 43886: 202a 0080 movel %a2@(128),%d0 4388a: b083 cmpl %d3,%d0 4388c: 6622 bnes 438b0 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4388e: 206a 00d4 moveal %a2@(212),%a0 } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 43892: 42aa 0094 clrl %a2@(148) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43896: 4a88 tstl %a0 43898: 6606 bnes 438a0 <== NEVER TAKEN 4389a: 4282 clrl %d2 4389c: 6000 0088 braw 43926 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 438a0: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED 438a4: 4282 clrl %d2 <== NOT EXECUTED 438a6: 486a 0030 pea %a2@(48) <== NOT EXECUTED 438aa: 4e90 jsr %a0@ <== NOT EXECUTED 438ac: 508f addql #8,%sp <== NOT EXECUTED 438ae: 6076 bras 43926 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 438b0: 202a 00b8 movel %a2@(184),%d0 438b4: 0280 0000 0210 andil #528,%d0 438ba: 0c80 0000 0210 cmpil #528,%d0 438c0: 6624 bnes 438e6 <== 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); 438c2: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 438c6: 40c1 movew %sr,%d1 <== NOT EXECUTED 438c8: 8081 orl %d1,%d0 <== NOT EXECUTED 438ca: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 438cc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 438d0: 7420 moveq #32,%d2 <== NOT EXECUTED 438d2: 8082 orl %d2,%d0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 438d4: 143c 0001 moveb #1,%d2 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 438d8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 438dc: 2542 0094 movel %d2,%a2@(148) <== NOT EXECUTED rtems_interrupt_enable(level); 438e0: 46c1 movew %d1,%sr <== NOT EXECUTED 438e2: 4202 clrb %d2 <== NOT EXECUTED 438e4: 6040 bras 43926 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 438e6: 202a 0080 movel %a2@(128),%d0 438ea: b083 cmpl %d3,%d0 438ec: 6406 bccs 438f4 nToSend = tty->rawOutBuf.Size - newTail; 438ee: 242a 0088 movel %a2@(136),%d2 438f2: 6004 bras 438f8 else nToSend = tty->rawOutBuf.Head - newTail; 438f4: 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)) { 438f8: 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; 438fc: 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)) { 438fe: 0280 0000 0600 andil #1536,%d0 43904: 6702 beqs 43908 <== ALWAYS TAKEN 43906: 7401 moveq #1,%d2 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 43908: 2f02 movel %d2,%sp@- 4390a: 202a 007c movel %a2@(124),%d0 4390e: d083 addl %d3,%d0 /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 43910: 7201 moveq #1,%d1 (*tty->device.write)(tty->minor, 43912: 2f00 movel %d0,%sp@- 43914: 2f2a 0010 movel %a2@(16),%sp@- 43918: 206a 00a4 moveal %a2@(164),%a0 /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 4391c: 2541 0094 movel %d1,%a2@(148) (*tty->device.write)(tty->minor, 43920: 4e90 jsr %a0@ 43922: 4fef 000c lea %sp@(12),%sp &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 43926: 2543 0084 movel %d3,%a2@(132) } return nToSend; } 4392a: 2002 movel %d2,%d0 4392c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 43932: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044ed2 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 44ed2: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 44ed6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 44eda: 260e movel %fp,%d3 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 44edc: 240e movel %fp,%d2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 44ede: 5d83 subql #6,%d3 <== NOT EXECUTED 44ee0: 4bf9 0004 5208 lea 45208 ,%a5 <== NOT EXECUTED RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { tty->rxTaskId = 0; rtems_task_delete(RTEMS_SELF); 44ee6: 49f9 0004 5a98 lea 45a98 ,%a4 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 44eec: 5382 subql #1,%d2 <== NOT EXECUTED 44eee: 47f9 0004 3996 lea 43996 ,%a3<== NOT EXECUTED /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 44ef4: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 44ef8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44efa: 42a7 clrl %sp@- <== NOT EXECUTED 44efc: 4878 0002 pea 2 <== NOT EXECUTED 44f00: 4878 0003 pea 3 <== NOT EXECUTED 44f04: 4e95 jsr %a5@ <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 44f06: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 44f0a: 7001 moveq #1,%d0 <== NOT EXECUTED 44f0c: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 44f10: 670c beqs 44f1e <== NOT EXECUTED tty->rxTaskId = 0; 44f12: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 44f16: 42a7 clrl %sp@- <== NOT EXECUTED 44f18: 4e94 jsr %a4@ <== NOT EXECUTED 44f1a: 588f addql #4,%sp <== NOT EXECUTED 44f1c: 60da bras 44ef8 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 44f1e: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44f22: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 44f26: 4e90 jsr %a0@ <== NOT EXECUTED if (c != EOF) { 44f28: 588f addql #4,%sp <== NOT EXECUTED 44f2a: 72ff moveq #-1,%d1 <== NOT EXECUTED 44f2c: b280 cmpl %d0,%d1 <== NOT EXECUTED 44f2e: 67c8 beqs 44ef8 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 44f30: 4878 0001 pea 1 <== NOT EXECUTED c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 44f34: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 44f38: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44f3a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44f3c: 4e93 jsr %a3@ <== NOT EXECUTED 44f3e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44f42: 60b4 bras 44ef8 <== NOT EXECUTED =============================================================================== 00043760 : * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { 43760: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43764: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 43768: 4878 0002 pea 2 <== NOT EXECUTED 4376c: 2f28 00c4 movel %a0@(196),%sp@- <== NOT EXECUTED 43770: 4eb9 0004 536c jsr 4536c <== NOT EXECUTED 43776: 508f addql #8,%sp <== NOT EXECUTED } 43778: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044e6a : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 44e6a: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 44e6e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 44e72: 240e movel %fp,%d2 <== NOT EXECUTED 44e74: 5982 subql #4,%d2 <== NOT EXECUTED 44e76: 4bf9 0004 5208 lea 45208 ,%a5 <== NOT EXECUTED RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; rtems_task_delete(RTEMS_SELF); 44e7c: 49f9 0004 5a98 lea 45a98 ,%a4 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 44e82: 47f9 0004 377c lea 4377c ,%a3<== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 44e88: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 44e8c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44e8e: 42a7 clrl %sp@- <== NOT EXECUTED 44e90: 4878 0002 pea 2 <== NOT EXECUTED 44e94: 4878 0003 pea 3 <== NOT EXECUTED 44e98: 4e95 jsr %a5@ <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 44e9a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 44e9e: 7001 moveq #1,%d0 <== NOT EXECUTED 44ea0: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 44ea4: 670a beqs 44eb0 <== NOT EXECUTED tty->txTaskId = 0; 44ea6: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 44eaa: 42a7 clrl %sp@- <== NOT EXECUTED 44eac: 4e94 jsr %a4@ <== NOT EXECUTED 44eae: 601e bras 44ece <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 44eb0: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44eb4: eb88 lsll #5,%d0 <== NOT EXECUTED 44eb6: 0680 0005 d2d4 addil #381652,%d0 <== NOT EXECUTED 44ebc: 2240 moveal %d0,%a1 <== NOT EXECUTED 44ebe: 2051 moveal %a1@,%a0 <== NOT EXECUTED 44ec0: 4a88 tstl %a0 <== NOT EXECUTED 44ec2: 6706 beqs 44eca <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 44ec4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44ec6: 4e90 jsr %a0@ <== NOT EXECUTED 44ec8: 588f addql #4,%sp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 44eca: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44ecc: 4e93 jsr %a3@ <== NOT EXECUTED 44ece: 588f addql #4,%sp <== NOT EXECUTED 44ed0: 60ba bras 44e8c <== NOT EXECUTED =============================================================================== 00044212 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 44212: 4e56 ffe8 linkw %fp,#-24 44216: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4421a: 246e 0008 moveal %fp@(8),%a2 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4421e: 2052 moveal %a2@,%a0 44220: 2668 0034 moveal %a0@(52),%a3 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44224: 42a7 clrl %sp@- 44226: 42a7 clrl %sp@- 44228: 2f2b 0018 movel %a3@(24),%sp@- 4422c: 4eb9 0004 57c0 jsr 457c0 if (sc != RTEMS_SUCCESSFUL) 44232: 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); 44236: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) 44238: 6600 0084 bnew 442be return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 4423c: 202b 00cc movel %a3@(204),%d0 44240: eb88 lsll #5,%d0 44242: 0680 0005 d2cc addil #381644,%d0 44248: 2240 moveal %d0,%a1 4424a: 2051 moveal %a1@,%a0 4424c: 4a88 tstl %a0 4424e: 6718 beqs 44268 <== ALWAYS TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 44250: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44252: 2f0b movel %a3,%sp@- <== NOT EXECUTED 44254: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_release (tty->osem); 44256: 2f2b 0018 movel %a3@(24),%sp@- <== NOT EXECUTED 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); 4425a: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 4425c: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED return sc; 44262: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44266: 6056 bras 442be <== NOT EXECUTED } if (tty->termios.c_oflag & OPOST) { 44268: 7001 moveq #1,%d0 4426a: c0ab 0034 andl %a3@(52),%d0 4426e: 6728 beqs 44298 <== NEVER TAKEN uint32_t count = args->count; 44270: 262a 0010 movel %a2@(16),%d3 char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 44274: 4bfa fa72 lea %pc@(43ce8 ),%a5 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; 44278: 286a 000c moveal %a2@(12),%a4 while (count--) 4427c: 600e bras 4428c oproc (*buffer++, tty); 4427e: 4280 clrl %d0 44280: 101c moveb %a4@+,%d0 44282: 5383 subql #1,%d3 44284: 2f0b movel %a3,%sp@- 44286: 2f00 movel %d0,%sp@- 44288: 4e95 jsr %a5@ 4428a: 508f addql #8,%sp return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 4428c: 4a83 tstl %d3 4428e: 66ee bnes 4427e oproc (*buffer++, tty); args->bytes_moved = args->count; 44290: 256a 0010 0018 movel %a2@(16),%a2@(24) 44296: 601a bras 442b2 } else { rtems_termios_puts (args->buffer, args->count, tty); 44298: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4429a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4429e: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 442a2: 4eb9 0004 3bee jsr 43bee <== NOT EXECUTED args->bytes_moved = args->count; 442a8: 256a 0010 0018 movel %a2@(16),%a2@(24) <== NOT EXECUTED 442ae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 442b2: 2f2b 0018 movel %a3@(24),%sp@- 442b6: 4eb9 0004 58c4 jsr 458c4 return sc; 442bc: 588f addql #4,%sp } 442be: 2002 movel %d2,%d0 442c0: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 442c6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051738 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 51738: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 5173c: 486e fffc pea %fp@(-4) 51740: 2f2e 0008 movel %fp@(8),%sp@- 51744: 4879 0007 64c6 pea 764c6 <_Timer_Information> 5174a: 4eb9 0005 3f24 jsr 53f24 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 51750: 4fef 000c lea %sp@(12),%sp 51754: 4aae fffc tstl %fp@(-4) 51758: 6704 beqs 5175e 5175a: 7004 moveq #4,%d0 5175c: 601e bras 5177c case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 5175e: 7204 moveq #4,%d1 51760: 2040 moveal %d0,%a0 51762: b2a8 0038 cmpl %a0@(56),%d1 51766: 670c beqs 51774 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 51768: 4868 0010 pea %a0@(16) 5176c: 4eb9 0005 5b30 jsr 55b30 <_Watchdog_Remove> 51772: 588f addql #4,%sp _Thread_Enable_dispatch(); 51774: 4eb9 0005 47f6 jsr 547f6 <_Thread_Enable_dispatch> 5177a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5177c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051bbc : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 51bbc: 4e56 ffe8 linkw %fp,#-24 51bc0: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 51bc4: 282e 0008 movel %fp@(8),%d4 51bc8: 262e 000c movel %fp@(12),%d3 51bcc: 242e 0010 movel %fp@(16),%d2 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 51bd0: 2679 0007 64fe moveal 764fe <_Timer_server>,%a3 if ( !timer_server ) 51bd6: 4a8b tstl %a3 51bd8: 6606 bnes 51be0 51bda: 700e moveq #14,%d0 51bdc: 6000 00a4 braw 51c82 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 51be0: 4a39 0007 628c tstb 7628c <_TOD_Is_set> 51be6: 6606 bnes 51bee <== ALWAYS TAKEN 51be8: 700b moveq #11,%d0 <== NOT EXECUTED 51bea: 6000 0096 braw 51c82 <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !routine ) 51bee: 4a82 tstl %d2 51bf0: 6606 bnes 51bf8 51bf2: 7009 moveq #9,%d0 51bf4: 6000 008c braw 51c82 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 51bf8: 2f03 movel %d3,%sp@- 51bfa: 4eb9 0004 f038 jsr 4f038 <_TOD_Validate> 51c00: 588f addql #4,%sp 51c02: 4a00 tstb %d0 51c04: 677a beqs 51c80 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 51c06: 2f03 movel %d3,%sp@- 51c08: 4eb9 0004 ef98 jsr 4ef98 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 51c0e: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 51c10: 2600 movel %d0,%d3 if ( seconds <= _TOD_Seconds_since_epoch() ) 51c12: b0b9 0007 630a cmpl 7630a <_TOD_Now>,%d0 51c18: 6366 blss 51c80 51c1a: 486e fffc pea %fp@(-4) 51c1e: 2f04 movel %d4,%sp@- 51c20: 4879 0007 64c6 pea 764c6 <_Timer_Information> 51c26: 4eb9 0005 3f24 jsr 53f24 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 51c2c: 4fef 000c lea %sp@(12),%sp 51c30: 2440 moveal %d0,%a2 51c32: 4aae fffc tstl %fp@(-4) 51c36: 6704 beqs 51c3c 51c38: 7004 moveq #4,%d0 51c3a: 6046 bras 51c82 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 51c3c: 486a 0010 pea %a2@(16) 51c40: 4eb9 0005 5b30 jsr 55b30 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 51c46: 256e 0014 0034 movel %fp@(20),%a2@(52) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 51c4c: 7003 moveq #3,%d0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 51c4e: 2544 0030 movel %d4,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 51c52: 96b9 0007 630a subl 7630a <_TOD_Now>,%d3 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 51c58: 2540 0038 movel %d0,%a2@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 51c5c: 2543 001c movel %d3,%a2@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 51c60: 2542 002c movel %d2,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 51c64: 42aa 0018 clrl %a2@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 51c68: 2f0a movel %a2,%sp@- 51c6a: 2f0b movel %a3,%sp@- 51c6c: 206b 0004 moveal %a3@(4),%a0 51c70: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 51c72: 4eb9 0005 47f6 jsr 547f6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 51c78: 4fef 000c lea %sp@(12),%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 51c7c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 51c7e: 6002 bras 51c82 51c80: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 51c82: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 51c88: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004249c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 4249c: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 424a0: 48d7 047c moveml %d2-%d6/%a2,%sp@ <== NOT EXECUTED 424a4: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 424a8: 2a04 movel %d4,%d5 <== NOT EXECUTED 424aa: 0285 2000 0000 andil #536870912,%d5 <== NOT EXECUTED 424b0: 672e beqs 424e0 <== NOT EXECUTED { if (rtems_panic_in_progress++) 424b2: 2039 0005 dabc movel 5dabc ,%d0 <== NOT EXECUTED 424b8: 2200 movel %d0,%d1 <== NOT EXECUTED 424ba: 5281 addql #1,%d1 <== NOT EXECUTED 424bc: 23c1 0005 dabc movel %d1,5dabc <== NOT EXECUTED 424c2: 4a80 tstl %d0 <== NOT EXECUTED 424c4: 670e beqs 424d4 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 424c6: 2039 0005 dc1c movel 5dc1c <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 424cc: 5280 addql #1,%d0 <== NOT EXECUTED 424ce: 23c0 0005 dc1c movel %d0,5dc1c <_Thread_Dispatch_disable_level><== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 424d4: 7002 moveq #2,%d0 <== NOT EXECUTED 424d6: b0b9 0005 dabc cmpl 5dabc ,%d0 <== NOT EXECUTED 424dc: 6d00 0138 bltw 42616 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 424e0: 2079 0005 c5c4 moveal 5c5c4 <_impure_ptr>,%a0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 424e6: 2c04 movel %d4,%d6 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 424e8: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 424ec: 0286 8fff ffff andil #-1879048193,%d6 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 424f2: 4eb9 0004 d414 jsr 4d414 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 424f8: 588f addql #4,%sp <== NOT EXECUTED 424fa: 0804 001e btst #30,%d4 <== NOT EXECUTED 424fe: 6604 bnes 42504 <== NOT EXECUTED 42500: 4282 clrl %d2 <== NOT EXECUTED 42502: 600a bras 4250e <== NOT EXECUTED local_errno = errno; 42504: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4250a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4250c: 2410 movel %a0@,%d2 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 4250e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 42512: 2079 0005 c5c4 moveal 5c5c4 <_impure_ptr>,%a0 <== NOT EXECUTED 42518: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4251c: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42520: 4eb9 0005 395c jsr 5395c <== NOT EXECUTED if (status) 42526: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 4252a: 2600 movel %d0,%d3 <== NOT EXECUTED if (status) 4252c: 4a86 tstl %d6 <== NOT EXECUTED 4252e: 6726 beqs 42556 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 42530: 2f06 movel %d6,%sp@- <== NOT EXECUTED 42532: 4eb9 0004 2484 jsr 42484 <== NOT EXECUTED 42538: 2079 0005 c5c4 moveal 5c5c4 <_impure_ptr>,%a0 <== NOT EXECUTED 4253e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42540: 4879 0005 ae57 pea 5ae57 <== NOT EXECUTED 42546: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 4254a: 4eb9 0004 d7a0 jsr 4d7a0 <== NOT EXECUTED 42550: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 42554: d680 addl %d0,%d3 <== NOT EXECUTED if (local_errno) 42556: 4a82 tstl %d2 <== NOT EXECUTED 42558: 6754 beqs 425ae <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 4255a: 6f34 bles 42590 <== NOT EXECUTED 4255c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4255e: 45f9 0004 e0b4 lea 4e0b4 ,%a2 <== NOT EXECUTED 42564: 4e92 jsr %a2@ <== NOT EXECUTED 42566: 588f addql #4,%sp <== NOT EXECUTED 42568: 2040 moveal %d0,%a0 <== NOT EXECUTED 4256a: 4a10 tstb %a0@ <== NOT EXECUTED 4256c: 6722 beqs 42590 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 4256e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42570: 4e92 jsr %a2@ <== NOT EXECUTED 42572: 2079 0005 c5c4 moveal 5c5c4 <_impure_ptr>,%a0 <== NOT EXECUTED 42578: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4257a: 4879 0005 ae65 pea 5ae65 <== NOT EXECUTED 42580: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42584: 4eb9 0004 d7a0 jsr 4d7a0 <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) 4258a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4258e: 601c bras 425ac <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 42590: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42592: 4879 0005 ae72 pea 5ae72 <== NOT EXECUTED 42598: 2079 0005 c5c4 moveal 5c5c4 <_impure_ptr>,%a0 <== NOT EXECUTED 4259e: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 425a2: 4eb9 0004 d7a0 jsr 4d7a0 <== NOT EXECUTED 425a8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 425ac: d680 addl %d0,%d3 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 425ae: 4879 0005 b302 pea 5b302 <== NOT EXECUTED 425b4: 2079 0005 c5c4 moveal 5c5c4 <_impure_ptr>,%a0 <== NOT EXECUTED 425ba: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 425be: 0284 3000 0000 andil #805306368,%d4 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 425c4: 4eb9 0004 d7a0 jsr 4d7a0 <== NOT EXECUTED (void) fflush(stderr); 425ca: 2079 0005 c5c4 moveal 5c5c4 <_impure_ptr>,%a0 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 425d0: 2c00 movel %d0,%d6 <== NOT EXECUTED (void) fflush(stderr); 425d2: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 425d6: 4eb9 0004 d414 jsr 4d414 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 425dc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 425e0: 4a84 tstl %d4 <== NOT EXECUTED 425e2: 6606 bnes 425ea <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 425e4: 2006 movel %d6,%d0 <== NOT EXECUTED 425e6: d083 addl %d3,%d0 <== NOT EXECUTED 425e8: 602e bras 42618 <== NOT EXECUTED 425ea: 41f9 0004 2640 lea 42640 ,%a0 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) { if (error_flag & RTEMS_ERROR_PANIC) 425f0: 4a85 tstl %d5 <== NOT EXECUTED 425f2: 6712 beqs 42606 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 425f4: 4879 0005 ae86 pea 5ae86 <== NOT EXECUTED 425fa: 42a7 clrl %sp@- <== NOT EXECUTED 425fc: 4e90 jsr %a0@ <== NOT EXECUTED _exit(local_errno); 425fe: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42600: 4eb9 0004 3020 jsr 43020 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 42606: 4879 0005 ae9b pea 5ae9b <== NOT EXECUTED 4260c: 42a7 clrl %sp@- <== NOT EXECUTED 4260e: 4e90 jsr %a0@ <== NOT EXECUTED abort(); 42610: 4eb9 0004 d088 jsr 4d088 <== NOT EXECUTED 42616: 4280 clrl %d0 <== NOT EXECUTED } } return chars_written; } 42618: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 4261e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042a20 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 42a20: 4e56 ffe4 linkw %fp,#-28 42a24: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 42a28: 246e 0008 moveal %fp@(8),%a2 42a2c: 4283 clrl %d3 42a2e: 283c 7fff ffff movel #2147483647,%d4 42a34: 4282 clrl %d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 42a36: 47f9 0004 f4ec lea 4f4ec <__srget_r>,%a3 42a3c: 202a 0004 movel %a2@(4),%d0 42a40: 5380 subql #1,%d0 42a42: 2540 0004 movel %d0,%a2@(4) 42a46: 6c0e bges 42a56 <== ALWAYS TAKEN 42a48: 2f0a movel %a2,%sp@- 42a4a: 2f39 0005 da44 movel 5da44 <_impure_ptr>,%sp@- <== NOT EXECUTED 42a50: 4e93 jsr %a3@ <== NOT EXECUTED 42a52: 508f addql #8,%sp <== NOT EXECUTED 42a54: 600a bras 42a60 <== NOT EXECUTED 42a56: 2052 moveal %a2@,%a0 42a58: 4280 clrl %d0 42a5a: 1010 moveb %a0@,%d0 42a5c: 5288 addql #1,%a0 42a5e: 2488 movel %a0,%a2@ if (c == ':') 42a60: 723a moveq #58,%d1 42a62: b280 cmpl %d0,%d1 42a64: 6750 beqs 42ab6 break; if (sign == 0) { 42a66: 4a83 tstl %d3 42a68: 660e bnes 42a78 <== NEVER TAKEN if (c == '-') { 42a6a: 7c2d moveq #45,%d6 42a6c: bc80 cmpl %d0,%d6 42a6e: 6606 bnes 42a76 <== ALWAYS TAKEN sign = -1; limit++; 42a70: 5284 addql #1,%d4 <== NOT EXECUTED 42a72: 76ff moveq #-1,%d3 <== NOT EXECUTED continue; 42a74: 60c6 bras 42a3c <== NOT EXECUTED 42a76: 7601 moveq #1,%d3 } sign = 1; } if (!isdigit(c)) 42a78: 2079 0005 da40 moveal 5da40 <__ctype_ptr__>,%a0 42a7e: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 42a82: 49c1 extbl %d1 42a84: 44c1 movew %d1,%ccr 42a86: 6640 bnes 42ac8 <== NEVER TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 42a88: 2204 movel %d4,%d1 42a8a: 7c0a moveq #10,%d6 42a8c: 4c46 1005 remul %d6,%d5,%d1 42a90: 4c46 1001 remul %d6,%d1,%d1 42a94: b282 cmpl %d2,%d1 42a96: 6530 bcss 42ac8 <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 42a98: 0680 ffff ffd0 addil #-48,%d0 if ((i > (limit / 10)) 42a9e: b282 cmpl %d2,%d1 42aa0: 6604 bnes 42aa6 <== ALWAYS TAKEN 42aa2: ba80 cmpl %d0,%d5 <== NOT EXECUTED 42aa4: 6522 bcss 42ac8 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 42aa6: 2202 movel %d2,%d1 42aa8: e789 lsll #3,%d1 42aaa: 2241 moveal %d1,%a1 42aac: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 42ab0: 2400 movel %d0,%d2 42ab2: d488 addl %a0,%d2 42ab4: 6086 bras 42a3c } if (sign == 0) 42ab6: 4a83 tstl %d3 42ab8: 670e beqs 42ac8 <== NEVER TAKEN return 0; *val = i * sign; 42aba: 4c02 3800 mulsl %d2,%d3 42abe: 7001 moveq #1,%d0 42ac0: 206e 000c moveal %fp@(12),%a0 42ac4: 2083 movel %d3,%a0@ return 1; 42ac6: 6002 bras 42aca 42ac8: 4280 clrl %d0 } 42aca: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 42ad0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042ad4 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 42ad4: 4e56 ffec linkw %fp,#-20 int c; *name = *bufp; 42ad8: 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) { 42adc: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 42ae0: 246e 0010 moveal %fp@(16),%a2 int c; *name = *bufp; for (;;) { c = getc(fp); 42ae4: 4bf9 0004 f4ec lea 4f4ec <__srget_r>,%a5 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 42aea: 286e 0008 moveal %fp@(8),%a4 42aee: 266e 0014 moveal %fp@(20),%a3 42af2: 242e 0018 movel %fp@(24),%d2 int c; *name = *bufp; 42af6: 2092 movel %a2@,%a0@ for (;;) { c = getc(fp); 42af8: 202c 0004 movel %a4@(4),%d0 42afc: 5380 subql #1,%d0 42afe: 2940 0004 movel %d0,%a4@(4) 42b02: 6c0e bges 42b12 42b04: 2f0c movel %a4,%sp@- 42b06: 2f39 0005 da44 movel 5da44 <_impure_ptr>,%sp@- 42b0c: 4e95 jsr %a5@ 42b0e: 508f addql #8,%sp 42b10: 600a bras 42b1c 42b12: 2054 moveal %a4@,%a0 42b14: 4280 clrl %d0 42b16: 1010 moveb %a0@,%d0 42b18: 5288 addql #1,%a0 42b1a: 2888 movel %a0,%a4@ if (c == ':') { 42b1c: 723a moveq #58,%d1 42b1e: b280 cmpl %d0,%d1 42b20: 6606 bnes 42b28 if (nlFlag) 42b22: 4a82 tstl %d2 42b24: 6724 beqs 42b4a <== ALWAYS TAKEN 42b26: 602e bras 42b56 <== NOT EXECUTED return 0; break; } if (c == '\n') { 42b28: 720a moveq #10,%d1 42b2a: b280 cmpl %d0,%d1 42b2c: 6606 bnes 42b34 if (!nlFlag) 42b2e: 4a82 tstl %d2 42b30: 6618 bnes 42b4a <== ALWAYS TAKEN 42b32: 6022 bras 42b56 <== NOT EXECUTED return 0; break; } if (c == EOF) 42b34: 72ff moveq #-1,%d1 42b36: b280 cmpl %d0,%d1 42b38: 671c beqs 42b56 <== NEVER TAKEN return 0; if (*nleft < 2) 42b3a: 7201 moveq #1,%d1 42b3c: b293 cmpl %a3@,%d1 42b3e: 6416 bccs 42b56 <== NEVER TAKEN return 0; **bufp = c; 42b40: 2052 moveal %a2@,%a0 42b42: 1080 moveb %d0,%a0@ ++(*bufp); 42b44: 5292 addql #1,%a2@ --(*nleft); 42b46: 5393 subql #1,%a3@ } 42b48: 60ae bras 42af8 **bufp = '\0'; 42b4a: 2052 moveal %a2@,%a0 ++(*bufp); --(*nleft); 42b4c: 7001 moveq #1,%d0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 42b4e: 4210 clrb %a0@ ++(*bufp); 42b50: 5292 addql #1,%a2@ --(*nleft); 42b52: 5393 subql #1,%a3@ return 1; 42b54: 6002 bras 42b58 42b56: 4280 clrl %d0 <== NOT EXECUTED } 42b58: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 42b5e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042b62 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 42b62: 4e56 ffe4 linkw %fp,#-28 42b66: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42b6a: 42a7 clrl %sp@- 42b6c: 280e movel %fp,%d4 42b6e: 0684 0000 0014 addil #20,%d4 42b74: 260e movel %fp,%d3 42b76: 0683 0000 0010 addil #16,%d3 42b7c: 47fa ff56 lea %pc@(42ad4 ),%a3 42b80: 2f04 movel %d4,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 42b82: 246e 000c moveal %fp@(12),%a2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42b86: 2f03 movel %d3,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 42b88: 242e 0008 movel %fp@(8),%d2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42b8c: 2f0a movel %a2,%sp@- 42b8e: 2f02 movel %d2,%sp@- 42b90: 4e93 jsr %a3@ 42b92: 4fef 0014 lea %sp@(20),%sp 42b96: 4a80 tstl %d0 42b98: 6700 00c2 beqw 42c5c || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 42b9c: 42a7 clrl %sp@- 42b9e: 2f04 movel %d4,%sp@- 42ba0: 2f03 movel %d3,%sp@- 42ba2: 486a 0004 pea %a2@(4) 42ba6: 2f02 movel %d2,%sp@- 42ba8: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42baa: 4fef 0014 lea %sp@(20),%sp 42bae: 4a80 tstl %d0 42bb0: 6700 00aa beqw 42c5c || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 42bb4: 486e fffc pea %fp@(-4) 42bb8: 2f02 movel %d2,%sp@- 42bba: 4eba fe64 jsr %pc@(42a20 ) { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42bbe: 508f addql #8,%sp 42bc0: 4a80 tstl %d0 42bc2: 6700 0098 beqw 42c5c || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 42bc6: 4878 0001 pea 1 42bca: 2f04 movel %d4,%sp@- 42bcc: 2f03 movel %d3,%sp@- 42bce: 486e fff8 pea %fp@(-8) 42bd2: 2f02 movel %d2,%sp@- 42bd4: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42bd6: 4fef 0014 lea %sp@(20),%sp 42bda: 4a80 tstl %d0 42bdc: 677e beqs 42c5c <== NEVER TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42bde: 226e fff8 moveal %fp@(-8),%a1 42be2: 7001 moveq #1,%d0 42be4: 2049 moveal %a1,%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; 42be6: 356e fffe 0008 movew %fp@(-2),%a2@(8) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42bec: 6008 bras 42bf6 if(*cp == ',') 42bee: 722c moveq #44,%d1 42bf0: b282 cmpl %d2,%d1 42bf2: 6602 bnes 42bf6 <== ALWAYS TAKEN memcount++; 42bf4: 5280 addql #1,%d0 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42bf6: 1210 moveb %a0@,%d1 42bf8: 5288 addql #1,%a0 if(*cp == ',') 42bfa: 1401 moveb %d1,%d2 42bfc: 49c2 extbl %d2 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42bfe: 4a01 tstb %d1 42c00: 66ec bnes 42bee } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 42c02: e588 lsll #2,%d0 42c04: 0680 0000 0013 addil #19,%d0 42c0a: b0ae 0014 cmpl %fp@(20),%d0 42c0e: 624c bhis 42c5c <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 42c10: 202e 0010 movel %fp@(16),%d0 42c14: 74f0 moveq #-16,%d2 42c16: 0680 0000 000f addil #15,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42c1c: 7201 moveq #1,%d1 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 42c1e: c082 andl %d2,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 42c20: 2040 moveal %d0,%a0 42c22: 2089 movel %a1,%a0@ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42c24: 206e fff8 moveal %fp@(-8),%a0 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 42c28: 2540 000a movel %d0,%a2@(10) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42c2c: 6018 bras 42c46 if(*cp == ',') { 42c2e: 702c moveq #44,%d0 42c30: b082 cmpl %d2,%d0 42c32: 6610 bnes 42c44 <== ALWAYS TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; 42c34: 2408 movel %a0,%d2 <== NOT EXECUTED 42c36: 5282 addql #1,%d2 <== NOT EXECUTED * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 42c38: 4210 clrb %a0@ <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 42c3a: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 42c3e: 2382 1c00 movel %d2,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 42c42: 5281 addql #1,%d1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42c44: 5288 addql #1,%a0 42c46: 1010 moveb %a0@,%d0 if(*cp == ',') { 42c48: 1400 moveb %d0,%d2 42c4a: 49c2 extbl %d2 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42c4c: 4a00 tstb %d0 42c4e: 66de bnes 42c2e if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 42c50: 206a 000a moveal %a2@(10),%a0 42c54: 7001 moveq #1,%d0 42c56: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) return 1; 42c5a: 6002 bras 42c5e 42c5c: 4280 clrl %d0 <== NOT EXECUTED } 42c5e: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 42c64: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042ca0 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 42ca0: 4e56 ffe0 linkw %fp,#-32 42ca4: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42ca8: 42a7 clrl %sp@- 42caa: 280e movel %fp,%d4 42cac: 0684 0000 0014 addil #20,%d4 42cb2: 260e movel %fp,%d3 42cb4: 0683 0000 0010 addil #16,%d3 42cba: 47fa fe18 lea %pc@(42ad4 ),%a3 42cbe: 2f04 movel %d4,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 42cc0: 246e 000c moveal %fp@(12),%a2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42cc4: 2f03 movel %d3,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 42cc6: 242e 0008 movel %fp@(8),%d2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42cca: 2f0a movel %a2,%sp@- 42ccc: 2f02 movel %d2,%sp@- 42cce: 4e93 jsr %a3@ 42cd0: 4fef 0014 lea %sp@(20),%sp 42cd4: 4a80 tstl %d0 42cd6: 6700 00a4 beqw 42d7c || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 42cda: 42a7 clrl %sp@- 42cdc: 2f04 movel %d4,%sp@- 42cde: 2f03 movel %d3,%sp@- 42ce0: 486a 0004 pea %a2@(4) 42ce4: 2f02 movel %d2,%sp@- 42ce6: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42ce8: 4fef 0014 lea %sp@(20),%sp 42cec: 4a80 tstl %d0 42cee: 6700 008c beqw 42d7c || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 42cf2: 486e fffc pea %fp@(-4) 42cf6: 49fa fd28 lea %pc@(42a20 ),%a4 42cfa: 2f02 movel %d2,%sp@- 42cfc: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42cfe: 508f addql #8,%sp 42d00: 4a80 tstl %d0 42d02: 6778 beqs 42d7c <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 42d04: 486e fff8 pea %fp@(-8) 42d08: 2f02 movel %d2,%sp@- 42d0a: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d0c: 508f addql #8,%sp 42d0e: 4a80 tstl %d0 42d10: 676a beqs 42d7c <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 42d12: 42a7 clrl %sp@- 42d14: 2f04 movel %d4,%sp@- 42d16: 2f03 movel %d3,%sp@- 42d18: 486a 000c pea %a2@(12) 42d1c: 2f02 movel %d2,%sp@- 42d1e: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d20: 4fef 0014 lea %sp@(20),%sp 42d24: 4a80 tstl %d0 42d26: 6754 beqs 42d7c <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 42d28: 42a7 clrl %sp@- 42d2a: 2f04 movel %d4,%sp@- 42d2c: 2f03 movel %d3,%sp@- 42d2e: 486a 0010 pea %a2@(16) 42d32: 2f02 movel %d2,%sp@- 42d34: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d36: 4fef 0014 lea %sp@(20),%sp 42d3a: 4a80 tstl %d0 42d3c: 673e beqs 42d7c <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !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) 42d3e: 42a7 clrl %sp@- 42d40: 2f04 movel %d4,%sp@- 42d42: 2f03 movel %d3,%sp@- 42d44: 486a 0014 pea %a2@(20) 42d48: 2f02 movel %d2,%sp@- 42d4a: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d4c: 4fef 0014 lea %sp@(20),%sp 42d50: 4a80 tstl %d0 42d52: 6728 beqs 42d7c <== NEVER TAKEN || !scanInt(fp, &pwuid) || !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)) 42d54: 4878 0001 pea 1 42d58: 2f04 movel %d4,%sp@- 42d5a: 2f03 movel %d3,%sp@- 42d5c: 486a 0018 pea %a2@(24) 42d60: 2f02 movel %d2,%sp@- 42d62: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d64: 4fef 0014 lea %sp@(20),%sp 42d68: 4a80 tstl %d0 42d6a: 6710 beqs 42d7c <== NEVER TAKEN || !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; pwd->pw_gid = pwgid; 42d6c: 7001 moveq #1,%d0 42d6e: 356e fffa 000a movew %fp@(-6),%a2@(10) || !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; 42d74: 356e fffe 0008 movew %fp@(-2),%a2@(8) pwd->pw_gid = pwgid; return 1; 42d7a: 6002 bras 42d7e 42d7c: 4280 clrl %d0 <== NOT EXECUTED } 42d7e: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 42d84: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042ea0 : return NULL; return &grent; } void setgrent(void) { 42ea0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 42ea4: 4eb9 0004 2dc0 jsr 42dc0 <== NOT EXECUTED if (group_fp != NULL) 42eaa: 2039 0005 e82a movel 5e82a ,%d0 <== NOT EXECUTED 42eb0: 670a beqs 42ebc <== NOT EXECUTED fclose(group_fp); 42eb2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42eb4: 4eb9 0004 da8a jsr 4da8a <== NOT EXECUTED 42eba: 588f addql #4,%sp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 42ebc: 4879 0005 d14d pea 5d14d <_global_impure_ptr+0xbf> <== NOT EXECUTED 42ec2: 4879 0005 c752 pea 5c752 <== NOT EXECUTED 42ec8: 4eb9 0004 e10c jsr 4e10c <== NOT EXECUTED 42ece: 508f addql #8,%sp <== NOT EXECUTED } 42ed0: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); 42ed2: 23c0 0005 e82a movel %d0,5e82a <== NOT EXECUTED } =============================================================================== 00043050 : return NULL; return &pwent; } void setpwent(void) { 43050: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 43054: 4eb9 0004 2dc0 jsr 42dc0 <== NOT EXECUTED if (passwd_fp != NULL) 4305a: 2039 0005 e742 movel 5e742 ,%d0 <== NOT EXECUTED 43060: 670a beqs 4306c <== NOT EXECUTED fclose(passwd_fp); 43062: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43064: 4eb9 0004 da8a jsr 4da8a <== NOT EXECUTED 4306a: 588f addql #4,%sp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 4306c: 4879 0005 d14d pea 5d14d <_global_impure_ptr+0xbf> <== NOT EXECUTED 43072: 4879 0005 c6df pea 5c6df <== NOT EXECUTED 43078: 4eb9 0004 e10c jsr 4e10c <== NOT EXECUTED 4307e: 508f addql #8,%sp <== NOT EXECUTED } 43080: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); 43082: 23c0 0005 e742 movel %d0,5e742 <== NOT EXECUTED } =============================================================================== 000441aa : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 441aa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 441ae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 441b0: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 441b4: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 441b8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 441ba: 4282 clrl %d2 <== NOT EXECUTED 441bc: 142e 000b moveb %fp@(11),%d2 <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 441c0: 0280 0000 0e78 andil #3704,%d0 <== NOT EXECUTED 441c6: 6734 beqs 441fc <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 441c8: 42a7 clrl %sp@- <== NOT EXECUTED 441ca: 42a7 clrl %sp@- <== NOT EXECUTED 441cc: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 441d0: 4eb9 0004 57c0 jsr 457c0 <== NOT EXECUTED i = iproc (c, tty); 441d6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 441d8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 441da: 4eba fe72 jsr %pc@(4404e ) <== NOT EXECUTED rtems_semaphore_release (tty->osem); 441de: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED /* * 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); 441e2: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 441e4: 4eb9 0004 58c4 jsr 458c4 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 441ea: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 441ee: 2002 movel %d2,%d0 <== NOT EXECUTED * 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); 441f0: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 441f4: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 441f8: 4e5e unlk %fp <== NOT EXECUTED 441fa: 4e75 rts <== 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); 441fc: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } return i; } 44200: 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); 44204: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } return i; } 44208: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4420c: 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); 4420e: 6000 fe3e braw 4404e <== NOT EXECUTED =============================================================================== 00044638 : int _STAT_NAME( const char *path, struct stat *buf ) { 44638: 4e56 ffe0 linkw %fp,#-32 4463c: 48d7 001c moveml %d2-%d4,%sp@ 44640: 282e 0008 movel %fp@(8),%d4 44644: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 44648: 6612 bnes 4465c rtems_set_errno_and_return_minus_one( EFAULT ); 4464a: 4eb9 0004 e080 jsr 4e080 <__errno> 44650: 760e moveq #14,%d3 44652: 74ff moveq #-1,%d2 44654: 2040 moveal %d0,%a0 44656: 2083 movel %d3,%a0@ 44658: 6000 009a braw 446f4 status = rtems_filesystem_evaluate_path( path, strlen( path ), 4465c: 2f04 movel %d4,%sp@- 4465e: 260e movel %fp,%d3 44660: 0683 ffff ffec addil #-20,%d3 44666: 4eb9 0005 0164 jsr 50164 4466c: 7201 moveq #1,%d1 4466e: 2e81 movel %d1,%sp@ 44670: 2f03 movel %d3,%sp@- 44672: 42a7 clrl %sp@- 44674: 2f00 movel %d0,%sp@- 44676: 2f04 movel %d4,%sp@- 44678: 4eb9 0004 30ac jsr 430ac 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 4467e: 4fef 0014 lea %sp@(20),%sp 44682: 4a80 tstl %d0 44684: 6704 beqs 4468a 44686: 74ff moveq #-1,%d2 44688: 606a bras 446f4 return -1; if ( !loc.handlers->fstat_h ){ 4468a: 206e fff4 moveal %fp@(-12),%a0 4468e: 4aa8 0018 tstl %a0@(24) 44692: 6628 bnes 446bc <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 44694: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 44698: 4a88 tstl %a0 <== NOT EXECUTED 4469a: 670e beqs 446aa <== NOT EXECUTED 4469c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 446a0: 4a88 tstl %a0 <== NOT EXECUTED 446a2: 6706 beqs 446aa <== NOT EXECUTED 446a4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 446a6: 4e90 jsr %a0@ <== NOT EXECUTED 446a8: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 446aa: 4eb9 0004 e080 jsr 4e080 <__errno> <== NOT EXECUTED 446b0: 74ff moveq #-1,%d2 <== NOT EXECUTED 446b2: 2040 moveal %d0,%a0 <== NOT EXECUTED 446b4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 446ba: 6038 bras 446f4 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 446bc: 4878 0046 pea 46 446c0: 42a7 clrl %sp@- 446c2: 2f02 movel %d2,%sp@- 446c4: 4eb9 0004 f320 jsr 4f320 status = (*loc.handlers->fstat_h)( &loc, buf ); 446ca: 206e fff4 moveal %fp@(-12),%a0 446ce: 2f02 movel %d2,%sp@- 446d0: 2f03 movel %d3,%sp@- 446d2: 2068 0018 moveal %a0@(24),%a0 446d6: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 446d8: 206e fff8 moveal %fp@(-8),%a0 * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 446dc: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 446de: 4fef 0014 lea %sp@(20),%sp 446e2: 4a88 tstl %a0 446e4: 670e beqs 446f4 <== NEVER TAKEN 446e6: 2068 001c moveal %a0@(28),%a0 446ea: 4a88 tstl %a0 446ec: 6706 beqs 446f4 <== NEVER TAKEN 446ee: 2f03 movel %d3,%sp@- 446f0: 4e90 jsr %a0@ 446f2: 588f addql #4,%sp return status; } 446f4: 2002 movel %d2,%d0 446f6: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 446fc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000447c0 : int symlink( const char *actualpath, const char *sympath ) { 447c0: 4e56 ffe4 linkw %fp,#-28 447c4: 2f03 movel %d3,%sp@- 447c6: 262e 000c movel %fp@(12),%d3 447ca: 2f02 movel %d2,%sp@- rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 447cc: 240e movel %fp,%d2 447ce: 0682 ffff ffe4 addil #-28,%d2 447d4: 2f02 movel %d2,%sp@- 447d6: 486e fffc pea %fp@(-4) 447da: 2f03 movel %d3,%sp@- 447dc: 4eb9 0004 4728 jsr 44728 if ( !loc.ops->evalformake_h ) { 447e2: 206e fff0 moveal %fp@(-16),%a0 447e6: 4fef 000c lea %sp@(12),%sp 447ea: 2068 0004 moveal %a0@(4),%a0 447ee: 4a88 tstl %a0 447f0: 6734 beqs 44826 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 447f2: 486e fff8 pea %fp@(-8) 447f6: d6ae fffc addl %fp@(-4),%d3 447fa: 2f02 movel %d2,%sp@- 447fc: 2f03 movel %d3,%sp@- 447fe: 4e90 jsr %a0@ if ( result != 0 ) 44800: 4fef 000c lea %sp@(12),%sp 44804: 4a80 tstl %d0 44806: 6704 beqs 4480c 44808: 76ff moveq #-1,%d3 4480a: 6054 bras 44860 return -1; if ( !loc.ops->symlink_h ) { 4480c: 226e fff0 moveal %fp@(-16),%a1 44810: 2069 0038 moveal %a1@(56),%a0 44814: 4a88 tstl %a0 44816: 6620 bnes 44838 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 44818: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4481c: 4a88 tstl %a0 <== NOT EXECUTED 4481e: 6706 beqs 44826 <== NOT EXECUTED 44820: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44822: 4e90 jsr %a0@ <== NOT EXECUTED 44824: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 44826: 4eb9 0004 e198 jsr 4e198 <__errno> <== NOT EXECUTED 4482c: 76ff moveq #-1,%d3 <== NOT EXECUTED 4482e: 2040 moveal %d0,%a0 <== NOT EXECUTED 44830: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 44836: 6028 bras 44860 <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 44838: 2f2e fff8 movel %fp@(-8),%sp@- 4483c: 2f2e 0008 movel %fp@(8),%sp@- 44840: 2f02 movel %d2,%sp@- 44842: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 44844: 206e fff0 moveal %fp@(-16),%a0 if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 44848: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 4484a: 4fef 000c lea %sp@(12),%sp 4484e: 4a88 tstl %a0 44850: 670e beqs 44860 <== NEVER TAKEN 44852: 2068 001c moveal %a0@(28),%a0 44856: 4a88 tstl %a0 44858: 6706 beqs 44860 <== NEVER TAKEN 4485a: 2f02 movel %d2,%sp@- 4485c: 4e90 jsr %a0@ 4485e: 588f addql #4,%sp return result; } 44860: 2003 movel %d3,%d0 44862: 242e ffdc movel %fp@(-36),%d2 44866: 262e ffe0 movel %fp@(-32),%d3 4486a: 4e5e unlk %fp ... =============================================================================== 000447b4 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 447b4: 4e56 0000 linkw %fp,#0 447b8: 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; 447bc: 2028 0104 movel %a0@(260),%d0 fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 447c0: 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 ) { 447c2: 4a80 tstl %d0 447c4: 6728 beqs 447ee <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 447c6: 2279 0005 f806 moveal 5f806 <_Thread_Executing>,%a1 447cc: 2429 0104 movel %a1@(260),%d2 _Thread_Executing->libc_reent = this_reent; 447d0: 2340 0104 movel %d0,%a1@(260) _fwalk (t->libc_reent, sync_wrapper); 447d4: 487a 0046 pea %pc@(4481c ) 447d8: 2f28 0104 movel %a0@(260),%sp@- 447dc: 4eb9 0004 effe jsr 4effe <_fwalk> _Thread_Executing->libc_reent = current_reent; 447e2: 2079 0005 f806 moveal 5f806 <_Thread_Executing>,%a0 447e8: 508f addql #8,%sp 447ea: 2142 0104 movel %d2,%a0@(260) } } 447ee: 242e fffc movel %fp@(-4),%d2 447f2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000446a0 : int tcsetattr( int fd, int opt, struct termios *tp ) { 446a0: 4e56 0000 linkw %fp,#0 446a4: 202e 000c movel %fp@(12),%d0 446a8: 2f03 movel %d3,%sp@- 446aa: 262e 0010 movel %fp@(16),%d3 446ae: 2f02 movel %d2,%sp@- 446b0: 242e 0008 movel %fp@(8),%d2 switch (opt) { 446b4: 4a80 tstl %d0 446b6: 672c beqs 446e4 <== ALWAYS TAKEN 446b8: 7201 moveq #1,%d1 446ba: b280 cmpl %d0,%d1 446bc: 6710 beqs 446ce default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 446be: 4eb9 0004 e25c jsr 4e25c <__errno> <== NOT EXECUTED 446c4: 2040 moveal %d0,%a0 <== NOT EXECUTED 446c6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 446cc: 6034 bras 44702 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 446ce: 42a7 clrl %sp@- <== NOT EXECUTED 446d0: 4878 0003 pea 3 <== NOT EXECUTED 446d4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 446d6: 4eb9 0004 b5c0 jsr 4b5c0 <== NOT EXECUTED 446dc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 446e0: 4a80 tstl %d0 <== NOT EXECUTED 446e2: 6d1e blts 44702 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 446e4: 2d43 0010 movel %d3,%fp@(16) 446e8: 7002 moveq #2,%d0 446ea: 2d42 0008 movel %d2,%fp@(8) } } 446ee: 242e fff8 movel %fp@(-8),%d2 446f2: 262e fffc movel %fp@(-4),%d3 return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 446f6: 2d40 000c movel %d0,%fp@(12) } } 446fa: 4e5e unlk %fp return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 446fc: 4ef9 0004 b5c0 jmp 4b5c0 } } 44702: 242e fff8 movel %fp@(-8),%d2 44706: 70ff moveq #-1,%d0 44708: 262e fffc movel %fp@(-4),%d3 4470c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ca2c : #include int unlink( const char *path ) { 4ca2c: 4e56 ffbc linkw %fp,#-68 4ca30: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4ca34: 262e 0008 movel %fp@(8),%d3 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4ca38: 2f03 movel %d3,%sp@- 4ca3a: 4eb9 0004 2696 jsr 42696 if ( parentpathlen == 0 ) 4ca40: 588f addql #4,%sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4ca42: 2c00 movel %d0,%d6 4ca44: 200e movel %fp,%d0 4ca46: 0680 ffff ffe8 addil #-24,%d0 if ( parentpathlen == 0 ) 4ca4c: 4a86 tstl %d6 4ca4e: 6616 bnes 4ca66 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4ca50: 2f00 movel %d0,%sp@- 4ca52: 486e fffc pea %fp@(-4) 4ca56: 4204 clrb %d4 4ca58: 2f03 movel %d3,%sp@- 4ca5a: 4eb9 0004 3540 jsr 43540 4ca60: 4fef 000c lea %sp@(12),%sp 4ca64: 601e bras 4ca84 else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 4ca66: 42a7 clrl %sp@- 4ca68: 2f00 movel %d0,%sp@- 4ca6a: 4878 0002 pea 2 4ca6e: 2f06 movel %d6,%sp@- 4ca70: 2f03 movel %d3,%sp@- 4ca72: 4eb9 0004 27ac jsr 427ac RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4ca78: 4fef 0014 lea %sp@(20),%sp 4ca7c: 4a80 tstl %d0 4ca7e: 6600 015c bnew 4cbdc 4ca82: 7801 moveq #1,%d4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4ca84: 4878 0014 pea 14 4ca88: 2a0e movel %fp,%d5 4ca8a: 0685 ffff ffe8 addil #-24,%d5 4ca90: 240e movel %fp,%d2 4ca92: 0682 ffff ffd4 addil #-44,%d2 name = path + parentpathlen; 4ca98: d686 addl %d6,%d3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4ca9a: 45f9 0004 e4e4 lea 4e4e4 ,%a2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4caa0: 2f05 movel %d5,%sp@- 4caa2: 2f02 movel %d2,%sp@- 4caa4: 4eb9 0004 d8d8 jsr 4d8d8 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4caaa: 2f03 movel %d3,%sp@- 4caac: 4e92 jsr %a2@ 4caae: 2e80 movel %d0,%sp@ 4cab0: 2f03 movel %d3,%sp@- 4cab2: 4eb9 0004 2658 jsr 42658 4cab8: d680 addl %d0,%d3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4caba: 2f03 movel %d3,%sp@- 4cabc: 4e92 jsr %a2@ 4cabe: 4297 clrl %sp@ 4cac0: 2f02 movel %d2,%sp@- 4cac2: 42a7 clrl %sp@- 4cac4: 2f00 movel %d0,%sp@- 4cac6: 2f03 movel %d3,%sp@- 4cac8: 4eb9 0004 26dc jsr 426dc 0, &loc, false ); if ( result != 0 ) { 4cace: 4fef 0028 lea %sp@(40),%sp 4cad2: 4a80 tstl %d0 4cad4: 6722 beqs 4caf8 if ( free_parentloc ) 4cad6: 4a04 tstb %d4 4cad8: 6700 0102 beqw 4cbdc rtems_filesystem_freenode( &parentloc ); 4cadc: 206e fff4 moveal %fp@(-12),%a0 4cae0: 4a88 tstl %a0 4cae2: 6700 00f8 beqw 4cbdc 4cae6: 2068 001c moveal %a0@(28),%a0 4caea: 4a88 tstl %a0 4caec: 6700 00ee beqw 4cbdc 4caf0: 2f05 movel %d5,%sp@- 4caf2: 76ff moveq #-1,%d3 4caf4: 6000 00e0 braw 4cbd6 return -1; } if ( !loc.ops->node_type_h ) { 4caf8: 226e ffe0 moveal %fp@(-32),%a1 4cafc: 2069 0010 moveal %a1@(16),%a0 4cb00: 4a88 tstl %a0 4cb02: 6606 bnes 4cb0a <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 4cb04: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4cb08: 605c bras 4cb66 <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 4cb0a: 2f02 movel %d2,%sp@- 4cb0c: 4e90 jsr %a0@ 4cb0e: 206e ffe0 moveal %fp@(-32),%a0 4cb12: 588f addql #4,%sp 4cb14: 7201 moveq #1,%d1 4cb16: b280 cmpl %d0,%d1 4cb18: 6640 bnes 4cb5a rtems_filesystem_freenode( &loc ); 4cb1a: 4a88 tstl %a0 4cb1c: 670e beqs 4cb2c <== NEVER TAKEN 4cb1e: 2068 001c moveal %a0@(28),%a0 4cb22: 4a88 tstl %a0 4cb24: 6706 beqs 4cb2c <== NEVER TAKEN 4cb26: 2f02 movel %d2,%sp@- 4cb28: 4e90 jsr %a0@ 4cb2a: 588f addql #4,%sp if ( free_parentloc ) 4cb2c: 4a04 tstb %d4 4cb2e: 6718 beqs 4cb48 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 4cb30: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 4cb34: 4a88 tstl %a0 <== NOT EXECUTED 4cb36: 6710 beqs 4cb48 <== NOT EXECUTED 4cb38: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4cb3c: 4a88 tstl %a0 <== NOT EXECUTED 4cb3e: 6708 beqs 4cb48 <== NOT EXECUTED 4cb40: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 4cb44: 4e90 jsr %a0@ <== NOT EXECUTED 4cb46: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4cb48: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> 4cb4e: 76ff moveq #-1,%d3 4cb50: 2040 moveal %d0,%a0 4cb52: 7015 moveq #21,%d0 4cb54: 2080 movel %d0,%a0@ 4cb56: 6000 0086 braw 4cbde } if ( !loc.ops->unlink_h ) { 4cb5a: 2268 000c moveal %a0@(12),%a1 4cb5e: 4a89 tstl %a1 4cb60: 663c bnes 4cb9e <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 4cb62: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4cb66: 4a88 tstl %a0 <== NOT EXECUTED 4cb68: 6706 beqs 4cb70 <== NOT EXECUTED 4cb6a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4cb6c: 4e90 jsr %a0@ <== NOT EXECUTED 4cb6e: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 4cb70: 4a04 tstb %d4 <== NOT EXECUTED 4cb72: 6718 beqs 4cb8c <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4cb74: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 4cb78: 4a88 tstl %a0 <== NOT EXECUTED 4cb7a: 6710 beqs 4cb8c <== NOT EXECUTED 4cb7c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4cb80: 4a88 tstl %a0 <== NOT EXECUTED 4cb82: 6708 beqs 4cb8c <== NOT EXECUTED 4cb84: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 4cb88: 4e90 jsr %a0@ <== NOT EXECUTED 4cb8a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4cb8c: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 4cb92: 76ff moveq #-1,%d3 <== NOT EXECUTED 4cb94: 2040 moveal %d0,%a0 <== NOT EXECUTED 4cb96: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4cb9c: 6040 bras 4cbde <== NOT EXECUTED } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4cb9e: 2f02 movel %d2,%sp@- 4cba0: 2f05 movel %d5,%sp@- 4cba2: 4e91 jsr %a1@ rtems_filesystem_freenode( &loc ); 4cba4: 206e ffe0 moveal %fp@(-32),%a0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4cba8: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 4cbaa: 508f addql #8,%sp 4cbac: 4a88 tstl %a0 4cbae: 670e beqs 4cbbe <== NEVER TAKEN 4cbb0: 2068 001c moveal %a0@(28),%a0 4cbb4: 4a88 tstl %a0 4cbb6: 6706 beqs 4cbbe <== NEVER TAKEN 4cbb8: 2f02 movel %d2,%sp@- 4cbba: 4e90 jsr %a0@ 4cbbc: 588f addql #4,%sp if ( free_parentloc ) 4cbbe: 4a04 tstb %d4 4cbc0: 671c beqs 4cbde <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 4cbc2: 206e fff4 moveal %fp@(-12),%a0 4cbc6: 4a88 tstl %a0 4cbc8: 6714 beqs 4cbde <== NEVER TAKEN 4cbca: 2068 001c moveal %a0@(28),%a0 4cbce: 4a88 tstl %a0 4cbd0: 670c beqs 4cbde <== NEVER TAKEN 4cbd2: 486e ffe8 pea %fp@(-24) 4cbd6: 4e90 jsr %a0@ 4cbd8: 588f addql #4,%sp 4cbda: 6002 bras 4cbde 4cbdc: 76ff moveq #-1,%d3 <== NOT EXECUTED return result; } 4cbde: 2003 movel %d3,%d0 4cbe0: 4cee 047c ffbc moveml %fp@(-68),%d2-%d6/%a2 4cbe6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048228 : */ int unmount( const char *path ) { 48228: 4e56 ffec linkw %fp,#-20 4822c: 2f0a movel %a2,%sp@- 4822e: 246e 0008 moveal %fp@(8),%a2 48232: 2f02 movel %d2,%sp@- * 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 ) ) 48234: 240e movel %fp,%d2 48236: 0682 ffff ffec addil #-20,%d2 4823c: 2f0a movel %a2,%sp@- 4823e: 4eb9 0005 2fa4 jsr 52fa4 48244: 7201 moveq #1,%d1 48246: 2e81 movel %d1,%sp@ 48248: 2f02 movel %d2,%sp@- 4824a: 42a7 clrl %sp@- 4824c: 2f00 movel %d0,%sp@- 4824e: 2f0a movel %a2,%sp@- 48250: 4eb9 0004 4c18 jsr 44c18 48256: 4fef 0014 lea %sp@(20),%sp 4825a: 4a80 tstl %d0 4825c: 6600 0140 bnew 4839e return -1; mt_entry = loc.mt_entry; 48260: 246e fffc moveal %fp@(-4),%a2 48264: 206e fff8 moveal %fp@(-8),%a0 fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 48268: 202e ffec movel %fp@(-20),%d0 4826c: b0aa 001c cmpl %a2@(28),%d0 48270: 6724 beqs 48296 /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ rtems_filesystem_freenode( &loc ); 48272: 4a88 tstl %a0 48274: 670e beqs 48284 <== NEVER TAKEN 48276: 2068 001c moveal %a0@(28),%a0 4827a: 4a88 tstl %a0 4827c: 6706 beqs 48284 <== NEVER TAKEN 4827e: 2f02 movel %d2,%sp@- 48280: 4e90 jsr %a0@ 48282: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EACCES ); 48284: 4eb9 0004 fff8 jsr 4fff8 <__errno> 4828a: 740d moveq #13,%d2 4828c: 72ff moveq #-1,%d1 4828e: 2040 moveal %d0,%a0 48290: 2082 movel %d2,%a0@ 48292: 6000 010c braw 483a0 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 48296: 4a88 tstl %a0 48298: 670e beqs 482a8 <== NEVER TAKEN 4829a: 2068 001c moveal %a0@(28),%a0 4829e: 4a88 tstl %a0 482a0: 6706 beqs 482a8 <== NEVER TAKEN 482a2: 2f02 movel %d2,%sp@- 482a4: 4e90 jsr %a0@ 482a6: 588f addql #4,%sp if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 482a8: 206a 0014 moveal %a2@(20),%a0 482ac: 4aa8 0028 tstl %a0@(40) 482b0: 670a beqs 482bc <== NEVER TAKEN fs_root_loc = &mt_entry->mt_fs_root; 482b2: 206a 0028 moveal %a2@(40),%a0 482b6: 4aa8 002c tstl %a0@(44) 482ba: 6614 bnes 482d0 <== ALWAYS TAKEN if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 482bc: 4eb9 0004 fff8 jsr 4fff8 <__errno> 482c2: 72ff moveq #-1,%d1 <== NOT EXECUTED 482c4: 2040 moveal %d0,%a0 <== NOT EXECUTED 482c6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 482cc: 6000 00d2 braw 483a0 <== NOT EXECUTED * 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 ) 482d0: 2079 0006 178c moveal 6178c ,%a0 482d6: b5e8 0014 cmpal %a0@(20),%a2 482da: 6724 beqs 48300 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 482dc: 2f2a 002c movel %a2@(44),%sp@- 482e0: 487a ff2e pea %pc@(48210 ) 482e4: 4eb9 0004 5724 jsr 45724 482ea: 508f addql #8,%sp 482ec: 4a00 tstb %d0 482ee: 6610 bnes 48300 * 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 ) 482f0: 2f0a movel %a2,%sp@- 482f2: 4eb9 0004 4ee8 jsr 44ee8 482f8: 588f addql #4,%sp 482fa: 7201 moveq #1,%d1 482fc: b280 cmpl %d0,%d1 482fe: 6612 bnes 48312 rtems_set_errno_and_return_minus_one( EBUSY ); 48300: 4eb9 0004 fff8 jsr 4fff8 <__errno> 48306: 72ff moveq #-1,%d1 48308: 2040 moveal %d0,%a0 4830a: 7010 moveq #16,%d0 4830c: 2080 movel %d0,%a0@ 4830e: 6000 0090 braw 483a0 * 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 ) 48312: 206a 0014 moveal %a2@(20),%a0 48316: 2f0a movel %a2,%sp@- 48318: 2068 0028 moveal %a0@(40),%a0 4831c: 4e90 jsr %a0@ 4831e: 588f addql #4,%sp 48320: 4a80 tstl %d0 48322: 667a bnes 4839e <== 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){ 48324: 206a 0028 moveal %a2@(40),%a0 48328: 2f0a movel %a2,%sp@- 4832a: 2068 002c moveal %a0@(44),%a0 4832e: 4e90 jsr %a0@ 48330: 588f addql #4,%sp 48332: 4a80 tstl %d0 48334: 671a beqs 48350 <== ALWAYS TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 48336: 206a 0014 moveal %a2@(20),%a0 4833a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4833c: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED 48340: 4e90 jsr %a0@ <== NOT EXECUTED 48342: 588f addql #4,%sp <== NOT EXECUTED 48344: 4a80 tstl %d0 <== NOT EXECUTED 48346: 6756 beqs 4839e <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 48348: 42a7 clrl %sp@- <== NOT EXECUTED 4834a: 4eb9 0004 94b0 jsr 494b0 <== 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 ); 48350: 42a7 clrl %sp@- 48352: 42a7 clrl %sp@- 48354: 2f39 0006 35f0 movel 635f0 ,%sp@- 4835a: 4eb9 0004 8e78 jsr 48e78 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 48360: 2f0a movel %a2,%sp@- 48362: 4eb9 0004 97a8 jsr 497a8 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 48368: 2f39 0006 35f0 movel 635f0 ,%sp@- 4836e: 4eb9 0004 8f7c jsr 48f7c /* * 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 ); 48374: 206a 0014 moveal %a2@(20),%a0 48378: 4fef 0014 lea %sp@(20),%sp 4837c: 4a88 tstl %a0 4837e: 6710 beqs 48390 <== NEVER TAKEN 48380: 2068 001c moveal %a0@(28),%a0 48384: 4a88 tstl %a0 48386: 6708 beqs 48390 <== NEVER TAKEN 48388: 486a 0008 pea %a2@(8) 4838c: 4e90 jsr %a0@ 4838e: 588f addql #4,%sp free( mt_entry ); 48390: 2f0a movel %a2,%sp@- 48392: 4eb9 0004 4c94 jsr 44c94 return 0; 48398: 588f addql #4,%sp * 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 ); free( mt_entry ); 4839a: 4281 clrl %d1 return 0; 4839c: 6002 bras 483a0 4839e: 72ff moveq #-1,%d1 } 483a0: 242e ffe4 movel %fp@(-28),%d2 483a4: 2001 movel %d1,%d0 483a6: 246e ffe8 moveal %fp@(-24),%a2 483aa: 4e5e unlk %fp ... =============================================================================== 000461cc : int utime( const char *path, const struct utimbuf *times ) { 461cc: 4e56 ffe0 linkw %fp,#-32 461d0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 461d4: 262e 0008 movel %fp@(8),%d3 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 461d8: 240e movel %fp,%d2 461da: 0682 ffff ffec addil #-20,%d2 461e0: 2f03 movel %d3,%sp@- int utime( const char *path, const struct utimbuf *times ) { 461e2: 246e 000c moveal %fp@(12),%a2 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 461e6: 4eb9 0005 0164 jsr 50164 461ec: 7201 moveq #1,%d1 461ee: 2e81 movel %d1,%sp@ 461f0: 2f02 movel %d2,%sp@- 461f2: 42a7 clrl %sp@- 461f4: 2f00 movel %d0,%sp@- 461f6: 2f03 movel %d3,%sp@- 461f8: 4eb9 0004 30ac jsr 430ac 461fe: 4fef 0014 lea %sp@(20),%sp 46202: 4a80 tstl %d0 46204: 6704 beqs 4620a 46206: 76ff moveq #-1,%d3 46208: 6052 bras 4625c return -1; if ( !temp_loc.ops->utime_h ){ 4620a: 226e fff8 moveal %fp@(-8),%a1 4620e: 2069 0030 moveal %a1@(48),%a0 46212: 4a88 tstl %a0 46214: 6620 bnes 46236 <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); 46216: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4621a: 4a88 tstl %a0 <== NOT EXECUTED 4621c: 6706 beqs 46224 <== NOT EXECUTED 4621e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 46220: 4e90 jsr %a0@ <== NOT EXECUTED 46222: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 46224: 4eb9 0004 e080 jsr 4e080 <__errno> <== NOT EXECUTED 4622a: 76ff moveq #-1,%d3 <== NOT EXECUTED 4622c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4622e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 46234: 6026 bras 4625c <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 46236: 2f2a 0004 movel %a2@(4),%sp@- 4623a: 2f12 movel %a2@,%sp@- 4623c: 2f02 movel %d2,%sp@- 4623e: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 46240: 206e fff8 moveal %fp@(-8),%a0 if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 46244: 2600 movel %d0,%d3 rtems_filesystem_freenode( &temp_loc ); 46246: 4fef 000c lea %sp@(12),%sp 4624a: 4a88 tstl %a0 4624c: 670e beqs 4625c <== NEVER TAKEN 4624e: 2068 001c moveal %a0@(28),%a0 46252: 4a88 tstl %a0 46254: 6706 beqs 4625c <== NEVER TAKEN 46256: 2f02 movel %d2,%sp@- 46258: 4e90 jsr %a0@ 4625a: 588f addql #4,%sp return result; } 4625c: 2003 movel %d3,%d0 4625e: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 46264: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044f44 : */ void vprintk( const char *fmt, va_list ap ) { 44f44: 4e56 ffc4 linkw %fp,#-60 44f48: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 44f4c: 246e 0008 moveal %fp@(8),%a2 unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 44f50: 4bee ffec lea %fp@(-20),%a5 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 44f54: 2a3c 0005 b345 movel #373573,%d5 */ void vprintk( const char *fmt, va_list ap ) { 44f5a: 266e 000c moveal %fp@(12),%a3 for (; *fmt != '\0'; fmt++) { 44f5e: 6000 0218 braw 45178 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 44f62: 49c0 extbl %d0 44f64: 7225 moveq #37,%d1 44f66: b280 cmpl %d0,%d1 44f68: 6706 beqs 44f70 BSP_output_char(*fmt); 44f6a: 2f00 movel %d0,%sp@- 44f6c: 6000 0150 braw 450be continue; } fmt++; 44f70: 528a addql #1,%a2 if (*fmt == '0' ) { 44f72: 7630 moveq #48,%d3 44f74: 1012 moveb %a2@,%d0 44f76: 49c0 extbl %d0 44f78: b680 cmpl %d0,%d3 44f7a: 6704 beqs 44f80 44f7c: 7e20 moveq #32,%d7 44f7e: 6004 bras 44f84 lead = '0'; fmt++; 44f80: 528a addql #1,%a2 44f82: 7e30 moveq #48,%d7 } if (*fmt == '-' ) { 44f84: 782d moveq #45,%d4 44f86: 1012 moveb %a2@,%d0 44f88: 49c0 extbl %d0 44f8a: b880 cmpl %d0,%d4 44f8c: 6704 beqs 44f92 44f8e: 4206 clrb %d6 44f90: 6004 bras 44f96 minus = true; fmt++; 44f92: 528a addql #1,%a2 44f94: 7c01 moveq #1,%d6 44f96: 4282 clrl %d2 44f98: 6008 bras 44fa2 } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); fmt++; 44f9a: 528a addql #1,%a2 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); 44f9c: 41f0 08d0 lea %a0@(ffffffd0,%d0:l),%a0 44fa0: 2408 movel %a0,%d2 if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 44fa2: 2002 movel %d2,%d0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 44fa4: 7809 moveq #9,%d4 44fa6: 1212 moveb %a2@,%d1 width *= 10; 44fa8: e788 lsll #3,%d0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 44faa: 2601 movel %d1,%d3 width *= 10; 44fac: 2040 moveal %d0,%a0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 44fae: 0683 ffff ffd0 addil #-48,%d3 44fb4: 1001 moveb %d1,%d0 44fb6: 0283 0000 00ff andil #255,%d3 width *= 10; 44fbc: 41f0 2a00 lea %a0@(00000000,%d2:l:2),%a0 44fc0: 49c0 extbl %d0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 44fc2: b883 cmpl %d3,%d4 44fc4: 64d4 bccs 44f9a width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 44fc6: 766c moveq #108,%d3 44fc8: b680 cmpl %d0,%d3 44fca: 6604 bnes 44fd0 lflag = true; c = *++fmt; 44fcc: 528a addql #1,%a2 44fce: 1212 moveb %a2@,%d1 } if ( c == 'c' ) { 44fd0: 7663 moveq #99,%d3 44fd2: 1001 moveb %d1,%d0 44fd4: 49c0 extbl %d0 44fd6: b680 cmpl %d0,%d3 44fd8: 660c bnes 44fe6 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); 44fda: 2013 movel %a3@,%d0 44fdc: 49c0 extbl %d0 lflag = true; c = *++fmt; } if ( c == 'c' ) { /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 44fde: 588b addql #4,%a3 BSP_output_char(chr); 44fe0: 2f00 movel %d0,%sp@- 44fe2: 6000 00da braw 450be continue; } if ( c == 's' ) { 44fe6: 7673 moveq #115,%d3 44fe8: b680 cmpl %d0,%d3 44fea: 6676 bnes 45062 unsigned i, len; char *s, *str; str = va_arg(ap, char *); 44fec: 2853 moveal %a3@,%a4 44fee: 588b addql #4,%a3 if ( str == NULL ) { 44ff0: 4a8c tstl %a4 44ff2: 6606 bnes 44ffa 44ff4: 49f9 0005 b344 lea 5b344 ,%a4 44ffa: 4283 clrl %d3 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 44ffc: 6002 bras 45000 44ffe: 5283 addql #1,%d3 45000: 4a34 3800 tstb %a4@(00000000,%d3:l) 45004: 66f8 bnes 44ffe ; /* leading spaces */ if ( !minus ) 45006: 4a06 tstb %d6 45008: 6618 bnes 45022 4500a: 2803 movel %d3,%d4 4500c: 6010 bras 4501e for ( i=len ; i <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i,%a0 <== NOT EXECUTED 4501a: 4e90 jsr %a0@ <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i <== NEVER TAKEN BSP_output_char(' '); /* no width option */ if (width == 0) { 45022: 4a82 tstl %d2 45024: 6602 bnes 45028 45026: 2403 movel %d3,%d2 width = len; } /* output the string */ for ( i=0 ; i 4502c: 600e bras 4503c BSP_output_char(*str); 4502e: 49c0 extbl %d0 45030: 2079 0005 c50c moveal 5c50c ,%a0 45036: 2f00 movel %d0,%sp@- 45038: 4e90 jsr %a0@ if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 45042: 4a06 tstb %d6 45044: 6700 0130 beqw 45176 45048: 6010 bras 4505a for ( i=len ; i for ( i=0 ; i,%a0 45056: 4e90 jsr %a0@ for ( i=0 ; i 4505e: 6000 0116 braw 45176 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 45062: 766f moveq #111,%d3 45064: b680 cmpl %d0,%d3 45066: 6764 beqs 450cc <== NEVER TAKEN 45068: 163c 004f moveb #79,%d3 4506c: b680 cmpl %d0,%d3 4506e: 675c beqs 450cc <== NEVER TAKEN base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 45070: 163c 0069 moveb #105,%d3 45074: b680 cmpl %d0,%d3 45076: 6758 beqs 450d0 <== NEVER TAKEN 45078: 163c 0049 moveb #73,%d3 4507c: b680 cmpl %d0,%d3 4507e: 6750 beqs 450d0 <== NEVER TAKEN 45080: 163c 0064 moveb #100,%d3 45084: b680 cmpl %d0,%d3 45086: 6748 beqs 450d0 45088: 163c 0044 moveb #68,%d3 4508c: b680 cmpl %d0,%d3 4508e: 6740 beqs 450d0 <== NEVER TAKEN c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 45090: 163c 0075 moveb #117,%d3 45094: b680 cmpl %d0,%d3 45096: 673e beqs 450d6 45098: 163c 0055 moveb #85,%d3 4509c: b680 cmpl %d0,%d3 4509e: 6736 beqs 450d6 <== NEVER TAKEN base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 450a0: 49c1 extbl %d1 450a2: 7078 moveq #120,%d0 450a4: b081 cmpl %d1,%d0 450a6: 6732 beqs 450da 450a8: 163c 0058 moveb #88,%d3 450ac: b681 cmpl %d1,%d3 450ae: 672a beqs 450da <== NEVER TAKEN base = 16; sign = false; } else if ( c == 'p' ) { 450b0: 7870 moveq #112,%d4 450b2: b881 cmpl %d1,%d4 450b4: 6606 bnes 450bc 450b6: 163c 0010 moveb #16,%d3 450ba: 6020 bras 450dc base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 450bc: 2f01 movel %d1,%sp@- 450be: 2079 0005 c50c moveal 5c50c ,%a0 450c4: 4e90 jsr %a0@ continue; 450c6: 588f addql #4,%sp 450c8: 6000 00ac braw 45176 450cc: 7608 moveq #8,%d3 <== NOT EXECUTED 450ce: 600c bras 450dc <== NOT EXECUTED 450d0: 760a moveq #10,%d3 450d2: 7201 moveq #1,%d1 450d4: 6008 bras 450de 450d6: 760a moveq #10,%d3 450d8: 6002 bras 450dc 450da: 7610 moveq #16,%d3 450dc: 4201 clrb %d1 450de: 200b movel %a3,%d0 450e0: 5880 addql #4,%d0 } printNum( 450e2: 1c07 moveb %d7,%d6 450e4: 2813 movel %a3@,%d4 450e6: 49c6 extbl %d6 450e8: 2640 moveal %d0,%a3 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 450ea: 4a01 tstb %d1 450ec: 671e beqs 4510c 450ee: 4a84 tstl %d4 450f0: 6c1a bges 4510c <== ALWAYS TAKEN BSP_output_char('-'); 450f2: 4878 002d pea 2d <== NOT EXECUTED 450f6: 2079 0005 c50c moveal 5c50c ,%a0 <== NOT EXECUTED 450fc: 4e90 jsr %a0@ <== NOT EXECUTED unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 450fe: 588f addql #4,%sp <== NOT EXECUTED unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; 45100: 2004 movel %d4,%d0 <== NOT EXECUTED 45102: 4480 negl %d0 <== NOT EXECUTED if (maxwidth) maxwidth--; 45104: 4a82 tstl %d2 <== NOT EXECUTED 45106: 6706 beqs 4510e <== NOT EXECUTED 45108: 5382 subql #1,%d2 <== NOT EXECUTED 4510a: 6002 bras 4510e <== NOT EXECUTED } else { unsigned_num = (unsigned long) num; 4510c: 2004 movel %d4,%d0 4510e: 99cc subal %a4,%a4 } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 45110: 3243 moveaw %d3,%a1 45112: 600e bras 45122 45114: 9088 subl %a0,%d0 45116: 2040 moveal %d0,%a0 45118: 2001 movel %d1,%d0 4511a: 3e08 movew %a0,%d7 4511c: 1b87 c800 moveb %d7,%a5@(00000000,%a4:l) 45120: 2844 moveal %d4,%a4 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45122: 2200 movel %d0,%d1 45124: 280c movel %a4,%d4 45126: 5284 addql #1,%d4 45128: 4c43 1001 remul %d3,%d1,%d1 toPrint[count++] = (char) (unsigned_num - (n * base)); 4512c: 3e09 movew %a1,%d7 4512e: cfc1 mulsw %d1,%d7 45130: 3047 moveaw %d7,%a0 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45132: 4a81 tstl %d1 45134: 66de bnes 45114 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 45136: 1d80 c8ec moveb %d0,%fp@(ffffffec,%a4:l) 4513a: 600e bras 4514a for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 4513c: 2f06 movel %d6,%sp@- 4513e: 2079 0005 c50c moveal 5c50c ,%a0 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 45144: 5382 subql #1,%d2 BSP_output_char(lead); 45146: 4e90 jsr %a0@ toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 45148: 588f addql #4,%sp 4514a: b882 cmpl %d2,%d4 4514c: 65ee bcss 4513c 4514e: 49f5 c800 lea %a5@(00000000,%a4:l),%a4 45152: 4282 clrl %d2 45154: 601c bras 45172 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45156: 2045 moveal %d5,%a0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45158: 5282 addql #1,%d2 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4515a: 1014 moveb %a4@,%d0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 4515c: 538c subql #1,%a4 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4515e: 49c0 extbl %d0 45160: 1030 0800 moveb %a0@(00000000,%d0:l),%d0 45164: 2079 0005 c50c moveal 5c50c ,%a0 4516a: 49c0 extbl %d0 4516c: 2f00 movel %d0,%sp@- 4516e: 4e90 jsr %a0@ toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45170: 588f addql #4,%sp 45172: b882 cmpl %d2,%d4 45174: 62e0 bhis 45156 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 45176: 528a addql #1,%a2 45178: 1012 moveb %a2@,%d0 4517a: 6600 fde6 bnew 44f62 sign, width, lead ); } } 4517e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 45184: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005a4d8 : ssize_t write( int fd, const void *buffer, size_t count ) { 5a4d8: 4e56 fff4 linkw %fp,#-12 5a4dc: 202e 000c movel %fp@(12),%d0 5a4e0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5a4e4: 242e 0008 movel %fp@(8),%d2 5a4e8: 222e 0010 movel %fp@(16),%d1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5a4ec: b4b9 0005 c414 cmpl 5c414 ,%d2 5a4f2: 6414 bccs 5a508 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 5a4f4: 2479 0005 dac0 moveal 5dac0 ,%a2 5a4fa: ed8a lsll #6,%d2 5a4fc: d5c2 addal %d2,%a2 rtems_libio_check_is_open( iop ); 5a4fe: 242a 0014 movel %a2@(20),%d2 5a502: 0802 0008 btst #8,%d2 5a506: 6610 bnes 5a518 <== ALWAYS TAKEN 5a508: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 5a50e: 7409 moveq #9,%d2 <== NOT EXECUTED 5a510: 72ff moveq #-1,%d1 <== NOT EXECUTED 5a512: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a514: 2082 movel %d2,%a0@ <== NOT EXECUTED 5a516: 605e bras 5a576 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 5a518: 4a80 tstl %d0 5a51a: 6708 beqs 5a524 <== NEVER TAKEN rtems_libio_check_count( count ); 5a51c: 4a81 tstl %d1 5a51e: 6756 beqs 5a576 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5a520: 44c2 movew %d2,%ccr 5a522: 6710 beqs 5a534 <== ALWAYS TAKEN 5a524: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 5a52a: 72ff moveq #-1,%d1 <== NOT EXECUTED 5a52c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a52e: 7016 moveq #22,%d0 <== NOT EXECUTED 5a530: 2080 movel %d0,%a0@ <== NOT EXECUTED 5a532: 6042 bras 5a576 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 5a534: 206a 003c moveal %a2@(60),%a0 5a538: 2068 000c moveal %a0@(12),%a0 5a53c: 4a88 tstl %a0 5a53e: 6612 bnes 5a552 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a540: 4eb9 0004 d0b8 jsr 4d0b8 <__errno> <== NOT EXECUTED 5a546: 72ff moveq #-1,%d1 <== NOT EXECUTED 5a548: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a54a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 5a550: 6024 bras 5a576 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 5a552: 2f01 movel %d1,%sp@- 5a554: 2f00 movel %d0,%sp@- 5a556: 2f0a movel %a2,%sp@- 5a558: 4e90 jsr %a0@ if ( rc > 0 ) 5a55a: 4fef 000c lea %sp@(12),%sp */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 5a55e: 2200 movel %d0,%d1 if ( rc > 0 ) 5a560: 6f14 bles 5a576 <== NEVER TAKEN iop->offset += rc; 5a562: 2600 movel %d0,%d3 5a564: 5bc2 smi %d2 5a566: 49c2 extbl %d2 5a568: d7aa 0010 addl %d3,%a2@(16) 5a56c: 202a 000c movel %a2@(12),%d0 5a570: d182 addxl %d2,%d0 5a572: 2540 000c movel %d0,%a2@(12) return rc; } 5a576: 2001 movel %d1,%d0 5a578: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a57e: 4e5e unlk %fp ... =============================================================================== 00045fac : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 45fac: 4e56 ffe4 linkw %fp,#-28 45fb0: 202e 0008 movel %fp@(8),%d0 45fb4: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 45fb8: 266e 000c moveal %fp@(12),%a3 45fbc: 262e 0010 movel %fp@(16),%d3 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 45fc0: b0b9 0005 ddc4 cmpl 5ddc4 ,%d0 45fc6: 6414 bccs 45fdc <== NEVER TAKEN iop = rtems_libio_iop( fd ); 45fc8: 2479 0005 fc40 moveal 5fc40 ,%a2 45fce: ed88 lsll #6,%d0 45fd0: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 45fd2: 202a 0014 movel %a2@(20),%d0 45fd6: 0800 0008 btst #8,%d0 45fda: 6612 bnes 45fee 45fdc: 4eb9 0004 dd6c jsr 4dd6c <__errno> 45fe2: 74ff moveq #-1,%d2 45fe4: 7209 moveq #9,%d1 45fe6: 2040 moveal %d0,%a0 45fe8: 2081 movel %d1,%a0@ 45fea: 6000 00ce braw 460ba rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 45fee: 44c0 movew %d0,%ccr 45ff0: 665c bnes 4604e <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 45ff2: 4a8b tstl %a3 45ff4: 6758 beqs 4604e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 45ff6: 4a83 tstl %d3 45ff8: 6f54 bles 4604e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 45ffa: 0c83 0000 0400 cmpil #1024,%d3 46000: 6e4c bgts 4604e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 46002: 206a 003c moveal %a2@(60),%a0 46006: 4aa8 000c tstl %a0@(12) 4600a: 6614 bnes 46020 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 4600c: 4eb9 0004 dd6c jsr 4dd6c <__errno> 46012: 74ff moveq #-1,%d2 <== NOT EXECUTED 46014: 2040 moveal %d0,%a0 <== NOT EXECUTED 46016: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4601c: 6000 009c braw 460ba <== NOT EXECUTED 46020: 204b moveal %a3,%a0 46022: 4281 clrl %d1 46024: 4280 clrl %d0 46026: 7801 moveq #1,%d4 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 46028: 5281 addql #1,%d1 if ( !iov[v].iov_base ) 4602a: 4a90 tstl %a0@ 4602c: 6720 beqs 4604e rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 4602e: 2268 0004 moveal %a0@(4),%a1 46032: 4a89 tstl %a1 46034: 57c2 seq %d2 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 46036: 43f1 0800 lea %a1@(00000000,%d0:l),%a1 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 4603a: 5088 addql #8,%a0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 4603c: c484 andl %d4,%d2 4603e: 1802 moveb %d2,%d4 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 46040: b089 cmpl %a1,%d0 46042: 6e0a bgts 4604e * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 46044: 2009 movel %a1,%d0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 46046: b3fc 0000 7fff cmpal #32767,%a1 4604c: 6f10 bles 4605e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4604e: 4eb9 0004 dd6c jsr 4dd6c <__errno> 46054: 74ff moveq #-1,%d2 46056: 2040 moveal %d0,%a0 46058: 7016 moveq #22,%d0 4605a: 2080 movel %d0,%a0@ 4605c: 605c bras 460ba * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 4605e: b681 cmpl %d1,%d3 46060: 6ec6 bgts 46028 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 46062: 4a02 tstb %d2 46064: 6704 beqs 4606a <== ALWAYS TAKEN 46066: 4282 clrl %d2 <== NOT EXECUTED 46068: 6050 bras 460ba <== NOT EXECUTED 4606a: 588b addql #4,%a3 4606c: 4284 clrl %d4 4606e: 4282 clrl %d2 /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 46070: 2013 movel %a3@,%d0 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46072: 5284 addql #1,%d4 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 46074: 4a80 tstl %d0 46076: 673c beqs 460b4 <== NEVER TAKEN continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 46078: 206a 003c moveal %a2@(60),%a0 4607c: 2f00 movel %d0,%sp@- 4607e: 2f2b fffc movel %a3@(-4),%sp@- 46082: 2f0a movel %a2,%sp@- 46084: 2068 000c moveal %a0@(12),%a0 46088: 4e90 jsr %a0@ if ( bytes < 0 ) 4608a: 4fef 000c lea %sp@(12),%sp 4608e: 4a80 tstl %d0 46090: 6c04 bges 46096 <== ALWAYS TAKEN 46092: 74ff moveq #-1,%d2 <== NOT EXECUTED 46094: 6024 bras 460ba <== NOT EXECUTED return -1; if ( bytes > 0 ) { 46096: 4a80 tstl %d0 46098: 6716 beqs 460b0 <== NEVER TAKEN iop->offset += bytes; total += bytes; 4609a: d480 addl %d0,%d2 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 4609c: 2c00 movel %d0,%d6 4609e: 5bc5 smi %d5 460a0: 49c5 extbl %d5 460a2: ddaa 0010 addl %d6,%a2@(16) 460a6: 222a 000c movel %a2@(12),%d1 460aa: d385 addxl %d5,%d1 460ac: 2541 000c movel %d1,%a2@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 460b0: b093 cmpl %a3@,%d0 460b2: 6606 bnes 460ba <== NEVER TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 460b4: 508b addql #8,%a3 460b6: b684 cmpl %d4,%d3 460b8: 6eb6 bgts 46070 if (bytes != iov[ v ].iov_len) break; } return total; } 460ba: 2002 movel %d2,%d0 460bc: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 460c2: 4e5e unlk %fp ...